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 |
|---|---|---|---|---|---|---|---|
C++ | UTF-8 | 3,360 | 3.09375 | 3 | [] | no_license | /*************************************************************************
> File Name: thread_pool.h
> Author:
> Mail:
> Created Time: 2017年05月13日 星期六 12时22分24秒
************************************************************************/
#ifndef _THREAD_POOL_H
#define _THREAD_POOL_H
#include <stdio.h>
#include <... |
C# | UTF-8 | 1,211 | 2.859375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _04数据库创建和填充种子数据及LINQ操作
{
//public class Context : DbContext
//{
// public Context() : base("name=FirstCodeFirstApp")
// {
// //无论什么时候... |
Java | UTF-8 | 1,358 | 1.796875 | 2 | [] | no_license | /*******************************************************************************
* Copyright (c) 2010 - 2013 webXcerpt Software GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, ... |
Markdown | UTF-8 | 450 | 2.75 | 3 | [] | no_license | # dht22-hygrometer-script
<h2>DHT22 Hygrometer</h2>
DHT22 Hygrometer script for accepting and sending temperature and humitity values
<h2>Configuration</h2>
Three things should be configured before uploading it to chip:
<ul>
<li>Provide Wi-Fi SSID and Password so it can connect to internet</li>
<li>Configure "St... |
Ruby | UTF-8 | 2,041 | 2.578125 | 3 | [] | no_license | class Notifier::UserBase < Notifier::Base
def initialize(user:, body:, notifiable_user:)
super user: user, body: body
@notifiable_user = notifiable_user
end
def full_bio
@notifiable_user.profile_blurb
end
def truncated_bio
full_bio.present? ? full_bio&.truncate(260, seperator: /\s/) : ''
e... |
Python | UTF-8 | 787 | 3.578125 | 4 | [] | no_license | def reduce_polymer(polymer):
temp_string = ""
for char in polymer:
next_char = "" if not temp_string else temp_string[-1]
if should_remove_characters(char, next_char):
temp_string = temp_string[:-1]
else:
temp_string += char
return len(temp_string)
def remo... |
JavaScript | UTF-8 | 3,471 | 2.609375 | 3 | [] | no_license | import React, { useState } from "react";
import "./App.css";
import { useSelector } from "react-redux";
import { selectLoggedinUser } from "./store/selectors";
import ResourcesSection from "./components/ResourcesSection";
import AddResourceForm from "./components/AddResourceForm";
const selectDevs = (state) => {
ret... |
Shell | UTF-8 | 466 | 3.453125 | 3 | [] | no_license | #!/bin/bash
# Написать скрипт, который переименовывает все файлы
# с именами, начинающиеся на «b». (команда mv)
# Ищем в текущем каталоге файлы с префиксом "b".
# При отсутствии выводится ошибка
files=`ls b* 2>/dev/null`
if [[ -z $files ]]; then echo Files dont exist ; exit; fi
for i in $files
do
mv $i B$i
done
ec... |
Python | UTF-8 | 2,572 | 4.875 | 5 | [] | no_license | """Problem : Given a position, return node at that position
Solution :
a. Iterative Solution:
1. Initialize count = 0
2. Traverse through list unitl count == index
3. Return index
4. If list ended, Return NOT FOUND
b. RECURSIVE SOLUTION:
1. Set function with parameter curr, count, index
2. Base conditio... |
Swift | UTF-8 | 401 | 2.71875 | 3 | [] | no_license | //
// Shapes.swift
// Shapes
//
// Created by Rodrigo Labronici on 13/04/16.
// Copyright © 2016 Rodrigo Labronici. All rights reserved.
//
import SpriteKit
protocol Shapes {
var initialPoint: CGPoint {get set}
var lastPoint:CGPoint {get set}
var inicialPointLandscape: CGPoint {get set}
var l... |
Python | UTF-8 | 1,181 | 2.625 | 3 | [] | no_license | """
nitter module
"""
from datetime import datetime
import logging
from typing import List
import requests
from lxml import etree
from nitter.types import Twitt
class FetchException(Exception):
"""
FetchException
"""
def fetch_feed(instance_urls: str, followings: List[str], logger: logging.Logger) -... |
Java | UTF-8 | 312 | 1.851563 | 2 | [] | no_license | package com.syl.androidart.fragment;
import android.view.View;
import com.syl.androidart.base.BaseFragment;
/**
* Created by Bright on 2017/8/7.
* @Describe Retrofit
* @Called
*/
public class RetrofitFragment extends BaseFragment {
@Override
public View initView() {
return null;
}
}
|
Markdown | UTF-8 | 1,559 | 3.5 | 4 | [] | no_license | # Chapter 1
What is functional programming?
## Summary
- Functional programming is based on a simple premise. We use pure functions to construct programs.
- Pure functions are functions that have no side effect.
- Pure functions are easier to reason about.
- We call functions that have side effects procedures, funct... |
Java | UTF-8 | 965 | 2.15625 | 2 | [] | no_license | package com.retailstore.billing;
import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit... |
C# | UTF-8 | 1,550 | 3.125 | 3 | [] | no_license | using System;
namespace Alistirmalar
{
class Program
{
static void Main(string[] args)
{
string[] dersler = new string[]
{
"Matematik","Türkçe","Yeni Ders Geometri","Coğrafya","Biyoloji","Yeni bir ders daha"
};
Console.WriteLine("----... |
Python | UTF-8 | 214 | 3.28125 | 3 | [] | no_license | # open: megnyit egy file-t és visszaad egy streamet
file = open('./temp.txt')
print(file)
lines = file.readlines()
print(lines)
nums = []
for line in lines:
nums.append(int(line))
file.close()
print(nums)
|
C# | UTF-8 | 1,633 | 3.171875 | 3 | [] | no_license | using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class TextController : MonoBehaviour
{
public Text display;
public InputField input;
int intRandomNumber;
int intGuessedNumber;
// Use this for initialization
void Start ()
{
InitializeGame();
input.onEndE... |
Markdown | UTF-8 | 6,273 | 3.265625 | 3 | [] | no_license | **Chapter 4 Functions**
<!-- vim-markdown-toc GFM -->
* [Procedures](#procedures)
* [Functions with Empty Parentheses](#functions-with-empty-parentheses)
* [Function Invocation with Expression Blocks](#function-invocation-with-expression-blocks)
* [Recursive Functions](#recursive-functions)
* [Nested Functions](#nes... |
JavaScript | UTF-8 | 5,455 | 3.359375 | 3 | [] | no_license | let elList = [];
let CONTROLS = {
buttons: { },
sliders: { },
sorting: { }
}
window.addEventListener('load', function() {
// slider display elements
const elementTarget = document.querySelector('.value__elements');
const speedTarget = document.querySelector('.value__speed');
// sortin... |
JavaScript | UTF-8 | 1,508 | 3.03125 | 3 | [] | no_license | import {createStore, combineReducers} from 'redux';
import {ACTION_UPDATE_USER_PROFILE} from './actions';
/**
* A "Reducer" which is capable to turn the current application status received into
* a new application status.
*
* @param {*} state During "Redux Store" initialization this parameter is undefined
* ... |
C# | UTF-8 | 1,778 | 2.75 | 3 | [] | no_license | using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using System;
namespace TestAutomation.Page
{
public class CheckYourBrowserPage : BasePage
{
public static IWebElement text => Driver.FindElement(By.CssSelector... |
Java | UTF-8 | 3,655 | 2.046875 | 2 | [] | no_license | package combit.ListLabel23.DataProviders;import Common.Activation;import static Common.Helper.Convert;import static Common.Helper.getGetObjectName;import static Common.Helper.getReturnObjectName;import static Common.Helper.ConvertToConcreteInterfaceImplementation;import Common.Helper;import com.javonet.Javonet;
... |
Java | UTF-8 | 9,389 | 3.140625 | 3 | [] | no_license |
import java.util.*;
import java.net.*;
import java.io.*;
/**
* Servidor que processa e armazena os dados dos arquivos.
*
* @author Lucas Gutierrez
* @author Marcos Balatka
*/
public class Servidor extends IOException {
private final String arquivoOriginal = "sample.csv";
private final Stri... |
C | UTF-8 | 442 | 3.234375 | 3 | [] | no_license | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void) {
// your code goes here
int *arr,shift,size,index;
scanf("%d %d",&size,&shift);
arr=(int*)malloc(size*sizeof(int));
while(shift>=size)
{
shift-=size;
}
for(index=0;index<size;index++)
scanf("%d ",&arr[index]);
for(index=size-shift;inde... |
C# | UTF-8 | 1,290 | 2.71875 | 3 | [
"MIT"
] | permissive | using Essenbee.Bot.Core.Games.Adventure.Interfaces;
using System.Collections.Generic;
namespace Essenbee.Bot.Core.Games.Adventure.Locations.AllAlikeMaze
{
public class BrinkOfPit : AdventureLocation
{
public BrinkOfPit(IReadonlyAdventureGame game) : base(game)
{
LocationId = Locati... |
TypeScript | UTF-8 | 1,068 | 3.4375 | 3 | [
"MIT"
] | permissive | import { Record } from 'immutable';
/**
* 组件位置
* left(左)|right(右)|top(上)|bottom(下)
* 绝对定位: left, top 对应 Position: absoult | relative
* 相对定位:对应 margin
*/
export interface IPosition {
top: number;
left: number;
}
const defaultRecord: IPosition = {
top: 0,
left: 0
};
export const PositionStateRecor... |
Shell | UTF-8 | 203 | 2.890625 | 3 | [] | no_license | #!/bin/bash
for i in {1..5}; do
echo "Error test $i"
g++ -DERRTEST=$i test.cpp 2>/dev/null
if [[ $? == 0 ]]; then
echo "Fail, it worked!" >&2
exit 1
fi
done
echo Success
|
Markdown | UTF-8 | 686 | 3.203125 | 3 | [] | no_license | # Monthly programming challenges for the study.py group
## [Beginner] Formatting output
Printing output with color or styles can be very useful in debugging and logging.
**Problem:**
Design and implement your own markup language
for example:
```
$ ./markup.py "<bold blue>What a wonderful world"
```
would print ... |
Ruby | UTF-8 | 1,544 | 4.125 | 4 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | require 'pry'
def spicy_foods
[
{ name: 'Green Curry', cuisine: 'Thai', heat_level: 9 },
{ name: 'Buffalo Wings', cuisine: 'American', heat_level: 3 },
{ name: 'Mapo Tofu', cuisine: 'Sichuan', heat_level: 6 }
]
end
def get_names(spicy_foods)
spicy_foods.map do |dish|
dish[:name]
end
end
... |
Markdown | UTF-8 | 1,363 | 2.921875 | 3 | [
"MIT"
] | permissive | #Agenda:
1. HackerRank fundamentals in Obj C and Swift
2. Problem solving strategies for programming challenges (using HR and english)
3. Break into groups of 3 ppl and do HR challenges together in 15 minute chunks per problem
4. Back into a big group to discuss Cracking the Coding interview as a resource, and teach a ... |
Swift | UTF-8 | 4,144 | 2.609375 | 3 | [] | no_license | //
// ShiftImportViewModel.swift
// Shifree
//
// Created by 岩見建汰 on 2018/06/23.
// Copyright © 2018年 Kenta Iwami. All rights reserved.
//
import Foundation
protocol ShiftImportViewModelDelegate: class {
func initializeUI()
func successImport()
func successImportButExistUnknown(unknown: [Unknown])
... |
Ruby | UTF-8 | 1,446 | 2.515625 | 3 | [] | no_license | require 'sinatra/base'
require 'sinatra/flash'
require './lib/bookmark'
class BookmarkManager < Sinatra::Base
enable :sessions
register Sinatra::Flash
get '/' do
'Bookmark Manager'
end
get '/bookmarks' do
@bookmarks = Bookmark.all
#flash[:keys] = "Helloo"
erb(:'bookmarks/index')
end
... |
Markdown | UTF-8 | 2,006 | 3.046875 | 3 | [] | no_license | # Installation
### First install mongodb driver:
`npm i mongodb`
### Then install wrapper:
`npm i basic-mongo-wrapper`
# Using
#### This package is promise based. It means you must use `await` or `.then` to get results
## Starting
#### Declare package
```JS
const Interface = require("basic-mongo-wrapper");
```... |
Java | UTF-8 | 12,636 | 2.96875 | 3 | [] | no_license | package assignment;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Database class to get data from Text File or Database
* Method to read people.txt written by Natalie Sy
... |
Python | UTF-8 | 793 | 2.96875 | 3 | [] | no_license | import glob
listText = []
def getTexts(inputUser) :
#inputUser = input("Enter the name of the folder you want to search in: ")
#print(inputUser)
mypath = "DataSet/Train/" + inputUser + "/*.txt"
#print(mypath)
listText = glob.glob(mypath)
count = 0
for text in listText :
textSplit =... |
Markdown | UTF-8 | 13,654 | 2.609375 | 3 | [] | no_license | <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
##Overeenkomst inzake de uitwisseling van stagiaires tussen Nederland en Finland
####Accord relatif à l'échange de stagiaires entre les Pays-Bas et la Finlande
Le Gouvernement de Sa Majesté la Reine des Pays-Bas et Le Gouvernement de la République... |
Shell | UTF-8 | 473 | 3.4375 | 3 | [
"MIT"
] | permissive | #!/bin/bash
#
# This example shows how to store and read a value from a file.
#
# * examples/02_base.rb reads a file twice. Once where the file name
# is known, and once where it is unknown until set via an
# environment variable.
examples="$(cd "$(dirname "$BASH_SOURCE")" && pwd)"
# Alter a value via the s... |
Java | UTF-8 | 2,143 | 2.171875 | 2 | [] | no_license | // PROJECT : RemoteQuartzScheduler
// CLASS : JobDatas.java
//
// ************************************************************************************************
//
// This copy of the Source Code is a property of Ravindu Eranga Abayawardena. No
// part of this file may be reproduced or distributed in any form o... |
Java | UTF-8 | 204 | 2.078125 | 2 | [] | no_license | package org.sheehan.algorithm.thread;
import org.junit.Test;
public class ThreadLocalExampleTest {
@Test
public void testMain() throws Exception {
ThreadLocalExample.main(null);
}
} |
Rust | UTF-8 | 1,943 | 3.015625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | use std::collections::HashMap;
use std::fs::{read_to_string, write};
use serde_derive::{Deserialize, Serialize};
use crate::config::stats_path;
// solitaire statistics
#[derive(Clone, Serialize, Deserialize)]
pub(crate) struct GameStat {
pub(crate) played: u64,
pub(crate) won: u64,
}
impl Default for GameSt... |
JavaScript | UTF-8 | 1,456 | 4.1875 | 4 | [] | no_license | "use strict";
var user = {
name: "Cristian",
age: 17,
adress: {
city: "Joinville",
state: "SC"
}
};
/**
* A primeira e mais fácil forma de extrair algum dado do objeto declarado
* anteriormente, é:
*
* The first way to extract some object values is:
*/
// const name = user.name;
// const age = u... |
Java | UTF-8 | 1,419 | 2.421875 | 2 | [] | no_license | package action;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.EntidadeDAO;
import entidades.Entidade;
import entidades.Usuario;
public class CadastrarEntidadeAction implements ActionProcess {
@Override
public void process(HttpS... |
Java | UTF-8 | 3,730 | 2.9375 | 3 | [] | no_license | package indi.ycl.util;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamRe... |
C++ | UTF-8 | 575 | 3.21875 | 3 | [] | no_license | //
// Created by 郭磊 on 2021/1/13.
//
#include <iostream>
#include "Person.h"
using namespace std;
int main1(int argc, char *argv[]) {
Person p1(28, 98);
Person p2(27, 56);
Person p3 = operator+(p1, p2);
p3 = p1 + p2;
cout << "person:age:" << p3.getAge() << ",score:" << p3.getScore() << endl;
}
... |
Markdown | UTF-8 | 806 | 2.671875 | 3 | [] | no_license | ---
ID: 285
post_title: Jim and the Orders, JavaScript Solution
author: slbarnes
post_excerpt: ""
layout: page
permalink: >
http://localhost/index.php/jim-and-the-orders/jim-and-the-orders-javascript/
published: true
post_date: 2018-09-04 08:42:32
---
### Functions:
##### jimOrders I create an array servings and cal... |
Java | UTF-8 | 1,101 | 2.296875 | 2 | [] | no_license | package com.udacity.gradle.builditbigger;
import android.content.Context;
import android.support.v4.util.Pair;
import android.test.AndroidTestCase;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class EndpointAsyncTaskTest extends AndroidTestCase {
CountDownLatch signal;... |
Python | UTF-8 | 691 | 4.15625 | 4 | [
"Apache-2.0"
] | permissive | """
斐波拉契问题:F(0)=0,F(1)=1,F(n) = F(n-1)+ F(n-2) (n>2,n∈N*)
一只青蛙一次可以跳上1级台阶,也可以跳上2级台阶。求该青蛙跳上一个n级台阶总共有多少种跳法。
"""
def moeo(func):
cache = {}
def wrap(*args):
if args not in cache:
cache[args] = func(*args)
return cache[args]
return wrap
@moeo
def fib(n):
if n <= 0:
re... |
Java | UTF-8 | 931 | 2.734375 | 3 | [] | no_license | package org.rendersnake.jquery;
public class JQueryCanvasFactory {
/**
* Create a new JQueryCanvas to compose expressions.
* @param selector , A string containing a selector expression
* @see {@link http://api.jquery.com/jQuery/}
* @return a new JQueryCanvas
*/
public static JQueryCanv... |
Python | UTF-8 | 1,283 | 3.046875 | 3 | [] | no_license | from colorsys import rgb_to_hsv
from PIL import Image, ImageDraw
def rgb2int(r, g, b):
return int('{:02x}{:02x}{:02x}'.format(r, g, b), 16)
def get_first_not_white_y(x, y, pixels, w, h, white_value):
# expected 2314
if y < h:
while rgb2int(*pixels[x + y * w]) > white_value:
y += 1
... |
Python | UTF-8 | 2,429 | 3.09375 | 3 | [] | no_license |
#----------- ARCHIVOS TXT -----------------
print("\n***CLAVES***")
claves = open("claves.txt", "rt", encoding="utf8")
datos_claves = claves.read()
print(datos_claves)
print("\n***CoDIGOS***")
codigo = open("codigo.txt", "rt", encoding="utf8")
datos_codigo = codigo.read()
print(datos_codigo)
print("\n***NOMBRES***... |
C++ | UTF-8 | 937 | 2.515625 | 3 | [] | no_license | // In the name of **** God ****
/*
Copyright (C) JadedBeast
Morocco
created : 03/11/2019
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod= 1e9+7;
const int MAX=1e5+5;
#define debug... |
PHP | UTF-8 | 2,194 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace MultilineQM\Log;
use MultilineQM\Config\LogConfig;
use MultilineQM\Config\ProcessConfig;
use MultilineQM\Log\Driver\LogDriverInterface;
use MultilineQM\OutPut\OutPut;
use MultilineQM\Serialize\JsonSerialize;
/**
* Log type
* @method static debug(string $message, array $context = []); debugging inf... |
Java | UTF-8 | 35,550 | 2.6875 | 3 | [
"MIT"
] | permissive | /*
* 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 courseenrollmentsystem;
import java.io.FileOutputStream; ... |
C++ | UTF-8 | 706 | 3.4375 | 3 | [] | no_license | #include <iostream>
using namespace std;
class myclass{
public:
int size;
int *p;
public:
myclass(myclass&my ){
this->size=my.size;
//Copy constructor ile dizi kopyalama
this->p=new int[size];
for(int i=0;i<size;i++){
this->p[i]=my.p[i];
}
}
myclass(int sz){
p=new int[sz];
... |
JavaScript | UTF-8 | 273 | 2.859375 | 3 | [] | no_license | export const personReducer = (currentPersons, action) => {
switch (action.type) {
case 'add': return [...currentPersons, action.value];
case 'remove': return currentPersons.filter(p => p !== action.value);
default: return currentPersons;
}
} |
Python | UTF-8 | 379 | 2.96875 | 3 | [] | no_license | # encoding=utf-8
__author__ = 'xiaowang'
__date__ = '18/2/16'
class Singleton(object):
_state = {}
def __new__(cls, *args, **kwargs):
ob = super(Singleton, cls).__new__(cls, *args, **kwargs)
ob.__dict__ = cls._state
print(ob)
return ob
# class MyClass(Singleton):
# a =... |
Python | UTF-8 | 519 | 3.203125 | 3 | [] | no_license | shopping_items = [
"jajka",
"bułka",
"ser feta",
"masło",
"pomidor"
]
forgotten_items = [
"chusteczki",
"papier toaletowy"
]
def shopping(items):
shopping_cart = "Koszyk zawiera: "
for item in items:
shopping_cart += item + '\n'
return shopping_cart
def x_shopping(items... |
JavaScript | UTF-8 | 608 | 4.09375 | 4 | [] | no_license | class Student {
constructor(firstName, lastName){
this.firstName = firstName
this.lastName = lastName
}
getFullName(){
return this.firstName + ' '+ this.lastName
}
}
let student = new Student("Scott", "Desatnick")
console.log(student.firstName)
console.log(student.lastName)
co... |
Markdown | UTF-8 | 8,880 | 2.71875 | 3 | [
"MIT"
] | permissive | [](http://emberobserver.com/addons/ember-power-timepicker)
# Ember-Power-Timepicker
This is an Ember addon that uses the wonderful [ember-power-select](https://github.com/cibernox/ember-power-select)
component for the singular purpose ... |
C | UTF-8 | 1,928 | 3.1875 | 3 | [] | no_license | #ifndef SORT_H_
#define SORT_H_
#define ElementType int
/*
冒泡排序 Bubble_Sort
时间复杂度 O(N^2)
*/
void Bubble_Sort(ElementType A[], int N);
/*
插入排序 Insertion_Sort
时间复杂度 O(N^2)
若一个数组基本有序,则插入排序算法简单高效
*/
void Insertion_Sort(ElementType A[], int N);
/*
希尔排序 Shell_Sort
希尔排序可以看作是插入排序的扩展
时间复杂度 最坏情况O(N^2)
希尔排序时间复杂度不稳定!
*/
// ... |
Markdown | UTF-8 | 425 | 2.5625 | 3 | [] | no_license | ---
layout: post
title: 'Training'
categories: training
tags: squat bench deadlift chinup
---
Squat : 205x5x3
Bench : 175x5x3
Deadlift : 285x5
Chinup : 35x5x3
### Notes
Stomach issue over the weekend, so barely ate. Held weight constant. Squats okay, thought
definitely uneven in the h... |
PHP | UTF-8 | 2,817 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tastetag\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Comments
* @ORM\Entity(repositoryClass="Tastetag\MainBundle\Entity\CommentsRepository")
*/
class Comments
{
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var string
*/
private $content;
... |
Java | UTF-8 | 2,903 | 3.15625 | 3 | [] | no_license | package versionvegaterminal;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.InetSocketAddress;
import java.net.Socket;
import versionvegaterminal.util.IOUtil;
public class VersionVegaTerminal {
private static final String BOXHOST = "127.0.0.... |
Java | UTF-8 | 938 | 1.851563 | 2 | [] | no_license | package mx.com.nok.componente.dao;
import java.util.List;
import mx.com.nok.componente.model.dto.ComponenteDTO;
import mx.com.nok.componente.model.dto.ComponentePerfilDTO;
public interface ComponenteDAO {
public List<?> infoComponente(ComponenteDTO dto) throws Exception;
public ComponenteDTO insertComponente(... |
JavaScript | UTF-8 | 222 | 3.265625 | 3 | [] | no_license | function add(num1,num2){
// option 1
// num2 = num2 || 0;
// option 2
if (num2 == undefined ){
num2 = 0;
}
const total = num1 + num2
return total;
}
const result = add(15);
console.log(result);
|
C++ | WINDOWS-1252 | 6,807 | 2.625 | 3 | [
"MIT"
] | permissive | /*===========================================================================
; DVServercommon.cpp
;----------------------------------------------------------------------------
; * Copyright 2020 Intel Corporation
; SPDX-License-Identifier: MIT
;
; File Description:
; This file defines the DVServer common helper fun... |
Python | UTF-8 | 6,321 | 2.578125 | 3 | [] | no_license |
import numpy as np
import pandas as pd
import PMF_Thesis as Pmf
import time
# To change all the data into tuples (col, row, value)
def change_into_tuple(data_file):
data_list = []
for each_row_tuple_index in range(0, len(data_file)):
for each_col_index in range(0, len(data_file[each_row_tupl... |
Java | UTF-8 | 5,281 | 1.828125 | 2 | [] | no_license | package com.leyijf.view.activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;
import com.leyijf.R;
import com.ley... |
C# | UTF-8 | 1,841 | 3.203125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Modelowanie_GUI
{
class Grid
{
public int cellSize { get; set; }
public Grid(int panelWidth, int pane... |
Markdown | UTF-8 | 1,136 | 2.578125 | 3 | [
"MIT"
] | permissive |
- [Chinese](readme.md)
- [English](readme_en.md)
When coding projects, we often search for basic data(Such as code of nations, currencies, etc.) because we lack them. However, the data collected temporarily is often not complete enough, disordered and even the names and codings are wrong, you need to reorganize and c... |
Java | UTF-8 | 4,428 | 2.1875 | 2 | [] | no_license | package com.five.amung.qna.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframe... |
JavaScript | UTF-8 | 917 | 2.59375 | 3 | [] | no_license | var page = require('webpage').create();
var system = require('system');
var count = system.args[1] || 1;
var URL = 'https://github.com/Chiara-yen/startLearningNodejs';
page.onConsoleMessage = function(msg) {
for (var i = 0; i < count; i++) {
console.log(msg);
}
};
page.open(URL, function(status) {
if (sta... |
Java | UTF-8 | 598 | 2.390625 | 2 | [] | no_license | package com.example.android.bookrentalsystemforcsumblibrary.helperobjects;
/**
* Created by atomi on 12/8/2016.
*/
public class LibraryUser {
private String userName;
private String userPassword;
private boolean isAdmin;
public LibraryUser(String userName, String userPassword, int isAdmin){
... |
PHP | UTF-8 | 1,735 | 2.6875 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>アドレス登録</title>
</head>
<body>
<?php
$link = mysqli_connect("localhost", "root", "root");
if (!$link) {
exit('データベースに接続できませんでした。');
}
$result = mysqli_select_db($link, "999sample");
if (!$result) {
exit('データベースを選択できませんでした。')... |
Java | UTF-8 | 13,166 | 1.757813 | 2 | [] | no_license | package com.example.akshay.akshay5;
/**
* Created by AKSHAY on 25-01-2018.
*/
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;... |
C++ | UTF-8 | 1,016 | 2.8125 | 3 | [] | no_license | /*
* 有一个整数数组nums,和一个查询数组requests,其中requests[i]=[starti,endi]
* 第i个查询求nums[starti] + nums[starti + 1] + ... + nums[endi] 的结果 ,starti
* 和 endi 数组索引都是 从 0 开始 的。你可以任意排列 nums
* 中的数字,请你返回所有查询结果之和的最大值。由于答案可能会很大,请你将它对
* 109 + 7 取余 后返回。
*/
#include "Header.h"
#define MOD 1000000007
using LL = long long;
class Solution ... |
Markdown | UTF-8 | 2,249 | 2.71875 | 3 | [] | no_license | # angular-commit-complete
fish complete for they `<type>` part of angular commit message, that is, in the format of
> `<type>(<scope>): <short summary>`
👉 Read more for the [angular commit message format](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type).
## Motivation
While the convention of ... |
C++ | UTF-8 | 337 | 3.359375 | 3 | [] | no_license | #include <iostream>
#include <cmath>
using namespace std;
int GetFactors(int num)
{
int count = 0;
for(int i = 1; i <= sqrt(num) ; i ++)
{
if(num % i == 0) count += 2;
}
return count;
}
int main()
{
int n = 500;
int TriNum = 1;
int i = 2;
while (GetFactors(TriNum) < n)
{
TriNum += i;
i ++;
}
cout<... |
Markdown | UTF-8 | 12,669 | 2.875 | 3 | [] | no_license | # 天下为公:TCP堵塞控制 - 算法与数学之美 - CSDN博客
2017年10月27日 00:00:00[算法与数学之美](https://me.csdn.net/FnqTyr45)阅读数:169
在 TCP 协议中,我们使用连接记录 TCP 两端的状态,使用编号和分段实现了 TCP 传输的有序,使用广播窗口来实现了发送方和接收方处理能力的匹配,还使用重复发送机制来实现 TCP 传输的可靠性。最初的 TCP 协议就是由上述的几个方面构成。1980 年代,TCP 协议又引入了流量控制机制。
****令人头痛的堵车****
从 1980 年代开始,网络变得繁忙。许多网络中出现了大量的堵塞(congestion)。堵塞类似于现实中的... |
Markdown | UTF-8 | 5,860 | 2.6875 | 3 | [] | no_license | # CnsOpenapiRubyClient::CorporationsApi
All URIs are relative to *https://api.houjin-bangou.nta.go.jp/4*
| Method | HTTP request | Description |
| ------ | ------------ | ----------- |
| [**get_corporations**](CorporationsApi.md#get_corporations) | **GET** /name | 法人名を指定しリクエストすることで、指定した法人名の基本3情報及び付随する情報を取得することができます。 ... |
Java | UTF-8 | 2,398 | 2.3125 | 2 | [] | no_license | package com.yalantis.ucrop.task;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
public class Converter extends AsyncTask<Void, Void, Void> {
private static fin... |
Markdown | UTF-8 | 12,328 | 3.265625 | 3 | [
"MIT"
] | permissive | **1. Unsupervised Learning cheatsheet**
⟶ Pense-bête d'apprentissage non-supervisé
<br>
**2. Introduction to Unsupervised Learning**
⟶ Introduction à l'apprentissage non-supervisé
<br>
**3. Motivation ― The goal of unsupervised learning is to find hidden patterns in unlabeled data {x(1),...,x(m)}.**... |
Python | UTF-8 | 5,167 | 3.5 | 4 | [] | no_license |
# Imports JSON library
import json
# Imports ZIP library
from zipfile import ZipFile
# Imports the remove function
from os import remove
class Document(object):
def __init__(self):
# Flag to state whether data is loaded or not
self.is_loaded = False
# Initializes the source attribute
self.source = Non... |
Java | UTF-8 | 1,627 | 2.1875 | 2 | [] | no_license | package com.juran.quote.resource.v1;
import com.juran.core.log.contants.LoggerName;
import com.juran.core.log.eventlog.aop.RestLog;
import com.juran.quote.bean.exception.QuoteException;
import com.juran.quote.bean.response.CommonRespBean;
import com.juran.quote.service.QuoteService;
import io.swagger.annotations.*;
im... |
SQL | UTF-8 | 1,644 | 4.21875 | 4 | [] | no_license | --ejercicio1
select employee_id,first_name , last_name from employees
where department_id in (select department_id from employees
where job_id in (select job_id from jobs
where job_title like '%Cle... |
C | UTF-8 | 247 | 3.15625 | 3 | [] | no_license | #include<stdio.h>
int main() {
unsigned long int a, b;
while(scanf("%lu %lu", &a, &b) == 2) {
if(a > b)
printf("%lu", a - b);
else
printf("%lu", b - a);
printf("\n");
}
return 0;
}
|
Java | UTF-8 | 1,782 | 2.171875 | 2 | [] | no_license | /*
* Copyright 2013 Worldpay
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... |
Java | GB18030 | 13,794 | 2.234375 | 2 | [] | no_license | package com.non.packer;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
i... |
JavaScript | UTF-8 | 2,912 | 2.625 | 3 | [] | no_license | // Namespace
this.GC = this.GC || {};
(function ($) {
"use strict";
function Preloader() {
var _this = this;
this.cubeFaceEnum = { FRONT:1, BACK:2, LEFT:3, RIGHT:4, TOP:5, BOTTOM:6 };
this.assetsLoaded = 0;
this.assetsToLoad = 0;
this.refreshRate = 500;
this.videoLoader = null;
this.asse... |
Java | UTF-8 | 230 | 1.671875 | 2 | [] | no_license | package com.mstream.rulesengine.core;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface Rule {
String getName();
List<String> getActions();
Map<String, Boolean> getCondition();
}
|
PHP | UTF-8 | 203 | 3.140625 | 3 | [] | no_license | <?php
class Posts{
function __call($name, $arguments){
echo $name . "<br>";
var_dump($arguments);
}
}
$post1 = new Posts();
$post1->createPosts("this is a test", 10);
?> |
C++ | UTF-8 | 995 | 2.796875 | 3 | [] | no_license | //
// triangle.cpp
// RayTracer
//
// Created by Uriana on 3/30/14.
// Copyright (c) 2014 Uriana. All rights reserved.
//
#include "triangle.h"
triangle::triangle(Vector3D theP0, Vector3D theP1, Vector3D theP2, Vector3D then0, Vector3D then1, Vector3D then2)
{
P0 = theP0;
P1 = theP1;
P2 = theP2;
nA... |
PHP | UTF-8 | 22,699 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/**
* O2System
*
* An open source application development framework for PHP 5.4+
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2015, .
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ... |
C# | UTF-8 | 2,998 | 2.796875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Data;
using ExcelLibrary.SpreadSheet;
using Newtonsoft.Json;
using System.Text.RegularExpressions;
namespace Online.Registration.Web.Helper
{
public class ExcelHelper
{
public static stri... |
Java | UTF-8 | 1,532 | 3.046875 | 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 paquete2;
import paquete5.Persona;
/**
*
* @author reroes
*/
public class Prestamo{
protected Persona beneficiario;
... |
Python | UTF-8 | 776 | 3.40625 | 3 | [] | no_license | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param {integer} n
# @return {TreeNode[]}
def dfs(self, start, end):
if start > end: return [None]
result = []
... |
Markdown | UTF-8 | 430 | 2.734375 | 3 | [] | no_license | # React - Videos
React application that consumes data from the YouTube API providing the user with a video search field and returns as a result a total of five videos with the searched theme. The application is also composed of a featured video and a list of videos related to the search, which when clicking on one of ... |
JavaScript | UTF-8 | 136 | 2.8125 | 3 | [] | no_license | class Hello {
run() {
document.querySelector("#hello").innerHTML = "ES6_Hello_World";
}
}
var hello = new Hello();
hello.run(); |
PHP | UTF-8 | 4,299 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Sharp;
use App\Models\Project;
use App\Models\Tag;
use Code16\Sharp\Form\Eloquent\Uploads\Transformers\SharpUploadModelFormAttributeTransformer;
use Code16\Sharp\Form\Eloquent\WithSharpFormEloquentUpdater;
use Code16\Sharp\Form\Fields\SharpFormCheckField;
use Code16\Sharp\Form\Fields\SharpFormDate... |
Python | UTF-8 | 524 | 3.1875 | 3 | [] | no_license | import re
respecchar = ['?', '*', '+', '{', '}', '.', '\\', '^', '$', '[', ']']
def regexstrip(string, _strip):
if _strip == '' or _strip == ' ':
_strip = r'\s'
elif _strip in respecchar:
_strip = r'\'+_strip'
print(_strip) #just for troubleshooting
re_strip = re.compile('^'+_strip+'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.