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
1,824
3.84375
4
[]
no_license
package chapter2.item2.builderPattern; /*Builder Pattern : Use when there are 4 or more optional params with similar data types. * Advantages * a) Improved readability/writeability of client code. * b) Avoids parameter swapping due to explicit parameter naming while setting them up. * c) Does not MANDATE MUTABILITY -...
Java
UTF-8
1,563
3.640625
4
[ "Apache-2.0" ]
permissive
import java.util.Stack; class ListNode { int val; ListNode next; ListNode(int x) { val = x; } public ListNode(int[] arr) { if (arr == null || arr.length == 0) { throw new IllegalArgumentException("数组不能为空"); } this.val = arr[0]; ListNode curr = t...
C++
UTF-8
1,387
2.59375
3
[ "MIT" ]
permissive
#include "ArgumentsParser.hpp" #include "Error.hpp" #include "Range.hpp" #include "Token.hpp" namespace cmake::language { //----------------------------------------------------------------------------- tl::expected<Token, Error> Parser<ElementType::Arguments>::Parse(Range r) { Token result; result.type ...
C++
UTF-8
1,321
3.78125
4
[]
no_license
/* * Name: Abeed Alibhai, Rahul Bablani, Natasha DeCoste * MacID: alibhaa, bablanr, decostn * Student Number: 1428809, 1418434, 1206976 * Description: The multiplication class is a child class of the Arithmetic Expression class. It recursively multplies the evaluate of both the left side and the right side. */ ...
Java
UTF-8
2,880
4
4
[]
no_license
package com.jb.leetcode.linkedlist; import java.util.HashMap; import java.util.Map; /** * Design a data structure that follows the constraints of a Least Recently Used (LRU) * cache. * * Implement the LRUCache class: * * LRUCache(int capacity) Initialize the LRU cache with positive size capacity. * int get(int...
Swift
UTF-8
1,283
2.796875
3
[]
no_license
// // RatingClass.swift // ChulsaGo // // Created by Nu-Ri Lee on 2017. 7. 3.. // Copyright © 2017년 nuri lee. All rights reserved. // import UIKit class RatingClass{ static func rating(point : Int) -> String{ var rating : String = "계란"; if point < 10 { rating = N...
Java
UTF-8
269
1.789063
2
[]
no_license
package ninja.thor.model; import lombok.Builder; import lombok.Data; @Data @Builder public class Image { private String id; private String svgPath; private String title; private float latitude; private float longitude; private double scale; }
Python
UTF-8
1,830
4.0625
4
[]
no_license
import math # Python3 program to find (a^b) % MOD # where a and b may be very large # and represented as strings. MOD = 1000000007 # https://www.geeksforgeeks.org/modulo-power-for-large-numbers-represented-as-strings/ # Returns modulo exponentiation # for two numbers represented as # long long int. It is ...
PHP
UTF-8
2,697
2.546875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: zzc * Date: 2015/7/6 * Time: 13:21 * @新需求,创建聊天分组 */ class Api_Livechat_Group_AddMember extends Api { /** * * 传入参数 * * members 新增加的成员 array( * '用户的ID'=>array( * 'account_id'=> ...
Markdown
UTF-8
2,166
2.765625
3
[]
no_license
# ASPNET1_inl-mningsuppgift The main project I did for the ASP.NET 1 course (unfinished admin functionality) Description: (SWE) Inlämningsuppgift 2: Skapa webbsajt för Tomasos pizzeria Beskrivning Uppgiften handlar om att skapa en webblösning i ASP.NET MVC för en pizzeria, Tomasos Pizzeria. Alla uppgifter skall spar...
Java
UTF-8
1,191
2.671875
3
[]
no_license
package pageObject.mmjtraine.businessobject.useresfacade; public class UserHelper { private IUsers admin; private IUsers manager; private IUsers shipper; public UserHelper(){ admin = new Admin(); manager = new Manager(); shipper = new Shipper(); } public String readAd...
Java
UTF-8
1,051
2.75
3
[]
no_license
/* * @author Daniel Amarante - 13201876-3 - daniel.amarante2@gmail.com * @author Matthias Nunes - 08105058-5 - matthiasnunes@gmail.com * @author Pedro Kühn - 10200237-5 - pedrohk@gmail.com */ import java.util.ArrayList; import java.util.Iterator; public class TabSimb { private ArrayList<TS_entry>...
C++
UTF-8
568
2.75
3
[]
no_license
#include<iostream> #include<stdio.h> #include<conio.h> #include<string.h> using namespace std; int main() { char a[9]="01111110",data[100],stuff[110]="",send[130]=""; int i,n,j,count=0; cout<<"Enter the data to be sent:"; cin>>data; n=strlen(data); for(i=0,j=0;i<n;i++) { stuff[j++]=data[i]; if(data[i]=='...
Markdown
UTF-8
7,363
2.640625
3
[]
no_license
# TensorFlow-Keras ここでは、TensorFlowとKerasをpipで導入して実行する手順を説明します。具体的には、TensorFlowとKerasを導入して実行する手順と、TensorFlow、KerasとHorovodを導入して分散学習を実行する手順を示します。 ## TensorFlow-Kerasの単体実行 {#using} ### 前提 {#precondition} - `grpname`はご自身のABCI利用グループ名に置き換えてください - [Python仮想環境](/06/#python-virtual-environments){:target="python-virtual-envi...
C#
UTF-8
6,106
2.546875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; namespace SATInterface { internal class OrExpr : BoolExpr { internal readonly BoolExpr[] elements; private OrExpr(BoolExpr[] _elems) { elements = _elems; ...
C#
UTF-8
1,050
3.9375
4
[]
no_license
using System; using System.Collections.Generic; using System.IO; using System.Text; class Solution { static class StringHelper { public static string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); ...
Python
GB18030
7,715
2.578125
3
[]
no_license
from Tkinter import * from tkMessageBox import * import sys,json import urllib,urllib2 from os import path from urllib import quote from urllib import unquote import re import sys class EntryDemo( Frame): """ Demonstrate Entrys and Envent Building""" def __init__( self ): Frame.__init__(self) ...
Ruby
UTF-8
1,795
3.1875
3
[]
no_license
dir = File.dirname(__FILE__) require dir + '/../init' class Bobo include Glyde::HasType # # N.B. Type variable. Values' types must be same OR # share an ancestor more specific than Object. # type :OtherHash do {Symbol=>String} end sig do :a * OtherHash >> :a * OtherHash end def self.class_method(a, ...
Shell
UTF-8
421
3.421875
3
[]
no_license
#!/bin/bash COMMIT_MESSAGE=$(git log -1 --pretty=%B) if [[ $COMMIT_MESSAGE == *"[pr]"* ]] then echo "[pr] found - auto creating pull request" BRANCH_NAME=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') hub pull-request --no-edit --base=master --head=${BRANCH_NAME} > pull_request_url.txt chmod +x ./create_...
Java
UTF-8
446
2.015625
2
[ "Apache-2.0" ]
permissive
package io.groundhog.replay; import com.google.common.util.concurrent.Service; /** * @author Michael Olague * @since 1.0 */ public interface RequestDispatcher extends Service { /** * The number of milliseconds that the dispatcher can skew from real-time, before warnings are logged. */ public static final...
Java
UTF-8
1,482
2.71875
3
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package db; import server.*; import java.rmi.*; import java.rmi.registry.*; import java.util.Arrays; import java.net.MalformedURLException; /** * Concrete implementation of the <code>Connector</code> interface, used ...
Java
UTF-8
775
3.703125
4
[]
no_license
package array; import java.util.Scanner; public class EvenOdd { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter how many value you have"); int n = sc.nextInt(); int ar[] = new int[n]; System.out.println("Enter " + n + " Integer Value"); f...
Python
UTF-8
417
2.640625
3
[]
no_license
class Solution: def thirdMax(self, nums: [int]) -> int: dummy = [float('-inf'), float('-inf'), float('-inf')] for num in nums: if num not in dummy: if num > dummy[0]: dummy = [num, dummy[0], dummy[1]] elif num > dummy[1]: dummy = [dummy[0], num, dummy[1]] elif num > dummy[2]: du...
Java
UTF-8
321
1.804688
2
[]
no_license
package com.providesupport.monitoring.dao; import com.providesupport.monitoring.entity.WebResource; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; public interface WebResourceRepository extends JpaRepository<WebResource, Long> { List<WebResource> findAllByUrl(String url); }...
Java
UTF-8
1,525
1.890625
2
[]
no_license
package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.CheckBox; public class MobileReg extends AppCompatActivity { public Button button0, button1; ...
Java
UTF-8
219
1.828125
2
[]
no_license
package br.edu.ifnmg.arinos.systemvendas.util.excecao; /** * * @author guest-yfceG9 */ public class ErroNegocio extends Exception{ public ErroNegocio(String message) { super(message); } }
Java
UTF-8
140
1.609375
2
[]
no_license
package com.xrq.rabbitmq.mapper; import com.xrq.rabbitmq.entity.Order; public interface OrderMapper { int insert(Order record); }
Markdown
UTF-8
6,909
2.921875
3
[]
no_license
title=Introducing GCC-Bridge: A C/Fortran compiler targeting the JVM date=2016-01-31 type=post status=published author=Alex Bertram lang=en excerpt=GCC-Bridge is a C/Fortran compiler targeting the Java Virtual Machine (JVM) that makes it possible for Renjin to run R packages that include &lsquo;native&rsquo; C and Fort...
Markdown
UTF-8
17,374
2.8125
3
[ "Apache-2.0" ]
permissive
1. 数据链路层使用物理层提供的服务在通信信道上发送和接收比特。 2. 功能: - 向网络层提供一个定义良好的服务接口。 - 处理传输错误。(错误控制) - 调节数据流,确保慢速的接收方不会被快速的发送方淹没。(流量控制) 3. 数据包和帧(*frame*)的关系: 数据链路层从网络层获得数据包,然后将这些数据包封装成帧(*frame*)以便传输。每个帧包含一个帧头、一个有效载荷(用于存放数据包〉以及一个帧 尾,如图 3-1 所示。帧的管理构成了数据链路层工作的核心。 ![数据包和帧的关系](data-link-layer/数据包和帧的关系.png) 4. 数据链路层的功能是**为网络层提供服务**。最主要的服务是**将数...
C++
UTF-8
13,620
2.796875
3
[]
no_license
#include "AgenciaViajes.h" //#include <iostream> #include <stdio.h> //#include <string> #include <stdlib.h> #include <string.h> #include <fstream> #include <sstream> //#include <windows.h> #include <vector> using std::vector; using namespace std; AgenciaViajes::AgenciaViajes() { primerViaje = NULL; } Ag...
Markdown
UTF-8
6,008
2.890625
3
[]
no_license
--- layout: post title: "Business for 6 Year Olds Part 2" page_img: page_img_desc: "" no_ad: 1 tags: bf6yo bf6yo_title: "Part 2" bf6yo_description: "what a business has" --- I've been ramping up A.'s knowledge of business. So first we discussed <a href="/2016/12/03/business-for-6-year-olds-part-1.html">what a busines...
JavaScript
UTF-8
178
2.78125
3
[]
no_license
// Configuração var lastName = "Lovelace"; // Altere apenas o código abaixo desta linha var secondToLastLetterOfLastName = lastName[lastName.length - 2]; // Altere esta linha
Markdown
UTF-8
15,706
2.90625
3
[ "MIT" ]
permissive
# 3. Criando um ponto de acesso Wi-fi pelo NODEMCU e armazenando arquivos na memória flash do ESP8266 A partir do módulo 3 os projetos desenvolvidos nesse repositório passaram a depender do acesso a internet, isto é, as aplicações dependem de uma rede Wi-Fi para que o ESP 8266 possa se conectar. Contudo, nem sempre te...
SQL
UTF-8
2,301
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 23-09-2021 a las 05:58:03 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
Java
UTF-8
3,219
1.820313
2
[]
no_license
package com.app.usertreatzasia.fragments; import android.content.Intent; import android.graphics.Paint; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.app.use...
C++
GB18030
882
2.625
3
[]
no_license
#pragma once #include"ChunkSection.h" #include<vector> #include"Tools.h" class Baserender; class Chunk { public: Chunk(World& world, const mvec2i& location); bool makeMesh(); void load(); bool hasLoaded(); void setBlock(int x, int y, int z, ChunkBlock block); void setBlock(mvec3i location...
Markdown
UTF-8
3,336
2.921875
3
[]
no_license
# preprocessor exercise ## Step 0: setup You can create a project from scratch. That is, install dependent packages via their names. ``` npm init -y npm i node-sass --save-dev # for step 2 npm i jquery --save npm i parcel-bundler --save-dev # for step 3 npm i pug-cli --save-dev # for step 1 # edit package.json if y...
Java
UTF-8
2,297
1.945313
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2020 Gunnar Hillert * * 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 applicable law or agree...
Python
UTF-8
664
3.25
3
[]
no_license
def kaprekarNumbers(p, q): h = [] for i in range(p, q+1): if (i == 1 ): h.append(i) elif (i ==2): continue elif (i == 3): continue else: d = len(str(i)) k = len(str(i**2)) sq = str(i*i) l = int ...
Java
UTF-8
2,242
2.484375
2
[]
no_license
package fr.naruse.tools.packets; import com.google.common.collect.Lists; import fr.naruse.servermanager.core.ServerManager; import fr.naruse.servermanager.core.connection.packet.IPacket; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import java.io.DataInputStream; import java.io.DataO...
C#
UTF-8
880
3.21875
3
[]
no_license
using System.Collections.Generic; public class NodePath { private LinkedList<Node> path; private LinkedListNode<Node> target; public int Count { get { return path.Count; } } public List<Node> ListRepresentation { get { return new List<Node>(path); } } public ...
C++
WINDOWS-1252
16,625
2.828125
3
[]
no_license
//#include "OdeloBattleSystem.h" //#include <stdio.h> // //typedef struct dostone{ // int x; // int y; // int score; // int reversenum; //}; // //int board[8][8]; //dostone stoneP[8][8]; //dostone temp; //int howmany2; //int count = 0; // // //BOOL isfirst = false; //int canStone(int , int ); //void reversestoneB(int, ...
JavaScript
UTF-8
3,040
3.359375
3
[]
no_license
function mostrar() { var numeroUno; var numeroDos; numeroUno=prompt("Ingrese el primer numero"); numeroUno=parseInt(numeroUno); numeroDos=prompt("Ingrese el segundo numero"); numeroDos=parseInt(numeroDos); if(numeroUno==numeroDos) { mensaje=(numeroUno+" y "+numeroDos); }else { if(numeroUno>numeroDos)...
C#
UTF-8
6,546
2.609375
3
[]
no_license
using Microsoft.Extensions.Configuration; using RentCar.Core.Helpers; using RentCar.Core.Interfaces; using RentCar.Core.Models; using System; using System.Collections.Generic; using System.Data; using System.Text; namespace RentCar.Core.Datebase { public class CustomerDB : BaseDB, ICustomerDB { public...
Swift
UTF-8
2,533
2.65625
3
[]
no_license
// // Endpoints.swift // ios-test // // Created by Huseyn Bayramov on 7/18/20. // Copyright © 2020 Apple. All rights reserved. // import Alamofire import CoreData class Endpoints { private init() {} static let shared = Endpoints() private var manager: Alamofire.Session = { let conf =...
Markdown
UTF-8
743
3.359375
3
[]
no_license
## Spark Functions ### Element-wise transformation - `map()` - transform each element to a new value - `filter()` - takes in a function and returns an RDD that only has elements that pass the `filter()` function - `flatmap()` - we use it when we want to produce multiple output elements for each input element. ...
Python
UTF-8
601
3.1875
3
[]
no_license
from typing import List, Tuple def solve(start: int, schedule: List[int]) -> int: p = min(schedule, key=lambda p: (start + p - 1) // p * p) return p * ((start + p - 1) // p * p - start) def parse(text: str) -> Tuple[int, List[int]]: line1, line2 = text.split() return int(line1), [int(s) for s in lin...
PHP
UTF-8
2,394
2.96875
3
[]
no_license
<?php namespace Etech\Classes; class Database extends \PDO { private $dbh, $queryCount; public function __construct() { try { parent::__construct("mysql:host=" . HOST .";port=" . DB_PORT . ";dbname=" . DB_NAME, DB_USER, DB_PASSWORD); } catch(\Exception $e) { echo $e->getMessage(); } } publi...
Markdown
UTF-8
169,262
3.125
3
[]
no_license
## 作业一     作业要求:使用GCLogAnalysis.java 自己演练一遍串行/并行/CMS/G1的案例。     用于测试的代码如下: ```java package cn.qj.week2; import java.util.Random; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.LongAdder; /** * GC日志生成演示与解读 */ public class GCLogAnalysis { private static Random random = new Random()...
Python
UTF-8
601
3.546875
4
[]
no_license
# Create functions to represent all basic math operations on 2 arguments in sequence. def add(a,b): return a + b def multiply(a,b): return a * b def divide(a,b): return a / b def mod(a,b): return a % b def exponent(a,b): return a ** b def subt(a,b): return a - b # As lamba functions. add2 = lambda a, b: a + b multiply...
Shell
UTF-8
1,847
2.984375
3
[ "Apache-2.0" ]
permissive
#!/bin/bash set -e [[ $DEBUG ]] && set -x . /opt/kolla/kolla-common.sh . /opt/kolla/config-glance.sh : ${GLANCE_API_SERVICE_HOST:=$PUBLIC_IP} check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_ADMIN_SERVICE_HOST \ OS_USERNAME OS_PASSWORD \ GLANCE_KEYSTONE_USER GLANCE_KEYSTONE...
Java
UTF-8
3,876
1.898438
2
[]
no_license
package com.lxh.flashari.ui.originalImg; import android.content.Context; import android.graphics.Bitmap; import android.os.Bundle; import android.os.RemoteException; import android.util.Log; import com.lxh.flashari.api.ApiManager; import com.lxh.flashari.common.BaseCallback; import com.lxh.flashari.common.base.BaseMv...
Markdown
UTF-8
2,093
3.078125
3
[ "MIT" ]
permissive
# month [![NPM version](https://badge.fury.io/js/month.svg)](http://badge.fury.io/js/month) > Get the name or number of the current month or any month of the year. Install with [npm](https://www.npmjs.com/) ```sh $ npm i month --save ``` ## Usage ```js var month = require('month'); month(); //=> 'January' (curren...
Ruby
UTF-8
1,652
2.8125
3
[]
no_license
module ModelIntegrityCheck class ModelCheck def compute_values! return if @computed @klass.find_each do |instance| @total_count += 1 next if instance.valid? @errors_count += 1 instance.errors.full_messages.each do |message| @errors_hash[message...
Java
UTF-8
1,925
3
3
[]
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 cos; /** * Klasa zawierająca informacje o podstawowych parametrach gry. * * @author Piotr Kierzek i Michał Jancz...
Python
UTF-8
3,366
3.109375
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- import os import sys class Location(object): def __init__(self, path, module, function, line, character, absolute_path=True): if sys.version_info.major == 2 and isinstance(path, str): # If this is not a unicode object, make it one! Some tools return # paths...
Shell
UTF-8
13,527
3.21875
3
[ "Apache-2.0" ]
permissive
#!/bin/bash -e PATH=/usr/bin:/bin:/usr/local/bin:/usr/local/rvm/gems/ruby-2.0.0-p247/bin: set -x export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=512m" function copy_to_repo { WWW="/data/packages/" find . -name *.deb | while read f; do if [ -e ${f} ]; then cp -r ${f} $WWW/ fi # backup...
Python
UTF-8
711
2.859375
3
[]
no_license
import json def lambda_handler(event, context): result = exp_func(int(event['queryStringParameters']["x"]), int(event['queryStringParameters']["y"])) return { 'statusCode': 200, 'headers': { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': '...
Python
UTF-8
668
4.34375
4
[]
no_license
"""Function that return true or false if the select value is on even position in array""" def is_on_even_position(table, value): """Verify if the select value is on even position in array Returns: bool: true or false """ res_index = False for index, i in enumerate(table): if i ...
Java
UTF-8
395
1.609375
2
[]
no_license
package com.tencent.mm.plugin.webview.ui.tools; import com.tencent.mm.plugin.webview.ui.tools.WebViewUI.23; class WebViewUI$23$29 implements Runnable { final /* synthetic */ 23 pZM; final /* synthetic */ int qaf; WebViewUI$23$29(23 23, int i) { this.pZM = 23; this.qaf = i; } publ...
TypeScript
UTF-8
720
3.046875
3
[]
no_license
import { SnakeState, STATE } from "./SnakeState"; import { SnakeMoveDown } from "./SnakeMoveDown"; import SnakeMoveUp from "./SnakeMoveUp"; import { SnakeStop } from "./SnakeStop"; export class SnakeMoveRight extends SnakeState{ constructor () { super(); this.move(); console.log("state in...
C#
UTF-8
771
3.078125
3
[]
no_license
using System; namespace HeistPart2 { public class LockSpecialist : IRobber { public string Name { get; set; } public int SkillLevel { get; set; } public int PercentageCut { get; set; } public string Type { get; set; } public int Index { get; set; } public void P...
Go
UTF-8
1,447
2.640625
3
[]
no_license
package client import ( "context" "net" "github.com/lev2048/lrp/internal/conn" "github.com/lev2048/lrp/internal/utils" "github.com/sirupsen/logrus" ) type Transport struct { sc conn.Conn conn net.Conn cid []byte laddr string exit chan bool log *logrus.Logger ctx context.Context } func NewTra...
TypeScript
UTF-8
658
2.8125
3
[]
no_license
import { PermissionStore } from '../Permission'; import { Observable, of } from 'rxjs'; import { PermissionMapping } from './permission.mapping'; //this is an implementation of PermissionStore //it get current user roles //and looking in permission mapping and find the permissions of these roles export class LocalPerm...
Java
UTF-8
1,175
2.03125
2
[]
no_license
/* * (C) Copyright 2021 ESTATE REACTJS SPRING BOOT API. All Rights * * @author ngodi * @date Jun 21, 2021 * @hour 2:57:18 PM */ package com.estate.core.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue;...
C#
UTF-8
6,791
3.21875
3
[]
no_license
using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Checklist { // fonctions qui ne marchent pas class Rotation { public GraphicsPath GetRound...
Python
UTF-8
1,518
2.59375
3
[]
no_license
import os import conf def split(task_num,source,destdir,prefix): f = open(source,'r') split_num = task_num lst = [] for i in range(0,split_num): lst.append([]) count = 0 urls = f.readlines() total = len(urls) for r in urls: lst[count%split_num].append(r) ...
JavaScript
UTF-8
362
3.796875
4
[]
no_license
// Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. const sumSquares = (limit) => { let sumSquare = (limit*(limit+1)*((2*limit)+1))/6 let sum = (limit*(1+100))/2; console.log(sumSquare); return Math.pow(sum,2)-sumSquare; ...
PHP
UTF-8
847
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class TodoCreateRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get...
Java
UTF-8
1,339
3.390625
3
[]
no_license
package homeworkInheritencePerson4; public class Address { private String city = " "; private String country = " "; private String state = " "; private int houseNo = 0; private int streetNo = 0; Address() { } public void showAddress() { System.out.println( getCity() + " " + getCountry() + " " + " " +...
Markdown
UTF-8
7,786
2.734375
3
[]
no_license
一二〇 司空蕙闻言,方自点了点头,忽然足下一阵震动,巨响隆隆,连四周峰壁,都有些摇摇欲坠! 她见此情状,骇然叫道:“皇甫兄,甘兄快躲,恐怕有甚地震山崩灾变,这不是人力武功,可以抵御的呢!” 边自发话,边自拉着皇甫端、甘晓里二人,电闪身形,避往“冰心洞”口! 他们刚刚闪入“冰心古洞”,峰壁间便有些大小石块,陆续往下滚落! 司空蕙方自秀眉深锁,暗担忧虑之际,又是一阵隆隆巨响之处,反而峰壁不摇,坠石渐止。 转眼间,整座“冰心谷”,又恢复平静,甘晓星摇了摇头,含笑说道:“我还以为今日会遭遇一场地裂天崩的活埋之险,谁知竟这般雷声大,雨点小地,安然无事!” 皇甫端忽然想起一事,向...
C++
UTF-8
23,424
2.828125
3
[]
no_license
#include "VoxelChunk.h" #include "SimplexNoise\SimplexNoise.h" #include "Transvoxel.h" #include <iostream> VoxelChunk::VoxelChunk(glm::i32vec3 world) :chunkLocation(world), isEmpty(true), vertexfloatcount(0), indexcount(0), ib(nullptr), vb(nullptr) { SimplexNoise cnoise(1/30.0f,1.0f); int i, j, k; for (i =...
C
UTF-8
1,481
4.09375
4
[]
no_license
#include <wchar.h> #include <string.h> #include <stdio.h> // A string is a null-terminated array of type char, including the terminating // null byte. String-valued variables are usually declared to be pointers of // char *. Such variable do not include space for the next of a string; that // has to be stored somewher...
Java
GB18030
2,647
3.21875
3
[]
no_license
package csdn.bugs; import java.util.*; import java.io.*; public class ResortByDel { @SuppressWarnings("unchecked") public void ResortToTemp(String firstFile, String secondFile, String tempPath1, String tempPath2) throws IOException { // String oldPath = oldFolderPath; File f1 = new File(firstFile); File f...
Java
UTF-8
219
2.109375
2
[]
no_license
package com.fifthapp; public class MyThread1 extends Thread { static ThreadScope scope = new ThreadScope(); A a; MyThread1(A a){ this.a = a; } @Override public void run() { scope.set("AAA"); a.m1(); } }
Markdown
UTF-8
956
3.171875
3
[]
no_license
# REST Afternoon Project: https://github.com/ChesterJGreen/Music-Is-Fun ## What does REST stand for, and in simple terms what does it mean? REpresentational State Transfer This means when a RESTful API is called, the server will transfer to the client a representation of the state of the requested resource. I guess...
Python
UTF-8
1,116
2.546875
3
[]
no_license
#!/usr/bin/python3 import sys import matplotlib.pyplot as plt import numpy as np from scipy.stats import gaussian_kde import seaborn as sns sns.set_palette("deep", desat=.6) sns.set_context(rc={"figure.figsize": (8, 4)}) file_mcscan = sys.argv[1] #'/data2/k821209/KimKH/Gm2Gm.collinearity.kaks' ks_array = np.array([])...
Java
UTF-8
2,676
2.265625
2
[]
no_license
package tw.com.miifun.popballoonfv; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.RectF; import android.util.Log; /** * Created by yhorn on 2016/2/20. */ public class ItemMoving ex...
C++
UTF-8
425
2.921875
3
[]
no_license
# include<iostream.h> # include<conio.h> void main() { clrscr(); int d; cout<<"Enter no. of week's day(1-7): "; cin>>d; if(d=1) cout<<"Monday"; else if(d=2) cout<<"Tuesday"; else if(d=3) cout<<"Wednesday"; else if(d=4) cout<<"Thursday"; else if(d=5) cout<<"Friday"; ...
Java
UTF-8
483
2.890625
3
[]
no_license
package top.tinn.Over200.Problem_1266; public class Solution { public int minTimeToVisitAllPoints(int[][] points) { if (points.length < 2){ return 0; } int ans = 0; for (int i = 1; i < points.length; i++){ int dx = Math.abs(points[i][0] - points[i - 1][0]); ...
TypeScript
UTF-8
677
2.71875
3
[ "ISC" ]
permissive
import { Breakpoint } from '/styles/breakpoints' import { Spacing } from '/styles/spacings' type AsymCol = { col: Col above?: Breakpoint gutter?: Spacing } export type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 export type ColItem = { content: React.ReactElement className?: string aboveMobile...
C
UTF-8
297
3.796875
4
[]
no_license
#include<stdio.h> int main() { int Counter= 1, Count; printf("How many natural numbers you want to print?"); scanf("%d", &Count); printf("The natural numbers up to %d are", Count); while (Counter <= Count) { printf (" %d", Counter); Counter = Counter + 1; } printf ("."); }
Markdown
UTF-8
1,004
3.59375
4
[]
no_license
# Navigation - [Navigation](#navigation) - [Links](#links) - [Solution 1 暴力法](#solution-1-%e6%9a%b4%e5%8a%9b%e6%b3%95) # Links 1. https://leetcode.com/problems/rotated-digits/ 2. https://leetcode-cn.com/problems/rotated-digits/ # Solution 1 暴力法 ```python class Solution: def rotatedDigits(self, N: i...
Python
UTF-8
531
2.84375
3
[ "MIT" ]
permissive
class Base(): def __init__(self, id, *args, **kwargs): self.id = id super().__init__(*args, **kwargs) @classmethod def get_id(cls, id, type='state'): """ Parameters ---------- id : str type : str, default='state' Type of object associated...
Markdown
UTF-8
2,001
2.859375
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: "Turn on auto geocoding (Dynamics 365 Field Service) | MicrosoftDocs" description: Learn how to turn on auto geocoding in Dynamics 365 Field Service ms.custom: - dyn365-fieldservice ms.date: 09/08/2022 ms.topic: article author: jshotts ms.author: jasonshotts --- # Turn on auto geocoding to calculate esti...
JavaScript
UTF-8
23,055
2.59375
3
[ "MIT" ]
permissive
 var hideCalendarTimer = new Array(); function calendarTimer(objname){ this.objname = objname; this.timers = new Array(); } function toggleCalendar(objname, auto_hide, hide_timer){ var div_obj = document.getElementById('div_'+objname); if(div_obj != null){ if (div_obj.style.visibility=="hidden") { div_obj....
Java
UTF-8
1,115
2.203125
2
[]
no_license
package com.cars.management.dao; import com.cars.management.model.Car; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.PathVariable; import java.util.List; /** * Created by GJW on 2017/5/29. */ @Mapper public interface CarDAO { ...
Java
UTF-8
11,673
1.554688
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2018-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 a...
Markdown
UTF-8
1,584
4.09375
4
[]
no_license
# Polymorphism #### A concept related to the object oriented approach of programming. Polymorphism is one of the core concepts in OOP languages, it describes the concept that different classes can be used with same interface. Each of these classes can provide its own implementation of the interface. If a method somet...
Python
UTF-8
1,350
3.4375
3
[ "Apache-2.0" ]
permissive
from vectors import * # Given a line with coordinates 'start' and 'end' and the # coordinates of a point 'pnt' the proc returns the shortest # distance from pnt to the line and the coordinates of the # nearest point on the line. # # 1 Convert the line segment to a vector ('line_vec') # 2 Create a vector connecting st...
PHP
UTF-8
593
2.734375
3
[]
no_license
<?php class Spectra_Library_Database_Connection_Provider_MySql extends Spectra_Library_Database_Connection_Provider_Abstract{ const DEFAULT_PORT = 3306; const DEFAULT_HOST = 'localhost'; public function __construct($db_name, $db_user = '', $db_pass = '', $db_host = self::DEFAULT_HOST, $db_port =...
C#
UTF-8
2,293
2.75
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MAPMA.EscRef; using MAPMA.Model; namespace MAPMA.ServiceLayer { class EscServices { public List<EscapeRoom> GetAllForOwner() { IEscapeRoom_Services Service = new MAPMA.Es...
C++
UTF-8
3,187
2.609375
3
[]
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> void MainWindow::creatChart() { chartView = new QChartView(this); chart = chartView->chart(); chart->setTitle("Data Display Chart"); chartView->setChart(chart); this->setCentralWidget(chartView); series0 = new QLineSeries()...
Java
UTF-8
2,150
2.84375
3
[]
no_license
package com.example.mipro.netschool.Diary; import android.support.annotation.NonNull; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import static com.example.mipro.netschool.MainActivity.SOCKET; public class Week { private static final SimpleDateFormat sdf = new Simp...
Markdown
UTF-8
1,021
2.875
3
[ "MIT" ]
permissive
--- layout: page title: Về chúng tôi subtitle: Sáng tạo tương lai --- Chúng tôi là những người đam mê công nghệ luôn tìm tòi nghiên cứu để cung cấp các giải pháp cho khách hàng. Chúng tôi cung cấp các giải pháp cho mọi lĩnh vực khi có các vấn đề hãy liên hệ chúng tôi chúng tôi sẽ giải quyết chúng: - Cung cấp các giải...
Shell
UTF-8
347
3.078125
3
[]
no_license
#!/bin/bash # Docker setup echo "Setting up Docker for aws ec2!" sudo apt-get upgrade sudo apt-get update sudo apt-get install docker.io sudo groupadd docker sudo usermod -aG docker ubuntu # replace ubuntu by whatever your username is # logout and log back in echo "NOW LOG OUT OF YOUR SHELL, LOG BACK IN AND TYPE -...
SQL
UTF-8
425
3.390625
3
[]
no_license
select tb_produtos.nome, tb_produtos.preco, tb_marcas.nome from tb_produtos inner join tb_marcas on tb_marcas.id = tb_produtos.marca_id -- where tb_marcas.nome like "%Nike%" -- and tb_produtos.preco < 50.00 -- tras tudo com o valor a baixo do escolhido -- and tb_produtos.nome = "meias" -- tras so um nome escolhido ...
JavaScript
UTF-8
2,111
2.6875
3
[]
no_license
// Instantiate empty objects. var Instagram = {}; var my_tags = []; (function(){ function filter_by_tag(photos){ var dog_photos=[]; $.each(photos.data, function(index, photo){ try { for (i=0; i<photo.tags.length; i++) { console.log(photo.tags[i]); if (my_tags.indexOf(photo...
C#
UTF-8
734
3.40625
3
[]
no_license
using System; class Program { static void Main() { double rekord = double.Parse(Console.ReadLine()); double razstoqnie = double.Parse(Console.ReadLine()); double vremeZaPluvane1M = double.Parse(Console.ReadLine()); double rezultat = (razstoqnie * vremeZaPluvane1M); d...
C++
UTF-8
3,043
3.21875
3
[]
no_license
#include "classroomcontroller.h" //Constructor ClassRoomController::ClassRoomController(QDomNode *classroomsNode) { m_classroomsNode=classroomsNode; m_classrooms=m_classroomsNode->childNodes (); } //Methods //********************************************************** //**** The add method just add a node, no...