content stringlengths 10 4.9M |
|---|
Spain’s Garbine Muguruza won Grand Slam #2, and her first Slam at Wimbledon 7-5 6-0 over Venus Williams, a surprising result given Venus was likely a slight favorite at the start, and a closer match was certainly expected. The 23 year old Muguruza likely has more slams in her future, her all court game was on display a... |
<gh_stars>0
import {EdmMapping,EdmType} from '@themost/data/odata';
import StructuredValue = require('./structured-value-model');
/**
* @class
*/
@EdmMapping.entityType('ElectionSpecification')
class ElectionSpecification extends StructuredValue {
public minimumSelection?: number;
public maximumSelection?: ... |
// Draw a series of diagonal lines across a square canvas of width/height of
// the length requested. The lines will start from the top left corner to the
// bottom right corner, and move from left to right (at the top) and from right
// to left (at the bottom) until 10,000 lines are drawn.
//
// The resulting image wi... |
/**
* Returns whether the result of the check is considered secure or not.
*
* @return whether the result of the check is considered secure or not
*/
public boolean isSecure() {
boolean retVal = delegate.passed();
if (deviceCheck.secureWhenFalse) {
... |
“WE WERE selling $1m a year in merchandise with the company logo on it,” says Erik Prince with a mixture of nostalgia and defiance. Blackwater, the company in question, rose to worldwide prominence as an outsourced branch of the American army during the occupation of Iraq and Afghanistan. It had plenty of admirers for ... |
Pretesting mHealth: Implications for Campaigns among Underserved Patients.
BACKGROUND
For health campaigns, pretesting the channel of message delivery and process evaluation is important to eventual campaign effectiveness. We conducted a pilot study to pretest text messaging as a mHealth channel for traditionally unde... |
Bandai Namco has announced free DLC will be available in the European eShop for both 3DS and Wii U versions of One Piece Unlimited World Red. The action adventure title – which is based on the popular manga series – was released just last week for Nintendo platforms and, in order to celebrate the game’s launch, Bandai ... |
import React from 'react'
import { StyleSheet, View } from 'react-native-web'
export const Button = (props) => (
<View
style={[
sheet.button,
props.isEven ? sheet.blue : sheet.red,
props.isEven ? sheet.size1 : sheet.size2,
props.style,
]}
>
{props.children}
</View>
)
const sh... |
<reponame>Xemrion/Exam-work<filename>OilSpillage/UI/Elements/ItemSlot.cpp<gh_stars>1-10
#include "ItemSlot.h"
#include "../../game.h"
#include <cassert>
#include "../UserInterface.h"
Vector2 ItemSlot::size = Vector2(100, 100);
void ItemSlot::addTextbox()
{
if (this->showTextBox)
{
this->textBox = std::make_unique... |
<filename>packages/table-react/src/ExpandableTableRowController.tsx
import React, { forwardRef } from "react";
import cx from "classnames";
import { ExpandButton } from "@forbrukerradet/jkl-expand-button-react";
import type { TableCellProps } from "./TableCell";
import { TableCell } from "./TableCell";
import { useTabl... |
def add_child(self, instance):
assert isinstance(instance, Module) or isinstance(instance, Gate)
assert instance.id not in self.children
instance.parent = self
self.children[instance.id] = instance |
/**
* Created by Administrator on 2015/11/5.
*/
public class OjalgoUtils {
public static Matrix computeHTWHInv(Matrix HH, Matrix WWInv) {
MatrixStore<Double> hhoj = la4jMatrixToMatrixStore(HH);
MatrixStore<Double> wwinvoj = la4jMatrixToMatrixStore(WWInv);
MatrixStore<Double> res = hho... |
<gh_stars>1-10
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMessageBox
from lib.currencies impo... |
<filename>ds/netapi/svcdlls/wkssvc/server/wsdfs.c
//+----------------------------------------------------------------------------
//
// Copyright (C) 1996, Microsoft Corporation
//
// File: wsdfs.c
//
// Classes: None
//
// Functions: DfsDcName
//
// History: Feb 1, 1996 Milans Created
... |
"""Python adventure game prototype."""
class Room(object):
"""Room class object."""
def __init__(self):
"""Initialization of Room object."""
self.name = 'Room'
self.desc = 'Description'
self.nsew = [None, None, None, None]
self.updown = [None]
self.visited = Fa... |
Cambridge officials received hundreds of submissions from residents hoping to make their mark as literary legends through the city’s first-ever “Sidewalk Poetry” contest this spring.
In the end, only five scribes emerged victorious.
In March, the city put out a call for poets to participate in the project. Winners we... |
//Uint64Ptr cast field pointer to *uint64
func (f *Field) Uint64Ptr(structPtr unsafe.Pointer) *uint64 {
result := AsUint64AddrPtr(f.Pointer(structPtr))
if result == nil {
return nil
}
return *result
} |
/**
* Created by Niko on 3/17/16.
*/
public class Message {
String mBody;
long mDate;
boolean mIncoming;
public Message(){
switch (new Random().nextInt(9)){
case 0:
mBody = "This game is so fun";
break;
case 1:
mBody = "... |
def link_tags(doc, parse_full=False):
if parse_full:
soup = BeautifulSoup(doc, "html.parser")
links = soup.find_all("a")
else:
only_a_tags = SoupStrainer("a")
links = BeautifulSoup(doc, "html.parser", parse_only=only_a_tags)
return links |
/*
* add resource records to a list, duplicate them if they are not database
* RR's and hence from the cache since cache RR's are shared.
*/
RR*
rrcat(RR **start, RR *rp, int type)
{
RR *next;
RR *np;
RR **last;
SOA *soa;
last = start;
while(*last)
last = &(*last)->next;
for(;rp && tsame(type, rp->type); ... |
Does it seem like everyone you know is getting a tablet computer? There's a reason for that. They have been. Tablets are getting more popular than ever. According to the Pew Research Center's Internet and American Life Project, over a third of American adults now own a tablet.
By Pew's latest survey numbers, "A third ... |
<reponame>marchese29/EmulatorCore<gh_stars>0
//
// Created by <NAME> on 8/29/15.
//
#ifndef EMULATORCORE_MEMORYCONTROLLER_H
#define EMULATORCORE_MEMORYCONTROLLER_H
#include "../../Common.h"
class MemoryMap;
class MemoryController {
protected:
MemoryMap *_mmap;
public:
MemoryController(MemoryMap *map) { _mma... |
use arrayvec::ArrayVec;
const BUF_SIZE: usize = 40; // The maximum X3.28 message length is 18 bytes
#[derive(Debug)]
pub struct Buffer {
data: ArrayVec<u8, BUF_SIZE>,
read_pos: usize,
}
impl Buffer {
pub fn new() -> Self {
Self {
data: ArrayVec::new(),
read_pos: 0,
... |
Over a decade ago, Margin Walker’s Graham Williams, then a booker for the downtown Emo’s location, conceptualized Free Week as a way to bring warm bodies into the club during one of the slowest weeks of the year. The philosophy is simple: throw open the doors, drop the cover charge and invite folks to come experience A... |
// drop unique constraint need provide the constraint name.
func (s Sql) AlterTableDropUnique(table, constraintName string) {
q := ""
switch s.Dialect {
case "mssql", "oracle":
q = fmt.Sprintf("ALTER TABLE %s DROP CONSTRAINT %s", table, constraintName)
case "mysql":
q = fmt.Sprintf("ALTER TABLE %s drop INDEX %s... |
<reponame>Eluinhost/hosts.uhc
import * as React from 'react';
import { Button, NonIdealState, Spinner } from '@blueprintjs/core';
import { SelectField, SelectFieldProps } from '../../components/fields/SelectField';
import { connect } from 'react-redux';
import { ListVersionsState } from '../reducer';
import { getListV... |
<filename>engine/src/core/logger.h
#pragma once
#include "defines.h"
// switches to enable or disable specific logging level
#define MC_LOG_WARN_ENABLED 1
#define MC_LOG_INFO_ENABLED 1
#define MC_LOG_DEBUG_ENABLED 1
#define MC_LOG_TRACE_ENABLED 1
#define MC_LOG_ERROR_ENABLED 1
#define MC_LOG_FATAL_ENABLED 1
#if MI... |
#include <fstream>
#include <iostream>
#include <unistd.h>
int main(int argc, char** argv) {
int data[] = {10,5,263}; //Random data we want to send
FILE *file;
file = fopen("/dev/ttyACM0","w"); //Opening device file
int i = 0;
for(i = 0 ; i < 3 ; i++)
{
fprintf(file,"%d",data[i]); //Writin... |
import Discord from 'discord.js';
import EventEmitter from 'events';
import { UserPromtResult } from '../Interface/UserPromtResult.js';
interface UserActionEmitterEvents {
action: (user: Discord.GuildMember, channel: Discord.TextChannel, result: UserPromtResult, creator?: Discord.Message | Discord.ButtonInteractio... |
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0
use crate::common::{
types::{CliCommand, CliTypedResult, EncodingOptions, ProfileOptions, WriteTransactionOptions},
utils::submit_transaction,
};
use aptos_rest_client::{aptos_api_types::WriteSetChange, Transaction};
use aptos_types::account_address... |
/**
* Created by andrey on 24.04.14.
*/
@Stateless
@Local(AttachmentService.class)
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class LocalAttachmentServiceImpl extends BaseAttachmentServiceImpl implements AttachmentService {
@Override
protected RemoteInputStream wrapStream(InputStream inputSt... |
import java.util.*;
public class Main{
static Long sumupto(int n ){
Long sum = 0L;
for(int i=0;i<=n;i++){
sum+=i;
}
return sum;
}
public static void main(String[] rk){
long []a = new long[10000+1];
for(int i=0;i<10000... |
/**
* @author Rinat Gareev (Kazan Federal University)
*
*/
class NativeLibrary {
private static boolean loaded = false;
public synchronized static void load() {
if (!loaded) {
System.loadLibrary("crfsuite-jni");
loaded = true;
}
}
} |
def separable_filter(tensor: tf.Tensor, kernel: tf.Tensor) -> tf.Tensor:
strides = [1, 1, 1, 1, 1]
kernel = tf.cast(kernel, dtype=tensor.dtype)
tensor = tf.nn.conv3d(
tf.nn.conv3d(
tf.nn.conv3d(
tensor,
filters=tf.reshape(kernel, [-1, 1, 1, 1, 1]),
... |
def f(self, x0, y0, z0, w0, a, b, usecontrol:bool=True):
if self.config['useControl'] and usecontrol:
if self.config['usePositiveControl']:
k = np.array(self.kp)
e = np.array(self.e)
x = np.array([x0, y0, z0, w0])
sigma = self.sigma
... |
<filename>executable/Main.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #... |
#ifndef _AB_UNIQUE_PTR_
#define _AB_UNIQUE_PTR_
namespace ab {
template<typename T>
class unique_ptr {
public:
explicit unique_ptr(T* ptr) : ptr(ptr) {}
unique_ptr() : ptr(0) {}
unique_ptr(unique_ptr<T>&& ptr) : ptr(ptr.get()) {
ptr.reset();
}
... |
import { OpenApiPublisher } from "./publishing/openApiPublisher";
import * as fs from "fs";
import * as path from "path";
import { IInjector, IInjectorModule } from "@paperbits/common/injection";
import { ConsoleLogger } from "@paperbits/common/logging";
import { ListOfApisModule } from "./components/apis/list-of-apis/... |
// Returns the AgentPosition (relative strength measure) of the agent when at the minimum HP defined by the condition and conditionOp
func (a *CustomAgent3) requiredHPLevel(treaty messages.Treaty) AgentPosition {
if treaty.ConditionOp() == messages.LT || treaty.ConditionOp() == messages.LE || treaty.ConditionValue() >... |
<reponame>Opty-MSc/HDS<filename>Project/HDLT/Server/src/main/java/pt/tecnico/ulisboa/hds/hdlt/server/repository/DBPopulate.java<gh_stars>0
package pt.tecnico.ulisboa.hds.hdlt.server.repository;
import org.intellij.lang.annotations.Language;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Sta... |
package com.venky.swf.plugins.background.extensions;
import com.venky.swf.plugins.background.core.agent.Agent;
import com.venky.swf.plugins.background.core.agent.PersistedTaskPollingAgent;
public class SWFAgentRegistry {
static {
Agent.instance().registerAgentSeederTaskBuilder("PERSISTED_TASK_POLLER", new Persist... |
import ThankYou from '../components/ThankYou'
export default ThankYou
|
/**
* Test of setTournamentSize method, of class
* gov.sandia.isrc.learning.reinforcement.TournamentSelector.
*/
public void testSetTournamentSize() {
System.out.println("setTournamentSize");
double pct = Math.random();
int tournieSize = (int) (Math.random() * 1000) + 1;
... |
ADVERTISEMENT
There he goes again. Just when you thought Donald Trump must be feeling the heat for saying Judge Gonzalo Curiel's "Mexican heritage" should preclude him from ruling on the lawsuits against Trump University, the presumptive GOP nominee reportedly ordered surrogates on a Monday conference call to keep fan... |
<filename>mars/learn/ensemble/tests/test_blockwise.py
# Copyright 1999-2021 Alibaba Group Holding 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/... |
n,m = map(int, raw_input().split())
A = map(int, raw_input().split())
total = 0
for _ in xrange(m):
start, end = map(int, raw_input().split())
s = sum(A[start-1:end])
if s>=0: total += s
print total |
THE HIERARCHICAL ORGANIZATION OF ARM STROKE IN A 400-M FREESTYLE SWIMMING RACE
Purpose. Arm stroke is a key variable of successful performance in front crawl swimming. In the present study, the effects of the arm stroke on the front crawl swimming performance were analysed by considering the complementarity of macro-c... |
<filename>src/api/java/appeng/api/implementations/items/IAEWrench.java
package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
/**
* Implemented on AE's wrench(s) as a substitute for if BC's API is not
*... |
/**
* Class for requisition header
*
*/
public class RequisitionHeader {
@SerializedName("Name")
public String name;
@SerializedName("Comment")
public String comment;
@SerializedName("NeedBy")
public Date needBy;
@SerializedName("Requester")
public String requester;
@SerializedName("Preparer")
public ... |
#needed by visual studio
#import django.test.utils
#django.setup()
#django.test.utils.setup_test_environment()
#django.test.utils.setup_databases()
from django.conf import settings
from django.test.utils import get_runner
# import unittest
# from unittest import TestCase
# if __name__ == "__main__":
# os.environ... |
<reponame>m-rei/go-3d-rasterizer<filename>rasterizer/rasterizer.go
package rasterizer
import (
m "go-3d-rasterizer/math3d"
"math"
)
// Scene contains all the matrices needed to transform a vertex into screen coordinates
type Scene struct {
ModelViewMatrix m.Matrix
ProjectionMatrix m.Matrix
ViewportMatrix m.Ma... |
def operations(self, qubits: Sequence[cirq.Qid]) -> cirq.OP_TREE: |
Jeannine Goodhue regularly shops at Market Basket for its low prices. But on Tuesday she was wheeling a shopping cart stuffed with groceries from the Stop & Shop in Reading because she could not bring herself to patronize Market Basket while its employees were fighting management over control of the company.
“It’s jus... |
/**
* adds all registries in SynBioHubFrontend and local preferences to doc's
* internal registries
*/
public static void populateRegistries(SBOLDocument doc) {
Registries.get().forEach(registry -> {
if (registry.isMetadata()) {
doc.addRegistry(registry.getLocation(), registry.getUriPrefix());
}
... |
/*
* Copyright (C) 2008-2009 QUALCOMM Incorporated.
*/
#ifndef __LINUX_MSM_CAMERA_H
#define __LINUX_MSM_CAMERA_H
#include <linux/types.h>
#include <asm/sizes.h>
#include <linux/ioctl.h>
#define MSM_CAM_IOCTL_MAGIC 'm'
#define MSM_CAM_IOCTL_GET_SENSOR_INFO \
_IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *... |
Identification of proteins for controlled nucleation of metal-organic crystals for nanoenergetics
Here, we report that a marine sandworm Nereis virens jaw protein, Nvjp1, nucleates hemozoin with similar activity as the native parasite hemozoin protein, HisRPII. X-ray diffraction and scanning electron microscopy confir... |
def warp(inputFile, outputFile, xsize, ysize, dst_srs, src_srs=None,
doClip=False, xmin=None, xmax=None, ymin=None, ymax=None,
method='bilinear'):
command = 'gdalwarp -overwrite'
if src_srs is not None:
command = command + ' -s_srs "{}"'.format(src_srs)
command = command + ' -t_s... |
package com.cloudera.sa.hive.utils;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.concurrent.ArrayBlockingQu... |
def make_url(name_or_url: str):
if isinstance(name_or_url, (str, bytes)):
return _parse_rfc1738_args(name_or_url)
elif isinstance(name_or_url, dict):
return URL("postgres", **name_or_url)
else:
return URL("postgres") |
package usecase
import (
"context"
"log"
"time"
"github.com/tamanyan/oauth2"
_oauth2 "github.com/tamanyan/oauth2-server/oauth2"
"github.com/tamanyan/oauth2-server/oauth2/http/request"
"github.com/tamanyan/oauth2/errors"
)
// OAuth2Usecase usecase
type OAuth2Usecase struct {
Manager oauth2.Manager
}
// NewOA... |
<gh_stars>1-10
export * from "./default-message"
export * from "./message"
|
<reponame>hroptatyr/clob
#include <stdio.h>
#include "btree.h"
int
main(void)
{
btree_t t;
int rc = 0;
t = make_btree(true);
for (size_t j = 0U; j < 100U; j++) {
btree_val_t *v = btree_put(t, 1.dd+j);
if (btree_val_nil_p(*v)) {
*v = (btree_val_t){make_plqu(), {1.dd+j}};
printf("%p ", v);
} else {
... |
import json
from rest_framework.request import Request
from django.template.loader import get_template
from rest_framework import generics
from api.pdf import render as render_pdf
from django.http import (
HttpResponse
)
class SurveyPdfView(generics.GenericAPIView):
# FIXME - restore authentication?
permi... |
// check for duplicates will fail if we pass GlobalParameters as arg
static public String isValidSyncTaskName(Context c, ArrayList<SyncTaskItem> stl, String t_name, boolean checkDup, boolean showAllError) {
String result = "", sep="";
if (t_name.length() > 0) {
result = hasSyncTaskNa... |
/**
* Finds anagrams and builds a multidimensional array list. Size of the first dimension
* is the number of sets of anagrams found, and 2nd dimension 1 row each for each set of anagrams.
*
* Approach:
* Foreach element of the input array, compare to the first element of each row to determine if
* it is... |
<filename>test/examples/define.spec.ts
UTest({
$config: {
'http.process': {
command: 'atma custom examples/index',
matchReady: '/Listen /'
}
},
$before: function(next){
UTest
.server
.request('http://localhost:5771/define')
... |
<filename>src/it/unimi/dsi/fastutil/io/TextIO.java
/* Generic definitions */
/* Assertions (useful to generate conditional code) */
/* Current type and class (and size, if applicable) */
/* Value methods */
/* Interfaces (keys) */
/* Interfaces (values) */
/* Abstract implementations (keys) */
/* Abstract imple... |
def remove_namespace(xml):
regex = re.compile(' xmlns(:ns2)?="[^"]+"|(ns2:)|(xml:)')
return regex.sub('', xml) |
<filename>src/main/java/br/org/itai/amqpservice/proxy/services/impl/AnnotatedServiceImpl.java
package br.org.itai.amqpservice.proxy.services.impl;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
impo... |
/// Requests the setting value from a given signature for a setting handler.
async fn request_value(&mut self, signature: Signature) -> Result<SettingInfo, Error> {
let mut send_receptor = self
.messenger_client
.message(
Payload::Command(Command::HandleRequest(Request::G... |
//! s3du: A tool for informing you of the used space in AWS S3 buckets.
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![allow(clippy::redundant_field_names)]
use anyhow::Result;
use clap::value_t;
use log::{
debug,
info,
};
use std::str::FromStr;
/// Command line parsing.
mod cli;
/// Common types and trait... |
Changes to Trash Collection - Beginning July 3, 2017 View this email in your browser Newport Moves to Weekly Trash Collection, Curbside Recycling for All
Newport, Kentucky – June 21, 2017 – Newport is making big changes to its trash program. Beginning July 1, curbside recycling is available to all residents at no addi... |
Quantifying the roles of ocean circulation and biogeochemistry in governing ocean carbon-13 and atmospheric carbon dioxide at the last glacial maximum
Abstract. We use a state-of-the-art ocean general circulation and biogeochemistry model to examine the impact of changes in ocean circulation and biogeochemistry in gov... |
/*
* Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retai... |
// returns a value "top", for which datums should be on the pMore side if t>=top
int DirPDTreeNode::SortNodeForSplit()
{
int top = NData;
static int callNumber = 0;
callNumber++;
vct3 Ck; vct3 Ct;
vct3 r = F.Rotation().Row(0);
double px = F.Translation()[0];
for (int k = 0; k < top; k++) {
Ck = pMyTre... |
/** Encrypts/decrypts sent/received data by running the data transformers against it; wraps
* an inner socket for which the resulting data is sent to, or from which data is read. */
public class OBSocketImpl implements ISocketTL {
ISocketFactory _innerFactory = new TCPSocketFactory();
TLAddress _addr;
ISo... |
<gh_stars>1-10
import * as boom from "boom";
import * as hapi from "hapi";
import * as Joi from "joi";
import { IConfigureOptions, IWebhook, IWebhookEvent, PayPalRestApi, WebhookModel } from "paypal-rest-api";
import * as pkg from "../package.json";
export interface IHapiPayPalOptions {
sdk: IConfigureOptions;
... |
<filename>NLPCCd/Camel/2218_2.java<gh_stars>0
//,temp,sample_3990.java,2,14,temp,sample_24.java,2,14
//,2
public class xxx {
public void addConsumer(NettyConsumer consumer) {
if (compatibleCheck) {
if (bootstrapConfiguration != consumer.getConfiguration() && !bootstrapConfiguration.compatible(consumer.getConfiguration(... |
<reponame>d4nuu8/krlcodestyle
# -*- coding: utf-8 -*-
from unittest import TestCase
from importlib import reload
from krllint import config
from krllint.reporter import Category, MemoryReporter
from krllint.linter import _create_arg_parser, Linter
class MixedIndentationTestCase(TestCase):
TEST_INPUT_WITH_SPACES ... |
#pragma once
class Collider
{
};
|
<reponame>ggj2010/javabase<filename>dailycode/src/main/java/com/ggj/java/rpc/demo/netty/first/server/ServerProvider.java
package com.ggj.java.rpc.demo.netty.first.server;
import com.ggj.java.rpc.demo.netty.first.server.annation.RpcService;
import com.ggj.java.rpc.demo.netty.first.server.handle.RpcServerHandler;
import... |
package cat.udl.eps.softarch.hello.service;
import cat.udl.eps.softarch.hello.model.Alert;
import cat.udl.eps.softarch.hello.model.User;
import cat.udl.eps.softarch.hello.repository.AlertRepository;
import cat.udl.eps.softarch.hello.repository.UserRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
im... |
/**
* Returns a mutable copy of the source which is filtered to only those features who have years within the range and
* enough years to satisfy the threshold.
*/
private List<PointFeature> filterBy(List<PointFeature> source, int minYear, int maxYear, int yearThreshold) {
List<PointFeature> result = Lists... |
import getProgressA11y from "../getProgressA11y";
describe("getProgressA11y", () => {
it("should return undefined if the progressing arg is false", () => {
expect(getProgressA11y("", false)).toBeUndefined();
expect(getProgressA11y("something-else", false)).toBeUndefined();
});
it("should return the corr... |
// ------------------------------------
//
// Code Tree Manager
//
// ------------------------------------
class code_tree_manager {
label_hasher & m_lbl_hasher;
mam_trail_stack & m_trail_stack;
region & m_region;
template<typename OP>
OP * mk_instr(opcode op, unsigne... |
Silicon Valley is throwing its support behind Hillary Clinton.
On Thursday, Clinton's campaign sent out a list of endorsements from the business leaders, including big names from Facebook, Netflix, Airbnb, and Alphabet (Google's parent company), as well as prominent venture capitalists.
Netflix CEO Reed Hastings went... |
/**
* Test for illegal mappings between collection types, iterable and non-iterable types etc.
*
* @author Gunnar Morling
*/
@RunWith(AnnotationProcessorTestRunner.class)
public class ErroneousCollectionMappingTest {
@Test
@IssueKey("6")
@WithClasses({ ErroneousCollectionToNonCollectionMapper.class })
... |
Analysis of Human Activity Recognition using Deep Learning
Nowadays the deluge of data is increasing with new technologies coming up daily. These advancements in recent times have also led to an increased growth in fields like Robotics and Internet of Things (IoT). This paper helps us draw a comparison between the usa... |
function minTransfers(transactions: number[][]): number {
const g: number[] = new Array(12).fill(0);
for (const [f, t, x] of transactions) {
g[f] -= x;
g[t] += x;
}
const nums = g.filter(x => x !== 0);
const m = nums.length;
const f: number[] = new Array(1 << m).fill(1 << 29);
... |
import NewsController from './news';
declare module 'egg' {
export interface IController {
news: NewsController;
}
}
|
// sweeps one span
// returns number of pages returned to heap, or ^uintptr(0) if there is nothing to sweep
//go:nowritebarrier
func sweepone() uintptr {
_g_ := getg()
sweepRatio := mheap_.sweepPagesPerByte
_g_.m.locks++
if atomic.Load(&mheap_.sweepdone) != 0 {
_g_.m.locks--
return ^uintptr(0)
}
atomic.Xadd(... |
<reponame>stallpool/cruise
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmProjectCommand.h"
#include "cmsys/RegularExpression.hxx"
#include <sstream>
#include <stdio.h>
#include "cmMakefile.h"
#include "cm... |
/**
* Send a response to an queue add attempt.
*
* @param request
* the original payload with the request to enqueue
* @param player
* the player to send it to
* @param type
* the type of response
* @param media
* the media c... |
<gh_stars>10-100
/****************************************************************************
Copyright 2004, Colorado School of Mines and others.
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
... |
use common::{Ray, Transform, Vec3};
use crate::CubeCollider;
pub type Tri = [Vec3; 3];
/// given a trangle that is counter clockwise, it will return the normal that is normalized
pub fn get_normal_from_tri(tri: &Tri) -> Vec3 {
-(tri[1] - tri[2]).cross(tri[0] - tri[2]).normalized()
}
/// get proper vertex positi... |
import java.util.Scanner;
public class ProperNutrition {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
long n, gar, bar;
n = Long.parseLong(in.nextLine());
gar = Long.parseLong(in.nextLine());
bar = Long.parseLong(in.nextLine());
in.close();
long resp;
for (int ... |
Story highlights The memo was submitted to the White House Office of Management and Budget
The move would likely be controversial
Washington (CNN) The White House is considering a proposal to move both the State Department bureau of Consular Affairs and its bureau of Population, Refugees, and Migration to the Departm... |
import React from 'react';
import createSvgIcon from './helpers/createSvgIcon';
export default createSvgIcon(
<path d="M17 5v8.61l2 2V1H5v.61L8.39 5zM2.9 2.35L1.49 3.76 5 7.27V23h14v-1.73l1.7 1.7 1.41-1.41L2.9 2.35zM7 19V9.27L16.73 19H7z" />,
'MobileOffSharp',
);
|
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
<filename>hw9/client/StockTradingApp/app/src/main/java/com/rochakgupta/stocktrading/main/section/portfolio/PortfolioHeaderViewHolder.java
package com.rochakgupta.stocktrading.main.section.portfolio;
import android.view.View;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.