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,090
2.734375
3
[]
no_license
#include "r.h" #include <sys/types.h> #include <sys/stat.h> #include <sys/fcntl.h> #include <unistd.h> #include <assert.h> #include <stdlib.h> struct UrandomRandomContext { struct RandomContext b; int rand_fd; }; static void rand_init(struct RandomContext *cntx) { struct UrandomRandomContext *rc = (struc...
Markdown
UTF-8
7,003
2.625
3
[]
no_license
# Jils Joseph # About me I am a quick learning adaptive individual I being in the development industry for more than 3 years most of my skills are related to data analysis. I have advanced ability in MS excel, SQL, Tableau, power Bi, problem solving and data analytic skill. I have experiened different programming ...
Java
UTF-8
296
1.664063
2
[]
no_license
package com.stage2.dao; import com.stage2.entities.Projet; import org.springframework.data.repository.CrudRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface ProjetRepository extends CrudRepository<Projet,Long> { }
C
UTF-8
1,615
3.484375
3
[]
no_license
#include<stdio.h> #include <stdlib.h> int main() { int c; FILE *fp = fopen("data.txt", "r"); int var1[1000], n, count, remain, flag=0,time_quantum; float var2[1000], var3[1000], time, wait_time=0, turnaround_time=0; printf("Enter Total Process:\t "); scanf("%d",&n); remain=n; //store arrival time and am...
Go
UTF-8
2,510
2.6875
3
[ "MIT" ]
permissive
package test_test import ( "os" "path/filepath" "testing" "github.com/Jeffail/benthos/v3/lib/service/test" yaml "gopkg.in/yaml.v3" ) func TestGenerateDefinitions(t *testing.T) { testDir, err := initTestFiles(t, map[string]string{ "foo.yaml": ` pipeline: processors: - text: ignored: this field is ig...
Java
UTF-8
142
1.851563
2
[]
no_license
package com.demo.repository; import java.util.List; import com.demo.model.Blog; public interface BlogRepository { List<Blog> findAll(); }
Markdown
UTF-8
3,610
2.515625
3
[]
no_license
--- title: CLI の例 - ドメイン名のための DNS ゾーンとレコードの作成 - Azure | Microsoft Docs description: この Azure CLI スクリプトの例では、ドメイン名のための DNS ゾーンとレコードを作成する方法を示しています services: load-balancer documentationcenter: traffic-manager author: vhorne manager: jeconnoc editor: tysonn tags: '' ms.assetid: '' ms.service: traffic-manager ms.devlang: azu...
Java
UTF-8
989
2.546875
3
[ "MIT" ]
permissive
package KOE; // Tomi Salin a1600563 class Opettaja { private String tunnus, etunimi, sukunimi; private double palkka; public Opettaja(){ tunnus=""; etunimi=""; sukunimi=""; palkka=0; } public Opettaja(String tunnus, String etunimi, String sukunimi, double palkka){ this.tunnus=tunnus; this.etunimi=etunimi;...
JavaScript
UTF-8
1,668
2.78125
3
[]
no_license
const sectionCards = document.querySelector("section.cards"); const card = document.querySelector("div.card"); const conteudos = [ { title: "Portais de transparência", thumb: "img/icone.png", description: "Tenha acesso aos principais portais de transparência do RN.", conteudo_id: "GykTLqODQuU" }, ...
Java
UTF-8
876
2.90625
3
[]
no_license
package com.games.LeetCode.Problems.OrderedStream; import com.games.LeetCode.Problems.OrderedStream.Solution.OrderedStream; import com.games.Utils; import org.junit.jupiter.api.Test; import java.util.List; import static com.games.Utils.assertSameList; class SolutionTest { @Test void testOrderedStream() { ...
JavaScript
UTF-8
933
2.65625
3
[]
no_license
import React, { PropTypes } from 'react' class Vote extends React.Component { constructor(props) { super(props); this.getPair = this.getPair.bind(this); this.isDisabled = this.isDisabled.bind(this); this.votedFor = this.votedFor.bind(this); } getPair() { return this.props.pair || []; } isDisabled() { ...
Java
UTF-8
1,003
2.84375
3
[]
no_license
package org.apache.tools.ant.taskdefs; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; import java.util.*; import java.text.*; import java.lang.RuntimeException; /** * Implements a single threaded task execution. * <p> * @author Thomas Christen <a href="mailto:chr@active.ch">chr@active.ch</a> ...
C++
UTF-8
858
2.90625
3
[]
no_license
// // Created by Lucas on 11/2/2019. // #include "OvernightPackage.h" #include <iostream> using namespace std; OvernightPackage::OvernightPackage(char *n1, char *a1, char *c1, char *z1, char *n2, char *a2, char *c2, char *z2, double w, double c, double f) : Package(n1, a1, ...
C
UTF-8
355
2.75
3
[]
no_license
#pragma once #include "common.h" int twoCitySchedCost(vector<vector<int>>& costs) { sort(begin(costs), end(costs), [](const vector<int>& o1, const vector<int>& o2) { return (o1[0] - o1[1] < o2[0] - o2[1]); }); int reuslt = 0; int n = costs.size() / 2; for (int i = 0; i < n; i++) { reuslt += costs[i][0] + co...
C++
UTF-8
1,047
3.203125
3
[ "MIT" ]
permissive
#include "ElementsManager.h" int ElementsManager::elementNums = 0; std::vector<ElementsManager::ElementWrapper> ElementsManager::elementsContainer; const int ElementsManager::getIndexByID(int id) { std::vector<ElementWrapper>::iterator it; for (it = elementsContainer.begin(); it != elementsContainer.end(); ++it) { ...
C++
UTF-8
4,479
2.859375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* FragTrap.cpp :+: :+: :+: ...
Java
UTF-8
804
1.789063
2
[ "Apache-2.0" ]
permissive
package com.ley.springcloud.stream.rabbit; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; /** * @see org.springframework.cloud.stream.binder.rabbit.properties.RabbitBinderConfiguratio...
Python
UTF-8
1,516
2.609375
3
[]
no_license
import datetime import logging import os import sys class Logger(object): _privateLogger = None logFileName = "" def __init__(self): if not Logger._privateLogger: Logger.logFileName = "%s.log" % datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") Logger.logFileName = os.path.join(os.path.dirname(__file__)...
Shell
UTF-8
430
3.703125
4
[]
no_license
#!/bin/bash show_help() { echo "" echo "USAGE: $(basename $0) [-h] [-s sep]" echo "" echo " sep : the field separator used in the input data" echo " h : show this help text" echo "" } SEPARATOR=${CSV_UTILS_SEPARATOR:-,} while getopts "hs:" opt do case "$opt" in s) SEPARATOR="$OPTARG" ;;...
SQL
UTF-8
12,137
3.015625
3
[]
no_license
use hr_database; insert into Regions (region_ID, region_name) values (1, "Asia"), (2, "Middle East"), (3, "Europe"), (4, "North America"), (5, "Central America"), (6, "South America"), (7, "Sub-Saharan Africa"), (8, "Australia and Oceania"); insert into Countries (country_ID, country_name, region_id) values (1, ...
C++
UTF-8
736
2.578125
3
[]
no_license
// ===================================================================================== // // Filename: main.cpp // // Description: Main file in which Game loops. // // Version: 1.0 // Created: 06/16/2020 06:21:24 AM // Revision: none // Compiler: g++ // // Author: Itz...
Python
UTF-8
3,337
2.96875
3
[]
no_license
from arcball.arcball import ArcBall FOV = PI/3.0 angle = 0.0 ANGLE_STEP = PI / 180.0 menger = [] def setup(): size(800,600, P3D) global arcball camera(width/2.0, height/2.0, (height/2.0) / tan(PI*30.0 / 180.0), 0, 0, 0, 0, 1, 0) arcball = ArcBall(0, 0, height * 0.6) def draw(): backgro...
Swift
UTF-8
5,516
3.390625
3
[]
no_license
// // FormulaViewController.swift // MathBeginner // // Created by Aluno Mack on 20/09/19. // Copyright © 2019 Aluno Mack. All rights reserved. // import UIKit class FormulaViewController: UIViewController { @IBOutlet weak var DescricaoTexto: UITextView! @IBOutlet weak var ImagemFormula: UIImageView...
C++
UTF-8
948
2.84375
3
[]
no_license
swap(int &a, int &b){ int temp = a; a = b; b = temp; } void permuteRec(vector<int> &a, vector<vector<int>> &b, int m, set<vector<int>> &s){ if(m == a.size()-1){ if(s.find(a) == s.end()) { b.push_back(a); s.insert(a); } } else{ for(int i = m; i < ...
PHP
UTF-8
4,611
2.671875
3
[]
no_license
<?php require_once('../../config.php'); //Start session require_once('../../auth.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html" /> <title>Public Page</title> <!--external style sheet--> <link r...
C++
UTF-8
3,929
3.046875
3
[]
no_license
#include "UtilFunctions.h" #include <iostream> #include <math.h> #include <stdlib.h> namespace easymath{ double L2_norm(matrix1d a, matrix1d b){ try{ if (a.size() != b.size()) throw "Cannot compute L2 norm, vectors of different size!" ; matrix1d c = dot_multiply(a-b) ; return sqrt(sum(c)...
C++
UTF-8
2,245
3.6875
4
[]
no_license
/* CPSC2380 * Department of Computer Science, UALR * Project 3 * Student Name: Thomas Marcoux * Student UALR ID (last four digits): 5564 * Project Descriptions: * This project takes an arithmetic expression as input, * converts it to postfix, then to a binary tree which it prints * along with its infix, post...
Python
UTF-8
820
2.890625
3
[ "Apache-2.0" ]
permissive
import libs import struct import math import os from libs import Bitmap from libs import word #Objet to draw img = None #Constructor def glInit(): return None #Init FrameBuffer def glCreateWindow(width, height): global img img = Bitmap(width,height) #Delete actual image def glClear(): img.cl...
Java
UTF-8
705
2.234375
2
[]
no_license
package com.employee.service.request.domain; import com.fasterxml.jackson.annotation.JsonProperty; public class GenericMessage<T> { @JsonProperty("message") private String message; @JsonProperty("responseBody") private T messageBody; public GenericMessage(String message, T messageBody) { ...
Python
UTF-8
239
2.5625
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
from puq import * def run(): x = UniformParameter('x', 'x', min=0, max=10) host = InteractiveHost() uq = LHS([x], 100, True) prog = TestProgram('python poly_prog.py', desc='1D Polynomial') return Sweep(uq, host, prog)
Java
UTF-8
7,378
1.820313
2
[]
no_license
package com.dmeyc.dmestoreyfm.ui; import android.support.v4.app.FragmentTransaction; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; import android.widget.LinearLayout; import and...
JavaScript
UTF-8
24,742
2.6875
3
[ "Apache-2.0" ]
permissive
class ultimateFormHandler { constructor() { this.inputTypes = { 'str': ['checkbox', 'color', 'date', 'datetime-local', 'hidden', 'month', 'password', 'radio', 'search', 'text', 'time', 'url', 'week'], 'int': ['number', 'range', 'tel'], 'eml': ['email'], 'bol...
Python
UTF-8
127
3.046875
3
[]
no_license
x=int(input('nr total de pasari de la ferma:')) g=x//2 r=g//4 gs=x-g-r print(g,'gaini') print(r,'rate') print(gs,'gaste')
Python
UTF-8
1,454
2.734375
3
[ "MIT" ]
permissive
from PIL import Image import os from img_process import rotate_and_cut import random import math from utils import str2vec import numpy as np def load_templates(): """ load the letter template from ./templates """ templates = [] for i in range(10): image_path = os.path.join(".", "templates", "%d.p...
Java
UTF-8
2,672
2.75
3
[]
no_license
package server.udpresponder; import java.io.IOException; import java.net.DatagramPacket; import java.net.InetAddress; import java.net.MulticastSocket; import java.util.Map; public class MulticastAddressResponder { public static final int TIME_500MS = 500; protected MulticastSocket socket = null; private int port;...
JavaScript
UTF-8
6,378
2.796875
3
[ "MIT" ]
permissive
/** * Created by jacky on 12/27/14. * Main Scene File * Depends on three leap controller and leap controller and all their dependencies */ //array of nodes that have already been constructed var occupied = [], constructed = []; //world wide length dimension scale. used to easily control relative distances and...
C
UTF-8
1,504
2.65625
3
[ "MIT" ]
permissive
#pragma once #include <stdio.h> //if you don't use scanf/printf change this include #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/sem.h> #include <sys/msg.h> #include <sys/wait.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> ty...
C
UTF-8
26,509
2.5625
3
[ "MIT" ]
permissive
/* The common simulator framework for GDB, the GNU Debugger. Copyright 2002-2019 Free Software Foundation, Inc. Contributed by Andrew Cagney and Red Hat. This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License...
Markdown
UTF-8
797
3.234375
3
[]
no_license
--- layout: default title: "Easy Stuffed Shells" tags: pasta,easy,stuffed,shells,main,course,dinner,kristi,grubbs --- # Easy Stuffed Shells #### Ingredients: - 36 uncooked jumbo pasta shells - 1 jar (24 ounces) spaghetti sauce - 36 frozen fully cooked Italian meatballs (1/2 ounce each), thawed - 2 cups shredded part-s...
TypeScript
UTF-8
583
3.09375
3
[]
no_license
import { deepClone } from './deepClone' describe('deepClone tests', () => { it('clones an object', () => { let fruitColors = {bananas: 'yellow'} let clonedFruitColors = deepClone(fruitColors) clonedFruitColors['apples'] = 'red' expect(Object.keys(fruitColors)).toEqual(['bananas']) expect(Object.k...
JavaScript
UTF-8
1,655
2.640625
3
[]
no_license
import { useEffect, useState } from 'react'; import Row from './Row'; import { getDataByRange } from '../helpers/dataHelpers'; import '../style/Table.css'; const Table = ({ desde, hasta }) => { const [row, setRow] = useState({}); const [keys, setKeys] = useState([]); const initData = () => { let data = [];...
JavaScript
UTF-8
1,958
3
3
[]
no_license
function salvarForm(id) { switch (id) { case 'produto': let descricao = document.getElementById("descricao").value; let marca = document.getElementById("nome_produto").value; let fornecedor = document.getElementById("fornecedor").value; let preco_atacado = document.getEleme...
C#
UTF-8
2,841
2.75
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.IO; using System.Net; namespace Bitifier.Configuration { class ConfigDownloader { private readonly Uri[] _configUris; private string _latestSha1Hash; private string _latestEtag; public ConfigDownloader(params Uri[] configUris...
Markdown
UTF-8
2,305
3.046875
3
[]
no_license
# PK2 Praktikum 7 - LinkedList Eine LinkedList in C++ mit den Standardfunktionen. ## Getting Started Einfach auschecken und die ausführbare Datei in einer Konsole ausführen. ### Prerequisites Texteditor, Windows-Betriebssystem, ggf. GNU-Compiler ### Task Implementieren Sie nun eine Klasse LinkedList in der Progr...
JavaScript
UTF-8
2,683
3.125
3
[ "MIT" ]
permissive
function TaskNode(options) { var distance_between_nodes = 400; var state = options.state; var x = options.x; var y = options.y; var width = options.width; var height = options.height; var color = options.color || 0xffffff; var borderColor = options.borderColor || 0; var borderWidth = options.b...
Markdown
UTF-8
7,220
2.65625
3
[ "MIT" ]
permissive
--- layout: post title: "Ski touring in the rockies" date: 2021-03-29 categories: mountaineering --- Hello again friends, Hope everyone is keeping safe. My mom has been informing me about the COVID situation in India which is worsening and that the vaccines have not been effective in mitigating the disease s...
JavaScript
UTF-8
584
3.125
3
[ "MIT" ]
permissive
var fs = require('fs'); //Constructor accepts 2 arguments var BasicCard = function(front, back){ //Front contains front card text this.front = front; //Back contains back card text this.back = back; this.create = function(){ //Create var with card data var cardData = { front : this.front, back : this...
Java
UTF-8
298
2.328125
2
[]
no_license
package com.mgl.neural; public class ActivationFunction { public ActivationFunction(){} public float executeFunction(float entry, float activationVal){ try { if(entry>=activationVal){ return 1; } return 0; } catch (Exception e) { } return 0; } }
C#
UTF-8
1,487
3.40625
3
[]
no_license
using System; namespace server.Models { public class GeoName: IEquatable<GeoName> { public string ToponymName { get; set; } public string AdminName1 { get; set; } public string CountryName { get; set; } public bool Equals(GeoName other) { ...
TypeScript
UTF-8
381
2.65625
3
[]
no_license
import { treeTraverser } from '../traversers'; import { ConditionFn, ObjectTreeNode } from '../types'; export function findNodes<T extends ObjectTreeNode>( root: T, condition: ConditionFn, strategy = treeTraverser, ): T[] { const matches: T[] = []; strategy(root, node => { if (condition(node) === true) ...
Java
UTF-8
1,081
3.265625
3
[]
no_license
/** * @author DengYouming * @since 2016-7-29 下午2:25:54 */ package org.hpin.webservice.util; import java.util.Comparator; /** * ASCII码比较器 * @author DengYouming * @since 2016-7-29 下午2:25:54 */ public class AsciiComparator implements Comparator<String> { @Override public int compare(String o1, String o2) { r...
Java
UTF-8
1,342
2.265625
2
[]
no_license
package mandatory.test; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; @Controller public class HomeController { Purchase purchase = new Purchase(); @GetMapping("/") public String home(){ re...
Python
UTF-8
1,121
2.78125
3
[]
no_license
# Python Application Logging # Dealing with handlers that block # The advantage of having a separate QueueListener class # is that you can use the same instance to service multiple # QueueHandlers. This is more resource-friendly than, say, # having threaded versions of the existing handler classes, # which wo...
Java
UTF-8
5,926
1.96875
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.neevtech.callguard.services; import com.neevtech.callguard.ReportedNumbers; import com.neevtech.callguard.Users; import com.neevtech.callguard.request.Paging; import com.neevtech.callguard.response.BannedNum...
Markdown
UTF-8
2,168
2.8125
3
[]
no_license
# daf2-dauer-comparisons Comparison analysis of daf-2 dauer connectome dataset with wildtype nondauer connectome datasets ## Required Software - Python 3.8.2 ## Usage Install project dependencies `pip3 install -r requirements.txt ` Make new folders `output`, `graphs` and `analysis` 1. Edit data_organizer.py wity ...
Java
UTF-8
8,709
2.09375
2
[]
no_license
package com.example.demo.Controller; import com.alibaba.fastjson.JSON; import com.example.demo.Model.PayPosal; import com.example.demo.Model.Scanner; import com.example.demo.Model.Wechat; import com.example.demo.Repository.PayPosalRepository; import com.example.demo.Repository.WechatRepository; import com.example.demo...
Java
UTF-8
1,335
4.125
4
[]
no_license
//Design and implement a TwoSum class. It should support the following operations: add and find. //add - Add the number to an internal data structure. //find - Find if there exists any pair of numbers which sum is equal to the value. public class TwoSum { /** * @param number: An integer * @return: nothi...
Java
UTF-8
1,002
2.25
2
[]
no_license
package es.blog.springBlog.service; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import es.blog.springBlog.dao.PublicationRepository; import es.blog.springBlog.model.Publication; @Service public class ...
Ruby
UTF-8
610
2.953125
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
## Code your solution below. Note that your SQL queries should be in quotation marks. #def highest_student_gpa #end #def lowest_student_gpa #end #def average_student_gpa #end #def total_tardies_for_all_students #end #def average_gpa_for_9th_grade #end def highest_student_gpa "SELECT MAX(gpa) FROM students" e...
Java
UTF-8
2,627
3.3125
3
[ "MIT" ]
permissive
package hr.fer.zemris.image.binarization; import hr.fer.zemris.image.ImageUtility; import java.awt.Color; import java.awt.image.BufferedImage; /** * Binarization algorithm that uses otsu binarization method. * * @author Domagoj Pluscec * @version v1.0, 20.5.2017. */ public class OtsuAlgorithm implements IBinari...
C
UTF-8
6,521
3.375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define queueSize_Max 256 //队列的最大长度 #define code_Max 256 //编码的最大长度 typedef struct hfmTreeNode{ int symbol; struct hfmTreeNode *left; struct hfmTreeNode *right; } hfmTreeNode, *phTreeNode; typedef struct hHfmTreeNode{ hfmTreeNode* rootNode; }...
Markdown
UTF-8
15,197
3.296875
3
[]
no_license
--- layout: page date: 2023-05-14 01:17:16 -0700 fullPath: /home/ubuntu/Git/CloudNotes/elvenware/development/web/JavaScript/NodeJade.md directoryPath: /home/ubuntu/Git/CloudNotes/elvenware/development/web/JavaScript fileName: NodeJade.md relativePath: /web/JavaScript/NodeJade.md title: NodeJade directoryName: JavaScrip...
Markdown
UTF-8
1,912
2.515625
3
[]
no_license
# Article R1333-8 Lorsque la demande d'autorisation porte sur un même établissement, ou un même transport dans le même véhicule, ou un flux d'importations et d'exportations sur une durée de douze mois, l'autorisation définie au présent paragraphe est requise si la quantité de l'un des éléments détenus ou mis en mouvem...
Markdown
UTF-8
2,263
2.5625
3
[]
no_license
Formats: [HTML](/news/2009/09/15/gabonese-firefighters-battle-a-blaze-at-the-heart-of-libreville-as-fire-consumes-the-nation-s-largest-market.html) [JSON](/news/2009/09/15/gabonese-firefighters-battle-a-blaze-at-the-heart-of-libreville-as-fire-consumes-the-nation-s-largest-market.json) [XML](/news/2009/09/15/gabones...
Python
UTF-8
1,173
2.734375
3
[ "MIT" ]
permissive
import subprocess import os def download_file(url, output_path, debug=True): if debug: print('\t[Download Utility] Downloading %s to %s' % (url, output_path)) remote_bytes = get_remote_bytes(url, debug) if debug: print('\t[Download Utility] Downloading %d bytes' % remote_bytes) parti...
Shell
UTF-8
207
2.65625
3
[]
no_license
#!/bin/bash -x exec 4< inp2.txt # opening file via descriptor while read LINE <&4; do printf "%s\n" "$LINE" # just to watch that command is proper $LINE # execute command done
C++
ISO-8859-1
6,970
3.234375
3
[]
no_license
#include <Program.h> #include <asm_mipsyac.h> extern void programparse(string) ; extern Program prog ; Program::Program(){ _head= NULL; _length=0; } //constructeur de copie Program::Program(Program const& otherprogram){ //On initialise la liste. _head= NULL; _length= 0; // On copie la liste. Node * ...
JavaScript
UTF-8
1,132
3.28125
3
[]
no_license
// output format for the chart: /*{ "date":" 2010-01-03T23:00:00.000Z", "open": 25.436282332605284, "high": 25.835021381744056, "low": 25.411360259406774, "close": 25.710416, "volume": 38409100, "split":"", "dividend":"" } */ export function readFormat(heading) { if (heading == "Date,Open,Close,High...
Ruby
UTF-8
540
2.859375
3
[ "MIT" ]
permissive
require 'spec_helper' describe Immutable::SortedSet do describe '#delete_at' do let(:sorted_set) { SS[1,2,3,4,5] } it 'removes the element at the specified index' do sorted_set.delete_at(0).should eql(SS[2,3,4,5]) sorted_set.delete_at(2).should eql(SS[1,2,4,5]) sorted_set.delete_at(-1).s...
Python
UTF-8
106
3.28125
3
[]
no_license
fruits = ['apple', 'banana', 'orange', 'mango'] my_favourite_fruit = fruits[1] print(my_favourite_fruit)
C++
UTF-8
3,425
2.921875
3
[]
no_license
// --------------------------------------------------------------------------- // - Unitabler.hpp - // - standard object library - unicode table class definition - // --------------------------------------------------------------------------- // -...
JavaScript
UTF-8
651
2.515625
3
[ "MIT" ]
permissive
/*jslint browser: true */ define( function() { 'use strict'; return { /** * @param {string} name * @param {function()} require * @param {function()} onload * @param {Object} config */ load: function( name, require, onload, config ) { va...
Shell
UTF-8
901
3.859375
4
[]
no_license
#!/bin/bash kill_all() { for pid in `printf "$PSDATA" | awk '{print $2}'` do echo "kill $1 Pid $pid" kill $1 $pid done PSDATA=`ps aux | grep "$PROG" | grep -v grep | grep -v kill` if [ ! -z "$PSDATA" ]; then echo '-------------------Fail----------------------' printf "$...
Markdown
UTF-8
720
2.6875
3
[]
no_license
## What is it all about? This repository contains my slides and sample codes that I used for my talk in DDD Melbourne 2017. ## Files in the repository * ML.key - Slides in Keynote format (Original format) * ML.pptx - Slides in PowerPoint format (Converted from Keynote) * simple.js - A simple implementation of a...
Java
UTF-8
668
1.992188
2
[]
no_license
package com.baidu.fbu.frontsystem.server; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * * 版权信息 * 文件名 * 描述 前置信息上下文类 * 创建人 panhongshuang * 创建时间 2017-07-07 * 修改日志 */ public class FrontSystemContext { private static fin...
C
UTF-8
938
2.890625
3
[]
no_license
#include <string.h> #include <stdlib.h> #include <stdio.h> int language = 0; int greetuser(char *str){ char buf[72]; if (language == 1) strncpy(buf, "HyvÃÃ pÃivÃÃ", 19); // 19 because of unicode : check x/s 0x8048717 if (language == 2) strncpy(buf, "Goedemiddag! ", 14); else strncpy(buf, "Hello ", 7); str...
JavaScript
UTF-8
124
3.0625
3
[ "MIT" ]
permissive
var c = 0 while (c < 5) { console.log(c) c++ } console.log('') for (var c = 0; c < 5; c++) { console.log(c) }
TypeScript
UTF-8
2,592
2.84375
3
[]
no_license
import { IProgress, IProgressProps } from "./types"; import { ClassNames } from "../classNames"; import { Base } from "../base"; import { HTML } from "./templates"; /** * Progress Bar Types */ export enum ProgressBarTypes { Danger = 1, Dark = 2, Info = 3, Light = 4, Primary = 5, Secondary = 6...
SQL
UTF-8
3,112
4
4
[ "Apache-2.0", "BSD-2-Clause" ]
permissive
DROP TABLE IF EXISTS AcadProgram; CREATE TABLE AcadProgram ( programID INT NOT NULL AUTO_INCREMENT PRIMARY KEY , title VARCHAR ( 30 ) NOT NULL, type ENUM('Coursework', 'B.A.', 'B.S.', 'M.Sc.', 'Ph.D.', 'Major', 'Minor') NOT NULL DEFAULT 'Coursework', school VARCHAR ( 30 ) NOT NULL, division...
Java
UTF-8
2,314
3.140625
3
[]
no_license
package bqb; import java.util.ArrayList; public class QuoteSearcher { public static ArrayList searchThroughQuote(String chatMessage) { String searchTerm = chatMessage.substring(14); //cuts out !searchquotes // System.out.println(searchTerm); (debug) boolean didIfStatement...
C++
UTF-8
227
2.875
3
[ "MIT" ]
permissive
// Welcome to the Interactive C++ Tutorial. // Start by choosing a chapter and // write your code in this window. #include <iostream> using namespace std; int main() { cout << "Hello, World!" << endl; return 0; }
Python
UTF-8
1,146
4.34375
4
[]
no_license
food = ['치즈', '바나나', '사과', '커피'] print(food[0]) print(food[1]) # 리스트 원소 위치를 인덱스로 가리킬 수 있으며 # 인덱스는 0부터 시작 val = [10, 20, 30, 40] print(val) print(val[0]) val[0] = 50 val[1] = -30 print(val) # 원소의 순서를 바꾸거나, 다른 원소로 바꿀수 있다. # 문자열은 X f = 'hello' print(f) print(f[1]) """ f[1]='o' print(f) """ # TypeError TypeError: 'str'...
Java
UTF-8
292
1.867188
2
[]
no_license
package com.appl_maint_mngt.repositories.maintenance_schedule; import com.appl_maint_mngt.models.maintenance_schedule.MaintenanceSchedule; /** * Created by Kyle on 23/03/2017. */ public interface IMaintenanceScheduleUpdateableRepository { void addItem(MaintenanceSchedule sched); }
JavaScript
UTF-8
1,891
2.546875
3
[ "MIT" ]
permissive
"use strict"; var aws = require("./util.js"); var uuid = require('uuid'); const tableName = "transactions"; exports.ClearTransactions = async function () { var allItems = await aws.ScanItems({ TableName: tableName }) var ps = []; var i = 0 const l = allItems.Items.length do { ...
Java
UTF-8
107
1.679688
2
[]
no_license
package com.syntax.class20_1; public class A { public void showA() { System.out.println("Class A"); } }
C
UTF-8
1,332
2.75
3
[]
no_license
#ifndef _DHAT_H #define _DHAT_H #include <wchar.h> enum key_type { WCHAR, CHAR, VOID, }; struct entry { enum key_type keytype; size_t keysize; wchar_t *key; const void *value; struct entry *next; }; typedef struct dhat { unsigned int size; int maxdepth; int factor; struct entry **entry; size_t (*getha...
Python
UTF-8
2,371
2.640625
3
[]
no_license
#!/usr/bin/python from optparse import OptionParser import os def match(): f = open("results/mapping.txt","rb") mapping = {} for line in f.readlines(): k,v = line.split(",") mapping[k.strip()] = v.strip() return mapping def gen_csv(fname, mapping): name = fname[:-4] ID = mappi...
Python
UTF-8
611
4.3125
4
[]
no_license
print("1st list") lst=[2,566,4,7,73,44,23] new_lst=[] for i in range(2,5): new_lst.append(lst[i]) print(new_lst) print(lst[2:5]) print("2nd list") lst1=[2,3,4,5] lst2=lst1 print(lst1) lst2.append(20) print(lst1) #here lst will be same as lst 2 although we didn't append 20 with lst.the reason is in this case ref...
Rust
UTF-8
913
2.53125
3
[ "LicenseRef-scancode-unknown", "MIT" ]
permissive
#[allow(unused_imports)] use serde_json::Value; #[derive(Debug, Serialize, Deserialize)] pub struct NodePartitionsNode { /// Count of how many partitions are included. #[serde(rename = "count")] pub count: Option<i32>, /// Error message, if the HTTP status returned from this node was not 200. #[ser...
JavaScript
UTF-8
2,783
2.828125
3
[]
no_license
$(document).ready(function(){ // KHAI BAO const LENGTH = $('.images-item').length ; const listSlide = Array.from($('.list-images ul .images-item')); let count = 0 ; // lặp lại các nút for(let i = 2 ; i < LENGTH + 1; i++){ $('.list-icon .dot').append(` <a href="#">...
Python
UTF-8
280
2.890625
3
[]
no_license
S = input() scales = { "WBWBWWBWBWBWWBWBWWBW": "Do", "WBWWBWBWBWWBWBWWBWBW": "Re", "WWBWBWBWWBWBWWBWBWBW": "Mi", "WBWBWBWWBWBWWBWBWBWW": "Fa", "WBWBWWBWBWWBWBWBWWBW": "So", "WBWWBWBWWBWBWBWWBWBW": "La", "WWBWBWWBWBWBWWBWBWWB": "Si", } print(scales[S])
Python
UTF-8
2,842
3.015625
3
[]
no_license
"""todo model module contains the logic for handling, manipulating, storing, etc. todo objects""" import uuid from dragon.common.types import JsonSerializable from dragon.common import exceptions from dragon.common import constants from dragon.aws.services import dynamo class Todo(JsonSerializable): schema = d...
Python
UTF-8
1,157
2.859375
3
[ "MIT" ]
permissive
from problem_solving.algorithms.debugging import * def test_q1_prime_date(capsys, monkeypatch): inputs = ["02-08-2025 04-09-2025"] monkeypatch.setattr('builtins.input', lambda: inputs.pop(0)) q1_prime_date.main() captured = capsys.readouterr() output = "5\n" assert captured.out == output de...
C#
UTF-8
10,556
2.9375
3
[]
no_license
using ServiceStack.Redis; using StackExchange.Redis; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; namespace RedisConsoleDemoOne { class Program { static void Main(st...
Java
UTF-8
420
1.789063
2
[]
no_license
package com.secl.eservice.requisition.road.response; import com.google.gson.annotations.Expose; import com.secl.eservice.util.constant.Constant; import lombok.Getter; import lombok.Setter; @Getter @Setter public class GetCommentList { private @Expose String oid, roadrequisitionoid, comment, stepoid, createdby, ...
Python
UTF-8
561
3.234375
3
[]
no_license
# 21. 1. 2. 행렬의 덧셈 # 넘파이로 한줄컷 가능했지만 다른풀이 도출하는데 꽤 시간이 걸렸다 # 의외로 list comprehension이 가장 빨랐다 import numpy as np def solution_numpy(arr1, arr2): return np.add(np.array(arr1), np.array(arr2)).tolist() def solution_map(arr1, arr2): ans = [] for i in range(len(arr1)): a = list(map(sum, zip(arr1[i],arr2[...
C#
UTF-8
977
2.5625
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Video; public class MachineBuilder : MonoBehaviour { // Can access any component in the grid via its coordinates public static Dictionary<Vector2, GameObject> componentGrid = new Dictionary<Vector2, ...
Markdown
UTF-8
9,205
2.75
3
[ "0BSD" ]
permissive
--- title: OCR API 비교 tags: - Android date: 2020-02-12 --- OCR(Optical character recognition)은 사람이 쓰거나 기계로 인쇄한 문자의 영상을 기계가 읽을 수 있는 문자로 변환하는것이다. 최근 ML이 트렌드로 떠오르면서 다양한 기업들에서 이를 기반으로 한 OCR API를 제공하고 있는데 몇개를 사용해보고 정리해보고자 한다. # Firebase ML Kit Google에서 제공하는 모바일용 ML kit이다. 무료이지만 라틴 문자만 인식이 가능하다. 인식속도가 빠르고 이미지만 전...
Python
UTF-8
7,830
2.734375
3
[ "Apache-2.0" ]
permissive
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
PHP
UTF-8
1,413
2.515625
3
[]
no_license
<?php namespace App\shopping; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; class SeatRegister extends Model { protected $table = 'seat_registers'; protected $fillable = ['visit', 'sale_ticket_id', 'seat_id']; public $timestamps = false; public function seat() { ...