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
Markdown
UTF-8
4,495
3.046875
3
[]
no_license
--- description: Свойство flex-basis определяет основу флекса, которая является начальным размером элемента --- # flex-basis Свойство **`flex-basis`** определяет основу флекса, которая является начальным размером элемента. Похоже на свойства [`width`](width.md) и [`height`](height.md), к которым добавляется содержим...
Java
UTF-8
2,528
2.140625
2
[]
no_license
package com.pb.riskanalysisforsmb.activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.ExpandableListAdapter; import android.widget.ExpandableListView; import com.pb.riskanalysi...
Go
UTF-8
2,308
2.75
3
[ "Apache-2.0" ]
permissive
package trie import ( "fmt" "github.com/iotaledger/wasp/packages/kv/codec" ) type Refcounts struct { nodes KVStore values KVStore } func newRefcounts(store KVStore) *Refcounts { return &Refcounts{ nodes: makeKVStorePartition(store, partitionRefcountNodes), values: makeKVStorePartition(store, partitionRef...
C++
UTF-8
673
2.953125
3
[]
no_license
#include <stdio.h> #define MAX 100 void swap(int &a, int &b) { int temp = a; a = b; b = temp; } void hienmang(int a[], int n) { int i; for(i = 0; i < n; i++) { printf("%d\t", a[i]); } } void sapxepnoibot(int a[], int &n) { int kt; int i,j; for (i = 0; i < n - 1; i++) { kt = 0; for(j = 0...
C++
UTF-8
4,514
3.03125
3
[]
no_license
#include "GameObject.h" #include "TextureManager.h" GameObject::GameObject(TextureType Type, const sf::Vector2f& Position, std::shared_ptr<SoundManager> SoundManager, std::shared_ptr<TextureManager> TextureManager) : m_Position(Position), m_Velocity(sf::Vector2f(0.0f, 0.0f)), m_Accel(sf::Vector2f(0.0f, 0.0f)), m_A...
Markdown
UTF-8
8,553
3.671875
4
[ "MIT" ]
permissive
> Hadoop中,键值对是最基本的操作对象。同样,Spark中,针对键值对类型的RDD有非常丰富的API可以被调用。利用这些API,可以比Hadoop更方便地完成大数据任务。 ## 1. 创建Pair RDD 创建Pair RDD的方法是让RDD中的每一项都是包含两个元素的tuple。前一个元素会被当成Key,后一个元素会被当成value。 ``` val pairs = sc.parallelize(List((1, 1), (2, 3))) ``` 另外,通过map操作生成tuple也是一种很常见的做法。 ```scala val pairs = lines.map(x => (x.split(" ")(0), x))...
Java
UTF-8
140
2.5
2
[]
no_license
package animals; public class Frog extends Animal { @Override protected String produceSound() { return "Frogggg"; } }
Ruby
UTF-8
1,083
2.765625
3
[ "BSD-3-Clause" ]
permissive
module Spree module Stock class Prioritizer attr_reader :packages, :order def initialize(order, packages, adjuster_class=Adjuster) @order = order @packages = packages @adjuster_class = adjuster_class end def prioritized_packages sort_packages adjus...
C++
UTF-8
3,364
2.9375
3
[]
no_license
//============================================================================ // Name : inverted.cpp // Author : Baoxing Li // Version : // Copyright : bl251@uowmail.edu.au / sID: 5083497 // Description : inverted in C++, Ansi-style //==================================================================...
Java
UTF-8
6,205
2.296875
2
[]
no_license
import java.awt.Graphics2D; import java.awt.image.BufferedImage; import static java.awt.image.BufferedImage.TYPE_INT_ARGB; import static java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io...
Shell
UTF-8
2,599
3.84375
4
[ "Apache-2.0" ]
permissive
#!/bin/bash # Copyright 2019 Cloudera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by appl...
JavaScript
UTF-8
103
3.140625
3
[]
no_license
let numbers = [1,2,3,4,5,6,]; let doubled = numbers.map((number) => number * 2); console.log(doubled);
Java
UTF-8
13,493
2.46875
2
[ "Apache-2.0" ]
permissive
/** */ package housebuilderV2.util; import housebuilderV2.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; /** * <!-- begin-user-doc --> * The <b>Switch</b> for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EOb...
Java
UTF-8
984
2.40625
2
[]
no_license
package com.trojanmd.domain; import javax.persistence.*; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Date; @Entity public class Membership { @Id @GeneratedValue private Long id; @Temporal(TemporalType.DATE) private Date beginTime; @Temporal(TemporalType.DATE) ...
PHP
UTF-8
2,033
2.921875
3
[ "MIT" ]
permissive
<?php /** * Fuel is a fast, lightweight, community driven PHP 5.4+ framework. * * @package Fuel * @version 1.8.2 * @author Fuel Development Team * @license MIT License * @copyright 2010 - 2019 Fuel Development Team * @copyright 2008 - 2009 Kohana Team * @link https://fuelphp.com */ names...
C++
UTF-8
1,928
2.625
3
[]
no_license
#include "thFont.h" #include "thWindow.h" thFont::thFont( thWindow & a_Parent) : m_Parent( a_Parent) { } thFont::~thFont() { if ( m_sFont) { BOOL fResult = DeleteObject( m_sFont); if ( TRUE != fResult) { MSG_ERROR( TEXT( "DeleteObject failed with error = 0x%X"), Ge...
C
GB18030
1,671
3.8125
4
[]
no_license
#include <stdio.h> #include "../../../Algorithms/01_abstract/Status.h" //**01_abstract**// #include "../../../Algorithms/06_tree_binaryTree/07 ChildSiblingTree/ChildSiblingTree.c" //**06 Ͷ**// /* Funcԭ */ void Algo_6_71_1(CSTree T, int i); void Algo_6_71_2(CSTree T, int i); int main(int argc, char *argv[]) { C...
Markdown
UTF-8
3,630
3.5
4
[]
no_license
## ConcurrentHashMap ## Fork/Join 框架 Fork/Join框架是Java 7提供的一个用于并发执行任务的框架。 Fork/Joing框架可以把一个大任务分割成若干个小任务,最终汇总每一个小人物结果得到大人物结果 ### 1.工作窃取算法 工作窃取算法是指某个线程从其他队列里窃取任务来进行。 将任务分割成若干个子任务,将这些子任务分别放到不同的队列里,并为每个队列创建一个单独的线程来执行队列里的任务。 这个线程每次都从队首获取任务执行。 如果某个子任务队列,其线程执行完了这个队列里的所有任务,它就会去其他线程的队列里窃取一个任务来执行,从这个队列的尾部获取任务执行。 **优点...
Python
UTF-8
1,246
3.21875
3
[]
no_license
import timeit from random import randint, shuffle import matplotlib.pyplot as plt def geraLista(tam): lista = list(range(1, tam + 1)) shuffle(lista) return lista def desenhaGrafico(x,lista1,xl = "Entradas", yl = "Y",name="out", label1 = "Lista 1", label2 = "Lista 2"): fig = plt.figure(figsize=(...
Python
UTF-8
5,239
2.9375
3
[]
no_license
from selenium import webdriver from selenium.webdriver.chrome.options import Options from time import sleep import csv from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import ElementClickInterceptedException class Tag():#用于保存计数好的标签 '''标签类''' def __init__(self,dic = {}): ...
Java
UTF-8
778
1.875
2
[]
no_license
package com.ayc.service.app.dao.mapper; import com.ayc.framework.dao.IBaseMapper; import com.ayc.service.app.entity.QuestionEntity; import com.ayc.service.app.entity.QuestionEntityWithBLOBs; import java.util.List; public interface QuestionEntityMapper extends IBaseMapper { int deleteByPrimaryKey(Integer id); ...
Java
UTF-8
113
1.90625
2
[]
no_license
package homework.Unit2.Task3.interfaces; public interface CanErase extends OfficeSupplies { void erase(); }
Java
UTF-8
1,688
3.625
4
[]
no_license
package Offer; /**复杂链表的额复制 * 输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针指向任意一个节点),返回结果为复制后复杂链表的head。(注意,输出结果中请不要返回参数中的节点引用,否则判题程序会直接返回空) */ public class ReplicationOfComplexLinkedList { public class RandomListNode { int label; RandomListNode next = null; RandomListNode random = null; ...
PHP
UTF-8
3,721
2.796875
3
[]
no_license
<?php class RadnikController extends AdminController { private $viewDir = 'privatno' . DIRECTORY_SEPARATOR . 'radnik' . DIRECTORY_SEPARATOR; public function index() { $radnici= Radnik::ucitajSve(); foreach($radnici as $radnik){ if(strlen($radnik->lozinka)>20){ $...
Java
UTF-8
364
2.71875
3
[]
no_license
/** * Creates a new instance of a menu object, then uses said object, menu, to * run method select * * @author Geovany Felix * @since February 2021 */ public class AddressBookApplication { /** * * @param args collection of Strings */ public static void main(String args[]){ Menu m...
C
UTF-8
5,288
2.875
3
[ "MIT" ]
permissive
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<string.h> #include<sys/types.h> #include<sys/wait.h> #include"Config.h" #include"Tool.h" int argc; char** argv; const char* tip = "HelloShell"; int pipeNum; int shouldExit = 0; // 程序初始化 void Init(){ argc = 0; argv = calloc(ARGV_MAXIMUM_LENGTH, size...
Java
UTF-8
809
1.898438
2
[]
no_license
package com.hy.crm.entity; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; /** * <p> * * </p> * * @author mq * @since 2020-04-03 */ public class Users_roles implements Serializable { private static final long serialVersionUID = 1L; @TableId private String u_id; ...
PHP
UTF-8
5,414
2.671875
3
[ "MIT" ]
permissive
<?php namespace MLS\Capsule; use Illuminate\Support\Collection; class Normalizer { /** * The Model instance * * @var MLS\Capsule\Model */ protected $model; /** * The options array * * @var array */ protected $options; /** * The root of the entity * * @var array|string ...
Swift
UTF-8
1,373
3.453125
3
[ "Apache-2.0" ]
permissive
class Solution { // 674. Longest Continuous Increasing Subsequence // Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be strictly increasing. // A continuous increasing subsequence is defined by two indices l...
Python
UTF-8
695
2.5625
3
[]
no_license
""" Created on 2019/3/11 16:33 @author: zhouweixin @note: """ import os from pdfminer.pdfparser import PDFParser, PDFDocument path = r'D:\助研\成程老师\20190220\pdf' files = os.listdir(path) files = [file for file in files if file.endswith('.pdf')] for file in files: print(file) with open(os.path.join(path, file)...
C
UTF-8
5,995
2.765625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <sys/stat.h> #include <fcntl.h> int flag_pipe = 0; #define buffer_size 1000 char* get_command(char *command){ int n = strlen(command); int index = -1; for(int i=n-1; i>=0; i--)...
PHP
UTF-8
607
2.5625
3
[ "MIT" ]
permissive
<?php require_once dirname(__DIR__).'/vendor/autoload.php'; /** * This autoloader is only added to help load classes from the Rave namespace. * It is not required if you installed the Rave package in your project using composer. * It is used only for this example. */ // spl_autoload_register(function($class) { //...
C++
UTF-8
3,999
2.609375
3
[]
no_license
#include "StdAfx.h" #include "xtGlutView.h" //xtGlutView::xtGlutView(void) //{ //} xtGlutView * xtGlutView::m_Window = NULL; xtGlutView::xtGlutView(const char *title, int width, int height) : m_Width(width), m_Height(height) { int argc = 1; char *argv[] = {"hello"}; glutInit(&argc,argv); glutInitDisplayMode(GL...
Swift
UTF-8
531
2.5625
3
[]
no_license
public class StdCodeEmitterSymbolRenderer : CodeEmitterSymbolRenderer { public func render(_ symbol:CodeEmitterSymbol) -> String { switch(symbol) { case .ScopeOpen : return "{" case .ScopeClose : return "}" case .Comma : return "," case .FunctionResult ...
C
UTF-8
229
3.15625
3
[]
no_license
printf("Hello World"); int a = 5; int b = 10; if (a > b && b & 2 == 2 || a & 3 == 3) { printf("true"); int i; for(i = 0; i < 10; i++) { if(a > i) printf("i = %d", i); } } else { printf("false"); }
Java
UTF-8
1,061
2.28125
2
[ "Apache-2.0" ]
permissive
package de.davelee.personalman.api; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; import lombok.Getter; import lombok.Setter; /** * This class is part of the PersonalMan REST API. It represents a request for an absence containing company and * username of the person reque...
Rust
UTF-8
1,190
4.21875
4
[]
no_license
trait Animal { // static method signature; 'self' refers to the implementor type fn new(name: &'static str) -> Self; // instance methods, only signatures fn name(&self) -> &'static str; fn noise(&self) -> &'static str; // a trait can provide default method definitions fn talk(&self) { ...
C++
WINDOWS-1250
1,672
2.921875
3
[]
no_license
/* ___________________________________________ | IDrawable.cpp - implementacja interfejsu. | | SCI - August 2012. | |___________________________________________| */ #include "IDrawable.h" #include "../Drawable/CDrawableManager.h" namespace rendering { namespace drawable { //Konstruktor do...
Java
UTF-8
2,322
3.765625
4
[ "MIT" ]
permissive
/** @author Zhifan Li <a href="mailto:zhifan.li@ucalgary.ca">zhifan.li@ucalgary.ca</a> @version 1.0 @since 1.0 */ //This class is for exercise5_2 in ENSF409 assignment 2. public class JavaStrings { /** * * @param first first string to be passed to this method * @param second second string to be passe...
C#
UTF-8
668
2.828125
3
[]
no_license
using System.IO; using System.Text; namespace YandeDowner { public static class FileHelper { public static void processPath(string path) { if (!Directory.Exists(@path)) { Directory.CreateDirectory(@path); } } public static str...
SQL
UTF-8
363
2.578125
3
[]
no_license
# remove_anonymous_users DELETE FROM mysql.user WHERE User=''; # remove_remote_root DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); # remove_test_database DROP DATABASE IF EXISTS test; # remove privileges on test database DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_...
Java
UTF-8
622
2.515625
3
[]
no_license
package com.exadel.kaliada.core.services; import java.util.Map; /** * Class to load news from https://news.harvard.edu/gazette/ and parse them * @author akaliada */ public interface HarvardNewsParser { /** * load and parse all news from the main web-site * @return Map of pairs news Id and news link...
C#
UTF-8
734
2.59375
3
[]
no_license
using MongoDB.Driver; using System; namespace Mongo { public class MongoRepository<T> { private readonly IMongoConnectionSettings _settings; public MongoRepository(IMongoConnectionSettings settings) { if (settings == null) { throw new ArgumentNu...
C++
UTF-8
1,869
2.890625
3
[ "CC0-1.0" ]
permissive
#include "../advent/advent25.h" #include "../utils/int_range.h" #include <numeric> namespace { using utils::int_range; using ValType = int64_t; constexpr ValType MOD = 20201227; constexpr ValType CARD_SUBJECT_NUMBER = 7; constexpr ValType DOOR_SUBJECT_NUMBER = 7; constexpr ValType INITIAL_CRYPTO_VAL...
PHP
UTF-8
799
2.515625
3
[]
no_license
<?php use Illuminate\Database\Seeder; class UsersQuestionsAnswersTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { \DB::table('answers')->delete(); \DB::table('questions')->delete(); \DB::table('users')->delete(...
JavaScript
UTF-8
1,382
2.984375
3
[]
no_license
/* Draw basic demo chart */ function drawChart1() { var div = createDiv({ id: 'chart1', style: 'height: 400px; width: 400px;' }); var data = [{ x: ['giraffes', 'orangutans', 'monkeys'], y: [20, 14, 23], type: 'bar' }]; Plotly.newPlot('chart1', data); } function drawChart2() { getJSON('services...
Python
UTF-8
184
3.328125
3
[]
no_license
#Reversing month and date import re str="June 10 1994, June 11 1994, June 12 1994, June 13 1994" regex=r"([a-zA-Z]+) (\d+) (\d+)" print(re.sub(regex,r"\3\\2\\1",str)) #End of file
Ruby
UTF-8
222
3.546875
4
[]
no_license
# As per other languages, scope in preserved inside methods beer_description = "A crisp, summer ale with hints of coffee." def describer # Ruby complains (scope is inside the string) print beer_description end describer
Python
UTF-8
2,973
2.953125
3
[]
no_license
import pandas as pd import networkx as nx import numpy as np from scipy.spatial import Delaunay import math semiMajorAxis = 6378137.0 #赤道半径 flattening = 1/298.257223563 # 扁平率 e_2 = flattening * (2 - flattening) degree = math.pi / 180 def distance_latlon(p, q): x1, y1, x2, y2 = p[0], p[1], q[0], q[1] coslat...
PHP
UTF-8
4,851
2.734375
3
[ "MIT" ]
permissive
<?php require_once('../md5rand.php'); $atword = ""; function punctuate($line) { $reps = array( " " => " ", " " => " ", " ." => ".", " ," => ",", " '" => "'", " !" => "!", " ?" => "?", " :" => ":", "- " => "-", " _" => "", ...
Python
UTF-8
972
4.15625
4
[]
no_license
def frequentChr(word): """frequentChr: accept a string as input and returns the most frquently occured element as dictionary""" #Verifying that the input is type string try: #To ensure that the parameter is a string not an array if (type(word) in [list,set,dict]): return f"Note...
Markdown
UTF-8
2,930
2.90625
3
[]
no_license
``` body{ -moz-user-select:none; /*火狐*/ -webkit-user-select:none; /*webkit浏览器*/ -ms-user-select:none; /*IE10*/ -khtml-user-select:none; /*早期浏览器*/ user-select:none; } ``` ``` 判断浏览器 第一种,只区分浏览器,不考虑版本 function myBrowser(){ var userAgent = navigator.use...
Markdown
UTF-8
870
2.53125
3
[]
no_license
# bash Based on the default bashrc from Ubuntu 20.04. ## Clock On the right top of the terminal display clock using [`tput`][tldp-bash]. In addition to date and time, it also displays: * current git branch, * status (with return code) of the last command. ## Pure-like prompt A custom prompt inspired by [pure][pure-gi...
SQL
UTF-8
3,026
2.5625
3
[]
no_license
-- GENRES insert into HBDEMO_GENRE (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME) values ('fa55b59e-a193-a9f2-9737-e548d9884d0e', 1, '2020-07-04 13:28:30', 'admin', '2020-07-04 13:28:30', null, null, null, 'Fantasy'); insert into HBDEMO_GENRE (ID, VERSION, CREATE_TS, CREATED_B...
Java
ISO-8859-1
5,614
3.09375
3
[]
no_license
package speakit.io.record; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; /** * Representa un registro. Un objeto serializable y comparable. P...
Python
UTF-8
9,100
2.75
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Thu Oct 15 13:54:54 2020 @author: fatcatcat """ import numpy as np from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, UpSampling2D, ZeroPadding2D,Input,BatchNormalization, Dropout from tensorflow.keras.models import Sequential,Model from tensorflow.ke...
Swift
UTF-8
984
2.578125
3
[]
no_license
import Foundation import Glibc let group = DispatchGroup() let checkIsMainThread: () -> Void = { if Thread.isMainThread { print("Thread #\(gettid()) isMainThread") } else { print("Thread #\(gettid()) NOT MainThread") } } let defaultQueue = DispatchQueue.global() defaultQueue.async(group: group, execute: chec...
TypeScript
UTF-8
557
2.71875
3
[]
no_license
import {Component, Directive, Host, SkipSelf,Injector} from '@angular/core'; import {Service} from './service'; @Component({ selector : 'child', template : '<h1> have a look @ ur console </h1>', providers : [Service] }) export class Child { //SkipSelf decorator will restrict the provider lookup to parent->gr...
C++
UTF-8
1,375
3.765625
4
[]
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ //Time Complexity O(n) //Space Complexity O(log n) (if balanced) otherwise O(n) class Solution { public: bool hasPath...
Markdown
UTF-8
4,288
2.90625
3
[]
no_license
Features -------- * Timeline, layer, tracks, clips We provide a high level API with video edition semantics, anyone familiar with video editing should be able to quickly figure out how to use GES, as opposed to lower level concepts such as "source" and "composition". * Integrated mixing Doing video and au...
TypeScript
UTF-8
4,511
2.609375
3
[ "LicenseRef-scancode-generic-cla", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/*! * Copyright (c) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project. */ import { promises as fs, createWriteStream, existsSync, mkdirSync } from 'fs' import path from 'path' import { error, info, traceFile } from '@essex/tasklogger' import archiver from 'archiver' im...
C++
ISO-8859-1
4,061
2.6875
3
[]
no_license
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ * * * Started by ngel on january of 2016 * * This is free software released into the public domain. ...
SQL
UTF-8
2,107
3.015625
3
[]
no_license
-- Alimentos INSERT INTO PRODUCT (ID,PRODUCT_ID,PRODUCT_NAME, PRODUCT_DESCRIPTION, PRODUCT_COST) VALUES(1, 1, 'Arroz', 'Arroz Parboilizado', 3.50); INSERT INTO PRODUCT (ID,PRODUCT_ID, PRODUCT_NAME, PRODUCT_DESCRIPTION, PRODUCT_COST) VALUES(2, 2, 'Feijão', 'Feijao Sitio Cercado', 4.10); -- Eletrodomésticos INSERT INTO ...
Swift
UTF-8
5,546
3
3
[]
no_license
// // CountryDataHelper.swift // Country // // Created by Mario Kovacevic on 09/05/16. // Copyright © 2016 Brommko, LLC. All rights reserved. // import Foundation import SQLite class CountryDataHelper: DataHelperProtocol { static let TABLE_NAME = "country" static let id = Expression<Int>("id") st...
Markdown
UTF-8
5,531
2.53125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "OpenSSL" ]
permissive
--- title: Third party tools headerTitle: Third party tools linkTitle: Third party tools description: Interactive third party clients that you can use with YugabyteDB. headcontent: Use popular third party clients with YugabyteDB. image: /images/section_icons/troubleshoot/troubleshoot.png menu: v2.16: identifier: ...
Java
UTF-8
6,460
2.53125
3
[]
no_license
import jade.core.AID; import jade.core.Agent; import jade.core.behaviours.Behaviour; import jade.core.behaviours.CyclicBehaviour; import jade.domain.DFService; import jade.domain.FIPAAgentManagement.DFAgentDescription; import jade.domain.FIPAAgentManagement.ServiceDescription; import jade.domain.FIPAException; import j...
Go
UTF-8
5,524
2.71875
3
[]
no_license
package adapter import ( "bytes" "net/url" "goadminapi/context" "goadminapi/modules/auth" "goadminapi/modules/config" "goadminapi/modules/db" "goadminapi/modules/menu" "goadminapi/plugins" "goadminapi/plugins/admin/models" "goadminapi/template" "goadminapi/template/types" ) // WebFrameWork 功能都設定在框架中(使用/ad...
Markdown
UTF-8
19,025
3.015625
3
[]
no_license
--- title: "Data Organization with Excel 1 on ITaP Computers" author: "Pete E. Pascuzzi" date: "September 5, 2019" output: html_document: keep_md: yes toc: yes --- # Setup For Purdue University students, **you cannot save fies to the lab computer!** However, your ITaP home directory should be ma...
C++
UTF-8
1,413
2.875
3
[ "MIT" ]
permissive
#include<cstdio> #include<string.h> #include<vector> #include<stack> #include<algorithm> using namespace std; #define MAXN 1000000 struct BinTree{ vector<int> C; BinTree(){ C = vector<int>(MAXN,0);} int lowbit(int x){ return x&-x; } int sum(int x){ int ret = 0; while(x > 0...
Java
UTF-8
413
2.25
2
[]
no_license
package ood.ocp; import java.util.function.Predicate; public class ReportITPDF implements ReportImp { private final ReportIT reportIT; public ReportITPDF(Store store) { this.reportIT = new ReportIT(store); } public String generate(Predicate<Employer> filter) { String output = reportI...
C++
UTF-8
1,862
3.828125
4
[]
no_license
/* * merge sort */ class MergeSort{ public: int min(int x, int y) { return x < y ? x : y; } void mergeSort(int arr[], int len) { int* back = arr; int* tmp = new int[len]; //外层循环是决定内层循环每次合并元素的个数,直到<len //依次为:1->2->4->8->16->--- ...
PHP
UTF-8
724
3.046875
3
[]
no_license
<?php require __DIR__.'/vendor/autoload.php'; class obj implements Serializable { private $data; public function __construct() { $this->data = "Mes données privées"; } public function serialize() { return serialize($this->data); } public function unserialize($data) { ...
JavaScript
UTF-8
4,887
3.640625
4
[]
no_license
/** * Created by mshoc on 10/10/2017. */ /** * An object that implements a simple publisher / subscriber interface. */ export class Publisher { constructor() { this.topics = {}; } /** * Subscribe to a topic. * @param topic * @param callback */ subscribe(topic, callback...
Python
UTF-8
22,248
3.640625
4
[]
no_license
#Functions related to statistics applied on the data. import numpy as np import healpy as hp from progress.bar import Bar from tqdm.notebook import tqdm from scipy.special import legendre from itertools import product #Dot product function (normalized) def dot_product(X,Y): normx = np.linalg.norm(X) normy = ...
Ruby
UTF-8
2,924
2.546875
3
[ "Apache-2.0" ]
permissive
# Copyright 2018 Google LLC # # 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 agreed to in writing, ...
Python
UTF-8
358
3.3125
3
[]
no_license
shopping_items = [ ("ziemniak", 2.5, 0.51), ("cebula", 3, 1.60), ("ser", 0.8, 15.50) ] def get_index_1_tuple_element(given_tuple): return given_tuple[1] sorted_items = sorted(shopping_items, key=get_index_1_tuple_element) print(sorted_items) sorted_items = sorted(shopping_items, key=lambda given_tupl...
Markdown
UTF-8
2,533
2.734375
3
[]
no_license
HOW IT'S WIRED -------------- 1. Nearly all requests go through a Sails API Controller ( `api/controllers` ) even if the controller is not tied to a model. Requests pass first through `config/router.js` where the controller is assigned to the route. <br> 2. Blueprint routes are attached to `api/v2` and every Blueprint...
Shell
UTF-8
363
2.828125
3
[ "MIT" ]
permissive
#!/bin/bash #Using script from http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_cloudwatch_logs.html # Install awslogs and the jq JSON parser yum install -y awslogs jq aws-cli # ECS config ${ecs_config} { echo "ECS_CLUSTER=${cluster_name}" echo 'ECS_AVAILABLE_LOGGING_DRIVERS=${ecs_logging}' } >> /...
TypeScript
UTF-8
1,727
2.640625
3
[ "MIT" ]
permissive
import * as commander from 'commander'; import { generate } from '../generate'; export class AppGen { private program: commander.CommanderStatic; private package: any; constructor() { this.program = commander; this.package = require('../../package.json'); } public initialize() { this.program ...
TypeScript
UTF-8
5,462
2.625
3
[]
no_license
import { Point } from "../../utils/Point"; import { getRules } from "../../facade"; import { Container } from "pixi.js"; import { DragProcessController } from "./DragProcessController"; export interface CustomDragEvent<T> { target: T; cursor: Point; } export interface DragEventNodeControllable { activateAwaitDra...
Markdown
UTF-8
612
2.953125
3
[]
no_license
# Concurrent Adder This Golang package provides a function to generate a sum of an integer array (with each value transformed first) and send it through a channel (to allow for concurrency). The number of transformations and channels is variable. This is the rough equivalent of a set of `MapReduce` functions, with th...
Java
UTF-8
3,825
2.46875
2
[]
no_license
package org.usfirst.frc.team5422.commands; import org.usfirst.frc.team5422.controller.StrongholdRobot; import org.usfirst.frc.team5422.defense.ChivalDeFrise; import org.usfirst.frc.team5422.defense.DefenseTypeInterface; import org.usfirst.frc.team5422.defense.DrawBridge; import org.usfirst.frc.team5422.defense.LowBar;...
Java
UTF-8
345
2.109375
2
[ "Apache-2.0" ]
permissive
package zx.soft.sample.data.jpa.utils; import java.io.IOException; import com.fasterxml.jackson.databind.ObjectMapper; public class Object2Json { public static String toJsonWithoutPretty(Object object) { try { return new ObjectMapper().writeValueAsString(object); } catch (IOException e) { throw new Runti...
Markdown
UTF-8
4,279
2.953125
3
[]
no_license
--- title: The Next Few Months for Kingdom Code intro: As life begins to find a bit more rhythm, I want to share with you our thinking for Kingdom Code over the next few months… type: article tags: date: 2020-04-20 canonical: https://kingdomcode.org.uk/blog/2020/the-next-few-months/ --- **A month into lockdown and we'...
Java
UTF-8
770
2.359375
2
[]
no_license
package com.example.job; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by eric on 2018/3/8. */ public class ThirdJob implements J...
Java
UTF-8
299
1.578125
2
[]
no_license
package top.fan2wan.common.api.config; import org.springframework.cloud.openfeign.EnableFeignClients; /** * @description: config for feign * @author: FantTao * @date: 2020-02-14 12:11 */ @EnableFeignClients(basePackages = {"top.fan2wan.*.feign"}) public abstract class AbstractFeignConfig { }
SQL
UTF-8
6,291
4.5
4
[]
no_license
USE austin_housing; -- Average price of homes sold for each quarter in years 2018-2020 SELECT * FROM (SELECT latest_saledate_year AS Year, DATEPART(quarter, latest_saledate) AS Quarter, AVG(latestPrice) AS AvgHomePrice FROM austin_housing WHERE latest_saledate_year IS NOT NULL AND latest_saleda...
C++
UTF-8
3,938
3.21875
3
[]
no_license
#pragma once #include <vector> #include <thread> #include <future> //packaged_task #include <queue> #include <functional> //bind #include <mutex> #include <condition_variable> #include <type_traits> //invoke_result class thread_pool { public: thread_pool(size_t thread_count); ~thread_pool(); //since st...
Java
UTF-8
7,046
2.25
2
[]
no_license
package guiChange; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Locale; import javax.swing.JButton; import javax.swing.JComboBox;...
Python
UTF-8
1,398
4.46875
4
[]
no_license
class person: def __init__(self, name): self.name = name # 只有实例化的时候才确定的值,这个值只在实例上存在,在class类中没有这个变量。 print('{}来到人间~!'.format(name)) def eat(self): print('{}寻找可以吃的东西'.format(self.name)) def __run(self): print('{}岁的{}像野马一样狂奔'.format(self.age, self.name)) print('跑累了之后'...
Java
UTF-8
4,183
2.0625
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 action.quanlytaikhoan; import actionform.quanlytaikhoan.QLTaiKhoanForm; import com.sun.javafx.scene.control.skin.VirtualFlow; ...
PHP
UTF-8
822
2.921875
3
[]
no_license
<?php declare(strict_types=1); namespace backend\components\book\blocks; class Test implements GuestBlockInterface { private $testId; private $header; private $description; public function __construct(int $testId, string $header = '', string $description = '') { $this->testId = $testId; ...
Java
UTF-8
1,048
2.171875
2
[]
no_license
package frances.emart.com.emartidentityservice.services; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service;...
C++
UTF-8
1,383
3.265625
3
[]
no_license
#ifndef EMPLOYEES_H #define EMPLOYEES_H #include<iostream> #include<string> #include<vector> #include<cstdlib> using namespace std; class Employee { public: Employee(string JobTitle, char FirstInitial, string LastName, int EmployeeID, int GrossPay); ~Employee(){}; ostream& operator...
Java
UTF-8
3,169
2.90625
3
[]
no_license
package hu.schonherz.homework.daoimpl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import hu.schonherz.homework.connection.ConnectionHandler; import hu.schonherz.ho...
Python
UTF-8
5,507
3.875
4
[]
no_license
# 1. Реализовать скрипт, в котором должна быть предусмотрена функция расчета заработной платы сотрудника. # В расчете необходимо использовать формулу: (выработка в часах*ставка в час) + премия. Для выполнения расчета # для конкретных значений необходимо запускать скрипт с параметрами. # import sys # vyrabotka, stavka,...
Markdown
UTF-8
1,732
2.828125
3
[ "MIT" ]
permissive
# go-bunyan Bunyan logger written in Golang. See https://github.com/trentm/node-bunyan for in depth documentation. This package attempts to implement the original node.js library as closely as possible using golang. ## TODO * Implement `rotating-file` stream * Write tests * Publish to go registry ### Simple usage ...
Python
UTF-8
2,489
2.703125
3
[]
no_license
import base64 import re import os import datetime import random import string from subprocess import Popen, PIPE inputFileName = 'inputFile.txt' outputFileName = 'outputFile' oracleFileName = 'oracle.txt' seed = datetime.datetime.now() random.seed() def execute( argIn ): arguments = ['./base64'] for args in ...
Shell
UTF-8
1,346
3.21875
3
[]
no_license
#!/bin/bash # 明星运营周报表邮件 source $ETL_HOME/common/db_util.sh function execute() { start_date=`date +'%Y-%m-%d' -d "$the_day 7 day ago"` end_date=`date +'%Y-%m-%d' -d "$the_day 1 day ago"` date_range=`date +'%Y%m%d' -d "$start_date"`"-"`date +'%Y%m%d' -d "$end_date"` debug "Date range: $date_range" ...
Java
UTF-8
1,149
2.296875
2
[]
no_license
package net.rc.lab.springboot.entities; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; impo...