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
PHP
UTF-8
2,013
2.640625
3
[]
no_license
<?php /** * EGroupware - Benno Mail Archive * * @link http://www.egroupware.org * @author Ralf Becker <rb@egroupware.org> * @package archive * @copyright (c) 2013-19 by Ralf Becker <rb@egroupware.org> * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License */ use EGroupware\A...
Java
UTF-8
841
1.914063
2
[]
no_license
package com.slusarz.pokerafterdark.application.game; import com.slusarz.pokerafterdark.domain.game.GameId; import com.slusarz.pokerafterdark.domain.game.GameType; import com.slusarz.pokerafterdark.domain.player.Host; import com.slusarz.pokerafterdark.domain.pot.Pot; import lombok.NonNull; import lombok.Value; import ...
Java
UTF-8
6,397
3.03125
3
[]
no_license
package yodafunkta; import static java.util.Arrays.asList; import static yodafunkta.Functor.f; import static yodafunkta.Functor.functor; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Queue; import junit.framework.TestCase; public class FunctorTest extends TestCase {...
Markdown
UTF-8
3,559
2.671875
3
[]
no_license
# CV-DEMO Это есть Toy-Project, который родился после окончания нескольких курсов по машинному обучению и искусственным нейронным сетям. Посмотреть работающее приложение можно [здесь](https://tuuka-cv-demo.appspot.com). ## О чём В приложении на базе классических моделей искусственных нейронных сетей реализованы класс...
PHP
UTF-8
642
2.703125
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Category extends Model { protected $table = "categories"; public $fillable = [ "category_name" ]; // version 6.x // public function getRouteKeyName(){ // return "slug"; // } public function getCategoryUrl(){...
Markdown
UTF-8
1,326
2.75
3
[ "MIT" ]
permissive
# Asana Changes Logger Output your **Asana** changes for a given time to an external file. ## Disclaimer ⚠️ This app is not maintained anymore ⚠️ ## Usage ``` usage: asana_changes_logger [options] -d, --days Number of days to get including today (default: 5) -s, --start Number of days ...
Python
UTF-8
278
2.984375
3
[]
no_license
N, x = map(int, input().split()) a_list = list(map(int, input().split())) a_list = sorted(a_list, reverse=False) ans = 0 for num in a_list: x = x - num if x >= 0: ans += 1 else: break if x > 0: ans -= 1 elif x <= 0: pass print(ans)
C#
UTF-8
1,059
3.3125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PinValidation { class PinValidation { static void Main(string[] args) { } static bool IsValidPin(int[] number, int numberToCheck) ...
Python
UTF-8
8,697
2.765625
3
[]
no_license
import torch import torch.nn as nn from torch.nn import Sequential as Seq, Linear, ReLU from torch_scatter import scatter_mean from torch_geometric.nn import MetaLayer from abc import ABC, abstractmethod import itertools # My libraries import graph_construction as gc dont_send_to_device = [] class EdgeModel(torch....
C
UTF-8
453
3.328125
3
[]
no_license
#include <stdio.h> #include <math.h> /*@ requires n >= 0; ensures \result == n/2*(2*a + (n-1)*d); assigns \nothing; */ int algo(int d,int n,int a) { int sum = 0; int i = 0; /*@ loop invariant sum == i/2*(2*a + (i-1)*d); loop assigns sum,i; */ while (i <= n) { ...
Java
UTF-8
994
2.453125
2
[]
no_license
package com.JMR.PlanetTest; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; /* * STUB PRESENTLY */ public class Base extends Drawable implements Animatable { public int locX; public int locY; public Ba...
Java
UTF-8
1,525
2.234375
2
[]
no_license
package banecuador.fin.ec.controlador.menu; import java.io.Serializable; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletRequest;...
Python
UTF-8
1,760
2.546875
3
[]
no_license
from odoo import fields, models class Vehiculo(models.Model): _name = 'taller.vehiculo' _description = 'Vehiculo' cliente = fields.Many2many('taller.cliente', relation='vehiculo_cliente_rel', column1='vehiculo_id', ...
Java
UTF-8
327
2.5625
3
[ "MIT" ]
permissive
package com.jtanks.view.arena; import java.awt.Color; import com.jtanks.util.Point; public interface Drawable { void setColor(Color color); void fillCircle(Point centre, double diameter); void drawCircle(Point centre, double diameter); void drawLine(Point from, Point to); void drawPoint(Point poi...
Java
UTF-8
613
3.5
4
[]
no_license
package leetcode; import java.util.LinkedList; public class BSTIterator { private LinkedList<TreeNode> stack = new LinkedList<>(); public BSTIterator(TreeNode root) { addTreeNode(root); } /** @return the next smallest number */ public int next() { TreeNode node = stack.pollLast(); addTreeNode...
Java
UTF-8
631
3.578125
4
[]
no_license
import java.util.*; class NavigableSetDemo { public static void main(String[] args) { TreeSet<Integer> t = new TreeSet<Integer>(); t.add(3000); t.add(5000); t.add(2000); t.add(7000); t.add(4000); t.add(6000); System.out.println("Cieling = " + t.ceiling(2000)); System.out.println("Higher = " + t.hig...
C++
UTF-8
56,883
2.59375
3
[ "Apache-2.0" ]
permissive
// <Reader> -*- C++ -*- /** * \file Reader * * \brief Reads transctions using the record and index file * */ #pragma once #include <functional> #include <iostream> #include <fstream> #include <iomanip> #include <locale> #include <sstream> #include <string> #include <string_view> #include <tuple> #include <unorde...
JavaScript
UTF-8
5,786
2.53125
3
[]
no_license
/** 调用Http接口 @example ~~~~ var Http = require('Http'); Http.getRoomList(function(data){ cc.info(data); }); var reqId = Http.getOnline(1, function(data){ cc.info(data); }, function(error){ cc.info(error); }); Http.cancelRequest(reqId); ~~~ */ var HttpService = require('HttpService'); var Da...
Markdown
UTF-8
68,706
3.4375
3
[]
no_license
## 记忆时间 ## 卡片 ### 0101. 反常识卡—— 这本书的主题核心,就是最大的反常识卡,并且注意时间脉络。 ### 0201. 术语卡——四大利器 了解了目标和关键结果,接下来我们再来说说 OKR 能发挥什么作用。这里,杜尔把使用 OKR 的企业看作是一个超级英雄,OKR 能够提供四种利器。第一种利器,是让整个组织聚焦在最重要的事情上。第二种利器,是促进团队的协同。第三种利器,是对责任进行追踪。第四种利器,是挑战不可能。 第一种利器很好理解,设定 OKR 的过程,会逼着你把最重要的几个目标挑出来,然后专注在这些目标上。至于什么是最重要的目标,每个人、每个组织所处的形势不一样,判断标准也不一样。而且,还可以通过...
Python
UTF-8
926
3.34375
3
[]
no_license
import string import collections def caesar(): #lettre+cle=crypt code=[] alphabet=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] message=input("saisir votre message a coder : ") cle=int(input("saisir votre cle: ")) for lettre in m...
JavaScript
UTF-8
1,713
2.6875
3
[]
no_license
//The username and password you use to sign into the robinhood app. var credentials = { username: , password: }; var request = require('request'); var Robinhood = require('robinhood')(credentials, function(){ //Robinhood is connected and you may begin sending commands to the api. }); var Ro...
Java
UTF-8
1,395
2.0625
2
[]
no_license
package com.sport.huaweisport; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.os.Bundle; import android.view.View; import android.view.animation.AccelerateDecelerateInterpolator; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCom...
Markdown
UTF-8
739
2.6875
3
[]
no_license
### 项目是什么?与产品、App 的关系是什么? 项目是为用户提供方便管理物联网相关应用案例,产品与 App 属于某个项目。 ### 数据模板是什么? 数据模板是一个硬件产品数字化的描述语言,包含了属性、事件,应对的是物理设备的状态、故障、告警灯信息。 ### 虚拟设备作用是什么? 虚拟设备是根据数据模板模拟了一个设备,可以模拟设备上报数据,可以使用APP工具绑定虚拟设备后控制虚拟设备,让用户快速体验,并加快 App 开发调试效率。 ### 控制台的设备通信日志、事件数据保存多久? 控制台能提供最近30日的数据,超过30日的数据则无法查询。
Java
UTF-8
848
3.453125
3
[]
no_license
package subcategory.Tree; /** * Created by yangw on 2019/7/7. */ public class popluatingNextRightPointer { /** * Definition for binary tree with next pointer. * public class TreeLinkNode { * int val; * TreeLinkNode left, right, next; * TreeLinkNode(int x) { val = x; } *...
Python
UTF-8
635
3.734375
4
[]
no_license
class ParkingSystem: def __init__(self, big: int, medium: int, small: int): self.one = big self.two = medium self.three = small def addCar(self, carType: int) -> bool: if carType==1 and self.one>0: self.one -= 1 return True if carType==2 and self...
Ruby
UTF-8
1,073
2.703125
3
[]
no_license
require 'kanban/card' describe Kanban::Card do context '#method_missing' do let(:card) { Kanban::Card.new({ 'Id' => 11, 'Title' => 'Card Title', 'ExternalCardID' => 123, 'Size' => 13 }) } it 'maps fields' do expect(card.id).to eq(11) expect(card.title).to eq('Card Title') expect(card.exter...
Java
UTF-8
2,487
2.5
2
[]
no_license
package com.neon.servlets; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax....
JavaScript
UTF-8
4,973
2.796875
3
[]
no_license
import {store} from '../../src/index'; import {data} from './../data'; //定義type屬性名稱 export const UPDATE_TIME = 'UPDATE_TIME'; export const UPDATE_WEATHER = 'UPDATE_WEATHER'; export const TOGGLE_DESCRIPTION = 'TOGGLE_DESCRIPTION'; export const REQUEST_WEATHER = 'REQUEST_WEATHER'; export const RECEIVE_WEATHER = 'RECEIVE...
Java
UTF-8
2,198
2.53125
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2019-2023 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
Markdown
UTF-8
279
2.546875
3
[]
no_license
# Library-Network Assume that the library having wireless routers in series. For better illustration you have considered only 2 wireless routers, which need to be interconnected in series as per figure given below. Implement and analyze this network plan of a long library hall.
Java
UTF-8
999
2.34375
2
[]
no_license
package com.bravo.webapp.dao.impl; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.support.JdbcDaoSupport; import com.bravo.webapp.bean.CheckTransaction; import com.bravo.webapp.dao.CheckTransactionDAO; public class JdbcCheckTransactionDAO extends JdbcDaoSupport imple...
Shell
UTF-8
4,322
3.6875
4
[]
no_license
#!/bin/bash # # Simple script to generate a basic bind configuration for home/lab use # # Local config - adjust as required OWNIP=192.168.100.161 NETWORK=192.168.100.0 NETMASK=/24 DNS1=192.168.100.116 DNS2= # Advanced - should not be changed DOMAIN=dupont.lan # Internal - must not be changed CONFDIR=...
Java
UTF-8
6,829
1.9375
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2018 JDCLOUD.COM * * 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 to in...
Java
UTF-8
1,793
3.953125
4
[]
no_license
import java.util.Deque; import java.util.ArrayDeque; import java.util.Map; import java.util.HashMap; /* Problem Description: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets mus...
Java
UTF-8
1,426
2.390625
2
[]
no_license
package com.intelliworkz.admin.admingujaratabroad; import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; impor...
Markdown
UTF-8
547
2.5625
3
[]
no_license
## Paso 1: Hacer match con "base de lista de precios" y extraer Categorías, Precio y Peso #### Keywords: - **Color:** - tintes - tinturacióm - numeración: 10 Vol, 20 volúmenes, etc. - Oxidantes - Decolorante - **Hair Care:** - Shampoo - Mascarilla - Acondicionador - Tratamientos - **Styling:** - Laca...
Shell
UTF-8
435
3.734375
4
[ "MIT" ]
permissive
#!/bin/bash # The singularity-run script will run a container, and it would use the # container's runscript as entrypoint. To execute a command, # use singularity-exec CONTAINER=${1} shift if [ "$#" -gr 0 ]; then NOTEBOOK_DIR=${1} shift 1 else NOTEBOOK_DIR=${SCRATCH} fi cd $NOTEBOOK_DIR module use sys...
Java
UTF-8
3,099
2.046875
2
[]
no_license
package com.edbrix.contentbrix; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.edbrix.contentbrix.baseclasses.BaseActivity; import...
JavaScript
UTF-8
369
2.515625
3
[]
no_license
import { useState } from "react" export const useForm = (initialValue) => { const [values, setValues] = useState(initialValue) return [ values, (fromType, fromValue) => { if(fromType === 'reset'){ return setValues(initialValue) } return setValues({......
Java
UTF-8
989
2.890625
3
[]
no_license
package Epam; import Epam.chocolate.Cadbury; import Epam.chocolate.Hersheys; import Epam.chocolate.Nestle; import Epam.gift.Gift; import Epam.sweets.ghevar; import Epam.sweets.Jalebi; import Epam.sweets.Kheer; import java.util.Scanner; public class App { public static void main( String[] args ) { Sc...
C
UTF-8
2,732
3.328125
3
[]
no_license
/**************************************** * Author: Oksana Rubanov * * Date: 27/11/2018 * * Reviewer: Ori Friedman * ****************************************/ #include <stdio.h> /* printf */ #include <stdlib.h> /* malloc */ #include <assert.h> /* assert */ #include <str...
Markdown
UTF-8
3,184
3.875
4
[]
no_license
# 컴퓨터공학 입문 ## 4-1. 연산자(사칙, 관계, 논리 연산자) <br/> ## 연산자(Operator) ### 목차 - 연산자의 개념 - 연산자의 분류 - 사칙 연산자 - 관계 연산자 - 논리 연산자 - 연산자 우선 순위 <br/> ### 연산자의 개념 - 연산자 - 연산자는 산술 연산자 +, -, *, / 기호와 같이 이미 정의된 연산을 수행하는 기호나 키워드를 의미 - 연산자는 왜 필요할까? - 문제를 해결하는 방법에서 도구(장비)와 같은 역할 - 피연산자 - 연산(operation)에 참여하는 변수나 값을 피연산자(...
C#
UTF-8
1,640
2.765625
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 GuessMelody { public partial class gameOverForm : Form { gameForm gameForm; ...
SQL
UTF-8
832
2.953125
3
[ "MIT" ]
permissive
INSERT INTO `label` (` label_id`, `label_name `) VALUES (1, 'CUSTOMER'), (2, 'HOT LEAD'), (3, 'WARM LEAD'), (4, 'COLD LEAD'); INSERT INTO `owner_visibility_group` (` id`, `owner_visibility_name `, `description`) VALUES (1, 'Owner only', 'Only the owner,admins and users in the parent groups can see and edit the details...
Python
UTF-8
217
2.921875
3
[]
no_license
import os a = os.listdir() for i in a : print(os.stat(i)) b = os.scandir('E:\\') for i in b: if i.is_file(): pass else: print(os.stat(i).st_size , end ="\t") print(i.path )
C
UTF-8
223
3.40625
3
[]
no_license
#include <stdio.h> int main() { int a,b; printf("enter the two numbers"); scanf("%d%d",&a,&b); if(a>b) printf("a=%d is maximum",a); else printf("b=%d is maximum",b); }
Rust
UTF-8
1,025
2.734375
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
/* This will by default, create quotes sequentially. I may add a flag to create them for the same time in the future. */ extern crate bigdecimal; extern crate chrono; extern crate diesel; extern crate rand; extern crate rtss; use self::rtss::*; use bigdecimal::{BigDecimal, ToPrimitive}; use chrono::{NaiveDate, Naive...
C++
UTF-8
8,469
2.734375
3
[]
no_license
#include <BMP280.h> int BMP280::begin(int address, BMP180_Update_Rate rate, bool initWire){ bmpAddress = address; this->rate = rate; if(initWire){ Wire.begin(); Wire.setClock(400000); } if(checkID(true) == 0){ //get calibration data getCalibrationValues(&calibrationValues); setPressureOver...
Java
UTF-8
3,464
1.96875
2
[]
no_license
package com.komiut.conductor.ui.passenger; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Boarding { @SerializedName("id") @Expose private Integer id; @SerializedName("departure") @Expose private String departure; @SerializedName...
Java
UTF-8
1,504
2.453125
2
[]
no_license
/** * <p> Title: RecipeEntry.java </p> * <p> Description: * * </p> * <p> 2008</p> * @author RHolland * * */ package com.baristamatic.entity; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import java...
Python
UTF-8
568
3.71875
4
[]
no_license
# 299. Bulls and Cows # Write a function to return a hint according to the secret number and friend's guess, use A to indicate the bulls and B to indicate the cows. def getHint(self, secret, guess): """ :type secret: str :type guess: str :rtype: str """ a, b = 0, 0 c = [0 for c in range(len(guess))] gc = [0 fo...
Python
UTF-8
550
2.875
3
[ "MIT" ]
permissive
x = [0] x[0] = x[0] + 1 print(x[0]) print("########") y = [0] z = y z[0] = z[0] + 1 print(y[0]) print(z[0]) print("########") u = [0] v = u u[0] = u[0] + 1 print(u[0]) print(v[0]) print("########") a = [0] b = [a[0]] b[0] = b[0] + 1 print(a[0]) print(b[0]) print("########") i = [0] j = [i[0]] i[0] = i[0] + ...
Java
UTF-8
1,273
2.5625
3
[]
no_license
package com.testTask.service.implementation; import com.testTask.dao.implementation.WellDaoImpl; import com.testTask.domain.Well; import com.testTask.service.WellService; import java.util.ArrayList; import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class...
Python
UTF-8
579
3.3125
3
[]
no_license
def manipulate_generator(generator, n): divisor=2 if(n == 1): generator else: for j in range(divisor,n): remainder = n % j result.append(remainder) if 0 in result: reduce(generator,n) def positive_integers_generat...
Markdown
UTF-8
20,137
2.90625
3
[]
no_license
# A0126331U ###### Soft-Eng-Project/TaskApp/CommandParser/CommandParser.java ``` java * */ public class CommandParser { private static CommandParser cp; private static final String USER_COMMAND_ADD = "add"; private static final String USER_COMMAND_DELETE = "delete"; private static final String USER_COMMA...
Markdown
UTF-8
7,369
3.609375
4
[ "MIT" ]
permissive
```js import React, {useState} from 'react' export default function App(){ const [number, setNumber] = useState(0) const [dark, setDark] = useState(flase) const doubleNumber = slowFunction(number) const themeStyles = { backgroundColor: dark ? 'black' : 'white', color: dark ? ...
C++
UTF-8
154
2.609375
3
[]
no_license
#include <iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c>>d; int num = min(a,min(b,min(c,d))); cout<<num<<endl; }
Java
UTF-8
1,288
1.898438
2
[]
no_license
package cn.labsoft.labos.base.logs.vo; import cn.labsoft.labos.framework.common.vo.BaseVo; @SuppressWarnings("serial") public class LabLogExceptionVo extends BaseVo { private String id; private String clazz; private String funId; private String lineNum; private String method; private String exception; private...
C++
UTF-8
471
3.109375
3
[]
no_license
#include <iostream> #include <string> using namespace std; void add_factors(long n){ long temp_n = n; int i = 2; while(true){ while(n % i == 0){ cout << i << endl; n /= i; } if(i == 2){ i += 1; } else{ i += 2; }...
JavaScript
UTF-8
1,360
2.546875
3
[]
no_license
function update() { var email = $("#email").val(); var password = $("#password").val(); var password2 = $("#password2").val(); if(email === "" || password === "" || password2 === ""){ alert("欄位請勿空白"); return; } if(password != password2){ alert("兩次密碼輸入不一樣"); return; } ...
C#
UTF-8
3,320
2.515625
3
[]
no_license
using App.Data.Models.AppSettings; using App.Data.Models.User; using App.Data.Services; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; using System; using System.Threading.Tasks; namespace App.Web.Utilities { public interface IAccountTools { ...
Markdown
UTF-8
3,710
2.890625
3
[ "Apache-2.0" ]
permissive
# Tourist Identification **Enhanced Algorithm for Tourist Identification from Public Transportation Passengers Considering Types of Access to A Tourist City** **관광도시 출입 유형을 고려한 대중교통 이용 관광객 식별 알고리즘 개선** - Authors: - [MyungHun Han*](https://sites.google.com/view/hoonisone) - [Yechan Kim*](https://sites.google....
Java
UTF-8
1,288
2.453125
2
[ "Apache-2.0" ]
permissive
package edu.berkeley.kaiju.service.request.message.request; import edu.berkeley.kaiju.exception.KaijuException; import edu.berkeley.kaiju.service.LockManager; import edu.berkeley.kaiju.service.LockManager.LockDuration; import edu.berkeley.kaiju.service.LockManager.LockType; import edu.berkeley.kaiju.service.MemoryStor...
PHP
UTF-8
933
3.40625
3
[]
no_license
<!-- 设置 cookie setcookie() 函数用于设置 cookie。 注释:setcookie() 函数必须位于 <html> 标签之前。--> <?php // 创建名为 "user" 的 cookie,一小时后过期 setcookie("user","hezhao",time()+3600); //注释:在发送 cookie 时,cookie 的值会自动进行 URL 编码,在取回时进行自动解码。(为防止 URL 编码,请使用 setrawcookie() 取而代之。) //取回Cookie echo $_COOKIE["user"] . "<br>"; // 查看所有Cookie print_r($_COOKI...
Python
UTF-8
745
2.703125
3
[]
no_license
import boto3 import sys from datetime import datetime sqs = boto3.client('sqs') queue_url = '' while True: try: message = input("Enter message: ") print("Sending: {}...".format(message)) response = sqs.send_message( QueueUrl=queue_url, DelaySeconds=10, ...
Java
UTF-8
196
2
2
[]
no_license
package com.javalanguagezone.interviewtwitter.exception; public class InterviewTwitterException extends Exception { public InterviewTwitterException(String message) { super(message); } }
C++
UTF-8
1,178
3.28125
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include "utils.h" using namespace std; class Solution { public: vector<vector<int>> permuteUnique(vector<int>& nums) { vector<vector<int>> res; std::sort(nums.begin(), nums.end()); while (true) { // printVector(nums); ...
Java
UTF-8
5,109
2.46875
2
[]
no_license
package org.daawat.fmb.impl.daos; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.daawat.fmb.api.db.UserThaaliDataDAO; import org.daawat.fmb.api.enums.Category; import org.daawat.fmb.api.enums.UserThaaliStatus; import org.daawat.fmb.api.objects.UserThaal...
Java
UTF-8
2,382
3.765625
4
[]
no_license
/* * This Java source file was generated by the Gradle 'init' task. */ package wordGuessingGame; import java.util.Random; import java.util.Scanner; public class App { public static void main(String args[]) { System.out.printf("Enter player1 name:"); Scanner player1input = new Scanner(System.in)...
Java
UTF-8
1,778
3.21875
3
[]
no_license
package hw4_part2.test; import junit.framework.TestCase; import hw4_part2.main.InsurancePackage; import hw4_part2.main.Package; import hw4_part2.main.Driver; import org.junit.Assert; import org.junit.Test; public class DriverTest extends TestCase { /********************************************** * Base Ship...
Markdown
UTF-8
7,347
3.390625
3
[ "BSD-2-Clause" ]
permissive
python-mock =========== git mirror of http://code.google.com/p/mock/ with tweaks ___ #### Differences from original repository - added **Mock.assert_never_called** - asserts the mock has never been called. The same would be achieved using Mock.assert_has_calls([]), but new method offers better semantics for this ca...
C
UTF-8
490
2.671875
3
[]
no_license
/* * 视窗 */ #include "my_curses.h" #include <unistd.h> int main( int argc, char *argv[] ) { WINDOW *win; init_curses(); box(stdscr, ACS_VLINE, ACS_HLINE ); mvaddstr( LINES / 2 - 5, COLS / 2 - 5, "hello world" ); refresh(); sleep(1); win = newwin(4, 30, LINES / 2 - 3, COLS / 2 - 15 ); box(win, ACS_VLINE, AC...
C
UTF-8
1,187
2.796875
3
[]
no_license
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<set> using namespace std; #define maxn 5000 int f[maxn]; set<int> st; struct road { int u,v; int cost; int flag; bool operator < (const road &a) const { if(flag==a.flag) return cost<a.cost; ...
Java
UTF-8
218
1.71875
2
[]
no_license
import java.util.concurrent.Semaphore; public class Produtor extends Comportamento { public Produtor(MyRobotLego robot, Semaphore semaphore) { super(robot,semaphore); // TODO Auto-generated constructor stub } }
C++
UTF-8
1,579
2.59375
3
[]
no_license
#include "Flight.h" float DegreeToRadian(float degrees); void Hack::Flight::Fly() { if (Hack::Data::bGravity && !Hack::Data::bFlyMode) { *(float*)Hack::Data::gravity = 600.f; Hack::Data::bGravity = false; } if (*Hack::Data::localPlayer && Hack::Data::bFlyMode) { Hack::Data::bGravity = true; vec3 d; d....
C++
UTF-8
2,471
2.5625
3
[]
no_license
#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <algorithm> #include <iomanip> #include <cctype> #include <cmath> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <sstream> #include <set> using namespace std; #define mem(a,b) memset(a,b...
Java
UTF-8
1,413
2.21875
2
[]
no_license
package handler.items; import l2p.gameserver.handler.items.ItemHandler; import l2p.gameserver.model.Playable; import l2p.gameserver.model.Player; import l2p.gameserver.model.items.ItemInstance; import l2p.gameserver.tables.PetDataTable; import l2p.gameserver.tables.SkillTable; import handler.items.ScriptItemHandler; i...
Java
UTF-8
1,481
2.3125
2
[]
no_license
package com.robintegg.news.breakingnews; import java.util.ArrayList; import java.util.List; import java.util.Queue; import org.apache.commons.collections4.queue.CircularFifoQueue; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import com.robintegg.news.journali...
C++
UTF-8
1,236
2.9375
3
[]
no_license
#ifndef UserDatabase_H_ #define UserDatabase_H_ /** * Used to read and write information from UserDatabase. * * Manipulates the parameters in User_database.txt file which * comprises of a vector array * * @author Adam Fawcett <fawcett-a@ulster.ac.uk> * @license https://www.gnu.org/licenses/gpl-3.0.en.html * @copyrigh...
C++
UTF-8
15,476
2.75
3
[ "MIT" ]
permissive
#ifndef LF_LOCCOMPNORMS_H #define LF_LOCCOMPNORMS_H /*************************************************************************** * LehrFEM++ - A simple C++ finite element libray for teaching * Developed from 2018 at the Seminar of Applied Mathematics of ETH Zurich, * lead developers Dr. R. Casagrande and Prof. R. Hi...
Java
UTF-8
698
2.375
2
[]
no_license
package com.dicoding.sarjanasantuy.belajardatabase; public class MahasiswaModel { private String Nama; private String Alamat; private char Jkel; public String getNama() { return Nama; } public void setNama(String nama) { Nama = nama; } public String getAlamat() { ...
Java
UTF-8
555
3.453125
3
[]
no_license
import java.util.*; public class Feynman { /** * @param args */ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int line = Integer.valueOf(scan.nextLine()); ArrayList<Integer> list = new ArrayList<Integer>(); while(line != 0){ //System.out.println(line); ...
Java
UTF-8
1,646
2.28125
2
[]
no_license
package br.edu.ifma.csp.timetable.dao.report; import java.util.ArrayList; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import br.edu.ifma.csp.timetable.model.report.DadosRelatorioProfessorHorario; import br.edu.ifma.csp.timeta...
C#
UTF-8
672
2.96875
3
[]
no_license
using DT; using System.Collections; using UnityEngine; public class MathUtils : MonoBehaviour { /** * Pass in the relative position between two points, get QuadInOut (ref: easings.net) * * @param {a} - Start Point * @param {b} - End Point * @param {r} - 0.0...1.0, Relative Position */ public static fl...
Python
UTF-8
1,083
2.8125
3
[ "MIT" ]
permissive
import threading import time from compas_rrc.client import SequenceCounter def test_sequence_id_rollover(): counter = SequenceCounter() assert counter.value == 0 for i in range(1, 1000000): counter.increment() assert counter.value == i assert counter.value == 999999 counter.incr...
Markdown
UTF-8
6,874
3.875
4
[]
no_license
> 定义的时候 位置参数 --> (* 可变长参数 | * ,强制关键字参数) --> ** 关键字参数 > > 调用的时候 位置参数 --> (* 可变长参数 | * ,强制关键字参数) --> ** 关键字参数 > > 如果定义的时候 可变长参数 在 位置参数 前面 那么调用的时候 位置参数 就要用 关键字参数代替 - 位置参数(普通方式) ``` def fuc(a,b): pass ``` - 默认参数 ``` def fuc(a,b=1): pass ``` ==默认参数的坑 只有 list 有坑 ,基本数据类型没有== ```python 先定义一个函数,传入一个list,添加一个E...
Java
UTF-8
3,065
2.1875
2
[]
no_license
package top.ss.forest.pojo; import java.io.Serializable; import java.util.List; /** * 林业资源 * @author Snake * */ public class ForestInfo { /* `fid` varchar(64) NOT NULL COMMENT '资源id', `fName` varchar(32) NOT NULL COMMENT '资源名称', `fType` varchar(64) DEFAULT NULL COMMENT '资源所属种类', `fForm` varchar(256) DE...
Rust
UTF-8
1,736
2.84375
3
[ "MIT" ]
permissive
use crate::client::{Client, MessageReturn}; use crate::message::MessageId; use crate::torrent::Torrent; use crate::utility; use std::{thread, time}; const MAX_REQ_SIZE: i64 = 16384; pub fn download_piece(client: &mut Client, index: u32, piece_length: i64) -> Vec<u8> { let mut no_of_iterations = piece_length / MA...
C
UTF-8
3,217
2.546875
3
[]
no_license
// // Classe d'AmibeProbaMutation // #include "AmibeProbaMutation.h" #include <cmath> using namespace std; //________________________________________________________ AmibeProbaMutation::AmibeProbaMutation(void): Strategie() { // // Constructeur par defaut // fCommentaire="AmibeProbaMutation de base"; doseMutation["S...
PHP
UTF-8
264
2.671875
3
[]
no_license
<?php class Product extends BaseModel{ public $table = "products"; public static function getByShopID($shopID){ $query = "SELECT * FROM products WHERE shop_id = ?"; $params = [ $shopID ]; return DB::getAll($query,$params); } }
Python
UTF-8
1,122
3.109375
3
[ "BSD-3-Clause", "GPL-3.0-only" ]
permissive
from vedo import shapes from vedo import Mesh from loguru import logger from brainrender.actor import Actor class Cylinder(Actor): def __init__(self, pos, root, color="powderblue", alpha=1, radius=350): """ Cylinder class creates a cylinder mesh between a given point and the brain's surfa...
C++
UTF-8
685
3.109375
3
[ "MIT" ]
permissive
#ifndef DARCEL_UTILITIES_HPP #define DARCEL_UTILITIES_HPP #include <memory> #include <utility> namespace darcel { template<typename T> class Maybe; //! Performs a static cast on a unique ptr. template<typename T, typename U> std::unique_ptr<T> static_pointer_cast(std::unique_ptr<U> p) noexcept { return st...
Python
UTF-8
133
3.859375
4
[]
no_license
n=int(input('Введите натуральное число n: ')) for i in range(2, n-1): if (n % i == 1): print(i)
Python
UTF-8
568
2.953125
3
[]
no_license
# coding=utf-8 flag = False name = 'luren' if name == 'python': flag = True print 'welcome boss' else: print name # luren num = 5 if num == 3: print 'boss' elif num == 2: print "user" elif num == 1: print 'worker' elif num < 0: print 'error' else: print 'roadman' # roadman num = ...
C#
UTF-8
403
2.640625
3
[]
no_license
using System; namespace GameStuff { public interface LevelObject { bool canMoveLeft(int boxesToMove); bool canMoveRight(int boxesToMove); bool canMoveDown(int boxesToMove); bool canMoveUp(int boxesToMove); void setGridLocation(int x, int y); void setLevel(Level l); int getGridX(); int getGridY(); b...
C#
UTF-8
1,273
3.34375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BankApplicationLibrary { class Account { public int Id { get; set; } // Kontonummer public decimal Balance { get; set; } // Saldo public decimal Interest ...
PHP
UTF-8
2,189
2.59375
3
[]
no_license
<?php #header('Location: ../../main.php'); #include_once('../../modele/photos/photo_upload.class.php'); include_once('../../head.php'); $existence=false; if($existence) { echo '<br/>'; $minwidth = 10; $minheight = 10; $minsize = 0; $maxsize = 1000000000; $photo_size = getimagesize($_FILES['photo']['tmp_name']); $...
C++
BIG5
605
3.65625
4
[]
no_license
#include <iostream> #include <cstdlib> using namespace std; class car { public: // ¦O禡ŧiOpublic void go() // carOgo() { cout << endl<< "car : Xo"<< endl << endl; } }; class freighter: protected car {}; // lͨ禡N¦O~Ӥ覡ŧiprotected int main() { car cr; freighter ft; ...
Java
UTF-8
2,752
2.4375
2
[]
no_license
package com.cucc.vertx.demo.database.base; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.vertx.core.Vertx; import io.vertx.core.json.JsonObject; import io.vertx.ext.jdbc.JDBCClient; public class OracleClient { private Logger logger=Lo...
Java
UTF-8
1,519
2.359375
2
[]
no_license
package protocol; import errors.ParsingError; import org.junit.Test; import protocol.client.*; import static org.junit.Assert.assertEquals; public class TestClientMessage { @Test public void login() throws ParsingError { Login l = (Login) ClientMessage.parse("CONNEXION/user/"); assertEquals("...