language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C++
UTF-8
1,143
2.890625
3
[]
no_license
#pragma once #include "Component.hpp" #include "ResourceHolder.hpp" #include "ResourceIdentifiers.hpp" #include <vector> #include <string> #include <memory> #include <functional> namespace GUI { class Button final : public Component { public: using Callback = std::function<void()>; enum class Type { Nor...
Python
UTF-8
4,600
2.859375
3
[]
no_license
import unittest from unittest.mock import MagicMock, patch from weather.weather import Weather import urllib.request as urllib import json import boto3 from boto3.dynamodb.conditions import Key class FakeResponse(): def read(self): pass class TestWeather(unittest.TestCase): def test_set_status_succes...
C#
UTF-8
1,051
2.609375
3
[ "MIT" ]
permissive
//----------------------------------------------------------------------- // <copyright file="NoOpCommand.cs" company="AllocateThis!"> // Copyright (c) AllocateThis! Studio's. All rights reserved. // </copyright> //----------------------------------------------------------------------- using System.Net.Socket...
JavaScript
UTF-8
58,334
2.84375
3
[]
no_license
/* remedy-rest-api.js 6/19/18 andrew@hicox.com <Andrew Hicox> this is an object-oriented javascript library for talking to BMC Remedy ARS REST Webservices. */ /* DO-TO (6/19/18 @ 1648) * support for sending attachments * ARFormEntry class to model a set of fields from a form ...
Shell
UTF-8
760
3.703125
4
[ "LLVM-exception", "Apache-2.0" ]
permissive
#!/bin/bash set -euo pipefail # This is a convenience script for maintainers changing a cranelift # dependencies versions. To use, bump the version number below, run the # script. topdir=$(dirname "$0")/.. cd "$topdir" # All the cranelift-* crates have the same version number version="0.49" # Update all of the Carg...
JavaScript
UTF-8
698
3.03125
3
[]
no_license
import Quiz from './Quiz.js' /** * The starting point of the application * Enter the Nickname * @module js/app * @author Adrian Rosales * @version 1.0.0 * * @param {@listens} event */ function submit (event) { if (event.which === 13 || event.keyCode === 13 || event.type === 'click') { event.preventDefaul...
Python
UTF-8
294
3.421875
3
[ "MIT", "LicenseRef-scancode-unknown" ]
permissive
import pygame class Obstacle: def __init__(self, location, radius, weight=None): self.location = location self.radius = radius self.weight = weight def draw(self, canvas): pygame.draw.circle(canvas, pygame.Color('red'), self.location, self.radius, 2)
C
UTF-8
1,410
3.921875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define DEBUG if(0) int main() { int i, len, count = 0, countWord = 0; char string[200]; scanf(" %[^\n]", string); len = strlen(string); //tamanho da string DEBUG { printf("%d\n", len); } for(i = 0 ; i < len ; i++) //passo a s...
Java
UTF-8
272
1.9375
2
[]
no_license
package com.qa.pages; import org.openqa.selenium.ScreenOrientation; import com.qa.base.TestBase; public class ScreenRotate extends TestBase { public void rotateScreen() { driver.rotate(ScreenOrientation.LANDSCAPE); driver.rotate(ScreenOrientation.PORTRAIT); } }
C#
UTF-8
3,071
2.953125
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Telerik.JustMock; namespace JustMock.ElevatedExamples.BasicUsage.Mock_MustBeCalled { /// <summary> /// The MustBeCalled method is used to assert that a call to a given method or property is made during the execution of a test. ...
C
UTF-8
145
2.875
3
[]
no_license
#include <stdio.h> int main(int argc, char const *argv[]) { int a; float b; scanf("%d",&a); b = 5*(a-32)/9; printf("c=%.2f",b); return 0; }
Python
UTF-8
504
3.25
3
[ "Apache-2.0" ]
permissive
import six from ast import literal_eval def convert_string_to_float_int(string): if isinstance(string, six.string_types): try: # evaluate the string to float, int or bool value = literal_eval(string) except Exception: value = string else: value = s...
Java
UTF-8
1,609
1.804688
2
[]
no_license
package com.adjust.sdk; import android.content.Context; import android.net.Uri; public class Adjust { private static AdjustInstance defaultInstance; private Adjust() { } public static synchronized AdjustInstance getDefaultInstance() { AdjustInstance adjustInstance; synchronized (Adju...
Shell
UTF-8
1,835
3.984375
4
[]
no_license
#!/bin/bash # Script to automagically generate SUMO network and demand-files with recommended options from OSM with coordinates if [[ "$1" =~ --help ]]; then printf "Generates SUMO net-file from OSM network given by coords and models demand on that network\nUsage: \$script <W,S,E,N> <PREFIX>\n" printf "The coordinat...
Java
UTF-8
2,861
2.265625
2
[]
no_license
package edu.epam.service; import java.sql.SQLException; import java.util.List; import java.util.Map; import edu.epam.constants.EFactoryType; import edu.epam.factory.AbstractDAOFactory; import edu.epam.model.CourseComment; import edu.epam.model.Direction; import edu.epam.model.TestResults; public class DirectionServi...
TypeScript
UTF-8
1,603
2.6875
3
[]
no_license
import EDDSA from "elliptic" import { Blockchain } from "../blockchain/blockchain" import { ChainUtil } from "../chain-util" import { INITIAL_BALANCE } from "../config" import { Transaction } from "./transaction" import { TransactionPool } from "./transaction-pool" export class Wallet { balance: number keyPai...
Java
UTF-8
2,072
1.78125
2
[]
no_license
package com.jeecg.position.service.impl; import com.jeecg.position.entity.PositionModuleEntity; import com.jeecg.position.service.PositionModuleServiceI; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; import org.jeecgframework.core.common.model.json.DataGrid; import org.jee...
Java
UTF-8
1,365
1.867188
2
[]
no_license
package com.cms.service.impl; import com.cms.core.foundation.Page; import com.cms.dao.mapper.CmsModelItemMapper; import com.cms.service.api.CmsModelItemService; import com.cms.service.converter.CmsModelItemConverter; import com.cms.service.dto.CmsModelItemDto; import org.springframework.beans.factory.annotation.Autowi...
C++
UTF-8
7,674
2.96875
3
[]
no_license
#include "store/values.h" #include <gtest/gtest.h> namespace store { const uint64 kStoreSize = 1024 * 1024; class ArityTest : public testing::Test { protected: ArityTest() : store_(kStoreSize) { } StaticStore store_; }; TEST_F(ArityTest, EmptyArity) { const vector<Value> features; const Arity* ar...
Ruby
UTF-8
1,570
3.875
4
[]
no_license
require 'byebug' class Simon COLORS = %w(red blue green yellow) attr_accessor :sequence_length, :game_over, :seq def initialize @game_over = false @sequence_length = 1 @seq = [] end def play until game_over take_turn end game_over_message reset_game end def take_turn...
Markdown
UTF-8
2,583
3
3
[ "Apache-2.0" ]
permissive
# S3 Storage This document covers the process of Monolith's S3 Storage module. ## Structure The following structure defines the flat module: ``` ├── __init__.py ├── bucket_manager.py ├── errors.py └── file_manager.py ``` The engine is stored in the ```__init__.py```. It's currently got a flat structure as there does...
PHP
UTF-8
6,728
2.8125
3
[]
no_license
<?php namespace Application\Service; use Application\Entity\Book; use Application\Entity\User; use Application\Entity\BookIssue; class BookManager { /** * Doctrine entity manager. * @var Doctrine\ORM\EntityManager */ private $entityManager; // Constructor is used to inject dep...
Markdown
UTF-8
6,023
2.921875
3
[]
no_license
# FPGA, ASIC et HDL [^fpga]: *Field Programmable Gate Array* [^asic]: *Application Specific Integrated Circuit* [^hdl]: *Hardware Description Language* Les circuits intégrés ont fait leur apparition dans les années 60, leur création ayant été rendue possible par les avancées dans le développement des matériaux semi-c...
C++
UTF-8
3,033
2.59375
3
[]
no_license
/* * Set to 1 if you want to run this sketch. Other RUNNING macros should then be * set to 0 in order prevent multiple definitions of setup and loop. */ #define RUNNING 0 #if RUNNING #include <CurieBLE.h> #include "/../SolarTracking.h" /* * Sketch to test Bluetooth connectivity from the Arduino 101 to any periph...
Python
UTF-8
1,126
2.78125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ Created on Thu Feb 21 17:20:50 2019 @author: Jason @e-mail: jasoncoding13@gmail.com """ import os import scrapy class ExampleSpider(scrapy.Spider): name = 'example' start_urls = [ 'https://web.timetable.usyd.edu.au/menu.jsp?siteMap=true' ] custom_setti...
JavaScript
UTF-8
2,622
3.1875
3
[]
no_license
document.addEventListener("DOMContentLoaded", function(event) { var allCardsHtml = document.getElementById("stacks-template").innerHTML; var cardHtml = document.getElementById("addStack-template").innerHTML; var newCardHtml = document.getElementById("addNewStack-template").innerHTML; var HandlebarsStack...
Shell
UTF-8
1,185
3.21875
3
[]
no_license
#!/bin/bash for c in inp sch exe out do for s in 250 500 1000 do for a in 1 2 4 8 do for w in 1 2 4 8 do f="sids/$c.$s.$a.$w.sids" grep "$c : $s : 0 : $a : $w : " experiment.sids > $f test -s $f || rm -f $f done...
Java
UTF-8
1,824
3
3
[]
no_license
package com.other; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class TestMultiThread { // private final Queue<Integer> indexlDs = new LinkedList<>(); private final Stack<Integer> indexlDs = new Stack<>(); public void th(){ for( int i = 0 ; i < 10000; i++){ ...
C++
UTF-8
2,305
2.53125
3
[]
no_license
#include "step.hh" namespace Dune { namespace Mock { void Step::init(Vector& x, Vector& b) { x0 = x; b0 = b; wasInitialized = true; } void Step::reset(Vector& x, Vector& b) { x0 = x; b0 = b; wasReset = true; } void Step::compute(Vector& x, Vector& b...
C++
UTF-8
4,837
2.984375
3
[]
no_license
#include <iostream> #include <ctime> #include <deque> #include <pthread.h> using namespace std; enum kierunek { polnoc = 0, wschod = 1, poludnie = 2, zachod = 3 }; class Punkt { public: int x; int y; Punkt(){ x = y = 0; } Punkt(int x, int y){ this->x = x; ...
Java
UTF-8
3,798
2.234375
2
[]
no_license
package io.rong.push.common; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Parcelable; import android.os.Process; import android.util.Log; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io...
C++
UTF-8
4,062
2.59375
3
[]
no_license
#pragma once #include <QString> //------------------------------------------------------------------------------ // PlayerPosition // TODO: Just use a bitfield here... //------------------------------------------------------------------------------ enum class PlayerPosition { None, Catcher, First, Se...
Python
UTF-8
139
3.0625
3
[]
no_license
def on_square(squareNb): return 2 ** (squareNb - 1) def total_after(squareNb): return sum(2 ** i for i in range (0 , squareNb) )
Java
UTF-8
1,456
4
4
[]
no_license
package com.arrays; /** * 测试数组的拷贝 * @author Administrator * */ public class TestArrayCopy { public static void main(String[] args) { testBasicCopy(); testDelByCopy(); String[] s = {"a","b","c","d","e"}; s = removeElement(s, 1); s = extendArray(s); for(int i=0; i<s.length; i++){...
Python
UTF-8
882
3.8125
4
[]
no_license
#Intro to strings my_name="bibek" my_newname="bibek1" print(f"my name is : {my_name} \nmy new name is : {my_newname}") space="" space1=" " print(f"{bool(space)}") print(f"{bool(space1)}") my_fav_script="python scripting" print(my_fav_script) print(my_fav_script[0]) print(my_fav_script[5]) print(my_fav_script[5]) print...
Ruby
UTF-8
1,191
2.53125
3
[]
no_license
class Feed < ActiveRecord::Base has_many :items, :order => "id DESC" has_many :feed_tags has_many :tags, :through => :feed_tags def self.find_all_with_unread #fields = self.columns.map {|f| "f." + f.name }.join(",") #self.find_by_sql("SELECT #{fields}, COUNT(i.id)-SUM(i.seen) AS unread FROM feeds f, it...
Rust
UTF-8
23,119
3.015625
3
[]
no_license
use eetf::Term; use std::io::{self, Read}; use std::iter; use std::str; use heck::CamelCase; use num_traits::cast::{FromPrimitive, ToPrimitive}; use serde::de::{ self, DeserializeOwned, DeserializeSeed, EnumAccess, IntoDeserializer, MapAccess, SeqAccess, VariantAccess, Visitor, }; use crate::error::{Error, ...
Java
UTF-8
1,158
2.65625
3
[ "MIT" ]
permissive
/* * 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 aula1; /** * * @author 19221080 */ public class Caixa { private double largura; private double altura; private...
Python
UTF-8
1,266
3.453125
3
[]
no_license
class Solution: def canJump(self, nums: List[int]) -> bool: j= len(nums)-1 i = j # Iterate from last index to the first index of nums # Check if the farthest index can be reach at current position is greater than j. # Update j if True. while i>=0: if i + n...
PHP
UTF-8
300
3.109375
3
[]
no_license
<?php class classname { public $attribute; function __construct($param) { $this->attribute=$param; echo $this->attribute; } public function operation() { echo 'this is operation'; } function __destruct() { echo 'destruct'; } }
Java
UTF-8
654
3.015625
3
[]
no_license
package domain; import java.util.Timer; import java.util.TimerTask; public class Reloj { private Reloj instance = null; public Reloj getInstance() { if (instance == null) { return new Reloj(); } return instance; } Timer timer = new Timer(); public int segundos; public boolean frozen; class Contado...
C++
UTF-8
5,087
2.75
3
[]
no_license
#pragma once #include "luaState.h" #include <filesystem> namespace file = std::tr2::sys; namespace lua { /*---------------------------------------------------------------------------------------> || note: default argument values are not given here (see class declaration) || note: function explanations are not gi...
Markdown
UTF-8
1,665
2.828125
3
[]
no_license
# 一、个人博客 出于省钱考虑,原博客域名已经卖掉,学习笔记现在全部记录在 fedbook 这个仓库下,该仓库将不再维护。 # 二、我的书单 ## 已读书单 推荐星级 - ★★★:值得一看,看了不会后悔的 - ★★☆:可以一看,能学到点东西 - ★☆☆:稍微看看,了解了解 - ☆☆☆:不推荐,有这个时间不如出去放松一下吧 ### 前端 - [x] ★★☆ **重学前端** winter <sub>`2019`</sub> ### Python - [x] ★★☆ **Python爬虫开发与项目实战** <sub>`2017`</sub> - [x] ★★☆ **Python3网络爬虫开...
Java
UTF-8
9,151
1.734375
2
[]
no_license
package com.ceic.mem.persistence.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "users_relation") public class UsersRelationEntity implements Serializable ...
PHP
UTF-8
1,671
2.65625
3
[]
no_license
<?php require_once('../config.php'); require_once(DBAPI); $atletas = null; $atleta = null; /** * Listagem de Atletas */ function index() { global $atletas; $atletas = find_all('atletas'); } /** * Cadastro de Atletas */ function add() { if (!empty($_POST['atleta'])) { ...
Markdown
UTF-8
3,961
3.125
3
[ "ICU", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- title: " DTOJ3238交通\t\t" tags: - 二分 - 思路 url: 7096.html id: 7096 categories: - Solution date: 2019-03-24 10:29:35 --- 思考一下我们要做的操作。就是对于当前点,从其最大的子树中挑一个点出来,将这个点及其子树的大小算到当前点最小的子树中,让答案尽可能小。 首先可以知道,答案是可二分的,我们二分答案,转为判定性问题。其答案下界是 次大子树大小 与 最大最小子树大小平均值 的最大值,而上界自然是 最大子树大小。 不妨在树状数组内处理答案。那么对于当前点,其子树在dfs序上就是连续的一段区间。那么我们在树...
Python
UTF-8
701
3.796875
4
[]
no_license
# Definition for an interval. class Interval: def __init__(self, s=0, e=0): self.start = s self.end = e class Solution: def merge(self, intervals): """ :type intervals: List[Interval] :rtype: List[Interval] """ intervals.sort(key = lambda x: x.start) ...
JavaScript
UTF-8
1,347
2.546875
3
[ "MIT" ]
permissive
const express = require('express'); const router = express.Router(); const priceController = require('./price.controller'); const paramValidation = require('./priceParam-validation'); const validate = require('express-validation'); // routes router.post('/submit', [validate(paramValidation.createPrice), submit]); route...
Ruby
UTF-8
771
4.3125
4
[]
no_license
# Implement a caesar cipher that takes in a string and the # shift factor and then outputs the modified string # From: https://www.theodinproject.com/paths/full-stack-ruby-on-rails/courses/ruby-programming/lessons/caesar-cipher def caesar_cipher(text, shift) upper = ('A'..'Z').to_a lower = ('a'..'z').to_a ...
Python
UTF-8
453
2.90625
3
[]
no_license
import yfinance as yf import pandas as pd msft = yf.Ticker("FROTO.IS") print(msft.info) x = msft.info zip = x["zip"] print("Posta Kodu :",zip) #print(x) xxx = msft.quarterly_financials print(type(xxx)) print(xxx.head()) print(xxx) print(xxx[["2021-03-31"]]) x2= xxx[["2021-03-31"]] test = pd.DataFrame(x2) test2 = tes...
Swift
UTF-8
8,417
2.734375
3
[]
no_license
// // MovieListView.swift // Movies // // Created by Ho Duy Luong on 5/4/20. // Copyright © 2020 Ho Duy Luong. All rights reserved. // import UIKit import iCarousel class MovieListViewController: UIViewController { private let backgroundImageView: UIImageView = { let backgroundImage = UIImage(nam...
Go
UTF-8
561
2.53125
3
[]
no_license
package storage import ( "fmt" "os" "github.com/gomodule/redigo/redis" ) const redisHost string = "redis-cluster-ip-service" const redisPort string = "6379" // GetRedisConn returns a redis Conn func GetRedisConn(redisDial func(network, address string, options ...redis.DialOption) (redis.Conn, error)) redis.Conn ...
Markdown
UTF-8
1,089
2.578125
3
[ "MIT" ]
permissive
Virtual File System Virtual File System (VFS) or virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. The virtual file system provides all the fun...
Shell
UTF-8
516
2.90625
3
[ "Apache-2.0" ]
permissive
#!/bin/bash HOST=$1 ORG=$2 REPO=$3 PR=$4 [ "$HOST" == "" ] && ( echo "no host specified"; exit 1; ) [ "$ORG" == "" ] && ( echo "no org specified"; exit 1; ) [ "$REPO" == "" ] && ( echo "no repo specified"; exit 1; ) [ "$PR" == "" ] && ( echo "no pr specified"; exit 1; ) mkdir -p src/$HOST/$ORG \ && cd src/$HOST/$OR...
Shell
UTF-8
162
2.515625
3
[ "MIT" ]
permissive
set -e for filename in `ls src/*.re` do node_modules/.bin/bsc -format $filename > ${filename}2 mv ${filename}2 $filename git mv $filename ${filename%.re}.res done
Java
UHC
1,121
2.296875
2
[]
no_license
package mumi.usercontroller; import java.io.IOException; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import mumi.model.service.MumiService; public ...
C++
UTF-8
3,483
2.609375
3
[]
no_license
#include<iostream> using namespace std; int a[1000001],t[1000001]; void build(int node,int s,int e) { if(s==e) { t[node]=a[s]; cout<<"node = "<<node<<endl; cout<<"t[node] = "<<t[node]<<endl; } else{ int mid=(s+e)/2; build(2*node,s,mid); build(2*node+1,mid+1,e); t[node]=t[2*node]+t[2*node+1]...
C++
UTF-8
3,223
3.546875
4
[]
no_license
// An Iterative C++ program to do DFS traversal from // a given source vertex. DFS(int s) traverses vertices // reachable from s. #include <bits/stdc++.h> using namespace std; <<<<<<< HEAD enum edge_direction { ======= enum edge_direction { >>>>>>> cbacd2620d17b8b6f8adfee86cf4ea019165ab88 IN, OUT }; struct...
Markdown
UTF-8
1,163
2.5625
3
[]
no_license
--- layout: post title: "AWS Academy in UTHermosillo!!" date: 2021-03-22 10:52:04 -0700 categories: blog update --- In our Academic Educators Group: ConSolTI, we are starting a new project, in which we have the goal to ADOPT CLOUD TECH to our Education Programs, and in our classroom. Our first phase is: AWS. --- Adv...
Ruby
UTF-8
11,877
2.75
3
[ "BSD-3-Clause" ]
permissive
module Rubyplot module Artist class Axes < Base TITLE_MARGIN = 10.0 LEGEND_MARGIN = 15.0 LABEL_MARGIN = 10.0 DEFAULT_MARGIN = 10.0 THOUSAND_SEPARATOR = ','.freeze # Rubyplot::Figure object to which this Axes belongs. attr_reader :figure # Array of plots conta...
Shell
UTF-8
793
2.59375
3
[]
no_license
#!/bin/bash echo 'alias p="docker run --rm -it -v /tmp/demo:/tmp/demo clearhaus/pedicel-pay"' function p() { docker run --rm -it -v /tmp/demo:/tmp/demo clearhaus/pedicel-pay $@ } p clean -p /tmp/demo/backend p clean -p /tmp/demo/client set -x read; clear p read; clear p help generate-backend read; clear p gener...
Go
UTF-8
1,042
3.71875
4
[]
no_license
package main import ( "container/heap" ) type intHeap []int func (h intHeap) Len() int { return len(h) } func (h intHeap) Less(i, j int) bool { return h[i] < h[j] } func (h intHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } func (h *intHeap) Push(x interface{}) { // Push and Pop use pointer receive...
C
UTF-8
5,959
3.46875
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 typedef int ElemType; typedef int Status; //如果*T字符串串有值,直接释放free掉,之后malloc /* c4-2.h 串的堆分配存储 */ typedef struct { char *ch; /* 若是非空串,则按串长分配存储区,否则ch为NULL */ //char 数组指针 int lengt...
Swift
UTF-8
1,189
3.390625
3
[]
no_license
// // colorjSONModel.swift // ParsingJSON // // Created by Bienbenido Angeles on 12/2/19. // Copyright © 2019 Bienbenido Angeles. All rights reserved. // import Foundation struct ColorData: Codable{ var colors: [Colors] } struct Colors:Codable { var hex: HexData var rgb: RGBData var name: Na...
C#
UTF-8
3,210
2.546875
3
[]
no_license
using PersonaDetalle.BLL; using PersonaDetalle.Entidades; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace PersonaDetalle.UI.Registro { pub...
Java
UTF-8
1,013
2.859375
3
[]
no_license
package org.tsinghuatj.framework.constants; import java.util.EnumSet; public enum RoleEnum { admin(1, "管理员"), // warehouseKeeper(2, "仓库"), quality(3, "质检"), // repaire(4, "刃磨"), // technology(5, "工艺"),;// private Integer code; private String roleName; public int getCode() { return code; } public void s...
Java
UHC
1,303
3.328125
3
[]
no_license
package com.day6; import java.util.Random; import java.util.Scanner; public class Quest2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Random rd = new Random(); int cnt; int num,a; String user= ""; while(true) { cnt=1; num = rd.next...
Markdown
UTF-8
4,735
2.953125
3
[ "MIT" ]
permissive
--- layout: post title: "My year in books" modified: categories: blog excerpt: My favorite reads of 2015 tags: [books] image: feature: author: prateek_nigam date: 2015-12-25T12:39:55-04:00 share: true --- I read 22 books this year which was a personal best, just 2 shy of 2 books a month. A total of 8000 pages. :D I...
Go
UTF-8
234
2.5625
3
[ "Apache-2.0" ]
permissive
package entity import uuid "github.com/satori/go.uuid" var genUUID = uuid.NewV4 func New(firstName, lastName string) *Account { return &Account{ UUID: genUUID().String(), FirstName: firstName, LastName: lastName, } }
C#
UTF-8
1,774
2.734375
3
[]
no_license
 using System; using System.Collections.Generic; using CoreGraphics; using ReadyToUseUIDemo.model; using UIKit; namespace ReadyToUseUIDemo.iOS.View { public class ButtonContainer : UIView { public UILabel Title { get; private set; } public List<ScannerButton> Buttons { get; private set; } ...
Java
UTF-8
5,982
1.960938
2
[]
no_license
package com.example.juicekaaa.fireserver.activity; import android.annotation.SuppressLint; import android.content.Intent; import android.media.MediaPlayer; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.view.KeyEvent; import android.view.MotionEvent; import android.vie...
Java
UTF-8
6,237
1.835938
2
[]
no_license
/******************************************************************************* * Copyright (c) 2017 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and ...
Java
UTF-8
6,253
2.09375
2
[]
no_license
package com.mt4.api; import com.mt4.api.bean.ConGroup; import com.mt4.api.bean.MarginLevel; import com.mt4.api.bean.RateInfo; import com.mt4.api.bean.ReportGroupRequest; import com.mt4.api.bean.SymbolInfo; import com.mt4.api.bean.TickRecord; import com.mt4.api.bean.TradeRecord; import com.mt4.api.bean.TradeTransInfo; ...
Java
UTF-8
501
1.992188
2
[]
no_license
package pl.luckyit.test.controller; import pl.luckyit.test.model.transport.ProjectDTO; import java.util.List; /** * Created by Lucjan.Kornacki on 2018-06-13. */ public interface GitRepoController { /** * List of user projects * * @param user name of user * @param actual flag of actuality of...
PHP
UTF-8
2,077
2.59375
3
[]
no_license
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Upload extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this control...
JavaScript
UTF-8
654
3.609375
4
[]
no_license
/** * Created by Tihomir Dimov on 27.7.2017 г.. */ function addRemoveElements(arr) { let numbers = []; for (let i = 0; i < arr.length; i++) { let input = arr[i].split(' '); let command = input[0]; let argument = input[1]; switch (command) { case ('add'): ...
Java
UTF-8
1,255
3.375
3
[ "MIT" ]
permissive
package Parcial1_problema1; import java.util.Scanner; public class Problema2 { public void parcial() { System.out.println("Problema#2"); double total = 0; //Vector nota = new Vector(); int[] notas = new int[4]; String nom = ""; String apell = ""; double ...
Java
UTF-8
413
2.3125
2
[]
no_license
package com.example.robinsuri.addapp.util; import java.util.ArrayList; import java.util.List; /** * Created by robinsuri on 10/27/14. */ public interface IClock { public long currentTimeInMillis(); public void addListener(Listener listener); public void removeListener(Listener listener); public v...
C#
UTF-8
1,348
2.65625
3
[]
no_license
/* FINAL GAME PROJECT * * File: HelpScreen.cs * Full Name: Hy Minh Tran * Student #: 7910276 * Date created: 11/30/2018 * Finished: 9:00 AM December 10, 2018. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framewor...
Java
UTF-8
1,310
3.53125
4
[]
no_license
package leetcode.BFS; import java.util.*; public class PostOfficeI { public int shortestDistance(int[][] grid) { if (grid.length == 0 || grid[0].length == 0) return 0; int[] rowCount = new int[grid.length]; int[] colCount = new int[grid[0].length]; for (int i = 0; i < grid.length; i++) { for (int j ...
Markdown
UTF-8
2,456
2.609375
3
[]
no_license
### Hi there, I'm Chuck 👋 ___ ![Chuck's GitHub stats](https://github-readme-stats.vercel.app/api?username=chuckkainrath&count_private=true&show_icons=true&theme=merko) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=chuckkainrath&theme=merko&layout=compact)](https://github.com/anuraghazr...
C#
UTF-8
6,834
2.734375
3
[ "Apache-2.0" ]
permissive
#if WINDOWS_PHONE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; #else using NUnit.Framework; #endif namespace Serial...
C#
UTF-8
1,432
2.703125
3
[ "MIT" ]
permissive
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BoneRotation { private Transform boneTransform; private float rotationAngleMax; private float rotationAngleStep; private Vector3 rotationAxis; private float currentAngle = 0; private float defaultAng...
C++
UTF-8
2,184
2.671875
3
[]
no_license
#include <stdio.h> #include <thread> #include <atomic> #include "CoreArbiter/CoreArbiterClient.h" #include "CoreArbiter/Logger.h" #include "PerfUtils/Cycles.h" #include "PerfUtils/TimeTrace.h" #include "PerfUtils/Util.h" using PerfUtils::TimeTrace; using CoreArbiter::CoreArbiterClient; using namespace CoreArbiter; #...
C#
UTF-8
425
2.828125
3
[]
no_license
namespace Estates.Data.Offers { using Interfaces; public class SaleOffer : Offer, ISaleOffer { private static readonly OfferType OfferType = OfferType.Sale; public SaleOffer() : base(OfferType) { } public decimal Price { get; set; } public override string ...
TypeScript
UTF-8
1,081
2.96875
3
[]
no_license
import * as pathToRegexp from "path-to-regexp"; interface ICache{ [pattern:string]:pathToRegexp.PathFunction } interface IpatternCache{ [pattern:string]:ICache } const patternCache:IpatternCache = {}; const cacheLimit = 10000; let cacheCount = 0; const compileGenerator = (pattern:string) => { const cacheKey = p...
Java
UTF-8
2,389
2.421875
2
[]
no_license
// Copyright 2012 Google Inc. All Rights Reserved. package com.google.android.sdk; import com.android.tradefed.config.Option; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.result.ITestInvocationListener; import com.android.tradefed.util.ArrayUtil; import com.android.tradefed.util.FileUtil;...
Java
UTF-8
750
2.34375
2
[ "MIT" ]
permissive
package com.mp.piggymetrics.statistics.domain.timeseries; import org.jnosql.artemis.Column; import org.jnosql.artemis.Entity; import java.util.Date; @Entity public class DataPointId { @Column private String account; @Column private Date date; public DataPointId() { } public DataPointId(String account...
Java
UTF-8
2,206
1.976563
2
[]
no_license
package com.makenv.controller; import com.makenv.condition.StationDetailCondition; import com.makenv.config.SpeciesConfig; import com.makenv.domain.City; import com.makenv.service.RankService; import com.makenv.service.StationDetailService; import com.makenv.service.StationService; import com.makenv.service.impl.Stati...
Python
UTF-8
517
2.796875
3
[]
no_license
# -*- coding: utf-8 -*- """ @author by mkzhou @time 2020/6/7 16:21 """ from multiprocessing import Pool import os import random import time def worker(msg): t_start = time.time() print('{}开始执行,进程号{}'.format(msg, os.getpid())) time.sleep(random.random()*2) t_stop = time.time() print('{}执行完毕,耗时{:.2f...
Java
UTF-8
400
1.960938
2
[ "MIT" ]
permissive
package com.dcpuz.spring.servera.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * <p> * web controller * </p> * * @author dengc * @since 2020/6/11 */ @RestController public class WebController { @RequestMapping...
Java
UTF-8
885
2
2
[]
no_license
package ru.babobka.node.dummybenchmark; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import ru.babobka.nodetester.benchmark.NodeBenchmark; import ru.babobka.nodetester.benchmark.NodeBenchmarkCLI; import java.util.Collections; import java.util.List; public class DummyNodeBenchmarkA...
C++
UTF-8
211
2.5625
3
[]
no_license
#include <cmp/TextureCmp.hpp> #include <ostream> std::ostream & operator<<(std::ostream &os, const TextureCmp & cmp) { cmp.print(os, TextureCmp::getName()) << "\n\tITexture: " << cmp.texture; return os; }
Java
UTF-8
1,405
2.5
2
[]
no_license
package scheduler.ycp.edu.shared; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import com.google.gwt.core.shared.GWT; @SuppressWarnings("serial") public class Schedule extends Publisher implements Serializable{ public enum Events{ ADD_REQUIRED, REMOVE_REQUIRED, ADD_OPTIONAL,...
C#
UTF-8
1,343
2.890625
3
[]
no_license
using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Web.Http; namespace FileServer { public class FileController : ApiController { private string _dataFolder = @"D:\Users\Jeroen\TA-Advanced\Data"; [Route("files/{fileName}",...
C#
UTF-8
3,839
4.125
4
[ "MIT" ]
permissive
using System; /* Problem 13. Solve tasks Write a program that can solve these tasks: Reverses the digits of a number Calculates the average of a sequence of integers Solves a linear equation a * x + b = 0 Create appropriate methods. Provide a simple text-based menu for the user to...
Ruby
UTF-8
1,339
2.59375
3
[]
no_license
module ApisHelper # This method is for encoding the JWT before sending it out def encodeJWT(creator, exp=48.hours.from_now) # add the expire to the payload, as an integer payload = { creators_id: creator.id } payload[:exp] = exp.to_i # Encode the payload whit the application secret, and a more advanced hash...
Markdown
UTF-8
3,040
2.765625
3
[]
no_license
# Business Continuity and Disaster Recovery ## Design Considerations - Consider Recovery Point Objective (RPO) and Recovery Time Objective(RTO) requirements, as those will dictate if App Gateway needs to be deployed in: - Single or Multi Region - Active-Active or Active-Standby Configuration - Do we need a sing...
Java
UTF-8
1,032
2.78125
3
[]
no_license
package DataModel; /** * * @author Fresh */ public class ProductReport { private String tagID, tagName, status, identifyingAntenna; public ProductReport(String tagID,String tagName,String status,String identifyingAntenna){ this.tagID = tagID; this.tagName = tagName; this.status ...
C#
UTF-8
2,520
2.546875
3
[ "MIT" ]
permissive
using Core.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using BNetLib.Ribbit.Models; namespace Core.Services { public interface ICDNs { Task<Manifest<CDN[]>> Latest(string code); Task<Manifest<CDN[]>> Previous(...