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
Markdown
UTF-8
2,603
2.953125
3
[]
no_license
Since version **1.39.0** the Scanbot SDK for Android provides a simple and convenient API ([`PDFRenderer`](https://scanbotsdk.github.io/documentation/android/api/io.scanbot.sdk/io/scanbot/sdk/process/PDFRenderer.html)) to create PDF document files. The `PDFRenderer` supports multi-page PDFs where each given image will ...
JavaScript
UTF-8
36,220
2.640625
3
[]
no_license
var numShownConcert = 0; function drawSeatCurve(){ var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.lineWidth="5"; ctx.strokeStyle="green"; ctx.moveTo(150,50); ctx.arcTo(150,250,250,250,100); ctx.arcTo(350,250,350,150,100); ctx.lineTo(350,50);...
Go
UTF-8
969
3.515625
4
[ "Apache-2.0" ]
permissive
package gomock import ( "github.com/golang/mock/gomock" "testing" "time" ) func TestFoo(t *testing.T) { ctrl := gomock.NewController(t) // Assert that Bar() is invoked. defer ctrl.Finish() m := NewMockFoo(ctrl) // Asserts that the first and only call to Bar() is passed 99. // Anything else will fail. m. ...
PHP
UTF-8
3,383
3.078125
3
[]
no_license
<?php //$conn is connection function in db_connect.php for connection //DataBase name 'trial'.'trial1' //name of Content in data base are id,Email, Name, Message, Date include('config/db_connect.php'); $email=$name=$message=''; $errors=array('email'=>'','name'=>'','message'=>''); if(isset($_POST['su...
Java
UTF-8
1,802
3.3125
3
[]
no_license
package GameLogic.State; import GameLogic.UI.Log; import GameLogic.UI.UIColors; public abstract class Unit { protected String name; protected int maxHP; protected int currHP; protected transient Log log; protected int baseAttack; protected int baseDamageRange; public Unit(String name, i...
C++
UTF-8
5,366
2.609375
3
[ "BSD-3-Clause" ]
permissive
// Include files // ============================================================================ // STD&STL // ============================================================================ #include <functional> // ============================================================================ // ROOT // ==================...
Markdown
UTF-8
1,500
2.734375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: DevCon Dp_delete description: Deletes a third-party (OEM) driver package from the driver store on the local computer. This command deletes the INF file, the PNF file, and the associated catalog file (.cat). keywords: - DevCon Dp_delete Driver Development Tools topic_type: - apiref ms.topic: reference api_nam...
Markdown
UTF-8
1,309
2.59375
3
[]
no_license
--- layout: page title: People permalink: /people/ --- We have some great people working at the Dean Lab - meet some of them below. {% raw %} <div class="container"> <div class="row"> {% endraw %} {% for person in site.people %} {% if person.imageid %} {% capture imageurl %}https://res.cloudinary.com/{{site.cloud...
C#
UTF-8
2,980
2.765625
3
[]
no_license
using Discord.Commands; using Discord.Models; using Discord.WebSocket; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace Discord { public class PersonaService { private readonly Sem...
Python
UTF-8
3,182
2.609375
3
[]
no_license
import re import os import datetime from ._base import Reader from .post import Post import mistune from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters.html import HtmlFormatter class MyRenderer(mistune.Renderer): def block_code(self, code, lang=None): i...
Python
UTF-8
469
2.640625
3
[]
no_license
import unittest from december17 import Solver class TestDec17(unittest.TestCase): def test_examples(self): (one, two) = Solver(from_file='input/dec17-sample.in').solve(25) self.assertEqual(one, 4) self.assertEqual(two, 3) def test_solution(self): (one, two) = Solver(from_fil...
Markdown
UTF-8
1,792
2.984375
3
[]
no_license
DFS: ~~~python # 递归: visited = set() def dfs(node, visited): # terminator if node in visited: # already visited return # not visited visited.add(node) # process current node ... for next_node in node.children(): if next_node not in visited: ...
C#
UTF-8
1,373
2.984375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Prototype { class Program { static void Main(string[] args) { #region Ver 1 var resume1 = new Resume("Adam"); resume1.SetPersonalInfo("Male", "29"); r...
Java
UTF-8
281
2.5625
3
[]
no_license
package May18; public class Person { String name; float height; char gender; static String race = "Human"; static int counter ; //int counter ; public Person() { counter++ ; } public Person(String name, float height, char gender) { this.name = name; } }
C#
UTF-8
1,130
2.90625
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { private WeaponFactory weaponFactory = new WeaponFactory(); private IWeapon _currentWeapon; private List<IWeapon> _allMyWeapons = new List<IWeapon>(); public WeaponsType We...
Java
UTF-8
1,921
2.296875
2
[]
no_license
//--------------------------------------------------------------------------------------- // Copyright (c) 2001-2013 by PDFTron Systems Inc. All Rights Reserved. // Consult legal.txt regarding legal and license information. //--------------------------------------------------------------------------------------- ...
SQL
UTF-8
107
2.640625
3
[]
no_license
select books.title from books, publisher where publisher.id = books.publisher and publisher.name = "PHI";
Java
UTF-8
958
3.65625
4
[]
no_license
package com.liad.guessnumber; import java.util.Scanner; /* * Author: Liad Hermelin */ public class GuessNumberMenu { // asks for limit, starts game public static void main(String[] args) { boolean shouldContinue = true; GuessNumber guesser = new GuessNumber(); Scanner kboard = new Scanner(System.in); do...
JavaScript
UTF-8
120
2.8125
3
[]
no_license
let coding= ["coding15","coding16","coding17",] console.log(coding) let prenom= coding.push("Seb") console.log(prenom)
C
UTF-8
664
3.359375
3
[]
no_license
// main source code https://stackoverflow.com/questions/3585846/color-text-in-terminal-applications-in-unix #include <stdio.h> #define RED "\x1B[31m" #define GRN "\x1B[32m" #define YEL "\x1B[33m" #define BLU "\x1B[34m" #define MAG "\x1B[35m" #define CYN "\x1B[36m" #define WHT "\x1B[5;37m" #define RESET "...
Java
UTF-8
712
3.4375
3
[]
no_license
package rushikesh.string; public class StringPro2 { void getCountOfRepeat(String input){ String[] arr=input.split(" "); int maxFrequency=0; int count=0; String repeatWord = "", tempVar; for(int index=0;index<arr.length;index++) { count=0; tempVar = arr[index]; for(int index1=0;index1<arr.length;i...
C#
UTF-8
3,929
3.078125
3
[]
no_license
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text.RegularExpressions; using DBI_Grading.Model.Teacher; namespace DBI_Grading.Utils { internal static class StringUtils { internal static string GetNumbers(this string input) { ...
C++
UTF-8
4,186
2.65625
3
[]
no_license
#include "mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); ui->actionExit->setText("Exit"); ui->actionLoad->setText("Load"); ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); connect(ui->actionExit,S...
Python
UTF-8
345
4.34375
4
[]
no_license
#Factorial Function def factorial(n): #End Loop if n == 0: return 1 #Recursively Multiply else: return n * factorial(n - 1) #Initial SUM = 0 #Find 100! and convert to string x = str(factorial(100)) #Length of x leng = len(x) #Iterate Over Digits for i in range(leng): SUM += int(...
Java
UTF-8
3,160
2.34375
2
[]
no_license
package database.DAO; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import androidx.room.Transaction; import androidx.room.Update; import java.util.ArrayList; import model.Exercice; import model.referencesClass.CalculAndUtilisateur; import model.refer...
Markdown
UTF-8
6,577
3.25
3
[]
no_license
# Frontend Submission In this document, I'll be describing some design decisions I made during this process. ## Tools Used I decided to use the following tools to complete this project: - HTML5 + CSS3 - JavaScript (ES5) + jQuery ## The Approach Both HTML5 and CSS3 have broad cross-browser support these days, so t...
Markdown
UTF-8
764
2.84375
3
[]
no_license
# Learn jQuery - it's fun! ## Instructions #### Complete these tasks using jQuery. No adding classes or IDs! (but...there's a bug. Where art thou, jQuery?) 1. Change the page title text's font 2. Make a button that changes the background color 3. Change Snow White's picture when you hover over her 4. Add a ...
Python
UTF-8
4,951
3.734375
4
[]
no_license
import os from math import gcd from random import randint def is_prime(n): """ This function receives a number - n. It returns whether n is prime or not. Time complexity is O(n**0.5) in the worst case. """ if n == 2 or n == 3: return True elif n < 2 or n % 2 == 0 or n % 3 == 0: ...
PHP
UTF-8
593
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Services; use Illuminate\Support\Facades\DB; class AutoBrowserService { /** * 获取所有浏览器 */ public function getBrowsers() { return DB::select ( "select id,chrBrowserName as browserName,chrBrowserENName browserENName from auto_exec_browsers where intFlag=0" ); } /** * 根据浏览器ID 查询指定的某些浏览器...
C#
UTF-8
1,867
3.53125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BankAccount { class Program { static void Main(string[] args) { var account = new Account("David", 5000, 13); Console.WriteLine($"Account {accou...
Java
UTF-8
4,124
1.609375
2
[]
no_license
package com.askgps.personaltrackercore; import com.askgps.personaltrackercore.config.ConfigKt; import com.askgps.personaltrackercore.database.model.EmptyResponse; import java.security.Security; import java.util.concurrent.TimeUnit; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.internal.Intrinsics; impo...
Python
UTF-8
1,092
4
4
[]
no_license
import time import random this_list = random.sample(range(100),60) print "Orginal List...." print this_list """ Divide and conquer recursively """ def merge_sort(unsorted_list): list_length = len(unsorted_list) if list_length == 1: return unsorted_list sublist1 = unsorted_list[0:list_length/2] ...
Java
UTF-8
694
3.078125
3
[ "MIT" ]
permissive
package com.htc.io.serialize; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import com.htc.io.serialize.Employee; public class SerializeDemo { public static void main(String[] args) { Employee emp = new Employee...
Swift
UTF-8
1,036
3.015625
3
[]
no_license
// // DateFromStringConverter.swift // yleSearch // // Created by Oleksandr Shcherbonos on 4/9/18. // Copyright © 2018 Oleksandr Shcherbonos. All rights reserved. // import Foundation extension Date { var timeAgoAsString: String { let day = 3600*24 let week = day*7 let month =...
Java
UTF-8
1,721
2.296875
2
[]
no_license
package com.monitor.core.bean.model; import java.util.List; import com.monitor.core.orm.Page; /** * 前台分页数据结果 * @author ibett * */ public class PageModel { private Long total; private Integer pageSize; private Integer pageNumber; private Long totalPages; private List<?> rows; private List<?> footer; publi...
JavaScript
UTF-8
1,005
2.953125
3
[]
no_license
/* // Esperar que el DOM esté listo con JavaScript Nativo document.addEventListener('DOMContentLoaded', function(){ console.log("ESTOY LISTO"); }); // Esperar que el DOM esté listo con JQuery $(document).ready(function(){ console.log("ESTOY LISTO CON JQUERY"); }); $(document).on('DOMContentLoaded', function(){ co...
Java
UTF-8
2,061
2.203125
2
[ "MIT", "Apache-2.0", "GPL-1.0-or-later", "LGPL-2.0-or-later" ]
permissive
package org.cbioportal.genome_nexus.web; import org.cbioportal.genome_nexus.model.CuriousCases; import org.cbioportal.genome_nexus.service.CuriousCasesService; import org.cbioportal.genome_nexus.service.exception.CuriousCasesNotFoundException; import org.cbioportal.genome_nexus.service.exception.CuriousCasesWebService...
C++
UTF-8
959
2.515625
3
[ "Apache-2.0", "MIT" ]
permissive
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include <bond/core/config.h> #include "output_buffer.h" #include <bond/core/blob.h> #include <stdio.h> #include <stdint.h> namespace bond { class St...
C++
UTF-8
8,883
3.09375
3
[]
no_license
// Jeff DiMarco, March 2014 // Peg jumping game solver // // This program runs all combinations of triangular peg solitaire // for a given number of total rows. The indexing starts from the // top single index of the triangle and goes down. #include <iostream> #include <vector> #include "Peg.hpp" #define TRIANGL...
Markdown
UTF-8
622
2.625
3
[]
no_license
# BSM-Decision-support-methods The problem at hand is a multiple attribute decision-making problem where the set of identified decision attributes are a mixture of quantitative and qualitative attributes. It is assumed that the preference of the decision-maker concerning the identified attributes, fulfills the independ...
C++
UTF-8
677
2.9375
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; float f(float x) { float Y; Y = x*x*x + 5 * x*x + 16 * x - 60; return(Y); } float df(float x) { float y; y = 3 * x*x + 10 * x + 16; return(y); } void main() { int i, n = 50; float p0, p1, Y, y, err = 0.001, relerr = 0.001, delta = 0.001; cout << "input t...
Java
UTF-8
1,848
3.078125
3
[]
no_license
package com.candycrush.main; import java.io.File; import java.io.FileNotFoundException; import java.util.*; public class LevelReader { private static final String path = "res/level"; private final List<boolean[][]> LEVEL_GRID = new ArrayList<>(); public LevelReader() { File folder; File[]...
Python
UTF-8
2,628
2.953125
3
[]
no_license
__author__ = 'Natasha' import os import PySide.QtGui as QtGui class FileBrowseWidget(QtGui.QWidget): ''' Creates a widget that contains a label and a file browser ''' def __init__(self, labelName, fileName, outfile): ''' Creates the elements of the widget. :param labelName: Name...
Markdown
UTF-8
1,730
2.71875
3
[]
no_license
```yaml area: Hertfordshire og: description: Police are appealing for witnesses and information after a number of vehicles were damaged in Hertford. publish: date: 22 May 2019 title: Damage to cars in Hertford url: https://www.herts.police.uk/news-and-appeals/damage-to-cars-in-hertford-0259a ``` * ### Around 30 ve...
Markdown
UTF-8
1,391
2.734375
3
[ "MIT" ]
permissive
--- title: Redirecting from a Context Menu Selection page_title: Redirecting from a Context Menu Selection | RadTreeView for ASP.NET AJAX Documentation description: Redirecting from a Context Menu Selection slug: treeview/application-scenarios/context-menus/redirecting-from-a-context-menu-selection tags: redirecti...
C
UTF-8
4,533
2.921875
3
[]
no_license
/* ps.c A set with pointer values (pointer set) Tool Chain Editor Copyright (C) 2016 olikraus@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
C++
UTF-8
461
2.609375
3
[]
no_license
// // Created by daniel on 12/17/18. // #include <thread> #include "SymbolTable.h" /** * this method set the args of the value * if the flag is on it means that we came from the setCommand and we want to update the plane simiulator * @param key * @param num * @param flag true from set false from others */ void S...
Java
UTF-8
591
3.1875
3
[]
no_license
class Simplify Path{ public String simplifyPath(String path) { LinkedList<String> stack = new LinkedList<String>(); String[] paths = path.split("/"); for(String s:paths){ if(s.equals("..")){ if(!stack.isEmpty()) stack.pop(); } else if(s.equals("."...
Python
UTF-8
3,307
2.84375
3
[]
no_license
""" tf——idf+余弦距离进行计算 KMeans没准要自己实现 """ import model.TF_IDFAdapter as tfidf import data.data_util as du import numpy as np import cluster.cluster_result as cr import cmath def cal_Cosine_distance(vec0, vec1): # 计算余弦相似度,越接近1越相似,参数为两个向量list # dot为叉乘 vec0 = np.array(vec0) vec1 = np.array(vec1) vector0...
Java
UTF-8
3,410
2.046875
2
[]
no_license
package cn.edu.dgut.epidemic.service; import java.io.InputStream; import java.util.List; import java.util.Map; import org.activiti.engine.repository.Deployment; import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.task.Comment; import org.activiti.engine.task.Task; import cn...
Shell
UTF-8
2,782
3.859375
4
[]
no_license
#!/bin/bash echo "hello world" # for tracing, do #!/bin/bash -x # sysinfo_page - A script to produce an HTML file #To create a variable, put a line in your script that contains the name of the variable followed immediately by an equal sign ("="). No spaces are allowed. After the equal sign, assign the information you ...
Java
UTF-8
1,666
2.6875
3
[]
no_license
/* * Zemian Deng 2014 */ package zemian.servlet3example.service; import java.io.Reader; import java.util.HashSet; import java.util.Properties; import java.util.Set; import zemian.service.logging.Logger; /** * User DAO that uses Properties file to store users info. * * @author zedeng */ public class UserServ...
Swift
UTF-8
1,220
3.046875
3
[ "MIT" ]
permissive
import Foundation public typealias PatternIdentifier = Int public enum RouteEdge { case dot case slash case literal(String) } extension RouteEdge: Equatable, Hashable, CustomDebugStringConvertible, CustomStringConvertible { public var description: String { switch self { case .literal(...
C#
UTF-8
2,492
2.84375
3
[ "MIT" ]
permissive
namespace BusinessLib.Models { using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml.Serialization; public class MetaLocationModel { #region fields private readonly ObservableCollection<MetaLocationModel> _Children = null; #endregion field...
C
UTF-8
3,812
3.171875
3
[]
no_license
#pragma once #include "vector.h" #include <stdio.h> #include <stdlib.h> #define TILE_HALF_WIDTH_PX 16 #define TILE_HALF_DEPTH_PX TILE_HALF_WIDTH_PX / 2 #define TILE_HEIGHT_PX 18 #define CELL_HAS_ENTITY_FLAG 0x80 typedef struct Level { Vector3 size; char *tiles; Vector3 start_positions[3]; // TODO...
Java
UTF-8
2,794
2.1875
2
[]
no_license
package com.supermap.egispservice.lbs.service; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Path; import javax.persistence.criteria.Predicate; ...
Java
UTF-8
356
1.929688
2
[ "Apache-2.0" ]
permissive
package com.orange.net.controller; import com.orange.net.interfaces.IMessage; public class AcceptFileTransfer_ResponseMessage implements IMessage{ /** * */ private static final long serialVersionUID = 1L; private String mJobId; public String getJobId() { return mJobId; } public void setJobId(String mJo...
Markdown
UTF-8
15,958
3.078125
3
[]
no_license
# MapReduce :Simplified Data Processing on Large Clusters ## Abstract **What is MapReduce?** MapReduce is a programming model and an associated implementation for processing and generating large data sets. **Map:** process a key/value pair to generate a set of **intermediate** key/value pairs. **Reduce:** merge ...
C++
UTF-8
4,042
3.59375
4
[]
no_license
#include "bst.h" namespace dk{ BSTNode* GetNewNode(int value){ BSTNode* node = new BSTNode; node->data=value; node->left=nullptr; node->right=nullptr; return node; } BSTNode* BSTNodeExists(BSTNode* node, int value){ if(node==nullptr){ return node; } else if(value > node->data){ return BSTNo...
Markdown
UTF-8
4,084
2.53125
3
[ "MIT" ]
permissive
# History <!-- Overview --> <!-- from Google Drive document, 'RCOS History-June 2017' --> <!-- RCOS was founded in 2006 from a generous donation of $2,000,000 from Mr. Sean O’Sullivan ‘85. I think that Dr. P. Hajela (Dean of Undergraduate education at that time) and Dr. F. Luk (Professor of Computer Science) were ins...
C++
UTF-8
1,415
2.734375
3
[]
no_license
#pragma once #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <arpa/inet.h> #include <unistd.h> #include <time.h> #include <string> #include <vector> namespace base { class UnixSocket { public: typedef enum { eSocketType_None = 0, eSocketType_Stream, eSocketType...
Java
UTF-8
372
1.796875
2
[ "Apache-2.0" ]
permissive
package com.example.msonasath.instaclient.models; /** * Created by m.sonasath on 12/1/2015. */ public class InstaPhoto { public String username; public String caption; public String imageUrl; public int imageHeight; public int likesCount; public String userImageUrl; public Str...
Java
UTF-8
1,133
2.546875
3
[]
no_license
/** * ----------------------------------------------------------------------- * Copyright 2010 ShepHertz Technologies Pvt Ltd. All rights reserved. * ----------------------------------------------------------------------- */ package com.spring.revisited.example; import org.springframework.context.Appli...
Java
UTF-8
3,179
1.859375
2
[]
no_license
package com.calculatedfun.bean.wms.de; import java.util.Date; public class IReceiptConfim { private int sid; private String company; private String wareHouse; private String receiptId; private String receiptType; private Date receiptDate; private String remark; private int totalCount; private int status; p...
C++
UTF-8
39,956
2.53125
3
[]
no_license
#include "Evento.h" #include "Mensaje.h" #define PI 3.14159265 Evento::Evento(double X1, double X2, double X3, map<int, vector<double> > mapaDistros, long tiempo){ this->tiempoSimulacion = tiempo; this->idMensajeGlobal = 0; this->arriboCompu1C3 = 0; this->arriboCompu1P1 = 0; this->arriboCompu1P2 = 0; this->...
C#
UTF-8
483
2.984375
3
[]
no_license
using System; namespace ProgramCod { class Program1 { static void Main(string[] args) { Console.WriteLine("\nПриклад 9. Операції з числами 2"); int a = 1_003; Console.WriteLine($"a={a}"); Console.WriteLine($"a / 10={a / 10}");// Not 10...
Java
UTF-8
391
1.804688
2
[ "Apache-2.0" ]
permissive
package org.caps.spring.cloud.alibaba.service.fallback; import org.caps.spring.cloud.alibaba.service.ResetService; import org.springframework.stereotype.Component; import java.util.*; /** * @author Caps * @date 2019/8/15 */ @Component public class ResetServiceFallback implements ResetService { @Override p...
Shell
UTF-8
462
3.03125
3
[]
no_license
#!/bin/sh export HOME_JOBS="${HOME}/workspace/dbp_pilot/jobs" source ${HOME_JOBS}/library/bash/loader.sh export HOME_JOB="${HOME_JOBS}/LP_set/daily" function run_daily { export TARGET_DATABASE="loc" export END_DT=$1 run_python "${HOME_JOB}/runner.py" } function run_monthly { curr_dt=20170501 end_dt=2017052...
Markdown
UTF-8
27,128
2.6875
3
[]
no_license
1、说明:创建数据库 CREATE DATABASE database-name 2、说明:删除数据库 drop database dbname 3、说明:备份sql server --- 创建 备份数据的 device USE master EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat' --- 开始 备份 BACKUP DATABASE pubs TO testBack 4、说明:创建新表 create table tabname(col1 type1 [not null] [primary key],col2 type2 [not...
C#
UTF-8
1,414
2.90625
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading.Tasks; namespace SampleCodeTasks.Test { [TestClass] public class ComputeFibonacciSeriesTaskTests { [TestMethod] public async Task TestNegativeNumbers() { var task = new ComputeFibonacciSeriesTask(); ...
PHP
UTF-8
433
2.5625
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Variant extends Model { protected $table = 'variants'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = ['variant']; /** * Get the product to which the produc...
Python
UTF-8
2,579
2.9375
3
[]
no_license
import tkinter as tk import pandas as pd from bs4 import BeautifulSoup import requests import twstock # 股票main # 基本設定 window = tk.Tk() window.geometry('640x480') window.title('股票盤後查看') input_fm = tk.Frame(window, width=640, height=120) input_fm.pack() lb = tk.Label(input_fm, bg='#36688D', fg='white', text="請輸入股票代號", ...
Go
UTF-8
178
3.265625
3
[]
no_license
package main import "fmt" func zero(z *int) { fmt.Println("zero function", z) *z = 0 } func main() { x := 5 fmt.Println("main", &x) zero(&x) fmt.Println("main", x) }
Swift
UTF-8
646
2.515625
3
[ "MIT" ]
permissive
import Fluent struct CreateParticipant: Migration { func prepare(on database: Database) -> EventLoopFuture<Void> { database.schema(Participant.schema) .id() .field("user_id", .uuid, .references(User.schema, "id", onDelete: .cascade)) .field("food_id", .uuid, .references(...
Python
UTF-8
1,063
3.578125
4
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """ Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run in O(n) complexity. """ __author__ = 'h...
Java
UTF-8
6,305
2.125
2
[]
no_license
package net.earthcomputer.enchcrack; import java.util.List; import java.util.Map; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.SoundHandler; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; im...
Markdown
UTF-8
2,540
2.734375
3
[ "Apache-2.0" ]
permissive
--- date: '2021-09-01' menu: corda-5-dev-preview: parent: corda-5-dev-preview-1-cordacli weight: 200 section_menu: corda-5-dev-preview title: Installing Corda CLI --- Instructions on how to install the Corda CLI tool. ## Automated installation Use the bash installation script to automate the manual steps. ...
C++
UTF-8
1,462
3
3
[]
no_license
#pragma once #include "grid.h" #include "player.h" #include <vector> #include <memory> #include <future> class Enemy{ public: // constructor Enemy(int a, int b): x(a), y(b){} // position int x; int y; // virtual function to move enemy virtual void AI_Move(Grid& grid, Player& player, std::promise<voi...
C++
UTF-8
1,541
2.640625
3
[]
no_license
/************************************************************************* > File Name: testMaxConn.cpp > Author: JieTrancender > Mail: jie-email@jie-trancender.org > Created Time: Fri Sep 8 16:24:06 2017 ************************************************************************/ #include "helper.h" #include <ios...
Markdown
UTF-8
1,240
2.796875
3
[ "MIT" ]
permissive
# Remote Select Box # > This extension provides a simple combo box field that uses values from a remote source, via ajax. ### REQUIREMENTS ### - Symphony CMS version 2.3.3 and up (as of the day of the last release of this extension) ### INSTALLATION ### - `git clone` / download and unpack the tarball file - Put in...
Markdown
UTF-8
2,147
3.859375
4
[]
no_license
# golang中的位运算 2021年10月26日 > 在阅读golang标准库的时候,发现代码中使用了很多位运算技巧,然而平时开发过程中使用很少,此文章前半部分做基础讲解,后半部分记录位运算各种操作,持续更新。 ## 概述 计算机中的数在内存中都是以二进制形式进行存储,用位运算就是直接对整数在内存中的二进制位进行操作,因此执行效率非常高,用位运算会大大提高程序的性能。 ## 操作符 | 运算符 | 含义 | 备注 | | ------ | -------------------- | ---------...
Go
UTF-8
1,456
2.546875
3
[]
no_license
package actions import ( "net/http" "github.com/manugupt1/certmanager/models" ) func toByte(str string) []byte { return []byte(str) } func (as *ActionSuite) Test_CreateCustomer() { expectValidationErrors := []models.Customer{ models.Customer{Name: "M", Email: "manu@example.com", Password: toByte("")}, model...
PHP
UTF-8
2,380
2.640625
3
[]
no_license
<?php use Core\UserCenter\Exception\Unauthorized; use Core\UserCenter\Security; use Phalcon\Validation; use Phalcon\Validation\Validator\Numericality; use Phalcon\Validation\Validator\PresenceOf; class LaminationPriceHistory extends Model { /** * @var string */ protected $tableName = 'lamination_price_history'...
Java
UTF-8
1,368
2.53125
3
[]
no_license
package com.khsrd.springboot.controller; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.P...
C
UTF-8
2,322
3.015625
3
[]
no_license
#include <sys/inotify.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> #include <malloc.h> typedef struct _name_watch_t { char * file; int descriptor; struct _name_watch_t * next; } name_watch_t; name_watch_t * name_watch_alloc(char * file, int descriptor, name_watch_...
Shell
UTF-8
1,301
3.453125
3
[ "Apache-2.0" ]
permissive
#!/bin/sh set -eu cd "$(dirname "$0")" . ../igr_functions.sh rm -f "$IGR_OUTPUT"/env-record RUSER=$(id -nu) RUID=$(id -u) RGID=$(id -g) # unset variables to make sure the values seen in the test service were initialised by dinit: for var in USER LOGNAME SHELL; do unset $var done # Ignore errors from unsetting U...
Java
UTF-8
4,279
2.46875
2
[]
no_license
package db; import java.math.BigDecimal; import java.sql.*; import org.json.JSONObject; public class UpdateData { public static int UpdateFoodList(JSONObject json) { /*向菜品表插入数据*/ Connection conn = JDBCUtil.getConn(); PreparedStatement ps = null; int ans = 0; //向字段赋值 String id = json.getString("id"), nam...
C#
UTF-8
3,429
2.75
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using FormulaEvaluator; namespace FormulaEvaluatorTest1 { [TestClass] public class EvaluatorClassTest { [TestMethod()] public void Test1() { Assert.AreEqual(9, Evaluator.Evaluate("8+1", s => 0)); ...
Ruby
UTF-8
1,136
2.953125
3
[]
no_license
describe AccountHolder do test_details = { 'id' => 'testguid', 'firstname' => 'first', 'lastname' => 'last', 'email' => 'test@test.com', 'telephone' => '0123456789', 'balance' => '100.00' } subject { described_class.new(test_details) } # describe '#account_details' do # it 'should b...
Python
UTF-8
302
3
3
[ "MIT" ]
permissive
import sys,os import os.path as path def dedup(itr): l = [] for item in itr: if item not in l: l.append(item) return l PATH = os.environ['PATH'] paths = PATH.split(':') paths = filter(path.exists,paths) paths = dedup(paths) new_PATH = ':'.join(paths) print (new_PATH)
PHP
UTF-8
1,379
3.234375
3
[]
no_license
<?php namespace Gof\Sistema\Formulario\Validar; use Gof\Sistema\Formulario\Interfaz\Campo; use Gof\Sistema\Formulario\Interfaz\Errores; use Gof\Sistema\Formulario\Mediador\Campo\Error; /** * Valida si un campo existe dentro de los datos recibidos del formulario * * Verifica que el nombre del campo exista dentro d...
Java
UTF-8
2,760
1.976563
2
[]
no_license
package com.empresa.monitoraLog.recebeLog.repository; import java.sql.Date; import java.util.List; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param...
TypeScript
UTF-8
338
2.796875
3
[ "MIT" ]
permissive
import { hashSync, genSaltSync, compareSync } from 'bcryptjs'; export function obfuscatePassword(rawPass: string, rounds: number = 12): string { const salt = genSaltSync(rounds); return hashSync(rawPass, salt); } export function validatePassword(rawPass: string, hashPass: string): boolean { return compareSync(rawP...
C++
UTF-8
1,408
3.921875
4
[]
no_license
#include <iostream> #include <vector> #include <string> #include <list> using namespace std; int main(){ // Los vectores son utilizados para manejar datos que no se conoce su dimension. // vector de 5 enteros vector <int> vector5int(5); cout<< "Implementation of a vector of INTS"<< endl; for(int ...
PHP
UTF-8
221
2.765625
3
[]
no_license
<?php $salery = (int) readline("Add meg a fizetsed Ft-ban: "); if ($salery < 200000){ echo "Fizetesed alacsony"; } elseif ($salery <= 400000) { echo "Fizetesed atlagos"; } else{ echo "Fizetesed magas!Gratulalok"; }
Java
UTF-8
109,551
2.578125
3
[ "Artistic-2.0" ]
permissive
/* Minpack_f77.java copyright claim: This software is based on the public domain MINPACK routines. It was translated from FORTRAN to Java by a US government employee on official time. Thus this software is also in the public domain. The translator's mail address is: Steve Verrill USDA...
Java
UTF-8
863
3.390625
3
[]
no_license
import java.util.List; import java.util.ArrayList; import java.util.Collections; class Puzzle5{ public static void main(String[] args){ String[] input = Reader.read("input5"); List<Integer> list = new ArrayList<Integer>(); for(String seat : input){ seat = seat.replace("B", "1").replace("F", "0").replac...
PHP
UTF-8
3,091
2.921875
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Exceptions\Area\AllAreaException; use App\Exceptions\Area\CreateAreaException; use App\Exceptions\Area\UpdateAreaException; use App\Exceptions\Area\DeleteAreaException; use App\Models\Area; abstract class AreaRepository implements RepositoryInterface { private $model; ...
Java
ISO-8859-1
8,963
2.640625
3
[]
no_license
package database.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import database.ChinookDatabase; import model.Genre; import mode...
Java
UTF-8
2,463
2.328125
2
[]
no_license
package com.company.photocatch.DTO; import com.company.photocatch.domain.User; import java.util.List; public class TaskDTO { private Long id; private String taskname; private String product; private String description; private String address; private String taskstatus; private User user...