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
2,437
2.65625
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication4 { public partial class Form1 : Form { CustomerDAO customerDAO = new CustomerDAO(); ...
Java
UTF-8
7,700
2.265625
2
[]
no_license
package com.revature.studyforce.notification.controller; import com.revature.studyforce.notification.dto.FlashcardSubscriptionDTO; import com.revature.studyforce.notification.dto.StacktraceSubscriptionDTO; import com.revature.studyforce.notification.dto.SubscriptionDTO; import com.revature.studyforce.notification.mode...
PHP
UTF-8
513
2.515625
3
[]
no_license
<?php function getServices($from){ if($from == 'client'){ include_once('Models/Extra.php'); } else if ($from == 'admin'){ include_once('../../../Models/Extra.php'); } $service = new Extra("", "", "", "", $from,"show"); if($service->dbConnect()){ if($resu...
Shell
UTF-8
2,116
3.65625
4
[]
no_license
#!/bin/bash # liyunwei@unisound.com # 2018-04-08 # discovery spring web set -C set -e set -o pipefail set -o errtrace base_dir="/data /opt" check_variable (){ local varable_name varable_name=$1 [[ `eval "echo tmp\\$$varable_name"` == "tmp" ]] && return 1 || return 0 } check_variable_all (){ loca...
Python
UTF-8
3,746
2.890625
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Sat Apr 11 14:38:57 2020 @author: NK """ import pandas as pd import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt credit_df = pd.read_csv('German Credit Data.csv') credit_df.head() credit_df.info() features = list(credit_df.column...
Markdown
UTF-8
1,015
2.640625
3
[ "MIT" ]
permissive
--- title: Simultaneous Scheduler description: API Documentation for the Simultaneous Scheduler class keywords: agent-based modeling, bptk, bptk-py, python, business prototyping --- # Simultaneous Scheduler ## SimultaneousScheduler Constructor **SimultaneousScheduler()** Implementation of a scheduler. Runs steps sy...
C++
UTF-8
117
2.53125
3
[]
no_license
/* 2016.10.04 22:44 * P_187 */ unsigned int Fact(unsigned x) { if (x <= 1) return 1; return (x * Fact(x-1)); }
Java
UTF-8
9,397
1.773438
2
[ "BSD-3-Clause" ]
permissive
package net.selenate.client.user; import akka.actor.ActorRef; import akka.pattern.Patterns; import akka.util.Timeout; import net.selenate.client.interfaces.IElement; import net.selenate.client.interfaces.IOption; import net.selenate.common.comms.SeCookie; import net.selenate.common.comms.SeElement; import net.selenate...
C++
UHC
7,320
3.234375
3
[]
no_license
#include <iostream> #include <string> #include <locale.h> #include <codecvt> #include <windows.h> #include <winnls.h> #include <vector> #include <sstream> using namespace std::string_literals; // enables s-suffix for std::string literals // ƼƮ MBCS - Multi Byte Character Set: 1 Byte ׿ ڴ 2 Bytes ó // Ex) MessageBox...
C#
UTF-8
678
3.3125
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace ClassLibrary { public class Customer { public int ID { get; } public string Name { get; } public decimal Balance { get; private set; } public Customer(int id, string name) { ID = ...
Python
UTF-8
1,549
2.828125
3
[ "MIT" ]
permissive
""" virtstrap.baseplugin -------------------- The base plugin for virtstrap. """ from functools import wraps from virtstrap.log import logger class Hook(object): name = None command = None def __init__(self): self.options = None self.logger = logger def execute(self, event, options, ...
C#
UTF-8
13,982
3.609375
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tic_Tac_Toe { public enum GameState {Title, Playing, PlayerOneTurn, PlayerTwoTurn, GameOver}; class Program { public void InitializeGame() { // greet pl...
Python
UTF-8
1,104
2.984375
3
[]
no_license
def sort_index_file(): index_file = open("Sorted_Index.csv" , "w") for i in range(1000000): temp = '{0}'.format(str(i).zfill(6)) index_file.write(str(temp)) index_file.write(" \n") index_file.close() for i in range(1000000): line = a.readline().split() rno = int...
Java
UTF-8
4,578
2.59375
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 pl.mdziedzic.nokiatask.files; import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.nio.file...
Markdown
UTF-8
1,603
2.9375
3
[]
no_license
# LongYourDog ## Dev readme: To clone this project: git clone https://github.com/SeijiEmery/LongYourDog.git cd LongYourDog git checkout <your-branch> ### Active dev branches: level-geometry-prototype (Erwang) interaction-prototype (Jack) movement-prototype (Seiji) world-ma...
Markdown
UTF-8
798
3.921875
4
[]
no_license
# adjacentElementsProduct Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. Example For inputArray = [3, 6, -2, -5, 7, 3], the output should be adjacentElementsProduct(inputArray) = 21. 7 and 3 produce the largest product. Input/Output [execution ...
Java
UTF-8
7,424
2.3125
2
[]
no_license
package com.android.app.buystoreapp.bean; import java.io.Serializable; import java.util.List; /** * Created by 尚帅波 on 2016/10/15. */ public class ProductBean implements Serializable { private static final long serialVersionUID = -952689659712346654L; /** * gpbpsList : [{"mgList":[{"moreGroId":"117","m...
Markdown
UTF-8
2,151
3
3
[ "MIT" ]
permissive
--- name: Extending Component permalink: '/guide/extending-component' --- # Extending Component Bazı projelerde component ek işlevsellik ile extend etmek istenebilir. Javascript'te inheritance'ın değeri hakkında farklı görüşler vardır, ancak tüm component'lerin devralındığı kendi "base class" ınızı oluşturmak isters...
C#
UTF-8
3,625
2.671875
3
[]
no_license
using Dapper; using Pedagio.Cadastro.Application.Stores; using Pedagio.Cadastro.Data.Dto; using Pedagio.Cadastro.Domain; using System.Collections.Generic; using System.Data; using System.Linq; using System.Threading.Tasks; namespace Pedagio.Cadastro.Data { public class PassagemStore : IPassagemCommandStore, IPass...
C
UTF-8
378
2.9375
3
[]
no_license
/************************************************************************* > File Name: point.c > Author:jieni > Mail: > Created Time: 2020年10月13日 星期二 19时05分17秒 ************************************************************************/ #include <stdio.h> void fun(char *ch) { printf("%c\n", *ch); } int main...
Markdown
UTF-8
2,499
2.640625
3
[ "MIT" ]
permissive
# Github Desktop Client einrichten und verwenden Für Mac Os X und Window gibt es unter [https://desktop.github.com/](https://desktop.github.com/) einen kostenlosen Github Client. Damit können sehr einfach Projekte zwischen der Arduino Community oder andere Github Projekten mit den Dateien auf dem eigenen Rechner synch...
Python
UTF-8
340
3.140625
3
[]
no_license
#!/usr/bin/env python from itertools import count def hasprop(n): if str(n)[0]!='1': return False reference = sorted(list(str(n))) return all(reference==sorted(list(str(n*mult))) for mult in range(2,7)) for n in count(): if n%100000==0: print 'Checking',n if hasprop(n): pr...
Java
UTF-8
188
1.578125
2
[]
no_license
package com.jzeen.travel.data.repository; import com.jzeen.travel.data.entity.VehiclePlan; public interface VehiclePlanRepository extends AdvancedJpaRepository<VehiclePlan, Integer> { }
JavaScript
UTF-8
610
2.796875
3
[]
no_license
function fortune() { prompt("Whats in store for you?"); } fortune(); const replies = [ "You will have a great day ", "Today avoid the metro", "The person to your left will become you business partner", "Buy a lotto ticket", "You will find love at the local Amtrak", "Dont quit your day job!",...
Python
UTF-8
430
3
3
[]
no_license
from re import sub def first(lines): seat_ids = [int(sub(r'B|R', '1', sub(r'F|L', '0', line)), 2) for line in lines] return max(seat_ids) def second(lines): seat_ids = [int(sub(r'B|R', '1', sub(r'F|L', '0', line)), 2) for line in lines] missing_seats = set(range(2 ** 10)) - set(seat_ids) ...
Swift
UTF-8
6,305
3.171875
3
[ "MIT" ]
permissive
// // vector4.swift // vox.Force // // Created by Feng Yang on 2020/4/14. // Copyright © 2020 Feng Yang. All rights reserved. // import Foundation extension SIMD4 where Scalar:BinaryFloatingPoint{ /// Returns true if \p other is the same as this vector. func isEqual(other:SIMD4)->Bool { return x =...
C#
UTF-8
553
2.6875
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace JSNLog.Exceptions { public class SubTagHasTooManyAttributesException: BaseException { public SubTagHasTooManyAttributesException(string subTagName, string allowedAttributeName) : base(string.Fo...
JavaScript
UTF-8
1,025
2.78125
3
[]
no_license
var data = require('../data/contacts'); var getNextId = () => data.length + 1; var isValidContact = (contact) => contact.name !== undefined; module.exports = function (app) { app.get('/api/contacts', function (req, res) { res.json(data); }); app.get('/api/contacts/:id', function (req, res) { var contac...
TypeScript
UTF-8
535
2.59375
3
[ "MIT" ]
permissive
import { ObjectValidator, StringValidator } from '~/base/validator'; import { CreateDto } from '../type'; export class CreateValidator { private objectValidator: ObjectValidator; private stringValidator: StringValidator; constructor() { this.objectValidator = new ObjectValidator(); this.stringValidator...
PHP
UTF-8
1,914
2.59375
3
[]
no_license
<?php namespace App\Services; use App\Entity\Answer4You; use App\Repository\Answer4YouRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class CloseOIA4UProcessService { private $closeIOA4UImportService; ...
Python
UTF-8
13,819
2.625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import colorama import discord import json import traceback import requests import os import traceback from discord.ext import commands from colorama import Fore colorama.init() os.system('cls') version = "1.1.0" msgs = {"info": f"{Fore.WHITE}[{Fore.CYAN}i{Fore.WHITE}]", "+": f"{Fore.WHITE}[{Fore.CYAN}+{Fore...
Java
UTF-8
682
3.1875
3
[]
no_license
package com.tclab.algorithms.utils; import java.util.ArrayList; import java.util.List; import java.util.Random; public class Utils { public static List<Integer> randomList(int size) { Random random = new Random(); List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < size; i++) { int...
C
UTF-8
177
3.109375
3
[ "CC0-1.0" ]
permissive
#include <stdio.h> int main() { int inicial = 0, final=10, i; for(i=inicial; i<=final; i++) { printf("%d\n",i); } } /* Nota que "final+1" numero de iteraciones. */
Python
UTF-8
2,793
2.90625
3
[]
no_license
# multivariate output stacked lstm example import numpy from keras.models import Sequential from keras.layers import LSTM from keras.layers import Dense import cx_Oracle # split a multivariate sequence into samples def split_sequences(sequences, n_steps): X, y = list(), list() for i in range(len(sequences)): # fi...
Java
UTF-8
5,230
2.1875
2
[]
no_license
/* * Copyright 2012 Hannes Janetzek * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later version. * * This program is d...
Swift
UTF-8
2,985
2.53125
3
[]
no_license
// // MapViewController.swift // StudySavior // // Created by Ally Klionsky on 5/2/19. // Copyright © 2019 Ally Klionsky. All rights reserved. // import UIKit import MapKit class MapViewController: UIViewController { @IBOutlet weak var tableView: UITableView! @IBOutlet weak var mapView: MKMapView! ...
Java
UTF-8
496
2.796875
3
[]
no_license
package ArraySearch_linear_index; public class Search_Element_index_no { public static String search (int []x, int y) { int index=-1 ; for(int i=0;i<x.length;i++) { if(x[i]==y) { index=i; break; } } return "Number fund at index no:"+index; ...
JavaScript
UTF-8
2,942
2.640625
3
[]
no_license
var mongodb = require('./db'); function User(user) { this.userid = user.userid; this.username = user.username; this.password = user.password; this.name = user.name; }; /** * 保存 * @param callback */ User.save = function save(callback) { console.log("保存username::"+this.username); mongodb.open(function(err, db...
Swift
UTF-8
2,197
2.84375
3
[ "MIT" ]
permissive
// // CsvParser.swift // iAirportsDB // // Created by Christopher Hobbs on 8/19/16. // Copyright © 2016 Toonsy Net. All rights reserved. // import Foundation class CsvParser: Parser, CHCSVParserDelegate { var columns = [String]() var lineDictionary = [String: String]() var fileName = "" var record...
Java
UTF-8
903
2.34375
2
[ "MIT" ]
permissive
package org.apache.commons.exec.test; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; import org.apache.commons.exec.ExecuteResultHandler; import org.apache.commons.exec.Executor; import org.junit.After; import org.j...
PHP
WINDOWS-1251
10,776
2.65625
3
[]
no_license
<?php /** * * * @param array $files * @param string $from * @return array */ function downloadFiles($files, $count, $name, $dir, $resample_size = array(), $quality = 85, $delete = false) { $images = $photo_arr = array(); $change1 = array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''...
Java
UTF-8
183
2.109375
2
[]
no_license
package SomeStatic.MyTrainingExceptions; public class ShirtException extends ClothingException { ShirtException() { System.out.println("This is ShirtException"); } }
Java
UTF-8
906
2.109375
2
[]
no_license
package org.yijun.hie.persistence.repository; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.yijun.hie.persistence.entity.EnterpriseEntity; import java.util.List; /** * Cre...
Shell
UTF-8
554
2.671875
3
[]
no_license
#!/bin/bash #Swap voxels and header in bad image 1 according to parameters in good image 2 #badfile=/scratch/wbic-beta/spj24/serpent/sub-S7P05/sub-S7P05_vol0.nii.gz #goodfile=/scratch/wbic-beta/spj24/serpent/sub-S7C03/sub-S7C03_ses-20181025_task-SERPENT_acq-cmrr_run-1_bold_vol0.nii.gz badfile=$1 goodfile=$2 badfile=`...
Markdown
UTF-8
2,420
3.21875
3
[ "MIT" ]
permissive
# VanillaJS Check the [code folder](https://github.com/MatthijsKamstra/haxejs/tree/master/docs/03vanillajs/code) for more comments. I have taken some of the examples for the <http://youmightnotneedjquery.com> and converted it to HaxeJS. The fadeIn is just a rewrite... couldn't get it to work the way they did it. _Th...
Python
UTF-8
106
3.125
3
[]
no_license
monday=[9.1,8.8,7.5] for temp in monday: print(round(temp)) for letter in 'hello': print(letter)
Python
UTF-8
1,966
2.640625
3
[]
no_license
import dash_html_components as html from babel.numbers import format_decimal from variables import get_variable class Value: def __init__(self, val): self.val = val def __format__(self, fmt): val = self.val if fmt == 'noround': dec_fmt = None else: # U...
PHP
UTF-8
1,675
2.90625
3
[]
no_license
<?php /** * PHP By Example * * @copyright 2015 Michel Corne * @license http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3 */ require_once 'models/function_core.php'; /** * Function configuration * * @see docs/function-configuration.txt */ class pdo__lastinsertid extends function_core { public ...
Python
UTF-8
4,587
3.234375
3
[ "MIT" ]
permissive
import numpy as np from timeit import default_timer from matplotlib import pyplot as plt def RK45(F, y_0, t_0, t_1, h_0, T): """Runge Kutta Fehlberg, a Runge Kutta 4/5 embedded pair method for iterative solving of IVPs Parameters: F (function(t, y)): the derivative of y(t) y_0 (number(s)): the initia...
JavaScript
UTF-8
10,510
2.640625
3
[]
no_license
'use strict' var config = require('../config'); var Patients = require('../models/neo4j/patients'); var FileMongo = require('../models/mongodb/files'); var Studios = require('../models/neo4j/studios'); var Security = require('./security'); var dbUtils = require('../neo4j/dbUtils'); var _ = require('lodash'); ///// F...
C++
UTF-8
3,266
3.25
3
[]
no_license
#include<stdio.h> #include<iostream> #include<vector> #include<string> #include<fstream> #include<map> #include<iomanip> using namespace std; class Node{ public: Node() = default; Node(string value):value(value), pre(NULL), next(NULL){} ~Node() = default; string value;//page number Node* pre; ...
C#
UTF-8
1,879
3.421875
3
[]
no_license
using System; using System.Collections; using System.Drawing; using System.IO; public class Polygon { private PointF[] pontos; private ArrayList stringsText = new ArrayList(); public Polygon(String nameDoc) { try { // Open the text file using a stream reader. Stream entra...
Python
UTF-8
1,773
2.96875
3
[]
no_license
import socket import matplotlib matplotlib.use("Qt4Agg") import matplotlib.pylab as pylab import numpy as np import time pylab.ion() class ExperimentPlot: def __init__(self,left, bottom, width,height): self.figure = pylab.figure() self.ax = self.figure.add_subplot(111) self.ax.set_xlim(left...
Python
UTF-8
5,056
3.171875
3
[ "MIT" ]
permissive
from cmd import Cmd HELP_MSG = ''' Commands: load URI # Load triples from URI or file. go URI # Go to a resource and load related triples. size # Print the number of triples in the graph. types # List all types, i.e. objects of rdf:type. this # Print the current resource. pred ...
Java
UTF-8
173
1.929688
2
[]
no_license
package com.Unitest.Unitest.repository; public interface CalculateRepository { int sum(int a, int b); int multiple(int a, int b); Float device(int a, int b); }
Java
UTF-8
954
2.875
3
[]
no_license
package org.italberto.sugarreference.file.writer; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; /** * * @author italberto */ public class NormalFile extends File { private Buffere...
Java
UTF-8
708
1.960938
2
[]
no_license
package com.slokam.f22healthcarecrm.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframewor...
Markdown
UTF-8
2,845
2.6875
3
[]
no_license
--- title: ディップス(非推奨) date: 2021-04-07 series: title: 宅トレことはじめ number: 6 --- <LinkOpenGraph url="https://www.youtube.com/watch?v=NP7j1O4p4AY"/> ## ディップスは危険? 基本的にディップスは<Asc256>非推奨</Asc256>です。なぜなら - 間違ったフォームでやると**肩を痛める** - 正しいフォームでやってもやっぱり**肩を痛めがち** から。 `youtube:https://www.youtube.com/watch?...
Go
UTF-8
915
2.921875
3
[ "MIT" ]
permissive
package multiplex import ( "bufio" "encoding/json" "io" ) const Delim = '\n' type ProtoReader interface { Read(i interface{}) error } type ProtoWriter interface { Write(i interface{}) error } type JsonProtoReader struct { R io.Reader } func NewJsonProtoReader(Reader io.Reader) ProtoReader { return &JsonPro...
Go
UTF-8
746
3.359375
3
[]
no_license
/** * Definition for a Node. * type Node struct { * Val int * Neighbors []*Node * } */ func trav(node *Node, ma map[*Node]*Node) map[*Node]*Node{ _, prs := ma[node] if prs{ return ma } tmp := Node{Val:node.Val,Neighbors: []*Node{}} ma[node] = &tmp for _,v:=range(...
C
UTF-8
335
2.671875
3
[]
no_license
#include "Logger.h" t_log* iniciar_log(char* nombreDeLog){ char* nombreConExtensionLog = string_from_format("%s.log",nombreDeLog); t_log * logger = log_create(nombreConExtensionLog, nombreDeLog, 1, LOG_LEVEL_INFO); log_info(logger, "Logger iniciado: %s\n", nombreConExtensionLog); free(nombreConExtensionLog); ret...
Java
UTF-8
1,656
3.5625
4
[]
no_license
package Ch9.AbstractClasses.InnerClass; import lombok.Getter; import java.util.ArrayList; public class Gearbox { private ArrayList<Gear> gears; private int maxGears; private int currentGear = 0; private boolean clutchIsIn; public Gearbox (int maxGears) { this.maxGears = maxGears; ...
Python
UTF-8
1,203
2.65625
3
[]
no_license
import requests, json import signal ports = { 'Blue' : [40001, 40002, 40003], 'Yellow' : [30001, 30002, 30003] } next_mode = { 'spinning' : 'circling', 'circling' : 'circling', 'forward' : 'backward', 'backward' : 'spinning', } local = 'http://localhost' def run_control_test(team = 'Blue...
PHP
UTF-8
639
2.515625
3
[]
no_license
<?php // Load composer require __DIR__ . '/../vendor/autoload.php'; include_once 'Tokens.php'; $bot_api_key = Tokens::$khateMoghadamBot; $bot_username = 'khateMoghadamBot'; $hook_url = Tokens::$khateMoghadamBot_hookUrl; try { // Create Telegram API object $telegram = new Longman\TelegramBot\Telegram($b...
Shell
UTF-8
1,759
3.859375
4
[]
no_license
#!/bin/bash # Verificamos el numero de argumentos if [ "$#" -ne 2 ]; then echo "Ejecute el Script de la siguiente manera:" echo " ./sudoku_solver <archivo_instancias> <archivo_soluciones>" exit fi # Imprimimos al usuario de donde se leera y donde se escribira echo "Sudoku Solver" echo " Input File: ...
Java
UTF-8
5,662
3.78125
4
[]
no_license
package project1; import java.util.Scanner; import java.io.*; import java.util.ArrayList; import static java.lang.System.out; //******************************************************************************************************** // CLASS: Main (Main.java) // // DESCRIPTION // Counts the runs in a list // // COU...
Swift
UTF-8
814
2.53125
3
[ "Apache-2.0" ]
permissive
// // WalletTests.swift // Tests // // Created by Mederic Petit on 20/11/2017. // Copyright © 2017-2018 Omise Go Pte. Ltd. All rights reserved. // import OmiseGO import XCTest class WalletTests: XCTestCase { func testEquatable() { let address1 = StubGenerator.wallet(address: "123") let address...
C++
UTF-8
1,953
3.203125
3
[]
no_license
#include "dynamicPro.h" #define infinity 0x7FFFFFFF /*斐波那契数列计算*/ int Fibonacci(int N) { if(N<=1) return 1; int last, nextToLast, Answer; last = nextToLast =1; for(int i=1; i<N; i++) { Answer = last+nextToLast; nextToLast = last; last = Answer; } return Answer; } /*C(N)=(2/N)((C(0)+0) + (C(1)+1) + ... ...
JavaScript
UTF-8
1,047
3.0625
3
[]
no_license
function testNumeric(input) { if (input.match(/[^0-9]/g)) return false; else return true; } function startSearching() { stopRefreshing(); var maxTweetCount = document.getElementById("maxTweetCount"); var refreshperiod = document.getElementById("refreshperiod"); if(maxTweetCount.value == "" || !testNumeric(m...
C++
UTF-8
3,931
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr) #define all(x) (x).begin(),(x).end() #define mp make_pair #define pb push_back #define fi first #define se second class...
Python
UTF-8
20,105
2.796875
3
[]
no_license
import itertools import math import os import matplotlib.pyplot as plt import numpy as np import pandas as pd def summary(df, fields, output): """ generate summary plot with four fields: #obs, #scans, #sources and sky-coverage score :param df: DateFrame with summary statistics :param fields: list of...
Markdown
UTF-8
2,732
2.640625
3
[]
no_license
# Commands for Quick Docker Servers * [MongoDB](#mongodb) * [Postgres](#postgres) * [Mysql](#mysql) * [ElasticSearch](#elasticsearch) ## MongoDB #### Keep data in container volume ```sh docker run -d \ --name mongodb \ -p 127.0.0.1:27017:27017 \ mongo:3 bash -c 'mongod --bind_ip 0.0.0.0 --logappend --storageE...
Markdown
UTF-8
3,940
2.6875
3
[]
no_license
--- layout: page title: "Q22242: PRB: Area Around Text and Remainder of Window Different Colors" permalink: /kb/022/Q22242/ --- ## Q22242: PRB: Area Around Text and Remainder of Window Different Colors {% raw %} Article: Q22242 Product(s): Microsoft Windows Software Development Kit Version(s): WINDOWS:3.1,95; win...
C#
UTF-8
430
2.75
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //A method not to be tested. is there to verify that the testing engine can distinguish test //classes from classes that arent tests. namespace SampleTests { public class HelperUtil { ...
Python
UTF-8
531
3.75
4
[]
no_license
x = 5 y = 2 print (x+y) list = ['Atheer',11111,'Nura',22222,'Maha',66666,'Sara',77777] print(list) print(list[2:5]) list[1] = 1234567 print(list) tuple = ('Aljohara',33333,'Laila',444444) print(tuple) List1 = [1,3,5,7] List2 = [2,4,6,8] List3 = [List1,List2] print(List3) print(List3[0]) print(List3[1]) print(Li...
Python
UTF-8
2,390
3.265625
3
[]
no_license
from collections import defaultdict p = 31 m = 10 ** 9 + 9 def compute_hash(s): n = len(s) power_mod = [1] for i in range(n): power_mod.append((power_mod[-1] * p) % m) hash_values = [0] * (n + 1) for i in range(n): hash_values[i + 1] = (hash_values[i] + (ord(s[i]) - ord('a') + 1...
Python
UTF-8
889
3.65625
4
[]
no_license
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def constructMaximumBinaryTree(self, nums): """ :type nums: List[int] :rtype: TreeNode ""...
JavaScript
UTF-8
2,188
3.625
4
[]
no_license
let box = document.getElementById('box'), btn = document.getElementsByTagName('button'), circle = document.getElementsByClassName('circle'), heart = document.querySelectorAll('.heart'), oneHeart = document.querySelector('.heart'), wrapper = document.querySelector('.wrapper'); box.style.backgroundCo...
Java
UTF-8
4,057
2.65625
3
[]
no_license
package ru.kobatejib.telegram.bot.bittrex.service; import java.sql.*; import java.util.ArrayList; import java.util.List; import ru.kobatejib.telegram.bot.bittrex.entyte.Order; import ru.kobatejib.telegram.bot.bittrex.utility.DataBaseUtility; /** * Created by Kovatelj on 17.07.2017. */ public class DataBaseService ...
PHP
UTF-8
2,012
3
3
[]
no_license
<?php namespace Controllers; class BaseController { /** * Call the middleware by given name * * @param $name */ public function middleware($name){ $middlewares = [ 'auth' => 'Middleware\Authentication' ]; $middleware = new $middlewares[$name](); ...
C#
UTF-8
861
2.796875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Demo4EmpDisplay.Models; namespace Demo4EmpDisplay.Services { //79. Make interface public public interface IEmployeeRepository { //80. Create a method to search employee whenever needed ...
C++
UTF-8
1,822
2.890625
3
[]
no_license
#include <Arduino.h> #include <SPI.h> #include <Adafruit_GFX.h> #include <Max72xxPanel.h> #define debug // display settings int pinCS = PA3; // Attach display CS to this pin (PA3), DIN to SPI1_MOSI (PA7) and CLK to SPI1_SCK (PA5) int numberOfHorizontalDisplays = 4; int numberOfVerticalDisplays = 1; int intensity = 7;...
Java
UTF-8
1,366
2.765625
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 w13; /** * * @author msa */ public class Ogrenci { public Ogrenci(String adiSoyadi, int ogrId) { this.adiSoyad...
JavaScript
UTF-8
386
3.578125
4
[]
no_license
for (var i = 0; i < 5; i++) { k = (function (i) { return function() { console.log(i); }; })(i) } //k() let arr = [1,3]; let arr2 = [2,4]; arr.push(arr2); //console.log(arr.slice(-1)); console.log(1 + "2" + "2"); console.log(1 + +"2" + "2"); console.log(1 + -"1" + "2"); console.log(+"1" + "1" +...
C
UTF-8
1,131
2.78125
3
[]
no_license
#include "renderbuffer.h" renderbuffer *create_renderbuffer(int position, int color, int texture, int normal, int bone, int vertex_limit, int index_limit, bool map_buffer_range) { renderbuffer *r = safe_malloc(sizeof(renderbuffer)); r->position = position; r->color = color; r->texture = texture; r-...
JavaScript
UTF-8
1,275
2.59375
3
[]
no_license
// const { gram } = require('../models') // module.exports = { // index: (req, res) => { // gram.all() // .then(grams => { // res.render('grams/index', { grams }) // }) // .catch(e => { // res.render('grams/index', { grams: [] }) // }) // }, // create: (req, res) => { ...
JavaScript
UTF-8
337
3.765625
4
[]
no_license
function swapperFunc(array, first, second) { let temp = array[first]; array[first] = array[second]; array[second] = temp; } function bubbleSort(array, length) { for (let j = length; j > 0; j--) { for (let i = 0; i < length; i++) { if (array[i] > array[i + 1]) swapperFunc(array, i, i + 1); } } ...
Markdown
UTF-8
1,811
3.03125
3
[]
no_license
--- layout: post title: "Word of 2016: Light" description: Cultivating a sense of levity and flexibility that doesn’t come naturally. categories: - Life and health image: word-of-2016-light.jpg published: false --- I’ve gone into 2016 with a *lightness* I’m not used to and it feels incredible. My nature: I’...
JavaScript
UTF-8
661
2.625
3
[]
no_license
function wrapper(str){ return "("+str+")"; } function attr_value_escape(value){ return "'"+str(value).replace(/'/g, "''")+"'"; } function str(obj){ return ''+obj; } function attr_name_escape(name){ var reserved = ["or","and","not","from","where","select","like","null","is","order","by","asc","desc","in","betwee...
C++
UTF-8
606
2.671875
3
[]
no_license
//#include <iostream> //#include <vector> //#include <unordered_map> //#include <algorithm> // //using namespace std; // //class Solution { //public: // bool containsNearbyDuplicate(vector<int>& nums, int k) // { // unordered_map<int, vector<int>> map; // for (int i = 0; i < nums.size(); i++) // { // if (map.find(...
Python
UTF-8
2,748
3.390625
3
[]
no_license
from renameGames import rename_files_in_folder import tkinter as tk from tkinter import * import tkinter.tix as tix class Application(tk.Tk): def __init__(self): # TODO: format the widgets better and add a label to the application. super().__init__(className="SLIPPI RENAME TOOL") se...
PHP
UTF-8
1,978
2.609375
3
[]
no_license
<?php class CharitiesAttributesController extends AppController { var $name = 'CharitiesAttributes'; function index() { $this->CharitiesAttribute->recursive = 0; $this->set('charitiesAttributes', $this->paginate()); } function view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid charities...
PHP
UTF-8
1,771
2.78125
3
[]
no_license
<?php $id = $_GET['id']; $pdo = new PDO("mysql:host=localhost; dbname=as", "root",""); $sql = "SELECT * FROM list WHERE id=:id"; $statement = $pdo->prepare($sql); $statement->bindParam(":id",$id); $result = $statement->execute(); $list = $statement->fetchAll(PDO::FETCH_ASSOC); ?> <!doctype html> <html...
C#
UTF-8
1,438
3.375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnDungeonLibrary { public class Character { private int _life; public string Name { get; set; } public int HitChance { get; set; } public int Block { g...
Java
UTF-8
1,355
2.515625
3
[]
no_license
package com.voodie.domain.election; import com.voodie.domain.foodie.Foodie; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.PersistenceContext; @Stateless public class VotingDao { @PersistenceContext protected EntityManager e...
Shell
UTF-8
546
3.40625
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
#!/usr/bin/env bash for filename in tfbridge/providers/*.go; do name=`basename ${filename} .go` $(cat download-dependencies.txt | grep terraform-provider-${name}) echo "Building plugin for ${name}" time go build -buildmode=plugin -o dist/${name}.so tfbridge/providers/${name}.go if [[ $? -ne 0 ]]; t...
Python
UTF-8
5,429
3.375
3
[]
no_license
""" @file : 008-用kmeans对豆瓣读书数据聚类.py @author : xiaolu @time1 : 2019-05-11 """ import re import string import jieba import pandas as pd import numpy as np from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.cluster import KMeans from collections import Counter # ------------...
C++
UTF-8
1,820
3.34375
3
[]
no_license
#ifndef GAME_STATE_MANAGER_HPP #define GAME_STATE_MANAGER_HPP #include <unordered_map> #include <memory> #include "IGameState.hpp" #include <SFML/Window/Event.hpp> #include <typeindex> #include <iostream> namespace me { class AssetManager; /// Keeps track of the currently active game state. /// Primarily used to ...
Java
UTF-8
9,759
2.5
2
[ "MIT" ]
permissive
package br.fatec.tank; import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.awt.event.MouseAdapter; i...
Shell
UTF-8
194
2.640625
3
[]
no_license
$1 --> nodeIp $2 --> ipOfNMS ./register.sh $ipOfNMS validating="validating" if [ $5 == $validating ] then ./authenticateNotary.sh $ipOfNMS fi cd .. ./cordaMultiNodeSetup.sh $3 $4