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
792
2.25
2
[]
no_license
package br.com.grupomult.flows.animal; import static br.com.grupomult.constants.MessageConstants.ERROR_GET_ANIMALS_BY_ID_NOT_FOUND; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import br.com.grupomult.api.animal.models.Resp...
Java
UTF-8
785
2.328125
2
[]
no_license
package schoology.stepDefinition; import java.io.File; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import cucumber.api.java.After; import cucumber.api.java.Before; public class TestBase { public static WebDriver driver; @Before public void openBrowser() { System.out.printl...
Python
UTF-8
933
2.765625
3
[]
no_license
from icrawler.builtin import GoogleImageCrawler import os import csv filePathDict = 'dogBreedsListGoogle.csv' def loadDogDict(): with open(filePathDict,'rU') as infile: reader = csv.reader(infile, dialect=csv.excel_tab, delimiter=';') dogBreedDict = {str(rows[0]).zfill(3) + '.' + str(rows[1]).repl...
Python
UTF-8
3,024
2.53125
3
[ "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
C++
UTF-8
833
3.5625
4
[]
no_license
#ifndef NTUPLE_H #define NTUPLE_H namespace util{ /** Template for a tuple of all-equal objects*/ template<typename T, int size> class NTuple { protected: /**Elements in the tuple */ T v[size]; public: /** Read only reference to an element in the tuple */ const T& operator[](int pos) const ...
Python
UTF-8
715
3.640625
4
[]
no_license
d_point = [] # 单科成绩列表 d_node = [] # 单科学分列表 num = 0 # 输入科目数 def cal(dp=[], dn=[]): # 计算绩点的函数 sum_point_node = 0 sum_node = 0 for i in range(len(dp)): sum_point_node += (float(dp[i])*float(dn[i])) sum_node += float(dn[i]) return sum_point_node/sum_node while True: num += 1 ...
Python
UTF-8
861
2.59375
3
[]
no_license
import time from block import Block from core import * import sys, traceback import threading class Miner(threading.Thread): def __init__(self,chain,max_len,node): super(Miner,self).__init__() self.node = node self.timeout_seconds = 100 self.chain = chain self.max_len = max_len def run(self): i = 0 wh...
Python
UTF-8
2,985
3.703125
4
[]
no_license
from woordenlijst.woordenlijst_filter import * import random class GameState: def __init__(self): self.letters = [] self.score = 0 self.word_set = set() # possible_words(self.letters) self.guesses = set() self.pangram_set = pangrams() def reset_game(self): """...
C#
UTF-8
1,456
3.03125
3
[]
no_license
using Newtonsoft.Json; using System; /// <summary> /// Class which contains info about a saved contact. /// </summary> [Serializable] public sealed class ContactInfo { /// <summary> /// The currently active ContactsPopup. /// </summary> public ContactsPopup ContactsPopup { get; } /// <summary> /...
C++
UTF-8
227
3.15625
3
[]
no_license
struct A {}; struct B { explicit B(A) {} }; struct C { C(A a): b(a) { static_assert(std::is_convertible<A, decltype(b)>, "Must be convertible."); } B b; }; struct D { D(A a): b(implicit_cast(a)) { } B b; };
Java
UTF-8
1,000
2.53125
3
[]
no_license
package fileTransfer; import javax.swing.text.StyledDocument; import uMessenger.ChatClient; public class FileSender { public FileSender(String dir, StyledDocument doc){ ChatClient zz = new ChatClient(doc); FilesConnection con = new FilesConnection(dir, 5077, doc); FileSender...
C
UTF-8
491
3.109375
3
[]
no_license
#include <stdio.h> #include <signal.h> void * thread_fun(void *arg){ int i = 0; while(i++<3){ printf("thread loop times %d\n",i); sleep(1); } return (void *)100; } int main(){ pthread_t tid; pthread_create(&tid,NULL,thread_fun,NULL); //pthread_detach(tid); void *ret; int err; while(1){ err = pthread_j...
Python
UTF-8
2,836
2.734375
3
[ "Apache-2.0" ]
permissive
""" """ import h5py import numpy as np import os from matplotlib import pyplot as plt PWD = os.path.dirname(os.path.realpath(__file__)) def load_data(): """ """ train_dataset = load_train_datasets() # print(type(train_dataset)) train_set_x_orig = np.array(train_dataset['train_set_x'][:]) # you...
C
UTF-8
2,251
3.078125
3
[]
no_license
/* stringbank.c, Copyright (c) 2005 Michael C. Martin */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *...
Java
UTF-8
215
2.046875
2
[]
no_license
package com.cms.exceptions; import com.cms.frameclass.StateCode; public class DBBoonException extends CMSException { public DBBoonException(String message) { super(StateCode.DB_BOON, message); } }
Shell
UTF-8
1,392
3.71875
4
[]
no_license
#!/bin/bash set -x #CMI Annapolis PACS ipAddr1="172.16.1.3" dbName1="pacsdbcmi" file1="cmi_studies_annap_pacs.txt" var1="$ipAddr1 $dbName1" #CMI cloud instance ipAddr2="192.168.179.12" dbName2="pacsdbcmi" file2="cmi_studies_cloud.txt" var2="$ipAddr2 $dbName2" FILES="cmi_studies_annap_pacs.txt cmi_studies_cloud.txt ...
Ruby
UTF-8
852
3.265625
3
[]
no_license
require 'pathname' require 'io/console' def is_directory_valid dir bool = (File.directory?(dir))? true : false end def is_file_valid filename bool = (File.file?(filename))? true : false end def count_bits pathname pn = Pathname.new(pathname) dir, basename = pn.split set_bits_counter = 0 unset_bits_counte...
Java
UTF-8
249
2.390625
2
[]
no_license
package com.ikea.warehouse.exceptions; public class ObjectNotFoundException extends RuntimeException { public ObjectNotFoundException(String objectName, long id) { super("Cannot find Object " + objectName + " with id : " + id); } }
Java
UTF-8
465
2.859375
3
[]
no_license
package mhp; public class MhpLoopNode extends MhpNode { public MhpNode s; public MhpLoopNode(MhpNode s) { this.s = s; } public String toString() { String string = "Loop - ("; if (s != null) string += s.toString(); else string += " "; string += ")"; return string; } public MhpInfo accept(M...
Markdown
UTF-8
2,497
2.609375
3
[]
no_license
ConNextor ========= ### Description ConNextor is a web platform to gather bright minds, spawn creativity and build projects. (add in more!!) ### Running this application #### Prerequisites You need the following installed, preferably on a Linux system. _The versions are what is used during core development, use o...
Java
UTF-8
3,898
2.6875
3
[]
no_license
package hangMan; import java.awt.event.*; import java.awt.*; import java.io.File; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.swing.*; public class WinScreen extends JPanel implements ActionListener{ private JPanel background; private JPanel mainPanel; /** ...
Java
UTF-8
2,834
3.359375
3
[]
no_license
package color_factory; import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import javax.vecmath.Color3f; public class ColorFactory { /** The cubic bezier curve interpolates the colors. */ private CubicBezierCurve3f colorCurve = null; /** This map collects all t...
C
UTF-8
1,959
2.921875
3
[]
no_license
#ifndef ARRAY_LIST_H_ #define ARRAY_LIST_H_ #include <stdlib.h> #include "mat4.h" #include "terrain.h" #define DEFINE_ARRAY_LIST(T, name) \ typedef struct { \ T *data; ...
C
UTF-8
315
3.546875
4
[]
no_license
#include<stdio.h> #include<string.h> int main() { char s[100],s1[100]; int i,j; printf("Enter a string:"); gets(s); printf("\nEnter a another string:"); gets(s1); i=strlen(s); for(j=0;j<strlen(s1);j++) { s[i]=s1[j]; i++; } printf("\nThe concatinated string:%s",s); }
Python
UTF-8
769
3.375
3
[]
no_license
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def middleNode(self, head: ListNode) -> ListNode: """temp= head # method 1 length=0 while(temp): len...
Java
UTF-8
3,233
2.328125
2
[]
no_license
package com.thelearningproject.pessoa.gui; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import com.thelearningproject.R; import com.thelearningproject.infraestrutura.uti...
Markdown
UTF-8
1,260
3.0625
3
[ "MIT" ]
permissive
# Web Share Shim A polyfill for the WebShare API. It provides `navigator.share()` so you can share content on any device via WhatsApp, Telegram, Facebook, e-mail, and SMS. Try the [demo](http://nimiq.github.io/web-share-shim/demo/)! The whole package is 9.6kB minified, 4kB gzipped and licensed under the MIT License. #...
Java
UTF-8
2,410
2.09375
2
[]
no_license
package com.example.hangtrantd.dacnpm.home; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.L...
Java
UTF-8
3,532
2.515625
3
[]
no_license
package study.wyy.datatransfer.spring.utils; import java.lang.annotation.Annotation; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * @author wyaoyao * @description *...
C++
UTF-8
8,572
3.234375
3
[]
no_license
#include "lib.h" #include "logger.h" #include <math.h> #include <iostream> #include <SDL/SDL_image.h> using namespace std; void read_obj(const char *filename, GLfloat (*vertices)[3], GLfloat (*textures)[2], GLfloat (*normals)[3]) { } void matrixMultiply(float* matrix, float* vector, float* result) { float sum;...
Java
UTF-8
600
1.984375
2
[]
no_license
package com.blog4android.crashreporter; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.util.Log; import android.widget.Toast; public class Receiver extends BroadcastReceiver { private ReceiverSuport receiveSuport; ...
Java
UTF-8
2,589
3.3125
3
[]
no_license
package biblioteca; public class Libro { private String titulo_libro; private String autor; private int num_ejemplares; private int num_ejemplares_prest; // CONSTRUCTOR POR DEFECTO // public Libro(){ } // CONSTRUCTOR CON PARAMETROS // public Libro(String titul...
Python
UTF-8
101
3.3125
3
[]
no_license
num=int(input("introduzca numero: ")) if num %2 == 0: print ("par") else: print ("impar")
Python
UTF-8
9,895
2.78125
3
[]
no_license
from __future__ import absolute_import, division import argparse import csv import datetime import os from pathlib import Path import time import torch from tqdm.auto import tqdm from transformers import BertForQuestionAnswering from dataset_korquad import KorquadDataset from evaluate_korquad import exact_match_score, ...
Java
UTF-8
1,392
2.5625
3
[]
no_license
package org.websparrow.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.anno...
Python
UTF-8
2,441
2.84375
3
[]
no_license
from unittest import TestCase from sudokudlx.sparsematrix import SparseMatrix from sudokudlx.sudoku import SudokuPuzzle from sudokudlx.fileutil import build_sudoku from sudokudlx import sudoku from copy import deepcopy blank = sudoku.build_blank_board() class SudokuTests(TestCase): def testRowColToBox(self): ...
C++
UTF-8
788
3.453125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <map> using namespace std; class Solution { public: // This method costs too much time // int climbStairs(int n) { // if (n < 0) { // return 0; // } // if (n <= 1) { // return 1; // } // return...
C++
UTF-8
719
2.625
3
[]
no_license
#include <cstdio> #include <iostream> #include <algorithm> #include <vector> #define MAXN 1000 #define MAXVC 5000 #define MAXT 2000 using namespace std; int DP[MAXT + 1]; int n,t; typedef pair<int,int> pii; vector<pii> rods; int inline max(int x, int y) { return (x > y) ? x : y;}; int solve() { DP[0] = 0; fo...
C
UTF-8
2,039
3
3
[ "MIT" ]
permissive
#include "header.h" // in this file we handle cd command and related arguments ll CD(char **args) { // if input is just cd if (args[1]==NULL) { chdir(root); for(int i=0; i<1024; i++) { prev[i] = root[i]; } return 1; } if(strcmp(args[1], "-")!=0) ...
Markdown
UTF-8
1,185
2.671875
3
[]
no_license
# nrx-term [![Build Status](https://travis-ci.com/halbu/nrx-term.svg?branch=master)](https://travis-ci.com/halbu/nrx-term) `nrx-term` is a hardware-accelerated, browser-based terminal emulator for game development. <img src="https://raw.githubusercontent.com/halbu/nrx-term/master/img/nrx1.gif" width="45%"></img> <im...
C#
UTF-8
1,037
3.015625
3
[]
no_license
using System; using Xunit; using System.Collections.Generic; namespace markandtoys.tests { public class UnitTest1 { [Fact] public void Test1() { int n = 7, k = 50; List<int> prices = new List<int>() { 1, 12, 5, 111, 200, 1000, 10 }; int e...
Python
UTF-8
1,358
3.4375
3
[]
no_license
test_data = 5 input_data = 3001330 class Elf(object): n = 0 def __init__(self, right=None): self.left = None self.right = right Elf.n += 1 self.n = Elf.n def remove_self(self): self.left.right = self.right self.right.left = self.left return self.le...
JavaScript
UTF-8
872
2.578125
3
[]
no_license
const throwError = require('./throwAnError'); global.console = { log: jest.fn(), }; describe('test try and catch', () => { test('verify by passing an invalid json', (done) => { const callbackFn = () => { expect(global.console.log).toHaveBeenCalledWith('Unexpected token s in JSON at position 0'); d...
C#
UTF-8
463
2.859375
3
[]
no_license
namespace ProcessorScheduling { public struct Task { public Task(int value, int deadline, int index) { this.Value = value; this.Deadline = deadline; this.Index = index; } public int Value { get; } public int Deadline { get; } ...
Python
UTF-8
168
2.9375
3
[]
no_license
def calcula_valor_devido(x): y = 10000 * x * 0.12 return y print(calcula_valor_devido(9)) '''x é o nº de meses após o emprestimo e y é o valor total pago'''
C++
UTF-8
2,168
2.9375
3
[]
no_license
#include "MorseTranslator.h" #include "MorseBST.h" MorseTranslator::MorseTranslator() { morseBst = new morsebst::MorseBST(); } MorseTranslator::~MorseTranslator() { delete morseBst; // recursivelly will delete all nodes in a binary search tree } const char* MorseTranslator::translate2Morse(const char charact...
C#
UTF-8
1,825
3.796875
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Usando_A_Calculadora.Calculadora { public class Calculator { static void Main(string[] args) { } public void Calc() {...
JavaScript
UTF-8
3,578
2.953125
3
[]
no_license
/************************************************************************************************************************** ** Program name: CS2901 Project scrollBox.js file ** Author: Takahiro Watanabe ** Date: 05/22/18 ** Description: This is the JavaScript file to create the scroll box and append to the home pag...
PHP
UTF-8
259
2.5625
3
[]
no_license
<?php include('flag.php'); function welcome($arr) { $data = "I am looking at you %s"; foreach ($arr as $_k => $_v) { $data = sprintf($data,$_v); } echo $data; } $arr = array($_GET['myname'],$flag); echo welcome($arr).'<br>'; highlight_file(__FILE__);
Markdown
UTF-8
613
3.125
3
[]
no_license
# 행렬의 덧셈 [행렬의 덧셈](https://programmers.co.kr/learn/courses/30/lessons/12950) ### 1.이해 - 행과 열의 크기가 같은 두 행렬의 같은 행, 같은 열의 값을 서로 더한다. ### 2.계획 - 자바스크립트의 2차원 배열을 어떻게 활용해야 하는가? - map을 이용해서 2차원 배열의 원소가 되는 1차원 배열들을 더하게 해 주는 sumMatrix 함수를 구현. - 2차원 배열의 원소 개수만큼 for문을 돌면서 더해 준다. ### 3.실행 ### 4.반성 - solution2 에서는 map을 두번 사용...
C#
UTF-8
2,026
2.6875
3
[ "MIT" ]
permissive
using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Analysis; using Microsoft.Diagnostics.Tracing.Analysis.GC; using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; namespace Chapter6.Examples { /* * Uses EventPipeEventSource for analyzing EventP...
PHP
WINDOWS-1252
411
3.296875
3
[]
no_license
<? class comp{ public function sum($a,$b){ return $a+$b; } public function prt($a,$c){ return $a*$c; } public function product($a,$b,$c){ $a = $this->sum($a,$b); return $this->prt($a,$c); } } $math = new comp(); ...
Python
UTF-8
220
3.046875
3
[]
no_license
my_dic = {'x':500, 'y':5874, 'z': 560} max=0 min=my_dic["x"] for dic in my_dic: if my_dic[dic]>max: max=my_dic[dic] elif my_dic[dic]<min: min=my_dic[dic] print(max) print(min) #minimum and maximum
Java
UTF-8
11,056
2.15625
2
[]
no_license
package com.jphale.discount.sales; import com.jphale.discount.user.entity.UserType; import com.jphale.discount.sales.entity.SalesTransaction; import com.jphale.discount.sales.repository.ISalesTransactionRepository; import com.jphale.discount.sales.service.implementation.SalesTransactionServiceImpl; import com.jphale.d...
C++
UTF-8
1,264
2.515625
3
[]
no_license
#pragma once #include "command.h" #include "../shapes/shape.h" #include <QColor> #include <QQmlContext> #include <memory> #include <vector> class PaintCommandBase : public Command { public: PaintCommandBase(QImage * canvasImage, std::unique_ptr<Shape> && shape) : canvasImage_(canvasImage) ...
C#
UTF-8
4,637
2.5625
3
[]
no_license
using InternetServicesProvider.BusinessLayer.Interfaces; using InternetServicesProvider.BusinessLayer.Services.Repository; using InternetServicesProvider.Entities; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; namespace InternetServicesProvider.BusinessLayer.Services...
Python
UTF-8
295
3.5
4
[]
no_license
''' price of a house is 1000, if the buyer has good_credit he has to make a dp of 10% else a dp of 20% ''' price = 1000 good_credit = False if good_credit: dp = 0.1 * int(price) print('down payment is ' + str(dp)) else: dp = 0.2 * int(price) print('down payment is ' + str(dp))
Shell
UTF-8
349
3.015625
3
[]
no_license
#!/bin/bash # gfortran -c -g spacer.f >& compiler.txt if [ $? -ne 0 ]; then echo "Errors compiling spacer.f" exit fi rm compiler.txt # gfortran spacer.o if [ $? -ne 0 ]; then echo "Errors linking and loading spacer.o" exit fi rm spacer.o # chmod ugo+x a.out mv a.out ~/binf77/$ARCH/spacer # echo "Program install...
C++
UTF-8
770
2.53125
3
[]
no_license
#include "iengine.h" #include "Circle.h" #include "Vector2.h" #include "Utility.h" #include "Triangle.h" #include "Rectangle.h" #include <cmath> #include <stdlib.h> using namespace std; const Vector2 size(1920,1080); void mousecallback(GLFWwindow* window, int button, int action, int mods); void keycallback(GLFWwindow...
C++
UTF-8
690
2.75
3
[ "MIT" ]
permissive
#include "Playground.h" #include "Player.h" #include "Controller.h" void Playground::DoMove(Move* const move) { if (move == nullptr) { return; } this->TakeSticks(move->GetMove()); this->pMoves->push_back(move); } void Playground::TakeSticks(int number) { if (number < 0) { throw EXCEPTSWICTH("Number below ...
PHP
UTF-8
1,985
2.5625
3
[]
no_license
<?php session_start(); require('xmlresponse.php'); $conn = mysqli_connect('localhost', 'root', ''); mysqli_select_db($conn, 'schoolborad'); $student_id = $_GET['id']; $school_borad = $_GET['school_board']; $avg = "SELECT *, AVG(grade) FROM student as s JOIN student_grades as sg ON s.id = sg.student_...
Markdown
UTF-8
2,415
2.859375
3
[]
no_license
# CS 487 - Team Project (Fall 2017) Team B - Robert Judka, Mayank Bansal, Changyu Wu, Paul Myers ## mySchedule **Class Scheduling Made Easy!** The basic functionality of the application will allow students to plan out and create a class schedule given a list of classes they want to take. To create their class list,...
Java
UTF-8
5,127
2.46875
2
[]
no_license
package ielab.hibernate; import java.io.Serializable; import java.security.interfaces.RSAKey; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import org.apache.co...
Shell
UTF-8
229
2.765625
3
[ "ECL-2.0" ]
permissive
#!/bin/sh # This script was made mainly to combat Valpo's ugly XML file=$1 # replace anything that has extra text in the ptag with '<p>' # basically '<p lots_of_extra_stuff asdfasdfasdf >' --> '<p>' sed "s|<p[^>]*>|<p>|" $file
Java
UTF-8
1,247
3.828125
4
[]
no_license
package _09_facade._01_console_example; import java.util.ArrayList; import java.util.List; // highest construct public class Console { private List<ViewPort> viewPorts = new ArrayList<>(); private int width; private int height; public Console(int width, int height) { this.width = width; ...
Java
UTF-8
2,220
2.140625
2
[]
no_license
package com.crm.vtiger; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.sele...
Shell
UTF-8
702
3.5625
4
[ "MIT" ]
permissive
#! /bin/bash # Setup steps for local installation of DogBot Firmware # if first argument is 1, also build the code DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #copy the sample config (individual users will replace with their own dog-specific configs) echo "copying configuration to /home/$USER/.config/Dog...
C#
UTF-8
1,763
2.734375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.SqlClient; using Productores.Logic; using Productores.BD; namespace Productores.DA { public class ProductorDA { public static int Agregar(Productor pproductor) { int retorno = 0; ...
Swift
UTF-8
2,069
3.859375
4
[]
no_license
import Foundation /// A type that stores values for red, green and blue components of a color. /// /// Use this type when you need a lightweight and type-safe way to store colors /// without relying on UI frameworks like `UIKit` or `CoreGraphics`. /// struct RGB { /// The red component, specified as a ...
Java
UTF-8
1,223
1.953125
2
[]
no_license
/* * 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. */ package it.univaq.f4i.iw.pollweb.data.model; import java.util.List; /** * * @author Pagliarini Andrea */ public interface Survey {...
Java
UTF-8
5,205
1.523438
2
[]
no_license
package kotlin.reflect.jvm.internal.impl.load.java; /* compiled from: utils.kt */ public final class r { /* JADX WARNING: Missing block: B:37:0x00bf, code: if (kotlin.reflect.jvm.internal.impl.builtins.g.H(r4) != false) goto L_0x00c3; */ public static final kotlin.reflect.jvm.internal.impl.loa...
Markdown
UTF-8
2,289
3.109375
3
[ "MIT" ]
permissive
## 安装 ### npm 安装 推荐使用 npm 的方式安装,它能更好地和 [webpack](https://webpack.js.org/) 打包工具配合使用。 ```shell npm i bbplus-element -S ``` ### 引入 bbplus-element 你可以引入整个 bbplus-element,或是根据需要仅引入部分组件。我们先介绍如何引入完整的 bbplus-element。 #### 完整引入 在 main.js 中写入以下内容: ```javascript import Vue from 'vue' // element-ui import ElementUI from 'ele...
JavaScript
UTF-8
1,649
2.53125
3
[]
no_license
import ServerActions from './actions/ServerActions'; import axios from 'axios'; const API = { getAnimals() { axios.get('/api/animals') .then(res => ServerActions.receiveAnimals(res.data)) .catch(console.error); }, getAnimal(id) { axios.get(`/api/animals/${id}`) .then(res => ServerAction...
C++
UTF-8
3,491
3.28125
3
[]
no_license
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; struct TreapNod { //node declaration int data; int priority; TreapNod* l, *r; TreapNod(int d) { //constructor this->data = d; this->priority = rand() % 100;//cho ra so ngau nhien tu 1 den 100 this->l= this->r =...
Java
UTF-8
1,803
3.671875
4
[]
no_license
package cq2013; import java.io.BufferedReader; import java.io.FileReader; import java.util.Arrays; /** * Created by RobertPC on 7/22/2017. */ public class Prob04 { //String to filePath public static final String filePath= "inputs/2013/Prob04.in.txt"; public static void main(String[] args){ try{...
Python
UTF-8
1,049
3.171875
3
[]
no_license
# File: ScapeAlgo import xlsxwriter from nltk.tokenize import sent_tokenize class ScrapeAlgo: file = open('../../PunctuatedText/Berakhot.txt', mode='r', encoding='utf8') file_txt = file.read() sentences = sent_tokenize(file_txt) workbook = xlsxwriter.Workbook('Berakhot.xlsx') worksheet = workbook....
Java
UTF-8
3,867
2.59375
3
[ "MIT" ]
permissive
package io.kang.unit_test.domain_unit; import io.kang.domain.Profile; import io.kang.domain.User; import io.kang.enumeration.Suffix; import io.kang.unit_test.singleton_object.domain_unit.UserUpdateSingleton; import org.junit.Assert; import org.junit.Test; import java.io.IOException; import java.time.LocalDateTime; im...
PHP
UTF-8
3,566
2.9375
3
[]
no_license
<?php //establish MySQL connection $dbhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "tugasakhir"; $db = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname); //print but with auto append <br> function cetak($var) { echo $var."<br>"; } //function to test variable outcomes //automat...
Go
UTF-8
3,415
2.546875
3
[]
no_license
package handler import ( "encoding/json" "fmt" "net/http" "opa-backend/configs" "opa-backend/utils" "github.com/gin-gonic/gin" ) func CreateCode(config configs.ApiConfig) gin.HandlerFunc { return func(c *gin.Context) { var req createCodeRequest err := c.ShouldBindJSON(&req) if err != nil { fmt.Print...
JavaScript
UTF-8
89
2.90625
3
[]
no_license
//12.3 3 function f() { let obj = Object.create(null) console.log(obj) } f()
C#
UTF-8
650
2.515625
3
[ "BSD-2-Clause-Views", "BSD-2-Clause" ]
permissive
namespace Aperture { /// <summary> /// Represents a generic video frame /// </summary> public abstract class VideoFrame { /// <summary> /// Number of pixels in a scanline /// </summary> public int Width { get; protected set; } /// <summary> /// Number of scanlines ...
Markdown
UTF-8
960
3.234375
3
[]
no_license
--- tab-bar: width: 700 padding: '1.5rem' desc: | The tab bar is used to navigate between tab pages. The tab bar uses jQuery to read the `href` to target the proper page to display, therefore the tab bar each `href` must correspond with a tab page `id`. tab-page: width: 700 padding: '1.5rem' desc: | ...
C#
UTF-8
795
2.8125
3
[ "Apache-2.0" ]
permissive
using System; namespace OpenStory.Common.Game { /// <summary> /// The type of an item. /// </summary> [Serializable] public enum ItemType { /// <summary> /// Default value. /// </summary> Unknown = 0, /// <summary> /// The item is an equip. It d...
PHP
UTF-8
799
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; /** * @property int $id * @property string $nome * @property string $data_nascimento * @property string $email * @property string $foto * @property boolean $is_active * @property string $created_at * @property string $updated_at * @property...
JavaScript
UTF-8
414
2.53125
3
[]
no_license
const axios = require('axios'); module.exports = function findPost(query, s, cb) { let url = 'https://vivacious-port.glitch.me/find/method'; axios.post(url, query) .then(response => { if (response.data) { cb(response.data); } else { cb('no match'); } }) .catch(function (error) { ...
C++
UTF-8
330
2.828125
3
[]
no_license
#ifndef HINDEX_II_H #define HINDEX_II_H #include <vector> class Solution_275 { public: int hIndex(std::vector<int>& citations) { int hindex = citations.size( ); for (int i = 0; i < citations.size( ); i++) { if (citations[i] < hindex) hindex--; else break; } return hindex; } }; #endif // !HI...
Java
UTF-8
13,987
1.945313
2
[ "Apache-2.0" ]
permissive
package org.ihtsdo.buildcloud.core.service.validation.precondition; import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import javax.xml.bind.JAXBException; import org.ihtsdo.buildcloud.core.da...
JavaScript
UTF-8
461
3.984375
4
[]
no_license
function isIsogram(str){ //determines if string as no repeating letters (consecutive or not) ignoring case letters = [] for(var i=0; i < str.length; ++i){ if (letters.includes(str[i].toLowerCase())){ console.log('Sting is not an isogram') return false; } else{...
Python
UTF-8
2,394
2.75
3
[]
no_license
import re MonsterList = [] XML = open(".\\Mordenkainens Tome of Foes.xml") def XMLRead(Tag, MultiOutput = 0): XMLOutput = re.search('<'+ Tag +'>(.*)</'+ Tag +'>', XML.readline()) if XMLOutput != None: return XMLOutput.group(1) else: return "" while True: Line = XML.readli...
C
UTF-8
6,695
3.921875
4
[]
no_license
/**************************************************\ * Filename: linkedList.c * * Author: Sue Bogar * * Edited By: Katherine Gibson (gibsonk@seas) * * Edited By: Wesley Zhao (weszhao@seas) * * Date Written: 11/17/98 * * EMail: bo...
Python
UTF-8
598
3.03125
3
[]
no_license
class Solution(object): def validTree(self, n, edges): """ :type n: int :type edges: List[List[int]] :rtype: bool """ dic = {i:set() for i in range(n)} for i, j in edges: dic[i].add(j) dic[j].add(i) stack = [ dic.keys()[0] ] visited = set() while stack: node = stack.pop() if node in vi...
C#
UTF-8
300
2.59375
3
[ "MIT" ]
permissive
 using System; using System.Collections.Generic; class Program { static void Main() { var list = new List<byte[]>(); for (int i = 0; i < 100000; i++) { list.Add(new byte[100000000]); } } }
PHP
UTF-8
6,414
2.703125
3
[ "MIT" ]
permissive
<?php namespace Getresponse\Sdk\Client\Handler; use Getresponse\Sdk\Client\Debugger\Logger; use Getresponse\Sdk\Client\Exception\ConnectException; use Getresponse\Sdk\Client\Exception\ExceptionFactory; use Getresponse\Sdk\Client\Exception\RequestException; use Getresponse\Sdk\Client\Handler\Call\Call; use Getresponse...
Java
UTF-8
1,964
2.40625
2
[]
no_license
package com.example.minesweeper; import android.graphics.drawable.Drawable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; impo...
Java
UTF-8
1,511
3.703125
4
[]
no_license
package Encapsulation.Chalange; public class Printer { private int tonerLevel; private int pagesPrinted; private boolean duplex; public Printer(int tonerLevel, boolean duplex) { if(tonerLevel > -1 && tonerLevel <=100) { this.tonerLevel = tonerLevel; } else ...
C++
UTF-8
14,403
3.8125
4
[]
no_license
//NAME : SHANTANU TYAGI //SID : 201801015 //ASSIGNMENT : 4 //DATE : 8/4/19 //PROGRAM : Sorting Algorithms #include<iostream> using namespace std; template <typename E> class List { void operator = (const List&) {} List(const List&) {} public: //constructors and destructo...
JavaScript
UTF-8
334
3.171875
3
[]
no_license
/* done */ // Negative tests to make sure the coroutine detection is not too overeager class Greeter { function Hello(a: int, b: int) { print(a); yield; } static function StaticHello(a: int, b: int) { print (a); yield; } } // does nothing var t = Greeter(); t.Hello(1, 2); Greeter.StaticHello(1, 2); p...
PHP
UTF-8
9,097
2.6875
3
[ "MIT" ]
permissive
<?php // TimThumb script created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks // http://code.google.com/p/timthumb/ // MIT License: http://www.opensource.org/licenses/mit-license.php /* Parameters allowed: */ // w: width // h: height // zc: zoom crop (0 or 1) // q: quality (default is 75 and max is...
C
UTF-8
1,048
3.390625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> void exibeVetor(int gVetor[], int n); int insertSort(int gVetor[], int n); void main (void) { int gVetor[40000]; int n = sizeof(gVetor)/sizeof(gVetor[0]); clock_t time; double t_time; srand(0); for(int i = 0; i < 40000; i++) gVe...
JavaScript
UTF-8
1,255
2.59375
3
[]
no_license
import React, { useState,useEffect } from 'react'; import {BrowserRouter as Router,Link,Route} from 'react-router-dom' function Index(){ useEffect(()=>{ console.log('Index页面的--来了---'); return ()=>{ console.log('Index页面的--走了---'); } },[]) return( <div> ...