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
1,594
2.21875
2
[]
no_license
package com.kh.delivery.dao; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import org.apache.ibatis.session.SqlSession; import org.springframework.stereotype.Repository; import com.kh.delivery.domain.AccountDto; import com.kh.delivery.domain.PointVo; @Repository...
C++
UTF-8
950
2.890625
3
[]
no_license
/* * STS example code 7 * "Hello World" with nested coroutines */ #include "sts/sts.h" #include "sts/thread.h" STS *sts; void task_f() { printf("H"); sts->pause(); printf("d!\n"); } void task_g() { printf("e"); sts->pause(); printf("rl"); } void task_h() { printf("ll"); sts->pause...
Ruby
UTF-8
191
3.0625
3
[]
no_license
# Strain in Ruby class Array def keep input = self input.keep_if { |value| yield value } end def discard input = self input.delete_if { |value| yield value } end end
Ruby
UTF-8
357
3.65625
4
[ "MIT" ]
permissive
module Rpsalvin class Player def initialize(name) @name = name end def make_move() puts "Choose from the following options:" puts "1. Rock" puts "2. Paper" puts "3. Scissors" self.set_move(gets.chomp) end def set_move(move) @move = move.to_i end def name() @name end ...
Java
UTF-8
619
2.390625
2
[]
no_license
package br.spei.chat.model; import java.io.Serializable; import java.util.UUID; public class Usuario implements Serializable { private static final long serialVersionUID = -5267311869379628456L; private UUID uuid; private String nickname; public Usuario(String nickname) { this.nickname = nickname; ...
C++
UTF-8
372
2.609375
3
[]
no_license
#include "Jeep.h" #include <fstream> #include <iostream> #include <conio.h> #include <string> using namespace std; ostream& operator<<(ostream& out, Jeep &) { ifstream read; string line; read.open("Jeep.txt"); if (read.is_open()) { while (!read.eof()) { getline(read, line); out << line << endl; } } ...
C++
UTF-8
4,019
2.984375
3
[]
no_license
#include "xgp.h" namespace TKMath { //! Method of package gp //! //! In geometric computations, defines the tolerance criterion //! used to determine when two numbers can be considered equal. //! Manynamespace TKMath { public ref class functions use this tolerance criterion, for ...
Python
UTF-8
4,120
2.765625
3
[ "MIT" ]
permissive
"""Matcher contains a dictionary of action handlers to match data based on column type. Each column type has a list of action handlers which take a column and data. .. code:: matchers = { sa.Numeric: { 'lt': lambda c, d: c < d, 'gt': lambda c, d: c > d, # ... }, ...
Python
UTF-8
1,180
3.734375
4
[]
no_license
#coding=utf-8 class BinarySearch(object): def search(self, a, key): low = 0 high = len(a) - 1 # print(high) while high >= low: mid = (high + low) // 2 midValue = a[mid] if a[mid] < key: if mid == len(a) - 1: prin...
Java
UTF-8
1,760
2.34375
2
[]
no_license
package org.emmef.sndfile; import java.io.IOException; import java.net.URI; import org.emmef.audio.format.AudioFormat; import org.emmef.audio.nodes.SoundSink; import org.emmef.audio.nodes.SoundSource; import org.emmef.audio.servicemanager.SoundFormatUnsupportedException; import org.emmef.audio.servicemanager.SoundSou...
Markdown
UTF-8
39,903
3.25
3
[]
no_license
[Django 공식문서 - Models](https://docs.djangoproject.com/en/3.0/topics/db/models/) 정리본 # Django - models ## Models 모델 - 데이터에 대한 정보를 나타내는 최종 소스 (갖고 있는 데이터의 필수 필드와 행동(함수)를 포함) - 각각의 모델은 데이터베이스의 테이블에 매핑 - 각각의 모델은 `django.db.models.Model`의 서브클래스 - 모델의 각 속성은 데이터베이스의 필드를 나타냄 - 이것들을 이용하여 장고는 데이터베이스 액세스 API를 제공 ```python...
Rust
UTF-8
853
2.65625
3
[ "MIT" ]
permissive
use rocksdb::{DBVector, DB}; use std::path::Path; use kvs::KeyValueStore; use task::Existence; use Result; #[derive(Debug)] pub struct RocksDb { db: DB, } impl RocksDb { pub fn new<P: AsRef<Path>>(path: P) -> Result<Self> { let db = track_any_err!(DB::open_default(path))?; Ok(RocksDb { db }) ...
Java
UTF-8
645
3.03125
3
[]
no_license
import java.awt.Color; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; public class PanelDemo { public static void main(String[] args) { // that panel must be added in root container like JFrame or JWindow //by default panel support FlowLayout JPanel p = new JPanel(); //p.se...
Shell
UTF-8
1,327
3.640625
4
[]
no_license
#!/bin/bash # $1 ProjectName | $2 TomcatName| $3 BUILD_ID | $4 BasePath if [ "$4" = "" ]; then ProjectPath="/usr/local/websrv/builds" TomcatPath="/usr/local/websrv/$2" else ProjectPath="$4/builds" TomcatPath="$4/$2" fi LogFile="upgrade.log" TomLog="tomcat.log" if [ "$3" = "-1" ]; then echo "go bac...
Java
UTF-8
2,099
2.171875
2
[]
no_license
package com.example.mugiwara_munyi.newsreader; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Te...
Python
UTF-8
649
3.5625
4
[]
no_license
""" RuleofThree Author : Chanwit Settavongsin """ def main(number, price_temp, weight_temp): """ find best value to buy snack """ avg_temp = weight_temp / price_temp for _ in range(number - 1): price = float(input()) weight = float(input()) avg = weight / price if avg == avg_...
C++
UTF-8
10,914
3.078125
3
[ "Apache-2.0" ]
permissive
//============================================================================= /** * @file MT_Reactor_Timer_Test.cpp * * This is a simple test that illustrates the timer mechanism of * the reactor scheduling timers, handling expired timers and * cancelling scheduled timers from multiple threads. No...
Java
UTF-8
432
2.078125
2
[]
no_license
package nocom.special; import javax.swing.undo.CannotRedoException; import javax.swing.undo.CannotUndoException; public interface UndoableTextComponent { public void undo() throws CannotUndoException; public void redo() throws CannotRedoException; public String getUndoPresentationName(); public String getRedo...
C++
UTF-8
427
2.625
3
[]
no_license
#ifndef __STOP_WATCH__ #define __STOP_WATCH__ #include <ctime> #include <chrono> #include <iostream> class StopWatch { typedef std::chrono::high_resolution_clock clock; typedef std::chrono::microseconds milliseconds; public: StopWatch(bool run = false); void reset(); milliseconds Elapsed() const; private:...
Markdown
UTF-8
4,258
2.90625
3
[]
no_license
練習:將 Web Service API 包裝成 SDK ----------------------------------- ### 練習範圍 - Block - 網路連線 - JSON 格式處理 ### 練習目標 在屬於 Mobile Internet 的時代裡,我們在寫的手機 App 往往不會是像貪食蛇 這樣的單機遊戲,更有可能是透過網路連線,抓取或上傳資料,讓用戶可以提供 源源不絕的資訊,並且讓用戶與用戶之間溝通。換言之,手機 App 往往就是一 個 Internet Client,KKBOX、甚至 KKBOX 公司內的其他產品線,也是這樣的軟 體。 在寫這樣的 App 的時候,我們通常會把整個 App 所有跟網...
JavaScript
UTF-8
2,602
2.71875
3
[]
no_license
// Generated by CoffeeScript 1.12.3 (function() { var LeaveForm; LeaveForm = (function() { function LeaveForm(name1, date, deputy, type, reqDay) { this.name = name1; this.date = date; this.type = type; this.reqDay = reqDay; this.fileID = this.date + "^" + this.name; this.ima...
Java
UTF-8
4,846
3.171875
3
[]
no_license
/** * Interrupts Class */ public class Interrupts { /** interrupts controller starting addresses */ public enum InterruptTypes { VBANK(0x0040), LCDC(0x0048), TIMER(0x0050), SERIAL(0x0058), P10_13(0x0060); private int value; InterruptTypes(int value) { this.value = value...
Python
UTF-8
24,427
3.21875
3
[]
no_license
import tkinter import tkinter.messagebox import time class CountdownTimer: def __init__(self): self.main_window = tkinter.Tk() # set the geometry self.main_window.geometry('500x250') self.main_window.resizable(width=False,height=False) # make frames se...
Java
UTF-8
447
2.171875
2
[]
no_license
package ru.javatalks.fundamentals.account.client; import ru.javatalks.fundamentals.account.AccountService; public class AccountServiceClientSandbox { public static void main(String[] args) { AccountService accountService = new AccountServiceClient("http://localhost:8080/account-service/account/"); ...
TypeScript
UTF-8
1,199
3.1875
3
[]
no_license
import { Maze, MazeInfo } from "./"; import { SpaceTypes } from "../../components/Space/types"; export const generateMaze = ( x: number, y: number, clear?: boolean ): MazeInfo => { let maze: MazeInfo = {}; for (let i = 0; i < x; i++) { maze[i] = []; for (let j = 0; j < y; j++) { if (i === 0 &&...
Markdown
UTF-8
4,424
2.828125
3
[]
no_license
# Isaiah 1 [[Isaiah]] | [[Isa-02|Isaiah 02 →]] *** ###### v1 The vision of Isaiah the son of Amoz, which he saw concerning Judah and Jerusalem, in the days of Uzziah, Jotham, Ahaz, and Hezekiah, kings of Judah. ###### v2 Hear, heavens, and listen, earth; for Yahweh has spoken: "I have nourished and brought up c...
Python
UTF-8
2,168
4.21875
4
[]
no_license
''' [버블 정렬 알고리즘] 순차적으로 바로 옆에 있는 데이터와 비교해서 옆의 데이터가 크면 위치를 변경한다. 최선의 경우(모두 정렬된 경우) : 이동 횟수 0, 비교 횟수 (N*N)/2 최악의 경우 : 이동 횟수, 비교 횟수 모두 (N*N)/2 O 표기법에 의하면 O(N**2) 의 실행시간을 갖는다. (비효율적인 알고리즘) ''' import random import time import sys compare_counter = 0 swap_counter = 0 def bubble_sort(random_list): global compare_count...
C#
UTF-8
6,250
3.28125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; /* *I, Salvador Valle, #000322660 certify that this material is my original work. * No other person's work has been used without due acknowledgement.8 * Program Use: The Program tak...
C++
UTF-8
1,592
3.484375
3
[]
no_license
#include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <map> #include <set> #include <unordered_set> #include <unordered_map> using namespace std; /* 给你一个字符串 s ,找出其中最长的回文子序列,并返回该序列的长度。 子序列定义为:不改变剩余字符顺序的情况下,删除某些字符或者不删除任何字符形成的一个序列。 */ // dp, dp[idx][len] 表示子串中回文的长度。 class So...
Java
UTF-8
1,293
2.640625
3
[]
no_license
package com.iopayrollpackage; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class EmployeePayrollServiceTest { EmployeePayrollService employee_1 = new EmployeePayrollService(); EmployeePayrollService employee_2 = new EmployeePayrollService(); EmployeePayrollService...
Java
UTF-8
673
1.992188
2
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
package com.alibaba.json.bvt.bug; import org.junit.Assert; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import junit.framework.TestCase; public class Bug_for_issue_280 extends TestCase { public void test_for_issue() throws Exception { TypeReference<Respone<User>> type= n...
Java
UTF-8
293
1.53125
2
[]
no_license
package com.zxxk.zyglpt.entity.questionoption; import javax.persistence.Entity; import com.zxxk.zyglpt.entity.QuestionOption; import com.zxxk.zyglpt.entity.question.QuestionJuniorScience; @Entity public class QuestionOptionJuniorScience extends QuestionOption<QuestionJuniorScience>{ }
JavaScript
UTF-8
4,408
2.859375
3
[ "MIT" ]
permissive
import extend from "just-extend" import stringReplaceAsync from "./string-replace-async" const anchorRegex = /<a[^>]*>([^<]+)<\/a>/gi function getAnchorRegex(regex) { return new RegExp(`<a[^>]*>(${regex.source})<\\/a>`, "gi") } /** * Returns the matched regex data or whether the text has any matching string * @p...
Markdown
UTF-8
3,808
3
3
[ "MIT" ]
permissive
--- layout: post title: "[SWEA]#2117 [모의 SW 역량테스트] 홈 방범 서비스" date: 2020-09-07 18:19:30 categories: Algorithm, BruteForce tags: baekjoon image: /assets/article_images/2014-11-30-mediator_features/night-track.JPG image2: /assets/article_images/2014-11-30-mediator_features/night-track-mobile.JPG --- 문제 ---------------...
Java
UTF-8
1,087
2.71875
3
[]
no_license
package com.zhaosoft.test; import com.zhaosoft.example.TreeNode; import com.zhaosoft.example.exam101_150.exam144.Solution_BFS; import com.zhaosoft.example.exam101_150.exam144.Solution_DFS; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.List; publ...
Markdown
UTF-8
52,304
2.671875
3
[]
no_license
# Title: The Gentleman from San Francisco ## Author: Ivan Bunin ## Year: 1915 ------- _"Woe to thee, Babylon, that mighty city!"_ Apocalypse. The gentleman from San Francisco--nobody either in Capri or Naples ever remembered his name--was setting out with his wife and daughter for the Old World, to spend there t...
SQL
UTF-8
59,719
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mer. 29 août 2018 à 19:28 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
Python
UTF-8
1,745
2.5625
3
[]
no_license
import os import sys import json from collections import deque __DIR__ = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, __DIR__) sys.path.insert(0, __DIR__ + '/../') # # Load data # def get_clients(): file = open (__DIR__ + '/../../data/settings.json', 'r') file.seek(0) lines = file.read...
C++
UTF-8
1,376
2.8125
3
[]
no_license
#include <Arduino.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" void vTask1(void* pvParam) { for(;;) { int val = digitalRead(D13); val = (~val & 0x00000001); digitalWrite(D13, val); //vTaskDelay(1000/portTICK_PERIOD_MS); d...
Python
UTF-8
3,840
3.125
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ @file @brief Creates a custom log (open a text file and flushes everything in it). """ import datetime import os class CustomLog: """ Implements a custom logging function. This class is not protected against multithreading. Usage: :: clog = CustomLog("folder")...
Java
UTF-8
2,767
3.015625
3
[]
no_license
package com.example.menusemanal; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class BDRecipes implements Serializable { public static St...
Markdown
UTF-8
2,268
2.96875
3
[]
no_license
# Elevador-consumer O projeto tem por objetivo efetuar a leitura de um arquivo.json e dada as informações do arquivo são gerados derterminados valores de saída. ## Enunciado Suponha que a administração do prédio 99a da Tecnopuc, com 16 andares e cinco elevadores, denominados A, B, C, D e E, nos convidou a aperfeiçoar o...
C
UTF-8
1,827
4.4375
4
[]
no_license
/*Escrever um algoritmo e implementá-lo em linguagem C que leia uma matriz de valores inteiros 6 por 6 e um valor inteiro qualquer, posteriormente multiplicar a matriz pelo valor lido e colocar o resultado na própria matriz.*/ #include <stdio.h> #include <stdlib.h> #include <time.h>//era para usar a função rand #defin...
JavaScript
UTF-8
5,180
2.890625
3
[ "MIT" ]
permissive
/* * contentscript.js */ /*===================*/ /* Constant Variable */ /*===================*/ var KEY_CODE = { TAB: 9, ENTER: 13, UP_ARROW: 38, DOWN_ARROW: 40 }; var INTERVAL_TAB_THRESHOLD = 150; var EXTENSION_ID = chrome.i18n.getMessage("@@extension_id"); /*==========*/ /* varialbe */ /*==========*/ ...
C++
UTF-8
1,344
2.640625
3
[]
no_license
#ifndef SETTINGS_H #define SETTINGS_H #include "general.h" class Settings { public: Settings(); virtual ~Settings(); private: unsigned m_fpsLimit = 0; unsigned m_volume = 0; unsigned m_sfx = 0; bool ...
Markdown
UTF-8
607
3.1875
3
[]
no_license
# 题目 ![img](./image/q.png) # 算法 ```python ``` ```c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool isPalindrome(ListNode* head) { string res = ""; whil...
JavaScript
UTF-8
278
2.53125
3
[ "MIT" ]
permissive
export default class CartItemsView { constructor(el, cart) { this.el = el; this.cart = cart; this.cart.register(() => this.render()); this.render(); } render() { this.el.innerHTML = `<pre>${JSON.stringify(this.cart.getItems(), null, 2)}</pre>`; } }
Markdown
UTF-8
667
2.6875
3
[ "Apache-2.0", "MIT" ]
permissive
--- layout: post title: "One Step at a time" date: 2019-11-01 12:25:07 -0400 permalink: one_step_at_a_time --- So, I personally thought i was getting the hang of it, but does seem there is still so much more to learn. Which makes me feel more excited, knowing i am personally looking into a career where ev...
Java
UTF-8
7,501
2.515625
3
[]
no_license
package com.wechat.dao; import java.util.ArrayList; import java.util.Collection; import org.hibernate.Session; import org.hibernate.sql.Update; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.wechat.pojo.Friend; import com.wechat.pojo.User; ...
JavaScript
UTF-8
647
3.578125
4
[]
no_license
let red = 255; let green = 255; let blue = 255; const init = () => { window.addEventListener('keydown', onKeyDown); } const onKeyDown = (event) => { switch (event.key){ case "ArrowUp": document.body.style.backgroundColor = `rgb(${red++}, ${green++}, ${blue++})`; console.log(re...
Markdown
UTF-8
6,766
3.375
3
[ "MIT" ]
permissive
--- title: 'Studio: FlickList 2' currentMenu: studios --- In this studio we will talk about incorporating forms into your app, so that users can provide input and your app can respond to their input. ## Walkthrough In our FlickList app, we will delete much of the previous "Movie of the Day" code, and start something...
Java
UTF-8
3,871
1.679688
2
[]
no_license
/* * Copyright (c) 2012, grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of condit...
Ruby
UTF-8
5,135
2.796875
3
[]
no_license
class ApplicationController < ActionController::Base protect_from_forgery def store_parse(hash) ans = {} ans[:gameName] = hash["gameName"] ans[:elements] = [] i = 1 while hash.has_key? 'elementName'+i.to_s type = hash['elementInputType'+i.to_s] == 'textBox' ? :textBox : :dropDown...
Markdown
UTF-8
8,411
2.578125
3
[]
no_license
# ![bmg](images/mean.jpeg) Demonstrate the ability of MEAN Stack to create a simple User Application for CRUD operations. *Check [mean-github](https://github.com/meanjs/mean) - The Open-Source Full-Stack Solution For MEAN Applications.* ## Introduction MEAN is a set of Open Source components that together, provide ...
C#
UTF-8
1,141
2.84375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SquirrelGame.Movements { public class OnGround : MonoBehaviour { [SerializeField] bool isOnGround = false; [SerializeField] float maxDistance = 0.15f; [SerializeField] LayerMask layerMask; [...
C
UTF-8
703
2.9375
3
[]
no_license
#include <stdio.h> #include <pthread.h> #include <string.h> #include <stdlib.h> #include <unistd.h> pthread_t mWriteThread; void waitOnWriteThread(){ if(mWriteThread == getpid()){ // Perform some task mWriteThread = 0; } } void writeToDisk(){ waitOnWriteThread(); // Other operati...
C++
UTF-8
1,683
3
3
[]
no_license
#include "utilities.h" unsigned int count_lines(FILE * filedesc){ char c; unsigned int newline_count = 0; long pos; pos = ftell(filedesc); rewind(filedesc); while ((c = fgetc(filedesc)) != EOF) { if (c == '\n') newline_count++; } fseek(filedesc, pos, SEEK_SET); return newline_count; } char *trim_whi...
C#
UTF-8
989
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Arrow.Framework { /// <summary> /// 用户状态维持的泛型接口 /// </summary> public interface IArrowUserStatus<T> where T: class { /// <summary> /// 设置值 /// </summary> /// <typeparam n...
PHP
UTF-8
2,882
2.515625
3
[]
no_license
<?php require_once __DIR__ . "/http.php"; global $http; function qb_query_parse($result) { $list = []; $fields = []; foreach ($result['fields'] as $field) { $fields[$field['id']] = $field; } foreach ($result['data'] as $item) { $data = []; foreach ($item as $key => $valu...
Shell
UTF-8
1,016
2.875
3
[]
no_license
#!/usr/bin/env bash pre[0]="550500_0.25_test" pre[1]="550500_0.30_test" pre[2]="550500_0.35_test" pre[3]="550500_0.40_test" tests="1 2 3 4 5" for testid in $tests do workloadfile=${pre[0]}.testid resultfile=$workloadfile."_mysql" java -Xmx12192m -Xms4096m -jar FClient.jar -threads 2000 -t -db frugaldb.db.FrugalDBC...
Java
UTF-8
16,620
2.203125
2
[ "Apache-2.0" ]
permissive
package life3d; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Random; import java.util.Set; impo...
Markdown
UTF-8
1,269
4.25
4
[]
no_license
## READ ME ### To run - Open index.html in a browser and use the developer console to view the output of the function groupArrayElements() - Change the length of the input array by adding elements to the array arr - Change the number of sub arrays output, change the value of variable n ### Instructions - Give...
Python
UTF-8
5,226
3.671875
4
[]
no_license
""" Contact book ~~~~~~~~~~~~~ Code by: Manuel Rubio © 2020 Description: This is a beginner project, it's a contact book in that use a Command Line Interface to create, read, update, and delete contacts that will be saved in a database by using SQLite3. Lang: English """ from...
C#
UTF-8
2,510
2.5625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Net.Mail; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace QuarksLibrary { public partial class Preferences : Form { ...
C#
UTF-8
2,857
3.0625
3
[]
no_license
using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _06.RemoveVillain { class RemoveVillain { static void Main(string[] args) { int villainId = int.Parse(Console.ReadLine()); ...
Go
UTF-8
2,022
3.0625
3
[ "MIT" ]
permissive
package main import ( "fmt" "net/http" "strconv" "github.com/fluhus/biostuff/formats/fasta" ) // TODO(amit): Put sequences in a map. // Handles sequence requests. func sequenceHandler(w http.ResponseWriter, req *http.Request) { chr := req.FormValue("chr") startS := req.FormValue("start") lengthS := req.FormV...
Shell
UTF-8
220
2.640625
3
[]
no_license
#! /bin/bash # Prints to terminal echo 'hello World' # Another way to Print to terminal cat << heredoc Heredoc is a way to interact with terminals You can use this to display valuable information to your users heredoc
C++
UTF-8
729
2.703125
3
[]
no_license
#include <iostream> #include "rd.hpp" #include "graphw.hpp" #include <boost/graph/adjacency_list.hpp> using namespace std; using namespace boost; int main(int argc, const char * argv[]) { if(argc!=2){ std::cout <<"Wrong number of arguments passed"<< std::endl ; return -1; } Reade...
PHP
UTF-8
1,251
2.875
3
[]
no_license
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ class MailManager { private $db; public function __construct($db) { $this->db = $db; } public function e...
Java
UTF-8
10,148
2.4375
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * sifreDegistir.java * * Created on 07.Haz.2009, 17:09:34 */ package Arayuz; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.KeyEvent; import javax.persistence.EntityManager; import ja...
C++
UTF-8
203
3.1875
3
[]
no_license
#include<iostream> using namespace std; int power(int a,int b){ if(b==0){ return 1; } return a*power(a,b-1); } int main(){ int a=5; int ans = power(2,5); cout << ans; }
Python
UTF-8
966
3.53125
4
[]
no_license
#student_info.csv file is outside the OOP folder import csv def to_csv(l): with open("Student_info.csv","a",newline='') as file: writer = csv.writer(file) writer.writerow(l) def assign_roll(): f=open("student_info.csv","r") c=0 for line in f: c += 1 return c c = True wh...
PHP
UTF-8
230
2.546875
3
[]
no_license
<?php $firstName = "Abdullahi"; $lastName = "Abdulazeez"; $hng_id = "HNG-03507"; $lang = "PHP"; $email = "abdulazeezabdullahi57@gmail.com"; echo "Hello World, this is $firstName $lastName with HNGi7 ID $hng_id using $lang for stage 2 task. $email"; ?>
C++
UTF-8
873
3.328125
3
[]
no_license
#include<iostream> using namespace std; #define R 3 #define C 3 int minimal(int x, int y, int z) { return std::min(std::min(x, y), z); } int min_cost(int a[R][C],int source_x,int source_y,int dest_x ,int dest_y) { if(source_x==dest_x && source_y==dest_y) return (a[source_x][source_y]); else if(dest_x==0) return ...
Python
UTF-8
542
3.359375
3
[]
no_license
def to_int_list(l, split): l = l.split(split) l = all_to_int(l) return l def all_to_int(x): while "null" in x: x.remove("null") for i in range(len(x)): x[i] = int(x[i]) return x num = int(input()) nums = to_int_list(input(), " ") count = [0.01]*num for i in nums: if i in ...
Shell
UTF-8
2,196
2.71875
3
[ "MIT" ]
permissive
#!/bin/sh #2019-09-18 sudo sed -i '/deb-src/s/^#//g' /etc/apt/sources.list.d/raspi.list sudo apt-get update -y #gets Raspian updates sudo apt-get dist-upgrade -y #installs Raspian updates curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejs nginx build-essential g++ sudo a...
Python
UTF-8
1,354
2.671875
3
[]
no_license
# coding=utf8 from pymongo import MongoClient class DB_helper(object): def __init__(self): MONGODB_HOST = '10.1.15.193' MONGODB_PORT = 37017 MONGODB_DBNAME = 'proxy' client = MongoClient(MONGODB_HOST, MONGODB_PORT) db = client[MONGODB_DBNAME] self.proxys = db.proxy...
Python
UTF-8
2,525
3
3
[]
no_license
#!/usr/bin/python3 from graph import * from train import * from argparse import ArgumentParser def process_argparse(): parser = ArgumentParser() parser.add_argument('File', help='a file containing a list of stations', type=str) return parser.parse_args() def get_start_end_station...
Java
UTF-8
3,274
2.140625
2
[]
no_license
/* Copyright (c) 2009-2021, Andrew M. Martin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
Java
UTF-8
1,420
1.96875
2
[]
no_license
package com.dbkj.meet.dto; /** * Created by MrQin on 2016/11/10. */ public class ChangePwd { private String oldPassword; private String encryptOldPwd; private String newPassword; private String encryptNewPwd; private String confirmPassword; private String encryptConfirmPwd; public String...
Shell
UTF-8
3,258
3.28125
3
[]
no_license
#!/bin/bash read -p "Enter the user name you work with on your computer: " nombre if [ "$nombre" != "" ] then sudo apt update -y sudo apt upgrade -y sudo apt install openssl -y sudo apt install curl -y sudo apt install gpm -y sudo apt install gcc -y sudo apt install git -y sudo apt updat...
C#
UTF-8
1,545
2.59375
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WeChat.AutoJump.Domain { public class CacheModel { public WidthHeight Image { get; set; } public WidthHeight PicBox { get; set; } public P...
C++
UTF-8
10,920
3.546875
4
[]
no_license
#ifndef _UJ_LIST_H #define _UJ_LIST_H #include<iterator> #include<iostream> #include<algorithm> #include<functional> /** \mainpage Lista jednokierunkowa. * Autor: Oskar Jonczyk */ namespace uj { /** Lista jednokierunkowa. */ template<typename T> class list { class Iterator; /** Pojedynczy element listy. ...
Java
UTF-8
828
2.796875
3
[]
no_license
package com.belfry.bequank.util; /** * @Author: Yang Yuqing * @Description: * @Date: Created in 9:02 AM 8/2/18 * @Modifiedby: */ public class LoginInfo { String token; int vericode; /** * @author: Yang Yuqing * @description: token is the login token, and if there is no vericode, assign it t...
C++
UTF-8
2,404
2.59375
3
[]
no_license
#include "MLP.h" #include <time.h> void MLP::initialize() { int maxValue = 1.0f; int minValue = -1.0f; srand(time(NULL)); for (unsigned int i = 0; i < layerWeights.size(); ++i) { for (Array2D<float>::iterator it = layerWeights[i].begin(); it != layerWeights[i].end(); ++it) { *it = ((float)rand() / (float)R...
C
UTF-8
2,585
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> //gcc -g -Wall -fopenmp -o trap trap.c -lm double f(double x){ return exp(x); } double Local_trap(double a, double b, int n){ double h, x, my_result; double local_a, local_b; int i, local_n; int my_rank = omp_get_thread_num(); i...
Java
UTF-8
3,674
2.796875
3
[]
no_license
package com.stemby; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util....
Markdown
UTF-8
1,047
2.953125
3
[]
no_license
# Cube Timer ## Created By: Mark Loegel ## Deployed Link: https://cube-timer.vercel.app/ ## About This project was created because solving Rubik's cubes and coding are passions of mine. Cube Timer is used for timing and keeping track of your solve times. This project is perfect for cubers because it not only includ...
C#
UTF-8
309
2.625
3
[]
no_license
//Servent:onAfterGet //範例: 改變title欄位顏色 Item objItem ; string strTitle; string strColor; for(int i=0; i < this.getItemCount(); i++){ objItem = this.getItemByIndex(i); strColor="#B3FF99"; objItem.setProperty("css", ".title { background-color: " + strColor +" }"); } return this;
Python
UTF-8
1,010
2.78125
3
[ "MIT" ]
permissive
import json from abc import ABCMeta, abstractmethod, abstractproperty class Processor(object): __metaclass__ = ABCMeta __registry = {} @classmethod def get_registered_processors(cls): """ :return: dict """ return cls.__registry @classmethod def register(cls):...
Java
GB18030
1,259
3.421875
3
[]
no_license
package algorithm.ArrayQuestion.meituan; import algorithm.Greedy.course.Things; import java.util.ArrayList; /** * ƽʱ临Ӷnlognn*n * * @author simoniu * */ public class Sort { public static void SortByendTime(ArrayList<Poster2> thingsSorted, Integer start, Integer end) { if (start >= end) // ݹ { retur...
SQL
UTF-8
790
3.25
3
[]
no_license
DROP TABLE IF EXISTS SCB_AUTHENTICATE; DROP TABLE IF EXISTS SCB_ROLE; DROP TABLE IF EXISTS SCB_TEAM; DROP TABLE IF EXISTS SCB_USER; DROP TABLE IF EXISTS SCB_TICKET; CREATE TABLE SCB_USER ( id int, firstName varchar(200), lastName varchar(200), user_id varchar(200), onBoardDate Date, team_id int, ro...
Java
UTF-8
561
1.851563
2
[]
no_license
package com.practice.razor.productcatalogue; import javax.ws.rs.ApplicationPath; import org.glassfish.jersey.server.ResourceConfig; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.fasterxml.jackson.databind.ObjectMapper; @Component @Applicat...
Shell
UTF-8
137
2.703125
3
[]
no_license
#!/bin/bash layer_dir=$1 buildpack_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" cp -r $buildpack_dir/layer/* $layer_dir/
Python
UTF-8
118
3.359375
3
[]
no_license
list2=[12,14,-95,3] print(list2) print("positive numbers:") for i in list2: if i<0: print(i,end="")
PHP
UTF-8
6,429
2.734375
3
[]
no_license
<?php require_once("./lib/lib.php"); priveledge($db, "hq");//priveledge: more than leaders if(!isset($_POST['arg'])){ header('Location: '.SITEROOT.'/index.php'); exit(); } if(!isset($_SESSION['event']['id'])){ priveledge_fail(); } ob_start(); //print "<pre>";print_r($_POST);print_r($_SESSION);//exit; $ifs = ne...
Markdown
UTF-8
485
2.625
3
[]
no_license
# Mobile_ToDo_App.github.io using HTML5 Canvas The introduction of HTML5 brought a lot of new features that made it easier to develop web applications. One of the hottest technologies today, HTML5 is currently one of the most commonly used markup language. ![todo_1](https://user-images.githubusercontent.com/58935531/...
JavaScript
UTF-8
1,734
2.609375
3
[ "MIT" ]
permissive
var http = require('http'); var async = require('async'); var keys = require('../keys.json'); var _ = require('lodash'); var counter = 0; var geocodeString = function(locString, cb) { key = keys['opencage']; http.get('http://api.opencagedata.com/geocode/v1/json?q=' + locString + '&key=' + key, function(res) { ...
Python
UTF-8
29
3.03125
3
[]
no_license
a = 3 b = 5 print(a*b,a**b)
Java
UTF-8
8,701
2.1875
2
[]
no_license
package com.assignment.hazechecker; import android.content.Context; import android.content.res.Configuration; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4...