content stringlengths 10 4.9M |
|---|
<reponame>iti-luebeck/HANSE2011
#include "form_uid.h"
#include "ui_form_uid.h"
FormUID::FormUID(Module_UID* module, QWidget *parent) :
QWidget(parent),
ui(new Ui::Form_UID)
{
ui->setupUi(this);
this->module = module;
ui->uidId->setText(module->getSettingsValue("uidId").toString());
... |
with open('src/day11/input.txt') as f:
input = [[int(i) for i in list(l.strip())] for l in f.readlines()]
class Octopus:
def __init__(self, level) -> None:
self.level = level
self.neighbors = []
self.flashed = False
self.flash_count = 0
def add_neighbor(self, neighbor) -> ... |
def grid_search(dataset, alpha_values, rho_values, beta):
train = cdnet.read_sequence('week3', dataset, 'train',
colorspace='gray', annotated=False)
test, gt = cdnet.read_sequence('week3', dataset, 'test',
colorspace='gray', annotated=True)
... |
Former FBI Director James Comey's testimony on Thursday backed up some of the anonymous-sourced news reports about the FBI, but Comey took exception to one specific New York Times story from February.
"In the main, it was not true," Comey told the Senate Intelligence Commitee, disputing a February 14 story titled "Tru... |
// Created from Raspberry Pi Pico example:
// https://github.com/raspberrypi/pico-examples/tree/master/pio/ws2812
/**
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
// Modified by <NAME> 2022
#include <stdio.h>
#include <stdlib.h>
#include "ws2812.h"
static inline ... |
Understanding Members’ Active Participation in Online Question-and-Answer Communities: A Theory and Empirical Analysis
Abstract Community-based question-and-answer (Q&A) websites have become increasingly popular in recent years as an alternative to general-purpose Web search engines for open-ended complex questions. D... |
A Discrete Event Simulation Model for Awarding of Works Contract in the Government – A Case Stud
Government departments procure a large variety of products and services in or carryout its normal operational responsibilities and to implement various plan policies. For effectively execution of these tasks the government... |
package pokecube.core.interfaces.capabilities.impl;
import java.util.UUID;
import java.util.logging.Level;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import pokecube.core.interfaces.PokecubeMod;
im... |
If It Took Seven Years And An Employee Confession To Reveal Intentional NSA Abuse, How Can NSA Say It Knows All Abuses?
from the how-can-anyone-take-them-seriously dept
"The assumption is our people are just out there wheeling and dealing. Nothing could be further from the truth. We have tremendous oversight over the... |
Rapid analysis of guanidino compounds in serum from nephritic patients using column-switching with isocratic elution.
The rapid method for baseline separation of ten guanidino compounds in serum from nephritic patients was designed using a single eluent with a column switching system. A porous graphitic carbon column ... |
/**
* The <code>ControlFlowInstructions</code> handles instructions related to control flow in the java byte
* code format. This includes return statements and branching, as well as transformations that need to be
* applied to re-engineer the syntax tree from the binary code format.
*/
public final class ControlFlo... |
Prime Minister Narendra Modi addresses during a function for the launch of various developmental projects, in Varanasi. (PTI)
So did prime minister Modi kill the economy by following up demonetisation with GST as many seem to be suggesting? Even if the government does not agree with former prime minister Manmohan Sing... |
/**
* @return the transpose of current matrix
*/
public SparseStringMatrix transpose() {
SparseStringMatrix tr = new SparseStringMatrix(numColumns, numRows);
tr.copyCRS(this.rowData, this.rowPtr, this.colInd);
tr.copyCCS(this.colData, this.colPtr, this.rowInd);
return tr;
... |
<gh_stars>0
//! Data and live trading API
pub mod data;
pub mod transactions;
|
The White House made clear yesterday that they oppose any independent investigation of the recent US attack on a Doctors Without Borders hospital in Kunduz, Afghanistan, and the Pentagon seems to be doubling down, ensuring that there’s not much evidence left for any independent investigators when they get through.
Doc... |
<reponame>mvhenten/ace-edit
import { createAceManager } from "./component/ace-editor";
import { createLayout } from "./component/layout";
import { createFileSystem as createMockFileSystem } from "./component/file-system/file-system-mock";
import { createFileSystem } from "./component/file-system/file-system-web";
impor... |
// discoverSMTP performs a DNS-based SMTP submission service discovery, as
// defined in RFC 6186 section 3.1. RFC 8314 section 5.1 adds a new service for
// SMTP submission with implicit TLS.
func discoverSMTP(domain string) (*url.URL, error) {
smtpsHost, err := discoverTCP("submissions", domain)
if err != nil {
r... |
<reponame>idsec-solutions/signservice-ref
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.aaasec.sigserv.sigauthsp.opensaml;
import java.util.List;
import org.joda.time.D... |
#include <llvm/Pass.h>
#include <llvm/IR/Function.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/Analysis/CallGraph.h>
#include <llvm/Analysis/LoopInfo.h>
#include <llvm/Analysis/CFG.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/ValueSymbolTable.h>
#include <llvm... |
#ifndef _LIBRE_FUNCTIONS_HPP
#define _LIBRE_FUNCTIONS_HPP
// Copyright <NAME> 2015.
// 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 <string>
#include <boost/filesystem.hpp>
#inc... |
<filename>projects/egeo/src/lib/directives/st-click-outside/st-click-outside.directive.ts
/*
* © 2017 Stratio Big Data Inc., Sucursal en España. All rights reserved.
*
* This software – including all its source code – contains proprietary
* information of Stratio Big Data Inc., Sucursal en España and
* may not be ... |
def GetXY_Segment(self, N = 100 ):
x = np.linspace(self.XYStart[0], self.XYEnd[0],N)
y = self.Line_Tan.m*x +self.Line_Tan.q
return x,y |
/**
* @brief Calculates the potential difference based on the velocity deviation.
*
* @param desire The desire of the agent.
* @param vehicle The vehicle of the agent.
* @return float The difference.
*/
float CostLinearCooperative::featureVelocityDeviation(const Desire& desire,
... |
def merge_winds_and_station_metadata(wind_table, station_metadata_table,
station_id):
error_checking.assert_is_string(station_id)
station_id_list = [station_id] * len(wind_table.index)
argument_dict = {raw_wind_io.STATION_ID_COLUMN: station_id_list}
wind_table = wind... |
#![no_main]
#![no_std]
#![feature(abi_efiapi)]
#![feature(int_roundings)]
#![feature(maybe_uninit_uninit_array)]
#![feature(maybe_uninit_slice)]
use anyhow::{anyhow, bail, Context as _, Error, Result};
use core::{arch::asm, fmt::Write, mem::MaybeUninit};
use object::{elf, read::elf::ProgramHeader as _, Endianness};
us... |
def add(self, origin, rel, target, attrs=None, index=None):
if not origin:
raise ValueError('Relationship origin cannot be null')
if not rel:
raise ValueError('Relationship ID cannot be null')
if type(attrs) != type(self._attr_cls):
attrs = self._attr_cls(at... |
/* Update VSAN properties associated with a VSAN ID */
int bcm_petra_fcoe_vsan_set(
int unit,
uint32 vsan_id,
bcm_fcoe_vsan_t *vsan)
{
return BCM_E_UNAVAIL;
} |
India Bans Film About Infamous 2012 Gang Rape
Enlarge this image toggle caption Altaf Qadri/AP Altaf Qadri/AP
India is banning a documentary about the deadly gang rape of a young woman in 2012 amid concerns over remarks made by one of her convicted rapists. The government also says it will investigate how the film cr... |
//
// SectionSViewController.h
// TableViewControllerDemo
//
// Created by kuroky on 2017/7/19.
// Copyright © 2017年 kuroky. All rights reserved.
//
#import "MXBaseTableViewController.h"
@interface SectionSViewController : MXBaseTableViewController
@end
|
<reponame>ndouglas/ReactiveNetService<gh_stars>1-10
//
// RNSDefinitions.h
// ReactiveNetService
//
// Created by <NAME> on 02/04/15.
// Released into the public domain.
// See LICENSE for details.
//
#import <Foundation/Foundation.h>
#import <ReactiveCocoa/ReactiveCocoa.h>
#import "YOLO.h"
/**
Returns an error... |
b=[100,20,10,5,1]
n=int(input())
s=0
x=n%10
if x<5:
s=s+x
elif x>5:
s=s+1+(x-5)
else:
s=s+1
n=n-x
x=n%100
n=n-x
while x>0:
s=s+1
if x>=20:
x=x-20
else:
x=x-10
s=s+(n/100)
print(int(s)) |
/* $NetBSD: dnssec.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $KAME: dnssec.c,v 1.2 2001/08/05 18:46:07 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... |
def vacuum_analyze_checkpoint(self, full=False):
logging.info("Vacuum analyzing db now")
self.execute("VACUUM ANALYZE;")
self.execute("CHECKPOINT;")
if full:
self.execute("VACUUM FULL ANALYZE;") |
def intersection_profile(H, order=None, index=False):
if index:
I, _, coldict = incidence_matrix(H, order=order, index=True)
else:
I = incidence_matrix(H, order=order, index=False)
P = I.T.dot(I)
if index:
return P, coldict
else:
return P |
/**
* Packrat parser for grammar <code>xtc.parser.PGrammar</code>.
*
* <p />This class has been generated by the <i>Rats!</i> parser
* generator, version 1.14.3, (C) 2004-2008 Robert Grimm.
*/
public final class PParser extends ParserBase {
// ====================================================================... |
class Test14 {
public static void main(String[] args) {
int x = (x=2)*2;
System.out.println(x);
int two = 2, three = two + 1;
System.out.println(three);
}
}
|
/**
* PTP 2018 BeepBoop - the RobotGame
*
* Grants access to all Tiles used in BeepBoop. Use getInstance() to get access
* to the singleton instance of TileFactory. TileFactory holds each TileId as a
* public static int.
*
* @author ptp18-d06(Pawel Rasch, Tim Runge)
*
*/
public class TileFactory {
// groun... |
<reponame>NetheriteServer/Netherite
declare module "secure-json-parse-deno/mod.js" {
function secureJsonParse(data: string): any;
// @ts-ignore
export const parse = secureJsonParse;
}
|
import path from 'path'
import Umzug from 'umzug'
import { loggingFactory } from '../logger'
import { Sequelize } from 'sequelize'
const logger = loggingFactory('db:migration')
export class Migration {
private umzugIns: Umzug.Umzug
constructor (sequelize: Sequelize) {
this.umzugIns = new Umzug({
stora... |
/** Tell card driver to stop this queue. */
static void idc_terminate_queue(void)
{
errval_t r;
INITDEBUG("idc_terminate_queue()\n");
if (!standalone) {
USER_PANIC("Terminating monolithic driver is not a good idea");
}
r = e10k_terminate_queue__tx(binding, NOP_CONT, qi);
assert(err_is_ok... |
Share. You shall ask, Tequila Works shall answer. You shall ask, Tequila Works shall answer.
After a long slumber, promising puzzle-adventure game Rime has reawakened with our month of IGN First coverage. Now that you know what the game is (click that link if you need a refersher!), we're capping the month off by givi... |
Brazilian President Luis Inacio Lula da Silva signed the “Statute of Racial Equality.” But he was the first to recognize that in achieving this legislative landmark “we didn’t get everything that we wanted” and “there is much yet to do.”
The statute, whose passage required a fight lasting ten years, recognizes the fac... |
/*
* Copyright (c) 2013 Battelle Memorial Institute
* Licensed under modified BSD License. A copy of this license can be found
* in the LICENSE file in the top level directory of this distribution.
*/
// -------------------------------------------------------------
/**
* @file se_app_module.cpp
* @a... |
// decode code to try to decode secret? copied from somewhere to help..
func decode(t *testing.T, data []byte) (runtime.Object, metav1.Object, error) {
decoder := scheme.Codecs.UniversalDecoder(corev1.SchemeGroupVersion)
r, _, err := decoder.Decode(data, nil, nil)
if err != nil {
return nil, nil, err
}
obj, err... |
def autodoc_process_docstring(app, what, name, obj, options, lines):
if not isinstance(obj, zope.interface.interface.InterfaceClass):
return
constructor = obj.get("__init__")
if not constructor:
return
obj.__init__ = constructor
return |
/**
* check_corruption - check the data area of PEB.
* @ubi: UBI device description object
* @vid_hdr: the (corrupted) VID header of this PEB
* @pnum: the physical eraseblock number to check
*
* This is a helper function which is used to distinguish between VID header
* corruptions caused by power cuts and other... |
/*
** Example: overrides
**
** This example shows using the overrides system in Metadesk to plug in a
** custom memory allocator and file loading routine. There are more options
** in the overrides than are presented here. A full list of the overrides
** options is kept in md.c 'Overrides & Options Macros'
**
** A few ... |
/**
* Called when a clan associate displays either their own or another clans information.
*
* @apiNote Alternatively called when a normal (non-associate) player views another clans information.
*
*/
public class AssociateDisplayInfoEvent extends AssociateEvent {
private final Type type;
private final Clan c;
... |
/**
* A PaymentResponse is returned when a user has selected a payment method and
* approved a payment request.
*/
public class PaymentResponse {
/**
* The payment method identifier for the payment method that the user
* selected to fulfil the transaction.
*/
@JsonProperty(value = "met... |
/* returns number of var +1, because that garanties
that var-number is never zero
maybe a bad idea
*/
int mvar_create( int id )
{
int p = mvar_alloc();
mvar_create_var( p, id );
return p;
} |
#ifndef LINEDOC_DOC_LINE_HXX_SEEN
#define LINEDOC_DOC_LINE_HXX_SEEN
#include <string>
namespace linedoc {
/// Document line type
template <typename T> struct doc_line_ {
/// The UID of the on-disk file that this line was read from
size_t fileID;
/// The line number in the on-disk file that this line correspond... |
module BlockRam1 where
import Clash.Prelude
import Clash.Explicit.Testbench
import qualified Clash.Explicit.Prelude as Explicit
zeroAt0
:: HiddenClockResetEnable dom
=> Signal dom (Unsigned 8)
-> Signal dom (Unsigned 8)
zeroAt0 a = mux en a 0
where
en = register False (pure True)
topEntity
:: Clock Sys... |
As announced previously we now have our own stable in the West Crater so we can all level up our own pet :eleni:
"Monria Prize Tickets" can now be looted through hunting! These tickets can be exchanged for prizes on display in my shop in the main hub and here. They are numbered from 1 to 20 and you have 6 months from ... |
Coffee is a high consumption export product in many Latin American countries. Consumers may be aware of the disparity between how much they pay for a cup of coffee and how much the coffee farmers in far away countries may make, but perhaps they don't realise that what they pay may be more even than their barista's hour... |
/* Do a printf-style operation on either the XML or normal output
channel, depending on the setting of VG_(clo_xml).
*/
static void emit_WRK ( HChar* format, va_list vargs )
{
if (VG_(clo_xml)) {
VG_(vprintf_xml)(format, vargs);
} else {
VG_(vmessage)(Vg_UserMsg, format, vargs);
}
} |
It is the Holy Grail of instant success as an author. The elusive grand slam home run of literary home runs. It is better – beyond – getting published, or even making a bestseller list.
It is the dream. Bigger than your highest vision of The Dream.
It is called “going viral.”
For the Luddites among us… going viral m... |
/**
* Uses the skin URL to make a custom skull
*
* @param skinURL The skin url
* @return The ItemStack
*/
public ItemStack customHeadBuild(String skinURL) {
if (!skinURL.endsWith("="))
return setCustomSkin(this, "http://textures.minecraft.net/texture/" + skinURL);
re... |
//===--- NotificationCenter.cpp -------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
// Check if output directory exists. If not, create it. Returns true if OK.
bool createDirIfNotExists(char *DirPath){
if (!DirPath){
return false;
}
DWORD dwAttr = GetFileAttributesA(DirPath);
if (!(dwAttr != 0xffffffff && (dwAttr & FILE_ATTRIBUTE_DIRECTORY))){
return CreateDirectoryA(DirPath,NULL) != 0;
}... |
# -*- Mode: Python; tab-width: 4 -*-
#
# Author: <NAME> <<EMAIL>>
# Copyright 1996, 1997 by <NAME>
# All Rights Reserved.
#
# This software is provided free for non-commercial use. If you are
# interested in using this software in a commercial context, or in
# purchasing support, please contact the author.
RCS_... |
#include "../cache.h"
#include "progress.h"
static void null_progress__update(struct ui_progress *p __maybe_unused)
{
}
static struct ui_progress_ops null_progress__ops =
{
.update = null_progress__update,
};
struct ui_progress_ops *ui_progress__ops = &null_progress__ops;
void ui_progress__update(struct ui_progres... |
/**
* Creates a <code>Properties</code> table that contains (name, value) pairs of environment
* variables settings for a given installation descriptor object.
*
* @param insdObject
* The given installation descriptor object.
* @return The <code>Properties</code> table that contains environm... |
// launchAPI launches an api server and returns clients configured to
// access it.
func launchApi(t *testing.T) (routeclientset.Interface, projectclientset.Interface, kclientset.Interface, func(), error) {
masterConfig, clusterAdminKubeConfig, err := testserver.StartTestMasterAPI()
if err != nil {
return nil, nil,... |
Updated 5:50 p.m. ET
Restore Our Future, a super PAC aiding Mitt Romney, raised $6.6 million in January to aid his presidential campaign, documents filed today show.
The super PAC spent nearly $14 million in January as it blistered Romney's GOP rivals with stinging ads during last month's caucuses and primaries. It e... |
/**
* A chunk of data from a file. AuxFileChunk is used in the transfer to and
* from remote servers.
*/
public final class AuxFileChunk implements Serializable {
private final int _chunkNumber;
private final int _chunkSize;
private final long _fileSize;
private final long _timestamp;
... |
/**
* Socket factory implementation that pools connections to one wrapped socket
* factory. Sessions are ignored on all requests. Consider wrapping with a
* {@link LazySocketFactory} for automatic checking against pooled connections
* that may have been closed.
*
* @author Brian S O'Neill
*/
public class PooledS... |
<gh_stars>0
#! /usr/bin/env python3
# -*- coding:utf-8 -*-
__author__ = ["<NAME>", "<NAME>", "<NAME>"]
import rospy
import numpy as np
import tf
import math
import cv2
from geometry_msgs.msg import Twist, Vector3, Pose
from nav_msgs.msg import Odometry
from sensor_msgs.msg import Image, CompressedImage
from cv_bridg... |
/* ----
* See if the name in data matches the variable name in
* curr. Make the string comparison case-sensive.
*/
static int NCF_ListTraverse_FoundVarNameCase( char *data, char *curr )
{
ncvar *var_ptr = (ncvar*) curr;
return strcmp(data, var_ptr->name);
} |
<reponame>bmingithub/qingcloud-csi<filename>pkg/disk/rpcserver/identityserver_test.go
/*
Copyright (C) 2019 Yunify, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
You may obtain a copy of the License in the LICENSE file, or at:
htt... |
/**
* Tests the contents of two collections to determine if they are equal. This method will return true if and only
* if all items in collection 1 are present in collection 2 and all items in collection 2 are present in collection
* 1. Furthermore, for collections that may contain duplicates (such as ... |
Steven Spielberg is the subject of a new feature-length documentary set at HBO. Directed and produced by Emmy and Peabody-winning documentarian Susan Lacy, Spielberg premieres Saturday, October 7 on HBO.
The documentary, which includes extensive interviews with Spielberg, chronicles the filmmaker’s nearly 50-year-care... |
<filename>helper_methods.py
# -*- coding: utf-8 -*-
from ryu.lib.packet import ethernet, ether_types as ether, packet
from ryu.ofproto import ofproto_v1_3 as ofp
from ryu.ofproto import ofproto_v1_3_parser as parser
import hashlib
from ryu.lib.packet import packet, ethernet, arp, vlan
#contain methods that can ... |
<reponame>dhaiducek/multicloud-operators-subscription
// Copyright 2020 The Kubernetes 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/LI... |
<gh_stars>0
import React from 'react'
import BreadcrumbsToolbar from 'client/components/BreadcrumbsToolbar'
import JobApi from 'client/ui/jobs/containers/JobApi'
import JobAllocations from './components/JobAllocations'
import { Job, JobSummary, isBedouinMeta } from 'shared/types'
type Props = {
jobSummary?: JobSumm... |
def cycle_crossover(self, parent_generation, father, mother, cnt, round_number):
dict_parent = 'GApool/generation' + str(parent_generation) + '/'
dict_child = 'GApool/generation' + str(parent_generation + 1) + '/'
father_list = self.fetch_net('../results/' + dict_parent + "astar-%04d-%02d.json" ... |
An empirical foundation for planning an emerging pedagogical method of Physical Education from the predominant learning styles
The objective of this research was to make a contribution to the process of increasing knowledge through the exploratory empirical demonstration of an emerging pedagogical theory on the planni... |
// WriteData writes a JPEG data segment, which follows a marker.
func WriteData(writer io.Writer, buf []byte) error {
len := len(buf) + 2
if len >= 2<<15 {
return errors.New(fmt.Sprintf("writeData: data is too long (%d), max 2^16 - 3 (%d)", len-2, 2<<15-3))
}
lenbuf := make([]byte, 2)
lenbuf[0] = byte(len / 256)... |
/**
* This Class was created for SimpleValueConverter on 19/12/16
* Designed and developed by Francesco Florio
* All Right Reserved.
*/
public abstract class WS {
protected static Retrofit createRetrofit(OkHttpClient okHttpClient, Executor executor, String baseUrl){
Retrofit retrofit = new Retrofit.Bu... |
def _destroy_subnets(self):
subnets = throttled_call(self.boto3_ec2.describe_subnets, Filters=self.vpc_filters())['Subnets']
for subnet in subnets:
throttled_call(self.boto3_ec2.delete_subnet, SubnetId=subnet['SubnetId']) |
<reponame>obiSerra/saasform
import { UserCredentialsEntity } from './userCredentials.entity'
describe('User Credentials entity', () => {
it('with email, should create the entity', () => {
const user = new UserCredentialsEntity('<EMAIL>')
expect(user).toBeDefined()
expect(user.credential).toBe('<EMAIL>')
... |
import { timeStamp } from 'console'
import { stringify } from 'querystring'
import { WordsApiRequest } from './wordApiRequest'
import { inject, injectable, named } from 'inversify'
export interface IWord {
id: number
letters: string[]
completed: boolean
get completedOn(): number
set completedOn(value: number... |
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<header><h1>ng-dynamic</h1></header>
<main>
<hr/>
<dynamic-html-demo></dynamic-html-demo>
<hr/>
<dynamic-cmp-demo></dynamic-cmp-demo>
</main>
`,
})
export class AppComponent {
} |
package ru.sbtqa.tag.pagefactory.web.aspects;
import org.aeonbits.owner.ConfigFactory;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.openqa.selenium.WebDriver;
import org.openqa.... |
<reponame>rustors/leetcode<filename>src/bin/find-the-difference.rs
fn main() {}
struct Solution;
impl Solution {
pub fn find_the_difference(s: String, t: String) -> char {
let mut h = vec![0u8; 26];
for i in s.bytes() {
h[(i - b'a') as usize] += 1;
}
for i in t.bytes(... |
def close(self):
stream = self._stream
if stream is None:
return
self._stream = None
stream.close() |
Image caption Josh Hill was diagnosed with a form of leukaemia
Primary school children with cancer are being bullied, losing friends and missing out on their education, a survey by a cancer charity suggests.
Clic Sargent said its interviews with more than 200 families raised concerns about how schools supported pupil... |
def add_other_meta_data(self, other: _MetaData) -> None:
for key in other._meta_data_dict.keys():
self.add_data(key, other._meta_data_dict[key]) |
NP213 (Novexatin®): A unique therapy candidate for onychomycosis with a differentiated safety and efficacy profile
Abstract NP213 (Novexatin®) is a novel antifungal peptide specifically designed for the topical treatment of onychomycosis. NP213 was designed using host defense peptides (HDP), essential components of th... |
# coding: utf-8
'''
Top-level statement objects.
'''
from .ast import deproxy, nodeify
from .joins import Join
# TODO: Constructor docs.
class Statement:
'''The top-level AST node type, which must facilitate value collection.'''
def write(self):
'''Return an SQL, value list tuple of this statement's serializati... |
def wait_for(*args, loop=None):
return gather(*[FullyResolved(wrap_in_future(a, loop=loop)) for a in args]) |
<reponame>copslock/broadcom_cpri<filename>sdk-6.5.20/src/soc/ltsw/config.c<gh_stars>0
/*! \file config.c
*
* Configuration management.
* This file contains yaml event callback and database for configuration.
*/
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/Op... |
import sys
from shapely.geometry import Polygon, LineString
from .profile import Profile
@Profile.hookspec
def upper_contour_line(profile: Profile) -> LineString:
"""Upper bounding contour line of the profile."""
@Profile.hookspec
def lower_contour_line(profile: Profile) -> LineString:
"""Lower bounding c... |
/**
* Represents an unresolved method within a type, including
* its original obfuscated name and signature/mapped name.
*/
static class UnresolvedMethod {
private final String obfuscatedName;
private final String argument;
public UnresolvedMethod(String a, String b) {
... |
Cubosomes for Enhancing Intestinal Absorption of Fexofenadine Hydrochloride: In situ and in vivo Investigation
Purpose The aim of this work was to probe cubosomes for enhanced intestinal absorption and oral bioavailability of poorly absorbable fexofenadine HCl (FEX-HCl). Materials and Methods Two cubosomal systems wer... |
<reponame>Holdrick/TakeTwo-WebAPI
from couchdb.client import Document
from couchdb.client import Row
from unittest.mock import MagicMock
def getRow(flaggedString, category, info):
firstDoc = Document()
firstDoc["flagged_string"] = flaggedString
firstDoc["category"] = category
firstDoc["info"] = inf... |
import * as React from 'react';
import { Prompt } from "react-router";
import { FormikActions, FormikProps, FormikErrors } from 'formik';
import { History } from 'history';
import flat from 'flat';
import ListingFormNavContainer from './ListingFormNav.container';
import GeneralWrapper from 'components/GeneralWrapper';... |
//Shade of Jindo
class mob_shade_of_jindo : public CreatureScript
{
public:
mob_shade_of_jindo()
: CreatureScript("mob_shade_of_jindo")
{
}
struct mob_shade_of_jindoAI : public ScriptedAI
{
mob_shade_of_jindoAI(Creature *c) : ScriptedAI(c) {}
... |
# Third-party libraries
from time import perf_counter
import tensorflow as tf # 1.15
import numpy as np
import os
# Modules
from figures import fields_fig_out, cost_fig_out, dev_fig_out, one_dim_fig_out, q_fig_out, q_dev_fig_out, sep_q_fig_out
from inout import set_paths, write_tec_var
from data_loade... |
def p2p_download_end(self, data_size):
t = self.now()
self.current_p2p_exchanges -= 1
self.p2p_downloading.insert_or_update(t, self.current_downloading)
self.p2p_downloaded_data += data_size |
#include <stdint.h>
#include <stddef.h>
#include "libc.h"
/*
* Compares two strings `s1` and `s2` and returns the diffence between the first
* characters that differ.
*/
int strcmp(const char *s1, const char *s2)
{
// The index of the current byte
size_t i;
// The length of `s1`
size_t l1;
// The length of `s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.