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 |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 2,790 | 2.578125 | 3 | [] | no_license | ---
copyright:
years: 1994, 2017-2019
lastupdated: "2019-03-08"
keywords: Select Basic cPanel, Private Nameservers
subcollection: dns
---
{:shortdesc: .shortdesc}
{:new_window: target="_blank"}
{:DomainName: data-hd-keyref="DomainName"}
{:note: .note}
{:important: .important}
{:deprecated: .de... |
Java | UTF-8 | 96 | 1.640625 | 2 | [] | no_license | package vendor.http;
public interface ResultCallback {
public void loader(Object obj);
}
|
Python | UTF-8 | 343 | 2.71875 | 3 | [
"MIT"
] | permissive | import cv2
#Carregar algum dado pre-treinado sobre rostos frontais do opencv ( haar cascade algoritmo )
rostosTreinados = cv2.CascadeClassifier('../opencv/haarcascade_frontalface_default.xml')
#Escolher uma imagem para ser usada como fonte
img = cv2.imread('../Image/Eu.jpg')
cv2.imshow('Clever Programmer Face Detect... |
SQL | UTF-8 | 1,598 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 29 août 2018 à 13:29
-- Version du serveur : 5.7.21
-- Version de PHP : 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
Java | UTF-8 | 113,950 | 2.359375 | 2 | [] | no_license | import greenfoot.*;
//Level generated by Level Creator
//Level designed by:
public class Level61 extends Platformer{
public Level61(){
this(0,0);
}
public Level61(double x, double y){
super(x,y);
}
private boolean firstPass = true;
public void act()
{
if(firstPa... |
C# | UTF-8 | 2,144 | 3.5625 | 4 | [] | no_license | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab2.Model
{
public abstract class Employee : IPayable
{
private class SortPaymentDescendingHelper : IComparer<Employee>
{
... |
Python | UTF-8 | 4,722 | 3.203125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
class Equation:
def __init__(self,x0,x1,x2,x3,x4,x5):
self.x0=x0
self.x1=x1
self.x2=x2
self.x3=x3
self.x4=x4
self.x5=x5
equations = []
solutions = []
MIN = -10
MAX = 10
RATE = .01 #... |
Markdown | UTF-8 | 2,226 | 2.859375 | 3 | [] | no_license | # GitHub Cheat Sheet
### Made some changes
### List of basic Git Commands that are useful for any Developer
The most popular ways to Authenticate with any Git Server is :
- HTTPS Authentication : Username & Password that you used while registering with Git Server
- SSH : Generate a pair of SSH Keys on the client (pa... |
Java | UTF-8 | 2,527 | 3.828125 | 4 | [] | no_license | package com.my.interview.fp.basics.patient.example;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Predicate;
public class StandartFunctionalInterfaces {
public static void main(String[] args) {
List<Patient> pats ... |
Markdown | UTF-8 | 1,924 | 2.8125 | 3 | [] | no_license | # EC2 - ASG (Auto-Scaling Group) with Application Load Balancer (ALB)
# Goal
Run multiple instances and load balance application to avoid down times during failure and deployment.
## Task
0. Build on task *ec2_asg*
0. Create an application load balancer (ALB) in new file `alb.tf`
- which listens on http port 80 ... |
Markdown | UTF-8 | 4,372 | 2.78125 | 3 | [] | no_license | ## README
### Setup
1. Locate a system running a modern version of Windows (Windows 7, 32/64bit, Windows 8, 32/64bit).
2. Download and install [Microsoft Visual Studio 2013 Community Edition]( http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx) on your Windows system.
3. Download and (*Typical*) instal... |
Java | UTF-8 | 196 | 1.9375 | 2 | [] | no_license | package model.exporters;
import java.io.File;
import model.ucm.UseCaseMap;
public interface UseCaseMapExporter {
// Methods
public File export(UseCaseMap useCaseMap, String fileName);
}
|
Python | UTF-8 | 1,689 | 2.671875 | 3 | [] | no_license | import dash, requests, json
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
url = 'https://raw.githubusercontent.com/plotly/plotly.js/master/test/image/mocks/sankey_energy.json'
response = re... |
Shell | UTF-8 | 1,050 | 3.21875 | 3 | [] | no_license | #!/bin/bash
echo ' *** Prepare the bastion host to serve as a Jenkins agent *** '
# yum update -y
yum -y install java-1.8.0-openjdk
yum -y install git
echo ' *** Install tools ***'
yum -y install wget
echo ' *** Create helper scripts *** '
cat <<EOF >> /init.sh
#!/bin/bash
(
sleep 2
echo ""
sleep 2
echo ""
sl... |
Markdown | UTF-8 | 3,262 | 2.625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MPL-2.0",
"LGPL-2.0-only",
"GPL-CC-1.0",
"LGPL-3.0-only",
"GPL-2.0-or-later",
"GPL-3.0-only",
"EPL-2.0",
"MIT"
] | permissive | [#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: subject: (3 implications of serverless)
[#]: via: (https://opensource.com/article/18/12/serverless-podcast-command-line-heros)
[#]: author: (Jen Wike Huger https://opensource.com/users/remyd)
[#]: url: ( )
3 implication... |
C++ | UTF-8 | 1,205 | 2.6875 | 3 | [] | no_license | //
// Created by Mohamad on 8/2/2018.
//
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int max_mn = 3e5 + 1;
const ll inf = 1e15;
vector<int> adj_list[max_mn];
vector<ll> adj_weight[max_mn];
int n, m;
struct Ras {
ll id;
ll weight;
Ras(ll idd, ll w = inf) {
id = idd;
... |
Markdown | UTF-8 | 6,102 | 2.765625 | 3 | [] | no_license | Title: Rapid GUI Programming with Python and QT
Date: 2008/01/01 00:00:00
Modified: 2008/01/01 00:00:00
Authors: Tony Cappellini, Jan 2008
Category: BookReview
Tags: BookReview
Slug: RapidGUIProgrammingwithPythonandQT__TonyCappellini_Jan2008
Summary: "At Last!" is what came to mind when I first read about the new book ... |
JavaScript | UTF-8 | 2,195 | 2.796875 | 3 | [] | no_license |
function initWebGL(canvas) {
gl = null;
try {
gl = canvas.getContext("webgl2");
}
catch(e) {}
if (!gl) {
alert("Unable to initialize WebGL2. Your browser may not support it.");
gl = null;
}
return gl;
}
function createShader(gl, type, shaderSource) {
let shader = gl.createShade... |
C# | UTF-8 | 1,250 | 2.984375 | 3 | [] | no_license | namespace PVT.Shop.Infrastructure.Common
{
using System.Collections.Generic;
using System.Linq;
using Services;
public class Basket : IBasketService
{
private readonly List<BasketItem> _basketItems = new List<BasketItem>();
public IEnumerable<BasketItem> BasketItems => this._baske... |
Java | UTF-8 | 3,944 | 1.992188 | 2 | [] | no_license | package com.yp.paparazzilive.adapters.mine;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.... |
Markdown | UTF-8 | 1,060 | 2.65625 | 3 | [
"MIT"
] | permissive | ---
type: "design"
path: "/design/refit"
date: "2018-04-15"
title: "Refit Equipments"
medium: "Digital"
images:
- refit.png
---
Refit Equipments Pvt Ltd was an orthopaedics manufacturing and distribution company. The logo was a redesign of a draft logo made early in the creation of the company, and prominently feature... |
Python | UTF-8 | 1,707 | 2.859375 | 3 | [] | no_license | import cv2
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import imread
from tqdm import trange
def convolve2d(A,B) :
A_ = A.flatten()
n = A.shape[1]
toeplitz_row = np.zeros(A_.shape[0])
for i in trange(B.shape[0]) :
toeplitz_row[i*n:i*n+B.shape[1]] = B[i]
#Creatin... |
PHP | UTF-8 | 2,386 | 3.09375 | 3 | [] | no_license | <?php
namespace Tests;
use App\Clock;
use App\DigitalClock;
use PHPUnit\Framework\TestCase;
/**
* Class ObserverPatternTest
* @package Tests
*/
class ObserverPatternTest extends TestCase
{
public function test_訂閱一個對的channel執行三秒應有output且內容符合()
{
// arrange
// 預期 output 內容
$expected ... |
C++ | UTF-8 | 1,840 | 2.515625 | 3 | [] | no_license | //
// main.cpp
// linguistic_parser
//
// Created by Chris Pauley on 5/15/17.
//
//
#include <iostream>
#include <istream>
#include <string>
#include <thread>
#include <unordered_map>
#include <chris/json_serialize.h>
#include <chris/json.h>
#include "word_stats.h"
#include "parser.h"
#include "routes.h"
#include <... |
TypeScript | UTF-8 | 175 | 2.53125 | 3 | [] | no_license | export class Player {
player_id: string;
name: string;
}
// type Player struct {
// PlayerId string `validate:"required"`
// Name string `validate:"required"`
// }
|
Java | UTF-8 | 334 | 2.140625 | 2 | [] | no_license | package com.luizacode.Coffee_is_the_new_Code.error;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.CONFLICT)
public class NegocioException extends RuntimeException{
public NegocioException(String mensagem) {
super(mensa... |
Java | UTF-8 | 3,745 | 2.8125 | 3 | [] | no_license | package edu.unh.cs.cs619_2014_project2.g6;
import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;
import android.widget.Toast;
import ... |
Markdown | UTF-8 | 962 | 2.71875 | 3 | [] | no_license | # Chat-App
## About
This is a basic chat app from scratch written with React Native and Firebase. It is a one to one chat app. Authentication is not included in this as the main motive was to explore Firebase Real Time Database and Firebase Storage.
## Description
The app initially checks if you are logged in or not ac... |
Python | UTF-8 | 507 | 3.015625 | 3 | [] | no_license | #/usr/bin/env python
from string import maketrans, translate, lowercase, punctuation, whitespace
def encode(words):
trans = maketrans(lowercase, lowercase[::-1])
result = translate(words.lower(), None, punctuation+whitespace)
result = translate(result, trans)
result = " ".join([result[i:i+5] for i in range(0,len(re... |
Markdown | UTF-8 | 1,949 | 3.21875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: Because School Lunch is Delicious
tags: [culture, old blog]
keywords: [school lunch]
excerpt: From NewsChicago.com: To encourage healthful eating, some Chicago schools don’t allow kids to bring lunches or certain snacks from home
---
From [NewsChicago.com](http://newschicago.net/tag/little-... |
Markdown | UTF-8 | 1,499 | 2.59375 | 3 | [] | no_license | ---
url: /scribble-filter-now-available-and-other-muses/
date: 2012-11-08
title: Scribble Filter Now Available and Other Muses
tags:
- marketing
- scribblefilter
---
I got the sale software all installed so I can sell the [Scribble
Filter](http://www.spreadsheetbudget.com/products/scribble-filter/).
There’s s... |
Go | UTF-8 | 576 | 3.9375 | 4 | [] | no_license | // 자료형: 맵(3)
package main
import "fmt"
func main() {
// Map
// 맵 값 변경 및 삭제
// 예제1
map1 := map[string]string{
"daum": "http://daum.net",
"naver": "http://naver.com",
"google": "http://google.com",
"home1": "http://test1.com",
}
fmt.Println("ex1:", map1)
map1["home2"] = "http://test2.com" // 추가
fm... |
Java | UTF-8 | 1,149 | 1.9375 | 2 | [] | no_license | package com.scy.component.slidingconflict;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
... |
Python | UTF-8 | 990 | 2.96875 | 3 | [] | no_license | import sys
sys.stdin = open('1247_sample_input.txt', 'r')
def backtrack(x, y, k, r):
global min_r
if k >= N:
r += abs(x-home[0]) + abs(y-home[1])
min_r = min(min_r, r)
return
elif r >= min_r:
return
else:
for customer in customers:
if visit[custom... |
Python | UTF-8 | 1,299 | 2.984375 | 3 | [
"BSD-4-Clause",
"BSD-2-Clause"
] | permissive | import numpy as np
import pandas as pd
def numerical_summary(series: pd.Series) -> dict:
"""
Args:
series: series to summarize
Returns:
"""
aggregates = [
"mean",
"std",
"var",
"max",
"min",
"median",
"kurt",
"skew",
... |
C++ | UTF-8 | 1,547 | 3.90625 | 4 | [] | no_license | #include "List.h"
List::List()
{
head = NULL;
tail = NULL;
}
List::~List()
{
Node *currNode, *nextNode;
currNode = head;
while (currNode != NULL) {
nextNode = currNode->next;
delete currNode->data;
delete currNode;
currNode = nextNode;
}
}
void List::add(Book* book)
{
Node* tmpNode... |
JavaScript | UTF-8 | 228 | 3.140625 | 3 | [] | no_license | function balikkata(kata){
var a = kata.length-1;
var b = " ";
for (var c = a; c >= 0; c--) {
b += kata [c];
}
return (b);
}
console.log (balikkata ('hello world!'));
|
Python | UTF-8 | 2,623 | 3.859375 | 4 | [] | no_license | #Recorrido Primero en Anchura (BFS=Breadth First Search)
#Versión Iterativa
#Primero en Anchura=> Lista de tipo COLA (FIFO)
from collections import deque
#----------------------------------------------------
#VERSIÓN PROPIA UTILIZANDO DICCIONARIO
#----------------------------------------------------
#VERSIÓN PROFES... |
JavaScript | UTF-8 | 1,634 | 2.765625 | 3 | [] | no_license | const STATIC_CACHE = "static-cache-v1";
const URL_CACHE = "data-cache-v1";
self.addEventListener("install", event => {
event.waitUntil(
caches
.open(STATIC_CACHE)
.then(cache => cache.addAll([
"/",
"/db.js",
"/index.js",
... |
Markdown | UTF-8 | 625 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | # Version Numbering
Hamkrest releases have version numbers with the following scheme:
{conceptual}.{major}.{minor}.{patch}
Major, minor and patch follow [Semantic Versioning](https://semver.org/) conventions. "Conceptual" is incremented when there is a change to the API that significantly changes it's conceptua... |
Markdown | UTF-8 | 1,599 | 2.703125 | 3 | [
"MIT"
] | permissive | ---
title: "The Covid Chronicles: May 2-3"
date: 2020-05-03
description: "The Covid Chronicles for May 2 & 3"
---
### May 2
- Dallas County: 3,899 total cases, 181 new cases, and 4 deaths.
### May 3
- Dallas County: 4,133 total cases, 234 new cases, and 1 death.
- - -
Oh my goodness, this raises all sorts of ques... |
PHP | UTF-8 | 3,527 | 2.765625 | 3 | [] | no_license | <?php namespace Taco\ZP\commands;
use pocketmine\command\CommandSender;
use pocketmine\command\PluginCommand;
use pocketmine\item\enchantment\Enchantment;
use pocketmine\item\enchantment\EnchantmentInstance;
use pocketmine\Player;
use pocketmine\utils\TextFormat as TF;
use Taco\ZP\ce\CEManager;
use Taco\ZP\Loader;
cl... |
Markdown | UTF-8 | 6,047 | 2.90625 | 3 | [] | no_license | # CO2 Control Panel
### Table of Contents
- [CO2 Control Panel](#CO2-Control-Panel)
- [Table of Contents](#table-of-contents)
- [Description](#description)
- [Technologies](#technologies)
- [Installation](#installation)
- [References](#references)
- [License](#license)
- [Contributors](#contributo... |
JavaScript | UTF-8 | 546 | 3.75 | 4 | [] | no_license | function randomNumber(n) {
return search(0, n);
}
function flip() {
return Math.random() >= 0.5;
}
function search(bottom, top) {
var lower_limit = Math.floor(bottom);
var upper_limit = Math.ceil(top);
if(Math.floor(bottom) == Math.floor(top)) {
return flip() ? lower_limit : upper_limit;
} else {
... |
C++ | UTF-8 | 412 | 3.015625 | 3 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector <int> binario;
vector<int> keep;
vector <int>:: iterator pos;
int dec,aux;
cin >> dec;
for (int i=0; dec>=1;i++)
{
aux=dec%2; dec=dec/2;
cout << aux;
keep.push_back(aux);
}
for (pos=keep.end(); binario.size()!=keep.size(... |
C++ | UTF-8 | 913 | 2.90625 | 3 | [] | no_license | /*
* b.cpp
*
* Created on: Apr 12, 2014
* Author: AhmedHamza
*/
#include<cstdio>
#include<queue>
using namespace std;
struct Event
{
double t, p;
bool f;
bool operator <(const Event& e) const
{
if (t != e.t)
return t > e.t;
if (f != e.f)
return f < e.f;
return ... |
C | UTF-8 | 245 | 2.796875 | 3 | [] | no_license | #include <stdio.h>
#include <math.h>
int main(int argc, char *argv[])
{
int n,m; // n - hours m - minutes kogda strelki sovpadut
scanf("%d",&n);
scanf("%d",&m);
if ((n<=12) && (n>0) && (m<60) && (m>=0))
printf("%d\n",);
return 0;
}
|
Java | UTF-8 | 228 | 1.546875 | 2 | [] | no_license | package top.fuyuaaa.shadowpuppets.model.analysis;
import lombok.Data;
/**
* @author: fuyuaaa
* @creat: 2019-04-28 11:44
*/
@Data
@SuppressWarnings("all")
public class XYData {
private String x;
private Integer y;
}
|
Python | UTF-8 | 1,909 | 2.625 | 3 | [] | no_license | import os
import sys
import numpy as np
import pandas as pd
from PIL import Image
#当前文件夹路径
root_path = sys.path[0]
csv_data = os.path.join(root_path, 'data/fer2013.csv')
# 图片保存路径
# 训练集
tra_path_root = os.path.join(root_path, 'data/train')
# 测试集
val_path_root = os.path.join(root_path, 'data/val')
emo_data = pd.read_c... |
Java | UTF-8 | 6,794 | 2.40625 | 2 | [] | no_license | package com.technoworld.calculator;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
i... |
Markdown | UTF-8 | 5,001 | 2.578125 | 3 | [] | no_license | <html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta charset="utf-8"/>
<title>765 More Cases Discharged; 218 New Cases of Covid-19 Infection Confirmed</title>
<body><h1>765 More Cases Discharged; 218 New Cases of Covid-19 Infection Confirmed</h1>
<p>Published Date: 20 Ju... |
Markdown | UTF-8 | 12,572 | 2.65625 | 3 | [] | no_license | # 네트워크
### HTTP
**(1) HTTP, HTTPS 프로토콜이란?**
- HTTP는 인터넷에서 데이타를 주고 받는 규악을 의미함. 데이타의 무결함과 순서 등이 보장받을 수 있음.
- HTTP는 송수신 받는 헤더와 바디가 암호화 되지 않음. HTTPS는 SSL 암호화를 통해 데이타의 보안성을 강화.
- HTTPS는 자원을 많이 사용하기 때문에 HTTP와 섞어서 사용.
**(2) GET, POST 차이***
- GET : 클라이언트가 서버에 요청하는 데이타를 헤더의 url을 통해 보낸다. 모두에게 공개되어 있으며 열람을 목표로 하는... |
C++ | UTF-8 | 9,406 | 3.5625 | 4 | [] | no_license | //
// sorting_functions.cpp
// poem_sorter
//
// Created by Alexandra Korabulina on 22.09.2020.
//
#include "sorting_functions.hpp"
#include <iostream>
#include <fcntl.h>
#include <cstdio>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
//! Compares two strings alphabetically... |
Swift | UTF-8 | 1,537 | 3.078125 | 3 | [
"MIT"
] | permissive | //
// ContentView.swift
// split-view-test
//
// Created by Michael Engel on 25.05.21.
//
import SwiftUI
struct A: View {
var body: some View {
VStack {
Spacer()
HStack {
Spacer()
Text("Pane A")
... |
Java | UTF-8 | 2,350 | 2.140625 | 2 | [] | no_license | package cn.crtech.cooperop.hospital_common.action.rule_maintenance;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import cn.crtech.cooperop.bus.mvc.control.BaseAction;
import cn.crtech.cooperop.bus.rdms.Result;
import cn.crtech.cooperop.bus.util.Common... |
Shell | UTF-8 | 262 | 3 | 3 | [
"MIT"
] | permissive | #!/bin/bash
# workspace_git.sh
while true;
do
git pull origin periodic
if [ -z $(git status --s) ];
then
echo "Nothing to do here."
else
git add --all
git commit -m "$(date)"
git push origin periodic
fi
echo "Updated at: "
date
sleep 300
done
|
Java | UTF-8 | 6,336 | 2.859375 | 3 | [] | no_license | package e.arif.bankapplication;
public class Bank {
String services;
String debitAccount;
String creditAccount;
double transAmount;
Client[] clients;
int noc;
final int MAX_NUM_CLIENTS = 6;
boolean error;
String errorMsg;
Bank() {
clients = new Client[MA... |
Java | UTF-8 | 498 | 3.296875 | 3 | [] | no_license | package Basics.LessonExercises;
import java.util.Scanner;
public class Exercise10CircleMain {
public static void main(String[] args) {
double radius;
Circle size = new Circle();
Scanner scan = new Scanner(System.in);
System.out.print("Enter radius: ");
radius = scan.nextDo... |
PHP | UTF-8 | 484 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hmct;
use Illuminate\Database\Eloquent\Model;
class Department extends Model
{
protected $fillable = [
'name',
'description',
'image',
'slug',
];
public function doctors()
{
return $this->hasMany(Doctor::class);
}
public function hospital... |
C++ | UTF-8 | 5,786 | 3.265625 | 3 | [] | no_license | #define ulli unsigned long long int
#define ld long double
#include <iostream>
#include <math.h>
int array_size = 10000000;
ulli * primes = new ulli[array_size];
ulli * primes_squares = new ulli[array_size];
// Variables that will be returned
ulli first_prime_multiplier = 0;
ulli second_prime_multiplier = 0;
ulli m... |
C++ | UTF-8 | 3,154 | 2.875 | 3 | [] | no_license | #ifndef HEX_SPRITE_H
#define HEX_SPRITE_H
#include <vector>
#include <iostream>
#include <SFML/Graphics.hpp>
#include "statistics.hpp"
#include "icarus/math/vector2.hpp"
namespace icarus
{
namespace overworld
{
class hex_sprite : public sf::Drawable
{
private:
hex_sprite* this_hex_sprite;
s... |
Python | UTF-8 | 1,773 | 2.890625 | 3 | [] | no_license | __author__ = 'robertv'
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 05 11:10:13 2013
@author: Ivo
"""
import pandas as pd
from matplotlib.pylab import figure, grid, savefig, xlim, ylim, colorbar
from matplotlib.pylab import title, tight_layout, close, xlabel, ylabel
from itertools import combinations
import network... |
Java | UTF-8 | 2,519 | 2.53125 | 3 | [] | no_license |
package cps.core.model.timeSheet;
import cps.core.db.frame.BaseEntity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.... |
Java | UTF-8 | 865 | 3.3125 | 3 | [] | no_license | package OOPSConcept2;
public class HSBCBank implements USBank, RBIBank { //We are achieving Multiple Inheritance
//Is -a Relationship--- Relationship between Interface and Class ( Implements Keyword)
//If a Class is implementing any interface, then its mandate to define /override all the methods of interface
p... |
Java | UTF-8 | 1,104 | 2.265625 | 2 | [] | no_license | package com.telusko.quiz.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.an... |
PHP | UTF-8 | 337 | 2.515625 | 3 | [] | no_license | <?php
require_once("../db-utils.php");
// this function returns a list of hashes
// each hash represents a host (contains the host's fullname and hostid)
// the hosts are ordered alphabetically
function get_host_fullnames ($db) {
$query = "SELECT hostid, fullname FROM Hosts ORDER BY fullname;";
return try_query($db... |
Java | UTF-8 | 2,898 | 2.328125 | 2 | [] | no_license | package questionboard.controller;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRe... |
Python | UTF-8 | 4,869 | 3.125 | 3 | [
"MIT"
] | permissive | ## You need to change the first three values here for the code to work properly.
## Use the API Key from Facebook Developer
API = ''
## Put here your page id (default is The Marshall Project's ID)
page_id = ''
## Put here the names of the output files
report = 'example.csv'
detailed_report = 'example_detail.csv'
#... |
C | UTF-8 | 23,008 | 2.625 | 3 | [] | no_license | #include <stdio.h>
#include <stdint.h>
uint8_t and_gate(uint8_t a, uint8_t b){
return ((a >> 0) & 0x01) & ((b >> 0) & 0x01);
}
uint8_t xor_gate(uint8_t a, uint8_t b){
return ((a >> 0) & 0x01) ^ ((b >> 0) & 0x01);
}
uint8_t or_gate(uint8_t a, uint8_t b){
return ((a >> 0) & 0x01) | ((b >> 0) & 0x01);
}
uint8_t ... |
Java | UTF-8 | 1,309 | 2.265625 | 2 | [] | no_license | /*package questions;
import net.serenitybdd.screenplay.Actor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static net.thucydides.core.pages.components.HtmlTable.rowsFrom;
import static userinterface.BrokerUI.users;
import static userinterface.ClusterCollec... |
Python | UTF-8 | 1,835 | 3.5625 | 4 | [] | no_license | from constant import POPULATION_SIZE
from constant import BEST_POSSIBLE_FIT
from constant import BEST_POSSIBLE_X
from constant import WORST_POSSIBLE_FIT
from constant import WORST_POSSIBLE_X
from belief_space import Belief
from population_space import Population
def quick_sort(arr):
less = []
equal = []
g... |
JavaScript | UTF-8 | 1,205 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './App.css';
class App extends Component {
constructor(props){
super(props);
this.clickRandom = this.clickRandom.bind(this);
this.clickFindRootNode = this.clickFindRootNode.bind(this);
}
clickRandom(){
this.force... |
JavaScript | UTF-8 | 2,265 | 2.53125 | 3 | [
"MIT"
] | permissive | // RegEx Constants
var re_username = 'username=\"([^"]+)\"';
var re_realm = 'realm=\"([^"]+)\"';
var re_uri = 'uri=\"([^"]+)\"';
var re_nonce = '[^c]nonce=\"([^"]+)\"';
var re_cnonce = 'cnonce=\"([^"]+)\"';
var re_nc = 'nc=([0-9a-f]+)';
var re_qop = 'qop=\"?(auth|auth-int)\"?';
var re_response = 'response=\"([^"]+)\"';... |
Java | UTF-8 | 2,745 | 2.453125 | 2 | [] | no_license | package nctu.cs.cgv.itour.custom;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;... |
Markdown | UTF-8 | 730 | 4.09375 | 4 | [
"MIT"
] | permissive | Have the function ```StringPeriods(str)``` take the ```str``` parameter being passed and determine if there is some substring K that can be repeated N > 1 times to produce the input string exactly as it appears. Your program should return the longest substring K, and if there is none it should return the string **-1**.... |
Markdown | UTF-8 | 14,725 | 2.90625 | 3 | [] | no_license | ---
title: Qt之QTextCharFormat
categories: Qt语法详解
date: 2019-01-25 20:51:00
---
  The `QTextCharFormat` class provides formatting information for characters in a `QTextDocument`.<!--more-->
Header | Inherits | Inherited By
------------------|---------------|-----------------
`QTextCharFormat` ... |
Python | UTF-8 | 1,377 | 2.546875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/python
import sys
import os
import fnmatch
def process(s):
print 'Processing %s ...' % s,
paths = dict()
pkgs = dict()
f = os.popen('lzma -c -d %s.txt.lzma' % s)
g = open(s + '.sql', 'w')
g.write('BEGIN;\n')
g.write('CREATE TABLE binary(binary VARCHAR(64) NOT NULL, id_path INT NO... |
JavaScript | UTF-8 | 3,607 | 3.109375 | 3 | [
"ISC"
] | permissive | $(document).ready(function () {
var tableBody = $("tbody");
var tableContainer = $(".table-container");
var hiddenURL = $('#hiddenId').text();
var addHours = document.getElementById("#total-hours");
var addCosts = document.getElementById("#total-cost");
// Getting the initial list of Time Entr... |
Java | UTF-8 | 1,017 | 2.609375 | 3 | [] | no_license | package skill;
import javafx.scene.image.Image;
import buff.*;
import entity.job.Novice;
import main.Main;
public class Haste extends ActiveSkill {
private static final int DEFAULT_COOLDOWN = 5 * Main.FRAME_RATE;
private static final double COOLDOWN_PER_LEVEL = 0.5;
private static final int DEFAULT_DURATION = 2 *... |
PHP | UTF-8 | 6,482 | 2.859375 | 3 | [] | no_license | <?php
class AppointmentModel{
private static $db;
public function __construct(){
if(is_null(self::$db)){
self::$db=DB::getInstance();
}
}
public function query($param=array()){ //*******查询*******
$where=array();
$where['order']="starttime DESC";
if(empty($param)){
return self::$... |
Java | UTF-8 | 2,609 | 2 | 2 | [] | no_license | package jp.appAdForce.android;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import com.com2us.module.manager.ModuleConfig;
import java.lang.reflect.Method;
import jp.co.dimage.android.a;
import jp.co.dimage.android.f... |
JavaScript | UTF-8 | 7,797 | 2.59375 | 3 | [] | no_license | /**
* Created by Aghil
* Project : MovieGenie
* Filename : signup_controller.js
* Date: 07/05/2020
* Time: 22:08
**/
// const $db = require('../config/db.inc');
const $db = require("../models");
const userObj = $db.users;
//Updating movie names, actors, genre, last_movie_recommendation
exports.updateMovieByUse... |
Java | UTF-8 | 2,182 | 1.929688 | 2 | [] | no_license | package rest.endpoints.gorest;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import rest.template.BaseResponse;
import java.util.ArrayList;
@Getter
@Setter
@JsonIgnoreProperties(ignoreUnknown = true)
public class ListAllUsersResponse extends BaseResponse {
... |
Shell | UTF-8 | 636 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | pkg_name=docker17
pkg_description="The Docker Engine"
pkg_origin=core
pkg_version=17.12.1
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=('Apache-2')
pkg_source=https://download.docker.com/linux/static/stable/x86_64/docker-${pkg_version}-ce.tgz
pkg_upstream_url=https://docs.docker.com/engine/i... |
Markdown | UTF-8 | 9,313 | 3.1875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: SSD vs YOLO
author: hoangbm
---
To be honest, I'm truly fed up with revising knowledge before an interview, especially object detection algorithms like SSD and YOLO. Every time I prepare for an interview in computer vision, I read about these two architectures and I can't tell the exact differe... |
C | UTF-8 | 204 | 3.546875 | 4 | [] | no_license | #include<stdio.h>
int bitcount_one(unsigned int x)
{
int count = 0;
for(;x!=0;count++)
{
x &= ( x-1 );
}
return count;
}
int main()
{
printf("the count of 1's are %d\n",bitcount_one(0xF1FF));
}
|
Java | UTF-8 | 1,852 | 3.296875 | 3 | [] | no_license | package com.cn.testReentrantLock;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
class ReentrantLockTest4{
private Lock lock=new ReentrantLock();
private Condition condition=lock.newCondition();
public void test(){
try {
loc... |
Python | UTF-8 | 2,685 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-public-domain",
"OFL-1.1"
] | permissive | """Self organizing maps"""
# -----------------------------------------------------------------------------
# Copyright 2019 (C) Nicolas P. Rougier
# Released under a BSD two-clauses license
#
# References: Kohonen, Teuvo. Self-Organization and Associative Memory.
# Springer, Berlin, 1984.
# https://github.c... |
Java | UTF-8 | 4,068 | 2.515625 | 3 | [] | no_license | package com.arquitetura.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Service;
import com.arquitetura.model.Local;
import com.arquitetura.model.Selecao;
import com.arquitetura.model.Usuario;
import com.arquitetura.service.SelecaoService;... |
Swift | UTF-8 | 389 | 2.8125 | 3 | [
"MIT"
] | permissive | //
// PlayerEntity.swift
// ViperIos
//
// Created by Tim on 21.07.19.
// Copyright © 2019 Tim. All rights reserved.
//
import Foundation
class PlayerEntity {
public static var player1 = PlayerEntity(symbol: "🐍")
public static var player2 = PlayerEntity(symbol: "🦅")
var symbol: Character
private... |
Java | UTF-8 | 1,374 | 2.546875 | 3 | [] | no_license | import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.io.BytesWritable;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FSDataInputStream;
publi... |
Python | UTF-8 | 1,259 | 4.125 | 4 | [] | no_license | '''
Runtime:
time: recursively calling from first node to the last takes O(n). n is the total number of nodes
space: recursive stack takes O(n), n is the total number of nodes
Analysis:
Given: a binary tree
Ask: invert it
Input: [1,2,3]
Output: [1,3,2]
To... |
C++ | UTF-8 | 1,088 | 2.546875 | 3 | [] | no_license | #pragma once
// This Wave class focus animation terrain
#include <vector>
#include <DirectXMath.h>
using namespace DirectX;
class Wave
{
public:
Wave(int m, int n, float dx, float dy, float speed, float damping);
Wave(const Wave& rhs) = delete;
Wave& operator=(const Wave& rhs) = delete;
~Wave();
public:
int Row... |
C | UTF-8 | 1,019 | 2.765625 | 3 | [] | no_license | #include "gl_util.h"
GLvoid gl_print(GLfloat x, GLfloat y, GLfloat z, char *t) {
char *p;
glRasterPos3f(x, y, z);
for (p = t; *p; p++) {
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, *p);
}
}
GLvoid gl_circle_vertices(GLfloat radius) {
GLfloat d = 0;
for (d = 0; d < M_PI * 2; d += CIRCLE_INT)
glVe... |
Python | UTF-8 | 371 | 3.375 | 3 | [] | no_license | change = float(input("Enter the change amount: "))
p = int(change * 100)
d1= (p // 100)
change2 = (p%100)
q = (change2//25)
change3 = (change2%25)
d = (change3//10)
change4 = (change3%10)
n = (change4//5)
change5 = (change4%5)
p2 = (change5//1)
print (d1, "Dollars", "\n", q, "Quarters", "\n", d, "Dimes",... |
Markdown | UTF-8 | 2,736 | 3.171875 | 3 | [] | no_license | # Making Git merge do what _you_ want
This repository demonstrates results of merging two branches, `ReleaseX` and `ReleaseY`, with different Git merge strategies.
Most of the time git default merge strategy works just fine, but when you need something different, the waters get murky. E.g. `git merge -s ours...` is ... |
TypeScript | UTF-8 | 712 | 2.53125 | 3 | [] | no_license | import { Directive, ElementRef, Input, HostListener } from '@angular/core';
@Directive({
selector: '[appRacing]'
})
export class RacingDirective {
@Input() poney: Poney
constructor(private element: ElementRef) { }
@HostListener('dblclick') handleDblClick(){
let runningImg = this.poney.img.replace('... |
C++ | UTF-8 | 10,957 | 2.78125 | 3 | [] | no_license | #include <EndianStream.h>
#define write5(x) write((const char*) &x, sizeof(x))
namespace asdm {
EndianOSStream::EndianOSStream():byteOrder_(asdm::ByteOrder::Machine_Endianity) {;}
EndianOSStream::EndianOSStream(const asdm::ByteOrder* byteOrder):byteOrder_(byteOrder) {;}
EndianOSStream::~EndianOSStrea... |
Python | UTF-8 | 12,026 | 4.78125 | 5 | [] | no_license | Python Sets
In Python, **Set** is an unordered collection of data type that is iterable,
mutable and has no duplicate elements. The order of elements in a set is
undefined though it may consist of various elements.
The major advantage of using a set, as opposed to a list, is that it has a
highly optimized ... |
C++ | UTF-8 | 750 | 2.984375 | 3 | [] | no_license | /*************************************************************************
> File Name: validAnagram.cpp
> Author: ce39906
> Mail: ce39906@163.com
> Created Time: 2018-12-11 18:57:40
************************************************************************/
class Solution {
public:
bool isAnagram(s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.