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
2,036
2.296875
2
[]
no_license
package com.team.air.bean; public class User { private Integer user_id; private String username; private String psw; private String nickname; private String name; private String numbers; private String ID; private String address; private Integer sex; @Override public Strin...
C#
UTF-8
2,435
3.875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Homework03 { //所有子类共同的父类 abstract class Shape { public double GetNum1(string arg) { double Num1 = double.Parse(arg); return Nu...
PHP
UTF-8
1,509
2.703125
3
[]
permissive
<?php use yii\db\Migration; /** * Handles the creation of table `login_attempts`. */ class m180810_121801_create_login_attempts_table extends Migration { /** * {@inheritdoc} */ public function safeUp() { $this->createTable('login_attempts', [ 'id' => $this->primaryKey(), ...
Python
UTF-8
1,019
2.53125
3
[]
no_license
from functions import date_n,id,css,class_name,xpath,js,return_driver,open_base_site,click_bank import time from selenium.webdriver.common.keys import Keys ''' 函数名:search_tickets 参数:出发站 from_station,到达站 to_station,订票日期 n ''' def search_tickets(from_station,to_station,n): open_base_site('https://trains.ctrip.com/Tr...
Python
UTF-8
369
3.171875
3
[]
no_license
from z3 import * if __name__ == "__main__": x, y = Ints('x y') print(eq(x + y, x + y)) # True print(eq(x + y, y + x)) # False n = x + y print(eq(n, x + y)) # True # x2 is eq to x x2 = Int('x') print(eq(x, x2)) # True # the integer variable x is not equal to # the real variab...
Java
UTF-8
583
1.75
2
[]
no_license
package org.hsc.process; import javax.swing.JOptionPane; import org.compiere.process.SvrProcess; import org.hsc.model.MHSCEvalPaper; import org.hsc.model.X_HSC_Eval_Paper; public class CreateItemLine extends SvrProcess{ @Override protected void prepare() { // TODO Auto-generated method stub ...
Java
UTF-8
1,388
2.203125
2
[]
no_license
package com.shopping.auditservice.controller; import com.shopping.auditservice.controller.dto.RecoveryPasswordResponseDTO; import com.shopping.auditservice.utils.ResponseMessage; import com.shopping.auditservice.service.AuditService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseE...
Java
UTF-8
466
2.59375
3
[]
no_license
package com.example.dangerzone; public class Tweet{ private String author; private String tweet; public Tweet(String author, String tweet){ this.author = author; this.tweet = tweet; } public void setTweet(String tweet) { this.tweet = tweet; } public String getTweet() { return...
C++
UTF-8
1,225
2.671875
3
[]
no_license
#include <stdio.h> #include <iostream> #include <pthread.h> #include <unistd.h> #include <time.h> #include <errno.h> #include <string> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include <fstream> #include <sys/mman.h> #include <sys/stat.h> #define MAX_BUF 1024 using namespace std; //program #1 st...
Java
UTF-8
989
3.703125
4
[]
no_license
package com.kramar42.LinkedList; import java.util.HashSet; import java.util.Set; /** * Created by kramar on 2/19/17. * * Write code to remove duplicates from an unsorted linked list. * How would you solve this problem if a temporary buffer is not allowed? */ public class Duplicates { public static LinkedLis...
Java
UTF-8
3,913
3.109375
3
[ "Apache-2.0" ]
permissive
package slist.process; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import intro07.BaseDB; import slist.BaseMenu; import slist.ui.Menu; public class AddMgr extends BaseMenu{ /** * 社員追加のためのメニュ表示 */ public void showMenu(){ System.out.println("社員を新規追加...
Markdown
UTF-8
8,863
4.03125
4
[]
no_license
# 2021-04-15_Objects-in-Javascript-cc578a781e1d # Objects in Javascript Codepen with examples for you to practice with below! --- ### Objects in Javascript ### Codepen with examples for you to practice with below! ![https://cdn-images-1.medium.com/max/800/1*F_xu5P1BJ300C3OixplWNA.png](https://cdn-images-1.medium....
Java
UTF-8
449
3.109375
3
[]
no_license
import java.util.Scanner; class AlexClass { public static void main(String arg[]) { Scanner in = new Scanner(System.in); int n=in.nextInt(); int k=in.nextInt(); String awake=in.next(); int id[]=new int[k]; n=0; for(int i=0;i<k;i++) { id[i]=in.nextInt(); if(awake.charAt(id[i]-1)=='...
Markdown
UTF-8
784
2.609375
3
[ "MIT" ]
permissive
# API_Restaurant API that manage the business of a restaurant for order online. ## Local set up ### Install dependencies - Clone the repo ``` $ git clone https://github.com/lex-villa/API_Restaurant.git ``` - Then you have to run **npm install** in the root of the directory ``` $ npm install ``` ### Set up data - You ...
Java
UTF-8
755
2.125
2
[]
no_license
package remote; import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.actor.Props; import com.typesafe.config.ConfigFactory; /** * HelloApplication * * @author liuruichao * Created on 2016-04-25 15:15 */ public class HelloApplication { public static void main(String[] args) { ActorS...
C#
UTF-8
882
3.421875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; namespace WpfApp1 { class Student { // 1.Định nghĩa trường Name private string Name; // 2.Định nghĩa thuộc tính StudentName từ trường Name public string StudentName { get { ...
C#
UTF-8
2,615
2.828125
3
[]
no_license
using UnityEngine; using System.Collections; // Control the playing of the animation when the player is doing movements public enum AnimationState{ Idle, // when not move Run, TurnLeft, TurnRight, Slide, Jump, Death } public class PlayerAnimation : MonoBehaviour { private Animation animation; public Anim...
C
UTF-8
439
3.578125
4
[]
no_license
#include<stdio.h> struct student{ int id; float cgpa; char name[20]; }; int main(){ struct student s; printf("Enter your id: \n"); scanf("%d",&s.id); printf("Enter your cgpa: \n"); scanf("%f",&s.cgpa); printf("Enter your name: \n"); scanf("%s",s.name); printf("Your ...
C
UTF-8
9,662
3.453125
3
[]
no_license
#include <stdio.h> #include <mpi.h> //To use MPI #include <complex.h> //to use complex numbers #include <math.h> //for cos() and sin() #include<stdlib.h> //to use rand() #define PI 3.14159265 #define howmanytimesavg 3 //How many times to do avg int powerOfTwo(int n) { int i = 0, m = 1; while (m < n) { ...
C#
UTF-8
1,022
2.546875
3
[]
no_license
using Bolay.Elastic.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Bolay.Elastic.Api.Health.Models { public sealed class ComparisonOperator : TypeSafeEnumBase<ComparisonOperator> { public string Alternate { get; set...
C++
UTF-8
4,641
3.265625
3
[]
no_license
//Implementation of SD algoirthm for vertex covering in finding the optimal clique set #include<iostream> #include<vector> using namespace std; vector<vector<int> > complement_graph(vector<vector<int> > G); vector<int> complement_array(vector<int> arr,int n); vector<int> alom_algorithm(vector<vector<int> > Graph, in...
Python
UTF-8
274
2.90625
3
[]
no_license
msg = "你好" print(msg,type(msg)) # print(msg.decode()) print(msg.encode(),type(msg.encode())) print(msg.encode("utf-8")) print(msg.encode(encoding="utf-8").decode("gbk")) print(msg.encode(encoding="gbk").decode("gbk")) print(msg.encode(encoding="utf-8").decode("utf-8"))
Java
UTF-8
612
2.25
2
[]
no_license
package com.alfa.bidit.model; import lombok.Data; import javax.persistence.*; import java.io.Serializable; import java.util.Date; // TODO make this @Entity and move the private key "id" field here. public abstract class BaseModel implements Serializable{ @Column(name = "created_at") @Temporal(TemporalType....
Java
UTF-8
1,452
1.578125
2
[ "BSD-3-Clause" ]
permissive
package com.kaznowski.hugh.battlescribe.fasterxml; import com.kaznowski.hugh.battlescribe.IdTracker; import lombok.Data; import java.util.List; @Data public class Catalogue { private String id; private String name; private String revision; private String battleScribeVersion; private String authorName; pr...
Java
UTF-8
299
1.789063
2
[]
no_license
package com.book.repository; import org.springframework.stereotype.Repository; import org.springframework.data.repository.CrudRepository; import com.book.entity.Book; @Repository public interface BookInventoryRepository extends CrudRepository<Book,Integer>{ Book findById(int bookId); }
C++
UTF-8
1,402
3.203125
3
[]
no_license
//https://leetcode.com/problems/course-schedule/ #include<iostream> #include<bits/stdc++.h> using namespace std; class Graph{ int v; map< int,list <int> > adjl; public: Graph(int v){ this->v=v; } void insert(int u,int v){ adjl[u].push_back(v); } ...
C#
UTF-8
421
3
3
[]
no_license
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Section7_Class { [TestClass] public class StringClassTest { [TestMethod] public void Using_String_Class() { string str = "Last night I dreamt of San"; Console.WriteLine(str); ...
Java
UTF-8
2,377
2.578125
3
[]
no_license
//Первый экран из пяти шагов вопроса класс, отвечает на вопрос "What is your purpose?" package com.example.homegym; import androidx.appcompat.app.AppCompatActivity; import androidx.constraintlayout.solver.widgets.Helper; import android.content.Intent; import android.os.Bundle; import android.view.View; import android...
Python
UTF-8
2,210
2.75
3
[]
no_license
from unittest import TestCase from unittest.mock import patch, ANY from pedalparts.files import save, load class TestSave(TestCase): def setUp(self): self.open_mock = patch('pedalparts.files.open').start() self.json_mock = patch('pedalparts.files.json').start() self.addCleanup(patch.stop...
Java
UTF-8
1,576
2.25
2
[]
no_license
package com.aparcsystems.client; import com.aparcsystems.BuildConfig; import com.aparcsystems.model.Feed; import com.aparcsystems.model.HttpPenalty; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.inject.Singleton; import org.apache.http.protocol.HTTP; import java.lang.reflect.Type...
Python
UTF-8
161
3.109375
3
[]
no_license
try: inf=open("a4.txt") for i in inf: output=i.title() print(output) inf.close() except IOError as io: print(io)
Go
UTF-8
14,761
2.5625
3
[]
no_license
package ddb_test import ( "context" "errors" "fmt" gosoAws "github.com/applike/gosoline/pkg/cloud/aws" cloudMocks "github.com/applike/gosoline/pkg/cloud/mocks" "github.com/applike/gosoline/pkg/ddb" "github.com/applike/gosoline/pkg/exec" logMocks "github.com/applike/gosoline/pkg/log/mocks" "github.com/applike/...
Shell
UTF-8
9,009
3.984375
4
[]
no_license
#!/bin/bash # File: p1post # Package: p1post # Install Location: /usr/local/p1post/ # Name: Peer1 Automated Post Installation Package # # Supported Platforms: # Redhat Enterprise Linux Based Distributions (Fedora, CentOS, RHEL) # Debian (all) # Ubuntu (all) # # Description: # P1Post is the final step in the OS provis...
C#
UTF-8
2,250
3.046875
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using BlazorBricks.Core.Shapes; namespace BlazorBricks.Core { public class Brick : IBrick { private double x = 0; private double y = 0; private double left = 0; private double top = 0; private double left...
C#
UTF-8
479
2.515625
3
[]
no_license
using CashRegister.Core.Banks; using NUnit.Framework; namespace CashRegister.UnitTests.Banks { public class USBankFactoryTest { private USBankFactory usBankFactory; [SetUp] public void Setup() { usBankFactory = new USBankFactory(); } [Test] ...
JavaScript
UTF-8
799
3.09375
3
[]
no_license
import SuperSet from "superset"; function checkWin(board) { const winningPositions = [ [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6] ].map(arr => new SuperSet(arr)); const positions = board.reduce( (accumulator, mark, index) => { if (!mark) { ...
C
UTF-8
5,197
3.109375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<fcntl.h> #include<unistd.h> #include<string.h> #include<sys/wait.h> #include<errno.h> #include<pwd.h> #include<signal.h> #include<sys/stat.h> int killjob(char **argument) { int num; int numjob=0; int sig; int array[10]; // num = toNum(argument[1]); // ...
PHP
UTF-8
2,722
2.5625
3
[]
no_license
<?php namespace Persons\Models; use App\Events\PersonNameRestored; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Str; use Persons\Events\PersonNameCreated; use Persons\Events\PersonNameCreating; use Persons\Events\PersonNameDeleted; use Persons\Events\Per...
Java
UTF-8
2,601
1.953125
2
[ "BSD-3-Clause", "CDDL-1.0", "Apache-2.0" ]
permissive
/* * Copyright 2010-2016 OrientDB LTD (http://orientdb.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
Markdown
UTF-8
4,909
2.671875
3
[]
no_license
常用http方法: 1. get:用于请求访问已经被URI(统一资源标识符)识别的资源,可通过URL传参给服务器。 2. post:用于传输信息给服务器,主要功能与get方法类似,但一般推荐使用post方法。 3. put:传输文件,报文主体中包含文件内容,保存到对应URI位置。 4. head:获得豹纹首部,与get方法类似,只是不返回报文主体,一般用于验证URL是否有效。 5. delete:删除文件,与put方法相反,删除对应URL位置的文件。 6. options:查询相应URI支持 get与post的区别 1. get重点在从服务器上获取资源,post重点在向服务器发送资源 2. get传输数据是通过URL请求...
C#
UTF-8
2,354
3.234375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; namespace Lambda { class Program { static void Main(string[] args) { //var matt = new Person() //{ // Name = "Matt", // Username = "marainer", // Age = 26 ...
C++
UTF-8
1,768
3.71875
4
[]
no_license
/* Programmer: Jessica Sullivan Programmer's ID: 1282151 Class: COMSC-210-5067 */ // Queue.h // CS210_Assignment5_Queue // // Created by Jessie Sully on 3/7/20. // Copyright © 2020 Jessie Sully. All rights reserved. // #ifndef Queue_h #define Queue_h #include "Node.h" template <typename T> class Queue { publ...
Markdown
UTF-8
4,711
2.625
3
[]
no_license
# Left-Associative `Semigroup` Operator Alias Mailing list discussion in progress on [on {libraries,ghc-devs}\@haskell.org](http://thread.gmane.org/gmane.comp.lang.haskell.ghc.devel/12030) related reddit discussion on [/r/haskell](https://www.reddit.com/r/haskell/comments/4mtf5t/proposal_leftassociative_semigroup_o...
Java
UTF-8
2,425
3.484375
3
[]
no_license
import java.util.Scanner; public class Maze_Problem { public static boolean findPath(int maze[][],int n) { int path[][]=new int[n][n]; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { path[i][j]=0; } } return findPathHelper(maze,path, 0, 0, n); } public static boolean ...
Python
UTF-8
337
2.578125
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env python3 class Job: def __init__(self): self.name = '' # A modul ebben az esetben a tényleges modul selfje # ami ide hozzá lesz adva annak van mindíg terminate() metódusa self.module = None def terminate(self): if self.module != None: self.modul...
Java
UTF-8
2,277
2.21875
2
[]
no_license
package com.dupont.budget.service.jms.mdb; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Resource; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.Message; import javax.jms.MessageListener; import javax.mail.Address; import javax.m...
Markdown
UTF-8
2,966
2.609375
3
[ "MIT" ]
permissive
# jOCDS - The Java based Open Contracting Data Standard (OCDS) Validator ## Introduction Open Contracting Data Standard (OCDS) is an emerging JSON based standard to track contracting and tendering processes in a standardized format. As the number of parties and institutions that are publishing tendering and contracti...
Python
UTF-8
687
2.578125
3
[]
no_license
import cv2 import numpy as np img = np.zeros((512, 512, 3), np.uint8) img = cv2.line(img, (0, 0), (511, 511), (255, 0, 0), 5) img = cv2.rectangle(img, (256, 256), (509, 509), (0, 0, 255), 3) img = cv2.ellipse(img, (256, 256), (100, 50), 0, 0, 180, 255, -1) img = cv2.circle(img, (256, 256), 40, (0, 255, 0), 5) pts...
Markdown
UTF-8
869
4.1875
4
[]
no_license
# Variables ## Définition En F#, les variables sont définis via le mot clé `let`. La syntaxe est la suivante : `let` suivi du nom de la variable suivi de l'opérateur `=` suivi de la valeur à affecter : ```F# let <nom_de_la_variable> = <valeur_a_affecter> ``` Par exemple, pour définir la variable `name` qui va stocke...
Java
UTF-8
2,663
2.296875
2
[]
no_license
package pl.piomin.services.controller; import java.net.MalformedURLException; import java.net.URL; import javax.inject.Inject; import io.micronaut.http.HttpRequest; import io.micronaut.http.client.HttpClient; import io.micronaut.http.client.exceptions.HttpClientResponseException; import io.micronaut.runtime.server.E...
C++
UTF-8
5,645
2.765625
3
[]
no_license
#ifndef COMPILERS_BML_LIB_ERRMSG_H_ #define COMPILERS_BML_LIB_ERRMSG_H_ #include <string> #include <iostream> #include <vector> #include <memory> #include <util/util.h> namespace util::message { struct base { virtual void print(std::ostream &) const = 0; virtual void link_file(std::string_view file, std::string_vi...
Java
UTF-8
6,155
2.75
3
[]
no_license
package com.test.dao; import com.test.entity.Question; import com.test.util.JavaUtil; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /* drop table if exists Questions; create table Questions ( num int primary ...
Java
UTF-8
749
2.65625
3
[]
no_license
package testng.exercises._02_.tests; import org.testng.annotations.Test; public class FileTests { public void executeTests() { // test1("c:/temp/file1.txt", "hello world"); // sanity // test1("c:/temp/file2.txt", "hello world"); // sanity // test2(); // regression // test3(); // Sanity + regression ...
Python
UTF-8
746
3.375
3
[ "MIT" ]
permissive
from exam_02apr.project.player.player import Player class PlayerRepository: def __init__(self): self.count: int = 0 self.players: list = [] def add(self, player: Player): if player.username in [p.username for p in self.players]: raise ValueError(f'Player {player.username} ...
JavaScript
UTF-8
1,478
3.078125
3
[]
no_license
/* Represents a firing pattern that only fires 1 bullet downward * */ function ClusterShotPattern(enemy) { FiringPattern.call(this, enemy); } obj.extend(ClusterShotPattern, FiringPattern); ClusterShotPattern.prototype.fire = function() { var bullet1 = new OrbBullet(this.enemy.game, this.enemy.x, this.enemy.y, Ma...
C#
UTF-8
7,205
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System....
Markdown
UTF-8
1,669
3.21875
3
[ "MIT" ]
permissive
# Drag 拖拽 ### 介绍 实现可拖拽的任意元素 ### 安装 ``` javascript import { createApp } from 'vue'; import { Drag } from '@minerui/minerui'; const app = createApp(); app.use(Drag); ``` ## 基本用法 ```html <miner-drag> <div class="touch-dom">可点击,可拖拽</div> </miner-drag> ``` ## 限制拖拽方向 ```html <miner-drag direction="x"> <div class="to...
Java
UTF-8
590
1.640625
2
[]
no_license
package com.hxs.ssm.form.core; import com.hxs.ssm.form.TablePaginationForm; import lombok.Data; /** * @项目名称: hxs-mp * @类名称: StatusTypeQueryForm * @类描述: 状态类型查询数据实体 * @创建人: huxinsheng * @创建时间: 2017-04-07 10:54 * @联系方式: hxsysh@gmail.com * @修改备注: */ @Data public class StatusTypeQueryForm extends TablePaginationFo...
PHP
UTF-8
486
3
3
[]
no_license
<? class Entry { var $id = 0; function Entry($vars = null) { if($vars) { $this->setEntry($vars); } } /////////////////////////////////////////////////////// // Section : get/set (entry) // function getEntry() { return get_object_vars($this); } function setEntry($vars) { foreach($vars as $key...
Shell
UTF-8
693
3.25
3
[]
no_license
#!/bin/sh eval `flash get STATICROUTE_ENABLED` eval `flash get STATICROUTE_TBL_NUM` if [ $STATICROUTE_TBL_NUM -gt 0 ] && [ $STATICROUTE_ENABLED -gt 0 ]; then num=1 while [ $num -le $STATICROUTE_TBL_NUM ]; do STATICROUTE_TBL=`flash get STATICROUTE_TBL | grep STATICROUTE_TBL$num=` tmp=`echo $STATICROUTE_TB...
Markdown
UTF-8
9,454
2.96875
3
[ "LicenseRef-scancode-public-domain" ]
permissive
# Freechains: Command-Line Interface - `freechains-host` ``` freechains-host v0.8.0 Usage: freechains-host start <dir> freechains-host stop Options: --help displays this help --version displays software version --port=<port> sets port to connect [default: 8330] More Information...
Java
UTF-8
625
3.125
3
[]
no_license
public interface QuadTreeInterface { /** * Adds a 2D-object with Cartesian coordinates to the tree. * * @param elem the 2D-object to add to the tree. */ public void add(Object2D elem); /** * Given an axis-aligned bounding box region, it returns all the 2D-objects * in the quadtree that are wit...
Markdown
UTF-8
8,944
2.75
3
[]
no_license
Title: One last TV post, about Battlestar Galactica Date: 2010-06-08 12:06 Author: brianblais Slug: one-last-tv-post-about-battlestar-galactica No TV posts for a while after this one...just trying to clear my desk. There are a number of things that bother me about BSG. This list is here for anyone who wants to chal...
Markdown
UTF-8
15,847
3.40625
3
[]
no_license
# Grammar & Punctuation ## American English DataCamp is headquartered in the U.S. and the U.S. contains our largest concentration of users. All DataCamp copy should be written using American English. A summary of spelling differences between American and British English can be found [here](https://en.oxforddictionarie...
Java
UTF-8
280
2.3125
2
[]
no_license
package frc.robot; import org.junit.Test; public class TestColor { @Test public void testCMYKProfile() { float[] retVal = TCS34725.rgbToProfiledCmyk(255, 0, 0); for (int i = 0; i < retVal.length; i++) { System.out.print(retVal + ", "); } System.out.println(); } }
C++
WINDOWS-1250
382
2.734375
3
[]
no_license
#pragma once #include "Controller.h" /** Nadrzdna klasa uruchomieniowo / menaderska */ class Runner { private: /** Prywatny wskanik do obiektu klasy Controller */ Controller* controller; public: /** Bezargumentowy konstruktor klasy Runner */ Runner(void); /** Destruktor klasy Runner */ ~Runner(void); /** M...
C#
UTF-8
3,941
2.671875
3
[ "MIT" ]
permissive
// ------------------------------------------------------------------------------ // // Copyright (c) 2006 Swampware, Inc. // // 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 withou...
C#
UTF-8
2,177
3.21875
3
[]
no_license
// <copyright file="Address.cs" company="PlaceholderCompany"> // Copyright (c) PlaceholderCompany. All rights reserved. // </copyright> namespace MarcoAddresses.Models { using System; using System.Collections.Generic; using System.Linq; using System.Web; /// <summary> /// Address Type ///...
JavaScript
UTF-8
470
3.21875
3
[]
no_license
// this could also be myApp.helpers.createCounter ... but I'm using it without namespaces for the sake of brevity! function createCounter(initialValue) { var _value = initialValue || 0; return { increment: function () { _value++; return _value; } }; }; var my...
C#
UTF-8
5,777
2.65625
3
[ "MIT" ]
permissive
/* MIT License Copyright (c) 2020 Mateo Mađerić 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,...
Python
UTF-8
945
3.171875
3
[]
no_license
import pandas as pd import numpy as np #function to take in feature set and output 3d matrix of elements grouped by instance num def file_2_recurr_X(features_path): df = pd.read_csv(features_path) instance_nums = df['instance num'] max_instance = int(instance_nums.iloc[-1]) epochs_per_instance = len(df...
Java
UTF-8
1,350
2.171875
2
[]
no_license
package lu.lcsb.garuda.internal.handlers; import jp.sbi.garuda.client.backend.GarudaClientBackend; import jp.sbi.garuda.client.backend.listeners.GarudaBackendPropertyChangeEvent; import lu.lcsb.garuda.GarudaEventHandler; import org.cytoscape.work.swing.DialogTaskManager; import org.slf4j.Logger; import org.slf4j.Logg...
Markdown
UTF-8
1,299
2.859375
3
[]
no_license
Just like when making classic lasagna, the method for our recipe is pretty simple. Here’s an overview of how to make our vegetable lasagna (the full recipe is below): Cook your lasagna noodles OR skip this step and use no-boil noodles. Even though we use regular lasagna noodles in our video, I actually prefer the te...
Python
UTF-8
969
2.71875
3
[]
no_license
""" This is a building ground for new ideas and optimization NOT FOR RUNNING REAL SIMULATION """ ''' from models import * # libraries: kNN,cNN,spiNN for i in xrange(1,5): params = { 'sw_depth':2, 'pw_depth':i, 'silent':True, } m = spiNN.BuildModel(para...
Python
UTF-8
263
3.0625
3
[ "MIT" ]
permissive
n = int(input()) m = [] for x in range(0, n): m.append(int(input())) q = int(input()) for x in range(0, q): nums = [int(k) for k in input().split()] a = nums[0] b = nums[1] sum = 0 for i in range(a, b+1): sum+= m[i] print(sum)
Python
UTF-8
344
3.6875
4
[ "MIT" ]
permissive
from datetime import date maiores = 0 menores = 0 a = date.today().year for c in range(1, 8): ano = int(input('Digite o ano de nascimento da {}ª pessoa: '.format(c))) if (a - ano) >= 18: maiores += 1 elif (a - ano) < 18: menores += 1 print('{} pessoas são maiores de idade e {} é menor'.forma...
Swift
UTF-8
2,801
2.984375
3
[]
no_license
// // WOPasswordField.swift // SwiftObjects // // Created by Helge Hess on 02.06.18. // /** * Create HTML form password fields. Remember that such are only secure over * secured connections (e.g. SSL). * * Sample: * ``` * Firstname: WOPasswordField { * name = "password"; * value = password; * } * ```...
Python
UTF-8
1,566
2.53125
3
[]
no_license
from flask import Flask, render_template, request,session,flash,abort import sqlite3 as sql import cv2 import pytesseract # import Os module to start the audio file import os from gtts import gTTS app = Flask(__name__) # app.config['SECRET_KEY'] = 'oh_so_secret' # pytesseract.pytesseract.tesseract_cmd = 'C:\\Progr...
PHP
UTF-8
1,304
2.546875
3
[ "MIT" ]
permissive
<?php /** * This file is part of event-engine/php-engine. * (c) 2018-2021 prooph software GmbH <contact@prooph.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace EventEngine\Exception; use Even...
C
UTF-8
297
2.734375
3
[]
no_license
#include <stdio.h> #include <direct.h> int main( void ) { int drive = 4; if( _chdrive( drive ) == 0 ) // error : -1 { drive = _getdrive(); printf( "변경된 드라이브 : %c \n", 'A' + drive - 1 ); } else { perror( "드라이브 변경 실패" ); } getch(); }
Java
UTF-8
1,593
3.234375
3
[]
no_license
package de.jkdh.text2me_server.main.connection; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; public class ConnectionServer extends Thread { private ArrayList<ConnectionThread> Connect...
Markdown
UTF-8
1,540
3.921875
4
[]
no_license
## 算法1 **(递归)*O(n)*** 递归建立整棵二叉树。 每次以中点为根,以左半部分为左子树,右半部分为右子树。先分别递归建立左子树和右子树,然后令根节点的指针分别指向两棵子树 证明: 我们证明一个更强的结论,该算法得到的BST满足:任意节点的左右子树的所有高度的差不大于1(注意不是最大高度)。 在每一次递归过程中,左半部分的长度最多比右半部分的长度少1,那会不会有这种情况:左半部分的高度分别有 *m−1,m*右半部分的高度有 *m,m+1*,则当前节点的高度就是 *m,m+1,m+2*,(要加上当前根节点这一层,所以都要加1),则此时树的高度差为2,不平衡。<br> 实际上这种情况是不可能的:**反证**,对于左子树...
Markdown
UTF-8
4,836
2.9375
3
[]
no_license
--- title: "(Part 1) Add .NET Identity login and registration to a .NET 6 Web API" date: 2022-08-17T08:46:10+01:00 draft: false summary: "Manage the login and registration of your users on a .NET Web API using .NET Identity" --- ### GitHub Repository All the code in this series can be found at https://github.com/domb...
C#
UTF-8
708
2.90625
3
[]
no_license
using System; namespace MethodDeneme { class Program { static void Main(string[] args) { Urun urun1 = new Urun(); urun1.UrununAdi = "Elma"; urun1.UrununFiyati = 10; urun1.UrununAciklamasi = "Konya Elması"; Urun urun2 = new Urun(); ...
Java
UTF-8
1,216
2.40625
2
[]
no_license
package com.tencent.phonemgr.filetype; import java.io.File; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import com.tencent.phonemgr.R; public class GeneralFile implements FileItem { private boolean isDir; privat...
Java
UTF-8
1,049
3.703125
4
[]
no_license
package com.class35; import java.util.HashMap; public class MapIntro { public static void main(String[] args) { HashMap<Integer,String> map=new HashMap<>(); //to store key+value pair into map. map.put(101, "John"); map.put(102, "Jack"); map.put(103, "Jane"); map.put(104, "Jenny"); System.out.println(map); //h...
Java
UTF-8
10,564
1.84375
2
[]
no_license
package com.ptyt.uct.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.android.uct.utils.PrintLog; import com.ptyt.uct.R; import com.ptyt.uct.commo...
Java
UTF-8
508
2.75
3
[]
no_license
package com.company.day8w2; public class SampleInheritance { String dept = "Accounting"; String company = "Abc.com"; void does() { System.out.println("Teaching"); } public String getDept() { return dept; } public void setDept(String dept) { this.dept = dept; } public String getCompany() { re...
Python
UTF-8
1,493
2.859375
3
[]
no_license
"""Autocad testing """ from pyautocad import Autocad, APoint from tkinter import * def compare(cad): """main program function""" open_docs = cad.app.documents doc_list = [] for open_doc in open_docs: print(open_doc.path + "\\" + open_doc.name) doc_list.append(open_doc) if len(doc_l...
Java
UTF-8
315
2.609375
3
[]
no_license
package cn.gz3create.designpatterns.example.builder; /** * Created by Sampson on 2020/10/21. * DesignPatterns */ public abstract class Builder { public abstract Builder buildPartA(); public abstract Builder buildPartB(); public abstract Builder buildPartC(); public abstract Product create(); }
Python
UTF-8
2,736
2.59375
3
[ "CC0-1.0" ]
permissive
import requests, zipfile, subprocess, csv, json update_data_file = 'http://dcatlas.dcgis.dc.gov/catalog/download.asp?downloadID=969&downloadTYPE=ESRI' zip_filename = 'abra.zip' # Gather the file zip_request = requests.get('http://dcatlas.dcgis.dc.gov/catalog/download.asp?downloadID=969&downloadTYPE=ESRI', stream=True...
C++
UTF-8
3,336
2.625
3
[]
no_license
#include "xmlbehavior.h" #include <assert.h> using namespace ksir; /* $Desc Construct itself and sign up with the logger. * $Parm p_sign Signature used for logging. * $Rtrn /. */ void XmlBehavior::from(const QDomNode& p_root) { if(m_initialized == true) logE("Already initialized from XML content"); readXml(...
Rust
UTF-8
6,165
3.046875
3
[]
no_license
//! This crate implements proc macros for the `emacs` crate. It is a dependency of `emacs` crate, //! and should not be listed as a direct dependency by Emacs dynamic modules. #![recursion_limit = "128"] extern crate proc_macro; extern crate proc_macro2; use proc_macro::TokenStream; use syn::{self, AttributeArgs, I...
SQL
UTF-8
1,496
2.796875
3
[]
no_license
SELECT * FROM ying.hs_s_loan_EM; SELECT * FROM ying.hs_s_loan_EM where date is null and bMargin is null; delete FROM ying.hs_s_loan_EM where date is null and bMargin is null; SELECT * FROM ying.hs_s_loan_EM where code = '601318' order by id desc; SELECT * FROM ying.hs_s_loan_EM where code is NULL and fMKT = 1 order...
PHP
UTF-8
872
3
3
[]
no_license
<?php //Llamar a la clase de conexión require 'providers/Database.php'; //Incializa variable con el nombre del controlador incial a usar. $controller = 'HomeController'; if(!isset($_REQUEST['controller'])) { //Llamado a controlador inicial require "controllers/".$controller.".php"; $controller = ucword...
Java
UTF-8
2,945
1.820313
2
[]
no_license
package net.minecraft; import com.google.gson.JsonParseException; import java.util.List; import net.minecraft.PacketPlayOutTitle.TitleAction; import net.minecraft.server.MinecraftServer; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.l...
Go
UTF-8
1,195
3.765625
4
[]
no_license
package main import ( "fmt" ) type Book struct { id int title string param int // 请求参数 extra int // 别的服务返回的数据 } type Res struct { index int data int // 返回数据 } func main() { // 数据库取到3条数据,现要去别的服务请求extra字段 books := make([]*Book, 3, 3) books[0] = &Book{1, "第一本书", 11, 0} books[1] = &Book{2, "第二本书", 12, 0}...
Markdown
UTF-8
3,918
2.828125
3
[]
no_license
# 概念 ## 进程组: • 每个进程都属于一个进程组 • 每个进程组都有进程组id,该id是该进程组组长的pid • 一个进程只能为它自己及它的子进程设置进程组id ## 会话: • 是一个或多个进程组的集合 • 只有会话组的领导进程能够打开控制终端,打开的控制终端实际上是伪终端 • 进程组的领导进程不能创建会话 • 进程创建会话后,会与以前的控制终端、会话和进程组断开联系,该进程会成为新的进程组的领导进程 • 创建的新会话没有控制终端 • 创建新会话的时候,是进程执行fork,然后主进程退出,子进程设置setsid • setsid这个函数只能是非组长进程调用 • 会话组长终止时会向会话中前台进程组和挂起...
C++
UTF-8
877
3.03125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { cout << "Input array size "; int n; cin >> n; int mas[n][n]; srand (time(0)); for(int i=0; i<n; i++){ for(int j=0;j<n;j++){ mas[i][j] = rand()%10+1; } } for(int i=0; i<n; i++){ for(int j=0;j<n...
C#
UTF-8
4,664
2.859375
3
[]
no_license
using System; using System.Collections; namespace JieNor.Megi.Common { public class CalcParenthesesExpression { public string CalculateParenthesesExpression(string Expression) { ArrayList operatorList = new ArrayList(); string ExpressionString2 = ""; Expression = Expression.Replace(" ", ""); string o...