content
stringlengths
10
4.9M
#!/usr/bin/python import smtplib fromaddr = '<EMAIL>' toaddr = '<EMAIL>' msg = 'There was a terrible error that occured and I wanted you to know!' # Credentials (if needed) username = '<EMAIL>' password = '<PASSWORD>' # The actual mail send server = smtplib.SMTP('smtp.gmail.com:587') server.ehlo() server.starttls...
# -*- coding: utf-8 -*- import argparse import os from pprint import pprint import subprocess import sys from lib.io_utils import * from lib.processing_utils import * # input parser = argparse.ArgumentParser() parser.add_argument('-in', dest="MANIFEST_FILE", default="path/to/titles_manifest.txt", help="Input text fi...
// stats calcuates statistics for a page. func (p *page) stats(pageSize int) stats { var s stats s.alloc = (int(p.overflow) + 1) * pageSize s.inuse = p.inuse() if s.alloc > 0 { s.utilization = float64(s.inuse) / float64(s.alloc) } return s }
// Copyright (c) 2019 <NAME> // Copyright (c) 2019 The Bitcoin Unlimited developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "recursive_shared_mutex.h" #include "utiltime.h" #include "test/test_bitcoin.h" #incl...
from requests_oauthlib import OAuth1Session import settings class Tweeter: def __init__(self): self.settings = settings.CONFIG['twitter_post'] def send_tweet(self, article): twitter_session = OAuth1Session(self.settings['CONSUMER_KEY'], client_secret=se...
This article originally appeared on AlterNet. Corporations are viewed as untouchable by big business media giants like the Wall Street Journal, which blurts out inanities like, "Income inequality is simply not a significant problem" and "Middle-class Americans have more buying power than ever before." Advertisement: ...
/** * * @return Map representation of Object. */ @NonNull public Map<String, Object> toMap() { Map<String, Object> m = new HashMap<>(); if (getVersion() != null) { m.put(KEY_VERSION, getVersion()); } if (getTitle() != null) { m.put(KEY_TITLE, ge...
/* Copyright 2020 JamJar Authors 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 applicable law or agreed to in writing, software ...
package org.apollo.net.websocket; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageDecoder; import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; import io.netty...
/** * */ package org.epics.pvaccess.impl.remote.codec.test.perf; import java.nio.ByteBuffer; import org.epics.pvaccess.PVFactory; import org.epics.pvdata.factory.StandardFieldFactory; import org.epics.pvdata.pv.DeserializableControl; import org.epics.pvdata.pv.Field; import org.epics.pvdata.pv.FieldCreate; import ...
/* * This file is part of the Jikes RVM project (http://jikesrvm.org). * * This file is licensed to You under the Common Public License (CPL); * You may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.opensource.org/licenses/cpl1.0.php *...
Edwards co-developed technique that has helped bring more than 4 million children into the world Sir Robert Edwards, whose pioneering IVF technique has helped bring more than 4 million children into the world, has died aged 87, Cambridge University has announced. "It is with deep sadness that the family announces tha...
def load_history_strings(self) -> Iterable[str]: with self.manager.db.transaction() as conn: yield from reversed(conn.root.history)
<reponame>seiyria/pixi-tiledmap<filename>src/ImageLayer.ts export default class ImageLayer extends PIXI.Container { constructor(layer: ILayerData, route: string) { super(); Object.assign(this, layer); this.alpha = layer.opacity; if (layer.image && layer.image.source) { this.addChild(PIXI.Spr...
/** * shuffle the board 200 times. */ private void shuffle(List<Tile> tileList) { int i = 0; while (i != 200) { shuffleOnetime(tileList); i++; } }
/// Create a new random graph using only linear conditional flow (no loops) pub fn new_rand_cond_noloop(num_nodes: usize) -> Self { let mut graph = Graph::new(); let mut visited = BTreeSet::new(); let mut queue = VecDeque::new(); queue.push_back((0, ROOT)); // Current input byte ...
def start_limits_region( self, direction, low, high, start_time=None, fill_color='gray', fill_alpha=0.25 ): if not self.plotting: return if start_time is None: start_time = datetime.datetime.now() self.last_limits_regions[direction] = annotations.BoxAn...
/** * Copyright© 2017, Oracle and/or its affiliates. All rights reserved. */ import { Component } from "../component"; import { Utils } from "../../core/utils"; /** * This component creates full screen loading element. <div id="loading"> <div class="backdrop"></div> <div class="loading-wrapper"> {...
. Stable isotope ratios of carbon (13C/12C, δ13C) and nitrogen (15N/14N, δ15N) in snail-host tissue (the foot and hepatopancreas) and trematode parasites on two stages of their life cycle were analyzed. Trophic structure in co-occurring trematode larvae was examined in the following species: five species of cercariae ...
import { Button } from "@material-ui/core"; import { useHistory } from "react-router-dom"; import { adjectives, animals, colors, uniqueNamesGenerator, } from "unique-names-generator"; function CreateGame() { const history = useHistory(); return ( <div className="center"> <h1>6 Nimmt</h1> <...
package com.puresoltechnologies.ductiledb.xo.test.mapping; import com.buschmais.xo.api.Query.Result; import com.buschmais.xo.api.annotation.ResultOf; import com.buschmais.xo.api.annotation.ResultOf.Parameter; import com.puresoltechnologies.ductiledb.xo.api.annotation.EdgeDefinition; import com.puresoltechnologies.duct...
def chown_for_id_maps(path, id_maps): uid_maps_str = ','.join([_id_map_to_config(id_map) for id_map in id_maps if isinstance(id_map, vconfig.LibvirtConfigGuestUIDMap)]) gid_maps_str = ','.join([_id_map_to_config(id_map) for id_map in id_maps i...
#include <stdio.h> char s[100100]; char t[100100]; int main() { int i,j=0,at=0,z; scanf("%s",s); for(z='z';z>='a';z--) { for(i=at;s[i];i++) if(s[i]==z) t[j++]=z,at=i+1; } t[j]=0; puts(t); return 0; }
/*************************************** * Returns the logical inversion of the result of the evaluate() method * of the underlying predicate. * * @param rTarget The target value to be evaluated by the predicate * * @return The inverted result of the evaluation */ @Override public Boolean evalua...
import numpy as np import matplotlib.pyplot as plt import cv2 img = plt.imread(r"osaka_castle.jpg") img = cv2.resize(img, (256,256), interpolation = cv2.INTER_AREA) # resize to 256x256 pixels img = img/255. # rescale pixel values to 0 and 1 # Gaussian Noise def addGaussianNoise(img, noise_factor = 0.5): facto...
# Time: O(nlogn), sort # Spce: O(1), if we calculate power of 2 on the fly # 891 # Given an array of integers A, # consider all non-empty subsequences of A. # For any sequence S, # let the width of S be the difference between # the maximum and minimum element of S. # Return the sum of the widths of all subsequences ...
<reponame>derkyjadex/aegg-bomb module Game (newGameChan, runGame, newGame, GameMsg(..), PlayerMsg(..), PlayerCmd(..), GameChan) where import Control.Concurrent import Control.Monad import Control.Monad.State import Data.List import Data.Maybe impo...
<reponame>railsware/cedar #import <Foundation/Foundation.h> @protocol InheritedProtocol<NSObject> @end @protocol SimpleIncrementer<InheritedProtocol> @required - (size_t)value; - (size_t)aVeryLargeNumber; - (void)increment; - (void)incrementBy:(size_t)amount; - (void)incrementByNumber:(NSNumber *)number; - (void)inc...
import { CommonModule } from '@angular/common'; import { Component, DebugElement } from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import...
label = list(map(int,input().split())) direction = list(str(input())) D=list(range(6)) Dtemp=[0,0,0,0,0,0] for i in range(len(direction)): if direction[i] == 'N': Dtemp[0] = D[1] Dtemp[1] = D[5] Dtemp[2] = D[2] Dtemp[3] = D[3] Dtemp[4] = D[0] Dtemp[5] = D[4] elif ...
<gh_stars>100-1000 #include "cpp_api_test.h" TEST_P(CppAPITests, CompiledModuleIsClose) { std::vector<torch::jit::IValue> jit_inputs_ivalues; std::vector<torch::jit::IValue> trt_inputs_ivalues; std::vector<torch_tensorrt::Input> shapes; for (uint64_t i = 0; i < input_shapes.size(); i++) { auto in = at::ran...
def solve(): t = int(input()) for _ in range(t): n, g, b = map(int, input().split()) at_least_good = (n+1) // 2 at_most_bad = n - at_least_good full_good = at_least_good // g if at_least_good % g == 0: good_time = full_good * g bad_time = (full_goo...
// ClearPositionsForExchange resets positions for an // exchange, asset, pair that has been stored func (c *PositionController) ClearPositionsForExchange(exch string, item asset.Item, pair currency.Pair) error { if c == nil { return fmt.Errorf("position controller %w", common.ErrNilPointer) } c.m.Lock() defer c.m...
-- Benchmark.hs -- A set of (micro-) benchmarks for the Haskell -- programming language -- -- vim: ft=haskell sw=2 ts=2 et -- {-# LANGUAGE OverloadedStrings #-} module Main where import System.CPUTime import Fibonacci as Fib import PerfectNumber as Pn import qualified Mandelbrot as M -- a helper fun for timing mea...
def rapidfire(launchpad, fworker, qadapter, launch_dir='.', nlaunches=0, njobs_queue=0, njobs_block=500, sleep_time=None, reserve=False, strm_lvl='INFO', timeout=None, fill_mode=False): sleep_time = sleep_time if sleep_time else RAPIDFIRE_SLEEP_SECS launch_dir = os.path.abspath(launc...
Ground-based x-ray calibration of the Astro-E2 x-ray telescope: II. With diverging beam at PANTER We report a ground-based X-ray calibration of the Astro-E2 X-ray telescope at the PANTER test facility. Astro-E2, to be launched in February 2005, has five X-Ray Telescopes (XRTs). Four of them focus on the X-Ray Imaging ...
//! Module for all metric aggregations. //! //! The aggregations in this family compute metrics, see [super::agg_req::MetricAggregation] for //! details. mod average; mod stats; pub use average::*; use serde::{Deserialize, Serialize}; pub use stats::*; /// Single-metric aggregations use this common result structure. /...
/** * Abstract Class implementing common base methods for managing oAuth config (instance-wide) and * oAuth specifications */ public abstract class BaseOAuthFlow implements OAuthFlowImplementation { public static final String PROPERTIES = "properties"; private final ConfigRepository configRepository; public ...
from sys import exit from math import sqrt def divisor(x): i = 1 x_divisor = [] for i in range(1, int(sqrt(x)) + 1): if x % i == 0: x_divisor.append(i) x_divisor.append(x // i) result = set(x_divisor) return result x = int(input()) div = divisor(x) for k in div: ...
package unimelb.webdav.client.test; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.After; import org.junit.Before; import org.junit.Test;...
import java.util.HashMap; import java.util.HashSet; import java.util.Set; import java.util.Map.Entry; class Polynomial extends HashMap<Monomial,Integer> { boolean satisfy(HashSet<Integer> world) { for (Monomial m : this.keySet()) if(world.containsAll(m)) return true; return false; } public ...
import click import woodwork as ww @click.group() def cli(): pass @click.command(name='list-logical-types') def list_ltypes(): print(ww.list_logical_types()) @click.command(name='list-semantic-tags') def list_stags(): print(ww.list_semantic_tags()) cli.add_command(list_ltypes) cli.add_command(list_...
// SetupRegularTweetSearchProcess is the time ticker to search a new project and // tweet it in a specific time interval. func SetupRegularTweetSearchProcess(tweetSearch *TweetSearch, d time.Duration) { go func() { for range time.Tick(d) { log.Printf("Project search and tweet interval: Every %s\n", d.String()) ...
However, he said, he changed his mind as he considered that lawyers now often relocate, or handle cases involving multiple states or countries. Judge Lippman also noted, in his remarks as prepared for the speech, given on Tuesday in Albany, that “employment prospects for recent graduates are still grim” and that law-sc...
def create_graph(zettels, graph, include_self_references=True, only_listed=False): zettel_ids = set() link_ids = set() for zettel in zettels: zettel_ids.add(zettel["id"]) link_ids.update(zettel["links"]) if only_listed: ids_to_include = zettel_ids else: ids_to_include...
import * as React from 'react' import {StyleProp, StyleSheet, Text, ViewStyle} from 'react-native' import type {EventType} from '@frogpond/event-type' import * as c from '@frogpond/colors' import {Column, Row} from '@frogpond/layout' import {Detail, ListRow, Title} from '@frogpond/lists' import {Bar} from './vertical-b...
In honor of Outdoors Week, each day we'll highlight 10 amazing facts about some of San Francisco's favorite outdoor spaces. So far we've covered Ocean Beach, Angel Island, and Glen Canyon. From history to believe-it-or-nots, these lists highlight the best of the best. Halfway between San Francisco and the East Bay lie...
package sam import ( "github.com/aquasecurity/defsec/parsers/types" "github.com/aquasecurity/defsec/providers/aws/iam" ) type Function struct { types.Metadata FunctionName types.StringValue Tracing types.StringValue ManagedPolicies []types.StringValue Policies []iam.Policy } const ( Tracing...
Array La diputada priista Marta Orta Rodríguez llevará al Pleno legislativo una iniciativa que pretende penalizar hasta con cuatro años de cárcel a quien difunda imágenes “lesivas” o que “humillen” en internet, es decir, permitiría castigar, por ejemplo, a quienes realicen “memes”. La legisladora refirió en el docume...
// 1440x900 @ 60Hz (16:10, DMT & CVT) - PVR 32x32 // Framebuffer: 352x896 // Horizontal scale: 0.254x (really 27/106.5) // This mode has been shrunken by 13 columns and 4 rows for 32x32 framebuffer // compatibility. As a result, there may be 13 total columns of blank pixels on // the horizontal sides and 4 rows of blan...
/** The FlightScheduler runs the {@link FlightManager} periodically to clean resources. */ @Component public class FlightScheduler { private Logger logger = LoggerFactory.getLogger(FlightScheduler.class); /** Only need as many threads as we have scheduled tasks. */ private final ScheduledExecutorService executor...
#include "gtest/gtest.h" #include "constants.hpp" #include "Vector3.hpp" #include <cmath> using namespace std; using namespace MyEngine; using namespace Test; TEST(Vector3, constructor){ Vector3f a = Vector3f(); EXPECT_EQ( a.x, 0); EXPECT_EQ( a.y, 0); EXPECT_EQ( a.z, 0); a = Vector3f( x, y, z );...
Polymers critical point originates Brownian non-Gaussian diffusion We demonstrate that size fluctuations close to polymers critical point originate the non-Gaussian diffusion of their center of mass. Static universal exponents $\gamma$ and $\nu$ -- depending on the polymer topology, on the dimension of the embedding s...
// NewComfirmPrompt returns a new ComfirmPrompt func NewComfirmPrompt(out io.Writer, in io.Reader) *ComfirmPrompt { return &ComfirmPrompt{ writer: out, reader: in, } }
/** Servlet that adds and returns comments */ @javax.servlet.annotation.MultipartConfig @WebServlet("/data") public class DataServlet extends HttpServlet { private final DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); private final UserService userService = UserServiceFactory.getUserServ...
//*********************************************************************** // seglun_serialize_text -Convert the segment to a text based format //*********************************************************************** int seglun_serialize_text(lio_segment_t *seg, lio_exnode_exchange_t *exp) { int bufsize=100*1024; ...
a = str(input()) b = str(input()) a_i = int(a) b_i = int(b) a_l = list(a) b_l = list(b) c_i = a_i + b_i c = str(c_i) c_l = list(c) a2 = str() b2 = str() c2 = str() i = 0 while len(a_l) > 0 and i < len(a_l): if a_l[i] == '0': a_l.pop(i) else: a2 += a_l[i] i += 1 i =...
<gh_stars>0 import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { Observable, of } from 'rxjs' import { ApiService, GfycatData } from 'src/app/services/api.service' @Component({ selector: 'app-player', templateUrl: './player.component.html', sty...
(written from a Production point of view Real World article Voyager enters a vast region of space with no stars or systems. As the crew tries to find a way to pass time in this desolate part of space, Janeway bitterly reflects on her decision that stranded them in the Delta Quadrant. (Season premiere) Contents show] ...
So Happy New Years everyone, see you in 2015! Other Deviations that you'll like Here's humanized mane 6 pony number 4, and the one that's 20% cooler!: Rainbow Dash, and she's justPlus she's really rockin' that soccer ball!(BTW, I won't be making the characters in the same positions too much in future works, I promise...
<filename>src/kombo/action/index.ts /* * Copyright 2018 <NAME> <<EMAIL>> * * 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...
<reponame>TomasLesicko/Bachelor-Thesis #!/usr/bin/env python3 from git import Repo import os import subprocess SECTION_FILE_SHARED_NAME = "section_names_" def extract_relevant_revision_sections(revision_tags): old = os.getcwd() os.chdir("../../draft") repo = Repo(".").git for tag in r...
#include "/d/dagger/aketon/short.h" inherit ROOM; void create() { ::create(); set_property("light",2); set_property("indoors",1); set_short("Corridor upon the tree"); set_long("%^GREEN%^Corridor upon the tree%^RESET%^ This is a wide corridor built around the huge tree trunk. It is much " "quieter...
from oop import * # bouncing ball with air and fluid resistance class Liquid(pyglet.shapes.Rectangle): def __init__(self, win, *args, **kwargs): super().__init__(color=(0, 0, 255), *args, **kwargs) self.win = win self.opacity = 150 self.c = 1 class Ball(pyglet.shapes.Circl...
At any one time hundreds of thousands of us are cocooned in pressurised cabins scything through the cold upper reaches of the troposphere. Soon enough, this figure will rise to a million: a million passengers, flown safely, if not always comfortably, across countries and continents, and with little call for comment. B...
package pfam import ( "net/http" "net/http/httptest" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var responseText = `[ { "length": 212, "motifs": [ { "end": 11, "start": 1, "type": "disorder" } ], "regions": [ { "end": 161, "start": 14, "metadata": { "id...
/** * @pre @ref mSelectedVNCSecurityType has been initialized to a known value. If the type is @ref * SecurityType::Invalid, the protocol version @em must be @ref ProtocolVersion::RFB_3_3. * @pre The @ref mSelectedProtocolVersion is a valid 3.x version. **/ void Rfb3xHandshake::handleSelectedSecurityType(orv_e...
macro_rules! quarter_round { ($a:expr, $b:expr, $c:expr, $d:expr) => { $a = $a.wrapping_add($b); $d = ($d ^ $a).rotate_left(16); $c = $c.wrapping_add($d); $b = ($b ^ $c).rotate_left(12); $a = $a.wrapping_add($b); $d = ($d ^ $a).rotate_left(8); $c = $c.wrapping_add($d); $b = ($b ^ $c).rotate_left(7); }; } #[...
/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is d...
package com.smackall.iyan3dPro.Adapters; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.graphics.BitmapFactory; import android.graphics.Color; import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import...
def rotate_image(self, index=0, undo=None): rotated = np.rot90(self.images[index]._image._imgs, axes=(1, 2)) self.images[index]._image._imgs = rotated self.images[index].crop = [0, 0, rotated[0].shape] self.updatedframe.emit(index)
/** * A form component that provides login functionality for users. * * It also handles errors nicely with appropriate feedback for the user. * * @author fred * */ @SuppressWarnings("serial") public class LoginForm extends AbstractBaseForm<User> { @SpringBean UserService userService; TextField<String> us...
// WithTransport is a NewClientOption that sets the transport to be used for the client. func WithTransport(tr transport.Doer) NewClientOption { return func(cfg *NewClientConfig) { cfg.Transport = tr } }
import { SetsValue } from '~/contexts/Sets/types'; export interface Set { source: string; values: SetsValue; } export interface SimpleSet { symbol: string; values: SetsValue; } export interface SetDataType { name: string; symbol: string; operandsAmount: 1 | 2; } export enum SetsOperationsType { UNIO...
/** * Basic color changer for selecting desired color codes and gaining a better * understanding rgba color values and each components affect on output. * */ public class ColorChangerMain{ static private Color currentColor; // variables/components to be used later. [static in order to be read by refresh()] ...
It had been 22 weeks since the last home win at the Millerntor. The target for the visit of Dynamo Dresden on matchday 20 was thus clear – another three points were to follow last week's victory at Braunschweig. Head coach Ewald Lienen made three changes to the starting lineup, Kyoungrok Choi coming into the side for M...
def semver_spec( draw, spec_clause_strategy: Optional[SearchStrategy[List[str]]] = None ) -> str: return ",".join( draw( lists(semver_spec_clause(), min_size=1) if not spec_clause_strategy else spec_clause_strategy ) )
/** * Factory for native buffers. */ class NativeBuffers { private NativeBuffers() { } private static final Unsafe unsafe = Unsafe.getUnsafe(); private static final int TEMP_BUF_POOL_SIZE = 3; private static ThreadLocal<NativeBuffer[]> threadLocal = new ThreadLocal<NativeBuffer[]>(); /*...
<reponame>harvies/charon package com.pancm.netty.slidingwindow.client; import com.pancm.netty.slidingwindow.pojo.Message; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.EventLoop; import io.netty.handler....
/** Creates a new instance for the package in the {@code com.android.support} and class name */ @NonNull public static AndroidxName of(@NonNull String oldPackage, @NonNull String simpleClassName) { assert oldPackage.endsWith(".") : oldPackage + " needs to end with a dot."; assert oldPackage.startsWi...
#include <stdio.h> int main(void){ int a,b, ans; printf("Please enter a Number A: "); scanf("%d", &a); printf("Please enter a Number B: "); scanf("%d", &b); ans = a + b; if (ans<=10 || ans <= 20){ printf("30"); } else{ printf("Sum of %d and %d is not between 10 and 20", a, b); } }
def _get_object_list(self, name, throw_error_not_exist=True, throw_error_not_unique=True): if not name in self._name_to_category.keys(): if throw_error_not_exist: logger.error('No object with name ' + name + ' in store.') raise Exception('No object with name ' + name ...
""" Delete a cube """ import configparser config = configparser.ConfigParser() config.read('..\config.ini') from TM1py.Services import TM1Service with TM1Service(**config['tm1srv01']) as tm1: tm1.cubes.delete('Rubiks Cube')
// NewLockedProject creates a new LockedProject struct with a given // ProjectIdentifier (name and optional upstream source URL), version. and list // of packages required from the project. // // Note that passing a nil version will cause a panic. This is a correctness // measure to ensure that the solver is never expo...
/** * @brief Configure the DAC trigger mode. * * @param[in] dacp pointer to the DAC driver object * @param[in] channel channel on wich the trigger must be configure * @param[in] tm trigger mode to use for the DAC configuration */ static void dac_set_trigger_mode(DACDriver *dacp) { if (dacp->conf...
import { FC, useMemo } from 'react' import { useIntl } from 'react-intl' import { Link, useLocation } from 'react-router-dom' import { makeStyles } from '@material-ui/core/styles' import List from '@material-ui/core/List' import ListItem from '@material-ui/core/ListItem' import ListItemText from '@material-ui/core/Lis...
<gh_stars>0 package com.nankai.exchange.biz; public interface ITradingBiz { public abstract boolean trading(final String type1, final int type1id, final String type2, final int type2id, int userid, int userid2); }
// Returns length of block (0 indicates header not long enough) uint32_t extract(const uint8_t* pBuf, uint32_t bufLen) { uint32_t pos = 0; if (bufLen < pos + 2) return 0; fin = (pBuf[pos] & 0x80) != 0; opcode = pBuf[pos] & 0x0f; pos += ...
package com.nick.love.myra; import java.util.Arrays; public class TestLambda { public static void main(String[] args) { String[] strings = {"b", "a", "c", "d"}; Arrays.sort(strings, (o1, o2) -> o1.compareToIgnoreCase(o2)); Arrays.asList(strings).forEach(System.out::println); } }
def on_item_activated(self, event): self.current_item = event.GetItem()
/* * @return true if the math (or equivalently the formula) of this * Trigger has been set, false otherwise. */ bool Trigger::isSetMath () const { return (mMath != 0); }
<filename>src/math/quaternion.h<gh_stars>1-10 #pragma once #include "scalar.h" #include "vec.h" #include "matrix.h" namespace math { template<class T = scalar> class quaternion { public: T x, y, z, w; quaternion() { } quaternion(T x0, T y0, T z0, T w0) { x = x0; y = y0; z = z0; w = w0; } void ...
<filename>app/src/main/java/com/stratagile/qlink/entity/eventbus/StartFilter.java package com.stratagile.qlink.entity.eventbus; public class StartFilter { }
class VerticalScroll: """ scroll direction is changed after each `complete`. `complete` should be called when continuous scroll complete. """ def __init__( self, *, origin: Tuple[int, int], page_size: int, max_page: int, ) -> None: # top = 0, bott...
Jameis Winston, Dante Fowler, Jr. Florida State quarterback Jameis Winston (5) manages to escape a sack as he is hit by Florida defensive lineman Dante Fowler, Jr. (6) during the first half of an NCAA college football game in Tallahassee, Fla., Saturday, Nov. 29, 2014. (AP Photo/John Raoux) ORG XMIT: FSP105 (John Rao...
<reponame>skodmy/computer-systems-software-department-site<gh_stars>0 from django.apps import AppConfig class DepartmentScheduleConfig(AppConfig): name = 'department_schedule'
A small group of climate activists on Tuesday forced the shutdown of five major pipelines carrying crude from Canada to the United States, stepping up opposition to Alberta's oil industry as it seeks support for major export projects. United States-based Climate Direct Action said its members worked in groups of two o...
/** * creates a Parameter from an existing {@link ParameterContract}. */ public static Builder create(ParameterContract contract) { Builder builder = new Builder(contract.getApplicationId(), contract.getNamespaceCode(), contract.getComponentCode(), contract.getName(), ParameterType.Builder...
/** * An iterator, which allows to iterate the data of items, which are contained by a list. When the * iterated list is modified, the underlying data of the adapter, the items belong to, is also * modified. * * @param <DataType> * The type of the items' data * @author Michael Rapp * @since 0.1.0 */ pu...
<filename>network/conn_test.go<gh_stars>0 package network import ( "fmt" "net" "sync" "testing" ) func TestUDPConn(t *testing.T) { data := "这是一条测试数据" count := 10 ip := "127.0.0.1" //"172.16.31.10" port := 20010 var conn IConn = &UDPConn{port: port} receiver, sender, err := conn.InitConn() if err != nil { ...