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
1,364
3.453125
3
[]
no_license
#ifndef TRACH_PLAYER_H #define TRACH_PLAYER_H #include <boost/algorithm/string.hpp> #include <vector> #include "Card.h" /** * represents all data of a signle player */ class Player { public: /** * @param obj object to deserialize from */ explicit Player(web::json::value obj) { id = ...
SQL
UTF-8
2,935
3.515625
4
[]
no_license
create table mff_static_left_nav ( id varchar2(40) not null, title varchar2(254) not null, asset_version int not null, workspace_id varchar2(40) not null, branch_id varchar2(40) not null, is_head numeric(1) not null, version_deleted numeric(...
Java
UTF-8
10,876
2.125
2
[]
no_license
package api.base; import android.util.Log; import org.xutils.common.Callback; import org.xutils.ex.HttpException; import org.xutils.http.RequestParams; import org.xutils.x; import java.io.File; import java.net.SocketTimeoutException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import...
C#
UTF-8
491
3.5
4
[]
no_license
using System; namespace Lambda { class Program { static void Main() { // Func< (аргумент - int), (возвращаемое значение - double) >. //Func<int, double> expression = x => x / 2; // Лямбда-Выражение сообщенное с делегатом. Func<int, double> func = x => x / 2; int number = 9; Console.Wr...
Markdown
UTF-8
3,775
2.625
3
[ "Unlicense" ]
permissive
# Молодіжна збірна України з хокею 4 листопада розпочне підготовку до домашнього ЧС-19/20 Published at: **2019-11-01T12:48:00+00:00** Author: **** Original: [ZIK.UA](https://zik.ua/news/2019/11/01/molodizhna_zbirna_ukrainy_z_hokeyu_4_lystopada_rozpochne_pidgotovku_do_1681471) У понеділок, 4 листопада, хок...
C#
UTF-8
4,070
2.578125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Services { using CommHelps; using Models; using MySql.Data.MySqlClient; using Dapper; using IServices; public class UsersServices:IUsersServices { DapperHelp...
C++
UTF-8
1,727
2.625
3
[]
no_license
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #...
Java
UTF-8
1,552
2.453125
2
[]
no_license
package com.example.ljh.vr.utils; import android.content.Context; import android.util.DisplayMetrics; import com.example.ljh.vr.R; import com.example.ljh.vr._application.MyApplication; public class ScreenUtils { private Context context; private DisplayMetrics dm; static ScreenUtils mScreenUtils; pu...
Java
UTF-8
175
1.578125
2
[ "Apache-2.0" ]
permissive
package com.tdsoft.bro.qhandler.service; import com.tdsoft.bro.core.qmsg.UploadTagQMsg; public interface ITagService { void consumeTag(UploadTagQMsg qmsg, String body); }
C++
UTF-8
1,559
3.234375
3
[]
no_license
#include "BinaryFile.h" #include <iostream> BinaryFile::BinaryFile(const std::string &filename, BinaryFile::Mode mode) : fp_(nullptr) { switch (mode) { case Mode::Read: fp_ = fopen(filename.c_str(), "rb"); break; case Mode::Write: if (exists(filename.c_str())) { std::cerr << "File \"" << fi...
C#
UTF-8
2,339
2.984375
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Web; using System.Net.Http; using Newtonsoft.Json; namespace MovieBot.Repository { public class OMDBProvider { string uri = "http://www.omdbapi.com/"; public OMDBProvider() { ...
Python
UTF-8
128
3.46875
3
[]
no_license
def fib(n): fib = [0 , 1] + [0]*(n-1) for i in range(2 , n + 1): fib[i] = fib[i-2] + fib[i-1] return fib[n] print(fib(4))
Markdown
UTF-8
2,355
3.578125
4
[]
no_license
--- title: Github CLI date: 2023-04-11 tags: - github - CLI --- GitHub CLI is a command-line tool that brings GitHub functionality to your terminal, allowing you to interact with repositories, issues, pull requests, and more without leaving the command line. It is designed to make it easier for developers to work ...
Java
UTF-8
4,025
2.109375
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 edu.ijse.tcd.dto; import java.io.Serializable; import java.math.BigDecimal; import javax.persistence.Column; import javax.pers...
JavaScript
UTF-8
3,786
3.796875
4
[]
no_license
// Chữa bài 1.5 //Chú ý prompt giá trị là string //Phép cộng string khác cộng 2 số // let n = Number(prompt('Nhap n :')); // let c = Number(prompt('Nhap c :')); // let s = Number(prompt('Nhap s :')); // for ( i = n ; i < c ; i = i + s){ // console.log(i); // } // //Chữa bài 5 => Đăng nhập // let username = (' ');...
Markdown
UTF-8
1,247
2.546875
3
[ "MIT" ]
permissive
--- layout: post title: "Putty Yardımıyla RedHat Cloud Server’a SSH Bağlantısı Yapmak" date: 2012-09-25 21:31 author: semihkirdinli comments: true categories: [Genel] tags: [cloud, cloud server, ibm cloud, putty, redhat, server, ssh] --- **1.Putty.exe** çalıştırılır. ![](/images/jekyll/1-connection1.png "1.connection")...
Java
UTF-8
2,500
2.0625
2
[]
no_license
package com.virtusa.payroll.controller; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResp...
Java
UTF-8
1,681
2.390625
2
[]
no_license
package ru.drsk.progserega.inspectionsheet.storages.stub; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import ru.drsk.progserega.inspectionsheet.entities.EquipmentType; import ru.drsk.progserega.inspectionsheet.entities.inspections.InspectionItem; import ru.drsk.progserega.inspectionshe...
Java
UTF-8
307
2.171875
2
[ "MIT" ]
permissive
package ru.ipolynkina.converter.converters.parsers; import java.io.File; public class ParserDefault extends Parser { public ParserDefault(File inputFile) { super(inputFile); } @Override public void parse() throws Exception { System.out.println("default parser"); } }
C++
UTF-8
1,497
2.65625
3
[]
no_license
#ifndef UPDATE_FROM_OTA_COMMAND_CLASS #define UPDATE_FROM_OTA_COMMAND_CLASS #include <Command.h> #include <Logger.h> #include <Settings.h> #include <ESP8266HTTPClient.h> #include <ESP8266httpUpdate.h> class UpdateFromOTACommand : public Command { public: bool process(char *line, WiFiClient *socket) override ...
C++
UTF-8
1,021
2.71875
3
[ "MIT", "BSD-3-Clause", "LGPL-2.1-only", "MPL-2.0", "LGPL-2.0-or-later", "BSD-2-Clause" ]
permissive
using namespace System; using namespace NETGeographicLib; int main(array<System::String ^> ^/*args*/) { try { Ellipsoid^ wgs84 = gcnew Ellipsoid( Constants::WGS84::MajorRadius, Constants::WGS84::Flattening ); // Alternatively: Ellipsoid^ wgs84 = gcnew Ell...
PHP
UTF-8
2,006
2.859375
3
[]
no_license
<?php namespace App\Http\Controllers; use App\Product; use Illuminate\Http\Request; class ProductController extends Controller { public function index(){ /* Retrn all the products from database */ return Product::all(); } public function store(Request $request){ /* Validate requ...
Python
UTF-8
2,516
3.1875
3
[]
no_license
import matplotlib.pyplot as plt import numpy as np import math as m from scipy.optimize import curve_fit #function for reading our data def read_data(file, numcols=2): data = np.genfromtxt( file, delimiter=" ", usecols=range(numcols), skip_header=0) return data[:, 0] def lorentz(x,m,...
Java
UTF-8
1,017
3.0625
3
[]
no_license
import java.util.ArrayList; public class Appointment { private String name; private String description; private String venue; private Time time; private ArrayList<String> participants = new ArrayList<String>(); public void setName(String name) { this.name = name; } public voi...
Markdown
UTF-8
1,194
2.625
3
[ "MIT" ]
permissive
# Ontology Description part The HIT2GAP user behavior ontology is a vocabulary aimed at determining the building-user interactions. With this aim in mind, the provided vocabulary is focused on registering and managing information related to the users. This kind of information are called "Needs" and represent the infor...
SQL
UTF-8
665
2.609375
3
[]
no_license
/* MySQL Data Transfer Source Host: 192.168.23.29 Source Database: oldfish Target Host: 192.168.23.29 Target Database: oldfish Date: 2012-11-15 18:39:26 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for leave_tbl -- ---------------------------- CREATE TABLE `leave_tbl` ( `id` bigint...
C#
UTF-8
622
2.671875
3
[]
no_license
using System.Collections.Generic; using PokemonPRNG.LCG32.StandardLCG; namespace Pokemon3genRNGLibrary { public class SlotGenerator { private readonly IEnumerable<ITryGeneratable<GBASlot>> slotGenerators; public GBASlot GenerateSlot(ref uint seed) { GBASlot slot = null; ...
Python
UTF-8
4,406
2.8125
3
[]
no_license
#!/usr/bin/env python # example helloworld2.py import pygtk pygtk.require('2.0') import gtk from os.path import * class HelloWorld2(gtk.Window): # Our new improved callback. The data passed to this method # is printed to stdout. def callback(self, widget, data): print ("Hello again - was presse...
Markdown
UTF-8
13,703
3.140625
3
[]
no_license
# Testing Pig Apache Pig comes with its own testing framework called PigUnit. Allthough this framework provides sufficient capabilities for basic Pig Testing, it lacks some of the basic features like: - The ability to test scenarios with multiple inputs - Asserting output in a more fuzzy way. It has to match exac...
JavaScript
UTF-8
448
2.765625
3
[]
no_license
for(i=1;i <= 82; i++){ var id = 0 var first = "first" var last = "last" fetch('https://swapi.dev/api/people/'+i+'/') .then(response => response.json()) .then(function(data) { let x = data.name; let split = x.split(' ') let first = split[0] let last = split[1] id = id+1 $("#gall...
Markdown
UTF-8
993
2.96875
3
[ "MIT" ]
permissive
# ASMulator ## Overview Assembly Virtual Machine Emulator written in C++ for a Programming Paradigms course (CS107) bonus assignment. \ Emulates a subset of simplified assembly instruction set of a typical Reduced Instruction Set Computer (RISC) processor. \ The syntax of this assembly language is designed to make it e...
C
UTF-8
1,903
2.9375
3
[]
no_license
/* ** add_mat.c for in /Users/ethankerdelhue/Documents/Shared/Raytracer/src/editeur/ ** ** Made by Ethan Kerdelhue ** Login <kerdel_e@epitech.eu> ** ** Started on Wed Apr 27 16:18:56 2016 Ethan Kerdelhue ** Last update Mon May 16 07:50:21 2016 Philippe Lefevre */ #include "main.h" int push_mat(t_prog *prog, t_...
Java
UTF-8
2,727
2.875
3
[]
no_license
package com.java.domain; import java.io.Serializable; import java.text.NumberFormat; import java.util.Locale; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity public class OrderItem implements Serializable{ private stat...
Markdown
UTF-8
1,990
3.15625
3
[]
no_license
# LeetCode题解(0130):被围绕的区域(Python) 题目:[原题链接](https://leetcode-cn.com/problems/surrounded-regions/)(中等) 标签:深度优先搜索、广度优先搜索、并查集 | 解法 | 时间复杂度 | 空间复杂度 | 执行用时 | | -------------- | ---------- | ---------- | -------------- | | Ans 1 (Python) | $O(N×M)$ | $O(N×M)$ | 164ms (13.72%) | | Ans 2 (Python) | ...
PHP
UTF-8
208
2.609375
3
[]
no_license
<?php $data = include_once "database.php"; $id = $_GET["id"]; array_splice($data, $id, 1); $result = "<?php \n return " . var_export($data, true) . ";"; file_put_contents("database.php", $result); echo "ok";
JavaScript
UTF-8
374
2.734375
3
[]
no_license
const formatter = require('../../shared/formatting/format-puzzle-input'); const buffy = new formatter.Formatter(__dirname).getString(); for (let i = 0; i < buffy.length; i++) { let four = buffy[i]; for (let j = i + 1; j < i + 4; j++) if (buffy[j]) four += buffy[j]; if (four.length === 4 && new Set(four).size ===...
C++
UTF-8
315
2.796875
3
[]
no_license
// // Created by SAURABH on 09-11-2019. // #include<iostream> #include <set> using namespace std; int main(){ string a; getline(cin, a); set<char> l; int i=0; while(a[i]){ if(isalpha(a[i])){ l.insert(a[i]); } i++; } cout<<l.size()<<endl; }
C++
UTF-8
2,613
3.03125
3
[]
no_license
/* @file P03.py @author Austin Vandegriffe @date 2020-07-24 @brief A few solutions to Project Euler question 3 @pre N/A @style K&R, and "one true brace style" (OTBS), and '_' variable naming ///////////////////////////////////////////////////////////////////// @references ## [...
Java
UTF-8
1,184
3.609375
4
[]
no_license
package gumball; /* 당첨 상태(손잡이를 돌린 상태 + 알맹이 하나 더) */ public class WinnerState implements State { GumballMachine gumballMachine; public WinnerState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; } @Override public void insertQuater() { System.out.println("잠시만 기다려 주세요. 알맹이가 나가고 있습니다."...
JavaScript
UTF-8
1,320
3.921875
4
[]
no_license
function maisRepetido(numeros) { let contRepetido = 0; // aqui será salvo o maior contador de nº repetidos no segundo IF e assim, resetar o contNumero; let contNumero = 0; // aqui será salvo quantas vezes o nº repetiu dentro do primeiro IF, depois será resetado; let indexNumeroRepetido = 0; //aqui será salv...
JavaScript
UTF-8
742
2.6875
3
[]
no_license
var socket = io(); var y1 = [1,2], x1 = [1,2]; var data = [ { x:x1, y:y1, type: 'scatter' }]; var layout = { title: 'Temperature', xaxis: { title: 'time (ms)' }, yaxis: { ...
C
UTF-8
5,088
3.890625
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { /** 1. 请写一个ATM程序 定义1个变量,用来存储该ATM机器中剩余的金额 接受用户输入取款金额 由于ATM机器只支持100的票子。 如果用户输入的取款金额不是100的倍数的话,则打印“对不起,本机器无法提供输入的面额” 如果用户输入的取款金额大于了ATM的剩余金额,则打印“对不起,金额不足” 如果用户输入的取款金额是100的倍数,并且小于等于ATM的剩余金额就打印,“正在出钞,请从出钞口拿钱,ATM机器剩余x...
C
UTF-8
1,521
2.59375
3
[ "BSD-2-Clause" ]
permissive
/* * Copyright 2008-2017 Katherine Flavel * * See LICENCE for the full copyright terms. */ #include <assert.h> #include <stdlib.h> #include <fsm/fsm.h> #include <adt/set.h> #include <adt/stateset.h> #include <adt/edgeset.h> #include "internal.h" int fsm_mergestates(struct fsm *fsm, fsm_state_t a, fsm_state_t b...
Java
UTF-8
7,959
1.890625
2
[ "Apache-2.0" ]
permissive
/* * Copyright © 2014 Stefan Niederhauser (nidin@gmx.ch) * * 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
954
2.890625
3
[]
no_license
from twisted.internet import protocol, reactor from time import ctime # 类似socket server的事件驱动网络框架 PORT = 21567 class TSServProtocol(protocol.Protocol): # 客户端连接服务器时,执行 def connectionMade(self): clnt = self.clnt = self.transport.getPeer().host print(f'...connected from:{clnt}...') # 服务器接收到客户端...
Ruby
UTF-8
467
3.890625
4
[]
no_license
def rotate_rightmost_digits(number, n) arr = number.to_s.chars (arr[0..-(n+1)] + rotate_array(arr[-n..-1])).join.to_i end def rotate_array(array) array[1..-1] + [array[0]] end p rotate_rightmost_digits(735291, 1) == 735291 p rotate_rightmost_digits(735291, 2) == 735219 p rotate_rightmost_digits(735291, 3) == 73...
JavaScript
UTF-8
1,854
2.578125
3
[]
no_license
import { PREV_CURRENT_WORD, NEXT_CURRENT_WORD, RESET_CURRENT_WORD, INCREASE_PROGRESS, REMOVE_MODULE, ADD_MODULE, UPDATE_MODULE } from '@/redux/types'; export function rootReducer(action, state) { const payload = action.payload let module let moduleName let words switch (action.type) { case NEXT_CURR...
Python
UTF-8
7,191
2.59375
3
[ "LicenseRef-scancode-public-domain" ]
permissive
#!/usr/bin/env python # encoding: utf-8 import requests import re import string import logging logging.basicConfig(level=logging.ERROR) try: from bs4 import BeautifulSoup except ImportError: from BeautifulSoup import BeautifulSoup from dateutil.parser import parse description_re = re.compile("(?P<seeders>...
Shell
UTF-8
713
3.65625
4
[]
no_license
#!/bin/bash #set -e mkdir -p ${FASTDFS_BASE_PATH} FASTDFS_LOG_FILE="${FASTDFS_BASE_PATH}/logs/${FASTDFS_MODE}d.log" PID_NUMBER="${FASTDFS_BASE_PATH}/data/fdfs_${FASTDFS_MODE}d.pid" echo "尝试启动 $FASTDFS_MODE 节点..." if [ -f "$FASTDFS_LOG_FILE" ]; then rm "$FASTDFS_LOG_FILE" fi # start the fastdfs node. fdfs_${FASTDF...
Python
UTF-8
1,261
2.65625
3
[]
no_license
import re import requests as r import json import pandas as pd from key import * # API Key is provided in a separate file. endpoint = 'https://grcdocs-search.search.windows.net' headers = {'Content-Type': 'application/json', 'api-key': key} api_version = 'docs?api-version=2019-05-06' index = '...
Ruby
UTF-8
1,253
4.625
5
[]
no_license
# Part A # For this part we want you to make a class that represents a CodeClan student. # Create a Class called Student that takes in a name (String) and a cohort (integer) when an new instance is created. # Create a couple of Getter methods, one that returns the name property and one that returns the cohort propert...
Java
UHC
5,232
3.78125
4
[]
no_license
package step4; import java.util.Scanner; //ı DZ α׷ //1) 2) // ==> 1) ı 2) ܵ 3)ڷΰ // ==> 1) ==> ==> Ա ݾ Է ==> ż Է ==> ܵ // 2)ڷΰ // ) ) ܵ 7600̴. 5000 1000¥ 7 //ȭ //ı : 3200 //ı : ?? ( ) //50000 : ?? // 10000 : ?? // 5000 : ?? //1000 : ?? // 500 : ?? // 100 : ?? public clas...
Python
UTF-8
2,071
3.953125
4
[]
no_license
from random import random def printIntro(): print("这个程序模拟两个选手A和B乒乓球竞技比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示):") def getInputs(): a=eval(input("请输入选手A的能力值(0-1):")) b=eval(input("请输入选手B的能力值(0-1):")) n=eval(input("模拟比赛的场次:")) return a, b, n def simNGame(n,probA,probB): winsA, winsB=0,0...
C++
UTF-8
752
2.703125
3
[]
no_license
#ifndef DISPLAY_H #define DISPLAY_H #include<SDL.h> #include<string> #include<glm/glm.hpp> #include"camera.h" class Display{ public: Display(int width, int height, const std::string& title); void clear(float r, float g, float b, float a); void update(Camera& camera); bool isClosed(...
C++
UTF-8
2,667
2.90625
3
[]
no_license
#pragma once #include "../usr_common.h" using namespace std; struct CRange { //implicit template<typename type_t> CRange( __inX type_t* begin, __inX type_t* end = nullptr ) : m_begin(reinterpret_cast<size_t>(begin)), m_end(reinterpret_cast<size_t>(end ? end : begin)) { assert(SBegin() <= SEnd()); ...
C++
UTF-8
782
2.78125
3
[]
no_license
#include "af/TimeMap.h" #include <chrono> #include <map> #include <string> #include <vector> class TimeMap { using time_point = std::chrono::time_point<std::chrono::high_resolution_clock>; explicit TimeMap() { clearTimer(); } void clearTimer() { _lastTimePoint = std::chrono::high_resolution_cloc...
JavaScript
UTF-8
1,133
3.671875
4
[ "Unlicense" ]
permissive
// Do not edit the class below except // for the depthFirstSearch method. // Feel free to add new properties // and methods to the class. class Node { constructor(name) { this.name = name; this.children = []; } addChild(name) { this.children.push(new Node(name)); return this; } depthFirstSea...
C++
UTF-8
694
3.25
3
[]
no_license
#include "stdafx.h" #include "Rectangle.h" Rectangle::Rectangle(vector<vector<int>> points) :leftTop(points[0][0], points[0][1]) , rightBottom(points[1][0], points[1][1]) , width(rightBottom.getX() - leftTop.getX()) , height(rightBottom.getY() - leftTop.getY()) { } int Rectangle::getPerimeter(){ return abs((widt...
JavaScript
UTF-8
624
3.828125
4
[]
no_license
function getCommonElements(array1, array2) { // Пиши код ниже этой строки const getCommonElements = []; for (const number of array1) { if ( array2.includes(number)){ getCommonElements.push(number); } } return getCommonElements; // Пиши код выше этой строки } console.log(getCommonElements([1, 2, 3], [2,...
Markdown
UTF-8
8,167
2.609375
3
[ "MIT" ]
permissive
--- layout: post title: '1° República Brasileira: indígena comunista' author: juan description: categories: - comunismo - história brasileira - indígenas - cristianismo image: assets/images/republica_guarani.jpg --- Em um ano em que estátuas de colonizadores genocidas e estupradores são derrubadas e a população...
C++
UTF-8
2,249
2.828125
3
[]
no_license
#include "pch.h" #include "Powerup.h" Powerup::Powerup(CCLayer *layer, b2World *world, float PTM_RATIO, float posX, float posY, bool isUsed, float setScale) :scale(setScale),location(ccp(((posX + 256/2) * setScale), ((posY + 256/2) * setScale))), used(isUsed) { init(layer, world, PTM_RATIO); } Powerup::~Powerup(v...
C
UTF-8
2,183
2.71875
3
[]
no_license
#ifndef _INTERCODE_H #define _INTERCODE_H #define TEMPVAR 0 #define VARIABLE 1 #define CONSTANT 2 #define VADDRESS 3 #define LABEL 4 #define FUNCTION 5 #define TADDRESS 6 #define ASSIGN_K 0 #define ADD_K 1 #define SUB_K 2 #define MUL_K 3 #define DIV_K 4 #define RETURN_K 5 #define LABEL_K 6 #define GOTO_K 7 #de...
Java
UTF-8
2,925
3.234375
3
[]
no_license
package Battlefield; import AI.AI; import GUI.GUI; import Pokemon.Pokemon; import commands.Command; import observer.Trainer; /** * Creates the Battlefield which keeps track of the currently * selected pokemon as well as the trainers * @author Jacob Knight */ public class Battlefield { private sta...
JavaScript
UTF-8
911
3.171875
3
[]
no_license
document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('.like').forEach(button => { button.onclick = function () { let counter_el = this.parentElement.querySelector('span') let counter = counter_el.innerText if (this.innerHTML.trim() === 'Like') {...
Java
UTF-8
2,766
2.34375
2
[]
no_license
package com.matoosfe.batracking.modelo.dto; public class UsuarioDto { private int idUsuario; private int usuActivo; private String usuApellido; private String usuCorreo; private String usuLogin; private String usuMovil; private int usuNivel; private String usuNombre; private String usuPassword; private Stri...
Swift
UTF-8
3,636
2.640625
3
[]
no_license
// // ResultsTableViewController.swift // PaceCalc // // Created by Remington Breeze on 11/5/15. // Copyright © 2015 Remington Breeze. All rights reserved. // import UIKit class ResultsTableViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() } override f...
C#
UTF-8
6,243
3.71875
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using MoreLinq; namespace SortingSearchingAlgorithms { class Program { static void Main(string[] args) { int arrayLength = 6; // Create and print random 1D array of integers Console.WriteLine("Random Array of Integers"); var intArra...
Java
UTF-8
4,038
3.3125
3
[]
no_license
import org.junit.Test; import org.joda.time.DateTime; public class JUnitTest { @Test public void testFunctionality(){ Student[] students; students = createObjects(); if(students[1] != null){ System.out.println("Student, Courses and Modules objects successfully created"); ...
Markdown
UTF-8
2,098
2.6875
3
[]
no_license
## webapp_phase1 1. Find where to live; 2. Keywords: distance, safety, affordability. 3. Datasets: - [NY Districts geoshapes] [http://services5.arcgis.com/GfwWNkhOj9bNBqoJ/arcgis/rest/services/nycd/FeatureServer/0/query?where=1=1&outFields=*&outSR=4326&f=geojson] [GEOJSON with coordinates of the shapes of the distric...
C++
UTF-8
1,320
2.515625
3
[ "MIT" ]
permissive
/* LED animation pattern functions and variables */ #include <FastLED.h> #define DEBUG_RAINBOW_ANIM 1 // Negligible memory usage, define globally byte rainbowAnim_hue; /** * Initialize memory required to run this animation */ void init_RainbowAnim() { #ifdef DEBUG_RAINBOW_ANIM Serial.println("init ra...
TypeScript
UTF-8
601
2.546875
3
[]
no_license
import Vue from 'vue'; import Component from 'vue-class-component'; @Component export class Join extends Vue { public bookedHotels: Array<number>; public orders: Map<number, object>; public hotels: Map<number, object>; public joinOrdersAndHotelsInfo() { // to use not only in cart page. DRY const join: Ar...
Shell
UTF-8
437
3.09375
3
[]
no_license
#!/bin/sh BASEDIR=$(cd $(dirname $0); /bin/pwd) . $BASEDIR/functions_sirkkalap.sh # From sirkkalap/dotfiles TOP10_VIEW_CMD='zfs list -t snapshot -S refer | head -11' TOP10_CMD='zfs list -H -t snapshot -S refer | head -10' # View top 10 eval $TOP10_VIEW_CMD # Confirm and Destroy top 10 confirm "Are you sure you want ...
Markdown
UTF-8
2,415
2.515625
3
[]
no_license
--- layout: post title: Обновление часовых поясов в Android date: 2015-09-26 12:00:00 +0300 categories: [android, tzupdater] comments: true --- Приложение появилось из-за сложившийся сложной ситуации с обновлением часовых поясов в Android. Международная база данных часовых поясов обновляется каждый месяц, но нет никак...
C++
UTF-8
793
2.71875
3
[ "MIT" ]
permissive
// Arduino library for distance sensors // Copyright 2011-2013 Jeroen Doggen (jeroendoggen@gmail.com) #include <DistanceSensor.h> /// isCloser: check whether the distance to the detected object is smaller than a given threshold boolean DistanceSensor::isCloser(int threshold) { if (threshold>getDistanceCentimeter())...
Java
UTF-8
1,072
3.0625
3
[]
no_license
package console; import logic.Find; import java.io.File; public class FindLauncher { private String[] consoleInput; FindLauncher(String[] input) { consoleInput = input; } public File commandLineChecking() throws Exception { if (consoleInput.length == 0) throw new Except...
Python
UTF-8
85
3.34375
3
[]
no_license
print "Belajar Looping For di Python" i = 0 a = 1 for i in range (10): print a a+=1
Java
UTF-8
6,883
1.9375
2
[]
no_license
package com.BFMe.BFMBuyer.ugc.activity; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; import com.BFMe.BFMBuyer.R; import com.BFMe.BFMBuyer.activity.LoginActivi...
Python
UTF-8
1,248
2.953125
3
[]
no_license
from casadi import * def construct_polynomials_basis(d, poly_type): # Get collocation points tau_root = np.append(0, collocation_points(d, poly_type)) # Coefficients of the collocation equation C = np.zeros((d + 1, d + 1)) # Coefficients of the continuity equation D = np.zeros(d + 1) #...
C++
UTF-8
626
3.40625
3
[]
no_license
#include <iostream> #include <math.h> using namespace std; bool isPrime(int); int main() { int M, N, sum = 0, min = -1; cin >> M >> N; for (; M <= N; ++M) { if (isPrime(M)) { sum += M; if (min == -1) min = M; } } if (sum == 0) { cout << "-1"; } else { cout...
C
UTF-8
647
3.234375
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <string.h> /* for strncpy */ #include <net/if.h> #include "general_socket.h" void get_adapter_ip(char * name) { int fd; struct ifreq ifr; fd = socket(AF_INET, SOCK_DGRAM, 0); // I want to get an IPv4 IP address ifr.ifr_addr.sa_family = AF_INET...
Python
UTF-8
86
3.015625
3
[]
no_license
a, b = map(int,input().split()) c = a + b print(str(a) + "+" + str(b) + "=" + str(c))
C++
UTF-8
1,799
2.640625
3
[]
no_license
#ifndef DAOCONSTANTS_H #define DAOCONSTANTS_H #include<string> #include<iostream> class DAOConstants { public:// constants for employee sql create, update, delete, queries static std::string EMPSKILLSQL_CREATE; static std::string EMPPROJ_CREATE; static std::string EMPACC_CREATE; static std::...
Java
UTF-8
3,662
1.96875
2
[]
no_license
package com.zyao89.view.zloading; import com.zyao89.view.zloading.ball.ElasticBallBuilder; import com.zyao89.view.zloading.ball.InfectionBallBuilder; import com.zyao89.view.zloading.ball.IntertwineBuilder; import com.zyao89.view.zloading.circle.DoubleCircleBuilder; import com.zyao89.view.zloading.circle.PacManBu...
Python
UTF-8
631
4.625
5
[]
no_license
#! python3 # This program says hello and asks for my name print('Hello World!') print('What is your name?') #ask for their name myName = input() print('It is good to meet you, ' + myName) print('The length of your name is:') print(len(myName)) print('What is your age?') #ask for their age myAge = input() print('You ...
Shell
UTF-8
688
3.171875
3
[ "MIT" ]
permissive
#!/usr/bin/env bash DIR=$(pwd) USER="kostya_by" FILES="profile"\ " zshrc"\ " zlogin"\ " gitconfig"\ " vimrc" echo "Creating new symlinks in user's home folder..." for FILE in $FILES; do echo "Create a new symblink for "$FILE". " rm -f "$HOME/.$FILE" ln -s "$DIR/$FILE" "$HOME/.$FILE" echo "Done." done SUBLIM...
PHP
UTF-8
6,458
2.796875
3
[]
no_license
<?php //to init: //http://whatever.herokuapp.com/proxy/TwitterJSONSearchProxy.php?searchTerm=nathank000&test=true&init=true include('../includes/db.php'); //include('../includes/local.php'); //comment added to make sure that I did not eff up git with config edit class TwitterJSONSearchProxy { private $_cachedFilePa...
Java
UTF-8
1,843
2.34375
2
[]
no_license
package com.worldelite.job.service; import com.worldelite.job.entity.CompanyUser; import com.worldelite.job.entity.UserRepository; import com.worldelite.job.exception.ServiceException; import com.worldelite.job.mapper.CompanyUserMapper; import com.worldelite.job.mapper.UserRepositoryMapper; import com.worldelite.job.u...
JavaScript
UTF-8
393
2.6875
3
[]
no_license
"use strict"; const LIB_1 = "Тест1"; const LIB_2 = "Тест2"; const NAME = "Название"; const RESULT = "Результат"; var res = "Результат:"; function test3() { var en = entry(); var lib = libByName("Тест2"); var links = lib.linksTo(en); for (var i =0; i < links.length; i++){ res = res + "\n" + links[i].field(N...
Markdown
UTF-8
2,249
3.375
3
[]
no_license
Made by: Ian Campbell This is an implementation of a hashing table. This hash table deals with collisions by chaining. I’ve chosen to use my own coded linked list as the standard container. This hash table uses the multiplication method to generate hash keys. How to use: Here is a short list of methods availabl...
Markdown
UTF-8
1,083
2.546875
3
[ "MIT" ]
permissive
# 工具栏 {#concept_nh4_kxr_ngb .concept} 您可以通过工具栏功能,实现数据集的协同操作、保存、刷新、同步等操作。 ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/9093/15535828236891_zh-CN.png) - 锁机制:对多人协同操作实现数据保护。 - 同步表结构:此操作可以合并线上物理表新增的表字段,此操作可以用于线上物理表发现改变,如新增了某字段,这样可以很方便的从线上把字段同步下来,如果线上表字段被删除或者更改了字段名,系统将不会对数据集的维度/度量做相应删除处理。 - 刷...
Python
UTF-8
848
3.3125
3
[]
no_license
import numpy as np # circle radius RADIUS = 80; def getBorderLines(circles): lines = [] l = len(circles) for i in range(l): for j in range(i + 1, l): #print (i,j) if checkIntersection(circles, i, j): a = circles[i] b = circles[j] ...
C++
UTF-8
145
2.59375
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main(){ int i; for(i =1; i <11; i++){ cout << i << endl; } return 0; }
Java
UTF-8
372
2.578125
3
[]
no_license
package com.learn.pattern.abstractFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author ymhui * @date 2019/7/20 * @time 17:50 * description */ public class Fruit implements IAbstractPlant { private Logger logger = LoggerFactory.getLogger(Fruit.class); @Override public void ...
C#
UTF-8
1,746
2.9375
3
[]
no_license
using Domain.Entities; using Services.Interfaces.DataContracts.Commands; using Services.Interfaces.DataContracts.Responses; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Services.DataTransformation { public static class QuoteTransformation { public sta...
C++
UTF-8
13,200
3.609375
4
[]
no_license
#include<iostream> #include<string> //header file for inbuilt library string functions. using namespace std; //defining name space in global scope /*------------------------------------------------------------------------------------------------- * Author : Maddula Jaya Kamal(cs19b028) * Code :...
Shell
UTF-8
261
2.921875
3
[]
no_license
#!/bin/bash state=${1}; if [ ${state} = "On" ]; then curl -X PUT --data '{"on":true}' "http://${bridge_ip}/api/${user_id}/lights/${light_id}/state/"; else curl -X PUT --data '{"on":false}' "http://${bridge_ip}/api/${user_id}/lights/${light_id}/state/"; fi
Java
UTF-8
17,834
3.0625
3
[ "MIT" ]
permissive
package tankgame; import static tankgame.GameRun.SCREEN_HEIGHT; import static tankgame.GameRun.SCREEN_WIDTH; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ActionEvent; import java.awt.Rectangle; import java.awt.event.KeyEvent; import java.awt.image.Buffe...
Ruby
UTF-8
445
3.046875
3
[]
no_license
class String define_method(:clock_angle) do result = [] time_input = self.to_i() hour_degree = (time_input * 30) + (self.to_f.-(time_input) * 30) min_degree = (self.to_f.-(time_input) * 12) * 30 hands_difference = hour_degree - min_degree if hands_difference < 0 hands_difference = hands_...
Markdown
UTF-8
1,228
3.015625
3
[]
no_license
# SlottedSlider If for some reason you need a swiftUI slider that looks like Andoid slider then this custom component may be useful to you. ![Screenshot](demoSlider.png) ### Installation 1. Using Xcode go to File > Swift Packages > Add Package Dependency 2. Paste the Modele URL: https://github.com/sarrajbs/Slotte...
Markdown
UTF-8
1,654
3.125
3
[]
no_license
--- title: Thanks for everything Engine Creative! Hi Mindera! summary: "Time moves on, my perception about life has taken shape and my list of priorities have changed order. I am super happy to announce that I am leaving the Engine Creative family to join Mindera!" photo: 2018-05-21.jpg --- Two years ago I was really ...