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 | 2,185 | 2.0625 | 2 | [] | no_license | /***********************************************************************************************************************
*
* Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with... |
Python | UTF-8 | 5,754 | 2.609375 | 3 | [] | no_license | """
----------------------------------
Smolfin - a numerical solver of the Smoluchowski equation for interesting geometries
Copyright (C) 2012 Peter Kekenes-Huskey, Ph.D., huskeypm@gmail.com
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License... |
Python | UTF-8 | 736 | 2.921875 | 3 | [] | no_license | GlowScript 3.1 VPython
g = 9.8
r = 0.2
v0 = 10
theta0 = 80
bola_de_basquete = sphere(pos=vector(0,0,0), radius=2*r, color=color.orange, make_trail=True)
bola_de_basquete.v = vector(v0*cos(radians(theta0)), v0*sin(radians(theta0)), 0)
bola_de_basquete.a = vector(0, -g, 0)
chao = box(pos = vector(5, 0, ... |
Java | UTF-8 | 946 | 1.953125 | 2 | [] | no_license | package com.feri.shop.newretail.msg.controller;
import com.feri.shop.newretail.common.vo.R;
import com.feri.shop.newretail.msg.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Req... |
Java | UTF-8 | 10,063 | 2.5 | 2 | [] | no_license | package net.thumbtack.school.file;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.M... |
Go | UTF-8 | 518 | 3.734375 | 4 | [] | no_license | package raindrops
import "strconv"
//Convert function Converts a number to a string, the contents of which depend on the number's factors.
func Convert(input int) string {
RaindropNumbers := [3]int{3, 5, 7}
RaindropsStrings := [3]string{"Pling", "Plang", "Plong"}
var Outputstring string
for i := 0; i < len(Rain... |
Java | UTF-8 | 5,597 | 2.140625 | 2 | [] | no_license | package application.controllers;
import application.domain.Account;
import application.domain.enums.AccountType;
import application.dto.AccountDto;
import application.dto.BankSharesDto;
import application.facade.BankSharesServicesFacade;
import application.repository.AccountRepository;
import application.services.Acco... |
Java | UTF-8 | 3,194 | 2.109375 | 2 | [
"Apache-2.0"
] | permissive | package com.ewcms.system.notice.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.anno... |
Markdown | UTF-8 | 15,908 | 3.796875 | 4 | [] | no_license | #Binary/bitwise
### Basics:
- A bit is set if it is 1 and unset if it is 0. Example: 10 = 1010 in binary. The lowest bit is unset, the next is set, the next unset, etc.
- 65535 occurs frequently in the field of computing because it is (one less than 2 to the 16th power), which is the highest number that can be repr... |
Java | UTF-8 | 3,366 | 2.078125 | 2 | [] | no_license | package smc;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import helper.DataUrls;
import net.sf.json.JSONA... |
Markdown | UTF-8 | 1,063 | 2.875 | 3 | [] | no_license | # Data Intensive Computing - Assignment 2
In this lab assignment done togheter with [Haris Poljo](https://github.com/harispoljo), we practiced stream processing and graph processing using Apache Spark, Apache Kafka, and Apache Cassandra. Moreover, we practiced Apache Spark GraphX within two jupyter notebook.
# Assignm... |
Markdown | UTF-8 | 2,168 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | ---
layout: default
title: More Quickstart Options
description: Quickstart options. This section outlines additional quickstart options to deploying lakeFS.
parent: Quick Start
nav_order: 50
has_children: false
---
# More Quickstart Options
{: .no_toc}
{% include learn_only.html %}
## Table of Contents
{: .no_toc .... |
JavaScript | UTF-8 | 1,771 | 2.546875 | 3 | [
"MIT"
] | permissive | import { getRoomName } from './helperFunctions'
import { ROOM_ID_PREFIX, CONFIG_CHANGE_EVENT } from '../constants/constants'
import { initializePubsub } from './pubsub'
import logger from '../utils/logger'
class StateManager {
constructor(io, costumeLogger = logger) {
this.logger = costumeLogger
th... |
Go | UTF-8 | 2,180 | 3.40625 | 3 | [] | no_license | package crudbookstore
import (
"testing"
)
func TestBookStoreAdd(t *testing.T) {
var bookID = 1
newBook := &Book{
ID: 1,
Name: "It",
Language: "Spanish",
Status: "New",
Genre: "Terror",
Editorial: "Plaza&James",
Author: "Stephen King",
Price: 1300,
}
bookStore := NewB... |
Java | UTF-8 | 1,186 | 2.046875 | 2 | [] | no_license | package com.example.onsenseach;
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
public class OnsenMapActivity extends Activity {
@Override
protected void onCreate(Bundle... |
Java | UTF-8 | 10,328 | 1.820313 | 2 | [
"Apache-2.0"
] | permissive | package com.hyphenate.chatuidemo;
import android.content.Context;
import com.hyphenate.chatuidemo.db.UserDao;
import com.hyphenate.chatuidemo.domain.RobotUser;
import com.hyphenate.chatuidemo.utils.PreferenceManager;
import com.hyphenate.easeui.domain.EaseUser;
import com.hyphenate.easeui.model.EaseAtMessageHelper;
... |
Shell | UTF-8 | 636 | 3.484375 | 3 | [] | no_license | #!/bin/bash
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
echo -e "\033[0;32mBuild Module\033[0m"
hugo -t hugo-theme-minos # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
cd public
# Add changes to git.
echo -e "\033[0;32mAdding changes before commit...\033[0m"
git add .
# ... |
JavaScript | UTF-8 | 474 | 3.421875 | 3 | [
"MIT"
] | permissive | var fizzBuzz = function() {
var getResult = function(number) {
if (isMultipleOfThree(number) && isMultipleOfFive(number))
return "fizzBuzz";
if (isMultipleOfThree(number))
return "Fizz";
if (isMultipleOfFive(number))
return "Buzz";
return number.toString();
};
var isMultipleOfThree = function(nu... |
C++ | UTF-8 | 1,478 | 3.015625 | 3 | [] | no_license | #include "Grid.h"
CGrid::CGrid()
{
objects.clear();
}
void CGrid::Init()
{
cells = new CCell*[numCol];
for (int i = 0; i < numCol; i++)
cells[i] = new CCell[numRow];
}
void CGrid::Add(LPGAMEOBJECT object, float x, float y)
{
int startX = x / CELL_WIDTH;
int startY = y / CELL_HEIGHT;
int endX = (x + object->G... |
C | UTF-8 | 510 | 3.84375 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
char isprime(int n){
if(n<=1){
return 'N';
}
else{
for (int i=2;i<n;i++){
if((n%i)==0){
return 'N';
}
}
return 'Y';
}
}
int main (void){
char prime;
prime=isprime(100);
printf("100 is prime? - %c\n",prime);
prime= isprime(307);
p... |
Java | UTF-8 | 1,005 | 2.0625 | 2 | [] | no_license | package hipevents.common;
import hipevents.event.exception.EventNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframe... |
Ruby | UTF-8 | 551 | 2.6875 | 3 | [] | no_license | require 'json'
require 'rest-client'
class Licenses
GET_URL = 'https://data.fcc.gov/api/license-view/basicSearch/getLicenses'.freeze
def get_callsigns(search_value)
params = { searchValue: search_value, format: 'json' }
response = RestClient.get GET_URL, params: params
raise "Invalid response code: #... |
Java | UTF-8 | 769 | 1.789063 | 2 | [] | no_license | package pe.com.pacasmayo.sgcp.presentacion.gwt.util.cliente;
import java.util.Date;
import com.google.gwt.core.client.JavaScriptObject;
import com.smartgwt.client.util.JSOHelper;
import com.smartgwt.client.widgets.form.fields.DateItem;
public class DateItemv2 extends DateItem{
static JavaScriptObject s... |
C++ | UTF-8 | 140 | 2.625 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
float a = 2;
float b = 3;
float c = a/b;
cout << c;
return 0;
}
|
C++ | UTF-8 | 364 | 2.90625 | 3 | [] | no_license | #include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
int maxSubArray(vector<int>& nums) {
int maxNum=INT_MIN;
int temp=0;
for(const auto& num:nums){
if(temp+num>maxNum) {maxNum=temp+num;}
temp=temp+num;
if(temp<0) {temp=0... |
Python | UTF-8 | 405 | 2.640625 | 3 | [] | no_license | import cv2
import numpy as np
import matplotlib.pyplot as plt
img =cv2.imread('Photos/park.jpg')
#BGR to gray
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
#bgr to hsv
hsv=cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
#BGR to LAB
lab=cv2.cvtColor(img,cv2.COLOR_BGR2Lab)
#BGR to RGB
rgb=cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
cv2.i... |
C# | UTF-8 | 1,569 | 2.5625 | 3 | [] | no_license | using Microsoft.Owin.Hosting;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
namespace RemoteAudio
{
public class Aud... |
C# | UTF-8 | 1,389 | 3.234375 | 3 | [] | no_license | using AliasGameBL.Utillity;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AliasGameBL.Models
{
public class CardFactory
{
int MaxWordsCountInOneCard;
IShuffler<string> Shuffler;
ICutter<string> Cutter;
public CardFactory(int wordsCountInOneCard... |
C++ | UTF-8 | 8,284 | 2.515625 | 3 | [
"WTFPL"
] | permissive | #if 0
#include <algorithm>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <limits>
#include "Common/alloc.h"
#include "Common/cpuinfo.h"
#include "Common/except.h"
#include "Common/linebuffer.h"
#include "Common/pixel.h"
#include "Common/plane.h"
#include "resize.h"
#include "resize_impl.h"
namespac... |
PHP | UTF-8 | 1,571 | 2.78125 | 3 | [] | no_license | <?php
namespace MarsRover;
use PHPUnit\Framework\TestCase;
use MarsRover\Rover\Orientation;
class OrientationTest extends TestCase {
public function testGetOrientation() {
$pos = new Orientation(-1, 0);
self::assertEquals(2, $pos->determine_orientation());
$pos = new Orientation(0, 1);
self::assertEquals(3... |
Java | UTF-8 | 2,659 | 2.640625 | 3 | [] | no_license | package edu.hm.dako.chat.server;
import java.util.concurrent.atomic.AtomicInteger;
import edu.hm.dako.chat.common.ChatPDU;
import edu.hm.dako.chat.connection.Connection;
/**
* Abstrakte Klasse mit Basisfunktionalitaet fuer serverseitige Worker-Threads
*
* @author Peter Mandl
*
*/
public abstract c... |
JavaScript | UTF-8 | 3,077 | 2.71875 | 3 | [
"MIT"
] | permissive | // Needs ability to choose device.
// All MIDI events should have the same structure, otherwise it'll
// be a nightmare.
//
// Should I juse use the default web-midi TypedArray data?
// - Pros:
// - Adheres to spec.
// - Allows usage of lib without relying on proprietary
// event structure.
// - Easier to a... |
JavaScript | UTF-8 | 824 | 2.671875 | 3 | [
"MIT"
] | permissive | 'use strict'
const cheerio = require('cheerio')
const request = require('request-promise-native')
module.exports = ({ lat, lng, city, region, country } = {}) => {
const apiUrl = 'https://www.starbucks.com/store-locator'
return new Promise((resolve, reject) => {
if ((!lat || !lng, !city, !region, !country)) {... |
Markdown | UTF-8 | 2,187 | 3.171875 | 3 | [] | no_license | Programming Assignment 6
Due: Mon Dec 7, 11:59 pm
Note This assignment will include a separate presentation component. See the section below for presentation requirements.
Problem
The problem will be different for each team. Once your team has chosen a dataset, you can download problem-specific instructions/data file... |
JavaScript | UTF-8 | 7,037 | 2.515625 | 3 | [
"MIT"
] | permissive | import { Scene } from '../scenes/Scene.js'
import { Camera } from '../cameras/Camera.js'
import { Mesh } from '../objects/Mesh.js'
import { PlaneBufferGeometry } from '../geometries/PlaneGeometry.js'
import { ShaderMaterial } from '../materials/ShaderMaterial.js'
import { WebGLRenderTarget } from './WebGLRenderTarget.j... |
C++ | UTF-8 | 158 | 2.796875 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main() {
int ival = 42;
int *pival = &ival;
cout<<pival<<"\t"<<*pival<<"\t"<<&pival;
return 0;
} |
JavaScript | UTF-8 | 690 | 2.515625 | 3 | [] | no_license | (function(window){
function Hero(imgHero) {
this.initialize(imgHero);
}
Hero.prototype = new createjs.Sprite();
// constructors:
Hero.prototype.Sprite_initialize = Hero.prototype.initialize; //unique to avoid overiding base class
// public methods:
Hero.prototype.initialize = function(imgHero) {
var ... |
Java | UTF-8 | 533 | 1.828125 | 2 | [] | no_license | package com.nexters.tagit.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nexters.tagit.model.TagModel;
import com.nexters.tagit.model.UserTagModel;
public interface UserTagMapper {
void insert(UserTagModel userTag);
List<UserTagModel> selectByInit();
List<UserTagModel> sele... |
Markdown | UTF-8 | 2,560 | 2.890625 | 3 | [] | no_license | # Introduction
[Capacitor](https://capacitor.ionicframework.com) is a modern "Native Progressive Web Apps" platform. Through it, Bionic apps can currently be deployed in iOS and Android (Capacitor Web and Capacitor Electron coming soon).
## Requirements
### NodeJS
Capacitor depends on NodeJS. Please [install](https... |
Java | UTF-8 | 377 | 2.859375 | 3 | [] | no_license | package exception;
public class InvalidNumberReslut extends Exception {
private static final long serialVersionUID = 1L;
private int resultNumber;
public InvalidNumberReslut(int resultNumber) {
this.resultNumber = resultNumber;
}
@Override
public String getMessage() {
return "One result was e... |
Java | UTF-8 | 7,608 | 2.25 | 2 | [
"Apache-2.0"
] | permissive | package com.github.anastr.speedviewlib;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import androi... |
PHP | UTF-8 | 2,516 | 2.578125 | 3 | [] | no_license | <?php
/**
* RoosterItem short summary.
*
* RoosterItem description.
*
* @version 1.0
* @author Erwin
*/
class RoosterItem extends RoosterItemBase
{
public function getString(){
global $types;
return $this->start->format('l H:i').'-'.$this->end->format('H:i').': '.$this->course.($this->type!==false?' - '... |
Shell | UTF-8 | 2,910 | 3.921875 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/bash
set -e
##------------------------------------
## Script Functions
##------------------------------------
# This function install all packages needed for the RTS2 installation.
function ubuntu_dependencies(){
sudo apt-get update
sudo apt-get install libtool -y
sudo apt-get install git postgresql postgre... |
C | UTF-8 | 4,323 | 2.984375 | 3 | [
"ISC"
] | permissive | #ifdef _MSC_VER
#include <platform.h>
#endif
#include <CuTest.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "strings.h"
static void test_str_escape(CuTest * tc)
{
char scratch[64];
CuAssertStrEquals(tc, "12345678901234567890", str_escape("12345678901234567890", scrat... |
JavaScript | UTF-8 | 1,707 | 3.453125 | 3 | [] | no_license | //Select Height input
var gridHeight = document.getElementById("inputHeight");
gridHeight.addEventListener("change paste keyup", function (e) {});
//Select Height input
var gridWidth = document.getElementById("inputWeight");
gridWidth.addEventListener("change paste keyup", function (e) {});
//User clicks on Submit, i... |
Markdown | UTF-8 | 675 | 3.625 | 4 | [] | no_license | # Bash-Scripts
Collection of bash script projects
Project: Calculator
This project looked at simulating a simple calculator in bash script. The calculator prompts the user for an operand, then an operator and then a second operand. The answer is displayed after each calulation. The subsequent operation uses the previ... |
Python | UTF-8 | 877 | 3.484375 | 3 | [
"MIT"
] | permissive | # three solutions, some are consulted from
# https://leetcode.com/problems/n-repeated-element-in-size-2n-array/discuss/543154/3-solutions-or-Easy-to-Understand-or-Faster-or-Python
class Solution:
# No. 1: use set
def repeatedNTimes(self, A: List[int]) -> int:
res = set()
for n in A:
... |
PHP | UTF-8 | 1,383 | 2.59375 | 3 | [] | no_license | <?php defined('IN_APP') or die('Get out of here');
/**
* Scaffold v0.1
* by the Codin' Co.
*
* Here lies the basic bootstrapper, which instantiates all the classes and loads
* all of the files up properly. Here goes!
*/
if(get_magic_quotes_gpc()) {
$_GET = json_decode(stripslashes(json_encode($... |
Java | UTF-8 | 1,105 | 2.375 | 2 | [
"Apache-2.0"
] | permissive | package com.nick.netty.server;
import com.nick.NettyProperties;
import io.netty.channel.ChannelHandler;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
/**
* Netty server template class
* @author NickFayne 2018-07-03 5:43
* @since 1.0.0
*/
public... |
Java | UTF-8 | 12,547 | 2.328125 | 2 | [] | no_license | /**
*
*/
package by.bsuir.facultative.dao.mysql;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
... |
C++ | UHC | 4,101 | 2.578125 | 3 | [] | no_license | #include "stdafx.h"
#include "DungeonScene.h"
#include<memory>
#include "Scene.h"
#include "MonsterManager.h"
#include "EquipItem.h"
#include"EventScene.h"
DungeonScene::DungeonScene(std::weak_ptr<Game> game) : Scene(game)
{
Floor = 0;
Event = 0;
srand(UINT(time(NULL)));
}
DungeonScene::~DungeonScene()
{
}
void D... |
C# | UTF-8 | 903 | 3.5 | 4 | [] | no_license | // https://open.kattis.com/problems/tri
// Steve Jia
using System;
public class Solution{
public static void Main(){
string[] symbols = new string[]{"+", "-", "*", "/"};
Func<int, int, int>[] operations = {
(x, y) => x + y,
(x, y) => x - y,
(x, y) => x * y,
... |
Python | UTF-8 | 586 | 2.765625 | 3 | [] | no_license | import json
import datetime
import time
import random
import requests
import test_config
def test_random_quote_api_get():
req = requests.get(test_config.RANDOM_QUOTE_API_URL)
assert req.status_code == 200
assert len(req.json()) == 1
def test_random_quote_api_with_supplied_number_in_body():
num_qu... |
Python | UTF-8 | 1,168 | 3.515625 | 4 | [] | no_license | import os
from art import logo
def clear_console():
'''Clears console independent of OS'''
command = 'clear'
if os.name in ['nt', 'dos']:
command = 'cls'
os.system(command)
def get_bidders(dict):
'''Adds new bidders to auction'''
while True:
bidder = input("What's your name... |
Markdown | UTF-8 | 1,090 | 2.59375 | 3 | [
"MIT"
] | permissive | The `vesperabr/validation` package provides an easy whay to validate input data.
It could be used in pure PHP or in Laravel projects.
## Installation
You can install the package via composer:
```bash
$ composer require vesperabr/validation
```
The package will automatically register itself in Laravel.
## How to us... |
Python | UTF-8 | 759 | 3.359375 | 3 | [] | no_license | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def insertionSortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None:
... |
C++ | UTF-8 | 3,591 | 2.78125 | 3 | [] | no_license | #include <math.h>
#ifdef __APPLE_CC__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
bool mouseisdown=false ;
bool loopr=false ;
int mx,my;
int ry=30;
int rx=30;
void timer(int p)
{
ry-=5;
glutPostRedisplay();
if (loopr)
glutTimerFunc(200,timer,0);
}
... |
Ruby | UTF-8 | 1,006 | 3.734375 | 4 | [] | no_license | =begin Informacoes
*****************************************
* Curso de Ruby *
*****************************************
* Aluno.....: Paulo Guilherme *
* Linguagem.: Ruby *
* Arquivo...: Ola_Mundo.rb *
* Aula......... |
JavaScript | UTF-8 | 3,465 | 3.03125 | 3 | [] | no_license | var assert = require('assert');
/**
@fileOverview The **Shorten** class is used to shorten a specified URL
@example
var shortSrv = Shorten();
shortSrv.OriginalUrl = "http://www.example.com";
shortSrv.Shorten(function(err, r) {
//TODO
});
*/
// create an instance of Shorten.
var Sh... |
Swift | UTF-8 | 5,736 | 3.21875 | 3 | [] | no_license | //
// PasswordController.swift
// iPasswordKeeper
//
// Created by Tobi Kuyoro on 23/11/2019.
// Copyright © 2019 Lambda School. All rights reserved.
//
import Foundation
import CoreData
enum HTTPMethod: String {
case get = "GET"
case put = "PUT"
case post = "POST"
case delete = "DELETE"
}
class ... |
Markdown | UTF-8 | 596 | 2.65625 | 3 | [] | no_license | # Gradient Project #
was inspired by [uigradients](http://uigradients.com/), [Adobe Kuler](https://color.adobe.com/create/color-wheel/), and others. It is intended for designers and programmer who want more control over their color palettes.
[](http://jzwood.github.io/Waterfal... |
Markdown | UTF-8 | 977 | 3.4375 | 3 | [] | no_license | # factors_caching
To run:
`ruby ./factors.rb`
Since the output representation is up to me, I choose to have the output in sorted order, which allows me to use the cache for
different permutations of the same input array and use the same result.
To account for the "reverse factors" implementation, I chose to cache b... |
C# | UTF-8 | 5,148 | 2.5625 | 3 | [] | no_license | using NUnit.Framework;
using SistemaApoioEstudo.BLL.DAO;
using SistemaApoioEstudo.BLL.Entidades;
using SistemaApoioEstudo.BLL.Negocio;
using SistemaApoioEstudo.BLL.Utilitarios;
using System;
namespace SistemaApoioEstudo.Teste.TestesLogin
{
[TestFixture]
public class UC20_Logar
{
private Usuario us... |
Markdown | UTF-8 | 815 | 3.3125 | 3 | [] | no_license | # Lem in
Algorithm to find the quickest way to get n ants across a farm.
## Rules
At the beginning, all the ants are in the room ##start. The goal is to bring them to the room ##end with as few turns as possible. Each room can only contain one ant at a time (except at ##start and ##end which can contain as many ants a... |
Markdown | UTF-8 | 4,497 | 2.625 | 3 | [] | no_license | ---
description: "How to Make Super Quick Homemade Pineapple Thunder"
title: "How to Make Super Quick Homemade Pineapple Thunder"
slug: 3410-how-to-make-super-quick-homemade-pineapple-thunder
date: 2020-06-02T04:54:48.463Z
image: https://img-global.cpcdn.com/recipes/f4831ed28dd33d10/751x532cq70/pineapple-thunder-recipe... |
C | UTF-8 | 1,528 | 2.75 | 3 | [
"MIT"
] | permissive | #include <assert.h>
#include <errno.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "Name.h"
#include "Name_r.h"
#include "mathlib.h"
#include "parse.h"
#include "value.h"
#include "value_r.h"
struct Math
{
struct Name _;
double (*funct)(double);
};
#define funct(tree) (((struct Math *)left... |
C# | UTF-8 | 643 | 3.296875 | 3 | [] | no_license | using System.Collections.Generic;
namespace Blackjack
{
class CardPlayer
{
public readonly List<Hand> Hands = new List<Hand>();
public void ReceiveCard(Card card, Hand hand)
{
hand.AddCard(card);
}
public void AddHand(Hand hand)
{
Hands... |
Markdown | UTF-8 | 515 | 2.515625 | 3 | [] | no_license | ## Fast style transfer
Implemented using tensorflow functional API.
examples:
<img src="images/original.jpg" height="200">
Style | Trained
:-------------------------:|:-------------------------:
<img src="images/style1.jpg" height="100"> | <img src="images/style1-trained.jpg" height="100">
... |
Python | UTF-8 | 545 | 3.546875 | 4 | [] | no_license | #Lint code: Merge two sworted arrays
def main():
a = input().split()
for i in range(0,len(a)):
a[i] = int(a[i])
b = input().split()
for i in range(0,len(b)):
b[i] = int(b[i])
c = []
ia = 0
ib = 0
len_a = len(a)
len_b = len(b)
while ia < len(a) and ib < len(b):
if a[ia] < b[ib]:
c.append(a[ia])
... |
C# | UTF-8 | 492 | 2.765625 | 3 | [] | no_license | using System;
using System.Collections.ObjectModel;
using System.Linq;
namespace UserLogic.Domain
{
[Serializable]
public class Projects : ObservableCollection<Project>
{
public bool IsExist(Project project)
{
var con = from p in this
where (p.Id == project... |
JavaScript | UTF-8 | 1,210 | 3.125 | 3 | [] | no_license | // The http.createServer() method includes request and response parameters which is supplied by NodeJs
//The request object can be used to get information about the current HTTP request
//e.g -> url,request,header, and data.
//The response object can be used to send a response for a current HTTP request.
//If the re... |
C# | UTF-8 | 1,529 | 2.703125 | 3 | [] | no_license | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Attributes;
using System.Linq;
using System.Collections.Generic;
namespace AttributesUnitTests
{
[TestClass]
public class AttributesTypesTest
{
[TestMethod]
public void CanGetTypesToCount()
{
var e... |
C# | UTF-8 | 1,871 | 2.5625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RestaurantApp.Core;
using RestaurantApp.Data;
namespace RestaurantApp.Pages.Restaurants
{
public cla... |
Java | UTF-8 | 1,196 | 2.28125 | 2 | [] | no_license | package com.community.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.community.dao.AdminDAO;
import com.community.entity.Admin;
import com.community.service.AdminService;
@Service
public class AdminService... |
Java | UTF-8 | 4,243 | 3.734375 | 4 | [] | no_license | package com.wenx.demo.multithread;
import java.util.concurrent.*;
/**
* @author Wenx
* @date 2019/11/18
*/
public class ForkJoinDemo {
public static void main(String[] args) throws ExecutionException, InterruptedException {
// 本质是一个线程池,默认的线程数量:CPU的核数
// 默认情况下,并行线程数量等于可用处理器的数量
// ForkJoi... |
Shell | UTF-8 | 143 | 2.6875 | 3 | [] | no_license | #!/bin/bash
# Checks the WAN IP.
#vers="wan_chck-0.4"
wan_ip="$(curl -s www.icanhazip.com | awk '{print $1}')"
echo "wan_ip=$wan_ip"
exit 0 |
JavaScript | UTF-8 | 1,149 | 2.78125 | 3 | [] | no_license | canvas = createCanvas(windowWidth / 2, windowHeight / 1.5);
engine = Engine.create();
world = engine.world;
function setup(){
let canvasmouse = mouse.create(canvas.elt);
canvasmouse.pixelRatio = pixelDensity();
let options = {
mouse: canvasmouse
};
pendulum1 = new Pendulum(100, 250, 100, 100);
pendulum2 = new Pe... |
Java | UTF-8 | 10,605 | 2.140625 | 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 cit260.neversync.control;
import byui.cit260.neversync.exceptions.GameControlException;
import byui.cit260.neversync.exception... |
Java | UTF-8 | 679 | 2.78125 | 3 | [] | no_license | package de.te.layouting.layouting;
import de.te.layouting.geometry.IBounds;
public interface IGeometricalLayoutConstraint {
/**
* Converts the <code>currentBounds</code> into reasonable legal bounds. If
* <code>currentBounds</code> is legal, than it should be returned without
* change.
*
* @pa... |
Markdown | UTF-8 | 1,043 | 2.90625 | 3 | [] | no_license | # Digit_Recognition_Keras
## About:
MNIST dataset from keras is used for Digit Recogintion {0-9}. Convolution Neural Network used for modelling.
* Data-set is loaded from mnist of keras
* Archiecture:-
1) Two convolution layers
2) Two max. pooling layers
3) Flatten layer
4) Dense layer
5) Dense Output layer {Will ... |
C++ | UTF-8 | 444 | 3.375 | 3 | [] | no_license | /*
CPSC 121-0X
Paul De Palma
depalma
Example 1
*/
//i/o, variables, arithmetic operator, assignment
#include <iostream>
using namespace std;
int main()
{
double hours, rate, pay;
//Get hours
cout << "How many hours did your work? ";
cin >> hours;
//Get rate
cout << "How much did you get paid per hour? ";
c... |
Markdown | UTF-8 | 6,115 | 3.265625 | 3 | [] | no_license | # Web page scraper
**Author**: Claude Gibert 2016.
## Foreword
I apologise for greatly over-engineering this test. I could have hard-coded the program using Beautiful Soup into a program which would have been hardly longer than the main program here. However I have written page scrapers in the past and I know that i... |
Java | UTF-8 | 1,452 | 3.375 | 3 | [] | no_license | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// write your code here
Scanner sc =new Scanner(System.in);
int row=sc.nextInt();
int col=sc.nextInt();
int a[][]=new int[row][col];
for(int i=0; i<ro... |
Markdown | UTF-8 | 8,922 | 2.734375 | 3 | [] | no_license | # SEAView
SEAView (*"**S**CU-**E**DU-**A**lignment"*) is a tool for annotating content in two-part essays, which contain a summary and an argument. This tool is used to annotate elementary discourse units (EDUs) from the argument section, and align them with semantically similar summary content units (SCUs) from the su... |
Python | UTF-8 | 2,305 | 3.203125 | 3 | [
"MIT"
] | permissive | """
A simple grid world environment
"""
import numpy as np
import random
from ..common import MDP
from ..exceptions import EpisodeDoneError, InvalidActionError
from ..actions import LEFT, RIGHT, UP, DOWN
from .helper_utilities import flatten_state, unflatten_state
class GridWorldMDP(MDP):
def __init__(self, P, R, ... |
Markdown | UTF-8 | 1,583 | 3.140625 | 3 | [] | no_license | ---
layout: commandcall
category: CommandCall
title: "MESSAGE_DELETE"
tags: 1.3 1.5
---
The command MESSAGE_DELETE deletes the message with the given ID from the DB.
# Syntax:
```adoscript
{% raw %}
CC "Application" MESSAGE_DELETE messageid:intValue [ userid:intValue | username:strValue]
#--> RESULT ecode:intValu... |
PHP | UTF-8 | 2,108 | 3.171875 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<title>Homework 5</title>
<meta charset="utf-8" />
<style>
.error {
color: #FF0000;
}
.correct {
color: #008000;
}
</style>
</head>
<body>
<h1>Homework 5 </h1>
<form method="post" action="hw5_1.php"> First Name:
<input type="text" name="fname">... |
JavaScript | UTF-8 | 4,442 | 2.9375 | 3 | [] | no_license | var mysql = require("mysql");
var inquirer = require("inquirer");
require('console.table');
var connection = mysql.createConnection({
host: "localhost",
port: 3306,
user: "root",
password: "Zubenelakrab",
database: "bamazon"
});
connection.connect(function (err) {
if (err) throw err;
co... |
Markdown | UTF-8 | 3,563 | 2.984375 | 3 | [] | no_license | import { Meta, Source } from '@storybook/addon-docs/blocks';
import ThemeDisplay from './theme-display';
<Meta title='Standardization|General/Styles' />
# Styles (CSS)
Custom style usage should be kept as minimal as possible for consistency's sake. Generally, components from Material-Ui and the other Highpoint compo... |
Java | UTF-8 | 6,859 | 1.875 | 2 | [] | no_license | package me.yaran.app;
import android.content.Context;
import android.graphics.Bitmap;
import android.media.MediaPlayer;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;... |
JavaScript | UTF-8 | 2,002 | 2.640625 | 3 | [
"MIT"
] | permissive | 'use strict';
(function() {
var profileId = document.querySelector('#profile-id') || null;
var profileUsername = document.querySelector('#profile-username') || null;
var displayName = document.querySelector('#display-name') || null;
var apiUrl = appUrl + '/api/:id';
var userinfo = document.querySelecto... |
Python | UTF-8 | 571 | 4.03125 | 4 | [] | no_license |
# Description
#
# The method isatty() returns True if the file is connected (is associated with a terminal device) to a tty(-like)
# device, else False. Syntax
#
# Following is the syntax for isatty() method −
#
# fileObject.isatty();
#
# Parameters
#
# NA
#
# Return Value
#
# This method returns true if the file is c... |
Markdown | UTF-8 | 1,812 | 2.84375 | 3 | [] | no_license | # PHP recommended staff
Packages, tools, articles, websites, tutorials, etc.,
recommended to PHP developers by [Saritasa](https://github.com/Saritasa) team.
Includes lots of frontend stuff, especially related with [VueJS](https://vuejs.org/) framework,
as we use it intensively.
## Update knowledge database
### Edit li... |
Java | UTF-8 | 8,451 | 2.171875 | 2 | [
"MIT"
] | permissive | package io.hoplin;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import io.hoplin.executor.WorkerExecutorService;
import io.hoplin.executor.WorkerThreadPool;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.Comp... |
Markdown | UTF-8 | 1,619 | 3.3125 | 3 | [] | no_license | [返回首页](https://EbolaEmperor.github.io)
[返回专题](https://EbolaEmperor.github.io/special/Matrix)
# 【HNOI2002】公交车路线 题解
阅读了一下题面,忽然就笑了出来,这不是就邻接矩阵的幂的模板题吗!
至于邻接矩阵的幂是什么,以后有空再说。过段时间在我们学校的交流活动中我会讲这个玩意儿。
我的代码毫无压力,甚至还想让出题人把n的规模扩大到2^60
嗯,都说了是邻接矩阵的幂了。所以,把题目上那幅图用邻接矩阵建出来,注意点E不要连出边,因为题目上说了主人公没那么蠢,不会到了E还继续走。
然后,计算这个邻接矩阵的n次幂就好了,最终答案在... |
Java | UTF-8 | 8,134 | 1.96875 | 2 | [] | no_license | package app.roundtable.nepal.activity.managers;
import android.content.Context;
import com.squareup.picasso.Picasso;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.io.IOException;
im... |
Shell | UTF-8 | 1,104 | 3.21875 | 3 | [] | no_license | # #!/bin/bash
# #vpncmd /client localhost /cmd accountlist >> awk -F "|" '/Status/ print{$
# # choice=""
# # read choice
# # # fchoice=$(cat logs/account.txt | awk NR==$choice)
# # ./test2.sh "$fchoice"
# # dhclient vpn_ss -v | grep '10.20.*' &> /dev/null
# # if [ $? == 0 ]; then
# # echo "matched"
# # fi
# # if... |
Java | UTF-8 | 1,572 | 3.5625 | 4 | [] | no_license | package com.example.Animal_Farm;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
public class Farm {
ArrayList<com.example.Animal_Farm.Animal> animals;
public Farm() {
animals = new ArrayList<com.example.Animal_Farm.Animal>();
}
public void addAnimal(c... |
C# | UTF-8 | 1,584 | 2.9375 | 3 | [] | no_license | using projektlabor.covid19login.adminpanel.datahandling;
using projektlabor.covid19login.adminpanel.datahandling.entities;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
namespace projektlabor.covid19login.adminpanel.datahandling.entities
{
public class SimpleUserEntity : Entity
... |
Markdown | UTF-8 | 375 | 2.859375 | 3 | [] | no_license | To use, simply run ./reconcile.py in a directory containing listings.txt and products.txt,
or direct it to the files:
./reconcile.py --listings path/to/listings.txt --products path/to/products.txt
By default, output is sent to stdout. To redirect output, use the --output argument.
For additional arguments and he... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.