content stringlengths 10 4.9M |
|---|
Root surface etching at neutral pH promotes periodontal healing.
The purpose of the present investigation was to examine whether an etching agent operating at neutral pH (EDTA) can enhance healing compared to a low pH etching agent (citric acid) in an animal model. Maxillary molars and premolars, in total 32 teeth, in... |
<reponame>jakubbujny/pants
# coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
import re
from builtins import open, ... |
#! /usr/bin/env python
# coding: utf8
# Test code for 4tronix Picon Zero to work with an
# analog Infrared Distance Sensor (e.g. GP2Y0A21).
#
# Currently just prints the signal from an analog pin.
#
#-----------------------------------------------------------------
# GP2Y0A21 info:
# Datasheet: http://www.robot-electr... |
‘Paletta goes if Romagnoli arrives’
By Football Italia staff
Gabriel Paletta’s agent confirms the defender will ask to leave if Milan sign Alessio Romagnoli from Roma.
The Rossoneri are believed to be moving closer to securing a deal for the Italian Under-21 international, which would limit the playing time of the f... |
import copy
for test in range(int(input())):
n = int(input())
s = input()
tt = 0
for i in range(len(s) - 6):
if s[i:i+7] == "abacaba":
tt += 1
#print(tt)
ss = []
for i in s:
ss.append(i)
s = ss
if tt > 1:
print("NO")
elif tt == 1... |
import { useQuery } from "react-query";
import { listMeasures } from "utils/api/requestMethods";
import { CoreSetAbbr } from "utils/types/types";
interface GetMeasures {
state: string;
year: string;
coreSet: string;
}
const getMeasures = async ({ state, year, coreSet }: GetMeasures) => {
return await listMeas... |
/**
* yzhang class global comment. Detailled comment
*/
public abstract class AbstractNotePropertyComposite {
protected Note note;
private HorizontalTabFactory tabFactory;
private IEditorPart multiPageTalendEditor;
public static final int STANDARD_LABEL_WIDTH = 85;
public abstract... |
class Roll_Combo:
"""
Two die roll combination for games that require dice to play.
"""
sum : int
is_doubles : bool
def __init__(self, val1: int, val2 : int = None):
"""
Intializes Roll Combo object by summing
@param val1 : value of the first die's currently rolled v... |
// Given the list of features, if a specific user requested feature is not essential to pipeline uptime
// and may be a cause of the error, respond it back as high-priority so Pipeline can restart without it
func (dcp *DcpNozzle) prioritizeReturnErrorByFeatures(requested mcc.UprFeatures, responded mcc.UprFeatures) erro... |
#!/usr/bin/env python3
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2023 Mone... |
<reponame>jdwinters/Meetup-AP-I-pynthonkc<gh_stars>1-10
# -*- coding: utf-8 -*-
"""
Overview
========
Defines the types and structures returned from the PythonKC Meetup.com API
client.
Types
=====
MeetupEvent
-----------
id
Meetup.com ID for the event.
name
Name of the event.
description
Description of th... |
#! /usr/bin/env python3
#coding=utf-8
from Crypto.Hash import MD5
from Crypto.Cipher import AES
from Crypto import Random
import base64
def get_md5(data):
md5 = MD5.new()
md5.update(data.encode())
return md5.hexdigest()
def get_aeskey():
aeskey = Random.new().read(AES.block_size)
return base64.b... |
def _pick_certificate_cb(self, connection):
server_name = connection.get_servername()
try:
key, cert = self.certs[server_name]
except KeyError:
logger.debug("Server name (%s) not recognized, dropping SSL",
server_name)
return
n... |
def pad(sequences, sos=None, eos=None, pad_token='<pad>', pad_left=True, reverse=False):
if reverse:
if eos is not None:
sequences = [[eos] + seq for seq in sequences]
if sos is not None:
sequences = [seq + [sos] for seq in sequences]
else:
if sos is not None:
... |
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define pb push_back
#define mp make_pair
#define loop(i, start, end) for(auto i=start; i<end; i++)
#define TEST int T; cin >> T; while(T--)
#define print(var) cout << var << "\n"
#define u unsigned
#define ONLINE_JUDGE true
#define INF LLONG_MAX
#def... |
<gh_stars>10-100
use super::property::PropertyValue;
use crate::generator::Generator;
use alloc::string::String;
use alloc::vec::Vec;
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub struct ClipReference {
clip_id: u32,
}
impl ClipReference {
pub fn new(clip_id: u32) -> Self {
ClipReference { clip_id }... |
<filename>sql/query_privileges.py
# -*- coding: UTF-8 -*-
"""
@author: hhyo
@license: Apache Licence
@file: query_privileges.py
@time: 2019/03/24
"""
import logging
import datetime
import re
import traceback
import simplejson as json
from django.contrib.auth.decorators import permission_required
from django.db import... |
export const BLACK = {
100: '#F5F5F5',
200: '#EEEEEE',
300: '#E0E0E0',
400: '#BDBDBD',
500: '#9E9E9E',
600: '#757575',
700: '#616161',
800: '#424242',
900: '#212121',
};
export const GREY = {
50 : '#FAFAFA',
100: '#F5F5F5',
200: '#EEEEEE',
300: '#E0E0E0',
400: '#BDBDBD',
500: '#9E9E9E',
... |
package com.skanderj.gingerbread3.util;
import java.awt.Color;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
/**
* Helper class for basically anything that doesn't fit somewhere else.
*
* @author Skander
*
*/
public final class Utilities {
public static ... |
// Handles running appropriate error callbacks.
void OnError(const ShillClientHelper::ErrorCallback& error_callback,
dbus::ErrorResponse* response) {
std::string error_name;
std::string error_message;
if (response) {
dbus::MessageReader reader(response);
error_name = response->GetErrorName();... |
package kg.apc.jmeter.vizualizers;
import org.apache.jmeter.reporters.ResultCollector;
import org.apache.jmeter.samplers.SampleSaveConfiguration;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
*
* @auth... |
/**
* This method checks the validity of the location format
*
* @param latitude
* it must be a double
* @param longitude
* it must be a double
* @return true if they are both doubles, false, otherwise
*/
public boolean correctFormatLocation(String latitude, String longitude) {
... |
Image copyright Getty Images
A row has broken out over advice given to police in England and Wales telling them not to stop and search people only because they smell of cannabis.
It was first given to police last year and was reiterated by an Inspectorate of Constabulary report on Tuesday.
The advice says officers s... |
<filename>zairachem/descriptors/baseline.py
import numpy as np
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors as rd
from ersilia import ErsiliaModel
from tqdm import tqdm
RADIUS = 3
NBITS = 2048
DTYPE = np.int8
def clip_sparse(vect, nbits):
l = [0] * nbits
for i, v in vect.GetNonzeroElements(... |
def sensitivity(c, n):
sp = c.startpoints(n)
if n in sp:
return 1
sen = len(sp)
s = sensitivity_transform(c, n)
vs = int_to_bin(sen, clog2(len(sp)), True)
while not sat(s, {f"sen_out_{i}": v for i, v in enumerate(vs)}):
sen -= 1
vs = int_to_bin(sen, clog2(len(sp)), True)
... |
Digitizing China: The political economy of China’s digital switchover
documentation and in the public perception, news professionalism itself is a dynamic contingency, not a static doctrine. In fact, the academic dialogue about advocacy journalism and citizen journalism exemplifies how news professionalism could be co... |
Seattle mayor Ed Murray threw a bean bag at a cornhole board. A busker picked tunes on his guitar. A chef from local restaurant Soul Kitchen plated Southern food.
Seattle marked the transfer of some of its main public parks to private management in grand fashion. As part of a string of efforts to "clean up" downtown, ... |
// ExampleClient_GetPKI example using GetPKI()
//
// See more examples in /examples/
func ExampleClient_GetPKI() {
client, err := newTestClient()
if err != nil {
fmt.Printf("error loading client: %s", err.Error())
return
}
mockGetPKI(http.StatusOK)
var pki *PKI
pki, err = client.GetPKI(testServerURL+"id/{a... |
// Add the Word Count column.
private String[] metaSegmentHeader(String[] header) {
String[] newheader = Arrays.copyOf(header, header.length + 1);
newheader[newheader.length - 1] = "Word Count";
return newheader;
} |
def _report_hypervisor_resource_view(self, resources):
free_ram_mb = resources['memory_mb'] - resources['memory_mb_used']
free_disk_gb = resources['local_gb'] - resources['local_gb_used']
vcpus = resources['vcpus']
if vcpus:
free_vcpus = vcpus - resources['vcpus_used']
... |
/// Create a new Sound.
///
/// Return a `Err` if the number of channels doesn't match the output number of channels. If
/// the ouput number of channels is 1, or the number of channels of `source` is 1, `source`
/// will be automatic wrapped in a [`ChannelConverter`].
///
/// If the `sample_rate` of `source` mismatch ... |
ST. LOUIS - The Blues held tryouts for the 2012-13 Blue Crew fan entertainment team on Saturday at Scottrade Center.
For more than four hours, interested candidates participated in activities that tested their ability to pump up a crowd, think on their feet through improvisation and more. Candidates also went through ... |
/*
* ======================================================================
* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
* Licensed under the MIT License.
* See LICENSE.md in the project root for license information.
* =====================================================================... |
#include <stdio.h>
int main(void){
long a, b, i;
while(scanf("%ld %ld", &a, &b) != EOF){
if(a>b){
long tmp=a;
a=b;
b=tmp;
}
long max = 1;
for(i=2; i<=a; i++) {
if(a%i==0 && b%i==0) max=i;
}
printf("%ld\n", max);
}
return 0;
} |
/**
* @brief Constructs a new device buffer of `size` uninitialized bytes
*
* @throws rmm::bad_alloc If allocation fails.
*
* @param size Size in bytes to allocate in device memory.
* @param stream CUDA stream on which memory may be allocated if the memory
* resource supports streams.
* @param m... |
<gh_stars>0
#include "xy_align.h"
using namespace frc;
void XYalign::test(){
std::shared_ptr<NetworkTable> table = nt::NetworkTableInstance::GetDefault().GetTable("limelight");
degree = ahrs->GetAngle();
double vertical_offset = table->GetNumber("ty", 0.0);
double drive_adjustment = vertical_offset;
int xp ... |
/** REST web services for creating and modifying related entities. */
@Path(ApiPaths.API_RESOURCE + "/" + ApiPaths.RELATED_ENTITIES)
@Api(value = SwaggerInterface.TAG_RESOURCES,
authorizations = {@Authorization(value = SwaggerInterface.BASIC_AUTH),
@Authorization(value = SwaggerInterface.API_KEY_AUTH)})... |
Exploring the relationship between head anatomy and cochlear implant stability in children
Abstract In our experience, surgical outcomes in children have been excellent with a low complication rate. Our aim in this study was to better understand what aspects of our current surgical technique have been successful with ... |
No one had even asked the question.
No need to. Ottawa Senators head coach Dave Cameron walked up to the microphone and stated the obvious:
"Yes, I am concerned about our record at home."
Story continues below advertisement
And so he should be, as Wednesday marked the final game of a four-game homestand for the Sen... |
<filename>app/src/main/java/com/enhancedsociety/firefly/SignatureActivity.java
package com.enhancedsociety.firefly;
import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.le.AdvertiseCallback;
import android.bluetooth.le.AdvertiseSettings;
import android.content.pm.PackageManager;... |
<reponame>flaviojs/pyparse
# -*- coding: utf8 -*-
# license: WTFPL version 2, or whatever is closest to "no license" and "public domain" (like Unlicense or CC0)
r""" Package ``pyparse.parser'' with parser infrastructure and parser modules.
@see https://en.wikipedia.org/wiki/Context-free_grammar
Disambiguate
... |
/**
* Copyright 2017-2021, Voxel51, Inc.
*/
import { LABEL_LISTS, LABEL_TAGS_CLASSES } from "../constants";
import { BaseState } from "../state";
import { Overlay } from "./base";
import {
ClassificationsOverlay,
TemporalDetectionOverlay,
} from "./classifications";
import DetectionOverlay, { getDetectionPoints }... |
package binary
import (
"io"
"github.com/pkg/errors"
"github.com/cs3238-tsuzu/go-wasmi/types"
"github.com/cs3238-tsuzu/go-wasmi/util/binrw"
)
const (
magicNumber uint32 = 0x00 | 0x61<<8 | 0x73<<16 | 0x6d<<24
versionNumber uint32 = 0x01
)
// ErrInvalidFormat is an error occurred when data contain invalid fo... |
Revolver Rani
Hindi (U/A)
Director: Sai Kabir
Cast: Kangna Ranaut, Vir Das, Piyush Mishra, Zakir Hussain, Kumud Mishra, Pankaj Saraswat
Any film set in the hinterlands of Uttar Pradesh is bound to be an action-revenge saga. So what sets an Ishqiya apart from a Bullett Raja? It’s the story. And it’s not just what it... |
/**
* Extends the given keys by prefixing them with {@link #namePrefix} and
* returns the new list.
*/
private List<byte[]> extendKeys(List<byte[]> keys) {
List<byte[]> extendedKeys = new ArrayList<byte[]>(keys.size());
for (byte[] key : keys) {
extendedKeys.add(extendKey(key));
}
return extendedKeys;
... |
/**
* Processes intents sent via startService().
*
* @param intent The supplied intent
* @param flags Additional data about the request
* @param startId A unique integer for specific requests to start
* @return Value indicating how the system should handle the service
*/
@RequiresApi(... |
def read(self, docxfile, populator):
self.populator = populator
self.docxDocumentReader = DocxDocumentReader(docxfile)
for table in self.docxDocumentReader.getTables():
rows = self.docxDocumentReader.getTableRows(table)
process = Fa... |
package report
import (
util "github.com/TerrexTech/go-commonutils/commonutil"
"github.com/TerrexTech/uuuid"
"github.com/mongodb/mongo-go-driver/bson"
"github.com/mongodb/mongo-go-driver/bson/objectid"
"github.com/pkg/errors"
)
type FlashSaleSoldItem struct {
ID objectid.ObjectID `bson:"_id,omitempty" ... |
<filename>rice-middleware/impl/src/main/java/org/kuali/rice/kew/xml/export/RuleDelegationXmlExporter.java
/**
* Copyright 2005-2015 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
package unimelb.bitbox.messages;
import unimelb.bitbox.peers.Peer;
import unimelb.bitbox.server.PeerServer;
import unimelb.bitbox.util.fs.FileDescriptor;
import java.io.IOException;
/**
* FILE_MODIFY_RESPONSE message.
*
* @author <NAME>
*/
public class FileModifyResponse extends Response {
priv... |
//-----------------------------------------------------------------------------
// Purpose: Set the avatar by C_BasePlayer pointer
//-----------------------------------------------------------------------------
void CAvatarImagePanel::SetPlayer( C_BasePlayer *pPlayer, EAvatarSize avatarSize )
{
if ( pPlayer )
{
int... |
#pragma once
#include "as/Pos.h"
#include "as/Rng.h"
#include "as/Token_Listing.h"
namespace as
{
// This is token representation
struct Tkn
{
enum KIND
{
#define TOKEN(k, s) KIND_##k
TOKEN_LISTING
#undef TOKEN
};
inline static const char* NAMES[] = {
#define TOKEN(k, s) s
TOKEN_LISTING
... |
/*
* Copyright (C) 2014 <NAME> <<EMAIL>>
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Concepts and requirements for exchanging time values between libuavcan, media
* layer implementations, and applications.
*/
/** @file
* This header specifies the concepts used by libuavcan when ... |
An Analysis of the Deaths Reported by Hurricane Maria: A Mini Review
The purpose of this mini review is to analyze the controversies surrounding the official death toll of Hurricane Maria, driven by the estimates of excess mortality rates by academics and investigative journalists. This review will be a critique of th... |
// Auxiliary: Handle precalculated gamut check. The retrieval of context may be alittle bit slow, but this function is not critical.
static
void TransformOnePixelWithGamutCheck(cmsContext ContextID, _cmsTRANSFORM* p,
const cmsUInt16Number wIn[],
... |
def resolve_hostname(addr):
if ip_math.is_valid_ip(addr):
try:
name, _, _ = socket.gethostbyaddr(addr)
return name
except socket.gaierror:
pass
except socket.herror:
pass
except socket.timeout:
pass
return None
e... |
<filename>src/util/AllocatedString.hxx<gh_stars>10-100
/*
* Copyright 2015-2021 <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyri... |
<reponame>doublefx/Blockchain
package com.doublefx.blockchain.example.virtualcoin.collector;
import com.doublefx.blockchain.example.common.AccountHolder;
import com.doublefx.blockchain.example.virtualcoin.Transaction;
import java.math.BigDecimal;
import static java.math.BigDecimal.ZERO;
import static java.math.BigDe... |
// Validates event modifiers applicability for shortcut modifiers.
// Examples:
// CapsLock shouldn't affect matching of Ctrl+C.
// Modifier with Shift should match both LeftShift and RightShift
fn are_modifiers_applicable(
shortcut_modifiers: Option<ui_input2::Modifiers>,
event_modifiers: Option<ui_input2::M... |
/**
* Performs a deep copy of the specified cell, handling the cell format
*
* @param cell the cell to copy
*/
private WritableCell deepCopyCell(Cell cell)
{
WritableCell c = shallowCopyCell(cell);
if (c == null)
{
return c;
}
if (c instanceof ReadFormulaRecord)
{
Rea... |
/**
* Clears the table by putting all the blocks in block bank
*/
public void resetTable() {
playArea = new ArrayList<Block>();
blockBank = new ArrayList<Block>();
inPlay = new ArrayList<Block>();
int tempWidth = width - bankX;
int tempLength = length - bankY;
int tempX, tempY;
for (int i = 0; i < numB... |
Following last week's tragic death of Indianapolis 500 champion Dan Wheldon, more than a dozen of his fellow drivers met with IndyCar officials Monday to talk about safety issues. As correspondent Cynthia Bowers reports, the drivers want to see significant changes in their sport.
With 34 cars jammed together at 225 mi... |
def ALL_VARIANTS():
return make_variants(SUPPORTED_PYTHON_VERS,
SUPPORTED_BUILD_TYPES,
SUPPORTED_MPI_TYPES,
SUPPORTED_CUDA_VERS) |
def finalize(self, data):
invalid = np.all(self.x[:, : self.sensor.n_chans] <= -1.5, axis=-1)
for v in ALL_TARGETS:
data[v].data[invalid] = np.nan
variables = [target for target in ALL_TARGETS if target in data.variables]
for var in variables:
data[var + "_true"] ... |
<filename>Tools/Tester/MiscTester.cpp
/*
* Copyright (C) 2018 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... |
/**
* Compute and set execution order for all components.
*/
private void createExecutionOrder() {
final Map<RdfObjects.Entity, Set<RdfObjects.Entity>> deps
= new HashMap<>();
for (Map.Entry<RdfObjects.Entity, Set<RdfObjects.Entity>> entry
: dependencies.entrySe... |
def fit(self, X):
self.col_bin_edges_ = {}
self.hist_counts_ = {}
self.hist_edges_ = {}
self.col_mapping_ = {}
self.col_mapping_counts_ = {}
self.col_n_bins_ = {}
self.col_names_ = []
self.col_types_ = []
self.has_fitted_ = False
schema = a... |
def _read_content(self, url, file_name, branch):
api = self.bisector.api
try:
return api.m.gitiles.download_file(
repository_url=url, file_path=file_name, branch=branch,
step_test_data=lambda: api._test_data['download_deps'].get(
self.commit_hash, ''))
except TypeE... |
import React from "react";
import fetch from "isomorphic-unfetch";
// Use a global to save the user, so we don't have to fetch it again after page navigations
let userState;
const User = React.createContext({ user: null, loading: false });
export const fetchUser = async () => {
if (userState !== undefined) {
r... |
/**
* @return a symbolic representation of this operator.
*/
public String toSymbol() {
switch(this) {
case EQUALS: return "=";
case NOT_EQUALS: return "!=";
case LESS_THAN: return "<";
case LESS_THAN_EQUALS: return "<=";
case GREATER_THAN: r... |
<filename>src/builtins/jobs.rs
use crate::jobc;
use crate::shell;
pub fn run(sh: &shell::Shell) -> i32 {
if sh.jobs.is_empty() {
return 0;
}
for (_i, job) in sh.jobs.iter() {
jobc::print_job(job);
}
return 0;
}
|
t=int(input())
while(t!=0):
a,b,c=map(int,input().split(" "))
x=c%a
if(x<b):
y=abs(a-b)+x
print(c-y)
else:
y=x-b
print(c-y)
t=t-1 |
Pneumonia After Hematopoietic Stem Cell Transplantation
Pneumonia is the main cause of morbidity and mortality after hematopoietic stem cell transplantation. Two thirds of pneumonias observed after both autologous and allogeneic stem cell transplantations are of infectious origin, and coinfections are frequent. One th... |
use criterion::{criterion_group, criterion_main, Criterion};
use tokio::runtime::Runtime;
async fn fetch_block(rest: &bitcoin_rest::Context, height: u32) {
let blockhash = rest.blockhashbyheight(height).await.unwrap();
let _block = rest.block(&blockhash);
}
fn bench(c: &mut Criterion) {
let rt = Runtime::... |
/**
* Handle all movement of the chassis.
*/
public class MovementManager extends FeatureManager {
public DcMotor frontLeft;
public DcMotor frontRight;
public DcMotor backLeft;
public DcMotor backRight;
private PointNd currentLocation;
private TrigCache cache;
private ElapsedTime timer;
... |
Unnecessarily strict rules for employing paid duty police officers are costing Toronto taxpayers as much as $2 million each year, a city audit has found. The official findings won’t be released for weeks, but a draft copy obtained by the Star recommends reviewing some “debatable” permit criteria, particularly for road ... |
Image copyright EPA Image caption Mahmoud Abbas made the announcement at a meeting in the West Bank city of Ramallah
The Palestinian Authority's unity government will resign, President Mahmoud Abbas has said.
He told his Fatah faction that the cabinet had to be dissolved because the rival Hamas movement would not all... |
// This funct increments errors counters by name. In case flags errors each flag will be counted separatelly.
func incrementHartCommErrorsCounter(err error) {
if e, ok := err.(status.CommunicationsErrorSummaryFlags); ok {
for i := 0; i < 8; i++ {
mask := status.CommunicationsErrorSummaryFlags(1 << i)
if e.HasF... |
/**
* Executes the config command using the provided options.
*
* @param cli
* @see org.geogit.cli.AbstractCommand#runInternal(org.geogit.cli.GeogitCLI)
*/
@Override
public void runInternal(GeogitCLI cli) throws Exception {
GeoGIT geogit = cli.getGeogit();
if (null == geogi... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b,c,d,e,f,g,h,i;
while(cin>>a)
{
long long int r[200];
for(b=1;b<=a;b++)
{
cin>>r[b];
}
c=0;
d=1;
e=0;
for(b=1;b<=a-1;b++)
{
... |
Identity politics is coming in for a kicking at present, with many of the boots predictably attached to the feet of those who oppose the focus by the left on the struggles of minorities, women and the LGBT community. Identity politics is thus a convenient scapegoat for the mercurial rise of the populist right. Its crit... |
unsigned int atomic_testandset(unsigned int value, unsigned int *lock);
|
package com.ra4king.gameservers.jwords.server.users;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import com.ra4king.gameservers.jwords.server... |
20th and 21st-century Icelandic politician
Jóhanna. In this Icelandic name , the last name is a patronymic , not a family name ; this person is referred to by the given name
Jóhanna Sigurðardóttir[1] ( Icelandic pronunciation: [jou̯ːhana ˈsɪːɣʏrðartou̯htɪr]; born 4 October 1942) is an Icelandic politician and the f... |
/**
* Abstract class Player for NormallPlayer and BOTplayer
* @author Janek
*
*/
public abstract class Player extends Thread {
Colors color;
Player opponent;
Socket socket;
BufferedReader input;
PrintWriter output;
int X1,Y1;
Game game;
GameList gamelist;
//cons... |
#pragma once
#include "../base_def.hpp"
namespace lol {
struct LolLootLootGrantNotification {
int64_t id;
uint64_t gameId;
uint64_t playerId;
int32_t championId;
std::string playerGrade;
std::string lootName;
std::string messageKey;
std::string msgId;
uint64_t accountId;
};
... |
import React from 'react';
import { Image, Text, View } from 'react-native';
import SunWeather from '~/assets/sun-cold.png';
import { styles } from './styles';
export const ContentMessage = () => {
return (
<View style={styles.container}>
<Image style={styles.image} source={SunWeather} />
<View styl... |
Oxygen rich graphene support could lead to durable fuel cell catalysts
(Nanowerk News) In the search for efficient, durable and commercially viable fuel cells, scientists at the University of Ulster's Nanotechnology Institute and collaborators from Peking University and University of Oxford have discovered a new catal... |
It was, perhaps, the sign of a candidate under strain. Or it might have just been Doug being Doug.
At a mayoral debate at the Runnymede Community Church Friday, Doug Ford broke the political fourth wall and went after the audience for giving him a hard time.
“I’ve stood up for you folks,” he said after receiving some... |
def upgrade():
description = (
"Send an Assessment updated notification to "
"Assessors, Creators and Verifiers."
)
now = datetime.utcnow().strftime("%Y-%m-%d %H-%M-%S")
sql = """
INSERT INTO notification_types (
name,
description,
template,
advance_notice,
... |
<reponame>daheige/concurrency-in-go
package main
import (
"log"
"sync"
"time"
)
func main() {
// 探讨slice,map并发写
var s []int
var m = make(map[int]bool, 10)
// 推荐使用chan 把独立携程中执行的结果放入chan中,而不是通过共享变量的方式进行赋值
res := make(chan int, 10)
var wg sync.WaitGroup
var lock sync.RWMutex // 通过读写锁保证map并发写没有data race
wg.A... |
def files2c(readdir, ext):
names = listdir(readdir)
files = []
for name in names:
if ext == name.split('.')[-1]:
files.append(name)
c_strs = []
lens = []
for file in files:
str, len = file2c(readdir + '/' + file, 'mp3_data')
c_strs.append(str)
lens.app... |
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
#pragma once
#include <stdlib.h>
#include <iostream>
class GameBoard
{
private:
int* board;
public:
static const int BOARD_HEIGHT = 6;
static const int BOARD_WIDTH = 7;
static const int BOARD_SIZE = BOARD_HEIGHT * BOARD_WIDTH;
GameBoard();
~GameBoard();
void printBoard();
int getPiece(int x, int y);
void putP... |
import sys
input=sys.stdin.readline
t=int(input())
for i in range(t):
n,p,k=map(int,input().split())
price=[int(i) for i in input().split()]
price.append(0)
price.sort()
ans=0
for i in range(1,k):
price[i]+=price[i-1]
#print(price)
for i in range(1,n-k+1):
p... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
#include <all_far.h>
#pragma hdrstop
#include "Int.h"
int FTP::GetHostFiles(struct PluginPanelItem *PanelItem,int ItemsNumber,int Move,String& DestPath,int OpMode)
{
PROC(("FTP::GetHostFiles","%d [%s] %s %08X",ItemsNumber,DestPath.c_str(),Move?"MOVE":"COPY",OpMode))
InitDialogItem InitItems[]=
{
{DI_DOUBLEBOX, 3... |
/**
* @author Morten Olav Hansen <mortenoh@gmail.com>
*/
@Controller
@RequestMapping( value = DocumentController.RESOURCE_PATH )
public class DocumentController
{
public static final String RESOURCE_PATH = "/documents";
@Autowired
private DocumentService documentService;
@Autowired
private Locat... |
<filename>src/provider/fixtures.ts
import {join} from 'path'
import {Fixtures} from "../fixtures";
export class StorageFixtures{
static async load(){
const dataDir = join(__dirname, '../../','data');
//const storageTypeDir = join(dataDir, 'storage-type');
const providerDir = join(dataDir, ... |
package dao
type LinkedList struct {
head *LinkedListValue
tail *LinkedListValue
len int
}
type LinkedListValue struct {
Value interface{}
next *LinkedListValue
}
func NewLinkedList() *LinkedList {
return new(LinkedList)
}
func (l *LinkedList) Add(value interface{}) {
v := &LinkedListValue{
Value: value,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.