content stringlengths 10 4.9M |
|---|
package jadx.plugins.input.dex;
import java.util.Collections;
import java.util.List;
import jadx.api.plugins.options.OptionDescription;
import jadx.api.plugins.options.impl.BaseOptionsParser;
import jadx.api.plugins.options.impl.JadxOptionDescription;
public class DexInputOptions extends BaseOptionsParser {
privat... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include "RecordStructure.hpp"
#include "RecordSequence.hpp"
#include "observation_file_writer_txt.hpp"
using namespace std;
int
main
(int argc, char** argv)
{
{
// The name of the output file.
string outfile_name;
//
... |
n = int(input())
def cal(n):
p = []
for i in range(1,int(n**0.5)+1):
if n%i == 0:
p.append([i,n//i])
return p
a = cal(n)
t = 1
for i in range(len(a)):
if 1 <= a[i][0] <= 9 and 1 <= a[i][1] <= 9:
t = 0
print('Yes')
break
if t == 1:
print('No') |
It's often said that respect is earned on the battlefield and that regularly it happens in the mixed martial arts cage.
Two fighters who are at loggerheads in the build up to a fight are often seen embracing after like long lost members of family after, but not all of them. For some, the feud rages on and that seems t... |
<reponame>damaaryoung/tagihboss
import { PluginFunction } from "vue";
import { VueConstructor } from "vue/types/vue";
import ToastInterface from "./ts/interface";
import { POSITION, TYPE } from "./ts/constants";
import { PluginOptions } from "./types";
import "./scss/index.scss";
declare function createToastInterface(e... |
<gh_stars>0
pub mod http;
pub mod stock_quote;
#[cfg(test)]
mod tests {
use crate::stock_quote::StockQuote;
#[test]
fn it_should_serialize_from_json() {
let test_input = [
r#"{"symbol":"aapl","source":"yahoo"}"#,
r#"{"symbol":"cdr","source":"stooq"}"#,
r#"{"symb... |
# Copyright (c) 2013 - 2019 <NAME> and Contributors.
# This file is part of YAWAST which is released under the MIT license.
# See the LICENSE file or go to https://yawast.org/license/ for full license details.
from yawast.scanner.session import Session
from yawast.shared import network, output
def check_redirect(... |
// TODO: need optimization, only clone when necessary
func (c *schedulerCache) Snapshot() *Snapshot {
c.mutex.RLock()
defer c.mutex.RUnlock()
out := NewEmptySnapshot()
out.clusterInfoList = make([]*framework.ClusterInfo, 0, len(c.clusters))
for _, cluster := range c.clusters {
cloned := cluster.DeepCopy()
out.... |
Brief History
Wentworth Castle Gardens & Stainborough Park - extending to over 500 acres – is the former seat of the Earls of Strafford and has been the subject of a major restoration project. Rare formal gardens have been rediscovered and new gardens created to bring the estate back to its former glory. It is the onl... |
<gh_stars>1-10
import { UseGuards } from "@nestjs/common";
import { Args, Context, Resolver } from "@nestjs/graphql";
import { PrismaService } from "../prisma/prisma.service";
import { User } from "./model/user.model";
import { UserService } from "./user.service";
import { Query, Mutation } from "@nestjs/graphql";
impo... |
// NewRouter creates a router for an input channel and begins reading immediately
func NewRouter() (*Router) {
var channelMap = make(map[string]chan OrdinalValue)
router := Router {
channelMap: channelMap}
return &router
} |
package player
import (
"sync"
"github.com/golang/protobuf/proto"
)
//在线玩家管理器
type OnlinePlayerManager interface {
GetPlayerById(playerId int64) *Player
BroadcastMsg(msg proto.Message)
PlayerEnterServer(p *Player) bool
PlayerLeaveServer(p *Player)
}
type onlinePlayerManager struct {
rwm sync.RWMutex
//角色map... |
// SwitchToParentFrame focuses on the immediate parent frame of a frame selected
// by Selection.Frame. After switching, all new and existing selections will refer
// to the parent frame. All further Page methods will apply to this frame as well.
//
// This method is not supported by PhantomJS. Please use SwitchToRootF... |
// Internal copy or move implementation
func (storage *PublishedStorage) internalCopyOrMoveBlob(src, dst string, metadata azblob.Metadata, move bool) error {
const leaseDuration = 30
dstBlobURL := storage.container.NewBlobURL(filepath.Join(storage.prefix, dst))
srcBlobURL := storage.container.NewBlobURL(filepath.Joi... |
Guinness Book of World Records Judge Kimberly Partrick inspects and certifies the world's largest chocolate bar, weighing in at 12,190 pounds and measuring 21-feet long, 4-feet wide and 3-feet high on Tuesday, Sept. 13, 2011 in Chicago. UPI/Brian Kersey | License Photo
Garry Hine, left, and Gary Wychocki attach a gian... |
def _send_task(self, task, start_time, timeout):
task_writer = self._task_channel[1]
data_len = len(task.data)
data = struct.pack('=I', data_len) + task.data
if len(data) <= BUF_SIZE:
error_no = try_write(task_writer, data)[1]
if error_no:
if err... |
Photo
BEIJING — China announced a further sharp increase in military spending on Tuesday, a day after the United States renewed its warning that a lack of openness surrounding the rapid buildup of China’s armed forces posed a threat to stability in Asia.
China’s military budget for 2008 will increase by 17.6 percent ... |
// New creates a new ring buffer pipeline element.
func New(size int) *Buffer {
return &Buffer{
ring: ring.New(size),
}
} |
<reponame>pedro-tavares/iaf
/*
Copyright 2013 Nationale-Nederlanden
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... |
Affinity modulation of photoresponsive hosts for fullerenes: light-gated corannulene tweezers.
Six azobenzene derivatives bearing polyaromatic fragments have been prepared and their reversible photoisomerization has been assessed. Corannulene-functionalized molecules have demonstrated excellent switchable hosting abil... |
def edowham(alpha_p, e_eff):
param_elasticity = alpha_p * e_eff
return param_elasticity |
/****************************************************************************
ePMC - an extensible probabilistic model checker
Copyright (C) 2017
This program 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 Softw... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch.nn import functional as F
from maskrcnn_benchmark.layers import smooth_l1_loss
from maskrcnn_benchmark.modeling.matcher import Matcher
from maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou
from maskrcnn_benchmar... |
/*
Copyright (c) 2017-2018 <NAME> Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to ... |
package org.dxworks.jiraminer.configuration;
public class JiraMinerConfigValidation {
public static void notNull(Object o, String message, Object... values) {
if (o == null)
throw new InvalidConfigurationException(String.format(message, values),
new NullPointerException());... |
/**
* Based on <a href="http://schmidt.devlib.org/jiu/">Java Image Util</a>.
* <p>
* Note that the filter method is not thread-safe.
* </p>
*
* @author Morten Nobel-Joergensen
* @author Heinz Doerr
*/
public class ResampleOp extends AdvancedResizeOp {
private static final int MAX_CHANNEL_VALUE = 255;
priva... |
A covalent organic framework bearing thioether pendant arms for selective detection and recovery of Au from ultra-low concentration aqueous solution.
A fluorescent covalent organic framework (COF), featuring precise distribution of thioether pendant arms inside the cavity, was designed. The thioether-functionalized CO... |
package com.github.teocci.udpsimglethread.listeners;
import com.github.teocci.udpsimglethread.model.DeviceInfo;
/**
* Created by teocci.
*
* @author <EMAIL> on 2017/Mar/31
*/
public interface ContactUpdateReceiver
{
void onDeviceUpdate(final DeviceInfo[] deviceInfo);
void onDeviceRegistered(final String... |
<gh_stars>0
package controller
import (
"time"
"go.charczuk.com/project/kana-server/pkg/types"
)
// CreateHomeViewModel creates a home view model.
func CreateHomeViewModel(all []*types.Quiz) (hvm HomeViewModel) {
hvm.TotalQuizzes = len(all)
for _, q := range all {
hvm.TotalQuizResults += len(q.Results)
for _... |
/**
* Default set of commands.
*/
public class DefaultCommands implements Supplier<List<Command>> {
private final List<Command> commands;
@Inject
public DefaultCommands(Injector injector) {
this.commands = ImmutableList.<Command>builder()
.add(injector.getInstance(VersionCommand.class))
.add(i... |
<gh_stars>10-100
package server
import (
"context"
"strconv"
"testing"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"github.com/lileio/account_service"
"github.com/stretchr/testify/assert"
)
func TestCreateSuccess(t *testing.T) {
truncate()
account := createAccount(t)
assert.NotEmpty(t, accoun... |
/*
* tree_map_get -- searches for a value of the key
*/
uint64_t
tree_map_get(struct tree_map *map, uint64_t key)
{
return tree_map_get_from_node(map->root, key);
} |
<filename>cricle-camel-web/src/main/java/com/qunar/qtalk/cricle/camel/common/dto/CamelPostManageResultDto.java
package com.qunar.qtalk.cricle.camel.common.dto;
import com.google.common.collect.Lists;
import lombok.Data;
import java.util.List;
/**
* 给后台管理系统,将帖子内容按照文本和图片分开
*/
@Data
public class CamelPostManageResult... |
Characterization of the Filum terminale as a neural progenitor cell niche in both rats and humans
Abstract Neural stem cells (NSCs) reside in a unique microenvironment within the central nervous system (CNS) called the NSC niche. Although they are relatively rare, niches have been previously characterized in both the ... |
<filename>src/download/download.ts<gh_stars>0
import { DataUrlConfig, ResponseType } from '../models'
// tslint:disable-next-line: no-var-requires
const axios = require('axios')
export class Download {
private getMimeType(responseType: ResponseType): any {
switch (responseType) {
case 'application/json':
... |
package cpp.course.vo;
import cpp.course.po.CourseContent;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
// 包含子目录的课程章节
public class CourseContentVo extends CourseContent {
List<CourseContent> contents = new ArrayList<>();
public List<CourseContent> getContents() {
... |
Have you ever noticed some shady character mucking about in a subway station on the opposite platform, on the other side of the tracks, perhaps yelling profanities and acting belligerent, and thought yourself, "Golly, I'm glad that ne'er-do-well isn't on my side! Over here I can enjoy my Lady Chatterley's Lover in peac... |
// NewRegion creates a track region by specifying its start corner, length,
// and width.
func NewRegion(track *Track, c1 Point, len, width phys.Meters) *Region {
if c1.Dofs < 0 {
panic(fmt.Sprintf("NewRegion: c1.Dofs=%v invalid; must be >= 0", c1.Dofs))
}
if c1.Dofs >= track.CenLen() {
panic(fmt.Sprintf("NewReg... |
// for sorting the new population
private class Priority implements Comparator<Node> {
public int compare(Node n1, Node n2) {
int num1 = n1.fitness_value;
int num2 = n2.fitness_value;
return num2 - num1;
}
} |
async def wait_for(
self,
event_cls: type[EventT],
/,
*,
check: Optional[Callable[[EventT], bool]] = None,
timeout: Optional[int] = None,
) -> EventT:
future = self._event_handler.add_waiter(event_cls, check=check)
return await asyncio.wait_for(future,... |
<reponame>cnmydida/pandapay
package org.pandapay;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static o... |
# Generated by Django 3.1.7 on 2021-04-13 14:32
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ensembl_metadata', '0003_auto_20210325_1242'),
]
operations = [
migrations.CreateModel(
name='D... |
/**
* Copy the previous synchronized projects into a new collection.
*/
private Collection<ProjectVo> copyProjects() {
Collection<ProjectVo> oldProjects = new ArrayList<>();
if(this.projects != null) {
oldProjects.addAll(this.projects);
}
return oldProjects;
} |
package com.innorb.recipeapp.service;
import java.util.ArrayList;
import com.innorb.recipeapp.model.Recipe;
import retrofit2.Call;
import retrofit2.http.GET;
public interface UdacityService {
@GET(" ")
Call<ArrayList<Recipe>> getUdacityService();
}
|
from tpg.program import Program
import numpy as np
import random
from tpg.utils import flip
from tpg.action_object import ActionObject
"""
Action Object has a program to produce a value for the action, program doesn't
run if just a discrete action code.
"""
class ConfActionObject:
def init_def(self, initParams=N... |
package s3
import (
"github.com/mitchellh/goamz/aws"
goamzs3 "github.com/mitchellh/goamz/s3"
)
type Client struct {
s3 *goamzs3.S3
bucket *goamzs3.Bucket
}
func New(accessKey, secretKey, bucketName, endPointURL string) *Client {
auth := aws.Auth{
AccessKey: accessKey,
SecretKey: secretKey,
}
region :... |
def reloader(mod):
importlib.reload(mod) |
// SetGlobalConfig imports settings from the global configuration
func (c *ConfigRequest) SetGlobalConfig(g *shared.GlobalConfig) {
c.V1.Sys.Mlsa = g.V1.Mlsa
c.V1.Sys.Service.ExternalFqdn = g.V1.Fqdn
if logLevel := g.GetV1().GetLog().GetLevel().GetValue(); logLevel != "" {
c.V1.Sys.Log.Level.Value = GlobalLogLevel... |
Some Parametric Studies on Separation of Palladium from Perchloric Acid Medium by Radiolytic Reduction
Abstract The radiolytic reduction of palladium ions to palladium metal in perchloric acid solutions has been studied with the aim of separating palladium from aqueous acidic waste. Fraction of Pd separated out as pre... |
/**
* This class is used to score the plant. Plants are scored for how green they are after a specified
* number of iterations.
*/
public class PlantScore implements ScoreFunction {
/**
* {@inheritDoc}
*/
@Override
public double calculateScore(final MLMethod algo) {
DoubleArrayGenome ... |
Interview With Tim Tuohy
(October 2011)
Tim Tuohy edited DAREDEVIL for a short run at the end of Volume 1 and had the unenviable task of taking over from former editor Jaye Gardner just as the "Flying Blind" arc was underway. Here we discuss that oft-maligned arc, the final issue by Chichester and Weeks, and working ... |
# Copyright (C) 2006-2007 <NAME> <<EMAIL>>
# Copyright (C) 2012 <NAME> <<EMAIL>>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of t... |
// Upload the photo stored in this instance
public void uploadPhoto() {
if (!SystemUtilities.isOnline(CloudCameraApplication.getAppContext())) {
SystemUtilities.reportError(TAG, "Cannot upload photo without internet connection. Visit upload screen to retry.");
this.setAborted(true);
... |
What do progressives want now? Obviously, they want a Democratic victory in 2016—a goal for which some, but not all, of them are willing to swallow their reservations about Hillary Clinton. But there’s a larger question. After six years of the Obama Administration—which has been, from the progressive perspective, a tim... |
def evaluate(di, le, po, out, query, syn):
print "not positional"
q_vector = vectorize_query(di,len(le), query)
postings = get_posts(di, po, syn)
candidates = get_candidates(postings, le)
window = get_window(candidates)
return get_final(candidates, q_vector, window) |
def _get_hostclass(self, group_name):
parts = group_name.split('_')[1:-1]
return '_'.join(parts) |
def testJ_GetCell50(self):
g = Grid(0,-10, 1,0, 1);
i,j = g.getCell(.1,-9.1,)
self.failUnlessEqual(i,0)
self.failUnlessEqual(j,0)
i,j = g.getCell(.1,-.1)
self.failUnlessEqual(i,0)
self.failUnlessEqual(j,9)
i,j = g.getCell(.1,9.1)
self.failUnle... |
<gh_stars>100-1000
package kedge_http
import (
"crypto/tls"
"net/http"
"github.com/improbable-eng/kedge/pkg/http/tripperware"
kedge_map "github.com/improbable-eng/kedge/pkg/map"
"golang.org/x/net/http2"
)
// NewClient constructs new HTTP client that supports proxying by kedge.
// NOTE: No copy of parentTranspor... |
/**
* This builder is opinionated; 1. It assumes that false is a reasonable default for sslEnabled and
* corsEnabled. 2. It assumes empty array for enabledEndpoints is a reasonable default 3. It assumes
* "*" is a reasonable default for corsOrigin 4. Any "unset" objects get initialized to null
*/
public abstract cl... |
/**
* This template adds to each test a parameter and an item of a sequence.
* <p>
* The tests are created from the parameters (each new test will have a
* different parameter and adopt the parameter's name) and there will be many
* rounds each one named after the name of the test combined with the
* string repre... |
def makeit(n,k):
return ((5+5*n)*n/2)<=(240-k)
n, k = map(int, input().split())
start = 0
end = n
m = -1
while(start<=end):
a = (start+end)//2
if(makeit(a,k)):
m = max(m,a)
start=a+1
else:
end=a-1
print(m) |
/** Enum variants that represent a symbol (e.g `->`, `@`)
Each of them follow [unicode name](http://xahlee.info/comp/unicode_index.html) */
pub mod Symbol {
pub use super::Rule::TriggerAt as at;
pub mod arrow {
pub use crate::core::Rule::{
TransitionTo as right,
TransitionFrom as left,
Transitio... |
/**
* The implementation of the interface {@link TraceStepIF} used by SMC.
*
* @author Wenhao Wu (wuwenhao@udel.edu)
*/
public class TraceStep implements TraceStepIF<Integer> {
/**
* The transition related with <code>this</code> trace step.
*/
private String transition;
/**
* The final state of <code>thi... |
// WithServerValidator validate fields,
// all==true return all fields error, otherwise return first error
func WithServerValidator(all bool) ServerOption {
return newFuncServerOption(func(so *serverOptions) {
so.interceptors = append(so.interceptors, validator.UnaryServerInterceptor(all))
})
} |
/**
* Method returns whether a method is called from a public method in the same class or not.
* Calls itself recursively until no more calls are found. Method does currently not
* differentiate between overloaded methods since it compares names of methods at this time.
*
* @param allMethods ... |
<reponame>lokinn7/wechatsdk
package com.riversoft.weixin.qy.contact;
import com.riversoft.weixin.qy.TestConfiguration;
import com.riversoft.weixin.qy.contact.user.Invitation;
import com.riversoft.weixin.qy.contact.user.ReadUser;
import com.riversoft.weixin.qy.contact.user.SimpleUser;
import org.junit.Assert;
import or... |
<gh_stars>1-10
import { memo } from '../decorators/memo.decorator'
import { secret } from '../environment/secret'
import { gotService } from '../srv/got.service'
import { timeUtil } from '../util/time.util'
class SLApiService {
@memo({
ttl: 15000,
})
async getDepartures (siteId: string, timeWindow: number = ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
#define M_PI_H 3.14159265358979323846 / 2 /* pi by two*/
#define rep(i, start, end) for (int i = start; i < end; i++)
#define repr(i, start, end) for (int i = start; i >= end; i--) //INCLUSIVE
int ... |
<gh_stars>1-10
import { Table, Model, PrimaryKey, AutoIncrement, Column, ForeignKey, BelongsTo, DataType } from "sequelize-typescript";
import { Person } from "../../person/models/Person";
@Table({ timestamps: true, tableName: 'AddressPerson' })
export class AddressPerson extends Model<AddressPerson> {
@Primary... |
//
// This implementation uses a linked list instead of a stack, because, while
// in atomic 'pop' operations, reducing the benefit of the stack archetype.
func (p *bracketPairer) locateBrackets(pairTypes []bracketType, pairValues []rune) {
for i, index := range p.indexes {
if pairTypes[index] == bpNone || p.codesIs... |
use std::{convert::TryFrom, path::PathBuf};
use backblaze_b2_async_plain::v2::{
b2_download_file_by_id, AuthorizeAccountOk, DownloadParams, FileId,
};
use reqwest::Response;
use structopt::StructOpt;
use tokio::{
fs::File,
io::{self, AsyncWriteExt},
};
#[derive(StructOpt)]
#[structopt(
name = "b2_downl... |
<reponame>smartcontractkit/chainlink-relay<filename>pkg/monitoring/metrics.go
package monitoring
import (
"fmt"
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// Metrics is a thin i... |
def search_paths_from_description(desc):
paths = []
if desc.package:
dirname = package_dirname(desc.package)
paths.append(("", dirname))
elif desc.qualified_name:
dirname = package_dirname(package(desc.qualified_name))
paths.append(("", dirname))
if hasattr(desc, "search_... |
#import "IFKShape.h"
@interface IFKRegularPolygonShape : IFKShape
@property (nonatomic, copy) NSNumber *inputCircumradius;
@property (nonatomic, copy) CIVector *inputBorderRadiuses;
@end
|
<filename>spec/components/mongodb/MongoMeasurableSpec.ts
import {MongoMeasurable} from '../../../src/components/mongodb/MongoMeasurable';
import {MongoQuery} from '../../../src/components/mongodb/MongoQuery';
describe('A MongoMeasurable', () => {
const mongoQueryMock = {
constructor: {
name: 'MongoQuery',
... |
def load_config(self, config_file=None):
config_path = pkg_resources.resource_filename("snake", "data/config/snake.conf")
try:
with open(config_path, 'rb') as stream:
base_config = yaml.safe_load(stream)
self.snake_config.update(base_config)
except Excepti... |
// ConstructionCombineResponse returns an error if
// a *types.ConstructionCombineResponse does
// not have a populated SignedTransaction.
func ConstructionCombineResponse(
response *types.ConstructionCombineResponse,
) error {
if response == nil {
return ErrConstructionCombineResponseIsNil
}
if len(response.Sign... |
The Sandakan Magistrate's Court today slapped a foreigner with a three-year jail sentence for breaking into a restaurant and stealing RM1.
Abu Huraira Razak, 27, who pleaded guilty before Magistrate Faelly Jeffrey Lanjungan, was also ordered to pay a fine of RM5,000 or serve 12 months in prison.
The court also ordere... |
/**
* Frees all resources associated with this Mesh
*/
public void dispose() {
if (meshes.get(graphics.getApp()) != null)
meshes.get(graphics.getApp()).removeValue(this, true);
vertices.dispose();
if (instances != null) instances.dispose();
indices.dispose();
} |
def curveFromSelection(startFrame, endFrame, curveName='', cleanCurve=False):
sel = cmds.ls(selection=True)
if not sel:
logger.warning("Nothing selected")
return []
createdCurves = []
for obj in sel:
newCurve = curveFromAnim(obj ,startFrame, endFrame, curveName, cleanCurve)
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Copyright (c) 2013, <NAME> All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* Redi... |
<filename>tupletest.cpp
#include <iostream>
using namespace std;
int main()
{
//数组名的用途
//1. 通过数组名计算数组占用内存大小
int arr[5] ={1,2,3,4,5} ;
cout << "每个数组占用空间大小:" << sizeof(arr[0]) << endl;
cout <<"数组占用空间大小:" << sizeof(arr) << endl;
cout <<"数组中元素数量:" <<sizeof(arr)/sizeof(arr[0]) << endl;
//2. 通过数组名查看数组首地址;
//... |
/**
* Showcase for API to trigger message replay using string representation of a replication group
* message Id
*
* @param service ready configured and connected service instance
* @param queueToConsumeFrom queue to consume from messages
* @param replicationGr... |
A welcome hybrid of old and new school MMO mechanics
The Elder Scrolls Online has a lot to prove.
Not only does developer Zenimax have to placate the fans of old, and sell them on the idea of a subscription based MMO, but they also have to bring in fans who have never played the franchise if they want to sustain thei... |
<gh_stars>0
from flask_restful import Resource, reqparse
from models.tipo import TipoModel
class TipoController(Resource):
def get(self,nombre):
# USO DEL LIKE EN SQL-ALCHEMY
resultado = TipoModel.query.filter(TipoModel.tipo_desc.like('%'+nombre+'%')).all()
if resultado:
resulta... |
MELBOURNE City has pulled off another stunning coup, this time signing 100-time Irish international Damien Duff.
But the real bonus for City fans is the fact that Duff, a two-time English Premier League winner with Chelsea, has signed a one-year deal under the club’s $2.55 million salary cap, as revealed by the Herald... |
I wrote this a while back, about the top 10 skills needed for a job based on some LinkedIn research. Actually spent some time in Northampton, MA over the holidays after I wrote that post (was with friends), and one of my friends told me a point I had made in there resonated a lot: namely, the types of people who use Li... |
#include <cstdio>
#include <algorithm>
using namespace std;
int n, a[100010], r;
int main(){
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
sort(a, a + n);
if (a[0] == a[1]) {
if (a[1] == a[2]) {
long long c = 0;
for (int i = 0; i < n; i++)
if (a[i] == a[1])c++;
pri... |
<filename>kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/fast/KrbFastArmoredReq.java
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyrig... |
/**
* Verifies that the given user image id exists.
* Throws NOT_ACCEPTABLE error if user image id does not exists.
*
* @param userId the id of the user which has images.
* @param imageId the id of the image.
* @throws ResponseStatusException an HTTP error with code and error message.
... |
Two weeks ago, I announced the Bad Code Offsets project. It's a way to undo the bad code you other people have written without actually replacing the bad code. Much like carbon offsets, money used to buy Bad Code Offsets goes towards open-source projects which not only produce good code, but produce software that helps... |
//
// Copyright 2019 <NAME> <mateusz at loskot dot net>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/gil.hpp>
#include <boost/mp11.hpp>
#include <boost/core/lightweight_test.hpp>
#include ... |
// import functions via scripts resources
import * as Enums from "../resources/constants/enums";
// import components
import { Header } from './components/header/header';
import { Footer } from './components/footer/footer';
// import styles
import './index.scss';
export class Index {
constructor(
header: Heade... |
def encodings_l10n(input_files, output, base):
output = open(output, 'w')
reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)]+)"\s+[\w-]+\s+(fixed|variable)\s+\w+.*')
input = open(input_files[0])
for lineno, line in enumerate(input.readlines()):
if not line.startswith('Encoding'):
... |
#!/usr/bin/env python3
#
# makers.py
"""
Functions for creating imports, modules and packages.
"""
#
# Copyright © 2020 <NAME> <<EMAIL>>
#
# 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... |
/**
* Default implementation of {@link Neo4jClient}. Uses the Neo4j Java driver to connect to and interact with the
* database.
*
* @author Gerrit Meier
* @author Michael J. Simons
* @since 6.0
*/
final class DefaultNeo4jClient implements Neo4jClient {
private final Driver driver;
private final TypeSystem typ... |
/**
* @author Alessandro Caiani and Antoine Godin
*
* Generates the network of balance sheet connections among the selected populations for the selected assets. Each NxN matrix is represented
* as one 1x(N+2) row, where the two first fields (with key "-1" and "-2") contain 1 the number of agents (i.e. N) and 2... |
/**
* Runs through the log removing segments older than a certain age
*/
private int cleanupExpiredSegments(final Log log) {
final long startMs = time.milliseconds();
String topic = parseTopicPartitionName(log.name()).topic;
return log.deleteOldSegments(new Predicate<LogSegment>() {
... |
On joint maximum-likelihood estimation of PCR efficiency and initial amount of target
We consider the problem of estimating unknown parameters of the real-time polymerase chain reaction (RT- PCR) from noisy observations. The joint ML estimator of the RT-PCR efficiency and the initial number of DNA target molecules is ... |
async def async_encrypt_attachment(data: AsyncDataT) -> _EncryptedReturnT:
key = Random.new().read(32)
iv = Random.new().read(8)
ctr = Counter.new(64, prefix=iv, initial_value=0)
cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
sha256 = SHA256.new()
loop = asyncio.get_event_loop()
async for ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.