language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
Python
UTF-8
1,504
3.109375
3
[]
no_license
import numpy as np import pandas as pd import itertools from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import PassiveAggressiveClassifier from sklearn.metrics import accuracy_score, confusion_matrix df = pd.read_csv('news.csv')...
SQL
ISO-8859-1
1,273
4.1875
4
[]
no_license
# a) Listar todos os livros publicados aps 2014 SELECT * FROM LIVRO WHERE YEAR(Publicacao) > 2014; # b) Listar os 10 livros mais caros SELECT Valor FROM LIVRO ORDER BY Valor DESC LIMIT 10; # c) Listar as 5 editoras que mais tem livros na biblioteca SELECT CodEditora, Nome, (SELECT COUNT(L.Ed...
Java
UTF-8
680
3.265625
3
[]
no_license
import java.util.Scanner; import java.text.DecimalFormat; public class Main { public static void main(String[] args){ Scanner teclado = new Scanner(System.in); DecimalFormat teclado2 = new DecimalFormat("0.00"); int codigo1, numpecas1, codigo2, numpecas2; double valorpeca1, valorpeca2, valort; co...
Python
UTF-8
567
3.25
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Fri Sep 2 20:02:52 2016 @author: Matthew """ from lxml import html import requests input_word = input('Enter Word to Define: ') page = requests.get('http://www.urbandictionary.com/define.php?term=' + input_word) tree = html.fromstring(page.content) word_meanin...
Java
UTF-8
3,903
2.140625
2
[]
no_license
package com.gui.product; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSe...
Java
UTF-8
411
2.171875
2
[]
no_license
package frc.robot.movements; import edu.wpi.first.wpilibj.command.TimedCommand; import frc.robot.TechnoTitan; public class Yeet extends TimedCommand { public Yeet() { super(1.75); requires(TechnoTitan.drive); } @Override protected void execute() { TechnoTitan.drive.set(0.80); ...
Python
UTF-8
1,368
4.5
4
[]
no_license
# Tristan Kang # Dec 12th, 2017 # Function Practice # Mr. Allan import math # Chez def cheese(): '''Makes a screen full of I like cheeses!''' print ("I like cheese!" * 200) cheese() # Volume of Sphere def volume_sphere(radius): '''Calculates the volume of a sphere radius is an integer oor float'''...
Java
UTF-8
2,387
2.28125
2
[]
no_license
package com.zz.splitting.config.redis; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.re...
Java
UTF-8
1,018
3.125
3
[ "Apache-2.0" ]
permissive
import java.util.Scanner; /** * @author alpha * @date 2017/10/17 */ public class Solution { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[][] arrayNumber = new int[n][n]; for (int i=0; i<n; i++){ for (int j=0;...
Markdown
UTF-8
510
3.15625
3
[]
no_license
--- title: 测试公式 date: 2018-08-04 23:12:07 tags: mathjax: true --- $f(x_1) = sin(x_1)^2$ $$f(x)= \begin{cases} 0& \text{x=0}\\\\ 1& \text{x!=0} \end{cases}$$ $$ \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $$ $$\begin{bmatrix} {a_{11}}&{a_{12}}&{\cdots}&{a_{1n}}\\\\ {a_{21}}&{a_{22}}&{\cdots}&{a_{2n}}\\\\ {\vdots}&{\vdot...
C++
UTF-8
521
2.609375
3
[]
no_license
#pragma once #include "Sprite2D.h" class AnimationSprite : public Sprite2D { public: AnimationSprite(std::shared_ptr<Models> model, std::shared_ptr<Shaders> shader, std::shared_ptr<Texture> texture, int numFrames, float frameTime, bool isRepeating); ~AnimationSprite(); void Init(); void Draw(); void Update(GLf...
C#
UTF-8
1,482
3.171875
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CustumGenerics.Structures { public class Node<T> { public Node<T> left; public Node<T> right; Node<T> parent; public T Value; int number; ...
Python
UTF-8
2,506
3.046875
3
[ "MIT" ]
permissive
# Author: https://github.com/AYMENJD (AYMEN Mohammed telegram.me/K6KKK). from time import gmtime, sleep, strftime, time import threading from typing import Optional class Stopwatch: def __init__(self) -> None: self.timer = 0 self._pause = False self._stop = False self._saved = [] ...
JavaScript
UTF-8
1,970
2.65625
3
[]
no_license
#!/usr/bin/env node const fs = require('fs') const path = require('path') const { pruneSourcemaps } = require('../src') const args = process.argv.slice() args.shift() // node args.shift() // prune-sourcemaps function printHelp(err=false) { const meth = err ? 'error' : 'log' console[meth]('Usage: npx prune-source...
Java
UTF-8
1,031
3.421875
3
[ "MIT" ]
permissive
package leetcode_problems.medium; import java.util.HashSet; import java.util.Set; public class CheckIfStringContains_1461 { // Time complexity: O(2^k). Space complexity: O(n) public boolean hasAllCodes1(String s, int k) { Set<String> set = new HashSet<>(); for (int i = 0; i < s.length() && k...
Markdown
UTF-8
1,160
2.984375
3
[ "MIT" ]
permissive
# Correlations Discovered Between Health Risks, Age, And Income ## Demo - [Click here](http://jennylynnramz.com/health_risk_dashboard/) ![Preview](https://raw.githubusercontent.com/jennylynnramz/jennylynnramz.github.io/master/Photos/Health-Risk-dashboard.png) ## Description * This project explores correlation betwee...
C++
UTF-8
861
2.640625
3
[]
no_license
#include <iostream> #include "HubCom.h" void HubCom::run() { //receive(); ioService.run(); } void HubCom::receive() { socket.async_receive_from( boost::asio::buffer(data, max_length), serverEndpoint, [this](std::error_code ec, std::size_t bytes_recvd) { if (!ec && ...
C++
UTF-8
401
3.25
3
[ "BSD-3-Clause" ]
permissive
#include "CreditCard.h" CreditCard::CreditCard(int number, int month, int year) : validDate(year, month) { this->setNumber(number); } void CreditCard::setNumber(int number) throw(const string&) { if (number < MIN_NUMBER || number > MAX_NUMBER) { throw "Invalid credit card number input."; } this->number = numbe...
SQL
UTF-8
1,123
4.15625
4
[]
no_license
-- Get titles of indivduals near retirement SELECT e.emp_no, e.first_name, e.last_name, ti.title, ti.from_date, ti.to_date -- INTO retirement_titles FROM employees as e INNER JOIN titles as ti ON (e.emp_no = ti.emp_no) WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31') ORDER BY (e.emp_no); -- Use Dictinct...
Java
UTF-8
5,831
1.84375
2
[]
no_license
package com.walmart.gshop.activities; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.FloatingActionBut...
C#
UTF-8
1,040
3.109375
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace ThreadingExampleProject { public partial class Form1 : Form { ...
JavaScript
UTF-8
221
2.671875
3
[]
no_license
$(document).ready(function() { var $loader = $(".loader"); // Remove our loader from page. // Force it to appear at least 5 seconds. setTimeout(function() { $loader.fadeOut(300); }, 5000); });
Markdown
GB18030
10,052
2.84375
3
[]
no_license
<a name="1" target="_blank"></a> <h1>ũȥũܾ</h1> <img src="http://i.epochtimes.com/assets/uploads/2006/05/605160839441124-594x400.jpg" /> ```diff - 1968ףëɢ԰Ƶй̸ǣʼɽ磬ƶũѧϰĹ̡йʮϡһЩ˵ڻũ塣(AFP/Getty Images) ``` <hr> <p>ڳл60%ʱйʼ˸֡ũȥᶯԱ뷢ȣ뷢չйȣν⡣ԭʵ2005꿪ʼĿٳл̣һ޾ҵٳл</p> <h2><strong>˶ƶٳл</strong></h2> <p>л̶ַһ֣л˿ռһ˿֮ȣɸл֣׼һڶdzл䶯ʣһָʱԤƵƽл䶯ʡڶַҪ...
Python
UTF-8
2,359
2.671875
3
[]
no_license
import tkinter as tk from database import DataBase, verify FT = "Arial 14 bold" class Password(tk.Toplevel): def __init__(self): tk.Toplevel.__init__(self) self.geometry("248x280") self.resizable(0, 0) self.sizefrom(who="user") self.title("Recuperation d'identifiant") ...
C++
UTF-8
228
2.828125
3
[]
no_license
#include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { string X, Y; cin >> X >> Y; if (X < Y) cout << "<"; else if (X > Y) cout << ">"; else cout << "="; cout << endl; return 0; }
C++
UTF-8
364
2.65625
3
[]
no_license
#ifndef _D_TRAPEZOID_H_ #define _D_TRAPEZOID_H_ #include "figure.h" class trapezoid : public figure { public: trapezoid() = default; trapezoid(std::istream& is); double area() const override; point center() const override; std::ostream& print(std::ostream& os) const override; private: point a1...
Swift
UTF-8
405
2.671875
3
[]
no_license
// // DistanceModel.swift // GoogleMap // // Created by Duy Liêm on 10/30/19. // Copyright © 2019 DuyLiem. All rights reserved. // import Foundation import ObjectMapper struct DistanceModel: Mappable { var text: String? var value: Int? init?(map: Map) { } mutating func ...
Python
UTF-8
2,916
2.78125
3
[]
no_license
global N N = 8 global threat_list global board board = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0...
Shell
UTF-8
197
2.890625
3
[]
no_license
#!/bin/bash # echo "sisesta arv suvaline taisarv" read a jaak=$(( $a % 2 )) #arvutab jaaki 2ga jamaisle if [ $jaak -eq 0 ] #kui jaak on null then echo "$a on paaris" else echo "$a on paaritu" fi #
C++
UTF-8
4,909
2.59375
3
[]
no_license
String formularioConfiguracion(){ String tex = ""; int n = WiFi.scanNetworks(); tex += "<p><a href=\"/configuracion/estado\">Estado</a> | <a href=\"/login?DISCONNECT=YES\">Logout</a></p>"; tex += "<fieldset class=\"configuracion\"><legend>Local</legend>"; if (WiFi.status() == WL_CONNECTED) { String cu...
Java
UTF-8
204
1.859375
2
[]
no_license
package com.example.unittestservicelayermockito.service; import java.util.List; public interface GenericService<T, U> { List<T> findAll(); T save(T t) throws Exception; void delete(U u); }
Java
UTF-8
944
1.960938
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.vz.ids.solutions.data.db; import lombok.Data; import org.springframework.data.cassandra.mapping.PrimaryKey; import org.spr...
C++
UTF-8
647
2.765625
3
[]
no_license
#include <iostream> using namespace std; struct ac { int x; int y; }a[50010]; int cmp( const void *a , const void *b ) { struct ac *c = (ac *)a; struct ac *d = (ac *)b; if(c->x != d->x) return c->x - d->x; else return c->y - d->y; } int main () { int i,n; int va,vb; scanf("%d",&n); for ( i ...
JavaScript
UTF-8
1,629
2.9375
3
[]
no_license
import { SET_USER_INPUT, GET_WORDS_ERROR, GET_WORDS_REQUEST, GET_WORDS_SUCCESS } from '../actions/word-actions/getWords'; import { POST_GUESS_ERROR, POST_GUESS_REQUEST, POST_GUESS_SUCCESS } from '../actions/word-actions/postGuess'; const initialState = { words: [], correctOrIncorrect: '', error: nu...
PHP
UTF-8
3,431
2.75
3
[]
no_license
<?php // Includes all objects and services require_once $_SERVER['DOCUMENT_ROOT'].'/library/includes.php'; // Semi Global veriable that works as a query string to load pages $action = filter_input(INPUT_POST, 'action'); if ($action == NULL){ $action = filter_input(INPUT_GET, 'action'); if($action == NULL){ ...
Ruby
UTF-8
2,255
2.59375
3
[ "Apache-2.0" ]
permissive
require 'chef_backup' require 'chef/mixin/deep_merge' require 'optparse' require 'ostruct' add_command_under_category 'backup', 'general', 'Backup the Chef Server', 2 do unless running_config puts '[ERROR] cannot backup if you haven\'t completed a reconfigure' exit 1 end options = OpenStruct.new optio...
Markdown
UTF-8
2,858
2.875
3
[]
no_license
Chapter 5: culture: Travel -------------------------- [Travel](../category/culture/travel/index.html) ----------------------------------------------- Eastown Theatre, Detroit – for Perspective ========================================== ![Easton\_Theatre\_Panorama\_F1](http://i0.wp.com/www.thebookoflife.org/wp-conte...
JavaScript
UTF-8
2,861
3.796875
4
[]
no_license
console.log("Bismillah, calculator coy"); const calculator = { displayNum: "0", operator: null, firstNum: null, waitSecNum: false, }; function updateDisplay() { document.querySelector("#displayNum").innerText = calculator.displayNum; } function clearCalculator() { calculator.displayNum = "0"; calculato...
Java
UTF-8
2,274
3.359375
3
[]
no_license
package Leet; import Leet.GenericDataStructure.LinkedList; import sun.awt.image.ImageWatched; public class L445 { public static void main(String[] args) { new L445().run(); } private void run() { LinkedList ll1 = new LinkedList(); // ll1.add(ll1, new LinkedList(9)); // ll1...
Java
UTF-8
213
1.726563
2
[]
no_license
package com.lifx.Messages.Device; import com.lifx.Messages.DataTypes.Payload; public class GetLocation extends Payload { int code = 48; public GetLocation() {} public int getCode() { return code; } }
C#
UTF-8
3,218
2.84375
3
[ "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Core.GoogleChart { public interface 图表数据支持接口 : 参数支持接口 { } [Serializable] public abstract class 图表数据 : 参数 { public 图表数据() { _数据列表 = new List<List<double>>(); ...
JavaScript
UTF-8
2,374
2.640625
3
[ "MIT" ]
permissive
/* * Copyright 2018 AppNexus Inc.; Conversant, LLC; DMG Media Limited; Index Exchange, Inc.; * MediaMath, Inc.; Oath Inc.; Quantcast Corp.; and, Sizmek, Inc. * Licensed under the terms of the MIT license. See LICENSE file in project root for terms. */ /** * General utility methods */ var utils = (function () { ...
Python
UTF-8
1,507
2.59375
3
[]
no_license
from flask.cli import FlaskGroup from project import create_app, db from project.api.models import Team, Club import csv app = create_app() # new cli = FlaskGroup(create_app=create_app) # new @cli.command() def recreate_db(): db.drop_all() db.create_all() db.session.commit() @cli.command() def add_team...
C++
UTF-8
617
2.671875
3
[]
no_license
/* class SpriteObject: for specific sprite funtionality */ #pragma once #include "TemplateDrawableObject.h" class SpriteObject : public TemplateDrawableObject<sf::Sprite> { public: void setTexture(sf::Texture* t, sf::Vector2f pos, sf::IntRect intRect) override; void setIntRect(sf::IntRect portion...
Markdown
UTF-8
1,050
3.390625
3
[]
no_license
# Class 4 reading notes ## From the Duckett HTML Book ### Chapter 4: "Links" (pg 74-93) * URL means Uniform Resource Locator * To link to parent folder from current page: * `<a href = "..\/pagename.html">Link text</a>` * To link to grandparent folder from current page: * `<a href = "..\/..\/pagename.html">Link...
Java
UTF-8
2,560
2.1875
2
[]
no_license
package name.ixr.nano.common.context; import io.netty.handler.codec.http.Cookie; import io.netty.handler.codec.http.CookieDecoder; import io.netty.handler.codec.http.HttpHeaders; import name.ixr.nano.common.utils.AntPathMatcherUtils; import name.ixr.nano.common.utils.I18nUtils; import org.apache.commons.lang3.ArrayUti...
C#
UTF-8
3,915
3.578125
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Common.ExtensionMethod { public static class StringExtension { /// <summary> /// count words in this string /// </summary> /// <param name="str">string</param> ...
PHP
UTF-8
2,595
2.59375
3
[]
no_license
<?php //* This file handles pages, but only exists for the sake of child theme forward compatibility. //* Add custom body class to the head add_filter( 'body_class', 'thegreenman_body_class_contact' ); function thegreenman_body_class_contact( $classes ) { $classes[] = 'contact'; return $classes; } add_actio...
Markdown
UTF-8
503
3.421875
3
[]
no_license
## 183. Customers Who Never Order(Easy) requirement: all customers who never order anything. example: table name : Customers | Id | Name | |----|-------| | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | table name : Orders | Id | CustomerId | |----|------------| | 1 | 3 | | 2 | 1 ...
Java
UTF-8
1,498
2.328125
2
[]
no_license
package gd.rf.theoneboringmancompany.growham.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; import gd.rf.theoneboringmancompany.growham.Main; import gd.rf.theoneboringmancompany.growham.actors.Back; import gd.rf.theoneboringmancompany.growham.actors.score.ScoreTable; import gd.rf.theonebor...
Java
UTF-8
2,217
2.46875
2
[]
no_license
package com.vlms.sjsu.servlets; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;...
JavaScript
UTF-8
433
2.875
3
[]
no_license
var calculator = function() { function add(v1, v2) { return v1 + v2; }; function subtract(v1, v2) { return v1 - v2; }; function multiply(v1, v2) { return v1 * v2; }; function divide(v1, v2) { return v1 / v2 + 0; } return { add: add, ...
C#
UTF-8
519
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CreatingQuaqe { class Program { static void Main(string[] args) { Queue<int> callerIds = new Queue<int>(); callerIds.Enqueue(1); cal...
Markdown
UTF-8
1,027
2.890625
3
[ "MIT" ]
permissive
--- layout: post title: "Typography of A. Lange &amp; Söhne" date: 2017-01-09 01:17:50 -0500 external-url: https://andlarry.com/journal/watch-the-type tags: - watches - design - typography --- &Larry has a terrific writeup of the intricate focus on typography that the A. Lange & Söhne watchmakers employ when designing...
PHP
UTF-8
3,921
2.9375
3
[ "MIT" ]
permissive
<?php namespace Rakit\Curl; class Response { protected $info; protected $body; protected $error; protected $error_message; protected $header_string; protected $parsed_headers = array(); protected $cookie = array(); public function __construct(array $info, $response, $errno, $er...
JavaScript
UTF-8
1,611
2.609375
3
[ "MIT" ]
permissive
// use helper method to generate an array of image urls. We have 34 frames in total var frames = SpriteSpin.sourceArray('slider/images/elephant/DSC_{frame}.jpg', { frame: [407, 436], digits: 4 }); // these are the frame numbers that will show a detail bubble var details = [407, 436]; // the current index in th...
JavaScript
UTF-8
2,947
3.390625
3
[]
no_license
/** * Module for CardTable. * * @author: ProfessorPotatis * @version 1.0.0 */ 'use strict'; /** * Creates a JavaScript CardTable instance. * * @constructor * @param {string} pShowHand - Players cards on hand. * @param {string} pSumCards - Players sum of cards on hand. * @param {string} dShowHand - Dealers...
Python
UTF-8
2,195
2.6875
3
[]
no_license
import pygame,sys,random from pygame.locals import * pygame.init() fen=pygame.display.set_mode((181,179)) etat_initial=[[3,2,7],[8,6,9],[1,5,4]] def position_case_vide (tableau): for i in range(3): for j in range(3): if tableau[i][j] ==9: return [i,j] def initImages():#Chargement images images=...
PHP
UTF-8
621
2.578125
3
[ "BSD-3-Clause" ]
permissive
<?php /** * @copyright Copyright (c) 2016 by 1-more-thing (http://1-more-thing.com) All rights reserved. * @license BSD */ namespace airmoi\FileMaker\Command; use airmoi\FileMaker\Object\Result; /** * Command class that finds one random record. * Create this command with {@link FileMaker::newFindAnyCommand()}. ...
Python
UTF-8
7,049
3.015625
3
[ "BSD-3-Clause" ]
permissive
""" Four sets of routing tables are produced for the same network: * With keys assigned using a Hilbert Curve (this will tend to ensure that similar keys originated in physical proximal chips) * With keys assigned using the (x, y, p) of each core - a common SpiNNaker approach * With keys assigne...
Java
UTF-8
2,378
3.96875
4
[]
no_license
package com.chandu.recursion; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Print inorder traversal of tree using recursion * Try the same without using recursion */ public class InorderTreeTraversal { public static void main(String[] args) throws IOExcepti...
TypeScript
UTF-8
844
2.921875
3
[]
no_license
import { ActionType } from './type' import { Tool, pencil, eraser } from 'models/tool' export const toolsReducer = ( tools: Tool[] = [pencil, eraser], action: ActionType ): Tool[] => { switch(action.type) { case 'SELECT_TOOL': console.log('select tool', action.tool) return tools.map(t => ...
C#
UTF-8
6,464
2.5625
3
[]
no_license
extern alias CZ; using System; using System.Collections.Generic; using System.Linq; using System.Text; using FinstatApi.ViewModel; namespace DesktopFinstatApiTester.ViewModel { public class Limit : ViewModel, IModelViewModel<FinstatApi.ViewModel.Limit>, IModelViewModel<CZ::FinstatApi.ViewModel.Limit> { ...
Java
UTF-8
5,974
1.789063
2
[]
no_license
/******************************************************************************* * Copyright (c) 2013, Salesforce.com, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistr...
C
UTF-8
5,472
3.015625
3
[]
no_license
/** * @file list.c * * @date 2009-05-22 * @author Jean-Lou Dupont */ #include "cjld.h" #include "macros.h" cjld_list *cjld_list_create(int id, void (*cleaner)(void *el, int id)) { cjld_list *tmp=NULL; tmp = (cjld_list *) malloc( sizeof(cjld_list) ); if (NULL==tmp) return NULL; tmp->count = 0; tm...
C++
UTF-8
852
2.734375
3
[]
no_license
#include<iostream> #include<string> #include<string.h> #include<stdio.h> #include<stdlib.h> #include<vector> #include<math.h> #include<unordered_map> #include<unordered_set> #include<algorithm> #include<set> using namespace std; int ha[256]; int fibo[11] = {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89}; bool isF(string &s, in...
C++
UTF-8
1,696
3.109375
3
[]
no_license
/************************************************************************* > File Name: 071_SimplifyPath.cpp > Author: Sheng Qin > Mail: sheng.qin@yale.edu > Created Time: Tue Sep 6 16:50:26 2016 ************************************************************************/ #include<iostream> #include<vector> using ...
C#
UTF-8
3,061
2.625
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient; namespace GamesManager { public partial class FormLeagues : Form ...
Java
UTF-8
2,378
2.265625
2
[]
no_license
package com.strr.mall.generator.dao.impl; import com.strr.mall.common.Constant; import com.strr.mall.generator.dao.TableInfoDao; import com.strr.mall.generator.entity.TableInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework....
Shell
UTF-8
529
3.34375
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env bash # Configure /etc/haas.cfg if [ "$DB" == sqlite ]; then mkdir /sqlite DATABASE_URI="sqlite:////sqlite/haas.db" elif [ "$DB" == postgresql ]; then : fi sed -e " s|%DATABASE_URI%|$DATABASE_URI|g; " -i /etc/haas.cfg cd /etc && haas-admin db create if [ "$DB" == sqlite ]; then # S...
PHP
UTF-8
1,182
2.875
3
[ "MIT" ]
permissive
<?php class IncidentType extends Eloquent { /** * The database table used by the model. * * @var string */ protected $table = 'incident_types'; protected $primaryKey = 'incident_type_id'; public $timestamps = false; public static $medical = array(1, 2, 3, 4, 5); public stat...
Ruby
UTF-8
4,883
2.546875
3
[]
no_license
#!/usr/bin/ruby #------------------------------------------------------------------------------- # To do: # * prettyify fstab, align columns, etc. #------------------------------------------------------------------------------- def usage puts <<End Options: --no-color -- disable color End exit 1 end #-------...
Java
UTF-8
1,008
2.125
2
[ "MIT" ]
permissive
package com.ixnah.mc.protocol.mixin.client.multiplayer; import com.ixnah.mc.protocol.UriServerAddress; import net.minecraft.client.multiplayer.ServerAddress; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.sponge...
PHP
UTF-8
1,236
3.046875
3
[]
no_license
<?php /** * Convert Markdown text to HTML * * Right now, this is simply a bridge to cqMarkdown class static functions. * I have some interesting ideas for the future. * * @param string $text * @return string * @see cqMarkdown::doConvert() */ function convert_markdown_text($text) { return cqMarkdown:...
JavaScript
UTF-8
841
3.09375
3
[]
no_license
let input = document.getElementById ('myinput') let addBtn = document.querySelector('.addBtn') let list=document.querySelector('#myUl') function addToDo(){ let text=document.createTextNode(input.value); addToDo() let li=document.createElement('li'); li.appendChild(text); if (input.value){ list.appendChild(...
Java
UTF-8
4,661
2.015625
2
[ "LicenseRef-scancode-public-domain" ]
permissive
package se.datahamstern.external.osm; import com.sleepycat.persist.EntityCursor; import org.apache.commons.io.IOUtils; import org.apache.xerces.parsers.DOMParser; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.w3c.dom.*; import se.datahamstern....
SQL
UTF-8
6,716
3.390625
3
[]
no_license
CREATE OR REPLACE PACKAGE BODY EcDp_Well_Shipper IS /**************************************************************** ** Package : EcDp_Well_Shipper, body part ** ** $Revision: 1.6 $ ** ** Purpose : Finds well shipper properties. ** ** Documentation : www.energy-components.com ** ** Created : 10.05....
PHP
UTF-8
4,927
3.296875
3
[ "MIT" ]
permissive
<?php namespace umbalaconmeogia\phputil\calculation; /** * Convert between number systems. */ class NumberSystem { const DIGIT_BINARY = '01'; const DIGIT_OCTAL = '01234567'; const DIGIT_DECIMAL = '0123456789'; const DIGIT_HEXADECIMAL = '0123456789ABCDEF'; const DITGIT_LOWER_CASE = '0123456789abcd...
Java
UTF-8
615
3.15625
3
[]
no_license
package model.entity; import utilityclasses.Pair; /** * interface for every entity in the game. */ public interface Entity { /** * Method to get the position of the entity. * @return a Pair that describes the position of the entity */ Pair<Integer, Integer> getLocation(); /** * ...
Ruby
UTF-8
320
3.546875
4
[]
no_license
class Klasa def metoda_pierwsza zmienna1 = 1 end end module Modul def funkcja_1 @funkcja_1 ||= Klasa.new #works only if variable is named like a function end end include Modul funkcja_1 [1,1,1,1].each do |amount| puts funkcja_1.metoda_pierwsza #so You don't have to put "@" before variable end
Java
UTF-8
146
1.859375
2
[]
no_license
package com.epam.javaIntro.service; public interface UserService { boolean logination(String login, String password) throws ServiceException; }
Markdown
UTF-8
7,866
2.546875
3
[ "MIT" ]
permissive
--- layout: post title: Livox Mid-40 LiDAR review description: "Recently I've been testing the performance of Livox Mid-40 LiDAR. This blog post contains my thoughts on using this sensor, it's performance and available ROS node." modified: 2019-02-15 comments: true tags: [ROS, Robotics, Sensors] image: feature: livox...
C++
UTF-8
12,806
2.640625
3
[]
no_license
#include "MeltingPotOnline.hxx" #include "authorException.hxx" #include "fileException.hxx" #include "topicException.hxx" #include "clientException.hxx" #include "channelException.hxx" //This function is the constructor of the class MeltingPotOnline::MeltingPotOnline(){ _catalogue = ""; _topicDescription = ...
JavaScript
UTF-8
952
4.25
4
[]
no_license
'use strict'; // 0. let a = true; let b = false; // 1. console.log(a && b); // a is true but b is false so the expected result is false console.log(a || b); // a is true so the expected result is true console.log(!(a && b)); // the result of (a && b) is false so the opposite would be true // 2. let x = 112; let y =...
Java
UTF-8
13,340
2.421875
2
[]
no_license
package interfaz; import dominio.Adoptante; import dominio.Mascota; import dominio.Sistema; import javax.swing.DefaultComboBoxModel; import logicanegocio.LogicaMascota; class PanelAdopcion extends javax.swing.JPanel { public PanelAdopcion() { initComponents(); this.modeloComboMascotasParaAdo...
C#
UTF-8
6,382
2.6875
3
[]
no_license
using Unity.Collections; using Unity.Mathematics; public static class KdTreeUtility { public const int MAX_LEAF_SIZE = 5; public struct TreeNode { public int begin; public int end; public int left; public int right; public float maxX; public float maxY;...
JavaScript
UTF-8
11,138
2.75
3
[]
no_license
function InputBox (input, textBox, onSubmit, initialText = "") { this.input = input; this.charBuffer = initialText; this.onSubmit = onSubmit; this.textBox = textBox; this.required = true; this.cursorBlinkState = true; this.cursorIndex = 0; this.selectionIndex = null; } InputBox.prototyp...
PHP
UTF-8
2,594
2.671875
3
[]
no_license
<?php class Page { static function header($title) { ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> ...
Java
UTF-8
1,101
3.875
4
[]
no_license
import java.util.concurrent.Callable; public class MyCallable implements Callable { private Integer messageCount; private Integer sleepTime; private Integer cycleCount; public MyCallable(String name, Integer sleepTime, Integer cycleCount) { this.sleepTime = sleepTime; this.messageCoun...
C#
UTF-8
3,485
2.609375
3
[]
no_license
using System.Threading.Tasks; using UserRegistrationSystem.Core.Repositories; using UserRegistrationSystem.Infrastructure.RelationalDatabase; using UserRegistrationSystem.Infrastructure.Mapping.DBModelsMapping; using Microsoft.EntityFrameworkCore; using Microsoft.AspNetCore.Identity; using UserRegistrationSystem.Core....
Shell
UTF-8
843
3.109375
3
[]
no_license
#!/bin/bash #Setup disk and copy and configure various parts of the Arch install. pvcreate /dev/mapper/cryptlvm vgcreate system /dev/mapper/cryptlvm lvcreate -L 8G system -n swap lvcreate -L 32G system -n root lvcreate -l 100%FREE system -n home mkfs.ext4 /dev/system/root mkfs.ext4 /dev/system/home mkfs.fat -F32 /dev...
PHP
UTF-8
5,742
2.65625
3
[]
no_license
<?php namespace App\Lib\ImageDownloader; use Goutte\Client as GoutteClient; use Ramsey\Uuid\Uuid; use GuzzleHttp\Exception\RequestException; use App\Stpack; use App\Sticker; use Exception; use App\Lib\Telegram\Api; use Config; class Line { public function __construct(){} /** * downlolad sticker from li...
C#
UTF-8
1,727
3.09375
3
[ "MIT" ]
permissive
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace YiSha.Util { public class ReflectionHelper { private static ConcurrentDictionary<string, object> dictCache = new ConcurrentDictionary<string, object>(); #...
Python
UTF-8
2,767
3.71875
4
[]
no_license
import math import function as function class Main: f = function.Function() e = 0.001 def __init__(self, epsilon=0.001): e = epsilon def newtons_method(self, start_approximation, func): while start_approximation > 0\ and ((self.f.function(0)) * (self.f.function(start_ap...
PHP
UTF-8
3,711
2.8125
3
[]
no_license
<?php require_once dirname( __FILE__ ) . '/../lib/SmashingBase.php'; require_once 'PHPUnit/Framework/Constraint/IsInstanceOf.php'; require_once 'PHPUnit/Framework/Constraint/IsType.php'; /** * These tests cover our SmashingBase class. There are quite a few mock * objects involved here because the SmashingBase cla...
Java
UTF-8
1,099
2.578125
3
[]
no_license
package com.websystique.springmvc.dtos; import com.websystique.springmvc.pojos.City; public class CityDTO { private int id; private String city; private String uuid; private CountryDTO country; private byte isDeleted; public CityDTO() { } public CityDTO(String id) { this.id = Integer.parseInt(id); } p...
Shell
UTF-8
1,381
2.671875
3
[]
no_license
# The following lines were added by compinstall zstyle ':completion:*' completer _complete _ignored zstyle :compinstall filename '/home/antonioh/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall # Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 unsetop...
JavaScript
UTF-8
5,929
2.984375
3
[]
no_license
var move_up = 0; var move_down = 0; var hit = new sound("hit.mp3"); var bgm = new sound('bgm_3.mp3'); var gameover = new sound("gameover.mp3"); var canvas = document.getElementById("game_area"); var pad1 = canvas.getContext("2d"); var pad2 = canvas.getContext("2d"); var object = canvas.getContext("2d"); var pongball = ...
Java
UTF-8
9,303
2.859375
3
[]
no_license
package org.kerw1n.javautil.file; import org.apache.commons.lang3.StringUtils; import org.apache.poi.POIXMLDocument; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import...
TypeScript
UTF-8
3,413
2.5625
3
[ "MIT" ]
permissive
import { Request, Response } from 'express'; import { check } from 'express-validator'; import dbAppointments from '../db/appointments'; import dbPatient from '../db/patients'; import dbPsychologists from '../db/psychologists'; import asyncHelper from '../utils/async-helper'; import CustomError from '../utils/CustomEr...