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
3,247
3.546875
4
[]
no_license
package conversormoneda2.pkg0; import javax.swing.JOptionPane; /** * Clase para comvertir una cantidad de dólares, euros o yenes a pesos * * @author Bruno Blas Galeano y Nestor john. * */ public class ConversorMoneda2 { //Constantes con la cotización de las monedas final static double USD = 46.19; f...
Ruby
UTF-8
1,349
2.640625
3
[ "MIT" ]
permissive
module ExternalApiWrapper InvalidEndpointParamsError = Class.new(BaseError) class BaseEndpoint include ActsAsCallable def initialize(raw_params) check_raw_params_for_required_keys!(raw_params) @params = process_raw_params(raw_params) end def call http_response = do_http_request ...
C#
UTF-8
1,119
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CommonLibrary.Data { public static class DataPaginationExtension { public static PagedList<T> ToPagedList<T>(this IQueryable<T> source, int index, int pageSize) { return new PagedList<T>...
Shell
UTF-8
1,453
2.953125
3
[ "MIT" ]
permissive
#!/bin/bash # register CA certificate CODE=`aws iot get-registration-code --output text` CASJ="/C=JP/ST=Hokkaido/L=Sapporo/O=fitzr/OU=root/CN=ROOTCA" VCSJ="/C=JP/ST=Hokkaido/L=Sapporo/O=fitzr/OU=verification/CN=${CODE}" # generate root CA certificate openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes...
Java
UTF-8
502
2.34375
2
[]
no_license
package com.example.banking; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.context.support.BeanDefinitionDsl; import org.springframework.stereotype.Component; //@Component - not allowed !!! public class Child { ...
C++
UTF-8
3,082
2.671875
3
[]
no_license
#pragma once #include <vector> #include "RandomFactory.h" #include "Building.h" #include "Street.h" #include "TextureFactory.h" #include "BuildingsFactory.h" #include "Plane.h" #include "Lamp.h" #include "TrafficLights.h" #include "Point.h" #include "Vector3.h" std::vector<Building*> generateManhatanStyle(int n, int...
Java
UTF-8
699
3.53125
4
[]
no_license
import java.util.ArrayList; public class Hand extends ArrayList<Card> implements Comparable<Hand>{ public Hand() { } public int score() { int s = 0; boolean hasAce = false; for(Card c : this) { s += c.getValue(); if(c.getRank() == "ace") { hasAce = true; } } if (s > 21) { if(hasAce) { ...
Java
UTF-8
212
2.03125
2
[]
no_license
package finaltesttask; public class test1 { public static void main(String[] args) { String s = "Hello World"; System.out.println(s); //or, System.out.println("Hello World"); } }
PHP
UTF-8
698
2.765625
3
[]
no_license
<?php // How to convert a webpage to a PDF and stream it to the client browser as an attachment $api_endpoint = "http://selectpdf.com/api2/convert/"; $key = 'your license key here'; $test_url = 'http://selectpdf.com'; $parameters = array ('key' => $key, 'url' => $test_url); // Sample GET $result = @file_get_conten...
Markdown
UTF-8
1,036
2.59375
3
[]
no_license
# Homework 5 by Paul Alves In this project, I examine energy usage in the city of Chicago. Done for my Computing for Social Sciences class. Script / report is under copyright. Do not modify or redistribute. ## Files: clean.r - Script to clean and import the base data included. Run this first to produce the clean dat...
C++
UTF-8
901
3.265625
3
[]
no_license
#include "Player.h" Player::Player(const char* name, char sign) : sign(sign) { this->name = new char[strlen(name) + 1]; strcpy(this->name, name); } Player::Player(const Player& other) { copyData(other); } Player& Player::operator=(const Player& other) { if (this != &other) { deleteData(); ...
Markdown
UTF-8
10,677
2.8125
3
[ "MIT" ]
permissive
# Regarding this fork This is a fork of the original [ngQuickDate](https://github.com/gildorwang/ngQuickDate) by [Adam Albrecht](https://github.com/adamalbrecht). There are several improvements over the original version: * Support of UTC timezone * Data-binding of configurations (`timezone`, `disableTimepicker`, `dis...
C#
UTF-8
985
3.1875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using Core.ObjectGraphs; namespace Orange.Library { public static class EnumerationHelper { public static ObjectGraph EnumToGraph<T>(this IEnumerable<T> enumerable, string name, Func<T, string> keyFunc = null, Func<string, T, ObjectGraph> val...
JavaScript
UTF-8
1,263
2.875
3
[]
no_license
$(function() { $.get('/charts', function(charts) { var dataStr=""; var imgStr=""; var gridster = $("section#charts").gridster({ widget_margins: [5, 5], widget_base_dimensions: [255, 155] }).data('gridster'); var carray = $.map(charts, function(value, index) { return [value]; ...
JavaScript
UTF-8
2,694
2.640625
3
[]
no_license
const express = require('express'); const router = express.Router(); //const fetch = require('node-fetch'); const request = require('request'); router.get('/monthly/celsius', async (req, res) => { const CityStateCountry = req.query.CityStateCountry; const api_key = process.env.API_KEY; const maps_key = process.e...
Python
UTF-8
6,395
2.578125
3
[]
no_license
import textwrap import frida import os import sys import frida.core import argparse import logging import string import re logo = """ ______ _ _ | ___| (_) | | | |_ _ __ _ __| |_ _ _ __ ___ _ __ | _| '__| |/ _` | | | | '_ ` _ \| '_ \\ | | | | | | ...
Python
UTF-8
1,545
2.625
3
[ "MIT" ]
permissive
from django.contrib.auth.models import User from django.core.mail import EmailMultiAlternatives from .models import Subscriber, Post, Log def notify_new_content(post_id): """ Sending and email. :param post_id: Post id. """ subscribers = Subscriber.objects.all() post = Post.objects.get(id=post_...
Java
UTF-8
819
3.625
4
[]
no_license
package Turma29; import java.util.Scanner; public class AwEx02 { public static void main(String[] args) { int[] a=new int[6]; int par=0,impar=0,somap=0,somai=0; Scanner l =new Scanner(System.in); for(int x=0;x<6;x++) { System.out.println("Entre com o valor "); a[x]=l.nextInt(); if(a[x]%2==0) {...
Ruby
UTF-8
563
4.15625
4
[]
no_license
puts "salida" my_variable = 5 if my_variable > 0 puts my_variable end #arrays games_played = [["uno", true], ["dos", false]] puts games_played puts games_played[0][0] #hashes cocktail = {"martini" => { "vodka" => true, "gin" => false, } ...
Ruby
UTF-8
2,644
2.953125
3
[]
no_license
# POST is for creating new resource instances # POST to resource URI, Provide JSON payload (optional), Provide MIME type of the payload # in the Content-Type header MoviesWS.post("/movies.json", :body => { :movie => {:id => "54321", :title => "rocky54"}}.to_json, :headers => { "Content-Type" => "application/json"}) # ...
Java
UTF-8
1,222
2.25
2
[]
no_license
package com.cos.controller.member; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.cos.action.Action; import com.co...
Java
UTF-8
8,150
2.171875
2
[]
no_license
/* * * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * MyApp.java * * Created on 5 Feb, 2013, 9:06:40 PM */ package sruds; import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.util.logging.Level; import java.util.logging.Log...
Python
UTF-8
203
3.984375
4
[]
no_license
print("Hello world") x=10 print(f"x vale : {x}") for i in range(0,10): #PROGRAMMA DI ESEMPIO if(i%2==0): print(f"{i} è pari") else: print(f"{i} è dispari")
Python
UTF-8
455
4.46875
4
[]
no_license
""" Escreva um programa que, dados dois números inteiros, mostre na tela o maior deles, assim como a diferença existente entre ambos. """ numero1 = int(input("Digite um número inteiro: ")) numero2 = int(input("Digite outro número inteiro: ")) if numero1 > numero2: print(f"Maior: {numero1}") print(f"Diferença ...
Java
UTF-8
499
2.078125
2
[ "MIT" ]
permissive
package net.omikron.jtl.visualizer.exceptions; public class JtlMinRequirementsException extends RuntimeException { private static final long serialVersionUID = 1L; public JtlMinRequirementsException() { super(); } public JtlMinRequirementsException(final String message) { super(message); } public JtlMinR...
Markdown
UTF-8
5,065
2.765625
3
[]
no_license
--- _model: blog-post --- title: Transparencia, claridad y Big Data --- date: 2013-08-14 09:26:57 +0200 --- author: Mario Alberich --- categories: matematica,informatica --- tags: algoritmos,big-data --- body: <p>Un interesante ejemplo de los <a title="Data journalism: the important difference between transparency and...
Markdown
UTF-8
5,964
2.53125
3
[]
no_license
# Microchip PolarFire SoC Linux Software Development Kit This repository builds a command line only RISC-V Linux image for the Microchip PolarFire SoC Linux Software Development Kits. It first will build the GNU cross-compilation toolchain for RISC-V, which will be installed in the `toolchain/` subdirectory. This toolc...
Java
UTF-8
1,468
2.015625
2
[]
no_license
package com.gdlife.candypie.serivce.user; import com.gdlife.candypie.base.HttpObserver; import com.gdlife.candypie.common.MKey; import com.gdlife.candypie.http.HttpClient; import com.gdlife.candypie.utils.SignUtils; import com.heboot.base.BaseBeanEntity; import com.heboot.bean.user.UserVisitListBean; import java.util...
C++
UTF-8
725
2.765625
3
[]
no_license
#include "Cannonball.h" Cannonball::Cannonball() { origin = sf::Vector2f(300, 300); setPosition(sf::Vector2f(300, 300)); shoot = 0; press = 0; gravity = 500.f; } Cannonball::~Cannonball() { } void Cannonball::handleInput(float dt) { if (input->isMouseLDown()) { mousepoint = sf::Vector2f(input->getMouseX(), i...
Markdown
UTF-8
731
2.75
3
[]
permissive
* All pull-request which are merged successfully inside an repository having topic hacktoberfest will be counted in hacktoberfest. * If the repository which you are contributing doesn't have hacktoberfest topic then you can ask the mainter to add "hacktoberfest-accepted" label to your pull request, then also it will co...
Python
UTF-8
11,650
3.78125
4
[]
no_license
""" A great game in which the player has to collect pink hearts! However, the player will lose points if a black heart is collected! If the score goes negative, the player loses. See which of your friends can get the highest score!!! Controls: anything that the player's computer thinks is arrow key input @author: jov...
Python
UTF-8
158
3.296875
3
[]
no_license
#!/usr/bin/python3 for letter in range(122, 96, -1): print("{:c}".format(letter if (letter % 2 == 0) else (letter - 32)), end="")
PHP
UTF-8
219
4.40625
4
[]
no_license
<?php function plus(int $value) { $num = 0; $num += $value; print("<br>計算結果: ".$num); } print("plusを3で呼出"); plus(3); print("<br>plusを5で呼出"); plus(5); print("<br>plusを7で呼出"); plus(7);
Ruby
UTF-8
5,620
3.09375
3
[]
no_license
#!/usr/bin/ruby19 # # Needleman, Saul B.; and Wunsch, Christian D. (1970). "A general method # applicable to the search for similarities in the amino acid sequence of two # proteins". Journal of Molecular Biology 48 (3): 443–53. # doi:10.1016/0022-2836(70)90057-4. PMID 5420325. # # Necessary libraries require 'na...
Java
UTF-8
571
3.03125
3
[]
no_license
package secondTry; public class j_58_ReverseString { class Solution{ public String reverseStr(String str){ if (str == null ||str.length() == 0){ return str; } String[] s = str.split(" "); StringBuilder sb = new StringBuilder(); ...
Java
UTF-8
15,396
1.765625
2
[]
no_license
package com.trascender.contabilidad.gui.abmAsientoContable.abm; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import javax.swing.JLabel; import javax....
C++
UTF-8
3,854
2.578125
3
[]
no_license
#include <unordered_map> #include <algorithm> #define MAXK 500005 using namespace std; unordered_map<int, int> map; int pnts[MAXK<<1], tmp[MAXK<<1]; struct node { int l, r, lo, hi; bool lzylo, lzyhi; node() : l(0), r(0), lo(0), hi(0), lzylo(0), lzyhi(0) {} } node[MAXK<<3]; void build(int u, int l, int r...
Python
UTF-8
388
2.640625
3
[]
no_license
import unittest from program import task1, task2 class TestMethods(unittest.TestCase): def test_task1(self): self.assertEqual(task1("test.txt"), 1) self.assertEqual(task1("input.txt"), 6611) def test_task2(self): self.assertEqual(task2("test.txt"), 10) self.assertEqual(task2("...
Markdown
ISO-8859-2
1,259
2.546875
3
[]
no_license
Authors: Tony Wang, Douglas Frling This is a database program. The database contains key and value pairs which are read from a database file. The database file is written as "key\nvalue\n". So one line where the key is read from and the next line is the key's value. A key and a value may only be 127 characters long. ...
Markdown
UTF-8
525
2.59375
3
[]
no_license
# Employee Managment System ## Description - Gives users the ability to view add and update employee, role and department directories using CLI in node ## Installations * NPM inquirer * NPM Express * NPM MySql ## steps * installed dependecies * created inquirer prompts * used switch and cases along with functions to n...
JavaScript
UTF-8
2,552
3
3
[]
no_license
const dataURL = "https://api.myjson.com/bins/jcmhn"; //скрыть правила, формы иконки в начале загрузки страницы $('div#container').hide(); $('div#rules_text').hide(); $('div#var1_label').hide(); $('div#var2_label').hide(); $('div#var3_label').hide(); $('div#var4_label').hide(); $('div#var5_label').hide(); $('div#var6_l...
Python
UTF-8
574
3.953125
4
[]
no_license
""" Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. Given a stream of elements too large to store in memory, pick a random element from the stream with uniform probability. """ import random def randomize(stream): rand_elem = None for i in range(0, len(st...
C
UTF-8
2,544
3
3
[]
no_license
#include "yaush.h" char cmd_list[MAX_CUST_CMD][CUST_CMD_NAME_LEN] = {"cd", "exit", "jobs", "fg", "bg" }; int (*f[MAX_CUST_CMD])(char*, char**) = { yaush_cd, yaush_exit, yaush_jobs, yaush_fg, yaush_bg }; /* @cmd -- the command name, useless in this function, just to uniform the arguments of all custom functions * @...
Python
UTF-8
172
3.53125
4
[]
no_license
N = int(input()) can = False for i in range(1,10): for j in range(1,10): if i * j == N: can = True if can: print("Yes") else: print("No")
C
UTF-8
4,935
3.203125
3
[]
no_license
#ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #ifndef MAX_SIZE #define MAX_SIZE (1024) #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <ctype.h> struct Cvor; typedef struct Cvor* Pozicija_cvor; struct Cvor { char* element; Pozicija_cvor Lij...
Markdown
UTF-8
6,315
3.03125
3
[]
no_license
## __Case Study: myRetail RESTful service__ myRetail is a rapidly growing company with HQ in Richmond, VA and over 200 stores across the east coast. myRetail wants to make its internal data available to any number of client devices, from myRetail.com to native mobile app...
JavaScript
UTF-8
2,652
2.59375
3
[]
no_license
import React, { Component } from 'react'; import axios from '../../myAxios'; import './DropZone.css'; function fileSize(size) { if (size === 0) return '0 Bytes'; const k = 1024; const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; const i = Math.floor(Math.log(size) / Math.log(k)); return parseFloat((size / Ma...
Shell
UTF-8
5,592
3.671875
4
[]
no_license
#!/bin/sh do_setup_admin_password() { dialog --title "Setup admin password" --msgbox "You will be asked to enter a new password." 5 60 passwd admin RET=$? if [ $RET -eq 0 ]; then dialog --title "Setup admin password" --msgbox "Password has been changed succesfully." 5 60 do_main_menu ...
Java
UTF-8
2,348
2.28125
2
[]
no_license
package com.chinarewards.metro.domain.user; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import j...
C++
UTF-8
605
3.15625
3
[]
no_license
#include "timsort.h" #include <windows.h> #include <iostream> class Timer { public: Timer() { m_dwTime = GetTickCount(); } DWORD GetTime() { return GetTickCount() - m_dwTime; } private: DWORD m_dwTime; }; bool checkSort (double *x, long length) { double *x1=x, *x2=x+1; while (x2<x+length && x1<=x2) { ++x1;...
Java
UTF-8
1,128
2.625
3
[]
no_license
package study; import study.admin.Admin; import study.cinemas.CinemaRB; import study.staff.Cassir; import study.staff.Director; import study.staff.Staff; public class Test { public static void main(String[] args) { CinemaRB cinemaMir = new CinemaRB("MIR", new Admin("Vlad", "Pro"), ...
Java
UTF-8
4,265
3.25
3
[]
no_license
package com.wenhuiliu.EasyEnglishReading; import android.util.Log; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Article { /** * 文章类,描述关于文章的信息 * 标题、内容、时间、分类、级别、难度系数 * 通过构造方法来进行初始化,时间默认为当...
C#
UTF-8
1,250
2.921875
3
[]
no_license
using UnityEngine; using System.Collections; public class checkBox : MonoBehaviour { //Variable which defines what option this particular instance of CheckBox selects (Short, Medium, Long) public string option; //sr is the SpriteRenderer of "checkBoxMark" child object, which shows if the current check box is che...
Python
UTF-8
469
3.796875
4
[]
no_license
'''from threading import Thread class Mythread(Thread): pass t=Mythread() print(t.name)''' print() #Run Method: '''from threading import Thread class Mythread(Thread): def run(self): print('Run Method') t=Mythread() t.start()''' #Join Method: from threading import Thread class Mythread(Thread): de...
Java
UTF-8
3,316
2.453125
2
[]
no_license
package se.lexicon.g33.jpa_assignment.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import se.lexicon.g33.jpa_assignment.data.RecipeRepository; import se.lexicon.g33.jpa_assignment.model.entit...
Java
UTF-8
5,062
2.25
2
[ "MIT" ]
permissive
/* The MIT License Copyright (c) 2010-2013 Paul R. Holser, Jr. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
C++
UTF-8
1,281
2.65625
3
[ "Apache-2.0" ]
permissive
#pragma once #ifndef CSTHEAD_PAD_TO_HEAD_H_ #define CSTHEAD_PAD_TO_HEAD_H_ #include <vector> namespace CSTHead { class HeadMovement { public: HeadMovement() {} ~HeadMovement() {} public: struct PAD { float P; float A; float D; ...
C++
UTF-8
1,689
2.953125
3
[]
no_license
// // Created by Maikol Guzman on 8/2/20. // #ifndef LAB02_OOP_PERSON_H #define LAB02_OOP_PERSON_H #include <string> #include <ostream> #include <vector> #include "Administrative.h" #include "Professor.h" /** * Abstract Class of Person ////// revisar codigo para verificar si relaciones , metodos , clases y et...
Java
UTF-8
1,016
2.71875
3
[]
no_license
package server; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import server.exception.NameNotFoundException; public class NicknameQuery extends Query implements Runnable { public NicknameQuery(Socket socket, PrintWriter out, BufferedReader in, Str...
Java
UTF-8
417
2.125
2
[]
no_license
package engineers.workshop.common.network.data; import engineers.workshop.common.table.TileTable; import net.minecraft.nbt.NBTTagCompound; public class DataLit extends DataBase { @Override public void save(TileTable table, NBTTagCompound dw, int id) { dw.setBoolean("lit", table.isLit()); } @Override public vo...
Java
UTF-8
2,021
3.8125
4
[]
no_license
//프로그래머스 코딩테스트 연습 <DFS/BFS> - '단어 변환' 문제 public class Programmers43163 { static boolean [] visited; static int answer; public static void main(String[] args) { String begin = "hit"; String target = "cog"; String [] words = {"hot", "dot", "dog", "lot", "log", "cog"}; System.o...
Markdown
UTF-8
33,767
2.671875
3
[]
no_license
### Paper 37: Dota 2 with Large Scale Deep Reinforcement Learning (OpenAI Five) — Appendix ### A Compute Usage ### B Surgery - #### Changing the architecture - #### Changing the Observation Space - #### Changing the Environment or Action Space - #### Removing Model Parts - #### Smooth Training Rest...
C++
UTF-8
2,637
3.4375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; template<typename T> vector<T> cross_product(const vector<T>& A, const vector<T>& B) { vector <T> C(3); C[0] = A[1]*B[2]-A[2]*B[1]; C[1] = -A[0]*B[2]+A[2]*B[0]; C[2] = A[0]*B[1]-A[1]*B[0]; return C; } template<typename T> T dot_product(con...
Java
UTF-8
4,959
2.484375
2
[]
no_license
package authorize; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.nio.c...
C++
UTF-8
1,035
2.984375
3
[ "MIT" ]
permissive
#include "VoxelObject.h" namespace Beans { VoxelObject::VoxelObject(GameObject * owner) : Component(owner), blocks(nullptr), blockSize(1.0f) { } VoxelObject::~VoxelObject() { if (blocks != nullptr) { delete blocks; } } void VoxelObject::SetupObject(unsigned short x, unsigned short y, ...
JavaScript
UTF-8
10,177
3.4375
3
[ "MIT" ]
permissive
/** * Finds and remove a given item from a given list. * Does nothing if the item is not in the list. * @param {any[]} array - The array to remove from * @param {*} item The item to be removed */ const removeFromArray = (array, item) => { return array.filter(elt => { return elt !== item }) } /** * Comput...
Markdown
UTF-8
2,926
2.875
3
[]
no_license
--- description: "Steps to Prepare Award-winning Balsamic Salmon" title: "Steps to Prepare Award-winning Balsamic Salmon" slug: 151-steps-to-prepare-award-winning-balsamic-salmon date: 2020-09-13T14:18:44.560Z image: https://img-global.cpcdn.com/recipes/5947616958873600/751x532cq70/balsamic-salmon-recipe-main-photo.jpg...
Shell
UTF-8
992
2.546875
3
[]
no_license
#!/usr/bin/env bash # 拉镜像 ImageName="registry.baidubce.com/paddlepaddle/paddle:2.1.2-gpu-cuda10.2-cudnn7"; docker pull ${ImageName} # 启动镜像后测试单个模型 run_cmd=" cd /workspace/models/gluon-cv/; cp /workspace/scripts/*.sh ./; cp /workspace/scripts/analysis_log.py ./; bash PrepareEnv.sh; ...
Java
UTF-8
537
2.6875
3
[]
no_license
package com.example.springgeek.lambda; import com.example.springgeek.lambda.bean.Student; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; /** * @author MR.Wang * @dept * @description TODO * @date 2020/4/12 22:37 **/ public class TestCase { public static void main(S...
C
UTF-8
1,430
2.6875
3
[]
no_license
#include <sys/socket.h> #include <unistd.h> #include <netinet/in.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char *argv[]) { int sockfd = 0; int n, index = 0; struct sockaddr_in serv_addr, remaddr; socklen_t addrlen = sizeof(remaddr); char* rea...
Java
UTF-8
388
2.046875
2
[]
no_license
package com.woods.www.scheduletask.quartz; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import java.util.Date; /** * @author: woods * @date: 2019/12/7 * @description: */ @Component @Slf4j public class SimpleJob { public void sayHello(){ log.info("simple job>>>{},...
Python
UTF-8
1,056
4.65625
5
[]
no_license
#Desafio 12 from time import sleep #Decorações def linha1(x): print("\033[1;34m<\033[m"*len(x)) print(f"\033[1;32m{x}\033[m") print("\033[1;34m>\033[m"*len(x)) return x #Chamadas e título linha1("Mestre da matemática") lista1= [] lista2= [] soma= [] #Comandos principais for i in rang...
JavaScript
UTF-8
2,091
4.09375
4
[]
no_license
// PALINDROME function isPalindromeEfficient(str) { for (var i = 0, j = str.length - 1; i < j; ++i, --j) { if (str[i] !== str[j]) { return false; } } return true; } //OR function isPalindromeInefficient(str) { return str.split(' ').reverse().join('') ===str; } console.log(isPalindromeEfficien...
Python
UTF-8
18,645
2.828125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ Lower-level and simpler NSID-specific HDF5 utilities that facilitate higher-level data operations Created on Tue Aug 3 21:14:25 2020 @author: Gerd Duscher, and Suhas Somnath """ from __future__ import division, print_function, absolute_import, unicode_literals import sys import h5py impor...
C#
UTF-8
4,223
2.6875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using BoomaEcommerce.Domain.Policies; namespace BoomaEcommerce.Domain.Discounts { public class CategoryDiscount : Discount { public string Category { get; set; } public Category...
Python
UTF-8
2,406
2.71875
3
[]
no_license
import firebase_admin from firebase_admin import credentials from firebase_admin import db from pyfirmata import Arduino, util from tkinter import * from PIL import Image from PIL import ImageTk import time placa = Arduino ('COM3') it = util.Iterator(placa) it.start() a_0 = placa.get_pin('a:0:i') a_1 = placa.get_pin(...
Markdown
UTF-8
5,867
2.953125
3
[]
no_license
--- layout: post title: A base controller for CodeIgniter meta_description: An attempt to generalize a base controller in CodeIgniter. meta_keywords: Controller, CodeIgniter, CI, development, design, oop category: [php] --- After creating several small to medium CodeIgniter projects, I have adopted the habit of creatin...
Java
UTF-8
257
1.539063
2
[]
no_license
package com.spring.angular.xfs; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import com.spring.angular.xfs.Xfs; @Repository public interface XfsRepository extends CrudRepository<Xfs, Long>{}
Java
UTF-8
3,292
2.5
2
[]
no_license
/* Name:- Meet A. Patel Class:- CIS-3515 Assignment:- Assignment 4 Date:- 02/17/2019 */ /* Name:- Meet A. Patel Class:- CIS-3515 Assignment:- Lab 5 */ package temple.edu; import android.content.Intent; import android.content.res.Resources; import android.support.v7.app.AppCompatActivity; import android.os.Bun...
Markdown
UTF-8
1,099
2.671875
3
[]
no_license
# World of Pets Hack 300k free gems Cheats Mod apk iOS android tips World of Pets Hack 300k free gems Cheats Mod apk iOS android tips - Having said so much, in fact, there are various risks in all the well-designed World of Pets hack. For example, after the official release of a World of Pets cheats, there will be no ...
Markdown
UTF-8
558
3.15625
3
[]
no_license
# javascript-examples A simple JavaScript code that checks all numbers from 1-100 and Prints "Fizz" when the number is only divisible by 3, Prints "Buzz" when the number is only divisible by 5, Prints "FizzBuzz" when the number is divisible by both 3 and 5, Prints the number as it is in all other cases Open the ind...
Python
UTF-8
782
3.234375
3
[]
no_license
days = {"January" : 31, "February" : 28, "March" : 31, "April" : 30, "May" : 31, "June" : 30, "July" : 31, "August" : 31, "September" : 30, "October" : 31, "November" : 30, "December": 31 } months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December...
Go
UTF-8
2,562
3.28125
3
[ "MIT" ]
permissive
// Package models is a simple, lightweight ORM built in Go. It aims to provide a simple and clean API to improve testing and code readability in projects dependent on databases. // // Curretly models only supports MongoDB as a database driver. // // Getting started with models is as simple as satisfying the Modeller in...
C++
UTF-8
649
2.59375
3
[]
no_license
#ifndef THE_LIFT_H_ #define THE_LIFT_H_ #include <iostream> #include <vector> #include <algorithm> #include "floor.h" class TheLift { private: enum direction { UP, DOWN}; direction m_dir; std::vector<FloorQueue> m_floors; std::vector<Human> m_humans; int nr_floors; int m_capacity; int m_current_floor; bool ...
Java
UTF-8
1,296
1.992188
2
[]
no_license
package maxzawalo.c2.free.ui.pc.model.document.bank; import javax.swing.JLabel; import maxzawalo.c2.base.ui.pc.model.ColumnSettings; import maxzawalo.c2.free.bo.bank.BankTP; import maxzawalo.c2.free.bo.document.receiptmoney.ReceiptMoneyTablePart; import maxzawalo.c2.free.bo.document.receiptmoney.ReceiptMoneyTablePart...
Java
UTF-8
118
2.46875
2
[ "MIT" ]
permissive
public class LabyrinthException extends Exception { public LabyrinthException(String mssg) { super(mssg); } }
Python
UTF-8
972
2.96875
3
[]
no_license
pret = 0 cret = 0 def print_base(picked): local = [] for i in range(len(picked)): if not picked[i]:continue local.append(i) print(local) def permutation(n, picked, m): if m == 0: global pret pret +=1 print_base(picked) else: for i in range(n...
PHP
UTF-8
1,388
2.84375
3
[]
no_license
<?php namespace Creuna\ObjectiveWpAdmin\Persistence; use Creuna\ObjectiveWpAdmin\AdminAdapter; use Creuna\ObjectiveWpAdmin\Admin; interface Field { /** * Instantiates the FieldView that will handle * the Field's UI. * * @param Admin $admin - Can be used by the field * ...
Python
UTF-8
1,220
2.71875
3
[]
no_license
import pandas as pd from os import listdir from os.path import isfile, join import datetime, calendar # this is the path to a folder which has weekly list csv files, here 'files' folder mypath = '/Users/mahdishahbaba/shopofia-db-bucket/files/' def get_last_friday(sanpshot_dt): lastFriday = datetime.datetime.strp...
PHP
UTF-8
10,697
2.5625
3
[ "MIT" ]
permissive
<?php //Indication, Copyright Josh Fradley (http://github.com/joshf/Indication) if (!file_exists("../config.php")) { header("Location: ../installer"); exit; } require_once("../config.php"); session_start(); if (!isset($_SESSION["indication_user"])) { header("Location: login.php"); exit; } //Conne...
Java
UTF-8
3,510
2.75
3
[ "MIT" ]
permissive
package stm; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; im...
Java
UTF-8
2,487
2.125
2
[]
no_license
package com.platform.api; import com.google.code.kaptcha.Constants; import com.google.code.kaptcha.Producer; import com.platform.config.RedisUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMappi...
Java
UTF-8
253
1.546875
2
[]
no_license
package com.ml4ai.server.repository; import com.ml4ai.server.domain.Role; import org.springframework.data.jpa.repository.JpaRepository; /** * Created by leecheng on 2018/9/24. */ public interface RoleRepositroy extends JpaRepository<Role, Long> { }
Java
GB18030
1,604
3.96875
4
[]
no_license
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Scanner; import java.util.Set; //ַַӳ䣬һַӦһַҶӦϵһһĹϵ //Examples: //1.pattern = "abba", str = "dog cat cat dog" should return true. //2.pattern = "abba", str = "dog cat cat fish" should return false. //3.pattern = "aaaa", str = "dog...
C#
UTF-8
1,254
2.84375
3
[]
no_license
using System; using System.Collections.Generic; namespace MRAT { [Serializable] public class MratServerMessage: MratAbstractMessage { public string User; public string Token; public List<string> JsonMessages { get; set; } = new List<string>(); public MratServerMessage() { ...
C++
UTF-8
560
2.859375
3
[]
no_license
#include <iostream> #include <queue> using namespace std; int main() { int n,i,sum,val,cost; while(cin >> n && n>0){ priority_queue<int, vector<int>, greater<int> > queue; cost = 0; for(i=0;i<n;i++) { cin >> val; queue.push(val); } ...
Java
UTF-8
1,643
1.734375
2
[]
no_license
package com.ssm.mall.action.portal; import com.github.pagehelper.PageInfo; import com.ssm.mall.common.ServerRes; import com.ssm.mall.dao.vo.ProductDetailVo; import com.ssm.mall.service.iservice.ProductService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Control...
Java
UTF-8
2,277
2.65625
3
[]
no_license
package pool_scheduler.tests; import static org.junit.Assert.*; import java.util.NoSuchElementException; import org.junit.After; import org.junit.Before; import org.junit.Test; import pool_scheduler.resources.Cubicle; import pool_scheduler.resources.CubiclePool; import pool_scheduler.resources.Resource; public cla...
Python
UTF-8
1,114
2.546875
3
[]
no_license
# coding:utf8 # Time:2020-07-04 20:41 # Author:TSL from selenium import webdriver import time def delAllTeacher(): driver = webdriver.Chrome("D:\\ruanjiananzhuang\chromedriver.exe") driver.get("http://localhost/mgr/login/login.html") driver.implicitly_wait(5) #用户名 # driver.find_element_by_id("use...
Java
UTF-8
6,790
2.375
2
[ "MIT" ]
permissive
package dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import model.Usuario; import email.Email; public class UsuarioDAO { public int criar(Usuario usuario) { System.out.print(usuario.toString()); String sqlI...