content stringlengths 10 4.9M |
|---|
Institutional Arrangements of the Political Party Wing on the Functions of Political Parties
Introduction to the Problem: In post-constitutional reform, every political party seeks to maximize each component within its party structure. One feature that has direct contact with the society is the political party wing, w... |
<reponame>malkov-matvey/GYGTest
package malkov.name.gygtest.auth;
import android.content.Context;
public class AuthRepo {
public String authKey(final Context context) {
//some shared pref or keystore stuff to retrieve authKey
/*String authKey = context.getSharedPreferences("default", Context.MODE... |
package hd.dp.builder;
public class AppleBuilder implements FruitBuilder {
Fruit fruit = new Fruit();
@Override
public void plant() {
System.out.println("播种 - 苹果树");
fruit.setPlant("播种");
}
@Override
public void water() {
System.out.println("浇水 - 苹果树");
fruit.setWater(100);
}
@Override
public void ... |
<gh_stars>1-10
import { Recommendations } from '../actions/constants';
export const recommendation: Recommendations = {
"0cf936d4-cf36-4d3e-9057-b0dc600fa3af": "option"
}; |
/**
* Parses the extracted Metadata of the IImageMetadata object to a Hashmap.
* The hashmap converts the keys to lower cases and adds values with the same key to one key-node
* So the json parser can interpret them and does not overwrite values which have the same key
*
* @param imgMetadata
... |
<gh_stars>100-1000
#ifndef _GLISHADERDEBUG_H_
#define _GLISHADERDEBUG_H_
#include "wx/frame.h"
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/splitter.h"
#include "wx/notebook.h"
#include <vector>
typedef unsigned int uint;
#define ID_SHADERDEBUG 10000
#define SYMBOL_GLISHADERDEBUG_STYLE wxSYSTEM_MEN... |
/**
* Sequence database from the meta-DAS system.
*
* @author Thomas Down
* @author Matthew Pocock
* @since 1.2
*
* Once you've made one of these and populated it with a few DistDataSource instances,
* you should be able to prety much forget about it and use it directly as a normal
* SequenceDB implementation.... |
def make_block(
self, plugin: ProjectPlugin, plugin_args: Optional[List[str]] = None
) -> SingerBlock:
ctx = self.plugin_context(plugin, env=self._env.copy())
block = SingerBlock(
block_ctx=ctx,
project=self.project,
plugins_service=self.plugins_service,
... |
// IsDisableEQ applies the EQ predicate on the "is_disable" field.
func IsDisableEQ(v int32) predicate.User {
return predicate.User(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldIsDisable), v))
})
} |
number=input()
number=int(number)-1
str1='I hate'
n=number//2
str1+=' that I love that I hate'*n
if number%2==1:
str1+=' that I love'
str1+=' it'
print(str1) |
The mathematics section of the National Academy of Sciences lists 104 members. Just four are women. As recently as June, that number was six.
Marina Ratner and Maryam Mirzakhani could not have been more different, in personality and in background. Dr. Ratner was a Soviet Union-born Jew who ended up at the University o... |
<filename>hamster_AB04_02.java
/* hamster sits in a corridor of unknown length and width of 1.
the hamster's position and orientation are unknown,
and there is an unknown number of grains in the corridor.
have the hamster pick up all grains in the corridor, then go
to one end of it and turn around to face the corri... |
<filename>test/UserManual/Tests.hs
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE OverloadedStrings #-}
module UserManual.Tests where
import Succeed.Tests (mkSucceedTest)
import Test.Tasty
import System.FilePath
import Utils
testDir :: FilePath
testDir = "doc" </> "user-manual"
... |
/*-
* DO NOT MODIFY THIS FILE
*/
#include <stdio.h>
void yyerror(char *s)
{
fprintf(stderr, "%s\n", s);
}
#undef yywrap
int yywrap()
{
return 1;
}
|
<reponame>unravelin/ravelin-ios
// Chilkat Objective-C header.
// This is a generated header file for Chilkat version 9.5.0.77
// Generic/internal class name = Pem
// Wrapped Chilkat C++ class name = CkPem
@class CkoCert;
@class CkoPrivateKey;
@class CkoCertChain;
@class CkoPublicKey;
@class CkoTask;
@class CkoJava... |
Often reviled for encouraging kids to spend too much time in front of screens, new research suggests that some video games may actually benefit those with cerebral palsy.
The finding comes from a new study in which researchers observed 17 children with cerebral palsy as they played four “active games” on the Nintendo ... |
Manucher Javid, urea, and the rise of osmotic therapy for intracranial pressure.
Therapy with hypertonic solutions is one of the mainstays of neurosurgical treatment for all types of neurological injury. Although the initial research with hypertonic agents in the early decades of the 20th century showed great promise ... |
<reponame>dongwangdw/cilium
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package testutils
import (
"github.com/sirupsen/logrus"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/identity"
"github.com/cilium/cilium/pkg/labels"
"github.com/cilium/cilium/pkg/mac"
"g... |
PEAK TO AVERAGE POWER RATIO (PAPR) REDUCTION IN OFDM BASED RADIO SYSTEMS
High data rate wireless access is demanded by many applications. Usually, more bandwidth is required for higher data rate transmission in any of the system. With promising technology and ever-increasing wireless devices, the spectrum is becoming ... |
// SetByteArray encode byte array || uint8 array to the payload buffer!
func SetByteArray(p []byte, s []byte, stackIndex uint32, heapAddr uint32) (nextHeapAddr uint32) {
var ln = uint32(len(s))
SetUInt32(p, stackIndex, heapAddr)
SetUInt32(p, stackIndex+4, ln)
copy(p[heapAddr:], s)
return heapAddr + ln
} |
One California banana-eating man is taking Dole to court, alleging that the food giant misled consumers about the environmental practices at a banana plantation run by one of its contractors in Guatemala.
Bloomberg reports:
“Dole markets and sells its bananas as though they were farmed in an ecologically friendly and... |
Holladay Park was home to drug deals, a steady homeless population and neverending litter.
But Dan Biederman has seen worse. The urban park planner once turned New York's crime-ridden, drug-filled Bryant Park into one of the nation's most treasured parks.
Biederman didn't hesitate when the developers behind a forthco... |
#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include... |
Increased food availability reducing the harmful effects of microplastics strongly depends on the size of microplastics.
Shallow lakes and ponds, providing essential ecological and environmental services, are simultaneously disrupted by various pollutants of emerging concern (PECs). As a group of PECs, microplastics (... |
/**
* An SNS notification service.
*/
@ApplicationScoped
public class SNSNotificationService implements NotificationService {
public static final String CONFIG_AWS_TOPIC = "trellis.aws.topic";
private static final Logger LOGGER = getLogger(SNSNotificationService.class);
private final NotificationSerial... |
<filename>fhir-index-plugin/src/main/java/io/puntanegra/fhir/index/FhirIndexException.java
package io.puntanegra.fhir.index;
/**
* {@code RuntimeException} to be thrown when there are Lucene {@link FhirIndex}
* -related errors.
*
* @author <NAME> {@literal <<EMAIL>>}
*/
public class FhirIndexException extends Run... |
<reponame>hsnopek/LocalStreamingServer<gh_stars>1-10
package hr.hsnopek.localstreamingserver.controller;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.util.Base64;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
im... |
Serotonergic neuronal sprouting as a potential mechanism of recovery in multiple sclerosis.
Experimental allergic encephalomyelitis (EAE) is widely considered as an animal model of multiple sclerosis (MS). Damage to the bulbospinal serotonergic (5-HT) neurons occurs in the early paralytic stages of EAE in rats with th... |
<reponame>mohdab98/cmps252_hw4.2
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter... |
/**
* findInTree
*
* Uses pass-by-reference with the parameter pList to return all
* occurrences of state variable that are found within the group
* tree.
*/
protected void findInTree( GroupNode g, ApplianceObject ao,
Vector pList ) {
if ( g.m_Object != null ) {
if ... |
/* Pop the currently used out-decl state from top of stack. */
struct lto_out_decl_state *
lto_pop_out_decl_state (void)
{
return decl_state_stack.pop ();
} |
def is_equivalent(a, b):
if a == b:
return True
s_len = len(a)
if s_len%2 != 0:
return False
a1 = a[:s_len//2]
a2 = a[s_len//2:]
b1 = b[:s_len // 2]
b2 = b[s_len // 2:]
return (is_equivalent(a1, b2) and is_equivalent(a2, b1)) or (is_equivalent(a1, b1) and is_equivalent(a2... |
/*
* Copyright 2007 ZXing 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 ... |
def toRoom(server, player, command):
newRoom = None
if int(command[0]) <= len(player.currentRoom.orderedExits):
[int(command[0])-1]
targetRoom = player.currentRoom.orderedExits[int(command[0])-1][0]
for room in server.structureManager.masterRooms:
if room.ID == targetRoom:
newRoom = room
elif int(comman... |
#ifndef _MEMORY_H_
#define _MEMORY_H_
namespace Utils
{
typedef struct {
void * (*Alloc)(int size);
void * (*Calloc)(int size);
void * (*ReAlloc)(void * buf, int size);
void (*Free)(void * buf);
} MEM_t;
typedef struct {
int (*strlen)(const char * str);
void (*strcpy)(char * dst, const char * src);
v... |
/// IsNullTerminatedString - Return true if the specified constant (which is
/// known to have a type that is an array of 1/2/4 byte elements) ends with a
/// nul value and contains no other nuls in it. Note that this is more general
/// than ConstantDataSequential::isString because we allow 2 & 4 byte strings.
static... |
Los Angeles Lakers Nick Young and Jordan Clarkson have become embroiled in a controversy over claims of sexual harassment at a traffic light in Hollywood. In this file photo, the duo sits with towels draped over their heads during a game at Staples Center on January 5, 2016 in Los Angeles, California.
Los Angeles Lake... |
/**
* Created by gustavoalvarez on 08/09/17.
*/
public class SongAlbumAdapter extends RecyclerView.Adapter<SongAlbumAdapter.ViewHolder>{
private ArrayList<Result> items;
public Communication mCallBack;
Context ctx;
String origin;
public SongAlbumAdapter(ArrayList<Result> items, Communication mCa... |
from collections import OrderedDict
import akro
import numpy as np
from gym import spaces
def convert_observation_to_space(observation):
if isinstance(observation, dict):
space = spaces.Dict(OrderedDict([
(key, convert_observation_to_space(value))
for key, value in observation.ite... |
/**
* Returns the height of the tree.
* @return
*/
int Tree::height(Node* n) {
if (n == nullptr) return 0;
int heightLeft = 1 + this->height(n->left);
int heightRight = 1 + this->height(n->right);
if (heightLeft > heightRight) return heightLeft;
return heightRight;
} |
WASHINGTON (Reuters) - Thermal images of North Korea’s main nuclear site show Pyongyang may have reprocessed more plutonium than previously thought that can be used to enlarge its nuclear weapons stockpile, a U.S. think tank said on Friday.
A satellite image of the radiochemical laboratory at the Yongbyon nuclear plan... |
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#define inf 100000000
using namespace std;
int g[30][30];
int dp[105][105][30];
int main(){
string s;
int k,i,j,kk,l;
memset(g,0,sizeof(g));
cin>>s>>k;
int m,va;
string ss,tt;
cin>>m;
while(m--){
... |
use crate::input::Input;
const NUM_DIGITS_IN_MODEL_NUMBER: usize = 14;
pub fn solve(input: &mut Input) -> Result<u64, String> {
let instructions = input
.text
.lines()
.map(Instruction::parse)
.collect::<Option<Vec<_>>>()
.ok_or_else(|| "Invalid input".to_string())?;
l... |
<gh_stars>10-100
module Pinch.Internal.TTypeSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Pinch.Arbitrary ()
import qualified Pinch.Internal.TType as T
spec :: Spec
spec = describe "TType" $
-- silly sanity test
prop "has matching IsTType results" $ \someType ->
case someT... |
<gh_stars>1-10
import uuid
from enum import Enum
from datetime import datetime
class Callback:
def __init__(self, fn, owner, args=None):
if not callable(fn):
raise ValueError('callback must be a callable')
if owner is None:
raise ValueError('Invalid owner for callback')
... |
<filename>examples/opencl/mandelbrot/mandelbrotworker_buffermanager.cpp
// Copyright (c) 2014 <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "mandelbrotworker_buffermanager.hpp"
mandelbr... |
import ipywidgets as ipyw
# import numpy as np
import pandas as pd
import statsmodels.formula.api as sm
import traitlets as trt
# from ipylab import JupyterFrontEnd, Panel
from sklearn.linear_model import LinearRegression
# from sklearn.model_selection import train_test_split
from sklearn.preprocessing im... |
"""Plot some distance measures versus redshift and omega_M.
"""
from __future__ import absolute_import, division, print_function
import sys
import getopt
import numpy
import matplotlib.pyplot as pylab
import matplotlib.cm as cm
import cosmolopy.distance as cd
import cosmolopy.constants as cc
def plot_DM(filename):... |
// ShowBundle shows a bundle, or more properly a bundle claim, along with any
// associated outputs
func (p *Porter) ShowBundle(opts ShowOptions) error {
err := p.applyDefaultOptions(&opts.sharedOptions)
if err != nil {
return err
}
name := opts.sharedOptions.Name
claim, err := p.CNAB.FetchClaim(name)
if err !=... |
Recent advances in Hodgkin lymphoma: interim PET and molecular-targeted therapy.
Hodgkin lymphoma is a highly curative lymphoid malignancy, but some patients relapse or experience adverse events from treatment. Therefore, prognostic markers are needed to allow a more patient-tailored approach to treatment. The positiv... |
/**
* Only grabs the easiest to parse US and UK countries. Room for improvement.
*/
private Set<Country> extractCountriesSource(ScrapedFlatHierarchy info) {
Matcher usMatcher = US_PATTERN.matcher(info.getBrandArticle().getMediaWikiSource());
if (usMatcher.matches()) {
return Immuta... |
<reponame>Oliver-makes-code/fabric-carpet<gh_stars>1000+
package carpet.script;
import carpet.script.value.Value;
/** LazyNumber interface created for lazily evaluated functions */
@FunctionalInterface
public interface LazyValue
{
LazyValue FALSE = (c, t) -> Value.FALSE;
LazyValue TRUE = (c, t) -> Value.TRUE;... |
<reponame>fananchong/go-x
package main
import (
"flag"
"io"
"net"
"time"
"github.com/fananchong/gotcp"
)
func TcpClient() {
faddr := flag.Lookup("tcpaddr")
addr, _ := net.ResolveTCPAddr("tcp4", faddr.Value.String())
conn, err := net.DialTCP("tcp4", nil, addr)
if err != nil {
panic(err)
}
xlog.Infoln("c... |
/**
* Merges this {@link BlazeSyncBuildResult} with the results of a more recent build (w.r.t build
* start time), prior to the project update phase.
*/
public BlazeSyncBuildResult updateResult(BlazeSyncBuildResult nextResult) {
return nextResult.toBuilder()
.setBuildResult(getBuildResult().updateO... |
/**
* This class was generated by the JAX-WS RI. JAX-WS RI 2.2.4-b01 Generated
* source version: 2.2
*
*/
@WebServiceClient(name = "servico-intercomunicacao-2.2.2", targetNamespace = "http://www.cnj.jus.br/servico-intercomunicacao-2.2.2/")
public class ServicoIntercomunicacao222_Service extends Service {
private... |
<reponame>martinATtug/SDSoC_Examples
#!/usr/bin/env python
from sys import argv
import json
import os
import subprocess
VERSION = 'SDx 2017.4'
DEVICES = {
'zcu102': {
'name': 'ZCU102 OpenCL',
},
'zcu104': {
'name': 'ZCU104 OpenCL',
},
'zcu106': {
'name': 'ZCU106 OpenCL',
}
... |
import { IS_WINDOWS } from '../../../common/utils';
// where to find the Python binary within a conda env.
export const CONDA_RELATIVE_PY_PATH = IS_WINDOWS ? ['python.exe'] : ['bin', 'python'];
// tslint:disable-next-line:variable-name
export const AnacondaCompanyNames = ['Anaconda, Inc.', 'Continuum Analytics, Inc.']... |
// Verify that the Runner can continue to be used even after its Context has
// crashed. Regression test for https://crbug.com/1066826.
// TODO(crbug.com/1066833): Replace this with a WebRunner test, ideally a
// unit-test, which can simulate Context disconnection more simply.
// TODO(crbug.com/1010222): Once CastRun... |
<filename>tools/libs/recording.py
import os
import zlib
from Crypto.Cipher import AES
from libs import utils
class Packet:
"""Represents one packet in a recording.
This is a bad name, since on of these "packets" actually can
contain multiple Tibia packets.
The data can be encrypted, depending on th... |
/**
* Paint the selected rectangle in green if the selection is good (means within
* the screenshot). Else, the rectangle is not valid and is painted in red.
*/
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D graphics = (Graphics2D) g;
graphics.drawImage(... |
//
// transfers.c
// wire
//
// Created by <NAME> on 10/02/12.
// Copyright (c) 2012 OPALE. All rights reserved.
//
#include "config.h"
#include "transfers.h"
#include <wired/wired.h>
#include <string.h>
#include <errno.h>
#include "client.h"
#include "files.h"
#include "main.h"
#include "terminal.h"
#include "t... |
<gh_stars>0
package com.martinhaus.lecture_recorder.common.utils;
class DayParser {
static Short parseDayString(String day) {
switch (day) {
case "Po": return 0;
case "Ut": return 1;
case "St": return 2;
case "Št": return 3;
case "Pi": return 4;
... |
<reponame>terose73/briOS<gh_stars>100-1000
// source: https://github.com/jpalumickas/use-window-focus/blob/main/src/index.ts
import { useEffect, useState } from 'react'
const hasFocus = () => typeof document !== 'undefined' && document.hasFocus()
interface Props {
onFocus?: () => void
onBlur?: () => void
}
expo... |
<filename>TimerAppBronson/app/src/main/java/com/hfad/timerappbronson/TimerFragment.java
package com.hfad.timerappbronson;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android... |
<filename>src/main/java/view/dialog/mapEditor/groundSelection/selected/SelectedGroundPanel.java
package view.dialog.mapEditor.groundSelection.selected;
import model.land.tile.Ground;
import view.assets.descriptions.GroundDescriptions;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import ... |
A Note on Recurring Misconceptions When Fitting Nonlinear Mixed Models
ABSTRACT Nonlinear mixed-effects (NLME) models are used when analyzing continuous repeated measures data taken on each of a number of individuals where the focus is on characteristics of complex, nonlinear individual change. Challenges with fitting... |
<filename>communote/persistence/src/main/java/com/communote/server/core/tasks/TaskScheduledEvent.java
package com.communote.server.core.tasks;
import java.util.Date;
import com.communote.server.api.core.event.Event;
/**
* Event to inform about a new task that was added to the task store or when a pending tas... |
Media playback is unsupported on your device Media caption Rescue workers said many children were among those killed or injured in the attack
Russia has been sharply criticised by other world powers at the UN Security Council in New York over the chemical weapons deaths in northern Syria.
Moscow's suggestions that ci... |
#include<cstdio>
#include<algorithm>
using namespace std;
int b[16], S, a[16];
bool use[16];
int aaa[]={0,1,2,3,4,8,12,15,5,10,6,7,11,9,13,14};
int rec(int p){
if(p==16)return 1;
int t=aaa[p];
if(p==0 || p==1 || p==2 || p==4 || p==5 || p==8 || p==10){
for(int i=0; i<16; i++){
if(!use[... |
def revision_control_diff(vcs_name, args):
cmd = VCS_INFO.get(vcs_name, {}).get('diff')
if cmd is not None:
return subprocess.Popen(cmd + args, stdout=subprocess.PIPE).stdout |
package de.holisticon.bpm.cughh.twitter.process.delegate;
import de.holisticon.bpm.cughh.twitter.process.command.DetermineApprovalStatusCommand;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import... |
/**
* Created with IntelliJ IDEA.
* User: joelsieh
* Date: 7/9/14
* Time: 4:49 PM
* To change this template use File | Settings | File Templates.
*/
public class SwingProgressMonitor extends ProgressMonitor implements ProgressMonitorI {
public SwingProgressMonitor(Component parentComponent,
... |
/*
* Copyright (C) 2016-2020 the original author or authors.
*
* 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 3 of the License, or
* (at your option) any later version.
... |
// Summary returns a Document's n highest ranked paragraphs according to
// keyword frequency.
func (d *Document) Summary(n int) []RankedParagraph {
rankings := []RankedParagraph{}
scores := d.Keywords()
for i := 0; i < int(d.NumParagraphs); i++ {
p := RankedParagraph{Position: i}
rank := 0
size := 0
for _, ... |
import React from 'react';
import ChooseOptionView from '../ChooseOptionView';
import * as Int from "../../hex/Integer";
const INT_SIZES = [Int.INT_8, Int.INT_16, Int.INT_32, Int.INT_64];
const LABLES = [" as ", " integer"]
export default class IntegerEditView extends React.Component<Props, {}> {
render() {
ret... |
/**
* Wrapper for unit with tasks
*
* @author Tobias Hall <kazzoa@gmail.com>
* @author Matteus Magnusson <senth.wallace@gmail.com>
*/
public class TaskUnit implements ITaskObserver {
/**
* Initiate the TaskUnit
*
* @param alIce
* The AI interface
* @param unit
* The... |
def contest(request, contest_id):
this_contest = get_object_or_404(Contest, id=contest_id)
ranked_players = this_contest.ranked_players()
player = None
this_contest_player = None
is_creator = False
if request.user.is_authenticated:
try:
player = Player.objects.get(user_id=req... |
<gh_stars>0
// +build ignore
package main
import (
"image"
"image/color"
"image/draw"
"image/png"
"os"
"github.com/dim13/colormap"
)
func genPreview(name string, p color.Palette, h int) error {
pimg := genPalette(p)
img := image.NewRGBA(image.Rect(0, 0, len(p), h))
for i := 0; i < h; i++ {
draw.Draw(img,... |
// Packages previous two helper functions assuming 80 char screen width
void GameMaster::createTitle(char ch, int x, string text,
string &toAdd, bool print) {
toAdd += string(WIDTH, ch) + "\n";
centerText(text, toAdd);
toAdd += string(WIDTH, ch) + "\n\n";
if (print) cout << ... |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] weights = new int[10];
String line = in.nextLine();
for (int i = 0; i < line.length(); i++){
weights[i]... |
import { getGlobalInstallPkgMan, hasYarn } from '../../commands/update/utils/common';
// import { commandUsage } from '../../commands/init/help';
test('command', () => {
// expect(() => commandUsage(cmds)).not.toThrow();
expect(hasYarn).not.toThrow();
expect(getGlobalInstallPkgMan).not.toThrow();
expect(['y... |
def docker_compose(command):
with env.cd(env.project_dir):
return env.run(f"docker-compose -f {env.compose_file} {command}") |
<reponame>Marguelgtz/explorer<gh_stars>100-1000
import { put, select, takeEvery } from 'redux-saga/effects'
import { getCurrentUserId } from 'shared/session/selectors'
import { getProfile } from 'shared/profiles/selectors'
import { saveProfileRequest } from 'shared/profiles/actions'
import {
BlockPlayers,
BLOCK_PLA... |
Genetic and chemical inhibition of autophagy in zebrafish induced myeloproliferation
Autophagy is an evolutionary conserved and dynamic lysosomal degradation process for cellular homeostasis and remodelling, which is essential for the development and maintenance of different hematopoietic fates. However, the roles of ... |
/**
* Adds a new NameSurferEntry to the list of entries on the display.
* Note that this method does not actually draw the graph, but
* simply stores the entry; the graph is drawn by calling update.
*/
public void addEntry(NameSurferEntry entry) {
addedEntries.add(entry);
} |
package studio.kdb;
import java.awt.Component;
import java.awt.Insets;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.*;
import javax.swing.event.MouseInputAdapter;
public class TableRowHeader extends JList {
private JTable tab... |
<gh_stars>0
#ifndef __CONVOLUTION_H__
#define __CONVOLUTION_H__
#include"filter.h"
class Convolution:public Filter{
public:
Convolution();
vector<uint8_t> convolution(vector<uint8_t> pixel_data, vector<uint8_t> modified_image_bytes, vector<double> kernel_1d, int width, int height, int row_kernel, int right_l... |
/**
* Creates a joined predicate from the given Filter.
*
* @param filter the filter
* @return a new JPA criteria Predicate
*/
public Predicate create(Filter filter) {
List<Predicate> predicates = new ArrayList<>(filter.getPredicates().size());
for (org.cdlflex.fruit.Predicate ... |
/*
* Copyright (c) 2021 CohesionForce Inc | www.CohesionForce.com | <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
*
* Un... |
<reponame>wahello/openshift-installer<filename>terraform/google/vendor/github.com/hashicorp/terraform-provider-google/google/data_source_google_compute_instance_template.go<gh_stars>0
package google
import (
"fmt"
"sort"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"google.golang.org/api/compute/... |
<filename>nacos-spring-cloud-example/nacos-spring-cloud-config-example/src/main/java/com/alibaba/nacos/example/spring/cloud/config/UserProperties.java
package com.alibaba.nacos.example.spring.cloud.config;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.springframewo... |
from functools import reduce
MOD = 10 ** 9 + 7
n, k = map(int, input().split())
la = list(map(int, input().split()))
la.sort()
f = 1
lf = [1]
for i in range(1, n + 1):
f = (f * i) % MOD
lf.append(f)
ii = 1
lii = [0, 1]
fi = 1
lfi = [1, 1]
for i in range(2, n + 1):
ii = (-lii[MOD % i] * (MOD // i)) % MOD... |
use super::*;
pub fn proto(vm: &mut VM, map: RantMapHandle) -> RantStdResult {
vm.cur_frame_mut().write(map.borrow().proto().map_or(RantValue::Nothing, RantValue::Map));
Ok(())
}
pub fn set_proto(vm: &mut VM, (map, proto): (RantMapHandle, Option<RantMapHandle>)) -> RantStdResult {
map.borrow_mut().set_proto(pro... |
// SignalHandler registers for SIGTERM and SIGINT
func SignalHandler(funcList []func()) context.Context {
close(onlyOneSignalHandler)
ctx, cancel := context.WithCancel(context.Background())
c := make(chan os.Signal, 2)
signal.Notify(c, shutdownSignals...)
go func() {
<-c
klog.Infoln("stoping server")
cancel(... |
<gh_stars>0
package com.yunxin.tcp.onecheck;
public interface IServerStateProtocol {
public static int PORT_IDE = 54719;
public static int PORT_PREVIEW = 54720;
public static int PORT_PUBLISH = 54718;
}
|
Finite-element simulation of wave propagation in periodic piezoelectric SAW structures
Many surface acoustic wave (SAW) devices consist of quasiperiodic structures that are designed by successive repetition of a base cell. The precise numerical simulation of such devices, including all physical effects, is currently b... |
// Test file before reading, for detailed error message
private boolean testFileRead(File f) {
boolean fileMissing = !f.exists();
boolean permissionDenied = !f.canRead();
boolean notAFile = !f.isFile();
if (fileMissing || permissionDenied || notAFile) {
String title = null;
Stri... |
/**
* @brief Acquire measurements for one of the two ADCs
* @param *csGPIO Pointer to the GPIO of chip select for specific ADC
* @param csPin Chip select pin number
* @param *dataPtr pointer to where the data needs to be stored
*/
static inline void Measure_SingleADC(GPIO_TypeDef* csGPIO, uint16_t csPin, uint16_t*... |
package org.woo.db;
/**
* @author Administrator
* @date 2018 05
* org.woo.db.DBQuery
*/
public final class DBQuery {
public <T> T query() {
return null;
}
public DBType getDbType(DBRoute dbRoute) {
return DBType.MYSQL;
}
}
|
def public_statement(statement):
effect = statement['Effect']
principal = statement.get('Principal', {})
not_principal = statement.get('NotPrincipal', None)
condition = statement.get('Condition', None)
suffix = "/0"
if effect == "Allow" and \
(principal == "*" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.