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
Python
UTF-8
1,723
2.828125
3
[]
no_license
import speech_recognition import pyttsx3 from datetime import date, datetime #Robot nghe robot_ear = speech_recognition.Recognizer() robot_mouth = pyttsx3.init() robot_brain = "" # Test get audio #with speech_recognition.WavFile("output.wav") as source: # use "test.wav" as the audio source # robot_ea...
Java
UTF-8
557
2.46875
2
[]
no_license
package com.logibeat.cloud.common.enumtype; /** * Created by Yujinjun on 2017/2/10. */ public enum EntStatus { Unknown(0, "未知(全部)"), Enter(1, "已入驻"), UnClaim(2,"待认领"), UnEnter(3,"未入驻"); private Integer value; private String description; EntStatus(Integer value, String description) { ...
Java
UTF-8
954
2.328125
2
[]
no_license
package com.bonc.dw3.common.util; import org.apache.hadoop.hbase.client.Get; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List; public class MyThread extends Thread { private static Logger log = LoggerFactory.getLogger(MyThread.class); List<Get> listGet; String tableName;...
TypeScript
UTF-8
386
3.3125
3
[]
no_license
function singleNumbers(nums: number[]): number[] { let res = nums.reduce((prev, curr) => prev ^ curr, 0); let div = 1; while ((res & div) === 0) { div = div << 1; } let a = 0; let b = 0; nums.forEach(num => { if (num & div) { a ^= num } else { b ^= num } }); return [a, b...
Python
UTF-8
389
2.6875
3
[]
no_license
#The number of Class I Drug Recalls issued by # the U.S. Food and Drug Administration since 2012 import requests from bs4 import BeautifulSoup url = 'http://www.fda.gov/Drugs/DrugSafety/DrugRecalls/default.htm' r = requests.get(url) soup = BeautifulSoup(r.content, 'lxml') # Style: display:none appears in every row of ...
C++
UTF-8
2,718
2.578125
3
[ "BSD-2-Clause" ]
permissive
/* * Copyright (c) 2014 Burkhard Ritter * This code is distributed under the two-clause BSD License. */ #ifndef JACKMIDI_HPP #define JACKMIDI_HPP #include <jack/jack.h> #include <jack/midiport.h> template<class MessageQueue> class JackMidi { private: // Can or should I use smart pointers instead? jack_clie...
C++
UTF-8
13,101
2.703125
3
[]
no_license
// // Created by F1 on 5/31/2016. // #include "Skeleton.hpp" int Skeleton::set_fps(float fps) { frame_time = 1.0f / fps; return 1; } int Skeleton::set_default_anim(int anim, int end_type) { if (anim < 0 || anim > anim_count) { LOGE("Error: tried setting animation to %d when only %d animations are...
C#
UTF-8
4,438
2.578125
3
[]
no_license
using Entities; using Microsoft.Practices.EnterpriseLibrary.Data; using Services; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DAL { public class DALBitacoraSQL : DataAccessComponent ...
C#
UTF-8
1,009
2.671875
3
[]
no_license
using System; using System.Configuration; using System.Reflection; using DB.Interface; namespace Reflection { /// <summary> /// 创建对象 /// </summary> public class Factory { private static string IDBHelper = ConfigurationManager.AppSettings["IDBHelperConfig"]; private static string ...
Python
UTF-8
1,222
2.59375
3
[]
no_license
import sys import os FOOD = [] AMBIENCE = [] SERVICE = [] PRICE = [] def main(): if len(sys.argv) != 2: print "USAGE: python basebuilder.py <path to labels folder>" sys.exit(0) for root, _, files in os.walk(sys.argv[1]): for feat_file in files: print 'processing ' + feat...
Python
UTF-8
308
3.65625
4
[]
no_license
import collections class Queue: def __init__(self): self._data = collections.deque() def enqueue(self,x): self._data.append(x) def dequeue(self): return self._data.popleft() def max(self): return max(self._data) q= Queue() q.enqueue(7) q.enqueue(4) q.enqueue(1) q.dequeue() x = q.max() print(x)
JavaScript
UTF-8
1,352
2.75
3
[]
no_license
const Pokego = require('pokemon-go-node-api/pokego'); module.exports = { parseInventory: parseInventory }; function parseInventory (inventory) { inventory = inventory.inventory_delta.inventory_items; return inventory.reduce((inventory, item) => { const pokemon = item.inventory_item_data.pokemon; const b...
Shell
UTF-8
2,477
4.28125
4
[]
no_license
#!/bin/bash # # This script tries to monitor Wireshark fuzz testing, when it finds there's a failure, # - moves the problematic capture file to a tmp directory, and # - restart fuzz testing # It supports several fuzz testing suite so that multiple fuzz testing can run simutaneously. # PROGRAM_NAME=`basename $0` ...
Java
UTF-8
3,940
2.03125
2
[]
no_license
package com.kuaichumen.whistle; import android.app.Application; import android.content.Context; import android.text.TextUtils; import com.google.gson.Gson; import com.igexin.sdk.PushManager; import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache; import com.nostra13.universalimageloader.cache.dis...
Java
UTF-8
1,588
3.5
4
[]
no_license
package algorithm.bubleSort; public class BubleSortPractice { static int [] array={12,3,7,15,21,6,31,19,8,31,5,75,95,101,211,87,35,49,66,78,54}; static void bubleSort(int[] array){ for (int j = array.length-1; j >0; j--) { for (int i = 0; i < j; i++) { if(array[i]>array[i+...
C++
UTF-8
1,811
3.328125
3
[]
no_license
/************************************************************************* > File Name: 括号匹配-3.cpp > Author: dofo-eat > Mail:2354787023@qq.com > Created Time: 2020年02月10日 星期一 19时50分37秒 ************************************************************************/ #include<iostream> #include<stack> #include<string> us...
Go
UTF-8
2,170
2.796875
3
[ "MIT" ]
permissive
package cmd import ( "bytes" "errors" "fmt" "os" "strings" "time" "github.com/a8uhnf/suich/pkg/utils" "github.com/spf13/cobra" ) const ( podInfoNameTitle = "NAME" ) var ( follow = false ) // GetLogsCmd builds the logs cobra command for suich func GetLogsCmd() *cobra.Command { logsCMD := &cobra.Command{ ...
Java
UTF-8
444
1.78125
2
[]
no_license
package com.anirban.myapp.assignment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; /** * Created by me on 6/21/2016. */ public class RelativeLayoutClass extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle s...
Python
UTF-8
396
2.9375
3
[ "MIT" ]
permissive
from nan_value_filler.classes.nan_filler.nan_filler import NanFiller class FillWithZero(NanFiller): def __init__(self): super().__init__() self.name = "fill_with_zero" def fill_nan_values(self, data_set_info, filling_column_name): data_set_info.data_set[filling_column_name] = data_set...
Markdown
UTF-8
1,411
2.53125
3
[]
no_license
# Fnorder ## Description An implementation of Steve Jackson Games' Fnorder. Fnorder generates messages from the Illuminati to use in your application. This project produces a .DLL to be used by other applications. Some more information about Fnorder as well as a compiled copy of the complete WinFnord application (as ...
C#
UTF-8
1,233
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NeuralNetwork { class Program { static void Main(string[] args) { List<Matrix> l = new List<Matrix> (); double[,] ar = new double[,] { { 1 }, { 0 }, { 1 } }; doubl...
Rust
UTF-8
1,566
2.921875
3
[]
no_license
use chrono::{offset::Local, Duration, NaiveDateTime}; use console::Term; pub struct Schedule { text: String, datetime: NaiveDateTime, } impl Schedule { pub fn new() -> Self { Self { text: String::from( "\ ------------------ 01 08:30 -- 09:15 02 09:20 -- 10:05 --------...
Python
UTF-8
16,288
2.6875
3
[ "MIT" ]
permissive
# -*- coding: utf-8 -*- """swim - a simple, no-frills web crawler. In a nutshell: you seed it with a bunch of URLs, you give it a function that extracts more URLs from the HTTP responses, and swim does the rest. Noticeable features are: - multithreaded, possibility to enable rate limiting - kill the crawler and resum...
Python
UTF-8
4,855
2.828125
3
[]
no_license
import algorithm import click import random import time from multiprocessing import Pool import numpy as np from itertools import product initial_list = [300] # number of initial nodes connectivity_list = [0.025, 0.05, 0.1, 0.20] nops_list = [500] initial_terminals_list = [40] fquery_list = [0.1, 0.2, 0.3, 0.4, 0.5, ...
Ruby
UTF-8
1,101
2.53125
3
[]
no_license
require "selenium-webdriver" require 'xdo/keyboard' require 'xdo/mouse' require 'xdo/xwindow' driver = Selenium::WebDriver.for :chrome driver.manage().window().maximize() # Acessing the Discord page driver.navigate.to "https://discord.com/" # Clicking the button that leads to login page login = driver.find_element(x...
C++
UTF-8
1,210
2.578125
3
[]
no_license
#include "enginecryptographichashing.h" EngineCryptographicHashing::EngineCryptographicHashing() { } // Calculate md5 for chunks indexing. QString EngineCryptographicHashing::calculateHash(QByteArray chunk_stream) { QCryptographicHash crypto(QCryptographicHash::Md5); crypto.addData(chunk_stream); ...
Java
UTF-8
148
1.710938
2
[]
no_license
package com.niit.cdstack.service; import com.niit.cdstack.model.UserRoles; public interface UserRoleService { void addUserRoles(UserRoles ur); }
Markdown
UTF-8
2,613
3.015625
3
[]
no_license
# Google Kubernetes Kubernetes is a container orchestration system that helps deploy and manage containerised applications. ## The Kubernetes Cluster Kubernetes cluster is a set of node machines for running containerised applications. At a minimum, a cluster contains a control plane and one or more worker nodes. ## ...
Python
UTF-8
767
2.921875
3
[]
no_license
from matplotlib.pylab import scatter,text,show,cm,figure from matplotlib.pylab import subplot,imshow,NullLocator from sklearn import manifold, datasets # load the digits dataset # 901 samples, about 180 samples per class # the digits represented 0,1,2,3,4 digits = datasets.load_digits(n_class=5) X = digits.data color ...
C++
UTF-8
440
2.53125
3
[]
no_license
#include <iostream> #include <vector> using namespace std; bool got[2000001]; int M[2000001]; int main() { int n; vector<int> A; cin >> n; A.resize(n); for(int i=0;i<n;i++) cin >> A[i], got[A[i]]=1; for(int i=0;i<=2000000;i++) if(got[i]) M[i] = i; else M[i] = M[i-1]; int m=0; for(int i=2;i<=1...
C#
UTF-8
2,048
2.921875
3
[ "MIT" ]
permissive
using System; using System.Collections.Generic; namespace HatcheryManagement { class DbHatchery { public List<RuiFish> ruiList = new List<RuiFish>(); public List<KatlaFish> katlaList = new List<KatlaFish>(); public List<IlishFish> ilishList = new List<IlishFish>(); private stat...
C++
UTF-8
3,095
2.703125
3
[ "CC-BY-SA-4.0", "MIT" ]
permissive
#ifdef UVW_AS_LIB # include "loop.h" #endif #include "config.h" namespace uvw { UVW_INLINE Loop::Loop(std::unique_ptr<uv_loop_t, Deleter> ptr) noexcept : loop{std::move(ptr)} {} UVW_INLINE std::shared_ptr<Loop> Loop::create() { auto ptr = std::unique_ptr<uv_loop_t, Deleter>{new uv_loop_t, [](uv_loop_t *l...
JavaScript
UTF-8
671
4.34375
4
[]
no_license
//Array-plus-array https://www.codewars.com/kata/5a2be17aee1aaefe2a000151/train/javascript //description: I want to get the sum of two arrays...actually the sum of all their elements function arrayPlusArray(arr1, arr2) { return arr1.reduce((acc, num) => acc + num) + arr2.reduce((acc, num) => acc + num) } let a...
JavaScript
UTF-8
1,245
2.59375
3
[]
no_license
module.exports = { getHouses: (req, res) => { // console.log(req) const db =req.app.get('db') // console.log(db) db.get_houses().then( results => { res.status(200).send(results) }).catch(er => { console.log(er) res.status(500).send('Cannot ...
C++
UTF-8
16,481
2.828125
3
[]
no_license
#include "long.h" void longz_init(longz_ptr rec) { rec->length = 0; rec->number = new unsigned char[LONGZSIZE]; } void longz_clear(longz_ptr rec) { delete rec->number; } void longz_cpy(longz_ptr rec, longz source) { rec->length = source->length; for(unsigned int i = 0; i < rec->length; i++) ...
Markdown
UTF-8
1,368
3
3
[]
no_license
## 第三章 开关的进化——从机械到芯片 错误: | 页码 | 具体位置 | 原内容 | 修改后的内容 | 贡献者 | | ---- | ---------------------- | ------ | ------------ | ------ | | P171 | 右下 | 模拟电路计算机 |“模” 字应加颜色 | | |P187 | 左下 |pMOS本身的电阻变得较小 | pMOS改成nMOS | | | P197 | 右上 |N材料去 | N材料区 | | |P221|右下倒数第三行|视逻辑不通|视逻辑不同| | P235 | 右上 | 路基1 | 逻辑1 | | | P238...
Python
UTF-8
198
4.03125
4
[]
no_license
#题目:输入三个整数x,y,z,请把这三个数由小到大输出 m=input('输入三个整数,用空格键分开:\n') list=m.split(' ') list=sorted(list) for i in list: print(int(i))
Java
UTF-8
1,026
1.789063
2
[]
no_license
/** * */ package com.tour.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import com.tour.entity.HashTag; import com.tour.entity.TravelStory; /** * @author Ram...
JavaScript
UTF-8
362
3.453125
3
[]
no_license
function unite(arr1, arr2, arr3) { var masterArray = []; for (var i = 0; i < arguments.length; i++) { masterArray.push(arguments[i]); } return masterArray.reduce(function(a, b) { for (i = 0; i < b.length; i++) { if (a.indexOf(b[i]) == -1) { a.push(b[i]); } } return a; }); }...
JavaScript
UTF-8
28,004
2.84375
3
[]
no_license
/** * 结算价格 */ function clearingTab(price, type) { console.info("jiesuanTab") var zongshuTab = parseInt($("#zShu").html()); // 获取购物车菜品总数,购物车上的红数字 var allPrice = parseFloat($(".allprice").html()); // 获取购物车菜品总价,页面下方的合计价格 // 增加按钮 if (type == "add") { zongshuTab++; allPrice +=...
C++
UTF-8
888
2.875
3
[ "MIT" ]
permissive
#pragma once #include "../test_helper.h" #include <sstream> #include "vega/manipulators/signed_long_manipulator.h" #include "vega/dicom/data_element.h" using namespace vega; using namespace vega::manipulators; TEST(SignedLongManipulatorTest, constructor_test) { SignedLongManipulator manipulator{}; manipulator....
Java
UTF-8
6,751
2.046875
2
[]
no_license
package com.huatek.framework.show; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; impo...
Markdown
UTF-8
6,376
2.609375
3
[]
no_license
# Feature Extracion ## class Data Class for manipulating the data and extracting characteristics. ### Attributes There are two types of public attributes: 1) __storage attributes__ - their purpose is simply to store data of the matches. To reiterate, we are not only storing the incremental data, that are in the inpu...
Java
UTF-8
563
2.78125
3
[ "Apache-2.0" ]
permissive
package com.wendy.thread.schedule; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicLong; public class ThreadFactoryImpl implements ThreadFactory { private final AtomicLong threadIndex = new AtomicLong(0); private final String threadNamePrefix ; public ThreadFactory...
Python
UTF-8
7,108
2.90625
3
[]
no_license
from random import random import gym from entities import * class PokerEnv(gym.Env): metadata = {'render.modes': ['human']} def __init__(self, num_of_chips, lose_punishment, deal_cards=True, randomize_chips=None): self.gm = None self.lp = lose_punishment self.dc = deal_cards ...
Markdown
UTF-8
12,807
3.359375
3
[]
no_license
includes ``` // 63: String - `includes()` // To do: make all tests pass, leave the assert lines unchanged! // Follow the hints of the failure messages! describe('`string.includes()` determines if a string can be found inside another one', function() { describe('finding a single character', function() { it('can ...
C++
UTF-8
1,452
2.546875
3
[]
no_license
#pragma once #include "Fonts.h" typedef unsigned char Pixel; /*#define LCD_SIZE (160*43*1) #define LCD_W (160) #define LCD_H (43) #define LCD_P (160)*/ #define PIXEL_ON (128) #define PIXEL_OFF (0) class Surface { int m_Width, m_Height, m_Pitch; Pixel* m_Buffer; lgLcdBitmap160x43x1* m_bmp; ...
C#
UTF-8
1,480
3.328125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Interviews.OODesign { public class Othello { private SpaceType[,] _grid; public void NewGame(int length) { if (length % 2 != 0) { ...
C#
UTF-8
1,270
2.53125
3
[ "MIT" ]
permissive
// * // * Copyright (C) 2005 Mats Helander : http://www.puzzleframework.com // * // * This library is free software; you can redistribute it and/or modify it // * under the terms of the GNU Lesser General Public License 2.1 or later, as // * published by the Free Software Foundation. See the included license.txt // * o...
Java
UTF-8
1,918
1.867188
2
[]
no_license
package com.tinder.api.module; import com.tinder.api.APIHeaderInterceptor; import dagger.internal.C15521i; import dagger.internal.Factory; import javax.inject.Provider; import okhttp3.C17692o; public final class LegacyNetworkModule_ProvideAuthHeadersOkHttpClientFactory implements Factory<C17692o> { private final ...
Java
UTF-8
2,537
2.640625
3
[]
no_license
package com.boot.example; import org.apache.curator.framework.CuratorFramework; import org.apache.zookeeper.data.Stat; import org.junit.jupiter.api.Test; import java.util.List; /** * com.boot.example.CuratorTest1 * * @author lipeng * @date 2019-04-29 14:53 */ public class CuratorTest { @Test public voi...
Markdown
UTF-8
905
2.59375
3
[]
no_license
--- title: All Cryptos as API date: 2018-01-22 12:00:00 +0100 subtitle: 22nd January, 2018 style: blue cover: cover.png categories: Tutorials tags: [tutorial, scaping, jquery, crypto, runkit] --- **Update:** it turns out there is a public [API](https://coinmarketcap.com/api/) on Coinmarketcap.com I didn't find out bef...
Markdown
UTF-8
6,122
2.59375
3
[ "Apache-2.0" ]
permissive
--- title: SEO - Mejorar el tiempo de carga de una web description: El tiempo de carga es un factor clave para las estrategias de posicionamiento web image: https://emirodgar.com/cdn/images/og/marketing-digital.png layout: emirodgar_post date: 19/05/2021 author: Emirodgar lang: es_ES sitemap: 1 feed: 1 folder: seo perm...
Shell
UTF-8
1,110
2.953125
3
[]
no_license
#!/bin/bash set -e -x # copy needed files from pdf.js mkdir -p build/pdf.js if [[ $PRODUCTION = 1 ]]; then cp -r pdf.js/build/minified/* build/pdf.js/; else cp -r pdf.js/build/generic/* build/pdf.js/; fi # copy assets cp -r www/* build/ # download required JS mkdir -p build/static/js pushd . && cd build/static/j...
Markdown
UTF-8
2,087
2.875
3
[ "MIT" ]
permissive
# Github-connect Is the app that quantifies your contributions to the open-source world, helps you engage with other projects and bake new project ideas. You can try out the app at [http://github-connect.herokuapp.com](http://github-connect.herokuapp.com/). This is still in beta, so your [feedback](http://github-con...
Go
UTF-8
1,375
2.984375
3
[ "BSD-3-Clause" ]
permissive
package screenshot import ( "fmt" "io/ioutil" "time" "github.com/chromedp/chromedp" "github.com/muraenateam/necrobrowser/action" ) const ( // Name of this action Name = "Screenshot" // Description of this action Description = "Screenshot takes a picture of the screen at the given URL" ) // Screenshot is ...
Python
UTF-8
733
2.859375
3
[]
no_license
import itertools import cipher_common as cc def single_xor_cipher_decode(bytes_): res = bytes() min_chi2 = float('inf') key = None # for byte in bytes(string.printable, encoding='ascii'): for byte in range(256): # xor the string str_xor = cc.bytes_xor(bytes_, [byte]) # c...
Java
ISO-8859-13
2,847
2.25
2
[]
no_license
package it.unisalento.view.Panels; import it.unisalento.view.Models.ButtonColumn; import it.unisalento.view.Models.LibriTableModel; import javax.swing.JScrollPane; import javax.swing.JTable; public class LibriJPanJTab { private JScrollPane panel; private JTable tab; private static LibriTableModel mo...
Ruby
UTF-8
332
3.296875
3
[]
no_license
def PermutationStep(num) num_array = num.to_s.split('') permutation_array = num_array.permutation.to_a permutation_array.sort! final_array = [] permutation_array.each do |combo| final_array << combo.join end permutation_array.clear index = final_array.index(num.to_s) p final_array[index + 1] end Permutatio...
TypeScript
UTF-8
948
2.53125
3
[]
no_license
import { Controller, Post, Body } from '@nestjs/common'; import { CalcProfitabilityDto } from '../dto/calculator.dto'; import { CalculatorService } from '../services/calculator.service'; import { MinerTypesService } from "../../admin/modules/miner-types/services"; import { APISuccess, APIError } from '../../../helpers'...
C++
UTF-8
1,551
2.765625
3
[]
no_license
// // Feature17.cpp // Created by Claudia Rodriguez-Schroeder on 1/22/20. #include "Feature17.h" Feature17::Feature17() { set_name("\033[1;31mMirror\033[0m"); set_desc("There is a \033[1;31mmirror\033[0m in the bathroom and there is writing on the \033[1;31mmirror\033[0m. "); set_desc_no_obj(get_desc()); set_inde...
C++
UTF-8
13,692
2.859375
3
[]
no_license
#include "advent2019.h" // Day 18: Many-Worlds Interpretation /* Use the maze's tree structure to simplify the problem as much * as possible, then solve using heuristic best-first search. * Part 1 and Part 2 have different admissible tree reductions, * and are optimized separately. */ using mask_t = uint32_t; c...
JavaScript
UTF-8
1,115
2.5625
3
[]
no_license
import { FETCH_SEARCHED_BOOK, DATA_LOADING, FETCH_BOOK_DETAILS, NO_RESULT_FOUND } from "./../actions/types" const initialState = { books: [], book: {}, loading: false, foundResults: null } export const SearchForBooksReducer = (state = initialState, action) => { switch (action.typ...
Markdown
UTF-8
4,986
2.71875
3
[ "Apache-2.0" ]
permissive
PhoneHome ========= Installation ------------- This is an Android library project. To use it: 1. Download the library. 2. [Add it as an existing project](http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-importproject.htm) in Eclipse. 3. In your project settings, select Pr...
Java
UTF-8
2,417
3.296875
3
[]
no_license
package sudoku; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; public class Sudoku { private Case[][] grille; private BooleanProperty finished; public Sudoku(String filename)...
C#
UTF-8
7,674
2.75
3
[]
no_license
using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Web.MVC.Infrastructure.Interfaces; namespace Web.MVC.Infrastructure.Implementations { public sealed class RestClient...
Java
UTF-8
16,436
1.796875
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.sirelab.controller.administrarusuarios; import com.sirelab.bo.interfacebo.usuarios.AdministrarAdministradoresEdific...
C++
UTF-8
2,130
3.3125
3
[]
no_license
#include "HuffmanCode.h" #include <fstream> #include <iostream> using namespace std; /** * Title : Heaps and AVL Trees * Author : Munib Emre Sevilgen * ID: 21602416 * Section : 1 * Assignment : 3 * Description : Main function */ int main(){ char* characters = new char[100]; int* freqs = new int[100]; in...
JavaScript
UTF-8
2,240
2.578125
3
[]
no_license
/******************************************************************************\ * @file api/controllers/controller.premise.js * @description premise controller * @author Tyler Yasaka \******************************************************************************/ var ASYNC = require('async'); var LIB = require('....
Markdown
UTF-8
2,778
3.3125
3
[ "MIT" ]
permissive
--- title: "PrysmJs Syntax Highlighter" date: "12-29-2019" order: 1 --- Install the following ```js npm install --save gatsby-transformer-remark gatsby-remark-prismjs prismjs ``` <br> <br> Include gatsby styles in gatsby-browser.js ```js //in gatsby-browser.js require("prismjs/themes/prism-okaidia.css") require("pris...
Java
UTF-8
329
1.960938
2
[]
no_license
package com.mk.shoppingbackend.dao; import java.util.List; import com.mk.shoppingbackend.dto.Products; public interface ProductsDAO { Products get(int id); List<Products> list(); boolean add(Products products); boolean update(Products products); void delete(int id); Products getProduct(int i...
Java
UTF-8
1,233
2.21875
2
[]
no_license
package hznj.com.zhongcexiangjiao.doman; import java.util.List; /** * Description: * Copyright : Copyright (c) 2016 * Company : 传智播客 * Author : 隔壁小张 * Date : 2017/4/13 16:29 */ public class zhaopianBean { /** * list : [{"PICURL":"http://171.188.42.56:8081/app/XrayImages/XrayPic.bmp"}] ...
Markdown
UTF-8
651
2.53125
3
[ "BSD-3-Clause" ]
permissive
# Climate Index Download and visulize climate indices from NOAA website http://www.esrl.noaa.gov/psd/gcos_wgsp/Timeseries/ ## Major APIs: * `print_database()`: print information of the available climate indices (e.g. long_name, url). * `get_climate_index(climate_index_name=None)`: get the climate index as a pandas Ser...
Shell
UTF-8
208
2.59375
3
[]
no_license
echo ########repace for android 4.43############# for file in `find -name "project.properties"` do mv $file $file.bak more $file.bak | sed 's@target=android-15@target=android-18@g' > $file rm $file.bak done
Markdown
UTF-8
1,417
2.53125
3
[ "Apache-2.0" ]
permissive
文件同步是 Nocalhost 进入`开发模式`的一项重要功能,只有在启用`开发模式`时才会启用,他是实现本地和远程文件自动同步的关键。它将根据配置或命令建立从本地到开发容器的隧道,并传输文件。 您可以通过`ntctl`使用它: ``` nhctl sync [application_name]] [参数] ``` 参数: ``` -m,-daemon 布尔值,默认为 true,文件同步作为守护程序运行 -d,--deployment 字符串,进入开发环境的工作负载名称 -b,--double 布尔值,默认为 false,单向同步 全局参数: --debug 启用调试级别日志 ...
Java
UTF-8
8,650
2.40625
2
[]
no_license
package ai.libs.jaicore.search.algorithms.standard.uncertainty.explorationexploitationsearch; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.List; import java.util.PriorityQueue; import java.util.Queue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; im...
PHP
UTF-8
13,812
2.609375
3
[ "Apache-2.0" ]
permissive
<?php namespace Svea\WebPay\HostedService\Helper; use Svea\WebPay\Helper\Helper; use Svea\WebPay\BuildOrder\CreateOrderBuilder; use Svea\WebPay\HostedService\Payment\HostedPayment; use XMLWriter; /** * Formats request xml in preparation of sending request to hosted webservice. * * These methods writes requests to...
Java
UTF-8
7,231
1.710938
2
[]
no_license
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
Rust
UTF-8
1,990
3.015625
3
[]
no_license
// Speeds achieved on my machine: // Building lookup table: 3.8m/s // Searching for collision: 9.6m/s // Eventually finds, after ~1,050,000,000 attempts: // COLLISION! // Encrypting 'weakhash' with A425CEC20 then with 6EECEC66A gives DA99D1EA64144F3E use std::sync::Arc; use weakhash_rs::mitm; fn main() { let l...
JavaScript
UTF-8
1,079
3.625
4
[]
no_license
// Notes: // 1) Parsing time would be much easier and well-done with // something like moment.js. const {askUser, handleError} = require('../helpers'); const questions = ['Que horas são? (ex.: 14 horas e 37 minutos)']; const hoursAndMinutes = /(0\d|1\d|2[0-3]) horas e (0\d|[12345]\d) minutos/; const millisecondsTo...
Python
UTF-8
1,118
3.34375
3
[ "MIT" ]
permissive
""" Contains the definition of Line. """ from xdtools.utils import Point from xdtools.artwork import Artwork class Line(Artwork): """ A Line. === Attributes === name - The name of this Line as it appears in the Layers panel. uid - The unique id of this Line. position - The position of this Line...
TypeScript
UTF-8
786
2.75
3
[ "Apache-2.0" ]
permissive
/* eslint-disable no-unused-expressions */ // @ts-nocheck import { expect } from 'chai' import { P_TYPE, P_VALUE } from './constants' import { NBTTypes, tagLong } from '../src' describe('l2nbt.js - tagLong', () => { it('basic', () => { const tag = tagLong(1) expect(tag).to.have.property(P_TYPE, NBTTypes...
C++
UTF-8
8,301
2.90625
3
[]
no_license
/* * convert.hh * * Created on: 25 juin 2010 * Author: rnouacer */ #ifndef CONVERT_HH_ #define CONVERT_HH_ #include <stdint.h> #include <stdlib.h> #include <iostream> #include <sstream> #include <string> #include <vector> #include <typeinfo> #include <stdexcept> #include <map> #include <unisim/util/endia...
Java
UTF-8
229
2.25
2
[]
no_license
package voorbeelden; public class Oef5 { public static void main(String[] args) { int getal1, getal2; getal1 = 2147483645; getal2 = 2147483642; long getal3 = (long)getal1 * getal2; System.out.println(getal3); } }
Markdown
UTF-8
3,206
3.125
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
Jaxon Library for CodeIgniter ============================= This package integrates the [Jaxon library](https://github.com/jaxon-php/jaxon-core) into the CodeIgniter 3 framework. Features -------- - Read Jaxon options from a file in CodeIgniter config format. - Automatically register Jaxon classes from a preset dire...
Swift
UTF-8
4,111
4.59375
5
[]
no_license
//: Playground - noun: a place where people can play import UIKit // 常量 字符串 let label = "the width is" let width = 94 let widthLabel = label + String(width) let apples = 3 let oranges = 5 let appleSummary = "I have \(apples) apples." let fruitSummary = "I have \(apples + oranges) pieces of fruit." // 数组 var shoppin...
Java
UTF-8
1,533
2.078125
2
[]
no_license
package com.michael.qrcode.qrcode.camera; import android.graphics.Point; import android.graphics.Rect; import android.hardware.Camera; import android.util.Log; import com.michael.qrcode.qrcode.decode.Decoder; import com.michael.qrcode.qrcode.scan.BarcodeScanner; /** * Created with IntelliJ IDEA. * User: di.zhang *...
Markdown
UTF-8
3,305
2.796875
3
[]
no_license
--- layout: post title: november meeting news date: 2021-11-29 19:00:00 description: news from our November 2021 Meeting. --- A simple evening for us, and the last of the year/season. Having had the presentation, a couple of competitions, the results of the years competition winners will be announced in the January M...
C++
UTF-8
1,347
3.09375
3
[]
no_license
#include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { //freopen("input.txt", "r", stdin); char word[25], empty[25]; string s = ""; scanf("%[^A-Za-z]", empty); while(scanf("%[A-Za-z]", word) != EOF) { scanf("%[^A-Za-z]", empty); //printf("%s\n", ...
Java
UTF-8
833
2.34375
2
[]
no_license
package org.sirius.transport.api.channel; import java.util.List; import org.sirius.transport.api.UnresolvedAddress; /* * 管理具有相同地址的{@link Channel} */ public interface ChannelGroup { UnresolvedAddress remoteAddress(); UnresolvedAddress localAddress(); void setLocalAddress(UnresolvedAddress lo...
TypeScript
UTF-8
1,549
2.5625
3
[]
no_license
import jwt from "jsonwebtoken"; import errHandler from "./errHandler"; import fs from 'fs' export async function jwtSignIn(objPayload, objOption) { try { /**Dev mode */ //let strKey = await fs.readFileSync(__dirname + '/config/private.key', 'utf-8'); /**Prod Mode */ let strKey = await fs.readFileSync(...
Python
UTF-8
2,213
2.53125
3
[]
no_license
from flask import request from flask_restx import Resource from app.main.service.menu_service import MenuService from app.main.util.decorator import owner_token_required from app.main.util.dto import MenuDto api = MenuDto.api _create_menu = MenuDto.add_menu _update_menu = MenuDto.update_menu _get_menu = MenuDto.get_m...
C++
UTF-8
3,919
2.703125
3
[]
no_license
#include "include/Model/ConsoleModel.h" ConsoleModel::ConsoleModel(QSettings *settings, QObject *parent): QAbstractTableModel(parent), m_settings(settings){ this->reload(); if(m_consoles.size() == 0){ this->defaultInit(); } } ConsoleModel::~ConsoleModel(){ for(QList<Console*>::iterator...
C++
UTF-8
3,413
2.5625
3
[ "MIT" ]
permissive
#include "jsonreader.h" #include "ifile.h" #include <boost/assert.hpp> #include "boost/algorithm/string/predicate.hpp" // namespace platform { namespace Json { bool GetStr( Json::Value const& V, std::string& O ) { if( !V.isString() ) { return false; } O = V.asString(); return !O.empty(); ...
Java
UTF-8
4,784
2.09375
2
[ "Apache-2.0" ]
permissive
/* * Copyright 2015-2022 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Python
UTF-8
737
4.03125
4
[]
no_license
class Solution: def isPalindrome(self, x): a = [] if x < 0: return False else: while (x > 0): remainder = x % 10 x = x // 10 a.append(remainder) if a == a[::-1]: return True else: ...
JavaScript
UTF-8
366
2.640625
3
[]
no_license
class Chain{ constructor(bodyA,bodyB){ var options={ bodyA: bodyA, bodyB:bodyB, stiffness:0.04, length:10 } this.chain=Constraint.create(options) World.add(world,chain) } display(){ var pointA=this.chain.bodyA.position var pointB=this.chain.bodyB.position strokeWeight(3) line(pointA.x,poi...
C++
UTF-8
777
3.40625
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; class MyObj { int width; int height; float price; public: MyObj() { set(0, 0, 0); } MyObj(int w, int h, float p) { set(w, h, p); } void set(int w, int h, float p) { width = w; ...
Java
UTF-8
3,719
2.75
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 model.dao.mySQLJDBCImpl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java...
Rust
UTF-8
1,975
2.71875
3
[ "MIT", "NCSA" ]
permissive
use std::fmt; use libc; use llvm_sys::prelude::*; use llvm_sys::core as llvm; use super::*; // No `Drop` impl is needed as this is disposed of when the associated context is disposed #[derive(Debug)] pub struct Module { pub ptr: LLVMModuleRef } impl_llvm_ref!(Module, LLVMModuleRef); impl Module { pub fn du...