language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Java
UTF-8
5,537
2.125
2
[]
no_license
package org.feedworker.client.frontend.panel; //IMPORT JAVA import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JButton; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; imp...
SQL
UTF-8
768
2.9375
3
[]
no_license
create trigger editar_pasajero_vista on reg_pasajero instead of update as begin update identificacion set descripcion = (select descripcion from inserted) where cod_pasajero = (select cod_pasajero from inserted) update pasajero set nombre_pasajero = (select nombre_pasajero from inserted), apellido...
Java
UTF-8
1,735
2.1875
2
[ "Apache-2.0" ]
permissive
package info.pelleritoudacity.android.rcapstone.data.db.entry; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; @SuppressWarnings("unused") @Entity(tableName = "_data") public class DataEntry { @PrimaryKey(autoGenerate = true) private int id; @ColumnInfo(na...
Java
UTF-8
2,416
3.1875
3
[]
no_license
package duke.ui; import duke.task.Task; import duke.task.TaskList; /** * A class that store all the possible String format for Duke for code simplicity. */ public class Ui { public static final String LINEBREAK = "\n"; public static final String LOGO = "D U K E"; public static final String WRONG_DATE_F...
Python
UTF-8
396
3.65625
4
[]
no_license
#Write your puthon code s= 'this is my familly and there are many 3 types of family' # Printing Tricks #\n meaning new line #\t meaning tab #\'' if we want print with '' #\= Backslash is used as escape character print 'apple\nbabana' print 'apple\tmango\torange\tgraphes' print "'apple\\'mango\\''orange\\''graphes...
Python
UTF-8
581
2.703125
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json, datetime class DateTimeEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime.datetime): return obj.isoformat() elif isinstance(obj, datetime.date): return obj.isoformat() elif isinstance(obj, datetime.timedelta): ret...
Markdown
UTF-8
804
3.15625
3
[]
no_license
邮政编码是我们所说的一个精确分类。我们通常依赖于代码保持稳定。如果邮政编码是10012,这个建筑是在曼哈顿。这没什么好争论的,就是这样。 模糊分类需要考虑更多来决定东西应该在哪里出现。模棱两可的东西越多,争论就越多。 电影流派如喜剧和喜剧可能看起来精确。但如果让三个电影评论家呆在一个房间里,让他们把黑色喜剧分到这两个流派之中,他们可能会互相挑战。 模糊和精确也是和上下文相关的。 例如,在编辑这本书的时候,Nicole建议我在上面的例子中使用术语『Postal code』而不是『Zip code』。两者都表达了这一点,但是根据上下文其中一个更精确,其中包括了美国以外的读者。
Markdown
UTF-8
3,062
3.234375
3
[]
no_license
--- $title: Extensions $category: Reference $order: 9 --- # Extensions [TOC] Grow has a powerful and simple extension system that enables you to extend the functionality of Grow with plugins. Extensions are standard Python modules, so your site's `extensions` folder must be set up appropriately, with `__init__.py` f...
JavaScript
UTF-8
371
2.765625
3
[ "CC0-1.0" ]
permissive
function mapInit() { // follow the Leaflet Getting Started tutorial here return map; } async function dataHandler(mapObjectFromFunction) { // use your assignment 1 data handling code here // and target mapObjectFromFunction to attach markers } async function windowActions() { const map = mapInit(); await ...
Java
UTF-8
3,252
3.640625
4
[]
no_license
package com.datastructures.stack; import java.util.Stack; public class StackProblems2 { public int precedance(char i) { int r = -1; if (i == '^') r = 3; else if (i == '*' || i == '/') r = 2; else if (i == '+' || i == '-') r = 1; return ...
C#
UTF-8
788
3.0625
3
[]
no_license
namespace Molmed.SQAT.DBObjects { public class Plate : Identifiable { private string MyDescription; public Plate(int ID, string name, string description) : base(ID, name) { MyDescription = description; } public string Description { ...
Java
UTF-8
2,246
2.046875
2
[]
no_license
package de.ancud.camunda.connector.sql.impl; import de.ancud.camunda.connector.sql.SqlConnector; import de.ancud.camunda.connector.sql.SqlRequest; import de.ancud.camunda.connector.sql.SqlResponse; import de.ancud.camunda.connector.sql.constants.ConnectorKeys; import de.ancud.camunda.connector.sql.init.DataSourceConfi...
C++
UTF-8
2,386
2.90625
3
[]
no_license
#include "pscx_bios.h" #include <fstream> #include <iterator> //------------------------------------------------ // TODO : to implement the loadBios function. // It should load the BIOS binary file into array of bytes u8 (m_data). // // Rust: // pub fn new(path: &Path) -> Result<Bios> { // let file = tr...
Python
UTF-8
4,626
3.28125
3
[]
no_license
import csv import time from crate import client import random from datetime import datetime import os.path as path def connectCrate(): time.sleep(10) # 1- Creamos la conexion try: connection = client.connect('crate:4200',timeout=5,error_trace=True,backoff_factor=0.2) print("CONNECT OK") except E...
JavaScript
UTF-8
2,668
3.703125
4
[]
no_license
const select = document.querySelector('select'); document.body.style.padding = '10px'; select.onchange = function() { const choice = select.value; createCalendar(choice, 2022); } function daysInMonth(month, year) { var d = new Date(year, month, 0); return d.getDate(); } const list = d...
Markdown
UTF-8
5,581
2.765625
3
[]
no_license
# 安裝 PHP 語言 ## 安裝前準備 * 請先安裝 [Apache](../12-Apache/) ## 安裝各版本的 PHP * 安裝 PHP 5.6 版本 `brew install php@5.6` * 安裝 PHP 7.0 版本 `brew install php@7.0` * 安裝 PHP 7.1 版本 `brew install php@7.1` * 安裝 PHP 最新 版本 `brew install php` ## Cli 指令模式設定 * 用 Sublime Text 2 打開編輯 `~/.zshrc`,終端機執行指令 `subl ~/.zshrc` * 稍微檢查一下以下路...
C#
UTF-8
1,473
2.796875
3
[ "MIT" ]
permissive
using OpenTK.Graphics.OpenGL; namespace GameStructure { class FPSTestState : IGameObject { TextureManager _textureManager; Font _font; Text _fpsText; Text _longText; Renderer _renderer = new Renderer(); FramesPerSecond _fps = new FramesPerSecond(); public...
Java
UTF-8
950
2.0625
2
[]
no_license
package info.bubna.up.controller; import info.bubna.up.dto.WebDisciplineDTO; import info.bubna.up.dto.WebMarkDTO; import info.bubna.up.service.UserService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; impo...
Python
UTF-8
706
2.625
3
[]
no_license
import cv2 import numpy def generate(): model = cv2.face.LBPHFaceRecognizer_create() face_list = [] face_ids = [] for x in range(1, 31): image = cv2.imread(f"./dataset-train/{x}.jpg", cv2.IMREAD_GRAYSCALE) face_recognizer = cv2.CascadeClassifier('./models/haarcascade_frontalface_defau...
Java
UTF-8
682
2.203125
2
[]
no_license
package com.myfinance.personalbudget.domain; import lombok.*; import javax.persistence.*; import javax.validation.constraints.NotBlank; import java.util.List; @Entity @Getter @Setter @AllArgsConstructor @NoArgsConstructor @ToString(exclude = "transactions") public class Counterparty extends AbstractEntity { @Id...
Markdown
UTF-8
9,955
3.328125
3
[]
no_license
# 这是开篇 有人说,暂存区是 Git 最精彩的设计,同时也是最难理解的部分,两者我都感觉不太明显,但当我想写关于暂存区的理解后,发现的确不怎么好讲,这个玩意,有点只可意会的感觉,用 Git 用熟练了,很自然体会到暂存区设计的精彩之处。 在我看来,学习其他命令之前,对暂存区有一个概念和大概理解是非常重要的,因为,很多命令都涉及到了它。 # 为什么 commit 之前要先 add 一下呢? 我在刚接触 Git 命令的时候,对 Git 没什么概念,就是赶鸭子上线式的学习,用到什么,就去 Google 什么,例如第一天我搜索的就是“git first commit”,然后搜到很多 Git 的初级教程,几乎都有说先执行 git ad...
C++
UTF-8
482
2.921875
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int LCS(char A[ ], int n, char B[ ], int m) { } int find(int A[ ], int e, int lo, int hi) { while ((lo < hi--) && (e != A[hi])) cout << hi << endl; return hi; } int main() { //int A[2] = {0, 2}; //int idx = find(A, 1, 0, 2); //c...
Markdown
UTF-8
6,177
2.875
3
[]
no_license
自作のReact Hooksをメモするためのプロジェクト ## ビルド ``` $ npm start ``` ## hooks ### usePrevious レンダリング時に、指定した値が変更される前の値を取得することができる cloneDeepを使って、deepなオブジェクトの深い部分が変更されても前の値を保持できるようにしている ```.ts interface UsePreviousOption { deepCopy?: boolean } /** * 引数に指定した値を保存し、次のレンダリング時に返り値として所得することができます。 * 初回レンダリング時の返り値は undefined になりま...
PHP
UTF-8
2,420
2.953125
3
[]
no_license
<?php require_once 'game.php'; header('Content-type: application/json'); $player1 = 0; $player2 = 1; function test_vertical() { global $game_template, $player1, $player2; $game = (object) $game_template; for ($i = 0; $i < 14; $i++) { $col = $i % 2; if ($col == 0) { $player = ...
C++
UTF-8
551
3.015625
3
[]
no_license
#include "Point.h" #include "Segment.h" using namespace std; double Point::distanceToSegment(const Segment &seg) const { Point AC(seg.p1().x - x, seg.p1().y - y); Point BC(seg.p2().x - x, seg.p2().y - y); Point AB = seg.dP(); double dAH = (AB.x * AC.x + AB.y * AC.y) / AB.norm(); if (dAH < 0 || ...
Java
UTF-8
557
2.265625
2
[]
no_license
package com.security.security;/** * Created by HT on 2017/10/26. */ import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionSignUp; import org.springframework.stereotype.Component; /** * @author HT * @create 2017-10-26 11:14 **/ @Component public class DemoConnec...
Java
UTF-8
2,289
2.3125
2
[]
no_license
package fun.build4.playground.httpbin; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.boot.Banner.Mode; import org.springframework.boot...
PHP
UTF-8
3,374
3
3
[]
no_license
<?php function loadRegistrations($filepath){ $jsondata = file_get_contents($filepath); $arr_data = json_decode($jsondata,true); return $arr_data; } function saveDataJson($filepath, $name, $email, $phone){ try { $contact = array( 'name' => $name, 'email' => $email, ...
Python
UTF-8
509
2.734375
3
[]
no_license
import os from django.core.exceptions import ValidationError def validate_file_extension(value): valid_extensions = ['.ods', '.xls', '.xlsx'] validate(value,valid_extensions) def validate_file_extension_csv(value): valid_extensions = ['.csv'] validate(value,valid_extensions) def validate(value,valid_...
Swift
UTF-8
7,784
2.578125
3
[]
no_license
// // FormMDSignature.swift // SimpleDraw // // Created by DNA on 1/17/17. // Copyright © 2017 DNA. All rights reserved. // import UIKit class FormMDSignature: UIView { var lastPoint = CGPoint(x: 0, y: 0) var topLeftPoint = CGPoint(x: 0, y: 0) var bottomRightPoint = CGPoint(x: 0, y: 0) var re...
Python
UTF-8
2,028
3.59375
4
[]
no_license
#! python3 # phoneAndEmail.py - Finds phone numbers and email addresses on the clipboard # Pyperclip is a cross-platform Python module to copy and paste strings. # pip install pyperclip import pyperclip, re # triple-quote syntax to create a multiline string # ? makes the group that precedes it as optional # re.VERB...
JavaScript
UTF-8
6,947
2.78125
3
[]
no_license
const http = require('http'); //Host IP of the server const hostname = '127.0.0.1'; //Host Port of the Server const port = 3001; //Module to handle the Database var mongoose = require('mongoose'); //URL to the Database //CHANGE IF YOU ARE USING VALUES OTHER THAN THE DEFAULT ONES! var mongoDBurl = "mongodb://192.168...
TypeScript
UTF-8
2,528
2.640625
3
[ "BSD-3-Clause" ]
permissive
import { Type } from "class-transformer"; import { Equals, IsArray, IsIn, IsNotEmptyObject, IsNumber, IsOptional, IsString, ValidateNested, } from "class-validator"; export abstract class NotificationBase { @IsString() version: string; @IsString() id: string; @IsStri...
Python
UTF-8
2,232
4.0625
4
[]
no_license
""" Time complexity analysis: Insert each line into a 2D dictionary in O(n) where n is the total number of lines in the file. We sort the dates in O(m log m) where m is the total number of unique dates. We sort the URLs count in in O(m log p) where m is as above and p the total number or unique URLs on a given date. W...
Java
UTF-8
1,968
1.5625
2
[]
no_license
package com.atmshop.constant; /** * Created by Anil Sharma on 2/2/16. */ public interface IJson { //Login Screen String mobile_no = "mobileNumber"; String password = "password"; String userId = "userId"; String active = "active"; String userName = "userName"; //Owner String owner...
Markdown
UTF-8
3,027
3.9375
4
[]
no_license
字典就像列表一样,但是字典更通用。在列表中,索引位置必须是整数,但是在字典中,索引几乎可以是任意类型。 你可以把字典看作是一系列的索引(这里叫做键key)和一系列的值之间的映射。每个键对应一个值,键和值之间的关系成为键值对,有时也称为数据项。 举个例子,我们将创建一个英语映射到西班牙语的字典,键和值都是字符串。 `dict`函数创建了一个新的字典,没有任何的键值对。因为`dict`是内置函数的名称,所以不要用它做变量名。 ```python >>> eng2sp = dict() >>> print(eng2sp) {} ``` 大括号{}表示一个空字典,要添加数据项到字典,可以使用中括号: ```python >>> eng...
Java
UTF-8
1,076
2.203125
2
[]
no_license
package com.wisewater.auto.service; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.wisewater.base.BaseService; import com.wisewater.auto.controller.CSelfTagForm; import com.wisewater...
Shell
UTF-8
12,185
3.96875
4
[]
no_license
#!/bin/bash ################################################################################ # Sensu plugin to monitor ability of build Nova instances # ################################################################################ # DESCRIPTION: This script attempts to build a Nova instance (i...
PHP
UTF-8
3,196
2.59375
3
[]
no_license
<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title>InventoryTracking_1</title> <!-- Reset browser defaults --> <link rel="stylesheet" type="text/css" href="css/normalize.css"> <!-- Custom Stylesheet --> <link rel="stylesheet" href="css/InventoryTracking_2-Item.css"> </he...
JavaScript
UTF-8
1,036
2.8125
3
[]
no_license
import React from 'react'; import { Link } from 'react-router-dom'; import moment from 'moment'; export default ({ id, description, amount, createdAt, note }) => ( <Link className="list-item" to={`/edit/${id}`}> <div className="list-item__container"> <div className="list-item__left"> ...
Markdown
UTF-8
4,155
3
3
[]
no_license
# Sync / Async * 호출함수가 피호출함수 작업 완료를 확인하는지 여부 ### Sync * A 함수에서 B 함수 호출시, A 함수가 B 함수가 완료되었는지 확인후에 후처리 작업 수행하는 방식 ### Async * A 함수에서 B 함수 호출시, A 함수는 B 함수가 완료되었는지 신경쓰지 않고, B 함수 스스로 작업 완료시 후처리 작업(callback 메서드) 수행 <br> # Blocking / Non-blocking * 호출함수가 피호출함수 작업 완료를 기다리는지 여부 ![image](https://user-images.githubuserconten...
Markdown
UTF-8
778
2.53125
3
[]
no_license
# Article D421-162 Les élèves du second degré de l'Ecole européenne de Strasbourg sont représentés au comité des élèves conformément à la convention portant statut des écoles européennes faite à Luxembourg le 21 juin 1994 et au règlement général des écoles européennes. Le comité des élèves est composé des délégués é...
Go
UTF-8
404
4.0625
4
[]
no_license
package main import "fmt" func main() { var x [5]int x[0] = 2 fmt.Println(x) // [2 0 0 0 0] // array literal y := [5]int{10, 20, 30, 40, 50} fmt.Println(y) // [10 20 30 40 50] // use of '...' -> will infer size z := [...]int{1, 2, 3, 4} fmt.Println(z) // [1 2 3 4] // iteration for inde...
Python
UTF-8
938
2.53125
3
[]
no_license
import pygame import random from Libs import funciones as f pygame.mixer.init() #COLORES VERDE=[0,255,0] BLANCO=[255,255,255] NEGRO=[0,0,0] ROJO=[255,0,0] AZUL=[0,0,255] #PANTALLA width = 800 height = 600 screen = pygame.display.set_mode([width,height]) #CUADRICULA ls_c=[] ls_f=[] #GRUPO DE SPRITES todos = pygame.s...
Java
UTF-8
3,223
2.28125
2
[ "MIT" ]
permissive
/* * Gitea API. * This documentation describes the Gitea API. * * OpenAPI spec version: 1.18.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.gitea.model; import java.util....
C++
UTF-8
1,598
2.53125
3
[]
no_license
#include "stdafx.h" #include "KeybindState.h" KeybindState::KeybindState(sf::RenderWindow* window, std::map<std::string, int>* supportedKeys, sf::Font* font, sf::Color color, uint8_t size) : State(window, supportedKeys), m_font(font) { InitializeText(color, size); } void KeybindState::InitializeKeybinds() { } voi...
Java
UTF-8
6,306
2.796875
3
[]
no_license
package lottery; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Collections; class CProcessConfig { public String m_PrizeLevel; public int m_PrizeNum; public int m_NumPerRou...
C
UTF-8
2,875
3.15625
3
[]
no_license
/***************************************************************************** ​ * ​ ​ Copyright​ ​ (C)​ ​ 2017​ ​ by​ ​ Snehal Sanghvi ​ * ​ * ​ ​ Redistribution,​ ​ modification​ ​ or​ ​ use​ ​ of​ ​ this​ ​ software​ ​ in​ ​ source​ ​ or​ ​ binary ​ * ​ ​ forms​ ​ is​ ​ permitted​ ​ strictly for educational purposes...
PHP
UTF-8
1,306
3.03125
3
[ "MIT" ]
permissive
<?php /** * Query Auth Example Implementation * * @copyright 2013 Jeremy Kendall * @license https://github.com/jeremykendall/query-auth-impl/blob/master/LICENSE.md MIT * @link https://github.com/jeremykendall/query-auth-impl */ namespace Example; /** * Stores your API key and secret */ class ApiCredentials { ...
C
UTF-8
152
3.171875
3
[]
no_license
#include<stdio.h> main() { char name[10]; printf("Enter a name:"); gets(name); printf("Good morning %s",name); return 0; }
Python
UTF-8
2,741
4.40625
4
[]
no_license
# -*- encoding: utf-8 -*- # Stack() creates a new stack that is empty. # It needs no parameters and returns an empty stack. # push(item) adds a new item to the top of the stack. # It needs the item and returns nothing. # pop() removes the top item from the stack. # It needs no parameters and returns the item....
Ruby
UTF-8
157
2.578125
3
[]
no_license
require 'sinatra' get '/' do @host = ["Adam", "Ben", "Chris"].sample erb :index end get '/hello' do @name = params[:name].capitalize erb :index end
Java
UTF-8
33,909
1.945313
2
[]
no_license
package com.joedobo27.enchantednature; import com.wurmonline.mesh.Tiles; import com.wurmonline.server.items.*; import com.wurmonline.server.skills.SkillList; import javassist.CannotCompileException; import javassist.ClassPool; import javassist.CtMethod; import javassist.NotFoundException; import javassist.bytecode.B...
Markdown
UTF-8
8,377
2.609375
3
[]
no_license
<div class="panel panel-default"> <div class="area-title"> <span> 题目描述 <small>Description</small> </span></div> <div class="panel-body"> <p style=""><span style="">BY<span style="">J</span></span><span style="">发现一堆长短不一的木棍<span style="">。</span>由于它们太混乱<span style="">,</span></span><span style="">BY<span style="">J</sp...
C++
UTF-8
2,945
2.609375
3
[]
no_license
#include"persistentsegtree_faster.hpp" using namespace std; using namespace StetAlgo; int main(){ vector<int> V; int (*reducer)(int,int) = [](int a,int b){return a+b;}; using checkpointType = size_t; checkpointType initChk = 0; auto tree = makePersistentSegTree<500000>(V, reducer, initChk); c...
Shell
UTF-8
891
4.21875
4
[]
no_license
#!/bin/bash # copydir.sh # 拷贝 (verbose) 当前目录($PWD)下的所有文件到 #+ 命令行中指定的另一个目录下. E_NOARGS=65 if [ -z "$1" ] # 如果没有参数传递进来那就退出. then echo "Usage: `basename $0` directory-to-copy-to" exit $E_NOARGS fi ls . | xargs -t -I % cp ./% $1 # ls . | xargs -i -t cp ./{} $1 # ^^ ^^ ^^ # -t 是 "verbose" (输出...
C#
UTF-8
2,980
3.140625
3
[]
permissive
// Copyright (c) 2019 Glenn Watson. All rights reserved. // Glenn Watson licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. using System; namespace ReactiveGit.Gui.Core.Model.Branches { /// <summary> /// A node in the branch structure. ...
Java
UTF-8
971
1.921875
2
[]
no_license
package com.itfac.amc.util; import java.util.Date; import javax.persistence.Column; import javax.persistence.EntityListeners; import javax.persistence.MappedSuperclass; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annota...
Python
UTF-8
808
2.96875
3
[]
no_license
import socket, sys host, port = sys.argv[1:] #look up th given data results = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM) #We may get multiple results back. Display each one. for result in results: print "-"*60 #print whether we got back an IPv4 or IPv6 result. if result[0] == socket.AF_INET: ...
C++
UTF-8
495
2.765625
3
[]
no_license
#include <iostream> #include <deque> #include <algorithm> #include <vector> using namespace std; int E,S,M; int result = 1; int main(){ cin >> E >> S >> M; while(1){ if(E == 1 && S == 1 && M == 1){ break; } E--; S--; M--; if(E == 0){ E =...
Python
UTF-8
710
4.03125
4
[]
no_license
# # In versions of Python prior to Python 3, os.listdir() is the method to use to get a directory listing: # # ______ __ # entries _ __.l_d_ my_directory/' # # # os.listdir() returns a Python list containing the names of the files and subdirectories in the directory given # # by the path argument: # # __.l_d_('my_direc...
C
UTF-8
6,684
3.265625
3
[]
no_license
#include "tree.h" void flatten_list ( node_t* node ); void evaluate_expression ( node_t* node ); void replace_node ( node_t* node, node_t* other ); #ifdef DUMP_TREES void node_print ( FILE *output, node_t *root, uint32_t nesting ) { if ( root != NULL ) { fprintf ( output, "%*c%s", nesting, ' ', root->...
Python
UTF-8
2,850
3.484375
3
[]
no_license
import random letra = " " letras_bien = 0 oport = 6 letras_usa = [] palabra_act = [] letras_sr = [] palabras = ["ventana", "libreria", "sonido", "universidad", "elefante"] letras_correctas = "" rand = random.randint(0,len(palabras)-1) pal_esco = palabras[rand] largo = len(pal_esco) word = [] print("Bienvenido al jue...
JavaScript
UTF-8
1,557
2.609375
3
[]
no_license
'use strict'; var blessed = require('blessed'); var contrib = require('blessed-contrib'); function HSLtoRGB(color) { var hue = color.hue; var saturation = color.saturation; var brightness = color.brightness; var kelvin = color.kelvin; } class Main { constructor(screen) { this.screen = screen; this.grid = ne...
Python
UTF-8
5,328
3.171875
3
[]
no_license
import random import sqlite3 connect = sqlite3.connect('card.s3db') cursor = connect.cursor() # cursor.execute("DROP TABLE card") cursor.execute("CREATE TABLE if not exists card (id INTEGER PRIMARY KEY AUTOINCREMENT, number TEXT, pin TEXT, balance INTEGER DEFAULT 0);") connect.commit() class Card(): def __init__...
Python
UTF-8
427
2.8125
3
[]
no_license
# Import Komplettes Modul (Hauptmodul) import datetime a = datetime.datetime.fromtimestamp(123213213) b = datetime.date.fromtimestamp(123213213) print(datetime.__dict__) print(a.hour) print(a.day) # Import UnterModul from datetime import date date.fromtimestamp(123213213) # Import UnterModul from datetime import da...
C++
UTF-8
742
3.21875
3
[]
no_license
#include "writinghabit.h" #include <QStringList> WritingHabit::WritingHabit(){ bioperator = comma = brace = total = 0; } WritingHabit &WritingHabit::operator+=(const WritingHabit &plus){ this->bioperator += plus.bioperator; this->comma += plus.comma; this->total = this->bioperator + this->comma; return *this;...
Markdown
UTF-8
9,185
2.6875
3
[ "MIT" ]
permissive
# release-script Release tool for npm and bower packages. [![Build Status](https://travis-ci.org/AlexKVal/release-script.svg)](https://travis-ci.org/AlexKVal/release-script) --- #### Description With this tool there is no need to keep (transpiled) `lib`, `build` or `distr` files in the git repo. Because `Bower` ke...
C#
UTF-8
571
3.046875
3
[]
no_license
List<List<string>> list = new List<List<string>>(); try { for (UInt32 I = 0; I < 134217727; I++) { List<string> SubList = new List<string>(); list.Add(SubList); for (UInt32 x = 0; x < 134217727; x++) { SubList.Add("ran...
TypeScript
UTF-8
786
2.5625
3
[ "MIT" ]
permissive
import { NextApiRequest, NextApiResponse } from 'next' import { getClient, getSimilarStories } from '../../../services' export default async function searchEndpoint( req: NextApiRequest, res: NextApiResponse ) { if (req.method === 'GET') { try { const { id, n, field } = req.query const nResults =...
Java
UTF-8
4,874
2.5
2
[ "MIT" ]
permissive
/* * ComposerApplication.java * * Created on September 19, 2003, 4:39 PM */ package processing; import componentmodel.Component; import util.Config; import util.FileFactor; /** * * @author alla */ public class ApplicationFactory { private Component applComponents[]; private Component allComponen...
C++
UTF-8
672
2.609375
3
[]
no_license
// // demo.cpp // codejam // Problem URL: http://demo/url // // Created by ZhengDong on 15/9/23. // Copyright (c) 2015年 ZhengDong. All rights reserved. // #include <iostream> #include <fstream> #include <vector> #include <algorithm> #define NOT_USE_STDIO using namespace std; int main(int argc, const char * arg...
Java
UTF-8
269
1.695313
2
[]
no_license
package com.projet.DeuxMainsPourToi.metier.DTO; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class UpdPwdDTO { private String email; private String newPwd; private String oldPwd; }
SQL
UTF-8
337
3.078125
3
[]
no_license
select pp.x,pp.Y from escuela e join poligono p on e.POLIGONO_ID = p.POLIGONO_ID join contorno_poligono cp on p.POLIGONO_ID = cp.POLIGONO_ID join contorno c on c.CONTORNO_ID = cp.CONTORNO_ID join punto_contorno pc on pc.CONTORNO_ID = c.CONTORNO_ID join punto pp on pp.punto_id = pc.punto_id where e.CLAVE = "ESUR" group...
Java
UTF-8
4,904
2.28125
2
[]
no_license
package challenge.webside.authorization; import challenge.dbside.models.ChallengeDefinition; import challenge.dbside.models.ChallengeInstance; import challenge.dbside.models.User; import challenge.dbside.models.status.ChallengeInstanceStatus; import java.util.HashSet; import java.util.List; import java.util.Se...
Java
UTF-8
469
2.0625
2
[]
no_license
package com.emobile.application.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value = HttpStatus.NOT_FOUND) public class PlanIdNotFoundException extends Exception { private static final long serialVersionUID = 1L; public Plan...
Python
UTF-8
801
2.6875
3
[]
no_license
rela_esnmed = input() ence = input() nota_ence = int(input()) tipo_esco = input() renda = float(input()) if ((rela_esnmed != "CLD") or (rela_esnmed != 'CVC') or (rela_esnmed != 'CSC') or (rela_esnmed != 'NCC')): print("Informacao sobre ensino medio invalida") elif (rela_esnmed == 'CVC'): print("Voce terah direito a i...
Python
UTF-8
12,210
2.75
3
[ "MIT" ]
permissive
# # coding=utf-8 import copy import os from typing import List import readline from lib.thg.base.Interpreter.thgcmd import with_category from .thgcmd.rl_utils import rl_type, RlType MNTHG = "Menus THG" MNTHGH = "MENU HELP" @with_category(MNTHG) class AddSubmenu(object): """Conveniently add a submenu (Cmd-like ...
JavaScript
UTF-8
350
3.34375
3
[]
no_license
const producto = { nombre: "Monitor 20 Pulgadas", precio: 300, disponible: true } // const nombre = producto.nombre; // console.log(nombre); // Destructuring const { nombre } = producto; console.log(nombre); // Destructuring con arreglos const numeros = [10, 20, 30, 40, 50]; const [primero, ...resto] =...
C++
EUC-JP
1,081
3.0625
3
[]
no_license
#include<iostream> #include<cstdio> #include<string> #include<algorithm> using namespace std; int map[100001]; int is_prime(int x) { //mapޤäƤ顢֤ͤ if (map[x]!=-1) { return map[x]; } //xprimeʤ1֤ if (x<2) { map[x] = 0; return 0; } if (x==2||x==3||x==5||x==7||x==11||x==13) { map[x] = 1; return 1; } if (x%2==0...
Java
UTF-8
1,989
1.804688
2
[]
no_license
package meru.automation.placement.suite.A2_campus.A21_setup; import org.junit.Test; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; import app.automation.ui.WebTest; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class T2_UpdateCampusTest extends WebTest { public T2_UpdateCampusTest...
Python
UTF-8
1,989
2.75
3
[ "MIT" ]
permissive
#!/usr/bin/env python import os, argparse, sys, json, credentials from Email import Email from EmailParser import EmailParser from EmailConverter import EmailConverter from datetime import datetime from PGSQLExporter import PGSQLExporter, PGSQLConfiguration def parseEmailsFromDirectory(directory): """ Traver...
TypeScript
UTF-8
158
3.3125
3
[]
no_license
function add(n1 : number, n2 : number){ return n1+n2; } const number1 = 4; const number2 = 5; const result = add(number1, number2); console.log(result);
Java
UTF-8
1,603
2.484375
2
[ "MIT" ]
permissive
package benchmark; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.Session; import javax.naming.Context; import javax.naming.InitialContext; import connection.MyConnectionAdmin; import messages....
C++
UTF-8
1,326
2.9375
3
[]
no_license
#include "logger.hpp" #include <ctime> #include <sstream> #include <iomanip> #include <chrono> #include <thread> #include <unistd.h> namespace { const std::string appPath = std::string{"../applications/"}; } namespace Logger { LogHelper::~LogHelper() { std::cout << std::endl; } std::strin...
Rust
UTF-8
2,214
3.359375
3
[ "MIT" ]
permissive
//! This module provides an interface for working with the screen. With that I mean that you can get or wirte to the handle of the current screen. stdout. //! Because crossterm can work with alternate screen, we need a place that holds the handle to the current screen so we can write to that screen. use super::super::...
Shell
UTF-8
1,975
3.875
4
[]
no_license
#!/bin/bash # Define react-tools director REACT_TOOLS_DIR="$HOME/devtools/react-tools" echo "React Tools directory:" echo $REACT_TOOLS_DIR # Determine project settings and features echo "Project name (no spaces):" read projectname echo "Is this project a Single Page Application? (y/N):" read spa echo "Will you be acce...
Python
UTF-8
2,562
2.859375
3
[]
no_license
from sklearn.linear_model import LinearRegression class Node: def __init__(self,id): self.sensor_id=id; self.measurement_list=[] def addMeasurement(self,temp,light,humidity): measurement=[] measurement.append(temp) measurement.append(light) measurement.append(h...
Java
UTF-8
2,458
3.21875
3
[]
no_license
package task1.robot; import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; import task1.exception.UnitNullException; import task1.unit.Unit; public final class R2D2 extends Robot implements IRobot { private final int batteryCharge = 100; // final attribute private final static ...
Java
UTF-8
1,292
2.6875
3
[]
no_license
package com.util.cache; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; import org.junit.Test; public class TestRefCountCache { ...
JavaScript
UTF-8
84
3.109375
3
[]
no_license
function multiply (a,b){ var sum = a * b console.log(sum) } multiply( 5, 5)
Java
UHC
405
3.46875
3
[]
no_license
public class Ex04 { public static void main(String[] args) { AA aa = new AA(); aa.doA(); AA.doA(); System.out.println(""); AA.bb.bbb(); } } class AA { public static BB bb = new BB(); public static void doA() { System.out.println("static Լ Դϴ."); } } class BB { public s...
Markdown
UTF-8
2,904
2.78125
3
[ "Apache-2.0" ]
permissive
In the previous section, you created a Knative `Service`. Run the following command to verify the `Service` is available: ```execute-1 watch kn service describe helloworld-go ``` You will eventually see output similar to the following once your `Service` becomes available: ``` Name: helloworld-go Namespace: ...
C++
UTF-8
319
2.625
3
[]
no_license
#pragma once #ifndef __ROUNDING_H__ #define __ROUNDING_H__ #include <stdint.h> #include <math.h> class Rounding { public: static double nearest(double value, size_t precision); static double up(double value, size_t precision); static double down(double value, size_t precision); }; #endif // __ROUNDING_H__
C#
UTF-8
1,908
2.859375
3
[]
no_license
using Microsoft.AspNet.Identity; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; namespace WebApplication1.helper { public class CustomHelper { public static string Bibli() { try { return MakeList(Get...
Java
UTF-8
509
1.890625
2
[]
no_license
package com.templateproject.constants; public final class ErrorCodeConstants { public static final String SCHEMA_NOT_VALID = "SCHEMA_NOT_VALID"; public static final String NOT_FOUND = "NOT_FOUND"; public static final String INTERNAL_ERROR = "INTERNAL_ERROR"; public static final String NOT_VALID = "NOT_VAL...
C++
UTF-8
2,357
2.890625
3
[]
no_license
/********************************************************************** * blaRAY -- photon mapper/raytracer * (C) 2008 by Tomasz bla Fortuna <bla@thera.be>, <bla@af.gliwice.pl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publish...
C
UTF-8
4,159
3.84375
4
[]
no_license
#include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<sys/stat.h> #include<fcntl.h> #include<string.h> //将标准输出重定向到文件中 int main() { // //传统的方法: // //1. 先关闭标准输出的文件描述符(标准输出的文件描述符为1) // //2. 再打开一个文件(此时该文件的文件描述符从最小值开始分配),所以必定为1 // //3. 因为FILE结构体中封装了文件描述符,所以结构体变量:标准输出stdout中封装了文件描述符1 // //4. 利用...
Ruby
UTF-8
958
3.1875
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
def nyc_pigeon_organizer (data) final = {} data.each do |attribute, stat| stat.each do |sub_attribute, pigeon| pigeon.each do |name| final[name] = {:color => [], :gender => [], :lives => []} end end end data.each do |attribute, stat| if attribute == :color stat.eac...
Rust
UTF-8
2,626
2.671875
3
[]
no_license
use crate::core::scene::{Scene, SceneResult}; use crate::render::ui::{Gui, GuiContext}; use crate::resources::Resources; use crate::save::get_wave_record; use crate::scene::MainScene; use bitflags::_core::time::Duration; use glfw::{Key, WindowEvent}; use hecs::World; #[derive(Default)] pub struct WaveSelectionScene { ...