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
800
2.71875
3
[]
no_license
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
C++
UTF-8
3,966
3.109375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include <vector> //assume memory size = 1Mb = 2**20b #define MEMORY_SIZE 20 using namespace std; //buddy system list struct block{ int size; int start; }; vector < vector<block> > bslist; block my_malloc(int size); void init(); void ...
Java
UTF-8
670
2.234375
2
[]
no_license
package com.rfchina.community.entity; import java.io.Serializable; public class AccountLogoutEvent implements Serializable { private Long passportId; private Long timestamp; public AccountLogoutEvent(Long passportId, Long timestamp) { this.passportId = passportId; this.timestamp = times...
C#
UTF-8
912
3.09375
3
[ "MIT" ]
permissive
using System; using CommandDotNet; using Spectre.Console; namespace BbGit.ConsoleApp { public class TableFormatModel : IArgumentModel { public enum TableFormat { c, b, h, m } [Option('t', Description = " b: borders\n" + " c: columns\n" + ...
Ruby
UTF-8
182
3.28125
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
def prime?(integer) if integer < 2 return false else [*(2...integer)].each do |x| if integer % x == 0 return false end end return true end end
PHP
UTF-8
2,073
2.59375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php class User_Model extends CI_Model { public function __construct() { parent::__construct(); $this->load->database(); } public function checkpass($pass, $id) { $query = 'SELECT * FROM p_user WHERE id_user = '.$id.' AND user_password="'.$pass.'" AND is_active=1'; ...
JavaScript
UTF-8
3,116
2.8125
3
[]
no_license
function getListeSeries(table){ var xmlHttpSeries = getAjaxRequestObject(); xmlHttpSeries.onreadystatechange = function() { if (this.readyState === 4 && this.status === 200) { var text= this.responseText; var lesSeries = JSON.parse(text); lesSeries.sort(function(a, b){ if (a.nom < b.nom){ return -...
Markdown
UTF-8
3,335
2.78125
3
[]
no_license
--- title: "Decline of the Dollar" categories: blog permalink: blog_decline_dollar.html tags: [blog] --- Fifty years ago the US was the world's main creditor nation. Today it is the world's main debtor nation. Yanis Varoufakis explains the turnaround in his [Global Minotaur](https://www.yanisvaroufakis.eu/books/the...
Markdown
UTF-8
1,660
2.9375
3
[]
no_license
# 支持响应式背压 最后一步,我们将探访 UserService.allFriends 查询,它将从数据中获取整个数据集。 **表 17,进化成响应型微服务,第三部分,UserService.allFriends 的背压** ![](images/37.png) **结果** - 是的,这很啰嗦。 - …但现在,我们将查询的结果依次流式处理(可能已经通过 SQL 限定分页)。 - `Streams.createWith` 是一个 `PublisherFactory`,它将截断请求,执行启动或停止操作。 - 请求的消费者给出了订阅者准备接收的元素数量。 - 请求的消费者接收一个 `SubscriberWithCont...
C++
GB18030
4,832
3.5625
4
[]
no_license
/************************************************************************/ /* 10. Ҫʵ߾ȵʮƼӷҪʵֺ void add (const char *num1, const char *num2, char *result) 롿num1ַʽ1Ϊnum1[0]Ϊλ'-' num2ַʽ2Ϊnum2[0]Ϊλ'-' resultӷַΪresult[0]Ϊλ */ /******************************...
Markdown
UTF-8
14,234
2.859375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: SignupCustomer Service Operation - Customer Management ms.service: bing-ads-customer-management-service ms.topic: article author: eric-urban ms.author: eur description: Creates a new customer and account that rolls up to your reseller payment method. dev_langs: - csharp - java - php - python --- # S...
C++
UTF-8
2,403
2.953125
3
[]
no_license
#include "gamecomponents.h" #include "eventhandler.h" #include "box.h" #include <map> #include <sstream> #include <algorithm> #include <SDL2/SDL.h> bool GameComponents::updated = false; SDL_Window* GameComponents::window = nullptr; SDL_Renderer* GameComponents::renderer = nullptr; Box* GameComponents::box = nullptr...
Python
UTF-8
4,148
2.71875
3
[]
no_license
from json_parser import JSONParser import psycopg2 from psycopg2 import sql from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import os import json class StdOutListener(StreamListener): def on_data(self, data): parser = JSONParser(data) try: ...
Java
UTF-8
2,731
1.789063
2
[]
no_license
package th.co.pt.pcca.pccaapp.entities.member; import java.util.List; public class WorkOutIntraObj { public String emp_id; public String company; public String objective; public String place_flag; public String place; public String isprivate_car; public String start_company; public String start_date; publ...
Markdown
UTF-8
2,471
2.84375
3
[ "MIT" ]
permissive
# Tevana Project Name: Tevana 20.05.2021 Developed By : Gayathri Chennakrishnam Sharma & Divyansh Sharma Overview : Tevana(meaning a beautiful garden,in Sanskrit) is a fully-fledged home garden application with various features wherein the users can register themselves as members and take a look at all the home garde...
Ruby
UTF-8
311
2.703125
3
[]
no_license
class Trip < ApplicationRecord belongs_to :driver belongs_to :passenger def self.new_trip(passenger_id, driver) trip = Trip.new( driver_id: driver.id, passenger_id: passenger_id, date: Date.today.strftime("%Y-%d-%m"), cost: (500..10000).to_a.sample ) return trip end end
PHP
UTF-8
1,303
2.578125
3
[]
no_license
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\SearchRepository") */ class Search { /* * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /* * @ORM\Column(type="string", length=255, ...
Java
GB18030
853
2.96875
3
[]
no_license
package Payroll; public abstract class AddEmployeeTransaction extends Transaction { private int empid; private String name; private String address; public AddEmployeeTransaction( int id ,String n,String a,PayrollDatebase database){ super(database); this.empid = id; this.name=n; this.address=a; } prote...
C++
UTF-8
474
2.828125
3
[]
no_license
#include "procedure.h" Call_Table* Call_Table::create(){ if(_instance == NULL){ _instance = new Call_Table; } return _instance; } int Call_Table::add_procedure(int id, Procedure pro){ table[id] = pro; return 1; } int Call_Table::del_procedure(int id){ table.erase(id); } int Call_Tab...
Java
UTF-8
1,858
2.1875
2
[]
no_license
package e.aqibqureshi.imci.activities; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import e.aqibqureshi.imci.R; public class MainActivity extends AppCompatActivity { public Button intro1; pub...
PHP
UTF-8
809
2.65625
3
[]
no_license
<?php declare(strict_types=1); namespace Raxos\Router\Attribute; use Attribute; use Raxos\Router\Controller\Controller; use Raxos\Router\Error\RegisterException; /** * Class SubController * * @author Bas Milius <bas@mili.us> * @package Raxos\Router\Attribute * @since 1.0.0 */ #[Attribute(Attribute::TARGET_METH...
JavaScript
UTF-8
6,256
2.703125
3
[]
no_license
function CreatFlyBird(options) { this.bgMusic=bgMusic; this.dieMusic=dieMusic; this.jumpMusic=jumpMusic; this.container = options.container; this.imgSrc = options.imgSrc; //检查是否狗带 this.Die = false; // 检测是否按了作弊按钮 this.isOn = false; // 所有对象的整合 this.roles = { sky...
C#
UTF-8
1,402
2.671875
3
[]
no_license
using System; using System.Collections.Generic; using System.Globalization; using System.Threading; using Inbox2.Framework.Interfaces; namespace Inbox2.Framework.Threading.AsyncUpdate { public static class AsyncUpdateQueue { private static Thread readerThread; private static Queue<IEntityBase> queue;...
Java
UTF-8
8,459
2.859375
3
[]
no_license
import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.table.*; // 매출 관리 public class SalesManage extends JFrame{ private String[] yearData = { "2020", "2021", "2022" }; private String[] monthData = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }; ...
JavaScript
UTF-8
4,304
2.515625
3
[]
no_license
import React from 'react'; import { kebabCase } from 'lodash'; import "./sidenav.scss"; class SideNav extends React.Component { constructor(props) { super(props) this.hideLabelsTimer = null; this.showActiveLabelTimer = null; this.observer = null; this.observed = []; ...
Python
UTF-8
874
2.953125
3
[]
no_license
#The purpose of this program is to learn the friendship between pygame and nxt python! #Author: Guillermo Ochoa import pygame, sys from pygame.locals import * import nxt.locator from nxt.motor import * pygame.init() b = nxt.locator.find_one_brick() m_b = Motor(b, PORT_B) m_a = Motor(b, PORT_A) m_c = Motor...
JavaScript
UTF-8
193
3.1875
3
[]
no_license
let input=prompt("문자열 입력") //레전드 문제 나는 머리가 안좋은가봄 코드 깔쌈하네 for (let i=0; i<input.length-1; i++){ console.log(input[i], input[i+1]); }
Python
UTF-8
373
2.890625
3
[]
no_license
def lagrange(x,y,find): ans=0 for i in range(0,len(x)): mult=y[i] main1=1 main2=1 for j in range(0,len(x)): if(i!=j): main1*=(find-x[j]) main2*=(x[i]-x[j]) ans+=(mult*(main1/main2)) return(ans) x=[0,1,4,5,6,7,8] y=[1...
C++
UTF-8
1,374
2.890625
3
[ "MIT" ]
permissive
/* LloydSample.hpp the "points" (in the jargon of [Balzer et al. SIGGRAPH 2009]) Li-Yi Wei 07/15/2009 */ #ifndef _LLOYD_SAMPLE_HPP #define _LLOYD_SAMPLE_HPP #include <vector> using namespace std; #include "Sample.hpp" #include "LloydIndex.hpp" class LloydSample { public: LloydSample(void); Lloyd...
Python
UTF-8
166
3.65625
4
[]
no_license
palavra1 = input() palavra2 = input() reverso = palavra1[::-1] if(reverso == palavra2): print("palíndromas mútuas") else: print("não são palíndromas")
Markdown
UTF-8
1,010
2.828125
3
[ "MIT" ]
permissive
<img src="https://freepngimg.com/thumb/terminator/21148-9-terminator-picture.png" width="200" title="Bot" alt="Bot" /> # Bot-InstaAutoLike A Javascript Bot to Auto Like all pictures in an Instagram profile. It bypasses Instagram spam protection and keeps retrying upon encountering the limits (limits of like freque...
Java
UTF-8
334
1.828125
2
[ "MIT" ]
permissive
package com.zjmeow.bboard.dao; import com.zjmeow.bboard.model.po.Singer; import java.util.List; public interface SingerMapper { Singer selectByPrimaryKey(Integer id); List<Singer> selectSingerBySongId(Integer songId); List<Singer> selectSingerByName(String name); List<Singer> selectSingerByBorn(S...
Markdown
UTF-8
4,147
3.015625
3
[]
no_license
# DNS : sistema de nombre de dominios La configuración de los DNS es una etapa crucial para que tu servidor esté accesible. En efecto, si tus DNS están mal configurados, con mucha certeza tendrás problemas de conexión a tu servidor vía tu nombre de dominio. *Aunque esta etapa de documentación parezca larga y compleja...
Java
UTF-8
923
2.859375
3
[]
no_license
public class DrawAvoidingBridges { public static void main(String[] args) { double q = 0.999999; double k = 0; int N = 20; int T = 20; int S = 10; SimulateQR qr = new SimulateQR(q, k, N, T, S); Tiling tile = qr.sample(); int[][] pos = ti...
JavaScript
ISO-8859-1
817
2.578125
3
[]
no_license
function alterarTipo(){ var t = jQuery(".tipo").get(); var c = jQuery(".cod").get(); var cods = Array(); var tipos = Array(); if(c != null){ for(i=0; i<c.length; i++){ cods.push(c[i].value); tipos.push(t[i].value); } } if(co...
C++
UTF-8
2,751
2.734375
3
[]
no_license
#include <cmath> #include <vector> #include <ctime> #include <cstdlib> #include <iostream> #include <GL/glut.h> #include "common.h" #include "math.h" using namespace std; namespace morph { static const int samples = 80; static long frame; struct point { const float x, y, z; point(float x_, float y_, float z_) :...
Markdown
UTF-8
2,996
3.578125
4
[]
no_license
# [1582. 二进制矩阵中的特殊位置](https://leetcode-cn.com/problems/special-positions-in-a-binary-matrix/) --- ## Description <section> <p>给你一个大小为 <code>rows x cols</code> 的矩阵 <code>mat</code>,其中 <code>mat[i][j]</code> 是 <code>0</code> 或 <code>1</code>,请返回 <strong>矩阵&nbsp;<em><code>mat</code></em> 中特殊位置的数目</strong> 。</p> <p><str...
Markdown
UTF-8
1,632
2.53125
3
[]
no_license
## John's ERC-721 NFT Token Howdy, this is my repository for my very own ERC-721 non-fungible token. What's it for? Find out soon. #### What is ERC-721? [ERC-721](http://erc721.org/) is a free, open standard that describes how to build non-fungible or unique tokens on the [Ethereum](https://www.ethereum.org/) blockch...
Java
UTF-8
1,892
2.234375
2
[]
no_license
package com.tiancaibao.pojo.system; import java.io.Serializable; import java.util.Date; public class SystemAppCodeEdition implements Serializable { private Integer id; private String name; private Byte numbers; private Date deletedAt; private Date createdAt; private Date updatedAt; p...
C#
UTF-8
3,502
3.0625
3
[ "MIT" ]
permissive
// Licensed under the MIT License. See LICENSE in the repository root for license information. using System.Linq; namespace Common { /// <summary> /// Class with label and score. /// </summary> public class FileDataLabel { /// <summary> /// Gets or sets the filename. /// <...
PHP
UTF-8
1,530
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Model\Entity; use Cake\ORM\Entity; /** * Project Entity * * @property int $id * @property string $name * @property int $status * @property int|null $project_manager * @property int|null $tech_lead * @property int|null $process_manager * @property int|null $tech_dir * @property int|null $...
Markdown
UTF-8
4,627
2.703125
3
[ "MIT-0" ]
permissive
## Getting started with RPA using AWS Step Functions and Amazon Textract [AWS Step Functions](https://aws.amazon.com/step-functions/) is a serverless function orchestrator and workflow automation tool. [Amazon Textract](https://aws.amazon.com/textract/) is a fully managed machine learning service that automatically ...
JavaScript
UTF-8
150
2.640625
3
[]
no_license
function setup() { // put setup code here } function draw() { // put drawing code here text("x = " + mouseX + ", y = " + mouseY, 40, 40) ; }
Java
UTF-8
5,417
2.828125
3
[]
no_license
package com.ge; import java.beans.Introspector; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.Objects; import com.ge.auditapi.Audit; public class MainClass { private Object[][] getMatrix(List<Object> obj, in...
Python
UTF-8
1,420
3.953125
4
[]
no_license
class Empty(Exception): pass class queue_using_linkedlist: class node: __slots__ = 'element', 'next' def __init__(self,element,next): self.element = element self.next = next def __init__(self): self.head = None self.tail = None self.size = 0...
JavaScript
UTF-8
4,166
3.171875
3
[]
no_license
function Node(id, x, y) { /* nodes are created by the importData.js file x and y are coordinates on the map image id is a unique identifier like a primary key adjIds is an array of ints, each int represents the id of an adjacent node. i.e. you can travel from this point to that ...
PHP
UTF-8
6,630
2.515625
3
[]
no_license
<?php namespace App\Http\Controllers\Admin\Property; use App\CustomServices\ImageService; use App\Property; use App\PropertyFloorPlan; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Session; class PropertyFloorPlanController extends Controller { /...
Java
UTF-8
1,909
2.03125
2
[]
no_license
package com.hiramexpress.controller; import com.alibaba.druid.util.StringUtils; import com.hiramexpress.domain.Result; import com.hiramexpress.domain.enums.ResultEnum; import com.hiramexpress.service.AnalysisExpress; import com.hiramexpress.service.CheckExpress; import com.hiramexpress.utils.ResultUtil; import org.spr...
Python
UTF-8
834
4.25
4
[]
no_license
# Pairs with Specific Difference # Given an array arr of distinct integers and a nonnegative integer k, write a function findPairsWithGivenDifference # that returns an array of all pairs [x,y] in arr, such that x - y = k. If no such pairs exist, return an empty array. # Note: the order of the pairs in the output array ...
C++
UTF-8
2,486
2.625
3
[]
no_license
// Setup the server to receive data over WiFi #include <ESP8266WiFi.h> #include <ESP8266WebServer.h> // Configuration parameters for Access Point char * ssid_ap = "Tazer Tag"; char * password_ap = "TazerTag"; IPAddress ip(192,168,11,4); // arbitrary IP address (doesn't conflict w/ local network) IPAddress g...
Markdown
UTF-8
537
3.125
3
[]
no_license
# Typed Array ## Syntax --- From a length: ```js let int8 = new Int8Array(2); int8[0] = 42; console.log(int8[0]); // 42 console.log(int8.length); // 2 console.log(int8.BYTES_PER_ELEMENT); // 1 ``` From an array: ```js let arr = new Int8Array([21, 31]); console.log(arr[1]); // 31 ``` ## Reference --- - [Typed...
Java
UTF-8
537
3.28125
3
[]
no_license
import java.util.*; public class Solution { public int strStr(String haystack, String needle) { int ans = 0; if(needle.equals("")) return ans; int l = needle.length(); for(int i=0;i<=haystack.length()-l;i++){ for(int j = 0;j<l;j++){ if(haystack.charAt(i+j) != needle.charAt(j)) break; if((j == l-1) &...
PHP
UTF-8
4,440
2.609375
3
[]
no_license
<?php // vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php: //345678901234567890123456789012345678901234567890123456789012345678901234567890 /** * Holder of {@link tgif_compiler_library} * * @package tgiframework * @subpackage ui * @copyright c.2010 terry chay * @license GNU Less...
Markdown
UTF-8
3,106
2.90625
3
[ "MIT" ]
permissive
# bacterial-analysis ## The project has been deployed: https://knishina-otu-bacteria.herokuapp.com/ <br /> ### Summary. The [Dunn Lab](http://robdunnlab.com/projects/belly-button-biodiversity/) performed a survey study to assess the diversity of bacteria in in participants' belly buttons. The samples were subjected ...
Markdown
UTF-8
5,507
2.828125
3
[]
no_license
# Information Handling Policy There are many types of confidential and sensitive information passing through Made Tech at any given moment. It is important that we as a company ensure that we are handling this information responsibly and in a secure way. If sensitive information is communicated to an unauthorised, and...
Java
UTF-8
2,050
4
4
[]
no_license
import java.util.*; /** * @author yangxing * @version 1.0 * @date 2020/8/24 0024 17:18 * 98. 验证二叉搜索树 * 给定一个二叉树,判断其是否是一个有效的二叉搜索树。 * * 假设一个二叉搜索树具有如下特征: * * 节点的左子树只包含小于当前节点的数。 * 节点的右子树只包含大于当前节点的数。 * 所有左子树和右子树自身必须也是二叉搜索树。 * 示例 1: * * 输入: * 2 * / \ * 1 3 * 输出: true * 示例 2: * * 输入: * 5 ...
C#
UTF-8
344
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OnTheFly.Helpers { public static class StringHelpers { public static string PrettyArray<T>(this IEnumerable<T> items) { return $"[{string.Join(", ", items)}...
Python
UTF-8
285
2.875
3
[]
no_license
import bisect n = int(input()) A = sorted(list(map(int, input().split()))) B = sorted(list(map(int, input().split()))) C = sorted(list(map(int, input().split()))) ans = 0 for b in B: a = bisect.bisect_left(A, b) c = bisect.bisect_right(C, b) ans += a * (n - c) print(ans)
Java
UTF-8
1,041
2.84375
3
[ "MIT" ]
permissive
package io.eyolas.http.query.collection; /** * Type of QueryList * * @author eyolas */ public enum QueryListType { /** * <p> * No bracket and no index.</p> * * <p> * Example:<br> * With list : Arrays.asList("asse", "psg", "om"); and key club<br> * result: ?club=asse&club=psg...
SQL
UTF-8
1,711
3.21875
3
[ "Apache-2.0" ]
permissive
-- -- Name: v_analysis_request_jobs_list_report; Type: VIEW; Schema: public; Owner: d3l243 -- CREATE VIEW public.v_analysis_request_jobs_list_report AS SELECT j.job, j.priority, js.job_state AS state, tool.analysis_tool AS tool_name, ds.dataset, j.param_file_name AS param_file, j.se...
Java
UTF-8
2,089
2.078125
2
[]
no_license
package org.iesalixar.jmoreno.proyecto.controller; import java.util.Optional; import org.iesalixar.jmoreno.proyecto.model.Orders; import org.iesalixar.jmoreno.proyecto.service.OrdersService; import org.iesalixar.jmoreno.proyecto.service.ProvidersService; import org.springframework.beans.factory.annotation.Autowired; ...
JavaScript
UTF-8
3,758
2.78125
3
[]
no_license
////// DATA //////////////////////////////////////////////////////////////////// /// Current data let slaveName = ""; // This comes from the cloud save data and retrieved with "getSlaveDetailStorage()" let masterName = ""; // This comes from the cloud saved data and retrieved with "getMasterDetailStorage()" let foundSl...
C++
UTF-8
2,657
3.125
3
[]
no_license
#include<iostream> #include<string> #include<iomanip> using namespace std; class NGUOI { private: char ht[30]; char scm[10]; char gt[4]; public: NGUOI() { } NGUOI(char *ht,char *scm,char *gt) { strcpy(this->ht,ht); strcpy(this->scm,scm); strcpy(this->gt,gt); } void set() { cout<<"Ho Ten :"; ...
Markdown
UTF-8
1,140
3.359375
3
[]
no_license
--- layout: post title: "Handling strings containing quotes in SQL" date: 2010-02-26 category: vba tags: - access - quote - sql - string - vba --- Everyone is aware that quotes in strings used in SQL cause all sorts of problems. As developers, it is our duty to ensure that an end user never sees an ...
Java
UTF-8
970
3.328125
3
[]
no_license
package com.javarush.task.task04.task0413; /* День недели */ import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { //напишите тут ваш код String s = ""; int i = new Scanner(new InputStreamReader(System.in)).nextInt()...
Java
UTF-8
20,718
2.078125
2
[]
no_license
/* * 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 userinterface.StudentRole; import Business.AccomodationData.SellAccomodation; import Business.AccomodationData.SellAccomodatio...
Markdown
UTF-8
8,102
3.046875
3
[]
no_license
# Galactic Index (planetary trade simulation data) ## Overview ### What is this site for? This site is a tool to view data pulled from a planetary trading simulation, involving buying/selling of minerals, and companies trying to profit from the available simulated market. ### What does it do? This site will allow ...
Shell
UTF-8
749
4.21875
4
[ "Apache-2.0" ]
permissive
#!/usr/bin/env bash gitPull(){ echo "git pull" git pull } function getDir(){ echo "path: "$1 for fileName in `ls -a $1` do current_path=$1"/"${fileName} if [ ${fileName} == ".git" ];then gitPull elif [ -d ${current_path} ] && [ ${fileName} !...
Go
UTF-8
1,144
2.625
3
[]
no_license
package main import ( "fmt" "net" ) func main() { // 创建监听 socket, err := net.ListenUDP("udp4", &net.UDPAddr{ IP: net.IPv4(127, 0, 0, 1), Port: 2222, }) if err != nil { fmt.Println("监听失败!", err) return } else { fmt.Println("监听成功!", err) } defer socket.Close() for { // 读取数...
JavaScript
UTF-8
4,314
2.84375
3
[]
no_license
;(function($){ var sortAnimate = { list: '.unsorted-list', btnCreateList: '.btn-create-list', btnSortList: '.btn-sort-list', arrRandom: [], textSort: '.text-sort', sortInfo: '.sort-info', init: function(){ this.showListClick( this.btnCrea...
Java
UTF-8
947
2.421875
2
[]
no_license
package cn.mh.springboottest.sharding; import java.util.Collection; import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm; import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue; public class AdminPreciseAlgorithm implements PreciseShardingAlgorithm<Integer> { @...
Markdown
UTF-8
5,146
2.625
3
[]
no_license
[![LinkedIn][linkedin-shield]][linkedin-url] [![Twitter][twitter-shield]][twitter-url] <a href="https://discord.gg/3tHHD4VUKW"><img src="https://img.shields.io/discord/733027681184251937.svg?style=flat&label=Join%20Community&color=7289DA" alt="Join Community Badge"/></a> <img src="assets/composable-logo.png" alt="Com...
Python
UTF-8
1,551
3.25
3
[]
no_license
class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ self.solution2(nums) def solution1(self, nums): non_zero = 0 zero = 0 # 迴圈終點 while non...
JavaScript
UTF-8
1,155
2.625
3
[]
no_license
export default class Sprite { constructor(data,z) { this.z = z this.sx = data.sx this.sy = data.sy this.dxOffsetX = data.dxOffsetX || 0 this.dxOffsetY = data.dxOffsetY || 0 this.width = data.width this.height = data.height this.frames = data.frames ...
JavaScript
UTF-8
1,843
2.515625
3
[]
no_license
ig.module( 'game.entities.girl' ) .requires( 'impact.entity' ) .defines(function() { EntityGirl = ig.Entity.extend({ SIGHT_RANGE_SQUARED: 90000, SIGHT_ANGLE: 10, animSheet: new ig.AnimationSheet('media/girl.png', 667, 337), size: { x: 180, y: 180 }, offset: { x: 200, y: 10 }, direction: ...
JavaScript
UTF-8
2,096
2.640625
3
[]
no_license
const fs = require('fs') const axios = require('axios') const crypto = require('crypto') var https = require('follow-redirects').https; axios.get ('https://api.codenation.dev/v1/challenge/dev-ps/generate-data?token=d33ff9445b219ec0d37ad83ce1a73fbc9ba218f9') .then(res => { let cifrado = res.data.cifrado ...
C++
UTF-8
1,074
3.734375
4
[]
no_license
// InsertionSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; /* * The insertion sorting algorithm is not the efficient algorithm compared to selection sort * the best case timecomplexity of this algorithm is O(n) and the worst c...
Markdown
UTF-8
383
3.34375
3
[]
no_license
# Letter-Guessing-Game A simple guessing game built with HTML5, CSS3, and vanilla Javascript/ES5. * You are greeted by the computer who is “thinking” of a letter. * Press any character on the keyboard to take a guess. * After seven incorrect guesses, you lose. * The computer will keep track of your score. * To see ...
C#
UTF-8
525
2.9375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; /** * This component destroys object whenever it triggers a collider with the given tag. */ public class DestroyOnTrigger : MonoBehaviour { [Tooltip("Every object tagged with this tag will trigger the destruction of this object")] ...
C++
UTF-8
3,055
3.171875
3
[]
no_license
#include <string> #include <iostream> #include <cstdlib> #include <ctime> #include "FragTrap.class.hpp" FragTrap::FragTrap(void) : _name("Unamed minion") { return; } FragTrap::FragTrap(std::string name) : _name(name), _hp(100), _maxHp(100), _ep(100), _maxEp(100), _lvl(1), _meleeDamage(30), _rangeDamage(20), _armor(5...
C++
UTF-8
1,083
2.578125
3
[]
no_license
#ifndef DISPLAYBRIDGE_H #define DISPLAYBRIDGE_H #include "../objects/DBTransform.h" #include "../as3/ColorTransform.h" #include "../glm/glm.hpp" #include "../as3/Object.h" class Texture; namespace DragonBones { class Image; class DisplayObject; class DisplayObjectContainer; class DisplayBridge { private: Di...
Java
UTF-8
2,520
2.671875
3
[]
no_license
package com.githubtools.githubtools.beantest; import com.crossoverjie.distributed.lock.redis.RedisLock; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import redis.clients.jedis.HostAndPort...
C++
UTF-8
1,355
2.78125
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "RecursiveDivisionMaze.h" #include <random> #include "Random.h" void RecursiveDivisionMaze::Init(int width, int height, bool isConneccted, bool InitAsMaze) { Grid::Init(width, height, isConneccted, InitAsMaze); std::mt19937 Ran...
JavaScript
UTF-8
2,436
2.546875
3
[ "Apache-2.0" ]
permissive
/** * @desc 组件库 Component.js * @author yijie * @date 2020-11-03 22:00 * @logs[0] 2020-11-03 22:00 yijie 创建了Component.js文件 */ import deepDefine from '~/lib/tool/deepDefine' const getComponentInstance = async (componentName: String) => { const autoWiringComponents = deepDefine(global, [{ name: '$Quick-...
Java
UTF-8
142
1.84375
2
[]
no_license
package test2; import test1.text.A; public class B { public static void main(String args[]){ A a = new A(); a.printA(); } }
C++
UTF-8
2,760
3.375
3
[]
no_license
#include "Generator.h" #include <time.h> #include <stdlib.h> using namespace std; Generator::Generator() { sectionTotalLenght = getRandRange (SECTION_MIN,SECTION_MAX); sectionRemaingingLenght = sectionTotalLenght; floorCurrent = getRandRange(FLOOR_MIN, FLOOR_MAX); ceilingCurrent = getRandRange(CEILING_MIN, CEI...
C#
UTF-8
632
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Data.SQLite; namespace WindowsFormsApplication1 { class Db { public static SQLiteConnection getConnection() { if (!Directory.Exists("DataBase")) { ...
Python
UTF-8
2,342
3.296875
3
[]
no_license
# # @lc app=leetcode id=82 lang=python3 # # [82] Remove Duplicates from Sorted List II # # @lc code=start # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: # ...
Python
UTF-8
313
3.078125
3
[]
no_license
import matplotlib.pyplot as plt import csv x = [] y = [] with open('data.csv','r') as csvfile: plots = csv.reader(csvfile) for col in plots: x.append((col[0])) y.append((col[1])) plt.plot(x, y, label='File') plt.xlabel('X') plt.ylabel('Y') plt.title("Dataset") plt.legend() plt.show()
C#
UTF-8
2,790
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Threading.Tasks; using Dapper; namespace OrleansSaga.Grains.Model { public class SqlEventStore : IEventStore { public const string SelectById = @"SELECT [GrainId], [...
Python
UTF-8
152
3.234375
3
[]
no_license
n=int(input()) for i in range(0, 3): X = 000 for j in range(0, 3): X = (2*10)+1 for k in range(0, 3): X = (3*100)+1 print(X)
PHP
UTF-8
3,957
3
3
[]
no_license
<?php namespace UserAdministrator; /** * Class Controller * @package UserAdministrator * * The Controller has not really a purpose, * its job is to handle data that the user submits * */ class Controller { /** * @var object Processor|null */ private $processor = null; /** * @var objec...
TypeScript
UTF-8
275
2.65625
3
[]
no_license
import {ThemeMode} from "./ThemeProvider"; export class IColor { static quaternaryGray() { return 'gray' } static orange(theme:ThemeMode) { if (theme === ThemeMode.dark) { return '#FFA500'; } return '#aaA500'; } }
Python
UTF-8
543
4.21875
4
[]
no_license
# Liam O'Hainnin #Looking at Variables. X = 911 Y = 2 Z = X + Y print (Z) X = 914 Y = 3 Z = X + Y print (Z) fac = 7 * 6 * 5 * 4 * 3 * 2 * 1 print (fac) b = True c = False print (c) s = "sdvasvafsdasdasdvavf" print (s[0:14:2]) l = [1, 2, 3, 4, 5, 6, 7, 8, 9] print (l[2:9:4])...
Java
UTF-8
2,167
2.140625
2
[]
no_license
package com.company.modules.notary.service.impl; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.company.common.service.impl.BaseServiceImpl; import com.company.modu...
C++
UTF-8
2,473
4.09375
4
[]
no_license
/* * Filename: constructor_and_destructor_timing_ex1.cpp * Author: Wikus Jansen van Rensburg * Date: October 11, 2020 * Description: This program is used to study when constructors and * destructors are called. */ // ## You need to compile this program with the flag -std=c++11 #include <iostream> // This clas...
Shell
UTF-8
664
3.359375
3
[]
no_license
#!/bin/bash #width="148mm" # a5 #height="210mm" # a5 width="149mm" # 6x4 photo height="100mm" # 6x4 photo # could use getopts here to alter the above settings [ -z "$1" ] && echo Missing destination PNM file && exit 1 dest="$1" # the default res is 75, opts found with `scanimage -A` #echo "Warning: this is pret...
TypeScript
UTF-8
695
3
3
[]
no_license
import { Validator, Papers } from '../../types'; export abstract class ConsistencyValidator<T> implements Validator { public validate (papers: Papers): boolean { return this.getRelatedPapers(papers) .filter(this.hasPaper) .map(this.getFieldValue) .every(this.isEveryValue...
Python
UTF-8
1,682
2.625
3
[]
no_license
from core import search_ep from core import db_handler import time import re strip = re.compile(r'[^(].*[^)]') # 去掉括号规则 bracket = re.compile(r'\([^()]+\)') # 获取values employ_info = { "starffId": None, "name": None, "age": None, "phone": None, "dept": None, "enroll date": None } def process(...
Swift
UTF-8
2,679
2.8125
3
[]
no_license
// // TapVC.swift // gestureRecognizers // // Created by Luthfi Fathur Rahman on 6/19/17. // Copyright © 2017 Luthfi Fathur Rahman. All rights reserved. // import UIKit class TapVC: UIViewController { @IBOutlet weak var cardContainerView: UIView! @IBOutlet weak var backImageView: UIImageView! @IBOutl...