repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
1690296356/jdk | test/jdk/java/nio/channels/FileChannel/directio/PreadDirect.java | <gh_stars>0
/*
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published ... |
PopCap/GameIdea | Engine/Source/Runtime/UMG/Public/Components/TextBlock.h | // Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "TextBlock.generated.h"
/**
* A simple static text widget.
*
* ● No Children
* ● Text
*/
UCLASS(meta=(DisplayName="Text"))
class UMG_API UTextBlock : public UWidget
{
GENERATED_UCLASS_BODY()
public:
/**
* Sets the color a... |
TimYagan/stroom | stroom-app/src/test/java/stroom/headless/TestCli.java | <gh_stars>1-10
/*
* Copyright 2016 Crown Copyright
*
* 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 applicabl... |
marketmuse/editor | src/editor/normalizer/normalizer.spec.js | <filename>src/editor/normalizer/normalizer.spec.js
import { Editor, Transforms } from 'slate';
import mount from '@utils/test/mount';
import { types } from '@config/common';
describe('normalizer options', () => {
// ****
test('editor should accept multiple normalizer and work', () => {
const plugins = [
... |
opensourceways/app-cla-server | controllers/auth_on_corp_manager.go | <reponame>opensourceways/app-cla-server<gh_stars>1-10
package controllers
import (
"fmt"
"github.com/opensourceways/app-cla-server/dbmodels"
"github.com/opensourceways/app-cla-server/models"
"github.com/opensourceways/app-cla-server/util"
)
// @Title authenticate corporation manager
// @Description authenticate ... |
ppipada/tech-interview-prep | docs/pycode/trie/add-and-search-word.py | <filename>docs/pycode/trie/add-and-search-word.py
import collections
class TrieNode():
def __init__(self):
self.children = collections.defaultdict(TrieNode)
self.isWord = False
class WordDictionary(object):
def __init__(self):
"""
Initialize your data structure here.
... |
chriszs/documentcloud | lib/dc/embed.rb | <reponame>chriszs/documentcloud<filename>lib/dc/embed.rb
=begin
# Thoughts
Embeds can be categorized along four dimensions:
## Resource
The resource is the type of thing you are embedding. The contents of the embed
will depend on the resource. Each resource will include different code and
configuration options (the... |
aquila-zyy/Botania | src/main/java/vazkii/botania/api/BotaniaAPIClient.java | <filename>src/main/java/vazkii/botania/api/BotaniaAPIClient.java<gh_stars>100-1000
/*
* This class is distributed as part of the Botania Mod.
* Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.p... |
hmrc/cds-imports-dds-frontend | test/uk/gov/hmrc/cdsimportsddsfrontend/domain/SubmissionStatusSpec.scala | <reponame>hmrc/cds-imports-dds-frontend
/*
* Copyright 2019 HM Revenue & Customs
*
* 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
*
... |
ypiel-talend/components | components/components-localio/localio-definition/src/test/java/org/talend/components/localio/fixed/FixedInputPropertiesTest.java | <filename>components/components-localio/localio-definition/src/test/java/org/talend/components/localio/fixed/FixedInputPropertiesTest.java
// ============================================================================
//
// Copyright (C) 2006-2017 Talend Inc. - www.talend.com
//
// This source code is available under ... |
LlimaV10/example-react-native-app | screens/Fundamentals/Example4.js | import React, {useState} from 'react'
import {View, Text, Button} from "react-native";
const Example4 = () => {
const [isActivated, setIsActivated] = useState(false);
return (
<View>
<Text>{"Used state and <Button> component:"}</Text>
<Text>{"const [isActivated, setIsActivated] = useState(false);"... |
zxp19960123/cos-snippets | JavaScript/test/src/put_object.js | // 简单上传对象
function putObject(assert) {
//.cssg-snippet-body-start:[put-object]
cos.putObject({
Bucket: 'examplebucket-1250000000', /* 必须 */
Region: 'COS_REGION', /* 存储桶所在地域,必须字段 */
Key: 'exampleobject', /* 必须 */
StorageClass: 'STANDARD',
Body: fileObject, // 上传文件对象
... |
GothAck/FlatRPC | examples/simple/client.cpp | #include <thread>
#include <plog/Log.h>
#include <plog/Appenders/ColorConsoleAppender.h>
#include "simple_flatrpc.hpp"
using namespace std;
using namespace examples::simple;
zmqpp::context ctx;
GreeterClient client(ctx);
int main(int argc, char *argv[]) {
static plog::ColorConsoleAppender<plog::TxtFormatter> con... |
galterlibrary/InvenioRDM-at-NU | cd2h_repo_project/modules/__init__.py | <filename>cd2h_repo_project/modules/__init__.py
"""cd2h-repo-project modules."""
|
guoshucan/mpaas | ghost.framework.module/src/main/java/ghost/framework/module/reflect/annotations/InterfaceParentId.java | <gh_stars>1-10
package ghost.framework.module.reflect.annotations;
import java.lang.annotation.*;
/**
* @Author: 郭树灿{guoshucan-pc}
* @link: 手机:13715848993, QQ 27048384
* @Description:父级接口id
* @Date: 23:50 2018-09-20
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({
ElementType.TYPE,
ElementType.FI... |
alphagov-mirror/paas-cf | tools/pipecleaner/utils.go | package main
import (
"fmt"
"os"
"regexp"
"golang.org/x/crypto/ssh/terminal"
"github.com/logrusorgru/aurora"
)
var (
indentRegexp = regexp.MustCompile("(?m)^")
concourseVarRegexp = regexp.MustCompile(`\(\((!?[-/\.\w\pL]+)\)\)`)
resourceTriggerRegexp = regexp.MustCompile(`trigger:\s+\(\((!?[-/\.\... |
maddler-hub/Ocelot-Social | cypress/integration/Moderation.ReportContent/I_click_on_the_author.js | <filename>cypress/integration/Moderation.ReportContent/I_click_on_the_author.js
import { When } from "cypress-cucumber-preprocessor/steps";
When('I click on the author', () => {
cy.get('.user-teaser')
.click()
.url().should('include', '/profile/')
}) |
javadude/605.686-samples | Module - Sensors/Sensors/app/src/main/java/com/javadude/sensors/PuckView.java | <reponame>javadude/605.686-samples
package com.javadude.sensors;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;
public class PuckView extends View {
private int cx = 0;
private int cy = 0;
private int dx = 10;... |
ohanlonl/qCMAT | plugins/core/qPCL/PclUtils/filters/dialogs/MLSDialog.h | //##########################################################################
//# #
//# CLOUDCOMPARE PLUGIN: qPCL #
//# #
//# This pr... |
microsoft/HybridRow | src/Serialization/HybridRow.Native/DateTime.h | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ------------------------------------------------------------
#pragma once
#include <cstdint>
namespace cdb_hr
{
/// <summary>C# DateTime type.</summary>
/// <remarks>CoreCLR DateTime ... |
Terryhata6/Mengine | src/Plugins/TTFPlugin/TTFPrototypeGenerator.h | <gh_stars>10-100
#pragma once
#include "Kernel/FactoryPrototypeGenerator.h"
#include "Kernel/Factory.h"
#include "ft2build.h"
#include "freetype/freetype.h"
#include "freetype/ftglyph.h"
namespace Mengine
{
//////////////////////////////////////////////////////////////////////////
class TTFPrototypeGenerato... |
awf/ELL | tools/utilities/finetune/src/Report.cpp | ////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Project: Embedded Learning Library (ELL)
// File: Report.cpp (finetune)
// Authors: <NAME>
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#include... |
vsamy/labyfou | src/Container.cpp | <gh_stars>0
#include "Container.h"
#include <SFML/Graphics/RenderTarget.hpp>
namespace GUI
{
Container::Container() : children_(), selectedChild_(-1)
{
}
void Container::pack(Component::sPtr component)
{
children_.push_back(component);
if (!hasSelection() && component->isSelectable())
sel... |
vinirms/sites-responsivos | site arquiteto/node_modules/@fortawesome/free-brands-svg-icons/faTiktok.js | 'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fab';
var iconName = 'tiktok';
var width = 448;
var height = 512;
var aliases = [];
var unicode = 'e07b';
var svgPathData = 'M448 209.9a210.1 210.1 0 0 1 -122.8-39.25V349.4A162.6 162.6 0 1 1 185 188.3V278.2a74.62 74.62 0 1 0 52.2... |
Harry-Hopkinson/VSCoding-Sequence | node_modules/molstar/lib/commonjs/mol-script/runtime/query/table.js | "use strict";
/**
* Copyright (c) 2018-2019 Mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
* @author <NAME> <<EMAIL>>
*/
Object.defineProperty(exports, "__esModule", { value: true });
var symbol_table_1 = require("../../language/symbol-table");
var base... |
FHDortmund/Termserver | src/TermBrowser/TermBrowser/src/main/java/de/fhdo/collaboration/db/classes/Statusrel.java | package de.fhdo.collaboration.db.classes;
// Generated 30.06.2015 09:32:45 by Hibernate Tools 4.3.1
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persist... |
minerba/c | kubernetes/unit-test/test_extensions_v1beta1_http_ingress_path.c | #ifndef extensions_v1beta1_http_ingress_path_TEST
#define extensions_v1beta1_http_ingress_path_TEST
// the following is to include only the main from the first c file
#ifndef TEST_MAIN
#define TEST_MAIN
#define extensions_v1beta1_http_ingress_path_MAIN
#endif // TEST_MAIN
#include <stdlib.h>
#include <string.h>
#incl... |
eikeschumann971/kspp | include/kspp/serdes/avro_serdes.h | #include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/string_generator.hpp>
#include <ostream>
#include <istream>
#include <vector>
#include <typeinfo>
#include <tuple>
#include <avro/Encoder.hh>
#include <avro/Decoder.hh>
#include <avro/Compiler.hh>
#include <avro/Generic.hh>
#include <... |
rzats/enso | engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala | <reponame>rzats/enso
package org.enso.compiler
import java.io.StringReader
import com.oracle.truffle.api.TruffleFile
import com.oracle.truffle.api.source.Source
import org.enso.compiler.codegen.{AstToIR, IRToTruffle}
import org.enso.compiler.core.IR
import org.enso.compiler.core.IR.{Expression, Module}
import org.ens... |
beckje01/ratpack | ratpack-core/src/main/java/ratpack/health/HealthCheckResults.java | <reponame>beckje01/ratpack
/*
* Copyright 2015 the original author or authors.
*
* 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
*
* U... |
fsancheztemprano/chess-lite | apps/api/src/main/java/dev/kurama/api/core/hateoas/processor/UserModelProcessor.java | package dev.kurama.api.core.hateoas.processor;
import static dev.kurama.api.core.authority.UserAuthority.PROFILE_DELETE;
import static dev.kurama.api.core.authority.UserAuthority.PROFILE_READ;
import static dev.kurama.api.core.authority.UserAuthority.PROFILE_UPDATE;
import static dev.kurama.api.core.authority.UserAuth... |
zi-NaN/algorithm_exercise | google questions/20191a_alien.py | from collections import Counter
class Node:
def __init__(self, val, child=None):
self.val = val
self.child = child
def alien(words):
# as we use stdin to read in word, it is assumed that len(any word) > 0
if not words:
return 0
# end of words with max frequency
... |
BeiJiaan/ace | ACEXML/common/StrCharStream.cpp | <reponame>BeiJiaan/ace
// $Id$
#include "ACEXML/common/StrCharStream.h"
#include "ACEXML/common/Encoding.h"
#include "ace/ACE.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
ACEXML_StrCharStream::ACEXML_StrCharStream (void)
: start_ (0), ptr_ (0), end_ (0), encoding_ (0), name_ (0)
{
}
ACEXML_StrCharStr... |
echothreellc/echothree | src/java/com/echothree/model/control/associate/server/transfer/AssociateReferralTransferCache.java | <filename>src/java/com/echothree/model/control/associate/server/transfer/AssociateReferralTransferCache.java<gh_stars>1-10
// --------------------------------------------------------------------------------
// Copyright 2002-2021 Echo Three, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// y... |
td00/pretix | src/pretix/sentry.py | from threading import Lock
from raven.contrib.celery import SentryCeleryHandler
from raven.contrib.django.apps import RavenConfig
from raven.contrib.django.models import (
SentryDjangoHandler, client, get_client, install_middleware,
register_serializers,
)
_setup_lock = Lock()
_initialized = False
class Cu... |
cirope/mawidabp | test/controllers/control_objective_items_controller_test.rb | <reponame>cirope/mawidabp
require 'test_helper'
# Pruebas para el controlador de items de objetivos de control
class ControlObjectiveItemsControllerTest < ActionController::TestCase
fixtures :control_objective_items, :control_objectives, :reviews
# Prueba que sin realizar autenticación esten accesibles las partes... |
Fortranm/BizHawk | waterbox/libsnes/bsnes/snes/chip/superfx/memory/memory.cpp | #ifdef SUPERFX_CPP
uint8 SuperFX::bus_read(unsigned addr) {
if((addr & 0xc00000) == 0x000000) { //$00-3f:0000-7fff, $00-3f:8000-ffff
while(!regs.scmr.ron && scheduler.sync != Scheduler::SynchronizeMode::All) {
add_clocks(6);
synchronize_cpu();
}
auto myaddr = (((addr & 0x3f0000) >> 1) | (add... |
UltraProton/Placement-Prepration | C++/strings/splitstring.cpp | #include<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
/* code */
//Taking the space separated input
string space_sep="";
string delimeter1=" ";
vector<int> result1;
getline(cin,space_sep);
//cout<<space_sep<<endl;
int pos=space_sep.find(delimeter1)... |
Shinhwe/anu | packages/cli/templates/qunar/source/pages/demo/syntax/ifcom/index.js | <gh_stars>1-10
import React from '@react';
import Label from '@components/Label/index';
import './index.scss';
/* eslint no-console: 0 */
class P extends React.Component {
constructor() {
super();
this.state = {
condition1: true,
condition2: true
};
}
toggl... |
peerct/Viewers | Packages/lesiontracker/client/components/confirmDeleteDialog/confirmDeleteDialog.js | function closeHandler() {
// Hide the lesion dialog
$("#confirmDeleteDialog").css('display', 'none');
// Remove the backdrop
$(".removableBackdrop").remove();
// Remove the callback from the template data
delete Template.confirmDeleteDialog.doneCallback;
}
showConfirmDialog = function(doneCal... |
HyperTars/NYC-Taxi-Analysis | Assignment1/old - hpc tested/hw1/Task3/src/mapper.py | #!/usr/bin/env python
import sys
import re
for line in sys.stdin:
# skip invalid
if len(line) <= 1 or 'medallion' in line:
continue
# extract data
data = line.strip()
data = re.split(',|\t', data)
key = data[0]
val = ','.join(data[1:])
# print
if 'MEDALLION' in line or 'CUR... |
amilcar-capsus/UPT-Server-Extension | app-specific-code/src/main/java/org/oskari/example/st/SettingsMethod.java | <filename>app-specific-code/src/main/java/org/oskari/example/st/SettingsMethod.java
package org.oskari.example.st;
public class SettingsMethod {
public String method;
public Integer value;
public String label;
} |
MrShiposha/metaxxa | include/literal.h | <filename>include/literal.h
#ifndef METAXXA_LITERAL_H
#define METAXXA_LITERAL_H
namespace metaxxa
{
template <typename T, T LITERAL>
struct Literal
{
using Type = T;
static constexpr Type value = LITERAL;
};
}
#endif // METAXXA_LITERAL_H |
jaemin2682/BAEKJOON_ONLINE_JUDGE | 17294.cpp | <reponame>jaemin2682/BAEKJOON_ONLINE_JUDGE<filename>17294.cpp
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
int dif = str[0]-str[1];
bool IsRight = true;
for(int i=0;i<str.size()-1;i++) {
if(str[i]-str[i+1] != dif) {
IsRight = f... |
matjaz99/MyTestProjects | javase/src/main/java/si/matjazcerkvenik/test/javase/network/socket/EchoServer.java | package si.matjazcerkvenik.test.javase.network.socket;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;
public class EchoServer {
/**
* Run this program and open terminal... |
Gitman1989/chromium | chrome/browser/ui/views/tabs/dragged_tab_controller.cc | <gh_stars>1-10
// Copyright (c) 2010 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 "chrome/browser/views/tabs/dragged_tab_controller.h"
#include <math.h>
#include <set>
#include "app/animation.h"
#include "a... |
scrocquesel/java-operator-sdk | operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/RetryExecution.java | package io.javaoperatorsdk.operator.processing.retry;
import java.util.Optional;
import io.javaoperatorsdk.operator.api.reconciler.RetryInfo;
public interface RetryExecution extends RetryInfo {
/**
* @return the time to wait until the next execution in milliseconds
*/
Optional<Long> nextDelay();
}
|
fengjixuchui/napoca | napoca/kernel/cpuops.c | <filename>napoca/kernel/cpuops.c
/*
* Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0
*/
/** @file cpuops.c
* @brief CPUOPS - macro wrappers and prototypes for intrinsics and plain assembler CPU operations
*
*/
#include "napoca.h"
#include "kernel/kernel.h"
CX_UINT16
CpuGetBootIn... |
ckamtsikis/cmssw | SimDataFormats/CaloTest/interface/HcalTestHistoClass.h | #ifndef SimDataFormats_HcalTestHistoClass_H
#define SimDataFormats_HcalTestHistoClass_H
///////////////////////////////////////////////////////////////////////////////
// File: HcalTestHistoClass.h
// Histogram handling class for analysis in HcalTest
/////////////////////////////////////////////////////////////////////... |
KiboSoftware/kibo.sdk.java | auth/src/main/java/com/kibocommerce/sdk/auth/model/MozuAppDevContractsApplicationCapabilityItemRequest.java | <filename>auth/src/main/java/com/kibocommerce/sdk/auth/model/MozuAppDevContractsApplicationCapabilityItemRequest.java
/*
* Kibo AppDev Service
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: v1
*
*
* NOTE: This class is auto ... |
mikheyrojo/spring-xml-to-java-converter | src/test/resources/pro/akvel/spring/converter/xml/expected/BeanWithPrimary.java | <reponame>mikheyrojo/spring-xml-to-java-converter<gh_stars>0
package pro.akvel.spring.converter.generator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
/**
* Generated Java based configuration... |
iplweb/django-bpp | src/bpp/migrations/0259_auto_20210421_2323.py | # Generated by Django 3.0.11 on 2021-04-21 21:23
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pbn_api", "0008_auto_20210406_0530"),
("bpp", "0258_auto_20210407_2320"),
]
operations = [
migrati... |
ytuan996/smart-admin | smart-admin-service/smart-admin-api/src/main/java/com/gangquan360/smartadmin/module/position/domain/dto/PositionUpdateDTO.java | package com.gangquan360.smartadmin.module.position.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 岗位
*
* @author zzr
*/
@Data
public class PositionUpdateDTO extends PositionAddDTO {
@ApiModelProperty("主键")
private Long id;
}
|
akashsuper2000/codechef-archive | MAXREM.py | n = int(input())
a = [int(j) for j in input().split()]
m1,m2 = 0,0
for i in a:
if(i>m1):
m2 = m1
m1 = i
print(m2)
|
AlexRogalskiy/Duino | libraries/Mitov/MitovEmbedded_Adafruit_NeoPixel/MitovEmbedded_Adafruit_NeoPixel.h | <filename>libraries/Mitov/MitovEmbedded_Adafruit_NeoPixel/MitovEmbedded_Adafruit_NeoPixel.h
/*--------------------------------------------------------------------
This file is part of the Adafruit NeoPixel library.
NeoPixel is free software: you can redistribute it and/or modify
it under the terms of the GNU Les... |
hisptz/scorecard_app_widget | src/shared/Components/DeleteConfirmation/index.js | import i18n from "@dhis2/d2-i18n";
import {
Button,
ButtonStrip,
Modal,
ModalActions,
ModalContent,
ModalTitle,
} from "@dhis2/ui";
import PropTypes from "prop-types";
import React from "react";
export default function DeleteConfirmation({
onConfirm,
onCancel,
text,
component,
}) {
return (
<M... |
mathstuf/seacas | docs/html/search/variables_3.js | <filename>docs/html/search/variables_3.js
var searchData=
[
['fa_5fctr_5flist',['fa_ctr_list',['../ex__utils_8c.html#a0c729ddce310e92dfaaea97755db7205',1,'ex_utils.c']]],
['face_5fblk_5fid',['face_blk_id',['../structex__block__params.html#a339c7ea40dfbfd698f254231bde7b42f',1,'ex_block_params']]],
['face_5ftype',[... |
timiditi/tp | src/main/java/seedu/address/model/tuition/ClassName.java | package seedu.address.model.tuition;
import static java.util.Objects.requireNonNull;
/**
* Represents the name of the tuition class.
*/
public class ClassName {
public final String name;
/**
* Constructor for Class Name.
*
* @param name The name of the class.
*/
public ClassName(St... |
pss521/springboot-penguin | src/main/resources/static/js/user/myExam.js | /**
* 模块JavaScript
*/
var myExamPage = {
data:{
pageNum: 0,
pageSize: 0,
totalPageNum: 0,
totalPageSize: 0,
grades: [],
},
init: function (pageNum, pageSize, totalPageNum, totalPageSize, grades) {
myExamPage.data.pageNum = pageNum;
myExamPage.data.pa... |
fabianormatias/poc-recomendacao-metodo-delphi-v1 | src/org/yooreeka/algos/taxis/evaluation/McNemarTest.java | /*
* ________________________________________________________________________________________
*
* Y O O R E E K A
* A library for data mining, machine learning, soft computing, and mathematical analysis
* ________________________________________________________________________________________
* ... |
kagemeka/atcoder-submissions | jp.atcoder/abc045/arc061_a/11775567.py | import sys
s = sys.stdin.readline().rstrip()
n = len(s)
def c(n):
return pow(2, max(0, n - 1))
def main():
res = 0
for l in range(n):
for r in range(l, n):
res += int(s[l : r + 1]) * c(l) * c(n - 1 - r)
print(res)
if __name__ == "__main__":
main()
|
feav/Progiciel-Facturation | public/scripts/table/ngGrid.js | 'use strict'
angular
.module('theme.tables-ng-grid', [])
.controller('TablesAdvancedController', ['$scope', '$filter', '$http', 'pinesNotifications', function ($scope, $filter, $http, pinesNotifications) {
$scope.filterOptions = {
filterText: "",
useExternalFilter: true
... |
BenStorey/Jimbo | Jimbo/Jimbo/graphics/renderer.hpp |
#ifndef JIMBO_GRAPHICS_RENDERER_HPP
#define JIMBO_GRAPHICS_RENDERER_HPP
/////////////////////////////////////////////////////////
// Renderer.h
//
// <NAME>
//
// More of a placeholder right now. The void* is obviously not ideal, but I don't want to build
// a whole lot of subclasses to implement a Renderer interface... |
rsdoherty/azure-sdk-for-python | sdk/servicebus/azure-servicebus/tests/perf_tests/T1_legacy_tests/send_message_batch.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
Shidesu/NovelRT | include/NovelRT/Graphics/GraphicsPipelineInput.h | // Copyright © <NAME> and Contributors. Licensed under the MIT Licence (MIT). See LICENCE.md in the repository root
// for more information.
#ifndef NOVELRT_GRAPHICS_GRAPHICSPIPELINEINPUT_H
#define NOVELRT_GRAPHICS_GRAPHICSPIPELINEINPUT_H
#ifndef NOVELRT_GRAPHICS_H
#error NovelRT does not support including types expl... |
claymodel/bigcloud | badaClientSDK/inc/ImageDownloader.h | #ifndef IMAGEDOWNLOADER_H_
#define IMAGEDOWNLOADER_H_
#include "FriendsForm.h"
#include <FNet.h>
#include <FBase.h>
#include <FMedia.h>
class ImageDownloader :
public Osp::Net::Http::IHttpTransactionEventListener
{
public:
int SaveFile (Osp::Base::ByteBuffer* content);
public:
ImageDownloader()... |
0xDECEA5ED/solitaire-player | src/test/java/com/secondthorn/solitaireplayer/players/pyramid/PyramidPlayerTest.java | <reponame>0xDECEA5ED/solitaire-player
package com.secondthorn.solitaireplayer.players.pyramid;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class PyramidPlayerTest {
@Test
void cardsToString() {
... |
RobberPhex/one-java-agent | one-java-agent-plugin/src/main/java/com/alibaba/oneagent/utils/JarUtils.java | <filename>one-java-agent-plugin/src/main/java/com/alibaba/oneagent/utils/JarUtils.java
package com.alibaba.oneagent.utils;
import java.io.File;
import java.io.IOException;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
/**
*
* @author hengyunabc 2020-07-31
*
*/
publ... |
1iyiwei/texture | src/code/Library/RandomShuffleSequencer.hpp | <gh_stars>10-100
/*
RandomShuffleSequencer.hpp
visit pixels in a random shuffled order
<NAME>
August 24, 2014
*/
#ifndef _RANDOM_SHUFFLE_SEQUENCER_HPP
#define _RANDOM_SHUFFLE_SEQUENCER_HPP
#include "Sequencer.hpp"
class RandomShuffleSequencer : public Sequencer
{
public:
RandomShuffleSequencer(void);
... |
410919244/wechat | src/main/java/me/hao0/wechat/model/card/Consume.java | package me.hao0.wechat.model.card;
import lombok.Data;
/**
* 核销Code接口
* @author zJun
* @date 2018年7月27日 上午11:39:52
*/
@Data
public class Consume {
/** 卡券ID。创建卡券时use_custom_code填写true时必填。非自定义Code不必填写。 */
private String card_id;
/** 需核销的Code码。 */
private String code;
}
|
mi1980/projecthadoop3 | udacity/cs101-intro-cs/code/lesson2/print_nums.py | <reponame>mi1980/projecthadoop3
# Define a procedure, print_numbers, that takes
# as input a positive whole number, and prints
# out all the whole numbers from 1 to the input
# number.
# Make sure your procedure prints "upwards", so
# from 1 up to the input number.
def print_numbers(n):
i = 1
while (i <= n):... |
ibabkov/let_it_code | problems/array/merge_sorted_array_88/index.js | <reponame>ibabkov/let_it_code
/**
* @param {number[]} nums1
* @param {number} m
* @param {number[]} nums2
* @param {number} n
* @return {void} Do not return anything, modify nums1 in-place instead.
*/
export const merge = function(nums1, p1, nums2, p2) {
if (p1 === '0') return nums2;
if (p2 === '0') return nu... |
quasarbright/quasarbright.github.io | python/imageProcessing/textDither.py | <filename>python/imageProcessing/textDither.py
'''Render an image as text with unicode shade characters
Uses Floyd-Steinberg dithering on a grayscale version of the image
'''
import numpy as np
from PIL import Image
from resize import resize
palette = [' ', '░', '▒', '▓', '█']
paletteSize = len(palette)
def findClose... |
connect-israel/stratum-coordinator | test/streams/test.js | const path = require('path')
const kefir = require('kefir')
const jsonfile = require('jsonfile')
const uuid = require('uuid')
const _ = require('lodash')
const BlockCollection = require(path.join(__dirname, '../../model/bitcoin/block')).Collection
const TemplateToBlock = require(path.join(__dirname, '../../lib/raw-blo... |
EpicSquid/MysticalLib | src/main/java/epicsquid/mysticallib/material/MaterialTypes.java | <reponame>EpicSquid/MysticalLib<gh_stars>1-10
package epicsquid.mysticallib.material;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
public class MaterialTypes {
public static Map<String, Item.ToolMaterial> materialMap = new HashMap<>();
publi... |
jmckenna/ZOO-Project | zoo-project/zoo-kernel/service_internal_php7.c | /*
* Author : <NAME>, <NAME>
*
* Copyright (c) 2009-2016 GeoLabs SARL
*
* 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
* ... |
macaurther/DOCUSA | CvGameCoreDLL/Boost-1.32.0/include/boost/random/discard_block.hpp | <reponame>macaurther/DOCUSA
/* boost random/discard_block.hpp header file
*
* Copyright <NAME> 2002
* 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)
*
* See http://www.boost.org for most recent version ... |
BeatHubmann/19H-AdvNCSE | series1_workbench/fvm_scalar_1d/tests/test_numerical_flux.cpp | <gh_stars>1-10
#include <gtest/gtest.h>
#include <ancse/numerical_flux.hpp>
template <class NumericalFlux>
void check_consistency(const NumericalFlux &nf) {
auto model = make_dummy_model();
auto to_check = std::vector<double>{1.0, 2.0, 3.3251, -1.332};
for (auto u : to_check) {
ASSERT_DOUBLE_EQ(m... |
meee1/OpenSolo | sololink/flightcode/python/usb_nop.py | <gh_stars>10-100
#!/bin/bash
def init():
pass
def uninit():
pass
def enable():
pass
def disable():
pass
|
colorofchange/Champaign | app/models/phone_number.rb | <filename>app/models/phone_number.rb<gh_stars>10-100
# == Schema Information
#
# Table name: phone_numbers
#
# id :integer not null, primary key
# number :string
# country :string
#
class PhoneNumber < ActiveRecord::Base
validates :number, presence: true, phony_plausible: true
phony_normalize :nu... |
Miffyli/incubator | entity_gym/entity_gym/examples/cherry_pick.py | <reponame>Miffyli/incubator
from dataclasses import dataclass, field
from entity_gym.environment.environment import EntityType
import numpy as np
from typing import Dict, List, Mapping
from entity_gym.environment import (
SelectEntityActionMask,
Entity,
EntityID,
Environment,
EpisodeStats,
ObsS... |
hanswenzel/opticks | ana/cie.py | #!/usr/bin/env python
#
# Copyright (c) 2019 Opticks Team. All Rights Reserved.
#
# This file is part of Opticks
# (see https://bitbucket.org/simoncblyth/opticks).
#
# 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... |
GauthierBossuyt/Boogie | src/p5/acoustic/acoustic_string.js | const AMP_MULT = 50;
export default function acousticString(p5, freq, midpoint, length) {
this.freq = freq;
this.mid = midpoint;
this.length = length;
this.amp = 0;
this.isVibrating = false;
this.framesSincePluck = 0;
this.draw = () => {
p5.stroke(255, 45, 107);
if (!this.isVibrating) {
p5... |
SaurabhGujare/LawyerFinder | Assignment4/src/assignment_4/analytics/Analyzers/TopThreeProductsAnalyzer.java | <filename>Assignment4/src/assignment_4/analytics/Analyzers/TopThreeProductsAnalyzer.java<gh_stars>0
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package assignment_4.analytics.Anal... |
elixir-no-nels/nels-core | nels-portal/src/main/java/no/nels/portal/model/IdpGridModel.java | <filename>nels-portal/src/main/java/no/nels/portal/model/IdpGridModel.java
package no.nels.portal.model;
import no.nels.commons.abstracts.ANumberId;
import no.nels.commons.model.NumberIndexedList;
import no.nels.idp.core.model.db.NeLSIdpUser;
import org.primefaces.model.SelectableDataModel;
import javax.faces.model.L... |
JouleCai/GeoSpaceLab | geospacelab/datahub/sources/gfz/hpo/nowcast/__init__.py | # Licensed under the BSD 3-Clause License
# Copyright (C) 2021 GeospaceLab (geospacelab)
# Author: <NAME>, Space Physics and Astronomy, University of Oulu
__author__ = "<NAME>"
__copyright__ = "Copyright 2021, GeospaceLab"
__license__ = "BSD-3-Clause License"
__email__ = "<EMAIL>"
__docformat__ = "reStructureText"
i... |
x1fa/Security-up | doter-common/src/main/java/com/doter/common/security/handler/RestAuthenticationEntryPoint.java | package com.doter.common.security.handler;
import cn.hutool.json.JSONUtil;
import com.doter.common.core.result.Result;
import com.doter.common.enums.ResultStatus;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.CredentialsExpiredException;
import org.springframework.security.core.A... |
janessasmith/MediaCube-SN | app/components/service/uploadAudioVideo/uploadAudioVideo.js | /*
上传音频视频工具
创建人:bai.zhiming
时间:2016-7-13
*/
"use strict";
angular.module("trsUploadAudioVideoModule", [])
.factory("uploadAudioVideoService", ["$q", "$http", "$sce", "globleParamsSet", "trsHttpService", function($q, $http, $sce, globleParamsSet, trsHttpService) {
var index = 0;
/**
* [uplo... |
srinivas-kandula/integrations | adm/src/main/java/com/wavefront/rest/models/SortableSearchRequest.java | /*
* Wavefront REST API
* <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST API documentation you... |
sbanal/jclif | src/main/java/org/jclif/annotation/Command.java | <filename>src/main/java/org/jclif/annotation/Command.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 copyright ownership. The ASF licenses this file
* to you un... |
SunNy820828449/CINN | cinn/backends/codegen_c_x86.cc | // Copyright (c) 2021 CINN Authors. All Rights Reserved.
//
// 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 appl... |
hugorebelo/gitlabhq | app/policies/snippet_policy.rb | # frozen_string_literal: true
class SnippetPolicy < PersonalSnippetPolicy
end
|
negativelo/Coder-Essentials | Algorithm/java/src/main/java/wx/algorithm/op/backtracking/Sudoku.java | <filename>Algorithm/java/src/main/java/wx/algorithm/op/backtracking/Sudoku.java
package wx.algorithm.op.backtracking;
/**
* Created by apple on 16/8/14.
*/
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
/**
* @function 数独
* @description 数独是一个我们都非常熟悉的经典游戏,运用计算机我们可以很快地解开数独难题,现在有一些简单的数独题目,请编写一... |
ihumphrey-usgs/ISIS3_old | isis/src/base/objs/EmbreeTargetShape/EmbreeTargetShape.cpp | <gh_stars>1-10
/**
* @file
* $Revision$
* $Date$
* $Id$
*
* Unless noted otherwise, the portions of Isis written by the USGS are
* public domain. See individual third-par... |
felixjones/gba-plusplus | include/gba/types/screen_tile.hpp | #ifndef GBAXX_TYPES_SCREEN_TILE_HPP
#define GBAXX_TYPES_SCREEN_TILE_HPP
#include <gba/types/int_type.hpp>
namespace gba {
enum class tile_flip : uint8 {
none = 0,
horizontal = 1,
vertical = 2,
both = 3
};
struct screen_tile {
uint16 tile_index : 10;
tile_flip flip : 2;
uint16 palette_ban... |
zhaozexin/kissy | build/core/core-pkg-min.js | <gh_stars>0
/*
Copyright 2011, KISSY UI Library v1.20dev
MIT Licensed
build time: ${build.time}
*/
KISSY.add("core",function(d,b,e,f,c,h,a,g,i,j){a.getScript=d.getScript;b={UA:b,DOM:e,Event:f,EventTarget:f.Target,Node:c,NodeList:c.List,JSON:h,Ajax:a,IO:a,ajax:a,io:a,jsonp:a.jsonp,Anim:g,Easing:g.Easing,Base:i,Cookie:j,... |
ryanberryhill/iimc | src/copt/AIGUtil.cpp | /********************************************************************
Copyright (c) 2010-2015, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of s... |
amphiaraus/AndroidChromium | app/src/main/java/org/chromium/chrome/browser/webapps/WebappDataStorage.java | // 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.
package org.chromium.chrome.browser.webapps;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
im... |
PatelN123/chatwoot | spec/factories/super_admins.rb | <filename>spec/factories/super_admins.rb
FactoryBot.define do
factory :super_admin do
name { Faker::Name.name }
email { "<EMAIL>" }
password { '<PASSWORD>!' }
type { 'SuperAdmin' }
confirmed_at { Time.zone.now }
end
end
|
irwansetiawan/android-publisher-sdk | publisher-sdk/src/main/java/com/criteo/publisher/privacy/gdpr/GdprData.java | <gh_stars>1-10
/*
* Copyright 2020 Criteo
*
* 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.