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
857
1.71875
2
[]
no_license
package com.iblesa.movieapp; /** * Constants class */ public class Constants { public static final String TAG = "iblesa_app"; public static final String MOVIES = "movies_list"; public static final String MOVIE_DETAIL = "movie_detail"; static final String MOVIE_API_KEY = "API_KEY"; // LoaderMov...
Java
UTF-8
474
1.546875
2
[]
no_license
package ua.com.danit.dto; import lombok.Data; import java.util.List; @Data public class UserResponseModeration { private String userId; private String userName; private String userPhone; private String userMail; private String userPhoto; private String userRole; private Integer userIsOkUserPhoto; pri...
C#
UTF-8
6,153
2.59375
3
[ "MIT" ]
permissive
using GTA; using GTA.Native; using GTA.UI; using System; using System.IO; using System.Runtime.InteropServices; namespace RagePresence { /// <summary> /// Main Class for interacting with RagePresence. /// </summary> public class RagePresence : Script { #region External Imports [Dl...
Markdown
UTF-8
674
3.0625
3
[ "MIT" ]
permissive
# 3.1. 簡介 在前面的章節,我們介紹了如何使用 SQL 來存取 PostgreSQL 的基本方式。接下來,我們將會討論更多先進的功能,SQL 的管理功能以及防止資料遺失或損毁。最後,我們也會介紹一些 PostgreSQL 的延伸功能。 這個章節偶爾會引用[第 2 章](../the-sql-language/)的範例,試著去改寫或是優化他們,所以閱讀過上一章也是很有用的。在這一章中有一些範例是來自於 tutorial 目錄中的 advanced.sql,這個檔案有一些範例資料可以載入,但載入方式在此就不再贅述。(請參閱 [2.1 節](../the-sql-language/introduction.md)的內容)
PHP
UTF-8
1,719
3.109375
3
[]
no_license
<?php class mtlib_utils extends mtlib { // instance de la classe private static $instance; /** Instance de la classe mtlib */ private $api = NULL; /** Liste d'utilisateur */ private $users = NULL; // Un constructeur privé ; empêche la création directe d'objet priv...
Markdown
UTF-8
4,921
2.625
3
[]
no_license
## 扩容类型为系统盘的云硬盘 当扩容类型为系统盘的云硬盘时,您可 [通过云服务器控制台扩容](https://cloud.tencent.com/document/product/362/5747#useCVMconsole)。 ## 扩容类型为数据盘的云硬盘 当扩容类型为数据盘的云硬盘时,您可通过以下3种方式进行扩容。 - [通过云服务器控制台扩容](https://cloud.tencent.com/document/product/362/5747#useCVMConsole) - [通过云硬盘控制台扩容](https://cloud.tencent.com/document/product/362/5747#use...
JavaScript
UTF-8
319
2.953125
3
[]
no_license
(function(x, y){ var p = {id:"helloNimo", name:"홍길동"}; var p1 = {id:"hiThere", name:"david"}; // Function 생성자 함수를 통해서 만들어짐 function showInfo(){ console.log("showInfo", this.id, this.name); } showInfo.apply(p, null); showInfo.apply(p1, null); })(1, 2);
JavaScript
UTF-8
482
2.8125
3
[ "MIT" ]
permissive
import { curry } from '../curry.js'; describe('curry', () => { it('curries', () => { const f = curry((a, b, c) => a + b + c); expect(f(1)(2)(3)).toBe(6); expect(f(1, 2)(3)).toBe(6); expect(f(1, 2, 3)).toBe(6); }); it('works with empty invocation', () => { const f = curry((a, b, c) => a + b +...
C++
UTF-8
3,004
3.1875
3
[ "BSD-2-Clause" ]
permissive
/** * File: HSolver.h * Project: DVision library * Author: Dorian Galvez-Lopez * Date: March 15, 2012 * Description: Computes homographies * License: see the LICENSE.txt file * */ #ifndef __D_H_SOLVER__ #define __D_H_SOLVER__ #include <opencv2/core.hpp> #include <vector> #include "FSolver.h" namespace DVisio...
Python
UTF-8
1,451
3.3125
3
[ "MIT" ]
permissive
class ProductionSystem: def __init__(self, pressure=1500, temperature=50): """ Generic class to define specs for a well with fluids produced, given the wellhead pressure and temperature for the system Attributes: - pressure (float) : the wellhead...
Python
UTF-8
1,161
2.546875
3
[]
no_license
import json import requests from selectolax.parser import HTMLParser r = requests.get("https://www.detectiveconanworld.com/wiki/Anime") doc = HTMLParser(r.text) def ranges(s): return sum(((list(range(*[int(j) + k for k,j in enumerate(i.split('-'))])) if '-' in i else [int(i)]) for i in s.split(',')), [])...
Java
UTF-8
3,943
1.929688
2
[]
no_license
package com.example.karyawan.Activity; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; import com.androidnetworking....
C++
UTF-8
1,524
3.1875
3
[]
no_license
#include "flightattendant.h" // class's header file // class constructor FlightAttendant::FlightAttendant() { this->ID = ++numberOfE; } FlightAttendant::FlightAttendant(string fn, string ln, string ads, string nb, unsigned int ye) :Employee(fn, ln, ads, nb), yearsExperience(ye) {} ...
Java
UTF-8
940
2.203125
2
[]
no_license
package com.xkupc.framework.mq.simple; import com.xkupc.framework.mq.base.MqQueueName; import com.xkupc.framework.mq.factory.QueueFactory; import org.springframework.amqp.rabbit.core.RabbitAdmin; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import ...
C++
UTF-8
3,191
3.1875
3
[]
no_license
#include<iostream> #include<stdlib.h> using namespace std; class matrix { int a[4][4],b[4][4],i,j,x,y,c[4][4]; public: void getvalues(); void displaysum(); void displayproduct(); //void traversal(); void smallelement(); void spiralPrint(); void transpose(); void zigagElements (); void add(); void snake(); matrix opera...
Java
UTF-8
3,769
2.1875
2
[]
no_license
package com.napptilus.zaraprices.adviceController; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; import javax.servlet.http.HttpServletRequest; import javax.validation.ConstraintViolationException; imp...
Markdown
UTF-8
638
2.671875
3
[ "MIT" ]
permissive
--- date: 2015-4-23 speaker: "K. S. Senthil Raani" title: "$L^p$-Asymptotics of Fourier transform of fractal measures" time: "3:00pm - 4:00pm" venue: "Lecture Hall I, Department of Mathematics" --- One of the basic questions in harmonic analysis is to study the decay properties of the Fourier transform of measures or ...
PHP
UTF-8
4,293
2.640625
3
[]
no_license
<?php include "header.php"; extract($_REQUEST); if(isset($inspriv)){ if(($tipe==1 || $tipe==2) && $modul!=0){ $time1 = $jam1.":".$menit1.":00"; $time2 = $jam2.":".$menit2.":00"; $timea = strtotime($time1); $timeb = strtotime($time2); // echo "timea=".$timea."<br>"; // echo "timeb=".$timeb."<br>"; ...
Java
UTF-8
20,521
1.75
2
[ "CC-BY-4.0" ]
permissive
package org.cyclops.evilcraft.core.broom; import com.google.common.collect.ImmutableMap; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import org.cyclops.cyclopscore.helper.Helpers; import org.cyclops.evilcraft.EvilCraft; import org.cyclops.evilcraft.Reference; import org....
Markdown
UTF-8
37,453
3.140625
3
[ "Apache-2.0" ]
permissive
# Purpose The purpose of the project is to have an easy way to quickly test changes by bringing a stack of components up/down and or resetting to a known state. You can think of Devlab like a mixture between docker-compose and Vagrant, with orchestration and easy to reset magic sprinkled on top. It provides: 1. A dec...
JavaScript
UTF-8
3,614
2.53125
3
[]
no_license
var mongoose=require ('mongoose'); var Schema = mongoose.Schema; var bcrypt = require('bcryptjs'); var userSchema=new mongoose.Schema({ "userName": { "type": String, "unique":true }, "password": String, "email":String, "loginHistory": [{dateTime: Date, userAgent: String}] }); let U...
Java
UTF-8
2,624
3.515625
4
[]
no_license
package io.nimbus.hackerrank.interviewperparationkit.stringmanipulation.medium; import java.util.Iterator; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; /** * https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem?h_l=interview&playlist_slugs%5B%5D=int...
SQL
UTF-8
4,086
3.234375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `chklst` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `chklst`; -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: chklst -- ------------------------------------------------------ -- Server version 5.7.16-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
Markdown
UTF-8
4,264
2.90625
3
[]
no_license
# basic-site-2020 This is my opinionated view of how to create and maintain a basic website using the following: Service | Service Provider ---|--- Source Versioning | **Github.com** (git, PRs and other services) Hosting | **AWS** (numerous services) Provisioning | **Terraform Cloud** (IaC) ## Bootstrapping ### Git...
Python
UTF-8
238
3.71875
4
[]
no_license
def fibonacci(n): if n == 1 or n == 2: return 1 prev, curr = 1, 1 for i in range(2, n): tmp = prev prev = curr curr = prev + tmp return curr x = int(input()) print(fibonacci(x))
C#
UTF-8
1,775
2.921875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Mail; using System.Web; namespace BugCentral.HelperClass { public class EmailSender { private static String From = "do.not.reply.sambug.vsd@gmail.com"; private static String FromPassword = "Sa...
Python
UTF-8
1,932
2.53125
3
[]
no_license
import logging import numpy as np from app.Setup import * # Modul treated as Singelton to summarize all statistics in one file Wav_Files = 0 Total_duration = 0 Min_duration = 10 Max_duration = 0 Mean_file_duration = 0 Min_amplitude= 0 Max_amplitude = 0 Text_Files = 0 Total_words = 0 Mean_words = 0 Tot...
Java
UTF-8
779
2.234375
2
[]
no_license
package com.lym.spring.framework.core.annotation; import com.lym.spring.framework.beans.factory.annotation.AnnotatedBeanDefinition; import com.lym.spring.framework.beans.factory.support.GenericBeanDefinition; import com.lym.spring.framework.core.type.AnnotationMetadata; public class ScannedGenericBeanDefinition exten...
Ruby
UTF-8
961
2.84375
3
[]
no_license
RAILS_ENV = 'development' require File.expand_path('../environment', __FILE__) f = File.open("libraryloans.txt") firstline = true f.each do |line| #removes invisible ? at start of file if firstline line=line[1,line.length] firstline = false end #gets control control = line[0,line.index(',')] ...
SQL
UTF-8
188
2.65625
3
[]
no_license
CREATE TABLE IF NOT EXISTS carmen.followers_and_followees ( id uuid, user_id bigint, followers_count int, followees_count int, shared_count int, PRIMARY key(id) );
Markdown
UTF-8
2,604
3.515625
4
[ "MIT" ]
permissive
# Java Projects Welcome to the Java Projects Repo. Most of the work i do here is for personal use, just testing out logic & design patterns as well as learning new tricks. Each project is going to be listed below along with resources (if any) that I found useful in understanding concepts. #### Software Used - Intel...
Markdown
UTF-8
1,532
3.25
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- layout: docs title: t.scrollBy Method permalink: /documentation/reference/test-api/testcontroller/scrollby.html --- # t.scrollBy Method {% include actions/manual-scroll-warning.md %} Scrolls the `target` element by the specified number of pixels. If no `target` is specified, the document body is scrolled. Can be ...
Markdown
UTF-8
3,194
2.921875
3
[ "BSD-3-Clause" ]
permissive
# plot-bins-1d2d This step produces alternate plots that show bins in terms of their computed read-depth ratios (RDR), B-allele frequencies (BAF), and cluster assignments. These plots show bins colored by cluster, where the color is consistent between the "2D" (RDR x BAF) view and the "1D" (genomic location x RDR/BAF)...
PHP
UTF-8
3,595
3.21875
3
[]
no_license
<?php namespace callsports\library; class SQLManager { private $serverName="localhost"; private $userName="root"; private $passWord="132231"; private $dbName; private $tableName; private $conn; private static $sqlManager; public function __construct($serve...
Markdown
UTF-8
7,523
2.6875
3
[ "MIT" ]
permissive
![Logo](https://raw.githubusercontent.com/rradczewski/expect-redux/HEAD/docs/logo.svg?sanitize=true) [![npm version](https://badge.fury.io/js/expect-redux.svg)](https://badge.fury.io/js/expect-redux) [![CircleCI](https://circleci.com/gh/rradczewski/expect-redux.svg?style=svg)](https://circleci.com/gh/rradczewski/expec...
Rust
UTF-8
1,505
3.609375
4
[ "BSD-2-Clause" ]
permissive
use std::borrow::Cow; /// Convert string to camel case. /// /// Note: needs to be public because several macros use it. #[doc(hidden)] pub fn to_camel_case(s: &'_ str) -> Cow<'_, str> { let mut dest = Cow::Borrowed(s); // handle '_' to be more friendly with the // _var convention for unused variables ...
Markdown
UTF-8
5,929
3.25
3
[]
no_license
# 3D 数学基础 ## 矢量 ### 点积 ![](./images/3d1.png) ![](./images/3d2.png) ### 叉积 ![](./images/3d3.png) 将右手食指指向 a 的方向、中指指向 b 的方向,则此时拇指的方向即为 a x b 的方向 ## 矩阵 ### 线性变换 #### 旋转 在二维中,只会针对某一点进行旋转。在三维中,会针对某一个轴进行旋转。旋转仅具有一个参数:旋转角度 θ ,它定义了旋转量。 在二维或者三维空间中对某一个点做旋转,可以分解为各个方向基矢量的旋转。 ![](./images/3d4.png) ![](./images/3d5.png) ![](...
Java
UTF-8
2,684
2.859375
3
[]
no_license
package com.example.cs2ex1st; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; public class ApptAdapter extends RecyclerView.Adapter<ApptAdapter.ViewHolder> { ...
C
UTF-8
1,005
2.578125
3
[ "MIT" ]
permissive
#ifndef _MIPD_MESSAGE_H #define _MIPD_MESSAGE_H #include <stdint.h> #include "definitions.h" #define MAX_MIPMESSAGE_DATA_SIZE 1496 #define MAX_MIPMESSAGE_SIZE 1500 typedef struct MIPDMessage { MIP_ADDRESS mip_address; uint16_t data_size; BYTE *data; } MIPDMessage; MIPDMessage *MIPDMessage_create(MIP_A...
PHP
UTF-8
1,016
2.625
3
[ "BSD-3-Clause" ]
permissive
<?php namespace SilverStripe\GraphQL\Pagination; use GraphQL\Type\Definition\Type; use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\ObjectType; use SilverStripe\Core\Injector\Injectable; class SortDirectionType { use Injectable; /** * @var ObjectType */ private $type; /**...
C++
UTF-8
2,518
2.78125
3
[ "BSD-3-Clause" ]
permissive
#include "mex.h" #include "math.h" /* The gateway routine */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double *pEuler, *pQuat; const mxArray *Quat; unsigned int nPoints; /* Check for proper number of arguments. */ if (nrhs != 1) mexE...
PHP
UTF-8
13,659
2.8125
3
[]
no_license
<?php class Customer extends Person { /* Determines if a given person_id is a customer */ function exists($person_id, $email = false) { $this->db->from('customers'); $this->db->join('people', 'people.person_id = customers.person_id'); $this->db->where('customers.person_i...
Java
UTF-8
767
2.078125
2
[]
no_license
package com.example.user.navigation_calendar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; public class ForgotPassword extends AppCompatActivity implements View.OnClickListener { ImageButton forgot_back; @Override ...
Java
UTF-8
2,500
2.59375
3
[]
no_license
package com.review.library.step_defs; import com.review.library.pages.DashboardPage; import com.review.library.utilities.BrowserUtilities; import com.review.library.utilities.Driver; import com.review.library.utilities.LibraryConstants; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import org.junit...
Java
UTF-8
6,202
2.640625
3
[]
no_license
package com.myLearning; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.logging.FileHandler; import org.openqa.selenium.Alert; import org.openqa.selenium.OutputType; import...
Java
UTF-8
2,099
2.21875
2
[]
no_license
package iss.nus.edu.medipalappln.fragment; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListV...
Java
UTF-8
1,200
2.359375
2
[]
no_license
package com.pathway.selenium.factory; import java.net.URL; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import com.pathway.util.SFLoginUtil; public class SeleniumChromeF...
PHP
UTF-8
2,517
2.65625
3
[ "BSD-3-Clause" ]
permissive
<?php /** * This file is part of stubbles. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package stubbles\img */ namespace stubbles\img\driver; use stubbles\lang\Rootpath; /** * Test for stubbles\img\driver\DummyImageDriver. ...
Python
UTF-8
2,254
2.5625
3
[ "MIT" ]
permissive
##finding path to run_time import sys import os path_to_rt=os.path.join(os.path.dirname(sys.argv[0]), "rmrt") import argparse parser = argparse.ArgumentParser(description='Register Machine Compiler') parser.add_argument('-c', type=str, help='file name of the file to compile') parser.add_argume...
Java
UTF-8
2,663
3.9375
4
[]
no_license
package book.part2.dfsbfs.dfs.example; import java.util.LinkedList; import java.util.List; import java.util.Stack; /** * 인접 리스트를 이용한 DFS 구현 * 인접 리스트의 공간 복잡도는 O(N + M) */ public class ListDFS implements DFS { private static final int INFINITY = 999999999; private final List<Integer>[] graph; private fi...
Ruby
UTF-8
11,575
2.578125
3
[]
no_license
module Contror class Graph class Builder attr_reader :stmt attr_reader :graphs attr_reader :break_destinations attr_reader :return_destinations attr_reader :next_destinations attr_reader :retry_destinations attr_reader :redo_destinations def initialize(stmt:) ...
Java
UTF-8
2,158
2.203125
2
[ "MIT" ]
permissive
package com.github.egnaf.auth.controllers; import com.github.egnaf.auth.services.AuthService; import com.github.egnaf.auth.transfers.AuthTransfer; import com.github.egnaf.auth.transfers.UserTransfer; import com.github.egnaf.auth.transfers.forms.LoginForm; import com.github.egnaf.auth.transfers.forms.RegisterForm; impo...
Java
UTF-8
511
2.859375
3
[]
no_license
package day44_Inheritance.RemoteWebDriver; public class CybertekDriver extends RemoteWebDriver{ public CybertekDriver(){ super("Cybertek Browser ","v78.8"); } @Override public void maximize() { System.out.println("Maximizing Cyberteke brwoser"); } @Override public void cl...
Java
UTF-8
2,938
2.109375
2
[]
no_license
/** * */ package com.moi.project.rest; import java.util.List; import java.util.Optional; import javax.servlet.http.HttpServletRequest; import javax.websocket.server.PathParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.spring...
C
UTF-8
2,514
3.75
4
[]
no_license
#include <ctype.h> /* isdigit() */ //#include <stdlib.h> /* atoi() */ #include <stdio.h> #include <string.h> #define MAX_CAPACITY 1024 #define ERROR_VALUE -999 #define DATA_SIZE 100 typedef struct stack { int top; char data[MAX_CAPACITY][DATA_SIZE]; } Stack; void StackInitialize(Stack* stk) { stk->top = -1;...
Python
UTF-8
4,456
3.5
4
[]
no_license
''' AUEB M.Sc. in Data Science (part-time) Course: Text Analytics Semester: Spring 2019 Subject: Homework 1 - Alexandros Kaplanis (https://github.com/AlexcapFF/) - Spiros Politis - Manos Proimakis (https://github.com/manosprom) Date: 10/06/2019 Homework 4: Text classifi...
C++
UTF-8
1,020
2.640625
3
[ "MIT" ]
permissive
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_ #define STORAGE_LEVELDB_INCLUDE_ENV_H_ #include "leveldb/export.h" #include "leveldb/status.h" namespace leveldb { class LEVELDB_EXPORT Env { public: Env(); Env(const Env&) = delete; Env& operator=(const Env&) = delete; virtual ~Env(); virtual Status ...
Java
UTF-8
553
2.8125
3
[]
no_license
import java.util.Vector; import characters.NPC; import classes.Character; import classes.Item; public class SetUp { public Vector<Character> characterList; public Vector<Item> itemList; public SetUp(){ this.setUpNPCs(); this.setUpInventories(); this.setUpItems(); } private void setUpNPCs(){ NPC e = new ...
Java
UTF-8
289
2.1875
2
[]
no_license
package fr.ironcraft.mcshow.utils; import net.minecraft.client.renderer.GlStateManager; public class RenderUtils { public static void color(Color color) { GlStateManager.color(color.getRedFloat(), color.getGreenFloat(), color.getBlueFloat(), color.getAlphaFloat()); } }
C++
UTF-8
421
2.796875
3
[ "MIT" ]
permissive
#pragma once #include "ParticleSpawn.h" #include "../toolbox/maths/maths_func.h" class CircleSpawn :public ParticleSpawn { private: vec3 m_Heading; float m_Radius; public: CircleSpawn(vec3 heading, float radius) :m_Heading(heading), m_Radius(radius) { } virtual vec4 getBaseSpawnPosition() { vec3 point = Ma...
Java
UTF-8
3,271
2.375
2
[ "Apache-2.0" ]
permissive
/* * To change this template, choose Tools | Templates and open the template in the editor. */ package com.kitfox.svg.xml.attributes; import com.kitfox.svg.SVGDiagram; import com.kitfox.svg.SVGLoaderClient; import com.kitfox.svg.SVGLoaderTask; import com.kitfox.svg.SVGUniverse; import com.kitfox.svg.elements.Element...
Java
UTF-8
3,234
2.40625
2
[]
no_license
package com.jvheaney.adidas.controllers; import java.util.logging.Level; import java.util.logging.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.handler.annotation.SendTo; import org.sp...
PHP
UTF-8
1,556
2.625
3
[]
no_license
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="css/bootstrap.css"> </head> <body> <?php //引入DAOMySQLiclass.php类 require_once 'DAOMySQLi.class.php'; $option = array( 'host' => '127.0.0.1', 'user' => 'root', 'pwd' => 'root', ...
C#
UTF-8
1,190
2.53125
3
[]
no_license
using BedFactoryDAC; using BedFactoryVO; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BedFactoryService { public class CommonCodeService { /// <summary> /// 공통코드 정보를 모두 가져옴 /// </summary...
Java
UTF-8
1,877
1.984375
2
[]
no_license
package kravmaga.generated.bookingservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous comp...
Java
UTF-8
706
2.296875
2
[]
no_license
package com.example.pojo; public class BookType { private Integer tid; private String tname; private Integer kid; private BookKind bookkind; public Integer getKid() { return kid; } public Integer getTid() { return tid; } public String getTname() { return t...
Java
UTF-8
432
2.078125
2
[]
no_license
package com.preety.rest.webservices.fileapis.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.NOT_FOUND) public class MyFileNotFoundException extends RuntimeException { public MyFileNotFoundException(String message) { s...
Python
UTF-8
2,205
2.796875
3
[]
no_license
# -*- coding: utf-8 -*- import scrapy class LinkseleniumSpider(scrapy.Spider): name = 'linkselenium' allowed_domains = ['www.linkedin.ch'] start_urls = ['http://www.linkedin.ch/'] import csv from parsel import Selector from time import sleep from selenium import webdriver from pandas.io.json import json_...
Java
UTF-8
4,240
1.75
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2007-2008 Dave Griffith * * 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 applicable law or agreed ...
Markdown
UTF-8
4,398
2.53125
3
[ "MIT" ]
permissive
# cargo-play [![Build Status](https://travis-ci.org/fanzeyi/cargo-play.svg?branch=master)](https://travis-ci.org/fanzeyi/cargo-play) [![Crates.io](https://img.shields.io/crates/v/cargo-play)](https://crates.io/crates/cargo-play) `cargo-play` is a tool to help you running your Rust code file without manually setting u...
PHP
UTF-8
2,844
2.609375
3
[ "MIT" ]
permissive
<?php /** * JsonRpcXp * * Copyright (c) 2013-2014, Alexander Wühr <lx@boolshit.de>. * 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 th...
Markdown
UTF-8
1,005
2.921875
3
[]
no_license
# 通过嵌套交叉验证选择算法 结合k折交叉验证和网格搜索是调参的好手段。可是如果我们想从茫茫算法中选择最合适的算法,用什么方法呢?这就是本节要介绍的嵌套交叉验证(nested cross validation)。 Varma和Simon在论文*Bias in Error Estimation When Using Cross-validation for Model Selection*中指出使用嵌套交叉验证得到的测试集误差几乎就是真实误差。 嵌套交叉验证外层有一个k折交叉验证将数据分为训练集和测试集。还有一个内部交叉验证用于选择模型算法。下图演示了一个5折外层交叉沿则和2折内部交叉验证组成的嵌套交叉验证,也被称为5*2交叉验...
Java
UTF-8
229
2.15625
2
[]
no_license
package sunwaylab; import java.net.*; public class FindIp { public static void main(String[] args) throws UnknownHostException { InetAddress ip = InetAddress.getLocalHost(); System.out.println(ip); } }
C#
UTF-8
1,693
3.625
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Consturcter_StaticConstructer_Destructor_GarbageCollector { class Example2 { public string[] names = new string[10]; public string this[int index] ...
PHP
UTF-8
2,514
3.015625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; class ProductTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // on prendra garde de bien supprimer toutes les images avant de commencer les seeders Storage::disk('local')->delet...
C#
UTF-8
2,762
2.765625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnitTestLab1.ODT; using UnitTestLab1.Repository; namespace UnitTestLab1.Service { public class TeacherService { ITeacherRepository _teacherRepos; public class Qualificatio...
Java
UTF-8
1,798
2.390625
2
[]
no_license
package com.altimetrick.bank.restcontroller; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; im...
Java
UTF-8
421
2.640625
3
[]
no_license
public class Main { public static void main(String[] args) { Solution s = new Solution(); String s1 = "1 2 3 4"; String s2 = "-1 -2 -3 -4"; String s3 = "-1 -1"; String res1 = s.solution(s1); String res2 = s.solution(s2); String res3 = s.solution(s3); S...
Python
UTF-8
1,468
2.625
3
[ "MIT" ]
permissive
from numba import cuda import numba from numba import float32 @numba.cuda.jit("void(float32[:,:], float32[:,:], float32[:,:])") def naive_matrix_mult(A, B, C): n = A.shape[0] x, y = cuda.grid(2) if x >= n or y >= n: return C[y, x] = 0 for i in range(n): C[y, x] += A[y, i] * B[i,...
Markdown
UTF-8
1,901
2.984375
3
[]
no_license
# Nanny We are looking for a responsible, morally exemplary Nanny to look after our children. The Nanny will create a safe, healthy, fun environment for our children as well as for our pets. You will transport our children to and from play dates and extramural activities, collect them from school and run errands. You ...
C++
UTF-8
1,130
3.046875
3
[]
no_license
// // stacks.cpp // // // Created by Jennivine on 23/11/18. #include <bits/stdc++.h> using namespace std; #define SIZE 1000 int stackarray[SIZE]; int stacktop = 0; void stackpush(int value){ stackarray[stacktop] = value; stacktop++; } int stackpop(){ int retval = stackarray[stacktop-1]; stacktop...
Python
UTF-8
218
4
4
[]
no_license
from datetime import date name = input("Enter Your Name") age = int(input("What is your age?")) print("Hi " + name + " You will reach 100 years old by " + str((100-age)+date.today().year)) # must be string, not int
SQL
UTF-8
463
3.125
3
[ "Apache-2.0" ]
permissive
DROP TABLE tbl_product IF EXISTS; CREATE TABLE tbl_product ( code VARCHAR(10) PRIMARY KEY, name VARCHAR(80), description VARCHAR(80) ); CREATE INDEX tbl_product_name ON tbl_product (name); DROP TABLE tbl_order IF EXISTS; CREATE TABLE tbl_order ( pk INTEGER IDENTITY PRIMARY KEY, creationTime TIMESTAMP, mo...
Python
UTF-8
647
3.0625
3
[]
no_license
import sys, SmithWaterman, string #get filenames from command line args firstSequence = sys.argv[1] secondSequence = sys.argv[2] sequence=['']*2 #parse fasta file and strip header info. def parse_fasta(fasta): sequences='' sep='' with open(fasta) as f: next(f) ...
Java
UTF-8
369
2.96875
3
[]
no_license
package myronheng.com; public class HalvingValue { private int value; public HalvingValue(int value) { this.value = value; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } public int useHalvingValue() { ...
JavaScript
UTF-8
285
2.65625
3
[ "Apache-2.0" ]
permissive
import React from 'react'; export default function (props) { const { min, max } = props; const number = parseInt(Math.random() * (max - min)) + min; return ( <div> <p>Sorting a number between {props.min} and {props.max}:</p> <p> {number} </p> </div> ); };
JavaScript
UTF-8
722
3.125
3
[ "MIT", "Apache-2.0" ]
permissive
// must have a div with class="ex-1" var $el = $('.ex-2'); // query with text 'UK' - this will attempt to match any field for UK // Also limit the query to return a maximum of 2 results using the size attribute // query function has asynchronous behaviour and returns a promise object // (even for the case of in memo...
TypeScript
UTF-8
636
2.9375
3
[ "MIT" ]
permissive
import { Injectable } from '@nestjs/common'; @Injectable() export class DateService { public getDaysInCurrentMonth(): number { const now = new Date(); return this.getDaysInMonth(now); } public getDaysInMonth(date: Date): number { return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()...
Python
UTF-8
8,487
3.296875
3
[]
no_license
import sqlite3 from random import randint chemin = 'static/db/fifoandlifo.db' def recuperation_noms_etablissements(): ''' pas de parametre retourne la liste des établissements sans répétition d'élémént exemple utilisation print(recuperation_noms_etablissements()) donne ['Lycée du Nord (Acoua)', ...
Python
UTF-8
4,155
2.75
3
[ "MIT" ]
permissive
#!/usr/bin/env python ################################################################################ ## File: droplet_neighbor_check.py ## Author : Denny ## ## Description : ## Make sure all my droplets not over-located in one hypervisor ## ## Sample Usage: If more than 2 droplets in one hypervisor, report pote...
C
UTF-8
3,489
3.15625
3
[]
no_license
#pragma once #define M_PI 3.14159265358979323846 // The profile curve is a subdivision curve. Use the points on this curve (curvePoints) to construct surface of revolution #define MAXCIRCLEPOINTS 50 #define MAXCONTROLPOINTS 16 #define MINCONTROLPOINTS 3 #define MAXSTEPS 10 typedef struct SubdivisionCurve ...
Markdown
UTF-8
820
2.703125
3
[]
no_license
# Deep learning Natural Language Processing Tutorial ## Author : Sangkeun Jung (2017) This repo. contains following sub-tutorials and projects : most of the tutorial data is Korean. But you can replace any language to run the script. - Applications - Sentiment Analysis (N21 Problem) - Named...
JavaScript
UTF-8
823
2.96875
3
[]
no_license
function ready() { function koch(start, length, repeat, layer) { repeat -= 1; if (repeat > 1) { koch(start, length/3, repeat, layer); var x = line(start,0,length/3); x[2] -= 60; koch(x, length/3, repeat, layer); x = line(x,0,length/3); x[2] += 120; koch(x, length/3, repeat, layer); koch(line(start,0,...
Markdown
UTF-8
6,022
3.390625
3
[ "MIT" ]
permissive
--- layout: article title: 操作系统知识点整理 (二) aside: toc: true key: 操作系统 --- # 3 计算机体系结构及内存分层体系 - 计算机体系结构/内存分层体系 - 地址空间 & 地址生成 - 连续内存分配 ## 3.1 计算机体系结构/内存分层体系 - 计算机体系结构 (图片:计算机基本硬件结构) - 内存分层体系 (图片:内存层次结构) - 在操作系统的内存管理范例 操作系统需要完成的*四个目标* 1. **抽象:**希望应用程序在内存中运行时由于操作系统的有效管理而不需要去考虑底层的细节,只需要访问连续的地址空间(逻辑地址空间) 2. **保护:** 内存中可以...
JavaScript
UTF-8
1,056
2.890625
3
[]
no_license
import { ADD_FILE, REMOVE_FILE, UPDATE_FILE, MOVE_FILE } from '../actions/actionTypes'; import initialState from './initialState'; export default function fileReducer(state = initialState.files, action){ switch(action.type){ case ADD_FILE: return [...state, action.file]; case REMOVE_FI...
Markdown
UTF-8
1,015
3.046875
3
[]
no_license
```cpp class Solution { public: bool binaSearch(vector<int>& num, int target) { auto l = num.begin(), r = num.end()-1; auto mid = l + (r - l) / 2; while (l != r) { if (*mid > target)r = mid; else if (*mid < target)l = mid + 1; else return true; mid = l + (r - l) / 2; } if (*l == target) return true;...
JavaScript
UTF-8
1,783
2.828125
3
[]
no_license
const Peer = require('peerjs'), $ = require('jquery'), uid = require('uid'), //genera ids de cualquier tamaño aleatoriamente //Importando mis modulos js openStream = require('./openStream'), playVideo = require('./playVideo'), getIceObject = require('./getIceObject') getIceObject( iceConfig => ...
Markdown
UTF-8
2,006
3.828125
4
[ "CC0-1.0" ]
permissive
## 端口 端口就像一个房子的门,是出入这间房子的必经之路。如果一个程序需要收发网络数据,那么就需要有这样的端口 在Linux系统中,端口可以有65536(2的16次方)个之多! 既然有这么多,操作系统为了统一管理,所以进行了编号,这就是`端口号` ### 端口号 端口是通过端口号来标记的,端口号只有整数,范围是从0到65535.端口号不是随意使用的,而是按照一定的规定进行分配。端口的分类标准有好几种,我们这里不做详细讲解,只介绍一下知名端口和动态端口。 ### 知名端口号 知名端口是众所周知的端口号,范围从0到1023,以理解为,一些常用的功能使用的号码是估计的,好比 电话号码110、10086、10010一样。一般...
C#
UTF-8
1,203
2.59375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using L3dtFileManager; using L3dtFileManager.Hfz; namespace DosTerrainImporter.Model { internal class Hf2HeightMap : HeightMap { private HfzFile file; public Hf2HeightMap(HfzFile hfzFile) ...
PHP
UTF-8
2,355
2.75
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php declare(strict_types=1); namespace BrunoNatali\Tools\Communication; use React\Socket\TcpServer as Server; use BrunoNatali\Tools\OutSystem; use BrunoNatali\Tools\DataManipulation; final class SimpleTcpServer extends SimpleBaseServer implements SimpleBaseServerInterface { private $ip; privat...