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,199
2.78125
3
[ "MIT" ]
permissive
# taskpaper-document A robust [Taskpaper](https://www.taskpaper.com/) parser, builder, and serializer with no external dependencies. Written in pure ES5. Works in node > `0.10.x` and as a browser bundle. A project design goal is to always have input perfectly match serialized output, even for fuzzy or non-Taskpaper...
C++
UTF-8
1,795
3.28125
3
[]
no_license
#include "bank_account.h" #include <iostream> const int CUSTOMERS = 4; int main() { using std::cout; using std::cin; using std::endl; // the next line of code generates a compile error, since one cannot downcast, but you can upcast BankAcc db = BankAcc("Paul Hogan", 10000, 1000); // test_view(db); A...
PHP
UTF-8
4,574
2.546875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: yang * Date: 2019/4/8 * Time: 下午7:18 */ require_once __DIR__ . '/MysqlService.php'; require_once __DIR__ . '/RedisService.php'; Class ChatService { private $table; private $ser; public function __construct($ser) { $this->ser = $ser; $this-...
C++
UTF-8
1,012
2.765625
3
[ "BSD-2-Clause" ]
permissive
// // ToneMapping-Ward.h // // Created by Jietong Chen on 2019/5/6. // #ifndef RAYTRACING_TONEMAPPING_WARD_H #define RAYTRACING_TONEMAPPING_WARD_H #include "Shader.h" namespace RayTracer { class ToneMapping_Ward : public Shader { public: ToneMapping_Ward(); ToneMapping_Ward( const ToneMapp...
TypeScript
UTF-8
973
3.203125
3
[ "MIT" ]
permissive
/** * @description Converts all named imports to require * @param {string} content Initial file content * @returns {string} Converted file content * @example * import { name1, name2 as n2 } from 'src/my_lib'; * // const { name1, name2: n2 } = require("./src/my_lib"); */ export function namedImpt(content: string)...
JavaScript
UTF-8
1,703
2.53125
3
[]
no_license
import React, {Component} from 'react'; import axios from 'axios'; class MailBox extends Component { constructor() { super(); this.state = { mails: [] }; } async componentDidMount() { if (this.props.folder) { const response = await axios.get(`/api/folders/${this.props.folder}`); ...
JavaScript
UTF-8
1,787
3
3
[]
no_license
var baseIngr = []; function setLocalCakeCount() { "use strict"; // Code borrowed from w3C. // Check browser support if (typeof (Storage) !== "undefined") { // Store if (window.localStorage.getItem("cakeCount")) { var localCakeCount; localCakeCount = document.getE...
Java
UTF-8
787
3.015625
3
[]
no_license
package it.unicam.cs.pa.jlife105718.Model.Printer; import it.unicam.cs.pa.jlife105718.Model.Position.IPosition; import java.util.List; /** * Interfaccia funzionale responsabile della stampa di un insieme di coordinate dello stesso tipo. * La creazione di una classe che implementa questa interfaccia è delegata alla...
C++
UTF-8
1,058
3.609375
4
[]
no_license
/** * @input A : Integer array * @input n1 : Integer array's ( A ) length * @input B : Integer * * @Output Integer array. You need to malloc memory, and fill the length in len1 */ int *maxone(int *A, int n1, int B, int *len1) { int stored; int i; int sum = 0; int limit = B; int max = 0; i...
Python
UTF-8
7,179
2.671875
3
[]
no_license
#!usr/bin/env python # -*- coding: utf-8 -*- """ @Author : zhaoguanhua @Email : zhaogh@hdsxtech.com @Time : 2020/4/16 14:18 @File : IMDB_test.py @Software: PyCharm """ import numpy as np from keras.datasets import imdb from keras import models from keras import layers from keras import regularizers import matp...
Python
UTF-8
506
3.59375
4
[ "CC-BY-4.0" ]
permissive
# this sets up a figure with some dotted lines on y=0 and x=0 for reference with plt.xkcd(): plt.figure(figsize=(8, 8)) plt.plot([0, 0], [-0.5, 1.5], ':', color='xkcd:black') plt.plot([-0.5, 1.5], [0, 0], ':', color='xkcd:black') # determine which variables you want to look at plt.scatter(v_w, # variab...
C++
UTF-8
5,269
2.5625
3
[]
no_license
// pool.hpp // // Class Implementation: wdl::threadpool::pool #pragma once #include <windows.h> #include <chrono> #include <wdl/timing/filetime.hpp> #include <wdl/threadpool/base.hpp> #include <wdl/threadpool/environment.hpp> #include <wdl/threadpool/cleanup_group.hpp> namespace wdl::threadpool { // wdl::threadpo...
Markdown
UTF-8
920
3.140625
3
[]
no_license
# 第01节:MySQL数据库概述 ### 一、概述 数据库用来存储应用程序中的数据,需要持久化存储,不能像变量一样放在内存中,服务器重启就消失了,所以需要将数据存储在数据库中叨叨持久化存储的目的。 ### 二、常用的关系型数据库 1. MySQL:开源免费 2. Oracle:大型系统(银行系统,ERP系统,医院系统等,Java体系) 3. SQL server:基于windows server服务器中使用,c#, .net体系 关系型数据库使用**表**来存储数据 [MySQL的下载官网](https://downloads.mysql.com/archives/community/) 数据库安装完成后,还要安装s...
Markdown
UTF-8
48,106
3.28125
3
[]
no_license
## 女性的性爱动机(通识课堂) ##### 辛迪·M.梅斯顿博士; 戴维·M.巴斯博士 爱的相遇 2014-01-17 14:11:07 距离相近的人不一定能够碰撞出爱的火花,但反复接触(次数要足够多)能够增加相爱的概率。一项研究发现,多次短暂的正面相对——不超过35秒,也不交谈——能够增加彼 此的好感。换言之,我们喜欢熟悉的面孔。 迷人的味道 2014-01-17 14:20:19 也许男人天生嗅觉迟钝或者天生是视觉动物,女人的芬芳不能立刻挑起男人的性欲。相反,味道是捕获女人心的撒手锏。清新怡人可以倾倒女人,恶臭难闻只能吓倒女人。 2014-01-17 14:20:...
C#
UTF-8
1,829
2.984375
3
[]
no_license
namespace SourceInclude { using System; using System.IO; // Prints out the runtime information to stdout (the specified text writer). // Include this in your project as source. public static class RuntimeConfiguration { public static void PrintRunConfig(TextWriter stdout) { ...
Python
UTF-8
4,586
3.140625
3
[]
no_license
def deactivate(text, tag, skipped=False): r""" Deactivates ``tag`` in ``text``. .. container:: example Writes (active) tag into LilyPond input: >>> staff = abjad.Staff("c'4 d' e' f'") >>> markup = abjad.Markup('Allegro').with_color('red') >>> abjad.attach( ... ...
C++
UTF-8
1,713
2.984375
3
[]
no_license
#include<iostream> using namespace std; int gotResult = 0; long largeArea = 0; void calcLargestArea(const int m,const int n,const float priceArray[][n],int A,int B,int C,int D,const float budget){ long currentArea = (B - A) * (D - C); if(gotResult){ if(currentArea <= largeArea){ return; ...
Java
UTF-8
3,878
3.015625
3
[]
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 Vista; import Controlador.ClienteControlador; import Controlador.FacturaControlador; import Modelo.Cliente; import java.util.S...
Java
UTF-8
857
2.0625
2
[]
no_license
package cn.edu.qhnu.qhsfdx.ui; import cn.edu.qhnu.qhsfdx.R; import cn.edu.qhnu.qhsfdx.widget.TopBar; import cn.edu.qhnu.qhsfdx.widget.TopBar.OnLeftButtonClickListener; import android.app.Activity; import android.os.Bundle; import android.view.View; public class AboutMe extends Activity implements View.OnClickListener...
PHP
UTF-8
2,335
2.6875
3
[ "MIT" ]
permissive
<?php /* * This file is part of the ReCaptcha Validator Component. * * (c) Ilya Pokamestov * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace DS\Component\ReCaptchaValidator\Composer; use Symfony\Component\Filesystem\Filesystem; ...
Python
UTF-8
210
3.609375
4
[]
no_license
print("Hello"); primes=[2,3,4,5,7,9,23] x=input("Enter a number") x=int(x); primes.append(x); print(primes) print(primes[0]); x=len(primes); print(x) print(primes[-1]); print(primes[2:8]); x="A"; print(int(x));
C#
UTF-8
969
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ACMPrep { public partial class DynamicProgramming { [TestMethod] public void DynamicProgramming_LongestPalindromeTest1() { string s = "abbac"; Assert.Are...
Python
UTF-8
710
4.15625
4
[]
no_license
# Some more string stuff: s = "test string for fun testing" # find returns -1 if no results: print(s.find("y")) # rfind returns the last results print(s.rfind("s")) # string slices: s[0] # first character s[:10] # first ten characters (index 0 to 9) s[10:] # characters from ten to the end of teh string s[10:14] # ch...
Java
UTF-8
12,130
2.046875
2
[]
no_license
package reserva; /******************************************************************************** ** Form generated from reading ui file 'ModalReserva.jui' ** ** Created by: Qt User Interface Compiler version 4.8.7 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! **************...
Java
UTF-8
2,192
1.84375
2
[ "Apache-2.0" ]
permissive
package module512packageJava0; import java.lang.Integer; public class Foo0 { Integer int0; Integer int1; public void foo0() { new module1037packageJava0.Foo0().foo2(); new module966packageJava0.Foo0().foo4(); new module195packageJava0.Foo0().foo3(); new module784packageKt0.Foo0().foo5(); n...
Java
UTF-8
2,172
2.296875
2
[]
no_license
package com.zzz.mt; import com.zzz.mt.annotations.MtDao; import com.zzz.mt.dao.MtDaoSave; import com.zzz.mt.entity.User; import com.zzz.mt.mapping.MapperHandler; import com.zzz.mt.mapping.MapperResult; import com.zzz.mt.support.SqlType; import org.junit.Test; import java.sql.Timestamp; import java.util.*; /** * Cre...
C++
UTF-8
4,887
2.6875
3
[]
no_license
template<typename ValueType> dunedaq::appfwk::FanOutDAQModule<ValueType>::FanOutDAQModule(std::string name) : DAQModule(name) , mode_(FanOutMode::NotConfigured) , queueTimeout_(100) , thread_(std::bind(&FanOutDAQModule<ValueType>::do_work, this)) , wait_interval_us_(std::numeric_limits<size_t>::max()) , in...
JavaScript
UTF-8
498
3.390625
3
[]
no_license
// let c = {'o': '2'} // let a = { // b: (() => { // console.log('访问b') // return c // })(), // t: 1 // } // console.log(a.b) // console.log(c) // var a = 123 // function foo() { // console.log('a',a) // let b = 10 // } // foo() new Promise((resolve)=>{ setTimeout(()=>{ resolve() },3000) }...
Java
ISO-8859-1
847
3.265625
3
[]
no_license
public class Grilo_Thread extends Thread{ private String nome; private float pulo, distanciaPercorrida; private int qtdPulos, distanciaTotal; public Grilo_Thread (String nome, int distanciaTotal) { this.nome=nome; this.distanciaTotal=distanciaTotal; start(); } public void run() { ...
Shell
UTF-8
791
3.8125
4
[ "MIT" ]
permissive
#!/bin/bash # # Lists "all" regular files in current pwd and pipes to input. Opens the # selected file with xdg-open. # if [ -f $HOME/.dmenurc ]; then . $HOME/.dmenurc else DMENU_VERT='dmenu -i' fi # whitelist filetypes filetypes="(sh|py|java|mp3|ogg|jpeg|jpg|png|gif|tex|pdf|ods|cc|c|h|hh)" if [ -z "$1" ]; ...
Python
UTF-8
5,059
2.53125
3
[]
no_license
import numpy as np import pandas as pd import common import matplotlib.pyplot as plt from sklearn import linear_model import sklearn.preprocessing as preprocessing def read_from_file(file_name, chunk_size=50000): reader = pd.read_csv(file_name, iterator=True) chunks = [] mark = True while mark: ...
Python
UTF-8
1,644
2.8125
3
[ "MIT" ]
permissive
# UNSTABLE # Filter graph of ffmpeg consists of multiple "chians". # Each chain looks like this: # [in_pad][in_pad]... filter, filter, filter [out_pad][out_pad]... # Multiple inputs and outputs, they are called pads. # Between pads, are the filters to be applied in sequence to the video/audio # We generate suitable fil...
Python
UTF-8
1,413
2.8125
3
[]
no_license
import csv import re trips = {} ftrips = {} # Load all trips to hash with open('../sweden/trips.txt', 'r') as f: reader = csv.reader(f) for row in reader: if not row[0] == 'route_id': trips[row[2]] = row # Load all routes to hach route = {} with open('../sweden/routes.txt', 'r') as f: ...
Markdown
UTF-8
1,598
2.515625
3
[]
no_license
## Instructions to start the project: 1. Spinning up the devserver can be done with `npm start` 1. Storybook is also installed and can be run with `npm storybook` ### Storybook: I've installed this to continue development after being blocked from an API (and I was not sure if I would get unblocked... below I ...
JavaScript
UTF-8
483
2.625
3
[]
no_license
import { Artist } from '../utils/models.utils' export class ArtistService { static getArtists = ({ name, page = 1 }) => { return fetch(`https://api.setlist.fm/rest/0.1/search/artists.json?artistName=${name}&p=${page}`) .then(response => response.json()) .then(json => json.artists.artis...
Python
UTF-8
2,188
2.71875
3
[]
no_license
import nltk import string import sys import pandas as pd import pickle from sklearn.feature_extraction.text import TfidfVectorizer, TfidfTransformer, CountVectorizer # global tokenize remove_punctuation_map = dict((ord(char), None) for char in string.punctuation) def tokenize(text): lowers = text.lower() no_punctuat...
Python
UTF-8
2,483
3.046875
3
[]
no_license
from math import ceil from itertools import combinations from simpleai.search import ( SearchProblem, breadth_first, depth_first, uniform_cost, greedy, astar, ) from simpleai.search.viewers import WebViewer, BaseViewer # es una tupla de 4 posiciones: # - la gente del lado izquierdo del puente...
Python
UTF-8
2,415
3.21875
3
[]
no_license
import itertools INPUT_FILE = 'input.txt' OUTPUT_FILE = 'output.txt' def flipSwitch(outletFlow, switches): outletFlowTemp = outletFlow[:] for switch in switches: switch = int(switch) for i in range(len(outletFlowTemp)): if(outletFlowTemp[i][switch] == '0'): outlet =...
Java
UTF-8
2,377
2.6875
3
[]
no_license
package guru.springframework.sfgpc.model; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.OneToMany; im...
JavaScript
UTF-8
563
3.78125
4
[]
no_license
const h1 = document.querySelector('h1'); const btn = document.querySelector('button'); let message = ""; btn.addEventListener('click', getTimeOfDay); function getTimeOfDay() { const dateObj = new Date(); if(dateObj.getHours() >= 0 && dateObj.getHours() <= 12) { message = "It's morning"; } e...
Python
UTF-8
3,282
2.96875
3
[]
no_license
from pyspark.sql import SparkSession, Window from pyspark.sql.types import * from pyspark.sql.functions import * # SETUP spark = SparkSession.builder.appName('cleaner').getOrCreate() df = spark \ .read \ .format('csv') \ .options(delimiter = ',') \ .load('datafeed') \ .toDF('control_area', 'unit', 'scp', 'r...
Java
UTF-8
22,773
2.015625
2
[ "MIT" ]
permissive
package cero_tech.immersivefission.blocks.multiblocks.structures; import blusunrize.immersiveengineering.common.IEContent; import blusunrize.immersiveengineering.common.blocks.BlockTypes_MetalsAll; import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0; import blusunrize.immersivee...
C
UTF-8
264
3.71875
4
[]
no_license
#include <stdio.h> int main() { int a,b; printf("\nEnter the value of a,b:"); scanf("%d%d",&a,&b); printf("\nBefore swappig the values area: a%d, b%d", a ,b); a=a+b; b=a-b; a=a-b; printf("\nAfter swapping the values are: a%d, b%d", a , b); return(0); }
Java
UTF-8
867
2.875
3
[]
no_license
package damas.models; import java.util.List; public class Session { private Game game; private State state; public Session() { this.game = new Game(); this.state = new State(); } public void resume() { this.game =new Game(); this.state =new State(); } p...
Python
UTF-8
807
3.78125
4
[]
no_license
'''saída: mostre o número de meses para que um a dívida seja paga o total e o total de juros pago entrada: pergunte o valor incial de uma dívida e o juros mensal''' dividaInicial = float(input("insira o valor da dívida: ")) juroMes = float(input("Insira o juro mensal: ")) valorMensal = float(input("Insira o val...
Java
UTF-8
605
2.28125
2
[]
no_license
import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.xml.XmlBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; //File: JdbcTestApplication.java public class JdbcTestApplication { public static void main(String[] ar...
TypeScript
UTF-8
2,977
2.65625
3
[]
no_license
import * as R from 'ramda'; import * as constants from '../../application/constants'; import * as actions from './actions'; import * as types from './types'; import { Id, ServiceStore } from './types'; export { Id, ServiceStore }; export function buildDefaultStore(): types.ServiceStore { return { services...
JavaScript
UTF-8
641
3.4375
3
[]
no_license
function checkPalindrome(s){ var center = 0 var _center = 0 var low = 0,hei = 0 var len = s.length var posi = [0, 0] while(center < len){ _center = center+1 while(s[center] === s[_center]){ _center++ } low = center-1 hei = _center while...
Ruby
UTF-8
614
3.0625
3
[]
no_license
module PololuMaestro class Servo attr_accessor :min_angle, :max_angle, :min_ms, :max_ms def initialize(driver, channel) @driver = driver @channel = channel end def set_angle(angle) raise RuntimeError.new("Angle too low") if angle < @min_angle raise RuntimeError.new("Angle too...
PHP
UTF-8
878
3.1875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: linqiuyu * Date: 19-3-18 * Time: 下午7:34 */ class Tyre { public function roll() { echo 'The tire is rolling' . PHP_EOL; } } class BMW { protected $tyre; public function __construct($tyre) { $this->tyre = $tyre; } function r...
Java
UTF-8
832
2.453125
2
[]
no_license
package br.com.caelum.fj26; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; /** * Classe que representa a entidade Produto * * @author vagner...
Python
UTF-8
4,248
2.546875
3
[ "MIT" ]
permissive
from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup as soup from selenium import webdriver import requests import time class NetflixScraper: def __init__(self, username, password): self.username = username self.password = password self.driver = webdriver.Firefox(executable_path="C:\ge...
C#
UTF-8
2,589
2.875
3
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using Platform.Utils.Extensions; namespace Platform.Utils { public static class Assemblies { private static bool _loaded = false; private static Object _lock = new o...
C++
UTF-8
276
2.609375
3
[]
no_license
#pragma once #include <ctime> #include <string> using std::string; class Obra{ string nombre; string codigo; string fechaIngreso; double precio; public: Obra(string,string, string,double); virtual ~Obra(); virtual string toString()const; string getFecha()const; };
Python
UTF-8
1,822
3.1875
3
[]
no_license
import pandas as pd import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split from sklearn.naive_bayes import GaussianNB from sklearn.preprocessing import OneHotEncoder from sklearn import metrics import os ''' SOcial Status Encoding ''' def encoding(x): ...
JavaScript
UTF-8
991
2.859375
3
[]
no_license
$(document).ready(function() { fixNavAndAbout(); $(window).resize(function() { fixNavAndAbout(); }); //makes about and nav equal function fixNavAndAbout (){ var aboutHeight = $("#about").css("height"); var aboutHeightNum = parseInt(aboutHeight, 10); var navHeight = $("#...
Python
UTF-8
143
3.71875
4
[]
no_license
numberList = [] i = 0 while i < 5: print("Enter a Number: ", end="") numberList.append(int(input())**2) i += 1 print(numberList)
Python
UTF-8
8,997
2.953125
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 14 10:35:50 2020 @author: hales """ import copy import ply import lib import lexer import parser_combinator as pc # test Item def test_hello(): print('hi') assert 1 == 1 print('test-parser') tokenizer = lexer.tokenizer #print(f'...
C#
GB18030
1,718
2.734375
3
[]
no_license
#region using using System; using System.Collections.Generic; using System.Text; using MarvellousWorks.PracticalPattern.FlyweightPattern.ObjectPool; using MarvellousWorks.PracticalPattern.FlyweightPattern.ObjectPool.Builder; using MarvellousWorks.PracticalPattern.FlyweightPattern.ObjectPool.Cache; #endregion ...
PHP
UTF-8
7,079
3.28125
3
[ "MIT" ]
permissive
<?php /** * Description of IBAN * * @author sven */ require_once( "fxISO7064_mod_97_10.php"); class IBAN { // Makes all IBAN based attributes of an account available to the calling // script const IBAN = 1; const COUNTRY = 2; const CHECKSUM = 3; const NATIONALBANKCODE = 4; const A...
JavaScript
UTF-8
1,049
2.59375
3
[]
no_license
const users = [ { id: "3662", name: "Emma", email: "emma@example.com", age: 29 }, { id: "33272", name: "Debra", email: "debra@example.com" }, { id: "3742", name: "Eric", email: "eric@example.com" } ]; const posts = [ { id: "1", title: "First Post", body...
JavaScript
UTF-8
886
2.5625
3
[]
no_license
import React from "react"; import _ from "lodash"; import "./style.css"; import FourSquare from "./FourSquare"; import Reverb from "./Reverb"; import GameOfLife from "./GameOfLife"; export default class App extends React.Component { constructor(props) { super(props); this.state = { index: 1 }; ...
TypeScript
UTF-8
2,264
2.78125
3
[]
no_license
const merge = require('lodash.merge'); let localStorage: any; if (typeof window !== 'undefined' && typeof window.localStorage !== 'undefined') { localStorage = window.localStorage; } import { TAsyncStorage } from './types'; const API: TAsyncStorage = { getItem: (key) => { return API.multiGet([key]) .th...
Java
UTF-8
586
2.0625
2
[ "MIT" ]
permissive
package com.demo.combo; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.demo.dao.ProvinceDao; import com.demo.model.Province; @Service public class Prov...
Ruby
UTF-8
6,386
3.34375
3
[]
no_license
require 'tuple' RSpec.describe Tuple do it "returns a Point with a w of 1" do a = Tuple.for(1.0).new(4.3, -4.2, 3.1) expect(a.x).to eq(4.3) expect(a.y).to eq(-4.2) expect(a.z).to eq(3.1) expect(a.w).to eq(1.0) expect(a).to be_a(Point) expect(a).to_not be_a(Vector) end it "returns a ...
C++
UTF-8
1,524
2.734375
3
[]
no_license
// Written by Barnaby Collins, 2020 #include <FastLED.h> #define LED_PIN 2 #define NUM_LEDS 125 #define LAYER_SIZE 25 #define FPS 10 #define BRIGHTNESS 255 CRGB leds[NUM_LEDS]; unsigned long lastMillis; int numLayers; // stores information about the peaks to be run - for each one: // - max height // - time // - cur...
Java
UTF-8
658
1.875
2
[]
no_license
package com.phamtan.cuu_tro.util.mail; import com.phamtan.base.email.data_structure.EmailContentData; import com.phamtan.base.email.request.EmailRequest; import com.phamtan.base.email.service.EmailService; import com.phamtan.base.enumeration.EmailEnum; import lombok.AllArgsConstructor; import org.springframework.sched...
Markdown
UTF-8
2,264
2.8125
3
[]
no_license
<h1>Sprint 5</h1> <h2>Tarefas Desenvolvidas:</h2> <li>Indicador de pontualidade no pagamento por cartão de crédito</li> <li>Desenvolvimento da Interface Gráfica</li> <li>Programação das funcionalidades do software</li> <h3>Indicador de Pontualidade</h3> Pontualidade de pagamento por pessoa: indica se a pessoa física ...
Java
UTF-8
2,305
2.59375
3
[]
no_license
package com.hxy.timing.timingdome.Tasks; import com.hxy.timing.timingdome.mail.MailService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; import java.util.Da...
Python
UTF-8
356
3.015625
3
[]
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import cgi form = cgi.FieldStorage() print("Content-type: text/html\n") html = """ <title>CGI script</title> <h1>Greetings</h1> <hr> <p>%s</p> <p>The input date is: %s</p> <p>The input city is: %s</p> <hr>""" date = form['date'].value city = form['citys'].value print(html %...
Java
UTF-8
427
1.625
2
[ "MIT" ]
permissive
package org.ekstep.graph.model; import org.ekstep.common.dto.Request; public interface ICollection extends INode { void addMember(Request request); void addMembers(Request request); void removeMember(Request request); void removeMembers(Request request); void getMembers(Reques...
PHP
UTF-8
24,799
2.671875
3
[]
no_license
<?php /** * This file used for adding fields to the products category taxonomy page and saving those values correctly :) * * @package wp-e-commerce * @since 3.8 * @todo UI needs a lot of loving - lots of padding issues, if we have these boxes, they should be sortable, closable, hidable, etc. */ function wpsc_ajax...
C
UTF-8
3,445
2.703125
3
[]
no_license
#pragma once struct SegmentOverlapResult { float collisionParam; bool overlapped; }; struct OverlapResult { vec normal; vec collisionPoint; float penetration; }; SegmentOverlapResult test_circle_segment_overlap(vec circleCenter, float circleRadius, vec aabbTopLeft, vec aabbBottomRight) { Segm...
Markdown
UTF-8
732
3.015625
3
[]
no_license
# 文法 ## 0型文法 设G=(Vn,Vt,P,S),若果它的每个产生式α→β是这样的一种建构:a∈(Vn∪Vt)*,且至少含有一个`非终结符`而β∈(V n∪Vt),则G是一个0型文法,也称`短语文法`。处理能力相当于图灵机,并且递归可枚举。 ## 1型文法 也叫`上下文有关文法`,对应线性有界自动机。在0型文法基础上每一个α→β都有|β|>=|α|,有一个特例,a→ ,也满足1型文法 ## 2型文法 也叫`上下文无关文法`,对于下推自动机。在1型文法中满足每一个α→β都有α是费终结符 ## 3型文法 也叫`正规文法`,对应`有限状态自动机`,在2型文法的基础上满足A→α|αB(右线性)或A→α|Bα(左线性)
Java
UTF-8
2,719
3.046875
3
[]
no_license
package com.cbergoon.algorithm.search; import java.util.HashSet; import java.util.Set; import java.util.Stack; import com.cbergoon.exception.ImproperGraphBuildException; import com.cbergoon.exception.InvalidVertexIndexException; import com.cbergoon.graph.Graph; import com.cbergoon.graph.model.EdgeBase; import com.cbe...
SQL
UTF-8
241
3.515625
4
[]
no_license
SELECT user.first_name, user.last_name, user2.first_name as friend_first_name, user2.last_name as friend_last_name FROM user LEFT JOIN friendships ON user.id = friendships.user_id LEFT JOIN user AS user2 ON user2.id = friendships.friend_id
Python
UTF-8
2,383
2.671875
3
[ "Apache-2.0" ]
permissive
from threading import Semaphore from unittest.case import SkipTest from batchy.runloop import coro_return, runloop_coroutine from batchy.batch_coroutine import batch_coroutine, class_batch_coroutine try: from concurrent.futures import ThreadPoolExecutor import batchy.futures as batchy_futures except ImportEr...
Java
UTF-8
3,939
2.9375
3
[]
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.mycompany.store; import java.util.Scanner; /** * * @author Bassam Muhammad */ public class Customer { private Str...
C
UTF-8
4,550
2.640625
3
[ "MIT" ]
permissive
/* 7-1-2010 MRC-Epid JHZ */ /* // The code was written for the head circumference analysis // of EPIC data both as standalone C program (see below) and // a Stata plugin (see stata_snphwe.do). To facilitate file // handling for the standalone version, an awk program was // also written (not shown). */ #include ...
Python
UTF-8
820
2.671875
3
[]
no_license
##Created by Muhammad Shahriyar Sheikh '_' ## Hatim Ali Asghar .-. ## AbuBakar Sarwar ._. import csv import tkMessageBox import tkSimpleDialog from Tkinter import * ################################### root = Tk() root.withdraw() noOfPolicies = 0 host1=0 host2=0 macstring = "...
Java
UTF-8
1,716
2.171875
2
[]
no_license
package com.santiago.certificadosdigitales.com.santiago.certificadosdigitales.controller; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.web.reactive.function.server.RouterFunction; ...
Ruby
UTF-8
389
3.53125
4
[]
no_license
class Unit attr_reader :health_points, :attack_power def initialize(health_points=60, attack_power=10) @health_points = health_points @attack_power = attack_power end # def health_points # @health_point # end def damage(attack_power) @health_points -= attack_power end def attack!(t...
Java
UTF-8
988
2.0625
2
[ "Apache-2.0" ]
permissive
package org.atteo.moonshine.jetty.security; import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; import org.atteo.config.AbstractConfigurable; import org.eclipse.jetty.util.security.Constraint; @XmlRo...
Markdown
UTF-8
5,946
2.578125
3
[ "Unlicense" ]
permissive
# El regreso de la zarzuela Published at: **2019-11-02T03:52:00+00:00** Author: **Manuela Cano Pulido** Original: [ELESPECTADOR.COM](https://www.elespectador.com/noticias/noticias-de-cultura/el-regreso-de-la-zarzuela-articulo-889100) Entre las sillas del teatro que yace detrás de las puertas de la Fundación Jaime ...
Java
UTF-8
2,875
2.546875
3
[]
no_license
package uidesign; import java.awt.EventQueue; import java.util.Date; import java.time.format.DateTimeFormatter; import java.text.SimpleDateFormat; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; public class GetBalanceFrame extends JFrameDemo{ /**...
Python
UTF-8
9,084
3.34375
3
[]
no_license
import pandas as pd from sklearn.decomposition import PCA from sklearn.tree import DecisionTreeRegressor from sklearn.linear_model import LinearRegression class DataManipulator: def __init__(self, dat: pd.DataFrame, validation_year: int = 2017, test_year: int = 2018): """ :param dat: Pandas Datafr...
C++
UTF-8
1,795
3.125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string> using std::string; #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> #include <fstream> using std::ifstream; inline string onlyFilename(char *input){ string filenameWithExt = input; string filenameOnly = filenameWithExt; size_t ...
Java
UTF-8
690
1.96875
2
[]
no_license
/** * */ package xyz.shanmugavel.samples.config; import javax.annotation.PostConstruct; import org.apache.camel.spring.javaconfig.CamelConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.C...
JavaScript
UTF-8
1,926
3.265625
3
[]
no_license
const app = { init: function() { // je récupère le bouton burger const menuButton = document.querySelector('.menu-burger-button'); // je lui pose un écouteur d'évenement menuButton.addEventListener('click', app.handleMenuButtonClick); }, handleMenuButtonClick: function() ...
Java
UTF-8
5,010
2.1875
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.superherosightings.controller; import com.sg.superherosightings.dao.SuperheroSightingsDao; import com.sg.superh...
Java
UTF-8
3,873
2.296875
2
[ "MIT" ]
permissive
/** jsierraecg - XliDecompressor.java * Copyright (c) 2011 Christopher A. Watford * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation ...
Markdown
UTF-8
2,583
2.640625
3
[]
no_license
--- layout: post title: "apt 1.0 - old dog with new tricks" dek: "The package manager for Debian 'just' got more user friendly" lede: "If you're a Debian (or Ubuntu) Linux user you can probably use the simpler 'apt'-command and forget about 'apt-get', 'apt-cache' and 'dpkg'." image: feature: /assets/6789958972_...
Python
UTF-8
980
3.953125
4
[]
no_license
ORD_A = ord('a') class Position: x: int y: int def __init__(self, x: int, y: int): self.x = int(x) self.y = int(y) @classmethod def from_algebraic_notation(cls, notation: str) -> 'Position': x = ord(notation[0]) - ORD_A y = int(notation[1]) - 1 return cls(x...
Java
UTF-8
584
2
2
[ "Apache-2.0" ]
permissive
package io.nosqlbench.nb.api.markdown.types; import io.nosqlbench.nb.api.markdown.types.HasDiagnostics; import java.util.List; public class Diagnostics { public static List<String> getDiagnostics(Object o) { if (o instanceof HasDiagnostics) { return ((HasDiagnostics)o).getDiagnostics(); ...
Java
UTF-8
14,473
3.46875
3
[]
no_license
import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * This class provides a shortestPath method for finding routes between two points * on the map. Start by using Dijkstra's, and if your code isn't fast enough for your * satisfaction (or the autograder), upgrade your implementati...
C
UTF-8
2,561
2.671875
3
[ "BSD-3-Clause" ]
permissive
/* Copyright 2016 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * Copyright 2011 Google Inc. * * Tasks for mutexes basic tests. */ #include "console.h" #include "common.h" #include "cts_common.h" #include "task....
Java
UTF-8
119
2.140625
2
[]
no_license
package httpParsing.http; import java.util.Map; public interface HttpCookie { Map<String, String> getCookies(); }
Python
UTF-8
5,555
3
3
[]
no_license
import utill import os import random rolls = { 'rock': { 'defeats': ['scissors'], 'defeated_by': ['paper'] }, 'paper': { 'defeats': ['rock'], 'defeated_by': ['scissors'] }, 'scissors': { 'defeats': ['paper'], 'defeated_by': ['rock'] }, } def mai...
Markdown
UTF-8
1,382
2.75
3
[]
no_license
_This page is about the status effect. For the spell, see [[Transience]]._ | Transience | ![](https://github.com/Electroblob77/Wizardry/blob/1.12.2/src/main/resources/assets/ebwizardry/textures/gui/potion_icon_transience.png) | | --- | --- | | Particles | Light blue dust | | Effect type | Beneficial | | Max. natural l...
JavaScript
UTF-8
896
2.921875
3
[ "MIT", "ISC" ]
permissive
async function createPatientFormHandler(event) { first_name = document.getElementById("first_name").value.trim(); last_name = document.getElementById("last_name").value.trim(); dob = document.getElementById("dob").value.trim(); if (first_name && last_name && dob) { const response = await fetch("/api/patient...