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
1,863
2.46875
2
[]
no_license
package com.pro_rate.HelthCare; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; impo...
Python
UTF-8
914
2.71875
3
[ "Apache-2.0" ]
permissive
#!python2 import sys import re from bs4 import BeautifulSoup files = sys.argv[1:] for file in files: print "Cleaning up %s" % file with open(file, 'r') as content_file: content = content_file.read() soup = BeautifulSoup(content, 'html.parser') for toc in soup.select('#toc'): toc.extract...
Java
UTF-8
1,531
2.234375
2
[]
no_license
/* * put your module comment here * formatted with JxBeauty (c) johann.langhofer@nextra.at */ package com.ga.cs.swing.model; import java.util.ResourceBundle; import com.chelseasystems.cr.currency.ArmCurrency; import com.ga.cs.swing.report.mediareport.MediaReportApplet; /** * TableModel for Media Report * @aut...
Markdown
UTF-8
1,092
2.625
3
[]
no_license
--- layout: post title: 'Catching Up on Family News' category: uncategorized --- Seems that there is something in the water down in Memphis because my family has recently gone baby crazy. Congratulations to John and Lisa for the arrival of Elizabeth Marie. Congratulations to Bill and Melissa for the arrival of Matth...
Python
UTF-8
1,321
2.84375
3
[]
no_license
# Title: Vectorizer # Author: Andrew Bossie # Description: Wrapper class and helper functions for word2vec integration from gensim.models import Word2Vec from gensim.test.utils import datapath # import logging # logging.basicConfig(format=’%(asctime)s : %(levelname)s : %(message)s’, level=logging.INFO) class Vecto...
C++
UTF-8
383
3.1875
3
[]
no_license
#include <stdio.h> struct weapon{ int price; int atk; struct weapon * next; }; int main() { struct weapon a,b,c, *head; a.price=100; a.atk=100; b.price=200; b.atk=200; c.price=300; c.atk=300; head = &a; a.next = &b; b.next = &c; c.next = NULL; struct weapon *p; p = head; while(p!=NULL) { printf("...
Java
UTF-8
294
1.734375
2
[]
no_license
package com.hieudn.mta.repository; import com.hieudn.mta.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> { }
C++
UTF-8
2,768
4.21875
4
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; // Arrange given numbers to form the biggest number | Set 1 // Reference Link: https://www.geeksforgeeks.org/given-an-array-of-numbers-arrange-the-numbers-to-form-the-biggest-number/ // http://www.cplusplus.com/reference...
Markdown
UTF-8
1,566
2.53125
3
[ "CC0-1.0" ]
permissive
# Dataset language **Purpose**: If the type of the resource is dataset or series, a resource language must be given. **Prerequisites** * [Hierarchy](./hierarchy) **Test method** This test case only applies to records with a [hierarchyLevel](#hierarchyLevel) value 'dataset' or 'series'. The test first checks if a ...
Java
UTF-8
4,069
2.609375
3
[]
no_license
package com.shinwootns.common.mq.client; import java.util.ArrayList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.rabbitmq.client.AMQP.Exchange; import com.rabbitmq.client.QueueingConsumer.Delivery; import com.rabbitmq.client.Channel; import com.rabbitmq.client.QueueingConsumer; p...
Python
UTF-8
5,684
2.546875
3
[ "Apache-2.0" ]
permissive
import boto3 import json from datetime import datetime, timedelta from boto3.dynamodb.conditions import Key, Attr # Get the service resource. dynamodb = boto3.resource('dynamodb') #Get Table Objects Child_Table = dynamodb.Table('Child_Tasks') Parent_Table = dynamodb.Table('Parent_Tasks') #Scans Parent Table def AltV...
Python
UTF-8
1,458
2.703125
3
[]
no_license
#This file for download DisGeNET database with API #build by XiaoyingLv at 2020.9.8 import requests import json import csv import datetime import argparse #get paramter from the external environment def get_parser(): """ Parameters Parser """ parser = argparse.ArgumentParser(description="Using the URL API to s...
C++
UTF-8
332
2.765625
3
[]
no_license
#include"array.h" //Constructor DynamArr::DynamArr(int numOfEntries){ m_numOfEntries = numOfEntries; m_dynArr = new int[m_numOfEntries]; } //Copy Constructor DynamArr::DynamArr(DynamArr &dynamArr){ m_dynArr = new int[m_numOfEntries]; *m_dynArr = *dynamArr.m_dynArr; } //Destructor DynamArr::~DynamArr(){ delete[]...
Java
UTF-8
1,663
2.75
3
[]
no_license
package com.neo.datamanager; import java.io.*; import java.util.Properties; public class Test { /** * 读取jar包内的配置文件 * @return */ private static Properties getConfigInfoIn() { InputStream is = Test.class.getResourceAsStream("/config2.properties"); Properties prop = new Propert...
C#
UTF-8
659
3.046875
3
[]
no_license
using Curs20.AbstractFactory; using System.Collections.Generic; namespace Curs20.Builder { /// <summary> /// The 'Builder' abstract class /// First version /// </summary> public abstract class AbstractOptionBuilder { protected Car car; protected List<Option> options = new List<...
JavaScript
UTF-8
951
2.796875
3
[]
no_license
$(document).ready(()=>{ setInterval(()=>{ $.get("http://localhost/smartconnect/?reqType=1&reqDevId=1&reqStatusData=0", function(data, status){ if(status === "success"){ showStatus(data); } }); },800); }); function showStatus(readObj){ var bulbObj = '<div class="card"><cente...
Java
UTF-8
758
2.90625
3
[]
no_license
package com.pekey.framework.observer_method.subject; import com.pekey.framework.observer_method.sbserver.Observer; import java.util.Enumeration; import java.util.Vector; public class AbstractSubject implements Subject { private Vector vector = new Vector(); @Override public void add(Observer observer)...
PHP
UTF-8
15,313
2.53125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Jtl\Connector\Core\Model; use JMS\Serializer\Annotation as Serializer; /** * A config Item that is displayed in a config Group. * Config item can reference to a specific productId to inherit price, name and description. * * @access public * @package Jtl\Connector...
JavaScript
UTF-8
779
2.546875
3
[]
no_license
import {actionTypes} from '../ActionTypes/registration'; export const initialState = { pending: false, info: {}, error: null } export function registrationReducer(state = initialState, action) { switch(action.type) { case actionTypes.REGISTRATION_PENDING: return { ...
Java
UTF-8
3,767
2.5625
3
[ "MIT" ]
permissive
package main.java.expr; import java.util.HashMap; import java.util.Objects; import main.java.data.D_Binding; import main.java.data.D_List; import main.java.data.D_Set; import main.java.data.Obj; import main.java.evaluator.Evaluator; import main.java.evaluator.TypeCheck; import main.java.expr.contin.C_ApplyInfixOp; im...
JavaScript
UTF-8
3,200
2.984375
3
[ "Unlicense" ]
permissive
// TODO: // 1. Handle depths // 2. Handle areafill // 3. Handle all types and subtypes // 4. Handle penstyle // 5. Handle style // 6. Handle diffs // 7. Build display list sorted by depth var scale = 0.2; var x1 = 0; var y1 = 0; var display_list = []; function trans_x(p) { return (p - x1) * scale; } function tra...
Python
UTF-8
9,266
3.046875
3
[ "MIT" ]
permissive
"""Analog log report object.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import Counter, defaultdict, OrderedDict import time from analog.renderers import Renderer from analog.utils import PrefixMatchingCounter try: from statisti...
C#
UTF-8
1,062
3.984375
4
[]
no_license
using System; namespace MathLibrary { public class MathRoutines { public static decimal Add(decimal num1, decimal num2) { return Math.Round((num1 + num2), 2); } public static decimal Subtract(decimal num1, decimal num2) { return Mat...
TypeScript
UTF-8
202
2.53125
3
[ "MIT" ]
permissive
export abstract class VirtualComponent { protected _root: HTMLElement; get root() { return this._root; } constructor(root?: HTMLElement) { this._root = root; } }
Python
UTF-8
3,521
2.96875
3
[ "MIT" ]
permissive
import constants as c import utils.misc as misc from utils.misc import log_print def build_semantic_graphs(dependency_graphs, disambiguations): """ Transform each pair of dependency parsed sentence-disambiguated sentence into a syntactis-semantic graph. :param dependency_graphs: a spaCy dependency parsed sentence...
C++
UTF-8
718
2.96875
3
[]
no_license
#include <iostream> #include <cstdio> #include <stdlib.h> #include <algorithm> using namespace std; typedef struct Activity { int begin_; int end_; bool operator <( const Activity b) const { return end_ < b.end_; } }; int main() { int n,len,ans,temp; Activity activities[1001]; ...
JavaScript
UTF-8
1,190
2.5625
3
[]
no_license
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import MyButton from './component/myButton' import List from './component/List' import Input from './component/Input' export default class App extends React.Component { state = { myState: 'Lorem ipsum dolor sit amet' } updateSt...
Java
UTF-8
757
2.890625
3
[]
no_license
package org.crazystudios.input; import org.crazystudios.graphics.Images; import org.crazystudios.graphics.Screen; public class Button { private final transient Images imageb; private final transient Images simageb; public transient int x, y; public transient boolean hovered; public Button(final Images imag...
Python
UTF-8
169
3.625
4
[]
no_license
import datetime d1 = datetime.date.today() print(d1) # 昨天 d2 = d1 - datetime.timedelta(days=1) print(d2) # 7天后 d3 = d1 + datetime.timedelta(days=7) print(d3)
Markdown
UTF-8
5,611
2.65625
3
[ "MIT" ]
permissive
--- layout: page title: Welcome to CrossVillage image: feature: abstract-5.jpg comments: false --- > CrossVillage is a side event of CrossCTF 2018 where we invited three speakers to give talks on **17th June 2018**. More details on the talks can be found below. --- ## Overview **Anyone** is welcomed to register ...
SQL
UTF-8
811
3.625
4
[]
no_license
/* Users: -id: serial -username: character varying(55) -passwordHash: character varying(255) Items: -id: serial -name: character varying(55) -userId: int -key: int -own: boolean */ CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, username CHARACTER VARYING(55) NOT NULL, passwordHash CHARACTER VARY...
TypeScript
UTF-8
1,092
2.765625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
import {MediaAudio, VoiceContentType} from "../../src"; import {expect} from "chai"; const chai = require('chai'), chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); describe("MediaAudio", () => { it("sets constructor values properly", () => { const mediaAudio = new MediaAudio('...
Java
UTF-8
154
2.171875
2
[ "CC-BY-4.0", "MIT" ]
permissive
package lljvm.io; public interface StandardHandleFactory { FileHandle createStdin(); FileHandle createStdout(); FileHandle createStderr(); }
Shell
UTF-8
292
2.671875
3
[ "MIT" ]
permissive
#!/bin/bash num=$1 zero=0 for((integer=1; integer<=12; integer++)) do { condition=`expr $integer % 1` if [ "$condition" == 0 ] then ./console.py sendtx ExchangeV2 0xa72db07ffb5befe9c9e8264c2224a8b3b7d4e8f4 transfer ${integer} 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A fi }& done
C
UTF-8
907
2.859375
3
[]
no_license
#include <stdio.h> int main() { int i,j,stepen; int paskalovTrougao[100][102]; paskalovTrougao[0][0]=0;paskalovTrougao[0][1]=1;paskalovTrougao[0][2]=0; for(i=1;i<100;i++) { paskalovTrougao[i][0]=0;paskalovTrougao[i][i+2]=0; for(j=1;j<i+2;j++) { paskalovTrougao[i][j]=paskalovTrougao[i-1][j-1]+p...
C
UTF-8
986
2.640625
3
[]
no_license
#include <gdt.h> #define GDT_LENGTH 5 gdt_entry_t gdt_entries[GDT_LENGTH]; gdt_ptr_t gdtr; void init_gdt() { gdtr.limit = sizeof(gdt_entry_t) * GDT_LENGTH - 1; gdtr.base = (uint32_t)&gdt_entries; gdt_set_gate(0, 0, 0, 0, 0); // null seg gdt_set_gate(1, 0, 0xffffffff, 0x9a, 0xcf); // cod...
Python
UTF-8
936
3.046875
3
[]
no_license
import numpy as np from keras.models import Sequential from keras.layers import Dense import numpy # fix random seed for reproducibility numpy.random.seed(0) # Input array # Example: 5 groups of data. Each group of data has 4 input features. X = np.array([[1,0,1,0],[1,0,1,1],[0,1,0,1],[0,0,1,1],[1,1,1,1]]) # Output...
Java
UTF-8
502
2.75
3
[]
no_license
package com.izhaoyan.util; import java.awt.*; /** * Created by Rockyan on 2016/5/7. */ public class UiUtils { public static void placeToCenter(Container container) { Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) (dimension.getWidth() - container.get...
Java
UTF-8
640
1.515625
2
[]
no_license
package com.zoovisitors; import android.support.v7.app.AppCompatActivity; import com.zoovisitors.bl.BusinessLayer; import com.zoovisitors.pl.BaseActivity; /** * Created by aviv on 10-Jan-18. */ public class GlobalVariables { public static boolean DEBUG = false; public static String ServerAddress = "negevzo...
Java
UTF-8
988
2.84375
3
[]
no_license
package codejams; import java.io.BufferedReader; import java.io.FileReader; import java.io.PrintWriter; public class Main { // debug switch public static final boolean debug = false; // target filename - will read fname.in, and output to fname.out public static final String fname = "files\\competit...
C++
UTF-8
2,961
2.515625
3
[ "MIT" ]
permissive
#include "../../gi.h" #include "../../util.h" #include "rectangle.h" using namespace v8; namespace GNodeJS { namespace Cairo { Nan::Persistent<FunctionTemplate> Rectangle::constructorTemplate; Nan::Persistent<Function> Rectangle::constructor; /* * Initialize Rectangle. */ void Rectangle::Initialize(...
Markdown
UTF-8
84,353
2.5625
3
[]
no_license
* * * * * **Council Bill Number: [](#h0)[](#h2)116146** **Ordinance Number: 122643** * * * * * AN ORDINANCE relating to the Seattle Department of Parks and Recreation; authorizing the Superintendent of Parks and Recreation to enter into a Lease Agreement with the Victory Heights Cooperative Preschool ...
C
UTF-8
377
3.1875
3
[]
no_license
#include <stdio.h> int main(){ int kasus, n, b, k, h, v, baris, kolom; scanf("%d", &n); for(kasus=1;kasus<=n;kasus++){ scanf("%d %d %d %d", &b, &k, &h, &v); for(baris=1;baris<=b;baris++){ for(kolom=1;kolom<=k;kolom++){ if(kolom == v || baris == h) printf("ANJING"); else if(kolom<v) printf(" "); } ...
Shell
UTF-8
766
2.640625
3
[ "MIT" ]
permissive
#!/bin/bash # pritunl sudo tee /etc/apt/sources.list.d/pritunl.list << EOF deb http://repo.pritunl.com/stable/apt xenial main EOF sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A # mongodb wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-k...
C++
UTF-8
2,130
2.625
3
[]
no_license
#include "Cfg_SDL.h" int Cfg_SDL::initSDL() { if (SDL_Init(SDL_INIT_VIDEO) < 0) { return Cfg_SDL::ERROR_SDL_INIT; } return 0; } int Cfg_SDL::defaults(SDL_Window*& window, SDL_GLContext& context, unsigned int screenWidth, unsigned int screenHeight, unsigned int sMinor, unsigned int sMajor, bool hasAA) { unsigne...
Java
UTF-8
2,115
1.914063
2
[]
no_license
package toker.panel.config; import org.openid4java.consumer.ConsumerManager; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.boot.web.servlet.MultipartConfigFactory; import org.springframework.context.annotation.B...
PHP
UTF-8
1,591
2.859375
3
[]
no_license
<style media="screen"> *{ margin: 0; padding: 0; box-sizing: border-box; } .container { background-color: lightblue; width: 100vw; height: 100vh; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 10px; font-weight...
JavaScript
UTF-8
1,166
2.875
3
[ "MIT" ]
permissive
var socket = io.connect('http://localhost:4000/'); var nickname = undefined; var textcolor = undefined; socket.on('connected', function(name, color) { $('.connecting').slideUp(); $('input').attr('disabled', false); $('#name').text('Hello, '+name); $('#name').addClass(color); nickname = name textcolor = co...
TypeScript
UTF-8
4,073
2.59375
3
[ "MIT" ]
permissive
import AbstractAdapter from './Adapter/AbstractAdapter'; import InMemoryAdapter from './Adapter/InMemoryAdapter'; import {Counter, Gauge, Histogram, MetricInterface} from './Metric'; import MetricFamilySamples from './MetricFamilySamples'; export default class Registry { public static getDefault(): Registry { ...
Java
UTF-8
5,940
2.59375
3
[]
no_license
package pool; import jdbc.servlet.todo.pool.ExpireGenericPool; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.NoSuchElementException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; public class TestE...
Java
UTF-8
601
2.375
2
[]
no_license
package AAAAAAPracs.async; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * @author bockey */ @Slf4j @Component public class TaskTest { // 间隔1秒执行一次 @Asy...
Python
UTF-8
3,388
4
4
[]
no_license
# open(‘文件所在位置+文件名’,‘对文件处理的方式(r,w,a)‘ ,encoding = '编码形式(如utf-8)') ‘r’只读,'r+'读写模式 # f = open('11.text','r',encoding='utf-8') #打开文件的编码要与文件本身的编码要一致 # a = f.read() #read()将文件中的所有内容读出 # print(a) # b = f.readable() #判断文件是否可以读出来,返回bool值 # print(b) # c = f.rea...
C++
UTF-8
13,137
2.921875
3
[ "MIT" ]
permissive
#include <Rcpp.h> #include "ColorSpace.h" #include "Comparison.h" #include <memory> using namespace Rcpp; // returns the number of dimensions for a color space type // with a special case for Cmyk template <typename SPACE> inline int dimension(){ return 3 ; } template <> inline int dimension<ColorSpace::Cmyk>(){ ...
Markdown
UTF-8
1,467
2.734375
3
[]
no_license
Projekt zawiera trzy kontenery: php, mysql oraz apache. Kontenery działają w dwóch sieciach: backend oraz frontend. Do sieci backend sa podłączone wszystkie trzy kontenery, natomiast do sieci frontend jest podłączony tylko kontener apache. Kontener php jest oparty o obraz PHP. Kontener mysql oparty jest o MySQL. Konten...
Java
UTF-8
1,555
3.140625
3
[]
no_license
package statement.value; import exception.SQLException; import sqlparser.Token; import sqlparser.TokenStream; public class Value { private final String value; private float floatVal; private int intVal; private boolean intLiteral = false; private boolean floatLiteral = false; public Value(TokenStre...
Java
UTF-8
470
1.601563
2
[]
no_license
package com.ggs.gulimall.member.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ggs.common.utils.PageUtils; import com.ggs.gulimall.member.entity.MemberCollectSpuEntity; import java.util.Map; /** * 会员收藏的商品 * * @author starbug * @email a1285226024@gmail.com * @date 2020-12-14 13:1...
Python
UTF-8
174
3.765625
4
[]
no_license
def fibonacci(num): f0 = 0 f1 = 1 for k in range(num): f2 = f0 + f1 yield f1 f0, f1 = f1, f2 for f in fibonacci(5): print("fib=", f)
Java
UTF-8
13,939
2.140625
2
[]
no_license
package com.danthecodinggui.recipes.model; import android.content.ContentProvider; import android.content.ContentUris; import android.content.ContentValues; import android.content.UriMatcher; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteQueryBuilde...
Python
UTF-8
351
2.921875
3
[]
no_license
# q2 # from examplepackage.symbols import happy_symbol # print(happy_symbol) #q3 from examplepackage.symbols import * x = all(x in globals() for x in ["happy_symbol", "sad_symbol", "confused_symbol", "all_symbols"]) print(x) print(all_symbols) #q4 import examplepackage y = all(examplepackage.functions.is_symbol(s) f...
Java
UTF-8
403
2.40625
2
[]
no_license
package inter; public class P extends Node{ public static P Null = new P(); public Id firstP = null; public Pl pl = null; public P(){} public P(Id p1,Pl pl) { this.firstP = p1; this.pl = pl; } public void gen() { if(this.firstP != null) emit("parm...
Java
UTF-8
610
2.671875
3
[]
no_license
package sorcery.api.spellcasting; import java.util.ArrayList; import sorcery.api.element.ElementStack; public class CastInfo { public ElementStack[] elements = new ElementStack[] {}; public int mojoCost; /** 0 = Right; 1 = Left */ public final int castingHand; public CastInfo(ElementStack[] ele...
Markdown
UTF-8
3,094
3
3
[]
no_license
// Friday, 29 Jan 2021 1. 8 Kyu (https://www.codewars.com/kata/53da3dbb4a5168369a0000fe) Even or Odd 2. 8 Kyu (https://www.codewars.com/kata/54d1c59aba326343c80000e7) Incorrect Division Method 3. 7 Kyu (https://www.codewars.com/kata/54ff3102c1bad923760001f3) Vowel Count 4. 7 Kyu (https://www.codewars.com/k...
C#
UTF-8
826
2.515625
3
[ "MIT" ]
permissive
// Copyright © John Gietzen. All Rights Reserved. This source is subject to the MIT license. Please see license.md for more information. namespace MediaLibrary.Views { using System.Windows.Forms; public partial class NameInputForm : Form { public NameInputForm() { this.Initiali...
Java
UTF-8
1,945
2.3125
2
[]
no_license
package atlantis.com.atlantis.fragments; import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.Toast; import atlantis.com.atlantis.R...
Java
UTF-8
1,987
2.140625
2
[]
no_license
package com.hanweb.jmp.cms.entity.infos; import com.hanweb.common.annotation.Column; import com.hanweb.common.annotation.ColumnType; import com.hanweb.common.annotation.Id; import com.hanweb.common.annotation.Table; import com.hanweb.common.annotation.Index; import com.hanweb.common.annotation.Indexes; import com.han...
C++
UTF-8
3,672
2.515625
3
[]
no_license
int irin = 2; int green = 11; int red = 12; int led = 13; int Pin1 = 5; int Pin2 = 6; int Pin3 = 9; int Pin4 = 10; int bitsize = 4; int timeout = 200; int count_unit = 100; int one = 16; int zero = 0; int flag_receive=0; volatile int enableMortor=0; volatile int enableMelody=0; void setup(){ pinMode(irin, I...
Java
UTF-8
1,890
2.625
3
[ "MIT" ]
permissive
package mage.cards.t; import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.SurgedCondition; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; i...
Python
UTF-8
399
2.6875
3
[]
no_license
import os,random, time pullData = open("sampleText.txt","w") def _writin_(): start = time.time() while True: i = random.randint(0,69) y = random.randint(0,69) pullData.write(str(i)+","+str(y)+os.linesep) try: end = time.time() delta = end-s...
Java
UTF-8
1,247
2.71875
3
[ "Apache-2.0" ]
permissive
package pc; import java.io.File; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.atomic.AtomicLong; /** * Intended to hold shared state between Consumers * */ public class Context { public ConcurrentHashMap<String, ...
Java
UTF-8
408
1.5625
2
[]
no_license
package com.yyt.service.company.impl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.yyt.dao.BaseDaoImpl; import com.yyt.orm.company.ServicePrice; import com.yyt.service.company.ServicePriceService; @Service @Transactional public class Servi...
Java
UTF-8
2,670
3.875
4
[ "Apache-2.0" ]
permissive
package com.sauzny.jkitchen_note.thread; import java.util.concurrent.locks.LockSupport; public class WaitParkSleep { private final String anyTHing = ""; public void foo01(){ // 线程1 wait Thread thread1 = new Thread(() ->{ try { // 必须获得对象上的锁后,才可以执行该对象的wait方法。否则程序会...
Java
UTF-8
502
2.40625
2
[]
no_license
/* * Created on Mar 14, 2005 * * */ package com.fsrin.menumine.core.crosstab; /** * @author Nick * * */ public class CrossTabulationCellTotal { private int count = 0; public void incrementCount() { count++; } public Double getColumnPercentage() { re...
PHP
UTF-8
1,250
3.046875
3
[]
no_license
<?php declare(strict_types=1); namespace CultuurNet\UDB3\Search\Offer; use CultuurNet\UDB3\Search\UnsupportedParameterValue; final class Status { private const AVAILABLE = 'Available'; private const UNAVAILABLE = 'Unavailable'; private const TEMPORARILY_UNAVAILABLE = 'TemporarilyUnavailable'; priva...
JavaScript
UTF-8
535
2.546875
3
[ "MIT" ]
permissive
/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */ var x = S$.symbol("X", ''); //The lack of anchors ^ and $ means ...
Markdown
UTF-8
2,488
3.65625
4
[]
no_license
# JavaScript基础Day02_Math对象_数据类型转换_逻辑运算符_等号逗号运算符_分支结构_条件表达式 [TOC] ## Math 对象 方法 | 说明 ----|---- abs(x) | 绝对值 ceil(x) | 向上取整(天花板函数) floor(x) | 向下取整(地板函数) round(x) | 四舍五入值 max(x,y) | 返回x 和 y 中的最大值 min(x,y) | 返回x 和 y 中的最小值 pow(x,y) | 返回x 的 y 次幂 random() | 返回 0-1 之间的随机数 没有0和1 ###写法 ```JavaScript var n1 = Math.ceil(2...
Ruby
UTF-8
726
2.875
3
[ "MIT" ]
permissive
require_relative "york/student_info" class MarkingSystem def add_marks(module_code, year, marks) registry = York::StudentInfo.instance mod = registry.find_module(module_code, true) assessment = registry.create_assessment(mod, year) marks.each do |student_number, mark| registry.add_mark(assessm...
SQL
UTF-8
635
2.578125
3
[]
no_license
SELECT * FROM SYS.DBA_OBJECTS WHERE OWNER IN ('USER명') AND OBJECT_TYPE = 'TABLE' AND LAST_DDL_TIME >= TO_DATE('20190101', 'yyyymmdd') ORDER BY LAST_DDL_TIME DESC; /* OBJECT_TYPE 1 INDEX 2 TABLE SUBPARTITION 3 TYPE BODY 4 JAVA CLASS 5 PROCEDURE 6 INDEX SUBPARTITION 7 JAVA RESOURCE 8 TABLE PA...
Python
UTF-8
1,634
2.75
3
[]
no_license
import os from flask import Flask, request, render_template from flask_pymongo import PyMongo app = Flask(__name__) app.config['MONGO_DBNAME'] = 'first_databse' # name of your database app.config['MONGO_URI'] = os.getenv('MONGO_URI', 'mongodb+srv://marta_korts_laur:AstelV88l@cluster0-utrzr.mongodb.net/test?retryW...
Java
UTF-8
153
1.640625
2
[]
no_license
package com.vas.aos.core.application.service; import java.util.UUID; public interface RequestOrderPaymentService { void requestPayment(UUID id); }
Java
UTF-8
1,507
1.9375
2
[]
no_license
package com.example.tinymall.entity; import java.time.LocalDateTime; import javax.persistence.*; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString @Table(name = "tinymall_ad") public class TinymallAd { @Id @Column(name = "id") @GeneratedValue(strategy = Generati...
Python
UTF-8
501
3.875
4
[]
no_license
def mode(nums): """Return most-common number in list. For this function, there will always be a single-most-common value; you do not need to worry about handling cases where more than one item occurs the same number of times. >>> mode([1, 2, 1]) 1 >>> mode([2, 2, 3, 3, 2]) ...
PHP
UTF-8
1,296
3.953125
4
[]
no_license
<?php abstract class Animal { static $id = 1; public $idAnimal; public abstract function getProduct(); public function getClass() { return static::class; } } class Cow extends Animal { function __construct() { $this->idAnimal=parent::$id++; } public function ...
Java
UTF-8
2,462
2.546875
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 DAL; /** * * @author Admin */ import java.util.List; import BLL.Puntori; import javax.persistence.Query; public class Pun...
Swift
UTF-8
2,127
2.859375
3
[]
no_license
// // MovieService.swift // moviePicker // // Created by Ajay Kumar on 12/18/15. // Copyright © 2015 NexGen. All rights reserved. // import Foundation protocol MovieServiceDelegate { func setMovie(movie: Movie) } class MovieService { var delegate: MovieServiceDelegate? func getMovie(movieTi...
JavaScript
UTF-8
698
3.171875
3
[]
no_license
// const btn = document.getElementById('btn'); // let seter = true; // btn.onclick = function () { // if(seter){ // window.localStorage.setItem('key', JSON.stringify({name: 'Stiv'})); // seter = false; // } else { // console.log(JSON.parse(window.localStorage.getItem('key'))) // window.localStorage.remove...
Java
UTF-8
4,269
2.109375
2
[]
no_license
/* * Copyright (c) 2014 ReasonDev * All rights reserved. */ package net.avonmc.dungeons.dungeon; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.bukkit.selections.Selection; import net.avonmc.dungeons.Dungeons; import net.avonmc.dungeons.util.Configuration; import net.avonmc.dungeons.util.Messaging; ...
Python
UTF-8
533
3.9375
4
[]
no_license
# The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students. # Print the average of the marks array for the student name provided, showing 2 places after the decimal. if __name__ == '__main__': n = 3 inputs = [['Krishna',67,68,69],['Arjun',70,98,63],['Ma...
C#
UTF-8
9,704
2.5625
3
[]
no_license
using Dapper; using Domain; using Domain.Model; using Domain.Statuses; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; namespace DataAccess { public class OrderRepository : IOrderRepository { private readonly ISqlDat...
Python
UTF-8
438
3.375
3
[ "MIT" ]
permissive
# Time: O(n) # Space: O(1) class Solution(object): def numSteps(self, s): """ :type s: str :rtype: int """ result, carry = 0, 0 for i in reversed(xrange(1, len(s))): if int(s[i]) + carry == 1: carry = 1 # once it was set, it would keep c...
C++
UTF-8
5,651
3.09375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Seat{ private: bool aisle; bool occupied; public: Seat(){ aisle = false; occupied = false; } void set_aisle(bool b){ aisle = b; } bool is_aisle(){ return ai...
C++
UTF-8
1,492
2.5625
3
[ "MIT" ]
permissive
#ifndef HYBRID_HEIGHT_H #define HYBRID_HEIGHT_H #include "compiled_plugin.h" #include "compiled_plugin_base.h" #include <future> namespace himan { namespace plugin { class hybrid_height : public compiled_plugin, private compiled_plugin_base { public: hybrid_height(); virtual ~hybrid_height() = default; hybrid...
Markdown
UTF-8
4,427
2.75
3
[]
no_license
# Version Control System : git with Sourcetree git - MS Windows version - version : 2.92.2 - Homepage : https://www.git-scm.com Sourcetree - Version : 3.4.5 - Homepage : https://www.sourcetreeapp.com ## Setup ### Set-up User **git bash** ``` $ git config --global user.name "<user_name>" $ git config --global user....
Markdown
UTF-8
1,546
3.71875
4
[ "MIT" ]
permissive
--- layout: post --- ES6 introduces a new keyword "let" that sits alongside var as a way to declare variables. The let keyword is different to var in that it attaches the variable declaration to the scope of whatever block (usually pair of { }) its contained within. {% highlight javascript %} (function(){ "use str...
Java
UTF-8
2,987
2.375
2
[]
no_license
package baking.example.android.bakingapp; import android.app.IntentService; import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import baking.example.android.bakingapp.data.AppDatabase; import baking.example.android.bakingapp....
Go
UTF-8
3,399
3.53125
4
[ "Apache-2.0" ]
permissive
package test const ( KeySizeScenario = "increasing-key-size" ValueSizeScenario = "increasing-value-size" ObjectCountScenario = "increasing-objects-count" Put = "put" Get = "get" ) // Evolve represents an evolution logic for a given scenario parameters type Evolve func(scenar...
Python
UTF-8
475
2.65625
3
[]
no_license
import cv2 import numpy as np cap =cv2.VideoCapture(0) while True: ret, frame = cap.read() hsv= cv2.cvtColor(frame,cv2.COLOR_BGR2HSV) rojo_min= np.array([136,87,111]) rojo_max= np.array([180,255,255]) mascara= cv2.inRange(hsv, rojo_min, rojo_max) bits= cv2.bitwise_and(frame, frame, mask =mas...
TypeScript
UTF-8
1,002
2.609375
3
[]
no_license
import * as fromModels from '../../models'; import * as fromFeaturebar from '../actions/featurebar.action'; export interface FeaturebarState { title: string; back: fromModels.FeaturebarBack; crumbs: fromModels.FeaturebarLink[]; tabs: fromModels.FeaturebarLink[]; } export const initialState: FeaturebarState = ...
JavaScript
UTF-8
1,336
2.671875
3
[]
no_license
import React, { Component } from "react"; import { Link } from "react-router-dom"; import "./Posts.css"; import Post from "../../../components/Post/Post"; class Posts extends Component { state = { posts: [], }; async componentDidMount() { // console.log(this.props); try { const res = await fe...
Ruby
UTF-8
985
3.265625
3
[]
no_license
class Pager attr_reader :post_num def initialize(post_num = 3) @post_num = post_num end def paginate(directory, num_page) page = directory[((num_page - 1) * @post_num)..(num_page * (@post_num - 1))] page.each do |post| case post.sponsored when "no" puts "#{post.title.capitalize}...
Python
UTF-8
2,830
3.078125
3
[ "MIT" ]
permissive
#!/usr/bin/env python import rospy from std_msgs.msg import String class RobotVoiceOperation: #define the constructor of the class def __init__(self): #initialize the ROS node with a name voice_op rospy.init_node('voice_op') # Publish the String message to the audio_conntrol topic ...