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
110,637
2.296875
2
[]
no_license
package com.syuesoft.contstants; import java.util.Date; public class Contstants { /** * 员工级别 * */ public interface EMPLOYEELEVEL{ /** * 父Key * */ public static final String EMPLOYEELEVELKEY="employeelevel"; /** * 超级管理员帐号 */ public static final String ADMINISTRATO...
C
UTF-8
5,124
3.0625
3
[]
no_license
#include "cachelab.h" #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> struct Trace { char *origin; long address; int size; char operation; }; void printTrace(struct Trace *trace); char* ltrim(char *str) { if (str == NULL) { return NULL; } while(*st...
Java
UTF-8
620
1.867188
2
[]
no_license
package com.dataox.loadbalancer.domain.repositories; import com.dataox.loadbalancer.domain.entities.InitialData; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; @Repository public interface InitialDataR...
C#
UTF-8
2,164
2.671875
3
[]
no_license
using System; using System.Collections.Generic; using Daily_Cash_Trading_Limits.Models; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Daily_Cash_Trading_Limits.Configuration { public class TotalAssetsConfiguration : IEntityTypeConfiguration<TotalAsset> { ...
Ruby
UTF-8
229
2.9375
3
[]
no_license
class Plateu attr_reader :width, :height def initialize coordinates @width, @height = coordinates end def valid_position? position position.x.between?( 0, width ) and position.y.between?( 0, height ) end end
Markdown
UTF-8
1,254
2.984375
3
[]
no_license
## 关于可执行程序的操作说明 #### C --- **环境要求**:暂无 **使用方法**: 1. 先运行代理端 2. 后运行客户端并输入网址,即可显示结果 3. 运行结束 #### Java --- **环境要求**: 安装jre并配置全局路径 **使用方法**: 1. 打开cmd控制台程序,定位到jar文件所在位置 2. 在控制台中输入<code>java -jar Proxy.jar</code>来启动代理监听程序 3. 打开另一个控制台窗口,并定位到jar文件所在位置 4. 在控制台中输入<code>java -jar Client.j...
Python
UTF-8
2,050
2.8125
3
[ "MIT" ]
permissive
import os import urllib.request import urllib.request, queue, time import threading class ThreadManager(): def __init__(self, thread_num): self.lock = threading.Lock() self.to_crawl = queue.Queue() self.num = queue.Queue() self.init_queue() self.end_flag = False ...
Rust
UTF-8
1,289
3.203125
3
[ "Apache-2.0" ]
permissive
use structs_ser_deser_derive::{StructsDeser, StructsSer}; use structs_ser_deser_traits::{Deser, Ser}; #[derive(StructsSer, StructsDeser, Debug, PartialEq)] struct MyStruct { a: u32, b: f64, c: String, d: bool, e: MyUnnamedStruct, } #[derive(StructsSer, StructsDeser, Debug, PartialEq)] struct MyUnn...
Markdown
UTF-8
9,199
2.9375
3
[ "MIT" ]
permissive
# vuex-rest-api [![](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/vuejs/awesome-vue) [![](https://img.shields.io/badge/vuex-2.x-brightgreen.svg)](https://vuejs.org) [![npm](https://img.shields.io/npm/v/vuex-rest-api.svg)](https://www.npmjs.co...
C#
UTF-8
8,787
2.53125
3
[]
no_license
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ProjectilePage : MonoBehaviour { public InputField m_initial_velocity_text; public InputField m_initial_degree_text; public InputField m_acceleration_text; public ...
Shell
UTF-8
195
3.515625
4
[]
no_license
#!/bin/sh echo -n "Please enter an integer value: " read user_input if [ `expr $user_input % 2` -eq 0 ] then echo "This is an even number." else echo "This is an odd number." fi exit 0
JavaScript
UTF-8
1,498
3.4375
3
[]
no_license
const items = new WeakMap(); const iteratorRef = Symbol("ref"); // export default class Bag { class Bag { constructor(iterable) { if(iterable) item[this] = [...iterable]; } static get [Symbol.species]() { return Bag; } // WHAT!? add(value) { item[this].push(value); return true...
C#
UTF-8
395
3.4375
3
[]
no_license
using System; namespace IfStatement { class Program { static void Main(string[] args) { int a = 100; int b = 20; if (a < b) { Console.WriteLine("A is less than B"); } else { ...
Python
UTF-8
205
3.390625
3
[ "MIT" ]
permissive
# Functions - Basics def print_message(): print(" Alert! ".center(30, "*")) print(" Hello World!") print(" How are you?!") print("-----") print_message() print_message() print_message()
Java
UTF-8
11,257
1.945313
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 bdbarcos; /** * * @author copad */ public class FormularioBarco extends javax.swing.JFrame { /** * Creates new fo...
C
UTF-8
1,534
2.640625
3
[]
no_license
/* File Name : mul17.c */ /* Description : The 17x17 bit multiplier */ /* Date : Aug 21, 2001 */ /* Version : 1.1 */ /* Author : Martadinata A. */ /* Adress : VLSI RG, Dept. Electrical of Engineering ITB, */ /* ...
C++
UTF-8
1,373
2.84375
3
[]
no_license
#include "Connection.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <cstdint> Connection::~Connection(){ close(sock); } int Connection::get_int32(){ int32_t i; if (!forc...
TypeScript
UTF-8
593
2.640625
3
[]
no_license
import { promisify } from "util"; import * as fs from "fs"; export const appendFile = fs.promises.appendFile; export const writeFile = fs.promises.writeFile; export const readFile = fs.promises.readFile; export const readdir = fs.promises.readdir; export const exists = promisify(fs.exists); export const mkdir = fs.pro...
C++
UTF-8
6,571
2.5625
3
[]
no_license
/** * @file * VuoNodeSynchronization implementation. * * @copyright Copyright © 2012–2020 Kosada Incorporated. * This code may be modified and distributed under the terms of the MIT License. * For more information, see https://vuo.org/license. */ #include <sstream> #include "VuoNodeSynchronization.hh" #include ...
Python
UTF-8
2,046
3.1875
3
[]
no_license
""" """ import argparse from collections import defaultdict import codecs import csv import sys VISITORS = 'visitors' class SmartFormatter(argparse.HelpFormatter): def _split_lines(self, text, width): if text.startswith('R|'): return text[2:].splitlines() # this is the RawTextHelpFor...
Java
UTF-8
513
2.0625
2
[]
no_license
package com.administrator_privilege.model; import java.util.*; public interface Administrator_PrivilegeDAO_interface { public void insert(Administrator_PrivilegeVO administrator_privilegeVO ); public void update(Administrator_PrivilegeVO administrator_privilegeVO); public void delete(Str...
Java
UTF-8
2,145
2.375
2
[]
no_license
package com.mkf.shoppingscreen.extras; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.mkf.shoppingscreen.R; import com.mkf.shoppingscreen.models.Ecommerce; impor...
Java
UTF-8
8,372
2.90625
3
[]
no_license
package com.jonathanleblanc.huntingjo.World; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.MathUtils; import com.jonathanleblanc.huntingjo.Controlers.AssetControler; import processing.core.PVector; //Bullet //- Shoots through the air at h...
Java
UTF-8
2,885
2.421875
2
[]
no_license
package com.unibuc.atm.repository; import com.unibuc.atm.exception.BankAccountNotFoundException; import com.unibuc.atm.model.BankAccount; import com.unibuc.atm.model.BankAccountType; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframe...
Markdown
UTF-8
1,834
3.28125
3
[]
no_license
# Description <div class="content">Byteotia 是一个被海洋环绕的岛屿. 岛屿上有很多湖泊. 在这些湖泊上又有一些小岛,小岛上可能又有湖泊和更小的岛. 海洋的级别为0. Byteotia 级别为1. 在Byteotian 上的湖泊的级别为2 ., 如果一个湖泊在一个级别为w的岛屿上,那么这个湖泊的级别为w+1,类似的如果一个岛屿被一个级别为j的湖泊环绕上,那么这个岛屿的级别为j+1. 所有湖泊和岛屿的海岸线都是平行或垂直于坐标轴的. 没有两条海岸线重合或相交. 我们想求出级别最高的那个湖泊或者岛屿的级别. </div> # Input <div class="content">第一行...
Python
UTF-8
2,973
3.09375
3
[]
no_license
import numpy as np from matplotlib import pyplot as plt import scipy.special as ss import scipy def f(x): return x def f0(x, Omega2): return - (1 - x**2)**0.5 * (np.tan((Omega2 * (1 - x**2))**0.5))**-1 def F(L, x, Omega2): a = scipy.sqrt((Omega2 * (1 - x**2))) b = 1j * Omega2**0.5 * x coe...
Markdown
UTF-8
2,019
2.6875
3
[ "MIT" ]
permissive
--- title: Paulus in Rom date: 03/10/2017 --- `„Als wir nun nach Rom hineinkamen, wurde Paulus erlaubt, für sich allein zu wohnen mit dem Soldaten, der ihn bewachte.“ (Apg 28,16) Was sagt uns dieser Text darüber, wie Paulus letztlich nach Rom kam? Was lernen wir daraus hinsichtlich der unerwarteten und unerwünscht...
C#
UTF-8
1,177
2.859375
3
[]
no_license
using System; using System.ComponentModel.DataAnnotations; using System.Collections.Generic; using System.Text; using System.ComponentModel.DataAnnotations.Schema; namespace EventManager.Model { [NotMapped] public class LoginViewModel { [Required(ErrorMessage = "Username is Required.")] [R...
Markdown
UTF-8
3,502
3
3
[]
no_license
# ajax-content Adalah penyedia layanan ajax content untuk front-end. Modul ini menyediakan satu service dengan nama `ajax` dengan penggunaan seperti di bawah: ``` // index.phtml <?= $this->ajax->content('target-ajax-1'); ?> <?= $this->ajax->content('target-ajax-2', 'placement'); ?> <?= $this->ajax->content('target-aj...
Java
UTF-8
467
1.742188
2
[]
no_license
package ua.vlad.hg.rest.dto; import lombok.Getter; import lombok.Setter; import ua.vlad.hg.core.dto.Polygon; import java.math.BigDecimal; import java.util.Date; import java.util.List; @Getter @Setter public class RestGroundDto { private Long id; private RestAddressDto address; private String alias; ...
C#
UTF-8
673
2.546875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
namespace VosSoft.ZuneLcd.Api { /// <summary> /// Specifies the user rating types of a track. /// </summary> /// <remarks>This is originally just an int value in the Zune software.</remarks> public enum TrackRating { /// <summary> /// Track can't be rated. /// </summary>...
PHP
UTF-8
2,703
2.96875
3
[]
no_license
<?php class saunavuoro { private $snimi; private $alkuaika; private $loppuaika; private $ID; public static function getSaunavuoro($id) { $sql = "SELECT ID, snimi, alkuaika, loppuaika from saunavuoro where ID = ?"; $kysely = getTietokanta()->prepare($sql); $kysely->execute(...
PHP
UTF-8
443
2.703125
3
[]
no_license
<!doctype html> <html> <head> <title>ログイン</title> <meta charset="utf-8"> </head> <body> <?php session_start(); $id = @$_POST["id"]; $pwd = @$_POST["password"]; if (!$id) { $id = "matsumoto"; } if (!$pwd) { $pwd = "password"; } $_SESSION["id"] = $id; $_SESSION["pwd"] = $pwd; ?> ログインしました(id:<?php echo htm...
C#
UTF-8
1,445
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Banka { public partial class Bank_Main : Form { private int childFormNumber = ...
PHP
UTF-8
904
2.546875
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateQueuesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('queues', functio...
JavaScript
UTF-8
1,543
4.21875
4
[]
no_license
'use strict' //BUCLE WHILE /* Es parecido al bucle for pero menos estricto, de forma que puedo hacer bucles infinitos. Va a constar de una condicion que cuando se cumpla se va a ejecutar un bloque de instrucciones infinitamente hasta que no se cumpla la condición que lo pare. Se comprueba una condición y después se e...
Java
UTF-8
100
2.171875
2
[]
no_license
package ports.notifier; public interface Notifier<T> { void notifyAboutCreationOf(T entity); }
TypeScript
UTF-8
2,301
2.5625
3
[]
no_license
import { IDateRange } from './../../../app/model/dateRange.model'; import { IDeveloper } from './../../../app/model/developer.model'; import { IRepository } from './../../../app/model/repository.model'; import { programmingLanguages } from './../constants/programmingLanguages'; import { spokenLanguages } from './../con...
C#
UTF-8
1,009
2.59375
3
[ "MIT" ]
permissive
using System; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace Obi{ [System.AttributeUsage(System.AttributeTargets.Field)] public class MinMaxAttribute : MultiPropertyAttribute { float min; float max; public MinMaxAttribute(float min, float max) { this.min = min...
PHP
UTF-8
1,026
2.515625
3
[]
no_license
<?php /** * @version 1.0.0 townwizard_container $ * @package townwizard_container * @copyright Copyright © 2012 - All rights reserved. * @license GNU/GPL * @author MLS * @author mail nobody@nobody.com * * * */ // no direct access defined('_JEXEC') or die('Restricted access'); class TownwizardHelper { p...
C++
UTF-8
316
2.671875
3
[]
no_license
// // Created by Admin on 13/05/2019. // #include <gtest/gtest.h> #include "GetIndexFunction.cpp" #include <vector> TEST(GetIndextTest, testWithValidData){ std::vector<int> list = {2, 4, 5, 7, 30, 31}; int expectedValue = 5; int result = getIndex(list, 31); ASSERT_EQ(result, expectedValue); }
Java
UTF-8
974
3.140625
3
[ "Unlicense" ]
permissive
import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.Signature; public class Main{ public static void main(String args[]){ try{ KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("DSA"); keyPairGen.initialize(2048); K...
Python
UTF-8
410
2.5625
3
[ "MIT" ]
permissive
def test_eth_getBalance(rpc_client, accounts): before_balance = rpc_client("eth_getBalance", [accounts[1]]) rpc_client( method="eth_sendTransaction", params=[{ "from": accounts[0], "to": accounts[1], "value": 1234, }], ) after_balance = rpc_c...
PHP
UTF-8
1,363
2.71875
3
[]
no_license
<?php namespace Intelligent\Mail; use Intelligent\Kernel\Config; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; class Mail extends PHPMailer { public function __construct($exceptions, $body = '') { parent::__construct($exceptions); //Show debug output $this->SMTPDebug = false; // ...
Markdown
UTF-8
449
3.03125
3
[]
no_license
# 4.9 算数操作符 `+`, `-`, `*`, `/`和`%`这种算数操作符也是支持的: ``` <div th:with="isEven=(${prodStat.count} % 2 == 0)"> ``` 注意这些操作符也可以在OGNL变量表达式中使用(如果在OGNL表达式中使用,这个表达式就会由OGNL执行,而不是Thymeleaf标准表达式引擎): ``` <div th:with="isEven=${prodStat.count % 2 == 0}"> ``` 注意一些操作存在文本别名:`div` (`/`), `mod` (`%`)
TypeScript
UTF-8
1,963
2.5625
3
[ "MIT" ]
permissive
import { IsEmail, IsNotEmpty, Length } from 'class-validator'; import { Exclude, Transform, Expose, Type } from 'class-transformer'; import { Account } from '../interfaces/account.interface'; export class AccountDto { constructor(partial: Partial<any>) { if(partial._doc){ Object.assign(this, partial._do...
Markdown
UTF-8
1,109
2.609375
3
[]
no_license
# ZooAPP **Proyecto de creación de API hecho durante el curso de MCSD.** * Crear un **repositorio** en GitHub. Incluir el fichero .gitignore y README.md con nombre y una breve descripción del ejercicio * Crear la **base de datos.** * Crear un **login** para acceder a esa base de datos * Crear las **tablas y rellenar*...
Python
UTF-8
813
2.859375
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Wed Feb 10 13:15:16 2021 @author: Pierre RIGAL, Victor GUILLEN, Romain MEUNIER """ import utils import numpy as np from uplift import Uplift def main(): data, labels = utils.load_dataset("./test/testV2.csv", False, np.int) # chargement du fichier print(data) print(la...
PHP
UTF-8
1,047
3.515625
4
[]
no_license
<?php class Plant { public $loves_sun = true; private $made_of_wood = "nope"; public $growth_rate = "grow fast"; public function r_u_wood() { return "Am I made of wood? " . $this->made_of_wood; } public function set_wood($made_of_wood) { $this->made_of_wood = $made_of_wood; } } class Tree exte...
Python
UTF-8
558
3.3125
3
[]
no_license
'''Змінній t привласнити значення істина, якщо максимальний елемент одновимірного масиву єдиний і не перевищує наперед заданого числа а. виконал Пахомов Олександр''' import numpy as np t=False a=np.zeros(10, dtype= int) x=int(input('zadane:')) c=0 for i in range(10): a[i]=int(input('number:')) m=a.max() ...
TypeScript
UTF-8
1,545
2.734375
3
[]
no_license
import * as minimist from "minimist"; import { PelisController } from "./controllers"; function parseaParams(argv) { const resultado = minimist(argv); return resultado; } //funcion que conecta los argumentos con el modulo controllers function opcionesDeParametros(params, controller) { var resultadoFinal;...
Java
UTF-8
1,732
2.21875
2
[]
no_license
// Copyright 2018 The Feed Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
JavaScript
UTF-8
298
2.53125
3
[]
no_license
// npm install request 명령어를 실행해주세요. // 모듈을 추출합니다. const request = require('request'); // request 모듈을 사용합니다. const url = 'http://www.hanbit.co.kr/store/books/new_book_list.html'; request(url, (error, response, body) => { console.log(body); });
Markdown
UTF-8
1,661
2.890625
3
[]
no_license
# CellBE-Compression Lossy image compresion designed for the Cell Broadband Engine architecture. <b>PPU code:</br></b> The code running on the central PPU contains the compress_parallel and decompress_parallel functions, with similar implementation. The SPU structures that will be sent through DMA are alligned at 16 b...
Markdown
UTF-8
76,361
2.71875
3
[ "MIT" ]
permissive
# 统计信息函数<a name="ZH-CN_TOPIC_0242370462"></a> 统计信息函数根据访问对象分为两种类型:针对某个数据库进行访问的函数,以数据库中每个表或索引的OID作为参数,标识需要报告的数据库;针对某个服务器进行访问的函数,以一个服务器进程号为参数,其范围从1到当前活跃服务器的数目。 - pg\_stat\_get\_db\_numbackends\(oid\) 描述:处理该数据库活跃的服务器进程数目。 返回值类型:integer - pg\_stat\_get\_db\_xact\_commit\(oid\) 描述:数据库中已提交事务的数量。 返回值...
C
UTF-8
412
2.78125
3
[]
no_license
#include<stdio.h> int main() { long long int n,q; scanf("%lld %lld",&n,&q); long long int i,arr[n]; scanf("%lld",&arr[0]); for(i=1;i<n;i++) { long long int a; scanf("%lld",&a); arr[i]=arr[i-1]+a; } for(i=0;i<q;i++) { long long int a,b; char s[4]; scanf("%s %lld %lld",s,&a,&b); if(a>1) printf("...
C#
UTF-8
5,599
2.546875
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Data.SqlClient; using System.Threading.Tasks; using System.Windows.Forms; namespace CrimeManagementSystem { public partial class Main : Form ...
C++
UTF-8
826
3.046875
3
[ "MIT" ]
permissive
class Solution { public: string predictPartyVictory(string senate) { queue<int> q{}; vector<int> people(2, 0), bans(2, 0); //0 -> DIRE and 1-> RADIANT // Counting people and adding to the queue for (auto ch : senate) { int idx = (ch == 'R') ? 1 : 0; p...
Java
UTF-8
493
1.835938
2
[]
no_license
package com.allmsi.sys.dao; import java.util.List; import com.allmsi.sys.model.po.User; public interface UserMapper { User login(User user); List<User> select(User user); int selectCount(User user); User selectByPrimaryKey(String id); List<User> selectByDeptId(String deptId); List<User> selectByRoleId...
Python
UTF-8
905
2.9375
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
import re from typing import Dict from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class CurrentPositionGCodeFunctionalityDef(GCodeFunctionalityDefBase): RESPONSE_RE = re.compile(r"(?P<axis>[ABCXYZ]):(?P<value>-?\d+.\d+)") @classmethod ...
Markdown
UTF-8
5,425
2.9375
3
[ "Apache-2.0" ]
permissive
**Show All Supported Coins(Assets)** ---- Returns all supported coins(Assets) * **URL** /coins * **Method:** `GET` * **URL Params** **Optional:** `id=[string]` * **Success Response:** * **Code:** 200 <br /> **Content:** ```json [ { "id": "988f08b3b21e3...
Markdown
UTF-8
781
3.25
3
[ "BSD-3-Clause" ]
permissive
###Rules and Validation ---------- To set validation rules, set this property to a array of validation rules normally. Crud will automatically run the validation and return false if it fails. protected static $_rules = array( 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required|e...
C#
UTF-8
3,337
2.546875
3
[ "MS-PL" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using Tftp.Net.Transfer.States; using System.IO; using Tftp.Net.Transfer; namespace Tftp.Net.UnitTests { [TestFixture] class StartIncomingReadState_Test { private TransferStub...
Go
UTF-8
410
2.578125
3
[]
no_license
package main /* type interface_name interface { 3. method_name1 [return_type] 4. method_name2 [return_type] 5. method_name3 [return_type] 6. ... 7. method_namen [return_type] 8.} 9. 11.type struct_name struct { 13.} 14. 16.func (struct_name_variable struct_name) method_name1() [return_type] { 18.} 19.....
Java
UTF-8
1,804
4.375
4
[]
no_license
package ArraysAndStrings; public class URLify { /* Write a method to replace all spaces in a string with '%20: You may assume that the string has sufficient space at the end to hold the additional characters, and that you are given the "true" length of the string. */ public static void ...
Python
UTF-8
1,114
2.625
3
[ "MIT" ]
permissive
from commandlib import CommandError, Command, python, python_bin from hitchrun import DIR, expected # Usable path.py objects -- https://pathpy.readthedocs.io/en/stable/api.html # DIR.gen -- build directory (~/.hitch/xxxxxx, where the symlink 'gen' links to) # DIR.project -- the directory containng the "hitch" folder....
Java
UTF-8
1,029
1.914063
2
[]
no_license
package com.yundingshuyuan.website.service; import com.yundingshuyuan.website.form.AlbumFileForm; import com.yundingshuyuan.website.form.AlbumFilePageForm; import com.yundingshuyuan.website.pojo.AlbumFile; import com.baomidou.mybatisplus.extension.service.IService; import com.yundingshuyuan.website.response.ServerResp...
JavaScript
UTF-8
2,092
2.75
3
[]
no_license
"use strict"; exports.__esModule = true; exports.mobileLibrary = void 0; var mobileLibrary = /** @class */ (function () { function mobileLibrary(name, location, mobiles) { this.name = name; this.location = location; this.mobiles = mobiles; this.totalPrice = this.totalPriceCalculation...
Java
UTF-8
1,209
2.109375
2
[]
no_license
package com.aa.caraoucoroa; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; public class ResultadoActivity extends AppCompatActivity { private ImageView imgMoeda, btnVoltar; ...
C++
UTF-8
9,354
2.953125
3
[]
no_license
#ifndef MANEJOARCHIVO_H #define MANEJOARCHIVO_H #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include "estructuras.h" #include "lista.h" #include "conversiones.h" using namespace std; class manejoArchivo{ conversiones conversiones_tipos; ...
PHP
UTF-8
1,036
2.546875
3
[ "Apache-2.0" ]
permissive
<?php namespace Wambo\Core\Storage; /** * Class JSONDecoderTest * * @package Wambo\Core\Storage */ class JSONDecoderTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function testGetData() { // arrange $jsonDecoder = new JSONDecoder(); $json = <<<JSON ...
C#
UTF-8
1,772
2.515625
3
[]
no_license
using AutoMapper; using CleanArchitecture.Application.DTOS; using CleanArchitecture.Application.Interfaces; using CleanArchitecture.Application.Products.Commands; using CleanArchitecture.Application.Products.Queries; using MediatR; using System; using System.Collections.Generic; using System.Threading.Tasks; namespac...
Java
UTF-8
3,457
2.46875
2
[]
no_license
package com.acorn.testanything.countdown; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.CountDownTimer; import android.os.IBinder; import com.acorn.testanything.utils.LogUtilKt; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.r...
Java
UTF-8
4,278
2.078125
2
[]
no_license
package cn.sioo.pojo; import javax.persistence.Column; import java.util.Objects; /** * Created by morrigan on 2017/6/2. */ public class SmsUserSignstore extends BaseEntity { private Integer id; private Integer uid; private String store; @Column(name="expend") private String expend; priv...
C#
UTF-8
455
3.1875
3
[]
no_license
using System; namespace Home15 { /* * */ class Program { static void PrinArray(int[] myArray, int i = 0) { if (i < myArray.Length) { Console.WriteLine(myArray[i]); PrinArray(myArray, i + 1); } } ...
Swift
UTF-8
1,162
2.5625
3
[ "MIT" ]
permissive
// // ModuleLoader.swift // PainlessInjection // // Created by Yaroslav Zhurakovskiy on 7/18/16. // Copyright © 2016 Yaroslav Zhurakovskiy. All rights reserved. // import Foundation class ModuleLoader { func listOfModules() -> [Module] { var result: [Module] = [] let numberOfClas...
Java
UTF-8
1,235
2.484375
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2013 Harald Postner <Harald at H-Postner.de>. * * 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 r...
PHP
UTF-8
431
2.859375
3
[ "MIT" ]
permissive
<?php ?><?php class Whatever { const SOME_CONSTANT = PHP_VERSION; public function doSomething(): self { return new class extends Anything { public function doSomethingElse(): Whatever { } }; } public function doSomethingElse() { return new class extends Whatever { }; } public function...
Java
UTF-8
3,472
1.976563
2
[ "Apache-2.0" ]
permissive
package org.xmlcml.ami2.plugins; import java.io.File; import java.io.IOException; import java.util.List; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; import org.xmlcml.ami2.AMIFixtures; import org.xmlcml.cmine.files.CProject; ...
Java
UTF-8
479
3.03125
3
[]
no_license
package gui; import java.awt.Graphics; import javax.swing.JPanel; @SuppressWarnings("serial") public class DrawingPanel extends JPanel{ private final int WELCOMESTATE = 1; private int state; public DrawingPanel(){} public void displayWelcomeScreen() { state = WELCOMESTATE; ...
Python
UTF-8
412
3.484375
3
[]
no_license
# l: coin value, n: total sum def numberOfWays(coins,total): if len(coins)==1: return 1 else: res=0 coinsPopped=coins[:] last = coinsPopped.pop() # i number of last coins used for i in range(0,total/last + 1): res+= numberOfWays(coinsPopped,t...
C#
UTF-8
13,794
3.15625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Robots_vs_Dinosaurs { class Battlefield { //member variables Herd theHerd; Fleet theFleet; public bool isAttackerRobot = true; string attackerV...
Java
UTF-8
3,137
2.34375
2
[]
no_license
package just.forward.api.proposition; import java.util.Objects; import java.util.Set; import java.util.function.Predicate; import java.util.stream.Stream; import javax.annotation.concurrent.Immutable; import com.google.common.collect.ImmutableSet; import just.forward.api.common.Substitution; import just.forward.api...
Java
UTF-8
739
2.03125
2
[]
no_license
package com.taomei.redfruit.api.wechat.article.data; /** * 微信文章响应体 */ public class ArticleResponse { /** * 状态码 */ private String status; /** * 消息 */ private String msg; /** * 微信文章分页数据 */ private ArticleResult result; public String getStatus() { retu...
Java
UTF-8
588
3.65625
4
[]
no_license
package com.javaguru.lesson2; import java.util.Scanner; class SquareCalculatorDemo { public static void main(String[] args) { int userNumber = getNumberFromUser(); SquareCalculator squareCalculator = new SquareCalculator(); int result = squareCalculator.calculateSquare(userNumber); ...
Python
UTF-8
1,249
2.921875
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Fri Jun 19 17:14:01 2020 @author: xinmeng """ from PyQt5.QtWidgets import QWidget, QPushButton, QVBoxLayout, QApplication import sys import threading import time def run_in_thread(fn): """ https://stackoverflow.com/questions/23944657/typeerror-method-takes...
Markdown
UTF-8
586
2.75
3
[ "MIT" ]
permissive
--- layout: post title: Two kinds of comfort tags: reflecting --- There's two kinds of comfort; one for body, another for mind. Comfort for body is sitting in a couch, being content with my surrounding. Comfort for mind is the absence of distractions. "A man is rich in proportion to the number of things which he ca...
JavaScript
UTF-8
921
2.625
3
[]
no_license
var product = (function () { return { findByDepartmentId: function (list, departmentId) { return list.filter(function (prod) { return departmentId === 0 || prod.DepartmentId === departmentId; }); }, renderTable: function (products, departments) { ...
Python
UTF-8
2,104
3.5
4
[]
no_license
""" model.py 作用:包含model类,生成一个全连接神经网络对象 成员变量:网络层数layer_num,网络维度sizes,连接权重weights,偏置biases 成员函数:网络参数初始化__init__,前向传播forward_propagation,模型保存save_model 建模方法:mlpmodel = model([4,3,2,1]),生成4层,分别具有4,3,2,1个神经元的全连接神经网络 """ import numpy as np from activationfun import * class model(): def __init__(self,sizes): ...
Java
UTF-8
1,277
2.0625
2
[]
no_license
/** * */ package cn.edu.sjtu.se.dclab.server.entity; /** * @author chenhui * */ public class SecondGoods { private Integer id; private String category; private String type; private String title; private String imagePath; private String desc; private String owner; private String phone;...
C++
UTF-8
7,265
2.703125
3
[ "MIT" ]
permissive
// // MesherMarchingCubes.cpp // PinkTopaz // // Created by Andrew Fox on 3/14/16. // // #include "Terrain/MesherMarchingCubes.hpp" #include "Renderer/TerrainVertex.hpp" #include "Grid/GridPoints.hpp" #include "math.hpp" // for clamp #include <glm/glm.hpp> #include <array> #include "SDL.h" using glm::vec3; using g...
PHP
UTF-8
1,133
2.625
3
[]
no_license
<?php namespace Weeks\CurrencyWatcher\Application; use DI\ContainerBuilder; class App extends \DI\Bridge\Slim\App { const ENV_PRODUCTION = 'production'; /** * @var string */ private $environment; /** * @var */ private $applicationRoot; /** * App constructor. * ...
Python
UTF-8
1,013
3.640625
4
[]
no_license
def hello(arg): print(f"Hello. You passed in {arg}.") def generic_func(): print("generic_func() from first") print("This print is not inside of a function.") def dict_func_example_a(x): print(f"dict_func_example_a({x})") def dict_func_example_b(x): print(f"dict_func_example_b({x})") def dict_...
Java
UTF-8
365
2.109375
2
[]
no_license
import java.util.HashMap; /** * Created by dreamlab2 on 4/19/17. */ public class EdgePartitionInterface implements PartitionInterface<HashMap<String,Object>> { @Override public int numPartitions() { return 1; } @Override public int getPartitionId(HashMap<String, Object> stringObjectHashM...
Java
UTF-8
459
1.804688
2
[]
no_license
package com.boco.modules.brhp.dao.healthedu; import java.util.List; import com.boco.common.annotation.MyBatisDao; import com.boco.common.persistence.CrudDao; import com.boco.modules.brhp.model.healthedu.HealthEduModuleEntity; @MyBatisDao public interface HealthEduModuleDao extends CrudDao<HealthEduModuleEntity>{ /*...
Java
UTF-8
719
2.9375
3
[]
no_license
package gfg.stringclass; public class conversionOfAll { public static void main(String [] wsdfg){ String str="shekhar"; System.out.println(str.toString()); //string to stringbuilder StringBuilder sb=new StringBuilder(str); System.out.println(sb.toString()); //string ...
Python
UTF-8
255
3.21875
3
[]
no_license
N = int(input()) c = 0 while c < N: C, D, H, M = input().split() D = int(D) H = int(H) M = int(M) t = 60*H+M if C == "B": t -= D else: t += D H = t//60 M = t - H*60 print(f'{H%24} {M}') c += 1
Rust
UTF-8
449
2.515625
3
[ "MIT" ]
permissive
use image::{ ImageBuffer, Rgba }; use transcode::Chunk; lazy_static! { static ref frame_buffer: Vec<u8> = Vec::new(); } pub fn chunks_to_frame(chunks: Vec<Chunk>) -> ImageBuffer<Rgba<u8>, Vec<u8>> { let mut t_buf: Vec<u8> = Vec::new(); for mut chunk in chunks { t_buf.append(&mut chunk.dat...
Markdown
UTF-8
980
2.828125
3
[]
no_license
# 基督徒抹黑迦南人 基督徒为了合理化以色列人的屠城,常常抹黑迦南人。 比如知乎上的雅比斯说: > 当年的迦南原住民拜的一种偶像叫摩洛,摩洛是中空的铜像,可以烧热。然后拜的时候一起在群交,生出来的孩子放摩洛手里烧死。圣经称为:经火归于摩洛。迦南地的考古也证实当年的宗教习俗非常淫乱血腥。 你有什么考古资料? 迦南人生活时代,对应中国的商朝武丁时代,我们找点商朝的古迹怎么这么难,而基督徒居然能考古知道别人喜欢群交。你是穿越了吗?还是意淫知道的? 你往 已经死绝的迦南人 身上泼脏水就 这么心安理得吗?不 怕 生 孩 子 没 pi yan 儿吗? 为什么基督教的谣言如此之多? 因为雅比斯这样的信徒太多了,为了突出上帝的伟...
Markdown
UTF-8
2,238
3.609375
4
[]
no_license
--- title: 익명클래스 date: 2018-11-20 09:37:31 categories: - Language - Java tags: - Java thumbnail: /images/java.png --- ### 익명클래스 익명객체는 이름이 없는 객체를 말한다. 이는 단독으로 생성할 수 없고 클래스를 상속하거나 인터페이스를 구현해야만 생성할 수 있다. UI 이벤트 처리 객체나 스레드 객체를 간편하게 생성할 목적으로 많이 활용된다. 익명클래스는 생성자를 선언할 수 없다는 특징이 있으며 클래스가 재사용되지 않을 때 사용하는것이 좋다. 익명 자식 객체에 새롭게 정의된...