content stringlengths 10 4.9M |
|---|
Predictive data analysis techniques applied to dropping out of university studies
Student dropout is a major problem in university studies all around the world. To alleviate this problem, it is important to detect as soon as possible student attrition before he or she becomes a deserter. A student may be considered a ... |
Wisconsin Gov. Scott Walker says British Prime Minister David Cameron confided in him that he was concerned about the direction of American leadership. But there’s a problem with the Republican’s tidy critique of President Barack Obama: Cameron doesn’t remember it that way.
Walker, who has taken several trips overseas... |
<filename>questions/remove-duplicates-from-sorted-array-ii/Solution.java
/**
* Follow up for "Remove Duplicates":
* What if duplicates are allowed at most twice?
*
* For example,
* Given sorted array nums = [1,1,1,2,2,3],
* Your function should return length = 5, with the first five elements of nums being 1,... |
/* Perform an acceptor step of the underlying mechanism exchange. */
static OM_uint32
mech_accept(OM_uint32 *minor, spnego_gss_ctx_id_t ctx,
gss_cred_id_t cred, struct negoex_message *messages,
size_t nmessages, gss_channel_bindings_t bindings,
gss_buffer_t output_token, OM_uint32 *t... |
The country’s dominant bargain-store chain made headlines last month when it confirmed plans to introduce prices that will be much closer to $5 (with taxes) rather than a buck.
Dollarama has made a pretty good run in recent years by introducing new products at higher prices on everything from food to seasonal products... |
import '@/styles/index.scss'
import React, { ReactElement } from 'react'
import { History } from 'history'
import { Helmet } from 'react-helmet'
import { Provider } from 'react-redux'
import { ConnectedRouter } from 'connected-react-router'
import ErrorBoundary from '@/components/error-boundary'
import RoutesElem from... |
// Check that a nodes pointed to with connect-thinblock actually supports thinblocks
BOOST_FOREACH (string &strAddr, mapMultiArgs["-connect-thinblock"])
{
CNodeRef node = FindNodeRef(strAddr);
if (node && !node->ThinBlockCapable())
{
LogPrintf("ERROR: You are ... |
<filename>components/apps/BoxedWine/useBoxedWine.ts
import { getConfig, libs } from "components/apps/BoxedWine/config";
import useTitle from "components/system/Window/useTitle";
import { useFileSystem } from "contexts/fileSystem";
import { basename, extname } from "path";
import { useCallback, useEffect, useRef } f... |
/**
* Starts the booting process and handles exceptions with the console frame.
*
* @param args Command line arguments
*/
public final void securedBoot(String[] args) {
try {
unsecuredBoot(args);
} catch (Exception e) {
errorOccured = true;
handleException(e);
}
if (!getConsoleFrame().isEr... |
/// Return an iterator over all elemens inside the memory reservations block
/// of this device tree.
///
/// Memory reservation regions should never be used as normal memory by the
/// kernel.
pub fn memory_reservations(&'tree self) -> MemoryReservations<'tree> {
let start = self.mem_rsv_offset() as usize;
... |
Students at the Infantry Officers’ Course fire a mortar round during a mountain attack in the Bullion Training Area at Twentynine Palms, Calif., March 21, 2012.
WASHINGTON — The first two female lieutenants to volunteer for the Marine Corps’ Infantry Officer Course failed to complete the program, the Marine Corps said... |
/* Adds the link l to the list of incoming future links
* for l's target.
*/
static void
add_future_incoming(dcontext_t *dcontext, fragment_t *f, linkstub_t *l)
{
future_fragment_t *targetf;
app_pc target_tag = EXIT_TARGET_TAG(dcontext, f, l);
ASSERT(LINKSTUB_DIRECT(l->flags));
ASSERT(!SHARED_FRAGMENT... |
Welcome
to
K I LLMYW I FE.COM
We understand. You're desparately in need of help. You can't take it anymore. The bitch needs to die. You want to kill your wife, but you just don't know where to start. You've come to the right place. If you're too sick of her to even bitch about it and really want to master the dating... |
NEW DELHI: Rahul first heard of the virtual currency called bitcoin four years ago while playing multi-player online games. “There was an option to buy lives and resurrect your character so I traded my bitcoin stash,” says Rahul, who goes by just his first name. One life for 500 bits (one bit is one millionth of a bitc... |
<gh_stars>0
import { AzureFunction } from '../types';
import { customFetch } from '../lib/utils';
import { createUri } from './server';
export async function azureFunction(context, req) {
try {
const uri: string = await createUri();
const res = await customFetch(uri, req);
if (res.status === 200) {
... |
/*
* Issue a control request to the specified device.
* This is O/S specific ...
*/
static inline int ctrl_msg (
int device,
unsigned char requestType,
unsigned char request,
unsigned short value,
unsigned short index,
unsigned char *data,
size_t length
) {
struct usb... |
<reponame>danielpwarren/Etaler<filename>Etaler/Core/String.hpp
#pragma once
#include <vector>
#include <string>
#include <sstream>
#include "Shape.hpp"
namespace et
{
inline std::vector<std::string> split(const std::string& str, char delim = ',')
{
std::size_t current, previous = 0;
std::vector<std::string> cont;... |
class ACIconfig:
"""Class which contains and manages ACI configuration dict
"""
aciitemcfg = {} # item configuretion structure
configfiledir = "" # absolute path to configfiles dir
def __init__(self, acicfgfile, aciapidict, excel=False):
"""[summary]
:param acicfgfile: ... |
/**
* <p><b>(This method works with JSON data)</b></p>
*
* <p>Uploads a JSON string to the device. Calls the <code>write</code> effect
* command from the <a href = "https://forum.nanoleaf.me/docs#_u2t4jzmkp8nt">OpenAPI</a>.
* Refer to it for more information about the commands.</p>
*
* <h1>Commands:</h1... |
/* Configure CGX LMAC in internal loopback mode */
int cgx_lmac_internal_loopback(void *cgxd, int lmac_id, bool enable)
{
struct cgx *cgx = cgxd;
u8 lmac_type;
u64 cfg;
if (!cgx || lmac_id >= cgx->lmac_count)
return -ENODEV;
lmac_type = cgx_get_lmac_type(cgx, lmac_id);
if (lmac_type == LMAC_MODE_SGMII || lmac_t... |
A 581/781 MSPS 3-BIT CMOS FLASH ADC USING TIQ COMPARATOR
Analog to digital converters (ADCs) is a mixed signal device that converts analog signals which are real world signals to digital signals (which are binary in nature) for processing the information.Since signal processing in digital domain has widely being studi... |
///////////////////////////////////////////////////////////
// Set default or migrate SNI registy values.
//
// inputs:
// dwIndex[in]: the index to the value array that is to be set.
// hSNIRootNew[in]: the current SNI registry root key.
// hSNIRootOld[in]: the latest SNI registry root key if any. It
// should n... |
package org.icatproject.core.oldparser;
import java.util.ArrayList;
import java.util.List;
import org.icatproject.core.IcatException;
import org.icatproject.core.entity.EntityBaseBean;
public class BooleanTerm {
// BooleanTerm ::= BooleanFactor ( "AND" BooleanFactor ) *
private List<BooleanFactor> factors = new... |
<reponame>theIDinside/rr<filename>src/test/perf_event_mmap.c
/* -*- Mode: C; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
#include "util.h"
static int sys_perf_event_open(struct perf_event_attr* attr, pid_t pid, int cpu,
int group_fd, unsigned long flags) {
return sy... |
<reponame>almaaro/Firmware-old
/****************************************************************************
*
* Copyright (c) 2018 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condition... |
def _compute_device_infos(
bridge: HuaweiSolarBridge,
connecting_inverter_device_id: tuple[str, str] | None,
) -> HuaweiInverterBridgeDeviceInfos:
inverter_device_info = DeviceInfo(
identifiers={(DOMAIN, bridge.serial_number)},
name=bridge.model_name,
manufacturer="Huawei",
m... |
import fs from "fs";
(async () => {
const raw = fs.readFileSync("addresses.txt");
const splits = raw.toString().split("\n");
const addresses: string[] = [];
for (const split of splits) {
if (split.indexOf("0x") === 0) {
const address = split.trim();
if (address.length ==... |
/**
* Created by Marco Capitani on 20/06/19.
*
* @author Marco Capitani <m.capitani AT nextworks.it>
*/
public class PrometheusTDetails extends ThresholdDetails {
private int value;
private RelationalOperation comparison;
private int thresholdTime;
private String pmJobId;
public PrometheusTDet... |
An Extension of an Invariance Property of the Swiss Premium Calculation Principle
Some of the results obtained in an earlier paper entitled “An Invariance property of the Swiss premium calculation principle” by F. De Vylder and M. Goovaerts (1979) are generalized. For that purpose the notion of additivity and iterativ... |
def fqn(self):
if self.path:
module_path = self.path
else:
fp = self.func.__code__.co_filename
matching = max([p for p in sys.path if p in fp], key=len)
module_path = (
fp.replace(matching + "/", "").replace(".py", "").replace("/", ".")
... |
/**
* {@link CharacterStateRow} test.
*
* @author Sam Donnelly
*
*/
@Test(groups = TestGroupDefs.FAST)
public class StandardRowTest {
private List<Otu> otus;
private StandardMatrix matrix;
@BeforeMethod
public void beforeMethod() {
matrix = new StandardMatrix();
matrix.setParent(new OtuSet());
otus ... |
/**
* Implementation of a Constraint Store, oriented toward the definition of the constraint store by
* Van Weert et al. "CHR for Imperative Host Languages".
* Stores {@link Constraint}-objects and a rule application history (which rules where applied to which constraints)
*/
public class ConstraintStore {
prot... |
s=input()
n=len(s)
ans=""
import math
for i in range(1,n):
if i%2==1:
continue
ss=s[:i]
m=len(ss)
p=0
for j in range(m//2):
if ss[j]!=ss[j+m//2]:
p=1
break
if p==0:
ans=ss
print(len(ans))
|
import { useEffect, useRef, useState } from "react";
import { getFileUrl } from "./storageUtils";
import { StorageObject } from "./types";
export const usePrevious = <T>(value: T) => {
const ref = useRef<T>();
useEffect(() => {
ref.current = value;
}, [value]);
return ref.current;
};
type KeyValuePair =... |
<gh_stars>1-10
/* External Imports */
import { L2ToL1Message } from '@eth-optimism/rollup-core'
import { getLogger, logError } from '@eth-optimism/core-utils'
import { Contract, Wallet } from 'ethers'
import { L2ToL1MessageSubmitter } from '../types'
import { TransactionReceipt } from 'ethers/providers/abstract-provid... |
<reponame>maidiHaitai/haitaibrowser
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/offline_pages/offline_page_metadata_store_impl.h"
#include <stdint.h>
#include <memory>
#inclu... |
<reponame>frstrtr/the
#include <iostream>
using namespace std;
#include <boost/program_options.hpp>
namespace po = boost::program_options;
enum ValueTypes
{
first,
second
};
std::istream &operator>>(std::istream &in, ValueTypes &value)
{
std::string token;
in >> token;
//cout ... |
<reponame>twosigma/beaker-notebook-archive
/*
* Copyright 2017 TWO SIGMA OPEN SOURCE, LLC
*
* 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... |
/**
* Test XStream with an active SecurityManager. Note, that it is intentional, that this test is
* not derived from AbstractAcceptanceTest to avoid loaded classes before the SecurityManager is
* in action. Also run each fixture in its own to avoid side-effects.
*
* @author Jörg Schaible
*/
public class Se... |
// stringMatcher solves the problem introduced above of possibly
// matching with exact string matching or partial string matching.
func stringMatcher(test, match string, matchExact bool) bool {
if matchExact {
return test == match
}
return strings.Contains(test, match)
} |
import os, sys, re, math
N,X = list(map(int,input().split(' ')))
memo_length = [0 for i in range(51)]
memo_patties = [0 for i in range(51)]
memo_length[0] = 1
memo_patties[0] = 1
for i in range(1,51):
memo_length[i] = memo_length[i-1] * 2 + 3
memo_patties[i] = memo_patties[i-1] * 2 + 1
def doit(level,x):
... |
<reponame>artintexo/facedemo
#pragma once
#include <QWidget>
namespace facelib {
class FaceObject;
}
class GraphicsView;
class QGraphicsScene;
class QGroupBox;
class QLineEdit;
class QProgressBar;
class QPushButton;
class QTreeView;
class FaceGui : public QWidget {
Q_OBJECT
public:
FaceGui();
protected:
... |
/**
* Handler that takes care of redirecting
*
* @author igor
*/
public static class RedirectHandler implements IRequestHandler
{
private final String url;
private final HttpsConfig config;
/**
* Constructor
*
* @param config
* https config
* @param url
* redire... |
A Chesapeake, Virginia grand jury indicted 28-year-old Ryan Frederick on charges of capital murder yesterday. The more severe charge (he was originally charged with first-degree murder) means the state will likely seek the death penalty, though there has been no official announcement as of yet.
Last January, Frederick... |
#include "QPhoneDao.h"
#include "QDaoHelpBase.h"
#include "QPhoneVo.h"
QPhoneDao::QPhoneDao()
{
}
bool QPhoneDao::initTable()
{
if (!dbOperateValid())
{
return false;
}
QSqlError sqlError = QDAOHELP->createTable<QPhoneVo>();
return sqlError.type() == QSqlError::NoError;
}
bool QPhoneDa... |
def extract_metadata(shp_file_full_path):
try:
metadata_dict = {}
parsed_md_dict = parse_shp(shp_file_full_path)
if parsed_md_dict["wgs84_extent_dict"]["westlimit"] != UNKNOWN_STR:
wgs84_dict = parsed_md_dict["wgs84_extent_dict"]
if wgs84_dict["westlimit"] == wgs84_di... |
/**
* See the FeatureInferrer class for the function of FeatureInferrers.
*
* This inferrer uses dependency relations to generate syntactic N-grams.
* Syntactic N-grams are tuples of words which are adjacent in terms of
* their paths in a syntactic tree, as opposed to lexical n-grams which
* are tuples of words w... |
/**
* Waits until the consumer is done with the texture.
*
* <p>This method must be called within the application's GL context that will overwrite the
* TextureFrame.
*/
public void waitUntilReleasedWithGpuSync() throws InterruptedException {
synchronized (this) {
while (inUse && releaseSyncTok... |
We've grown so accustomed to seeing Stevie Wonder perform like he did last night at the Grammys that sometimes we might take for granted not just his talent, but also the obstacles he overcame to learn those skills.
Jahmir Wallace, who says Wonder is his inspiration, is not one of those people.
The 10-year-old studen... |
//finds the LCA in a binary tree
/*
if the two nodes are on different sides then the first node to have it on different sides
is the LCA or when they are on the same side then the first found is the LCA.
each time we check if either of the 2 trees have found the LCA then return that node .
*/
Node* findLCA(Node* ro... |
import { Body, Controller, Post, UsePipes, ValidationPipe } from '@nestjs/common';
import { DesafiosService } from './desafios.service';
import { CriarDesafioDto } from './dtos/criar-desafio.dto';
@Controller('desafios')
export class DesafiosController {
constructor(private readonly desafiosService: DesafiosServi... |
/**
* Displays an error message.
*
* @param message the message to display
*/
@Override
public void error(String message)
{
error(null, message);
} |
/**
* A collection of {@link Document Documents}.
*
* @deprecated This class is deprecated because of potential issues with marshalling and unmarshalling this type when used in RESTful APIs.
* When you want to represent a collection of {@link Document documents), please use the {@link DocumentCollectio... |
Toronto Blue Jays QR Code Ticket Converter
Bought tickets on StubHub and have no printer? Convert your PDF tickets to a mobile ticket right here!
All you have to do is enter your ticket number and this will convert your ticket to a scannable QR code to enter Rogers Centre, all processing is done on the browser level,... |
def dict_to_str(d):
return string.join(['--%s \'%s\'' % (lib_to_orig_opt_rep(k), lib_to_orig_opt_rep(v)) for (k, v) in d.items() if v != ''], ' ') |
// GetPart is a wrapper around the C function soup_multipart_get_part.
func (recv *Multipart) GetPart(part int32) (bool, *MessageHeaders, *Buffer) {
c_part := (C.int)(part)
var c_headers *C.SoupMessageHeaders
var c_body *C.SoupBuffer
retC := C.soup_multipart_get_part((*C.SoupMultipart)(recv.native), c_part, &c_head... |
/**
* just adds a prefix to the path
*
* @param filepath the path to which to add the prefix
* @param offset the offset to add as prefix
* @return the whole path
*/
public static String prependPathOffset(String filepath, String offset) {
if ((offset != null) && (offset.length() >... |
def ordered_host(self):
return self._get_list_field("hosts", lambda x: OrderedHost(x)) |
def subscribe(self, handler_func):
if handler_func.__name__ == '<lambda>':
raise ValueError('handler cannot be a lambda function')
return self._add_handler(handler_func) |
<filename>setup.py<gh_stars>1-10
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
setup(
name='FI',
description='A library of common functions used in financial '
+ 'independence (FI, FIRE) calculations.',
version='0.0.1',
author='<NAME>',
author_email='<EMAIL>',
packages... |
LEXINGTON, Ky. -- Kentucky coach Mark Stoops has announced the hiring of Shannon Dawson as the Wildcats' offensive coordinator and quarterbacks coach.
Dawson serves in the same capacities with West Virginia and will stay with the Mountaineers through their Dec. 29 Liberty Bowl game against Texas A&M. WVU's high-octane... |
One of the oak trees at Toomer's Corner was set on fire following Auburn's win over LSU on Saturday and police arrested a 29-year-old Auburn resident on charges of desecration of a venerable object.
Auburn police arrested Jochen Wiest, who was already in custody on charges of public intoxication and authorities say is... |
Republican presidential candidates Ben Carson, Donald Trump and Rand Paul responded to a question about vaccines and autism at the GOP debate. (CNN)
Donald Trump confidently strode on stage Wednesday night and explained to millions of Americans on live television his version of the heart-rending science of why so many... |
Lauren Zaser for BuzzFeed Photo
Cepeda worked as an electrician while she was serving, and she credits the Marines for helping to shape who she is as a woman today. While she said she values the skills she learned in the Marines, she's working toward a different goal when it comes to her civilian work. She's on track ... |
// NewExecuteSQL constructs a new ExecuteSQL struct instance, with
// all (but only) the required parameters. Optional parameters
// may be added using the builder-like methods below.
//
// https://chromedevtools.github.io/devtools-protocol/tot/Database/#method-executeSQL
func NewExecuteSQL(databaseID string, query str... |
/**
* @brief Check WLAN Link Status & Reconnect if disconnected
*
* @param wps_s A pointer to PWPS_DATA structure
* @param pwps_info A pointer to PWPS_INFO structure
* @param reconnected A pointer to variable to indicate if STA re-connected
* @return 1-connected, 0-not connected
*/... |
<reponame>jvikstedt/birds_and_crustaceans<gh_stars>0
use bevy::{prelude::Query, sprite::Sprite};
use crate::component::{Collider, Player};
pub fn update_player_size(mut player_query: Query<(&mut Sprite, &mut Collider, &Player)>) {
for (mut sprite, mut collider, player) in player_query.iter_mut() {
collide... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
给你一个链表,删除链表的倒数第 n 个节点,并且返回链表的头节点。
进阶:你能尝试使用一趟扫描实现吗?
示例 1:
输入:head = [1,2,3,4,5], n = 2
输出:[1,2,3,5]
示例 2:
输入:head = [1], n = 1
输出:[]
示例 3:
输入:head = [1,2], n = 1
输出:[1]
提示:
链表中节点的数目为 sz
1 <= sz <= 30
0 <= Node.val <= 100
1 <= n <= sz
... |
<gh_stars>1-10
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
* Copyright (C) 2015 - present by <NAME>oores Software Limited.
*
* Please see distribution for license.
*/
package com.opengamma.engine.function.blacklist;
import java.net.URI;
import java.util.concurrent.Ex... |
/**
* @param productName the product to check
* @return true if the product exists
*/
public boolean assetNameExists(String productName) {
for (AssetDefinition assetDefinition : this.assetDefinitions)
if (assetDefinition.getName().equalsIgnoreCase(productName))
return ... |
package nest
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
"github.com/influxdata/influxdb-client-go/v2/api"
"github.com/blakehartshorn/go-nest-temp-monitor/configuration"
)
// JSON types
// Authorization - unpack access... |
<gh_stars>10-100
//
// M A R I A D B + +
//
// Copyright <NAME> 2013,
// <NAME> 2015,
// The ViaDuck Project 2016 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE... |
//! Gets an attribute as binary data
///! \param index: Index value, must be between 0 and getAttributeCount()-1.
void CAttributes::getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) const
{
if ((u32)index < Attributes.size())
Attributes[index]->getBinary(outData, maxSizeInBytes);
} |
package com.hankcs.nlp.collection.trie.bintrie;
public class _EmptyValueArray<V> extends _ValueArray<V> {
public _EmptyValueArray() {
}
@Override
public V nextValue() {
return null;
}
}
|
/**
* Attack another creature.
*/
public class ActionAttack
implements Action
{
/**
* The ID of the creature which we are attacking.
*/
public final int id;
/**
* Constructor which gives us a null impulse.
*/
public ActionAttack(final int id)
{
this.id = id;
}
/*... |
def make_supervisions(
sgml_path: Pathlike, recording: Recording
) -> Dict[str, List[SupervisionSegment]]:
doc = try_parse(sgml_path)
episode = doc.find("episode")
section_supervisions = []
text_supervisions = []
text_idx = 0
for sec_idx, section in enumerate(doc.find("episode").find_all("se... |
Age: 25
Height: 5ft 2in
Hometown: Blackpool
Lives: Leeds
CV:
Emmerdale - Jasmine Thomas (2005-2009)
Waterloo Road – Lindsay James (2009)
Room at the Top – Susan Brown (2010)
Captain America: the First Avenger - Connie (2011)
Dancing on the Edge - Rosie Williams (2012)
Imaginary Forces - Ellen (2012)
Titanic ... |
/**
* Deletes a node in the middle of a single linked list, given
* only access to that node.
* @param toDelete Node to be deleted
*/
public static boolean deleteAGivenNode(Node toDelete)
{
if(toDelete == null)
{
return false;
}
Node temp = toDelete.getNext();
if(temp != null)
{
toDelete.... |
<gh_stars>1-10
export { default as ImageSizeParser } from './ImageSizeParser';
export { default as ImageThumbParser } from './ImageThumbParser';
export { default as PdfParser } from './PdfParser';
export { default as TextParser } from './TextParser';
export { default as ZipParser } from './ZipParser';
|
package client
import (
"k8s.io/apimachinery/pkg/util/intstr"
)
const (
RollingUpdateDaemonSetType = "rollingUpdateDaemonSet"
RollingUpdateDaemonSetFieldMaxUnavailable = "maxUnavailable"
)
type RollingUpdateDaemonSet struct {
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty" yaml:... |
// logMethod logs a method.
func (middleware loggingMiddlewareCore) logMethod(
ctx context.Context,
methodLogger zerolog.Logger,
args interface{},
results interface{},
err error,
) {
var event *zerolog.Event
var eventLevel zerolog.Level
if err != nil {
event = methodLogger.Err(err).Stack()
eventLevel = zero... |
/**
* Load the attributes of the object from a file.
*
* @return the object attributes to be displayed on the interface, as an
* array list of strings.
*/
private CustomTreeNode loadObjectAttributes() {
if (new File(Constants.OBJECT_ATTRIBUTES_PATH).exists()) {
try (FileInpu... |
/// Two points in a source file.
class location
{
public:
typedef position::filename_type filename_type;
typedef position::counter_type counter_type;
location(const position& b, const position& e)
: begin(b)
, end(e)
{}
explicit location(const position& p = position())
: begin(... |
<gh_stars>1-10
// Package shifter provide simple routing by dividing path into its segment
package shifter
// Shifter hold state of shifting segment in the path
type Shifter struct {
tag map[string]int
list []string
next int
}
// New return new Shifter with the key
func New(list []string) *Shifter {
return &Shif... |
import type { BadgePreset, Sponsor, Sponsorship } from './types'
import type { SponsorkitConfig } from '.'
export function genSvgImage(x: number, y: number, size: number, url: string) {
return `<image x="${x}" y="${y}" width="${size}" height="${size}" xlink:href="${url}"/>`
}
export function generateBadge(
x: num... |
#include "TrackingTools/GsfTools/interface/MultiTrajectoryStateAssembler.h"
#include "TrackingTools/GsfTools/interface/GetComponents.h"
#include "TrackingTools/GsfTools/interface/BasicMultiTrajectoryState.h"
#include "TrackingTools/GsfTools/src/TrajectoryStateLessWeight.h"
#include "FWCore/MessageLogger/interface/Messa... |
import Joi = require('joi')
export const validateBodyMid = (schema: Joi.AnySchema) => {
return async function (req, res, next) {
const { body } = req
_validate(schema, body, req, res, next)
}
}
export const validateParamsMid = (schema: Joi.AnySchema) => {
return async function (req, res, next) {
con... |
def _bootstrap_cost(target_array, forecast_prob_array, cost_function,
num_replicates):
cost_estimates = numpy.full(num_replicates, numpy.nan)
if num_replicates == 1:
cost_estimates[0] = cost_function(target_array, forecast_prob_array)
else:
num_examples = target_array.sha... |
BOOK REVIEW: GUYER, PAUL. Kant on the Rationality of Morality (Cambridge University Press, 2019, 73p. )
I discuss Paul Guyer’s contribution to the Cambridge Elements: The Philosophy of Immanuel Kant series. The author argues that Kant derives the fundamental principle and the object of morality from the fundamental pr... |
Strong shaking in Los Angeles expected from southern San Andreas earthquake
The southernmost San Andreas fault has a high probability of rupturing in a large (greater than magnitude 7.5) earthquake sometime during the next few decades. New simulations show that the chain of sedimentary basins between San Bernardino an... |
San Luis Obispo’s Board of Supervisors has denied a request to build an oil-receiving terminal in its county, which would have allowed for the transportation of crude oil by train through Berkeley.
Oil company Phillips 66 was working to build an oil train terminal at their Santa Maria refinery in San Luis Obispo Count... |
<filename>extensions/project-creator/web/src/components/NotFound/index.tsx
import React from 'react';
import styles from './index.module.scss';
export default ({ description }) => {
return (
<div className={styles.container}>
<img src="https://img.alicdn.com/tfs/TB1WNNxjBHH8KJjy0FbXXcqlpXa-780-780.png" wid... |
<reponame>PrebenRonningen/Crater
#pragma once
#include "CraterEngine.h"
#include "ScoreComponent.h"
class ScoreDisplayComponent final : public CraterEngine::Component
{
public:
ScoreDisplayComponent(const CraterEngine::GameObject* parent, ScoreComponent* scoreComp);
virtual ~ScoreDisplayComponent() override{};
#pra... |
How calcium indicators work.
In the last two decades, imaging of fluorescent indicators specific for Ca(2+) has revealed its often spectacular spatial dynamics, such as rhythmic oscillations or standing gradients, within single groups or individual cells, in unprecedented detail. This short review describes how the mo... |
Joe Biden Worries About 'Black Trucks' Selling Guns To 4th Graders
From Red Alert Politics:
The illegal transfer of guns is a widespread problem, according to Vice President Joe Biden, so widespread that "every neighborhood in every major city" has easy access to illegal guns, he claimed. [...] [T]he Vice President d... |
import { Pipe, PipeTransform } from '@angular/core';
import { ViewListValue } from '../_models';
@Pipe({
name: 'filterModel',
pure: false,
})
export class FilterModelPipe implements PipeTransform {
transform(items: ViewListValue, term: string): any {
if (!term) {
return items;
}... |
<filename>packages/nestjs-jwt/src/jwt.strategy.ts
import { Strategy as PassportStrategy } from 'passport-strategy';
import { Strategy, VerifyCallback } from 'passport-jwt';
import { JwtStrategyOptionsInterface } from './interfaces/jwt-strategy-options.interface';
export class JwtStrategy extends PassportStrategy {
c... |
// Package server サーバー実装
// - REST APIサーバー
// - gRPCサーバー
// - fgprofサーバー
package server
|
import Cannon from './Cannon';
import Enemy from './Enemy';
import Missile from './Missile';
import Collision from './Collision';
export {Cannon, Enemy, Missile, Collision};
|
def process(self):
self.log.info("building db from '%s'" % self.src)
for module, filepath, docid, md_raw in self.get_documents():
try:
ns = module.namespace
doc = Document(docid=docid,
md_raw=md_raw,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.