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
C++
GB18030
1,590
3.421875
3
[ "MIT" ]
permissive
#include<iomanip> #include<iostream> using namespace std; //from[0]from[right-left+1]d template <class T> void Copy(T d[],T from[],int left,int right) { int size = right-left+1; for(int i = 0;i<size;) { d[left++] = from[i++]; } } //ϲa[left:i],a[i+1:right]bõµb template <class T> void Merge(T a[],T b[],int left,in...
C#
UTF-8
4,122
2.578125
3
[ "Apache-2.0" ]
permissive
namespace MedEasy.RestObjects.Tests { using FluentAssertions; using System; using System.Linq; using Xunit; public class TypeExtensionsTests { private abstract class Person { public string Firstname { get; set; } public string Lastname { get; set; } ...
Markdown
UTF-8
11,583
2.65625
3
[ "MIT" ]
permissive
--- layout: default --- # 1997-01-05 - Re: Sandy and I will run a cypherpunks "moderation" experiment in Jan ## Header Data From: Pierre Uszynski \<pierre<span>@</span>rahul.net\><br> To: cypherpunks@toad.com<br> Message Hash: 89c3761250af3ca1c5da7fe2f8494dd491895deee0b9ee1a2c5f43eba2d3be22<br> Message ID: \<1997010...
Swift
UTF-8
4,203
2.6875
3
[]
no_license
// // CandyTableViewController.swift // CandySearch // // Created by mac on 15/1/27. // Copyright (c) 2015年 mac. All rights reserved. // import UIKit class CandyTableViewController: UITableViewController,UISearchBarDelegate,UISearchDisplayDelegate { var candies = [Candy]() var filteredCandies = [Candy]() ...
C
BIG5
3,680
3.828125
4
[]
no_license
/*********************************************************/ /*i{W١j: 9_i_search.c */ /*i{\j: ɷjM */ /* J : @դwguȤvƧǪ */ /* njM key */ /* X : jML{MG */ /*iƵcj: }Cc ...
PHP
UTF-8
1,503
2.515625
3
[]
no_license
<?php $activity; if(isset($_POST['activity'])) $activity = $_POST['activity']; include('connect_db.php'); $sql; $event = array(); if(isset($_POST['activity'])){ $sql = "SELECT `log-activity`.`ID` , `dim-time`.`Date`, `dim-farm`.`Name`,`db-activity`.`Activity`,`log-activity`.`Note` FROM `log-activity` JOIN ...
Java
UTF-8
109
1.953125
2
[]
no_license
package week1.lab1_school; public interface IStudent { double getGpa(); void addCourse(Course course); }
Java
UTF-8
5,258
2.359375
2
[]
no_license
package com.pp.infa.i_budynki.domain.repo.impl; import com.pp.infa.i_budynki.domain.Login; import com.pp.infa.i_budynki.domain.User; import com.pp.infa.i_budynki.domain.repo.UserDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springfram...
C++
UTF-8
1,055
2.84375
3
[]
no_license
// // Created by Rohan Rodrigues on 12/10/20. // #include <vector> #include "readFromFile.hpp" #include "airport.h" #include "route.h" #include "airline.h" #include <string> using namespace std; Airport::Airport(string name) { this->name = name; this->fromAirportData = false; } Airport::Airport(string name...
Shell
UTF-8
290
2.640625
3
[ "MIT" ]
permissive
#!/bin/bash -x db_name=$1 if [ "$db_name" == "" ]; then db_name='emmy_development' fi #be='bundle exec' be='foreman run' sudo -u postgres dropdb $db_name && sudo -u postgres createdb $db_name && $be rake db:create && $be rake db:migrate && $be rake db:seed && rm public/system/documents
C#
UTF-8
2,085
3.6875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SortingAlgorithms { public class SetOfStacks { int threshold; List<int[]> setOfStack = new List<int[]>(); int top = -1; public SetOfStacks(int threshold...
PHP
UTF-8
699
3.21875
3
[]
no_license
<?php // set image width and height $w = 20000; $h = 20000; // randoms coords for polygons $coords = []; foreach(range(0,127) as $p){ $coords[] = rand(0,$w); $coords[] = rand(0,$h); } // create image $image = imagecreatetruecolor($w, $h); // fill the background imagefilledrectangle($image, 0, 0, $w, $h,...
Python
UTF-8
469
3.234375
3
[]
no_license
class Solution: """Purpose: Returns the destination city, from a list of paths from city A to city B. """ def destCity0(self, paths: List[List[str]]) -> str: mydict = {} for p in paths: for i in range(2): if p[i] not in mydict: mydict[p[i]...
PHP
UTF-8
1,302
3.109375
3
[]
no_license
<?php namespace App\Csv; use App\Csv\Error\ErrorBag; /** * Class Result. */ class Result { /** * @var int */ private $saved = 0; /** * @var ErrorBag */ private $errors; /** * Result constructor. */ public function __construct() { $this->errors = n...
Shell
UTF-8
217
3.4375
3
[]
no_license
#!/bin/bash if [ $# -ne 2 ]; then echo "Usage: cl.sh first_name user_name" exit 1 fi echo "This is the first parameter: $1" echo "This is the second parameter: $2" echo "The number of arguments is: $#"
Markdown
UTF-8
3,219
3.46875
3
[]
no_license
# Definiendo JSon ### **17100226** | *Francisco Fernando González Rodríguez* ## ¿Qué significa JSon? ### **JavaScript Object Notation** Eso es lo que significa JSon y como su nombre dice, lo usa el lenguaje JavaScript. ## ¿Qué es JSon? JSON es una **sintaxis** para serializar objetos, arreglos, números, cade...
Rust
UTF-8
4,641
3.078125
3
[]
no_license
use crate::solver::Solver; use itertools::Itertools; use std::collections::HashMap; use std::fs::File; use std::io::prelude::*; use std::io::BufReader; pub struct Guest { name: String, neighbours: HashMap<String, isize>, } impl Clone for Guest { fn clone(&self) -> Guest { Guest { name:...
Markdown
UTF-8
2,267
3.359375
3
[]
no_license
# person-chengyu #include<iostream> #include<cstdio> #include<cstring> #include<new> #include<stddef.h> using namespace std; typedef int T; template <class T> class dynamicArray{ private: int* arrayhead; int size; int capacity;//可容纳的数组长度 public: void Initial(dynamicArray &array){ array.arrayhead=NULL; ...
Java
UTF-8
2,379
1.984375
2
[ "Apache-2.0" ]
permissive
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.jps.model.java; import com.intellij.openapi.util.Bitness; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.lang.JavaVersion; impor...
Python
UTF-8
218
3.96875
4
[]
no_license
numeros = [] for i in range(5): numeros.append(int(input('Digite um numero: '))) soma = 0 for i in numeros: soma += i print('A soma do numeros é {}, e a média é igual a {}'.format(soma, soma/len(numeros)))
Java
UTF-8
2,614
2.59375
3
[]
no_license
package com.censusanalyser.adapter; import com.censusanalyser.exception.CensusAndStateCodeAnalyserException; import com.censusanalyser.model.CensusDAO; import com.censusanalyser.model.IndiaCensusCSV; import com.censusanalyser.model.USCensusCSV; import csvbuilder.CSVBuilderException; import csvbuilder.CSVBuilderFactory...
Java
UTF-8
2,877
2.4375
2
[]
no_license
package plugins.treeTable.dialog; import java.awt.*; import javax.swing.*; import plugins.treeTable.EditorDialog; import util.DialogHelper; import xml.TypedElement; public class PortDefinitionDialog extends AbstractDialog implements xml.Types { private static final int [] handledTypes = {TypedElement.PORT}; priv...
Shell
UTF-8
151
2.796875
3
[ "Apache-2.0" ]
permissive
#!/bin/sh srcroot=${srcroot:-$(dirname $(readlink -f "$0"))} cd "$srcroot/.." && git archive --format=tar --prefix=$package-$version/ HEAD | gzip -6
Python
UTF-8
245
2.640625
3
[]
no_license
def solution(A): A.sort() for n in range(len(A)-2): if A[n] + A[n+1] > A[n+2]: if A[n] + A[n+2] > A[n+1]: if A[n+1] + A[n+2] > A[n]: return 1 return 0
C#
UTF-8
1,589
3.265625
3
[ "MIT" ]
permissive
using System; namespace Exercise52 { class Program { static void Main(string[] args) { Console.OutputEncoding = System.Text.Encoding.UTF8; double[,] notas; double media; string[] nomes; int qtdAlunos, qtdNota, contAluno, contNota; ...
Java
UTF-8
171
2.203125
2
[]
no_license
private static SimpleDateFormat dateParser(){ SimpleDateFormat dateParser=new SimpleDateFormat(DATE_FORMAT); dateParser.setTimeZone(TIME_ZONE); return dateParser; }
SQL
UTF-8
1,601
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 26-01-2014 a las 23:31:51 -- Versión del servidor: 5.6.12-log -- Versión de PHP: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
C++
UTF-8
7,024
3.921875
4
[]
no_license
// Everything Iterators! // // There are several types of iterators and you are going to learn everything // you'll ever need to know about iterators in this one file! Money Back Guarantee! // // Iterators behave very similar to pointers. They can be incremented and // dereferenced, just like a pointer. // /...
Markdown
UTF-8
11,932
2.921875
3
[]
no_license
# pulldown A way to get your favourite libraries and scripts from the internet, and fast. Built with &hearts; by [@jackfranklin](https://github.com/jackfranklin) and [@phuu](https://github.com/phuu). [![Build Status](https://travis-ci.org/jackfranklin/pulldown.png)](https://travis-ci.org/jackfranklin/pulldown) Supp...
Markdown
UTF-8
3,317
2.75
3
[]
no_license
--- layout: post title: イントロダクション date: 2019-04-10 09:00:00 +0900 categories: gitpod,github author: kamataryo --- # イントロダクション この授業では、主にインターネット上のサービスを利用して実習を行います。情報教室のコンピューターだけでなく、皆さんの個人のコンピューターを使って、ブラウザから各サービスにアクセスすることで実習を進めることができます。 ## 授業で利用するアプリケーション - メールアプリ: 学校のサービスなどを適宜利用してください - ブラウザ: _重要_ Internet Expolorer ...
C++
UTF-8
4,373
2.703125
3
[ "MIT" ]
permissive
#include "Bitmap.hpp" #include <zlib.h> #include <iostream> #include <fstream> Bitmap::Bitmap(AVFrame *frame) { pix_fmt = static_cast<PixelFormat>(frame->format); if( pix_fmt != PIX_FMT_YUV420P ) { throw "Formats other than YUV 4:2:0 are not supported"; } width = frame->width; height = frame->height; avpictu...
SQL
UTF-8
992
3.015625
3
[]
no_license
CREATE TABLE dbo.Gameweeks ( id INT NOT NULL, [name] VARCHAR (16) NOT NULL, deadline_time SMALLDATETIME NOT NULL, average_entry_score INT NOT NULL, finished BIT NOT NULL, data_checked ...
Markdown
UTF-8
3,840
2.546875
3
[ "Unlicense" ]
permissive
# 2 Samuel Cap 04 **1** OUVINDO, pois, o filho de Saul, que Abner morrera em Hebrom, as mãos se lhe afrouxaram; e todo o Israel pasmou. > **Cmt MHenry**: *Versículos 1-7* Veja-se como foi assassinado Is-Bosete! Quando nos desanimem as dificuldades que deveriam estimular nossos esforços, traímos nossas coroas celest...
Python
UTF-8
450
2.84375
3
[]
no_license
import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = input("Enter -") html = urllib.request.urlopen(url, context=ctx).read() soup = BeautifulSoup(htm...
Python
UTF-8
1,489
2.796875
3
[]
no_license
# encoding: utf-8 """ Created by misaka-10032 (longqic@andrew.cmu.edu). TODO: purpose """ from solution import Solution, ListNode def test_0(): sol = Solution() assert sol.detectCycle(None) is None n1 = ListNode(1) n1.next = n1 assert sol.detectCycle(n1) is n1 n1 = ListNode(1) assert s...
Java
UTF-8
268
2.734375
3
[]
no_license
package de.rabea; public class FakeConsole implements Console { private String wordsWritten = ""; @Override public void write(String message) { wordsWritten += message; } public String wordsWritten() { return wordsWritten; } }
Java
UTF-8
2,993
2.84375
3
[ "Apache-2.0" ]
permissive
package cn.cerc.mis.queue; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import cn.cerc.db.core.Datetime; public class QueueConnectionTest { public stati...
C#
UTF-8
8,826
2.53125
3
[]
no_license
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using StardewModdingAPI; using StardewValley; using StardewValley.Objects; using System; using System.Collections.Generic; using System.Linq; using SDV = StardewValley; namespace CJBAutomation { public class Automation { private st...
Java
UTF-8
2,394
2
2
[]
no_license
package com.proximo.inci; import com.proximo.inci.common.DODataRecord; import com.proximo.inci.common.TDate; import com.proximo.inci.common.exception.InvalidData; //import OSSupport; //import DatabaseFunctions; public class DOUserPayment extends DODataRecord { //paymentID is going to be recID ...
Python
UTF-8
3,202
2.890625
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Wed Mar 11 14:01:34 2015 @author: Alireza """ import numpy as np import matplotlib.pyplot as plt from tp_perceptron_source import (rand_gauss, rand_bi_gauss, rand_checkers, rand_clown, plot_2d, plot_gradient, po...
PHP
UTF-8
1,679
2.796875
3
[]
no_license
<?php namespace App\Models; use Illuminate\Support\Str; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Models\Blog; class Tag extends Model { use HasFactory; /** * The primary key for the model. * * @var string */ protected $pr...
C#
UTF-8
1,836
2.640625
3
[]
no_license
/************************************************************************************************************ * Copyright (C) 2019 Francis-Black EWANE * * 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 t...
Python
UTF-8
3,675
2.90625
3
[ "MIT" ]
permissive
import pathlib import typing import toposort from ambix.exceptions import AmbixError from ambix.migration_script import MigrationScript from ambix.utilities import compose_iters, pairwise class MigrationHome: def __init__(self, home_path: pathlib.Path): AmbixError.require_condition( home_path...
C
UTF-8
1,176
2.734375
3
[ "Apache-2.0" ]
permissive
#include "flexaid.h" /*********************************************************************************** * This subroutine returns the number of flexible dihedral bonds of an amino acid * given its three letter code in capital letters * ******************************************************************************...
PHP
UTF-8
351
2.703125
3
[]
no_license
<?php function domain() { return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']; } function href($page, $file = 'index') { echo domain() . '/page/' . $page . '/' . $file . '.php'; } function put($fileName) { $filePath = __DIR__ . '/' . $fileName . '.php'; if (file_exists($filePath)) { ...
Java
UTF-8
1,617
2.359375
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 controller; import java.util.Iterator; import javax.swing.JOptionPane; import modelo_persistencia.Proveedor; import ...
C++
UTF-8
2,431
2.6875
3
[]
no_license
#include <stdio.h> int pux[200]; int puy[200]; int lux[200]; int luy[200]; #define LD(x) ((long double)(x)) int main() { int T; scanf("%d", &T); for (int tst = 1; tst <= T; tst++) { int W, L, U, G; scanf("%d %d %d %d", &W, &L, &U, &G); long double fld = 0.0L; scanf("%d %d", lux, l...
PHP
UTF-8
172
2.953125
3
[]
no_license
<?php // pembuatan variabel $nama_variabel = "VALUE"; //data pribadi $nama = "Wahyu Aprian"; //string $umur = 19; echo $nama; echo "<br>"; echo $umur. " Tahun"; ?>
Python
UTF-8
9,474
3.015625
3
[]
no_license
# -*- coding: utf-8 -*- #Scenariusz: # Rejestracja nowego profilu # # Przypadki testowe: # # Rejestracja nowego profilu z blednym numerem NIP / bez Innego identyfikatora # # Kroki: # 1. Otworzy przeglądarkę Firefox # 2. Wejść na stronę https://lsi-szkol.slaskie.pl # 3. Wprowadzamy login i haslo # 4. Klikamy „Zaloguj si...
Markdown
UTF-8
1,181
3.09375
3
[]
no_license
# Auto Like Tag Instagram (Working 2019) I was looking for a script to do the instagram autofollow, but I didn't find anything working, I decided to create one. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. ### Pr...
C#
UTF-8
667,884
2.96875
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; namespace SystemExtend.Text { public class Encoding { private string name; private static Dictionary<int, int> sjisToUnicode = new Dictionary<int,int>(); private static Dictionary<int, int> unicodeToSjis = new Dictionary<int,int>(); public ...
Java
UTF-8
4,472
2.25
2
[]
no_license
package com.somworld.seller_ui.views.common; import com.google.android.gms.location.LocationListener; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.DialogInterface; import android.os.Bundle; import android.view.LayoutI...
Java
UTF-8
548
1.914063
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 com.teknei.sitm.gsab.dao; import com.teknei.sitm.gsab.PersistenceException; import com.teknei.sitm.gsab.entities.CctmEmp; imp...
Java
UTF-8
5,567
2.328125
2
[]
no_license
package com.ccnu.test.springboot.constant; import java.io.Serializable; import java.util.List; import org.apache.commons.lang3.builder.ToStringBuilder; import org.springframework.http.HttpStatus; /** * @author SirKong * @date 2018/8/28. */ public class OpenAPIResult<T> implements Serializable { private int s...
Python
UTF-8
9,603
2.59375
3
[ "MIT" ]
permissive
# -*- coding: UTF-8 -*- from selenium import webdriver from selenium.webdriver.common.keys import Keys import selenium.webdriver.support.ui as ui import re import os import codecs import sys #import MySQLdb import pymysql import datetime import time import urllib import urllib2 from bs4 import BeautifulSoup #...
Markdown
UTF-8
9,032
2.515625
3
[ "Apache-2.0" ]
permissive
# 实验二:线性判别分析——献血预测 17150011001_陈扬 ## 线性判别分析 •LDA 的思想非常朴素: 给定训练样例,设法将样例投影到一条直线上,使得同样例的投影点尽可能接近、异类样例的投影点尽可能远离;在对新样本进行分类时,将其投影到同样的这条直线上,再根据投影点的位置来确定新样本的类别. ![image-20200517224703133](https://cy-1256894686.cos.ap-beijing.myqcloud.com/cy/2020-05-17-144704.png) ![image-20200517224737836](https://cy-1256894686.cos.ap-bei...
Python
UTF-8
1,177
2.734375
3
[]
no_license
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'ECGO.settings' import Gamble.models as g while 1: username = raw_input('############Please input your username############\n') try: g.user.objects.get(username=username) print '############username has been Registered. Please use another name.##...
Ruby
UTF-8
527
3.578125
4
[]
no_license
require './node' class BinarySearchTree @root_node def initialize(rootData) @root_node = Node.new rootData end def root @root_node end def add value @root_node.add value end def traversal traverse @root_node end def traverse (node) if node == nil return end traverse (node.left) puts n...
Shell
UTF-8
507
3.5
4
[ "MIT" ]
permissive
#!/bin/bash # This script finds your saved login and password credentials # pair in OS X keychain by domain and returns them separated by colon. # Sample usage: # $ find-internet-password gmail.com # example@gmail.com:your-password # This script uses GNU grep because BSD grep doesn't have # PCRE (-P flag). You can get...
Markdown
UTF-8
13,898
2.84375
3
[]
no_license
--- layout: post title: Legacy HTB Writeup date: 2020-05-15 018:00:00 -0400 categories: InfoSec --- The Legacy HTB machine was one of the first HTB machines I ever broke into. It's a retired box that is pretty basic, leaning towards understanding basic methodology and how to make use of CVEs that you find on a bo...
Markdown
UTF-8
951
3.34375
3
[]
no_license
##Getting and Cleaning Data Project #### Project Questions: You should create one R script called run_analysis.R that does the following. * Merges the training and the test sets to create one data set. * Extracts only the measurements on the mean and standard deviation for each measurement. * Uses descriptive activ...
TypeScript
UTF-8
888
2.546875
3
[]
no_license
import { Action } from '@ngrx/store'; import { Navigation } from '../domain'; export enum ActionTypes { RECOMMEND_NAVIGATION = '[Nav] Recommend_navigation', RECOMMEND_NAVIGATION_SCCUESS = '[Nav] Recommend_navigation success', RECOMMEND_NAVIGATION_FAIL = '[Nav] Recommend_navigation fail' }; export class ...
Java
UTF-8
2,307
3.5
4
[]
no_license
// https://leetcode.com/problems/maximum-width-of-binary-tree // // Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binary tree has the same structure as a full binary tree, but some nodes are null. // The width of one le...
Markdown
UTF-8
1,387
3.1875
3
[ "MIT" ]
permissive
--- layout: blogpost title: 'Cindy Gallop - The Most Provocative Woman in the World' date: 2018-01-05T03:38:07+00:00 author: Anton Sten slug: cindygallop/ description: In order to own the future of your business, you have to design it around trust. --- >“There is a formula for success in business, and it goes like this...
Ruby
UTF-8
4,086
3.328125
3
[]
no_license
class Path @@all_paths = {} @@path_count = 0 attr_accessor :room_a, :room_b, :direction_a, :direction_b, :obstacle, :id, :obs_id # Creates a path. Room_a and room_b are the rooms the path connects. # Direction_a and direction_b indicate which walls of the rooms enter the # pathway. Obstacle is an... obsta...
Java
UTF-8
917
2.59375
3
[]
no_license
package com.base.sdk.base.api; import com.base.sdk.base.net.LifeCycleEvent; import io.reactivex.subjects.PublishSubject; /** * date: 2017/9/15 * description: 里面定义一些View层总是需要实现的抽象方法 */ public interface IBaseView { /** * 每次网络请求,P层都需要V层提供其生命周期发射者(Activity基类中提到的PublishSubject)。 * 如果每次都将该发射者通作为P层方法的...
Java
UTF-8
1,585
3.75
4
[]
no_license
package lab.two; import java.util.*; public class Stack<T> implements IStack<T> { protected Node head; protected int numberOfNodes; public Stack(){ numberOfNodes = 0; } public void toConsole(){ T[] stringDump = toArray(); for(int i = 0; i < stringDump.length; i++){ System.out.println("Position " + i...
C++
GB18030
16,230
2.890625
3
[]
no_license
#include "stdafx.h" using namespace std; StringBuilder::StringBuilder(): buffIndex(0),memAllocateSize(1024) { buff=(TCHAR*)calloc(1,1024*sizeof(TCHAR)); totalLength=1024; } StringBuilder::StringBuilder(const TCHAR *str): memAllocateSize(1024) { int paramLen=_tcslen(str); int allocateSize=0; if(pa...
Java
UTF-8
1,436
3.78125
4
[]
no_license
package interviewQuestions1; import java.util.HashMap; public class ImmutableClassEx { /** * To test the consequences of Shallow Copy and how to avoid it with Deep Copy * for creating immutable classes * */ public static void main(String[] args) { HashMap<String, String> h1 = new HashMap<String, String...
SQL
UTF-8
5,822
3.265625
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.27-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO...
C++
UTF-8
2,905
2.96875
3
[]
no_license
#ifndef _CONVEX_HULL_H_ #define _CONVEX_HULL_H_ #include <vector> #include <list> #include "ConvexHullMesh.h" namespace ConvexHull { class CConvexHull { public: /*! * Construct function */ CConvexHull(); /*! * Initialize some points in a unit ball randomly. * \param [in] num_...
Shell
UTF-8
466
3.71875
4
[]
no_license
set -o pipefail if [ "$DEBUG" == "true" ]; then set -x; fi err() { echo -e $@ 1>&2 } usage() { err "Usage: " err "\t$0 config" err "\t$0 dump" exit 1 } print_error() { echo "$@" exit 1 } main() { ROUTER_CONTAINER_ID=$(docker ps -a | grep ipsec-router | awk '{print $1}') case $1 in ...
Python
UTF-8
6,438
3.1875
3
[]
no_license
#!/usr/bin/env python # -*- coding: utf-8 -*- # In this part, we audit the street names and phones numbers. Function used to # audit both are separated, they share common parts, but for the clarity of # presentation I choose to separate them. # # Street audit: # In France, the street category name ("avenue"...) is the...
Java
UTF-8
1,697
3.625
4
[]
no_license
import java.util.Scanner; import java.util.Random; public class QuickDuplicate2 { public static void sort(int[] a){ sort(a,0,a.length-1); } public static void exch(int[] a,int i,int j){ int temp = a[i]; a[i] = a[j]; a[j] = temp; } public static void sort(int[] a,int lo,int hi){ if(hi <= lo) ...
C++
UTF-8
1,243
2.515625
3
[]
no_license
#include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace std; struct Sparse { vector<vector<int>> sp; vector<int> lg; Sparse(int n, int a) { lg.resize(n + 1); for (int i = 2; i <= n; i++) lg[i] = lg[i / 2] + 1; sp.resize(lg[n] + 1, vector<in...
Markdown
UTF-8
4,859
2.53125
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: 從核准的基礎 (VM) 建立 Azure 虛擬機器供應專案,Azure Marketplace description: 瞭解如何從核准的基礎建立虛擬機器 (VM) 供應專案。 ms.service: marketplace ms.subservice: partnercenter-marketplace-publisher ms.topic: how-to author: emuench ms.author: krsh ms.date: 01/06/2021 ms.openlocfilehash: 9164c1e2542024a02bf4868658d0f29728f32c7b ms.sourcegitcom...
Java
UTF-8
690
3.109375
3
[]
no_license
package com.titiredennis.projects.InterfeteBancomat.util; import java.util.Scanner; public class CheckPinUtil { public boolean verificarePin(String pin, String pinIntrodus) { int incercari = 2; Scanner scanner = new Scanner(System.in); while (incercari >= 0) { if (pinIntrodus....
Swift
UTF-8
1,362
2.515625
3
[]
no_license
// // MovieRemoteDataSourceImpl.swift // ShowMovies // // Created by Gabriel Rosa on 19/08/18. // Copyright © 2018 Gabe. All rights reserved. // import Foundation public class MovieRemoteDataSourceImpl: MovieRemoteDataSource { private static var INSTANCE: MovieRemoteDataSourceImpl? private weak v...
C#
UTF-8
8,056
2.84375
3
[]
no_license
using System; using System.Collections.Generic; using System.Text; using System.Timers; using System.Linq; using System.Threading.Tasks; using System.Threading; using System.IO.Compression; using System.IO; namespace ConsoleApp2 { // объявление типа данных делегат delegate int Subscriber(string s...
Ruby
UTF-8
585
3.078125
3
[ "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#!/usr/bin/env ruby require 'date' begin input = ARGV[0] tz = `date | awk '{print $5}'`.chomp start_time = DateTime.parse(input + " #{tz}").to_time #puts "=> Time since: #{start_time}" delta = ( DateTime.now.to_time - start_time ) hours = ( delta / 3600.0 ).floor remainder = delta - hours*3600.0 min...
Java
UHC
3,693
2.328125
2
[]
no_license
package View; import java.awt.Color; import java.awt.Dimension; import java.awt.GridBagLayout; import java.awt.event.ActionListener; import java.util.Vector; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.SwingConstants; import Data.ClassData; import Global.Constants.EPersonalInfo; import ...
Java
UTF-8
3,200
2.265625
2
[]
no_license
package com.rhtyme.weathertoday.data; import java.util.List; import javax.inject.Inject; import javax.inject.Singleton; import io.reactivex.Single; import io.reactivex.SingleEmitter; import io.reactivex.SingleOnSubscribe; import retrofit2.Call; import retrofit2.Response; import com.rhtyme.weathertoday.Constants; im...
Python
UTF-8
905
2.625
3
[]
no_license
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend import os key = os.urandom(16) aesCipher = Cipher(algorithms.AES(key), modes.ECB(), default_backend()) encryptor = aesCipher.encryptor() decryptor = aesCipher.decryptor() # Encoding ...
Java
UTF-8
490
2.09375
2
[ "Apache-2.0" ]
permissive
package com.woophee.stream.transform; import com.woophee.common.SourceData; import org.apache.flink.api.common.functions.ReduceFunction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Reduce implements ReduceFunction<SourceData> { private final static Logger logger = LoggerFactory.getLogge...
Java
UTF-8
2,456
2.59375
3
[ "MIT" ]
permissive
package com.ways2u; import scala.Tuple2; import org.apache.spark.SparkConf; import org.apache.spark.api.java.function.FlatMapFunction; import org.apache.spark.api.java.function.Function2; import org.apache.spark.api.java.function.PairFunction; import org.apache.spark.api.java.StorageLevels; import...
Markdown
UTF-8
6,333
2.859375
3
[ "MIT" ]
permissive
# List of curated resources to get started in Open Source This is a comprehensive, yet not definitive, collection of _verified_ resources that we put together in an attempt to help anyone wanting to get started in the amazing world of Open Source. If you know of any more great resources for this purpose please feel fr...
C++
UTF-8
311
2.640625
3
[]
no_license
// // Created by n.mikhnenko on 04/01/2019. // #ifndef TEMPLATES_MAXDEFAULT3_HPP #define TEMPLATES_MAXDEFAULT3_HPP #include <type_traits> template<typename T1, typename T2, typename RT = std::common_type_t<T1,T2>> RT max(T1 a, T2 b) { return b < a ? a : b; }; #endif //TEMPLATES_MAXDEFAULT3_HPP
Python
UTF-8
1,602
3.234375
3
[ "MIT" ]
permissive
import numpy as np from src.continuous.uniform import UniformDist from src.prob_distribution import ProbDist from src.spaces.spaces1d_leafs import DiscreteSpace class GeometricDist(ProbDist): """Simple Geom(p) distribution.""" def __init__(self, n = 1, p = 0.5): """Create Geom(p) distribution. ...
Java
UTF-8
1,773
2.25
2
[]
no_license
package domin; public class PictureItem { private String pnewtitle; private String picturesource; private String pnewdate; private String pic1; private String pic2; private String pic3; private String picturecount; private String picturecommentcount; public PictureItem() { super(); // TODO Auto-generated constructo...
Python
UTF-8
1,931
3.40625
3
[]
no_license
class TennisGame(): def __init__(self): self._score = 'Love all' self._p1_score = 0 self._p2_score = 0 self._p1_gems = 0 self._p2_gems = 0 self.gem_score = "0 - 0" @property def score(self): return self._score def player_one_scored(self): ...
JavaScript
UTF-8
1,725
2.78125
3
[]
no_license
import "./App.scss"; import "./focus.css"; import React, { useState, useEffect } from "react"; import axios from "axios"; let originalList = []; const App = () => { const [employeeList, setEmployeeList] = useState([]); const fetchEmployeeData = async () => { axios .get("https://dummyapi.io/data/api/us...
C++
UTF-8
7,339
3.296875
3
[]
no_license
#include "Sudoku.h" Sudoku::Sudoku(const string& file) { fstream fs; fs.open(file, fstream::in); string line; int l = -1; // parcours les lignes du fichier while (getline(fs, line)) { // filtre les séparations horizontales if (line.find("---!---!---") == std::string::npos) { l++; // filtre les s...
JavaScript
UTF-8
1,030
2.59375
3
[]
no_license
import React, { Component } from 'react'; import ListItem from './ListItem'; class Card extends Component { state = {}; render() { let left = false; let right = false; if (this.props.cardId === 0) { right = true; } else if (this.props.cardId === 3) { left = true; } else { righ...
Java
UTF-8
1,507
2.65625
3
[]
no_license
package stockmarketsimulator; import java.util.ArrayList; import java.util.Random; import company.Company; import investor.Investor; public class TradingDay { protected final static int shareNo = 1; static Random r = new Random(); public static ArrayList<Object> transactions = new ArrayList<Object>()...
Markdown
UTF-8
6,514
2.828125
3
[]
no_license
--- title: FAQs layout: post --- ### Why do you call yourself a designer? You seem more like an artist. I grew up watching my mom design everything from [textiles](https://www.instagram.com/aprioriknits/) to visual layouts to interiors. Being a designer, with a client or pragmatic application in mind, resonates deep...
Java
UTF-8
848
1.71875
2
[]
no_license
package com.rograndec.feijiayun.chain.business.report.quality.storage.service; import com.rograndec.feijiayun.chain.business.report.quality.storage.vo.OtherOutExcelPageVO; import com.rograndec.feijiayun.chain.business.report.quality.storage.vo.OtherOutReportVO; import com.rograndec.feijiayun.chain.business.report....
C
UTF-8
441
3.484375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(void) { double b; double c; double a; double d; double e; double f; printf("Enter # of hours worked (-1 to end ): "); scanf_s("%lf", &a); printf("Enter hourly rate of worker: "); scanf_s("%lf", &b); if (a > 40) { a += 0.5; f = b * a; printf("Salary i...
Python
UTF-8
7,253
2.703125
3
[ "MIT" ]
permissive
from Bio.PDB import PDBParser import networkx as nx import numpy as np import openbabel import sys import matplotlib.pyplot as plt # Recommended pipelines: # 2D sdf --create_pdb--> 2D pdb --create_structure--> Biopython structure --create_graph--> 2D networkx graph # 3D sdf/pdb --create_pdb--> 2D pdb without ...
Markdown
UTF-8
230
2.6875
3
[]
no_license
# Toxic_Comment_Classification_Challenge Building a multi-label classification model which predict a probability for each of the six possible types of comment toxicity (toxic, severe_toxic, obscene, threat, insult, identity_hate)
Java
ISO-8859-1
23,263
2.296875
2
[]
no_license
package server.controller; //import java.lang.reflect.InvocationTargetException; //import java.lang.reflect.Method; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.Date; import java.io.File; impo...