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
Markdown
UTF-8
2,726
3.375
3
[]
no_license
# AFlexView **Extends** [`AComponent`](AComponent.html#acomponent) 뷰(View1)를 유동적으로 생성하는 컴포넌트 <br/> ## Properties ### views \<[AView](AView.html#aview) Array> 화면을 구성하기 위해 구분된 뷰(AView)들을 저장한 배열 <br/> ### viewDirection \<String> 화면의 뷰들을 위치 시키는 방향을 저장한 변수. 값은 row, colum <br/> <br/> ## Class Methods <br/> <br...
C++
UTF-8
1,382
2.65625
3
[]
no_license
#include "Player/Skill/SkillManager.h" using namespace Logic; SkillManager::SkillManager() { m_currentSkill = nullptr; } SkillManager::~SkillManager() { m_currentSkill = nullptr; clear(); } void SkillManager::clear() { for (int i = 0; i < m_allSkills.size(); i++) delete m_allSkills[i]; m_allSkills.clear();...
C++
UTF-8
2,108
2.65625
3
[]
no_license
/* AS5045_scorpion.h - Library for 2 encoders as odometry Created by Aaron Chong, Feb 2018 minebot, Team B, MRSD 2018 */ #ifndef AS5045_SCORPION_h #define AS5045_SCORPION_h #include "Arduino.h" class scorpion_wheels { public: //if reverse is true, it probably means its the right wheel scorpion_wheels...
C++
ISO-8859-1
8,106
2.578125
3
[]
no_license
#include "pch.h" #include "../MaBibliotheque/Route.hpp" #include "../MaBibliotheque/Draw.hpp" #include "../MaBibliotheque/Data.cpp" /* Test verifiant que la generation de vehicule se fait correctement*/ TEST(TestGenerationVoiture, TestStatique) { Route route = Route(); route.generation_vehicules( basse); route.get_...
Python
UTF-8
665
3.625
4
[]
no_license
#Test.assert_equals(kebabize('myCamelCasedString'), 'my-camel-cased-string') #Test.assert_equals(kebabize('myCamelHas3Humps'), 'my-camel-has-humps') #Test.assert_equals(kebabize('SOS'), 's-o-s') #Test.assert_equals(kebabize('42'), '') #Test.assert_equals(kebabize('CodeWars'), 'code-wars') def kebabize(string): re...
C#
UTF-8
1,280
2.515625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AnimalHouseEntities; using AnimalHousePersistence; namespace AnimalHouse { public class SaleController { //SingleTon Mønster private static SaleController instance; ...
Java
UTF-8
4,957
2.3125
2
[]
no_license
package com.me.controller; import java.io.IOException; import java.io.PrintWriter; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletReques...
Java
UTF-8
3,574
2.234375
2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
package io.delta.flink.source.internal.state; import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.UUID; import org.apache.flink.connector.file.src.util.CheckpointedPosition; import org.apache.flink.core.fs.Path; import org.apache.flink.core.io.Sim...
Java
UTF-8
546
2.890625
3
[]
no_license
package com.flipkart.exception; public class IncompleteRegistrationRequirementException extends Exception{ private String studentId; private String courseId; public IncompleteRegistrationRequirementException(String studentId, String courseId) { this.studentId = studentId; this.courseId = c...
Java
UTF-8
17,885
2.1875
2
[]
no_license
package biz.africanbib.Tabs; import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import andro...
C++
UTF-8
8,323
2.8125
3
[]
no_license
#include <utility> #include <Console/Graphics.hpp> Graphics::Graphics(const std::vector<std::string>& columnsNames, const std::vector<std::vector<std::string>>& rowsValues, DiningScheduler& diningScheduler) : _window(nullptr) , _menu(nullptr) , _menuItems(nullptr) , _columnsNames(co...
Java
UTF-8
823
3.203125
3
[]
no_license
import java.util.Scanner; public class Uri1182 { public static void main (String[] args) { Scanner scan = new Scanner(System.in); int c, i = 0, j = 0; double m [][] = new double [12][12]; char ch; c = scan.nextInt(); ch = scan.next().charAt(0); while(i < 12) {...
Rust
UTF-8
16,055
4.4375
4
[]
no_license
// Rust’s standard library includes a number of very useful data structures called collections. Most other // data types represent one specific value, but collections can contain multiple values. Unlike the built-in // array and tuple types, the data these collections point to is stored on the heap, which means the amo...
C++
UTF-8
3,796
3.25
3
[]
no_license
#include "shape.h" Shape::Shape(int shape, int psize) { std::cout << "shape constructor" << std::endl; switch(shape) { case CIRCLE: setCircleShape(psize); size = psize; break; default : break; } } Shape::Sh...
TypeScript
UTF-8
879
3.109375
3
[ "MIT" ]
permissive
export const generateMarkdownTemplate = ( serial: string, title: string, functionName: string, functionBody: string, ) => `--- id: ${serial}-${functionName} title: ${title} sidebar_label: ${serial}. ${title} keywords: - HashMap --- :::success Tips 题目类型: HashMap 相关题目: - [1. 两数之和](/leetcode/easy/1-two-sum)...
Python
UTF-8
1,602
2.65625
3
[]
no_license
from django.db import models from django.contrib.auth.models import User from di import resolve class TodoTitleGenerator: def __init__(self, title_prefix, now): ''' Another example of DI. We use this class to generate titles for todos. __init__ will be called once on application ...
Markdown
UTF-8
3,423
3.703125
4
[ "MIT" ]
permissive
# JavaScript 101<br />Variables --- ## Variables - JavaScript variables hold values or expressions. - A variable can be a short name like `x` or a descriptive name like `myFirstName`. - Variables are case sensitive so `y` is different than `Y`. - A variable must start with a letter, $, _ and cannot contain any mathem...
Java
UTF-8
812
1.898438
2
[]
no_license
package com.tchyon.reviewapp.controller; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; im...
PHP
UTF-8
8,547
2.75
3
[]
no_license
<?php $display = 'hide'; // Função para somar as parcelas das despesas function SomarData($data, $dias, $meses, $ano){ // A data deve estar no formato dd/mm/yyyy $data = explode("/", $data); $nova_data = date("d/m/Y", mktime(0, 0, 0, $data[1] + $meses, $data[0] + $dias, $data[2] + $ano) ); return $nov...
Markdown
UTF-8
1,288
2.59375
3
[ "MIT" ]
permissive
--- layout: post title: "Softmax GAN" date: 2017-04-20 15:35:14 categories: arXiv_CV tags: arXiv_CV Adversarial GAN Classification author: Min Lin mathjax: true --- * content {:toc} ##### Abstract Softmax GAN is a novel variant of Generative Adversarial Network (GAN). The key idea of Softmax GAN is to replace the cla...
Java
UTF-8
526
2.15625
2
[]
no_license
package cn.hal.code.algorithm; import org.springframework.stereotype.Component; /** * @Author: Steven HUANG * @Date: 2020/3/31 * * topic: * url: * * desc: * * 样例: * 例1: * * * * 例2: * * * * 知识点 * */ @Component public class Title { /** * 空间 :O(n) ; 时间: O(n) */ public void solution1() { ...
Markdown
UTF-8
2,645
2.734375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
--- title: "Freeway Traffic Incident Detection from Cameras: A Semi-Supervised Learning Approach" excerpt: "We used semi-supervised techniques to detect traffic incident trajectories from the cameras. Our proposed approach for trajectory classification is based on semi-supervised parameter estimation using maximum-like...
Python
UTF-8
4,932
3.203125
3
[ "MIT" ]
permissive
"""The entry point and controller for display code. Elements in the game world or in the user interface construct windows (see window.py), matrixes of information about what they want to show in a region they own. This module composites them into a single image and then uses the blessed library to print that image to ...
Python
UTF-8
4,963
2.765625
3
[]
no_license
import numpy as np import sys, random, pdb def load_mnist(path, kind='train'): import os import gzip import numpy as np """Load MNIST data from `path`""" labels_path = os.path.join(path, '%s-labels-idx1-ubyte' % kind) images_path = ...
Markdown
UTF-8
3,725
2.515625
3
[]
no_license
Data Is Plural — 2020.05.20 edition =================================== *Excess deaths, trade agreements, US forests, historical crop yields, and Victorian fiction.* __Excess deaths.__ The Economist has published [the data](https://github.com/TheEconomist/covid-19-excess-deaths-tracker) behind its [estimates of exce...
C++
UTF-8
1,122
2.796875
3
[ "MIT" ]
permissive
#ifndef TX_DSCATTACHEDPASSPORTCOUNTER_H #define TX_DSCATTACHEDPASSPORTCOUNTER_H #include <cstdint> #include <vector> #include "Serialization/serialize.h" class DSCAttachedPassportCounter { public: static bool increment(std::vector<unsigned char> dscId); static bool decrement(std::vector<unsigned char> dscId)...
JavaScript
UTF-8
189
3.25
3
[]
no_license
const valor = 'Global' function exibe(){ return valor } function exec(){ const valor = 'Local' return exibe() } // Global console.log(exibe()); // Global console.log(exec());
Markdown
UTF-8
5,811
3.125
3
[]
no_license
--- id: domain_gameserver_srv_link title: Domains: Set up game server forwarding description: Information on how to set up a forwarding from your domain to a game server - ZAP-Hosting.com documentation sidebar_label: Domain Gameserver Redirect --- > Please note that it can always take up to 24 hours before changes to ...
Shell
UTF-8
1,260
4.0625
4
[ "MIT" ]
permissive
#!/bin/bash check() { hash $1 2>/dev/null || { echo >&2 "This needs \`$1\` to function properly. Please consule the poe-ui readme for more info."; exit 1; } } check git check npm check make if [[ $(ls -l | wc -l) -gt 1 ]]; then answer=Y read -e -p "project is not empty. abort? ($answer) " answer answer="${in...
PHP
UTF-8
1,095
2.90625
3
[ "MIT" ]
permissive
<?php namespace App; use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; /** * Class Bookable * @package App * @property integer $id * @property integer $price * @property string $title * @property string $description * @property \Illuminate\Support\C...
Java
UTF-8
475
2.015625
2
[]
no_license
package DataProviders; import org.testng.annotations.DataProvider; public class LoginCredentialsProvider { @DataProvider(name = "Valid credentials") private Object[][] validCredentials(){ return new Object[][] { {"testseavusassignment@gmail.com", "Zlaja2019"}, }; } @D...
C++
UTF-8
2,139
3.109375
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #include <cstring> using namespace std; int arr[110][110]; int Place2(int n, int gap) { int res = 0; while (1) { int x, y; bool flag = true; for (int j = 0; flag && j < n; j++) { for (int i = 0; flag ...
C#
UTF-8
1,727
2.546875
3
[ "Apache-2.0" ]
permissive
using System; using System.Threading; using Ncqrs.EventBus; using Denormalizer.Properties; using Ncqrs.Eventing.Sourcing; using Ncqrs.Eventing.ServiceModel.Bus; namespace Denormalizer { static class Program { private static int _processedEvents = 0; private static InProcessEventBus...
Java
UTF-8
893
2.171875
2
[]
no_license
package com.example.vsvll.intent_data; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; public class SecondPage extends AppCompatActivity { TextView textView; Butto...
Java
UTF-8
1,957
3.46875
3
[]
no_license
class Node1{ int data; Node1 left, right, parent; Node1(int d) { data=d; left=right=parent=null; } } class InorderSuccessor{ static Node1 head; Node1 insert(Node1 node, int data) { if (node==null) { return (new Node1(data)); } ...
JavaScript
UTF-8
2,545
2.640625
3
[]
no_license
import React, { Component } from 'react' import './search.css' import axios from 'axios' //Need to break this up into many components class Search extends Component { constructor() { super(); this.state = { textfield: '', buttonfield: 'Card Name', randomfield : 'Is it Magic Time?', ...
C++
UTF-8
5,288
3.125
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> #include <fstream> #include <iostream> #include <map> #include <pthread.h> #include "utils.h" using namespace std; // Server class class Server { public: int id; string ip; int port; bool ru...
Java
UTF-8
2,269
1.867188
2
[]
no_license
package cn.test.book.qqwallet; import com.tencent.mobileqq.openpay.api.IOpenApi; import com.tencent.mobileqq.openpay.api.IOpenApiListener; import com.tencent.mobileqq.openpay.api.OpenApiFactory; import com.tencent.mobileqq.openpay.data.base.BaseResponse; import com.tencent.mobileqq.openpay.data.pay.PayResponse; ...
C++
UTF-8
962
2.578125
3
[]
no_license
// // scChar.cpp // scFont // // Created by Nick Yulman on 3/13/13. // // #include "scChar.h" //scChar::scChar(int _xDim,int _yDim){ //} void scChar::init(char _name, ofVec2f _dims, ofVec2f _nDims, ofVec2f _spacing, vector<ofVec2f> _positions, string _shape){ numNodes = _positions.size(); name = _name; ...
C#
UTF-8
10,228
2.578125
3
[]
no_license
using UnityEngine; using System.Collections; using System.Collections.Generic; using System; public class MapGeneratorController : MonoBehaviour { public int width; public int height; public string seed; public bool useRandomSeed; [Range(0,100)] public int randomFillPercent; int[,] map; void Start(){ //...
C++
UTF-8
1,531
2.734375
3
[]
no_license
#include "password.h" Password::Password(QWidget *parent) : QDialog(parent), ui(new Ui::password) { ui->setupUi(this); } void Password::on_pushButton_2_clicked() { this->close(); } void Password::set(const QString& x,const bool b) { id = x; level = b; } void Password::on_pushButton_clicked()...
JavaScript
UTF-8
1,530
2.59375
3
[]
no_license
import React, {Component} from 'react'; import { ListGroup, ListGroupItem, Container} from 'reactstrap'; import CheckBox from './CheckBox' import Back from './Back' class Lesson7 extends Component { state = { cars: ['BMW', 'Honda', 'Vaz', 'Nissan'], BMW: false, Honda: false, Vaz: fa...
Markdown
UTF-8
4,573
3.3125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
--- title: "State" author: ["Petros Papapanagiotou"] lastmod: 2021-06-14T23:26:04+01:00 draft: false weight: 310 --- The console maintains an internal state of the introduced processes and compositions. This includes a list of atomic and stored processes and a separate list of intermediate processes. This allows the u...
Java
UTF-8
5,641
2.75
3
[]
no_license
package modelos; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; public class Sobrecalentado { double p; double t; double v; double u; double h; ...
Shell
UTF-8
1,363
2.859375
3
[ "Apache-2.0" ]
permissive
#!/bin/bash #setup pathes curr=$PWD echo $curr SPARK_HOME=$HOME/spark-2.1.0-bin-hadoop2.7 analytics_zoo=$HOME/code/analytics-zoo MODELS_HOME=${analytics_zoo}/models PYTHON_API_ZIP_PATH=$MODELS_HOME/target/bigdl-models-0.1-SNAPSHOT-python-api.zip JAR_PATH=${MODELS_HOME}/target/models-0.1-SNAPSHOT-jar-with-dependencies...
C++
UTF-8
735
2.515625
3
[ "LLVM-exception", "Apache-2.0" ]
permissive
// ------------------------------------------------------------------------- // Part of the CodeChecker project, under the Apache License v2.0 with // LLVM Exceptions. See LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // --------------------------------------------------...
Python
UTF-8
935
3.984375
4
[]
no_license
# coding:utf8 # 如何对字符串进行左,右,居中的对齐 ''' 某个字典存储了一系列属性值 { "lodDist":100.0, "SmallCull":0.04, "DistCull":500, "trilinear":40, "farclip":477 } ''' ''' 在程序中,我们希望以以下格式输出字典的内容,该如何处理 SmallCull :0.04 farclip :477 lodDist :100.0 DistCull :500 trilinear :40 ''' dict = { "lodDist": 100.0, "SmallCull...
Shell
UTF-8
2,077
4.28125
4
[ "Apache-2.0" ]
permissive
#!/usr/bin/env bash source "$(dirname "$0")/common_functions.sh" #----------------------------------------------------------------------------------------------------------------------- # # DOCUMENTS ARGUMENTS # #----------------------------------------------------------------------------------------------------------...
TypeScript
UTF-8
2,483
3.1875
3
[]
no_license
import { createSlice, PayloadAction } from "@reduxjs/toolkit"; import { AppThunk, RootState } from "../../app/store"; import { MovieType } from "./Movie"; interface SearchState { loading: boolean; films: MovieType[]; errorMessage: string | null; } const initialState: SearchState = { loading: false, films: [...
JavaScript
UTF-8
11,774
2.640625
3
[]
no_license
function createUTC(zNum){ //To use this function make sure to choose a number between -12 and 12. This should either be //an integer or a decimal between -9 and 9 with .5 or .75 at the end. // These values cover every capital city timezone. var zNumStr = zNum.toString(); var zNumIndex = zNumStr.indexOf(".5"); ...
Go
UTF-8
116
2.734375
3
[]
no_license
package piscine func Concat(str1 string, str2 string) string { str3 := []rune(str1 + str2) return string(str3) }
C#
UTF-8
1,455
2.65625
3
[ "MIT" ]
permissive
using CarDealer.Services; using CarDealer.Web.Models.Logs; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.Linq; namespace CarDealer.Web.Controllers { public class LogsController : Controller { private readonly ILogService logService; publi...
Python
UTF-8
212
3.171875
3
[]
no_license
def calcula_fibonacci (n): fibo=[] n1=1 n2=1 fibo.append(n1) fibo.append(n2) i=0 while i<(n-2): tot=fibo[i]+fibo[i+1] fibo.append(tot) i+=1 return fibo
Python
UTF-8
414
3.6875
4
[ "CC-BY-4.0" ]
permissive
# coding=utf-8 __author__ = 'ipetrash' # EN: Least Common Multiple. # RU: Наименьшее общее кратное (НОК). def gcd(a, b): "Нахождение НОД" while a != 0: a,b = b%a,a # параллельное определение return b if __name__ == '__main__': a = int(raw_input("a = ")) b = int(raw_input("b = ")) print("...
Java
UTF-8
2,283
3.046875
3
[]
no_license
package com.tanay.thunderbird.databasedemo; import androidx.appcompat.app.AppCompatActivity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; public class MainActivity extends AppCompatActivity { @Override protected void onCrea...
PHP
UTF-8
516
2.5625
3
[]
no_license
<?php if(isset($_POST['book_id'])){ $cookie_name = "book_id"; $data = json_decode($_COOKIE[$cookie_name]); var_dump($data); // now removing the book id from specific $index = array_search($_POST['book_id'],$data ); array_splice($data,$index,1); $cookie_value = $data ; setcook...
Java
UTF-8
4,618
3.8125
4
[]
no_license
package com.isa.section2.chapter1.exercises; public class Warmup { public static void main(String[] args) { String[] a = {"S", "O", "R", "T", "E", "X", "A", "M", "P", "L", "E"}; SelectionSort.sort(a, DIRECTION.ASC); assert SelectionSort.isSorted(a); SelectionSort.show(a); ...
C#
ISO-8859-1
5,564
2.6875
3
[ "Apache-2.0" ]
permissive
namespace BoletoNet { using System; #region EnumInstrucoes_Sicoob enum public enum EnumInstrucoes_Sicoob { AusenciaDeInstrucoes = 0, CobrarJuros = 1, Protestar3DiasUteis = 3, Protestar4DiasUteis = 4, Protestar5DiasUteis = 5, NaoProtestar = 7, ...
TypeScript
UTF-8
1,030
2.796875
3
[ "MIT" ]
permissive
/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ /** * @module plugins/size */ import { Config } from 'jodit/config'; declare module 'jodit/con...
JavaScript
UTF-8
18,806
2.546875
3
[]
no_license
Game.Battle.Ai = { iteration: 0, fullStats: { attack: 0, healers: 0, spells: 0 }, turnStep: function() { Game.Battle.Grid.clearGrid( BATTLE_GRID[ gameData.battle.selection.player ] ); gameData.battle.gui.cords = []; var monsters = Game.Battle.Ai.anybodyHere(); var success = false; success = Game.B...
C#
UTF-8
327
2.890625
3
[ "MIT" ]
permissive
namespace CSharpScriptingExample { using System; using CSharpScriptingExample.Interfaces; internal class DummyComponent : IScriptableComponent { public void DoSomething(string parameter) { Console.WriteLine("DummyComponent.DoSomething called: {0}", parameter); } ...
C
UTF-8
205
2.609375
3
[]
no_license
#include <stdio.h> #include<string.h> int main() { int i=0,len=0; char a[20]; scanf("%s",&a); scanf("%d",len); for(i=0;i<len,i++) { printf("%s",a); } return 0; }
JavaScript
UTF-8
314
3.609375
4
[]
no_license
"use strict"; //whatever we put in parameters and ... they continue to excist ...that closure function createAddingFunction(num1, num2) { let num3 = 2; return function () { return num1 + num2 + num3; }; } let AddingFunction = createAddingFunction(1, 2); console.log(AddingFunction()); console.log();
Java
UTF-8
1,476
1.984375
2
[]
no_license
package com.stu.fastStep.controller; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; im...
Python
UTF-8
242
3.3125
3
[]
no_license
def myMin(a,b): return a if a<=b else b import sys input=sys.stdin.readline n=int(input()) c2=0 c5=0 for _ in range(1,n+1): while(_%2==0): _/=2 c2+=1 while(_%5==0): _/=5 c5+=1 print(myMin(c2,c5))
Python
UTF-8
686
3.296875
3
[]
no_license
def getnum(): nums=[] n=input("请输入一个数字,按回车退出:") while n!="": nums.append(eval(n)) n=input("请输入一个数字,按回车退出:") return nums def mean(nums): s=0 for i in nums: s=s+i a=s/len(nums) return a def fanc(nums,mean): d=0.0 for n in nums: d=d+(n-mean)**2 ...
Python
UTF-8
3,695
2.796875
3
[]
no_license
import numpy as np from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from .defense import get_aug_data class AdversarialDt(DecisionTreeClassifier): def __init__(self, ord=np.inf, sep_measure=None, attack_model=None, train_type='adv', **kwargs): ...
C
UTF-8
2,106
2.734375
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
/* $Id: menu.h,v 1.3 2005/07/31 15:30:41 soyt Exp $ ****************************************************************************** Universal menu for ggi Written in 1998 by Hartmut Niemann This software is placed in the public domain and can be used freely for any purpose. It comes without any kind of wa...
PHP
UTF-8
5,725
3.078125
3
[ "MIT" ]
permissive
<?php /** * AbstractSearch Class * * Abstract class for the representation of a state search algorithm * @author Lucas Acosta <lucasmacosta@gmail.com> * @version 0.1 * @package peg_solitaire */ include_once 'Problem.php'; include_once 'State.php'; abstract class AbstractSearch { private $problem, ...
C#
UTF-8
1,073
3.828125
4
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Division { class Division { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var count1 = 0; var count2 = 0;...
PHP
UTF-8
2,823
2.875
3
[]
no_license
<?php // подключаем БД include $_SERVER['DOCUMENT_ROOT'] . '/configs/db.php'; // если есть POST-запрос loginReg? if( isset($_POST["loginReg"]) && isset($_POST["passwordReg"]) && $_POST["loginReg"] != "" && $_POST["passwordReg"] != "" ) { // подготовим запрос в БД $sql = "SELECT * FROM `users` WHERE `login` LI...
Java
UTF-8
1,804
2.28125
2
[]
no_license
package fsl.ta.toms.roms.service.impl; import java.util.Calendar; import java.util.Date; import org.apache.commons.lang.StringUtils; import org.springframework.transaction.annotation.Transactional; import fsl.ta.toms.roms.dao.DAOFactory; import fsl.ta.toms.roms.dataobjects.CDEventDO; import fsl.ta.toms.roms.dataobje...
C++
UTF-8
2,092
3.21875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void buildTree(int *arr, int *tree, int treeNode, int start, int end){ if(start == end){ tree[treeNode] = arr[start]; return; } int mid = (start + end)/2; buildTree(arr,tree,2*treeNode,start,mid); buildTree(arr,tree,2*treeNode+...
Python
UTF-8
980
3.5625
4
[]
no_license
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 10 21:27:24 2020 @author: jaga """ ''' Solution of Second order ODE using RK4 method ''' import matplotlib.pyplot as plt import numpy as np # r is an array with r[0]=y and r[1]=z(=dy/dx) def f(x...
Java
UTF-8
7,904
1.679688
2
[ "Apache-2.0" ]
permissive
/** * Copyright (C) 2015 The Gravitee team (http://gravitee.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
Java
UTF-8
301
1.96875
2
[]
no_license
package game.db.access; /** * 数据库存取异常 * * @author ming 创建时间:2013-11-19 */ public class DataAccessException extends RuntimeException { private static final long serialVersionUID = 1L; public DataAccessException(Throwable cause) { super(cause); } }
Java
UTF-8
756
1.914063
2
[]
no_license
package com.limon.http.coder; import com.limon.http.xml.XmlNode; @XmlNode(name="PayOrderReq") public class PayOrderReq { @XmlNode(name="Uid") private String Uid; @XmlNode(name="Oid") private String Oid; @XmlNode(name="PayNo") private String PayNo; @XmlNode(name="PayType") private String PayType; ...
JavaScript
UTF-8
1,148
2.515625
3
[]
no_license
'use strict'; const ElasticSearchConfigError = require('./elasticsearch-config-error'); const ELASTICSEARCH_CONFIG_STRUCT = { protocol: 'string', host: 'string', port: 'number', user: 'string', password: 'string', limit: 'number', prefix: 'string', awsCredentials: 'boolean', requestTimeout: 'number', maxRet...
Python
UTF-8
9,412
2.640625
3
[]
no_license
import datetime import matplotlib.pyplot as plt from scipy.misc import imread import numpy as np def parseNL(path): f = open(path, 'r') names = [] labels = [] lines = f.readlines() for line in lines: if len(line.split()) == 1: name = line.split() names.append(name[0]...
JavaScript
UTF-8
4,237
2.546875
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import axios from "axios"; import Header from "./components/header/Header"; import Players from "./components/players/Players"; import NewPlayer from "./components/newPlayer/NewPlayer"; import Team from "./components/team/Team"; import Filter from "./compone...
Python
UTF-8
1,297
4.84375
5
[]
no_license
#!/usr/bin/python3 """ Objectives Familiarize the student with: using basic instructions related to lists; creating and modifying lists. Scenario There once was a hat. The hat contained no rabbit, but a list of five numbers: 1, 2, 3, 4, and 5. Your task is to: write a line of code that prompts the use...
PHP
UTF-8
711
3.734375
4
[]
no_license
<?php /** * En klass som beskriver ett namn */ class Name { /** * Instansvariabler */ private $firstName; private $lastName; private $gender; /** * Konstruktor */ public function __construct($firstName, $lastName, $gender) { $this->firstName = $firstName; ...
PHP
UTF-8
970
2.765625
3
[]
no_license
<?php declare(strict_types=1); namespace adeynes\PM84\functions; use pocketmine\math\Vector3; class BulbFlower implements PM84Function { /** @return float[] */ public function getXDomainBounds(): array { return [-2, 2]; } /** @return float[] */ public function getYDomainBounds(): ar...
C
UTF-8
466
3.03125
3
[]
no_license
#include <stdio.h> #include <errno.h> #include <fcntl.h> int main(void) { char buf[1024]; int n; int flags; flags = fcntl(0, F_GETFL); flags = flags | O_NONBLOCK; fcntl(0, F_SETFL, flags); again: n = read(0, buf, 1024); if(n == -1){ if(errno == EWOULDBLOCK){ printf...
Python
UTF-8
1,159
2.578125
3
[]
no_license
import peewee # import sqlite3 # import psycopg2 # import PyMySQL from peewee import * print "connect db" # db = MySQLDatabase('space_team', user='root',passwd='3421') db = SqliteDatabase('space_team.db') class ShipModel(peewee.Model): name = CharField() json = TextField() class Meta: database =...
PHP
UTF-8
995
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Listeners; use App\Events\DiscountEvent; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use App\User; use Illuminate\Support\Facades\File; class SendEmailDiscountEvent implements ShouldQueue { /** * Create the event listener. * * @return vo...
TypeScript
UTF-8
783
2.703125
3
[]
no_license
import { PurchaseRecordDTO } from '../contracts/purchased-item-dto'; import { PurchasedItemBase } from '../contracts/purchased-item-base'; export class PurchasedItemVM implements PurchasedItemBase { public id: string; public name: string; public description: string; public isSelected: boolean; co...
PHP
UTF-8
1,366
2.8125
3
[]
no_license
<?php //1. DB接続します try { $pdo = new PDO('mysql:dbname=gs_f01_db13;charset=utf8;host=localhost','root',''); } catch (PDOException $e) { exit('dbError:'.$e->getMessage()); } $stmt = $pdo->prepare("SELECT * FROM gs_bm_table ORDER BY 'date' DESC LIMIT 3"); $status = $stmt->execute(); $last=""; if($status==f...
Python
UTF-8
1,592
3.515625
4
[]
no_license
class Solution: def calculate(self, s: str) -> int: stack = [] # 符号栈 ans = 0 number = 0 # 当前正在合并的数字 for ch in s: if ch.isdigit(): number = number * 10 + int(ch) elif ch == "+" or ch == "-": if stack.count("-") % 2 == 0: ...
Java
UTF-8
1,161
3.078125
3
[]
no_license
import java.util.ArrayList; import java.util.List; public class ERList { private List<ExchangeRequest> exchangeRequests; private int minDate; private ExchangeRequest minExchangeRequest; public ERList() { exchangeRequests = new ArrayList<>(); minDate = Integer.MAX_VALUE; minExchangeRequest = null; } @Ov...
Python
UTF-8
457
3.78125
4
[]
no_license
""" Given a sorted array (sorted in non-decreasing order) of positive numbers, find the smallest positive integer value that cannot be represented as sum of elements of any subset of given set. Expected time complexity is O(n). """ def findSmallestNum(array): arrayLen = len(array) res = 1 i=0 while i ...
Swift
UTF-8
2,393
3.09375
3
[]
no_license
// // ViewController.swift // greatNumberGame // // Created by SP on 3/7/18. // Copyright © 2018 Soumya. All rights reserved. // import UIKit class ViewController: UIViewController { var randomNumber = Int(arc4random_uniform(100)+1) override func viewDidLoad() { super.viewDidLoad() ...
JavaScript
UTF-8
159
2.8125
3
[ "MIT" ]
permissive
let fire = 0 let start = new Date() let timer = setInterval(() => { if (new Date() - start > 1000) { clearInterval(timer) console.log(fire) } fire++ })
TypeScript
UTF-8
569
2.703125
3
[ "Apache-2.0" ]
permissive
/* tslint:disable */ /* eslint-disable */ /* * Cloud Governance Api * * Contact: support@avepoint.com */ /** * * @export * @enum {string} */ export enum ExpirationType { Duration = 0, Date = 1 } export function ExpirationTypeFromJSON(json: any): ExpirationType { return ExpirationTypeFromJSONTyped...
Java
UTF-8
1,507
2.703125
3
[]
no_license
package robertefry.firespread.model.cell; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; import java.awt.Rectangle; import robertefry.firespread.model.spread.Spread; import robertefry.firespread.model.terrain.Terrain; import robertefry.firespread.util.GraphicUtil; import robertefry.penguin.ta...
C++
UTF-8
849
3.625
4
[]
no_license
#include <iostream> #include <vector> #include <type_traits> using namespace std; // 3rd - using enable_if to provide specialization template <typename T, typename Enable = void> class A { public: A() { cout << "Primary template\n"; } }; // partial specialization for floating point template <typename T> cla...
C#
UTF-8
963
3.125
3
[]
no_license
public class CompoundWriter:TextWriter { public readonly List<TextWriter> Writers = new List<TextWriter>(); public override void WriteLine(string line) { if(Writers.Any()) foreach(var writer in Writers) writer.WriteLine(line); ...
PHP
UTF-8
445
2.828125
3
[]
no_license
<?php class VerseOfTheDay extends Database { public function insertVerse ($verset) { $req=$this->getPDO()->prepare("INSERT INTO verse_of_the_day(verse,date) VALUES(?,NOW())"); $req->execute(array($verset)); echo"<p class='text-success'>Verse send</p>"; } public function getVerse() { $req=$this->getPDO()...
Java
UTF-8
5,588
1.726563
2
[]
no_license
package com.evs.foodexp.commonPkg.viewModel; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.paging.PagedList; import com.evs.foodexp.models.BookingModel; import com.evs.foodexp.models.CashoutModel; import com.evs.foodexp.models.GoGetModel; import com.evs.foodexp.models...
C#
UTF-8
1,069
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; /* Matthew Watada * July 27th 2017 * Version 0.6 - Inherits fromt the CardList class... */ namespace LessonA { public class Hand : CardList { // Private Instance variables // Public Properties /...