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
C++
UTF-8
1,494
3.09375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <unordered_set> #include <vector> #include <algorithm> #include <string> using namespace std; class Path { public: int dest, bessie, elsie; Path(int adest, int abessie, int aelsie) { dest = adest; bessie = abessie; elsie = aelsie; } }; void OPEN(string inputF...
Go
UTF-8
3,338
2.71875
3
[ "MIT" ]
permissive
package db import ( wallet "github.com/ali2210/wizdwarf/db/cloudwalletclass" walletAcc "github.com/ali2210/wizdwarf/structs" "fmt" "context" firebase "firebase.google.com/go" ) // constants const collectionName string = "EthereumPrivateLedger" // Interface type PublicLedger interface{ // Public Ledger...
Markdown
UTF-8
7,342
2.96875
3
[]
no_license
# ๋กœ๊ทธ ํด๋ž˜์Šค ๋ฑ(Rogue Class Deck) ## `Lesath`๊ฐ€ ์ž์‹ ์˜ ํ„ด ๋์— ํ‘œ์‹œ๋œ ๋ชฌ์Šคํ„ฐ๋ฅผ ์ œ๊ฑฐํ•˜๋ฉด ๋‹ค์‹œ ํ‘œ์‹œํ•ด์•ผ ํ•˜๋‚˜์š”(If Lesath banishes a displayed monster at the end of his turn, does he then have to display it again)? ์•„๋‹ˆ์˜ค, ๊ทธ๋Ÿฌ๋ฉด ๋ชฌ์Šคํ„ฐ๋“ค์ด ์ œ๊ฑฐ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๊ฒƒ์€ ์•„๋‹™๋‹ˆ๋‹ค. > No, because then they would never get banished. That's no good. > Resolution: On Lesath's charac...
C++
UTF-8
2,162
2.703125
3
[]
no_license
//headers using namespace std; #include<cstring> #include<vector> #include<map> #include<iostream> #include<math.h> #include<queue> #include<cstdlib> #include<ctype.h> #include<string> #include<cstdio> #include<algorithm> /**********INPUT******/ #define sint(a) scanf("%d",&a) #define pint(a) printf("%d",a) //...
Java
UTF-8
5,357
1.84375
2
[]
no_license
package com.BFMe.BFMBuyer.ugc.activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.view.View; import com.BFMe.BFMBuyer.R; import com.BFMe.BFMBuyer.commodity.activity.ProducetDetailsActivity; import com.BFMe.BFMBuyer.base.IBaseActivity;...
Java
UTF-8
900
3.21875
3
[]
no_license
package interviewBits.tree.treeConstruction; import interviewBits.tree.TreeNode; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static interviewBits.tree.treeConstruction.InOrderCartesianTree.buildTree; /** * Created by labuser on 8/2/17. */ public class SortedArratToBalancedBST {...
C++
UTF-8
1,316
3.21875
3
[]
no_license
/** * \file test.cpp * \author Dennis Terhorst * \date Wed Aug 19 18:15:03 CEST 2009 */ /* class screen : public ncurses_element { void redraw() { this->redraw_children(); ncurses::Refresh(); } }; */ /* * #include "ncurses_screen.h" #include <string.h> class textbox : public ncurses_element { unsigned i...
C#
UTF-8
199
2.546875
3
[]
no_license
public void ChangeList<T>(ref List<T> source, T value) { //Actions source = new List<T>; // or initialize using API/DB call source.Add(value); //Actions }
Java
UTF-8
1,379
3.421875
3
[]
no_license
package ex1.part2; import java.util.ArrayList; import java.util.Random; /** * Created by mipopescu on 7/20/2016. */ public class Main { public static final int PROBLEM_SIZE = 100000; public static final int N_THREADS = 4; public static final long RANDOM_SEED = 7; public static void main(String[] ar...
JavaScript
UTF-8
1,696
2.578125
3
[]
no_license
import { zeroFill } from "./Utils"; import { uploadLogContent } from "./cFetch"; class LogUtil { static DEBUG = 0; static INFO = 1; static WARN = 2; static ERROR = 3; static debug = false; static mqttDebug = false; static limit = false; static limitNum = 100; static uploadNum = 20; } let logs = []; LogUti...
Python
UTF-8
1,446
2.578125
3
[]
no_license
# https://atcoder.jp/contests/abc187/tasks/abc187_d # # def input(): return sys.stdin.readline().rstrip() # # input = sys.stdin.readline # from numba import njit # from functools import lru_cache # sys.setrecursionlimit(10 ** 7) # from itertools import product import sys input = sys.stdin.buffer.readline ...
Python
UTF-8
2,546
2.515625
3
[]
no_license
#!/usr/bin/env python # ============================================================================= # # Consume messages from Confluent Cloud # Using Confluent Python Client for Apache Kafka # # ============================================================================= from confluent_kafka import Consumer, Topic...
Java
UTF-8
4,979
2.046875
2
[]
no_license
package com.quark.wificontrol.ui.user; import android.graphics.Paint; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.loopj.android.http.AsyncHttpResponseHandler; import com.quark.ap...
Python
UTF-8
1,378
3.5625
4
[]
no_license
import csv import matplotlib.pylab as plt #import pylab as pl import operator csvfile = open("firebug2.csv", 'r') myDict = {} for line in csvfile.readlines(): #print(line) array = line.split(',') if array[3] in myDict: myDict[array[3]] = myDict[array[3]]+1 else: myDict[array[3]] = 1 for k, v in myDict.item...
Shell
UTF-8
571
3.25
3
[]
no_license
#!/bin/bash echo "Getting public key from Sealed Secrets secret and copying it to ~/bitnami" echo "Create dir for Sealed Secrets public key. (~/bitnami)." mkdir -p ~/.bitnami echo "Backup secret itself" oc get secret -o yaml -n sealed-secrets -l sealedsecrets.bitnami.com/sealed-secrets-key=active > ~/.bitnami/sealed...
Java
UTF-8
271
2.546875
3
[]
no_license
package Algorithm; public class D2_LS2 { public static void main(String[] args) { LinearSearch2 ls2 = new LinearSearch2(); ls2.add(1, "one"); ls2.add(10, "ten"); ls2.add(2, "two"); System.out.println(ls2.search(10)); } }
Java
UTF-8
191
1.953125
2
[]
no_license
package Cupones; import Envio.EnvioInternacional; import Envio.EnvioLocal; public class MerryChristmas extends Cupon { public MerryChristmas(){ this.descuento = 0.25; } }
Java
UTF-8
9,336
2.046875
2
[]
no_license
package com.cai.http.action; import java.util.HashMap; import java.util.Map; import java.util.Optional; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Controller; import org.spri...
PHP
UTF-8
8,640
2.921875
3
[ "MIT" ]
permissive
<?php namespace Ixudra\Core\Console\Commands; use Carbon\Carbon; use Illuminate\Console\Command as LaravelCommand; use Illuminate\Support\MessageBag; use Symfony\Component\Console\Output\OutputInterface; use DB; use Exception; abstract class BaseCommand extends LaravelCommand { /** @var MessageBag Error me...
Python
UTF-8
8,487
2.9375
3
[]
no_license
import pandas as pd import numpy as np from collections import Counter from itertools import chain import pickle import operator import gensim from gensim.models import Word2Vec from nltk.tokenize import sent_tokenize, word_tokenize import warnings import sys import math import os from langdetect import detect fr...
JavaScript
UTF-8
1,447
4.125
4
[]
no_license
// Sum of Two Integers // // Calculate the sum of two integers a and b, but you are not allowed to use // the operator + and - // // ex. Given a = 1 and b = 2, return 3. // // @flow type num = number; export default function SumTimelineMethod(first: num, second: num): num { const _first = new Array(Math.abs(first));...
Java
UTF-8
267
1.820313
2
[]
no_license
package com.tyr.note.Service; import com.tyr.note.entity.NoteResult; public interface UserService { public NoteResult checkLogin(String name, String pwd) throws Exception; public NoteResult regist( String name, String pwd, String nickname) throws Exception; }
Java
UTF-8
20,583
2.8125
3
[ "MIT" ]
permissive
package com.eye.see.image.processing; /* * Created on Jun 24, 2005 * @author Rafael Santos (rafael.santos@lac.inpe.br) * * Part of the Java Advanced Imaging Stuff site * (http://www.lac.inpe.br/~rafael.santos/Java/JAI) * * STATUS: Complete. * * Redistribution and usage conditions must be done un...
PHP
UTF-8
1,494
2.515625
3
[]
no_license
<?php require('db_connect.php'); $isbn13 = $_POST['isbn13']; $quantity = $_POST['quantity']; $firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $email = $_POST['email']; $phoneNo = $_POST['phoneNo']; $address = $_POST['address']; $aptNo = $_POST['aptNo']; $city = $_POST['city']; $state = $_PO...
Python
UTF-8
8,591
3.515625
4
[]
no_license
import unittest from collections import deque class BstNode: def __init__(self, value, parent=None): self.parent = parent self.left = None self.right = None self.value = value def insert(self, value): if value < self.value: if not self.left: ...
Markdown
UTF-8
6,824
2.53125
3
[ "Apache-2.0" ]
permissive
--- title: VMware using Offline Images weight: 400 --- - [Setting the max_map_count](#setting-the-max_map_count) - [Download and extract the image](#download-and-extract-the-image) - [Creating config.yaml](#creating-configyaml) - [Creating getAllRec.sh](#creating-getallrecsh) - [Starting the install process](#starting...
Markdown
UTF-8
1,839
3.46875
3
[]
no_license
# ่พ“ๅ‡บ(output) ้…็ฝฎ `output` ้€‰้กนๅฏไปฅๆŽงๅˆถ webpack ๅฆ‚ไฝ•ๅ‘็กฌ็›˜ๅ†™ๅ…ฅ็ผ–่ฏ‘ๆ–‡ไปถใ€‚ๆณจๆ„๏ผŒๅณไฝฟๅฏไปฅๅญ˜ๅœจๅคšไธช`ๅ…ฅๅฃ`่ตท็‚น๏ผŒไฝ†ๅชๆŒ‡ๅฎšไธ€ไธช`่พ“ๅ‡บ`้…็ฝฎใ€‚ ## ็”จๆณ•(Usage) ๅœจ webpack ไธญ้…็ฝฎ `output` ๅฑžๆ€ง็š„ๆœ€ไฝŽ่ฆๆฑ‚ๆ˜ฏ๏ผŒๅฐ†ๅฎƒ็š„ๅ€ผ่ฎพ็ฝฎไธบไธ€ไธชๅฏน่ฑก๏ผŒๅŒ…ๆ‹ฌไปฅไธ‹ไธค็‚น๏ผš - `filename` ็”จไบŽ่พ“ๅ‡บๆ–‡ไปถ็š„ๆ–‡ไปถๅใ€‚ - ็›ฎๆ ‡่พ“ๅ‡บ็›ฎๅฝ• `path` ็š„็ปๅฏน่ทฏๅพ„ใ€‚ **webpack.config.js** ```javascript module.exports = { output: { filename: 'bundle.js', path: '/home/proj/...
Java
UTF-8
2,599
2.53125
3
[]
no_license
package com.example.agenda.Class; import android.widget.ArrayAdapter; import androidx.annotation.NonNull; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import co...
Markdown
UTF-8
1,086
2.5625
3
[]
no_license
# Article R8111-12 Pour les รฉtablissements placรฉs sous l'autoritรฉ du ministre de la dรฉfense et dont l'accรจs est rรฉglementรฉ et surveillรฉ en permanence, les missions d'inspection du travail, conformรฉment ร  l'article L. 8112-1, sont exercรฉes, sous l'autoritรฉ du ministre de la dรฉfense, par les agents civils et militaires ...
C#
UTF-8
2,557
2.84375
3
[]
no_license
๏ปฟusing Moq; using WTW_IOC.Logic.Data; using WTW_IOC.Logic; using Xunit; namespace WTW_IOC.Tests.Logic { public class SampleLogicTests { private Mock<ISampleData> _mockSampleData; private Mock<ICalculator> _mockCalculator; private ISampleLogic _sampleLogic; public SampleLogicTe...
Java
UTF-8
1,458
1.710938
2
[]
no_license
package com.xunlei.downloadprovider.homepage.photoarticle; import android.text.TextUtils; import com.xunlei.downloadprovider.e.a.e; import com.xunlei.downloadprovider.homepage.recommend.a.v; import com.xunlei.downloadprovider.member.login.LoginHelper; import com.xunlei.downloadprovider.member.login.b.l; import java.ut...
C++
UTF-8
28,957
3.421875
3
[]
no_license
/////////////////////////////////////////////////////////////////////////// /// Ten : Phan Quoc Trung /// MSSV : 1412590 /// Email : trungpq999@gmail.com /// Lop : Phuong Phap Lap Trinh Huong Doi Tuong 15CTT1 /// Noi Dung: demo noi dung 95 ham trong so 102 ham Algorithm STL /// duoc nhac den trong file bao...
Java
UTF-8
916
2.671875
3
[]
no_license
package utilities; import java.awt.AWTException; import java.awt.Robot; import java.awt.Toolkit; import java.awt.datatransfer.StringSelection; import java.awt.event.KeyEvent; import org.openqa.selenium.WebDriver; public class RobotClassUtility { public void robotUploadFile(String filepath) throws AWTException...
Python
UTF-8
3,281
3.65625
4
[]
no_license
''' ไธ€ไธช่‘—ๅ็š„ๅšๅผˆ่ฎบๆธธๆˆ๏ผŒ่ตทๆบๅคงๆฆ‚ๆ˜ฏไธ€ไธช็พŽๅ›ฝ็”ต่ง†ๆธธๆˆ่Š‚็›ฎๅซๅšLet's make a deal๏ผŒ่ฟ™ไธช้—ฎ้ข˜ๅๅญ—ๆฅๆบไบŽ่Š‚็›ฎไธปๆŒไบบMonty Hall ใ€‚ ๆธธๆˆ็ฎ€่ฟฐ๏ผš โ€œๅ‚่ต›่€…ไผš็œ‹่งไธ‰ๆ‰‡ๅ…ณ้—ญไบ†็š„้—จ๏ผŒๅ…ถไธญไธ€ๆ‰‡็š„ๅŽ้ขๆœ‰ไธ€่พ†ๆฑฝ่ฝฆๆˆ–่€…ๆ˜ฏๅฅ–ๅ“๏ผŒ้€‰ไธญๅŽ้ขๆœ‰่ฝฆ็š„้‚ฃๆ‰‡้—จๅฐฑๅฏไปฅ่ตขๅพ—่ฏฅๆฑฝ่ฝฆๆˆ–ๅฅ–ๅ“๏ผŒ่€Œๅฆๅค–ไธคๆ‰‡้—จๅŽ้ขๅˆ™ๅ„่—ๆœ‰ไธ€ๅชๅฑฑ็พŠๆˆ–่€…ๆ˜ฏๅŽ้ขๆฒกๆœ‰ไปปไฝ•ไธœ่ฅฟใ€‚ๅฝ“ๅ‚่ต›่€…้€‰ๅฎšไบ†ไธ€ๆ‰‡้—จ๏ผŒไฝ†ๆœชๅŽปๅผ€ๅฏๅฎƒ็š„ๆ—ถๅ€™๏ผŒ็Ÿฅ้“้—จๅŽๆƒ…ๅฝข็š„่Š‚็›ฎไธปๆŒไบบไผšๅผ€ๅฏๅ‰ฉไธ‹ไธคๆ‰‡้—จ็š„ๅ…ถไธญไธ€ๆ‰‡๏ผŒ้œฒๅ‡บๅ…ถไธญไธ€ๅชๅฑฑ็พŠใ€‚ไธปๆŒไบบๅ…ถๅŽไผš้—ฎๅ‚่ต›่€…่ฆไธ่ฆๆขๅฆไธ€ๆ‰‡ไป็„ถๅ…ณไธŠ็š„้—จใ€‚้—ฎ้ข˜ๆ˜ฏ๏ผšๆขๅฆไธ€ๆ‰‡้—จไผšๅฆๅขžๅŠ ๅ‚่ต›่€…่ตขๅพ—ๆฑฝ่ฝฆ็š„ๆœบไผš็އ๏ผŸๅฆ‚ๆžœไธฅๆ ผๆŒ‰็…งไธŠ่ฟฐ็š„ๆกไปถ็š„่ฏ๏ผŒ็ญ”ๆกˆๆ˜ฏไผšใ€‚โ€”ๆข้—จ็š„่ฏ๏ผŒ่ตขๅพ—ๆฑฝ่ฝฆ็š„ๆฆ‚็އๆ˜ฏ2/3ใ€‚โ€ ็”จpythonไปฟๅ†™่ฟ™...
TypeScript
UTF-8
633
2.625
3
[]
no_license
import {Response} from "express"; import {IOutput} from "./IOutput"; import {OutStatus} from "./OutStatus"; import {OutText} from "./OutText"; export class OutStatusNoContent implements IOutput { private statusCode: number = 204; private origin: IOutput; constructor(reason: string = "No Content") { ...
Java
UTF-8
4,341
2.234375
2
[]
no_license
package gatetest; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import gate.Annotation; import gate.AnnotationSet; import gate.Document; import gate.Utils; public class GateParser { private Document document; public GateParser(Document document) { ...
JavaScript
UTF-8
1,035
2.546875
3
[]
no_license
var request = require('request'); var cheerio = require('cheerio'); var express = require('express'); var app = express(); var mongojs = require('mongojs'); var databaseUrl = "news"; var collections = ["news"]; request("http://www.http://todayinawesome.com/", function (error, response, html) { var $ = cheerio.l...
Java
UTF-8
4,357
1.828125
2
[ "Apache-2.0" ]
permissive
package com.woorea.openstack.connector; import java.util.List; import java.util.Map; import java.util.logging.Logger; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider; import org.codehaus.jackson...
Markdown
UTF-8
2,300
2.84375
3
[ "MIT-0" ]
permissive
--- title: "Lab 3 - Hard" chapter: false weight: 120 tags: - beginner - AWSWorkshop2020 - shiftleft --- ## Hard difficulty Now we are making things a bit more complicated, this time, use the template named "amazon-eks-nodegroup.json" The steps in this lab are similar to those of Lab 1: 1. In Cloud 9 consol...
Java
UTF-8
5,994
2.3125
2
[]
no_license
/** * Project Name:springboot-mongodb * File Name:StudentController.java * Package Name:com.kaiyun.springboot.mongodb.contrller * Date:2019ๅนด4ๆœˆ26ๆ—ฅไธ‹ๅˆ4:29:35 * Copyright (c) 2019, kaiyun@qk365.com All Rights Reserved. * */ package com.kaiyun.springboot.mongodb.contrller; import java.util.List; import javax.valida...
Java
UTF-8
606
2.296875
2
[]
no_license
package vo; public class RegisterVO { private String user_id; private String email; private String passwd; public String getUser_id() { return user_id; } public void setUser_id(String user_id) { this.user_id = user_id; } public String getEmail() { return email; } public void setEmail(String email)...
TypeScript
UTF-8
1,810
2.578125
3
[]
no_license
import { useState, useRef } from 'react'; import { isPhone } from '@/utils/validation'; import BackgroundTimer from 'react-native-background-timer'; import { isIOS } from '@/config/size'; import useToast from './useToast'; export default function useSms() { let interval: NodeJS.Timeout; const [disabled, setDisable...
Python
UTF-8
58,480
2.84375
3
[]
no_license
# The main engine of the game that runs all of the menu screens, game entering/exiting, and hardware communications. # Tanner Fry # tefnq2@mst.edu import character import devLib import engineLib import npc import settings import importlib import logging import os import pygame from pygame.locals import * ...
Java
UTF-8
14,321
2.03125
2
[]
no_license
package ua.edu.ratos.service.session; import lombok.AllArgsConstructor; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice...
PHP
UTF-8
804
2.640625
3
[]
no_license
<?php function __autoload($controller) { $ssModelName = ucfirst($controller); require_once('model/' . $ssModelName . '.php'); } function call($controller, $action) { require_once('controllers/' . $controller . '_controller.php'); switch ($controller) { case 'student': $controll...
Java
UTF-8
2,110
2.546875
3
[ "Apache-2.0" ]
permissive
package org.apache.lucene.analysis.standard; /** * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses...
Python
UTF-8
2,202
2.625
3
[]
no_license
import uuid from api.host import find_existing_host from app import db from app.models import Host from test_utils import flask_app_fixture ACCOUNT_NUMBER = "000102" def create_host(canonical_facts): host = Host(canonical_facts, display_name=None, account=ACCOUNT_NUMBER) db.session.add(host) db.session....
TypeScript
UTF-8
2,162
2.921875
3
[ "ISC" ]
permissive
import {QueryList} from '@angular/core'; import {NgModel, FormControlName, FormControl} from '@angular/forms'; import { uniqBy } from 'lodash'; /** * The FormControlFinder tries to find a formControl in the given ngModelChildren. * The input element of a control must both contain an ngModel and a formControlName di...
Python
UTF-8
1,573
2.875
3
[ "MIT" ]
permissive
# This script is meant to be called from the Makefile. # # This script will generate a single csv to intended to be used as a final # dataset. An example invocation of the script is # `python make_dataset.py Python, Ruby, C # # The resulting result csv file will have header `['language', 'code']`, where # - `langua...
JavaScript
UTF-8
2,300
2.65625
3
[]
no_license
function Documents() { var storage_key = 'documents'; var documents = {}; this.create = function (name) { documents[name] = { name: name }; }; this.delete = function (name) { delete documents[name]; }; this.get = function (name) { return documen...
Java
UTF-8
1,514
3.046875
3
[]
no_license
package scenes.attractors; import math.Vector2D; public class Satellite { private float width; private float height; Vector2D location; float speed; float theta; float mass; int age; Satellite(float x, float y, float width, float height) { this.width = width; this.height = height; this.location = ...
Java
UTF-8
860
2.125
2
[]
no_license
package com.asiainfo.charge.service.impl; import com.ai.appframe2.service.ServiceFactory; import com.asiainfo.charge.dao.interfaces.IDynamicSumDAO; import com.asiainfo.charge.ivalues.IBODynamicSumValue; import com.asiainfo.charge.service.interfaces.IDynamicSumSV; public class DynamicSumSVImpl implements IDynamicSumSV...
C++
UTF-8
8,171
3.03125
3
[]
no_license
#include "stdafx.h" #include "Player.h" #include <string> Player::Player(string name) { this->name = name; victoryCoins = 5; race = NULL; declinedRace = NULL; badge = NULL; declinedBadge = NULL; } Player::~Player() { delete race; delete declinedRace; delete badge; delete declinedBadge; de...
Java
UTF-8
196
2.171875
2
[]
no_license
package factoryparttern.SimpleFactory; public class SimpleFactoryClient{ public static void main(String[] args) { Electricity haier = SimpleFactory.createObject("Haier"); } }
C++
UTF-8
714
2.71875
3
[]
no_license
#include "JN_FPSLock.h" #include <SDL.h> #include <iostream> #include <cmath> JN_FPSLock::JN_FPSLock(int targetFPS, int& refFPS): returnFPS(refFPS) { this->targetFPS = targetFPS; timeAtCreation = std::chrono::system_clock::now(); } JN_FPSLock::~JN_FPSLock() { float deltaTimeBeforeWait = CalculateDeltaTime(); ...
Java
UTF-8
17,381
2.28125
2
[ "Apache-2.0" ]
permissive
// Copyright 1998--2010 Michael Bruce-Lockhart and Theodore S. Norvell // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
PHP
UTF-8
4,028
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Jar; use Ticket; use Auth; class TicketController extends Controller { public function create(Jar $jar) { if(!Auth::check()){ return redirect('home') ->with('warning', 'You must be logged in to do that.'); }; ...
Java
UTF-8
1,570
2.234375
2
[]
no_license
package com.example.manishchoudhary.formbuilder.CustomForm; import android.content.Context; import android.os.Build; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.support.v7.widget.ThemedSpinnerAdapter; import android.util.AttributeSet; import android.view.Vi...
Java
UTF-8
224
2.140625
2
[]
no_license
package org.businessmanager.service; public interface InvoiceNumberGenerator { /** * Retrieves the next unique invoice number. * * @return the next unique invoice number */ public Long getNextInvoiceNumber(); }
JavaScript
UTF-8
380
2.6875
3
[]
no_license
'use strict' const text = document.querySelector('.text'); function addText(){ text.innerHTML += '<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius ipsum quo facere harum, facilis reiciendis ab. Natus, omnis necessitatibus! Quis quas incidunt hic consectetur illum commodi corrupti ipsa ratione assu...
C
UTF-8
192
2.625
3
[]
no_license
//ๅ“ˆๅผ—ๆ›ผๆ ‘็ป“็‚น็ป“ๆž„ typedef struct{ int weight;//็ป“็‚นๆƒ้‡ int parent,left,right;//็ˆถ่Š‚็‚นใ€ๅทฆๅญฉๅญใ€ๅณๅญฉๅญๅœจๆ•ฐ็ป„ไธญ็š„ไฝ็ฝฎไธ‹ๆ ‡ }HTNode,*HuffmanTree;
Markdown
UTF-8
8,964
3.59375
4
[]
no_license
# Python API Homework - What's the Weather Like? ## Background Whether financial, political, or social -- data's true power lies in its ability to answer questions definitively. So let's take what you've learned about Python requests, APIs, and JSON traversals to answer a fundamental question: "What's the weather lik...
C++
UTF-8
895
2.5625
3
[ "Apache-2.0" ]
permissive
#pragma once namespace cppgui { // Inherit_with_aspects template<class Class, template<class> class ...Aspects> class Inherit_with_aspects; template<class Class, template<class> class Aspect> class Inherit_with_aspects<Class, Aspect>: public Aspect< Class > {}; template<class Class, template<cl...
Java
UTF-8
614
3.1875
3
[]
no_license
package leetcode; public class P507 { //Time Limit Exceeded /* public static boolean checkPerfectNumber(int num) { int total = 1; for(int i = 2; i < num; i++) total += num%i==0?i:0; return total == num; } */ public static boolean checkPerfectNumber(int num) { ...
Python
UTF-8
492
2.96875
3
[]
no_license
a=int(input()) x=input().split(' ') y=input().split(' ') z=input().split(' ') if(z[0]=='5' and z[1]=='3'): print(1) print(1) print(0) elif(z[0]=='5' and z[1]=='1' and y[0]=='6' and y[1]=='3'): print(1) print(1) print(1) elif(z[0]=='5' and z[1]=='1' and y[0]=='6' and y[1]=='4'): print(1) ...
JavaScript
UTF-8
3,773
2.671875
3
[]
no_license
function TopEntropy(controller, data, svg, limits){ this.description = 'TopEntropy Class. Displayed on top of DataViews. Has to be aligned with dataviews'; this.controller = controller; this.tooltip = controller.tooltip; this.data = data; this.svg = svg; this.group = this.svg.append("g").attr("c...
C#
UTF-8
1,335
3.171875
3
[]
no_license
๏ปฟusing System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MyLinq { class ProjectionComparer<TElement, TKey> : IComparer<TElement> { private readonly Func<TElement, TKey> _keySelector; private readonly IComparer<TKey> _keyComparer; publ...
Java
UTF-8
3,122
2.265625
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package articuloProductoClases; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; import HiberanteUtil.HibernateUtil; import tablas.KardexSerie...
Java
UTF-8
4,210
2.046875
2
[]
no_license
package com.example.w4pity.retropacman; import android.app.Application; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.media.MediaPlayer; import a...
JavaScript
UTF-8
2,002
2.921875
3
[]
no_license
let barPlot = d3.select("#body"); d3.json("./birds.json") .then(showData); function showData(birds){ let maxMemb = d3.max(birds.birds, d => d.members.length); let widthScale = d3.scaleLinear() .domain([0, maxMemb]) .range([0, 300]); let positionScale = d3.scaleBand()...
JavaScript
UTF-8
652
2.671875
3
[]
no_license
const controlSignUpCheckBoxes = () => { const establishmentCb = document.querySelector('.establishment-checkbox') const consumerCb = document.querySelector('.consumer-checkbox') // if click on establishmentCb, make sure that consumerCb is 0 establishmentCb.addEventListener('click', event => { if (establis...
Shell
UTF-8
319
2.640625
3
[ "MIT" ]
permissive
# With `path_to_md5sum` a file with records: # c4f9d24f1052da9e224247d527a61c98 WTCHG_310996_249_1.fastq.gz # Extract full list of *.fastq.gz files grep \.fastq\.gz$ "$inputfile" | cut -d' ' -f3 # Extract the list of unique basenames grep \.fastq\.gz$ "$inputfile" | cut -d' ' -f3 | sed 's/_..fastq.gz//g' | uniq
JavaScript
UTF-8
1,600
3.421875
3
[]
no_license
var canvas = document.getElementById("game-stage"); var ctx = canvas.getContext("2d"); var x = canvas.width / 2; var y = canvas.height - 30; var dx = 2; var dy = -2; var paddleX = (canvas.width - 100) / 2; var rightPressed = false; var leftPressed = false; function drawPaddle() { ctx.beginPath() ctx.rect(pa...
Python
WINDOWS-1253
660
3.84375
4
[]
no_license
''' name : Sung Joon Park student number : 01514170 ''' random = int(input()) total = random whisper = 0 while random !=0: salary = str(input()) if salary == 'stop': #must show the average average = (total-random) / (whisper) #first person substracts his random salary average = format(average,...
Python
UTF-8
472
4.375
4
[]
no_license
''' Created on 26 mar 2018 Write a Python program to calculate number of days between two dates. Sample dates : (2014, 7, 2), (2014, 7, 11) Expected output : 9 days ''' from datetime import date y = int(input("Input the year : ")) m = int(input("Input the month : ")) d1 = int(input("Input the first day: ")) d2 = int(in...
C++
UTF-8
3,786
2.8125
3
[]
no_license
#include "energies.h" // Constructor energies::energies(basis set_basis) : basis_(set_basis) { Init(); } energies::energies(basis set_basis, double set_aInvMin, double set_aInvMax) : aMin_(1.0/set_aInvMin),aMax_(1.0/set_aInvMax),basis_(set_basis) { Init(); } // Destructor energies::~energies() { } void energies...
Java
UTF-8
6,173
2.09375
2
[ "MIT" ]
permissive
package com.zkp.androidwan.module.main.activity.weather; import android.annotation.SuppressLint; import android.content.Context; import android.util.Log; import com.google.gson.Gson; import com.zkp.androidwan.R; import com.zkp.androidwan.app.App; import com.zkp.androidwan.base.presenter.BasePresenter; import com.zkp....
C#
UTF-8
986
2.59375
3
[ "MIT" ]
permissive
๏ปฟusing GraphQL.Language.AST.Extensions; using GraphQL.Language.AST.Extensions.Context; namespace GraphQL.Language.AST.Extensions.Interfaces { /// <summary> /// Builds queries for a given entity type. /// </summary> /// <typeparam name="TEntityType">The type of entity for which to build a query....
C#
UTF-8
781
3.484375
3
[]
no_license
๏ปฟnamespace _7_05 { using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; internal class Program { private static void Main() { Console.WriteLine("ะ’ะฒะตะดะธั‚ะต ั‚ะตะบัั‚: "); // v...
Python
UTF-8
874
2.75
3
[]
no_license
__author__ = 'thvoidedline' from Camera import Camera from Constants import * class EditCamera(Camera): def __init__(self, w, h, limit_x, limit_y): Camera.__init__(self, w, h) self.x_speed = 3 self.y_speed = 3 self.limit_x = limit_x self.limit_y = limit_y def update(s...
PHP
UTF-8
2,286
2.8125
3
[]
no_license
<?php /** * TCAPI Class * Class used for interacting with Tacticlicks Whitelabel API * @Author: Jak Giveon <jak@tacticlicks.com> * Requires: HTTP_REQUEST by Jak Giveon <jak@tacticlicks.com> https://gist.github.com/bdbjack/87ef84f53cf5f5f9e6f448fffb0072ac * * Usage example: * $wl = new TCAPI( 'domain.com'...
Markdown
UTF-8
1,184
2.5625
3
[]
no_license
# online-booking-app frontend/learning_intensive <p>ะ˜ะฝั‚ะตะฝัะธะฒ ะฟะพ ะฒะตะฑ-ั€ะฐะทั€ะฐะฑะพั‚ะบะต, ะฝะฐ ะบะพั‚ะพั€ะพะผ ะผั‹ ะฒะผะตัั‚ะต ั ะฒะฐะผะธ ัะฒะตั€ัั‚ะฐะตะผ ะฟั€ะพะตะบั‚ ะดะปั ัะฐะนั‚ะฐ ะ‘ัƒะบะธะฝะณะฐ (ะฒั‹ะฑะพั€ ะธ ะฑั€ะพะฝะธั€ะพะฒะฐะฝะธะต ะฝะพะผะตั€ะพะฒ) ะธ ะฝะฐะฟะธัˆะตะผ frontend ั‡ะฐัั‚ัŒ ะฟะพะด ะฝะตะณะพ.</p> <p>ะ ั‚ะฐะบ ะถะต:</p> + ะŸะพะทะฝะฐะบะพะผะธะผัั ะฝะฐ ะฟั€ะฐะบั‚ะธะบะต ั CSS ะฟั€ะตะฟั€ะพั†ะตััะพั€ะฐะผะธ. + ะŸะพะทะฝะฐะบะพะผะธะผัั ั ะฟะฐะบะตั‚ะฝั‹ะผะธ- ะธ ั‚ะฐัะบ- ...
PHP
UTF-8
3,780
2.5625
3
[]
no_license
<?php // Include the composer autoload file include_once "vendor/autoload.php"; // Import the necessary classes use Carbon\Carbon; use Philo\Blade\Blade; $views = __DIR__ . '/views'; $cache = __DIR__ . '/cache'; $blade = new Blade($views, $cache); $user = new UserAccounts; $images = new Images; $capsule = $user->...
Markdown
UTF-8
3,848
2.9375
3
[]
no_license
--- description: "How to Make Super Quick Homemade Watermelon Popsicles" title: "How to Make Super Quick Homemade Watermelon Popsicles" slug: 18-how-to-make-super-quick-homemade-watermelon-popsicles date: 2021-11-04T07:27:03.135Z image: https://img-global.cpcdn.com/recipes/2395a87c8fcd62a5/680x482cq70/watermelon-popsic...
C#
UTF-8
667
3.140625
3
[ "MIT" ]
permissive
๏ปฟusing System; namespace Lab2.Cs { class Program { static void Main(string[] args) { const int scramblerValue = 321; const int startedKey = 1232423; var scrambler = new Scrambler(scramblerValue, startedKey); using (var inputStream = C...
Java
UTF-8
4,716
3.015625
3
[]
no_license
package ua.lviv.lgs; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.Scanner; public class VerkhovnaRada { private static VerkhovnaRada verkhovnaRada = new VerkhovnaRada(); private VerkhovnaRada() { } public static VerkhovnaRada getVerkhovnaRada(...
Rust
UTF-8
1,334
3.921875
4
[]
no_license
use world::World; /// Defines an entity within a world /// # Arguments /// * `M` - The type to use for messages between entities /// # Example /// ```rust /// struct Cat { /// hunger: i64, /// } /// impl Entity<String> for Cat { /// /// Every tick, the cat gets more hungry /// /// If the cat gets too hungr...
Markdown
UTF-8
7,507
3.015625
3
[]
no_license
## cookie ```js var paras = document.getElementsByTagName("p"); for (var i = 0; i < paras.length; i++) var title_text = paras[i].getAttribute("title"); if (title_text) alert((title_text)); ``` *ๅˆ›ๅปบไธ€ไธชๅ‡ฝๆ•ฐๆฅๆฃ€ๆŸฅๆ˜ฏๅฆๅทฒ่ฎพ็ฝฎ cookie๏ผš* ```js function getCookie(c_name) { if (document.cookie.length > 0) { c_start = docume...
Markdown
UTF-8
1,528
3.046875
3
[ "MIT" ]
permissive
# UKSML Student Group Member List Scraper Made to scrape University of Nottingham Students' Union Society Member Lists Scraper submits a post request to get all members of society and then uses cheriojs to get names and ID. Returns an array of objects that looks like the following: ```JavaScript [ { name: '<Fir...
JavaScript
UTF-8
1,515
2.671875
3
[]
no_license
const robot = require('robotjs'); module.exports = class Actions { constructor() { this.screenSize = robot.getScreenSize(); } handleActions(action) { switch(action.type) { case 'move': { var screenX = this.screenSize.width * action.screenX / action.width, screenY = this.scr...
Java
UTF-8
202
2.03125
2
[]
no_license
package Algoriths.dp; public class lisLongestIncSubSequence { public static int lis(int arr[], int n) { if(n == 1) { return 1; } int res, max_ending_here = 1; } }
Markdown
UTF-8
731
3.03125
3
[]
no_license
--- title: "[JAVA]๋ฐฑ์ค€11654๋ฒˆ ์•„์Šคํ‚ค์ฝ”๋“œ" excerpt: "[Bronze 5] Basic." categories: - Algorithm tags: - Basic --- [๋ฌธ์ œ](https://www.acmicpc.net/problem/11654)๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. ์˜ค๋Š˜์€ ๋ฐฑ์ค€11654๋ฒˆ ์•„์Šคํ‚ค์ฝ”๋“œ ๋ฌธ์ œ๋ฅผ ํ’€์–ด๋ณด๋„๋ก ํ•˜์ž. JAVA์˜ ์ž…๋ ฅ์„ ์—ฐ์Šตํ•˜๊ธฐ ์œ„ํ•ด ํ’€์–ด๋ณด์•˜๋‹ค. ์•„์Šคํ‚ค์ฝ”๋“œ๋ฅผ ์ถœ๋ ฅํ•ด์ฃผ๋ ค๋ฉด System.in.read()๋กœ ํ•œ ๊ฐœ์˜ ๋ฐ”์ดํŠธ๋งŒ ์ฝ๊ณ  ์•„์Šคํ‚ค์ฝ”๋“œ๋กœ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ๋‹ค. ```java ...
C++
UTF-8
6,550
2.890625
3
[ "MIT" ]
permissive
/** * * */ #ifndef _KEHGENERAL_ENCDECBUFFER_H #define _KEHGENERAL_ENCDECBUFFER_H 1 #include "core/reference.h" // The kehEncDecBuffer is meant to simplify the task of encoding/decoding data into low level // bytes (PoolByteArray). The thing is, the ideal is to remove the variant header bytes from // properties, w...
Java
UHC
951
3.015625
3
[]
no_license
package ws2.java2.controller; import java.util.Arrays; import ws2.java2.entity.*; public class VehicleManager { Vehicle[] vehicleArr; public VehicleManager() { vehicleArr = new Vehicle[6]; vehicleArr[0] = new Airplane("7472", 1300, 300, true, 4); vehicleArr[1] = new Car("าณลธ32", 180, 45, true, 20); vehic...
Java
UTF-8
1,199
2.078125
2
[]
no_license
package com.sell.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.sell.enums.ProductStatusEnum; import com.sell.util.EnumUtil; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.RequiredArgsConstructor; import java.io.Serializable; import java.mat...
Java
UTF-8
2,706
2.09375
2
[]
no_license
package com.example.saransh.myapplication; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import an...
SQL
UTF-8
1,176
3.40625
3
[]
no_license
CREATE DATABASE Pets; USE Pets; CREATE TABLE Clinicas ( idClinica INT PRIMARY KEY IDENTITY, RazaoSocial VARCHAR(80) NOT NULL, Cnpj INT NOT NULL, Endereco VARCHAR(80) NOT NULL ); CREATE TABLE TiposPets ( idTipoPet INT PRIMARY KEY IDENTITY, Descricao VARCHAR(50) NOT NULL ); CREATE TABLE Racas ( idRaca INT PRIM...
Markdown
UTF-8
1,778
3.703125
4
[]
no_license
# [unrated] ์™ผ์ชฝ ์˜ค๋ฅธ์ชฝ - 181890 [๋ฌธ์ œ ๋งํฌ](https://school.programmers.co.kr/learn/courses/30/lessons/181890) ### ์„ฑ๋Šฅ ์š”์•ฝ ๋ฉ”๋ชจ๋ฆฌ: 33.4 MB, ์‹œ๊ฐ„: 0.05 ms ### ๊ตฌ๋ถ„ ์ฝ”๋”ฉํ…Œ์ŠคํŠธโ€…์—ฐ์Šต > ์ฝ”๋”ฉโ€…๊ธฐ์ดˆโ€…ํŠธ๋ ˆ์ด๋‹ ### ์ฑ„์ ๊ฒฐ๊ณผ Empty ### ๋ฌธ์ œ ์„ค๋ช… <p>๋ฌธ์ž์—ด ๋ฆฌ์ŠคํŠธ <code>str_list</code>์—๋Š” "u", "d", "l", "r" ๋„ค ๊ฐœ์˜ ๋ฌธ์ž์—ด์ด ์—ฌ๋Ÿฌ ๊ฐœ ์ €์žฅ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. <code>str_list</code>์—์„œ "l"๊ณผ "r" ์ค‘ ๋จผ์ €...
Java
UTF-8
1,688
2.609375
3
[ "MIT" ]
permissive
package com.cym5240.pis; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; public class MenuListAdapter extends BaseAdapter { // Declare Vari...
Markdown
UTF-8
4,286
2.953125
3
[]
no_license
--- layout: page title: ๆŠฝๅฑ‰ๅผๅฏผ่ˆช permalink: navigation-drawer.html --- # ๆŠฝๅฑ‰ๅผๅฏผ่ˆช # **ๆŠฝๅฑ‰ๅผๅฏผ่ˆชๆ˜ฏGoogleๅบ”็”จ็จ‹ๅบไธญไธ€็งๅธธ่ง็š„ๆจกๅผใ€‚ๆŠฝๅฑ‰ๅฏผ่ˆชไปŽๅทฆไพงๆป‘ๅ‡บ๏ผŒๅฎƒ้ตๅพชๅˆ—่กจ็š„ๅ…ณ้”ฎ่ฎพ่ฎก็บฟๅ’Œๆ ‡ๅ‡†ใ€‚** <img src="images/patterns_navdrawer_metrics1.png"width="360"/> **ๆŽ’็‰ˆๆ ทๅผ** ๅญ—ไฝ“๏ผŒๅญ—ๅท๏ผŒ้ขœ่‰ฒ๏ผš 1. Roboto Medium, 14sp, #FFFFFF 2. Roboto Regular, 14sp, #FFFFFF 3. ๅˆ—่กจ้กน: Roboto Medium, 14sp...