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
JavaScript
UTF-8
1,853
2.546875
3
[ "MIT" ]
permissive
import React, { Component } from "react"; import PropTypes from "prop-types"; import InputBar from "./InputBar"; import styled from "styled-components"; const StyledMessageBar = styled(InputBar)` height: 100%; input { font-size: 1em; } `; class SendMessagesBar extends Component { constructor(props) { ...
Shell
UTF-8
641
2.609375
3
[]
no_license
# Maintainer: pzl pkgname=shivavg _pkgname=ShivaVG pkgver=0.2.1 pkgrel=1 pkgdesc="OpenVG Implementation in OpenGL" arch=('any') url="http://shivavg.sourceforge.net/" license=('LGPL' 'GPL') depends=('glibc' 'libgl') makedepends=('git' 'make') optdepends=('libjpeg-turbo: display jpeg images') provides=('libOpenVG.so') c...
C#
UTF-8
657
2.65625
3
[ "MIT" ]
permissive
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ReadyEDI.EntityFactory.Elements { [Serializable] public class BaseHash { private Hashtable _hash = new Hashtable(); public BaseHash() ...
Markdown
UTF-8
3,910
2.515625
3
[]
no_license
# PCI # 参考 https://blog.csdn.net/wstpt/article/details/75331241 https://blog.csdn.net/jmq_0000/article/details/7517594 Linux设备驱动之——PCI 总线 https://blog.csdn.net/WINGCREATE/article/details/6342933 PCI 是外围设备互连(Peripheral Component Interconnect ), 可以在33MHz时钟频率、32 bit数据总线宽度的条件下达到峰值132Mb/s的传输速率;它能支持一种称为线性突发的数据传输模式,可...
Java
UTF-8
744
2.046875
2
[]
no_license
package com.mvvm.kien2111.fastjob.retrofit; import android.support.annotation.Nullable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; /** * Created by WhoAmI on 29/01/2018. */ public class Envelope<T> { @Nullable public String getErrorMessage() { ret...
Python
UTF-8
4,713
2.75
3
[]
no_license
#!/usr/bin/env python3 import numpy as onp onp.random.seed(453453) import jax import jax.numpy as np import jax.scipy as sp from bnpmodeling import cluster_quantities_lib import unittest import numpy.testing as testing class TestGetMixtureWeights(unittest.TestCase): def test_get_mixture_weights_from_stick_bre...
C#
UTF-8
531
2.53125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using oop2._3.Exceptions; namespace oop2._3.Unit { class CounterSingleton { private static int counter; public CounterSingleton() { counter = 0; } ...
JavaScript
UTF-8
1,074
2.765625
3
[]
no_license
//Hace un llamado a las librerias const express = require('express'); //Hace el llamado al módulo express const app = express(); //Llama a la función express y coloca una nueva aplicación Express dentro de la variable app (para iniciar una nueva aplicación Express) const hbs = require('hbs'); //Hace el llamado al módul...
Markdown
UTF-8
5,988
3.9375
4
[]
no_license
# ES6 features ## class Syntax allows to create objects with the *class* keyword ES5: ``` var Vegetable = function (vegetableName) { this.vegetableName = vegetableName; } var carrot = new Vegetable ('carrot'); ``` ES6: UpperCamelCase should be used to name classes ``` class Vegetable{ constructor (vegetab...
Python
UTF-8
682
2.6875
3
[]
no_license
import csv import os from Robot.country.country_repository import CountryRepository from Robot.cycle.objects.color import Color def fill_repository(): file_path = os.path.join(os.path.dirname(__file__), "..", "resources", "flags.csv") with open(file_path, newline='') as csvfile: country_dic...
Java
UTF-8
486
2.390625
2
[]
no_license
package uk.co.datadisk.asciiart; import com.godtsoft.diyjava.DIYWindow; /** * Created by vallep on 09/07/2017. */ public class ASCIIAart extends DIYWindow { public ASCIIAart() { print(" @@@@@@@@"); print(" | |"); print(" | (0)(0)"); print("C _)"); print(" | _...
Python
UTF-8
775
3.890625
4
[]
no_license
# 替换字符串---replace str01 = "www.cctv.com" print(str01.replace("com", "cn")) # 去除空格 str02 = " 我 是 中 过 人 " print(str02.strip()) print(str02.replace(" ", "")) # 如果多处匹配 如何替换 str03 = "abddabjjabllab" print(str03.replace("ab", "12")) # 默认全部替换 print(str03.replace("ab", "12", 2)) # 替换前两个匹配的 # 如果实现第偶数个 替换,怎么做 # 模拟聊...
Markdown
UTF-8
4,467
2.78125
3
[ "MIT" ]
permissive
HTML5 Games Dreamengine - What is it =========== The Dreamengine is a library to create HTML5 games by coding. It's not "easy make" or things like that, it's more about "how to make games fast, running everywhere, with good perfs, and without doing boring stuff". So I don't say it's the best HTML5 engine, I know that...
C++
UTF-8
218
2.5625
3
[]
no_license
#include<stdio.h> int main(){ int T; scanf("%d",&T); while( T-- ){ int N; scanf("%d",&N); int tot = 0; for( int i = 0; i < N; ++i ){ int a; scanf("%d",&a); tot += a; } printf("%d\n",tot); } }
Java
UTF-8
931
2.5625
3
[]
no_license
package com.cmy.o2o.dto; import lombok.Data; /** * Author : cmy * Date : 2018-03-05 11:48. * desc : 封装json对象,所有返回结果都使用它 */ @Data public class Result<T> { // 是否成功标志 private boolean success; // 成功时返回的数据 private T data; // 错误信息 private String errorMsg; // 错误码 private int error...
PHP
UTF-8
2,287
2.875
3
[]
no_license
<?php namespace MVC\Models; use \System\ORM\Model; /** * Class Community * @package MVC\Models * @table(communities) * @updateBy(id) */ class Community extends Model { /** * Unique key for Community * * @columnType(INT(11) UNSIGNED NOT NULL AUTO_INCREMENT KEY) * @var int */ pr...
Markdown
UTF-8
1,359
2.609375
3
[ "Apache-2.0" ]
permissive
# Fabric Loot API (v2) This module includes APIs for modifying and creating loot tables. ## [Loot table events](src/main/java/net/fabricmc/fabric/api/loot/v2/LootTableEvents.java) This class provides two events for modifying loot tables. `LootTableEvents.REPLACE` runs first and lets you replace loot tables complete...
C++
UTF-8
1,174
3.203125
3
[]
no_license
#include<iostream> #include<algorithm> #include<vector> using namespace std; int minPathSum(vector<vector<int> > &grid) { int m=grid.size(); if(m==0) return 0; int n=grid[0].size(); int Paths[m][n]; for(int i=m-1;i>=0;i--){ for(int j=n-1;j>=0;j--){ if(i==m-1&&j==n-1){ Paths[i][j]=grid[i]...
Java
UTF-8
414
2.640625
3
[]
no_license
package com.vm.training.java.collection; public class Employee { int empId; String name; String address; public Employee(int empId, String name, String address) { super(); this.empId = empId; this.name = name; this.address = address; } @Override public String toString() { return "Emplo...
PHP
UTF-8
4,131
2.953125
3
[]
no_license
<?php /* Le controlleur formation qui gère les vues et le model des formation */ class FormationController { public function ajoutFormation() { if (isset($_SESSION['login']) && isset($_SESSION['profile'])) { if (($_SESSION['profile'] == "Responsable Formation") || ($_SESSION['profile'...
C++
GB18030
604
3.078125
3
[]
no_license
#include "OJ.h" /* : : MatrixA,MatrixB : MatrixC : 0 */ int matrix(int **MatrixA, int **MatrixB, int **MatrixC, int N) { if(MatrixA == 0 || MatrixA == 0 || MatrixB == 0) { return 0; } for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { int sum = 0; for (in...
Python
UTF-8
927
3.3125
3
[]
no_license
class Monster: def __init__ (self): self.id = None self.description = None self.hp = None self.trophy = None #Load Monster Information from the Monster Database def load_monster(self,monster_number): __filename = "monster_db.txt" __monster_match = "Monster Num: " + str(monster_number) __switch = False...
TypeScript
UTF-8
2,026
3.046875
3
[ "MIT" ]
permissive
import EmitterSubscription from './EmitterSubscription' import EventSubscriptionVendor from './EventSubscriptionVendor' export default class BaseEventEmitter { currentSubscription: EmitterSubscription | null subscriber: EventSubscriptionVendor constructor() { this.subscriber = new EventSubscriptionVendor() ...
Java
UTF-8
3,171
3.09375
3
[]
no_license
/********************************************************************************** * API: APIFileCipher - Suppose que la clé blowfish a déjà été généré * Description: Utilise ApiBlowfish pour le chiffrement et déchiffrement de fichier * Auteur: Didier Samfat * Date: 28 Mar 2021 * Version: 1.0 ****************...
C++
UTF-8
2,311
2.921875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; struct Activity { int id; int startTime; int endTime; char person; }; void solve(string &str, int test) { } bool compStartTime(Activity &a1, Activity &a2) { if(a1.startTime < a2.startTime ) { return true; } return false; } bool comp...
Python
UTF-8
404
3.421875
3
[]
no_license
from turtle import Turtle import random class Food(Turtle): def __init__(self): super().__init__() self.shape("circle") self.color("blue") self.penup() # self.goto(random.randint(-290,290),random.randint(-290,290)) self.update_location() def update_loc...
Java
UTF-8
60
1.84375
2
[]
no_license
public enum messageType { Text,Image,Video,SoundTrack }
PHP
UTF-8
5,721
2.515625
3
[]
no_license
<?php include 'database_of.php'; include 'calls.php'; $search = "%{$_POST['title']}%"; $title = mysqli_real_escape_string($connect, $search); $tid = mysqli_real_escape_string($connect, $_POST['val']); $cate = mysqli_real_escape_string($connect, $_POST['cate']); $s1 = $cate; $output = ''; if(!empty($cate)) { if($ti...
C++
UTF-8
527
2.828125
3
[]
no_license
#include "../test-prog.h" #if (PNUM == lv02-33) // 폰캣몬 문제 #include <iostream> #include <vector> using namespace std; int arr[200001]; int solution(vector<int> nums) { int answer = 0; for (int i = 0; i < nums.size(); i++) { if (!arr[nums[i]]) { arr[nums[i]]++; if (answer >= ...
JavaScript
UTF-8
1,976
2.609375
3
[]
no_license
/* O propósito de "use strict" é indicar que o código deve ser executado em "modo estrito". Com o modo estrito, você não pode, por exemplo, usar variáveis ​​não declaradas. */ 'use strict'; //Sequelize = ORM banco relacional //Modelos são definidos com sequelize.define('name', {attributes}, {options}). module.exports ...
C#
UTF-8
1,241
2.71875
3
[ "MIT" ]
permissive
using System; using System.Globalization; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; using System.Diagnostics; using System.Windows.Input; namespace IDE_WPF.Controls { public class Button : Control { ...
Java
UTF-8
2,331
2.328125
2
[]
no_license
package frc.robot.subsystems; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; import com.revrobotics.CANEncoder; import com.revrobotics.CANPIDController; import com.revrobotics.CANSparkMax; import com.revrobotics.ControlType; import com.revrobotics.CANSparkMaxLowLevel.MotorType; publ...
C++
UTF-8
3,704
3.859375
4
[]
no_license
// // Created by mark on 2019/7/8. // Copyright © 2019年 mark. All rights reserved. // /* 说明: 1. 问题:25.合并两个有序链表 2. 思路:不要断链,且递增;考虑特殊输入(空链表) 1. 用两个指针分别遍历两个链表,每次找到小的节点插入新链表中; 2. 递归方法,相当于每次比较两个头结点 */ #include <iostream> #include <vector> #include <stack> #include <queue> #include <cmath> #include...
C
UTF-8
4,298
2.59375
3
[]
no_license
#include <xc.h> #include <stdio.h> #include "main.h" #include "configBits.h" #include "lcd.h" #include "constants.h" #include "macros.h" /* * Written by Ben Schmidel et al., October 4, 2010. * Copyright (c) 2008-2012 Pololu Corporation. For more information, see * * http://www.pololu.com * http://forum.pololu...
Python
UTF-8
4,399
3.375
3
[]
no_license
""" Definisjon av bolske funksjoner""" from IPython.core.display import display, HTML import digtek.methods.html_karnaugh import digtek.methods.html_tabellmetoden import digtek.util as util import digtek.html import digtek.errors __all__ = ["BoolFunction","LambdaFunction","MintermFunction","MaxtermFuncti...
PHP
UTF-8
7,484
2.859375
3
[]
no_license
<?php class Response{ private $content; private $actions; private $callback_id; private $user; private $action_ts; private $original; private $response; private $attachments; private $title; private $text; private $value; ...
Python
UTF-8
963
3.203125
3
[ "MIT" ]
permissive
import random class Solution: def findKthLargest(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ if nums is None or len(nums)==0: return nums nums = self.quickSort(nums,0,len(nums)-1) return nums[k-1] ...
C#
ISO-8859-7
2,459
2.859375
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using System.Reflection; namespace Jasen.Framework.Reflection { /// <summary> /// /// </summary> public class ColumnPropertyCollection : IEnumerable<PropertyInfo> { private Dictionary<string, PropertyInfo> _columnPr...
Markdown
UTF-8
2,533
2.609375
3
[]
no_license
# Applied Data Science Project 3: Can you recognize the emotion from an image of a face? <img src="figs/CE.jpg" alt="Compound Emotions" width="500"/> (Image source: https://www.pnas.org/content/111/15/E1454) ### [Full Project Description](doc/project3_desc.md) Term: Spring 2020 + Group number: 6 + Team members + ...
TypeScript
UTF-8
1,364
2.6875
3
[]
no_license
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { title = 'tipcalculator'; billAmount:number; numberOfPeople:number; selectedPercentage:number; percentages:any[]; custom...
PHP
UTF-8
352
3.28125
3
[]
no_license
<?php class php{ public static function framework() { echo static::getClass()."</br>"; } public static function getClass() { return __CLASS__; } } class phpChild extends Php{ public static function getClass() { return __CLASS__; } } $obj = new php; echo $obj::framework(); $obj2 = new phpChil...
Java
UTF-8
296
2.359375
2
[]
no_license
#include <stdio.h> int main() { int n,i,temp,sum; scanf("%d", &n); temp=n; sum=0; while(temp>0) { int r=temp%10; int f=1; for(int i=1;i<=r;i++) { f=f*i; } sum=sum+f; temp=temp/10; } if(n==sum) { printf("Yes"); } else { printf("No"); } return 0; }
Python
UTF-8
296
3.109375
3
[ "MIT" ]
permissive
from pieces.piece import Piece class King(Piece): alliance = None position = None def __init__(self,alliance,position): self.alliance =alliance self.position = position def toString(self): return "K" if self.alliance == "Black" else "k"
Java
UTF-8
4,447
2.609375
3
[]
no_license
package com.diandian.dubbo.facade.common.constant; /** * 会员常量 * * @author x * @date 2018/9/12 16:13 */ public class MemberConstant { /** * @Author wubc * @Description // 启用 * @Date 11:22 2019/3/13 * @Param * @return **/ public static final Integer NORMAL = 0; /** *...
C#
UTF-8
3,983
2.75
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using LowPolyHnS.Inventory; using UnityEngine; namespace LowPolyHnS.Attributes { [Serializable] public class CharacterAttribute { public float BaseValue; protected bool NeedRecalculate...
Markdown
UTF-8
5,079
2.984375
3
[]
no_license
--- title: altTitle: SS64 Docs date: 2016-09-04 19:26:55 useGithubLayout: false --- <!-- #BeginLibraryItem "/Library/head_ps.lbi" --><!-- #EndLibraryItem --><h1>Get-Random</h1> <p>Get a random number, or select objects randomly from a collection.</p> <pre>Syntax Get-Random [-InputObject] <i>Object</i>[] [-Count ...
TypeScript
UTF-8
2,701
2.53125
3
[ "MIT" ]
permissive
import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, UseGuards, } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { ApiOperation, ApiTags, ApiBearerAuth } from '@nestjs/swagger'; import { GroupDto } from '...
JavaScript
UTF-8
600
2.71875
3
[]
no_license
new Vue({ el: '#exercise', data: { value: '' }, methods: { clickAlert: function(){ alert("I\'m clicked!") }, //this function displays e.target.value until a following keydown... // by default wait on key down for...
Java
UTF-8
2,243
2.234375
2
[ "Apache-2.0" ]
permissive
/***************************************************************** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * ...
Shell
UTF-8
329
3.015625
3
[]
no_license
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" while read p do echo -n "Exporting to " echo $p cp -apRf $DIR/src/classes/* $p/src/classes cp -apRf $DIR/src/staticresources/* $p/src/staticresources cp -apRf $DIR/src/pages/* $p/src/pages cp -apRf $DIR/src/components/* $p/src/components done <PROJ...
JavaScript
UTF-8
123
3.40625
3
[ "MIT" ]
permissive
// Prints numbers from 0 to 9 var countNumbers = function(){ for(var i = 0; i < 10; i++){ console.log(`${i}`) } }
Markdown
UTF-8
1,481
3.140625
3
[]
no_license
# clox A bytecode virtual machine for the Lox language Based off the book, Crafting Interpreters by Bob Nystrom, clox is a bytecode virtual machine for the Lox language. ### About Lox (the language) Lox is a programming language used in the book for the main purpose of introducing compilers and interpreters to novice...
Java
UTF-8
785
2.3125
2
[ "MIT" ]
permissive
package com.cn.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import com.cn.pojo.OTDetail; import com.cn.utils.DbUtils; public class OTDetailDao { public int addOTDetail(OTDetail oTDetail){ Connection conn=null; PreparedStatement stat=null; try { ...
Shell
UTF-8
2,768
2.890625
3
[ "Apache-2.0" ]
permissive
#! /bin/bash # $1 - R1 fastq file export PATH=/ifs/work/bergerm1/Innovation/software/metagenomics/kraken-0.10.5-beta:/ifs/work/bergerm1/Innovation/software/metagenomics/KronaTools-2.6.1/bin:/opt/common/CentOS_6/gcc/gcc-4.9.3/bin:/ifs/work/bergerm1/Innovation/software/metagenomics/metaphlan2:/opt/common/CentOS_6/perl/...
Java
UTF-8
1,063
2.125
2
[]
no_license
/** * JavaCCRootNodeView.java * * @date: Oct 12, 2011 * @author: Xiaoyu Guo * This file is part of the Teaching Machine project. */ package visreed.extension.javaCC.view; import higraph.view.HigraphView; import java.awt.Graphics2D; import tm.backtrack.BTTimeManager; import visreed.model.VisreedE...
C#
UTF-8
355
2.828125
3
[]
no_license
Thread.MemoryBarrier(); // read barrier var list = CommandList; if (list != null) { var next = list.Next; if (Interlocked.CompareExchange(ref CommandList, next, list) == list) { // execute code on 'list'. } else { // something c...
Java
UTF-8
1,134
3.40625
3
[]
no_license
package com.bizleap.training.tutorial32; public class Fruit { private String name; private double price; private double basePrice; private double weight; public Fruit() { } public Fruit(String name) { this.name = name; } public Fruit(String name, double price) { this.name = name; this.price = p...
Python
UTF-8
3,662
3.09375
3
[]
no_license
from django.shortcuts import render, redirect import random # index function initiates the gold count, activity log, and renders our html file def index(request): if "gold" not in request.session: request.session["gold"] = 0 request.session["history"] = [] return render(request, "index.htm...
Python
UTF-8
201
3.0625
3
[]
no_license
from time import sleep import emoji print('*='*15) print(' CONTAGEM REGRESSIVA ') print('*='*15) for c in range(10,0,-1): print(c) sleep(1) print('FELIZ ANO VELHO KCT ') print(emoji.emojize(' :collision:'))
Java
UTF-8
3,232
2.515625
3
[]
no_license
package taskcom.android.manish.searchonrecyclerview.activity; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.wi...
Java
UTF-8
16,057
1.773438
2
[]
no_license
package com.snapstory.util; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import android.annotation.SuppressLint; import android.content.ContentProvider; import android.content.ContentUris; import android.content.ContentValues; import android.c...
Shell
UTF-8
2,617
3.390625
3
[]
no_license
#!/bin/bash QTDIR=$HOME/Qt/5.11.2/clang_64/bin VERSION_H=common/usbtenki_version.h LIBUSB_DYLIB=../../libusb/Xcode/build/Release/libusb-1.0.0.dylib if [ ! -f $VERSION_H ]; then echo "Please run this script from its parent directory." exit 1 fi VERSION=`grep USBTENKI_VERSION $VERSION_H | head -1 | cut -d \" -f 2`...
TypeScript
UTF-8
423
3.390625
3
[]
no_license
'use strict'; let currentHours: number = 12; let currentMinutes: number = 12; let currentSeconds: number = 59; let secondsInDay: number = 86400; // Write a program that prints the remaining seconds (as an integer) from a // day if the current time is represented by these variables let day: number = (currentHours*36...
Java
UTF-8
4,672
3
3
[]
no_license
package models.logic; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.LinkedList; import java.util.Scanner; /** * From http://www.java2s.com/Code/Java/File-Input-Output/FileSplitter.htm */ public class Splitter { private File f; public Splitter(File f...
Java
UTF-8
764
2.703125
3
[]
no_license
package unidadesGraficas; import java.util.Iterator; import org.apache.log4j.Logger; public class Window { String idparent; private final static Logger logger = Logger.getLogger(Window.class); public void pasarANuevaVentana() { try { Iterator<String> parent=SeleniumSession.driver().getWindowHa...
Python
UTF-8
1,370
3.625
4
[ "MIT" ]
permissive
""" Python package: https://github.com/fhirschmann/rdp ist aber nicht schnell (Faktor 10 langsamer) https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm Code von hier: https://stackoverflow.com/questions/2573997/reduce-number-of-points-in-line#10934629 """ def _vec2d_dist(p1, p2): return (p1[0] - p2[0...
Java
UTF-8
3,146
3
3
[]
no_license
package data; import exceptions.InputException; import models.StockOrder; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import static m...
C++
UTF-8
1,409
3.109375
3
[]
no_license
#include "ThreadPool.h" #include "Handler.h" #include <utility> ThreadPool::ThreadPool(unsigned int threadLimit, std::string documentRoot) : done(false), documentRoot(std::move(documentRoot)) { threadNumber = threadLimit; if (threadNumber == 0) { threadNumber = 1; } for (int i = 0; i < threadN...
C#
UTF-8
1,931
3.53125
4
[]
no_license
using System; using System.Collections.Generic; namespace WP_ShoppingCart { //Draft item is used after selecting an item in the combo box and added to the order when clicking on the Add to Order button. //Gets recreated when the item count gets changed. public class DraftItem { public string ...
Markdown
UTF-8
11,075
2.875
3
[ "Apache-2.0", "MIT" ]
permissive
--- comments: true date: '2016-07-22T18:00:00-05:00' slug: purchasing-an-anonymous-vpn tags: - bitcoin - vpn - experiment title: How I Bought a (Nearly) Anonymous VPN url: /weblog/2016/07/22/purchasing-an-anonymous-vpn --- There's a ton of reasons why nearly everyone should consider using a VPN. They allow to get arou...
Java
UTF-8
4,300
2.359375
2
[]
no_license
package GUI; import com.google.gson.Gson; import Communication.ClientConsole; import Defines.API; import Defines.Dimensions; import Defines.ErrorCodes; import Defines.MemLvl; import Defines.MemLvlWorkerdb; import Defines.SceneName; import Dialogs.MessageDialog; import Dialogs.ProgressForm; import Requests.GeneralReque...
Python
UTF-8
905
4.125
4
[]
no_license
""" By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? """ from p3 import getNextPrime import unittest def primes(n): """ Returns a list of the first n prime numbers """ primes = [2,3] for i in range(len(primes), n): primes.a...
Python
UTF-8
436
3
3
[]
no_license
import logging logging.info(f"in {__file__}") logger = logging.getLogger(__name__) def add_column_to_dataframe(input_df, results, target_column): if target_column in input_df.columns: logger.info(f"writing to column {target_column}") input_df[target_column] = results else: logger.info(...
JavaScript
UTF-8
391
3.71875
4
[]
no_license
const user = { name: "John", money: 1000, toString() { return `{name: "${this.name}"}`; }, valueOf() { return this.money; } }; // демонстрация результатов преобразований: console.log(String(user)); // toString -> {name: "John"} console.log(+user); // valueOf -> 1000 console.lo...
Python
UTF-8
16,089
4.15625
4
[]
no_license
''' 상하좌우 설계 문제 : 가장 왼쪽 위 좌표 (1, 1) 가장 오른쪽 아래 좌표 (N, N) A는 상하좌우로 움직일 수 있고 시작 좌표는 (1, 1)이다. A가 N x N 범위를 벗어나는 움직임은 무시된다. LRUD 중 하나의 문자가 반복적으로 적혀있는 계획서대로 움직인다. 입력 : 첫째 줄 N (1이상 100이하) 둘째 줄 계획서 (1이상 100이하) 출력 : x y 아이디어 : 리스트를 N*N 길이로 선언해서 나눈 몫과 나머지를 이용하여 행과 열을 표현하자. 몫=행, 나머지=열 temp 좌표와 current 좌표를 추...
Java
UTF-8
383
2.484375
2
[]
no_license
package at.tugraz.ist.qs2021.messageboard.dispatchermessages; import at.tugraz.ist.qs2021.actorsystem.Message; /** * Message sent from client to dispatcher to stop the system. * This message is then forwarded to all workers to stop them. */ public class Stop implements Message { public Stop() { } @Ove...
Markdown
UTF-8
2,193
2.515625
3
[]
no_license
我本以为没有机会再提笔了。2016年12月24日,平安夜,天使用她的翅膀触摸了我。接下来的十多个小时,我游离在天地之间,不省人事。醒来时听到的是丈夫、儿女在医院床头的呼唤,原来我已经试着飞天,没成行是因为我舍不得离开亲人,朋友,舍不得留下这尚未完成的《岁月如歌》,舍不得离开这个美好的世界。 出于支持我抗癌治病的初衷,姜晹团长开设了曾平合唱团歌友群,新朋好友从四面八方而來,踊跃参群。从开始的几句寒暄,几声安慰,到后来敞开胸怀,以诚相见,群友们倾其情尽其心,真诚交流,共同分享过去人生的经历与感悟,讨论今日的机会与挑战。从此这个普通的聊天群不再普通,它不仅传递着关爱与支持,而且也是一个探讨人生价值的平台,群友们心灵撞击出的火花变成了光...
Java
UTF-8
1,341
3.46875
3
[]
no_license
public class RotateMatrix { private static void transpose(int m[][]) { for (int i = 0; i < m.length; i++) { for (int j = i; j < m[0].length; j++) { int temp = m[j][i]; m[j][i] = m[i][j]; m[i][j] = temp; } } } p...
Markdown
UTF-8
1,871
3.9375
4
[ "MIT" ]
permissive
<!-- * @Autor: Guo Kainan * @Date: 2021-09-16 14:48:04 * @LastEditors: Guo Kainan * @LastEditTime: 2021-09-16 14:52:28 * @Description: --> # 题目 [208.前缀树](https://leetcode-cn.com/problems/implement-trie-prefix-tree/) 前缀树是查字典时常用的一种数据结构,用空间换时间,能有效降低大词库中的查询时间。 # 题解 ```js /** * Initialize your data structure here....
JavaScript
UTF-8
1,107
2.765625
3
[]
no_license
const DOMSearch = () => { const getGrandParentElement = (selector, level) => { let parentWanted = null; if (notNull(selector)) { for (let i = 0; i < level; i++) { if (parentWanted === null) { parentWanted = selector.parentElement; } else { parentWante...
PHP
UTF-8
489
3.5
4
[]
no_license
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $a=3; $b=4; $c= $a+$b; echo "the result of $a plus $b is equal to $c"; $vec = array (); $vec[1111] = "Danidin Cohen"; $vec[22...
PHP
UTF-8
262
2.84375
3
[]
no_license
<?php namespace Leitom\Role\Contracts; interface RouteScannerInterface { /** * We will call the getRoutes method on an implementation * of this interface to get all available routes for the system * * @return array */ public function getRoutes(); }
Markdown
UTF-8
4,229
2.671875
3
[ "MIT" ]
permissive
# CloudGate ![js-standard-style](https://cdn.rawgit.com/standard/standard/master/badge.svg) CloudGate is a Discord shard cluster microservice built on top of [CloudStorm](https://github.com/DasWolke/CloudStorm) with a REST api to perform gateway actions. CloudGate has a low resource footprint and publishes incoming me...
Shell
UTF-8
172
2.984375
3
[ "MIT" ]
permissive
#!/bin/sh # # /etc/init.d/rngd # # $Id$ # if [ -f /usr/sbin/rngd ]; then echo "Starting rngd..." /usr/sbin/rngd -r /dev/hwrng exit 0 fi echo "No rngd found. Aborting"
Java
UTF-8
1,713
1.992188
2
[]
no_license
package com.zrht.privilege.controller; import com.cloud.common.bean.ResponseInfo; import com.cloud.common.util.ResultUtils; import com.zrht.privilege.enums.ExceptionEnum; import com.zrht.privilege.exception.PrivilegeException; import com.zrht.privilege.service.MenuService; import com.zrht.privilege.utils.AssertUtil; ...
Java
UTF-8
854
3.171875
3
[]
no_license
package com.nagarro.RouletteAPI.utilities; public class SegmentToNumberChosenRoulette { /** * This method converts the user selected segement to the number to be compared * to the roulette generated number. * * @param segmentChosen * @return */ public static int convertSegmentToNumber(String segmentCho...
Java
UTF-8
674
2.921875
3
[]
no_license
package LopStopWatch; import java.util.Arrays; import java.util.Calendar; import java.util.Random; import java.util.Scanner; public class Main { public static void main(String[] args) { stopWatch st = new stopWatch(); st.start(); int[] arr = stopWatch.creatRandom();//goi phuong thuc static...
Markdown
UTF-8
10,198
2.6875
3
[ "Intel", "Apache-2.0" ]
permissive
# Introduction to nGraph Flow in Inference Engine {#openvino_docs_IE_DG_nGraph_Flow} ## New Run-Time Intermediate Representation (IR): nGraph Starting from the OpenVINO&trade; release 2020.1, the Inference Engine integrates the nGraph Core. That implies that the Inference Engine uses a new way to represent a model i...
C#
UTF-8
612
2.546875
3
[]
no_license
foreach (var dteProject in dte.Solution.Projects.OfType<Project>()) { // You can edit the project through an object of Microsoft.Build.Evaluation.Project var buildProject = new Microsoft.Build.Evaluation.Project(dteProject.FullName); foreach (var item in buildProject.Items.Where(obj => ...
Java
UTF-8
3,741
2.40625
2
[]
no_license
package com.example.tripplanner; import android.os.Parcel; import android.os.Parcelable; import java.io.Serializable; import java.util.List; public class Place implements Parcelable { private String id; private String name; private String category; private String city; private String about; ...
Java
UTF-8
1,245
2.1875
2
[]
no_license
package test; import org.junit.*; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import utilities.CommonTestCase; import static org.junit.Assert.fail; public class appLogin extends CommonTestCase { @Test public vo...
Java
UTF-8
922
2.09375
2
[]
no_license
package com.android.test.popularmoviestwo.database.old; import android.net.Uri; public class MoviesContract { public static final String CONTENT_AUTHORITY = "com.android.test.popularmoviestwo"; // Use CONTENT_AUTHORITY to create the base of all URI's which apps will use to contact the content provider. public st...
Python
UTF-8
1,234
2.5625
3
[ "MIT" ]
permissive
from django.shortcuts import render, redirect from .models import ThoughtModel, SessionModel def get_username_from_session(request): cookie_session = request.COOKIES.get('session') try: session = SessionModel.objects.get(session=cookie_session) except SessionModel.DoesNotExist: return None...
Java
UTF-8
3,012
3.609375
4
[]
no_license
package marshmallows.controller; import marshmallows.model.MarshmallowMonster; import marshmallows.view.MonsterDisplay; import java.util.Scanner; public class MonsterController { private MarshmallowMonster harryMonster; //Declares a Monster called harryMonster. private MarshmallowMonster userMonster; //Declares a M...
Java
UTF-8
3,288
4.15625
4
[]
no_license
package com.theo; /** * Divide and Conquer Algorithm * Recursive Algorithm * In place Algorithm * Unstable Algorithm * Time complexity: O(n*log(n)), worst case O(n^2), mostly worst case if it has to do with only a few elements * because of the overhead from the recursion. * Using a pivot element to partition th...
JavaScript
UTF-8
1,196
2.734375
3
[]
no_license
const container = document.querySelector('.container'); const shoes = [ { name: 'Crimson Tint', image: 'images/jordan1.jpg' }, { name: 'NYC to PARIS', image: 'images/jordan2.jpg' }, { name: 'Phantom', image: 'images/jordan3.jpg' }, { name: 'Pine Green', image: 'images/jordan4.jpg' }, { name: 'Reserve Bred', image...
C#
UTF-8
660
2.859375
3
[]
no_license
using System.Collections.Generic; namespace CommonShuffleLibrary { public class QueueItemCollection { private readonly IEnumerable<QueueItem> queueItems; public QueueItemCollection(IEnumerable<QueueItem> queueItems) { this.queueItems = queueItems; } ...
Java
UTF-8
326
2.28125
2
[]
no_license
package enums.mobile; public enum FieldTitles { CONTACT_PHONE("Contact Phone"), CONTACT_NAME("Contact Name"), IANA_HOMEPAGE_TITLE("Internet Assigned Numbers Authority"); private String name; FieldTitles(String name) { this.name = name; } public String getTitle() { return name; ...
Java
UTF-8
2,127
1.875
2
[]
no_license
// isComment package it.sasabz.android.sasabus.appwidget; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.text.Html; import android.widget.RemoteViews; import it.sasabz.android.sasabus.R; import it.sasabz.android.sasabus.data.model.N...
JavaScript
UTF-8
1,930
2.859375
3
[]
no_license
import React, { Component } from 'react'; import Keyboard from "./Keyboard"; import Screen from "./Screen"; class Calculator extends Component { constructor() { super() this.keys = ['7', '8', '9', '+', '4', '5', '6', '-', '1', '2', '3', '*', '0', '.', '%', '/'] this.state = { ...