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
6,344
1.859375
2
[]
no_license
package ACCEMCore; import CCEMRelics.CCEMRelics; import basemod.BaseMod; import basemod.ModLabeledToggleButton; import basemod.ModPanel; import basemod.interfaces.EditStringsSubscriber; import basemod.interfaces.PostInitializeSubscriber; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com...
Shell
UTF-8
1,151
2.671875
3
[ "MIT" ]
permissive
#!/bin/bash # Exit on error. set -e # Copy the icon to test file closing. cp $GOPATH/src/github.com/josephspurrier/goversioninfo/testdata/resource/icon.ico $GOPATH/src/github.com/josephspurrier/goversioninfo/testdata/resource/icon2.ico # Test Windows 32. cd $GOPATH/src/github.com/josephspurrier/goversioninfo/testdat...
PHP
UTF-8
2,080
3.390625
3
[]
no_license
<?php /** * Main class for PHP Chained Objects * @author Christian Doebler <info@christian-doebler.net> */ class Pco { private $funcArgs = array( 'explode' => 1, // 'implode' => NOT NECESSARY 'str_replace' => 2, ); /** * last result and first input when starting up * @var mixed */ private $result...
C
UTF-8
2,678
2.53125
3
[]
no_license
/***************************************************************/ /* Author : Sugumaran A */ /* File Name : main.c */ /* Description : LED Blink on STM32 main .c file */ /* Date : 15-08-2021 */ /***********...
C++
UTF-8
2,191
2.609375
3
[]
no_license
#include "Enemy.h" Enemy::Enemy(int id, int arrTime, int d):ID(id),ArrvTime(arrTime),OriginalHealth(Health) { SetDistance(d); } Enemy::Enemy(int id,int T, int ArvT, double H, double P, int RP, double S):ID(id),ArrvTime(ArvT), Health(H),Power(P),ReloadPeriod(RP),Speed(S),Type(T),OriginalHealth(H) { SetStatus(INAC);...
SQL
UTF-8
726
3.6875
4
[]
no_license
CREATE PROCEDURE delete_department @department_id varchar(6) AS BEGIN -- Validate DepartmentID IF((SELECT COUNT(DepartmentID) FROM Department WHERE DepartmentID=@department_id) <= 0) THROW 51000, 'DepartmentID invalid.', 1; -- Validate DepartmentID exists in Course Table IF((SELECT COUNT(DepartmentID...
Python
UTF-8
206
2.953125
3
[]
no_license
"""AndAgainAndAgainAndAgainAndAgainAndAgainAndAgain""" def main(): """AndAgainAndAgainAndAgainAndAgainAndAgainAndAgain""" longWord = input() longWord.split(" ") longWord.sort() print(longWord) main()
C++
UTF-8
1,987
3.125
3
[]
no_license
#include "CompoundOutlineStyle.h" CCompoundOutlineStyle::CCompoundOutlineStyle(OutlineStyleEnumerator enumerator) : m_enumerator(enumerator) { } std::optional<bool> CCompoundOutlineStyle::IsEnabled() const { std::optional<bool> isEnabled; bool isInitialized = false; auto callback = [&](IOutlineStyle&...
Java
UTF-8
1,523
1.882813
2
[]
no_license
package mobnav.canvas; /** * * @author 2cool */ import javax.microedition.m2g.*; import org.w3c.dom.*; import org.w3c.dom.svg.*; import javax.microedition.lcdui.*; public class l2d { public static Node node=null; static private ScalableGraphics sg = ScalableGraphics.createInstance(); static public final SVGIma...
PHP
UTF-8
273
2.671875
3
[]
no_license
<?php require "conn.php"; if($conn) { $lat = $_POST["lat"]; $lon = $_POST["lon"]; $qwe = "insert into testdemo (lat,lon) values ('$lat','$lon')"; if(mysqli_query($conn,$qwe)) { echo "Record Inserted"; } else { echo "Error In Inserting Record"; } } ?>
PHP
UTF-8
3,858
3
3
[ "MIT" ]
permissive
<?php namespace Wechat\API; use Wechat\Api; class BaseApi { protected $module; // 接口模块 protected $className; protected $apitype; protected $AppId; protected $AppSecret; /** * 构造方法 根据类名设置 当前要访问的接口模块. * * @author Tian * * @date 2015-12-08 */ public function...
Python
UTF-8
119
3.203125
3
[]
no_license
A, B, C = map(int, input().split()) num_list = [A, B, C] num_list.sort() print(num_list[2]*10+num_list[1]+num_list[0])
Python
UTF-8
334,965
3.078125
3
[]
no_license
legolas_description = \ u""" The __GNU Compiler Collection__ (usually shortened to GCC) is a compiler system supporting various programming languages produced by the GNU Project. GCC is a key component of the GNU toolchain. As well as being the official compiler of the GNU system, GCC has been adopted as the standard c...
Python
UTF-8
140
3.265625
3
[]
no_license
import re text = "불가능을 가능하게!" p = re.compile(r"가능") m = re.search(p, text) print(m) if m: print(m.group())
C
UTF-8
6,072
2.53125
3
[ "LicenseRef-scancode-public-domain" ]
permissive
/* * Archival code written when I was 15, see blog about it: * http://hostilefork.com/2013/09/16/manykeys-my-open-source-roots/ */ /* MANYKEYS.C - Read multiple keypresses Created by Brian Dickens Special thanks to Richard Biffl for all his help and advice Released to the public domai...
C
UTF-8
1,328
2.671875
3
[ "MIT" ]
permissive
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* coordinates_manipulation.c :+: :+: :+: ...
SQL
UTF-8
369
3.015625
3
[]
no_license
CREATE EVENT IF NOT EXISTS usuario_removetag ON SCHEDULE EVERY 60 MINUTE STARTS '2015-01-01 00:00:00' ON COMPLETION PRESERVE ENABLE DO DELETE hat.usuario_usertag FROM hat.usuario_usertag INNER JOIN usuario_tag ON ( usuario_tag.cod_tag = usuario_usertag.cod_tag) WHERE tag_expires_time IS NOT NULL AND ...
JavaScript
UTF-8
2,046
3.5
4
[]
no_license
const password = document.getElementById('password'); const copyBtn = document.querySelector('.fa-copy'); const passwordLength = document.getElementById('password-length'); const isUpperCase = document.getElementById('uppercase-letters'); const isLowerCase = document.getElementById('lowercase-letters'); const hasNumber...
C++
UTF-8
320
3.640625
4
[]
no_license
#include <iostream> using namespace std; // programa que verifique si un número es par o impar int main(){ int x; cout<<"ingrese el numero: "<<endl; cin>>x; if(x%2==0){ cout<<"el numero: "<<x<<" es par"<<endl; }else{ cout<<"el numero: "<<x<<" es impar"<<endl; } return 0; }
C#
UTF-8
1,129
3.1875
3
[ "MIT" ]
permissive
// Copyright (c) Leonardo Brugnara // Full copyright and license information in LICENSE file using System; using System.Linq; namespace Zenit.Helpers { class NameGenerator { private int[] seed = new int[] { -1, -1, -1, -1, -1, -1, -1 }; public static readonly Lazy<NameGenerator> lazyInstance...
C++
UTF-8
2,177
3.421875
3
[]
no_license
//Hero's Inventory: Demonstrates vectors #include <iostream> #include <string> #include <vector> using namespace std; string magicItem; int math; void introduction(); void displayInventory(); void emptyInventory(); void chooseItems(); void clearInventory(); int MAX = 8; //The array has been converted to a vector vec...
PHP
UTF-8
6,817
2.75
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Carbon\Carbon; use Validator; use App\Session; use App\Auteur; use App\Oeuvre; use App\Utils; class VoteController extends Controller { /** Returns list of all sessions ordered by ID **/ private func...
C++
UTF-8
211
2.828125
3
[]
no_license
#pragma once #include "ArithmeticExpression.h" class Division : public ArithmeticExpression { public: string evaluate(); void print(); Division(Expression *l, Expression *r) { left = l; right = r; } };
C++
UTF-8
790
2.6875
3
[]
no_license
struct point{ int x,y; point(int x=0,int y=0): x(x),y(y){} }; long long dist(point A, point B) { return abs(A.x-B.x)+abs(A.y-B.y); } int shorttestDistance(int xMe, int yMe, int xHome, int yHome, vector<string> teleports) { point p[8]; p[0].x=xMe; p[0].y=yMe; p[1].x=xHome; p[1].y=yHome; for(int i=0;i...
Python
UTF-8
1,396
4
4
[]
no_license
#!/usr/bin/python # Valerie Chapple # Insertion sort with Python 3 # Oct 2017 import string # GLOBAL CONSTANTS FILE_IN_NAME = "data.txt" FILE_OUT_NAME = "insert.out" # FUNCTIONS # insertionSort( list ) # Sorts array in place least to greatest # PRE: list must be list of integers # POST: list is sorted in ascending ...
C
UTF-8
15,557
3.296875
3
[]
no_license
/* FILE : iSpeedServer.c PROGRAMMER : Kevin Park, Julio Rivas DATE : 2019 - 1 - 21 PROG : IAD-A01 DESCRIPTION : this is the serverside c file in this program. It has TCP and UDP server side functionalities. */ #include "../inc/Common.h" #include "../inc/iSpeedServer.h" int FirstTime = 0; // Checking whether i...
C++
UTF-8
1,915
2.8125
3
[]
no_license
/* * ColorRect.h * emptyExample * * Created by lukasz karluk on 10/08/10. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #pragma once #include "ofMain.h" class ColorRect { public: ColorRect () { init( ofGetWidth(), ofGetHeight() ); } ColorRect( float w, floa...
Python
UTF-8
1,604
3.796875
4
[]
no_license
''' Given a set of (IOS and Android) mobile devices and a number of push notifications to send each of them, generate an ordering of send events such that the events are distributed fairly and as fast as possible. Input: The input is a string in the format of repeating ids and respective notification counts with no sp...
Python
UTF-8
362
4.125
4
[]
no_license
a = 2 b = 0.5 print (a + b) name = 'Yan' print (f'Привет, {name}!') v = input ('Введите число от 1 до 10: ') print (int(v) + 10) name = input ('Введите ваше имя: ') print (f'Привет, {name}! Как дела?') print (float('1')) print (int(float('2.5'))) print (bool(1)) print (bool('')) print (bool(0)) print ('2.5')
Python
UTF-8
239
2.75
3
[]
no_license
import pygame pygame.init() screen = pygame.display.set_mode() pygame.display.set_caption("First Game") run = False while run: for event in pygame.eent.get(): if event.type == pygame.QUIT:
JavaScript
UTF-8
3,983
2.5625
3
[]
no_license
'use strict'; var Q = require('q'); var r = require('rethinkdb'); function ValidationError(message, validation) { this.name = 'ValidationError'; this.message = message || 'The input is invalid.'; this.validation = validation || {}; } ValidationError.prototype = new Error(); ValidationError.prototype.constructor =...
Java
UTF-8
431
2.484375
2
[]
no_license
package HotelMascotas; public class Disponibilidad{ private int cupoHabitaciones; private int horario; public Disponibilidad(int cupoHabitaciones, int horario){ this.cupoHabitaciones = cupoHabitaciones; this.horario = horario; } public boolean estaLlena(){ if (Habitac...
Ruby
UTF-8
1,728
4.1875
4
[]
no_license
class Blackjack class Deck attr_reader :cards SUITS = %w{ Clubs Diamonds Hearts Spades } RANKS = %w{ 2 3 4 5 6 7 8 9 10 Jack Queen King Ace } def initialize(n=1) @cards = [] SUITS.cycle(n) do |s| RANKS.each do |r| @cards << "#{r} of #{s}" end end end end puts "WELCOME TO MY CASINO...
Markdown
UTF-8
216
2.71875
3
[]
no_license
## 常用指令 - `v-once` - `v-html="xxx"`: 输出 HTML, {{}} 默认将数据解析成文本 - {{}} 不能用在 HTML 特性上,需要使用`v-bind` - 缩写: - `v-bind:xxx` == `:xxx` - `v-on:xxx` == `@xxx`
Markdown
UTF-8
1,455
2.65625
3
[]
no_license
<div class="banner"> <h2 class="course">Онлайн-курс «Українська мова. Від фонетики до морфології»</h2> <p class="course-description"> У цьому курсі ми розглянемо основні розділи мовознавства, які необхідно знати для успішного складання ЗНО та подальшого засвоєння матеріалу.<br> </p> <div class="button-wr...
Markdown
UTF-8
481
2.78125
3
[]
no_license
# Origins At first, this pack was a fork of the fanmade PSP Version, but now, I ported it to Java & Bedrock and called it **Bedrock Polishments**. # Description: This pack was created to make the PSP, Normal and Bedrock versions closer together. This proccess in some cases is also known as **parity**. # Trivia: The n...
PHP
UTF-8
5,720
2.5625
3
[]
no_license
<?php define("VIDEO_LENGTH", 3000); define("TOP_VIDEO_LENGTH", 1000); define("MAX_VIDEO_QUEUE_LENGTH", 20000); class NewsRedis { public function __construct($redis) { $this->_redis = $redis; } public function random_select_assoc($list, $need) { $ret = []; if (!is_array($list)) { ...
Java
UTF-8
596
3.1875
3
[]
no_license
/** * Created by christianhasselstrom on 25/05/2016. */ public class Main { public static void main(String[] args) { Programmer hans = new JavaGuy(); Programmer chris = new HTMLGuy(); hans.setName("Hans"); chris.setName("Chris"); System.out.println("Java guy: " + hans...
C#
UTF-8
1,036
2.671875
3
[ "MIT" ]
permissive
using System; namespace Bearded.TD.Game.Simulation.Navigation; enum Passability : byte { // Units that walk on floors only and cannot pass through obstacles. WalkingUnit = 1, // Units that do not need solid floor and can fly over obstacles. FlyingUnit = 2, // Player units that do not solid floor ...
Markdown
UTF-8
1,975
2.640625
3
[]
no_license
# TP53 Final Story Using the CPTAC package, we analyzed data from endometrial cancer patients in order to determine the effects of TP53 mutation on protein expression and phosphorylation in endometrial cancer cells. We focused our analyses on comparing three groups: cancer wildtype (no TP53 mutation), TP53 mutation wit...
Java
UTF-8
290
2.875
3
[]
no_license
package com.java.java8.Optional; import java.util.Optional; public class OptionalDemo { static Optional<String> name = Optional.ofNullable(null); //Optional.ofNullable("dadrsha"); public static void main(String[] args) { System.out.println(name); } }
Java
UTF-8
2,519
2.40625
2
[]
no_license
package com.sun.assetmananger.skin; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.drawable.Drawable; impor...
Java
UTF-8
1,061
2.765625
3
[]
no_license
package thinking.chapter10; import static faraway.sourceCode.MyPrint.print; /** * TODO * * @version: 1.0 * @author: faraway * @date: 2021-04-20 15:03 */ public class GreenhouseController { public static void main(String[] args) { GreenhouseControls gc = new GreenhouseControls(); gc.addEvent...
Java
UTF-8
202
1.867188
2
[]
no_license
package server; import server.network.SocketServer; public class RunServer { public static void main(String[] args) { SocketServer server = new SocketServer(); server.startServer(); } }
Python
UTF-8
572
2.859375
3
[]
no_license
def valid_book_object(bookObject): if "name" in bookObject and "price" in bookObject and "isbn" in bookObject: return True else: return False def valid_put_request_data(request_data): if "name" in request_data and "price" in request_data: return True else: return False ...
JavaScript
UTF-8
714
2.640625
3
[ "MIT" ]
permissive
$(document).ready(function() { var usu = $("#txtUsuario").val(); var pass = $("#txtContraseña").val(); $("#btnIniciar").click(function() { Logeo(usu, pass); }); $("#txtUsuario, #txtContraseña").keypress(function(e) { if(e.which == 13) { Logeo(usu, pass); } ...
C#
UTF-8
2,069
2.734375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DataLayer.Interfaces; using DataLayer.DBContext; namespace DataLayer.Impelmentation { public class VillageInfoOperations : IVillageInfoOperations { DBentities db = new DBentities();...
Ruby
UTF-8
595
3.890625
4
[]
no_license
class Numbers def initialize(first_number , second_number) @first_number = first_number @second_number = second_number end attr_accessor 'first_number', 'second_number' def sum @first_number + @second_number end def diff @first_number - @second_number ...
Python
UTF-8
1,736
2.75
3
[]
no_license
# use GrADS to get temperature and NDVI data from NetCDF files import os import urllib import cPickle as pickle import json import time last_read = time.time() try: with open('latlons.pkl') as pkl_file: latlons = pickle.load(pkl_file) except: latlons = {} def save_lat_lons(): with open('latlons.pkl...
Markdown
UTF-8
978
3.578125
4
[]
no_license
--- title: 两数之和 date: 2018-05-08 00:07:29 photos: tags: categories: - leetcode --- # 题目描述 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。 你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。 示例: ``` 给定 nums = [2, 7, 11, 15], target = 9 因为 nums[0] + nums[1] = 2 + 7 = 9 所以返回 [0, 1] ``` # 代码 ```javascript /** * @param {number[]} nums * @param {numbe...
C++
UTF-8
4,165
3.40625
3
[]
no_license
#ifndef UTILITIES_CONTAINER_H #define UTILITIES_CONTAINER_H #include "Exceptions/Assertions.h" #include "Exceptions/InvalidArgumentException.h" #include "Allocator.h" #include "Algorithms.h" #include <memory.h> namespace Utilities { // Container template <class TYPE> class Container { protected: // Fields TY...
Java
UTF-8
1,368
2.71875
3
[]
no_license
import static org.junit.Assert.assertEquals; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.PrintStream; import java.util.Collection; import java.util.Scanner; import org.junit.Test; import org.junit.runner.RunWith; import org.junit...
JavaScript
UTF-8
1,383
3.15625
3
[]
no_license
const tools = require('../utils/tools'); const Being = class { /** * Being Blueprint * @param {String} name * @param {Number} hp * @param {Number} mana * @param {Number} attack * @param {Number} defense */ constructor(name, hp, mana, attack, defense){ this.name...
C
UTF-8
2,153
2.5625
3
[]
no_license
void* poll_connection (void *args) { data_type *data = (data_type *)args; int ret, i, received; char buf[100]; while(1) { ret = poll(data->fds, data->clients + 1 , -1); if(ret < 0) { perror("polling"); exit(13); } if(ret == 0) printf("timeout\n"); else { if (data->fds[0].revents & POLLIN) ...
Java
UTF-8
632
2.4375
2
[ "MIT" ]
permissive
package webviewsample; import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; public class WebViewSample extends Application { public static void main(String[] args) { launch(args); } @Overr...
Java
UTF-8
1,568
1.828125
2
[ "Apache-2.0", "MIT", "EPL-1.0" ]
permissive
/** * Copyright 2023 LinkedIn Corp. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
Shell
UTF-8
473
3.421875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash set -u set -e FAIL=0 if [ "$1" = "-nodes" ] then nodes=$2 command="$3" else nodes=`cat ./scripts/$1` command=$2 fi echo $command" for nodes:"$nodes for node in $nodes do ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -t root@$node ${command/localhost/$node} & done echo $comman...
Ruby
UTF-8
617
4
4
[]
no_license
#write your code here def echo(arg) return arg end def shout(arg) return arg.upcase end def repeat(arg, num_of_reps = 2) return ((arg + ' ') * num_of_reps).delete_suffix(' ') end def start_of_word(arg, num_of_letters = 1 ) return arg[0..num_of_letters - 1] end def first_word(sentence) sentence.split(' ')...
Python
UTF-8
1,538
2.921875
3
[]
no_license
#import from https://github.com/bahriddin/midr/blob/master/midr.py from midr import Midr def local_edit_dis(): dict_file = open("../data/dict.txt", 'r') misspell_file = open("../data/misspell.txt",'r') result_file = open("../result/local_edit_distance_result.txt",'w') obj = Midr(1,-1,-1,-1) # to...
PHP
UTF-8
7,377
2.640625
3
[]
no_license
<?php require_once ("./models/User.php"); require_once ("./models/Product.php"); require_once ("./models/Order.php"); require_once ("./models/ProductOrder.php"); session_start(); use App\Models\User as User; use App\Models\Product as Product; use App\Models\ProductOrder as ProductOrder; use App\Models\Or...
TypeScript
UTF-8
3,508
2.6875
3
[ "BSD-3-Clause" ]
permissive
import { LocalDatabase } from './../db/localdb-helper'; import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo'; import { Observable, Subject, BehaviorSubject } from 'rxjs'; interface ClientSafeUserInfo { _id: Mongo.ObjectID, id: string, nickname: string } export class AuthHelper { privat...
Java
UTF-8
183
1.523438
2
[]
no_license
package com.wenwen.swordtooffer.sword41_50; /** * Created by Administrator on 2018/3/21. */ public final class s48_writeFinalClass { private s48_writeFinalClass(){ } }
Markdown
UTF-8
4,077
3.65625
4
[]
no_license
译文:确保不在javascript中增加全局作用域 ================================= 写javascript代码最好的做法是避免把对象放到全局作用域中。有几个很好的理由来解释全局变量会增加耦合(globals add coupling),例如,分开不同库的时候,很容易破坏彼此。事实上,通常程序的规则是避免增加全局作用域。遗憾的是,javascript增加对象到全局作用域中是非常容易的事情。参考以下这段代码: ```js function sayHello(person) { message = "Hello, " + person; $("#message").text(m...
Markdown
UTF-8
263
2.78125
3
[]
no_license
# My-Lifting-Log ##Keep track of your lifts An android application to track the exercise you peformed and amount of weight lifted. ###Other features * One rep max calculator * Pound to kilogram converter * Which plates to add to the barbell for preferred weight
Java
UTF-8
2,006
2.9375
3
[]
no_license
package com.sam.webtasks.client; public class Instructions { public static String Get(int index) { String i=""; switch(index) { case 0: i="Here are some instructions."; break; } return(i); } public static String InfoText() { return ("We would like to invite you to participate in thi...
Java
GB18030
6,406
1.851563
2
[]
no_license
package com.dhxgzs.goodluck.activity; import org.json.JSONException; import org.json.JSONObject; import com.alibaba.fastjson.JSON; import com.dhxgzs.goodluck.R; import com.dhxgzs.goodluck.R.id; import com.dhxgzs.goodluck.R.layout; import com.dhxgzs.goodluck.R.menu; import com.dhxgzs.goodluck.app.XyMyContent; import c...
Markdown
UTF-8
2,929
2.671875
3
[ "MIT" ]
permissive
# archive-man Bot that archives discord servers ## Usage In conf.json, have properties: 1. `token` (bot's token) 2. `prefix` (command prefix) 3. `owner` or `owners` (user id or array of user ids, accordingly) ## In Discord **Command:** `archive` (so with prefix `^`, it'd be `^archive`) **Channel Args:** Eit...
Java
UTF-8
1,034
2.21875
2
[ "MIT" ]
permissive
package slimeknights.tconstruct.world.block; import net.minecraft.block.BlockState; import net.minecraft.block.FungusBlock; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.gen.feature.ConfiguredFeature; import net.minecraft.world.gen.feature.HugeFungusConfig...
Python
UTF-8
920
3
3
[]
no_license
import webbrowser as browser word = input("Please enter the word in Korean and press enter") search_sites = [] # creates empty list so we can add sites hanja = f'https://hanja.dict.naver.com/#/search?query={word}' english_dictionary = f'https://en.dict.naver.com/#/search?query={word}' korean_dictionary = f'https://ko...
Python
UTF-8
335
3.59375
4
[]
no_license
# Ao testar sua solução, não se limite ao caso de exemplo. extras = float(input()) faltas = float(input()) H = float() meio = float() meio = 1/4*faltas H = extras - meio if H > 400: print(extras, "extras e ", faltas,"de falta") print("R$ 500.0") elif H <= 400: print(extras, " extras e", faltas, "de falta") print...
Swift
UTF-8
1,044
2.765625
3
[]
no_license
// // NewResumesPresenter.swift // RecruitManner // // Created by Jiang Duan on 16/11/23. // Copyright (c) 2016年 Jiang Duan. All rights reserved. // // import Foundation import UIKit protocol NewResumesPresenterInput { func presentSomething(response: NewResumes.Response) } protocol NewResumesPresenterOutput: ...
Markdown
UTF-8
1,715
2.71875
3
[]
no_license
# Project Setup: NOTE: This project can be run in your terminal using a JAR file that is included or in an IDE using the source code. Both options are described below. # For the Java Portion/running the program in an IDE: Need an IDE for Java such as Eclipse or IntelliJ - You can download IntelliJ at https://www.jetbr...
Python
UTF-8
2,048
3.6875
4
[]
no_license
x=1 y=2 print(x>2) money = 200 if money >= 300: print("택시를 탈것") else: print("ㄴㄴ함") card = 1 if money >= 300 or card: print("택시를 탈수 있어!") else: print("걷기 ㄱㄱ") print('a' in ('a','b','c')) print('j' not in 'python') pocket=['a','b','c'] if 'z' in pocket: print("택시를 타고 가라") else: print("걸어또") ...
C
UTF-8
2,139
2.671875
3
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #include <sys/types.h> #include <signal.h> #include "worker_process_B.h" #include "handle_request.h" #include "mpm_B.h" int spawn_worker_B(const int num_worker, int *process_id, int *pipe_fd...
C#
UTF-8
1,375
2.609375
3
[ "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
using System; using System.Globalization; using System.Windows.Data; using Workbench_Example.ViewModel; namespace Workbench_Example.Converters { /// <summary> /// Converter that checks for valid active document values. /// </summary> public class ActiveDocumentConverter : IValueConverter { ...
Python
UTF-8
103
2.625
3
[]
no_license
import numpy as np def sigmoid(x): return 1/(1+np.exp(-x)) def d_sigmoid(x): return x*(1-x)
C#
UTF-8
1,484
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace TestTask { /// <summary> /// Стандартний <see cref="Picker"/>, доповнений двома додатковими властивостями: PlaceHolder і HorizontalTextAlignment /// </summary>...
Swift
UTF-8
1,002
2.84375
3
[ "MIT" ]
permissive
// // ViewController.swift // Plural Loc // // Created by Alexander v. Below on 08.10.19. // Copyright © 2019 Alexander von Below. All rights reserved. // import UIKit class ViewController: UIViewController { let format = NSLocalizedString("bottlesOfBeer", comment: "") @IBOutlet weak var label: UILabel!...
C#
UTF-8
2,568
4.03125
4
[ "MIT" ]
permissive
using System; class IntegerCalculations { static void Main() { string[] inputNums = Console.ReadLine().Split(' '); int length = 5; int[] numbers = new int[5]; for (int i = 0; i < length; i++) { numbers[i] = int.Parse(inputNums[i]); } Console.WriteLine(...
C++
UTF-8
2,526
2.546875
3
[]
no_license
#ifndef INCLUDE_PCFILE_AVFILE_H_ #define INCLUDE_PCFILE_AVFILE_H_ #include <string> #include <fstream> #include "ParseConstants.h" #include "Utils/ParsePlatformMacros.h" NS_PC_BEGIN class ParseFile { private: ParseFile() {} static std::string objectPath(std::string objectId); public: /** * \~english The na...
C++
UTF-8
7,523
3.078125
3
[ "MIT" ]
permissive
#ifndef ___CARD_H___ #define ___CARD_H___ //////////////////////////////////////////////////////////////////////////////// // // Title: card.h // Created By: Terence Henriod // Course: CS202 // // Summary: Defines a class whose objects represent a typical playing card. // // Last Modified: // /////...
C++
UTF-8
1,813
2.65625
3
[]
no_license
//Can be improved by priority queue on distance and string path. static vector<tuple<int,int,char>> dirs={{-1,0,'u'},{0,1,'r'},{1,0,'d'},{0,-1,'l'}}; class Solution { public: string findShortestWay(vector<vector<int>>& maze, vector<int>& ball, vector<int>& hole) { vector<string> result; int m=ma...
Python
UTF-8
2,495
2.796875
3
[ "CC-BY-4.0", "CC-BY-3.0", "MIT" ]
permissive
#!/usr/bin/env python """ Example random agent script to demonstrate that procgen works """ import gym from procgen import ProcgenEnv import argparse import numpy as np def main(): parser = argparse.ArgumentParser() parser.add_argument("--vision", choices=["agent", "human"], default="human") parser.add_ar...
C#
UTF-8
1,803
2.59375
3
[ "MIT" ]
permissive
using System.Collections.Generic; using Logic.Event; using UnityEngine; namespace View { public class DebugDrawer { private struct DrawInfo { public SyncEvent.DebugDrawType type; public Vector3 v0; public Vector3 v1; public Vector3[] dvs; public float f; public Color c; } private readonly...
Python
UTF-8
1,929
3.078125
3
[]
no_license
import pygame import init from os import path from tank2 import Tank pygame.init() screen = pygame.display.set_mode((init.WIDTH, init.HEIGHT)) pygame.display.set_caption("Tanks") clock = pygame.time.Clock() img_dir = path.join(path.dirname(__file__), 'img') tank_img = pygame.image.load(path.join(img_dir, "Tank.png")...
PHP
UTF-8
3,767
2.625
3
[ "Apache-2.0" ]
permissive
<?php /** * Log * * @author Alexey Krupskiy <admin@inji.ru> * @link http://inji.ru/ * @copyright 2015 Alexey Krupskiy * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE */ class Log { public $log = []; public $lastLog = 0; public $run = true; public $startTime = 0; public ...
C++
UTF-8
5,259
2.578125
3
[]
no_license
#include "GameStoreManager.h" GameStoreManager::GameStoreManager( UI::UIManager* uiManagerPtr, int windowWidth, int windowHeight ) { this->uiManagerPtr = uiManagerPtr; this->actionButtonContainer = new UI::UISelectButtonContainer( 0, windowHeight - actionContainerHeight, ...
C++
UTF-8
2,200
3.140625
3
[]
no_license
/* * @lc app=leetcode id=968 lang=cpp * * [968] Binary Tree Cameras * * https://leetcode.com/problems/binary-tree-cameras/description/ * * algorithms * Hard (38.42%) * Likes: 1741 * Dislikes: 27 * Total Accepted: 46K * Total Submissions: 113.8K * Testcase Example: '[0,0,null,0,0]' * * You are give...
Python
UTF-8
75
3
3
[]
no_license
soma = 0 i = 0 while i < 100: m = 1/2**i soma += m i +=1
Python
UTF-8
2,171
2.953125
3
[]
no_license
import os ################################################################################ class Screen: def __init__(self, board): self.__cache = [tuple(row) for row in board.board().splitlines()[1:]] self.__board() def write(self, row, column, character): try: self.__te...
Python
UTF-8
466
3.90625
4
[]
no_license
def soma(a, b): print(f"{a} + {b} é igual a {a + b}.") def divide(a, b): print(f"{a} dividido por {b} é igual a {a / b}.") def subtrai(a, b): print(f"{a} - {b} é igual a {a - b}.") def multiplicacao(a, b): print(f"{a} * {b} = {a * b}") def getPDF(): print("impressao PDF") def getXLS(): p...
C#
UTF-8
818
2.96875
3
[]
no_license
class Program { static void Main(string[] args) { ParseAndDump(@"{ ""Date"" : ""2015-08-22T19:02:42Z"", ""Count"" : 40 }"); ParseAndDump(@"{ ""Date"" : ""2015-08-20T15:55:04Z"", ""Customers"" : 26 }"); ParseAndDump(@"{ ""Date"" : ""2015-08-21T10:17:31Z"", ""Re...
Markdown
UTF-8
14,969
3.140625
3
[]
no_license
--- layout: post type: tutorial hidden: true title: "Introdução: Matriz de LED" date: 2016-09-15 author: "Leonardo Haddad Carlos" author_url: "" img: "assets/images/tutoriais/2016-09-15-introducao_matriz_de_led/matriz-20257ND.jpg" img_url: "" redirect_from: - "2016/09/15/led-mat...
C#
UTF-8
1,493
2.515625
3
[]
no_license
using Microsoft.AspNetCore.Mvc; using System; using System.IO; namespace GifTag.Api.Controllers { [Route("Ticket")] public class TicketsController : Controller { private ITicketService _ticketService; public TicketsController(ITicketService ticketService) { _ticketServ...
Java
UTF-8
384
2.59375
3
[]
no_license
package NewMenu; import javafx.scene.image.Image; import javafx.scene.image.ImageView; public class GraphicMenuItem { private ImageView iv = null; public GraphicMenuItem(String filepath){ if(! filepath.isEmpty()){ iv = new ImageView(new Image(filepath, 25, 25, true, true)); } } ...
JavaScript
UTF-8
211
3.21875
3
[]
no_license
// 从头到尾打印链表 var reversePrint = function(head) { if (!head) return [] var arr = [] while (head) { arr.push(head.val) head = head.next } return arr.reverse() };
Java
UTF-8
1,525
3.546875
4
[]
no_license
package com.yishuailuo.mywebproject.algorithm; public class ReverseLinkedListSolution { public static void main(String[] args) { int[] arr = new int[]{1, 2, 3, 4, 5}; ListNode head = buildList(arr); ListNode reversedHead = reverse(head); printList(reversedHead); } privat...
Java
UTF-8
238
1.820313
2
[]
no_license
package com.zzh.design; /** * Created by house on 2017/6/30. */ public class Client { public static void main(String args[]) { System.out.println("Design Pattern"); } public static void singletonTest() { } }
PHP
UTF-8
909
2.515625
3
[]
no_license
<?php session_start(); include("connection.php"); include("utils.controller.php"); if(isset($_POST['submit'])){ criarUsuario($_POST); } function criarUsuario($dados){ // $result = mysql_query("INSERT INTO usuarios (nome,email,cpf,password) VALUES ('".$dados['nome']."','".$dados...
Swift
UTF-8
2,028
2.546875
3
[]
no_license
// // CardDestination.swift // Chili Labs // // Generated by Chigevara on 13/05/2020. // Copyright © 2020 Chili Labs. All rights reserved. // import UIKit import MagazineLayout import Kingfisher typealias CardDestinationConfigurator = MagazineCellConfigurator<CardDestinationVM, CardDestination> final class CardD...