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
Swift
UTF-8
310
2.703125
3
[]
no_license
// hurdleRace func hurdleRace(k: Int, height: [Int]) -> Int { let highestJump = height.max() var portionNeeded = 0 if let highestJump = highestJump { let gap = k - highestJump if gap >= 0 { portionNeeded = 0 } else { portionNeeded = abs(gap) } } return portionNeeded }
C++
UTF-8
852
2.8125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; vector<vector<int> > diagonal(vector<vector<int> > &A) { if(A.size()==0) { return A; } int n=A.size(); int s = 2*A.size()-1; vector<vector<int> >ans(s); for(int j=0;j<=n-1;j++) { int idx=j; for(int i=0;i<=j;i++) { ans[j].push_back(A[i][idx]); ...
Java
UTF-8
120
2
2
[]
no_license
package prototype; /** * 抽象原型类 * @author ShenSha */ public interface Prototype { Prototype clone(); }
C++
UTF-8
1,852
3.671875
4
[]
no_license
#ifndef AGENDA_H #define AGENDA_H #include "data.h" #include "contacto.h" #include <vector> #include <memory> #include <functional> template<typename T> class Agenda { private: std::vector<std::shared_ptr<Data<T>>>datos; public: Agenda(); void inserta(std::shared_ptr<Data<T> > a); void ...
Java
GB18030
1,814
2.53125
3
[]
no_license
package cn.newer.adapter; import cn.newer.R; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView.FindListener; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; publi...
C++
UTF-8
1,017
3.796875
4
[]
no_license
//O(N^2) #include<bits/stdc++.h> using namespace std; //A blue print of what tree will contain struct node{ //a variable to store data int data; //left and right named user defined pointers to point to it's child nodes. node *left, *right; //user defined function to create a node. node(int data) ...
C
UTF-8
578
2.9375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <time.h> #include <sys/time.h> int main() { FILE *fp_read, *fp_write; fp_read = fopen("./test.txt", "r"); fp_write = fopen("./test_getc.txt", "w+"); if (fp_read == NULL) { printf("Cannot open file test.txt\n"); } if (fp_write == NULL) { ...
C++
UTF-8
1,271
3.34375
3
[]
no_license
#include<iostream> int gGT(int, int); int kuerzen(int, int, int, int); int main(){ int n1, n2, z1, z2, n, z, x, i = 0; std::cout << "Bitte geben Sie den Zaehler der ersten Zahl an: "; std::cin >> z1; std::cout << "Bitte geben Sie den Nenner der ersten Zahl an: "; std::cin >> n1; std::cout << "Bitte g...
Python
UTF-8
723
3.765625
4
[]
no_license
# Příklad na použití fronty - rozpočítávadlo. # # Děti v kruhu, rozpočítávadlo má $m$ slabik, začíná se prvním. # Na koho padne poslední slabika, vypadává. # Hraje se, dokud nevypadne poslední. # Děti reprezentujeme pomocí fronty, budeme přesouvat ze začátku na konec. # # Jan Kybic, 2016 from knuthqueue import Queue ...
Java
UTF-8
1,773
3.515625
4
[]
no_license
package hiho521; import java.util.Scanner; /** * Created by thd on 2017/5/21. * 题目4 : 逃离迷宫3 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi被坏女巫抓进一座由无限多个格子组成的矩阵迷宫。 小Hi一开始处于迷宫中央(0, 0)的位置。他发现每个格子都印有一个大写字母。并且从(0, 0)开始,按照A-Z的顺序,沿着顺时针螺旋循环排列,如下图所示(向右是X正方向,向上是Y正方向): 0 ... CXYZABCDE BWZABCDEF AVYJKLMFG ZUXIBCNGH 0...
TypeScript
UTF-8
700
3.0625
3
[]
no_license
import {Pipe,PipeTransform} from '@angular/core'; @Pipe({name: 'formatoHora'}) export class FormatoHoraPipe implements PipeTransform{ //coge el parametro pasado y lo pone en formato hora (requiere 4 dígitos) //dato | calculadora: otroDato //param1 param2 transform(value:any){ var cade...
C#
UTF-8
2,698
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; internal static class ExtensionMethods { /// <summary> /// /// </summary> /// <exception cref="SocketException"/> ...
Java
UTF-8
1,365
2.609375
3
[]
no_license
package com.kaicom.work; import java.io.IOException; import java.util.concurrent.TimeoutException; import com.kaicom.utils.ConnectionUtils; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.DefaultConsumer; public class Recv2 { private static final Stri...
C
UTF-8
448
3.3125
3
[]
no_license
void bubblesort(int arraysize, double * unsorted_array, int * flag_array) { for (int x = 0; x < arraysize; x++) { for (int y = 0; y < arraysize - 1; y++) { if (unsorted_array[y] > unsorted_array[y + 1]) { int temp = unsorted_array[y + 1]; unsorted_array[y + 1] = unsorted_array[y]; unsorted_array...
C#
UTF-8
1,904
2.640625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using Belatrix.MoneyExchange.Data; using Moq; namespace Belatrix.MoneyExchange.Tests { public static class UnifOfWorkExtensions { public static Mock<IUnitOfWork> SetupDbSet<TEntity>( this Mock<IUnitOfWork> self, ...
Java
UTF-8
939
2.171875
2
[]
no_license
package wangjie.asynctask; import wangjie.http.HttpDownloader; import wangjie.infotypes.BasicPageType; import wangjie.parser.HotBookParser; import wangjie.parser.PageParser; import wangjie.testactbar.HotBookFragment; import android.os.AsyncTask; public class FetchHotBookTask extends AsyncTask<String, Void, BasicPageT...
Java
UTF-8
1,485
2.40625
2
[ "Apache-2.0" ]
permissive
package cn.rdtimes.imp.mq.rocket; import cn.rdtimes.impl.mq.rocket.BRocketMessage; import cn.rdtimes.mq.BMQException; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageExt; import java.util.List; /** * @description: * @author: BZ * @create: 2020/2/13 */ public ...
Java
UTF-8
371
1.632813
2
[]
no_license
package com.lgz.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class Blogger { private int id; private String userName; private String password; private String profile; private String nickName; pr...
Java
UTF-8
2,482
1.882813
2
[ "Apache-2.0" ]
permissive
package com.centanet.hk.aplus.bean.login; /** * Created by yangzm4 on 2018/3/13. */ public class DomainUser { private String CityCode; private String StaffNo; private String CnName; private String DeptName; private String DomainAccount; private String Mobile; private String Title; p...
Java
UTF-8
1,531
2.484375
2
[]
no_license
package com.zodiackillerciphers.constraints; import java.util.List; import com.zodiackillerciphers.ciphers.Ciphers; import com.zodiackillerciphers.corpus.SearchConstraints; import com.zodiackillerciphers.io.FileUtil; public class NGramsTest { public static void test1() { String cipher = Ciphers.cipher[1].cipher...
Java
UTF-8
144
1.828125
2
[]
no_license
package com.jianghu.winter.query.cache; /** * @author daniel.hu */ @FunctionalInterface public interface CacheInvoker<T> { T invoke(); }
Ruby
UTF-8
2,878
4.375
4
[]
no_license
# below, we are creating and defining a method - cheese_and_crackers def cheese_and_crackers(cheese_count, boxes_of_crackers) # calling on our cheese_and_crackers method, pulling a cheese_count, and printing the following string puts "You have #{cheese_count} cheeses!" # calling on our cheese_and_crackers method, pul...
Markdown
UTF-8
905
3.234375
3
[ "MIT" ]
permissive
# is-reg > Regular expressions usually used > 常用的正则特殊需求表达式判断 ## Usage ``` bash npm i is-reg ``` ``` js const { isEmail } = require('is-reg') isEmail('csheng.dude@gmail.com') //true isEmail('hello.com') // false ``` ## API ### `isEmail(arg: string): boolean` 判断一个给定字符串是否是一个email格式的字符串 ### `isPhone(arg: st...
Python
UTF-8
1,251
3.203125
3
[]
no_license
import serial from colour import Color from time import sleep import atexit class seriaLED: def __init__(self, num_leds, wait=True): self.ser = serial.Serial('COM4', 57600, timeout = 1) self.leds = [0] * (num_leds * 3) self.num_leds = num_leds atexit.register(self.close) if wait: sleep(2) # enforced wait...
Java
UTF-8
424
2.25
2
[]
no_license
package com.example.academia.helper; import android.util.Base64; public class Codification { public static String codificacaoData(String infomation ){ return Base64.encodeToString(infomation.getBytes(), Base64.DEFAULT).replaceAll("(\\n|\\r)", ""); } public static String decodificationData (Stri...
C++
UTF-8
5,521
2.796875
3
[]
no_license
// // Created by kir55rus on 04.01.17. // #include <iostream> #include <cstring> #include <netdb.h> #include <unistd.h> #include <fstream> #include "HttpTask.h" #include "../Utils.h" #include "../Converter.h" HttpTask::HttpTask() :m_downloadedChecksum(0), m_serverAddrInfo(NULL), m_socket(-1), m_lastModifiedDate(0) { ...
C#
UTF-8
3,804
2.640625
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ShopKeeper { public partial class frmProductList : Form {...
C#
UTF-8
1,740
2.703125
3
[ "MIT" ]
permissive
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 DiceBot { public partial class DonateBox : Form { public DonateB...
C++
UTF-8
1,686
3.359375
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> using namespace std; int to_val(const string& s) { switch (s[0]) { case 'J': return 11; case 'Q': return 12; case 'K': return 13; case 'A': return 14; default: r...
Java
UTF-8
2,847
2.203125
2
[]
no_license
/******************************************************************************* * Copyright (c) 2008 Chris Aniszczyk 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 ...
C#
UTF-8
1,208
2.6875
3
[]
no_license
// ----------------------------------------------------------------------- // <copyright file="Singleton.cs" company="Microsoft"> // TODO: Update copyright text. // </copyright> // ----------------------------------------------------------------------- namespace WindsorMvc.Framework { using System; using Syst...
Java
UTF-8
218
1.976563
2
[]
no_license
package vn.com.vndirect.lib.commonlib.text; import org.jsoup.Jsoup; public class HtmlTagCleanerImpl implements HtmlTagCleaner { @Override public String clean(String html) { return Jsoup.parse(html).text(); } }
Python
UTF-8
19,816
3.390625
3
[ "MIT" ]
permissive
"""Utility functions. """ import functools import operator import itertools import time import sys from collections.abc import Iterable import tqdm import numpy as np class XYZError(Exception): pass def isiterable(obj): return isinstance(obj, Iterable) def prod(it): """Product of an iterable. """...
Python
UTF-8
227
2.59375
3
[]
no_license
from socket import * c = socket(AF_INET,SOCK_DGRAM) while True: msg = input('>>:').strip() c.sendto(msg.encode('utf-8'),('127.0.0.1',9999)) data,server_addr = c.recvfrom(1024) print(data,server_addr) c.close()
C
UTF-8
3,385
3.09375
3
[]
no_license
//Acomoda el numero #include <stdio.h> int main(int argc, char *argv[]){ int M,C; int L=0; scanf("%i",&M); struct numero{ int p; }numero[M]; for(int i=0;i<M;i++){ scanf("%i",&numero[i].p); } C=0; do{ if(numero[0].p > numero[C].p) L++; C++; }while(C!=M); printf("%i",L); } ...
JavaScript
UTF-8
558
2.515625
3
[]
no_license
const jwt = require('jsonwebtoken'); require('dotenv').config(); //*** Validate JWT ***/ exports.verify = (req) => { var token = req.headers['authorization'] || req.headers['x-access-token']; if (token.startsWith('Bearer ')) { token = token.slice(7, token.length); } if (!token) return { auth: false, messag...
PHP
UTF-8
1,140
2.875
3
[]
no_license
<?php /* Attempt MySQL server connection. Assuming you are running MySQL server with default setting (user 'root' with no password) */ $link = mysqli_connect('ec2-52-14-244-154.us-east-2.compute.amazonaws.com', 'ec2-user', 'group20database','group20'); // Check connection if($link === false){ die("ERROR: Could no...
Java
UTF-8
2,777
1.789063
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright 2009-2018 Exactpro (Exactpro Systems 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 a...
TypeScript
UTF-8
1,460
3.296875
3
[ "MIT" ]
permissive
import { pipe, toArray, zip, take, range, chunk } from './' it('should be possible to zip data together', () => { let program = pipe( [ [0, 1, 2, 3], ['A', 'B', 'C', 'D'], ], zip(), toArray() ) expect(program()).toEqual([ [0, 'A'], [1, 'B'], [2, 'C'], [3, 'D'], ]) }...
Python
UTF-8
2,540
2.953125
3
[]
no_license
import time import random ttri = [] ttrii = [] ttriii = [] tttri = [] tttrii = [] tttriii = [] ttttri = [] ttttrii = [] ttttriii = [] maxVal = 2**14 #nVal = 5 valx = [2**i for i in range (1,10)] #listeNombres = random.choices(range(maxVal),k=nVal) def triSelection(l: list)-> list: n = len(l) for i in range(0,n-1): ...
Java
UTF-8
1,982
1.789063
2
[]
no_license
package kr.kosmo.jobkorea.manageA.model; public class ExsubjectMgtDtlModel { //게시판 글번호 private int row_num; // private int no; //과정명 private String title; //구분-재시험 private String re; //대상자수 private String cnt; //로그인 아이디 private String loginID; //시험점수 private String mainscore; //재시험점수...
Markdown
UTF-8
1,671
3.03125
3
[]
no_license
# Indigo Slate Coding Challenge ## Development ### Challenge Requirements Use the video as a base to launch from, you do not need to match colors, recreate the logo, etc. You are also welcome to present an alternative to the classic Hamburger Menu. Also, please limit the use of Bootstrap or any other CSS framew...
Markdown
UTF-8
1,845
2.8125
3
[ "MIT" ]
permissive
--- layout: about title: About Us permalink: /about/ description: We bring together a team of graphic, developers, SEO experts, Servers Engenieers & Security experts for each project, ensuring you get the best mixture of talent and experience. priority: 0.9 --- <div class="container mtb"> <div class="row"> ...
JavaScript
UTF-8
333
3.515625
4
[]
no_license
console.log(7/0) //infinity console.log("10" / 2) //vai funcionar!!! console.log("Show!" * 2) //não vai funcionar!!! console.log(0.1 + 0.7) //pela fraca tipagem, a soma não vai ser precisa, vai dar 0.799999999999 //console.log(10.toString()) //não funciona console.log((10.345).toFixed(2)) // console.log((10).toFi...
Java
UTF-8
340
2.609375
3
[]
no_license
package Observer_pattern; import java.util.ArrayList; public abstract class Customer { ArrayList<CustomerListener> listener = new ArrayList<CustomerListener>(); public void attach(CustomerListener l) { listener.add(l); } public void dettach(CustomerListener l) { listener.remove(l); } public abstract void c...
Go
UTF-8
1,208
2.5625
3
[]
no_license
package main import ( "context" "fmt" "log" "net/http" "os" "os/signal" "syscall" "time" _ "github.com/go-sql-driver/mysql" "github.com/justpoypoy/go-base/infrastructure" ) var timeout = 30 * time.Second func main() { logger := infrastructure.NewLogger() infrastructure.Load(logger) ...
Java
UTF-8
851
2.40625
2
[]
no_license
package cn.withstars.chatroom; import cn.withstars.chatroom.util.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Created with IntelliJ IDEA. * Description: * User: withstars * Date: 2018-03-31 * Time: 17:19 * Mail: withstars@126.com */ public class Main { private static final Log...
Ruby
UTF-8
2,586
2.609375
3
[ "MIT" ]
permissive
# frozen_string_literal: true require_dependency "#{Rails.root}/lib/importers/article_importer" require_dependency "#{Rails.root}/lib/replica" require_dependency "#{Rails.root}/lib/utils" #= Updates records for revisions that were moved or deleted on Wikipedia class ModifiedRevisionsManager def initialize(wiki) ...
Markdown
UTF-8
7,590
3.125
3
[]
no_license
# School_District_Analysis ## Project Overview An employee for the Education District has been tasked with getting key metrics from School District grades. The analysis was completed by performing calculations to get sums, averages, and percentages in the School District data for high school grades. ## Challenge Overv...
Markdown
UTF-8
5,216
2.6875
3
[]
no_license
--- description: "Easiest Way to Prepare Super Quick Homemade Ray&amp;#39;s&amp;#39; banana buttercream" title: "Easiest Way to Prepare Super Quick Homemade Ray&amp;#39;s&amp;#39; banana buttercream" slug: 1550-easiest-way-to-prepare-super-quick-homemade-ray-and-39-s-and-39-banana-buttercream date: 2020-07-30T06:49:24....
PHP
UTF-8
1,265
2.515625
3
[]
no_license
<?php use yii\db\Migration; use app\modules\v1\models\TaxRate; use app\modules\settings\models\Zip; /** * Class m210525_130617_add_tax_to_zip */ class m210525_130617_add_tax_to_zip extends Migration { /** * {@inheritdoc} */ public function safeUp() { $this->addColumn('zip', 'tax', $this->float()); $...
Java
UTF-8
32,519
1.929688
2
[]
no_license
package zookeeper.configStation.servlet; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStr...
Markdown
UTF-8
1,752
2.65625
3
[]
no_license
--- layout: post category : thoughts tagline: "It is manageable!" tags : [visualized, loopy, management] title: Customer satisfaction and developer stress visualized --- {% include JB/setup %} Here is a causal loop diagram showing a model relating customer satisfaction to developer stress. It is taken (and slightly m...
Rust
UTF-8
1,275
3.5625
4
[]
no_license
fn main(){ let mut a = 2i32; let b = &mut a; //let c = b; //c,move occurs because `b` has type `&mut i32`,这里是模式匹配,转移所有权 let c:&mut i32 = &mut (*b); //编译通过,种种迹象表明这里是借用b也是借用*b //let c = &mut (*b); //println!("{:p}",&b);//cannot borrow `b` as immutable because it is also borrowed as mutable //*...
Java
UTF-8
2,842
2.328125
2
[]
no_license
package com.ting.androidexample.ui.activities; import android.app.Activity; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Bundle; import ...
Java
UTF-8
593
2.09375
2
[]
no_license
package tests; import base.BaseUtil; import org.testng.annotations.Test; import pages.LoginPage; import utils.RetryAnalyzer; import static org.testng.AssertJUnit.assertTrue; /** * Created by Gadotey on 2/25/2020 */ public class LoginPageTest extends BaseUtil { //RetryAnalyzer will make the test run again in c...
Shell
UTF-8
2,001
2.546875
3
[ "MIT" ]
permissive
echo "------------------------------------------------------------------------------------------------------" echo " BEGIN: tensorflow_compile.sh" echo "------------------------------------------------------------------------------------------------------" echo "-------------------------------------------------------...
Python
UTF-8
10,819
2.515625
3
[]
no_license
from clean_tweet import clean from keras.utils import to_categorical from keras.models import Sequential from keras.models import Model from keras.layers import Dense, Dropout, Embedding, LSTM, Input, Conv2D, MaxPooling2D, Bidirectional, Reshape, Flatten from keras.layers.merge import concatenate from keras.preproce...
Java
UTF-8
1,472
2.75
3
[]
no_license
package edu.byu.cs.familymapserver.databaseTests; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.List; import edu.byu.cs.familymapserver.database.Database; import edu.byu.cs.familymapserver.model.Event; import static org.junit.Assert.assertEquals...
JavaScript
UTF-8
1,798
2.53125
3
[]
no_license
module.exports = class TarefasDao { constructor(bancoDados){ this.bancoDados = bancoDados; } listaTarefas(){ return new Promise((resolve,reject)=>{ this.bancoDados.all("SELECT * FROM TAREFAS;", (err, rows)=> { if(err) reject("Erro ao consultar a tabela...
Python
UTF-8
698
3.3125
3
[]
no_license
import time import ordenamiento_burbuja as ob import random as r import ordenamiento_insercion as oi lista = [] for i in range (1200): lista.append (r.randint(1,10000)) listaCopia = lista.copy () listaCopia2 = lista.copy () #Inicio Burbuja inicio = time.time() #Instrucciones ob.ordenamientoBurbuja (lista) #Delt...
Rust
UTF-8
827
3.546875
4
[ "WTFPL" ]
permissive
fn grade(a: u32, b: u32, c: u32) -> String { let mean = (a + b + c) / 3; let letter = match dbg!(mean) { _ if (90..=100).contains(&mean) => "A", _ if (80..90).contains(&mean) => "B", _ if (70..80).contains(&mean) => "C", _ if (60..70).contains(&mean) => "D", _ if (0..60)....
Java
UTF-8
1,174
2.4375
2
[]
no_license
package com.qa.orangeHRM.dataprovider; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import...
Java
UTF-8
629
2.578125
3
[]
no_license
package Model.GameObject.Item.Items.Takables; import Model.Effects.Effect; import Model.GameObject.Item.Items.Takable; import Model.Location; import Model.Requirement; /** * Created by Wimberley on 2/25/16. */ // A usable item can be added to the inventory and used at some point during the game. // this item inher...
Java
UTF-8
2,169
2.359375
2
[]
no_license
package com.cilamp; import java.awt.BorderLayout; import java.awt.Container; import java.awt.GridLayout; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.Unsupport...
TypeScript
UTF-8
959
2.6875
3
[ "MIT" ]
permissive
import { DefinitionBuilder } from '../src/definitionBuilder'; import { Hl7Message } from '../src/models/hl7message.model'; import { Element } from '../src/models/element.model'; describe("Definition Builder", () => { let definitionBuilder = new DefinitionBuilder(); it("Should throw error if no hl7Message is ...
Java
UTF-8
16,332
2.75
3
[]
no_license
package ecs.impl; import ecs.HashRing; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.annotations.Expose; import com.google.gson.reflect.TypeToken; import ecs.ECSNode; import ecs.IECSNode; import java.lang.reflect.Type; import java.util.*; import java.util.function.Consumer; i...
C#
UTF-8
1,426
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json; namespace fun_bank_api_client.ApiClient.Models { public class Customer : Model { [JsonProperty("Hash")] public string Hash; [JsonProperty("username", Required = Required.Always)] p...
PHP
UTF-8
2,593
2.8125
3
[ "MIT" ]
permissive
<?php namespace Blade\Orm\Test\Model; use Blade\Orm\Model; use Blade\Orm\Value\DateTime; class TransformSettersTestModel extends Model { protected $allowGetterMagic = true; protected $transformers = [ 'colTrimSetter' => 'trim', 'colObjectSetter' => DateTime::class, ]; protected $force...
JavaScript
UTF-8
1,037
2.78125
3
[]
no_license
const fs = require('fs'); const listarEstInscritos = (listaEstInscritos) => { let texto = ''; if (listaEstInscritos != null && Object.keys(listaEstInscritos).length != 0) { texto = texto + "<table class='table table-striped'>"+ "<thead class='thead-dark'>"+ "<th>Documento</th>"+ "<th>Nombre</th>"+ "<th>...
Ruby
UTF-8
1,052
2.640625
3
[ "Apache-2.0" ]
permissive
module Categories CHRISTIAN = "stuff" COMEDY = "comedy" CONCERT = "concert" CONFERENCES = "conferences" COUPLES = "couples" DANCE = "dance" EXHIBITS = "exhibits" FAMILY = "family" FESTIVALS = "festivals" GALLERIES = "galleries" JEWISH = "jewish" LATE_NIGHT = "late_night" LGBT = "lgbt" MARKET...
C#
UTF-8
26,773
2.65625
3
[]
no_license
using Newtonsoft.Json; using System.Collections.Generic; using System.Text; using System; using System.IO; namespace LinnworksAPI { public class ProcessedOrdersController : BaseController, IProcessedOrdersController { public ProcessedOrdersController(ApiContext apiContext) : base(apiContext) { ...
Python
UTF-8
165
3.078125
3
[]
no_license
n = int(input()) a = '' if n<=1000: for i in range(n): for j in range(i+1): a += str(1) if i!=j: a += ' '+'1'+' ' a += '\n' print(a)
Rust
UTF-8
23,029
2.65625
3
[ "Apache-2.0" ]
permissive
//! Single-threaded Monte Carlo tree search on directed acyclic graphs. pub mod backprop; pub mod game; pub mod graph; pub mod rollout; pub mod simulation; pub mod statistics; pub mod ucb; #[cfg(test)] pub(crate) mod tictactoe; use crate::backprop::BackpropSelector; use crate::game::{Game, State}; use crate::graph::...
SQL
UTF-8
18,598
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 12, 2015 at 02:18 PM -- Server version: 5.5.24-log -- PHP Version: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
Python
UTF-8
5,985
2.6875
3
[ "Apache-2.0" ]
permissive
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import struct from .bitwise_word import bitwise_word class bitwise_unpack(object): LE = '<' BE = '>' _INT_UNPACK_FORMATS = { LE: { 1: '<B', 2: '<H', 4: '<I', 8: '<Q', }, BE: { ...
Shell
UTF-8
490
3.328125
3
[]
no_license
#!/bin/bash # Show versions # echo "tools:" # docker --version # docker-machine --version # docker-compose --version # echo "" if [ -z ${MACHINE_NAME+x} ] then echo -n "" else # Configure Docker endpoint echo "setting up environment for '$MACHINE_NAME':" eval $(docker-machine env --shell bash $MACHINE...
Java
UTF-8
3,410
3.09375
3
[]
no_license
//Given a non-empty array of digits representing a non-negative integer, plus on //e to the integer. // // The digits are stored such that the most significant digit is at the head of //the list, and each element in the array contain a single digit. // // You may assume the integer does not contain any leading zero,...
Java
UTF-8
2,057
2.171875
2
[]
no_license
package ua.nic.Cursova.view.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import org.springframework...
C
UTF-8
275
2.5625
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** generator ** File description: ** error.c */ #include "../include/all_includes.h" void my_put_error_str(char *str) { int i = 0; for (i = 0; str[i]; i++); write(2, "\033[31m", 5); write(2, str, i); write(2, "\033[0m", 4); }
C#
UTF-8
3,716
2.515625
3
[]
no_license
using CMSSample.DomainModel; using CMSSample.DomainModel.ViewModels; using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Text; namespace CMSSample.DA.Repository { public class TaskRepository : ITaskRepository { private CMSSampleDAContext _context;...
Shell
UTF-8
1,671
2.859375
3
[]
no_license
#!/bin/bash EVM_HOME=~/repos/EVidenceModeler-1.1.1/ genome=/uru/Data/Nanopore/projects/moth/2020_analysis/assemblies/racon_3d_dna/moth_canu_nanopolish_racon1.FINAL.fasta stringtie_gff3=/uru/Data/Nanopore/projects/moth/2020_analysis/sra_rna_data/stringtie2/stringtie2_merge/transcripts.fasta.transdecoder.genome.gff3 ba...
Markdown
UTF-8
744
2.625
3
[]
no_license
--- layout: post title: "Mac OSX 命令行快捷键" description: "Mac OSX Terminal Home End 快捷键" category: Mac_OS tags: [KeyBoardShortCuts] --- {% include JB/setup %} `系统:OSX 10.9.4` 1. 将光标移动到行首:ctrl + a 2. 将光标移动到行尾:ctrl + e 3. 清除屏幕: ctrl + l 4. 搜索以前使用命令:ctrl + r 5. 清除当前行: ctrl + u 6. 清除至当前行尾: ctrl + k 7. 单词为单位移动: o...
Python
UTF-8
714
2.90625
3
[]
no_license
from functools import reduce class Solution: def productExceptSelf(self, nums: List[int]) -> List[int]: from_left = nums[:] from_right = nums[:] for i in range(1, len(from_left)): curr = from_left[i] prev = from_left[i-1] from_left[i] = curr * pr...
TypeScript
UTF-8
1,621
2.796875
3
[]
no_license
import {Field, ObjectType, registerEnumType} from 'type-graphql'; import { BaseEntity, Column, Entity, ManyToOne, PrimaryGeneratedColumn, } from 'typeorm'; import {ClosePrice} from './ClosePrice'; import {Instrument} from './Instrument'; export enum PositionState { OPEN = 'open', CLOSED = 'closed', DEL...
Python
UTF-8
920
3.34375
3
[]
no_license
def print_floor(floor, i, j): for l in range(len(floor)): for m in range(len(floor[l])): if i == l and j == m: print('_ ', end="") else: print(str(floor[l][m]) + " ", end="") print() print() def clean(floor): for i in range(len(fl...
JavaScript
UTF-8
596
3.890625
4
[]
no_license
// http://www.codewars.com/kata/duplicate-arguments function solution (...args) { for (let i = 0; i < args.length - 1; i++) { if (args.findIndex((item, index) => item === args[i] && index > i) !== - 1) { return true; } } return false; } // http://www.codewars.com/kata/last function last (...list)...
Java
UTF-8
906
3.375
3
[]
no_license
public class PalindromePermutation { public static boolean canPermutePalindrome(String s) { int[] sArray = new int[26]; char[] ch = s.toCharArray(); int countO = 0; String str = ""; for (int i = s.length() - 1; i >= 0; i--) { str += s.charAt(i); } if (str.equalsIgnoreCase(s)) { ...
C++
UTF-8
238
2.546875
3
[]
no_license
#include "TextEditor.h" int main() { try { TextEditor* textEditor = new TextEditor("test.txt"); textEditor->run(); } catch (std::string s) { std::cout << s << std::endl; } catch (...) { std::cout << "Error"; } return 0; }
C#
UTF-8
582
2.828125
3
[ "MIT" ]
permissive
namespace ExtendedXmlSerializer.Core.Sources { /// <summary> /// A general purpose selection component that accepts a value and returns a value. /// </summary> /// <typeparam name="TParameter">The type to accept.</typeparam> /// <typeparam name="TResult">The return type.</typeparam> public interface IParameteriz...
Java
UTF-8
296
1.773438
2
[]
no_license
package com.epam.demo.spring.dbaccess.repo; import com.epam.demo.spring.dbaccess.entities.Session; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; @Repository public interface SessionRepo extends CrudRepository<Session, Integer> { }
Python
UTF-8
4,230
2.828125
3
[]
no_license
import math import requests import pandas as pd from persistence import PickleWrapper # Geopy from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="my-application") # Distances are measured in miles. # Longitudes and latitudes are measured in degrees. # Earth is assumed to be perfectly spherical. e...
Markdown
UTF-8
7,479
2.578125
3
[]
no_license
# Corsair Bragi Protocol Version ?? Based on [this](https://github.com/ckb-next/ckb-next/wiki/Corsair-Protocol), and some Wireshark captures from M55 RGB PRO. ## Guidance If bytes are omitted from the response, it means that we don't think they matter. If we aren't sure what a command does, we'll put the dubious co...
Java
UTF-8
377
1.789063
2
[]
no_license
package com.bai.dao; import com.bai.Video; import org.springframework.stereotype.Repository; @Repository public interface VideoDao { //上传视频 int addVideo(Video video); //删除视频 int deleteVideo(int id); //修改视频 int updateVideo(Video video); //查询上传视频 Video selUpVideo(int userId); //...
C#
UTF-8
1,074
2.78125
3
[ "MIT" ]
permissive
using System; using System.Linq.Expressions; using System.Text.RegularExpressions; using System.Xml; namespace Highway.Data.OData.Parser.Readers { internal class DateTimeExpressionFactory : ValueExpressionFactoryBase<DateTime> { private static readonly Regex DateTimeRegex = new Regex(@"date...
Python
UTF-8
1,409
2.984375
3
[]
no_license
import tkinter as tk from tkinter import filedialog from PyPDF2 import PdfFileMerger class pdfmerger: def __init__(self, window_width, window_height): self.root = tk.Tk() self.root.title("PDF merger") center_x = int(self.root.winfo_screenwidth() / 2 - window_width / 2) center_y = ...
Java
UTF-8
635
1.789063
2
[ "Apache-2.0" ]
permissive
package io.quarkus.stork; import java.util.Map; import io.quarkus.runtime.annotations.ConfigGroup; import io.smallrye.config.WithParentName; @ConfigGroup public interface StorkServiceRegistrarConfiguration { /** * Configures service registrar type, e.g. "consul". * A ServiceRegistrarProvider for the t...
Java
UTF-8
1,691
2.15625
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2019 JSquad AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
Ruby
UTF-8
646
4.0625
4
[]
no_license
=begin The British Empire adopted the Gregorian Calendar in 1752, which was a leap year. Prior to 1752, the Julian Calendar was used. Under the Julian Calendar, leap years occur in any year that is evenly divisible by 4. Using this information, update the method from the previous exercise to determine leap years bot...
Markdown
UTF-8
3,349
2.78125
3
[]
no_license
--- title: MetroChange url: metrochange comments: false layout: project largeimages: ["https://c2.staticflickr.com/8/7002/6549641145_1072356ce0_b.jpg","https://c2.staticflickr.com/8/7148/6549640559_aef3ed99ca_b.jpg","https://c2.staticflickr.com/8/7144/6495568579_147f3e3ba4_b.jpg"] largeimagecaptions: ["The MetroChange ...