content stringlengths 10 4.9M |
|---|
Big Picture Update: Birthday Edition
Greetings Contestants!
Earlier this month we reached a big milestone: The Culling has been in Early Access for a full year! It’s amazing to see how far we’ve come in the last twelve months. With endless hard work from our talented team and unwavering dedication from the community,... |
import logging
import torch
import numpy as np
logger = logging.getLogger(__name__)
def recover_metric_depth(pred, gt):
if type(pred).__module__ == torch.__name__:
pred = pred.cpu().numpy()
if type(gt).__module__ == torch.__name__:
gt = gt.cpu().numpy()
gt_mean = np.mean(gt)
gt_var = ... |
<gh_stars>1-10
package com.swak.mongo.codec;
import static org.bson.assertions.Assertions.notNull;
import org.bson.Transformer;
import org.bson.codecs.BsonTypeClassMap;
import org.bson.codecs.Codec;
import org.bson.codecs.configuration.CodecProvider;
import org.bson.codecs.configuration.CodecRegistry;
public class D... |
<filename>src/FactoryImplementationBase.cpp
#include <stddef.h> // for NULL
#include "FactoryImplementationBase.h"
#include "FactorySymbolTable.h" // for FactorySymbolTable
#include "ObjectStub.h" // for ObjectStub
#include "Types.h" // for Kind::STUB, ... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
module File.Util
( tagFile
, rmLastTag
) where
import Data.Maybe (catMaybes)
import Debug (dbg)
import DB.Base
import DB.Read (tagEntityNamed)
import... |
Zombie movies have been stuck in a bit of a rut for over a decade. Since 28 Days Later revived the genre back in 2002, there’s been a zombie outbreak in popular culture but not a whole lot of originality. If the early buzz is to be believed, The Girl with All the Gifts, might be the fresh blood we’ve been looking for.
... |
#pragma once
#ifndef INIREADER_H
#define INIREADER_H
using namespace std;
class CIniReader
{
public:
CIniReader(char* szFileName);
int ReadInt(const char* szSection, const char* szKey, int iDefaultValue);
float ReadFloat(const char* szSection, const char* szKey, float fltDefaultValue);
bool ReadBool(c... |
def ebd_env(self):
d = {}
for k in self._ebd_env_options:
d[f"PKGCORE_{k.upper()}"] = str(getattr(self.options, k)).lower()
d["PKGCORE_EAPI_INHERITS"] = ' '.join(x._magic for x in self.inherits)
d["EAPI"] = self._magic
return ImmutableDict(d) |
<reponame>omilia/omilia-channels-api-sample
package com.omilia.channels.commons.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
@Getter
@JsonIgnoreProperties(ignoreUnknown = true)
public class Coordinates {
// attrib... |
///
/// Given a list of file paths, loads files and their progresses.
///
fn load_levels(
&self,
loader: &Loader,
storage: &AssetStorage<GameLevel>,
dir_list: Vec<PathBuf>,
) -> (Vec<Handle<GameLevel>>, Vec<ProgressCounter>) {
let mut levels = Vec::new();
let mut prog... |
<reponame>kethcode/evm.codes<gh_stars>0
import { useContext, useEffect, useMemo, useState, useCallback } from 'react'
import { useRegisterActions, Action } from 'kbar'
import Select, { OnChangeValue, components } from 'react-select'
import { EthereumContext } from 'context/ethereumContext'
import { SettingsContext, S... |
def order(self, key:str) -> list:
if torch.is_tensor(self.storage[key][0]):
ordered = torch.stack(self.storage[key][:self.rollout], -2)
shape = ordered.shape
ordered = ordered.view(*shape[:-3], self.rollout * self.workers, shape[-1])
return ordered
else:
... |
Filibusters aren’t just more numerous; they’re more mundane, too. Consider an earlier bill to extend unemployment benefits, passed in late 2009. It faced two filibusters — despite bipartisan backing and its eventual passage by a 98-0 margin. A bill that should have zipped through in a few days took four weeks, includin... |
#include <bits/stdc++.h>
using namespace std;
const int MAXN=5005,INF=0x3f3f3f3f;
int n,b,c[MAXN],d[MAXN],f[MAXN][MAXN],g[MAXN][MAXN];
vector <int> G[MAXN];
int dfs(int u)
{
int su=0;
f[u][0]=g[u][0]=0;
for (int i=0;i<G[u].size();i++)
{
int v=G[u][i];
int sv=dfs(v);
su+=sv;
for (int j=su... |
/*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights ... |
#include<stdio.h>
//#include<string.h>
main()
{
//freopen("in.txt", "r", stdin);
long long i, c1 = 0, c2 = 0, m, n, sum;
scanf("%I64d %I64d", &m, &n);
int a[n];
for(i = 0; i<n; i++)
{
scanf("%d", &a[i]);
}
sum = a[0] - 1;
for(i = 1; i<n; i++)
{
... |
// ConnSecurity returns a ConnOption which sets the security configuration.
func ConnSecurity(s security.Config) ConnOption {
return func(c *connConfig) {
c.secConf = s
}
} |
import {Generation} from '../data/interface';
import {toID} from '../util';
import {getItemBoostType} from '../items';
import {RawDesc} from '../desc';
import {Field} from '../field';
import {Move} from '../move';
import {Pokemon} from '../pokemon';
import {Result} from '../result';
import {computeFinalStats, getMoveEf... |
<reponame>Mahasweta-usc/helo_word
from abc import abstractmethod
import os
from . import util
from .filepath import FilePath
def choice_track(track_num):
if track_num == 0:
return Track0()
if track_num == 1:
return Track1()
if track_num == 3:
return Track3()
class Track:
d... |
/**
* Represents a Light Theme.
*/
public class LightTheme extends Theme {
private final String lightThemeResource = requireNonNull(getClass().getResource("/view/LightTheme.css"))
.toExternalForm();
private final String lightExtensionsResource = requireNonNull(getClass()
.getResource("... |
The George Zimmerman not guilty verdict based on reasonable doubt has been blasted by lots of celebrities (as well as ordinary people) on social media, many using the hashtag #JusticeForTrayvon. Rapper Lupe Fiasco appears to be taking a different view of the Zimmerman trial outcome.
Fiasco sent out several controversi... |
Brandon Fibbs has a beautiful post at On Faith about how Carl Sagan took his faith away and replaced it with something so much better:
I did not abandon my faith because I was hurt or angry or disillusioned. I did not abandon my faith because I wanted to rebel, or live a life of sin, or refuse god’s authority. I left ... |
/**
* Created by emnity on 10/8/17.
*/
public class ImageCompress {
private static final String TAG = ImageCompress.class.getSimpleName();
//max width and height values of the compressed image is taken as 612x816
private int maxWidth = 612;
private int maxHeight = 816;
private Bitmap.CompressForm... |
// NewTag create a new Tags instance.
func NewTag() *Tags {
return &Tags{
tags: []string{},
tagm: make(map[string]interface{}),
}
} |
<filename>src/Graph.h<gh_stars>1-10
#ifndef _GRAPH_H_
#define _GRAPH_H_
#include <stdlib.h>
#include <assert.h>
#include "Seq.h"
typedef int NodeId;
class Graph
{
public:
int numNodes;
Seq<NodeId>* inEdges;
Seq<NodeId>* outEdges;
bool* present;
Graph(int numNodes);
~Graph();
void invert();... |
# bug reproduction script for bug #1796 of AFM
import sys
import time
import uiautomator2 as u2
def wait(seconds=2):
for i in range(0, seconds):
print("wait 1 second ..")
time.sleep(1)
if __name__ == '__main__':
avd_serial = sys.argv[1]
d = u2.connect(avd_serial)
d.app_start("com.a... |
/**
* @author Ignacio del Valle Alles idelvall@shiftleft.io
*/
public class GenericMethodStartTest extends BcTraceTest {
@Test
public void test() throws Exception {
final StringBuilder steps = new StringBuilder();
Class clazz = getInstrumentClass(TestClass.class, new Hook[]{
new GenericMethodHook... |
<gh_stars>0
package printer
import (
"astrid/board"
"astrid/configuration"
"astrid/wordcolumn"
"fmt"
"github.com/fatih/color"
"sort"
"strings"
"sync"
)
type byLength []string
func (s byLength) Len() int {
return len(s)
}
func (s byLength) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
func (s byLength) Less(i,... |
def connection_and_cursor(path_to_db):
if not os.path.exists(path_to_db):
p, db_name = os.path.split(path_to_db)
if p:
plist = p.split(os.path.sep)
for i in range(len(plist)):
dirpath = os.path.sep.join(plist[:i+1])
if dirpath and not os.path.e... |
def extract_labels(args):
gt = pd.read_csv(args.annotation_path, header=None)
annotation_path = Path(args.annotation_path)
dataset_dir = annotation_path.parent
labels_dir = os.path.join(str(dataset_dir), "xmls")
if not os.path.exists(labels_dir):
os.mkdir(labels_dir)
print("=============... |
<filename>api/src/services/session.ts<gh_stars>0
import { getStoreFromId, StoreRevenue } from '@honesty-store/store';
import { CardDetails, getCardDetails } from '@honesty-store/topup';
import { AUTO_REFUND_PERIOD, Transaction } from '@honesty-store/transaction';
import { userRegistered } from '@honesty-store/user';
im... |
def rand_stim(self, stimshape=None, batch_size=None):
batch_size = batch_size or self.batch_size or 100
length, height = stimshape or self.stimshape
X = np.zeros((length*height, batch_size))
for i in range(batch_size):
which = np.random.randint(self.data.shape[-1])
... |
//package algorithm.div617;
import java.util.Scanner;
/**
* Created with: IntelliJ IDEA
* Function:
* User: zhangzhe041@ke.com
* Date: 2020-02-07 15:44:30
*/
public class ArrayWithOddSum {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integ... |
<gh_stars>1-10
/*
* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
def process(source, target, rdfsonly, base=None, logger=logging):
for link in source.match():
s, p, o = link[:3]
if s == (base or '') + '@docheader': continue
if p in RESOURCE_MAPPING: p = RESOURCE_MAPPING[p]
if o in RESOURCE_MAPPING: o = RESOURCE_MAPPING[o]
if p == VERSA_BAS... |
<reponame>BesedinAlex/Student_WebLabs<filename>besedin-twenty-one/src/app/services/catalog.service.ts
import { Injectable } from '@angular/core';
import {DatabaseService} from './database.service';
@Injectable({
providedIn: 'root'
})
export class CatalogService extends DatabaseService {
data: [];
lastActionIsDo... |
/**
* Returns user with given id.
*
* @param id Id of the needed object.
* @return Object with given id or <tt>null</tt> if object not found.
*/
@Override
public User findById(final int id) {
User result = null;
try (Connection connection = CONNECTION_POOL.getConnection();
... |
def key_base64() -> bytes:
return base64.standard_b64encode(bcl.symmetric.secret()).decode('utf-8') |
def model_fn(features, labels, mode, params):
if 'initializer' in params:
initializer = configurable.Configurable.initialize(
params['initializer'])
tf.logging.info('Using %s initializer', params['initializer'])
tf.get_variable_scope().set_initializer(initializer)
else:
... |
// Copyright 2017-2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
/**
This class implements a check out mechanism that allows
threads to do an exclusive "checkout" on a key value.
Threads that attempt to check out a key value that is already checked
out will wait until the key is checked back in and available.
Threads that have waited beyond the timeout pe... |
package routes
import (
"net/http"
"github.com/gin-gonic/gin"
)
// Say handles requests to /say route
func Say(c *gin.Context) {
something := c.Param("something")
c.String(http.StatusOK, "Hello from Go! %s", something)
}
|
<filename>src/province/province.interface.ts
import { BaseInterface } from 'src/share/interfaces/base.interface'
import { Unit } from 'src/unit/unit.interface'
/**
* Province Interface
* @author KhoaVD
*/
export interface Province extends BaseInterface, District {
district?: District[]
}
interface District {
... |
Thiamine Deficiency in a Nondrinker and Secondary Pulmonary Edema after Thiamine Replenishment
A 48-year-old man was brought to our emergency room with acute abdominal pain and systemic edema, indicating acute circulatory failure with lactic acidosis. Furosemide treatment paradoxically worsened the systemic edema and ... |
use rocket::response::{Content, Stream};
use {
crate::{
structs::{File, State},
utils,
},
rocket::{get, http::ContentType},
std::{
io::{self, prelude::*, BufReader, Read, Write},
time::Duration,
},
};
const BUF_SIZE: usize = 52428800;
impl Read for File {
fn re... |
import styled from 'styled-components/native';
import { RectButton } from 'react-native-gesture-handler';
interface IButton {
primary: boolean;
};
export const InputWrapper = styled.TextInput`
width: 100%;
border-radius: 8px;
border-width: 1px;
border-color: #5D0DE0;
height: 50px;
padding: 10px;
margi... |
Recent Changes > Android Studio 1.1 Release Candidate 1 Available This release contains only a small set of bug fixes on top of the beta 4 release from last week. Installation This will download and install a small patch rather than download a full IDE image. If you are using an older version, you'll need to downlo... |
<gh_stars>10-100
import {
PluginInstanceDSL,
MaterialsPlugin,
PluginParams,
PluginUniversalEventTrigger,
GlobalMeta,
PageRouter,
} from '@vize/types';
import { cancelCustomEvent, emitCustomEvent, onCustomEvent } from './customEvents';
import { getMaterialsPlugin } from './materialsMap';
import { generatePlu... |
/*
* ASCLITE
* Author: <NAME>, <NAME>, <NAME>, <NAME>
*
* This software was developed at the National Institute of Standards and Technology by
* employees of the Federal Government in the course of their official duties. Pursuant
* to title 17 Section 105 of the United States Code this software is not subject to... |
(Image: Lauren Walker / Truthout)
Stories like this only get published because of reader support. Want to see more of them? Donate to Truthout today to ensure we have a future!
At a protest in downtown Denver, on April 29, 2015, a police officer stole Jessica Benn’s smartphone.
Benn had been filming her husband, Jes... |
<reponame>gabrielfernandes320/nestjs-template-v1.0
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsersController } from './infra/http/UsersController';
import { User } from './infra/typeorm/entities/UserEntity';
import providers from './providers';
import ShowUserByE... |
def handle_callback_query(bot, update, session, user):
query = update.callback_query
data = query.data
[callback_type, payload, action] = data.split(':')
callback_type = int(callback_type)
action = int(action)
chat = session.query(Chat).get(query.message.chat.id)
tg_chat = query.message.chat... |
/**
* <p>Java class for customer-wishlist-itemType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="customer-wishlist-itemType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema... |
import pandas
import matplotlib.pyplot as plt
import datetime
f = open('UNRATE.csv', 'r')
data = f.read()
rows = data.split('\n')
unrate=[]
for row in rows:
song=row.split(',')
unrate.append(song)
print(unrate)
xaxis=["2017/1/1","2017/2/1","2017/3/1","2017/4/1","2017/5/1","2017/6/1","2017/7/1","2017/8/1","20... |
from rest_framework import status
from django.contrib.auth import get_user_model
from rest_framework.reverse import reverse
from django.utils.encoding import force_text
from django.utils.http import urlsafe_base64_encode
from django.contrib.auth.tokens import default_token_generator
from .basetest import BaseTestCase
... |
#include <bits/stdc++.h>
using namespace std;
typedef long long int LLI;
LLI gcd(LLI a, LLI b){ return (b == 0 ? a : gcd(b, a%b)); }
LLI lcm(LLI a, LLI b){ return a * b / gcd(a,b); }
int main(void)
{
LLI a,b,c,d;
cin >> a >> b >> c >> d;
// reduce fractions
LLI d1 = gcd(a,b);
a /= d1;
b /= d1;
LLI... |
<reponame>chuwwwi/minter-sdk<gh_stars>10-100
-- | No allowlisting.
--
-- This module is to be imported qualified.
module Lorentz.Contracts.NoAllowlist where
import Lorentz
type Allowlist = ()
type Entrypoints = Never
|
# Generated by Django 2.2.13 on 2020-06-25 13:55
from django.db import migrations
class Migration(migrations.Migration):
atomic = False
dependencies = [
('cms', '0053_auto_20200625_1453'),
]
operations = [
migrations.RenameModel(
old_name='BlogGuestAuthor',
n... |
The run was as hard to believe as the game it won.
Six different Saints touched Marshawn Lynch on the play when he never went down, a 67-yard touchdown run. If ever there was an exclamation point, Lynch delivered it with a one-armed shove that knocked Saints cornerback Tracy Porter 5 yards backward.
And once Lynch re... |
package main
import (
"flag"
"os"
"webscraper"
)
func main() {
url := flag.String("url", "", "example https://en.wikipedia.org/wiki/Slope_One")
depth := flag.Int("depth", 1, "integer value e.g. 1")
pattern := flag.String("pattern", "", "regex pattern to extract link e.g. ")
rate := flag.Int("rate... |
// Keys returns the keys of the set in the order of insertion.
func (s *OrderedHashSet) Keys() []interface{} {
keys := make([]interface{}, s.order.Len())
i := 0
for element := s.order.Front(); element != nil; element = element.Next() {
keys[i] = element.Value
i++
}
return keys
} |
<reponame>tanimoto/watchit<filename>src/WatchIt.hs
{-# LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------
-- |
-- Module : WatchIt
-- Copyright : (c) 2014 <NAME>
-- License : BSD3
--
-- Maintainer : <NAME> <<EMAIL>>
--
--------------------------------... |
/**
* Created by Jayson on 8/7/2017.
* <p>
* This Fragment handles the UI for the Time Attack game mode
*/
public class PracticeGameFragment
extends GameFragment
implements PracticeGameContract.View {
public final String LOG_TAG = this.getClass().getSimpleName();
// Reference to our presen... |
<filename>src/main/java/net/nharyes/drivecopy/biz/wfm/TokenWorkflowManagerImpl.java
/*
* Copyright 2012-2015 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.a... |
<filename>src/main/java/de/maximilianheidenreich/jnet/net/Connection.java
package de.maximilianheidenreich.jnet.net;
import de.maximilianheidenreich.jeventloop.utils.ExceptionUtils;
import de.maximilianheidenreich.jnet.events.RecvPacketEvent;
import de.maximilianheidenreich.jnet.packets.AbstractPacket;
import de.maxim... |
Complaining about your boss and pay is a favorite pastime of everyone from assembly-line workers to corporate cubicle neighbors. But what if you work from home? Or drive an Uber? If you don’t even know who your fellow employees are, how can you commiserate with them?
If you’re not an employee, you can’t join a union. ... |
/**
* The agent database stores necessary data about connected agents. The data is then used to call
* the agents signing service and to generate the ssh authentication request.
*/
public class AgentDatabase extends RobustSQLiteOpenHelper {
public static final String TAG = "TB.AgentDatabase";
public static final ... |
/**
* @author Quentin Boileau (Geomatys)
*/
public class ParameterDescriptorJSONSerializer extends JsonSerializer<GeneralParameterDescriptor> {
@Override
public void serialize(GeneralParameterDescriptor generalParameterDescriptor, JsonGenerator writer, SerializerProvider serializerProvider) throws IOExceptio... |
// removeChannel removes the given channel with the index from the given
// channels slice in an unordered fashion.
func removeChannel(channels []*discord.Channel, i int) []*discord.Channel {
channels[i] = channels[len(channels)-1]
channels[len(channels)-1] = nil
channels = channels[:len(channels)-1]
return channel... |
Tuesday night’s celebrity-studded gala to raise money for victims of Harvey and Irma certainly didn’t have the draw that previous fundraisers have had. Beyoncé, who provided a recorded message, did managed to make some viewers’ ears perk up, though, at around the 1:25 mark. That’s when she got into the effects of clima... |
<gh_stars>100-1000
//! Stock class entries registered with PHP, primarily exceptions.
#![allow(clippy::unwrap_used)]
use crate::ffi::{
zend_ce_argument_count_error, zend_ce_arithmetic_error, zend_ce_compile_error,
zend_ce_division_by_zero_error, zend_ce_error_exception, zend_ce_exception,
zend_ce_parse_er... |
//! userlevel=Advanced
//: /dev/audio IO base class.
class SphereBaseC
: public AudioIOBaseC
{
public:
SphereBaseC();
SphereBaseC(const StringC &fn,int channel,bool forInput,const type_info &dtype);
~SphereBaseC();
bool IOpen(const StringC &fn,int channel,const type_info &dtype);
bool OOpen... |
<reponame>cping/LGame<gh_stars>100-1000
package loon.utils.reflect;
import loon.gwtref.client.Type;
@SuppressWarnings("rawtypes")
public final class Field {
private final loon.gwtref.client.Field field;
Field (loon.gwtref.client.Field field) {
this.field = field;
}
public String getName () {
return field.g... |
package execution_agent.execution;
import execution_agent.objects.RecoveryAction;
/**
* Created by alex on 13.09.17.
*/
public interface ActionExecutionInterface {
void executeAction(RecoveryAction action);
}
|
<gh_stars>1-10
#ifndef ROSE_BinaryAnalysis_String_H
#define ROSE_BinaryAnalysis_String_H
#include <MemoryMap.h>
#include <Sawyer/CommandLine.h>
#include <Sawyer/Optional.h>
namespace rose {
namespace BinaryAnalysis {
/** Suport for finding strings in memory.
*
* This namespace provides support for various kinds o... |
/**
* Basic hash bin node, used for most entries. (See below for
* TreeNode subclass, and in LinkedHashMap for its Entry subclass.)
*/
static class Node<K,V> implements Map.Entry<K,V> {
final int hash;
final K key;
V value;
Node<K,V> next;
Node(int hash, K key, V... |
/**
* @return removes the component with the specified class from the entity and returns it.
* Returns null if no component could be removed.
*/
@Override
public <T extends Component> Component remove(long entityId, Class<T> componentClass) {
ReentrantLock lock = locks[selectLock(entityId)];
... |
/**
* Expands a node in the specified tree.
*
* @param tree a tree, which nodes should be expanded
* @param visitor a visitor that controls expanding of tree nodes
* @param consumer a path consumer called on EDT if path is found and expanded
*/
public static void expand(@NotNull JTree tree, @NotN... |
/**
* An application event published when OS account instances are added to the
* Sleuth Kit data model for a case.
*/
public final class OsAcctInstancesAddedEvent extends TskDataModelChangedEvent<OsAccountInstance, OsAccountInstance> {
private static final long serialVersionUID = 1L;
/**
* Constructs... |
<filename>src/main/java/mchorse/metamorph/client/gui/editor/GuiAnimation.java
package mchorse.metamorph.client.gui.editor;
import mchorse.mclib.client.gui.framework.elements.GuiElement;
import mchorse.mclib.client.gui.framework.elements.buttons.GuiButtonElement;
import mchorse.mclib.client.gui.framework.elements.butto... |
/**
* @brief Allocates memory block and initializes it with random data
*
* This is to avoid any page faults or copy-on-write exceptions later on
* when measuring cycles.
*
* For simplicity, malloc() is used to allocate memory. Ideally special
* allocator should be used that allocates physically contiguous memor... |
Shutterstock
The next phone in Huawei's high-end P Series, which according to the numerical naming system of the range will be the P8, is set for a London launch on 15 April.
Huawei will not be unveiling any new phones at Mobile World Congress -- just three wearable devices -- and will instead hold a separate event i... |
<gh_stars>1-10
/* Output bytecodes for GNU C-compiler.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 versio... |
<gh_stars>0
#include "stdafx.h"
void world::init(int size)
{
this->size = size;
size *= size;
chunks = new chunk[size]();
//printf("%d,%d,%d",chunks[0].size(),chunks[1].size(),chunks[2].size());
earch = new surface();
characters = new std::vector<character*>();
set_bg(0,0,0);
set_view_distance(size / 5,size... |
#include <bits/stdc++.h>
using namespace std;
#define SWAP(x,y,z) {if ( y > z ) swap(y,z); if ( x > y ) swap(x,y); if (y > z) swap(y,z);}
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
double const eps = 1e-6;
double const pi = 3.1415926535;
ll const mod = 1e9+7;
in... |
<reponame>midoblgsm/ubiquity-csi<gh_stars>0
package main
import "C"
import (
"errors"
"fmt"
"log"
"net"
"os"
"sync"
"github.com/BurntSushi/toml"
"github.com/midoblgsm/ubiquity-csi/controller"
csi_utils "github.com/midoblgsm/ubiquity-csi/utils"
"golang.org/x/net/context"
"google.golang.org/grpc"
"flag"
... |
/*
* Removes the nth SpeciesFeatureType from the ListOfSpeciesFeatureTypes.
*/
SpeciesFeatureType*
MultiSpeciesType::removeSpeciesFeatureType(unsigned int n)
{
return mListOfSpeciesFeatureTypes.remove(n);
} |
/**
* @version $Rev$ $Date$
*/
public class RequestContextImpl implements RequestContext {
private ProxyFactoryExtensionPoint proxyFactoryExtensionPoint;
public RequestContextImpl(RuntimeComponent component) {
ExtensionPointRegistry registry = component.getComponentContext().getExtensionPointRegistr... |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include ... |
/**
* Utility class for internal needs.
*/
final class SecurityUtil {
private static final Logger LOGGER = Logger.getLogger(SecurityUtil.class.getName());
private SecurityUtil() {
}
static Set<Class<? extends Annotation>> getAnnotations(Map<SecurityProvider, Boolean> providers) {
Set<Class<?... |
/**
* Add a column to the end of a table.
* @param o An array of identically structured objects with the
* same number of elements as other columns in the table.
*
* @return _more_
*
* @throws FitsException _more_
*/
public int addColumn(Object o) throws FitsExce... |
package protoc
import "github.com/urfave/cli"
var Cmd = cli.Command{
Name: "protoc",
Aliases: []string{"p"},
Usage: "ox protoc tools",
Action: Run,
SkipFlagParsing: false,
UsageText: ProtocHelpTemplate,
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "grpc,g",
... |
def _iterate_folder_db(self):
folder = self._stack_item._convert_folder_to_db()
self.bookmarks.append(folder)
parent_id = folder.id
for child in self._stack_item:
child.parent_id = parent_id
if child.type == "folder":
if child.children:
... |
/**
* Transposes the given tabular data, swapping rows with columns.
*
* @param <T> the type of the table
* @param table the table
* @return the transposed table
* @throws NullPointerException if the given table is {@code null}
*/
public static <T> List<List<T>> transpose(final List... |
<gh_stars>0
export class MinBinaryHeap {
_values: number[];
constructor() {
this._values = [];
}
insert(value: number) {
let newValueIndex = this._values.push(value) - 1;
let parentIndex: number | undefined, temp: number;
// bubble up
while (parentIndex !== 0) {
parentIndex = Math.f... |
/* Simple ... UifU the args and per-lane pessimise the results. */
static
IRAtom* binary8Ix16 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
{
IRAtom* at;
at = mkUifUV128(mce, vatom1, vatom2);
at = mkPCast8x16(mce, at);
return at;
} |
def unrange(data, rangechar, joinchar):
"""
data - string, e.g. '8,10-13,20'
rangechar - e.g. '-' for above string
joinchar - e.g.',' for above string
returns - e.g. '8,10,11,12,13,20 string
"""
result=[]
# check if range char actually in data:
if not rangechar in data: return data, ... |
export class Student {
constructor(
public id: number,
public name: string,
public legalRepresentative: any,
public birthday: Date,
public address: string
) {}
}
|
import { Text } from '../db/Text';
import { IProxyText } from './IProxyText';
import { StringUtils } from '../../Utils/StringUtils';
import { ISO8601Util } from '../../Utils/ISO8601Util';
import { UberApplication } from '../../UberApplication';
export class ProxyText implements IProxyText
{
private _Text_id:n... |
Steelers Notebook: Colbert quietly team's 1st GM
The Steelers make known their big promotions by saying nothing. They have done that again through their usual means of merely changing a title in their media guide.
Kevin Colbert has been promoted to general manager by the team, becoming the first to hold that title in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.