content
stringlengths
10
4.9M
/** * @brief updates the volume bit map with newly allocated file blocks * @param in the knoxcrypt image stream * @param blockUsed the used block * @param totalBlocks total number of fs blocks */ inline void updateVolumeBitmapWithOne(ContainerImageStream &in, ...
// CreateDir creates a new dorectory with 'path'(string) name // todo: can't create nested dirs like newDir/subDir/anotherDir func (c *Client) CreateDir(ctx context.Context, path string) (*Link, *ErrorResponse) { if len(path) < 1 { return nil, nil } var link *Link var errorResponse *ErrorResponse var err error ...
package dbspgraph import ( "context" "sync" "github.com/PacktPublishing/Hands-On-Software-Engineering-with-Golang/Chapter12/dbspgraph/proto" "golang.org/x/xerrors" gc "gopkg.in/check.v1" ) var _ = gc.Suite(new(MasterBarrierTestSuite)) type MasterBarrierTestSuite struct { } func (s *MasterBarrierTestSuite) Tes...
#include<stdio.h> #include<stdlib.h> int main() { int n; Printf("enter the number"); Scanf("%d",&n); switch(n) { Case(1): Printf("Food item-Pizza"); Printf("\nPrice-Rs239"); Break; Case(2): Printf("Food item-Burger"); Printf("\nPrice-Rs129"); Break; Case(3): Printf("Food item-Pasta"); Printf("\nPrice-Rs179"); Break; Ca...
/*! * \brief MOKELaserSim::on_polar_direction_valueChanged * \param value - the value of the dial * For this we first need to convert the int value from the dial to an angle. * The value at the top centre of the dial is 0 degrees (visually but not in reality, in reality the 0 angle position is down). * The initial...
Reliability Modeling and Analysis of Load-Sharing Systems With Continuously Degrading Components This paper presents a reliability modeling and analysis framework for load-sharing systems with identical components subject to continuous degradation. It is assumed that the components in the system suffer from degradatio...
// Sum512 returns the first 512 bits of the unkeyed digest of the data. func Sum512(data []byte) (sum [64]byte) { if len(data) <= consts.ChunkLen { var d Digest compressAll(&d, data, 0, consts.IV) _, _ = d.Read(sum[:]) return sum } else { h := hasher{key: consts.IV} h.update(data) h.finalize(sum[:]) r...
year, month, day = map(str, input().split('/')) year = '2018' date = year + '/' + month + '/' + day print(date)
{-# OPTIONS -cpp #-} -- #ifdef INTERACTIVE module JacobiSum where -- #else -- module Main where -- #endif -- Autor: <NAME> import ModArithmetik import Ringerweiterung import System.Environment (getArgs) import Data.Array -- import List (elemIndex) import Data.List (delete) -- import Debug.Trace (trace) -- loud s x =...
<filename>src/ssh/sftp_session.rs use super::{sftp_file::SftpFile, wrapper}; use super::error::SshError; use std::ffi::{CString}; use std::error::Error; use std::sync::{Arc, Mutex}; pub struct SftpSession { pub ptr: Arc<Mutex<*mut libc::c_void>>, } impl SftpSession { pub fn open_file(&self, filename: &CString...
I’ve been looking for the best mechanical pencil for a long while. Turns out, it was hiding right under my nose! Wanna jump right to the money shot? Scroll down! I tried the Bic AI pencil. Supposedly the lead advances itself automagically. But the mechanism is always scraping its plastic lead advance mechanism against...
/* * Copyright (C) 2012 Google Inc. * Copyright (C) 2015 <NAME>. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
<gh_stars>1-10 /** * Different macors for printing, to string/io::stdio/io::stderr, with or without newline * Numbered/named parameters * Formatting: :b, width, hex/binary/oct, precision * Display vs Debug: why, {} and {:?} */ fn different_prints() { //format creates formatted String let value = "value"; ...
// AOJ 0603: Illumination // 2017.10.31 bal4u@uu #include <stdio.h> #include <stdlib.h> char a[100002]; int t[100002]; char buf[200100], *p; int main() { int n, i, k, sz, ans; fgets(buf, 10, stdin), n = atoi(buf); fgets(p=buf, sizeof(buf), stdin); for (i = 0; i < n; i++) a[i] = *p, p+=2; for (sz = 0, k = 0, i...
def _generate_latlon_grid(resolution=2, min_lat=-90, max_lat=90): lat, lon = np.meshgrid( np.arange(min_lat, max_lat, resolution), np.arange(-180, 180, resolution)) REFRAD_KM = 6371.200 rad = np.ones_like(lat)*REFRAD_KM return lat, lon, rad
/* SPDX-License-Identifier: BSD-3-Clause */ #ifndef SRC_TPM_HASH_H_ #define SRC_TPM_HASH_H_ #include <stdbool.h> #include <tss2/tss2_esys.h> /** * Hashes a BYTE array via the tpm. * @param context * The esapi context. * @param hash_alg * The hashing algorithm to use. * @param hierarchy * The hierarchy. *...
<gh_stars>0 import { nanoid } from '@reduxjs/toolkit'; import { dumbAssert, OneOrMany, StringKeys } from '../../../common/miscUtils'; import { Database, DBSelector, MappedStatic, StaticSchema } from './Database'; import { ActiveRecord, ModelRecord, NormalizeRecord, PossiblyNormalized } from './ModelRecord'; import { Mo...
def reset(self): self.accum_delay = [0.0]*self.order self.accum_out = [0.0]*self.order self.accum_carry = [0.0]*self.order self.sum_delay = [0.0]*(self.order-1) self.delay_line = [0] * self.delay
<reponame>israelchen/gostory<filename>log.go package gostory import ( "fmt" "time" "github.com/israelchen/gostory/util" ) func (s *Story) Error(message string, args ...interface{}) *Story { return s.Log(ERROR, message, args...) } func (s *Story) Info(message string, args ...interface{}) *Story { return s.Log(I...
/** * Hibernate implementation for CategoryStatistics. * * @author matthaeus * */ public class CategoryStatisticsDAOHibernate extends GenericResourceHibernateDAO<CategoryStatistics> implements CategoryStatisticsDAO { public CategoryStatisticsDAOHibernate() { super(); } public CategoryStatist...
// Print adds main conversion functions into buffer, which contains matched // fields. func (d *ftpldata) Print(swap, debug bool, helperpkg string) error { d.header(swap, false, false, false) d.retstmt(swap) if err := d.fieldmap(swap, debug, helperpkg); err != nil { return err } d.footer() d.footer() return ni...
<filename>packages/types/src/@types/eth-block-tracker.ts<gh_stars>10-100 /* eslint-disable import/no-default-export */ declare module 'eth-block-tracker' { class BlockTracker {} export default BlockTracker; }
<gh_stars>1-10 # -*- coding: utf-8 -*- """ .. admonition:: License Copyright 2019 CNES Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
def rename_pdf_fields(in_file: str, out_file: str, mapping: Mapping[str, str]) -> None: in_pdf = Pdf.open(in_file, allow_overwriting_input=True) for field in in_pdf.Root.AcroForm.Fields: if field.T in mapping: field.T = mapping[field.T] in_pdf.save(out_file)
<filename>packages/notification/src/notification.module.ts import { DynamicModule, Module } from '@nestjs/common'; import { NOTIFICATION_OPTIONS } from './notification.constants'; import { NotificationModuleAsyncOptions, NotificationModuleOptions } from './notification.interfaces'; import { NotificationService } from '...
<filename>tce/src/codesign/osal/OSALTester/TestOsal.cc /* Copyright (c) 2002-2009 Tampere University. This file is part of TTA-Based Codesign Environment (TCE). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
<gh_stars>0 import {Component, provide, primaryIdentifier} from '@layr/component'; import {MemoryRouter} from '@layr/memory-router'; import {Routable, route} from '@layr/routable'; describe('MemoryRouter', () => { let currentRouteResult: string; const getRouter = function () { class Home extends Routable(Comp...
Fetal Weight Outcomes in C57BL/6J and C57BL/6NCrl Mice after Oral Colonization with Porphyromonas gingivalis Porphyromonas gingivalis is considered a keystone pathogen that contributes to the initiation and progression of periodontitis in humans. P. gingivalis has also been detected in human placentas associated with ...
def flatten3d(input): assert input.ndim > 1 if input.ndim == 3: return input return reshape(input, (input.shape[0], input.shape[1], -1))
// start periodically iterates over all installed sites and, if needed, updates their states // appropriately depending on their "remote support" status func (c *stateChecker) start() { ticker := time.NewTicker(defaults.OfflineCheckInterval) for { select { case <-ticker.C: sites, err := c.conf.Backend.GetAllSi...
#pragma once #include <stdint.h> #include <stdbool.h> void ONNC_RUNTIME_transpose_float( void * restrict onnc_runtime_context ,const float * restrict input_data ,int32_t input_data_ndim, const int32_t * restrict input_data_dims ,float * restrict output_transposed ,int32_t output_transposed_ndim, const int32...
A Doctor's 9 Predictions About The 'Obamacare Era' Enlarge this image toggle caption Images.com/Corbis Images.com/Corbis Debate is raging about Obamacare, and not just in Washington. Out here in Oklahoma we're grappling with implementation of the Affordable Care Act. Patients. Employers. Hospitals. Doctors. Insurers....
<reponame>mbmahyar/MBDash export const ADMIN_ROUTER = { ADMIN_ROOT_ROUTE : 'dashboard', ADMIN_HOME_ROUTE : 'home', ADMIN_CATEGORIES_LIST_ROUTE : 'categories', ADMIN_CATEGORIES_CREATION_ROUTE : 'category-creation' };
Innovation in the globalised world: educating future building professionals © 2020 by the author(s). This is an Open Access article distributed under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) License (https:// creativecommons.org/licenses/ by/4.0/), allowing third parties to copy and ...
#------------------------------------------------------------------------------------------------------------------------------------------------------------------# # Tukaj so pomožne funkcije za lepši izgled programa. def povprecje(seznam): if len(seznam) == 0: return 0 else: vsota = 0 ...
/* Build a function call using a tree list of arguments. */ tree cp_build_function_call (tree function, tree params, tsubst_flags_t complain) { VEC(tree,gc) *vec; tree ret; vec = make_tree_vector (); for (; params != NULL_TREE; params = TREE_CHAIN (params)) VEC_safe_push (tree, gc, vec, TREE_VALUE (params)...
The Effects of Apprenticeship of Observation on Teachers Attitudes towards Active Learning Instruction Kuzhabekova Aliya - PhD in Higher Education Policy and Administration (University of Minnesota, USA); Assistant Professor, Graduate School of Education, Nazarbayev University (Kazakhstan). E-mail address: aliya.kuzha...
<reponame>mooncaker816/learnmeeus<filename>v3/moon/moon.go // Copyright 2013 <NAME> // License: MIT // Moon: Chapter 53, Ephemeris for Physical Observations of the Moon. // // Incomplete. Topocentric functions are commented out for lack of test data. package moon import ( "math" "github.com/mooncaker816/learnmeeu...
/** * Performs the work of checking for file permissions for READ_EXTERNAL_STORAGE, if * it was previously granted then the normal flow of storing the file continues */ private void requestPermission(){ if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_...
<filename>referee/client/main.go<gh_stars>1-10 package main import ( "context" "fmt" "github.com/devplayg/hello_grpc/referee/proto" "google.golang.org/grpc" "io" "math/rand" "time" ) const ( addr = "localhost:50051" ) func main() { rand.Seed(time.Now().Unix()) // Create connection conn, err := grpc.Dial(...
/** * Adds an encapsulation constraint to the builder given, if encap is not * equal to NONE. * * @param builder the intent builder * @param encap the encapsulation type */ private static void encap(ConnectivityIntent.Builder builder, EncapsulationType encap) ...
<filename>problem_mrna.go<gh_stars>0 package rosalind func ProteinToRNACount(protein string) int { count := 1 for _, symbol := range protein { count *= len(CodonRNATable[symbol]) count %= 1000000 } return count } var CodonRNATable = map[rune][]string{ 0: {"UAA", "UAG", "UGA"}, 'G': {"GGU", "GGC", "GGA", "...
<reponame>mu-xin/alfredWorkflowForBilibili package main import ( "fmt" "testing" ) type args struct { args []string } type test struct { name string args args wantQueryType string wantKeyWord string wantSort string } func Test_parseArgs(t *testing.T) { a := make([]string, 0) var ...
import { expect } from 'chai'; import { FAILURE, REQUEST, SUCCESS } from 'app/shared/reducers/action-type.util'; import register, { ACTION_TYPES } from 'app/modules/account/register/register.reducer'; describe('Creating account tests', () => { const initialState = { loading: false, registrationSuccess: fals...
def write_raster(array,gdf,outfn): xmin, ymin = gdf.bounds.minx.values[0], gdf.bounds.miny.values[0] xmax, ymax = gdf.bounds.maxx.values[0], gdf.bounds.maxy.values[0] nrows, ncols = array.shape xres = (xmax-xmin)/float(ncols) yres = (ymax-ymin)/float(nrows) geotransform =(xmin,xres,0,ymax,0, -yres) output_ras...
<gh_stars>0 package main import ( "bytes" "crypto/rsa" "encoding/json" "io/ioutil" "net/http" "os" "time" "github.com/form3tech-oss/jwt-go" "github.com/square/go-jose" "github.com/ory/oathkeeper/x" "github.com/ory/x/cmdx" "github.com/ory/x/urlx" ) const key = `{ "keys": [ { "kid": "01cf6f34-...
// Close shutsdown the switch and sets all GPIO ports to false. func (g *MPSwitchGPIO) Close() { g.Lock() defer g.Unlock() for _, p := range g.ports { for _, r := range p.terminals { r.setState(false) } } }
NORTHAMPTON, Mass. -- A Massachusetts police officer has paid for the gasoline of a driver who mistakenly pumped $20 worth of fuel into his car with only $1.79 in his pocket. Paul Zabawa tells The Daily Hampshire Gazette he was in desperate need of fuel Monday when he pulled into a Northampton gas station with less th...
def translacion_cM(selection): masses = selection.getMasses() coords = selection.getCoords() totmass = 0.0 x,y,z = 0,0,0 for (mass, coord) in zip(masses, coords): m = mass m = 1 x += coord[0]*m y += coord[1]*m z += coord[2]*m totmass += m cM = numpy.array([x/totmass, y/totmass, z/totmass]) trans_arra...
def open(): status = forecast.get_status() if(status.is_open): opennow_text = render_template('opennow', time=status.time_left) return statement(opennow_text) else: closednow_text = render_template('closednow', time=status.time_left) return statement(closednow_text)
from sys import stdin def main(): tc = int(stdin.readline()) for i in range(tc): r = [False for j in range(26)] a = stdin.readline().strip() j = 0 while(j<len(a)): if(j+1 < len(a)and a[j] == a[j+1]): j+=2 else: r[ord(a[j])-97] = True j+=1 ans = "" for k in range(len(r)): if(r[k]): ...
Pining for the fjords1 In recent years, the specialty of palliative medicine has placed a major emphasis on encouraging openness in discussions around death. The purpose is twofold: to encourage our medical colleagues to develop the communication skills necessary to support their patients in making decisions around en...
#ifndef HLL_CONSTANT_H #define HLL_CONSTANT_H extern double switchThreshold[15]; extern double *rawEstimateData[]; extern double *biasData[]; #endif
High-precision QCD physics at FCC-ee The Future Circular Collider (FCC) is a post-LHC project aiming at direct and indirect searches for physics beyond the SM in a new 100 km tunnel at CERN. In addition, the FCC-ee offers unique possibilities for high-precision studies of the strong interaction in the clean environmen...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.messaging.servicebus; import reactor.core.Disposable; import java.time.Duration; import java.util.concurrent.TimeUnit; /** * Demonstrates how to enable automatic lock renewal for a message when receivi...
Steve Bannon, the CEO of Donald Trump's campaign, was charged with injuring his former wife in a domestic violence case when they were married in the 1990s, according to California court documents and news reports. The case was later dismissed, but it stemmed from an argument on New Year’s Day in 1996 over finances, P...
/** * A NodeAction that evaluates function */ public class SFuncAction implements NodeAction<SFunc>{ @Override public void doAction(SFunc node, Set<GraphNode<SFunc>> deps) { if(node.isActive()) { node.evaluate(); } } }
<reponame>seanmcox/scratch-runner-implementation package com.shtick.utils.scratch.runner.impl2; import java.awt.Component; import java.awt.Graphics2D; import java.awt.Image; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import ...
s=input() l=len(s) m=(l-1)//2 x=s[m] gol=gor=m for i in range(l-1): if(i%2 == 0): gor+=1 x+=s[gor] else: gol-=1 x+=s[gol] print(x)
Associations between HIV-related stigma, self-esteem, social support, and depressive symptoms in Namibia ABSTRACT Objective: The current study sought to investigate the association between HIV-related stigma, self-esteem, social support, and depression of people living with HIV and AIDS (PLWHA) in Namibia. Method: Pur...
/** * Parse and fully resolve all files. * @param javaProject * @param parseUnits the files to be parsed and resolved. */ static void createASTs(final IJavaProject javaProject, final ICompilationUnit[] parseUnits, ASTRequestor requestor) { String bogusKey = BindingKey.createTypeBindingKey("java.lang.Ob...
<gh_stars>1-10 use std::{ cmp::Ordering, collections::HashMap, convert::identity, fmt::{self, Display, Formatter}, iter, ops::Mul, }; use derive_more::{Add, AddAssign, Sub, SubAssign, Sum}; use rand::{Rng, SeedableRng}; use rand_chacha::ChaCha8Rng; use thiserror::Error; use super::{ block:...
/** * @brief Has to be used before exporting to Json format */ public void buildToJson() { incoming = new int[incoming_links.size()]; outgoing = new int[outgoing_links.size()]; for (int i = 0; i < incoming_links.size(); i++) incoming[i] = incoming_links.get(i).unique_id; for (int i = 0; i < ...
/** * Returns true if <CODE>name</CODE> is a valid corpus name: * a non-empty string with no whitespace or '/'. */ public static boolean validName (String name) { if (name.isEmpty()) return false; for (int i = 0; i < name.length(); i++) { char c = name.charAt(i);...
<reponame>iknite/qed /* Copyright 2018-2019 <NAME>, S.A. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
package fr.themode.demo.generator; import lombok.Data; import net.minestom.server.instance.batch.ChunkBatch; import net.minestom.server.instance.block.Block; import net.minestom.server.utils.BlockPosition; import java.util.HashMap; import java.util.Map; @Data public class Structure { private final Map<BlockPositio...
Teaching top down design of analog/mixed signal ICs through design projects This paper describes a project course that focuses on the design of analog and mixed signal circuits through a systematic top down design flow. In the project, the student will be involved in the planning, modeling, circuit level design, physi...
/** * Tasktracker has a bug where changing the hadoop.log.dir system property * will not change its internal static LOG_DIR variable. */ private void forceChangeTaskLogDir() { Field logDirField; try { logDirField = TaskLog.class.getDeclaredField("LOG_DIR"); logDirField.setAccessible(true); ...
/** * Selects the word at the cursor position. */ void selectWord() { pos(getCaret()); final boolean ch = ftChar(prev(true)); while(pos() > 0) { final int c = prev(true); if(c == '\n' || ch != ftChar(c)) break; } if(pos() != 0) next(true); startSelect(); while(pos() < siz...
#include <stdlib.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <time.h> #define F(x, y ,z) ((x & y) | (~x & z)) #define G(x, y, z) ((x & y) | (x & z) | (y & z)) #define LROT(x, n) ((x << n) | (x >> (32 - n))) #define RROT(x, n) ((x >> n) | (x << (32 - n))) #define PHI0(a, b, c, d, m, s) (LRO...
/** * Deletes all the items in the list. */ void clear() { #if M_THREAD_SAFE_EXPANDABLE_LISTS lock(); #endif for(int i = 0; i < nactualelements; i++) { if(list[i] != NULL) { list[i] = shared_ptr<Class>(); } } ...
/** * @author Ibrahima Diarra * */ public class LinkedListTest { final private String[] data = new String[]{"to", "to", "to"}; LinkedList<String> list = new LinkedList<String>(); LinkedList<Integer> ilist = new LinkedList<Integer>(); private static final Logger L = LogManager.getLogger(LinkedListTest.cl...
def absolute(self): string = self.__str__() return _ldns.ldns_dname_str_absolute(string) != 0
/** * This class encapsulates methods for requesting a server via HTTP GET/POST and * provides methods for parsing response from the server. * * @author www.codejava.net * */ public class HttpUtility { /** * Represents an HTTP connection */ private static HttpURLConnection httpConn; /** * Makes an HTTP...
/* * Creates a new .jar file with a MANIFEST.MF with all vaadin license info * attributes set, and add the .jar to the classpath */ static void addLicensedJarToClasspath(String productName, String licenseType) throws Exception { Manifest testManifest = new Manifest(); testMani...
// Created by Priyanshu #include <bits/stdc++.h> #define M 1000000007 #define pi 3.14159265358979323846 #define ll long long #define lld long double #define ld double #define ull unsigned long long #define...
Forward-Backward and Charge Asymmetries in the Standard Model This talk reviews the Standard Model predictions for the top-quark forward backward and charge asymmetries measured at the Tevatron and at the LHC. produced in the direction of the incoming proton, while antitop quarks are more likely to be produced in the...
// SPDX-License-Identifier: GPL-2.0-only /* * powerpc code to implement the kexec_file_load syscall * * Copyright (C) 2004 Adam Litke (agl@us.ibm.com) * Copyright (C) 2004 IBM Corp. * Copyright (C) 2004,2005 Milton D Miller II, IBM Corporation * Copyright (C) 2005 R Sharada (sharada@in.ibm.com) * Copyright (...
n = input() l = [] for i in n: if len(l) and i == l[-1]: # print(1, i, l) del l[-1] else: l.append(i) # print(2, i, l) print('Yes' if l == [] else 'No')
// Code generated by go-swagger; DO NOT EDIT. package products // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) // PostReplicationExecutionsReader i...
When Something Seems Amiss: Radiology-Pathology Correlation of Metaplastic Breast Cancer Metaplastic breast cancer is difficult to diagnose, resistant to conventional treatment, and biologically aggressive. A suspicious timeline and discordance between imaging findings and histopathologic tissue diagnosis should trigg...
// Chunk splits a collection into chunks of a given size. The given chunk size must be greater than zero, otherwise it // panics. Example: // // _ = Chunk([]int{1, 2, 3, 4, 5}, 2) == [][]int{{1, 2}, {3, 4}, {5}} func Chunk[Type any](collection []Type, chunkSize int) [][]Type { if chunkSize < 1 { panic("chunk size mu...
declare const getWeekDays: (date: Date) => Date[]; declare const getWeekDayLabels: (locale: any) => string[]; declare const getDisplayingDays: (date: Date) => Date[]; declare const isSameMonth: (day1: Date, day2: Date) => boolean; declare const isToday: (day: Date) => boolean; declare const isSameDate: (day1: Date, day...
#include "GL\glew.h" #include "src\Game\Level\Level1.h" #include "glm\glm.hpp" #include "src\Engine\Model\ShapeGenerator.h" using glm::vec3; Level1::Level1(){ } void Level1::load(){ renderer.shader.installShader(); circle = ShapeGenerator::createSphere(); circle.load(); rect = ShapeGenerator::createRectangul...
<gh_stars>0 #import <stdio.h> typedef struct { int zee; int yee; } foo; int main(int argc, char** argv){ foo x; x.zee=2; x.yee=3; int fooy=10; int z = 0; while (z<fooy){ puts("In the while loop!"); z++; } for (int i=0; i<10; i++){ puts("In the for loop!"); } }
<filename>MainMenu/DecideGame.java import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import org.json.* ; import com.fasterxml.jackson.databind.*; import org.restlet.resource.*; import org.restlet.representation.* ; import org.restlet.ext.json.* ; import org.restlet.data.* ; import org.rest...
/* * graphpath.cpp * * Created on: Apr 21, 2013 * Author: <NAME> */ #if 0 #include <limits> #include "graphpath.hpp" #include "graphengine.hpp" #define DEBUG_CLASS "GraphPath" #include "debug.hpp" using namespace std; using namespace mu; GraphPath::GraphPath(GraphEngine *ge, string eqn) : eqn(eqn), ge...
def color_trust_image(trust, mask=None, BGR=True): return color_error_image(np.power(2.0, 4 - trust*8), scale=1, mask=mask, BGR=BGR)
Justin Pogge isn't going to give up that easily. The former Toronto Maple Leafs goaltender, who appeared in just seven games for the squad in 2008-09, is interested in making a return to the NHL. "I would love a deal that would give me the best chance at getting back into the NHL," Pogge told Dhiren Mahiban of Pro Ho...
import collections N = int(input()) rates = list(map(int, input().split())) colors = [min(8, i // 400) for i in rates] CTR_colors = collections.Counter(colors) ans = len(CTR_colors) if (CTR_colors[8] > 0): ans -= 1 if (ans == 0): mini_ans = ans + 1 else: mini_ans = ans max_ans ...
<reponame>iooxa/ink-chart<gh_stars>1-10 import components, { register } from './components'; export { register }; export default components;
Kander is essentially running a biographical campaign grounded in character, not ideology. “He has broken with his party many times,” Hayden said in an interview earlier this month. “He was the first Democrat to come out against the Iran deal.” In an election season that has partly been defined by establishment vs. ant...
// Initially, set media blocking to be true. When media is unblocked, check that // it begins playing, since autoplay=true. TEST_F(WebEngineIntegrationTest, SetBlockMediaLoading_AfterUnblock) { StartWebEngine(); CreateContextAndFrame(ContextParamsWithAudioAndTestData()); frame_->SetBlockMediaLoading(true); Load...
def scale_measurement(self, scale: Scale) -> ScaleMeasurement: measurement_class = self.SCALE_CLASSES[scale] previous = None if self.__previous_measurement is None else self.__previous_measurement[scale] return measurement_class( self.get(scale, {}), measurement=self, previous_scale_...
def string2date( self, mystring ): if isinstance(mystring, float): mystring = self.getDateString(mystring) tmp = string.split( mystring, "-") return datetime.datetime( int(tmp[0]), int(tmp[1]), int(tmp[2]) )
def build_all(app_def, options): with tempfile.TemporaryDirectory(suffix='_make_dist') as tmp_dir: if options['target_platform'] == 'win32': build_dir = path_join(tmp_dir, 'build') os.mkdir(build_dir) copy_exe(app_def, options, bu...
/** * Some GPU architectures have a text based encoding. */ public final void emitString(String x) { emitString0("\t"); emitString0(x); emitString0(NEWLINE); }
Germany's new Minister for Foreign Affairs, Sigmar Gabriel, stepped on Sunday that the potential thaw in relations between Moscow and Washington will be good for resolving of conflicts brewing around the worls, including those in Ukraine and Syria. BERLIN (Sputnik) — Potential rapprochement between Russia and the Unit...
Cody Rhodes is a man on a mission He is determined to have Ring of Honor book a large arena and sell 10,000 tickets. On its face it seems ridiculous. From examining the Wrestling Observer and the Internet Wrestling Database for 2012-2017, Ring of Honor has broken an attendance barrier of 2,000 just three times since 20...
def mp(x, y, z, a): return x * y * (1. - np.cos(a)) + z * np.sin(a)