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
Markdown
UTF-8
1,726
2.84375
3
[]
no_license
# Lessons learnt from Sprint 2: 1-3 December 2015 - updated the other 2 team members of what we have done on the first sprint. - We looked at the age and gender use case. - We learned to install the iptyhon notebook for caffe and use it to classify some images. - Installed DIGITS on the das super, DIGITS is t...
C++
UTF-8
1,360
2.578125
3
[]
no_license
#ifndef __domFx_sampler3D_h__ #define __domFx_sampler3D_h__ #include <dae/daeDocument.h> #include <dom/domTypes.h> #include <dom/domElements.h> #include <dom/domFx_sampler.h> class DAE; #include <dom/domFx_sampler.h> /** * A three-dimensional texture sampler. */ class domFx_sampler3D : public domFx_sampler { publi...
Java
UTF-8
3,042
2.375
2
[]
no_license
package finance.android6.barmaglot.ru.examplesqlite; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.B...
Python
UTF-8
679
3.09375
3
[]
no_license
from matplotlib.collections import PatchCollection from matplotlib.patches import Polygon, Rectangle import numpy as np def get_poly_collection(objects, time): ''' Convert a set of objects into polygons for rendering ''' patches = [] for o in objects: patches.append(Polygon(o.get_points(tim...
Ruby
UTF-8
2,011
2.53125
3
[]
no_license
require 'docsplit' class Document < ActiveRecord::Base ROOT_LOCATION = '/uploads/docs' after_save :do_migration before_destroy :do_cleanup validates :path, :presence => true validates :name, :presence => true def uploaded_to_s3? self.uploaded_to_s3 end def processed? self.processed e...
Markdown
UTF-8
739
3
3
[]
no_license
# Scrimba 7 day CSS Challenge ## Table of Contents - [Scrimba 7 day CSS Challenge](#scrimba-7-day-css-challenge) - [Table of Contents](#table-of-contents) - [Challenge 01](#challenge-01) - [Challenge 02](#challenge-02) ## Challenge 01 - [Challenge 1 - Improve This Website(Demo)](https://abuna1985.github.io/sc...
JavaScript
UTF-8
1,013
3.078125
3
[]
no_license
// window.onload = function () { // function formData() { // if (typeof (Storage) !== "undefined") { // localStorage.nombre = document.getElementById("name").value; // localStorage.email = document.getElementById("mail").value; // localStorage.telefono = document.getEle...
Java
UTF-8
4,592
2.546875
3
[ "MIT" ]
permissive
package com.github.shyiko.ktlint.idea; import com.esotericsoftware.wildcard.Paths; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class Main { private Main() {} private static void writeToFile(File file, String content)...
Java
UTF-8
2,594
2.359375
2
[]
no_license
package pruebas; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.Query; import javax.servlet.ServletException; import javax.servlet.http....
C#
UTF-8
1,071
3.109375
3
[]
no_license
using System; using System.Collections.Generic; namespace MyGame { public class CollisionManager { List<Tower> _towers; List<Enemy> _enemies; List<GameObject> _gameObjects; Currency _currency; public CollisionManager (List<Tower> towers, List<Enemy> enemies, List<GameObject> gameObjects, Currency cur...
JavaScript
UTF-8
461
3.6875
4
[]
no_license
const events = require('events'); class Person extends events.EventEmitter{ constructor(name){ super(); this.name = name; } } let james = new Person('james'); let mary = new Person('mary'); let ruy = new Person('ruy'); let people = [james, mary, ruy]; people.forEach(person =...
C++
UTF-8
391
2.890625
3
[]
no_license
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int N,A,B,C; cin>>N>>A>>B>>C; int sol=0; for(int i=0;i<=A;i++) { for(int j=0;j<=B;j++) { int c = N-i-j; if(c >=0) { if(c <= C) sol+=c+1; // as zero is include if(c > C) ...
C++
UTF-8
850
2.765625
3
[]
no_license
class Solution { public: vector<string> letterCombinations(string digits) { string mapping[10] ={"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; queue<string>q; vector<string>v; if(digits.empty()) return v; string str; int cnt=0; q.push(s...
Shell
UTF-8
3,228
2.96875
3
[]
no_license
ok 1 - setup ok 2 - verify initial notes (x) ok 3 - fail to merge empty notes ref into empty notes ref (z => y) ok 4 - fail to merge into various non-notes refs ok 5 - fail to merge various non-note-trees not ok - 6 merge notes into empty notes ref (x => y) # # git config core.notesRef refs/notes/y && # git notes me...
JavaScript
UTF-8
12,927
2.875
3
[]
no_license
/* * This file handles most of the data calls and organization for the app. It also handles most of the * button functionality for the app. The app makes requests for information from the NPS (national parks * service) and TrailApi APIs to find and display park and trail locations, descriptions and weather * condit...
C++
UTF-8
1,286
2.8125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int N, K; vector<int> num; vector<int>::iterator iter; vector<long long> sol; void init() { string input; cin >> N >> K >> input; int len = input.length(); if(!num.empty()) num.clear(); for (int i = 0; i < len; i++)...
TypeScript
UTF-8
867
3.703125
4
[ "MIT" ]
permissive
import { BinaryHeap } from './heap'; export class MaxHeap<T> extends BinaryHeap<T> { /** * Checks if pair of heap elements is in correct order. * For MinHeap the first element must be always smaller or equal. * For MaxHeap the first element must be always bigger or equal. * * @param {*} firstElement ...
Java
GB18030
1,819
2.15625
2
[]
no_license
package ims.subjectTree.dao; import ims.subjectTree.model.NetWordTree; import java.util.List; import org.apache.ibatis.annotations.Param; public interface NetWordTreeMapper { // ------------------------------- dd------------------------------------------------- // غ̨ҵнڵб List<NetWordTree> loadAllNetWordT...
Markdown
UTF-8
898
2.59375
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
# Analysis Server Benchmarks ## How to run the benchmarks To see a list of all available benchmarks, run: ``` dart benchmark/benchmarks.dart list ``` To run an individual benchmark, run: ``` dart benchmark/benchmarks.dart run <benchmark-id> ``` ## How they're tested In order to make sure that our benchmarks don'...
Ruby
UTF-8
3,144
2.53125
3
[]
no_license
# Manages interfaces for sending and receiving of battle information. class BattlesController < ApplicationController # Allows androids to post actions for battles. def update success = true @update = params[:battle] if @update['id'].present? @character = Character.find(@update['id']) elsif c...
Python
UTF-8
296
3.46875
3
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 28 23:15:56 2019 @author: root """ #%% def problem1_5(age): if age < 7: print("Have a glass of milk.") elif (age > 7) & (age < 21): print("Have a coke.") else: print("Have a martini.") #%%
C
UTF-8
640
3.796875
4
[]
no_license
/* ** EPITECH PROJECT, 2018 ** my_sort_word_array ** File description: ** Function that sorts the words received using ascii order */ #include "my.h" int sizeof_2d(char **str) { int count = 0; int i = 0; while(str[i] != NULL) { count ++; i++; } return (count); } int my_sort_word_...
Python
UTF-8
964
3.609375
4
[]
no_license
#import scikit and specify the module we want to import from sklearn import tree #clf as Decision Tree clf = tree.DecisionTreeClassifier() #X is a list of lists (a text string) #[Sepal.Length, Sepal.Width, Petal.Length,Petal.Width] X = [[5.1, 3.5, 1.4, 0.2], [4.9,3,1.4,0.2], [4.7,3.2,1.3,0.2],[4.6,3.1,1.5,0.2],[5,3....
Java
UTF-8
1,152
2.171875
2
[]
no_license
package com.aionemu.gameserver.network.aion.clientpackets; import com.aionemu.gameserver.model.gameobjects.Summon; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.model.summons.SummonMode; import com.aionemu.gameserver.model.summons.UnsummonType; import com.aionemu.gameserv...
Go
UTF-8
2,571
2.890625
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2019-present Open Networking Foundation * * SPDX-License-Identifier: Apache-2.0 */ /* Package logger implements utilities to instantiate and manipulate a new logger */ package logger import ( "fmt" "io" "os" "path" "runtime" "strings" "time" "github.com/sirupsen/logrus" ) var ( //logger ...
Python
UTF-8
2,394
3.234375
3
[]
no_license
#!/usr/bin/python3 #======================================================================# # HOST SCANNER FOR LOGIN ACCOUNTS (c) 2016 P. S. Clarke # #======================================================================# # This is a somewhat crude scanning tool that examines the user # accounts on a ...
Java
UTF-8
1,148
2.484375
2
[]
no_license
package com.filter; import javax.servlet.*; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; //触发过滤器的url正则格式就是以下三种:addServlet、logoutServlet、doneServlet @WebFilter(filterName = "the_Filter",urlPatterns = {...
Markdown
UTF-8
2,679
2.859375
3
[]
no_license
# Terraform script to setup the following tasks by using terraform remote backend: 1.Setup a lambda that gets triggered on file upload to the the s3 bucket 2.The lambda should read the uploaded CSV file(column names/data can be of your choice) and store it’s content in to DynamoDB table 3.Create an Authenticated(t...
TypeScript
UTF-8
964
2.9375
3
[]
no_license
//ALIASES export type TLessonDates = { date: string, studentName: string, timeStart: string, timeFinish: string}[] export type TLessonDate = { date: string, studentName: string, timeStart: string, timeFinish: string} export type TCurrentDate = { nowDate: Date, pastDate: Date } //RootState export interface IScheduleSta...
Markdown
UTF-8
3,745
3.140625
3
[ "MIT" ]
permissive
--- layout: post title: Faster AUM computation? description: Log-linear C++ STL containers vs linear time radix sort --- To support our paper about gradient-based optimization of the Area Under the Minimum (AUM) of the False Positives and Negatives, I recently wrote [some C++ code](https://github.com/tdhock/aum/blob/m...
SQL
UTF-8
4,035
3.5625
4
[]
no_license
create database MetCar; use MetCar; create table CUSTOMER ( cust_id integer(4), first_name varchar(10), last_name varchar(10), street varchar(50), city varchar(10), zip integer(9), work_phone varchar(15), day_phone varchar(15), constraint primary key (cust_id) ); create table CAR ( licence_no varchar(10...
Java
UTF-8
711
3.015625
3
[]
no_license
package Ejercicio2; public abstract class vehiculo { // atributos de clase private static int vehiculosCreados = 0; private static int kilometrosTotales = 0; // atributos de instancia private int kilometrosRecorridos; public vehiculo() { this.kilometrosRecorridos = 0; } public vehi...
C
UTF-8
324
3.375
3
[]
no_license
#include <stdio.h> void hanoi(int num, int start, int dest, int empty) { if(num > 0) { hanoi(num - 1, start, empty, dest); printf("%d->%d\n", start, dest); hanoi(num - 1, empty,dest, start); } } int main(void) { int num; while(scanf("%d", &num) == 1) { hanoi(num, 1,3,2); printf("\n"); } return 0...
Java
UTF-8
3,154
2.0625
2
[]
no_license
package org.multiverse.stms.alpha.transactions.update; import org.junit.Before; import org.junit.Test; import org.multiverse.stms.alpha.AlphaStm; import org.multiverse.stms.alpha.AlphaStmConfig; import org.multiverse.stms.alpha.manualinstrumentation.ManualRef; import org.multiverse.stms.alpha.manualinstrumentation.Man...
C
UTF-8
539
2.96875
3
[]
no_license
#include<stdio.h> int main() { int n,unknown,found=0; scanf("%d",&n); int mat[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ scanf("%d",&mat[i][j]); } } scanf("%d",&unknown); int i = 0; int j = n-1; while(i<n && j>=0){ if(mat[i][j]==unknown){ ...
Markdown
UTF-8
1,548
3.234375
3
[]
no_license
# moving in the Vim command line I have often found myself: * with the Vim command line open (which you do by typing `:` in normal mode) * with a pretty long command open (maybe summoned from the history by typing the `Up` arrow a couple of times) * wishing I could quickly move to the beginning of the line or one word...
Markdown
UTF-8
5,003
3.078125
3
[ "MIT" ]
permissive
--- layout: post-right-sidebar title: "Comment garantir l'authenticité des données sur une Blockchain ?" description: "Les Blockchains permettent de stocker des données, garantir leur intégrité et leur immuabilité; celles-ci ne peuvent pas être modifiées. Cependant, rien ne garantit que les données inscrites sur une B...
Markdown
UTF-8
4,383
3.34375
3
[ "Apache-2.0" ]
permissive
# PhoneGap Build CLI [![Build Status][travis-ci-img]][travis-ci-url] > PhoneGap Build command-line interface and node.js library. ## Getting Started on the Command-line (CLI) ### CLI: Install $ sudo npm install -g phonegap-build ### CLI: Usage Usage: phonegap-build [options] [commands] Synopsis: ...
Java
UTF-8
471
1.9375
2
[]
no_license
package com.CovidHygiene.service.user; import com.CovidHygiene.entity.Temperature; import com.CovidHygiene.repository.user.TemperatureRepository; import com.CovidHygiene.service.IService; import java.util.Set; public interface TemperatureService extends IService<Temperature, Double>, TemperatureRepository { Set<...
TypeScript
UTF-8
1,394
2.6875
3
[ "MIT" ]
permissive
import * as Symbols from "../compiler/symbols"; import { ICompletionContext } from "./completionContext"; import { isInsideString } from "./isIn"; export function pushStringCompletions( ctx: ICompletionContext, strings: string[], completions: monaco.languages.CompletionItem[], ): monaco.languages.Completio...
Java
UTF-8
717
3.015625
3
[]
no_license
/** * Description: * <br/>網站: <a href="http://www.crazyit.org">瘋狂Java聯盟</a> * <br/>Copyright (C), 2001-2016, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class RuntimeTest { public static vo...
Markdown
UTF-8
1,137
2.53125
3
[ "MIT" ]
permissive
# Description The `SqlServerProtocolTcpIp` DSC resource manage the TCP/IP protocol IP address groups for a SQL Server instance. IP Address groups are added depending on available network cards, see [Adding or Removing IP Addresses](https://docs.microsoft.com/en-us/sql/tools/configuration-manager/tcp-ip-properties-ip-...
Shell
UTF-8
696
3.21875
3
[]
no_license
#!/bin/bash set -e -x export GOPATH=$PWD/gopath export PATH=$PWD/gopath/bin:$PATH git config --global user.email "concourseteam+concourse-github-bot@gmail.com" git config --global user.name "Concourse Bot" pushd docs if [ -e .git ] && git remote | grep origin >/dev/null; then # undo single-branch clone and fe...
Java
UTF-8
1,611
1.914063
2
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
/* # # Copyright 2013 The Trustees of Indiana University # # 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 applic...
Go
UTF-8
5,174
2.671875
3
[ "Apache-2.0" ]
permissive
package protocol import ( "fmt" "testing" ) func NewClientInfo() *ClientInfo { return &ClientInfo{ ClientID: "Here's ID", ServiceType: "Here's Type", AdditionalInfo: map[string]string{"AD": "Here's AdditionalInfo"}, } } func NewServerInfo(s string, i uint) *ServerInfo { return &ServerInfo{ Serv...
PHP
UTF-8
5,026
3.375
3
[]
no_license
<?php include "database.php"; // Calculates the cardID given the dictionary of card info function getCardID($card) { $cardPos = $card["Weight"]; if ($card["Value"] == "J") { $cardPos = 11; } else if ($card["Value"] == "Q") { $cardPos = 12; } else if ($card["Value"] == "K") { ...
C++
UTF-8
1,742
3.125
3
[]
no_license
// Fonction récupérant la température depuis le DS18B20 // Retourne true si tout va bien, ou false en cas d'erreur boolean getTemperature(float *temp) { byte data[9], addr[8]; // data : Données lues depuis le scratchpad // addr : adresse du module 1-Wire détecté if (!ds.search(addr)) { // Recherche un mo...
Java
UTF-8
451
2.171875
2
[]
no_license
package com.maniac.luis.series.utilidades; import java.util.Hashtable; /** * Created by Luis on 21/03/2018. */ public class ListaNumerosAgendaTelefonos { private static Hashtable<String,String> contactos; public static Hashtable<String, String> getContactos() { return contactos; } public ...
Java
UTF-8
11,286
2.453125
2
[]
no_license
package kr.co.nao.dao; import java.sql.Connection; import java.sql.Date; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; public class ScheduleDAO extends CommonDAO { public ArrayList<Map<String, Object>> getAllSchedule(int pag...
Java
UTF-8
7,915
2.03125
2
[]
no_license
package study.metric; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.designroleminer.visitor.ClassVisitorMetric; import org.designroleminer.visitor.MethodVisitorMetric; import org.repodriller.RepoDriller; import org.repodriller.RepositoryMining; import org.repodriller.Study; im...
Markdown
UTF-8
398
3.375
3
[]
no_license
#### 概念: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分为**单向加密**和**双向加密** + **单向加密**:加密后的密文是不可逆的。(MD5,bcrypt) + **双向机密**:加密后的密文是可逆的。又分为对称加密和非对称机密。 + 对称加密:加密和解密都是用同一个秘钥。(DES) + 非对称加密:加密用公钥,解密用私钥。(RSA)
Java
UTF-8
3,767
2.109375
2
[]
no_license
package com.rofour.baseball.controller.model.manager; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.rofour.baseball.common.CustomJsonDateDeserializer; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @ClassName: MonitorInfo * @Description: 监控项传输实体 * @...
Markdown
UTF-8
2,796
2.71875
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 轮廓渲染 description: 介绍了如何执行选定项轮廓渲染 author: florianborn71 ms.author: flborn ms.date: 02/11/2020 ms.topic: article ms.custom: devx-track-csharp ms.openlocfilehash: a3b4ba62072e26f16a0e39416c9ae346d1acefd9 ms.sourcegitcommit: 419cf179f9597936378ed5098ef77437dbf16295 ms.translationtype: MT ms.contentlocale: zh-CN ...
Python
UTF-8
1,131
3.6875
4
[]
no_license
# Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array # such that nums[i] = nums[j] and the absolute difference between i and j is at most k. class Solution(object): # O(N) time and O(N) space def containsNearbyDuplicate(self, nums, k): """...
Markdown
UTF-8
3,282
3.578125
4
[]
no_license
#Lesson 1.02: Interactive Mode ##Learning Objectives Students will be able to... * Define and identify: **interpreter, string, integer, float, value, errors, console, expression** * Use the Python interpreter to evaluate simple math expressions * Distinguish between an integer, float, and string ##Materials/Preparat...
Go
UTF-8
497
2.78125
3
[]
no_license
package util import ( "encoding/json" "github.com/gin-gonic/gin" ) type HttpResponse struct { Success bool ErrorCode int ErrorMessage string Payload interface{} } func (r *HttpResponse) SuccessResponse(context *gin.Context) { r.Success = true jsonBytes, _ := json.Marshal(r) context.String(200, ...
Python
UTF-8
771
3.390625
3
[]
no_license
import sys import lister import nltk import random import tagging from nltk.tokenize import word_tokenize name = input("What would you like to enter? Enter: \n\"0 x \" for an Animal, \n\"1 x \" for a Place, or \n\"2 x \" for an Occupation, replacing x with your prompt. \n>") inputPair = word_tokenize(name) #Check t...
Java
UTF-8
855
2.234375
2
[]
no_license
package friendList.Bean; import javafx.scene.image.ImageView; public class Friend { private String fUserNumber; private ImageView fPhoto; private String fNickname; private String fonline; public String getFonline() { return fonline; } public void setFonline(Stri...
Rust
UTF-8
504
2.71875
3
[]
no_license
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug)] pub enum KVRequest { Get { key: String }, Set { key: String, val: String }, Rm { key: String }, } #[derive(Serialize, Deserialize, Debug)] pub enum KVResponse { Ok(Option<String>), Err(String), } #[derive(Serialize, Des...
Java
UTF-8
3,950
2.265625
2
[ "Apache-2.0" ]
permissive
/** * Apache Licence Version 2.0 * Please read the LICENCE file */ package org.hypothesis.ui; import com.vaadin.ui.*; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; import com.vaadin.ui.themes.ValoTheme; import org.hypothesis.interfaces.Command; import org.hypothesis.interfaces.P...
Markdown
UTF-8
512
2.90625
3
[]
no_license
## A tutorial app from https://www.taniarascia.com/getting-started-with-vue/ Feel free to visit her tutorials, they are amazing! ### Description As I have started working as a QA Manual Tester, I am trying to learn more about unit/integration testing, and so, I wanted to follow a tutorial app like this one, just to ...
Python
UTF-8
371
3.375
3
[]
no_license
r1 = 100 r2 = 10 t = 0 def setup(): size(600,600) def draw(): global t background(200) translate(width/4,height/2) noFill() stroke(0) ellipse(0,0,2*r1,2*r1) fill(255,0,0) y = r1*sin(t) x = r1*cos(t) ellipse(x,y,r2,r2) stroke(0,255,0) line(x,y,200,y) fill(0,255,0...
Python
UTF-8
6,781
4.28125
4
[]
no_license
#What is a Collection? """A collection is nice because we can put more than one value in them and carry them around in one convenient package. We have a bunch of values in a single "variable" We do this by having more than one place "in" the variable We have ways of finding the different places in the variable What's...
Markdown
UTF-8
2,892
2.515625
3
[]
no_license
# m3u8-downloader download tools for m3u8 media **功能:** 目前(2019年11月)很多在线视频网站都使用 m3u8 方式播放视频,m3u8 文件是一个索引文件, 网页播放器解析m3u8 来下载 ts 文件播放。由于 ts 文件体积小、数量大,逐个下载不方便,于是产生编写下载脚本的想法。 **特点:** 0. 根据 m3u8 文件,自动下载所有 ts 文件,最后合并成一个 ts 文件 1. 支持多线程下载(默认设置线程池数:32 ) 2. 支持断点续传(其实就是重复执行时,跳过已下载的文件) 3. 支持进度条显示(让下载过程有个盼头...
C++
UTF-8
1,477
2.9375
3
[]
no_license
#include <cassert> #include <string> #include <vector> #include <unordered_set> using namespace std; hash<string> hashing; bool is_unique(vector<vector<string>>& relation, int columns) { unordered_set<int> set; for (vector<string>& record : relation) { int tmp = 0; for (size_t i = 0; i...
Java
UTF-8
25,172
2.125
2
[ "MIT" ]
permissive
package org.ubgamelab.computergraphics.ProjectAkhirGK; import org.lwjgl.BufferUtils; import org.lwjgl.input.Keyboard; import org.lwjgl.util.glu.Cylinder; import org.ubgamelab.computergraphics.util.CGApplication; import org.ubgamelab.computergraphics.util.Camera; import org.ubgamelab.computergraphics.util.Texture; imp...
Java
UTF-8
250
1.960938
2
[ "Apache-2.0" ]
permissive
package com.shuang.meiZhi.event; import android.view.View; /** * @author feng * @Description: 设配器数据的点击事件 * @date 2017/3/30 */ public interface OnTouchEventClickListener<T> { void onEventClick(T object, View... views); }
Java
UTF-8
854
2.28125
2
[]
no_license
package pt.adentis.gerador.dao; import java.util.List; import org.hibernate.Criteria; import org.hibernate.SessionFactory; import org.springframework.transaction.annotation.Transactional; import pt.adentis.gerador.model.TipoContrato; public class TipoContratoDAOImpl implements TipoContratoDAO { priva...
Java
UTF-8
1,037
2.546875
3
[]
no_license
package br.com.tecnow.models; import java.util.Date; import org.springframework.format.annotation.DateTimeFormat; /** * Atributos e getters & setters dos jogos * @author Camila * */ public class Jogo { //Atributos private Long id; private String nome; private Categoria categoria; private Date dataCada...
Python
UTF-8
685
2.96875
3
[]
no_license
class Solution: def numMovesStonesII(self, stones: List[int]) -> List[int]: N=len(stones) stones.sort() # find the max move_to_right=(stones[N-1]-stones[1]-1)-(N-3) move_to_left=(stones[N-2]-stones[0]-1)-(N-3) high=max(move_to_left, move_to_right) low=float('i...
C++
UTF-8
113
2.65625
3
[]
no_license
#include<stdio.h> void f(const int *); int main() { int y; f(&y); } void f(const int *xPtr) { *xPtr=100; }
Markdown
UTF-8
1,293
3.171875
3
[]
no_license
--- partial: _inline.html title: Calling the API anchor: calling-the-api js: | OptimizelyAPI.prototype.call = function(type, endpoint, data, callback) { var self = this; var options = { url: "https://www.optimizelyapis.com/experiment/v1/" + endpoint, type: type, headers: {"Token": this.tok...
Markdown
UTF-8
853
3.5
4
[]
no_license
# hangman this is a game, where the user (user-input) tries to guess a randomly (random module) initialized word with a character range of 7 -10 (nltk). The user can guess 8 times, until the hangman gets hanged and the player loses (else-if). The characters he guesses right will be displayed on the word (like so: _ _ ...
Markdown
UTF-8
473
2.609375
3
[ "MIT", "CC-BY-4.0" ]
permissive
# bazel > Open-source build and test tool similar to Make, Maven, and Gradle. > More information: <https://bazel.build/reference/command-line-reference>. - Build the specified target in the workspace: `bazel build {{target}}` - Remove output files and stop the server if running: `bazel clean` - Stop the bazel ser...
Markdown
UTF-8
12,829
3.625
4
[]
no_license
--- title: 数据结构与算法(C++)代码练习(树) url: 153.html id: 153 categories: - 算法 date: 2018-03-10 22:23:45 tags: --- _所有代码均由Microsoft Visual Studio 2015编译通过_       #### 递归法实现二叉树的三种遍历 ```c++   #include<iostream> #include<iomanip> using namespace std; class treeNode { public: int data; treeNode* left; treeNode* ri...
Python
UTF-8
1,018
3.21875
3
[]
no_license
# -*- coding: utf-8 -*- # author: THUZLB # GitHub: https://github.com/THUZLB class Solution: def convert(self, s: str, numRows: int) -> str: sLen = len(s) if numRows >= sLen or numRows == 1: return s modulo = 2 * numRows - 2 result = [] for i in range(numRows): ...
Markdown
UTF-8
535
2.875
3
[]
no_license
# Ceng206 Project Department Course Schedule Program Programming Languages Course Project as a team Automatic Course Planner for a Curriculum Semester of a Department • The program assigns a classroom and a time for each course in a department. • The program takes courses and their special conditions and takes class...
Python
UTF-8
3,078
3.703125
4
[]
no_license
#Pizza Panic #玩家必须在披萨掉到地上之前把他们接住 #首先引入games,color模块并初始化图形屏幕 from livewires import games, color #random模块可以让疯厨子做决定时更逼真 import random #games的init()以便初始化屏幕并产生mouse对象 games.init(screen_width = 640, screen_height = 480, fps = 50) #Pan类 #加载平底锅图片 class Pan(games.Sprite): """ A pan controlled by player to catch fall...
Java
UTF-8
2,004
2.78125
3
[]
no_license
package com.wjs.loadphoto; import android.content.Context; import android.os.Environment; import java.io.File; /** * @author 王家胜 */ public class SDCardUtils { /** * 判断sdcard是否挂载 * @return bool */ public static boolean isSDCardMounted() { String string = Environment.getExternalStorageState(); if(Envir...
JavaScript
UTF-8
2,934
2.546875
3
[]
no_license
import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { StyleSheet, TextInput, View ,Text, TouchableOpacity, ScrollView} from 'react-native'; import Title from './assets/title.svg'; import Del from './assets/delete.svg'; import Submit from './assets/upload.svg'; export default class App extend...
Java
UTF-8
2,696
1.804688
2
[]
no_license
package com.reddit.frontpage.presentation.search; import com.reddit.common.rx.PostExecutionThread; import com.reddit.frontpage.domain.common.ResourceProvider; import com.reddit.frontpage.domain.repository.SearchRepository; import com.reddit.frontpage.presentation.analytics.SearchAnalytics; import com.reddit.frontpage....
C
UTF-8
628
3.90625
4
[]
no_license
#include <stdio.h> #include <conio.h> void main(){ int a =5, b=6 , c=7; printf("int a=5, b=6,c=7\n"); printf("The value of a >b is \t%i\n\n", a >b); printf("The value of a <b is \t%i\n\n", a <b); printf("The value of a +b>=c is \t%i\n\n", a+b>=c); printf("The value of a -b<=b-c is \t%i\n\n", a -b<=b-c); ...
Java
UTF-8
1,842
2.328125
2
[]
no_license
package com.jujie.bqwhg.model.service; import java.util.List; import com.jujie.bqwhg.model.dao.QwllDAO; import com.jujie.bqwhg.model.utils.Page; import com.jujie.bqwhg.struts.bean.Qwll; import com.jujie.bqwhg.struts.bean.SysUser; public class QwllService { private QwllDAO qwllDAOServ; public v...
C++
WINDOWS-1251
2,623
3.03125
3
[]
no_license
#include <iostream> #include <iomanip> #include <stack> #include <queue> #include <deque> #include <list> typedef std::deque<int> Deque; typedef std::stack<int> Stack; typedef std::queue<int> Queue; typedef std::list<int> List; using namespace std; Stack& reverseStack(Stack); Queue& reverseQueue(Queue); Deque& rever...
Markdown
UTF-8
807
2.53125
3
[]
no_license
# Article 9 Si un candidat déclaré inapte souhaite saisir de son dossier le conseil médical, il remet sa demande à l'autorité médicale. Celle-ci assortit alors la fiche d'examen qu'elle adresse au conseil médical des éléments techniques nécessaires à l'étude du cas et transmet le dossier sans délai. Le conseil tient c...
Markdown
UTF-8
1,338
2.953125
3
[ "MIT" ]
permissive
# Anaconda development environment We strongly recommend to use [Anaconda](https://www.anaconda.com/) for your Python development. After downloading and installing Anaconda, you have to create a local working copy of the typhon repository: ```bash $ git clone https://github.com/atmtools/typhon.git # or your own fork...
Python
UTF-8
520
2.984375
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2021/2/23 16:19 # @Author : Lance # @Email : 670955423@qq.com # @File : save_money.py # @software: PyCharm # 已存金额 saved_money = 1000 # 发工资 def send_money(): global saved_money print("发工资啦!") saved_money = 2000 # 查询工资 def select_money(): ...
Rust
UTF-8
2,853
3.1875
3
[ "MIT" ]
permissive
extern crate regex; use super::transformation::Transformation; use self::regex::*; pub fn create_operations(entry: &str) -> Result<Vec<Transformation>, String> { let splitted: Vec<&str> = entry.split("+").collect(); let mut operations: Vec<Transformation> = Vec::new(); for entry in &splitted { mat...
Python
UTF-8
834
3.421875
3
[]
no_license
'''(60%)Create a program that receive as many sequences as the user wants and calculates the GC ratio of each sequence. It should displays the sequences in order of its GC ratio, with the G's and C's in upper case and the T's and A's in lower case and in front of the sequence the calculated GC ratio.Finally it should s...
Python
UTF-8
355
3.828125
4
[]
no_license
# -*- coding: utf-8 -*- """ Created on Tue Jun 30 11:57:49 2020 @author: PC-Home """ def multiplicacion(a,b): print("El resultado de la multiplicacion entre:,a, "y ",b,"es: ", a*b) print("\n") return(("El resultado de la multiplicacion entre:,a, "y ",b,"es: ", a*b)) print("\n") multimplicaci...
JavaScript
UTF-8
6,570
2.609375
3
[ "Apache-2.0" ]
permissive
enchant(); window.onload = function() { var game = new Game(320,480); //ゲーム準備、表示領域. var scale_h = window.innerHeight/480; var scale_w = window.innerWidth/320; if(scale_h >= scale_w){ game.scale = scale_w } else{ game.scale = scale_h } game.preload('./img/man2.png'); //ゲームに用いるリソース(画像)読み込み gam...
SQL
UTF-8
1,115
3.9375
4
[]
no_license
CREATE TABLE User ( username VARCHAR(20), password VARCHAR(20), firstname VARCHAR(20), lastname VARCHAR(20), email VARCHAR(40), PRIMARY KEY (username)); CREATE TABLE Photo ( picid VARCHAR(40), format CHAR(3), date DATETIME, url VARCHAR(255), PRIMARY KEY (picid), UNIQUE KEY (url) ); CREATE TABLE Album ( a...
Python
UTF-8
431
3.21875
3
[]
no_license
t=int(input()) for i in range(0,t): length=0 prifactor=[] n=int(input()) for k in range(2,n+1): if n%k==0: factor=k for j in range(2,factor): if factor%j==0: break else: ...
Java
UTF-8
4,283
2.78125
3
[]
no_license
package com.learn.redis.connect; import com.learn.redis.util.JedisPoolUtil; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author Cool * @create 2020-09-14 11:30 */ p...
Python
UTF-8
996
2.53125
3
[ "MIT" ]
permissive
import time from bs4 import BeautifulSoup import requests import os import sys def cacheIndex(do_once): if do_once: index = requests.get("http://distro.ibiblio.org/tinycorelinux/11.x/x86/tcz/") if(index.status_code != 200): print("ibiblio error!") return # Basically, use las...
Java
UTF-8
1,657
4.1875
4
[ "MIT" ]
permissive
package arraylist; /** * 268. Medium 丢失的数字 给定一个包含 [0, n] 中 n 个数的数组 nums ,找出 [0, n] 这个范围内没有出现在数组中的那个数。 进阶: 你能否实现线性时间复杂度、仅使用额外常数空间的算法解决此问题? */ public class MissingNumber268 { /** * 方法一 高斯求和 * 有溢出风险 * 时间复杂度 O(n) * 空间复杂度 O(1) * @param nums * @return */ publ...
PHP
UTF-8
1,502
2.9375
3
[]
no_license
<?php session_start(); class Captcha { var $width = '100'; var $height = '34'; var $num = '4'; public function __construct($conf='') { if($conf!='') { foreach ($conf as $key => $value) { $this->$key = $value; } } } public function show() { $w = $this->width; $h = $this...
Python
UTF-8
2,110
2.609375
3
[]
no_license
#------------------------------------------------------------------------------- # elftools: elf/elffile.py # # ELFFile - main class for accessing ELF files # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------------------------------- from elft...
C++
UTF-8
808
2.53125
3
[]
permissive
#ifndef CondCore_TagCollection_Exception_h #define CondCore_TagCollection_Exception_h #include "CondCore/DBCommon/interface/Exception.h" #include <string> namespace cond{ class nonExistentGlobalTagInventoryException : public Exception{ public: nonExistentGlobalTagInventoryException( const std::string& source ) ...
Markdown
UTF-8
1,053
2.796875
3
[ "MIT" ]
permissive
# Identity Server A mini identity server ## How it works ``` Service A IS -- (1)Authorization Request -> <- (2)Authorization Grant -- Token IS -- (3)Authorization Request -> to...