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
Java
UTF-8
7,482
1.726563
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) * * 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 requ...
C++
UTF-8
349
2.625
3
[]
no_license
/* * FrequencyCounter.cpp * * Description: FrequencyCounter * * Author: James Northway * Data: March 2019 * */ #pragma once class FrequencyCounter { private: int numOfChars = 256; int* bytes = new int[numOfChars]; public: FrequencyCounter(char* b, int size); int getFrequency(int ...
Markdown
UTF-8
7,576
2.828125
3
[]
no_license
# Exercise (Instructions): User Authentication with Passport ## Objectives and Outcomes In this exercise, you will explore user authentication with JSON web tokens and the Passport module. You will be able to control access to some routes within your REST server. At the end of this exercise, you will be able to: Use...
C++
UTF-8
741
4.1875
4
[]
no_license
#include <iostream> int greatestCommonDivisor_Recursively(int a, int b); int greatestCommonDivisor_Recursively2(int a, int b); int main() { //Find the greatest common divisor of two numbers using recursion. int a = 121; int b = 33; std::cout << greatestCommonDivisor_Recursively(121, 33) << std::endl;...
PHP
UTF-8
618
2.890625
3
[]
no_license
<?php namespace App\Repository; use App\Entity\Profile; interface ProfileRepositoryInterface { /** * @param Profile $profile * @return object */ public function setCreateProfile(Profile $profile): object; /** * @param Profile $profile * @return object */ public functi...
Python
UTF-8
3,734
2.515625
3
[]
no_license
import cv2 import time import numpy as np import subprocess from datetime import datetime class ImageProcessing: def mse(self, a, b): err = np.sum((a.astype("float") - b.astype("float")) ** 2) err /= float(a.shape[0] * a.shape[1]) return err def diff(self, a, b): difference = 255-cv2.absdiff(a, b) return...
C#
UTF-8
1,068
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace BookRentalShopApp2020.subforms { class Common { public static string USERID = string.Empty; public static readonly string CONSTR = ...
JavaScript
UTF-8
3,780
2.65625
3
[]
no_license
var logic = (function(){ return { CHUNK_SIZE : 25, inMenu : true, lastDirectionChange : Date.now(), activeChunk : null, playerID : null, localMap : {}, localPosition: {}, init : function() { // Init components visualization.init(); network.init(); // Start rend...
Python
UTF-8
4,977
3.078125
3
[]
no_license
#### CLASSIFICATION - LOGISTIC REGRESSION # NOTE: refer to cross_validation_knn.py for K Nearest Neighbors # SOURCE: WEEK 4 DAY 2 `US_Deaths...` ## STANDARD IMPORTS # Python 2 & 3 Compatibility from __future__ import print_function, division # Necessary imports import pandas as pd import numpy as np import matplot...
Markdown
UTF-8
1,748
2.6875
3
[]
no_license
## 前言 WecTeam 前端周刊(<https://github.com/wecteam/weekly>)是由 WecTeam 维护的技术周刊,每周从前端同学阅读的技术文章中精选而来,每周五出刊。第 128 期发布时间:2022-06-10。 WecTeam(维 C 团)是京东旗下京喜事业群的前端技术团队,主要专注于前端工程化、Web 性能优化、小程序开发、Severless、多端复用、可视化搭建等前沿技术研究。 更多「原创」前端技术文章,欢迎关注微信公众号「WecTeam」。 ## 周刊文章 ### 1、[不再支持 IE,React 新特性详细解读](https://mp.weixin.qq.com/s/0ycO5...
Python
UTF-8
279
3.8125
4
[ "MIT" ]
permissive
import random nome1 = input("Digite o nome do aluno?") nome2 = input('Digite o nome do segundo aluno?') nome3 = input('Digite o nome do terceiro aluno?') nome4 = input('Digite o nome do quarto aluno?') nomeEs =[nome1, nome2, nome3, nome4] nome = random.choice(nomeEs) print(nome)
Java
UTF-8
11,056
3.125
3
[]
no_license
package biblio; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; /** * Composant logiciel assurant la gestion des livres et des exemplaires * de livre. */ public class ComposantBDLivre { /** * Récupération de la liste complète des liv...
C++
UTF-8
281
2.9375
3
[]
no_license
#include<iostream> #include<string> using namespace std; int main() { string str; int cnt = 0; for (int i = 0; i < 8; i++) { cin >> str; for (int j = 0; j < 8; j++) { if ((j + i) % 2) continue; if (str[j] == 'F') cnt++; } } cout << cnt << endl; }
C#
UTF-8
4,350
2.6875
3
[]
no_license
namespace Sistema_MVC_Grupo_X.Models { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Spatial; using System.Linq; using System.Data.Entity; [Table("Usuario")] p...
C++
UTF-8
808
3.75
4
[]
no_license
#include <iostream> using namespace std; typedef struct node_s { char data; struct node_s* next; } node; void fun(node* start) { if (start == NULL) { return; } cout << start->data << " "; if (start->next != NULL) { fun(start->next->next); } cout << start->data << " "; } node* insert(node* r...
Markdown
UTF-8
6,639
3.015625
3
[]
no_license
# Image-Processing CS3500 The goal of this program was to be able to take in, READ, CREATE, and REPRODUCE an image, specifically a P3 file. To start, IPIXEL We made and IPixel interface that stores and can ouput the standard RGB properties, as well as the specific channels properties. RGBPIXEL For HW5, we are usi...
Python
UTF-8
2,526
2.609375
3
[]
no_license
import pygame from pygame.locals import * import Datas.Globals from Datas.Globals import * from UserCode import * from Interface import * ###### # # START MAIN # ###### # Set up pygame pygame.init() done = False forever = False # Set up the window window_surface = pygame.display.set_mode((max_pxc...
Java
UTF-8
1,946
2.921875
3
[]
no_license
package org.springframework.boot.crackthecode.service; import org.springframework.boot.crackthecode.models.Game; import org.springframework.boot.crackthecode.models.Guess; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util...
C++
UTF-8
2,264
2.828125
3
[]
no_license
#include <iostream> #include <ctime> using namespace std; void longest_palindrome(char *s,int **p,int length) { for(int i=0;i<length-1;++i){//初始化数组相关信息 p[i][i]=1; int j=i+1; if(s[i]==s[j]){ p[i][j]=2; }else{ p[i][j]=1; } } p[length-1][length-1]=1; //for(int i=length-3;i>=0;--i){//从后往前 // for(int l...
Markdown
UTF-8
2,917
3.3125
3
[ "Apache-2.0" ]
permissive
--- layout: tbd title: IBM Streams Lab - Defining a stream type description: weight: 13 --- # Defining a stream type What is a stream type? Why does the user need to create a stream type? ## {Notes} _We should probably have a way to highlight best practices_ Rather than defining the schema (stream type) of each str...
Shell
UTF-8
585
3.515625
4
[ "MIT" ]
permissive
if [ "$#" -le 3 ]; then echo "Usage: bash grid.sh EXP_NAME PARAMETER VALUE1 VALUE2 ..." echo "Writes to couts/NAME.PARAMETER_VALUE.cout" echo "For example:" echo "CUDA_VISIBLE_DEVICES=1 bash grid.sh test TRAIN_DATASET_SIZE `seq 2000 10000 2000`" echo "bash grid.sh test LAMBDA `awk 'BEGIN{ for (i=0.0...
Java
UTF-8
925
2.34375
2
[]
no_license
package com.mobilelearning.konnecting.serviceHandling.json; import com.badlogic.gdx.utils.Json; import com.badlogic.gdx.utils.JsonValue; import com.badlogic.gdx.utils.JsonWriter; import com.badlogic.gdx.utils.SerializationException; import com.mobilelearning.konnecting.Assets; /** * Created by AFFonseca on 16/07/201...
Java
UTF-8
11,145
1.9375
2
[]
no_license
package gui.library; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.HashMap; import java.util.Set; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JOpti...
Python
UTF-8
241
3.734375
4
[]
no_license
Array = [2, 7, 1, 2, 5, 7, 1] Array.sort() def lonely_int_fnc(Array): for i in range(len(Array)): print(Array, i) if Array[i] != Array[i+1]: return Array[i] i += 2 print(lonely_int_fnc(Array))
C++
UTF-8
378
3.265625
3
[]
no_license
#include <iostream> using namespace std; bool isSub(string s1, string s2) { int j = 0; for (int i = 0; i < s2.length(); i++) { if (s2[i] == s1[j]) j++; } return (j == s1.length()); } int main() { int t; cin >> t; while (t--) { string s1, s2; cin >> s1 >> s2; cout << (isSub(s1, s2...
C++
UTF-8
389
2.8125
3
[]
no_license
// Node header file // Thomas Dusterwald // 13 April 2014 #ifndef STATEMENT_H_ #define STATEMENT_H_ #include "Node.h" class Statement : public Node { public: //Constructor Statement(void); //Overloaded to_string method std::string to_string(std::stringstream & strIn); //Clone function used to make a polymorphic...
C++
UTF-8
3,264
3.390625
3
[]
no_license
/******************************************** 作者:Alfeim 题目:冗余连接2 时间消耗:24ms 解题思路:分两种情况 1.存在入度为2的节点,那么就选择其两条边中的一条进行删除,并保证删除后没有环路 2.如果没有入度大于1的节点,思路与684.冗余连接1完全一致 ********************************************/ class Solution { public: struct DSU{ int Len; vector<int> rank; vector<int> parent; ...
Java
UTF-8
217
2.21875
2
[]
no_license
package com.imooc.interfaceLearn; public class Psp implements IPlayGame { @Override public void playGame() { // TODO Auto-generated method stub System.out.println("具备打游戏的功能"); } }
JavaScript
UTF-8
2,147
2.890625
3
[ "MIT" ]
permissive
const keys = [ 'url', 'date', 'name', 'platform', 'event' ]; module.exports = function(item, assert, chai) { let expect = chai.expect; expect(item).to.include.keys(...keys); if(item.buyer && item.buyer.name) { assert( item.buyer.name && typeof item.buyer.name === 'string', `Property "...
Markdown
UTF-8
1,624
3.1875
3
[]
no_license
--- layout: post title: ES6 Class 语法糖 # category: ES6 --- 先看一个例子 ```javascript class User { static Name = 'Small Yellow' vipCharge() { // 只有VIP用户在才会调用该方法 return this.customeCharge() * 0.7 } customeCharge() { return 100; } } User.vipCharge // undedined Us...
Java
UTF-8
3,180
3.265625
3
[]
no_license
package com.digitoy.games.actions; import com.digitoy.games.models.Board; import com.digitoy.games.models.tiles.Tile; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; public class BoardActio...
Markdown
UTF-8
10,681
4.09375
4
[]
no_license
# Primitive Values Versus Objects JavaScript makes a somewhat arbitrary distinction between values: * The primitive values are booleans, numbers, strings, null, and undefined. * All other values are objects. ## Primitive Values * Compared by value * Always immutable ## Objects All nonprimitive values are objects. ...
JavaScript
UTF-8
1,663
2.859375
3
[ "MIT" ]
permissive
const addHospital = () => { var name = document.getElementById("name").value; var openTime = document.getElementById("openTime").value; var closeTime = document.getElementById("closeTime").value; var main = document.getElementById("main").value; var secondary = document.getElementById("secondary").value; va...
Java
UTF-8
788
1.882813
2
[ "MIT" ]
permissive
/* * Copyright 2018 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ package com.nxp.awsdeviceconfiguration.nsd; import android.net.nsd.NsdServiceInfo; public interface INetworkServiceDiscoveryListener { /** Notify that device discovery has started */ void onDeviceDiscoveryStarted(...
Markdown
UTF-8
2,316
3.09375
3
[ "MIT" ]
permissive
# Machine Learning in seconds # Deep Learning / Artificial Intelligence / AI ### https://www.facebook.com/groups/195065914629311/ - [Hello Xor (Week 1 / 2)](#i-hello-xor-week-1--2) - [General CPU (Week 3)](#ii-general-cpu-week-3) - [Find Me (Week 4)](#iIi-find-me-week-4) ------ ### I. Hello Xor (Week 1 / 2) Hell...
SQL
UTF-8
2,707
3.171875
3
[]
no_license
/* */ truncate "record" RESTART IDENTITY CASCADE; /* UPDATE "user" SET "is_admin" = true WHERE id = 5; */ /* Add User */ INSERT INTO "user" ("email", "password", "firstname", "lastname", "slug", "bio", "avatar_url", "is_admin") VALUES ('zou8@zou.zou', 'zouzou', 'zou', 'zou', 'zou-zou8', 'bio', 'https://ra...
C
UTF-8
348
2.5625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include "game.h" #include "../helpers.h" int main(int argc, char **argv) { if (argc < 3 || !str_is_numeric(*(argv + 2))) { fprintf(stderr, "Usage: client <ip> <port>"); return 1; } int port = strtol(*(argv + 2), NULL, 10); init_game(*(argv + 1...
Markdown
UTF-8
4,564
2.875
3
[]
no_license
# Advanced React Course This is the repository for the project 'Sick Fits' created while following along with the Advanced React & GraphQL course by Wes Bos, below. You can see the deploy live at [https://sick-fits-frontend-prod.herokuapp.com/](https://sick-fits-frontend-prod.herokuapp.com/), login with _test@bridgerp...
Java
UTF-8
3,807
1.828125
2
[ "Apache-2.0" ]
permissive
package org.iets3.req.core.intentions; /*Generated by MPS */ import jetbrains.mps.intentions.IntentionDescriptorBase; import jetbrains.mps.intentions.IntentionFactory; import java.util.Collection; import jetbrains.mps.intentions.IntentionExecutable; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; im...
Shell
UTF-8
2,596
3.046875
3
[]
no_license
# Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi # go export GOPATH=$HOME/go export PATH=$HOME/go/bin:$PATH # nodebrew export PATH=$HOME/.nodebrew/current/bin:$PATH export PATH=$HOME/.config/yarn/global/node_modules/.bin:$PATH # rbenv if which...
PHP
UTF-8
1,737
2.71875
3
[ "MIT" ]
permissive
<?php namespace Grummfy\RestorableEvents\Events; use Grummfy\RestorableEvents\ValueObject\ListenerInfo; /** * Extends \Illuminate\Events\Dispatcher to add the support of interface for listeners and priorities * * @package App\Services */ class Dispatcher extends \Illuminate\Events\Dispatcher { protected $priori...
C++
UTF-8
909
3.328125
3
[]
no_license
#include<iostream> using namespace std; class cube{ private: float h,b,l; int selector; public: void set_data(){ cout<<"please enter the height width and length"<<endl; cin>>h>>b>>l; } void display_dat...
JavaScript
UTF-8
2,156
2.890625
3
[]
no_license
// var circlePosition = document.getElementsByClassName('user-panel'); // console.log(circlePosition); // function position() { // for (var i = 0; i < circlePosition.length; i++ ) { // //give circle a random position // var posx = (Math.random() * ($(document).width() - 0)).toFixed(); // var posy = (Mat...
PHP
UTF-8
1,989
2.515625
3
[]
no_license
<?php declare(strict_types = 1); namespace App\Form\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\OptionsResolver\OptionsResolver;...
Java
UTF-8
5,394
3.109375
3
[]
no_license
import javax.swing.*; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.event.*; import java.util.ArrayList; import java.util.List; /** * A class that acts as a view for RemoveCourseWindowController (control...
JavaScript
UTF-8
646
4.03125
4
[]
no_license
// filter - Mengembalikan elemen array yang memenuhi kondisi yang ditentukan dalam callback function // tidak mengembalikan array baru // dapat memanipulasi ukuran array baru const people = [ { name: "bob", age: 20, position: "developer" }, { name: "peter", age: 25, position: "designer" }, { name: "susy", age: 3...
C++
UTF-8
2,891
2.703125
3
[]
no_license
#include "pch.h" #include "WinPipe.h" const wchar_t* PIPE_NAME = L"\\\\.\\pipe\\{2145AB63-BF83-40A4-8A9D-A358D45AF1C1}"; std::string fromWS(const std::wstring& str) { const size_t bytes = str.length() * sizeof(std::wstring::value_type); const auto buf = new char[bytes]; size_t bytesConverted; wcstombs_s(&bytesCon...
Ruby
UTF-8
937
3.1875
3
[]
no_license
# # my_first_hash = Hash.new() # # # # my_second_hash = {} # # # # meals = {"breakfast" => "yoghurt", "lunch" => "roll", "dinner" => "steak"} # # p meals # # # # p meals ['breakfast'] # # # # meals ["supper"] = "pancakes" # # meals ["breakfast"] = "toast" # # # # p meals # # names_hash = Hash.new() # # pocket_money = {...
C++
UTF-8
1,971
2.703125
3
[]
no_license
#include <iostream> #include "io/iomanager.h" #include "methods/analytical.h" #include "methods/explicit/forward_t_central_s.h" #include "methods/implicit/laasonen.h" #include "methods/implicit/crank_nicolson.h" #include "mpi/mpimanager.h" /* Main file - creates a problem, solving it with the different methods, endin...
Java
UTF-8
1,304
3.34375
3
[]
no_license
package t1004; import java.util.HashMap; import java.util.Map; import java.util.Scanner; /** * Created by xl on 15/10/6. */ public class Main { public static void main(String[] args) throws Exception{ Scanner scanner = new Scanner(System.in); int number = 0; while (scanner.hasNext()){ ...
Java
UTF-8
9,398
2.734375
3
[]
no_license
package controllers; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax...
Java
UTF-8
4,647
1.914063
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2018-present Open Networking Foundation * * 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 appli...
Java
UTF-8
955
2.46875
2
[]
no_license
import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; @Entity @Table(name="Feedback") public class Feedback { public Feedback(String feedbackDesc) { setFeedbackDesc(feedbackDesc); } public Feedback() { } @Id @Column(name="idFeedback") @Generated...
Python
UTF-8
17,146
2.78125
3
[ "MIT" ]
permissive
""" **job** module handles all the job running logic: - consistent exception handling and logging - currently 2 job runners are implemented: - SimpleJobRunner runs the jobs sequentially. - ParallelJobRunner queues the jobs and run them in a dedicated thread """ from concurrent.futures import ThreadPoolExecutor, Pr...
Java
UTF-8
292
1.773438
2
[]
no_license
package com.example.cinema.blImpl.promotion.activity; import com.example.cinema.po.Activity; import com.example.cinema.vo.ResponseVO; import java.util.List; public interface ActivityServiceForBl { ResponseVO getActivitiesByMovie(int movieId); List<Activity> getActivityList(); }
C++
UTF-8
2,186
3.625
4
[]
no_license
#include <iostream> #include <iomanip> #include <cstring> #include <chrono> using namespace std::chrono; class Corporation { public: int id; int pay; int elig_raise; std::string name; std::string jobc; char hire[3]; }; int main() { Corporation emp; emp.id = 1; emp.pay = 30000; ...
C#
UTF-8
783
3.03125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WpfImageSplicer { public struct CellState { public bool Open; public bool Explored; public CellState(bool open, bool explored) { ...
Markdown
UTF-8
1,732
2.78125
3
[]
no_license
# 服务订阅 目前整套系统是可以免费使用的, 但是一些功能以及 APP 是需要付费的, 所以也在这里说明下付费的机制以及相应的权益, 防止大家使用的时候有所顾虑 ## 免费使用 ``` 免费KEY: 5de762f6-0c00-46ea-aae1-6dc71a7d4e68 ``` 免费 KEY 可以使用 bangumi 来获取基本信息, 同时也提供了一个 m3u8 的资源站可以获取播放链接; 整套系统都是可以免费使用的, 目前放开源代码的部分只有后台, 像前端主题文件以及管理面板 app 等都只有打包过后的文件, 并没有将源代码释放出来, 主要是也没太多的精力去维护太多的分支 后台的接口其实都暴露出来了, 你可以自己开发...
Python
UTF-8
848
3.640625
4
[]
no_license
from random import randint red = '\033[31m' items = ['pears','apples','oranges','bananas','planes','trucks','parrots','amimals','cars','books','food','lions','diggers','compasses','leaves','chickens','wolves','clocks','kebabistan','potatoes'] verbs = ['were eaten by','kicked','ate','bought','were sent to school with...
Java
UTF-8
797
3.296875
3
[]
no_license
package exam03retake01; import java.io.BufferedReader; import java.io.IOException; import java.util.HashMap; import java.util.Map; public class OwlCounter { private Map<String, Integer> owls = new HashMap<>(); public void readFromFile(BufferedReader reader) { try { String line; ...
Markdown
UTF-8
5,144
2.734375
3
[]
no_license
title: Criar um portfólio de mudança Description: Tem por objetivo criar um portfólio de mudanças a fim de agilizar a criação de uma nova mudança # Criar um portfólio de mudança Esta funcionalidade tem por objetivo criar um portfólio de mudanças a fim de agilizar a criação de uma nova mudança ao agrupar as mesmas por ...
Python
UTF-8
585
3.15625
3
[]
no_license
def find(a): if parents[a] == a: return a tmp = find(parents[a]) parents[a] = tmp return tmp def union(a, b): p_a, p_b = find(a), find(b) if p_a != p_b: parents[p_b] = p_a count[p_a] += count[p_b] for _ in range(int(input())): network = [] parents = {} count...
Shell
UTF-8
428
3.28125
3
[ "Apache-2.0" ]
permissive
#!/bin/bash downloadJdk8() { echo "*** ------ installJdk ------ ***" 1>&2 cd /apps version=65 wget http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u$version-linux-x64.tar.gz tar zxvf jdk-8u$version-linux-x64.tar.gz rm jdk-8u65-linux-x64.tar.gz ln -s /apps/jdk1.8.0_$version /apps/jdk8 alternat...
Go
UTF-8
3,396
2.84375
3
[ "MIT" ]
permissive
package md_test import ( "bytes" "encoding/base64" "encoding/json" "io/ioutil" "os" "testing" "github.com/apprentice3d/forge-api-go-client/dm" "github.com/apprentice3d/forge-api-go-client/md" ) func TestAPI_TranslateToSVF(t *testing.T) { // prepare the credentials clientID := os.Getenv("FORGE_CLIENT_ID") ...
SQL
UTF-8
9,704
3.46875
3
[]
no_license
DROP TABLE MNEMONIC; DROP TABLE EXTENDED_KEY; DROP TABLE SECRET_KEY; DROP TABLE ACCOUNT; DROP TABLE ACCOUNT_JNL; DROP TABLE ACCOUNT_SYS_PRM; DROP TABLE ADDRESS_REGISTER; DROP TABLE WITHDRAWAL; DROP TABLE ADDRESS_NOTICE; DROP TABLE BLOCK_CHAIN_SYNC; DROP TABLE TRANSACTION_ETH; DROP TABLE TRANSACTION_BTC_UTXO; CREATE TA...
Java
UTF-8
98
1.65625
2
[]
no_license
package Server; public class ContractAddress { public static String CONTRACT_ADDRESS = ""; }
Java
UTF-8
2,264
2.4375
2
[]
no_license
package com.spring.mvc.springweb.board.api; import com.spring.mvc.springweb.board.domain.Board; import com.spring.mvc.springweb.board.mapper.BoardMapper; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import java.util.List;...
Shell
UTF-8
481
2.890625
3
[]
no_license
# Gentoo Linux Bash Shell Command Completion # # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # # rc completion command # _rc() { local cur COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" if [[ ${#COMP_WORDS[*]} -le 2 ]]; then COMPR...
C#
UTF-8
2,960
2.5625
3
[]
no_license
using Caliburn.Micro; using Newtonsoft.Json; using ServerList.Interfaces; using ServerList.Messages; using ServerList.Models; using System; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; using System.Windows.Controls; namespace ServerList.ViewModels { public class LoginView...
Java
UTF-8
1,007
2.46875
2
[]
no_license
package com.jyoc.jyoc_firestore_guion; import java.io.Serializable; public class Cosa implements Serializable { private String id; private String nombre; private int cantidad; public Cosa(String id, String nombre, int cantidad) { this.id = id; this.nombre = nombre; this.c...
C#
UTF-8
946
3.765625
4
[]
no_license
using System; using System.Collections.Generic; using System.Text; using System.Linq; namespace SumOfDigits { class MainClass { public static void Main(string[] args) { byte numLines = byte.Parse(Console.ReadLine()); int sum = 0; while (numLines>0) ...
Python
UTF-8
285
2.65625
3
[]
no_license
import requests import urllib.request import re print("dddddd") url=requests.get('https://www.sirm.org/en/2020/03/31/covid-19-case-5/') html=url.text urls = re.findall('https://www.sirm.org/wp-content/uploads/2020/03/.*.jpeg',html) print(len(urls)) for image in urls: print(image)
C++
UTF-8
808
2.515625
3
[]
no_license
#include <iostream> #include <cstring> #include <cstdio> using namespace std; const int MAXN = 1010; int n, a[MAXN], a2[MAXN]; void init() { memset(a, 0, sizeof(a)); memset(a2, 0, sizeof(a2)); } void solve() { a[0] = n; for (int i = 0; i < MAXN; i++) { a2[i] = a[i] * a[i]; a[i+1] = a...
Python
UTF-8
1,429
3.28125
3
[ "BSD-2-Clause" ]
permissive
def exo1(): """ Perform the projected gradient descent. Record in a variable |E| the evolution of the Sobolev energy $E$. """ niter = 50 E = [] k = 1; ndisp = [1 5 10 niter] norm1 = lambda f: norm(f(: )) f = y for i in 1: niter: E(i) = norm1(grad(f)) f = Pi(f + ta...
SQL
UTF-8
7,562
4.21875
4
[]
no_license
# 1. 查找部门 30 中员工的详细信息 SELECT * FROM scott.emp WHERE DEPTNO = 30; # 2. 找出从事 clerk 工作的员工的编号、姓名、部门号 SELECT EMPNO, ENAME, DEPTNO FROM scott.emp WHERE JOB = 'clerk'; # 3. 检索出奖金多于基本工资的员工信息 SELECT * FROM scott.emp WHERE COMM > SAL; # 4. 检索出奖金多于基本工资 30% 员工信息 SELECT * FROM scott.emp WHERE COMM > SAL * 0.3; # 5. 希望看到 10 部门...
Shell
UTF-8
372
3.1875
3
[]
no_license
#!/bin/sh set -e [[ $DEBUG ]] && set -x # Disabling nginx daemon mode export KONG_NGINX_DAEMON="off" # Setting default prefix (override any existing variable) export KONG_PREFIX="/usr/local/kong" # Prepare Kong prefix if [ ! -f /data/.inited ]; then kong prepare -p "/usr/local/kong" \ && kong migrations up \ && ...
Java
UTF-8
6,066
2.21875
2
[]
no_license
package de.unidue.inf.is; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.se...
C++
UTF-8
1,348
2.765625
3
[ "MIT" ]
permissive
#include "Population.h" #include <time.h> #include <iostream> using namespace MaxOne; int main() { srand((unsigned int)time(NULL)); Population ga(20, 20, .7, .03); Chromosome bestChromosome = ga.GetBestChromosome(); int generation = 0; size_t popSize = ga.GetPopulationSize(); double crossRate = ga.GetCrossOv...
Java
UTF-8
955
2.15625
2
[]
no_license
package com.xue.siu.config; /** * Created by XUE on 2016/1/18. */ public class UserInfo { public static String userId; public static String password; public static String portraitUrl; public static boolean isLogged = false;//是否已登录 public static String getUserId() { return userId; } ...
C++
UTF-8
3,564
3.859375
4
[ "MIT" ]
permissive
#pragma once template<typename T> struct BinaryNode { BinaryNode(T key) { this->key = key; left = right = parent = NULL; } BinaryNode * left, * right, *parent; T key; }; // simple binary search tree that doesn't allow duplicate keys template<typename T> class BinarySearchTree { public: BinarySearchTree...
Python
UTF-8
1,664
2.984375
3
[]
no_license
############################################################################# # Desc: truncate or append 0's to Call Record dump to match the size provided # in the second argument, the optional third argument will specify the # name of the output file, if not provided the input file name is # appende...
JavaScript
UTF-8
3,444
2.546875
3
[ "MIT" ]
permissive
if (!com) var com = {}; if (!com.logicpartners) com.logicpartners = {}; if (!com.logicpartners.designerTools) com.logicpartners.designerTools = {}; com.logicpartners.designerTools.rectangle = function() { var self = this; this.counter = 1; this.button = $("<div></div>").addClass("designerToolbarRectangle design...
Java
UTF-8
1,651
2.265625
2
[ "MIT" ]
permissive
package org.unixlibre.persistence.impl.jpa.tests; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.unixlibre.persistence.CommandManager; import org.unixlibre.persistence.impl.jpa.JPACommandMa...
Java
UTF-8
8,428
2.171875
2
[]
no_license
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
Java
UTF-8
1,143
2.953125
3
[]
no_license
package server.model; import java.util.HashMap; import java.util.Map; public class Location { private Address address; private Map<String, Boolean> monthlyRent; public Location() { } public Location(Address address) { this.address = address; this.monthlyRent = new HashMap<>(); ...
C
UTF-8
2,033
2.6875
3
[]
no_license
/** ****************************************************************************** * @file ap3216c_app.c * @brief key_app function * @author Xli * @email xieliyzh@163.com * @version 1.0.0 * @date 2020-03-17 * @copyright 2020, EVECCA Co.,Ltd. All rights reserved ****************************...
Markdown
UTF-8
1,224
2.921875
3
[ "MIT" ]
permissive
# Project: Your Game **[<= Back](../09-project-paint/project-paint.md)** * * * **[Next =>](../../04-nodejs/00-learn-nodejs-basics/learn-nodejs-basics.md)** ### Intro The idea is simple, start your own simple game project directly in that folder. Pick game from the list below List of games: 1. [Snake](https://en.w...
C#
UTF-8
4,300
2.6875
3
[]
no_license
using System; namespace channelbench { using System.Collections.Concurrent; using BenchmarkDotNet.Configs; using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes.Jobs; using BenchmarkDotNet.Running; using System.Collections.Generic; using System.L...
Python
UTF-8
1,845
2.75
3
[]
no_license
from django.http import JsonResponse import tushare as ts import time,datetime ''' a:代码 '000001' b:日期 '2018-12-12' c:日期 '2018-12-15' //null则起始一天 ''' def isVaildDate(date): try: time.strptime(date, "%Y-%m-%d") return True except: return False def getresponse(data): response = J...
Java
UTF-8
3,471
2.859375
3
[]
no_license
package friend; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; i...
C++
UTF-8
1,405
2.65625
3
[]
no_license
#pragma once #include <Conventions\EntityID.h> #include <Utilities\Range.h> #include <Math\FloatTypes.h> #include <vector> namespace Logic { // For things like hitpoints etc struct NumericPropertyContainer { std::vector<EntityID> entity_ids; std::vector<unsigned> entity_to_pro...
C++
UTF-8
1,813
3.171875
3
[ "Unlicense" ]
permissive
#include "Graphics/Lighting.h" #include "Graphics/Shading.h" namespace GRAPHICS { /// Computes shading for a vertex. /// @param[in] world_vertex - The world space vertex for which to compute lighting. /// @param[in] unit_vertex_normal - The unit surface normal for the vertex. /// @param[in] base_ver...
C#
UTF-8
823
2.90625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class Food : MonoBehaviour { public float quantity = 1.0f; protected float initialQuantity; void Awake() { initialQuantity = quantity; } public virtual bool eat(float quantityEatted){ this.quantity -= quantityE...
C#
UTF-8
12,366
2.59375
3
[]
no_license
using GameLogic; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Inpu...
PHP
UTF-8
5,234
2.6875
3
[ "MIT" ]
permissive
<?php namespace App\Services; use App\Models\Discord\Connection; use App\Models\Discord\Guild; use App\Models\User; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use Illuminate\Database\Eloquent\Model; class DiscordOAuthService { /** * @param $code * @return mixed * @throws Guz...
Java
UTF-8
3,547
2.296875
2
[]
no_license
package com.luxoft.sm.domain; import javax.persistence.*; import java.util.Date; /** * Created by Luxoft on 12.01.2017. */ @Entity @Table(name = "operation") public class Operation { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", nullable = false, updatable = false) private...
Go
UTF-8
672
2.703125
3
[ "MIT" ]
permissive
// Copyright © 2020 Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package libsass_test import ( "fmt" "log" "github.com/bep/golibsass/libsass" ) func ExampleTranspiler() { transpiler, err := libsas...
Python
UTF-8
3,778
2.703125
3
[ "MIT" ]
permissive
from numpy import pi, sin import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider from keras import backend as K from keras.models import load_model from numpy import matlib as npm from numpy import linalg as LA import pickle # ----------------------------------------------------------...
Shell
UTF-8
453
3
3
[]
no_license
#!/bin/bash # Check for jq and exit if missing if [[ ! `which jq 2>/dev/null` ]] then echo "Please install jq using pip or yum" exit 1 fi oc extract secret/pull-secret -n openshift-config --to=. jq 'del(.auths["cloud.openshift.com"])' .dockerconfigjson > .dockerconfigjson.tmp mv .dockerconfigjson.tmp .dockercon...
C
UTF-8
564
2.546875
3
[]
no_license
#include <stdio.h> #include "machine.h" #include "compiler.h" #define CODE_SIZE 1024 #define STACK_SIZE 1024 int main(int argc, char *argv[]) { if (argc < 2) { fprintf(stderr, "Usage: %s file\n", argv[0]); return 1; } code_t code[CODE_SIZE] = { HALT }; if (compile(argv[1], code, CODE_SIZE) != 0) { return 1;...