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
7,630
2.6875
3
[]
no_license
package model; import java.time.LocalDate; public class TradeVO { private int t_number; // 거래번호 private String f_number; // 제품코드 private int c_number; // 고객번호 private String c_name; // 고객명 private String c_phone; // 연락처 private String t_email; // 이메일 private int t_amount; // 총수량 private int t_price; // 총가격 ...
PHP
UTF-8
2,756
2.71875
3
[ "MIT" ]
permissive
<?php /** * FilterQuery.php * * @since 19/01/17 * @author gseidel */ namespace Enhavo\Bundle\AppBundle\Filter; use Enhavo\Bundle\AppBundle\Controller\RequestConfiguration; use Enhavo\Bundle\AppBundle\Exception\FilterException; use Enhavo\Bundle\AppBundle\Type\CollectorInterface; use Symfony\Component\HttpFoundat...
Python
UTF-8
114
2.890625
3
[]
no_license
s,n=0,int(input()) for i in range(1,int(n**.5)+1): if n%i==0: s+=i if i*i!=n:s+=n//i print(s)
Markdown
UTF-8
3,243
3.625
4
[]
no_license
# 843. Guess the Word ### hard This problem is an interactive problem new to the LeetCode platform. We are given a word list of unique words, each word is 6 letters long, and one word in this list is chosen as secret. You may call master.guess(word) to guess a word. The guessed word should have type string and must ...
Java
UTF-8
494
1.953125
2
[ "Apache-2.0" ]
permissive
package org.gluu.casa.plugins.credentials.extensions; import org.gluu.casa.extension.navigation.MenuType; import org.gluu.casa.extension.navigation.NavigationMenu; import org.pf4j.Extension; /** * @author madhumita * */ @Extension public class SampleMenu implements NavigationMenu { public String getContentsU...
Shell
UTF-8
454
2.90625
3
[]
no_license
#!/bin/sh # MARKETING_VERSION="1.0" # VERSION=${MARKETING_VERSION}"."${BUILD_NUMBER} # # if [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]; then # if [[ "$DEV" = "IOS" ]]; then # echo "Beta build - set version" # VERSION="5.0.1" # fi # # if [[ "$DEV" = "ANDROID" ]]; then # echo "UAT build - set version" # V...
JavaScript
UTF-8
6,844
2.734375
3
[]
no_license
import React, { Component } from 'react'; import './Seat.css' import axios from 'axios' class Seat extends Component { constructor(props) { super(props) this.state = { // craeting an empty array of objects totalSeats: [...new Array(this.props.totalSeats)].map((item, index) =...
Ruby
UTF-8
5,370
2.515625
3
[ "MIT" ]
permissive
require "scale" describe Scale::Types do before(:all) { Scale::TypeRegistry.instance.load } it "can create a hard coded type" do type = Scale::Types.get("Compact") expect(type).to eq(Scale::Types::Compact) type = Scale::Types.get("Hex") expect(type).to eq(Scale::Types::Hex) end # Vec ...
PHP
UTF-8
3,418
2.78125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller { /* |---------------------------------------...
PHP
UTF-8
3,039
2.625
3
[]
no_license
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Tools extends CI_Controller { private $sql_backup_params; function __construct() { parent::__construct(); $this->sql_backup_params = array( 'tables' => array(), // Array of tables to backup...
JavaScript
UTF-8
1,790
2.625
3
[]
no_license
import { GET_ALL_ATTRIBUTES, SELECT_ATTRIBUTE, ADD_VALUE, REMOVE_VALUE } from '../actions/types'; export default function( state = { attributes: [], selectedAttributeId: '', }, action ) { switch (action.type) { case GET_ALL_ATTRIBUTES: return { ...sta...
PHP
UTF-8
1,985
2.765625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * @author Amidasd * @copyright 2014 */ if (!defined('BASEPATH')) exit('No direct script access allowed'); class Crud extends CI_Model { var $table = ''; //Имя таблиці var $idkey = ''; //Ключ ID var $add_rules = array(); //Правила валидации для добавления var $edit_rules = array(); //...
Shell
UTF-8
1,503
3.328125
3
[]
no_license
#!/bin/bash #set variables read -p "Enter the name for the NIC adapter " nic read -p "Enter the name for the WiFi adapter " wifi read -p "Enter the WiFi password: " wifipass #install unzip and wpa_supplicant, start and enable wpa_supplicant apt install unzip wpasupplicant lm-sensors -y systemctl start wpa_supplicant s...
Java
UTF-8
9,694
2.234375
2
[]
no_license
package lambda_test; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Builder; import lombok.Data; import java.util.ArrayList; import java.util.List; /** * 任务表 * * @author liyuzhen * @version 1.0 * @date 2019-08-06 14:37 */ @Data @Builder @ApiModel public cl...
Markdown
UTF-8
1,917
2.5625
3
[ "Apache-2.0" ]
permissive
# V1StatusDetails StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume...
PHP
UTF-8
2,779
3.59375
4
[]
no_license
<?php echo '<p>Лабораторная работа №5, часть 1(практикум)</p>'; // Переменные различных типов $Boolean = true; $Integer = 10; $Float = 0.001; $String = 'Text'; $a = 5; $b = 5; $c = $a + $b; echo "<p>a = 5, b = 5, a + b = $c<p>"; $a = ($b = 4) + 5; echo "<p> a = (b = 4) + 5 = $a</p>"; $String = ...
Python
UTF-8
5,845
4.03125
4
[]
no_license
""" Author: Patrick Sullivan A class to support the members of a family tree """ class Person: def __init__(self, name, parent1, parent2): """ A constructor for the Person class. If the person has no parents, the parent arguments should be None. :param name: String :param...
Python
UTF-8
1,676
3.1875
3
[]
no_license
import math import numpy as np from prettytable import PrettyTable def euclidean_distance(coord1,coord2): x_dist = math.pow((coord1[0] - coord2[0]),2) y_dist = math.pow((coord1[1] - coord2[1]),2) return math.sqrt(x_dist + y_dist) def make_same_len(c,d): l = max(len(c),len(d)) if(len(c) < l): ...
Python
UTF-8
1,412
4.1875
4
[]
no_license
# Problem: https://www.hackerrank.com/challenges/between-two-sets # Solved by: Edgardo (Elijah) Gutierrez # Date: 2/24/17 # Algorithm # 1) Find smallest element of 16, this is the upper bound to possible x. # 2) For all possible values of x, find the valid conditions. # 3) Increment counter when valid value of x is fo...
Shell
UTF-8
343
3.71875
4
[]
no_license
#!/bin/sh # Usage: $0 [grep args] curtrack(){ mpc | head -1 } playing(){ curtrack | grep "$@" > /dev/null return $? } sleep_on_mpd(){ mpc idle player >/dev/null } if test $# -eq 0 then now=`curtrack` if test -n "$now" then while playing -F "$now" do sleep_on_mpd done fi else while ! playing "$@" do...
Java
UTF-8
1,315
3.25
3
[]
no_license
package de.emeraldmc.chatsystem; public class ChatMessageQueue { private static final int size = 10; // Main.getInstance().getConfig().getInt("Config.messageCheckSize"); private ChatMessageLight[] chatMessages = new ChatMessageLight[size]; private int head = 0; private int tail = 0; public ChatMe...
Python
UTF-8
281
3.390625
3
[]
no_license
n = 100 a = [] for i in range(0, n+1): a.append(True) for i in range(2, n+1): if i*i > n: break if a[i]: j = i*i while j < n+1: a[j] = False j = j + i for i in range(2, n + 1): if a[i]: print(i)
Markdown
UTF-8
14,585
2.734375
3
[ "MIT" ]
permissive
MovieLens 1M Dataset ================ Roberto Preste 2019-01-13 From the book (chapter 14.2): > [GroupLens Research](http://www.grouplens.org/node/73) provides a number of collections of movie ratings data collected from users of MovieLens in the late 1990s and early 2000s. The data provide movie ratings, movie metad...
C++
UTF-8
460
2.625
3
[]
no_license
#include "stdafx.h" #include "CM.h" #include "Init.h" CM::CM():commands(std::vector<ACommand*>()) { lock = false; } CM::~CM() { for (ACommand* cmd : commands) delete cmd; } void CM::registry(ACommand* c) { if (lock) return; else { commands.push_back(c); } } void CM::undo() { if (co...
Python
UTF-8
7,018
3.015625
3
[ "MIT" ]
permissive
from ..util import getopt, zeros from ..vol import Vol from math import exp, tanh, log # Helper functions def relu(x): return max(0, x) def sigmoid(x): try: return 1.0 / (1 + exp(-x)) except: return 0 class ReluLayer(object): """ Implements ReLU nonlinearity elementwise x -...
JavaScript
UTF-8
1,316
2.703125
3
[]
no_license
import preloadImages from '../client/src/helpers/preloadImages'; import exampleData from '../ExampleActivityData'; describe('Images should be preloaded through link tabs in the head of the HTML document', () => { test('HTML should not have any link tags before preloadImages is run', () => { const links = documen...
Python
UTF-8
9,195
2.75
3
[]
no_license
##BlitzKrieg v.1.1 #Copyright Maya Pharis 2017 #GENERAL BOT STUFF #Imports and Bot Command definition import asyncio import discord import logging import math import os import random import sys from discord import utils from discord.ext.commands import Bot logging.basicConfig(level = logging.INFO) #Definition of Bli...
Java
UTF-8
537
3.015625
3
[]
no_license
/* * UCF COP3330 Summer 2021 Assignment 2 Solution * Copyright 2021 Ivy Nguyen */ package oop.assignment2.ex35.base; import java.util.ArrayList; import java.util.Random; public class Winner { private ArrayList<String> nameList; private static final Random rand = new Random(); public String setWinner...
Markdown
UTF-8
16,131
2.71875
3
[]
no_license
--- layout: default title: "Moving 3 Ways Part I" --- _____ ## Part 3 - Background Tiles _____ ### Drawing Tiles _____ {% assign num = 1 %} <div class = "row"> <div class="col-12 col-lg-4 col align-self-center"> <div markdown = "1"> {:start="{{ num }}"} {{ num }}. Lets right click on **Sprite** and create a n...
Shell
UTF-8
1,032
2.515625
3
[]
no_license
# # ~/.bashrc # # If not running interactively, don't do anything [[ $- != *i* ]] && return #Aliases alias ls='ls --color=auto' alias vi='vim' alias ll='ls -l --color=auto' alias s='ssh -XY' alias grep='grep --color=auto' alias sudo='sudo ' alias pcmn='sudo pacman ' alias vi=vim alias feh='feh -.' #Auto cd shopt -s ...
Python
UTF-8
115
2.515625
3
[]
no_license
l=[i for i in range(50)] m=[i**2 for i in range(51)] #n=[("a"+i)*i+1 for i in range(26)] print(l , m , sep=("\n"))
Python
UTF-8
1,201
3.0625
3
[]
no_license
import sys import pygame colors = [] for x in range(9): colors.append(pygame.Color(0,0,0,0)) pygame.init() dwidth = 256 dheight = 256 runGame = True rects = [] for y in range(3): for x in range(3): rects.append(pygame.Rect(y*(dheight/3)+4,x*(dheight/3)+4,dwidth/3-8,dheight/3-8)) displaySurface = ...
Python
UTF-8
2,026
2.765625
3
[]
no_license
try: from matching.chamfer import chamfer_matching except ImportError: chamfer_matching = lambda: None try: from matching.blob import blob_matching except ImportError: blob_matching = lambda: None import sys import os from PySide import QtGui from gui.preview import KeyFramePreview class MainWindow(Q...
Python
UTF-8
816
3.5625
4
[]
no_license
# http://stackoverflow.com/questions/214359/converting-hex-color-to-rgb-and-vice-versa def hex_to_rgb(value): value = value.lstrip('#') lv = len(value) return tuple(int(value[i:i+lv/3], 16) for i in range(0, lv, lv/3)) def rgb_to_hex(rgb): return '#%02x%02x%02x' % rgb def rgb_string_to_hex(rgb_string...
Java
UTF-8
2,109
3.1875
3
[]
no_license
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; public class SortTest { @Test public void testEmptyArray() { int[] arr = new int[]{}; int[] sortedArr = Quicksort.sortArray( arr, 0, arr.length - 1); assertArrayEquals( sortedArr, new int[]{} ); ...
C#
UTF-8
509
2.578125
3
[]
no_license
static void Main(string[] args) { DataTable resultsSystemA; DataTable resultsSystemB; DataTable resultsSystemC; Employee e = new Employee(); var a = Task.Run(() => { resultsSystemA = e.EmployeeSearch_SystemA(); }); var b = Task.Run(() => { resultsSystemB = e.E...
JavaScript
UTF-8
1,020
2.59375
3
[]
no_license
const path = require("path"); const http = require("http"); const url = require("url"); const fs = require('fs'); const users = require('./users.json'); const port = 3000; const publicDirectory = path.join(__dirname, '../public'); const server = http.createServer((req, res) => { if (req.method === "GET") { ...
PHP
UTF-8
628
2.71875
3
[ "Apache-2.0" ]
permissive
<?php declare(strict_types=1); namespace icePHP\Frame\Table; use function icePHP\Frame\Config\configDefault; /** * 生成一个标准表对象 * 这是一个STable的快捷入口 * @param string $name 表的别名 * @param string 缓存类型 * @return Table 表对象 */ function table(string $name = '', ?string $cacheType = null): Table { //如果未提供表名,使用默认表 if ...
Java
UTF-8
5,171
1.671875
2
[]
no_license
/* * (C) Copyright 2006-2009 Nuxeo SAS (http://nuxeo.com/) and contributors. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 2.1 which accompanies this distribution, and is available at * htt...
Python
UTF-8
2,289
2.765625
3
[ "MIT" ]
permissive
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2022.03.11 # [javascript - Selenium Python: Cannot click on class="mv-button-base mv-hyperlink-button" - Stack Overflow](https://stackoverflow.com/questions/71442966/selenium-python-cannot-click-on-class-mv-button-base-mv-hyperlink-button/71443746#71443...
JavaScript
UTF-8
189
3.0625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
let id = 0; const obj = { get x() { console.log("x", id++); }, }; let { x, y, ...z } = { ...obj, x: 1, y: 2, a: 3, b: 4 }; console.log(x); console.log(y); console.log(z);
Java
UTF-8
8,275
1.976563
2
[]
no_license
package com.fafu.kongshu.zhengxianyou.pinke; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.LinearLayout; ...
Python
UTF-8
3,517
3.71875
4
[ "MIT", "BSD-2-Clause" ]
permissive
# sort values class LinkedList(): def __init__(self) : self._head = None self._tail = None self._size = 0 def add_node(self, e): newest = Node(e, self._head) if self.is_empty(): self._head = newest self._tail = newest else: newest._next = self._head self._head = newest self._size +=...
PHP
UTF-8
1,305
2.515625
3
[]
no_license
<?php //export.php $connect = mysqli_connect("localhost", "root", "", "tutorial"); $output = ''; if(isset($_POST["export"])) { $query = "SELECT * FROM users"; $result = mysqli_query($connect, $query); if(mysqli_num_rows($result) > 0) { $output .= ' <table class="table" bordered="1"> ...
Java
UTF-8
865
3.921875
4
[]
no_license
package basics; //By using constructors copy the values of one object to another object. public class ConstructorDemo7 { //instance variables String username,password; ConstructorDemo7(String username, String password){ //assigning local values to instance variables this.username=username; this....
Java
UTF-8
1,179
2.671875
3
[]
no_license
package Assignment4; import javafx.event.ActionEvent; import javafx.scene.control.Button; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class GUISimulator { public Button btnArrive, btnLeave, btnClockUp, btnStats; public TextField txtClock, txtCustServed, txtNumCustWaiting;...
Python
UTF-8
381
3.15625
3
[]
no_license
import datetime current_date_time = datetime.datetime.utcnow() print(current_date_time) #asian time current_date_time = datetime.datetime.now() print(current_date_time) from dateutil.relativedelta import relativedelta #relative delta current_date_time += relativedelta(days = 30) print(current_date_time) current_d...
Markdown
UTF-8
1,480
2.90625
3
[]
no_license
# URL博客 ## URL内容(统一资源定位符) *URL包含了协议+域名或者ip+端口号+路径+查询字符+锚点 *锚点是不到服务器上的 ## DNS作用: 1. 将域名解析为IP 地址,客户端向DNS服务器发送域名查询请求。 2. nslookup命令:用来查询服务器和ip地址。 ## IP作用: 1. 用来定位一台设备。 2. 约定了如何封装数据报文,以跟其他设备交流。 3. ping命令:用来查询一个域名对应的ip,但是不同地区可能会有不同ip(比如华中、北、东、南)。 ## 域名: 域名(Domain names)是互联网基础架构的关键部分。它们为互联网上任何可用的网页服务器提供了方便人类理解的地址。 任何...
JavaScript
UTF-8
412
3.078125
3
[]
no_license
const login = document.getElementById("button") login.addEventListener("click", function (event) { event.preventDefault() const nama = document.getElementById("name") const pass = document.getElementById("password") if(nama.value === "admin" && pass.value === "admin"){ window.loca...
Java
UTF-8
5,930
3.078125
3
[]
no_license
package hiho; /** 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个1-N的排列A1, A2, ... AN,每次操作小Hi可以选择一个数,把它放到数组的最左边。 请计算小Hi最少进行几次操作就能使得新数组是递增排列的。 输入 第一行包含一个整数N。 第二行包含N个两两不同整数A1, A2, ... AN。(1 <= Ai <= N) 对于60%的数据 1 <= N <= 20 对于100%的数据 1 <= N <= 100000 输出 一个整数代表答案 样例输入 5 2 3 1 4 5 样例输出 1 ...
Python
UTF-8
168
3.09375
3
[]
no_license
#Link: https://edabit.com/challenge/pHp9qkjY53JNTGCG4 from math import ceil def century_from_year(year): return ceil(year/100) print(century_from_year(1901))
Python
UTF-8
123
2.734375
3
[]
no_license
def x_test(l,typein): for x,y in enumerate(l): if y==typein: break return x x_test("Soul","o")
Markdown
UTF-8
1,373
2.84375
3
[]
no_license
--- date: 2020-09-05 12:00 description: 本周的由于其他琐事的原因,每天能够用于开发的时间基本上只能保证 2-3 个小时,所以进展不大。不过好在我也没有明确的进度指标。 tags: SwiftUI, 健康笔记 title: 健康笔记 2.0 开发随笔(三) --- 由于家属突发疾病,最近每天都要出入医院,因此最近用于开发的时间很有限。 目前 app 已经完成了笔记、条目、数据的创建、编辑、显示、删除全部逻辑。如果不考虑图表、数据导入导出、交叉比对等功能,app 的基本功能已经完成了。 在本次开发中,我着重调整了表单的开发方式,目前表单无论从响应,判断等方便都比上一版有了很大的提高。 本次...
Java
UTF-8
3,069
1.976563
2
[ "Apache-2.0" ]
permissive
/* * (c) Copyright 2020 Palantir Technologies Inc. All rights reserved. * * 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 ...
C++
UTF-8
7,726
2.84375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> #define MAX_SIZE 256 #define FILLER 0 typedef struct TTree { unsigned char sym; unsigned int freq; struct TTree* left; struct TTree* right; } Tree; typedef struct TStack{ Tree* root; struct TStack* next; } Stack; ...
C#
UTF-8
8,351
3.0625
3
[]
no_license
using System; using System.Threading; using System.Threading.Tasks; namespace chancies.adventofcode { public class Computer : IDisposable { private readonly ManualResetEvent _mre; private readonly ILog _log; private readonly string _id; private Pipeline _inputPipeline;...
Python
UTF-8
1,520
2.609375
3
[]
no_license
import xlrd import sqlite3 conn = sqlite3.connect('xlsparser.db') cur = conn.cursor() rb = xlrd.open_workbook('registry_full.xls',formatting_info=True) sheet = rb.sheet_by_index(0) #Считываем из эксельки переменные for rownum in range(sheet.nrows): row = sheet.row_values(rownum) comp_inn=int(row[10]) pri...
Markdown
UTF-8
2,376
3
3
[ "MIT" ]
permissive
# create-react-app app example Example of using **app-server** with a trivial [**create-react-app**](https://github.com/facebook/create-react-app) app. ## Run the example in development mode ```sh git clone https://github.com/staticdeploy/app-server.git cd app-server/examples/create-react-app yarn install # Start th...
Python
UTF-8
2,554
3.296875
3
[ "BSD-2-Clause" ]
permissive
""" Gaussian Distribution with Outliers ----------------------------------- This figure shows the distribution of points drawn from a narrow Gaussian distribution, with 20% "outliers" drawn from a wider Gaussian distribution. Over-plotted are the robust and non-robust estimators of the mean and standard deviation. """...
TypeScript
UTF-8
2,807
2.78125
3
[ "LGPL-2.0-or-later", "GPL-1.0-or-later", "ISC", "MIT", "BSD-3-Clause", "Apache-2.0", "0BSD", "BSD-2-Clause", "LGPL-2.1-only", "GPL-3.0-or-later" ]
permissive
import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { DefaultErrorMap, ErrorMap, isMapError, UrlFragmentToHttpErrorMap } from './error-map-utils'; /** * Options that enable the ErrorMapService to find the wanted ErrorMap (specifically in the case of http errors)...
Java
UTF-8
197
1.835938
2
[]
no_license
package br.com.mm.service; import br.com.mm.config.exceptions.MMException; import br.com.mm.model.virtual.Movie; public interface MovieService { Movie getById(int id) throws MMException; }
Java
UTF-8
2,175
2.375
2
[ "MIT" ]
permissive
package com.bakdata.conquery.models.preproc.parser.specific; import java.math.BigDecimal; import java.math.BigInteger; import com.bakdata.conquery.models.config.ConqueryConfig; import com.bakdata.conquery.models.events.stores.primitive.DecimalArrayStore; import com.bakdata.conquery.models.events.stores.root.DecimalSt...
Shell
UTF-8
177
2.859375
3
[ "BSD-3-Clause-Open-MPI" ]
permissive
#!/bin/bash # checking the parameters if [$# -ne 1]; then echo "Usage: ./visualize_Q_P.sh P.csv Q.csv" fi export P_INPUT=$1 export Q_INPUT=$2 gnuplot visualize_Q_P.gp -p
Ruby
UTF-8
12,086
2.71875
3
[]
no_license
#! /usr/bin/ruby -w # # callcc.rb: a Fiber implementation for Ruby 1.8, based on callcc # by pts@fazekas.hu at Tue Nov 30 21:36:00 CET 2010 # # SUXX: It has terrible memory leaks in Ruby 1.8. # # This script works in Ruby 1.9 (using the built-in Fiber class) and Ruby 1.8 # (using the emulation provided here). # # TODO(...
Shell
UTF-8
2,671
3.609375
4
[]
no_license
#!/bin/sh -e verifyArchive() { echo "Verifying archive" YES_COUNT=$(./rosa debug testdata/archive.rosa|head|grep Yes|wc -l) ORPHANS_COUNT=$(./rosa debug testdata/archive.rosa|grep "refs: 0"|wc -l) if [ "$YES_COUNT" -ne "0" ] then echo "There is either journal or orphan nodes!" exit 1 fi if [ "$ORPHANS_COUNT...
Markdown
UTF-8
2,615
2.796875
3
[ "MIT" ]
permissive
--- title: Jmeter 从数据库查询多个字段,依次传给登录接口怎么实现 date: 2021-09-09 10:37:00 +0800 categories: [JMeter, 基础] tags: [JMeter基础] pin: false --- **如果需要查询多个字段,都要传给登录接口该如何操作?例如查询返回的用户名和密码,两个字段传给登录接口** ### 一、添加jdbc请求并设置变量,获取数据库多个字段值 1、添加好JDBC Connection Configuration并做好数据库连接配置 2、导入mysql驱动jar包 3、添加线程组-->右键线程组-->添加jdbc request,并做好设置...
Java
UTF-8
1,011
2.75
3
[]
no_license
package exemplu2; public class Programator extends Angajat implements IAngajat{ private int salariuOra; public Programator(String nume,String cnp,int sal) { super(nume,cnp); this.salariuOra=sal; } @Override public int calculeazaSalariu() { // TODO Auto-generated method stub return salariuOra*NR_ZILE*NORMA_ZI; ...
JavaScript
UTF-8
471
2.625
3
[]
no_license
import { LOAD_BOOKS, ADD_BOOK } from '../actions'; const initialState = { books: [] }; const books = (state = initialState, action) => { switch (action.type) { case LOAD_BOOKS: return { books: [...action.books] } break; case ADD_BOOK: console.log('REDUCERS ADD_BOOK', action....
Python
UTF-8
1,003
3.921875
4
[]
no_license
class Mystuff(object): def __init__(self): self.tangerine = "And now a thousand years between\n" def apple(self): print "I AM CLASSY APPLES!" thing = Mystuff() thing.apple() print thing.tangerine class Song(object): def __init__(self, lyrics): self.lyrics = lyrics def sing_me_a_song(self): for line in...
C
UTF-8
1,294
2.96875
3
[]
no_license
/* ** EPITECH PROJECT, 2018 ** add_alias.c ** File description: ** add alias */ #include "ftsh.h" void create_alias(alias_t *alias, char *cmd, char *new) { memset(alias, 0, sizeof(alias_t)); strcpy(alias->cmd, cmd); strcpy(alias->new, new); } void set_add_alias(char *tmp, char **cmd) { strcat(tmp, cm...
Java
UTF-8
1,180
2.265625
2
[]
no_license
package com.kudinov.restoratorclient.adapter; import android.app.Activity; import android.content.Context; import android.support.annotation.NonNull; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.kudinov.restoratorclient.R; impo...
C#
UTF-8
1,629
2.875
3
[]
no_license
using PagedList; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TengDa.Models { public interface IPagedData { int PageCount { get; set; } int PageNumber { get; set; } int PageSize { get; set; } in...
Java
UTF-8
625
1.796875
2
[]
no_license
package consulo.php.impl.lang.documentation.params; import consulo.codeEditor.Editor; import consulo.language.editor.AutoPopupController; import consulo.language.psi.PsiDocumentManager; import consulo.language.psi.PsiFile; /** * @author jay * @date Jun 30, 2008 8:20:42 PM */ public class PhpParameterInfoHandlerUti...
Java
UTF-8
11,088
1.703125
2
[]
no_license
package com.iblood.fellow; import android.app.DatePickerDialog; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.DatePicker; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import...
PHP
UTF-8
1,328
2.640625
3
[]
no_license
<?php namespace App\Http\Controllers\Api\V1\Auth; use Validator; use Illuminate\Http\Request; use App\Http\Controllers\Api\ApiController; use Dingo\Api\Exception\ValidationHttpException; class SignUpValidateController extends ApiController { /** * Validation rules. * * @var array */ prote...
C++
UTF-8
1,975
2.609375
3
[ "WTFPL" ]
permissive
#include "SelectiveRepeatRdtReceiver.h" #include "Global.h" SelectiveRepeatRdtReceiver::SelectiveRepeatRdtReceiver(int rcvWindowSz) { rcvBuffer = new Packet[rcvWindowSz]; rcvWindowSize = rcvWindowSz; rcvBase = 0; ackPkt.acknum = 0; //初始状态下,上次发送的确认包的确认序号为-1,使得当第一个接受的数据包出错时该确认报文的确认号为-1 ackPkt.che...
Markdown
UTF-8
1,136
3.0625
3
[]
no_license
--- title: プッシュ通知機能 weight: 10 --- 次の API を使用して、プッシュ通知受信時の処理を定義できます。 メソッド | 解説 -------|------------------- [monaca.cloud.Push.setHandler()](#push-sethandler) | プッシュ通知の受信時の JavaScript ハンドラーを設定します。 ## Push.setHandler() プッシュ通知の受信時に呼び出す、プッシュ通知用のハンドラーを定義します。 {{<highlight javascript>}} monaca.cloud.Push.setHandler(callb...
PHP
UTF-8
4,808
2.890625
3
[]
no_license
<?php /** * 提示操作信息的,并且跳转 * @param string $mes * @param string $url */ function alertMes($mes,$url){ echo "<script type='text/javascript'>alert('{$mes}');location.href='{$url}';</script>"; } //重定向链接并且输出漂亮的警告框 function redirect($mes,$url){ $url = $url."&mes=".$mes; echo "<script type='text/javascript'>location.h...
C++
UTF-8
723
2.53125
3
[]
no_license
#include<stdio.h> #include<queue> #include <string.h> using namespace std; void shortestpath() { int adj[5][5]={{0,1,0,0,1}, {1,0,1,1,1}, {0,1,0,1,0}, {0,1,1,0,1}, {1,1,0,1,0}}; int edges=5; int root=0; queue<int> st; st.push(root); int distance[edges...
JavaScript
UTF-8
4,533
3
3
[]
no_license
"use strict"; // This is the global list of the stories, an instance of StoryList let storyList; /** Get and show stories when site first loads. */ async function getAndShowStoriesOnStart() { storyList = await StoryList.getStories(); $storiesLoadingMsg.remove(); putStoriesOnPage(); } /** * A render method t...
Python
UTF-8
3,856
3.125
3
[]
no_license
# -*- coding: utf-8 -*- from __future__ import division import pandas as pd import matplotlib.pyplot as plt from pandas import DataFrame, Series data = pd.read_csv('./1000-out2.csv', header = None) data.index = data[0] import itertools # Fk−1 × Fk−1 method: Assumes F is in lexicographic order. Return candidates in l...
Python
UTF-8
1,696
3.734375
4
[]
no_license
''' ARS Gems Store sells different varieties of gems to its customers. Write a Python program to calculate the bill amount to be paid by a customer based on the list of gems and quantity purchased. Any purchase with a total bill amount above Rs.30000 is entitled for 5% discount. If any gem required by the customer is...
C++
UTF-8
1,874
3.5625
4
[]
no_license
#ifndef ALG_HPP #define ALG_HPP #include <cmath> template<class Semi> class alg_vector { public: alg_vector(Semi x, Semi y): _x(x), _y(y) { } alg_vector( const alg_vector & ) = default; alg_vector & operator=( const alg_vector & ) = default; Semi x() const { return _x; } Semi y() const { return _y; } ...
Java
UTF-8
2,201
2.15625
2
[]
no_license
package gov.nist.hit.elr.aphl.plugin.cs; import gov.nist.hit.elr.plugin.utils.EntityIdentifier; import hl7.v2.instance.Element; import hl7.v2.instance.Query; import hl7.v2.instance.Simple; import scala.collection.Iterator; import scala.collection.immutable.List; public class ELR_21_1 { private static String Entity...
Java
UTF-8
804
2.578125
3
[]
no_license
package de.embots.touchflow.module.implementation.helpers.warp; import de.embots.touchflow.module.Globals; import de.embots.touchflow.module.implementation.modify.Warp; public class EndWarp implements WarpFunction { double n; @Override public double applyFunction(double in) { if (in <0 || in > 1){ if (Globa...
Java
UTF-8
809
2.09375
2
[]
no_license
package com.rohit.gitrepoloader.views; import android.content.Context; import android.graphics.Typeface; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.widget.TextView; /** * Created by oust on 4/17/18. */ public class CustomTvRegular extends TextView { public Cust...
C#
UTF-8
499
2.640625
3
[]
no_license
namespace AIGames.FourInARow.TheDaltons { public abstract class SearchTreeNode : ISearchTreeNode { protected SearchTreeNode(Field field, byte depth, int score) { Field = field; Depth = depth; Score = score; } public Field Field { get; private set; } public byte Depth { get; private set; } publi...
Python
UTF-8
1,262
2.984375
3
[]
no_license
class Bunch: def __init__(self, **kwds): self.__dict__.update(kwds) class Sequence(): def __init__(self, pulser): self.pulser = pulser self.vars = {} self.parameters = None def setVariables(self, **input): #make sure no extraneous keys requiredKeys = self.re...
Java
UTF-8
887
2.34375
2
[ "MIT" ]
permissive
package pkg; import java.net.URL; import java.util.ResourceBundle; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class HelloFxmlController { @FXML // The reference of inputText will be injected by the FXML loader private TextField txtMasuka...
Swift
UTF-8
3,115
3.28125
3
[]
no_license
// // AlienView.swift // drawing // // Created by Kate Baumstein on 3/1/21. // import Foundation import UIKit class GameView: UIView{ var ballx = 0 var bally = 20 var linex = 0 var liney = 300 var ballMove = false var count = 0 var finaly = 0 var random = 300 var speed = 3 ...
TypeScript
UTF-8
1,867
3.125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/** * A base class of Tweakpane API events. */ export class TpEvent { /** * The event dispatcher. */ public readonly target: unknown; /** * @hidden */ constructor(target: unknown) { this.target = target; } } /** * An event class for value changes of input bindings. * @template T The type of the val...
Markdown
UTF-8
5,762
3.40625
3
[]
no_license
## 摘要 安装请看上一篇[Sublime Text—安装](http://www.cnblogs.com/easy-blue/p/5148596.html),和[sublime自带快捷键](http://www.cnblogs.com/easy-blue/p/5809760.html)一起用,写html简直快的飞起。 下面整理的是常用的,完整的可看[emmet官方文档][1]。 <br> ## 一、生成标签 ### 1.快速生成文档结构 - `!`或`html:5`,快速生成 HTML5 结构(都需要再按tab键) ``` <!DOCTYPE html> <html lang="en"> <head> <meta cha...
Ruby
UTF-8
1,260
2.59375
3
[]
no_license
require 'sinatra' require 'json' require 'commit_parser' class API < Sinatra::Base # --------- application config block --------- # configure do set :root, File.dirname(__FILE__) end # -------------------------------------------- # helpers do def data_correct?(data) data["token"] && data["pay...
Java
UTF-8
263
2.109375
2
[]
no_license
package com.virtusa.stockbookproductservice.exception; public class ProductNameAlreadyExistException extends RuntimeException{ private static final long serialVersionUID = 1L; public ProductNameAlreadyExistException(String message) { super(message); } }
Swift
UTF-8
2,816
2.796875
3
[]
no_license
// // softwareDevelopmentViewController.swift // FInalProjectApp // // Created by Ioana Nedelcu on 6/8/21. // import UIKit import BLTNBoard class softwareDevelopmentViewController: UIViewController { private lazy var boardManager: BLTNItemManager = { let item = BLTNPageItem(title: "Clean...
Markdown
UTF-8
2,952
2.671875
3
[]
no_license
# Looker Content Manager ![screenshot](screenshot-example.jpg) ## Description This Custom Action performs bulk actions on content, leveraging the Looker API and the System Activity model. It will enable you to select various actions (e.g. Favorite / Unfavorite, Copy / Move to Space, Archive / Restore from Trash, Run ...
JavaScript
UTF-8
515
3.546875
4
[]
no_license
// Refactored spinner // Repeats every four steps // Timer increments by 200 let numOfTimes = 9; let timer = 100; for (let i = 0; i < numOfTimes; i++) { switch ((i + 4) % 4) { case 0: setTimeout(() => process.stdout.write('\r| '), timer); break; case 1: setTimeout(() => process.stdout.write('\r/ '), timer); ...
C#
UTF-8
9,893
2.609375
3
[]
no_license
using UnityEngine; using System.Collections.Generic; using System.Linq; using System; using UnityEngine.EventSystems; /// <summary> /// CellGrid class keeps track of the game, stores cells, units and players objects. It starts the game and makes turn transitions. /// It reacts to user interacting with units or cells...
Java
UTF-8
1,241
2.03125
2
[]
no_license
package com.cn.pppcar.widget; import android.content.Context; import android.support.v7.app.AppCompatDialog; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import com.cn.pppcar.R; /** * Created by nurmemet on 2016/5...
Java
UTF-8
2,269
2.109375
2
[ "Apache-2.0" ]
permissive
package io.hawt.example.fabric; import io.fabric8.api.PlaceholderResolver; import io.fabric8.service.ChecksumPlaceholderResolver; import io.fabric8.service.FabricServiceImpl; import io.fabric8.service.ZooKeeperDataStore; import io.fabric8.service.ZookeeperPlaceholderResolver; import io.fabric8.zookeeper.IZKClient; imp...