language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 18,994 | 3.515625 | 4 | [] | no_license | import copy
import sys
import collections
class MDP:
# Return the start state.
def startState(self): raise NotImplementedError("Override me")
# Return set of actions possible from |state|.
def actions(self, state): raise NotImplementedError("Override me")
# Return a list of (newState, prob, rewa... |
Markdown | UTF-8 | 3,112 | 2.515625 | 3 | [
"MIT"
] | permissive | # cdn-sync [](https://www.npmjs.com/package/cdn-sync) [](https://travis-ci.org/jokeyrhyme/cdn-sync)
Synchronise a local directory with AWS CloudFront / S3, maintaining correct... |
Markdown | UTF-8 | 3,068 | 2.640625 | 3 | [] | no_license | ---
title: March Update - Behind the Magic and Duetta
date: 2018-03-04 17:46:00 Z
---
It's been a bit since my last update and I'd love to share some progress on two games drafts, Behind the Magic and Duetta.
## Behind the Magic
I've run Behind the Magic – my fantasy mockumentary game - three times in the last coupl... |
Java | UTF-8 | 752 | 3.484375 | 3 | [
"MIT"
] | permissive | /* Matheus Henrique de Oliveira Querido */
import java.io.IOException;
import java.util.Scanner;
public class Exer55 {
public static void main(String[] args) throws IOException {
Scanner leia = new Scanner(System.in);
int res = 0, a = 0, b = 0;
System.out.print("Digite um valor a s... |
JavaScript | UTF-8 | 1,883 | 3.6875 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // A set of functions for dealing with containers (objects and arrays)
"use strict";
// Map, over both objects, arrays, and strings.
// Over strings, behaves like flatMap.
function map(f, xs) {
if(typeof xs === "string")
return map(f, xs.split("")).join("");
if(Array.isArray(xs))
ret... |
JavaScript | UTF-8 | 999 | 3.6875 | 4 | [] | no_license | // uso de jquery
$(document).ready(function(){
$("#suma").click(suma);
$("#resta").click(resta);
$("#multiplicacion").click(multiplicar);
$("#division").click(dividir);
$("#potencia").click(potencia);
});
function suma() {
var x = $("#valor1").val();
var y = $("#valor2").val();
var sum... |
JavaScript | UTF-8 | 1,313 | 2.875 | 3 | [] | no_license | import React from "react";
import Note from "./note";
export default class Board extends React.Component {
constructor(props){
super(props);
this.state = {
notes: []
}
this.addNote = this.addNote.bind(this);
this.updateData = this.updateData.bind(this);
this.deleteData = this.deleteData.bind(this);
... |
Python | UTF-8 | 3,045 | 2.53125 | 3 | [
"MIT"
] | permissive | import unittest
import numpy as np
import tensorflow as tf
from tensorflow.keras import Input
from tensorflow.keras import Model
from tensorflow.keras.utils import CustomObjectScope
from tensorflow_core.python.keras.testing_utils import layer_test
from spellnn.layers.mapping import CharMapping
class MappingLayerTes... |
Markdown | UTF-8 | 32,036 | 2.796875 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: 理财笔记
subtitle: 微淼商学院理财学习
date: 2021-04-12
author: 景山
header-img: img/post-bg-netty.jpg
catalog: true
tags:
- 理财
---
### 关键富人思维
1. 【关键富人思维--第一条】
经济独立,财富自由并不是独善其身,它的本质是让自己、家人变得更好的能力,提升理财技能,实现财务独立,获得更多自主选择的权利,获得给家人更好的生活的能力。
2. 【关键富人思维--第二条】
提升财富要靠工资和非工资收入【两条... |
SQL | UTF-8 | 665 | 3.75 | 4 | [] | no_license | drop table board;
create table board(
b_num int AUTO_INCREMENT primary key,
title varchar(300) not null,
content text,
reg_date datetime not null,
writer int not null
);
select * from board;
insert into board(title, content, reg_Date, writer)
values('test5','냉무2',now(),8);
update user
set name='김경훈'
... |
C# | UTF-8 | 2,849 | 2.703125 | 3 | [
"MIT"
] | permissive | using ManagedCuda;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
[TestFixture]
class ThrustTests
{
[Test]
public void MiniTest() {
var context = new CudaContext();
var data = new int[] {2,5,8,9,6,3... |
Java | UTF-8 | 308 | 3.3125 | 3 | [] | no_license | public class 数组克隆测试 {
public static void main(String[] args) {
int[] 数组1 = {1, 2};
int[] 数组2 = 数组1.clone();
数组1[0] = 10;
for (int i : 数组1) {
System.out.println(i);
}
for (int i : 数组2) {
System.out.println(i);
}
}
}
|
PHP | UTF-8 | 4,340 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Str;
use Illuminate\Support\Facades\Validator;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... |
Shell | UTF-8 | 959 | 3.703125 | 4 | [] | no_license | #!/bin/bash
if [[ $# -ne 2 ]];then
echo "Error"
exit
fi
Start=$1
End=$2
declare -a Prime
function init_prime() {
local end=$1 # $1——第一个传入参数;声明和赋值可以放在一起
local i
Prime[1]=1
for ((i=2; i<=${end}; i++));do
# 将素数排在前面
if [[ Prime[$[i]] -eq 1 ]]; then
continue
fi... |
Java | UTF-8 | 5,852 | 2.453125 | 2 | [] | no_license | package omeng.bbwhm.com.weixin.custom_view.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.EmbossMaskFilter;
import android.graphics.Paint;
import android.support.annotati... |
Python | UTF-8 | 612 | 3.1875 | 3 | [] | no_license | while(True):
n, m = map(int, input().split())
if n == 0 and m == 0:
break
call = []
police = []
for _ in range(n):
source, dest, start, duration = map(int, input().split())
call.append((start, start+duration))
for _ in range(m):
start, duration = map(int, input(... |
JavaScript | UTF-8 | 3,813 | 2.6875 | 3 | [] | no_license | /*
based on prototype's && moo.fx's ajax class
to be used with prototype.lite, in conjunction with moo.AJAX
this submits an iframe invisibly to the server, and expects a JSON object in return
handy, so that you do not have to care about posting forms, urlencoding, file uploads etc.
usage: <form method='post' onsub... |
TypeScript | UTF-8 | 4,083 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | import { ITexture } from '../base/ITexture';
import { Image2D, _Stage_Image2D } from '../image/Image2D';
import { FilterUtils } from './FilterUtils';
interface IAtlasEntry {
hash: string;
index: number;
}
export class GradientAtlas extends Image2D {
public static assetType = '[image GradientAtlas]';
/* internal*... |
Python | UTF-8 | 2,801 | 4.03125 | 4 | [] | no_license | # Kaitlyn Stumpf
# 01/28/2018
# Algorithms Review
# Dijkstra's Shortest-Path Algorithm
# Input file contains adjacency list of undirected weighted graph,
# with 200 vertices labeled 1 - 200.
# Each row contains the node tuples adjacent to that node, along w length of each edge.
# Run Dijkstra's on this graph, using ... |
C# | UTF-8 | 1,122 | 3 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FoodTruck.Models
{
public class ClassePanier
{
private ObservableCollection<ClasseProduit> _produitsDuPanier = new ObservableCollection<Cl... |
Java | UTF-8 | 2,263 | 2.59375 | 3 | [] | no_license | package com.stevens.spring.propertyconfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
im... |
C++ | UTF-8 | 233 | 2.578125 | 3 | [] | no_license | class Solution {
public:
void reverseWords(string &s) {
istringstream input(s);
string res, temp;
while(input>>temp)
res = " "+ temp + res;
s = res.empty()?res: res.substr(1);
}
}; |
C# | UTF-8 | 1,943 | 4.0625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PG1_Week_1_Challenge_Runner.Challenges
{
class Challenge9
{
public static int x = 0;
public static int y = 0;
public static void Run()
{
Con... |
Java | UTF-8 | 77 | 1.859375 | 2 | [] | no_license | package com.edd.circlebrawl;
public interface Tick {
public void tick();
}
|
Java | UTF-8 | 3,109 | 3.71875 | 4 | [] | no_license | package com.javarush.task.task17.task1711;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/*
CRUD 2
-c name1 sex1 bd1 name2 sex2 bd2 ...
-u id1 name1 sex1 bd1 id2 name2 sex2 bd2 ...
-d id1 id2 id3 id4 ...
-i id1 id2 id3 id4 ...
*/
public class Solution {
public static vo... |
TypeScript | UTF-8 | 189 | 2.78125 | 3 | [
"MIT"
] | permissive | export function getHTMLElement(value: string | HTMLElement): HTMLElement {
if (typeof value === 'string') {
return document.querySelector<HTMLElement>(value)!;
}
return value;
}
|
Shell | UTF-8 | 2,347 | 3.625 | 4 | [
"CC0-1.0",
"LicenseRef-scancode-us-govt-public-domain",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-3-Clause-LBNL"
] | permissive | #!/bin/bash
#mutate in=<infile> out=<outfile> id=<identity>
usage(){
echo "
Written by Brian Bushnell
Last modified June 8, 2016
Description: Creates a mutant version of a genome.
Usage: mutate.sh in=<input file> out=<output file> id=<identity>
Input may be fasta or fastq, compressed or uncompressed.
... |
Python | UTF-8 | 1,595 | 3.3125 | 3 | [] | no_license | import sys
import os
import re
def isnumeric(data):
if re.match("^[1-9]\d*(\.\d+)?$",data):
return True
return False
def get_number_of_features(data_point):
data_point=data_point.strip().split(" ")
if isnumeric(data_point[0]):
features=data_point[1].split(",")
for f in features:
if not isnu... |
PHP | UTF-8 | 1,636 | 2.578125 | 3 | [] | no_license | <?php
namespace webvimark\modules\SeoPanel\models;
use webvimark\modules\SeoPanel\SeoPanelModule;
use Yii;
use webvimark\helpers\LittleBigHelper;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "page_meta_tag".
*
* @property integer $id
* @property string $url
* @property string $ti... |
Java | UTF-8 | 1,987 | 2.078125 | 2 | [] | no_license | package com.hzfh.p2p.facade.customer;
import com.hzfh.api.customer.model.EmailChange;
import com.hzfh.api.customer.model.query.EmailChangeCondition;
import com.hzfh.api.customer.service.EmailChangeService;
import com.hzframework.contract.PagedList;
import org.springframework.context.ApplicationContext;
import org.spri... |
PHP | UTF-8 | 3,698 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace n3b\Bundle\Kladr\Command;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand;
use n3b\Bundl... |
Python | UTF-8 | 8,832 | 2.8125 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 20 04:20:00 2020
@author: Degentleman
"""
import pandas as pd
import numpy as np
# Create pandas DataFrame which will be used to append data to.
sampleDB = pd.DataFrame()
# Specify the range of dates to use in the sample, the files must be in your w... |
C++ | UTF-8 | 2,671 | 3.390625 | 3 | [] | no_license | #ifndef KURS_STORAGE_H
#define KURS_STORAGE_H
#include <vector>
#include "interview.h"
#include "single_linked_list.h"
// Общий интерфейс для хранилища ответов
class IInterviewStorage {
public:
// Абстрактный деструктор, нужен для возможности вызова delete на конкретных релазиациях хранилища
virtual ~IIntervi... |
Markdown | UTF-8 | 2,235 | 2.8125 | 3 | [] | no_license | # CCEE Tech Masters
This application was developed for the Carolina Center for Educational Excellence.
The purpose of this app is to encourage student engagement in the tools and technologies at the CCEE by providing a competitive multiplayer approach.
As players learn about new technologies and complete related Cha... |
Java | UTF-8 | 400 | 1.632813 | 2 | [] | no_license | package com.crimeAnalysis.city.controller;
import java.util.List;
import java.util.Optional;
import com.crimeAnalysis.demo.controller.CrimeData;
public class CityDataService {
public List<String> getAllCity() {
// TODO Auto-generated method stub
return null;
}
public Optional<CityData> findByI... |
C | UTF-8 | 342 | 3.234375 | 3 | [] | no_license | #include <stdio.h>
int main() {
printf("------------------------------------- \n");
printf("CONVERSOR DE METROS CUBICOS EM LITROS \n");
printf("------------------------------------- \n");
float m;
scanf("%f", &m);
float l = m*1000;
printf("%.2f metros cubicos equivale a %.2f litros.", m,... |
PHP | UTF-8 | 2,251 | 2.609375 | 3 | [] | no_license | <?php
include "db_con.php";
$UserName=$_POST["UserName"];
$UserID=$_POST["UserID"];
$Ans1=$_POST["Ans1"];
$Ans2=$_POST["Ans2"];
$Ans3=$_POST["Ans3"];
$Ans4=$_POST["Ans4"];
$Ans5=$_POST["Ans5"];
$Q2Min=$_POST["Q2Min"];
$Q2Sec=$_POST["Q2Sec"];
$Q3Min=$_POST["Q3Min"];
$Q3Sec=$_POST["Q3Sec"];
$Q4Min=$_POST["Q4Min"];
$Q4S... |
Java | UTF-8 | 2,834 | 3.984375 | 4 | [] | no_license | package ejercicios03;
import java.util.Scanner;
public class Ejercicio0316 {
public static void main(String[] args) {
Scanner teclado = new Scanner(System.in);
int numAdivinar, intento = 0;
boolean acertar = false;
System.out.println("Introduce el numero a adivinar");
... |
Python | UTF-8 | 1,585 | 2.875 | 3 | [] | no_license | import threading
from http.server import BaseHTTPRequestHandler,HTTPServer
from os.path import isfile
server = None
log = None
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
if (self.path.strip('/').lower() == "sessions"):
#Check file availability
if not isfile("sessions.... |
Markdown | UTF-8 | 1,985 | 3.203125 | 3 | [] | no_license | ---
layout: post
title: "GitHub 提供免費用戶建立私人專案"
tags: [Jekyll, blog, GitHub, 技術札記]
---
Jekyll 部落格套件有個預設特點是隱藏未來文章,比如有篇文章日期為西元 9999 年,那麼部落格列表裡是看不到它的。個人一直把這當成草稿功能來用,文章寫完後調一下日期就可供外界瀏覽了。但由於使用免費帳戶架部落格在 GitHub Pages 上面,有個問題略顯礙眼:整個部落格的 git repository 對外公開,這些草稿也跟著曝光。
沒想到昨晚睡一覺問題就解決了,真是意外地美好 : )
> Today we’re announcing two maj... |
C | UTF-8 | 975 | 4.125 | 4 | [
"Unlicense"
] | permissive | /** Exercise 1.19
* Write a function reverse(s) that reverses the character string s. Use it to
* write a program that reverses its input a line at a time.
*/
#include <stdio.h>
#define BUFSIZE 1024
int _getline(char[], int);
void reverse(char[], int);
main() {
char line[BUFSIZE];
int length;
while (... |
C# | UTF-8 | 19,060 | 2.90625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
namespace DeathmicChatbot
{
class XMLProvider
{
//returns data of User as CSV data in following order VisitCount, LastVisit
public string UserInfo(string nick)
... |
C++ | UTF-8 | 2,517 | 2.9375 | 3 | [
"MIT"
] | permissive | #include "conversion.hpp"
#include "gc.hpp"
#include "object.hpp"
#include <cstddef>
#include <optional>
#include <string>
#include <sstream>
thread_local std::basic_stringstream<char, std::char_traits<char>, gc::allocator<char>> ss;
std::optional<gcstring> to_optional_string(const string_ref &s, std::size_t, std:... |
SQL | UTF-8 | 12,027 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 24, 2020 at 06:12 AM
-- Server version: 5.7.26
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `mukono-master`
--
-- ----------------------... |
PHP | UTF-8 | 1,603 | 2.625 | 3 | [] | no_license | <?php
include 'playlist.php';
include 'api.php';
function rand_music() {
global $player_list;
$sum = count($player_list);
$id = $player_list[rand(0, $sum - 1)];
return $id;
}
function get_music_id() {
$played = isset($_COOKIE["played"]) ? json_decode($_COOKIE["played"]) : null;
$id = rand_musi... |
C++ | UTF-8 | 2,058 | 2.921875 | 3 | [] | no_license |
#include <iostream>
#include "robot.h"
#include "utils.h"
using namespace std;
int main(int argc, char const *argv[])
{
// read YAML file with params to define the robot
// can start by getting them as arguments
// default params
string hostname_master = "";
string hostname = "";
string hostname_a = "";... |
Shell | UTF-8 | 1,214 | 3.15625 | 3 | [] | no_license | #Backup RADV Database priror to deployment from Jenkins build jobs
#Author: Seema Gupta
#Project: RADV
#Create Date - 10/11/2018
#Define Variables
MAIL_TO=radv_infra@newwave.io
ENV=`echo $(dnsdomainname)`
SHELL=/bin/sh
OUTPUT_DIR=/tmp/
FILENAME=password_expired_$(date +%Y%m%d).sql
OUTPUT_FILE=$OUTPUT_DIR/$FILENAME
US... |
JavaScript | UTF-8 | 305 | 2.703125 | 3 | [] | no_license | const target = { a : 1, b : 4};
const source = { b : 7, c : 2};
const nuevo = { d : 6, a : 4};
const miArray = Object.assign(target, source)
console.log(target);
console.log(source);
console.log(miArray);
const miArray2 = Object.assign(miArray, nuevo)
console.log(source);
console.log(miArray2);
|
Java | UTF-8 | 879 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | package info.thereisonlywe.quran;
import info.thereisonlywe.core.objects.SequentialRange;
public class QuranicVerseRange implements SequentialRange<QuranicVerse> {
public final QuranicVerse start;
public final QuranicVerse end;
public QuranicVerseRange(QuranicVerse start, QuranicVerse end)
{
this.start = star... |
Python | UTF-8 | 582 | 2.828125 | 3 | [] | no_license | __author__ = 'student'
import random
import matplotlib.pyplot as plt
random.seed(0)
plt.subplot(221)
n = 100
values = [random.normalvariate(0, 1) for i in range(n)]
plt.hist(values, bins=100)
random.seed(0)
plt.subplot(222)
n = 1000
values = [random.normalvariate(0, 1) for i in range(n)]
plt.hist(values, bins=100)
r... |
Java | UTF-8 | 1,048 | 3.90625 | 4 | [] | no_license | //Importamos Scanner y Math para recibir y hacer procedimientos matemáticos
import java.util.Scanner;
import java.lang.Math;
public class diecinueve {
public static void main(String[] args){
//Creamos input
Scanner input = new Scanner(System.in);
System.out.print("Hola! Vamos a sacar la dist... |
Python | UTF-8 | 15,934 | 2.703125 | 3 | [
"MIT"
] | permissive | from __future__ import division
from Tkinter import Tk, Canvas
from PIL import ImageTk, Image, ImageDraw
from random import randint
from math import sin, cos, pi, sqrt
import datetime
import operator
timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
def mean(L):
w0 = 1
wn = .01
return sum(L)/le... |
PHP | UTF-8 | 1,005 | 2.78125 | 3 | [] | no_license | <?php
/**
* Class file for AmazonECommerceServiceTypeOfferAttributes
* @date 10/07/2012
*/
/**
* Class AmazonECommerceServiceTypeOfferAttributes
* @date 10/07/2012
*/
class AmazonECommerceServiceTypeOfferAttributes extends AmazonECommerceServiceWsdlClass
{
/**
* The Condition
* Meta informations :
* - min... |
Java | UTF-8 | 2,850 | 3.46875 | 3 | [] | no_license | package com.lexiscn;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
/**
* Trie数据结构
* <p>
* 一个Trie的实例为一个<a href="http://zh.wikipedia.org/zh-cn/Trie">Trie</a>
* </p>
* @author Kevin Jiang kevin.jiang@lexisnexis.com
*
*/
public class Trie {
/**
* 根节点
*/
public TrieNode root;
... |
C++ | UTF-8 | 1,385 | 3.234375 | 3 | [] | no_license |
/*
* File: Z_NODE.cpp
* Author: Alani
*
* Contains: Methods to create nodes
*
* Created on April 12, 2017, 8:17 PM
*/
#include "ZNode.hpp"
/* ZNode(Z_Obj) - constructor of ZNode
* stores data
* initializes height, left, right, and parent
* arguments:
* Z_Obj - Z... |
Markdown | UTF-8 | 1,817 | 2.984375 | 3 | [
"MIT"
] | permissive | # Annotations
## Content
- [Usage - how to register](#usage)
- [Extension - how to configure](#configuration)
- [Example - how to create annotation](#example)
## Usage
At first you should register `AnnotationsExtension` at your config file.
```yaml
extensions:
annotations: Nettrine\Annotations\DI\AnnotationsEx... |
C++ | UTF-8 | 1,656 | 3.65625 | 4 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
class Queue {
private:
vector<int> elemente;
public:
Queue(){
}
Queue(const Queue& old){
for(int x: old.elemente){
this->elemente.push_back(x);
}
}
Queue(const initializer_list<int>& liste){
for(int x: liste){
this->elemente.... |
JavaScript | UTF-8 | 782 | 2.75 | 3 | [] | no_license | /**
*
*/
//<!-- Inici del AJAX -->
function omplir(prov) {
// Obtener la instancia del objeto XMLHttpRequest
if(window.XMLHttpRequest) {
peticion_http = new XMLHttpRequest();
}
else if(window.ActiveXObject) {
peticion_http = new ActiveXObject("Microsoft.XMLHTTP");
}
// Pre... |
C# | UTF-8 | 1,060 | 3.03125 | 3 | [] | no_license | using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ScheduleSystem.Test.ClassesTest
{
[TestClass]
public class TeacherTest
{
[TestMethod]
public void CreateNewTeacherTestMethod()
{
/* 1 - Create new teacher
* 2 - Add teacher Name
* 3 ... |
Java | UTF-8 | 2,346 | 2.265625 | 2 | [] | no_license | package com.oldwang.boxdemo.adpater;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.oldwang.boxdemo.R;
import com.oldwang.boxdemo.base.BaseRecycleAdapter;
import com.oldwang.boxdemo.bean.Withdrawal... |
Java | UTF-8 | 1,057 | 2.375 | 2 | [] | no_license | package org.concord.ProbLib.transformers;
import org.concord.ProbeLib.*;
import org.concord.waba.extra.event.*;
import org.concord.waba.extra.util.PropObject;
public abstract class CCTransformer
implements Transform
{
String name = null;
PropObject []properties = null;
public waba.util.Vector dataListeners... |
Java | UTF-8 | 2,592 | 3.546875 | 4 | [] | no_license | package 其他;
import org.junit.Test;
import java.util.Stack;
public class _151_翻转字符串里的单词 {
public String reverseWords(String s) {
int len = s.length();
char[] arr = s.toCharArray();
int i = 0;
Stack<String> stack = new Stack<>();
while (i < len) {
StringBuilder ... |
Markdown | UTF-8 | 17,969 | 3.5 | 4 | [] | no_license | # Matplotlib
HW-wk 5
I used Jupyter Notebook with the help of Pandas and Numpy libraries to conduct all of my analysis for this assignment in which I analyzed a csv data file from a fictional ride sharing company called Pyber. I analyzed the data given to me to determine if there was a correlation between the type of... |
Markdown | UTF-8 | 4,743 | 2.84375 | 3 | [
"MIT"
] | permissive | # Object Discovery with a Copy-Pasting GAN
This repository implements [1] in Python using the PyTorch framework, along with an extra feature that seems to improve the performance on realistic datasets. In this system, a generator neural network G is trained to produce copy masks, and a discriminator D then judges the ... |
JavaScript | UTF-8 | 2,498 | 2.859375 | 3 | [] | no_license | /*
* Copyright (c) 2021 CRT_HAO 張皓鈞
* All rights reserved.
* CISH Robotics Team
*/
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
const OS = require("os");
function getSystemVersionSafe() {
// getSystemVersion only exists when running un... |
PHP | UTF-8 | 136 | 3.234375 | 3 | [] | no_license | <?php
$string = "How long am I?";
$length = 0;
while ($string[$length] != '') {
$length++;
}
echo $length;
?>
|
C# | UTF-8 | 894 | 2.625 | 3 | [] | no_license | using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
namespace Recipes.Domain
{
public class Recipe
{
private List<RecipeIngredient> ingredients = new List<RecipeIngredient>();
public string Id { get; set; }
public string Rev { get; set; }
public strin... |
Java | UTF-8 | 2,124 | 2.15625 | 2 | [] | no_license | /*
This file is part of Volantis Mobility Server.
Volantis Mobility Server is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Volantis Mobili... |
PHP | UTF-8 | 431 | 2.71875 | 3 | [] | no_license | <?php
namespace App\database\migrations;
use Kernel\Migration;
class CreateUsersTable extends Migration
{
public function up(){
$this->create_table('users',[
$this->autoincremental('id', 7),
$this->string('username', 150),
$this->string('password', 255),
... |
JavaScript | UTF-8 | 795 | 2.78125 | 3 | [
"MIT"
] | permissive | /**
* Awesome description
* @param {string} a first parameter
* @param {number} b second parameter
*/
function test1 (a, b) {
}
/**
* Awesome description 2
* @param {} a first parameter
*/
function test2 (a) {
}
/**
* Awesome description 3
* @param {} a
*/
function test3 (a) {
}
/**
* Awesome descripti... |
Java | UTF-8 | 30,793 | 1.960938 | 2 | [
"MIT"
] | permissive | /*
* MIT License
*
* Copyright (c) 2022, Apptastic Software
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, co... |
C | GB18030 | 4,171 | 2.78125 | 3 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
//
//struct S2
//{
// int num;
// int arr[0];
//};
//struct S
//{
// int num;
// int arr[];//Ա
//};
//
//
//int main()
//{
// int i = 0;
// struct S* ps=(struct S*)malloc(sizeof(struct S)+20*sizeof(int));
// ps->num = 20;
// for (i = 0; i < 20; i++)
// {
// ps->ar... |
Python | UTF-8 | 1,804 | 3.890625 | 4 | [] | no_license | import random
player_wins = 0
computer_wins = 0
winning_score = 3
while computer_wins < winning_score and player_wins < winning_score:
print(f"player score: {player_wins} / computer score: {computer_wins}")
print("...rock...")
print("...paper...")
print("...scissors...")
player ... |
C++ | UTF-8 | 2,180 | 2.65625 | 3 | [] | no_license | #include <sys/time.h>
#include <iostream>
#include "platformsearch.h"
#include "robot_states.h"
#include "sensordata.h"
#include "mraa.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "../hardware/piddrive.h"
#include "../vision/platfinder.h"
PlatformSearch::PlatformSearch(PlatformFinder* pf, VideoCapture* vid, ... |
Java | UTF-8 | 506 | 1.867188 | 2 | [] | no_license | package com.entor.dao;
import java.util.List;
import com.entor.model.TestPaperShiTi;
import com.entor.utils.PageUtil;
public interface TestPaperShiTiDao extends BaseDao<Integer, TestPaperShiTi>{
//按条件查询分页(物理),用物理分页较好,其实这里还需要分页工具类的
public List<TestPaperShiTi> getTestPeperShiTiListByPage(TestPaperShiT... |
JavaScript | UTF-8 | 6,855 | 2.578125 | 3 | [] | no_license |
//active
{
var masks=document.querySelectorAll(".activeRightImg .mask");
masks.forEach(function(value,index){
value.onmouseover=function(){
masks[index].style.opacity=1;
}
value.onmouseout=function(){
masks[index].style.opacity=0;
}
})
}
//视频
{
var big=do... |
Markdown | UTF-8 | 2,589 | 2.75 | 3 | [] | no_license |
Formats: [HTML](/news/2001/02/28/an-earthquake-measuring-6-8-on-the-richter-scale-hits-the-northwest-area-of-the-united-states-there-were-no-reports-of-any-deaths.html) [JSON](/news/2001/02/28/an-earthquake-measuring-6-8-on-the-richter-scale-hits-the-northwest-area-of-the-united-states-there-were-no-reports-of-any-de... |
JavaScript | UTF-8 | 4,400 | 2.71875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | import styles from '../styles';
describe('styles', () => {
const css = {
button: 'unambiguous-button-class-name',
client: 'unambiguous-button-class-name-client'
};
// className tests
test('should add cfg.className to props', () => {
const cfg = {
className: 'button'
};
const updated = styles(cfg, ... |
SQL | UTF-8 | 3,233 | 4.71875 | 5 | [] | no_license | /**SQL Challenge - Data Analysis**/
-- Dropping views if they exist
DROP VIEW IF EXISTS employees_by_dept;
DROP VIEW IF EXISTS salary_info;
/*1 - List the following details of each employee: employee number, last name, first name, gender, and salary.*/
SELECT emp_no, last_name, first_name, gender,
(SELECT salary FR... |
Python | UTF-8 | 6,868 | 2.796875 | 3 | [] | no_license | import numpy as np
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#################################################
# Database Setup
#################################################
eng... |
C# | UTF-8 | 649 | 2.984375 | 3 | [] | no_license | using System;
using API.Models;
using API.Services.Interfaces;
namespace API.Core
{
public class SalaryCalculationService : ISalaryCalculationService
{
public float CalculateSalary(float experience, Position position)
{
var coefficient = position switch
{
... |
Java | UTF-8 | 1,034 | 2.15625 | 2 | [] | no_license | package lt.mm.moviedb.network;
import com.android.volley.RequestQueue;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import static org.mockito.Mockito.*;
@RunWith(RobolectricTestRunner.class)
public class NetworkSearchQueryTest {
p... |
Python | UTF-8 | 311 | 3.578125 | 4 | [] | no_license | class Foo:
__slots__ = ('count')
def __init__(self):
self.count = 0
def __enter__(self, *args):
print('enter', *args, self.count)
return self
def __exit__(self, *args):
self.count += 1
print('exit', *args, self.count)
with Foo() as foo:
pass
|
JavaScript | UTF-8 | 1,131 | 2.703125 | 3 | [
"MIT"
] | permissive | var mongoose = require('mongoose')
var pollSchema = new mongoose.Schema({
question: {type: String, required: true},
pubDate: {type: Date, required: true},
// Can have subdocuments (data not normalised into separate table/collection in this case)
choices: [{choiceText: String, votes: {type: Number, required: tr... |
Rust | UTF-8 | 860 | 2.671875 | 3 | [] | no_license | use notify::{Watcher, RecursiveMode, watcher};
use std::sync::mpsc::channel;
use std::time::Duration;
mod fork;
fn main() {
fork::forker();
std::process::exit(0);
// Create a channel to receive the events.
let (sender, receiver) = channel();
let eval = "php ./testfolder/main.php";
// Create a w... |
Java | UTF-8 | 3,733 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package com.amazon.soter.examples.lockacquisition;
import com.amazon.soter.java.util.Random;
import com.amazon.soter.java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
/** Example app... |
Markdown | UTF-8 | 3,963 | 2.828125 | 3 | [] | no_license | Comandos basicos
================
Configurar mis datos
--------------------
Para todos los proyectos en mi pc utilizamos el parametro extra --global, sin el afectaria
*git config --global user.name "nombre"*
*git config --global user.email "nombre@email.com"*
*git config --global core.editor "vim"*
Para listar lo... |
Markdown | UTF-8 | 2,319 | 2.78125 | 3 | [
"MIT"
] | permissive |
<p align="center">
<img
src="https://user-images.githubusercontent.com/6550035/58387410-d2e33780-7fc2-11e9-8823-ce290b1cce7a.png"
width="408px" border="0" alt="offlinenotepad">
</p>
<p align="center"><code><a href="https://offlinenotepad.com">https://offlinenotepad.com</a></code></p>
*offlinenotepad* is an [... |
JavaScript | UTF-8 | 1,980 | 3.921875 | 4 | [] | permissive | function plus(num1, num2) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
var res = num1 + num2
console.log(num1 + " + " + num2 + " = ")
resolve(res)
}, 3000)
})
}
function minus(num1, num2) {
return new Promise(function (resol... |
Java | UTF-8 | 170 | 2.484375 | 2 | [] | no_license | /**
* Padding at the left edge of the table.
*/
public Table padLeft(float padLeft) {
this.padLeft = new Fixed(padLeft);
sizeInvalid = true;
return this;
}
|
Python | UTF-8 | 181 | 2.90625 | 3 | [
"MIT"
] | permissive | import msvcrt
while True:
if msvcrt.kbhit():
key_stroke = msvcrt.getch()
if(key_stroke=="x"):
print(key_stroke)
else:
print("1")
|
Markdown | UTF-8 | 4,336 | 3 | 3 | [] | no_license | # Amazon Behavioural Interview
### Leadership Principles
We use our Leadership Principles every day, whether we're discussing ideas for new projects or deciding on the best approach to solving a problem. It is just one of the things that makes Amazon peculiar.
#### 1. Customer Obsession
Leaders start with the custo... |
C++ | UTF-8 | 1,109 | 2.71875 | 3 | [] | no_license | #include<iostream>
using namespace std;
//3412
const int N=610;
int n,l,r,t;
int a[N][N],s[N][N];
int main()
{
scanf("%d%d%d%d",&n,&l,&r,&t);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
cin>>a[i][j];
//计算前缀和
for (int i = 1; i <= n; i++)
for (int j = 1; j <=... |
Java | UTF-8 | 1,551 | 2.34375 | 2 | [] | no_license | package com.huawei.request;
public class Task {
private String id;
private String requestURL;
private String requestMethod;
private String startTime;
private String user;
private String instanceIp;
public String getId() {
return id;
}
public void setId(String id) {
... |
C++ | UTF-8 | 3,740 | 2.765625 | 3 | [] | no_license | //
// Created by User on 11-Dec.-2020.
//
#include "BlockOctree.h"
BlockOctree::BlockOctree(ui32 block_depth) {
this->block_depth = block_depth < MAX_DEPTH ? block_depth : MAX_DEPTH;
nodes.emplace_back(true, 0);
}
ui32 BlockOctree::getSize() {
return getSizeAt(0);
}
ui32 BlockOctree::getSizeAt(ui32 dept... |
Java | UTF-8 | 12,276 | 2.109375 | 2 | [] | no_license | package com.shyam.booking.web.rest;
import com.shyam.booking.BookingApp;
import com.shyam.booking.domain.Room;
import com.shyam.booking.repository.RoomRepository;
import com.shyam.booking.service.RoomService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.... |
PHP | UTF-8 | 1,617 | 2.78125 | 3 | [] | no_license | <?php
$msg = "";
$connection = mysqli_connect("localhost","edervishaj16","ed632haj","web18_edervishaj16");
if($_SERVER['REQUEST_METHOD']=="POST") {
if(isset($_POST['reset'])) {
$username = mysqli_real_escape_string($connection,$_POST["username"]);
$pass = $_POST["pass"];
$pass = md5($pass);
... |
JavaScript | UTF-8 | 11,481 | 2.640625 | 3 | [
"MIT"
] | permissive | /*global DocumentFragment */
var e = require('e');
var assert = require('assert');
describe('e.ns(namespaceURI)', function () {
it('should create an element creator for passed namespace', function () {
var svg = e.ns('http://www.w3.org/2000/svg');
var el = svg('circle');
assert(el.namespaceURI === 'http://www.w... |
JavaScript | UTF-8 | 250 | 2.703125 | 3 | [] | no_license | const fs = require('fs');
fs.readFile(process.argv[2], 'utf-8', doneReadingCallback);
function doneReadingCallback(error, fileContent) {
if (error) {
throw new Error(error);
}
console.log(fileContent.split('\n').length - 1);
}
|
Java | UTF-8 | 1,131 | 2.546875 | 3 | [] | no_license | package com.teststore.database;
import java.io.Serializable;
import javax.persistence.*;
import java.util.List;
/**
* The persistent class for the images database table.
*
*/
@Entity
@Table(name="images")
@NamedQuery(name="Image.findAll", query="SELECT i FROM Image i")
public class Image implements Serializable ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.