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
Swift
UTF-8
6,479
2.8125
3
[]
no_license
// // EOINInstanceVariableParser.swift // CreateJsonSwiftObjects // // Created by Eoin Norris on 06/01/2015. // Copyright (c) 2015 Eoin Norris. All rights reserved. // import Cocoa public class myObject:NSObject { override init(){ super.init() } init(jsonDictionary:NSDictionary) { ...
C++
UTF-8
12,315
3.296875
3
[ "MIT" ]
permissive
/* Next player is o. states are represented by long long. 0:empty, 1:o, 2:x ox- o-o --x is 011000_010001_000010 you can change size by boardSize. Run c++ -std=c++17 -O3 reachable_state.cpp ./a.out */ #include <iostream> #include <unordered_map> #include <vector> #include <time.h> #include <bitset> // 0: empty, 1: o...
Java
UTF-8
1,072
2.40625
2
[]
no_license
package com.owen.codeframework.http; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import com.loopj.android.http.RequestParams; /** * REST็ฝ‘็ปœๆŽฅๅฃ่ฏทๆฑ‚็ฑป * * Created by Owen on 2015/11/3. */ public class RESTClient { private static AsyncHttpClient sClient = ne...
C++
UTF-8
1,084
2.75
3
[]
no_license
#include <iostream> #include <vector> #include <unordered_map> #include <queue> using namespace std; #define INPUT_SIZE 101 struct nodo{ vector<char> out; vector<char> in; bool visited = false; bool inqueue = false; }; unordered_map<char, nodo> adj; bool checkNode(char c){ if(adj[c].visited) return false...
C#
UTF-8
981
3.578125
4
[]
no_license
๏ปฟusing System; namespace ch5_1 { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); int max = -1000000, min= 1000000; int[] array = new int[num]; string str = Console.ReadLine(); string[] str_un...
C
UTF-8
6,834
3.203125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <limits.h> //djikstra implementation inspired by https://www.geeksforgeeks.org/c-program-for-dijkstras-shortest-path-algorithm-greedy-algo-7/ // and https://www.geeksforgeeks.org/printing-paths-dijkstras-shortest-path-algorithm/?ref=lbp struct...
C++
UTF-8
2,093
2.84375
3
[]
no_license
#include <SDL2/SDL.h> # define FPS 60 # define WIDTH 1300 # define HEIGHT 1000 # define MUL 80 double f(const double &x) { return (sqrt(x)); } double draw_zero_pow() { return (1. / 2); } double draw_first_pow(const double &x) { return (x + 1. / 8); } void draw_lines(SDL_Renderer *renderer) { for...
Java
UTF-8
509
2.046875
2
[]
no_license
package com.sample.rest; import org.springframework.boot.SpringApplication; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Created by jayati on 18/11/17. */ @RestController public class SampleController { @RequestMapping("/") ...
Python
UTF-8
379
3.25
3
[]
no_license
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def reverseList(self, head: ListNode) -> ListNode: fi = None se = head while se: t = se.next se.next = fi ...
Java
UTF-8
4,892
1.804688
2
[]
no_license
package com.ca.arcflash.ui.client.homepage.navigation; import com.ca.arcflash.ui.client.UIContext; import com.ca.arcflash.ui.client.coldstandby.ColdStandbyManager; import com.ca.arcflash.ui.client.coldstandby.ColdStandbyTaskPanel; import com.ca.arcflash.ui.client.common.AppType; import com.ca.arcflash.ui.client.homepa...
Java
UTF-8
3,324
2.59375
3
[]
no_license
package com.robert.springmvcwebapp; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.ContextLoaderListener; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; import javax.servl...
Java
UTF-8
1,041
3.453125
3
[]
no_license
package clocks.base; /** * * @author S.Lavruhin * */ public class Point implements Comparable<Point>{ private final double precession = 0.0001; public final double x; public final double y; /** * * @param x * @param y */ public Point(double x, double y) { this.x = x; this....
JavaScript
UTF-8
2,125
2.6875
3
[]
no_license
// This file needed to be run on node 0.12 in order to make sure that library runs on 0.12 var crypto = require('crypto'); var Estimator = require('../index'); var FeeRate = require('../build/FeeRate'); // For test we will assume that 4 transactions can be added to mempool on each iterration block and 3 can be mined ...
Java
UTF-8
1,068
2.8125
3
[]
no_license
package com.artpro.service; import com.artpro.model.CargoTransport; //ะ”ะปั ะณั€ัƒะทะพะฒะพะณะพ ั€ะฐะทั€ะฐะฑะพั‚ะฐั‚ัŒ ะผะตั‚ะพะด ะบะพั‚ะพั€ั‹ะน ะฟั€ะพะฒะตั€ะธั‚ ะผะพะถะฝะพ ะปะธ ะทะฐะณั€ัƒะทะธั‚ัŒ ะฒ //ะฝะตะณะพ xxx ะณั€ัƒะทะฐ //ะœะตั‚ะพะด ะดะพะปะถะตะฝ ะฟั€ะพะฒะตั€ัั‚ัŒ ะตัะปะธ ัั‚ะพ ะบะพะป-ะฒะพ ะณั€ัƒะทะฐ ะฟะพะผะตั‰ะฐะตั‚ัั ะฒ ะณั€ัƒะทะพะฒะธะบ ั‚ะพ //ะฒั‹ะฒะพะดะธั‚ ะฒ ะบะพะฝัะพะปัŒ โ€ะ“ั€ัƒะทะพะฒะธะบ ะทะฐะณั€ัƒะถะตะฝโ€, ะตัะปะธ ะบะพะป-ะฒะพ ะณั€ัƒะทะฐ ะบะพั‚ะพั€ะพะต ะฝัƒะถะฝะพ //ะทะฐะณั€ัƒะทะธั‚ัŒ ะฑะพะปัŒ...
Java
UTF-8
1,245
2.3125
2
[]
no_license
package fr.insa.soa.ExchangeSemester.services; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.List; import javax.xml.bind.DatatypeConverter; import org.springframework.beans.factory.annotation.Autowired; import org.spri...
Java
UTF-8
870
2.34375
2
[ "Apache-2.0" ]
permissive
package com.david.calendaralarm.data.pojo; import org.joda.time.DateTime; public class Item { private String title; private String summary; private DateTime currentDate; private DateTime executionDate; public String getTitle() { return title; } public void setTitle(String title) ...
C++
UTF-8
488
2.9375
3
[]
no_license
#include "Polymorph.hpp" Polymorph::Polymorph() : ASpell("Polymorph", "turned into a critter") {}; Polymorph::~Polymorph() {}; Polymorph::Polymorph(Polymorph const & src) : ASpell("Polymorph", "turned into a critter") { (void)src; }; Polymorph & Polymorph::operator = (Polymorph const & src) { if (this != &s...
Java
UTF-8
203
2.890625
3
[]
no_license
package Day18; class Number implements Expression { private final int value; public Number(int value) { this.value = value; } @Override public long evaluate() { return value; } }
C++
UTF-8
2,173
3.609375
4
[]
no_license
#include<iostream> #include<queue> #include<map> #include<list> #define null 0 using namespace std; class Node { public: int data; Node *left; Node *right; Node(){} Node(int data){ this->data=data; left=right=null; } }; class Object{ ...
PHP
UTF-8
2,372
2.625
3
[ "MIT" ]
permissive
<?php namespace Arkade\RetailDirections; use Carbon\Carbon; use Illuminate\Support\Fluent; use Illuminate\Support\Collection; class GiftVoucherFinaliseRequest extends Fluent { protected $giftVoucherReference; protected $giftVoucherSchemaCode; protected $pin; protected $statusInd; /** * C...
Java
UTF-8
19,399
1.890625
2
[]
no_license
package com.yunda.jx.jxgc.workplanmanage.manager; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.persistence.Entity; import javax.persistence.Id; import org.hibernate.Hibernate; import org.hibernate.HibernateException; import org.hibe...
JavaScript
UTF-8
2,228
2.640625
3
[]
no_license
function createDot () { let dot = document.createElement("div") dot.style.position = "absolute" dot.style.height = "10px" dot.style.width = "10px" dot.style.background = "#fff" dot.style.boxSizing = "border-box" dot.style.border = "1px solid #000" return dot } function createOutline () { let outline =...
C++
GB18030
544
3.875
4
[]
no_license
//ศกฦณศพฮป1ยฑึต+1ยฑ0สผ16 = 10000๒ณคถ5 2= 0010ฮช2 #include <iostream> using namespace std; int length(int num) { int count = 0; while(num) { count++; num >>= 1; } return count; } int main() { int number; cout << "" << endl; while(cin >> number) { cout << "ฦณวฃ " << len...
C#
UTF-8
1,715
2.609375
3
[]
no_license
๏ปฟusing econoomic_planer_X.Market; using System; namespace econoomic_planer_X.ResourceSet { public class TradingResource : Resource, IComparable, IEquatable<TradingResource> { public Population Owner { get; set; } public TradingResource() { } public TradingResource(Population Owner, R...
Python
UTF-8
601
3.671875
4
[]
no_license
import numpy as np import pandas as pd # ์—ฐ์Šต ๋ฌธ์ œ # 1. ๋ชจ๋“  ํ–‰๊ณผ ์—ด์— ๋ผ๋ฒจ์„ ๊ฐ€์ง€๋Š” 5 x 5 ์ด์ƒ์˜ ํฌ๊ธฐ๋ฅผ ๊ฐ€์ง€๋Š” ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„์„ ๋งŒ๋“ ๋‹ค. df = pd.DataFrame(np.arange(10, 35).reshape(5, 5), index=["a", "b", "c", "d", "e"], columns=["A", "B", "C", "D","E"]) df # 2. 10๊ฐ€์ง€ ์ด์ƒ์˜ ๋ฐฉ๋ฒ•์œผ๋กœ ํŠน์ •ํ•œ ํ–‰๊ณผ ์—ด์„ ์„ ํƒํ•œ๋‹ค. df[:"a"] df["A"] df["a":"e...
Markdown
UTF-8
2,131
2.8125
3
[ "MIT" ]
permissive
autoGrow jQuery plugin ====================== Auto resize input fields to fit content when user types. Works both with jQuery and Zepto.js. Usage ----- To autoresize text field use: ```js $('#myTextField').autoGrow({ comfortZone: 70 // default value }); // or just $('#myTextField').autoGrow(70); ``` When you u...
JavaScript
UTF-8
1,774
2.984375
3
[]
no_license
const postsNode = document.getElementById('posts'); function show() { fetch('/posts') .then(response => response.json()) .then(posts => { let html = ''; for (const post of posts) { html += ` <h2>${post[1]} <sup>#${post[0]}</sup></h2> <time class=...
JavaScript
UTF-8
749
2.6875
3
[]
no_license
(function () { //instance in controller var prod = new productnamespace.Product(1, " SampleProduct", 500, 'Product description'); // binding the object properties to the view document.write(prod.prodId); document.write(prod.prodName); document.write(prod.prodPrice); document.write(...
PHP
UTF-8
968
3.140625
3
[]
no_license
<?php require "Equacao2grau.php"; class EquacoesTest extends PHPUnit_Framework_TestCase { public function testConstruct(){ $eq2g = new Equacao2grau(1, 2, 3); $this->assertEquals(1, $eq2g->a); $this->assertEquals(2, $eq2g->b); $this->assertEquals(3, $eq2g->c); } publi...
Python
UTF-8
1,353
2.59375
3
[]
no_license
import requests from yarl import URL url = 'http://budget.gov.ru/epbs/registry/7710568760-BUDGETS/data' payload = dict( pageSize=2, filterstatus='ACTIVE', pageNum=1, ) conversion = dict() class ApiDataLoader: """ """ def __init__(self, timeout=5) -> None: self.timeout = timeout ...
TypeScript
UTF-8
609
2.84375
3
[]
no_license
import { ArgumentMetadata, BadRequestException, Injectable, PipeTransform, } from '@nestjs/common'; @Injectable() export class ValidFilterPipe implements PipeTransform { transform(value: any, metadata: ArgumentMetadata) { const theNYTimesOption = 'thenytimes'; const theGuardianOption = 'theguardian';...
Python
UTF-8
475
3.390625
3
[]
no_license
a, b = list(map(int, input().split())) g1 = [["#" for i in range(100)] for i in range(20)] g2 = [["." for i in range(100)] for i in range(20)] a, b = a-1, b-1 j = 0 while a!=0: for i in range(0, 100, 2): g1[j][i] = "." a -= 1 if a==0: break j += 2 j = 1 while b!=0: for i in ran...
Python
UTF-8
347
3.703125
4
[]
no_license
def fibonacci(num): if num == 1: return 0 elif num == 2: return 1 index = 2 def calc(first, second): nonlocal index index = index + 1 result = first + second if index == num: return result return calc(second, result) return calc(...
C++
UTF-8
1,580
3.421875
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; #define BIGINT_SIZE (1000) class BigInt { private: unsigned int _num[BIGINT_SIZE]{}; void carry_up() { for (int i = 0; i < BIGINT_SIZE - 1; ++i) { if (_num[i] >= 10) { _num[i + 1] += _num[i] / 10; _num[i] %= 10; ...
Java
UTF-8
272
1.710938
2
[]
no_license
/** * @autor Chekmarev Andrey * 3rd year, 7th group * @version 1.0 * Main class */ public class Main { public static void main(String[] args) throws Exception { InjectTest injectTest = new Injector().inject(new InjectTest()); injectTest.doSmth(); } }
C#
UTF-8
551
2.765625
3
[]
no_license
๏ปฟusing UnityEngine; namespace Game { /// <summary> /// ECS Component that contains the properties required for the ECS Systems that handles gravity to work properly. /// </summary> public class GravityForce : MonoBehaviour { [Tooltip("The gravity force to apply to this GameObject")] ...
Go
UTF-8
193
2.84375
3
[]
no_license
//ๅ…จ้‡่ฏปๆ–‡ไปถ package main import ( "io/ioutil" ) func main() { data, err := ioutil.ReadFile("t0001.go") if err != nil { println(err.Error()) } else { println(string(data)) } }
C++
UTF-8
1,660
2.609375
3
[]
no_license
#include "Project.h" using namespace simplesql::operators; Project::Project(const std::vector<ExpressionBase *>& _projectList, OperatorBase* _child) : OperatorBase(_Project), child(children[0]) { child = _child; projectList.assign(_projectList.begin(), _projectList.end()); children[1] = nullptr;...
C++
UTF-8
1,026
3.265625
3
[ "BSD-3-Clause" ]
permissive
#include <vector> #include <iostream> using namespace std; class Solution { public: int minDistance(string word1, string word2) { int n = word1.length(); int m = word2.length(); vector<vector<int> > f; f.resize(n + 1); for (int i = 0; i <= n; i++) { f[i].resize(m + 1); } for (int i...
C++
UTF-8
676
2.796875
3
[]
no_license
#include "subsystems/Drivetrain.h" double boundValue(const double value, const double bound){ /** * Bounds value to range [-bound,bound] * If value is outside boundary, return appropriate boundry. Otherwise, return value. */ if(value < (-1.0 * bound)) return -1.0 * bound; if(value > bound) return bound; retu...
C++
UTF-8
1,539
3.25
3
[]
no_license
#include "Color.h" #include <SDL.h> const SDL_PixelFormat* Color::kFormat = SDL_AllocFormat(SDL_PIXELFORMAT_ARGB8888); Color Color::GetAlphaBlend(const Color& source, const Color& destination) { float sourceAlpha = static_cast<float>(source.alpha()) / 255.0f; float destinationAlpha = 1.0f - sourceAlpha; ui...
Swift
UTF-8
3,171
2.671875
3
[ "MIT" ]
permissive
// // Copyright ยฉ 2018 Frallware. All rights reserved. // import UIKit import Frallware final class PageView: UIView { let firstView = UIView() let secondView = UIView() private lazy var pan = UIPanGestureRecognizer(target: self, action: #selector(didPan)) var pageChangeAction: (() -> Void)? ...
SQL
UTF-8
1,874
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 04, 2021 at 01:00 PM -- Server version: 5.7.24 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
Markdown
UTF-8
4,422
2.78125
3
[ "Apache-2.0" ]
permissive
# Contributing to Browsersync We'd love for you to contribute to Browsersync and help make it even better than it is today! Here are the guidelines we'd like you to follow: - [Question or Problem?](#question) - [Issues and Bugs](#issue) - [Tips for a creating a great issue report](#tips) - [Feature Requests](#fea...
Markdown
UTF-8
5,611
3.15625
3
[]
no_license
--- title: "Sanity checks" categories: sre opinion --- In my line of work I've dealt with a lot of automated data pipelines that feed into production systems. Validating the output of these pipelines in an automated manner is frequently difficult. Suppose you had a different data source you could validate against. If...
Python
UTF-8
2,444
3.578125
4
[]
no_license
""" - Reduce prices to peaks and troughs: highs: [3, 4, 6, 7] lows: [1, 2, 4, 5] - Iterate all 2-part slicing on highs-lows pair. for split in range(0, length-of-lows): use D&C to calculate max profit of left part use max(highs[s:]) - lows[s] to calculate max profit of right part profit-of-one-spl...
Java
UTF-8
6,312
2.40625
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.kk.AutoFillSystem.Windows; import com.kk.AutoFillSystem.utility.PriceEstimation; import static com.kk.AutoFillSyst...
C++
UTF-8
1,248
3.515625
4
[]
no_license
/** * @file node.cpp */ #include "node.hpp" #include <cstring> #include <iostream> Node::Node() { this->is_final = false; for (unsigned int i = 0; i < 27; i++) { this->tab[i] = nullptr; } } Node::~Node() { Node * temp = this; for(unsigned int i = 0; i < 27; i++) { delete temp->tab[i]; temp->...
C++
UTF-8
1,404
2.953125
3
[]
no_license
#pragma once #include <algorithm> #include <initializer_list> class MojNizInt { public: MojNizInt() : c_{1}, n_{0}, p_{new int[1]} {}; MojNizInt(std::initializer_list<int> a) : c_{a.size()}, n_{a.size()}, p_{new int[n_]} {std::copy(std::begin(a), std::end(a), p_);} MojNizInt(const MojNizInt&); //copy k...
C++
UTF-8
411
2.875
3
[]
no_license
#include "LogLevel.h" std::string ToString(LogLevel level) { switch (level) { case LogLevel::TRACE: return "TRACE"; case LogLevel::INFO: return "INFO"; case LogLevel::WARN: return "WARN"; case LogLevel::ERROR: return "ERROR"; case LogLevel::SEVERE: return...
C#
UTF-8
693
2.53125
3
[]
no_license
๏ปฟ using System.ComponentModel.DataAnnotations.Schema; namespace UrbanDictionary.DataAccess.Entities { /// <summary> /// Implement the many-to-many relationship with <see cref="Entities.User"/> and its saved <see cref="Entities.Word"/>. /// </summary> public class UserSavedWord { /// <summa...
Markdown
UTF-8
1,963
3.046875
3
[]
no_license
# MC_WS17-18_2.PNG **NOte**: a)-c) are multiple choice. d)-f) are questions to be answered with plain text. a) Q: What is the main advantage of having a convex loss function? A: They are relatively easy to optimize. **Note**: Because there exists only one minimum which is per definition the global minimum. b) Q: Th...
Java
UTF-8
8,117
1.757813
2
[ "Artistic-1.0", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "EPL-1.0", "CPL-1.0", "LGPL-2.1-or-later", "BSD-3-Clause", "LGPL-3.0-only", "ECL-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-jdom", "LicenseRef-scancode-freemarker", "LicenseRef-scancode-unk...
permissive
/** * Copyright 2005-2015 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * Unless required by a...
Shell
UTF-8
3,279
3.65625
4
[ "MIT" ]
permissive
flei_docker_get_compose_project_name() { flei_get_clean_project_name } flei_get_docker_compose_path() { flei_require @flei/common-paths flei_require @flei/get-flei-image local FLEI_IMAGE FLEI_IMAGE="$(flei_get_flei_image)" local DOCKER_COMPOSE_PATH_BASE DOCKER_COMPOSE_PATH_BASE="$(flei_resolve_path "${...
Python
UTF-8
745
2.5625
3
[]
no_license
# preprocessor directives import fresh_tomatoes import media # Movie objects bladerunner = media.Movie( "Blade Runner", "https://www.youtube.com/watch?v=4lW0F1sccqk" ) mad_max = media.Movie( "Mad Max: Fury Road", "https://www.youtube.com/watch?v=hEJnMQG9ev8" ) point_break = media.Movie( "Po...
Java
WINDOWS-1250
3,881
2.109375
2
[]
no_license
package com.luxsoft.siipap.cxc.swing.cobranza; import org.apache.log4j.Logger; import com.luxsoft.siipap.cxc.catalogos.ComentarioDeRevisionForm; import com.luxsoft.siipap.ventas.domain.VentaACredito; import com.luxsoft.siipap.ventas.managers.VentasManager; /** * Soporte adicional para la funcionalidad de R...
C++
UTF-8
3,485
2.59375
3
[]
no_license
#include "stdafx.h" using namespace std; using namespace nb; int main() { PackageManager packageManager; packageManager.initFromFolder( "./data/debug_packageManager" ); const std::list<Package>& pkgsByName = packageManager.getLoadedPackages(); const Package* newPackage = packageManager.getPackageByName( "NewPack...
PHP
UTF-8
2,210
2.625
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: Chelsea * Date: 3/1/2015 * Time: 3:44 PM */ namespace App\Impl\Reponsitory\Product; use App\Http\Requests\ProductFormRequest; use App\Impl\Service\Cache\CacheInteface; use App\Products; use Carbon\Carbon; use Illuminate\Http\Request; use Intervention\Imag...
Python
UTF-8
729
3.90625
4
[]
no_license
class Parent: parent_attr = 100 def __init__(self): print("่ฐƒ็”จ็ˆถ็ฑปๆž„้€ ๅ‡ฝๆ•ฐ") def parent_method(self): print("่ฐƒ็”จ็ˆถ็ฑปๆ–นๆณ•") def setAttr(self, attr): Parent.parentAttr = attr def getAttr(self): print("็ˆถ็ฑปๅฑžๆ€ง :", Parent.parentAttr) class Child(Parent): def __init__(self): ...
C#
UTF-8
19,099
2.578125
3
[]
no_license
๏ปฟusing System; using System.Collections.ObjectModel; namespace StokerStocks { static class BancoDados { /// <summary> /// Carrega os ativos da carteira /// </summary> /// <returns></returns> public static ObservableCollection<Ativo> CarregarAtivos() { ...
Java
UTF-8
3,191
2.84375
3
[]
no_license
package com.mq.demo.rpc; import com.rabbitmq.client.ConnectionFactory; import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.QueueingConsumer; import com.rabbitmq.client.AMQP.BasicProperties; /** * Created by hzzhaolong on 2016/2/3. */ public class RPCServer { pr...
JavaScript
UTF-8
893
2.765625
3
[]
no_license
import axios from "axios"; export const fetchOrganisationsByQueryService = async (qwery = "") => { try { const response = await axios( `https://api.github.com/search/users?q=type:org+${qwery}` ); const { items } = response.data; return items; } catch (error) { return []; } }; export co...
Markdown
UTF-8
9,621
2.828125
3
[]
no_license
# swagger_client.InvoiceResourceApi All URIs are relative to *https://localhost:8080* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_invoice_using_post**](InvoiceResourceApi.md#create_invoice_using_post) | **POST** /api/invoices | createInvoice [**delete_invoice_using_dele...
PHP
UTF-8
3,442
2.53125
3
[]
no_license
<?php /** * Copyright. "NewGen" investment engine. All rights reserved. * Any questions? Please, visit https://newgen.company */ namespace App\Console\Commands\Automatic; use App\Http\Controllers\Admin\WithdrawalRequestsController; use App\Models\Currency; use App\Models\PaymentSystem; use App\Models\Transaction; ...
C#
UTF-8
289
2.953125
3
[]
no_license
๏ปฟusing System; namespace RocketEquation { public static class FuelCalculator { public static int RequiredFuel(int mass) { var step1 = Math.Floor((double) mass / 3); var step2 = step1 - 2; return (int)step2; } } }
PHP
UTF-8
8,675
2.5625
3
[ "Apache-2.0" ]
permissive
<?php /** op-unit-curl:/Curl.class.php * * @created 2017-06-01 * @version 1.0 * @package op-unit-curl * @author Tomoaki Nagahara <tomoaki.nagahara@gmail.com> * @copyright Tomoaki Nagahara All right reserved. */ /** namespace * * @created 2018-07-02 */ namespace OP\UNIT; /** Used class * */ use ...
Python
UTF-8
1,593
2.859375
3
[]
no_license
############### #CS519 #Xiao Tan #HW 7 - 2 ############### from collections import defaultdict def best(amount, value): opt = defaultdict(lambda : -1) types = -1 res = [0]*len(value) def _best(i, x): if i < 0 or x < 0 : return 0 if x == 0: opt[i, x] = 1 ...
JavaScript
UTF-8
2,926
2.78125
3
[]
no_license
export default function buildSlider() { const sliderWrapper = document.getElementsByClassName('slider-wrapper')[0]; const sliderNav = document.getElementsByClassName('slider-nav')[0]; const slides = [ { name: '1 slide', img: '', startActive: true}, { name: '2 slide', img: ''}, { name: '3 slide', img: ''}, ...
Go
UTF-8
49,882
2.546875
3
[ "MIT" ]
permissive
package wrapper import ( "bytes" "encoding/base64" "errors" "fmt" "net/http" "net/url" "strings" "github.com/alaingilbert/ogame/pkg/ogame" "github.com/alaingilbert/ogame/pkg/utils" echo "github.com/labstack/echo/v4" ) // APIResp ... type APIResp struct { Status string Code int Message string Result...
Markdown
UTF-8
11,401
3.59375
4
[ "Apache-2.0", "CC-BY-3.0" ]
permissive
--- title: JavaScript๏ผš่ฟ™ๆ˜ฏไป€ไนˆๆ„ๆ€๏ผŸ subhead: ๅœจ JavaScript ไธญๆ‰พๅ‡บ `this` ็š„ๅ€ผๅฏ่ƒฝๅพˆ้šพ๏ผŒ่ฟ™้‡Œไป‹็ปไบ†ๆ–นๆณ•โ€ฆโ€ฆ description: ๅœจ JavaScript ไธญๆ‰พๅ‡บ `this` ็š„ๅ€ผๅฏ่ƒฝๅพˆ้šพ๏ผŒ่ฟ™้‡Œไป‹็ปไบ†ๆ–นๆณ•โ€ฆโ€ฆ authors: - jakearchibald date: 2021-03-08 hero: image/CZmpGM8Eo1dFe0KNhEO9SGO8Ok23/cePCOGeXNFT6WCy85gb4.png alt: "this \U0001F914" tags: - blog - javascript --- JavaScript ็š„`this`...
Go
UTF-8
214
3.28125
3
[ "MIT", "Unlicense" ]
permissive
package main import ( "fmt" ) func coprime(x, y int) bool { gcd := func(x, y int) int { for y != 0 { x, y = y, x % y } return x } return gcd(x, y) == 1 } func main() { fmt.Println(coprime(2, 7)) }
PHP
UTF-8
2,654
3.6875
4
[]
no_license
<!-- Q.10) Write a PHP program to sort the student records which are stored in the database using selection sort. --> <!DOCTYPE html> <html> <body> <style> table, td, th { border: 1px solid black; width: 33.3%; text-align: center; background-color: lightblue; border-collapse: collapse; } ...
Java
UTF-8
824
3.453125
3
[]
no_license
/*Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum โ‰ฅ s. If there isn't one, return 0 instead. Example: Input: s = 7, nums = [2,3,1,2,4,3] Output: 2 Explanation: the subarray [4,3] has the minimal length under the problem constraint. Fol...
C
UTF-8
107
2.5625
3
[]
no_license
#include <stdio.h> double putchard(double v) { putchar((char) v); fflush(stdout); return 0; }
JavaScript
UTF-8
672
3.40625
3
[]
no_license
// assume div.json with a pre inside var inJson = document.getElementById("json").textContent; console.log("inJson: "+inJson); // same, assume div.cbor with a pre inside document.getElementById("cbor").insertAdjacentText("beforeend", inJson); var encoded = new Uint8Array(CBOR.encode(inJson)); var hexArray = []; for...
Markdown
UTF-8
4,572
2.625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- title: ะšะปะฐัั CConstantTransition ms.date: 11/04/2016 f1_keywords: - CConstantTransition - AFXANIMATIONCONTROLLER/CConstantTransition - AFXANIMATIONCONTROLLER/CConstantTransition::CConstantTransition - AFXANIMATIONCONTROLLER/CConstantTransition::Create - AFXANIMATIONCONTROLLER/CConstantTransition::m_duration helpvie...
Markdown
UTF-8
18,941
3.171875
3
[ "Apache-2.0" ]
permissive
[TOC] # ็ก…่ฐท - NIO ## Java NIO ็ฎ€ไป‹ ```shell # Java NIO <New IO> ๆ˜ฏไปŽ Java1.4 ็‰ˆๆœฌๅผ€ๅง‹ๅผ•ๅ…ฅ็š„ไธ€ไธชๆ–ฐ็š„IO Api๏ผŒๅฏไปฅๆ›ฟไปฃๆ ‡ๅ‡†็š„ Java IO Apiใ€‚ # NIO ไธŽๅŽŸๆฅ็š„ IO ๆœ‰ๅŒๆ ท็š„ไฝœ็”จๅ’Œ็›ฎ็š„๏ผŒไฝ†ๆ˜ฏไฝฟ็”จ็š„ๆ–นๅผๅฎŒๅ…จไธๅŒ๏ผŒNIO ๆ”ฏๆŒ้ขๅ‘็ผ“ๅ†ฒๅŒบ็š„ใ€ๅŸบไบŽ้€š้“็š„ IO ๆ“ไฝœใ€‚ NIO ๅฐ†ไปฅๆ›ดๅŠ ้ซ˜ๆ•ˆ็š„ๆ–นๅผ่ฟ›่กŒๆ–‡ไปถ็š„่ฏปๅ†™ๆ“ไฝœใ€‚ ``` ## NIO ไธŽ IO ็š„ไธป่ฆๅŒบๅˆซ | IO | NIO | | ------------------------- | ---...
C#
UTF-8
797
2.875
3
[]
no_license
private async Task<string> ProcessRestMethod(string methodName, string parameters) { string result = ""; using (HttpClient httpClient = new HttpClient()) { httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/jso...
Markdown
UTF-8
4,197
3.609375
4
[]
no_license
## LeetCode link(Easy) https://leetcode.com/problems/largest-time-for-given-digits/ ## Keyword DFS, Permutation ## Problem description ``` Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger...
C#
UTF-8
932
3.09375
3
[ "MIT" ]
permissive
๏ปฟusing Asphalt_9_Materials.Annotations; using System; using System.Globalization; using System.Windows.Data; namespace Asphalt_9_Materials.ViewModel.Converters { public class ToLowerCaseConverter : IValueConverter { /// <summary> /// Convert string to lower case. /// </summary> ...
Swift
UTF-8
1,070
2.90625
3
[]
no_license
// // ViewController.swift // TextFieldDelegate // // Created by Hongdonghyun on 2019/12/10. // Copyright ยฉ 2019 hong3. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var myView: UIView! @IBOutlet weak var myTextField: UITextField! override func viewDidLo...
Python
UTF-8
1,506
2.59375
3
[]
no_license
import RPi.GPIO as GPIO import time from firebase_admin import credentials from firebase_admin import firestore from firebase_admin import messaging import firebase_admin cred = credentials.Certificate( "/home/pi/dev/python/temp_server/check-my-temp-5e3d6-firebase-adminsdk-m5rzd-e70cd0a740.json") firebase_admin.in...
Java
UTF-8
137
1.679688
2
[ "Apache-2.0" ]
permissive
package com.aditya.meditrack.services; public class ProductService { private final String TAG=this.getClass().getSimpleName(); }
C#
UTF-8
4,365
3.25
3
[]
no_license
๏ปฟusing System; using ADCode.Lists.ArrayList; using ADCode.Lists.LinkedList; using ADCode.Lists.Queue; using ADCode.Lists.Stack; namespace ADCode.Lists { internal class ListProgram { public ListProgram() { // MyArrayList<int> arrayList = new MyArrayList<int>(4); // ...
PHP
UTF-8
1,034
3.09375
3
[]
no_license
<html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php define("DB_SERVER", "localhost"); define("DB_USER", "root"); define("DB_PASSWORD", ""); define("DB_NAME", "ny_db"); $dbh = new PDO('mysql:dbname=' . DB_NAME . ';host=' ....
Python
UTF-8
1,466
3.625
4
[]
no_license
import clipboard import string import random lower_case = string.ascii_lowercase upper_case = string.ascii_uppercase digits = string.digits symbols = string.punctuation password_length = input("How long do you want your password to be?\n") #colored warning choice = input("""Seperate Using Space Press 1 for lowercase...
Java
UTF-8
1,251
2.1875
2
[]
no_license
package com.felipeska.banking.presenter; import java.util.List; import com.felipeska.banking.interactor.FindHistoryTransactionInteractor; import com.felipeska.banking.interactor.FindHistoryTransactionInteractorImpl; import com.felipeska.banking.listener.OnFinisLoadHistoryTransactionsListener; import com.felipeska.ban...
Java
UTF-8
2,159
2.515625
3
[]
no_license
package com.sitech.paas.javagen.benchmark.interpret; import org.apache.commons.io.IOUtils; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import java.io.IOException; import java.io.OutputStream; import java.io.StringWriter; import java.util.Lis...
Java
UTF-8
5,562
1.640625
2
[]
no_license
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.flipkart.android.utils; import android.content.Context; import android.text.Html; import android.view.LayoutInflater; import android...
Markdown
UTF-8
586
2.6875
3
[]
no_license
# Image Processing With Java ## Introduction In this lecture we continue our tour of cool stuff you can do with Java. This lecture is particularly important because we cover the exact material that will be on your final exam. We are using all we learned about java and computers in general to do a cool trick. We are go...
C
UTF-8
550
2.9375
3
[]
no_license
/************************************************************************* > File Name: F.c > Author: zxw > Mail: > Created Time: 2017ๅนด10ๆœˆ17ๆ—ฅ ๆ˜ŸๆœŸไบŒ 21ๆ—ถ49ๅˆ†07็ง’ ************************************************************************/ #include<stdio.h> #include<string.h> int main(void){ int N; int num; ...
PHP
UTF-8
2,792
3.03125
3
[ "MIT" ]
permissive
<?php namespace Concrete\Package\Sequence\Src\Traits { date_default_timezone_set('UTC'); use Database; use DateTime; use DateTimeZone; /** * Class Persistable * @package Concrete\Package\Sequence\Src\Traits * @todo: Installation test to ensure support for prepersist callbacks! ...
C#
UTF-8
2,440
2.53125
3
[ "MIT" ]
permissive
๏ปฟusing System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using SwiftReflector.Inventory; using SwiftRuntimeLibrary; namespace DylibBinder { internal class InnerX { // This class will be responsible for creating a dictionary // telling us if a TypeDeclaration is on ...
Python
UTF-8
731
3.171875
3
[]
no_license
''' Created on 12-Mar-2018 @author: Titan ''' if __name__ == '__main__': pass import sqlite3 data_person_name = [('Michael', 'Fox'), ('Adam', 'Miller'), ('Andrew', 'Peck'), ('James', 'Shroyer'), ('Eric', 'Burger')] ...
TypeScript
UTF-8
965
2.53125
3
[ "MIT" ]
permissive
import { Body, Get, Controller, Res, Post, Query } from '@nestjs/common'; import { ApiBody } from '@nestjs/swagger'; import { LogoutDto } from '@user/dto/logout.dto'; import { UsersService } from '@user/users.service'; @Controller('User') export class UserController { constructor(private readonly userService: UsersS...
Markdown
UTF-8
1,779
3.078125
3
[]
no_license
# 1931๋ฒˆ ํšŒ์˜์‹ค ๋ฐฐ์ • [๋ฌธ์ œ ๋ณด๋Ÿฌ๊ฐ€๊ธฐ](https://www.acmicpc.net/problem/1931) ๐Ÿšฉ `๊ทธ๋ฆฌ๋””` <br> ## ๐Ÿ…ฐ ์„ค๊ณ„ `[SWEA] 5202-ํ™”๋ฌผ ๋„ํฌ` ๋ž‘ ๋˜‘๊ฐ™์€ ๋ฌธ์ œ์—ฌ์„œ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ํ’€์—ˆ๋‹ค. ์‹œ์ž‘-๋ ์‹œ๊ฐ„์„ ๋ฆฌ์ŠคํŠธ๋กœ ๋ฐ›์€ ๋‹ค์Œ, **๋๋‚˜๋Š” ์‹œ๊ฐ„ ์ˆœ**์œผ๋กœ ์ •๋ ฌํ•œ๋‹ค. ์ „ํšŒ์ฐจ์˜ ๋ ์‹œ๊ฐ„๋ณด๋‹ค ๋‹ค์ŒํšŒ์ฐจ ์‹œ์ž‘ ์‹œ๊ฐ„์ด ๊ฐ™๊ฑฐ๋‚˜ ํฌ๋ฉด ์นด์šดํŒ…์„ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ์‹œ๊ฐ„ ๋•Œ๋ฌธ์— `pop(0)` ์„ ์•ˆํ•˜๊ณ  `pop()` ์„ ํ•˜๊ณ  ์‹ถ์–ด์„œ ๋‚ด๋ฆผ์ฐจ์ˆœ์œผ๋กœ ์ •๋ ฌํ–ˆ๋‹ค. ```python # sorted(a, key=lambda x: (-x[1]...
Python
UTF-8
310
2.984375
3
[]
no_license
#M st="" for r in range(7): for c in range(0,7): if ((c==0)or(c==6)or (r==1 and c!=2 and c!=3 and c!=4) or (r==2 and c!=1 and c!=3 and c!=5 )or(r==3 and c!=1 and c!=2 and c!=4 and c!=5 ) ): st=st+"*" else: st=st+" " st=st+"\n" print(st)
PHP
UTF-8
2,701
2.609375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: alexwinter * Date: 23.08.18 * Time: 18:19 */ namespace Ginero\GineroPhp\Model\Response; use JMS\Serializer\Annotation as Serializer; use Psr\Http\Message\ResponseInterface; /** * Class BaseResponse * @package Ginero\GineroPhp\Model\Response */ abstract class BaseRespo...
Markdown
UTF-8
1,332
2.5625
3
[ "MIT" ]
permissive
# ํƒญ ## ๋ฐ๋ชจ <client-only> <demo-block> <examples-tab-index/> </demo-block> </client-only> ๋‹จ์ˆœํ•˜๋ฉด ์žฌ๋ฏธ๊ฐ€ ์—†์œผ๋ฏ€๋กœ, ํŠธ๋žœ์ง€์…˜์„ ์‚ฌ์šฉํ•ด์„œ ์Šฌ๋ผ์ด๋“œ ํ•˜๊ฒŒ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ## ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ์ฃผ์š” ๊ธฐ๋Šฅ <page-info page="62">ํด๋ž˜์Šค ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉํ•˜๊ธฐ</page-info> <page-info page="64">์—ฌ๋Ÿฌ ์†์„ฑ ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉํ•˜๊ธฐ</page-info> <page-info page="120">์‚ฐ์ถœ ์†์„ฑ(computed)</page-info> <page-info page="146...
Java
UTF-8
678
2.15625
2
[]
no_license
package leapfrog_inc.icchi.Fragment; import android.support.v4.app.Fragment; import android.view.View; import android.view.ViewGroup; /** * Created by Leapfrog-Software on 2018/01/25. */ public class BaseFragment extends Fragment { @Override public void onStart() { super.onStart(); View v...