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
2,557
2.265625
2
[ "MIT" ]
permissive
package gui.testing; import com.codahale.metrics.CsvReporter; import common.metrics.Metric; import common.metrics.Metrics; import component.operator.Operator; import component.sink.Sink; import component.source.Source; import query.LiebreContext; import query.Query; import java.io.IOException; import java.net.InetSoc...
Markdown
UTF-8
1,241
2.671875
3
[]
no_license
This mongoose plugin allows for double-binding of array values in mongoose schema paths in a way that allows for dynamic population, which the normal path array structure does not. Example: old world: defining a key as an object array in a mongoose scheam like so: var model = Mongoose.model('members', { ...
C#
UTF-8
2,123
3.21875
3
[]
no_license
using System; using System.Collections.Generic; namespace Gabriel.MenuExample { class Program { static void Main(string[] args) { var listTc = InitData(); var depHelper = new DepartmentHelper(listTc); var tempList = depHelper.CreatMenu(); foreach...
PHP
UTF-8
918
2.6875
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use App\Models\Multiuser; class CreateMultiusersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Sc...
Markdown
UTF-8
1,398
2.96875
3
[]
no_license
# Spacex A SpaceX Launch Explorer The goal of this assignment is to build a SpaceX Launch Explorer in React Native. Android is used as an emulator. <img width="282" alt="androidspacex" src="https://user-images.githubusercontent.com/56556859/107212801-596cc200-69bc-11eb-8933-265346732efa.png"> ## SetUp Instructions...
Markdown
UTF-8
1,164
4
4
[ "MIT" ]
permissive
# Daily notes So after I finished part 2, I was looking at other people's solutions and this one stuck out for me given it was so simple. This is Haskell ```haskell fuel = subtract 2 . (`div` 3) part1 = sum . map fuel part2 = sum . map (sum . tail . takeWhile (>= 0) . iterate fuel) ``` The main point that I was thi...
C
UTF-8
9,640
2.546875
3
[ "MIT", "Apache-2.0" ]
permissive
// Copyright 2015 Juan Luis Álvarez Martínez // // 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 applicabl...
Java
UTF-8
10,043
1.898438
2
[ "MIT" ]
permissive
/* * Yahoo!広告 検索広告 API リファレンス / Yahoo! JAPAN Ads Search Ads API Reference * <div lang=\"ja\">Yahoo!広告 検索広告 APIのWebサービスについて説明します。</div> <div lang=\"en\">Search Ads API Web Services supported in Yahoo! JAPAN Ads API.</div> <div><a target=\"_blank\" href=\"https://github.com/yahoojp-marketing/ads-search-api-documents/bl...
JavaScript
UTF-8
1,502
2.59375
3
[]
no_license
// third party library import http from 'axios'; // actionType import { VIEW_PROCESSING, VIEW_SUCCESS, VIEW_FAILURE, VIEW_ERROR_CLEARED, } from '../action_types/viewEntry'; /** * @param {object} data * @desc checking create loading * @returns {object} type */ export function viewPosting(data) { return {...
Swift
UTF-8
1,762
3.0625
3
[]
no_license
// // LoginViewModel.swift // RecipiesRX // // Created by Yehia Samak on 24/06/2021. // import Foundation import RxSwift protocol LoginViewModelProtocol { var emailTextSubject: PublishSubject<String> {get} var passwordTextSubject: PublishSubject<String> {get} var title: String {get} func isValid() ...
Shell
UTF-8
4,791
2.984375
3
[]
no_license
#!/bin/bash #Note users will require a github account and need to have virtualenv installed setup(){ mkdir ./Dropseq_Alignment_Cookbook cd Dropseq_Alignment_Cookbook wget http://mccarrolllab.com/download/1276/Drop-seq_tools-1.13-3.zip unzip Drop-seq_tools-1.13-3.zip mkdir temp_files wget https://ftp-trac...
C
UTF-8
287
3.484375
3
[]
no_license
#include "lists.h" /** * sum_listint - sum of list * @head: head pointer * Return: sum of all int */ int sum_listint(listint_t *head) { int sum; listint_t *temp; temp = head; for (sum = 0, temp = head; temp != NULL; temp = temp->next) { sum += temp->n; } return (sum); }
C++
UTF-8
3,848
3.203125
3
[]
no_license
#include <iostream> #include <stdio.h> ///STRUCT CON FOPEN using namespace std; struct alumno{ char nombre[100], licenciatura[100]; int saldo, matricula; }; struct alumno llena_alumno() { struct alumno a; cout<<"\n Nombre: "; cin>>a.nombre; cout<<"\n Saldo: "; cin>>a.saldo; cout<<"\n Licenciatura: "; cin>>a.licenci...
C++
UTF-8
2,651
2.609375
3
[]
no_license
#define HYSTERESIS 2 #define UPDATE_PERIOD 5000 //#define CALIBRATION_FACTOR 1 //#define CALIBRATION_OFFSET 0 #define POT_RANGE_LOW 200//150 #define POT_RANGE_HIGH 200//230 #define IO_COEFF 0.65F #define RELAY_PIN 13 #define THERMISTOR_PIN A0 #define POTENTIOMETER_PIN A1 #define NUMSAMPLES 5 #define SERIESRESISTOR 1000...
Markdown
UTF-8
7,188
2.578125
3
[ "MIT" ]
permissive
--- category: Components group: Data Entry title: Cascader cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*tokLTp73TsQAAAAAAAAAAAAADrJ8AQ/original coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*5-ArSLl5UBsAAAAAAAAAAAAADrJ8AQ/original demo: cols: 2 --- Cascade selection box. ## When ...
C++
UTF-8
955
3.25
3
[]
no_license
#include <iostream> #include <string> #include <queue> std::queue<int> Queue; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int N; std::cin >> N; for (int i = 0; i < N; i++) { std::string query; std::cin >> query; if (query == "push") { int number; std::cin ...
Java
UTF-8
999
2.09375
2
[]
no_license
package cz.orany.m20f; import io.micronaut.context.ApplicationContext; import io.micronaut.function.FunctionBean; import io.micronaut.function.executor.FunctionInitializer; import javax.inject.Inject; import java.util.function.Function; @FunctionBean(value = "mn-two-zero-function", method = "apply") public class MnT...
C++
UTF-8
83,653
2.578125
3
[]
no_license
#ifdef HAVE_CONFIG_H #include <config.hpp> #endif #include <complex> #include <fstream> #include <iostream> #include <vector> #include <Eigen/Dense> #include <valarray> #include <math.h> #include <chrono> #include <omp.h> using namespace std; using namespace Eigen; using namespace std::chrono; //coordinates in the l...
JavaScript
UTF-8
4,525
2.78125
3
[]
no_license
jQuery(function($){ /*** ANIMATION DU MENU ***/ /* Animation du menu via un ajout de classe aux balises HTML concernées. */ $('#menu_banner').click(function(){ $(this).toggleClass("active"); $('#menu_links').toggleClass("active"); }); /*** TRAITEMENT DES COMMENTAIRES ***/ /* Fonction p...
Go
UTF-8
971
3.328125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
package languagecode // Format represents a specific language code format with a specific // serialization. type Format int const ( // FormatAlpha3 is an ISO-639-2 language code. FormatAlpha3 Format = iota // FormatAlpha3B is an ISO-639-2/B language code. FormatAlpha3B // FormatAlpha2 is an ISO-639-1 language co...
C#
UTF-8
954
2.90625
3
[]
no_license
using BankCadwise.Models; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; namespace BankCadwise.Utils { class SerializePerson { XmlSerializer formatter = new XmlSerializer(typeof(List<Person>)); public void Serialize(Person person) { using...
Java
UTF-8
1,345
2.046875
2
[]
no_license
package project.hrms.entities.concretes; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.time.LocalDate; import java.util.Li...
Java
UTF-8
1,283
2.28125
2
[]
no_license
package com.example.loginapp.models.services; import com.example.loginapp.models.entities.UserEntity; import com.example.loginapp.models.forms.UserForm; import com.example.loginapp.models.mappers.UserFormToUserEntityMapper; import com.example.loginapp.models.repositories.UserRepository; import org.springframework.bean...
Python
UTF-8
748
3.4375
3
[]
no_license
import pylab import random def simulated_stock_prices(num_iterations): assert num_iterations > 0 prices = [] price = 0 for i in xrange(num_iterations): change_in_price = random.random() * 2 - 1 price += change_in_price prices.append(price) return prices def final_stock_pr...
C++
UTF-8
691
3.046875
3
[]
no_license
#include<iostream> #include<algorithm> #include<climits> using namespace std; int change(int arr[],int size,int &max,int mini) { int counter=0; for(int i=mini;i<size-1;i++) { swap(arr[i],arr[i+1]); counter++; } if(mini<max) { max--; } for(int i=max;i>0;i--) { swap(arr[i],arr[i-1]); counter++; } retu...
Python
UTF-8
4,058
2.859375
3
[]
no_license
from PIL import Image import numpy as np import matplotlib.pyplot as plt import random from random import randint def GenerateSearchField(length): # Generate the alphabetical characters of the search field Field = [] for i in range(0, length): Field.append(random.choice('TGAC')) return Fiel...
Java
UTF-8
650
3.53125
4
[]
no_license
//Timothy Hinds public class WeightConversion { public static void main(String[] args) { //The table header System.out.print("Kilograms\tPounds"); System.out.println(); //extra line printed so the numbers dont start on the table header line for(int i=1; i<200; i++) { System.out.println(i +"\t\t" + M...
Python
UTF-8
110
3.15625
3
[]
no_license
#this is a list l=['28','27','68','78','prathu'] for i in l: if i==27: print('yes') else : print('no')
Python
UTF-8
1,097
3.65625
4
[ "MIT" ]
permissive
# Advent of Code 2020 Day 9-2 # James Plante import sys import string import itertools SUM = 15690279 """ Computes wheter the subarray equals k in a brute-force way. Will change if the running time is slow enough. """ def array_sum_equals_k(num_list: list, k: int): for length in range(2, len(num_list) + 1): ...
JavaScript
UTF-8
3,030
3.3125
3
[]
no_license
let targetElm; let sensitivity; let clicked = false; let previousX = 0; let previousY = 0; let offsetX = 0; let offsetY = 0; let movedX = 0; let movedY = 0; let mouseLook = { setMouseLook: function(target, sens){ targetElm = target; sensitivity = sens; movedX = 0; ...
Python
UTF-8
493
3.578125
4
[]
no_license
import sys def sum_of_squares(natural_number): sum = 0 for i in range(0,natural_number): sum += (i + 1) ** 2 return sum def square_of_sum(natural_number): sum = 0 for n in range(0, natural_number): sum += n + 1 return sum **2 def difference(natural_number): diff = squar...
C#
UTF-8
12,314
2.875
3
[]
no_license
using System; using System.IO; using System.Security; using System.Threading; using System.Windows; using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.pdf.parser; namespace WpfApplication.Models.Main { /// <summary> /// /// </summary> internal class PdfFileClass : IDisposable { ...
C#
UTF-8
8,183
2.53125
3
[]
no_license
using System.Collections.Generic; using System.IO; using System.Linq; using System.Security; using UnityEngine; /// <summary> /// 加载Resources文件夹下的资源 /// </summary> public class ResourcesLoader : Singleton<ResourcesLoader>, IResource { public Dictionary<string, string> m_filesDic = new Dictionary<string, string>(...
Java
UTF-8
429
2.703125
3
[]
no_license
package testpack; public class Record { public int id; public String name; public boolean status; public int pr_id; public Record(int id, String name, boolean status, int pr_id) { this.id = id; this.name = name; this.status = status; this.pr_id = pr_id; } public String toString() { ...
PHP
UTF-8
1,478
3.09375
3
[]
no_license
<?php $monthList = [ 'january' => '1', 'february' => '2', 'march' => '3', 'april' => '4', 'may' => '5', 'june' => '6', 'july' => '7', 'august' => '8', 'september' => '9', 'october' => '10', 'november' => '11', 'december' => '12' ]; //date du jour courant $currentdate = ti...
Markdown
UTF-8
873
2.71875
3
[ "MIT" ]
permissive
# steven's dotfiles My workbench for writing software (and some stuff just for fun). ## Setup __If you fork or clone this repo, please change `~/.gitconfig` file so you don't commit as me:__ > Note: You probably don't want to do actually do this, but its here for you to browse if you'd like! :) ```sh cd ~ git init...
Python
UTF-8
1,637
2.6875
3
[]
no_license
from flask import Flask, render_template, request from werkzeug.utils import secure_filename import torch import torchvision from CNN_Model import model from torchvision import transforms from PIL import Image app = Flask(__name__) app.config["DEBUG"] = True cnn_model = model() cnn_model.load_state_dict(torch.load('...
Java
UTF-8
6,943
3.015625
3
[]
no_license
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; pub...
C++
UTF-8
1,620
2.5625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
// This is mul/ipts/ipts_orientation_pyramid.cxx #include "ipts_orientation_pyramid.h" //: // \file // \brief Compute edge orientations at each level of a scale space pyramid // \author Tim Cootes #include <vil/algo/vil_orientations.h> #include <vimt/vimt_image_2d_of.h> #include <cassert> #ifdef _MSC_VER # include "v...
JavaScript
UTF-8
1,734
2.640625
3
[ "MIT" ]
permissive
var GitterClient = require('./../lib/GitterClient'); var config = require('./../utils/config'); var noop = function() {}; var emptySubscriber = function() { return { send: noop, disconnect: noop }; }; var msgCall = function(msg) { return { model: { text: msg } } ;}; describe('GitterClient test', function() { before...
Python
UTF-8
827
4.03125
4
[]
no_license
# Smirnov Artem lesson 1 Dz 4 import random print('Ведите границы для случайного целого числа:') Num1 = int(input('Number 1 = ')) Num2 = int(input('Number 2 = ')) print('Ведите границы для случайного вещественного числа:') Mat1 = float(input('Material 1 = ')) Mat2 = float(input('Material 2 = ')) print('Ведите гран...
Markdown
UTF-8
4,202
3.921875
4
[]
no_license
# required修饰符 # 普通子类 通常情况下,一说到`required`修饰符,我们最先想到的应该就是普通类(class)的`init()`方法了。比如下面这个类: ``` class MyClass { var str:String init(str:String) { self.str = str } } ``` 当我们定义一个`MyClass`的子类(subclass)并实例化这个子类时,我们一般会如何做呢?没错,通常情况下都会是这样: ``` class MyClass { var str:String init(str:String)...
Java
UTF-8
107
1.84375
2
[]
no_license
package Utiles; public class Escudo extends Instrumentos{ public Escudo(){ super(); } }
Ruby
UTF-8
72
3.40625
3
[]
no_license
ary = [1, 3, 5, 7, 8, 9, 10] res = ary.bsearch {|x| x ==3} print res
Python
UTF-8
1,453
3.0625
3
[ "MIT" ]
permissive
import os, sys inf = 2**31 def all_pair_shortest_path(matrix, printing=None): n = len(matrix) p_cache = [[None] * n for i in range(n)] for mid in range(n): for start in range(n): for end in range(n): temp = matrix[start][mid] + matrix[mid][end] if temp < ...
Python
UTF-8
6,043
3.046875
3
[]
no_license
import os import numpy as np import urllib.request import cv2 NAMES = [ "Pizza in a box", "Pizza top view", "The bottom of the pizza top view", "Pizza bottom view at an angle", "Pizza sides view at an angle of 90", "Pizza sides view at an angle", "Cheque", "Pizza, view from a small ang...
Java
UTF-8
1,267
2.375
2
[]
no_license
package com.dsliusar.web.controller; import com.dsliusar.services.service.MovieService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframewo...
C#
UTF-8
1,519
2.65625
3
[]
no_license
using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using Vuforia; public class Tracking : MonoBehaviour { private bool isDone = false; public GameObject inbetweenPrefab; private GameObject clone; // Start is called before the first frame update void S...
JavaScript
UTF-8
1,807
3.609375
4
[]
no_license
// IMPORT MODULES under test here: // import { example } from '../example.js'; import { add, subtract, multiply, divide } from '../utilities.js'; const test = QUnit.test; test('time to test an add', (expect) => { //Arrange // Set up your arguments and expectations const x = 4; const y = 5; const su...
Markdown
UTF-8
12,938
2.515625
3
[]
no_license
--- layout: default Lastmod: 2020-07-27T15:11:20.515369+00:00 date: 2020-07-27T15:11:20.514860+00:00 title: "光绪皇帝容貌成谜,教科书里的大头照已删" author: "言九林" tags: [照片,光绪,光绪皇帝,故宫,慈禧] --- 说一说光绪皇帝的容貌问题。 在使用至2016年的旧人教版初中八年级(上册)历史教材中,收有一张大头像,号称是光绪皇帝。如下图所示: ![](https://images.weserv.nl/?url=https%3A//mmbiz.qpic.cn/mmbiz_png/ibYIE3gDV7...
Java
UTF-8
6,975
2.265625
2
[]
no_license
package com.chenxi.eventsbeltreviewer.controllers; import java.util.List; import javax.servlet.http.HttpSession; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.sp...
Java
UTF-8
2,746
3.328125
3
[]
no_license
package com.hummingbird.common.util; public class LuhnUtils { public static void main(String[] args) { // System.out.println(luhnTest("49927398716")); // System.out.println(luhnTest("49927398717")); //System.out.println(luhnTest("1234567812345678")); System.out.println("此银行卡合...
Markdown
UTF-8
9,107
3.03125
3
[]
no_license
# Dependency Injection Note: This article is actual as of v6.0.0. In this article: * [Container services](#container-services) * [Injectable factory](#injectable-factory) * [Binding](#binding) * [See also](#see-also) There are two classes repsonsibe for the dependency injection in EspoCRM: * Container – `Espo\Core...
Markdown
UTF-8
6,793
3.140625
3
[ "MIT" ]
permissive
--- layout: post title: Single Responsibility Principle categories: [OOP] tags: [SOLID] description: 객체 지향 설계 5원칙 - SRP fullview: false comments: true --- 객체의 4대 특성과 개념을 인지함으로써, 객체 지향 프로그램을 작성할 수 있는 도구를 얻었다. 하지만, 아무리 좋은 도구를 가지고 있다고 해도 올바르게 사용하지 않으면 없느니만 못하다. 도구가 올바르게 사용하는 법이 있는 것처럼, 객체 지향의 특성을 올바르게 사용하는 방법, 즉 객체 지향 언어...
Java
UTF-8
1,758
2.765625
3
[]
no_license
package ua.lviv.iot.lab9; import javax.persistence.*; @Entity @Table(name = "clothes") public class Clothes { public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; ...
Java
UTF-8
1,672
3.046875
3
[]
no_license
// -*- mode: Java; -*- package sanka.test; import sanka.lang.Object; class Globals { static int[] RESULTS; } abstract class EmptyBase {} class Adder extends EmptyBase { int base; Adder(base); int add(int value) { Globals.RESULTS.add(this.base + value); } } class Subtracter extends Empty...
Markdown
UTF-8
28,644
3.578125
4
[]
no_license
- [js 数据类型](#js-数据类型) - [为什么会有BigInt的提案?](#为什么会有bigint的提案) - [js 类型判断](#js-类型判断) - [typeOf](#typeof) - [Object.prototype.toString.call(\*\*\*)](#objectprototypetostringcall) - [instanceof](#instanceof) - [手写instanceof](#手写instanceof) - [判断数组的方式](#判断数组的方式) - [null和undefined区别](#null和undefined区别) - [0.1+0.2!=...
Markdown
UTF-8
2,716
3.21875
3
[ "MIT" ]
permissive
# Logging [TOC] ### Motivation The logging module, just like error-and-exception-util, is an infrastructure of the entire lib. This module offers you an uniform and succinct interface to log messages, in different severity level (e.g. `INFO`, `WARNING` etc.), to specified destination (`stderr` or a file). ### DLO...
Java
UTF-8
3,706
3.203125
3
[]
no_license
package net.avax.findunusedint; // From Programming Pearls, Second Edition, by Jon Bentley, Addison-Wesley, // Inc., 2000, ISBN 0-201-65788-0: // // Given a sequential file that contains at most four billion integers in // random order, find a 32-bit integer that isn't in the file (and there must // be at least one mi...
C
UTF-8
846
3.375
3
[ "MIT" ]
permissive
#include <stdlib.h> #include "d_array.h" array_t *array_new() { array_t *array = malloc(sizeof(array_t)); array->length = 0; array->free = NULL; array->capacity = DEFAULT_STARTING_CAPACITY; array->data = malloc(array->capacity * sizeof(void *)); return array; } void array_add(array_t *array, void *elem...
C++
UTF-8
2,998
2.890625
3
[]
no_license
//作者:邓智豪 #include "gene.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <algorithm> #include <time.h> Gene bestGene; void freeGene( Gene gene ){ free( gene.genes ); } void freePopulation( Population population ){ for( int i = population.populationSize - 1; i >= 0; --i ){ free( populatio...
Swift
UTF-8
2,295
2.734375
3
[]
no_license
// // Netdata.swift // cnbetazixun // // Created by 尤献利 on 16/1/13. // Copyright © 2016年 尤献利. All rights reserved. // //获取首页新闻 //https://cnbeta1.com/api/getArticles //获取更多新闻 //https://cnbeta1.com/api/getMoreArticles/{fromArticleID} {fromArticleID}是上次获取的最后一条新闻的ID //获取新闻详情 //https://cnbeta1.com/api/getArticleDetail/...
Markdown
UTF-8
44,327
3.0625
3
[]
no_license
# Kaggle_House_Prices_Analysis My R markdown for the Housing Prices Kaggle competition. --- title: "Housing_Competition" author: "Mitchell O'Brien" date: "July 27, 2018" output: html_document: keep_md: true --- ```{r setup, include=FALSE, cache=TRUE} knitr::opts_chunk$set(echo = TRUE) ``` #Introduction Ask ...
PHP
UTF-8
459
3.921875
4
[]
no_license
<?php //変数の宣言と表示(if文) // 変数を宣言し、その変数の中身によって以下の表示を行ってください。 // ⇒値が 1 なら「1です!」 // ⇒値が 2 なら「プログラミングキャンプ!」 // ⇒それ以外なら「その他です!」 $num1 = 1; if ($num1 == 1) { echo "1です!"; } elseif ($num1 == 2) { echo "プログラミングキャンプ!"; } else{ echo "その他です!"; } ?>
Python
UTF-8
113
2.8125
3
[]
no_license
class Icon(object): def __init__(self, surf, rect): self.surf = surf.copy() self.rect = rect
Java
UTF-8
638
2.546875
3
[]
no_license
package com.frank.hound.core.support; import com.frank.hound.core.common.Closeable; import lombok.NonNull; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; /** * @author frank */ public class HoundAutoCloser { private Set<Closeable> closerList = new LinkedHashSet<>(); public ...
Java
UTF-8
3,206
2.921875
3
[]
no_license
package ru.avalon.java.dev.j10.labs.models; import ru.avalon.java.dev.j10.labs.commons.Address; import java.time.LocalDate; /** * Представление о паспортных данных человека. * <p> * Паспортные данные должны включать: * <ol> * <li> серию и номер документа; * <li> имя; * <li> фамилию; * <li> отчество; * <li> ...
Python
UTF-8
1,160
3.359375
3
[]
no_license
# 210 class Solution: WHITE = 1 GRAY = 2 BLACK = 3 def findOrder(self, numCourses, prerequisites): """ :type numCourses: int :type prerequisites: List[List[int]] :rtype: List[int] """ graph = {} isCycle = False for i in range(numCourses)...
C
UTF-8
849
2.8125
3
[]
no_license
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
Java
UTF-8
311
1.78125
2
[]
no_license
package com.wqb.dao.customer; import com.wqb.common.BusinessException; import com.wqb.model.Customer; import java.util.List; public interface CustomerDao { Customer queryCusByAcc(String accountID) throws BusinessException; List<Customer> queryCusBath(List<String> list) throws BusinessException; }
Python
UTF-8
2,082
2.875
3
[]
no_license
import logging import requests import boto3 from botocore.exceptions import ClientError BUCKET_NAME = 'reactvang' def upload_file(file_name, object_name=None, bucket = BUCKET_NAME): """Upload a file to an S3 bucket :param file_name: File to upload :param bucket: Bucket to upload to :param object_nam...
SQL
UTF-8
1,517
3.015625
3
[]
no_license
SELECT * FROM mapssrs.dbo.reportlog order by id desc USE IRRISCENTRAL INSERT INTO rptReportMaster( ReportName, DisplayText, Description, ReportPath, CategoryID, DeletedYN, CreatedBY, CreatedDate) SELECT 'Orientation Survey','Orientation Survey','Survey Detail...
TypeScript
UTF-8
1,979
3.75
4
[]
no_license
// function identity<T>(arg:T):T { // return arg; // } // let output=identity<string>("myString"); // console.log(output); // let output1=identity("myString1"); // console.log(output1); // function loggingIdentity<T>(arg:T[]):T[]{ // console.log(arg.length); // return arg; // } // function loggingIdentit...
C#
UTF-8
869
3.5625
4
[]
no_license
using System; namespace Happy_index_VisualStudio { class Program { static void Main(string[] args) { Console.WriteLine("On a scale of zero to ten, how happy are you?"); int userInput = Convert.ToInt32(Console.ReadLine()); if (userInput == 0) ...
Markdown
UTF-8
1,317
2.671875
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 《译文》创刊号前记[677] --- 读者诸君:你们也许想得到,有人偶然得一点空工夫,偶然读点外国作品,偶然翻译了起来,偶然碰在一处,谈得高兴,偶然想在这“杂志年”里来加添一点热闹,终于偶然又偶然的找得了几个同志,找得了承印的书店,于是就产生了这一本小小的《译文》。 原料没有限制:从最古以至最近。门类也没固定:小说,戏剧,诗,论文,随笔,都要来一点。直接从原文译,或者间接重译:本来觉得都行。只有一个条件:全是“译文”。 文字之外,多加图画。也有和文字有关系的,意在助趣;也有和文字没有关系的,那就算是我们贡献给读者的一点小意思,复制的图画总比复制的文字多保留得一点原味。 并不敢自夸译...
C++
UTF-8
1,375
3.625
4
[]
no_license
// Created by Gabriel Batista Cristiano // TIA: 32090722 // Referencia: https://www.dobitaobyte.com.br/como-criar-arrays-dinamicos-em-c/ #include <iostream> using namespace std; int main() { int size, secondSize, input; char choice; cout << "Digite o tamanho do array: "; cin >> size; int* ar...
SQL
UHC
7,144
4.0625
4
[]
no_license
< > : ȣ , ο - Ŭ ͺ̽ ġϸ, ⺻ Ǵ SYS SYSTEM SCOTT ( : ) HR ( : ó , 11g ) - ͺ̽ : ڰ ͺ̽ ü(̺, ) Ư ְ . ټ ڰ ϴ ͺ̽ . ͺ̽ ϴ ڸ ٸ Ѱ ο. - : ڰ Ư ̺ ֵ ϰų, ش ̺ SQL(SELECT/INSERT/UPDATE/DELETE) ֵ δ * ý : ͺ̽ ڰ ִ CREATE USER ( ) DROP USER ( ) DROP ANY TABLE ( ̺ ) QUERY REWRITE ...
Python
UTF-8
727
3.796875
4
[ "BSD-3-Clause" ]
permissive
"""See want_play_again.__doc__.""" from out_of_range_error import out_of_range_error def want_play_again(): """Deduce whether the user wants to play again. Return: A boolean value, True if the user wants to play again, False if they do not. """ while True: try: use...
Markdown
UTF-8
3,563
2.890625
3
[]
no_license
+++ date = "2016-03-17T13:37:58+09:00" title = "Pythonで Neural Fitted Q Iteration を実装する" tags = ["Python", "NumPy", "機械学習"] +++ [前々回に実装した多層パーセプトロン](https://zaburo-ch.github.io/post/mlp/)と[前回実装した倒立振子のシミュレータ](https://zaburo-ch.github.io/post/inverted-pendulum/)を用いて、 [Neural Fitted Q Iteration](http://ml.informatik.uni-...
C++
UTF-8
2,710
3.953125
4
[]
no_license
/* You are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constant; however, it should have different heights in different places. The height of the wall is specified by an array H of N positive integers. H[I] is the height of the wall from I to I+1 meters to th...
C#
UTF-8
1,468
2.703125
3
[ "Apache-2.0" ]
permissive
using UnityEngine; using UnityEngine.UI; using System; using System.Collections; using DG.Tweening; namespace MissingComplete { public class Fader : MonoBehaviour { public delegate void OnFadeOutEvent(); public delegate void OnFadeInEvent(); public event OnFadeOutEvent fadeOutComplete; public event OnFadeI...
C#
UTF-8
2,127
2.875
3
[]
no_license
using Application.Common.Interfaces; using MediatR; using System.Threading; using System.Threading.Tasks; namespace Application.V1.Users.Commands.CreateUser { public static class CreateUser { public record Query : IRequest<Response> { public string Username { get; init; } ...
Java
UTF-8
530
1.921875
2
[]
no_license
package kadai; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class kadai24_Uehara extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html;charset=ISO-2022-JP"); PrintWriter o...
C#
UTF-8
3,203
2.546875
3
[]
no_license
#region 文件描述 /****************************************************************************** * 创建: Daoting * 摘要: * 日志: 2011-03-04 创建 ******************************************************************************/ #endregion #region 引用命名 #endregion namespace Dt.Base { /// <summary> /// phone模式一级菜单项显示状态 ...
PHP
UTF-8
1,117
2.671875
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; use PharIo\Manifest\Email; use App\User; class UsersTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $users = [ [ 'name' => 'Francesco', 'emai...
Java
UTF-8
791
3.734375
4
[]
no_license
public class StaticTestMain { public static void main(String[] args) { //클래스 내의 메소드를 호출하기 위해 객체를 생성 //StaticTest st = new StaticTest(); //st.prn(); // 멤버 변수에 static 키워드를 사용하면 클래스를 객체 생성하지 않고 사용 할 수 있다. // 클래스명.static멤버변수 //System.out.println( " num = " + StaticTest.num); //static ...
Python
UTF-8
80
3.3125
3
[]
no_license
n=int(input('Enter the number')) a=n*1 b=n*2 c=n*3 d=n*4 e=n*5 print(a,b,c,d,e)
Markdown
UTF-8
27,949
2.65625
3
[ "Apache-2.0" ]
permissive
--- copyright: years: 2015, 2017 lastupdated: "2017-04-07" --- {:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen:.screen} {:codeblock:.codeblock} # 設定 Bluemix 環境 {: #patterns} 一個成功的專案,需要花時間計劃和設計您需要哪些資源,以及您的企業需求為何。為了協助您開始進行雲端專案,請考量下列問題: * 將要開發的應用程式數量及類型? * 應用程式需要存取哪些服務? * 哪些人會在開發過程中分工合作,以及他們將扮...
Python
UTF-8
8,501
2.765625
3
[]
no_license
import os import pandas as pd import zipfile import shutil from tqdm import tqdm import torch import numpy as np import torchvision as tv import matplotlib.pyplot as plt from torch.utils.data import dataloader from torchvision import models import random """ Предлагаем поучаствовать в соревновании на Kaggle "Dirty vs ...
Java
UTF-8
7,592
2.015625
2
[]
no_license
package cash.xcl.api.dto; import cash.xcl.api.AllMessages; import cash.xcl.api.DtoParser; import cash.xcl.api.tcp.WritingAllMessages; import cash.xcl.api.util.RegionIntConverter; import net.openhft.chronicle.bytes.*; import net.openhft.chronicle.core.Jvm; import net.openhft.chronicle.core.io.IORuntimeException; import...
Python
UTF-8
230
3.890625
4
[]
no_license
X=int(input("Enter first number: ")) Y=int(input("Enter second number: ")) c=[] print("Even Numbers between ",X,"And ",Y," :") X=X+1 while (X<Y): if(X%2==0): c=c+[X] X=X+1 else: X=X+1 print(c)
Java
UTF-8
242
3.078125
3
[]
no_license
package br.usp.ime.mac321.lista04.ex1; public class Fibonacci { public static int fibonacci(int n) { if (n<0) return -1; else if (n==0) return 0; else if (n==1) return 1; else return fibonacci(n-1)+fibonacci(n-2); } }
Markdown
UTF-8
2,952
2.984375
3
[ "MIT" ]
permissive
# SAT-Maude SAT-Maude is a program written entirely in Maude to study and compare different techniques and heuristics in modern SAT solvers. This project contains 6 different strategies: 1. Classic DPLL 2. Modern DPLL 3. Watch literal DPLL 4. Watch literal DPLL with JW heuristic 5. Watch literal DPLL with VSID...
Go
UTF-8
1,024
2.828125
3
[]
no_license
package main import ( "encoding/json" "fmt" "io/ioutil" ) const ( //max = 6 //min = 4 //min = 2 ) /* var data = map[string][][]byte{ "bmp": [][]byte{[]byte{0x42, 0x4D}}, "jpg": [][]byte{[]byte{0xFF, 0xD8}}, //"jpg": [][]byte{[]byte{0xFF, 0xD8, 0xDD, 0xE0}, []byte{0xFF, 0xD8, 0xFF, 0xFE}}, "...
Java
UTF-8
6,314
2.234375
2
[ "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
/* * Copyright (C) 2020 The Android Open Source Project * * 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 app...
Python
UTF-8
868
3.0625
3
[]
no_license
import os, sys from PIL import Image size = 600, 600 def image_scale(file): a,b = os.path.splitext(file) if b in [".jpeg", ".jpg", ".png"]: outfile = a + "_standard" + b try: im = Image.open(file) im.thumbnail(size) im.save(outfile, im.format) excep...
TypeScript
UTF-8
2,268
3.78125
4
[]
no_license
// Reference - https://blog.bitsrc.io/solid-principles-every-developer-should-know-b3bfa96bb688 // Pending - Dependency Inversion Principle /** * Single Responsibility Principle - A class/component/microService should be responsible for only one thing. * If a class has more than one responsibility, it becomes coupl...
JavaScript
UTF-8
2,608
2.75
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import employees from "./employees.json"; import EmployeeRow from "./components/employeeRow"; import Wrapper from "./components/Wrapper"; import Title from "./components/Title"; import BasicTextField from "./components/field/Field.js"; class App extends Com...
SQL
UTF-8
1,034
2.984375
3
[]
no_license
-- Table: public.transactions -- DROP TABLE public.transactions; CREATE TABLE public.transactions ( code character varying COLLATE pg_catalog."default", load_date date, date_index bigint, market_open numeric, market_previous_close numeric, market_day_high numeric, market_day_low numeric, ...
C++
UTF-8
12,989
2.703125
3
[]
no_license
#include<GL/glut.h> #include<math.h> #include<stdio.h> #define c 3.14/180 #define PI 3.14 #define TWO_PI 2.0 * PI #define RAD_TO_DEG 180.0 / PI //Coordinates for the chassis of the car float p[]={5.5,-2.5,1},q[]={5.5,-7.5,1},r[]={10.7,-7.5,1},s[]={10.7,-2.5,1}; float p1[]={10.7,-9,3},s1[]={12.7,-9,3...