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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 3,584 | 2.609375 | 3 | [] | no_license | package com.example.ccei.compoundwidget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
/**
* Created by ccei on 2016-07-06.
*/
// ... |
PHP | UTF-8 | 1,095 | 2.640625 | 3 | [
"OSL-3.0",
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"MIT"
] | permissive | <?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Usps\Model\Source;
use Magento\Shipping\Model\Carrier\Source\GenericInterface;
use Magento\Usps\Model\Carrier;
/**
* Generic source
*/
class Generic implements GenericInterface
{
/**
* ... |
Python | UTF-8 | 2,639 | 3.96875 | 4 | [
"MIT"
] | permissive | '''
1091. Shortest Path in Binary Matrix Medium
In an N by N square grid, each cell is either empty (0) or blocked (1).
A clear path from top-left to bottom-right has length k if and only if it is composed of cells C_1, C_2, ..., C_k such that:
Adjacent cells C_i and C_{i+1} are connected 8-directionally (ie., they ... |
Go | UTF-8 | 2,885 | 2.515625 | 3 | [] | no_license | package service
import (
"allsum_oa/model"
"bytes"
"common/lib/push"
"encoding/json"
"fmt"
"github.com/astaxie/beego"
"net"
"net/http"
"time"
)
func CreateMsg(m *model.Message) (err error) {
err = model.NewOrm().Table(model.Public + "." + model.Message{}.TableName()).Create(m).Error
return
}
func GetHisto... |
Markdown | UTF-8 | 3,855 | 2.703125 | 3 | [] | no_license | # CouchImport
## Introduction
When populating CouchDB databases, often the source of the data is initially a CSV or TSV file. CouchImport is designed to assist you with importing flat data into CouchDB efficiently.
* simply pipe the data file to 'couchimport' on the command line
* handles tab or comma separated dat... |
Markdown | UTF-8 | 4,113 | 2.9375 | 3 | [
"LicenseRef-scancode-public-domain",
"Zlib"
] | permissive | Ed25519
-------
This is a portable implementation of [Ed25519](http://ed25519.cr.yp.to/) based
on the SUPERCOP "ref10" implementation. All code is in the public domain.
All code is pure ANSI C without any dependencies, except for the random seed
generation which uses standard OS cryptography APIs. If you wish to be e... |
C++ | SHIFT_JIS | 2,452 | 2.640625 | 3 | [] | no_license | #include "Enemy.h"
#include "EnemyAI.h"
#include "MessageManager.h"
/// <summary>
///
/// </summary>
/// <param name="_enemy">GIuWFNgւ̃|C^</param>
void EnemyAI::initialize(Enemy* _enemy) {
pos = &_enemy->pos;
vel = &_enemy->vel;
targetPos = nullptr;
}
/// <summary>
///
/// </summary>
/// <param name="_enemy">GI... |
PHP | UTF-8 | 210 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
$firstNumber = doubleval(readline());
$secondNumber = doubleval(readline());
$eps = 0.000001;
$diff = abs($firstNumber - $secondNumber);
if ($diff < $eps) {
echo "True";
} else {
echo "False";
}
|
JavaScript | UTF-8 | 4,041 | 3.109375 | 3 | [] | no_license | import React, { useState } from "react";
import Header from "./components/Header";
// Putting the api key into a base and a key inside an object
// **********************************************************
const api = {
key: process.env.REACT_APP_WEATHER_KEY,
base: "https://api.openweathermap.org/data/2.5/",
};
c... |
Python | UTF-8 | 1,168 | 2.796875 | 3 | [] | no_license | import tkinter
master = tkinter.Canvas(width=300, height=600)
master.pack()
files = ["karta1.png", "karta2.png", "karta3.png", "karta4.png"]
imgs = []
for i in range(len(files)):
imgs.append([tkinter.PhotoImage(file=files[i]), 1, 0])
master.create_image(150, 50 + 80*i, image = imgs[i][0])
imgs[i][2] = mast... |
C++ | UTF-8 | 588 | 3.375 | 3 | [
"Apache-2.0"
] | permissive | #include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
int main()
{
const int arr_size = 10;
vector<int> ivec;
int ia[arr_size];
int num;
cout << "Push " << arr_size << " integers into the vector: " << endl;
for(int i = 0; i < arr_size; ++i)... |
Java | UTF-8 | 782 | 2.578125 | 3 | [] | no_license | package additionalInfo;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
/**
* Class to test results
*/
public class Tests {
public static void main(String[] args) {
Routes routes = new Routes();
ResultSet result;
try {
... |
JavaScript | UTF-8 | 3,416 | 3.015625 | 3 | [] | no_license | //This library handles the protocol buffers required to get the MTA data in a useful format
const MtaGtfsRealtimeBindings = require("mta-gtfs-realtime-bindings");
//Request-promise is used instead of something like axios because it's simpler to decode binary responses using a protocol buffer in r-p
const rp = require("... |
Java | UTF-8 | 2,068 | 2.84375 | 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 util;
/**
*
* @author ACER
*/
public class MyToys {
// bộ thư viện các hàm xài chung, cho nên chúng là static
... |
Go | UTF-8 | 982 | 2.578125 | 3 | [] | no_license | package main
import "ayu/server"
import "ayu/server/storage/local"
import "flag"
import "fmt"
import "log"
import "net/http"
var host = flag.String("host", "localhost", "Hostname to bind HTTP server on")
var port = flag.Int("port", 8027, "TCP port to bind HTTP server on")
var static_data_dir = flag.String("static_dat... |
Java | UTF-8 | 17,103 | 2.09375 | 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 aoop_ecommerce1;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql... |
Java | UTF-8 | 1,205 | 4.03125 | 4 | [] | no_license | package chapterfive.classdesign.understandingpolymorphism;
public class CastingObjects {
// polymorphism: the property of an object to take on many different forms
// 1 - Casting an object from a subclass to a superclass doesn’t require an explicit cast.
// 2 - Casting an object from a superclass to a su... |
Java | UTF-8 | 276 | 2.140625 | 2 | [] | no_license | package io.github.eugenezakhno;
public class Main {
public static void main(String[]args){
MyObject myObject = new MyObject();
myObject.i = 1;
MyObject myObject1 = myObject;
myObject.i = 2;
}
}
class MyObject {
int i;
}
|
Python | UTF-8 | 1,262 | 3.84375 | 4 | [] | no_license | # [8.8] Permutation with Dups: Write a method to computer all
# permutations of a string whose characters are not necessarily
# unique. The list of permutations should not have duplicates.
import unittest
def perms_with_dups(s):
char_count = get_char_count(s)
result = []
perms_with_dups_helper('', char_co... |
PHP | UTF-8 | 1,869 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Apaar
* Date: 2016-03-06
* Time: 1:24 AM
*/
namespace Apaar\Chat;
use Ratchet\ConnectionInterface;
use Ratchet\MessageComponentInterface;
/**
* Class Server
* @package Apaar\Chat
*/
class Server implements MessageComponentInterface
{
/**
* @var ConnectionInte... |
C# | UTF-8 | 2,051 | 2.65625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Destroyable : MonoBehaviour, IDamagable
{
[SerializeField]
float health = 50;
AudioSource audioSource;
ParticleSystem ps;
[SerializeField]
bool dealtDamage = false;
[SerializeField]
... |
JavaScript | UTF-8 | 357 | 3.171875 | 3 | [] | no_license | function getRandomIndex(array) {
const size = array?.length;
if (Array.isArray(array) && size > 0) {
const random = Math.floor(Math.random() * size);
if (random < 0) {
return 0;
} else if (random >= size) {
return size - 1;
} else {
return random;
}
} else {
return -1;
... |
Java | UTF-8 | 289 | 2.453125 | 2 | [] | no_license | package com.sofkau.exercises;
import Exercise17.Electrodomestico;
public class Controller_ex_17 {
public void excersice17_methods(){
Electrodomestico electro = new Electrodomestico();
double price = electro.final_price();
System.out.println(price);
}
}
|
C | UTF-8 | 1,854 | 3.125 | 3 | [] | no_license | /*
* Cliente con Transmission Control Protocol (TCP).
* Fecha 28/09/2014
* Lizandro Jose Ramirez Difo
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/types.h>
#define SERVER_PORT 9999
#define BUFFER_LEN... |
Java | UTF-8 | 1,665 | 3.328125 | 3 | [] | no_license | package com.neuedu.GouZao;
public class hone1 {
//1 有五个学生,每个学生有3门课的成绩,从键盘输入以上数据(包括学生号,姓名,三门课成绩),计算出平均成绩
// public class Student {
// private String sname;
// private int sno;
// private int student1;
// private int student2;
// private int student3;
//
// public Strin... |
Java | UTF-8 | 405 | 2.640625 | 3 | [] | no_license | package pl.sda.zadania_05_25.builder;
public class BuilderMain {
public static void main(String[] args) {
ChartDataBuilder builder = new ChartDataBuilder();
ChartData data = builder.build();
System.out.println(data);
builder.setMaxValue(30);
builder.setLineColour(12345);
... |
Java | UTF-8 | 47,340 | 1.703125 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
Java | UTF-8 | 807 | 3.40625 | 3 | [] | no_license | package StringEquality;
public class StringEquality{
private String wordOne , wordTwo;
public StringEquality(){
wordOne = wordTwo = null;
}
public StringEquality(String tempOne , String tempTwo){
wordOne = tempOne;
wordTwo ... |
C | UTF-8 | 128 | 2.71875 | 3 | [] | no_license | #include <errno.h>
void errore(char*str,int n)
{
printf(str);
printf("%s(%d)\n",strerror(errno),errno);
exit(n);
}
|
TypeScript | UTF-8 | 973 | 3.03125 | 3 | [] | no_license | export class Renter {
constructor(
public $key: string,
public title: string,
public type: string,
public name: string,
public phoneCell: string,
public phoneOffice: string,
public email: string,
public website: string,
public image: string,
... |
Markdown | UTF-8 | 1,470 | 2.78125 | 3 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ---
---
---
title: 诚和气节 陶冶暴恶
---
遇欺诈之人,以诚心感动之;遇暴戾之人,以和气薰蒸之;遇倾邪私曲之人,以名义气节激励之。天下无不入我陶冶中矣。
释义
遇到狡猾欺诈的人,要用赤诚之心来感动他;遇到性情狂暴乖戾的人,要用温和态度来感化他;遇到行为不正自私自利的人,要用大义气节来激励他。假如能做到这几点,那天下的人都会受到我的美德感化了。
新解
以德化之,如春风潜入,徐徐铺展,则坚冰必摧,枯木吐新。在圣贤之人,此等胸怀自可备之,而在一般人,可不懈努力,尽心去做。清末,在捻军围攻河南固始时,蒯知县出布告招募死士守城,以他的闺女为赏格。有一人叫张曜,应募破敌,就娶蒯知县之女为妻,并且做了官。张曜不... |
Java | UTF-8 | 295 | 1.945313 | 2 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | package org.immutizer4j.test.sample;
import lombok.Data;
/**
* A POJO that will be used as an ancestor for other POJOs
* Contains a mix of mutable and non-mutable fields
*/
@Data
public class ParentPojo {
private final int parentImmutableInt = 0;
private int paretMutableInt = 0;
}
|
C++ | UTF-8 | 1,765 | 2.5625 | 3 | [] | no_license | #include <larc.hh>
#include <organize.h>
#include <matrix_store.h>
#include "support.hh"
void initialize ( )
{
// Default hash exponent size
size_t hash_exponent_matrix = DEFAULT_MATRIX_STORE_EXPONENT;
size_t hash_exponent_op = DEFAULT_OP_STORE_EXPONENT;
int zerobitthresh = ZEROBITTHRESH_DEFAU... |
Java | UTF-8 | 688 | 1.90625 | 2 | [] | no_license | package com.speedata.webplus.system.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.speedata.webplus.common.persistence.BaseDaoImpl;
import com.speedata.webplus.common.ser... |
C# | UTF-8 | 2,605 | 3.09375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.Linq;
using HaminChecker.Declares;
namespace HaminChecker.Utils {
/// <summary>
/// DB検索
/// </summary>
public class DbSearch : IDisposable {
SQLiteConnection conn;
DateTime StandardTime;
/// <summary>
/// コンストラクタ
/... |
Markdown | UTF-8 | 4,787 | 2.90625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Butler Configuration for supporting S3
## Overview
The butler configuration file is similar to that explained in the README.md file. But there are a few changes that need to made for it to fetch config files from AWS S3.
Only the Butler configuration fields that will be different for S3 are explained here. Everythin... |
Go | UTF-8 | 333 | 3.234375 | 3 | [] | no_license | package bubblesort
import "github.com/marksalpeter/algorithms/sortable"
// Sort implements the bubble sort algorithm
// O(n^2)
func Sort(s sortable.Sortable) {
swap := -1
for pass := 0; swap != 0; pass++ {
swap = 0
for i, l := 1, s.Len()-pass; i < l; i++ {
if !s.Less(i-1, i) {
s.Swap(i-1, i)
swap++
... |
Markdown | UTF-8 | 2,304 | 2.75 | 3 | [] | no_license | # SYS: Income-Inequality & Personality Facets related to Agression (2019)
This dataset used included 1029 adolescents from the Saguenay Youth Study (SYS) who inhabit the Saguenay Lac Saint-Jean region in Quebec, Canada (data is proprietary so it cannot be released here). Information consisted of:
• Census Tract Area ... |
Python | UTF-8 | 1,171 | 3.84375 | 4 | [] | no_license |
num=100
for Number in range (1, num):
count = 0
for i in range(2, (Number//2 + 1)):
if Number % i == 0:
count = count + 1
break
if count == 0 and Number != 1:
print(Number, end = ' ')
'''
Test Cases:
1. Verify the program if number is 100 , all prime number should ... |
TypeScript | UTF-8 | 2,892 | 3.25 | 3 | [] | no_license | /**
* board.js
*
* A JavaScript class to represent a board in our Agile Development Board.
*
* @author Ellery De Jesus
* @author Chris Wolf
* @version 2.0.0 (October 7, 2019)
*/
import { List } from '../lists/List';
import { ListFactory } from '../factories/ListFactory';
import { ListOptions } from '../enums/L... |
Java | UTF-8 | 2,210 | 2.796875 | 3 | [] | no_license | package fr.gnokize.object;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
public c... |
Java | UTF-8 | 972 | 1.578125 | 2 | [] | no_license | //
// Decompiled by Procyon v0.5.30
//
package com.BV.LinearGradient;
import java.util.Arrays;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import java.util.Collections;
import com.facebook.react.bridge.Java... |
Java | UTF-8 | 4,373 | 2.328125 | 2 | [] | no_license | package edu.cnt.peers;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Vector;
import edu.cnt.common.Constants;
import edu.cnt.common.SortedArrayList;
import edu.cnt.message.P2PMessage;
/**
* @author pratiksomanagoudar
*
*/
public class PeerHandler {
private... |
C++ | UTF-8 | 1,849 | 2.515625 | 3 | [] | no_license | #ifndef GAMEMANAGER_H
#define GAMEMANAGER_H
#include "Singleton.h"
#include "ScreenManager.h"
#include "DebugManager.h"
#include "InputManager.h"
#include "ShaderManager.h"
#include "Camera.h"
#include "Texture.h"
#include "Quad.h"
#include "GameObject.h"
#include "Cube.h"
#include "Light.h"
#include "Model.h"
#includ... |
C++ | UTF-8 | 1,664 | 2.921875 | 3 | [] | no_license | // A program to select a region in an image
// Use for initial parameters to a tracker?
// Iain Wallace, 15/8/05
#include "CImg.h"
#include <iostream>
using namespace cimg_library;
using namespace std;
int main(int argc,char **argv)
{
if (argc != 2)
{
cout << "Usage: initTracker firs... |
Java | UTF-8 | 288 | 1.570313 | 2 | [
"MIT"
] | permissive | package OOD.LinuxFind;
public enum PlanNodeKind {
OPTION, // 全局的configuration
PREDICATE, // 各种 filter 和 operations(“与或非”逻辑联结词)可以合称为谓词 predicate,类似于SQL中的where语句
ACTION // 一些side effect操作
}
|
Swift | UTF-8 | 967 | 2.578125 | 3 | [
"MIT"
] | permissive | //
// EditAisleView.swift
// Shopper
//
// Created by John Forde on 13/5/18.
// Copyright © 2018 4DWare. All rights reserved.
//
import Stevia
import IGListKit
class EditAisleView: UIView {
let closeButton = UIButton()
let listView = ListCollectionView(frame: CGRect.zero, listCollectionViewLayout: ListCollecti... |
Java | UTF-8 | 233 | 2.96875 | 3 | [] | no_license | package numbers;
public class NumberGenerator implements INumberGenerator {
private int number = 0;
public int nextNumber() {
return number++;
}
public void setNextNumber(int value) {
number = value;
}
}
|
Markdown | UTF-8 | 3,652 | 2.96875 | 3 | [] | no_license | ---
title: "Cara membuat custom shortcode di Hugo"
date: 2021-09-13T19:16:27+07:00
draft: false
Author: "Surya Efendi"
Description: "di Hugo untuk membuat postingan pasti menggunakan markdown style, karena file-nya ditulis dengan format markdown, lalu kalian apabila ingin menambahkan syntax html di markdown tidak bisa ... |
Python | UTF-8 | 144 | 3.125 | 3 | [] | no_license |
div8 = [i for i in range(1001) if i % 8 == 0]
print(div8)
# a=[]
# for i in range(1001):
# if i%8==0:
# a.append(i)
# print(a)
|
C | UTF-8 | 245 | 2.828125 | 3 | [] | no_license | #include <stdio.h>
int main(void)
{
int a[50],i,t,n,j;
scanf("%d",&n);
for(i=0;1<=3;i++)
{
scanf("%d",a[i]);
}
for(i=1;i<n;i++)
for(j=0;j<=n;j++)
if(a[i]>a[j])
{
t=a[i];
a[i]=a[j];
a[j]=t;
}
printf("%d",a[0]);
return 0;
}
|
Python | UTF-8 | 980 | 3.296875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Initialize parameters
"""
radius = 3.5 #Spiral radius [mm]
height = 18.0 #Spiral height [mm] (include 0.0)
nTurns = 6 #Number of turns of spiral
nPoints = 20 #Number of points per turn
pSpeed = 30... |
Java | UTF-8 | 524 | 2.34375 | 2 | [] | no_license | package com.example.db.dbflowtest.Utils;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author lijian
* @des
* @date 2019/3/9 14:19
**/
public class DateUtil {
public static final String DATETIME_FORMAT_DEFAULT = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_FORMAT_DEFAULT = "yy... |
Java | UTF-8 | 181 | 2.078125 | 2 | [
"Apache-2.0"
] | permissive | package com.shengfq.designpatten.strategy.abs;
/**
* 样板抽象策略接口
* */
public interface StrategyInterfaceB extends GenericInterface<Integer> {
String handle();
}
|
SQL | UTF-8 | 160 | 2.828125 | 3 | [] | no_license | SELECT FirstName + ' ' + MiddleName + ' ' + LastName AS 'Full Name'
FROM Employees
WHERE Salary = 25000
OR Salary = 14000
OR Salary = 12500
OR Salary = 23600 |
Markdown | UTF-8 | 812 | 2.796875 | 3 | [] | no_license | Detect Spider EE2 Plugin
=============
Lightweight PHP plugin for EE2 that detects a search engine crawlers using PHP.
This is my first time writing any any sort of plugin for EE. I'm not a very strong PHP guy so go easy on me :-) Please post any suggestions, changes, bugs, requests, etc to GitHub issues.
----------... |
Java | UTF-8 | 6,243 | 1.648438 | 2 | [] | no_license | package com.frameworkui;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.... |
Java | UTF-8 | 1,110 | 2.03125 | 2 | [] | no_license | package com.example.stackoverflowapp.viewmodel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import androidx.paging.LivePagedListBuilder;
import androidx.paging.PageKeyedDataSource;
import androidx.paging.PagedList;
import com.example.stackoverflowapp.datasource.ItemDataSource;
import com.... |
Java | UTF-8 | 3,713 | 2.03125 | 2 | [] | no_license | package bus.uigen.viewgroups;
import java.beans.MethodDescriptor;
import java.util.Vector;
import bus.uigen.uiFrame;
import bus.uigen.introspect.ClassDescriptorCache;
import bus.uigen.introspect.MethodDescriptorProxy;
import bus.uigen.introspect.ClassDescriptorInterface;
import bus.uigen.misc.OEMisc;
import... |
Java | UTF-8 | 4,744 | 2.21875 | 2 | [] | no_license | package de.blackforestsolutions.apiservice.service.supportservice;
import de.blackforestsolutions.datamodel.ApiTokenAndUrlInformation;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import java.io.UncheckedIOException;
import java.net.URL;
im... |
Shell | UTF-8 | 832 | 3.046875 | 3 | [] | no_license | #!/bin/sh
SCRIPT_ROOT=$(dirname "$(realpath -s $0)")
NODE_HOME="$SCRIPT_ROOT/volumes/livenet"
BITCORE_HOME="$(dirname "$SCRIPT_ROOT")/sibcore/volumes/bitcore"
NODE_CONTAINER_HOME="/home/sibcore/node"
BITCORE_CONTAINER_HOME="/home/sibcore/.nvm/versions/node/v4.8.4/lib/node_modules/bitcore"
if [ ! -d ${NODE_HOME}/node... |
Markdown | UTF-8 | 1,255 | 3.28125 | 3 | [] | no_license | https://sleeptracker123.netlify.com/login
Sleep Tracker
"Pitch:
Not everyone needs 8 hours of sleep, but how do you know if you’re someone lucky enough to need only 6? Or an unlucky one that needs 10?! Enter Sleep Tracker.
MVP:
Onboarding process for a user.
Homepage view shows a graph of your nightly hours of sle... |
Java | UTF-8 | 3,644 | 2.46875 | 2 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package com.bluewind.boot.common.utils;
import com.bluewind.boot.module.sys.sysbasedict.mapper.SysBaseDictMapper;
import com.bluewind.boot.common.utils.spring.SpringUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils... |
Markdown | UTF-8 | 1,292 | 2.546875 | 3 | [] | no_license | ---
template: article.jade
title: Ubuntu 8.04 Hardy Heron vs Firefox 2 & 3
date: '2008-05-13T19:59:00.000Z'
author: Olivier
aliases: ['/post/2008/05/13/ubuntu-8-04-hardy-heron-vs-firefox-2-3/', '/post/2008/05/13/ubuntu-804-hardy-heron-vs-firefox-2-3/']
categories: [Uncategorized]
tags: [Ubuntu,firefox]
---
<p>Tout le ... |
Java | UTF-8 | 596 | 2.140625 | 2 | [
"MIT"
] | permissive | package com.xjcy.easywx.post;
import com.xjcy.util.ObjectUtils;
/**
* 微信页面签名所用对象
* @author YYDF
* 2018-04-13
*/
public class JsapiTicket {
public JsapiTicket(String _appId, String nonce, long time, String signStr) {
this.appId = _appId;
this.nonceStr = nonce;
this.timestamp = time;
this.signature = Objec... |
C# | UTF-8 | 48,288 | 2.71875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PDP1
{
class Diagnostics
{
int goodTests;
int badTests;
Cpu cpu;
String results;
public Diagnostics()
{
cpu = new Cpu();
... |
Java | UTF-8 | 1,631 | 2.71875 | 3 | [] | no_license | package monopoly;
import model.Board;
import model.Dice;
import monopoly.Monopoly;
import monopoly.MonopolyProperties;
import org.junit.Before;
import org.junit.Test;
import transaction.Bank;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.*;
public class M... |
Markdown | UTF-8 | 1,032 | 3.140625 | 3 | [] | no_license | Exercício 4
Para explorar os conceitos vistos na Aula 04, iremos utilizar a stack React + Redux para uma aplicação que possua uma listagem de filmes favoritos. A ideia é que, utilizando o projeto da aula 04, possamos escolher quais os nossos filmes favoritos a partir da listagem e mostrá-los em uma tela, tudo utilizan... |
Java | UTF-8 | 434 | 2.734375 | 3 | [] | no_license |
package log4jpackage;
import org.apache.log4j.Logger;
public class log4jclass {
static Logger log = Logger.getLogger(log4jclass.class);
public static void main(String[] args) {
log.debug("HERE IS AN DEBUG WARNING");
log.info("THERE IS A INFO MESSAGE");
log.warn("OOPS! THIS IS AN ... |
C++ | UTF-8 | 822 | 3.0625 | 3 | [] | no_license | #include "EntityManager.h"
EntityManager::EntityManager() {
}
EntityManager::~EntityManager() {
}
Entity* EntityManager::createEntity()
{
uint entityId = 0;
//check if there is a re-usable id
if (m_availableIds.empty()) {
entityId = ++m_entityId;
}
else {
entityId = m_availableIds.top();
m_availableI... |
Python | UTF-8 | 703 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | import re
from glob import glob
from configparser import ConfigParser
for path in glob('**/.git/config', recursive=True):
config = ConfigParser()
config.read(path)
for section in config.sections():
if not section.startswith('remote '):
continue
match = re.match(r'https://githu... |
Java | UTF-8 | 684 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | import com.example.broaddemo.NetworkStatus;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
public class MyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO... |
Rust | UTF-8 | 2,382 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | //! the module includes everything related to resource metadata
use chrono::{DateTime, Utc};
/// The metadata information for the current resource
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct Metadata {
version: u8,
created: DateTime<Utc>,
last_modified: Option<DateTime<Utc>>,... |
Markdown | UTF-8 | 3,537 | 3.25 | 3 | [] | no_license | # ReversiAI
### 1. Alpha Beta Pruning
The implementation of Alpha Beta Pruning that was devised for this project is more time efficient than the base MiniMax agent without losing out on the effect on gameplay. When both agents are setup to only search down to the same depth, the agent with Alpha Beta Pruning always c... |
Java | UTF-8 | 1,610 | 2.875 | 3 | [] | no_license | package com.rohim.enumeration;
/**
* Created by Nurochim on 19/10/2016.
*/
public enum EnumInputService {
SpinnerInput("SI") {
@Override
public String toString() {
return ("Spinner");
}
},
TextShort("TS") {
@Override
public String toString() {
... |
JavaScript | UTF-8 | 1,088 | 4.03125 | 4 | [] | no_license | var todos = ["keep study"];
var input = prompt("What would you like to do?");
while (input !== "quit") {
if (input === "list") {
listToDo();
} else if (input === "new") {
newToDo();
} else if (input === "delete") {
deleteToDo();
} else {
console.log("Invalid input");
... |
Java | UTF-8 | 10,606 | 1.96875 | 2 | [] | no_license | package com.spring.springcloudlibraryproduct.Controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.spring.springcloudlibraryproduct.Service.EmpService;
import com.spring.springcloudlibraryproduct.Service.WebSocketSerivceImpl;
import com.spring.springcloudlibraryproduct.Servi... |
C# | UTF-8 | 3,100 | 3.046875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization.Formatters.Binary;
namespace Ejercicio_58_Serializacion
{
[Serializable]
public class PuntoDat : Archivo, IArchivos<PuntoDat>
{
p... |
PHP | UTF-8 | 1,292 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace WpPhpRequestGo;
use GuzzleHttp\Client;
use Throwable;
class PhpRequestGo
{
/**
* GO 访问域名
* @var string
*/
private static string $endpoint = 'http://127.0.0.1:9501';
public function connectGo(string $api, array $params, string $method)
{
try {
$met... |
Python | UTF-8 | 11,089 | 2.609375 | 3 | [
"MIT"
] | permissive | """Tests the add plugin."""
import argparse
import copy
import shutil
from pathlib import Path
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from sqlalchemy.orm.session import Session
import moe
from moe.core.config import Config
from moe.core.library.album import Album
from moe.core.library.s... |
Java | UTF-8 | 7,432 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | package us.ihmc.simulationConstructionSetTools.util.gui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.time.Local... |
Markdown | UTF-8 | 3,343 | 3.140625 | 3 | [] | no_license | # Read Me Before You Start! :book:
In the current directory, you'll see two sub-directories. Each one has code for our super-awesome services.
Right now you have only 2 services. So you might not mind starting each one individually.
But you never know how many we might end up making! So it's good to future-proof, and... |
Markdown | UTF-8 | 8,780 | 2.609375 | 3 | [] | no_license | # Cisco IOU L2 L3 lab với GNS3
# Mục lục
<h3><a href="#concept">1. Các phần mềm yêu cầu cho bài lab</a></h3>
<h3><a href="#iouvm_vir">2. Cài đặt GNS3 IOU VM trên Virtual Box</a></h3>
<h3><a href="#cfg_iou_server">3. Cấu hình IOU Server trên GNS3</a></h3>
<h3><a href="#integ">4. Tích hợp GNS3 với Cisco IOU</a></h3>
<h3>... |
SQL | UTF-8 | 555 | 3.484375 | 3 | [] | no_license |
CREATE VIEW dbo.TEMPLATE_LOCATIONS_2_V
AS
SELECT dbo.TEMPLATE_LOCATIONS.LOCATION, TEMPLATES_1.TEMPLATE_NAME, TEMPLATES1.TEMPLATE_NAME AS TAB_NAME
FROM dbo.TABS INNER JOIN
dbo.TEMPLATES TEMPLATES1 ON dbo.TABS.TEMPLATE_ID = TEMPLATES1.TEMPLATE_ID INNER JOIN
db... |
Java | UTF-8 | 3,926 | 2.1875 | 2 | [
"Apache-2.0"
] | permissive | package org.appenders.log4j2.elasticsearch.hc;
/*-
* #%L
* log4j2-elasticsearch
* %%
* Copyright (C) 2019 Rafal Foltynski
* %%
* 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
*
* ... |
Python | UTF-8 | 1,201 | 3.859375 | 4 | [] | no_license |
# 문제
# N개의 정수 A[1], A[2], …, A[N]이 주어져 있을 때,
# 이 안에 X라는 정수가 존재하는지 알아내는 프로그램을 작성하시오.
#
# 입력
# 첫째 줄에 자연수 N(1≤N≤100,000)이 주어진다.
# 다음 줄에는 N개의 정수 A[1], A[2], …, A[N]이 주어진다.
# 다음 줄에는 M(1≤M≤100,000)이 주어진다.
# 다음 줄에는 M개의 수들이 주어지는데, 이 수들이 A안에 존재하는지 알아내면 된다.
# 모든 정수들의 범위는 int 로 한다.
#
# 출력
# M개의 줄에 답을 출력한다. 존재하면 1을, 존재하지 않으면 0을 출... |
TypeScript | UTF-8 | 935 | 3.375 | 3 | [] | no_license | /*
* @lc app=leetcode.cn id=236 lang=typescript
*
* [236] 二叉树的最近公共祖先
*/
// @lc code=start
/**
* Definition for a binary tree node.
* class TreeNode {
* val: number
* left: TreeNode | null
* right: TreeNode | null
* constructor(val?: number, left?: TreeNode | null, right?: TreeNode | null) {
... |
Java | UTF-8 | 1,651 | 2.71875 | 3 | [] | no_license | package model;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
*
* @author kadirayk
*
*/
public class State implements Serializable {
/**
*
*/
private static final long serialVersionUID = -849218511658141465L;
private String name;
private Map<String, String> transition;
pr... |
Java | UTF-8 | 7,554 | 2.421875 | 2 | [] | no_license | package authorize.testsuite;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
import org.openqa.selenium.WebDriver;
import authorize.login.LoginPage;
import authorize.universal.method.ScreenShot;
import authorize.universal.method.globalVal... |
Markdown | UTF-8 | 1,319 | 3.484375 | 3 | [] | no_license | # Singleton Design Pattern
Singleton Design Pattern is a creational design pattern and also one of the most commonly used design pattern. This pattern is used when only a single instance of the struct should exist. This single instance is called a singleton object. Some of the cases where the singleton object is appli... |
Markdown | UTF-8 | 1,814 | 3.21875 | 3 | [] | no_license | # Schema Editing
As noted, initially the Writer schema in a workspace is a mirror image of the source. However, in many cases the user requires the output to have a different data structure.
Schema Editing is the process of altering the destination schema to customize the structure of the output data. One good exampl... |
Markdown | UTF-8 | 2,699 | 2.859375 | 3 | [
"MIT"
] | permissive | # 获取指定签到表的签到情况
## 接口信息
**API Path**
/record/:id
**请求协议**
HTTP
**请求方法**
GET
**相关人员**
负责人:RoseAT
创建人:RoseAT
最后编辑人:RoseAT
**REST参数**:
| 参数名 | 说明 | 必填 | 类型 | 值可能性 | 限制 | 示例 |
| :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ |
|id|签到表的signid|是|[... |
C++ | UTF-8 | 1,067 | 3.078125 | 3 | [] | no_license | /*
===================================================================================
* File Name: 24 - Swap Nodes in Pairs.cpp
* Description: https://leetcode.com/problems/swap-nodes-in-pairs/
* Author: Stoney
* Category: 链表
* Note:
*
* Version: 1.0
* Submit Time: 2016/02/1... |
PHP | UTF-8 | 213 | 2.625 | 3 | [] | no_license | <?php // Check if the nick is unique
$sql = "SELECT * FROM users WHERE nick='$nick'";
if ($result = $db->query($sql)) {
$usersNum = $result->num_rows;
if ($usersNum > 0) {
$output = "not-unique-error";
}
}
?> |
Python | UTF-8 | 1,906 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | import pandas as pd
import numpy as np
from sklearn.neighbors import KDTree
#import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
import seaborn as sns
import random
data = pd.read_csv("1.txt", sep = ",", header = None)
del data[0]
del data[1]
test = pd.read_excel("2.xlsx", header = None)
... |
Java | UTF-8 | 2,186 | 2.546875 | 3 | [
"MIT"
] | permissive | package cz.muni.fi.pa165.entity;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Email;
import ... |
C++ | UTF-8 | 862 | 3.203125 | 3 | [
"MIT"
] | permissive | #include <cassert>
#include <string>
#include <binary_median_heap.hpp>
//função dara os testes
void test_median_heap(){
BinaryMedianHeap<std::string> heap {};
heap.insert(11,"glória ao príncipe da paz");
heap.insert(10,"Jesus");
heap.insert(12,"vida longa");
heap.insert(13,"vida");
heap.insert... |
Java | UTF-8 | 1,118 | 3.328125 | 3 | [] | no_license | /*Dylan Keeton Sonal Jain
* DK23765 SJ23277
* Section: 16165
* EE 422C- Assignment 3
*/
package Assignment3;
public class Grocery extends Item {
private boolean perishable;
//=====================================================================================
public Grocery(String n, double p, int q, int w,... |
C | UTF-8 | 532 | 2.90625 | 3 | [] | no_license | #include<stdio.h>
int main(){
int idNum[18] = {0};
int seed[17] = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
char result[11] = {'1','0','X','9','8','7','6','5','4','3','2'};
int sum = 0;
int index = 0;
long long id = 0;
scanf("%lld", &id);
printf("%lld\n",id);
for(int i... |
Ruby | UTF-8 | 936 | 2.84375 | 3 | [] | no_license | RESULT_1 = {
:length => 1,
:location => 1,
:prime => 2,
:position => 0
}
RESULT_2 = {
:length => 2,
:location => 3,
:prime => 23,
:position => 16
}
describe EulerPrimeJob do
describe "#execute" do
it "is only valid with integers" do
job = EulerPrimeJob.new("a string", 1)
expect(job)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.