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
TypeScript
UTF-8
623
2.890625
3
[]
no_license
import ApiHandler from 'common/types/ApiHandler'; import Handler from 'common/types/Handler'; import ApiFailure from 'common/types/ApiFailure'; export type HandlerHook<T> = { onSuccess: (callback: Handler<T>) => void; onFailure: (callback: Handler<ApiFailure>) => void; }; export default function useHandlerHook<T>...
JavaScript
UTF-8
1,123
4
4
[]
no_license
// Creeaza o functie polimorfica pentru calcularea suprafetelor. Daca primeste un parametru, sa calculeze suprafata unui patrat. Daca primeste doi, a unui dreptunghi. Daca primeste trei, sa calculeze suprafata totala a paralelipipedului. Foloseste structura switch. // Creeaza o functie numita calculateCircleArea() si a...
Shell
UTF-8
1,366
3.875
4
[ "MIT" ]
permissive
#!/bin/bash # # File: sanity.sh # Author: shaharf # # Created on Sep 6, 2018, 3:22:09 PM # function panic() { echo "PANIC: $*" > /dev/stderr exit 1 } function load_to_cache() { cat $f > /dev/null } function echodo() { echo "$*" eval "$*" } function dotest() { local msg=$1 shift 1 local cmd=$* ...
C
WINDOWS-1252
2,580
2.828125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upl...
Python
UTF-8
399
2.609375
3
[]
no_license
import sys CBC_key = "140b41b22a29beb4061bda66b6747e14" CBC_Ciphertext_1 = "4ca00ff4c898d61e1edbf1800618fb2828a226d160dad07883d04e008a7897ee2e4b7465d5290d0c0e6c6822236e1daafb94ffe0c5da05d9476be028ad7c1d81" from Crypto.Cipher import AES from Crypto import Random IV = Random.new().read(16) obj2 = AES.new(CBC_key, A...
Markdown
UTF-8
10,500
2.921875
3
[ "MIT" ]
permissive
# A0127570H ###### /DeveloperGuide.md ``` md The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete /t 1`. <img src="images/SDforDeleteTask.png" width="800"> >Note how the `Model` simply raises a `ModelChangedEvent` when the model is changed, instead...
Python
UTF-8
609
2.890625
3
[]
no_license
def found(string,s,n): ct = 0 for i in range(len(string)): if string[i] == s: ct += 1 if ct == n: return i return -1 def ReBWT(Lst): length = len(Lst) result = [' ' for x in range(length)] Fst = ''.join(sorted([k for k in Lst])) pos = 0 for nu...
C++
UTF-8
8,106
2.671875
3
[]
no_license
/* * Includes */ #include <jnif.hpp> #include <iostream> #include <fstream> using namespace std; using namespace jnif; using namespace jnif::model; using jnif::JnifError; static void testException() { try { throw Exception("arg1: ", 1, ", arg2: ", "2", ", arg3: ", 3.4); } catch (const Exception& ex...
Markdown
UTF-8
7,042
3.078125
3
[]
no_license
二九 “老实说,我不明白为什么要——猜。不知道反而好多了。我们全都可以像往常一样继续生活下去。” “噢不,我们不能,”菲利普说。“这正是你错的地方,亲爱的。已经开始腐败了。” “你是什么意思?” “呃,拿海斯特和她的年轻人来说——热切、年轻的唐纳德医生。好青年,认真,却在担心。他并不真的认为是她干的——但是他并不真的确定不是她于的!因此他焦虑地看着她,在他认为她不注意的时候。但是她是注意到了,因此就这么一回事!也许确实是她干的——你比我清楚——但是如果不是她干的,她又能拿她的年轻人怎么办?不停的说: “请相信我,不是我?不过反正她是会这样说没错。” “真是的,菲利普,我认为你...
JavaScript
UTF-8
1,749
3.03125
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; class NewMessage extends React.Component { constructor(props) { super(props); this.state = { alias: '', complaint: '', age: '', entries: [] }; this.aliasChange = this.aliasChange.bind(this); this.ageChange = thi...
JavaScript
UTF-8
1,804
2.671875
3
[ "MIT" ]
permissive
/*globals test, expect*/ import { renderHook, act } from "@testing-library/react-hooks" import useFormist from "../src/useFormist" test("no change", async () => { const initialValues = { firstName: "John", age: 23 } let submittedValues = {} const { result } = renderHook(() => useFormist(initialValu...
C
UTF-8
656
3.671875
4
[]
no_license
#include <memory.h> #include <stdlib.h> /** * Note: The returned array must be malloced, assume caller calls free(). */ int* decrypt(int *code, int codeSize, int k, int *returnSize) { int *res = (int*)malloc(sizeof(int) * codeSize); memset(res, 0, sizeof(int) * codeSize); *returnSize = codeSize; int ...
C++
UTF-8
651
2.984375
3
[]
no_license
#include<iostream> #include<stack> #include<string> using namespace std; int main() { int T, i; string br; stack<char> st; cin >> T; while (T--) { cin >> br; i = 0; while(i<br.length()) { if (br[i] == '(') { st.push(br[i]); } else if (br[i] == ')') { if (st.size() != 0 && st.top() == '(') { ...
Java
UTF-8
3,695
2.78125
3
[]
no_license
package threecats.zhang.domoment.Helper; import android.widget.DatePicker; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.util.Calendar; import java.util.Date; /** * 由 zhang 于 2017/8/15 创建 */ public class DateTimeHelper { public DateTimeHelper(){ } public static void setC...
Java
UTF-8
1,299
3.40625
3
[]
no_license
package dataStructures.set; import java.util.LinkedList; import java.util.Iterator; public class LinkedListSet <T> implements Set <T>{ private LinkedList<T> elements; public LinkedListSet() { elements = new LinkedList<>(); // TODO Auto-generated constructor stub } @Override public Iterator<T> iterator(...
Java
UTF-8
615
2.390625
2
[]
no_license
package com.example.root.facialdetection.Model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Map; @JsonIgnoreProperties(ignoreUnknown = true) abstract class BaseModel { public Map<String, Object> toDictionary() { Objec...
C
UTF-8
488
2.859375
3
[]
no_license
/************************************************************************* > File Name: hzol101.c > Author: bianyilin > Mail: 732406982@qq.com > Created Time: 2019年06月12日 星期三 19时21分53秒 ************************************************************************/ #include <stdio.h> int main(){ int n,q,b,s,g,sum; ...
Java
UTF-8
3,820
2.125
2
[]
no_license
package com.jiaoke.oa.service; import com.jiake.utils.DateUtil; import com.jiaoke.oa.bean.OaActEngage; import com.jiaoke.oa.bean.OaCollaboration; import com.jiaoke.oa.dao.OaActEngageMapper; import com.jiaoke.oa.dao.OaCollaborationMapper; import com.jiaoke.oa.dao.UserInfoMapper; import org.springframework.stereotype.Se...
Java
UTF-8
1,573
2.21875
2
[]
no_license
package masco.mis.software.mascoapproval.chat.pojo; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; /** * Created by ARMAN on 03-Dec-16. */ public class ChatWeiget { public String emp_ImgUrl; public String emp_Code; public String emp_Name; public String emp_Des...
JavaScript
UTF-8
15,368
2.875
3
[ "Zlib" ]
permissive
define(['jquery', 'markup', 'utils/selectors', 'utils/customelements'], function($, TwineMarkup, Selectors) { "use strict"; var // Used by lockProperties lockDesc = { configurable: 0, writable: 0 }, // Used to cache t8n animation times t8nAnimationTimes = { "transition-in": Object.create(null), ...
SQL
UTF-8
1,700
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 16, 2018 at 02:06 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
Java
UTF-8
1,307
2.453125
2
[]
no_license
package ar.com.dbgrid; import java.lang.reflect.InvocationTargetException; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.table.DefaultTableModel; import ar.com.dbgrid.dao.AlumnoDao; import ar.com.dbgrid.modelo.ConversorResultSetADefaultTableModel; import ar.com.dbgrid.vis...
Python
UTF-8
556
4.125
4
[]
no_license
#question 3 def check(g,n): if g < n: return "Too low" elif g > n: return "Too high" else: return "Correct" def main(): # question 3 number = randint(0,99) guess = 0 finished = False count = 0 guess = int(input("Guess a number between 0 and 99: ")) while not finished: count += 1 if guess < numb...
Java
UTF-8
2,725
2.03125
2
[]
no_license
package br.com.delos.config; import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.beans.factory.config.CustomScopeConfigurer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframewor...
Python
UTF-8
7,828
2.53125
3
[ "MIT" ]
permissive
from typing import List, Tuple import numpy as np from highway_env import utils from highway_env.road.road import Road, RoadNetwork from highway_env.road.lane import StraightLane from highway_env.vehicle.controller import ControlledVehicle, MDPVehicle from highway_env.vehicle.kinematics import Vehicle, Obstacle from ...
C++
UTF-8
975
3.078125
3
[]
no_license
#include <algorithm> #include <iostream> #include <set> #include <string> #include <vector> using namespace std; int main() { string text; cin >> text; vector<string> patts; string in; while (cin >> in) { if (in == "break") break; patts.push_back(in); } vector...
Python
UTF-8
1,307
2.90625
3
[]
no_license
import argparse import sys import prediction.SpotifyClassifier as sc import prediction.YoutubeNeuronNetwork as ffn SPOTIFY_DATASET_PATH = './Business Analysis/data/spotify_metadata_playlist.xlsx' YOUTUBE_DATASET_PATH = './Business Analysis/data/youtube_metadata_per_user.csv' def main(platform='spotify', users=[]): ...
Ruby
UTF-8
3,300
2.859375
3
[ "MIT" ]
permissive
require "subshell_command/version" require "open3" module SubshellCommand class Command attr_reader :command_string attr_reader :env_hash, :current_directory attr_reader :success_callback, :failure_callback attr_reader :redirect_stderr_to_stdout def initialize(command_string) @command_stri...
Java
UTF-8
1,280
3.484375
3
[]
no_license
import java.util.Scanner; class Solution { public static int getHeight(Node root) { //Write your code here Node node = root; int height_left = 0; int height_right = 0; if (node.left == null && node.right == null) return 0; else { if (node.left != null) h...
C#
UTF-8
1,469
3.484375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DesignPatternsLibrary { public enum cars { AUDI, BMW} class Program { static void Main(string[] args) { ICarFactory facotry = null; bool rig...
C
UTF-8
345
3.65625
4
[]
no_license
#include <stdio.h> unsigned setbits(unsigned x, int p, int n, int y); int main() { unsigned x = 42; x = setbits(x, 0, 0, 0); printf("%u", x); return 0; } /* set n bits of x beginning at position p to the right-most n bits of y, * leaving the other bits unchanged */ unsigned setbits(unsigned x, int p, int n, ...
Python
UTF-8
1,259
2.671875
3
[ "BSD-3-Clause" ]
permissive
#!/usr/bin/env pytest-3 # -*- coding: utf-8 -*- from pybgl.automaton import Automaton from pybgl.graphviz import graph_to_html from pybgl.html import html from pybgl.ipynb import in_ipynb from pybgl.suffix_trie import BOTTOM, factors, make_suffix_trie from pybgl.trie import Trie def test_factors(): d = { ...
Python
UTF-8
628
3.671875
4
[]
no_license
# BASIC LOGGING import logging def main(): # use basicConfig to configure logging logging.basicConfig(level=logging.DEBUG, filename="output.log", filemode="w") # try each of the log levels logging.debug("This is a debug message") logging.info("This is a info message") l...
C#
UTF-8
2,821
2.71875
3
[]
no_license
namespace Mudanzas.Helpers.Templates { public class UsuarioEmailTemplate { public static string bienvenidoProspecto(string nombre, string codigoVerificacion, string link) { string template = $"" + $"<h2>Bienvenido {nombre}</h2>, <br> para continuar con tu registro i...
Java
UTF-8
2,163
2.5
2
[]
no_license
package com.example.invoice.model; import com.sun.istack.NotNull; import org.hibernate.validator.constraints.Length; import javax.persistence.*; import java.time.LocalDate; import java.util.Objects; @Entity @Table(name = "invoice") public class Invoice { @Id @GeneratedValue(strategy = GenerationType.IDENTITY...
C#
UTF-8
1,140
2.546875
3
[]
no_license
using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace RECIManagementSoftware { class InsertNewAccount { private static string _computerName = Environment.MachineName; private s...
JavaScript
UTF-8
1,602
3.15625
3
[]
no_license
import React from "react"; import WeatherIcon from "./WeatherIcon.js"; export default function WeatherForecastInformation(props){ function hours(){ let date= new Date(props.data.dt * 1000 ); let hours = date.getHours(); // if hour is 0 it displays as 12 if (hours === 0){hours = 12;} // if hours i...
Java
UTF-8
2,452
2.015625
2
[]
no_license
package com.qy.business.main.login.bean; public class LoginReturnDataBean { private String user_id;//用户编号 private String user_name;//用户名 private String parent_id;//父账号ID private String parent_name;//父账号名 private String user_type;//用户类型 private String subordinate;//是否顶级账户或员工账户 private String nickname;//昵称 priva...
Go
UTF-8
21,456
2.9375
3
[]
no_license
package ai import ( "github.com/timsims1717/cg_rogue_go/internal/actions" "github.com/timsims1717/cg_rogue_go/internal/floor" "github.com/timsims1717/cg_rogue_go/internal/selector" "github.com/timsims1717/cg_rogue_go/pkg/world" "math/rand" ) type RandomWalker struct { *AbstractAI } func NewRandomWalker(charact...
Java
UTF-8
701
2.65625
3
[]
no_license
package com.zhaofan.studaydemo.enviroment; /** * @author ChengJingQiang * @copyright:2019 * @project Wepay * @date 2019/4/17 * description: */ public class Context { public static final State STATE1 = new ConcreteState1(); public static final State STATE2 = new ConcreteState2(); private State curren...
Swift
UTF-8
1,376
2.703125
3
[]
no_license
// // Rainbow_GrapherTests.swift // Rainbow GrapherTests // // Created by Sylvan Martin on 10/16/21. // import XCTest @testable import Rainbow_Grapher class Rainbow_GrapherTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of...
C
UTF-8
931
2.71875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <signal.h> #include <string.h> #include <time.h> #include <math.h> int msg = 0; int getCurrentTime() { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); int timeInMilliseconds = (int)(ts.tv_nsec/1000000); return timeI...
JavaScript
UTF-8
445
2.5625
3
[]
no_license
$("document").ready(function(){ $("#amount").slider({ range: true, min: 0, max: 500, values: [50, 100], slide: function(evt, elem) { $("#amtVal1").text(elem.values[0]); $("#amtVal2").text(elem.values[1]); } }); $("#am...
JavaScript
UTF-8
1,265
3.984375
4
[]
no_license
console.log('4-fizzbuzz-algorithms'); /* <h3>Write a function which checks given input/parameter:</h3> <ul> <li>If input/parameter is divisible by 3 print => Fizz</li> <li>If input/parameter is divisible by 5 print => Buzz</li> <li>If input/parameter is divisible by 3 or 5 print => FizzBuzz</li> <li>If input...
C++
UTF-8
6,115
3.234375
3
[]
no_license
#pragma once #include <cmath> #include <iostream> #include <assert.h> #include "../Utils/Random.hpp" class Vec3 { public: Vec3(): e{0, 0, 0} {} Vec3(double x, double y, double z): e{x, y, z} {} double x() const { return e[0]; } double y() const { return e[1]; } double z() const { return e[2]; } i...
Java
UTF-8
286
2.921875
3
[]
no_license
public class TestRegEx { public static void main(String args[]){ String data = "boo1. and2. foo3"; String[] tokens = data.split("\\.\\S*"); for(String s: tokens){ System.out.println(s); } System.out.format("Pi is approximately %f", Math.PI); } }
Python
UTF-8
3,450
4.0625
4
[]
no_license
""" For this activity I'm going to use DFS because DFS goes to the children before goes to the neighbors """ from util import Stack, Queue # These may come in handy class Graph: """Represent a graph as a dictionary of vertices mapping labels to edges.""" def __init__(self): self.vertices = {} def...
Python
UTF-8
415
3.46875
3
[]
no_license
male = [ #en lista med mansnamn " Erik ", " Lars ", " Karl ", " Anders ", " Johan " ] female = [ #en lista med flicknamn " Maria ", " Anna ", " Margareta ", " Elisabeth ", "Eva" ] del male[2] del male[2] del male[2] del female[0] del female[0] del female[1] #raderar de mans och kvinnonamnen som skulle bort prin...
JavaScript
UTF-8
4,006
2.609375
3
[]
no_license
var refreshRate = 45; var gravity = 10 / refreshRate; var canvas = document.getElementById('HTMLCanvas'); var context = canvas.getContext('2d'); var scene = { balls: [], lines: [], droppers: [] }; function display() { display_clear(); var dead = []; var i; for (i=scene.balls.length-1; i>=...
Python
UTF-8
1,274
3.484375
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 """ Author : Maxpayyne Date : 2020-02-28 Purpose: Hamming Assignment """ import argparse # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description="", formatter_class=argparse.ArgumentD...
Java
UTF-8
20,403
1.898438
2
[]
no_license
package com.yidu.sevensecondmall.utils; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.support.v4.content.FileP...
Java
UTF-8
2,280
2.5
2
[ "MIT" ]
permissive
package wimf.services.jaxrs; import org.junit.Test; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import static org.assertj.core.api.Assertions.assertThat; // TODO: this doesn't work with JUnit 4 - but might potentially work with http://junit.org/junit5 pu...
Java
UTF-8
888
2.359375
2
[]
no_license
package com.example.aria.commonsocialapp.base; import android.content.Context; import android.support.annotation.Nullable; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter; import java.util.List; public abstract...
Java
UTF-8
5,115
2.328125
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 com.sg.floorm.service; import com.sg.floorm.dao.FloorMConfigDao; import com.sg.floorm.dao.FloorMOrderDao; import com.sg.floorm...
Markdown
UTF-8
13,318
2.78125
3
[]
no_license
# Vue.js - day06 ## 反馈 1. 做路由,组件一复杂起来,上上下下,上上下下查代码,晕死我了 2. 悔不该杀那华佗----------- ~~~~(>_<)~~~~ ~~~~(>_<)~~~~ ---------------头疼的要紧 3. 🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕🐕 4. 路由还是有些模糊,可能是代码多了,有点懵逼 5. 每一块分开写就还好 凑一起又要配合挖坑就有点混乱 过滤器老师再讲一下 用的不习惯 6. 做得好乱呀 7. 网易云的接口数据好多 一层套一层 密密麻麻. 工作中后端给我们的也是这样的接口吗? 8. 麻烦老师细讲一下怎样区分--什么样的方法写在组件的method...
C#
UTF-8
2,193
2.671875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace ClinicaFrba.Registro_Resultado { class ConsultasManager { public static List<Consulta> BuscarConsulta(String nombreProfesional, String apellidoPro...
Java
UTF-8
274
1.953125
2
[]
no_license
package com.whp.ex_0725; /** * @Author: wanghp * @Date: 2021/7/25 2:01 下午 * @Describe 1、 普通属性原子类操作,比反射块,直接操作二进制码 * @Version V1.0 */ public class VarHandleTest { public static void main(String[] args) { } }
Markdown
UTF-8
1,097
2.6875
3
[]
no_license
--- title: 'Souder 2 fils sur la carte Olimex' --- ## Matériel nécessaire * Carte Olimex A20 * 10 cm de fil de cuivre **étamé** rouge * 10 cm de fil de cuivre **étamé** noir * Fer à souder ## Assemblage 1. Repérez la face arrière de la catre Olimex. La partie arrière de la carte est la partie ou le dissipateur de c...
Python
UTF-8
462
2.78125
3
[]
no_license
import gate_detector.number_poles as numpoles import gate_detector.two_pole_detect as twopole import cv2 import time import sys start = time.time() img = cv2.imread(sys.argv[1], 1) if numpoles.execute(img) == 2: width, coord, img = twopole.execute(img) print(width, coord) cv2.imshow("Detected", img) else: print...
Go
UTF-8
769
3.40625
3
[]
no_license
package array import "math" /* Company: Apple(2); Google(3), Microsoft(2); Adobe(5), Facebook(2) Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array. Could you do it without ...
JavaScript
UTF-8
2,117
2.703125
3
[]
no_license
#!/usr/bin/env node var open = require('open') var md = require('cli-md') var i = require('inquirer') var issues = require('issues-for-url') var concat = require('concat-stream') var deck = require('deck') var chalk = require('chalk') var issuePage = 'https://github.com/nodeschool/discussions/issues' var todos = dec...
C#
UTF-8
2,106
2.796875
3
[]
no_license
using SQLite.Net.Attributes; using System; using System.ComponentModel; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; namespace List.Models { public class ListItem : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public string Id { get; ...
Markdown
UTF-8
1,616
2.90625
3
[]
no_license
Trip-specific Vehicle Reccomendations from Data ======================================================== author: Samadin date: 21 Septemebr 2014 Who's driving? ======================================================== You've decided to go on a road trip. You've picked out your destination. All that's left is to pick a...
Java
UTF-8
2,416
2.640625
3
[]
no_license
package io.copart.books; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.springframework.stereotype.Service; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import com.google.gson.JsonParser; @Se...
Java
UTF-8
1,851
1.953125
2
[]
no_license
package com.xht.android.serverhelp; import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ListView; import android.widget.TextView; import...
C++
UTF-8
5,078
3.25
3
[ "BSD-2-Clause" ]
permissive
#pragma once #include "Assertions.h" #include "Types.h" namespace AK { template<typename T> class InlineLinkedList; template<typename T> class InlineLinkedListIterator { public: bool operator!=(const InlineLinkedListIterator& other) const { return m_node != other.m_node; } bool operator==(const InlineLinked...
Java
UTF-8
12,366
1.5625
2
[]
no_license
package ch.hsr.ifs.sconsolidator.core.managed; import static ch.hsr.ifs.sconsolidator.core.base.utils.CollectionUtil.orderPreservingSet; import java.io.File; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedList; import java.uti...
JavaScript
UTF-8
3,084
2.734375
3
[ "MIT" ]
permissive
window.onload = function () { // navbar shadow on scroll window.onscroll = function () { windowOnScroll(); }; function windowOnScroll() { if ( document.body.scrollTop > 50 || document.documentElement.scrollTop > 50 ) { document.querySelector("#header-container").className = "float...
Java
UTF-8
1,717
3.546875
4
[]
no_license
package tech.bitboo.stone.collection; public class SinglyLinkedList<T> { private int size; public Node root; public Node tail; protected SinglyLinkedList() { root = new Node(); tail = root; } public int size() { return this.size; } public void append(T...
Python
UTF-8
164
3.421875
3
[ "MIT" ]
permissive
def gcd(a, b): while a%b !=0: c = a%b a, b = b, c return b def lcm(a, b): return (a*b)//gcd(a, b) a, b = [int(x) for x in input().split()] print(lcm(a, b))
C#
UTF-8
2,684
3.1875
3
[ "MIT" ]
permissive
using System; using System.Text; namespace EventHubDemo.Sender { public class MyArgs { public MyArgs() { } public string eventHubName { get; set; } public int numberOfDevices { get; set; } public int numberOfMessages { get; set; } public int numberOf...
Python
UTF-8
611
3.078125
3
[]
no_license
import numpy as np fake_a_b = [3, 76] data = [[2, 81], [4, 93], [6, 91], [8, 97]] x = [i[0] for i in data] y = [i[1] for i in data] def predict(x): return fake_a_b[0] * x + fake_a_b[1] def mse(y, y_hat): return ((y - y_hat) ** 2).mean() def mse_val(predict_result, y): return mse(np...
Python
UTF-8
2,471
2.734375
3
[]
no_license
#!/usr/bin/python import mechanize from pyquery import PyQuery as pq import sys import cPickle import os import re class Database: def __init__(self, path = None): self.protocol = 2 if path is None: path = os.path.dirname(__file__) self.path = path self.s...
Java
UTF-8
15,611
2.375
2
[]
no_license
import java.nio.ByteBuffer; import java.nio.charset.CharsetDecoder; import java.nio.charset.CodingErrorAction; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.function.Function; import java.util.stream.IntStream; import java.util.stream.Stream; public class HireMe { private sta...
Java
UTF-8
182
1.9375
2
[]
no_license
package vn.edu.nlu.fit.model; import java.sql.Date; public class Invoice{ int Id ; String Status ; int Id_product ; double Total ; String Biller ; Date DateOfInvoice ; }
C#
UTF-8
1,436
2.78125
3
[ "MIT" ]
permissive
using System; using System.IO; using NReco.Data; namespace SqliteDemo.SqlLogging { class Program { static void Main(string[] args) { // configure ADO.NET and NReco.Data components var dbFactory = new LoggingDbFactory(Microsoft.Data.Sqlite.SqliteFactory.Instance) { LastInsertIdSelectText = "SE...
C
UTF-8
834
3.8125
4
[]
no_license
/* * Preprocessor.c * * Created on: Sep 21, 2017 * Author: Assunta */ #include <stdio.h> // this works like a constant. It will set the value of PI to 3.14159265 everywhere it is used in the program. #define PI 3.14159265 //defining the macro here will make it easier to use the formula. It's like...
C++
UTF-8
1,002
2.875
3
[ "MIT" ]
permissive
#pragma once #include <string> #include <sstream> #include <vector> #include <functional> #include <cassert> namespace cmd { enum CommandPlaceHolder { cmd, path, param, value }; const char* getString(CommandPlaceHolder); class Command; struct CommandDescription { std::string name; std::string help; ...
Java
UTF-8
8,498
2.1875
2
[]
no_license
package ru.gekov.web; import com.fasterxml.jackson.annotation.JsonView; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.http.HttpStatus; import org.springframe...
C++
UTF-8
806
2.59375
3
[]
no_license
#include "stdafx.h" #include "Window.h" #include "Canvas.h" CWindow::CWindow(IPainter & painter, CPictureDraft & pictureDraft) : m_painter(painter) , m_pictureDraft(pictureDraft) , m_canvas(std::make_unique<CCanvas>()) { } void CWindow::OnWindowEvent(const SDL_Event &event) { } void CWindow::OnUpdateWindow(float ...
Python
UTF-8
882
3.703125
4
[]
no_license
print "1.SUM" print "2.AVG" print "X.EXIT" cho = str(raw_input('Which one did you what choice ?')) def fun_sum(): 'sum function' num1 = float(raw_input('Enter your number:')) num2 = float(raw_input('Enter your number:')) num3 = float(raw_input('Enter your number:')) num4 = float(raw_input('Enter you...
PHP
UTF-8
8,488
2.640625
3
[]
no_license
<?php include('../database_connection.php'); include('../staff/error_array.php'); session_start(); if(isset($_POST['insert'])){ //button is pressed //---------------------end of file upload $error=0; //------------------check for errors (when button is pressed)------------------ ...
Java
ISO-8859-15
2,992
3.359375
3
[]
no_license
package no.hvl.dat102; import no.hvl.dat102.adt.*; import java.util.Scanner; public class Meny { private Tekstgrensesnitt tekstgr; private FilmarkivADT filmer; public Meny(FilmarkivADT filmer) { this.filmer = filmer; tekstgr = new Tekstgrensesnitt(); } // TODO: Tilbake i meny public void start() { S...
Markdown
UTF-8
3,037
2.6875
3
[ "MIT" ]
permissive
# Firebase IoT Demo with ESP8266 This project uses ESP8266 to read sensors, connect to Firebase and push data to Realtime Database. Temperature and Humidity data is read from DHT11 sensor, Gas leak detection is read from MQ5 Gas sensor finally device heartbeat is sent every 2 secondes to Firebase to ensure device cinn...
Python
UTF-8
1,397
3.34375
3
[]
no_license
#!/usr/bin/python3 ############################################################################### # File: billtable_test.py # Author: Nate Lao (lao.nathan95@gmail.com) # Language: python3 # Description: # Unit Test for the BillTable class. #############################################################################...
C#
UTF-8
504
2.734375
3
[ "MIT" ]
permissive
using ClashSharp.Interface; using System; namespace ClashSharp.Service { public class ClanTagService : IClanTagService { public string EncodeClanTag(string clanTag) { // make sure our clan tag starts with a # if (clanTag.StartsWith("#") == false) { ...
Java
UTF-8
2,743
2.5625
3
[]
no_license
package com.cybertek.Day4; import com.cybertek.utilities.HRTestBase; import io.restassured.http.ContentType; import io.restassured.response.Response; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import javax.swing.*; import java.util.List; import static io.restassured.RestAssured.*; ...
JavaScript
UTF-8
2,678
3.28125
3
[]
no_license
export default class AtomicType { _getString = uint8array => uint8array ? new TextDecoder().decode(uint8array) : null; _getImage = uint8array => { const blob = new Blob([uint8array], { type: "image/jpeg" }); return URL.createObjectURL(blob); }; _getBool = uint8array => !!uint8array[0]; t12ora2jsDa...
C++
UTF-8
1,641
2.78125
3
[ "MIT" ]
permissive
#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <fstream> #include <sstream> using namespace std; string windowIDSearch(char* input) { char* match; string winId; char* pch = strtok (input," "); while (pch != NULL){ if(strstr(pch,"0x"...
Java
UTF-8
2,631
1.914063
2
[]
no_license
package gob.inamhi.bean; import gob.inamhi.bean.util.JsfUtil; import gob.inamhi.domain.Escat; import gob.inamhi.domain.Parm; import gob.inamhi.session.EscatFacade; import java.io.Serializable; import java.util.List; import javax.annotation.PostConstruct; import javax.ejb.EJB; import javax.faces.bean.ManagedBean; impor...
Java
UTF-8
1,040
2.53125
3
[ "Apache-2.0" ]
permissive
package org.smartframework.cloud.starter.core.support.bean; import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.context.annotation...
JavaScript
UTF-8
1,970
2.75
3
[]
no_license
// set custom tip CustomTooltip = function(parent,tip_content,cs){ this.tip = $a(null,'div','custom_tooltip',cs); this.tip.innerHTML = tip_content; // append tip to body, to get the height and width of tip $(this.tip).appendTo('body'); this.parent = parent; $y(this.parent,{position:'relative'}); // set...
Java
UTF-8
1,055
3.1875
3
[]
no_license
package Logic.Records; public class ArtistRecord { private int artistID; private String artistName; public ArtistRecord(int artistID, String artistName) { this.artistID = artistID; this.artistName = artistName; } public int getArtistID() { return artistID; } publ...
Go
UTF-8
518
2.90625
3
[ "BSD-3-Clause" ]
permissive
package work // Args is how parameters are passed to jobs type Args map[string]interface{} // Handler is executed a a Work for a given Job. It also defines the interface // for handlers that can be used by middleware adapters type Handler func(j *Job) error // Adapter defines the adaptor middleware type type Adapte...
JavaScript
UTF-8
1,312
2.609375
3
[]
no_license
import React, { useState, useEffect } from "react"; import getWeatherData from "../api"; import Loader from "./Loader"; const WeatherCard = (props) => { const { location, error, setError, tempUnit } = props; const [weatherData, setWeatherData] = useState(null); if (!weatherData && !error) getWeatherData(loca...
Markdown
UTF-8
12,287
2.65625
3
[]
no_license
--- title: "问卷介绍-有关用户对抖音软件的满意度调查" date: 2019-11-08 09:09:20 tags: [毕业问卷, 问卷设计, 问卷互填, 问卷大全, 问卷收集] --- ### 问卷指导语 亲爱的同学,您好!目前我们正在进行抖音短视频对抖音用户生活影响的调查。为了解大学生对抖音短视频APP的使用情况,进而分析对用户生活产生的影响及短视频APP的发展前景,特开展此次调查问卷。本问卷采用匿名方式,所有数据只用于统计分析,请放心填写。感谢您的协助与支持! 该问卷主要用于计量经济学、教育学、心理学、行为经济学、统计学专业的样本收集。 <!-- more --> ### 自我介绍 为了帮助毕业生和...
C#
UTF-8
1,666
3.40625
3
[]
no_license
using System; using System.Linq; using Chess.Core; using Chess.Core.Players; using Chess.Core.Enums; using Chess.Core.Pieces; namespace ChessConsole { class Program { static void Main(string[] args) { var game = new Game(); var playerOne = new HumanPlayer("PlayerOne", ...
Markdown
UTF-8
1,430
2.671875
3
[]
no_license
# Webpack 4. Полный курс 2020 На основании этого видео [![Основное видео](http://img.youtube.com/vi/eSaF8NXeNsA/0.jpg)](https://www.youtube.com/watch?v=eSaF8NXeNsA "Основное видео") ## Основные команды `npx webpack` - Собрать приложение `npm run dev` - Собрать в режиме разработки `npm run build` - Собрать в режиме ...
Python
UTF-8
1,349
2.953125
3
[]
no_license
# -*- coding: utf-8 -*- ## cscrub.py ################################################################### ## scrubs characters from text files so bookr ################################## ## displays things properly #################################################### #####################################################...
Java
UTF-8
7,584
1.859375
2
[]
no_license
package com.flea.modules.report.action; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEnco...