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
Shell
UTF-8
52,730
3.625
4
[]
no_license
#!/bin/bash # //////////////////////////////////////////////////////////////////////////// # # # # description : install, uninstall # # create Date : 2014/10/14 ...
C++
UTF-8
1,171
2.875
3
[]
no_license
#include <stdio.h> int Q[100000]; int visit[10000] = { 0, }; int front = 0, rear = 0; bool isPrime(int value) { if (value % 2 == 0 && value != 2) return false; for (int i = 3; i*i <= value; i += 2) { if (value%i == 0) return false; } return true; } int changeNum(int value,int disi...
TypeScript
UTF-8
3,811
2.71875
3
[]
no_license
import { Consumer, HighLevelProducer, KafkaClient, Message, ProduceRequest, } from "kafka-node"; import redisClient from "./db"; import { Ticket, TicketState } from "./data"; const kafkaClient = new KafkaClient(); const consumer = new Consumer( kafkaClient, [ { topic: "payment_successful" }, { to...
Ruby
UTF-8
1,093
4.8125
5
[]
no_license
# Write a method that searches for all multiples of 3 or 5 that lie between 1 and some other number, and then computes the sum of those multiples. For instance, if the supplied number is 20, the result should be 98 (3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 + 20). # You may assume that the number passed in is an integer great...
Markdown
UTF-8
19,720
3.234375
3
[]
no_license
## Introduction Arrays are the simplest and oldest data structures in programming languages. They go back to Fortran I, which was released in 1957 and provided simple one- and two-dimensional arrays of integer or floating-point values as its only data structures. Arrays have been supplemented by many other data struct...
Java
UTF-8
281
3.078125
3
[]
no_license
package OneToFourteen; public class Division { public static void main(String[] args) { int a =5; int b =5; int c = a/b; /*float f = a/b; System.out.println(c); System.out.println(f); System.out.println(a*1.0f/b); System.out.println((float)(a)/b);*/ } }
Shell
UTF-8
578
3.4375
3
[]
no_license
#!/bin/bash set -eu logfile=/var/vcap/sys/log/etcd/drain.log exec 3>&1 exec 1>> $logfile exec 2>> $logfile output_for_bosh() { exit_code=$? if [ $exit_code -eq 0 ]; then echo "$(date): etcd exited" else echo "$(date): drain failed" fi echo $exit_code >&3 } trap output_for_bosh EXIT if echo $BO...
Python
UTF-8
878
3.140625
3
[]
no_license
class Solution: def findKthBit(self, n: int, k: int) -> str: length = 2 ** n - 1 j = n reverse = False while j != 1: if k == length // 2 + 1: return "1" if not reverse else '0' elif k <= length // 2: length = length // 2 ...
Markdown
UTF-8
8,906
3.34375
3
[]
no_license
# 023-链表中环的入口结点 tags: 两指针 --- ## 题目原文 [牛客网链接](https://www.nowcoder.com/practice/253d2c59ec3e4bc68da16833f79a38e4?tpId=13&tqId=11208&tPage=3&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) 给一个链表,若其中包含环,请找出该链表的环的入口结点,否则,输出null。 ## 解题思路 ### 剑指offer 假设链表长度为N, 那么第N链接到了第k个节点形成了环,即我...
Java
UTF-8
223
1.882813
2
[]
no_license
package com.sparta.sdets.model; import java.util.ArrayList; public interface TrainingCentreDTO { int getCapacity(); int getRemainingSpace(); ArrayList getTraineesList(); void addToQueue(Trainee trainee); }
Java
UTF-8
849
2.453125
2
[]
no_license
package learn.aop; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.*; import org.springframework.stereotype.Component; @Aspect @Component public class AopByAnnotation { //指定切点切面 @Pointcut(value = "execution(* learn.*.Foo.*sayHelloFoo(..))") public void point() { } ...
Java
UTF-8
327
2.5625
3
[]
no_license
package com.Marian.Exercicis.Refactoritzar.RemoveAndReplace; public class Plane extends TipusVheicles{ public Plane(int vehicleType, int speed, int acceleration){ super(vehicleType, speed, acceleration); } public int move () { int result = 0; return result = acceleration * 2; ...
TypeScript
UTF-8
1,943
2.59375
3
[]
no_license
import { getDatabase } from './database'; import { Item, User } from './data-types'; import { ObjectId } from 'mongodb'; export async function getAllItems(): Promise<Item[]> { const db = await getDatabase(); const collection = db.collection('items'); return await collection.find().sort({ _id: -1 }).toArray(); }...
Python
UTF-8
565
3.296875
3
[]
no_license
import csv results_file = 'file.csv' # list of lists column_headers = ['col 1', 'col 2', 'col 3'] all_data = [column_headers] all_data.append(['row 1, col 1', 'row 1, col 2', 'row 1, col 3']) with open(results_file, 'w', newline='') as f: writer = csv.writer(f) for r in all_data: writer.writerow(r) #...
Markdown
UTF-8
1,866
2.515625
3
[]
no_license
# Мадридский "Реал" **«Реал Мадрид»**(*исп. Real Madrid Club de Fútbol*) — испанский профессиональный футбольный клуб из города Мадрида. Признан ФИФА лучшим футбольным клубом XX века. «Реал Мадрид» — один из трёх клубов, которые ни разу не покидали высший испанский дивизион, ~~двумя другими являются «Барселона» и «Атл...
Python
UTF-8
1,202
2.984375
3
[]
no_license
def maxCalc(S,N,a,b):#해당 행, 열 순회 maxCnt = 0 acnt = 1 for i in range(N-1): if S[i][b] == S[i+1][b]: acnt += 1 else: acnt = 1 maxCnt = max(acnt, maxCnt) bcnt = 1 for i in range(N-1): if S[a][i] == S[a][i+1]: bcnt += 1 ...
JavaScript
UTF-8
1,585
3
3
[ "MIT" ]
permissive
import test from 'ava' import { isValidNumericInput } from '../../src/number' test('string - empty', async function (t) { t.plan(1) t.true(isValidNumericInput('', true)) }) test('string - space', async function (t) { t.plan(1) t.false(isValidNumericInput(' ', true)) }) test('string - alphabetic', async funct...
C#
UTF-8
606
2.9375
3
[]
no_license
/** * QuickRound : a Round of type Quick * * */ using System.Collections.Generic; public class QuickRound : Round { private static List<int> _accLevel = new List<int>() {4,2,1}; //Accuracy values for level (one-side threshold, i.e. +-threshold) private int Acc; //Accuracy : precision threshold level (0-2) ...
JavaScript
UTF-8
4,500
2.625
3
[]
no_license
var postGameScene; function postGameLoop(){ postGameCamera.position.set(0,15,45); postGameCamera.lookAt(0,0,0); if(controllersConnected){ checkAllButtons(); } if(inPostGame){ requestAnimationFrame(postGameLoop); renderer.render(postGameScene, postGameCamera); } } fun...
Java
UTF-8
940
3.3125
3
[]
no_license
package com.geekbrains; public class ArrMethods { public static int[] arrAfterLastFour (int[] arr) { int i=arr.length-1; while (i>=0 && arr[i]!=4) { i--; } if (arr[i]==4) { int[] arr2 = new int[arr.length-1-i]; System.arraycopy(arr,i+1,arr2,0,arr....
Python
UTF-8
215
3.09375
3
[]
no_license
from sys import stdin for _ in range(int(stdin.readline())): t = int(stdin.readline()) cur = 1 idx = 3 res = 1 while cur < t: cur += idx idx += 2 res += 1 print(res)
Java
UTF-8
1,133
2.515625
3
[]
no_license
package design.hustlelikeaboss.customr.models; import javax.persistence.*; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; ...
JavaScript
UTF-8
5,050
3.453125
3
[]
no_license
const cardsFlippedArr = []; const matchedCardsArr = []; let cardsFlipped = 0; let totalSeconds = 0; let matches = 0; let gameRunning = true; let preventFlip = false; let previousCardFlipped; //declare DOM elements const gameContainer = document.getElementById("game"); const minutesLabel = document.querySelector("#min...
Markdown
UTF-8
2,423
2.96875
3
[]
no_license
[![Known Vulnerabilities](https://snyk.io/test/github/adankot/todolist/badge.svg)](https://snyk.io/test/github/adankot/todolist) # To do list This is a test project. A basic to do list, where you can register an account and create tasks for yourself. User actions: - Register yourself with username and password - Login...
Shell
UTF-8
1,145
2.53125
3
[]
no_license
#!/usr/bin/env zsh export DOTS_DIR=~/.dots # fallback locale (( $+LC_ALL )) || export LC_ALL=en_US.UTF-8 (( $+LANG )) || export LANG=en_US.UTF-8 # defines MACHINE_OS and MACHINE_NAME [[ -e ~/.machine ]] && source ~/.machine # exclude some aliases from alias-tips export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES='_ - 1 g' # d...
C++
UTF-8
13,340
2.625
3
[]
no_license
#ifndef _VISUALIZER_H #define _VISUALIZER_H // includes from this package #include "ColorRamp.hpp" #include "DrawableColor.hpp" #include "DrawablePoint.hpp" #include "DrawableBox.hpp" #include "OwnedPoint.hpp" #include "OwnedColor.hpp" // includes from c++ lib #include <iostream> #include <vector> #include <string> #...
Java
UTF-8
154
2.65625
3
[]
no_license
package blast; public class BornFactory implements BlastFactory { @Override public Blast add(int x, int y) { return new Born(x, y); } }
C#
UTF-8
4,499
2.75
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class SH_ColliderDelegate : MonoBehaviour { public enum InteractionType { Script, Collider, Trigger, } public enum ColliderCondition { None, Nam...
Java
UTF-8
2,420
3.1875
3
[]
no_license
package com.ATemplates_DataStructures.DFS_LeetCode.Tree_DFS; import com.LeetCode.TreeNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.LinkedList; import java.util.Queue; public class No101_SymmetricTree { private final static Logger logger = LoggerFactory.getLogger(No101_SymmetricT...
Python
UTF-8
5,419
2.75
3
[]
no_license
#!/usr/bin/env python3 import json import os import threading from dicttoxml import dicttoxml from httpserver.argparser.ArgParser import ArgParser from httpserver.http.HttpRequest import HttpRequest from httpserver.http.HttpResponse import HttpResponse from httpserver.http.HttpServer import HttpServer from httpserve...
TypeScript
UTF-8
4,756
2.578125
3
[]
no_license
import * as path from "path"; import * as fs from "fs"; import * as child_process from "child_process"; import * as readline from "readline"; let protoClientDir = path.join(__dirname, "../../../protoClient"); // 客户端协议目录(服务器没有客户端svn权限,故将协议生成到公用目录,由客户端自己拉取) console.time("cmd build ok "); routeBuild(() => {...
Java
UTF-8
3,335
3.03125
3
[]
no_license
package com.barfly.hobservable.collectionsexample; import com.barfly.hobservable.collections.ListObservable; import java.util.ArrayList; /** * * @author jonathanodgis */ public class ContactsList { private final String userID; private final ArrayList<Contact> contacts; private final ListObservable ...
Java
UTF-8
588
2.65625
3
[]
no_license
package no.hiof.larseknu.studentprosjekt; import java.util.ArrayList; public class Main { public static void main(String[] args) { // Oppretter to kursobjekter Kurs androidProgrammering = new Kurs("Android-Programmering", "ITF1337", 10); Kurs kvanteFysikk = new Kurs("Kvantefysikk", "ITF9999", 20)...
Java
UTF-8
9,858
2.421875
2
[]
no_license
package com.wangrui027.javafx.weather; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.wangrui027.javafx.weather.model.City; import com.wangrui027.javafx.weather.model.County; import com.wangrui027.javafx.weather.model.Province; import com.wangrui027.javafx.weather.model.WeatherDataMod...
Java
UTF-8
540
3.484375
3
[]
no_license
package com.sherkhancrs; import java.util.Scanner; public class FizzBuzz { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Number: "); int number = scanner.nextInt(); String result = ""; if (number%3==0) { re...
Python
UTF-8
2,473
2.859375
3
[ "MIT" ]
permissive
"""Class for writing C-code to create a vxTableLookupNode object. Done by parsing the graph parameters of the xml description of the node. parsed_string contains the C code to be written to file """ from base_node import BaseNode # Valid values for the vx_lut parameter, i.e. implemented default LUTs # TODO: Actually...
Markdown
UTF-8
14,282
3.234375
3
[ "MulanPSL-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- --- --- title: 第十九章 求情告饶 --- “在此期间,我们干了些什么呢?我们干了我们所能干的最糟糕的事,我们所干的事真该使我们更受人鄙视——我们背叛了阿玛丽亚,我们摆脱了她那无声的命令,我们不能这样生活下去,没有丝毫希望,我们就不能活,于是我们开始各用各的方式去请求或缠磨城堡宽恕我们。虽然我们知道,我们没有能力进行补救,我们也知道,我们和城堡惟一很有希望的联系就是通过索提尼,他是父亲的顶头上司,对父亲也有好感,但是由于已发生的事使我们无法再去找他,尽管如此,我们还是这样去做。父亲开了个头儿,他开始向村长、秘书、律师、文书等求情,但毫无作用,人家通常都不见他,如果由于用计谋或碰巧使得他被接见——听到这种...
Java
WINDOWS-1252
1,998
2.546875
3
[]
no_license
package com.pc.pconsumption.framework; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.logging.Logger; import org.codehaus.jackson.map.ObjectMapper; impo...
C#
UTF-8
2,993
2.796875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace DemoAsync { public partial class Form1 : Form { Cancel...
C#
UTF-8
715
2.609375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace KeyKeeper { public class StoredPasswordClass { public int _id; public string _service; public string _url; public string _password; ...
Markdown
UTF-8
3,488
2.6875
3
[ "CC-BY-3.0", "CC-BY-3.0-US", "LicenseRef-scancode-generic-cla" ]
permissive
## Empfangen von Nachrichten auf dem simulierten Gerät In diesem Abschnitt ändern Sie die simulierte Geräteanwendung, die Sie in [Erste Schritte mit IoT Hub] erstellt haben, um Cloud-zu-Gerät-Nachrichten von IoT Hub zu empfangen. 1. Fügen Sie in Visual Studio im **SimulatedDevice**-Projekt der **Program**-Klasse folg...
PHP
UTF-8
1,590
2.53125
3
[]
no_license
<?php require_once dirname(dirname(__FILE__)).'/models/db_model.php'; class settings{ function __construct() { $this->db_model= new db_model; } function settings(){ $search=$_POST['search']; return json_encode($this->db_model->getSettings($search)); } function nameSetting...
JavaScript
UTF-8
1,989
2.703125
3
[]
no_license
/* * Made By (c) ZizoNaser * 12/18/17 9:38 PM * Twitter: @ZizoNaser * GitHub: github.com/ZizoNaser */ $(document).on("click", ".sus", function () { var formId = $(this).parent().parent().attr('id'); $.ajax({ url: '/SuspendFormCtl', data: { formId: formId }, s...
Ruby
UTF-8
238
3.390625
3
[]
no_license
class Bob def hey(said) if said.split("").last == '?' 'Sure.' elsif said == said.upcase && said != '' 'Woah, chill out!' elsif said == '' 'Fine. Be that way.' else 'Whatever.' end end end
JavaScript
UTF-8
5,783
2.671875
3
[ "MIT" ]
permissive
const { Container, Text, Shape } = require('@createjs/easeljs'); const { Tween, Ease } = require('@createjs/tweenjs'); const { HashNode } = require('./hash-node'); const { tweenPromise, getHashCode, MD5 } = require('../utils'); export class ConsistentHash { constructor(player, options) { this.stage = play...
C++
UTF-8
4,168
2.984375
3
[]
no_license
#include <iostream> using namespace std; struct node { int d; int v1; int v2; }; void swap(node &a,node &b) { node t; t=a; a=b; b=t; } void minheap(node arr[],int ind,node minH[],int &smin) { for (int j = 0; j < ind; j++) { minH[smin]=arr[j]; int x=smin; while(x>0 && minH[(x-1)/2].d>minH[x].d) { ...
Java
UTF-8
14,603
1.8125
2
[]
no_license
package upsc.motivational.quotesforu; import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.ActivityInfo; import android.net.Uri; import android.support.annotation.NonNull; import ...
C++
UTF-8
41,650
2.5625
3
[ "MIT" ]
permissive
// Lexer.hpp --- CodeReverse lexical analysis // Copyright (C) 2017 Katayama Hirofumi MZ. License: MIT License #ifndef CODEREVERSE_LEXER_HPP #define CODEREVERSE_LEXER_HPP #include "TextScanner.hpp" #include <set> // for std::set #include <map> // for std::multimap #include <stack> // for std::stack ...
Python
UTF-8
1,963
3.578125
4
[]
no_license
# Recurrent Neural Network # Part 1 - Data Preprocessing # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the training set dataset_train = pd.read_csv('Google_Stock_Price_Train.csv') training_set = dataset_train.iloc[:, 1:2].values # Feature Scaling from...
JavaScript
UTF-8
3,602
2.609375
3
[]
no_license
//Mongo Connection const mongoose = require("mongoose"); //====models========== mongoose.connect(process.env.MONGODB_URI || "mongodb://localhost/workout", { useNewUrlParser: true, useUnifiedTopology: true }); const Schema = mongoose.Schema; const workOutSchema = new Schema({ type: String, nam...
Markdown
UTF-8
1,400
3.25
3
[]
no_license
# lmia assembler ## How to use Give the path to the file that sould be assembled and it outputs the assembled instructions. ```bash python3 assembler.py input_file_name ``` <br/> ## Examples ### Example 1 Input: ``` asm main: ; add value from address 0xAB to register 2 add r2, 0xAB ``` Output: ``` 00: 28AB ...
C++
UTF-8
10,672
2.625
3
[ "MIT" ]
permissive
/************************************************* * Slicer.cpp * * Release: July 2011 * Update: April 2015 * * University of North Carolina at Chapel Hill * Department of Computer Science * * Ilwoo Lyu, ilwoolyu@cs.unc.edu *************************************************/ #include <algorithm> #include <cstring> #inc...
C#
UTF-8
13,070
2.734375
3
[]
no_license
using DAL; using System; using System.Collections.Generic; using System.Data; using System.Data.SQLite; using System.Linq; using System.Text; using System.Web; namespace DAL { /// <summary> /// 数据访问类:Article /// </summary> public partial class Article { public Article() { } #region ...
Java
UTF-8
4,751
1.890625
2
[ "Apache-2.0", "EPL-2.0" ]
permissive
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org) * * 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...
Java
UTF-8
8,926
2.84375
3
[ "MIT" ]
permissive
package com.embroidermodder.embroideryviewer; import java.io.DataInputStream; import java.io.IOException; public class FormatPec implements IFormatReader { public boolean hasColor() { return true; } public boolean hasStitches() { return true; } public Pattern read(DataInputStrea...
Java
UTF-8
993
2.1875
2
[]
no_license
package bcp.limitsservice; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component @ConfigurationProperties("limits-service") public class Configuration { private int minimum; private int maximum; private String myprofile...
JavaScript
UTF-8
871
2.625
3
[]
no_license
'use strict' const path = require('path') const fs = require('fs') const logger = require('./logger.js') function hasFile(filepath) { let stat try { stat = fs.statSync(filepath) } catch (e) { return false } return stat.isFile() } function ensureAndResolveFile(filepath) { ...
TypeScript
UTF-8
737
2.875
3
[]
no_license
import { TabStateManager } from './tab-state.manager'; export class TabStateValueAccessor<T> { private _tabStateManager: TabStateManager; private _key: string; constructor(tabStateManager: TabStateManager, key: string) { this._tabStateManager = tabStateManager; this._key = key; } ...
PHP
UTF-8
1,294
2.515625
3
[]
no_license
<?php namespace App\Transformers; use App\UserLog; use League\Fractal\TransformerAbstract; class UserLogTransformer extends TransformerAbstract { /** * List of resources possible to include. * * @var array */ protected $availableIncludes = [ 'user', ]; /** * List of ...
Python
UTF-8
958
4.65625
5
[]
no_license
''' Write a program with use of inheritance: Define a class publisher that stores the name of the title. Derive two classes book and tape, which inherit publisher. Book class contains member data called page no and tape class contain time for playing. Define functions in the appropriate classes to get and print the det...
Python
UTF-8
2,017
2.609375
3
[]
no_license
# # _*_coding:UTF-8 _*_ # # 采集代理 # import re # from urllib import request # from lxml import etree # # test_url = "http://www.httpbin.org/ip" # local_ip = request.urlopen(test_url).read().decode() # # url = "https://ip.jiangxianli.com/blog.html" # res = request.urlopen(url).read().decode('utf-8') # # with open('ip.html...
Markdown
UTF-8
2,501
3.28125
3
[]
no_license
--- title: JavaScript and Node.js layout: default --- ## JavaScript and NodeJS ### Installing Node.js Maintaining your locally installed Node.js versions using the [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm) is recommended. The linked GitHub project page shows instructions to install nvm. Further deta...
Python
UTF-8
4,050
2.953125
3
[]
no_license
#!/usr/bin/env python """ Usage: EdgeClusterFromCopathOutput.py [OPTION] INPUTFILE OUTPUTFILE Option: Examples: EdgeClusterFromCopathOutput.py Fsc54_5G1E6D40Q40S200C50H4J40W40Z0010 Fsc54_5G1E6D40Q40S200C50H4J40W40Z0010E Description: This program restores the edge clusters(2nd-order cluster) from copath's 1st...
Python
UTF-8
1,340
2.546875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Feb 28 15:40:43 2015 @author: michal """ import numpy as N import modred as MR import matplotlib.pyplot as plt nx = 200 ny = 200 num_vecs = 10 dlen = nx*ny k = 0.1 # Arbitrary data x,y = N.meshgrid(N.linspace(0,1.,ny), N.linspace(0,1.,nx)) f = N.sin(2. * N.pi * y) * N.s...
Java
UTF-8
768
2.125
2
[]
no_license
package com.telofast.server; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import javax.persistence.Id; import com.googlecode.objectify.annotation.Serialized; @Entity public class StationStatuses implements Serializable { private static final long ...
Markdown
UTF-8
1,182
3.890625
4
[]
no_license
# Fade Library for Arduino # Library for "fading" integers up and down with parallel timers based on millis. mainly aimed to dimm LEDs parallel in different steps and speeds. but might be useful for other stuff where we need incrementation or decrementation of ints # Use # first inanciate a Fade Object: ```cpp #inc...
Java
UTF-8
18,403
1.789063
2
[]
no_license
package org.xpande.retail.report; import org.adempiere.exceptions.AdempiereException; import org.compiere.process.ProcessInfoParameter; import org.compiere.process.SvrProcess; import org.compiere.util.DB; import org.xpande.retail.utils.ComercialUtils; import java.math.BigDecimal; import java.sql.PreparedStatement; im...
Java
UTF-8
1,119
1.90625
2
[]
no_license
package tz.co.ubunifusolutions.screens.activities; import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.Simple...
Markdown
UTF-8
403
2.71875
3
[]
no_license
- take - take it - take that - take this - take it back/took it back - he took his money back - take it away/took it away - don't take her away - take my money away - take it down/took it down - take him down - take 30 minutes. - take a day. - take 2 months. - take a rest. - take a shower. - take a break. - tak...
C
UTF-8
1,628
2.921875
3
[]
no_license
#include "interpret_file.h" static int get_file_content(t_in *in, const char *filename) { int fd; // OPEN fd = open(filename, O_RDONLY); if (fd == -1) return (open_error(filename)); // LSEEK: Get file size in->len = (uint32_t)lseek(fd, 0, SEEK_END); if (in->len & 0x80000000u) return (lseek_error(fd)); if...
Swift
UTF-8
245
2.640625
3
[]
no_license
import Foundation /// CHALLENGES OF ITERATING COLLECTIONS /// // Challenge 1 var pastries: [String] = ["cookie", "danish", "cupcake", "donut", "pie", "brownie", "fritter", "cruller"] pastryWithStartLetter(pastries: pastries, str: "d")
Python
UTF-8
208
3.078125
3
[]
no_license
products = {'candy':10,"juice": 5,"pen":50} def check(product,num): if product in products and num>=products[product]: return True else: return False
Markdown
UTF-8
20,029
2.578125
3
[]
no_license
# 在SpringMVC Controller中注入Request成员域 - z69183787的专栏 - CSDN博客 2017年12月20日 11:40:40[OkidoGreen](https://me.csdn.net/z69183787)阅读数:665 [https://www.cnblogs.com/abcwt112/p/7777258.html](https://www.cnblogs.com/abcwt112/p/7777258.html) # 主题   在工作中遇到1个问题....我们定义了一个Controller基类,所有Springmvc自定义的controller都继承它....在它内部定义一个@Autowi...
Java
UTF-8
725
1.96875
2
[]
no_license
package com.example.happyapp; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import Model.DatabaseHandler; public class JournalActivity extends AppCompatActivity { DatabaseHandler objectDatabaseHandler; Button btnSubmitJourn...
C#
UTF-8
5,043
2.734375
3
[ "MIT" ]
permissive
using Moip.Net.Assinaturas; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.IO; using System.Net; using System.Text; namespace Moip.Net { public abstract class BaseClient { #region Properties private readonly string ApiToken; private readonly string ...
C
UTF-8
6,038
2.5625
3
[ "MIT" ]
permissive
/** ****************************************************************************** * @file pid.c * @version V1.0.0 * @date 2016年11月11日17:21:36 * @brief 对于PID, 反馈/测量习惯性叫get/measure/real/fdb, 期望输入一般叫set/target/ref *******************************************************************************...
JavaScript
UTF-8
5,753
3.125
3
[ "MIT" ]
permissive
/* * File: Options.Events.js * */ /* Object: Options.Events Configuration for adding mouse/touch event handlers to Nodes. Syntax: (start code js) Options.Events = { enable: false, enableForEdges: false, type: 'auto', onClick: $.empty, onRightClick: $.empty, onMouseMove: $.e...
Java
UTF-8
2,383
3.25
3
[]
no_license
package ESOPCount; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; /** * * @author Anika Raghuvanshi */ public class ESOPCount { public static void main(String[] args) throws IOException { Scanner reader = new Scanner(System.in); ...
TypeScript
UTF-8
931
2.734375
3
[]
no_license
import applyRules from "../util/applyRules"; import { GetRules, GenericObject, Meta, Module } from "../types"; export type LetterSpacingSupportedTypes = { [key in keyof typeof defaultNames]?: string; }; export type LetterSpacingModuleType = Module<ConfigVariables>; export interface ConfigVariables { values: Gen...
Java
UTF-8
6,652
2.546875
3
[]
no_license
package crafting.UI; import crafting.Filters; import crafting.Main; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.*;...
Java
UTF-8
762
1.703125
2
[]
no_license
package com.catering.service.impl; import com.catering.mapper.QueryAllCount_xpy; import com.catering.service.QueryAllCountService_xpy; import org.springframework.stereotype.Service; import javax.annotation.Resource; @Service public class QueryAllCountServiceImpl_xpy implements QueryAllCountService_xpy { @Resourc...
Ruby
UTF-8
152
2.765625
3
[]
no_license
def three_sum(nums) nums.combination(3).select { |triplet| triplet.sum.zero? }.map(&:sort).uniq end p three_sum([-1, 0, 1, 2, -1, -4]) # @CAT_IGNORE
C
GB18030
4,682
2.765625
3
[]
no_license
#include "tilt.h" #include "lis3dh_driver.h" #include "calender.h" #include "queue.h" #include "app_trace.h" #include <math.h> static float g_cur_Tilt; //ǰDZ仯ֵ //*****************Ǽ************************** #define PI 3.1415926 #if 0 //ˮƽнǣΧ0~180 static float calcu...
Markdown
UTF-8
240
2.515625
3
[]
no_license
TimeAssist ========== This application assist me and identifying the exact amount of time it takes to accomplish tasks throughout my day. Then, using its data, we can analyze the results and reflect on how the user can improve their time.
Java
UTF-8
2,031
2.375
2
[]
no_license
package com.tsc.iorder.domain; public class Orderitem { private int id; private String oid; private int fid; private Food food; private int count; private double total; private Order order; public Orderitem(int id, String oid, int fid, Food food, int count, double total, Order order) {...
JavaScript
UTF-8
1,472
2.609375
3
[]
no_license
import React, { Component } from 'react'; class UserForm extends Component { state = { username: '', password: '' } updateUser = (event) => { const { name, value } = event.target this.setState(() => ({ [name]: value })) } login = (event) => { event.preventD...
JavaScript
UTF-8
2,860
2.890625
3
[]
no_license
#!/usr/bin/env node import { DecisionTree } from './decision-tree'; import { InteractionService } from './InteractionService'; import getopt from 'node-getopt'; import * as fs from 'fs'; import * as path from 'path'; const { options } = getopt.create([ ['f', 'filepath=PATH', 'The path to the data set .csv'], ['d'...
Java
UTF-8
845
3.34375
3
[]
no_license
package pl.sda.javalon4.kalisz.dzien4; public class RokPrzystepny { public static void main(String[] args) { boolean przystepny2019 = jestPrzystepny(2019);// tworzymy boolean zmienna i sprawdzamy czy rok jest przystepny metoda na dole boolean przesteony2020=jestPrzystepny(2020); System.o...
PHP
UTF-8
1,831
2.546875
3
[]
no_license
<?php ob_start(); session_start(); require_once "../Database/Database.php"; $username = mysqli_real_escape_string($conn, trim($_POST['username'])); $password = mysqli_real_escape_string($conn, trim(md5($_POST['password']))); $sql = "SELECT username FROM user WHERE username ='" . $username . "'"; $query = mysqli_query($...
JavaScript
UTF-8
364
3.59375
4
[]
no_license
/** * Return a random number within a range. The min and max values are included * in the possible results. * * @param max {integer} Minimum Value * @param min {integer} Maximum Value * * @returns {integer} Value within the range (inclusive) * */ exports.rand = function(min,max){ return min + M...
Java
UTF-8
3,267
2.109375
2
[ "MIT" ]
permissive
package com.adouge.secure.interceptor; import cn.hutool.json.JSONUtil; import com.adouge.core.tool.utils.WebUtil; import com.adouge.secure.auth.AuthFun; import com.adouge.secure.props.AuthSecure; import com.adouge.secure.provider.HttpMethod; import com.adouge.secure.provider.ResponseProvider; import lombok.AllArgsCons...
TypeScript
UTF-8
428
2.734375
3
[]
no_license
export interface User { id: number; name: string; email: string; created_at: string; updated_at: string; role: string; // constructor(id: number, name: string, email: string, created_at: string, updated_at: string, role: string){ // this.id = id; // this.name = name; // this.email = email;...
Java
UTF-8
2,497
2.515625
3
[]
no_license
package bean; import java.sql.Date; import java.util.ArrayList; public class Porudzbina { public enum kom{da,ne,potvdjen,odbijen}; private long id; // 10 karaktera mora da bude private ArrayList<Artikal> artikli; private Restoran restoran; private Date datumPorudzbine; // datum i vreme zajedno private int cen...
Python
UTF-8
429
2.921875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Mon Oct 1 07:11:24 2018 @author: I340968 """ import networkx as nx import matplotlib.pyplot as plt #G=nx.gnp_random_graph(50,0.3) #Different type of graph G = nx.barabasi_albert_graph(50,2) nx.draw(G) plt.show(G) '''print(G.nodes()) print() print() pri...
Java
UTF-8
1,467
2.9375
3
[]
no_license
package com.example.shaunmesias.assignment_6_2.domain.person; import java.io.Serializable; /** * Created by Shaun Mesias on 2016/04/17. */ public class PersonContact implements Serializable { private String id; private String contactValue; private PersonContact(){} public String getId() { r...
SQL
UTF-8
241
2.859375
3
[]
no_license
USE sql_invoicing; -- Procedure with parameters DROP PROCEDURE IF EXISTS get_clients_by_state; DELIMITER $$ CREATE PROCEDURE get_clients_by_state( state CHAR(2)) BEGIN SELECT * FROM clients c WHERE c.state = state; END$$ DELIMITER ;
Java
UTF-8
10,881
1.507813
2
[]
no_license
package com.example.jeliu.bipawallet.Asset; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.text.method.HideReturnsTransformationMeth...
Java
UTF-8
393
2.078125
2
[]
no_license
package com.lmgd02.template_v1; public class TestPaperA extends TestPaper { private static final String answerA = "a"; public TestPaperA() { } @Override protected String answer1() { return answerA; } @Override protected String answer2() { return answerA; } @O...
C#
UTF-8
839
3.046875
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DateiSortierer.Strategy { class SortManager { private static SortManager instance = null; public ISort SortMethode { get; set; } = new SortDate(); /**private ...
Python
UTF-8
221
2.734375
3
[]
no_license
#!/usr/bin/python # -*- coding: utf-8 -*- import datetime tagad = datetime.datetime.now() print "Šodienas datums ir", tagad.strftime("%d-%m-%Y"), "plkst.", tagad.strftime("%H:%M") print "vai precīzāk, %s" % tagad