content stringlengths 10 4.9M |
|---|
package com.sxdsf.deposit.service.memory.write.impl;
import com.sxdsf.deposit.service.Call;
import com.sxdsf.deposit.service.Callback;
import com.sxdsf.deposit.service.disk.DiskService;
import com.sxdsf.deposit.service.memory.MemorySave;
import com.sxdsf.deposit.service.memory.Time;
import com.sxdsf.deposit.service.me... |
//end of the function AAS_ClearShownPolygons
//===========================================================================
//
// Parameter: -
// Returns: -
// Changes Globals: -
//===========================================================================
void AAS_ShowPolygon(int color, int numpoints, vec3_t *p... |
Gut Microbiota and Their Metabolites in Stroke: A Double-Edged Sword
Besides damaging the brain, stroke causes systemic changes, including to the gastrointestinal system. A growing body of evidence supports the role of the gut and its microbiota in stroke, stroke prognosis, and recovery. The gut microbiota can increas... |
/**
* Install.
*
* @param context the context
* @param apkPath the apk path
* @param receiver the receiver
*/
public static void install(Context context, String apkPath, Class<?> receiver) {
PackageManager pm = context.getPackageManager();
PackageInstaller packageInstalle... |
def WithDiagnostics(ifilename, norm, reader, fp):
index = 0
for index, record in enumerate(norm(reader)):
if norm.total % 100000 == 0:
print('... kept {kept} of {total} or {perc:2}% so far'
.format(kept=norm.total - norm.discarded,
total=norm.total... |
/**
* Provides caching of Reflection calls.
*
* @author Stefan Siegl
*/
public class ReflectionCache {
/**
* The logger of this class. Initialized manually.
*/
private static final Logger LOG = LoggerFactory.getLogger(ReflectionCache.class);
/**
* Cache that holds the {@link Method} instances for the Cla... |
<gh_stars>0
import Modoo from '../../../supports/base_models/modoo';
import {Redis} from '../../../supports/helpers/redis';
export class UsersModel {
private redis = new Redis();
private address_fields = [
'x_details_address', 'x_partner_id',
'x_name', 'id', 'x_receive_address',
... |
package com.github.messenger4j.send.message.quickreply;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* @author <NAME>
* @since 1.0.0
*/
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UserEmailQuickReply extends QuickReply {
private UserEmailQuickReply() {
super... |
def path_integrate(velocity):
return np.vstack((np.zeros((1, velocity.shape[1])), np.cumsum(velocity, axis=0))) |
/**
* Factory method which creates a new singleton {@link SimulationConfig} instance.
* {@link SimulationConfig} instances are bound to their configuration paths. If the
* configuration path does differ from the existing singleton instance, a new object will be
* created with the configuration path given, a... |
Supervisory and Energy Management System of large public buildings
Buildings are important contributors to energy consumption accounting for around one-third of energy consumed in cities, where large public buildings are the dominant energy consumers and energy consumption might be significantly decreased through Buil... |
<gh_stars>10-100
/*
Copyright 2021 JFrog 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 applicable law or a... |
<reponame>festivent/app<filename>src/models/responses/api-response.ts
export interface ApiResponse {
data: any
} |
<filename>src/net/demilich/metastone/game/cards/concrete/priest/CabalShadowPriest.java
package net.demilich.metastone.game.cards.concrete.priest;
import net.demilich.metastone.game.actions.BattlecryAction;
import net.demilich.metastone.game.cards.MinionCard;
import net.demilich.metastone.game.cards.Rarity;
import net.... |
/**
* Custom exception handler
*
* */
@ControllerAdvice
@RestController
public class CustomizedResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
/**
* @Description: Handler for Internal server errors response
*
* */
@ExceptionHandler(Exception.class)
public final ResponseEntity<Erro... |
#include<iostream>
#include<bits/stdc++.h>
#define ll long long int
#define fo(i,a,b) for( i=(ll)a;i<(ll)b;++i)
#define loopr(i,a,b) for(int i=(int)a;i>=(int)b;--i)
#define pb push_back
#define mset(a,b,c) loop(i,0,b) a[i]=c
#define F ... |
/**
* Unit tests for the {@link RegisterLotViewModel} class.
*/
@RunWith(AndroidJUnit4.class)
public class RegisterLotViewModelTest extends InstantTaskRuler {
// Valid attributes
String validOperatorMobileNumber = "99999999";
Integer validLotCapacity = 30;
String validLotName = "Name";
LatLng val... |
// @HEADER
// ****************************************************************************
// Tempus: Copyright (2017) Sandia Corporation
//
// Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
// ****************************************************************************
// @... |
Seroprevalence of SARS-CoV-2 Assessed by Four Chemiluminescence Immunoassays and One Immunocromatography Test for SARS-Cov-2
The onset of the new SARS-CoV-2 coronavirus encouraged the development of new serologic tests that could be additional and complementary to real-time RT-PCR-based assays. In such a context, the ... |
// Don't change mode_, let caller do that
void ROVNode::stop_mission()
{
if (auv_mode()) {
mission_client_->async_cancel_all_goals();
RCLCPP_INFO(get_logger(), "canceling all goals");
}
} |
package seedu.volant.testutil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import seedu.volant.home.model.TripList;
import seedu.volant.home.model.trip.Trip;
/**
* A utility class containing a list of {@code Trip} objects to be used in tests.
*/
public class TypicalTrips {
publ... |
// information from the jar/car file itself.
private Module searchJars(String name, String version) {
if(overrides != null){
ArtifactContext ctx = new ArtifactContext(name, version);
ArtifactContext replacement = overrides.replace(ctx);
if(replacement != null)... |
/// Construct a new uninitialized `Image` with the specified properties.
///
/// # Panics
///
/// This function will panic if [`UninitImage::try_new_2d()`] returns an error.
pub fn new_2d(
width: usize,
height: usize,
channels: usize,
space: ColorSpace,
interleaving: bool,
) ... |
THE EFFECT OF SODIUM CHLORIDE ON THE DENITRIFICATION OF SALINE FISHERY WASTEWATERS
Abstract The effect of sodium chloride concentration (0.47–100 g l−1) on the rates of nitrate and nitrite reduction was studied at 37°C and pH 7.5 in a batch reactor fed with a mixture (v/v) of salmon bloodwater and synthetic substrate ... |
def to_dict(self) -> dict[str, bool | list[int] | list[str]]:
payload: dict[str, bool | list[int] | list[str]] = {
"everyone": self.everyone,
"replied_user": self.replied_user,
}
parse: list[str] = []
if self.roles is True:
parse.append("roles")
... |
// This function is named ExampleBuild()
// it with the Examples type.
func ExampleBuild() {
s := Build("jeffotoni", " test example ", 2021)
fmt.Println(s)
} |
The prosody of rhetorical vs. information-seeking questions in Icelandic
This paper reports on a production experiment investigating the prosodic realization of rhetorical questions (RQs) as compared to information seeking questions (ISQs) in Icelandic. It looks at two question types: polar questions ( Borðar einhver ... |
// Check if a given position is under attack from any of
// the previously placed queens (check column and diagonal positions)
bool check_place(int *positions, int ocuppied_rows, int column) {
for(int i = 0; i < ocuppied_rows; ++i) {
if(positions[i] == column || positions[i] - i == column - ocuppied_rows ||... |
package org.fredy.jugen.core;
import java.util.ArrayList;
import java.util.List;
/**
* @author fredy
*/
public class JavaObjectInfo {
private String packageName;
private String className;
private List<String> publicMethods = new ArrayList<String>();
public String getPackageName() {
return ... |
<reponame>UNCAMotorsports/UNCAMotorsports-2017
/* GENERATED CODE -- CHANGES WILL BE OVERWRITTEN */
#include "cytypes.h"
#if (!CYDEV_BOOTLOADER_ENABLE)
#if defined(__GNUC__) || defined(__ARMCC_VERSION)
__attribute__ ((__section__(".cyloadermeta"), used))
#elif defined(__ICCARM__)
#pragma location=".cyloadermeta"
#el... |
package nc.multiblock.qComputer.block;
import nc.enumm.IBlockMetaEnum;
import nc.multiblock.block.BlockMultiblockMetaPart;
import nc.tab.NCTabs;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.util.IStringSerializable;
public abstract class BlockQ... |
/**
* place the semmantic action in the rule of the grammar
* @param c
* semantic action
* @param cell
* rule where it will be placed
*/
public void accSeman(String c,Object cell){
String array[] =c.split("//");
System.out.println(array[1]);
Graf... |
/**
* Created by fengfeng on 2020/9/21.
*/
@Data
public class ReturnResponse extends ResBase {
private String coupon_code;
protected String order_no;
protected String txn_time;
public void makeSign() {
StringBuffer sb = new StringBuffer();
sb.append("coupon_code=").append(this.cou... |
/**
* Tests the hash calculation for a payer-new transaction.
*/
@Test
public void payerNewHashGenerationTest() {
Payer payer = new Payer()
.addRef(PAYER_NEW_PAYER_REF);
PaymentRequest request = new PaymentRequest().addType(PaymentType.PAYER_NEW).addTimeStamp(PAYER_NEW_TIME... |
A man holds a sign at a rally in front of City Hall to show support for a paid sick leave bill, a day after New York City Council Speaker Christine Quinn announced that lawmakers and advocates reached a deal on the legislation. - Spencer Platt/Getty Images
Listen To The Story Marketplace Embed Code <iframe src="https:... |
<filename>java/GridMapGL/src/main/java/com/fmsz/gridmapgl/slam/SLAM.java
/*******************************************************************************
* Copyright 2018 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
// Generated by github.com/temporalio/temporal-aws-sdk-generator
// from github.com/aws/aws-sdk-go version 1.35.7
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
package migrationhubstub
import (
"github.com/aws/aws-sdk-go/service/migrationhub"
"go.temporal.io/sdk/workflow"
"go.temporal.io/... |
<gh_stars>0
package main
import (
"errors"
"fmt"
"strings"
"github.com/containers/image/transports"
"github.com/containers/image/transports/alltransports"
"github.com/urfave/cli"
)
func deleteHandler(c *cli.Context) error {
if len(c.Args()) != 1 {
return errors.New("Usage: delete imageReference")
}
ref, ... |
<filename>front/src/app/entity/enum/route-enum.ts<gh_stars>0
export enum RouteEnum {
HOME = '',
NEWS = 'whats-up',
CONTACT = 'contact',
}
export interface Route {
key: string,
value: string,
}
|
/**
* Handles a RESTCONF POST operation against a data resource. If the
* operation is successful, HTTP status code "201 Created" is returned
* and there is no response message-body. If the data resource already
* exists, then the HTTP status code "409 Conflict" is returned.
*
* @param uri... |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = (int)1e9 + 7;
typedef long long LL;
int xx[maxn];
int pp[maxn], len;
char ch[maxn];
void init()
{
xx[0] = 1;
for (int i = 1; i < maxn; i++)
xx[i] = (1ll * xx[i - 1] * 10) % mod;
... |
def update(client, label, name):
label = Label.lookup(client, label)
if name:
label.update(attributes={
'name': name
})
label = Label.find(client, label.id, include=label_includes)
Label.display(client, [label], include=label_includes) |
// Package sig implements token signing and verification for Biscuit.
package sig
// Based on https://github.com/CleverCloud/biscuit-rust/blob/master/src/crypto/mod.rs
import (
"crypto/rand"
"crypto/sha512"
"errors"
"io"
r255 "github.com/gtank/ristretto255"
)
// GenerateKeypair generates a new keypair. If rng ... |
/**
* <b>GIVEN:</b>
* <ul>
* <li>Repo A and path P</li>
* </ul>
*
* <b>WHEN:</b>
* <ul>
* <li>Retrieve the P from A through Folo trackingId</li>
* <li>Seal the trackingId</li>
* <li>Get the download records by trackingId</li>
* </ul>
*
* <b>THEN:</b>
* <ul>
* <li>The download record c... |
def GetGsutilClientIdAndSecret():
if InvokedViaCloudSdk() and CloudSdkCredPassingEnabled():
return (
'32555940559.apps.googleusercontent.com',
'ZmssLNjJy2998hD4CTg2ejr2')
return (
'909320924072.apps.googleusercontent.com',
'p3RlpR10xMFh9ZXBS/ZNLYUu') |
//
// Created by amarko on 22.7.19..
//
#ifndef SAFEX_SAFEX_ACCOUNT_H
#define SAFEX_SAFEX_ACCOUNT_H
#include <string>
#include <cryptonote_basic/cryptonote_basic.h>
#include "device/device.hpp"
#include "crypto/crypto.h"
#include "serialization/keyvalue_serialization.h"
#include "safex_core.h"
#undef SAFEX_DEFAUL... |
Bethesda has unleashed a new set of Elder Scrolls V: Skyrim details upon the public, providing information on its combat system. Admitting that the previous games felt like you were fighting with "chopsticks", the developer says that we'll be getting a deeper, more robust brawling experience this time.
The more I hear... |
/// Encode the decoded bytes into Base64
fn bytes_to_base64(decoded_bytes: &[u8]) -> String {
let mut output = String::new();
let alphabet: Vec<_> =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".chars().collect();
for chunk in decoded_bytes.chunks(3) {
let c0 = chunk[0]... |
<reponame>roryfinn3/barista
import { Logger } from '@nestjs/common';
export async function unarchiveFile(filePath: string, targetDir: string = null, options: any = { noDirectory: true }) {
if (targetDir) {
options.targetDir = targetDir;
}
const logger = new Logger('unarchiveFile');
const decompress = requ... |
Recent advances in polymeric biomaterials-based gene delivery for cartilage repair
Untreated articular cartilage damage normally results in osteoarthritis and even disability that affects millions of people. However, both the existing surgical treatment and tissue engineering approaches are unable to regenerate the or... |
<filename>eris/eris-typescript/src/Bot.ts
import Eris from 'eris';
import { AxonOptions } from 'axoncore';
import Client from './Client';
import botConfig from './configs/config.json';
import secret from './configs/secret.json';
import lang from './configs/lang.json';
import MyUtils from './MyUtils';
const axonOpt... |
import isEmpty from "./isEmpty"
export default (val: any, type: any): any => {
const typeOf = typeof val
if (type === Object && val instanceof Array) return {...val}
if (type === Array && val instanceof Object) return Object.values(val)
if (!isEmpty(val) && val instanceof type) {
return val
} else {
... |
import React, { SVGProps } from 'react';
import generateIcon from '../../generateIcon';
const SolidAudioDescription = (props: SVGProps<SVGSVGElement>) => {
return (
<svg viewBox="0 0 512 512" width="1em" height="1em" {...props}>
<path d="M162.925 238.709l8.822 30.655h-25.606l9.041-30.652c1.277-4.421 2.651-... |
/**
* FFCFragmentActivity
* <p/>
* Base FragmentActivity for use overall project. this class was implemented
* TrackingCallback of TrackingFragmneActivity(in Security package). So, all
* activity extends this class will automatic track user.
* <p/>
* Them, if user leave from application more than defined time. S... |
Major League Soccer’s worst kept secret was its interest in Atlanta. As Don Garber’s reflex response goes, the league has been interested in the city for over a decade. Not only does it give MLS a coveted spot in the abandoned Southeast, but it represents a location that hasn’t failed before. Going into Florida? There’... |
// Length returns length of single linked list starting from n
func (n *Node) Length() int {
count := 0
for node := n; node != nil; {
if node != nil {
count++
}
node = node.Next
}
return count
} |
<reponame>woyelaishishiba/DragDropListView
package cc.solart.dragdroplistview.sample;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController... |
/**
* Created by zhang.shaolong on 2018/5/4.
*/
public class JsonRpcWeb3j extends JsonRpc2_0Web3j {
private JsonRpcEth jsonRpcEth;
private long blockTime;
private ScheduledExecutorService scheduledExecutorService;
public JsonRpcWeb3j(Web3jService web3jService) {
super(web3jService);
... |
#ifndef RENDERER_H
#define RENDERER_H
#include <QElapsedTimer>
#include <QCursor>
#include <QStack>
#include <QDebug>
#include <cmath>
#include "../math/matrix4.h"
#include "../helpers/utils.h"
#include "../core/texturecube.h"
#include "../materials/materialbasic.h"
#include "../materials/materialshadow.h"
#include... |
Homeless Jesus sculpture coming to Austin Copyright by KXAN - All rights reserved Video
AUSTIN (KXAN) -- Picture the image of Jesus sleeping on a bench on a downtown Austin sidewalk. The pastor of an Austin Presbyterian church worked to bring the unique form of art that is meant to highlight the plight of the homeless... |
<reponame>y18810919727/Control_Exp1001
#!/usr/bin/python
# -*- coding:utf8 -*-
import numpy as np
import math
import Control_Exp1001 as CE
import os
import json
EXP_NAME = "None"
def _init():
global EXP_NAME
EXP_NAME = "None"
def get_exp_name():
return EXP_NAME
def set_exp_name(new_exp_name):
globa... |
from typing import Union
from codegen.ast import *
from codegen.operands import *
import architecture
# Convenient statement constructors
def add(src: Union[Operand, int], dest: Register, comment: str = None, additional: Register = None):
stmt = AddStmt()
stmt.src = src if isinstance(src, Operand) else archi... |
/**
* Verifies that a new daemon thread with the passed name and lowest priority will be created.
*/
@Test
public void newThread() {
Runnable runnable = mock(Runnable.class);
Thread thread = new NamedDaemonThreadFactory("foo").newThread(runnable);
assertThat(thread).isNotNull();
assertThat(thread.getName()... |
Did you know that lacrosse is the official summer sport of Canada? Well it is. (I'll give you one guess for the winter sport.) But something tells me that Canada's population of idle kids, teenagers, and twenty-somethings won't be playing much this week, since Pokémon GO was just released in the Great White North. Play... |
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
#define all(x) (x).begin(... |
import { Func } from './Func';
import { ViewManager } from '../GUI/View/ViewManager';
export class UtilTool
{
public static DesignWidth: number = 1280;
public static DesignHeight: number = 720;
public static HalfDesignWidth: number = UtilTool.DesignWidth / 2.0;
public static HalfDesignHeight: number =... |
<reponame>crafn/revolc
#include "armature.h"
#include "clip.h"
#include "core/array.h"
#include "core/memory.h"
#include "global/env.h"
#include "resources/resblob.h"
Armature *clip_armature(const Clip *c)
{
return (Armature*)res_by_name( c->res.blob,
ResType_Armature,
c->armature_name);
... |
def list(self, filter=ACTIVE | INACTIVE):
labels = list()
try:
labels.extend(self._domain.list(filter))
except DomainManagerError as e:
raise IrmaMachineManagerError(e)
return labels |
def plot_multiple_error_grids(datas, titles, as_log=True, gradient_arrow=False,
vmin=None, vmax=None, contours=0,
save_as=None, show=False):
if not (show or save_as):
return
ncols = len(datas)
figsize = (4*ncols, 2)
fig, axes = plt.su... |
export interface HalfScreenProps {
showClose?: boolean
showMore?: boolean
subtitle?: string
title?: string
visible: boolean
['onUpdate:visible']: (event: Event) => void
}
export const halfScreenProps = {
showClose: {
type: Boolean,
default: true
},
showMore: Boolean,
subtitle: {
type: S... |
<gh_stars>1-10
use log::{debug, error};
use yew::prelude::*;
use libchordr::prelude::{ListEntryTrait, SongId, SongSettings};
use crate::state::SongInfo;
#[derive(Properties, Clone)]
pub struct SongNotesProps {
pub on_change: Callback<(SongId, SongSettings)>,
pub song_info: SongInfo,
}
impl PartialEq for Son... |
<reponame>Malekhy/ws2122-lspm
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py 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... |
/**
* Calculates a quare root of array elements.
*
* The functions "sqrt" calculate a square root of each source array element. In
* case of multi-channel arrays, each channel is processed independently. The
* accuracy is approximately the same as of the built-in "std.sqrt".
*
* @para... |
Altered Cell Microfibrillar Orientation in Ethylene-treated Pisum sativum Stems.
The roots and stems of plants typically swell when they are exposed to ethylene (1-3, 5, 8), or supraoptimal auxin (2, 3, 5, 8, 20), and root hairs are induced to form (1, 5, 6, 8). When supraoptimal IAA causes pea subapical stem sections... |
def no_op(num_steps: int = 20,
step_duration: float = 0.5,
fail_before: bool = False,
fail_after: bool = False,
error_type: str = 'Value',
monitor: Monitor = Monitor.NONE) -> bool:
import time
with monitor.starting('Computing nothing', num_steps):
if fai... |
import java.util.Scanner;
public class CFEcr108Div2 {
static public void main(String args[]){
//System.out.println(Integer.MAX_VALUE);
//System.out.println(Integer.MAX_VALUE*Integer.MAX_VALUE);
//System.out.println(1000000000*1000000000);
Scanner sc = new Scanner(System.in);
... |
def test():
assert (
len(pattern1) == 2
), "El número de tokens en pattern1 no concuerda con el número real de tokens en el string."
assert (
len(pattern2) == 2
), "El número de tokens en pattern2 no concuerda con el número real de tokens en el string."
# Pattern 1 validation
ass... |
package main
import (
"fmt"
"regexp"
"strings"
"github.com/ChicoCodes/twitchbot/commands"
"github.com/ChicoCodes/twitchbot/messages"
)
// matchReply creates a subscriber that replies with the given text if the
// incoming message matches the provided regular expression.
func matchReply(re *regexp.Regexp, respon... |
// GetSpans returns the current in-memory stored spans.
func (imsb *InMemoryExporter) GetSpans() []*trace.SpanSnapshot {
imsb.mu.Lock()
defer imsb.mu.Unlock()
ret := make([]*trace.SpanSnapshot, len(imsb.ss))
copy(ret, imsb.ss)
return ret
} |
// submission.cpp
bool sample() {
return true;
} |
<gh_stars>0
import { Component, Input, OnInit } from '@angular/core';
import { Workflow } from 'src/app/models/workflow.model';
import { AppService } from 'src/app/utils/services/app.service';
declare var $: any;
@Component({
selector: 'rocrate-logo',
templateUrl: './rocrate-logo.component.html',
styleUrls: ['.... |
import Data.List
main = do
str1 <- getLine
str2 <- getLine
if str1 == (reverse str2) then
putStrLn "YES"
else
putStrLn "NO" |
import { ScheduleTime } from "./scheduleTime.model";
import { Owner } from "../owner/owner";
import * as moment from 'moment';
export class Schedule {
id: number;
day: moment.Moment;;
time: ScheduleTime;
owner: Owner
constructor(day, owner, time){
this.day = day;
this.owner = own... |
#ifndef amici_symbolic_functions_h
#define amici_symbolic_functions_h
namespace amici {
/**
* C implementation of log function, this prevents returning NaN values for
* negative values
*
* @param x argument
* @return if(x>0) then log(x) else -Inf
*
*/
double log(double x);
/**
* C implementation of matlab fu... |
def from_signature(cls, signature, ctx):
return cls(
name=signature.name,
param_names=signature.param_names,
varargs_name=signature.varargs_name,
kwonly_params=signature.kwonly_params,
kwargs_name=signature.kwargs_name,
defaults=signature.defaults,
annotations... |
Graduating Social Work Students’ Perspectives on Domestic Violence
This article reports the findings of a qualitative study that examined 124 social work students’ views on the causes and dynamics of domestic violence and their recommended interventions in a case scenario. Most students graduated from the master of so... |
/**
* Setup drawing state. State changed by this method must be restored in
* endDrawing.
*
* @param dc Active draw context.
*/
protected void beginDrawing(DrawContext dc) {
GL2 gl = dc.getGL().getGL2();
int attrMask = GL2.GL_CURRENT_BIT | GL2.GL_COLOR_BUFFER_BIT;
gl.gl... |
// New returns a new secret lock service that uses AWS to encrypt keys.
func New(keyURI string, provider awsProvider) (secretlock.Service, error) {
region, err := getRegion(keyURI)
if err != nil {
return nil, err
}
sess, err := provider.NewSession(region)
if err != nil {
return nil, err
}
kms, err := provide... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
<commit_msg>Add a friendly mkdir() function.
<commit_before>
import os, shutil
def print_warning(message, *args, **kwargs):
import colortext
if args or kwargs: message = message.format(*args, **kwargs)
colortext.write(message, color='red')
def print_error_and_die(message, *args, **kwargs):
print_warni... |
package regression_test
import (
"testing"
"github.com/VKCOM/noverify/src/linttest"
)
func TestIssue26_1(t *testing.T) {
// Test that defined variable variable don't cause "undefined" warnings.
test := linttest.NewSuite(t)
test.AddFile(`<?php
function issetVarVar() {
$x = 'key';
if (isset($$x)) {
$_ = $... |
def line_qubit_from_proto_id(proto_id: str) -> cirq.LineQubit:
try:
return cirq.LineQubit(x=int(proto_id))
except ValueError:
raise ValueError(f'Line qubit proto id must be an int but was {proto_id}') |
<filename>baekjoon/10971.cpp
#include <iostream>
using namespace std;
int N;
int w[10][10];
bool isVisited[10];
double minw = 10e9;
void dfs(int depth, int start, int cur, double cur_sum){
if (depth == N && start == cur){
if (minw > cur_sum) minw = cur_sum;
}
for (int i = 0 ; i < N ; i++){
... |
/*
BSD 3-Clause License
Copyright (c) 2017, Alibaba Cloud
All rights reserved.
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 copyright notice, this
list of conditi... |
<filename>src/test/mocks/mockTabBoxItems.ts
import { TabboxItems } from '../../types';
const mockTabBoxItems: TabboxItems = [
{
button: {
label: 'Readme',
selected: true,
},
content: (): string => 'Readme content',
emptyMessage: 'No readme',
id: 'readme',
},
{
button: {
... |
package com.xiangxu.vrvideo;
/**
* Created by xuxiang on 2016/9/8.
*/
public class AppConfig {
public static boolean isDebug = true; // turn off when release
public static final int MAX_CACHE_AGE = 3600 * 12; // 12 hours
public static final long RESPONSE_CACHE_SIZE = 10240000; // 10 MB
publ... |
import re
import unittest
from urlparse import urlsplit, urlunsplit
from xml.dom.minidom import parseString, Node
from django.conf import settings
from django.core import mail
from django.core.management import call_command
from django.core.urlresolvers import clear_url_caches
from django.db import transaction, connec... |
<filename>src/main/java/be/looorent/micronaut/security/TokenParserImpl.java
package be.looorent.micronaut.security;
/**
* Wraps the logic to verify & parse a JWT and returns its content.
*/
import io.jsonwebtoken.*;
import io.micronaut.context.annotation.Value;
import org.slf4j.Logger;
import org.slf4j.LoggerFacto... |
/**
* The implementation of the pdf rectangle data type.
* <p>
* <p>
* The specification of the data type is found in [PDF} chapter 3.8.3.
* </p>
* <p>
* <p>
* <p>
* <pre>
* A rectangle is defined by
* [llx, lly, urx, ury ]
* where
* llx = lower... |
Narrative Configuration: Some Notes on the Workings of Hindsight
In this paper I analyze the role of hindsight in narrative configuration. Configuration means the grasping together of disparate elements into a coherent whole. I argue that hindsight, importantly, brings the temporal constraints on what we can know to t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.