content stringlengths 10 4.9M |
|---|
package usung.com.mqttclient.utils;
import android.content.Context;
import android.graphics.Color;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.text.styl... |
<filename>nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/JcusparseNDArrayCSR.java
package org.nd4j.linalg.jcublas;
import com.google.flatbuffers.FlatBufferBuilder;
import org.nd4j.linalg.api.blas.params.MMulTranspose;
import org.nd4j.linalg.api.ndarray.BaseSparseNDArrayCSR;
impor... |
def _CreateProgressTracker(patch_job_name):
stages = [
progress_tracker.Stage(
'Generating instance details...', key='pre-summary'),
progress_tracker.Stage(
'Reporting instance details...', key='with-summary')
]
return progress_tracker.StagedProgressTracker(
message='Executin... |
def _handle_protocol_error(self, exception: urllib3.exceptions.ProtocolError, log_callback: Callable[[str], None]):
if (len(exception.args) < 2) or not isinstance(exception.args[1], urllib3.exceptions.InvalidChunkLength):
raise exception
log_callback("OpenShift API server closed connection") |
/* input :
--i : the span index
--u : the variable that lies on the knot span
--p : the degree of the polynomial
--U : the knot vector
*/
func basisFuns(i int, u float64, p int, U []int) []float64 {
N := make([]float64, p+1)
left := make([]float64, p+1)
right := make([]float64, p+1)
N[0] = 1.
for j := 1; j <= p; j... |
def extract_vectors_ped_feature(residues, conformations, key=None, peds=None, features=None, indexes=False, index_slices=False):
begin = end = -1
residues = int(residues)
conformations = int(conformations)
slices = []
if key == 'PED_ID' or index_slices:
begin = 0
end = 1
slic... |
IDIAP Higher-Order Statistics in Visual Object
In this paper, we develop a higher-order statistical theory of matching models against images. The basic idea is not only to take into account how much of an object can be seen in the image, but also what parts of it are jointly present. We show that this additional infor... |
// ServeHTTP takes the url of the requested resource to be fetched on the
// origin and puts in in the request's context to be used later by the proxy director.
func (p *proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if req.URL.Path != p.path {
w.WriteHeader(http.StatusBadGateway)
return
}
q := req... |
/**
* This helper method executes the loops necessary to enforce overhangs for
* each graph in enforceOverhangRules *
*/
private int enforceOverhangRulesHelper(RNode parent, ArrayList<RNode> children, RNode root, int count) {
String nextLOverhang = new String();
for (int i = 0; i < childr... |
<reponame>dstrants/swarm_deploy
package containers
import (
"errors"
"fmt"
"strings"
"swarm_deploy/lib/slack"
log "github.com/sirupsen/logrus"
"github.com/docker/docker/api/types/swarm"
docker "github.com/fsouza/go-dockerclient"
)
//Parse image name and tag
func ParseImageName(full_name string) (string, str... |
/**
* Allows the user to sign up or return to the log in page.
* @author Talal Abou Haiba
*/
public class SignupActivity extends AppCompatActivity {
private DatabaseReference mDatabase;
private FirebaseAuth mAuth;
private ProgressDialog mProgressDialog;
private EditText mNameField;
private Edi... |
n = list(input())
fx = 0
#print(n)
for i in n:
fx += int(i)
nn = ''.join(n)
nnn = int(nn)
#print(fx)
#print(nnn)
if nnn%fx == 0:
print('Yes')
else:
print('No') |
/** Start the service. This entails unloading the AuthConf file contents
* using the LoginConfigService.
*/
protected void stopService() throws Exception
{
MBeanServer server = super.getServer();
flushAuthenticationCaches();
if( configNames != null && configNames.length > 0 )
{
... |
//pattern1
def pyramid(p):
for m in range(0, p):
for n in range(0, m+1):
print("* ",end="")
print("\r")
p = 5
pyramid(p)
//pattern2
def pyramid(p):
X = 2*p - 2
for m in range(0, p):
for n in range(0, X):
print(end=" ")
X = X - 2
for n in range(0, m+1):
... |
package org.wikipedia.dataclient.mwapi;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.StringUtils;
import org.wikipedia.dataclient.WikiSite;
import org.wikipedia.gallery.ImageInfo;
import org.w... |
<filename>mozillians/users/models.py
import logging
import os
import uuid
from itertools import chain
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Manager, ManyToManyField
from django.utils.encoding import iri_to_uri
from django.... |
s=input()
if s[0]=='-':
a1=int(s[:-1])
a2=int(s[:-2]+s[-1])
if a1>a2:
print(a1)
else:
print(a2)
else:
print(s) |
# Simple graph object using visual python
from vpython import *
gr1 = graph( width=600, height=450,\
title="Visual 2D graph", xtitle="x", ytitle="f(x)",\
foreground=color.black, background=color.white)
plot1 = gcurve(color = color.cyan)
for x in arange(0.0, 8.1, 0.1):
plot1.plot(pos=(x, 5.0 * co... |
<reponame>murawaki/bayes-autologistic
from collections import defaultdict
from itertools import combinations
import glob
import os
from collections import OrderedDict
import numpy as np
from .utils import collect_autologistic_results
AREA2SPEC = [
# area, start, end (inclusive), color, marker
("Phonology", ra... |
/**
* A functional interface (oh, please come Java 8 - you cannot come soon
* enough) to help manage out-of-control boilerplate-itis in SQL code.
*
* @author Alex Kalderimis
*
* @param <T> The return type of the operation.
*/
public abstract class SQLOperation<T> {
/**
* The code that the operation represen... |
/**
* Debugging support. It is expected that in a real project, the
* file Debug.java will be physically replaced with a different source
* code file that * implements the same public API. For a deploy build,
* it should * have ASSERT set false, and LEVEL set to 0. For a debug
* build, it will almost certai... |
/**
* Most commonly the {@link ProxyFactoryFactory} will depend directly on the chosen {@link BytecodeProvider},
* however by registering them as two separate services we can allow to override either one
* or both of them.
* @author Sanne Grinovero
*/
public final class ProxyFactoryFactoryInitiator implements Stan... |
/**
* @author David Romero Alcaide
* @param alumnoParseado
* @return
* @throws ParseException
*/
private Alumno create(String[] alumnoParseado,Profesor p) throws ParseException {
Alumno a = create();
a.setNombre(alumnoParseado[0].trim());
a.setApellidos(alumnoParseado[1].trim());
String curso = alumno... |
Absorption of methochlorpromazine in rat small intestinal everted sac.
The absorption of methochlorpromazine in rat small intestinal everted sac was investigated. 0.22% of the drug added in mucosal fluid was transferred to serosal fluid for 30 min at 37 degrees C. The absorption of the drug was slightly inhibited by c... |
// Read returns the current value of the set.
// An element is in the set if it is in the add map, and its clock is less than
// that in remove map (if existing).
func (s aworset) Read() tla.TLAValue {
set := make([]tla.TLAValue, 0)
i := s.addMap.Iterator()
for !i.Done() {
elem, addVC := i.Next()
if remVC, remOK... |
for g in range(int(input())):
e = input().replace('.', '').replace(',', '').lower()
e = e.replace('jogo', '#j').replace('perdi', '#p').split()
c = m = 0
for x in e:
if '#j' != x != '#p': c += len(x)
else:
c += 4
if x == '#p': c += 1
m < c
m = c
c = 0
... |
Freshly blessed with six Oscar nominations, Mel Gibson’s new second world war film Hacksaw Ridge doesn’t just raise the bar for combat scenes. – it annihilates it. It may have a gun-shy pacifist as its main character, but the initial 15-minute re-creation of the assault on an Okinawan escarpment is a frenzy of cartwhee... |
import gkeepapi
from datetime import datetime
from gkeepapi import node as g_node
from gkeepapi.exception import LoginException
from bs4 import BeautifulSoup
import logging
import sys
log = logging.getLogger("gkeep")
def login(gaia, pwd):
# gkeepapi.node.DEBUG = True
keep = gkeepapi.Keep()
success = keep.... |
// ExecuteFetch is part of the DBClient interface
func (dc *fakeDBClient) ExecuteFetch(query string, maxrows int) (qr *sqltypes.Result, err error) {
if testMode == "debug" {
fmt.Printf("ExecuteFetch: %s\n", query)
}
if dbrs := dc.queries[query]; dbrs != nil {
return dbrs.next(query)
}
for re, dbrs := range dc.... |
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCalculateMaxAffectedTenants(t *testing.T) {
tests := []struct {
nodeTenants [][]int
expectedMax int
}{
{
nodeTenants: nil,
expectedMax: 0,
},
{
nodeTenants: [][]int{
{1, 2, 3},
{4, 5, 6},
},
expectedM... |
<gh_stars>0
import * as React from "react";
import AlertPanel from "#SRC/js/components/AlertPanel";
import AlertPanelHeader from "#SRC/js/components/AlertPanelHeader";
import JobsPage from "./JobsPage";
import JobCreateEditFormModal from "../JobCreateEditFormModal";
interface JobsOverviewEmptyProps {
jobPath?: str... |
import sys, os
from tqdm import tqdm
import numpy as np
import networkx as nx
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import RDConfig
sys.path.append(os.path.join(RDConfig.RDContribDir, "SA_Score"))
import sascorer
from util.smiles.dataset import load_dataset
from util.smiles.char_d... |
A graduating senior walks on the campus of Columbia University in May. (Amanda Voisard)
Carl L. Hart was surprised when a student in one of his classes at Columbia University wrote an essay for The Washington Post about the effect of having him speak frankly about his past and the importance of having non-white facult... |
/**
* Computes the world transform of this Spatial in the most
* efficient manner possible.
*/
void checkDoTransformUpdate() {
if ((refreshFlags & RF_TRANSFORM) == 0) {
return;
}
if (parent == null) {
worldTransform.set(localTransform);
refresh... |
class TextAudioSpeakerCollate:
"""Zero-pads model inputs and targets"""
def __init__(self, return_ids=False):
self.return_ids = return_ids
def __call__(self, batch):
"""Collate's training batch from normalized text, audio and speaker identities
PARAMS
------
batch: ... |
/**
* This class is where the bulk of the robot should be declared. Since
* Command-based is a "declarative" paradigm, very little robot logic should
* actually be handled in the {@link Robot} periodic methods (other than the
* scheduler calls). Instead, the structure of the robot (including subsystems,
* commands... |
/**
* A client program for the RandomizedQueue class model.
*
* @author Alessio Vallero
*/
public class Permutation {
public static void main(String[] args) {
// Check how many arguments were passed in
if (args.length < 1) {
System.out.println("Proper Usage is: Permutation <ITEMS_COU... |
// TODO: This suggests that ordering and distinct should be tracked together.
public boolean strictlyOrderedIfUnique(Function<String,Index> getIndex, int nkeys) {
if (orderedPlan instanceof RecordQueryIndexPlan) {
RecordQueryIndexPlan indexPlan = (RecordQueryIndexPlan)orderedPlan;
... |
/**
* A company user
*/
public class Company extends User {
// Company's banking information
private BankInformation bankInfo;
// Company's address
private Address address;
/**
* Constructor for Company
*
* @param username Username
* @param password Password
* @param typ... |
<reponame>apmasell/shesmu
package ca.on.oicr.gsi.shesmu.compiler;
import ca.on.oicr.gsi.Pair;
import ca.on.oicr.gsi.shesmu.compiler.Target.Flavour;
import ca.on.oicr.gsi.shesmu.plugin.types.Imyhat;
import java.nio.file.Path;
import java.util.*;
import java.util.function.Consumer;
import java.util.function.Predicate;
i... |
package main
import (
"encoding/json"
"github.com/sdiawara/probeit/models"
"github.com/stretchr/testify/assert"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
)
var status int
var session *mgo.Session
var collection *mgo.Collection
var expectedProbe models.P... |
package ansi
import (
"fmt"
"os"
"golang.org/x/sys/windows"
)
// Enable Windows virtual terminal sequences for console control without safe access to Console API
func WindowsInitTerminal(title string) {
stdout := windows.Handle(os.Stdout.Fd())
var originalMode uint32
windows.GetConsoleMode(stdout,... |
def toggler(self, attr):
if attr not in self._opts:
raise KeyError("No such option: %s" % attr)
def toggle():
setattr(self, attr, not getattr(self, attr))
return toggle |
<filename>BeLuEngine/BeLuEngine/src/BeLuEngine.cpp
#include "stdafx.h"
#include "BeLuEngine.h"
#include "Misc/MultiThreading/Thread.h"
#include "Renderer/Statistics/EngineStatistics.h"
BeLuEngine::BeLuEngine()
{
}
BeLuEngine::~BeLuEngine()
{
delete m_pTimer;
m_pSceneManager->deleteSceneManager();
m_pRenderer->d... |
MA2CoBr4: lead-free cobalt-based perovskite for electrochemical conversion of water to oxygen.
We have synthesized a lead-free stable organic-inorganic perovskite (MA2CoBr4) by using non-hazardous solvents such as methanol and ethanol, which are eco-friendly and safe to handle in comparison to DMF, toluene, etc. Singl... |
/**
* A meta-bean implementation designed for use by the code generator.
*
* @author Stephen Colebourne
*/
public abstract class DirectMetaBean implements MetaBean {
// overriding other methods has negligible effect considering DirectMetaPropertyMap
/**
* This constant can be used to pass into {@code... |
package spencercjh.problems;
/**
* https://leetcode-cn.com/problems/shuffle-an-array/
*
* @author spencercjh
*/
class ShuffleAnArray {
public ShuffleAnArray(int[] nums) {
}
public int[] reset() {
}
public int[] shuffle() {
}
}
/**
* Your ShuffleAnArray object will be instan... |
Why Chris Evans Is Retiring, And Why Other Actors Might Follow Suit By Gabe Toro Random Article Blend
Such is the case for Chris Evans, who 1:30 Train, a drama he shot in 19 days in New York City starring himself and Alice Eve. Which is actually a pretty glamorous, moviestar thing to do also, but what can you do? Evan... |
""" shell sort tests module """
import unittest
import random
from sort import shell
from tests import helper
class ShellSortTests(unittest.TestCase):
""" shell sort unit tests class """
max = 100
arr = []
def setUp(self):
""" setting up for the test """
self.arr = random.sample(ran... |
class RF: # Random Forest
"""docstring for Random Forest """
def __init__(self, n=100, m=10):
# Model Definition
model = RandomForestClassifier(n_estimators=n, max_depth=m, random_state=42, n_jobs = -1, max_features="auto")
self.model = model
def train(self, X_train, y_train):
... |
// Next moves the iterator to the next set of results. It returns true if there
// are more results, or false if there are no more results or there was an
// error.
func (l *ObjectLister) Next() bool {
var ok bool
l.currentValue, ok = <-l.resultCh
if !ok {
l.currentErr = l.finalErr
return false
}
return true
} |
w,h,x,y=map(int,input().split())
if w<h:
tmp1=w
tmp2=x
w=h
h=tmp1
x=y
y=tmp2
if x>w/2:
x=w-x
if y>h/2:
y=h-y
a=x*h
b=w*y
if y==0 or x/y>w/h:
print(h*w/2,0)
elif a!=b :
print(max(a,b),0)
else:
print(max(a,b),1)
|
def check_in_both(self):
if set(self.white_data).issubset(self.black_data):
raise Exception("WARNING: Whitelist content also appears in Blacklist content") |
def window(self):
self.__window = (26 - self.__postion + self.__ringSetting) % 26 |
import * as vscode from 'vscode';
import { ITreeNode } from './ITreeNode';
import { GitlabAPIProvider } from './api';
import { Group } from '../../Models/Group';
import { Issue } from '../../Models/Issue';
import { IssueLabel } from '../../Models/IssueLabel';
import { Project } from '../../Models/Project';
export clas... |
/**
* <b>NO-OP for MapR Tables</b><p>
* Explicitly clears the region cache to fetch the latest value from META.
* This is a power user function: avoid unless you know the ramifications.
*/
public void clearRegionCache() {
if (maprTable_ != null) {
maprTable_.clearRegionCache();
return;
}... |
<filename>pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/BaseEncryptionImplementation.java
package org.apache.pdfbox.pdmodel.encryption;
import java.io.IOException;
import java.io.InputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.secu... |
##############################################################################
# Copyright (c) 2016 <NAME>
# juan_ <EMAIL>
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at... |
#!/usr/bin/python
from math import exp
import numpy as np
import sys
def binomial_tree(type,F, K, r, sigma, D, N=2):
deltaT = float(D/365) / N
u = np.exp(sigma * np.sqrt(deltaT))
d = 1.0 / u
tmp_arr = np.asarray([0.0 for i in range(N + 1)])
tmp_F_arr = np.asarray([(F * u**i * d**(N - i)... |
By By Layne Weiss Jul 6, 2012 in World France's highest court has ruled that French police are no longer permitted to arrest illegal immigrants unless they are suspected of having committed a crime, France 24 is reporting. Before this, police could hold "sans-papers," meaning "without papers," the French term for illeg... |
ON THE EMPLOYMENT OF EDGE BASIS FUNCTIONS TO IMPROVE THE ANALYSIS OF POLYGONAL PATCHES
A new set of entire domain basis functions has been recently proposed in the literature for analyzing microstrip antennas with convex polygonal patches through a Method of Moment (MoM) numerical procedure. These basis functions repr... |
/* scrivere un programma Go (il file si deve chiamare Config.go) che prenda da stdin un elenco di righe <chiave,valore> nella forma:
chiave = valore
chiave1 = valore1
chiave2 = valore2
...
chiave2 = nuovoValore2
chiaveN = valoreN
"chiave con spazi" = valoreDiChiaveConSpazi
dove i valori sono numeri decimali (... |
/**
* Behavior for Float Button
* Created by wing on 11/8/16.
*/
public class ByeBurgerFloatButtonBehavior extends ByeBurgerBehavior {
public ByeBurgerFloatButtonBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override public boolean layoutDependsOn(CoordinatorLayout parent, Vie... |
def reference_viewer(sys_argv):
viewer = ReferenceViewer(layout=default_layout)
viewer.add_default_plugins()
viewer.add_separately_distributed_plugins()
from argparse import ArgumentParser
argprs = ArgumentParser(description="Run the Ginga reference viewer.")
viewer.add_default_options(argprs)
... |
Remarks on weak compactness of operators defined on certain injective tensor products
We show that if X is a 2.-space with the Dieudonn6 property and Y is a Banach space not containing 11 , then any operator T: X? Y -Z where Z is a weakly sequentially complete Banach space, is weakly compact. Some other results of the... |
def debug_images(self):
if self._res is None:
return None
else:
r = dict()
for key in self._res:
if key.find("IMG_") >= 0: r[key] = self._res[key]
return r |
Site of Selective Action of Halothane on the Peripheral Chemoreflex Pathway in Humans
Halothane in humans depresses the ventilatory response to hypoxemia in a manner that suggests a selective action on one or more components of the peripheral chemoreflex arc. To test the hypothesis that this action is at the carotid b... |
Study of missing meter data impact on domestic load profiles clustering and characterization
Automated load managements and cost-effective power systems in distribution level are now becoming possible by increasing the number of installed smart meters at end-users side. Monitoring and controlling the massive datasets ... |
The Edinburgh Agreement (full title: Agreement between the United Kingdom Government and the Scottish Government on a referendum on independence for Scotland) is the agreement between the Scottish Government and the United Kingdom Government, signed on 15 October 2012 at St Andrew's House, Edinburgh, on the terms for t... |
In this post you will have free access to download strength of materials pdf , Fourth Edition by Dr. R. K. Bansal
Strength of Materials Book by R. K. Bansal Free Download
Strength of Materials , also known as mechanics of materials , deals with the behavior of solid objects subject to stresses and strains . when an o... |
Opportunistic Pervasive Computing with Domain-Oriented Virtual Machines
The paper targets heterogeneous sensor-actuator networks, in which nodes differ as to resources (sensors and actuators) they are equipped with. Each node contributes its specific sensors and actuators to be used by applications. The key assumption... |
#!/usr/bin/env python3
#
# Copyright 2019 ROBOTIS CO., LTD.
#
# 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 applicabl... |
Former Vice President Dick Cheney and his daughter Liz have an op-ed in the Wall Street Journal arguing that Barack Obama is insufficiently tough on Iraq, and was wrong to "abandon" the country. They also took to Fox News to announce they were starting a new organization, the Alliance for a Strong America, that will "a... |
/**
* Copyright 2020 Appvia Ltd <<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 required by applicable law or ... |
//Brief Intro
/*
dp vector stores the string which is formed and the queue stores the remainder
we are bascially adding a 0/1 at the end of each number and finding the remainder and if we get it as 0
we return the ans and if not we keep on finding the answer by adding a 0 or a 1 at the end adn finding its r... |
<reponame>tirette/cli-core<gh_stars>0
import parseArgv from 'minimist';
import fs from 'fs';
/*
* Parses the arguments passed down to the CLI and stores them.
*/
const command = process.argv[1].split('/').pop();
const args = parseArgv(process.argv.splice(2));
const { _: positionals, ...flags } = args;
const storeArg... |
import java.util.*;
public class E {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String s = sc.next();
int [][] dp = new int[26][N+1];
for (int a=0; a<26; a++) {
char c = (char)(97+a);
int []... |
/**
* The condition is used for registering the script.
* If the condition matches, the script will be executed normally.
*/
public abstract class Condition {
@SerializedName("name")
private String name;
@SerializedName("type")
private String type;
@SerializedName("body")
private Object body;
protected Condi... |
This article is also available in: Shqip Bos/Hrv/Srp
“What makes the Lord the most joyful is when his slave, without protection, enters among the non-believers and shoots until he gets killed … Kill and get killed – this is how those who we should be proud of end,” says Imam Bilal Bosnic in one of his many YouTube vid... |
/**
* Transforms the native RF1 files used in SNOMED into the internal
* representation. Because of the limitations of the RF1 format, this importer
* does not handle versions.
*
* @author Alejandro Metke
*
*/
public class RF1Importer extends BaseImporter {
protected final InputStream conceptsFile;
... |
/* a and b are digits long, out is 2 * digits */
inline
static void multiply(int *out, int *a, int *b, const int digits) {
int temp[SIZE];
int mid1[SIZE];
int mid2[SIZE];
int i, new_digits;
if (new_digits = digits >> 1) {
multiply(out, a, b, new_digits);
multiply(&(out[digits]), &(a[new_digits]), &(b[... |
// Create fake memref operands from the operands shapes.
SmallVector<MemrefDesc> GetFakeMemrefs(SmallVector<SymbolicShape> shapes) {
SmallVector<MemrefDesc> memrefs;
memrefs.reserve(shapes.size());
for (auto& shape : shapes) {
MemrefDesc desc;
desc.sizes.insert(desc.sizes.begin(), shape.begin(), shape.end... |
use std::os::raw::c_float;
use skia_safe::Color;
use crate::common::context::Context;
impl Context {
pub fn set_shadow_blur(&mut self, blur: c_float) {
// TODO ?
self.state.shadow_blur = blur;
}
pub fn shadow_blur(&self) -> c_float {
self.state.shadow_blur
}
pub fn set_s... |
package com.jetbrains.python.debugger.pydev;
import com.jetbrains.python.debugger.PyDebuggerException;
import org.jetbrains.annotations.NotNull;
public class VersionCommand extends AbstractCommand {
private final String myVersion;
private final String myPycharmOS;
private final long myResponseTimeout;
privat... |
/** Information about amount of glyphs that were rendered with given font. */
public class PlatformFontUsage {
private String familyName;
private Boolean isCustomFont;
private Double glyphCount;
/** Font's family name reported by platform. */
public String getFamilyName() {
return familyName;
}
/... |
import React from 'react';
import { Nav, Col, Container, Row } from 'react-bootstrap';
const FooterPage = () => {
return (
<div>
<Col xs={0} lg={1} xl={1} />
<Col xs={12} sm={12} lg={10} xl={10}>
<div className='fixed-bottom'>
... |
/*
** a modified version of the strcat function which starts copying the
** content of a string at a certain point in the string in a completely
** new string. the source string is freed and the destination string is
** ended with \0 and returned.
*/
char *ft_strcat_alpha(char *dest, char *src, int len)
{
int i;
i = ... |
#include "thread_pool.h"
thread_pool::task_queue::task_queue() : head(nullptr), tail(nullptr), n_tasks(0) {
// TODO: Error checking
pthread_cond_init(&queue_available, NULL);
pthread_mutex_init(&queue_rwlock, NULL);
pthread_cond_init(&queue_empty, NULL);
};
thread_pool::task* thread_pool::task_queue:... |
use std::io;
use std::sync::Arc;
#[derive(Debug, Clone)]
pub enum Event {
ChildBorn(u32),
// ChildDied(u32, i32),
Signal(i32),
TerminationTimeout,
IOError(Arc<io::Error>),
}
|
Screen Zombies, Alien Settlers, and Colonial Legacies
ABSTRACT You Are On Indian Land, a Challenge for Change documentary shot during a border-crossing blockade on Akwesasne territory (near Cornwall, Ontario) in 1969, helped interrupt the colonial legacy of Canadian cinema. Since then, activism in defense of Wet’suwet... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1001;
int n, num[maxn];
const int mod = 1e9 + 7;
typedef long long ll;
ll modmult(ll a, ll b) {
return (a * b) % mod;
}
ll modpow(ll a, int b) {
ll result = 1;
ll current = a;
while (b) {
if (b % 2 == 1) {... |
<reponame>LuanPetruitis/minis_programas_python
cadastro = {}
total_gols = []
cadastro['nome do jogador'] = str(input('Qual é o nome do jogador? '))
tot = int(input(f'Quantas partidas o {cadastro["nome do jogador"]} jogou? '))
for c in range(0, tot):
total_gols.append(int(input(f'Quantos gols o {cadastro["nome do j... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct node{
char name[20];
char secondName[20];
int age;
int priority;
struct node *next;
};
struct node* head = NULL;
struct node* tail = NULL;
struct node* temp;
char firstName[20], secondName[20];
int age, pri;
char priority[10];
voi... |
The AP poll isn’t all good news for Democrats, but at least it’s worse for Republicans. The survey was funded by the Black Youth Project at the University of Chicago.
Just a quarter of young Americans have a favorable view of the Republican Party, and 6 in 10 have an unfavorable view. Majorities of young people across... |
/// Returns a number of random songs similar to this one.
///
/// last.fm suggests a number of similar songs to the one the method is
/// called on. Optionally takes a `count` to specify the maximum number of
/// results to return.
pub fn similar<U>(&self, client: &Client, count: U) -> Result<Vec<Song>>
where
... |
Tony Abbott has sought to broaden the debate about same-sex marriage into an all-out culture war. Credit:Lukas Coch Wolfson, a lawyer and professor who was founder and president of the group Freedom to Marry, was the architect of the campaign to legalise gay marriage in the United States, an effort that culminated with... |
<gh_stars>1-10
import React from "react";
import { FormCheck, FormGroup } from "react-bootstrap";
import { useAppDispatch, useAppSelector } from "@/app/hooks";
import { setAudioTrack } from "@/app/slice";
export const FormAudioTrack: React.FC = () => {
const audioTrack = useAppSelector((state) => state.audioTrack);... |
// Lookup looks up the corresponding pythonresource Symbols for the given import graph node ID.
// If it returns an error, the Compat index is out of date or the compat builder has a bug.
func (i Compat) Lookup(rm pythonresource.Manager, nodeID int64) (pythonresource.Symbol, error) {
if sym, ok := i[nodeID]; ok {
re... |
#include<bits/stdc++.h>
#define it register int
#define ct const int
#define il inline
using namespace std;
typedef long long ll;
#define rll register ll
#define cll const ll
typedef double db;
const int N=1000005;
int n,d,ans;
struct ky{
int x,y,u,v;
}a[N];
il void gcd(ct a,ct b){return !b?d=a,void():gc... |
// With Atom sized to 64MB (or other size) limited chunks.
std::string DB::ReadOneFile(const std::string& file_path,
ParserIf* parser) {
Timer timer;
size_t total_write_size = 0, total_uncompressed_size = 0;
int32_t rec_counter = 0;
int32_t prev_atom_id = meta_data_.file_map().datum_ids_size();
BigInt num_f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.