repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
outillage/oto-tools
internal/publishrunner/create_config.go
<reponame>outillage/oto-tools package publishrunner import ( "errors" "fmt" "io/ioutil" "github.com/aevea/oto-tools/internal/npm" ) func createConfigFile(path, registry, token, owner string) error { contents := fmt.Sprintf("%s:_authToken=%s", registry, token) if registry == npm.GHRegistry { if owner == "" {...
techbrick-ftc/team4234
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/mains/MainDrive.java
<filename>TeamCode/src/main/java/org/firstinspires/ftc/teamcode/mains/MainDrive.java package org.firstinspires.ftc.teamcode.mains; import com.acmerobotics.dashboard.FtcDashboard; import com.acmerobotics.dashboard.telemetry.TelemetryPacket; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcom...
ShuffleZZZ/ITMO
AlgorithmsandDataStructures/2ndLab/task10d.cpp
#include <fstream> using namespace std; int main(){ ifstream in; in.open("bureaucracy.in"); ofstream out; out.open("bureaucracy.out"); int n,m,s,round; in>>n>>m; int a[n]; for(int i=0;i<n;i++){ in>>a[i]; } while ((m>=n) and (n>0)){ round=m/n; m=m%n; ...
stratacode/system
system/src/sc/lang/java/AbstractTemplateParameters.java
<filename>system/src/sc/lang/java/AbstractTemplateParameters.java /* * Copyright (c) 2021. <NAME>. All Rights Reserved. */ package sc.lang.java; public class AbstractTemplateParameters { public static boolean emptyString(String str) { return str == null || str.length() == 0; } public static String ...
SmarterEye/libsmartereye2
src/usb/usb_messenger.cc
<reponame>SmarterEye/libsmartereye2<filename>src/usb/usb_messenger.cc<gh_stars>1-10 // Copyright 2020 Smarter Eye Co.,Ltd. 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 ...
sgallon-rin/miniprogram-sign-in
component/component-thirdPage/component-thirdPage.js
// component/component-thirdPage/component-thirdPage.js const app = getApp() Component({ /** * 组件的属性列表 */ properties: { }, attached: function(){ console.log(app.globalData) if (app.globalData.userInfo) { this.setData({ userInfo: app.globalData.userInfo, hasUserIn...
Sopra20-03/project-client
src/components/shared/models/Game.js
/** * Game model */ class Game { constructor(data = {}) { this.gameId = null; this.gameName = null; this.creatorUsername = null; this.dateCreated = null; this.rounds = null; this.playerCount = null; this.currentRound = null; this.score = null; ...
madnight/gitter
server/api/v1/rooms/bans.js
<reponame>madnight/gitter "use strict"; var roomService = require('../../../services/room-service'); var restSerializer = require("../../../serializers/rest-serializer"); var loadTroupeFromParam = require('./load-troupe-param'); var RoomWithPolicyService = require('../../../services/room-with-policy-service'); module...
arv/atom-traceur-test
build/runtime/system-map.js
"use strict"; function prefixMatchLength(name, prefix) { var prefixParts = prefix.split('/'); var nameParts = name.split('/'); if (prefixParts.length > nameParts.length) return 0; for (var i = 0; i < prefixParts.length; i++) { if (nameParts[i] != prefixParts[i]) return 0; } return prefixParts....
Apocrypse/LeetCode
Python/111minimum_depth_of_binary_tree.py
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def minDepth(self, root): """ :type root: TreeNode :rtype: int """ if not root: retur...
skkuse-adv/2019Fall_team2
analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/kr/co/popone/fitts/ui/ImageViewForList.java
package kr.co.popone.fitts.ui; import android.content.Context; import android.util.AttributeSet; import android.view.View; import androidx.appcompat.widget.AppCompatImageView; import java.util.HashMap; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.NotNull; import org.jetbrains.annota...
teachy/blog
blog-common/src/main/java/club/javafan/blog/common/util/PageQueryUtil.java
package club.javafan.blog.common.util; import java.util.HashMap; /** * @author 币圈豆子哥 * @date 2019/12/11 21:38 * @desc 分页插件实体 */ public class PageQueryUtil extends HashMap<String, Object> { //当前页码 private int page; //每页条数 private int limit; public PageQueryUtil(int page,int limit) { th...
nobo728x/logbook
logbook-core/src/main/java/org/zalando/logbook/Stages.java
<gh_stars>1000+ package org.zalando.logbook; import org.zalando.logbook.Logbook.RequestWritingStage; import static org.zalando.logbook.Logbook.ResponseProcessingStage; import static org.zalando.logbook.Logbook.ResponseWritingStage; final class Stages { private Stages() { } static RequestWritingStage n...
stoogoff/python-to-javascript
PythonToJavascript/fixers/fixIndents.py
from helpers import gatherSubNodesD, getNodeKind import re def fixIndents( nodes ): prefix = "" for sub_node in gatherSubNodesD( nodes ): if getNodeKind( sub_node ) == "DEDENT": space_rgx = re.compile( r"(.*?)( +)(\n*)$", re.S ) m = space_rgx.match( sub_node.prefix ) ...
rodfernandez/lazojs
lib/public/bundle.js
define(['underscore', 'base', 'resolver/component', 'jquery'], function (_, Base, cmpResolver, $) { 'use strict'; var supportsImports = (function () { return LAZO.isClient && 'import' in document.createElement('link'); })(); return Base.extend({ response: function (route, uri, option...
NCIP/c3pr
codebase/projects/web/src/java/edu/duke/cabig/c3pr/web/participant/ParticipantDetailsTab.java
<gh_stars>1-10 /******************************************************************************* * Copyright Duke Comprehensive Cancer Center and SemanticBits * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/c3pr/LICENSE.txt for details. *******************************...
mcodegeeks/OpenKODE-Framework
01_Develop/libXMFFmpeg/Source/libavcodec/srtdec_c.cpp
<filename>01_Develop/libXMFFmpeg/Source/libavcodec/srtdec_c.cpp /* * SubRip subtitle decoder * Copyright (c) 2010 <NAME> <<EMAIL>> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by ...
vidit1999/daily_coding_problem
data/dailyCodingProblem795.cpp
#include <bits/stdc++.h> using namespace std; /* Assume you have access to a function toss_biased() which returns 0 or 1 with a probability that's not 50-50 (but also not 0-100 or 100-0). You do not know the bias of the coin. Write a function to simulate an unbiased coin toss. */ // true => head (70%) // false => ta...
AAU-PSix/canary
src/instrumentor/c_tree_infestator.py
from typing import List, Dict, Callable from ts import ( Node, Parser, Tree, CSyntax, CNodeType, CField ) from cfa import ( CFA, CFANode ) from .c_canary_factory import CCanaryFactory from .tree_infection import TreeInfection from .tree_infestator import TreeInfestator class CTreeInfest...
liasece/micserver
micserver.go
package micserver import ( "math/rand" "time" "github.com/liasece/micserver/app" "github.com/liasece/micserver/conf" ) // SetupApp func func SetupApp(configpath string) (*app.App, error) { // 初始化随机数种子 rand.Seed(time.Now().UnixNano()) cfg, err := conf.LoadConfig(configpath) if err != nil { return nil, err ...
Willy5s/Pirates-Online-Rewritten
pirates/quest/QuestHolder.py
<gh_stars>10-100 from pirates.quest import QuestHolderBase class QuestHolder(QuestHolderBase.QuestHolderBase): def getLinkedHolders(self): return []
ArrogantWombatics/openbsd-src
usr.sbin/amd/rpcx/amq_xdr.c
/* * Please do not edit this file. * It was generated using rpcgen. */ #include "amq.h" bool_t xdr_amq_string(XDR *xdrs, amq_string *objp) { if (!xdr_string(xdrs, objp, AMQ_STRLEN)) return (FALSE); return (TRUE); } bool_t xdr_time_type(XDR *xdrs, time_type *objp) { if (!xdr_int64_t(xdrs, objp)) return (F...
ykyh1214/gadwords
draft.go
<gh_stars>0 package gadwords type DraftService struct { Auth } func NewDraftService(auth *Auth) *DraftService { return &DraftService{Auth: *auth} }
holdenhinkle/vets-website
src/applications/financial-status-report/pages/householdIncome/socialSecurity.js
<reponame>holdenhinkle/vets-website<filename>src/applications/financial-status-report/pages/householdIncome/socialSecurity.js<gh_stars>0 import currencyUI from 'platform/forms-system/src/js/definitions/currency'; import _ from 'lodash/fp'; export const uiSchema = { 'ui:title': 'Your other income', additionalIncome...
iitsoftware/swiftmq-client
src/main/java/com/swiftmq/net/protocol/raw/RawOutputHandler.java
/* * Copyright 2019 IIT Software GmbH * * IIT Software GmbH licenses this file to You 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...
qianfei11/zstack
sdk/src/main/java/org/zstack/sdk/DeleteEcsInstanceLocalResult.java
<reponame>qianfei11/zstack package org.zstack.sdk; public class DeleteEcsInstanceLocalResult { }
flipk/pfkutils
libprotossl/libprotossl.h
/* -*- Mode:c++; eval:(c-set-style "BSD"); c-basic-offset:4; indent-tabs-mode:nil; tab-width:8 -*- */ #ifndef __LIBPROTOSSL2_H__ #define __LIBPROTOSSL2_H__ #include "pfkutils_config.h" #include <mbedtls/entropy.h> #include <mbedtls/ctr_drbg.h> #include <mbedtls/ssl.h> #include <mbedtls/ssl_cookie.h> #include <mbedtls...
Sun-CX/reactor
netc/tests/Buffer-Test.cpp
<reponame>Sun-CX/reactor<gh_stars>1-10 // // Created by suncx on 2020/8/19. // #include "Buffer.h" #include "ConsoleStream.h" using reactor::net::Buffer; static void test_find() { Buffer buf; char msg[] = "hello\r\nworld\r\n."; buf.append(msg, sizeof(msg)); auto idx = buf.find_crlf(); RC_DEBUG...
andrew-t-james/personal-project
src/Reducers/__test__/auth.test.js
<filename>src/Reducers/__test__/auth.test.js import { authReducer } from '../auth'; import * as actions from '../../Actions/auth'; describe('', () => { const id = 1; const name = 'Steve'; const image = 'some-url'; const mockUser = { uid: id, displayName: name, photoURL: image }; test('should r...
satryarangga/triparoom
src/containers/flight/confirmation.js
<reponame>satryarangga/triparoom import React, { Component } from 'react'; import { connect } from 'react-redux'; import Header from '../../components/layout/header'; import Footer from '../../components/layout/footer'; import Breadcrumb from '../../utils/breadcrumb'; import OrderLeft from '../../components/flight/conf...
ScalablyTyped/SlinkyTyped
d/dojo/src/main/scala/typingsSlinky/dojo/dojo/main/i18n.scala
<gh_stars>10-100 package typingsSlinky.dojo.dojo.main import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation._ /** * Permalink: http://dojotoolkit.org/api/1.9/dojo/main.i18n.html * * This module implements the dojo/i18n! plugin and the v1.6- i18n API * We choose to include our ...
JenoDK/wk-app
src/main/java/com/jeno/fantasyleague/ui/common/tabsheet/CustomMenuBar.java
<filename>src/main/java/com/jeno/fantasyleague/ui/common/tabsheet/CustomMenuBar.java package com.jeno.fantasyleague.ui.common.tabsheet; import java.util.Map; import java.util.Objects; import java.util.Optional; import com.google.common.collect.Maps; import com.vaadin.flow.component.ClickEvent; import com.vaadin.flow....
rackeric/rack
commands/filescommands/objectcommands/deletemetadata.go
<filename>commands/filescommands/objectcommands/deletemetadata.go package objectcommands import ( "fmt" "strings" "github.com/rackspace/rack/commandoptions" "github.com/rackspace/rack/handler" "github.com/rackspace/rack/internal/github.com/codegangsta/cli" osObjects "github.com/rackspace/rack/internal/github.co...
kiran-blockchain/comcast-india-go
more-examples/11-if/exercises/03-arg-count/solution/main.go
<reponame>kiran-blockchain/comcast-india-go // Copyright © 2018 <NAME> // Learn Go Programming Course // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ // // For more tutorials : https://learngoprogramming.com // In-person training : https://www.linkedin.com/in/inancgumus/ // Follow me on twitter: https:...
mc-chinju/bitflyer-api
spec/lib/bitflyer_api/private/private_spec.rb
<reponame>mc-chinju/bitflyer-api require "spec_helper" RSpec.describe "HTTP Private Api" do let!(:client){ BitflyerApi.client } it "Needs API_KEY and API_SECRET" do VCR.use_cassette("needs_access_key") do response = client.my_permissions aggregate_failures do expect(response["status"]).to...
fesp21/harbor
webApp/server/gmail/setHistoryStartId.js
import User from '../models/User' import * as api from './api' import logger from '../log' export default async function setHistoryStartId(userId) { const oauth2Client = api.getAuthClient() const user = await User.findById(userId, 'googleId googleToken gmailHistoryStartId') if (user.gmailHistoryStartId) { ...
open-hand/hzero-front
packages/hzero-front-hrpt/src/models/templateManage.js
<filename>packages/hzero-front-hrpt/src/models/templateManage.js /** * @date 2018-12-06 * @author: CJ <<EMAIL>> */ import { isEmpty } from 'lodash'; import { getResponse, createPagination } from 'utils/utils'; import { queryMapIdpValue } from 'hzero-front/lib/services/api'; import { fetchTemplateManageList, crea...
LightSun/Android-ImagePick
ImagePickApp/app/src/main/java/com/heaven7/android/pick/app/MainActivity.java
/* package com.heaven7.android.pick.app; import android.Manifest; import android.graphics.Bitmap; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com....
barak/raidutils
raidutil/command.hpp
/* Copyright (c) 1996-2004, Adaptec Corporation * 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 source code must retain the above copyright notice, this * list of...
JerrNeon/AndroidProject
core/src/main/java/com/jn/kiku/annonation/RefreshViewType.java
<reponame>JerrNeon/AndroidProject<gh_stars>0 package com.jn.kiku.annonation; import androidx.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import static com.jn.kiku.annonation.RefreshViewType.ALL; import static com.jn.kiku.annonation.RefreshViewType.NONE; impo...
pinkgoldpeach/Ticketline
client/src/main/java/at/ac/tuwien/inso/ticketline/client/gui/controller/LoginController.java
package at.ac.tuwien.inso.ticketline.client.gui.controller; import at.ac.tuwien.inso.ticketline.client.service.AuthService; import at.ac.tuwien.inso.ticketline.client.exception.ServiceException; import at.ac.tuwien.inso.ticketline.client.util.BundleManager; import at.ac.tuwien.inso.ticketline.client.util.SpringFxmlLoa...
mooshak-dcc/mooshak-2
src/main/java/pt/up/fc/dcc/mooshak/client/gadgets/diagrameditor/DiagramEditorPresenter.java
package pt.up.fc.dcc.mooshak.client.gadgets.diagrameditor; import java.util.ArrayList; import java.util.Date; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google...
uprm-gaming/virtual-factory
src/com/virtualfactory/threads/UpdateSlotsStorage.java
package com.virtualfactory.threads; import com.jme3.math.Vector3f; import com.jme3.scene.Geometry; import com.jme3.scene.shape.Box; import com.virtualfactory.engine.GameEngine; import com.virtualfactory.entity.E_Slot; import com.virtualfactory.entity.E_Station; import com.virtualfactory.utils.Pair; import com.virtualf...
Tony031218/OI
local/codes/1132.cpp
/************************************************************* * > File Name : 1132.cpp * > Author : Tony * > Created Time : 2019/08/09 12:18:47 * > Algorithm : 模拟 **************************************************************/ #include <bits/stdc++.h> using namespace std; inline i...
upupming/algorithm
leetcode/contest-40/5559.cpp
<filename>leetcode/contest-40/5559.cpp #include <vector> using namespace std; // 最长单调子序列算法 // 数据量 10^3 比较小,可以直接用 dp O(n^2) 的算法,不需要用 O(n log n) 的贪心 // f[k]: 以 k 结尾的最长上升子序列的长度 // g[k]: 以 k 开头的最长上升子序列的长度 // argmax f[k] + g[k] - 1, st. f[k] > 1, g[k] > 1 class Solution { public: int minimumMountainRemovals(vector<i...
LAOMENGA/LiteOS_Lab
iot_link/os/novaos/core/mem/src/heap.c
/* * Copyright (c) [2019] Huawei Technologies Co.,Ltd.All rights reserved. * * LiteOS NOVA is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. * You may obtain a copy of Mulan PSL v1 at: * * http://license.coscl.org.cn/MulanPSL * * THIS SO...
libogonek/ogonek
include/ogonek/encoding/iterator.h++
<reponame>libogonek/ogonek // Ogonek // // Written in 2012-2013 by <NAME> <<EMAIL>> // // To the extent possible under law, the author(s) have dedicated all copyright and related // and neighboring rights to this software to the public domain worldwide. This software is // distributed without any warranty. // // You sh...
jojoba106/OpenPype
openpype/hosts/harmony/plugins/load/load_template_workfile.py
<gh_stars>10-100 import tempfile import zipfile import os import shutil from avalon import api, harmony class ImportTemplateLoader(api.Loader): """Import templates.""" families = ["harmony.template", "workfile"] representations = ["*"] label = "Import Template" def load(self, context, name=None...
equalitie/baskerville
src/baskerville/db/data_partitioning.py
<reponame>equalitie/baskerville<gh_stars>10-100 # Copyright (c) 2020, eQualit.ie inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import dateutil.parser from datetime import datetime from baskerville.db.bas...
Arainsd/Wms
src/Mobiles/Ionic/www/js/ngTygaSoft/services/LocalStorage.js
<filename>src/Mobiles/Ionic/www/js/ngTygaSoft/services/LocalStorage.js angular.module('ngTygaSoft.services.LocalStorage', []) //本地存储数据=================================== .factory('$tygasoftLocalStorage', ['$window', function ($window) { return { //存储单个属性 Set: function (key, value) { $w...
MammatusTech/qbit-microservices-examples
serviceBundle/src/main/java/com/mammatustech/todo/Auditor.java
package com.mammatustech.todo; interface Auditor { void audit(final String operation, final String log); }
kittqiu/snippet-fibula
www/model/train/train_resource.js
<reponame>kittqiu/snippet-fibula 'use strict'; var base = require('../_base'); module.exports = function(warp){ return base.defineModel(warp, 'TrainResource', [ base.column_id('section_id', {index:true}), base.column_id('course_id', {index:true}), base.column_id('att_id') ], { table: 'train_reso...
vipulchodankar/gec-computer-engineering
first-year/semester-2/Practicals/Experiment 9/insertend.c
<filename>first-year/semester-2/Practicals/Experiment 9/insertend.c<gh_stars>1-10 #include<stdio.h> int main(){ int num,arr[100],i,val; printf("Enter number of elements:\n"); scanf("%d",&num); printf("\nEnter %d Elements:\n",num); for(i=0;i<num;i++) scanf("%d",&arr[i]); printf("\nEnt...
AnkushChandra/Os-simulator
routes/executables/system_calls/man.c
<reponame>AnkushChandra/Os-simulator #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> // Usage man systemcall int main(int argc, char const *argv[]) { if(strcmp(argv[1],"./man")==0) { if(strcmp(...
tengge1/bootstrap-es6
bootstrap-es6/bootstrap-es6/source/XType.js
// XType.js class XType { static get(config) { if (config == null || config.xtype == null) { throw 'XType: config or config.xtype is undefined.'; } var cls = XType.xtypes[config.xtype]; if (cls == null) { throw `XType: xtype '${config.xtype}' is undefined.`...
trivigy/migrate
types/direction.go
<reponame>trivigy/migrate package types import ( "bytes" "github.com/trivigy/migrate/v2/global" ) // Direction defines the type of the migration direction. type Direction int const ( // DirectionUp indicates the direction type is forward. DirectionUp Direction = iota + 1 // DirectionDown indicates the directi...
ktrzeciaknubisa/jxcore-binary-packaging
lib/jx/_jx_argv.js
<filename>lib/jx/_jx_argv.js // Copyright & License details are available under JXCORE_LICENSE file var argvParsed = null; var separators = ['=', ':']; var prefixes = ['--', '-']; // maintain this order if (process.platform === 'win32') prefixes.push('/'); var path = require('path'); var fs = require('fs'); var jx...
DaveVoorhis/Rel
ServerV0000/src/org/reldb/rel/v0/types/TypeRelation.java
package org.reldb.rel.v0.types; import org.reldb.rel.v0.generator.Generator; import org.reldb.rel.v0.values.*; public class TypeRelation extends TypeHeading { private static TypeRelation emptyType = new TypeRelation(new Heading()); /** Create new relation type from a given Heading. */ public TypeRelat...
ocl-vgu/jocl
src/main/java/com/vgu/se/jocl/expressions/AssociationClassCallExp.java
/************************************************************************** Copyright 2019 Vietnamese-German-University 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/lic...
chrilves/gospeak
infra/src/test/scala/gospeak/infra/services/storage/sql/CfpRepoSqlSpec.scala
package gospeak.infra.services.storage.sql import cats.data.NonEmptyList import gospeak.core.domain.Talk import gospeak.core.domain.utils.FakeCtx import gospeak.infra.services.storage.sql.CfpRepoSqlSpec._ import gospeak.infra.services.storage.sql.EventRepoSqlSpec.{table => eventTable} import gospeak.infra.services.sto...
systemfreund/teku
sync/src/main/java/tech/pegasys/teku/sync/CoalescingChainHeadChannel.java
<filename>sync/src/main/java/tech/pegasys/teku/sync/CoalescingChainHeadChannel.java<gh_stars>0 /* * Copyright 2020 ConsenSys AG. * * 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:/...
weicao/galaxysql
polardbx-parser/src/test/java/com/alibaba/polardbx/druid/sql/parser/SQLStatementParserTest.java
/* * Copyright [2013-2021], Alibaba Group Holding Limited * * 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 app...
suchov/codewars-1
(4 kyu) Human readable duration format.js
/** * Human readable duration format (4 kyu) https://www.codewars.com/kata/human-readable-duration-format * Your task in order to complete this Kata is to write a function which * formats a duration, given as a number of seconds, in a human-friendly way. * The function must accept a non-negative integer. If it is z...
uk-gov-mirror/ministryofjustice.cla_backend
cla_backend/apps/reports/urls.py
from django.conf.urls import patterns, url from . import views from . import api urlpatterns = patterns( "", url(r"^api/exports/$", api.ExportListView.as_view(), name="exports"), url(r"^api/exports/(?P<pk>[0-9]+)/$", api.ExportListView.as_view(), name="exports"), url(r"^exports/download/(?P<file_name...
adambirse/innovation-funding-service
ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/documentation/ApplicationSummaryDocs.java
package org.innovateuk.ifs.documentation; import org.innovateuk.ifs.application.builder.ApplicationSummaryResourceBuilder; import org.innovateuk.ifs.application.resource.FundingDecision; import org.springframework.restdocs.payload.FieldDescriptor; import java.math.BigDecimal; import java.time.ZonedDateTime; import s...
Aryan-Madaan/CodeforcesCompetetions
CodeChef/Snackdown Qualifier/TestMatchSeries.cpp
<reponame>Aryan-Madaan/CodeforcesCompetetions<gh_stars>0 // Created by <NAME>. //--------------------------------------------------------------------------------------------------- #include <bits/stdc++.h> #include <stdio.h> using namespace std; #define Expresso std::ios::...
lechium/tvOS142Headers
System/Library/PrivateFrameworks/AVConference.framework/Frameworks/ViceroyTrace.framework/SegmentStatsDelegate.h
/* * This header is generated by classdump-dyld 1.5 * on Tuesday, November 10, 2020 at 10:16:08 PM Mountain Standard Time * Operating System: Version 14.2 (Build 18K57) * Image Source: /System/Library/PrivateFrameworks/AVConfere...
nayotta/metathings
pkg/evaluatord/service/query_storage_by_device.go
package metathings_evaluatord_service import ( "bytes" "context" "encoding/json" "time" "github.com/golang/protobuf/ptypes" structpb "github.com/golang/protobuf/ptypes/struct" log "github.com/sirupsen/logrus" grpc_helper "github.com/nayotta/metathings/pkg/common/grpc" policy_helper "github.com/nayotta/metat...
codegrady/aliyun-openapi-java-sdk
aliyun-java-sdk-crm/src/main/java/com/aliyuncs/crm/model/v20150324/FindBizCategoryConfigResponse.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 under the Apache License, Version 2.0 (the * "License"); you ...
MedleyJS/medley
test/extensions.test.js
<reponame>MedleyJS/medley 'use strict' const {test} = require('tap') const medley = require('..') const request = require('./utils/request') test('.extend() should be chainable', (t) => { const app = medley() .extend('a', 'aVal') .extend('b', 'bVal') t.equal(app.a, 'aVal') t.equal(app.b, 'bVal') t.e...
hitlion/Rubymotion-Childern-app-for-iOS
app/models/story/story_object.rb
module Story # A wrapper around a single object inside a screen. # All vital properties can be accessed via attributes. # Changes to the writeable attributes are traced and can be # monitored using the {#changes} attribute. class Object include Story::SlotsMixin include Story::AttributeValidationMixin...
tumblr/gocircuit
src/tumblr/scribe/thrift/scribe/ttypes.go
<gh_stars>10-100 // Copyright 2013 Tumblr, Inc. // // 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 la...
illuminatixs-newbms/Lidium
scripts/portal/jail_out.js
/** * @author: Ronan * @event: Jail */ function enter(pi) { var jailedTime = pi.getJailTimeLeft(); if(jailedTime <= 0) { pi.playPortalSound(); pi.warp(300000010,"in01"); return true; } else { var seconds = Math.floor(jailedTime / 10...
jwoo1601/Java-Minecraft-Mods
[Universal] 3Kids Sudden Surivival/src/main/java/jwk/suddensurvival/block/BlockFenceImpl.java
<gh_stars>0 package jwk.suddensurvival.block; import static net.minecraftforge.common.util.ForgeDirection.UP; import net.minecraft.block.BlockFence; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.world.World; public class BlockFenceImpl extends BlockFence { pub...
hu19891110/keke
public/themes/default/assets/js/cashout.js
<gh_stars>0 /** * Created by kuke on 2016/5/4. */ $(function(){ var demo=$(".registerform").Validform({ btnSubmit:"#btn_sub", tiptype:3, label:".label", showAllError:true, datatype:{ "number":/^\d+(\.\d{1,2})?$/, }, }); $('.l...
tvasset/momentum-ui
charts/src/lib/area/example/index.js
import MomentumCharts from '../../index.js'; const example = () => { const colorSets = MomentumCharts.colors('10Colors'); const colors = colorSets.scheme(10); const scaleX = MomentumCharts.scale('scaleLinear', { domain: [0, 4], range: [100, 700] }).Scale; const scaleY = MomentumCharts.scale('scaleLine...
JosephUz/fish-market
client/src/views/cards/ConfirmCard.js
import React, { Component } from 'react'; import { userMapper } from '../../store/mappers'; class ConfirmCard extends Component { constructor(props) { super(props); this.state = { confirmed: false }; this.callBack = this.callBack.bind(this); } componentWillMount() { this.props.confirm...
ess-dmsc/nicos
nicos_mlz/labs/puma/multidet/setups/cad.py
<gh_stars>1-10 description = 'Combined multianalyzer axis setup' group = 'lowlevel' # includes = ['analyzer'] devices = dict( st_att = device('nicos.devices.generic.VirtualMotor', unit = 'deg', abslimits = (-117, 117), speed = 0.5, lowlevel = True, ), # cad = device('nicos...
gpe-tech/ranger-clubhouse-web
app/constants/bmid.js
import { IN_PREP, DO_NOT_PRINT, READY_TO_PRINT, READY_TO_REPRINT_CHANGE, READY_TO_REPRINT_LOST, ISSUES, SUBMITTED, MEALS_ALL, MEALS_PRE, MEALS_PRE_PLUS_EVENT, MEALS_PRE_PLUS_POST, MEALS_EVENT, MEALS_EVENT_PLUS_POST, MEALS_POST } from 'clubhouse/models/bmid'; export const BmidStatusLabels = { [IN_PREP]...
dspsforms/dspsAdvisingFlow
dspsmisc-backend/models/aap2-form-model.js
<gh_stars>0 const mongoose = require('mongoose'); const commonFormSchema = require('./common-form-schema'); module.exports = mongoose.model('aap2', commonFormSchema);
Bullgator351/throneteki
server/game/cards/10-SoD/SeptonMeribald.js
const DrawCard = require('../../drawcard'); class SeptonMeribald extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Stand up to 3 characters', cost: ability.costs.kneelSelf(), target: { mode: 'upTo', numCards: 3, ...
josenorberto/concerto-platform
src/Concerto/PanelBundle/Resources/public/angularjs/app/concerto_panel/js/controllers/textarea_controller.js
<reponame>josenorberto/concerto-platform<filename>src/Concerto/PanelBundle/Resources/public/angularjs/app/concerto_panel/js/controllers/textarea_controller.js function TextareaController($scope, $uibModalInstance, value, readonly, title, tooltip) { $scope.value = value; $scope.readonly = readonly; $scope.ti...
prydin/opentelemetry-auto-instr-java
java-agent/instrumentation/java-concurrent/src/main/java/io/opentelemetry/auto/instrumentation/java/concurrent/AsyncPropagatingDisableInstrumentation.java
package io.opentelemetry.auto.instrumentation.java.concurrent; import static io.opentelemetry.auto.instrumentation.api.AgentTracer.activateSpan; import static io.opentelemetry.auto.instrumentation.api.AgentTracer.activeSpan; import static io.opentelemetry.auto.instrumentation.api.AgentTracer.noopSpan; import static io...
UCLA-SEAL/JShrink
code/experiment_resources/ohloh_projects/maven-config-processor-plugin/src/main/java/com/google/code/configprocessor/processing/properties/AbstractPropertiesActionProcessingAdvisor.java
/* * Copyright (C) 2009 <NAME> <<EMAIL>> * * 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 applic...
LambdaInnovation/LambdaLib
src/main/java/cn/lambdalib/util/mc/SideHelper.java
/** * Copyright (c) Lambda Innovation, 2013-2016 * This file is part of LambdaLib modding library. * https://github.com/LambdaInnovation/LambdaLib * Licensed under MIT, see project root for more information. */ package cn.lambdalib.util.mc; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.Enti...
OlenaStoliarova/java-training
ExceptionsFromGolovachCourse/src/pessimistic_throw/SeveralExceptions.java
<gh_stars>0 package pessimistic_throw; //Рассмотрим ситуацию с кодом, который может бросать проверяемые исключения разных типов. //Далее учитывайте, что EOFException и FileNotFoundException — потомки IOException. import java.io.EOFException; import java.io.FileNotFoundException; import java.io.IOException; public cl...
noobatl/gtProject2
routes/api-user.js
const db = require("../models"); module.exports = function (app) { app.get("/api/user", function (req, res) { db.User.findAll({}).then(function (dbUser) { res.json(dbUser); }); }); app.get("/api/user/:id", function (req, res) { db.User.findOne({ where: { id: req.params.id, },...
cyberflamingo/launch-school-rb101
exercises/RB101_small_problems/medium_1/03_rotation_part_3.rb
def rotate_array(list) rotated_list = list.dup rotated_list << rotated_list.shift rotated_list end def rotate_rightmost_digits(number, n) leftmost_digits = number.to_s[0...-n] rightmost_digits = rotate_array(number.to_s[-n..-1].chars) (leftmost_digits + rightmost_digits.join).to_i end def max_rotation(...
cattlepotato/gatk_ca
src/test/java/org/broadinstitute/hellbender/tools/exome/sexgenotyper/ContigGermlinePloidyAnnotationTableReaderUnitTest.java
<filename>src/test/java/org/broadinstitute/hellbender/tools/exome/sexgenotyper/ContigGermlinePloidyAnnotationTableReaderUnitTest.java package org.broadinstitute.hellbender.tools.exome.sexgenotyper; import org.broadinstitute.hellbender.exceptions.UserException; import org.broadinstitute.hellbender.utils.test.BaseTest; ...
bdshadow/kubernetes-client-android
kubernetes-model/vendor/github.com/openshift/origin/pkg/route/generator/generate_test.go
<filename>kubernetes-model/vendor/github.com/openshift/origin/pkg/route/generator/generate_test.go<gh_stars>0 /** * Copyright (C) 2015 Red Hat, Inc. * * 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 ...
fscm/multicurrency
tests/test_dollar.py
<gh_stars>1-10 # -*- coding: UTF-8 -*- # # copyright: 2020-2022, <NAME> # author: <NAME> <http://github.com/fscm> # license: SPDX-License-Identifier: MIT """Tests for the Dollar currency representation(s).""" from decimal import Context from pytest import raises from multicurrency import Currency from multicurrency i...
snumrl/DataDrivenBipedController
PyCommon/external_libraries/VirtualPhysics/vpLib/include/VP/vpNDOFJoint.inl
<reponame>snumrl/DataDrivenBipedController /* VirtualPhysics v0.9 2008.Feb.21 Imaging Media Research Center, KIST <EMAIL> */ VP_INLINE void vpNDOFJoint::SetTransformFunc(TransformNDOF *fun) { assert(m_iDOF == fun->m_iDOF && "vpNDOFJoint::SetTransformFunc(TransformNDOF *) -> inconsistent DOF"); m_pTra...
TU-Berlin-DIMA/babelfish
compiler/src/main/java/de/tub/dima/babelfish/typesytem/valueTypes/number/integer/CSVSourceInt_32.java
package de.tub.dima.babelfish.typesytem.valueTypes.number.integer; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.library.ExportLibrary; import com.oracle.truffle.api.library.ExportMessage; import de.tub.dima.babelfish.storage.UnsafeUtils; @ExportLibrary(value = IntLibrary.class) publi...
kjerabek/netexp
netexp/info_extractors/tcpip_flow_extractor.py
<gh_stars>0 from netexp.info_extractors.base_extractor import BaseExtractor from netexp.primitives.packet.base_tcpip_packet_info import BaseTCPIPPacketInfo class TcpIpFlowExtractor(BaseExtractor): def __init__(self, config): self.config = config self.flows = {} self.unfinished_flows = [] ...
Ding-Jun/ReportSystem
src/main/java/com/funtest/analysis/dao/impl/UserDaoImpl.java
<reponame>Ding-Jun/ReportSystem package com.funtest.analysis.dao.impl; import java.math.BigInteger; import org.hibernate.SQLQuery; import org.springframework.stereotype.Repository; import com.funtest.analysis.bean.User; import com.funtest.analysis.dao.BaseDao; import com.funtest.analysis.dao.UserDao; import com.funt...
yjy239/SuperJsBridge
app/src/main/java/com/yjy/superjsbridgedemo/model/User.java
package com.yjy.superjsbridgedemo.model; /** * <pre> * author : yjy * e-mail : <EMAIL> * time : 2020/08/06 * desc : * version: 1.0 * </pre> */ public class User { String username; String password; public String getUsername() { return username; } public void...
jas07061002/TweetMiner_Summer
app/models/Tweet_Object.java
<reponame>jas07061002/TweetMiner_Summer package models; /** * Retrieves a tweet_object, which fetches tweet details like created date, * full text , tweet id, User details from JSON response of Twitter API. * * @author <NAME> * @version 1.0.0 */ public class Tweet_Object { /** * Tweet created date in...
gta-chaos-mod/plugin-sdk
plugin_III/game_III/CRegisteredShinyText.cpp
<filename>plugin_III/game_III/CRegisteredShinyText.cpp<gh_stars>100-1000 /* Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "CRegisteredShinyText.h" PLUGIN_SOURCE_...
ivan-uskov/graphics
3d_walk/utils/rangef.h
<gh_stars>0 #pragma once class RangeF { public: RangeF(float from, float to); bool has(float num) const; private: float m_from = 0; float m_to = 0; };
jb892/sstk
client/js/lib/STK.js
// Include everything in STK-core var STK = require('./STK-core'); STK.Constants.sys = { fs: require('io/FileUtil'), Buffer: Buffer }; /* List namespaces */ /** @namespace anim */ /** @namespace data */ /** @namespace editor */ /** @namespace nlp */ /** @namespace query */ /** @namespace ui */ // Include additio...