content
stringlengths
10
4.9M
def aggregate_values(self, parameter_names, arguments): return parameter_names, arguments
<gh_stars>1-10 #ifndef MAJ_ARG_PARSE_H #define MAJ_ARG_PARSE_H void usage( const char *s ); unsigned long parse_qty( const char *s ); #endif
package br.com.luvva.webcam.test; import br.com.jwheel.xml.model.PathPreferences; import javax.inject.Singleton; /** * @author <NAME>, <NAME>. - <EMAIL> */ @Singleton public class MyPathPreferences extends PathPreferences { @Override public String getRootFolderName () { return "test-webcam"; ...
package greencity.mapping; import greencity.dto.econewscomment.EcoNewsCommentDto; import greencity.dto.econewscomment.EcoNewsCommentAuthorDto; import greencity.entity.EcoNewsComment; import greencity.entity.enums.CommentStatus; import org.modelmapper.AbstractConverter; import org.springframework.stereotype.Component; ...
// // QNSubscription.h // Qonversion // // Created by <NAME> on 14.05.2021. // Copyright © 2021 Qonversion Inc. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSInteger, QNSubscriptionRenewState){ QNSubscriptionRenewStateUnknown = -1, QNSubscriptionRenewStat...
<filename>src/app/app.module.ts<gh_stars>0 import { RouterModule } from '@angular/router'; import { BrowserModule } from '@angular/platform-browser'; import { LocationStrategy, PathLocationStrategy, HashLocationStrategy } from '@angular/common'; import { BrowserAnimationsModule } from '@angular/platform-browser/animati...
/** * \brief Check if receive FIFO is not empty * * \param [in] uart identifies UART to use * * \return true if FIFO is not empty * */ static inline bool hw_uart_receive_fifo_not_empty(HW_UART_ID uart) { ASSERT_ERROR(uart == HW_UART2); return HW_UART_REG_GETF(uart, USR, UART_RFNE) != 0; }
{-# LANGUAGE CPP #-} #define DEBUG 0 #define TEST 0 module Bus ( Bus(..), newBus, Passenger(..), board, drive, ride, wait, tryride, unboard ) where import Control.Concurrent import Control.Monad import Data.Either import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import System.Mem.Weak ne...
__author__='Walnut' import math n=int(input()) line=input().split() arr=[0,0,0,0] for i in line: arr[int(i)-1]+=1 car=int(0) car+=arr[3] car+=arr[2] arr[0]-=arr[2] car+=math.ceil(arr[1]/2) if arr[1]%2==1 :arr[0]-=2 if arr[0]>0 : car+=math.ceil(arr[0]/4) print(car)
/** * Converts a block-position to a map-tile-coordinate */ public Vector2i posToTile(Vector3d pos){ pos = pos.sub(new Vector3d(gridOrigin.getX(), 0.0, gridOrigin.getY())); return Vector2i.from( (int) Math.floor(pos.getX() / getTileSize().getX()), (int) Math.floor(pos.getZ() / getTileSize().getY()) ...
/** * <code>required string barendtime = 7;</code> */ public Builder clearBarendtime() { bitField0_ = (bitField0_ & ~0x00000040); barendtime_ = getDefaultInstance().getBarendtime(); onChanged(); return this; }
// LoadSheet loads a file in some directory with sheets of (w,h) sized sprites. // This will blow away any cached sheet with the same fileName. func (c *Cache) LoadSheet(file string, cellSize intgeom.Point2) (*Sheet, error) { var rgba *image.RGBA var ok bool var err error if !ok { rgba, err = c.loadSprite(file, 0...
// ret: -1 error, 0 more field, 1 no more field static int socket_data_info_get(char *buf, uint32_t buflen, at_data_check_cb_t valuecheck) { uint32_t i = 0; if (NULL == buf || 0 == buflen) { return -1; } do { at.parse(&buf[i], 1); if (buf[i] == ',') { buf[i] = 0; ...
North Korean dictator Kim Jong-un looks at a farm machinery in an undated photo released by North Korea’s Korean Central News Agency on Thursday. KCNA/Reuters Well, North Korea is at it again. From CNN: State news agency KCNA has announced that North Korea will set its clocks back by 30 minutes to “Pyongyang time” on...
def warp_affine(src: Tensor, M: Tensor, dsize: Tuple[int, int], mode: Optional[str] = 'bilinear', padding_mode: Optional[str] = 'zeros') -> Tensor: if not torch.is_tensor(src): raise TypeError("Input src type is not a Tensor. Got {}".format(type(src))) if not torch.is_tensor(M): ...
<reponame>Deadlyelder/Crypto-Tools<filename>S-function toolkit/print.h /* * Toolkit for the Differential Cryptanalysis * of ARX-based Cryptographic Constructions. * * (c) 2010 <NAME>, <NAME>, * <NAME>`{e}re and <NAME> */ #ifndef PRINT_H #define PRINT_H template <int M, int N> void print_matrix(const int...
def stop_services(self, node): for service in node.services: self.stop_service(node, service)
def create_user_with_ldap_info(ldap_connection, ldap_base_dn, login, password): name = get_user_name_from_ldap(ldap_connection, ldap_base_dn, login) email = '%s@%s' % (login, ".".join([DC.split('=')[1] for DC in ldap_base_dn.split(',')])) from stalker import User, Group from stalker.db.session import DB...
// GetBootVolumeLifecycleStateEnumValues Enumerates the set of values for BootVolumeLifecycleState func GetBootVolumeLifecycleStateEnumValues() []BootVolumeLifecycleStateEnum { values := make([]BootVolumeLifecycleStateEnum, 0) for _, v := range mappingBootVolumeLifecycleState { values = append(values, v) } return...
/** * <code>ForkJoinTask</code> for calculating the values of the projection. * * @author saybur * */ private final class TaskAction extends RecursiveAction { private static final long serialVersionUID = -3229497413493883470L; private final Matrix data; private final int low; private f...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, September 27, 2020 at 11:41:50 AM Mountain Standard Time * Operating System: Version 14.0 (Build 18A373) * Image Source: /System/Library/Frameworks/AVKit.framework/AVKit * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. */ #impor...
def compute_nb_steps(self, move_direction, move_step): if move_step[0] != 0: return int(np.floor(move_direction[0] / move_step[0])) elif move_step[1] != 0: return int(np.floor(move_direction[1] / move_step[1])) elif move_step[2] != 0: return int(np.floor(move_...
/** * Created by Arcturus Mengsk on 2/4/2018, 6:54 AM. * foursquareapp */ @InjectViewState public class WelcomeScreenPresenter extends MvpPresenter<WelcomeView> { @Inject MainRouter mRouter; @Inject FoursquareApplication mFoursquareApplication; @Inject SharedPreferences mPreferences; public Welcome...
© Reuters. 1,5 MILLIARD D'EUROS POUR FORMER LES FONCTIONNAIRES PARIS (Reuters) - L'Etat allouera 1,5 milliard d'euros sur cinq ans à la formation des fonctionnaires afin de mettre en oeuvre les mesures contenues dans le projet de loi portant notamment sur le droit à l'erreur, annonce le ministre des Comptes publics, G...
<reponame>younamebert/xfssdk<gh_stars>0 package apinet import "github.com/younamebert/xfssdk/core/apis" type NetLink interface { GetNodeId() (*string, error) } type ApiNet struct{} // GetNodeId get nodeid of current node chain func (net *ApiNet) GetNodeId() (*string, error) { var result *string if err := apis.GV...
#pragma once #include"LinkedListArray.h" #include"BagIterator.h" #include"Pair.h" typedef int TElem; typedef bool(*Condition)(TElem); struct pair { TElem element; int freq; }; class Bag { friend class BagIterator; private: /*representation of Bag*/ LLA<Pair> items; public: //cons...
/** * Populate all controls and combo boxes * based on the current control. */ protected void populateControls() { if (currentField != null) { helpKeys = currentField.getHelpKeys(); choiceKeys = currentField.getChoiceKeys(); labelKeyButton.setText(currentField.ge...
Oxidative stress and transferrin receptor recycling. Perturbation of the oxidative balance in biological systems plays an important role in numerous pathological states as well as in many physiological processes such as receptor activity. In order to evaluate if oxidative stress induced by menadione influences membran...
The great promise of a car fuel made from cheap, clean-burning prairie grass or wood chips--and not from expensive corn that feeds the world--is more mirage than reality. Despite years of research, testing, and some hype, the next-generation ethanol industry is far from the commercial success envisioned by President G...
///SDP_INCLUDED == TRUE /******************************************************************************* ** ** Function bta_dmexecutecallback ** ** Description This function will request BTA to execute a call back in the context of BTU task ** This API was named in lower case because it is...
/* precondiciones: Recibe una fecha correcta. * postcondiciones: El nombre queda armado. */ void armar_nombre_liberados(char fecha[MAX_FECHA],char nombre_liberados[MAX_NOMBRE]){ strcpy(nombre_liberados,"liberados_"); strcat(nombre_liberados,fecha); strcat(nombre_liberados,".txt"); }
class Tree: """Tree is the star of the show. Attributes: age (float): Age of tree in years (1 day is 1/365). Initial age of tree is set using scipy.stats.truncnorm with settings from arborlife.yml config file. alive (bool): True if tree is alive else false. Initial stat...
import java.util.Arrays; import java.util.Scanner; import java.util.Stack; public class A { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[][] C = new int[n][n]; for (int i = 0; i < n; i++) Arrays.fil...
/** * An Object in the game, represented as a rectangle. Which holds details of * shape, plus possible local of travel. Would be better to use inheritance. * * @author Jacob Shirley & Mike Smith University of Brighton */ public class GameObj { // All the variables below are vital to the state of the object prot...
def part_of_env(pattern, env_name): for part in pattern.split("-"): if part.startswith("!"): if part[1:] in env_name: return False else: if part not in env_name: return False return True
/********************************************************************* * * SIM_OS_UpdateWindow() * * Function description * Immediately updates the entire device on the display. */ void SIM_OS_UpdateWindow(void) { if (_hWnd != NULL) { InvalidateRect(_hWnd, NULL, FALSE); UpdateWindow(_hWnd); } }
Photo: YouTube screencapture This morning Brandon Crouch reported the death of his grandfather, Trinity Broadcasting Network founder Paul Crouch, on Twitter and Instagram. According to Christian singer Vicki Yohe, "Dr. Paul Crouch passed away at 2:32am this morning .. Say a prayer for the family !" TBN has posted an ...
A CNN correspondent has been suspended for two weeks after publicly criticizing the US House of Representatives’ decision to suspend a program allowing Syrian and Iraqi refugees to enter the United States. Elise Labott, a CNN global affairs correspondent tweeted: “House passes bill that could limit Syrian refugees. St...
/** * Exception builder instance creation with null type. */ @Test (expected = IllegalArgumentException.class) public void exceptionBuilderInstanceCreationWithNullType() { final PropertiesPojoBuilder pojoBuilder = new PropertiesPojoBuilder(); pojoBuilder.setHost(DUMMY_HOST); pojoBuilder.setIndex(D...
<gh_stars>0 var fs = require('fs'); export module Types { export interface Constraints { minValue?: string; maxValue?: string; defaultValue?: any; minArraySize?: number; maxArraySize?: number; minStringSize?: number; maxStringSize?: number; } export...
Characterization of wafer-level bonded hermetic packages using optical leak detection For MEMS devices required to be operated in a hermetic environment, one of the main reliability issues is related to the packaging methods applied. In this paper, an optical method for testing low volume hermetic cavities formed by a...
import * as cms from '../cms' import { CMS } from '../cms' import { MultiContextCms } from '../cms/cms-multilocale' import { Locale } from '../nlp' import { ContentfulCredentials, ContentfulOptions } from '../plugin' import { shallowClone } from '../util' import { Contentful } from './cms-contentful' /** * Set it to ...
// aggregateForwarding reads incoming forward messages and aggregates them. // Every flush interval it forwards the collected stats. func (s *Server) aggregateForwarding() { ticker := s.aggregateForwardingFlushTicker() for { select { case stat := <-s.forwardingIncoming: if stat.Type == StatCounter { s.forw...
export type ApiError = { error: string; message: any; };
def __copy_sfr_input(self, path_sfh_in): nb_dt_csi = self.nb_timesteps + 1 i_dt_csi = 0 t_csi = 0.0 m_stel_sfr_in = 0.0 with open(os.path.join(nupy_path, path_sfh_in), 'r') as sfr_file: line_1_str = sfr_file.readline() parts_1 = [float(x) for x in line_1_...
import PermsApi from '@/services/api/perms.service' const namespaced = true const state = { isLoading: false, permissions: [], scopes: [] } const mutations = { SET_LOADING(state) { state.isLoading = true }, SET_PERMS(state, permissions) { state.isLoading = false state.permissions = permissio...
def _update_iface_map(self): out = subprocess.check_output( ['networkctl', 'list', '--no-pager', '--no-legend']) self._ifaces.clear() for line in out.split(b'\n')[:-1]: fields = line.decode('ascii').split() idx = int(fields[0]) name = fields[1] ...
. OBJECTIVES To find out the opinions of primary care professionals on prevention activities in clinical practice, as well as the perceived obstacles to carrying them out and ways of overcoming them. PARTICIPANTS A total of 129 professionals participated, including primary care doctors, nurses, technicians, primary ...
// TestFileCacheReadCacheAndExpiry tests whether the fileCache will properly read from cache, and that it resets the cache func TestFileCacheReadCacheAndExpiry(t *testing.T) { dir, cleanup := getTempDir(t) defer cleanup() cpu := resource.NewQuantity(2, resource.DecimalSI) _ = cpu.String() newCPU := resource.NewQua...
View Caption Hide Caption Mobile cell site (Provided by AT&T) More than 30,0000 concert-goers are expected to flock to a rural grove in Okeechobee County this weekend for the inaugural Okeechobee Music and Arts Festival, and AT&T says they shouldn’t have a problem using their smartphones when they get there. The comp...
def predict(self, time): if self.mode == 'read': noise = np.random.normal(scale=self.noise_scale, size=self.horizon-1) noise = pd.Series([noise[:i+1].sum() for i in range(self.horizon)]) if isinstance(time, int) is not True: assert time in self.data.index, f'G...
/** * Returns true if actions should be enabled for this configuration. */ public boolean enableActions() { for (FragmentOptions fragment : fragmentOptionsMap.values()) { if (!fragment.enableActions()) { return false; } } return true; }
<filename>examples/src/asp_toplass/i_Asp.java /* $Id$ */ package asp_toplass; import java.rmi.Remote; import java.rmi.RemoteException; interface i_Asp extends Remote { public void btree_transfer(int[] row, int k, int owner) throws RemoteException; }
<reponame>TvanMeer/bbot """ Main """ import time import threading import asyncio from binance import AsyncClient, BinanceSocketManager from options import Options from pair import Pair class Bot(): def __init__(self, options, api_key=' ', api_secret=' '): self.symbols = set() ...
<filename>cmd/cleanupAwsAccount_test.go<gh_stars>0 package cmd import ( "context" "testing" "github.com/integr8ly/cluster-service/pkg/clusterservice" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2/ec2iface" "github.com/aws/aws-sdk-go/service/s3" ...
<reponame>reneruhr/kipod #pragma once #include "../../render/render_shader.h" namespace kipod { class ComputeShader : public Shader { public: ComputeShader() = default; ComputeShader(std::string comp) : Shader({}, {}, {}, comp) { } }; }
package omniv20 import ( "errors" "io" "testing" "github.com/jf-tech/omniparser/idr" "github.com/jf-tech/omniparser/schemahandler" "github.com/jf-tech/omniparser/transformctx" "github.com/stretchr/testify/assert" "github.com/jf-tech/omniparser/errs" "github.com/jf-tech/omniparser/header" "github.com/jf-te...
Proximal Hypospadias Repair Outcomes in Patients with a Specific Disorder of Sexual Development Diagnosis Boys with undermasculinized external genital and/or 46,XY disorders of sex development (DSD) often receive masculinizing genitoplasty. Such procedures are done to correct ventral curvature of the phallus, repositi...
When the NHL lockout finally ends, the next phase of Vancouver Canucks goalie Roberto Luongo's career begins. It's expected he'll be traded as Cory Schneider inherits the team's starting goaltender gig. The most widely speculated destination? The Toronto Maple Leafs. That said, isn't selling a Luongo Leafs jersey in a...
def is_stopped(self): return self.__stop_token.is_set()
<filename>app/src/intro_c/person.c #include <stdio.h> #include <stdlib.h> #include <log4c.h> #include "intro_c/person.h" static log4c_category_t *prac1; struct person {char *name; int age; }; PERSON construct_person(const char *name, const int age) { PERSON person1 = malloc(sizeof(struct person)); prac1 = l...
// BeforeCreate hook that gets called when creating new instance func (a *Alarm) BeforeSave() (err error) { a.ID = util.NewUuid() a.LowerName = strings.ToLower(a.Name) a.CreatedAt = time.Now() a.UpdatedAt = time.Now() return }
def dtype_of_gdt_upcast(gdt): param = gdt gdt = _to_gdt_opt(gdt) if gdt is None: raise ValueError('`%s` is not a gdt' % param) dtype = _DTYPE_OF_GDT_EQUIV.get(gdt) if dtype is None: dtype = _DTYPE_OF_GDT_UPCAST.get(gdt) if dtype is None: raise ValueError('`%s` has no equi...
“I can” is empowering, while “I do” is life changing. There is a subtle yet powerful difference between those verbs. “I can” will change your internal reality, will make you believe you are truly able to do it. But it won’t do it for you. It will always remain at the internal level, it won’t reach out. On the other s...
package cn.gson.oasys.voandfactory.userVO2; import lombok.Data; import lombok.ToString; import java.util.Date; @Data @ToString public class UserLoginRecordVO { private Long id; //用户登录记录表表id private String ipAddr; //ip地址 private Date loginTime; //登陆时间 private String sessionId; //session...
def _calculate_mean_return_episodic(hp_returns, type_, after=0): if type_ == "eval": hp_returns = [np.mean(hp_returns[i][after:], axis=-1) for i in range(len(hp_returns))] run_returns = [np.mean(hp_returns[i][after:]) for i in range(len(hp_returns))] mean = n...
/// Constructs a BitReader for a given range of data. pub fn new(data: &[u8]) -> BitReader { BitReader { data, bit_buf: 0, bits_in_buf: 0, total_bits_read: 0, } }
Justine (Garance Marillier) is a meek freshman in college, just leaving home for the first time when we meet her in the film. She is planning on studying to be a veterinarian at a prestigious veterinary school, following in her sister’s footsteps. The students enrolled in the veterinary program alongside her have devel...
Investigating the Impact of Air-Service Supply on Local Demand—A Causal Analysis Establishing the extent to which the level of transport supply affects demand generation remains a daunting problem for the transport analyst because of reciprocal causation and dependency between supply and demand. After the US deregulat...
package com.brucebat.message.common.util; import org.apache.commons.lang3.StringUtils; /** * Markdown工具类 * * @version 1.0 * @author : <NAME> * @since Created in 2020/7/21 */ public class MarkdownUtils { /** * 最高标题级别 */ private static final int MAX_TITLE_LEVEL = 6; /** * 最低标题级别 ...
<filename>tools/onnx2daq/OnnxConverterImpl.cpp #include <common/helper.h> #include <tools/onnx2daq/OnnxConverter.h> #include "NodeAttrHelper.h" using std::string; using std::vector; using Shape = Shaper::Shape; namespace dnn { // void OnnxConverter::AddConv(const string &input_name, // co...
<filename>src-util/brad/util/data/BeanManager.java package brad.util.data; import brad.util.sys.BRADException; import java.util.List; public interface BeanManager<T extends Bean> { long create(T t) throws BRADException; T fetch(long id) throws BRADException; List<T> fetchAll(boolean condition) throws BRA...
# -*- coding: utf-8 -*- import numpy as np import types import copy import math # Input l = list(map(int, input().split())) N = l[0] K = l[1] win_rate = 0 def calcNeedCount(d, k): point = d count = 0 while point < k: point = point * 2 count += 1 return count n = copy.deepcopy(N) whi...
/** * Created by Christophe on 20/06/2014. */ public class TypeFaceUtils { private static TypeFaceUtils mInstance; private Context mAppContext; private HashMap<String, Typeface> mTypefaceCache; public static TypeFaceUtils getInstance(@NotNull Context context) { if (mInstance == null) { ...
<filename>src/decorators/models/provider.interface.ts<gh_stars>1-10 import { QRequest } from './qrequest.model'; import { QResponse } from './qresponse.model'; export interface Provider { Request: QRequest; Response: QResponse; }
<filename>cmd/sdrain/sdrain.go package sdrain import ( "fmt" "kubectl-sdrain/pkg/sdrain" "k8s.io/kubectl/pkg/cmd/drain" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cli-runtime/pkg/resource" "k8s.io/kubectl/pkg/util/te...
/** * Return true if ice is under player * * @return */ private boolean isIceUnderPlayer() { Entity curEnt = Globals.obStore. getEntityUnder(Globals.player, false); if (curEnt == null) { return false; } boolean corrType = curEnt instanceof ...
/** * Writes a new, closed, XML element to PrintWriter. If another XML element has been written and not closed, writes * this element as a child. Adds passed attributes and character data. */ public void addClosedTextElement(String elementName, String text, String... attributes) { addElement(elem...
It turns out the oft-quoted $200 million taxpayer-backed bond that brought the Raiders back to the East Bay in 1995 is going to end up costing $350 million. It’s a debt that Oakland and Alameda County taxpayers will be paying off until 2025 — well after Raiders owner Mark Davis is enjoying his new digs in Las Vegas. ...
/** * Information about snapshot commands. * <p/> * This object holds all the information a regular ApiCommand object provides, * and adds specific information about the results of a snapshot command. * <p/> * Depending on the type of the service where the snapshot command was run, a * different result property ...
/** * Consumes the data in the internal string buffer. Whitespace is trimmed and the * buffer is emptied. * * @return The string representing the trimmed string value of the buffer. */ protected String consumeCharData() { String data = charData.toString().trim(); charData...
<gh_stars>0 def custom_upload_to(instance, filename): """Custom upload image. Delete image for user. """ old_instance = Profile.objects.get(pk=instance.pk) old_instance.avatar.delete() return 'profiles_images/' + filename
/** * Example test class */ public class GoGuiIntegratorTest { @Test public void boardSizeTest() { GoGuiIntegrator goGuiIntegrator = new GoGuiIntegrator(10, (x, y) -> {}, () -> {}, TileColour.BLACK, "Fredje"); assertEquals(10, goGuiIntegrator.getBoardSize()); } }
<gh_stars>1-10 package main import ( "reflect" "testing" ) // 声明一个结构体,拥有1个字段 type data struct { Hp int } func BenchmarkNativeAssign(b *testing.B) { // 实例化结构体 v := data{Hp: 2} // 停止基准测试的计时器 b.StopTimer() // 重置基准测试计时器数据 b.ResetTimer() // 重新启动基准测试计时器 b.StartTimer() // 根据基准测试数据进行循环测试 for i := 0; i < b.N...
/* * Used to register extra ultimately trusted keys - this has to be done * before initializing the validation module. * FIXME: Should be replaced by a function to add those keys to the trustdb. */ void register_trusted_keyid(u32 *keyid) { struct key_item *k; k = new_key_item (); k->kid[0] = keyid[0]; k->ki...
// GetJSON returns the raw JSON from a path. This is useful for debugging. func (u *Unifi) GetJSON(apiPath string, params ...string) ([]byte, error) { req, err := u.UniReq(apiPath, strings.Join(params, " ")) if err != nil { return []byte{}, err } return u.do(req) }
/// Build the test client with the given native executor. pub fn build_with_executor<RuntimeApi>( self, executor: Executor, ) -> ( client::Client<Backend, Executor, Block, RuntimeApi>, sc_consensus::LongestChain<Backend, Block>, ) where Executor: sc_client_api::CallEx...
// TODO: Include Angular INFOR. // Look into Frechet distance later <-- Not convinced this would be better. // For now, simple walk along both trajectories. (ie, time dependent) <-- imo this is better float Trajectory::distance(Trajectory& other) { dReal x_adjust = trajectory.front().com.x - other.trajectory.front...
from PyMajsoul import msjrpc import asyncio import PyMajsoul.majsoul_pb2 as pb import hmac import hashlib import getpass import uuid class testService(msjrpc.MSJRpcService): def get_package_name(self): return "lq" def get_service_name(self): return "Lobby" def get_req_class(self, met...
Sparrow for iPhone debuted earlier this year as one of the first third-party email clients to ever land in the App Store. While it’s received a lot of praise for its UI, it continues to be criticized for its lack of features. The jailbreak community has managed to help out with that a bit. But thanks to today’s update...
package com.rescam.xhb.framework.pojo; import com.rescam.xhb.framework.entity.ManageUser; public class Session { private ManageUser manageUser; private Integer customerId; private String weixinOpenId; public ManageUser getManageUser() { return manageUser; } public void setManageUser(ManageUser manageUser) { ...
<gh_stars>1-10 package dsf.checkWord.xml; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import com.sun.org.apache.xerces.internal.dom.DeferredElementImpl; import org.w3c.dom.Document; import ...
// CompensatedBalance returns balance decreased by surplus balance func (a *Accounting) CompensatedBalance(peer swarm.Address) (compensated int64, err error) { surplus, err := a.SurplusBalance(peer) if err != nil { return 0, err } if surplus < 0 { return 0, ErrInvalidValue } balance, err := a.Balance(peer) i...
from collections import defaultdict class Line(object): """ Represent a line in the color grid. """ def __init__(self, line_sequence=(), length=0): """ :param line_sequence: number's sequence representing the black places """ self.sequence = line_sequence self...
<filename>IDEAS/Resources/src/fluid/heatpumps/calibration/PythonModel/calibrate.py from __future__ import division, print_function, absolute_import from builtins import str import matplotlib.pyplot as plt import numpy as np import os from scipy.optimize import minimize import time as tm def calibrate_model(heaPum, c...
/// Extracts the parameter names from a template. fn extract_parameters(template: &Template) -> Vec<String> { template .elements .iter() .filter_map(|element| match element { TemplateElement::Expression(he) => { if he.params.is_empty() { ...
// ^ and $ signs are sentinels appended to each end to avoid bounds checking public String preProcess(final String s) { int n = s.length(); if (n == 0) return "^$"; StringBuilder ret = new StringBuilder("^"); for (int i = 0; i < n; i++) ret.append("#" + s.charAt(i)); ret.append("...
<gh_stars>0 #ifndef _LOGGER_ #define _LOGGER_ #include <iostream> #include <string> #include <ctime> #include <mutex> #include <fstream> class Logger { public: ~Logger(); static Logger* Instance(); private: Logger(); Logger( const Logger& ){} Logger& operator=( const Logger& ); public: void openLogFi...
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #ifndef _FWTNotifiable_ #define _FWTNotifiable_ #import <FWTNotifiable/FWTNotifiableManager.h> #import <FWTNotifiable/FWTNotifiableLogger.h> #endif
#ifndef __DIFFUCLASS_H_INCLUDED #define __DIFFUCLASS_H_INCLUDED #include <petscdm.h> #include <petscdmda.h> #include <petscksp.h> #include <vector> #include <string> //JJW mod: //#include "eQ.h" #include "./src/eQ.h" class simulation; using namespace std; //Data structure for passing to various PETSc functions typ...