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 |
|---|---|---|---|---|---|---|---|
JavaScript | UTF-8 | 2,344 | 2.921875 | 3 | [
"MIT"
] | permissive | var isNode = typeof require === 'function'
var isBrowser = typeof navigator === 'object'
if (isBrowser) {
var {parse} = window['exifr']
} else if (isNode) {
var {parse} = require('../dist/full.umd.js')
var fs = require('fs').promises
}
var imageUrl = '../test/fixtures/IMG_20180725_163423.jpg'
var options = {
if... |
Markdown | UTF-8 | 867 | 3.453125 | 3 | [] | no_license |
### Leetcode 206
#### [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list)
##### ***Problem:***
Reverse a singly linked list.
##### ***Example:***
Input: 1->2->3->4
Output: 4->3->2->1
##### *Method #1*
``` java
/*
*Author: yeh
*Time: 2018_02_11
*Language: Java
*
*/
/*... |
Java | UTF-8 | 2,730 | 2.3125 | 2 | [
"BSD-3-Clause"
] | permissive | package de.tudarmstadt.awesome.erclaerung.feature;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.apache.uima.analysis... |
JavaScript | UTF-8 | 784 | 2.78125 | 3 | [] | no_license | import React, {Component} from 'react'
import './myStyle.css'
class Message extends Component{
constructor(){
super()
this.state={
message:'Welcome Visiter'
}
}
changemessage()
{
this.setState({
message:''
})
}
show()
{
... |
Java | UHC | 977 | 2.375 | 2 | [] | no_license | package org.address.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.address.model.SAddressDAO;
import org.address.model.SAddressDTO;
public class AddressInsertAction implements Act... |
Java | UTF-8 | 461 | 2.90625 | 3 | [
"MIT"
] | permissive | package com.lambdaschool.solution;
public class MyApplication implements Processor
{
private Athlete athlete;
public MyApplication(Athlete athlete)
{
this.athlete = athlete;
}
@Override
public void displayAthlete(String sport, String athlete)
{
System.out.println("********... |
Markdown | UTF-8 | 7,389 | 2.734375 | 3 | [] | no_license | ---
title: "Shows by Sex Workers That Reveal a New Side to Sexuality"
date: 2020-08-18
draft: false
---
Following along the same path as my last article about books by sex workers, I want to continue talking about the importance self-representation through other forms of media. Films and TV shows offer some added benif... |
Java | UTF-8 | 8,185 | 2.3125 | 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 userinterface;
import business.Business;
import business.Employee;
import business.UserAccount;
import java.awt.CardLayout;
im... |
JavaScript | UTF-8 | 419 | 2.59375 | 3 | [] | no_license | import React from 'react';
class ToyDetail extends React.Component{
constructor(props){
super(props)
};
render(){
const { toy } = this.props;
return(
<section className="toy-detail">
<ul>
<li><h3>{toy.name}</h3></li>
<li>Happiness: {toy.happiness}</li>
<li... |
Markdown | UTF-8 | 155,846 | 3.390625 | 3 | [] | no_license | [TOC]
## 文本序列类型 --- [`str`](https://docs.python.org/zh-cn/3/library/stdtypes.html#str)
在 Python 中处理文本数据是使用 [`str`](https://docs.python.org/zh-cn/3/library/stdtypes.html#str) 对象,也称为 *字符串*。 字符串是由 Unicode 码位构成的不可变 [序列](https://docs.python.org/zh-cn/3/library/stdtypes.html#typesseq)。 字符串字面值有多种不同的写法:
- 单引号: `'允许包含有 "双" 引... |
Java | UTF-8 | 7,141 | 2.34375 | 2 | [] | no_license | package com.shaohuashuwu.service.impl;
import com.shaohuashuwu.dao.*;
import com.shaohuashuwu.domain.*;
import com.shaohuashuwu.domain.vo.IsChapterHaveVo;
import com.shaohuashuwu.service.ChapterInfoService;
import com.shaohuashuwu.util.SensitivewordFilter;
import com.shaohuashuwu.util.ThisCurrentTime;
import org.sprin... |
Java | UTF-8 | 325 | 1.53125 | 2 | [] | no_license | package com.reply.io.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TERecord implements Serializable {
private long testId;
private String serviceName;
private String reques... |
Python | UTF-8 | 979 | 3.1875 | 3 | [] | no_license | from sympy import Function, S, oo, I, sin
from sympy.abc import x
from sympy.utilities.lambdify import lambdify, implemented_function
class my_func(Function):
@classmethod
def eval(cls, x):
if x.is_Number:
if x is S.Zero:
return S.One
elif x is S.Infinity:
... |
JavaScript | UTF-8 | 865 | 4.09375 | 4 | [] | no_license | /*
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.
Example:
You may assume that both strings contain only lowercase letters.
s = "leetcode"
return 0.
s = "loveleetcode",
return 2.
*/
/**
* @param {string}
* @return {number}
*/
var firstUniqChar... |
Shell | UTF-8 | 1,236 | 3.4375 | 3 | [] | no_license | # created by blue 2019/6/2
mydir="${BASH_SOURCE%/*}"
if [[ ! -d "$mydir" ]]; then mydir="$PWD"; fi
. $mydir/../shflags
# define command-line flags
DEFINE_string valgrind 'false' 'Run in valgrind'
DEFINE_integer server_num '1' 'Number of servers'
DEFINE_boolean clean 1 'Remove old "runtime" dir before running'
DEFINE_... |
Java | UTF-8 | 6,202 | 1.835938 | 2 | [] | no_license | // Decompiled by: Fernflower v0.8.6
// Date: 12.08.2012 13:05:48
// Copyright: 2008-2012, Stiver
// Home page: http://www.neshkov.com/ac_decompiler.html
package com.cedar.cp.dto.dataEntry;
import com.cedar.cp.api.task.TaskRequest;
import com.cedar.cp.dto.base.AbstractT... |
SQL | UTF-8 | 363 | 2.53125 | 3 | [] | no_license | use ejercicio2;
insert into alumnos values
(100,'Juan',1,'Español',18,9),
(101,'Pepe',2,'Turco',19,7),
(102,'Luis',3,'Argelino',20,6),
(103,'Dios',4,'Cielo',18,3),
(104,'Ethan',5,'Ingles',18,8),
(105,'Enric',6,'Español',18,0),
(106,'Sandra',7,'Francesa',22,4),
(107,'Alex',8,'Italiano',18,1),
(108,'Sergi',9,'Americano',... |
Java | UTF-8 | 999 | 2.0625 | 2 | [] | no_license | package com.konectaBack.konectaBack.DTOs;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.konectaBack.konectaBack.Models.Usuario;
import lombok.*;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java... |
Python | UTF-8 | 138 | 3.21875 | 3 | [] | no_license | import turtle
t = turtle.Turtle()
t.shape("turtle")
t.fd(100)
t.lt(90)
t.fd(100)
t.rt(90)
t.fd(100)
t.rt(90)
t.fd(100)
t.lt(90)
t.fd(100)
|
JavaScript | UTF-8 | 1,651 | 2.6875 | 3 | [
"MIT"
] | permissive | // Based on https://github.com/nathan7/snakeize
//
// This software is released under the MIT license:
// 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 withou... |
C++ | UTF-8 | 2,918 | 3.03125 | 3 | [] | no_license | #include <string>
#include <array>
#include <vector>
#include "day23.h"
using namespace std;
struct node {
long value;
node* next = nullptr;
};
uint64_t Day23::part_one(int input) {
vector<int> vals;
while (input != 0) {
vals.insert(vals.begin(), input % 10);
input /= 10;
}
int cur = 0;
int size = vals.si... |
Java | UTF-8 | 2,815 | 2.265625 | 2 | [] | no_license | package com.sr7d.shubhamraja.StColumbasCollege;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageSwitcher;
i... |
Swift | UTF-8 | 1,638 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | //
// ViewController.swift
// testUI
//
// Created by JackyShen on 2017/3/6.
// Copyright © 2017年 JackyShen. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var result:UILabel!
var t1:UITextField!
var t2:UITextField!
override func viewDidLoad() {
super.v... |
C# | UTF-8 | 1,983 | 2.5625 | 3 | [] | no_license | using System;
using Zen.Trunk.IO;
namespace Zen.Trunk.Storage.BufferFields
{
public class BufferFieldByteArrayUnbounded : SimpleBufferField<byte[]>
{
#region Public Constructors
public BufferFieldByteArrayUnbounded()
{
}
public BufferFieldByteArrayUnbounded(byte[] value... |
TypeScript | UTF-8 | 688 | 2.53125 | 3 | [] | no_license | export const html = `
<mat-form-field class="example-form-field">
<input matInput type="text" placeholder="Clearable input" [(ngModel)]="value">
<button mat-button *ngIf="value" matSuffix mat-icon-button aria-label="Clear" (click)="value=''">
<mat-icon>close</mat-icon>
</button>
</mat-form-field>
`;
export c... |
Java | UTF-8 | 929 | 3.171875 | 3 | [] | no_license | package Tes1.T_3;
import java.util.ArrayList;
/*
双色球规则:双色球每注投注号码由6个红色球号码和1个蓝色球号码组成。红色球号码从1—33中选择;蓝色球号
码从1—16中选择.请随机生成一注双色球号码
*/
public class Test1 {
public static void main(String[] args) {
ArrayList<String> blueball = new ArrayList<>();
ArrayList<String> redball = new ArrayList<>();
Arra... |
C++ | UTF-8 | 892 | 3.546875 | 4 | [] | no_license | #include <iostream>
#include <string>
#include <vector>
#include <numeric>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <fstream>
#include <limits>
#include <sstream>
using namespace std;
// template classes
template <typename T, typename U>
class Person{
public:
T height;
U... |
TypeScript | UTF-8 | 255 | 2.734375 | 3 | [
"MIT"
] | permissive | import { Column } from "typeorm"
class ClassDate {
@Column()
Weekday: string
@Column()
Time: string
constructor(weekday: string, time: string) {
this.Weekday = weekday;
this.Time = time;
}
}
export { ClassDate } |
C# | UTF-8 | 2,813 | 2.671875 | 3 | [] | no_license | using DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DAL
{
public class DAL_DoanhThuThang:DBConnect
{
public DataTable Get()
{
string sqlQuery = "SELE... |
Java | UTF-8 | 2,484 | 1.507813 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.ebay.common.net.api.local;
import android.util.Log;
import com.ebay.common.model.local.AvailabilityIdentifier;
import com.ebay.commo... |
Shell | UTF-8 | 1,015 | 3.296875 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | #! /bin/sh -e
#
### BEGIN INIT INFO
# Provides: ccsclient
# Required-Start: $syslog $local_fs $remote_fs
# Required-Stop: $syslog $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: CCS Client
# Description: init script for the CCS Client
### END INI... |
C++ | UTF-8 | 487 | 3.203125 | 3 | [] | no_license | // you can use includes, for example:
#include <algorithm>
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
int solution(string &S) {
// write your code in C++14 (g++ 6.2.0)
const char A = 'A';
int numB = 0;
int minDels = 0;
for(int i = 0; i < ... |
Markdown | UTF-8 | 1,181 | 2.90625 | 3 | [
"MIT"
] | permissive | On This Day in History - Ruby Program
This program will allow you to:
1. Select today's date and see what notable historical events happened on that day.
2. Select a Month and Day of your choosing and see what notable historical events happened on that day.
Getting Started
Open your Terminal.
In the Terminal... |
Java | UTF-8 | 1,507 | 3.234375 | 3 | [] | no_license | package io.christopheroussin.topic;
import javax.persistence.Entity;
import javax.persistence.Id;
/*
* L'annotation @Entity
* nous indique que cette classe est une classe persistante.
* Elle peut prendre un attribut name, qui fixe le nom de cette entité.
* Par défaut, le nom d'une entité est le nom complet de ... |
Markdown | UTF-8 | 829 | 2.5625 | 3 | [
"MIT"
] | permissive | # online-json-diff
https://json-diff.com

## Setup
### Run with local Node environment
1. clone the repo
2. cd to the repo directory
3. run `npm install`
4. run `npm start`
5. go to [http://localhost:5000](http://localhost:50... |
JavaScript | UTF-8 | 1,594 | 2.515625 | 3 | [] | no_license | const {expect} = require("chai");
const users = require("../src/controllers/users");
describe("Users", () => {
describe("Create", () => {
it("create a new user", done => {
const user = {
username: "sergkudinov",
firstname: "Sergei",
lastname: "Kudinov"
};
users.create(us... |
Python | UTF-8 | 1,005 | 2.5625 | 3 | [] | no_license | import h5py
import pandas as pd
import numpy as np
import os
import glob
def readH5(filename, save_dir_name):
f = h5py.File(filename, 'r')
def visitandsave(name):
ele = f[name]
if isinstance(ele, h5py.Dataset):
data = pd.DataFrame(np.array(ele))
data.to_pickle(os.path.... |
Rust | UTF-8 | 714 | 3.859375 | 4 | [] | no_license | use std::fmt;
#[derive(Clone, PartialEq, Eq, Debug)]
pub enum Constant {
Unit,
Bool(bool),
Int(u32),
Char(char),
CharRange(char, char),
String(String)
}
impl Constant {
pub fn matches(&self, other: &Self) -> bool {
match (self, other) {
(Self::CharRange(a, b), Self::Char(c)) => c >= a && c <= b,
_ => s... |
Markdown | UTF-8 | 2,278 | 3.84375 | 4 | [
"MIT"
] | permissive | original source: [https://adventofcode.com/2017/day/5](https://adventofcode.com/2017/day/5)
## --- Day 5: A Maze of Twisty Trampolines, All Alike ---
An urgent interrupt arrives from the CPU: it's trapped in a maze of jump instructions, and it would like assistance from any programs with spare cycles to help find the e... |
TypeScript | UTF-8 | 704 | 2.71875 | 3 | [
"MIT"
] | permissive | import { BrsType } from "../brsTypes";
import { BrsError } from "../Error";
import { Token } from "../lexer";
export interface BlockEnd {
kind: StopReason
}
export enum StopReason {
ExitFor,
ExitWhile,
Return,
RuntimeError
}
export class ExitForReason implements BlockEnd {
readonly kind = Sto... |
TypeScript | UTF-8 | 1,237 | 2.5625 | 3 | [
"MIT"
] | permissive | import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { TypeIssuance } from './type-issuance.entity';
@Injectable()
export class TypeIssuanceService {
constructor(
@InjectRepository(TypeIssuance) private readonly typeI... |
Java | UTF-8 | 2,927 | 2.671875 | 3 | [] | no_license | package pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.util.List;
/**
* Created by Martijn on 23-7-2017.
*/
public class MyWishlistsPage {
... |
C# | UTF-8 | 7,073 | 2.84375 | 3 | [] | no_license | using BlackJack.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BlackJack
{
public class Player
{
public Player(string name, double cash, IDisplay disp, bool isAI = false)
{
Initialize(name, cash, disp, isAI);
}
... |
Markdown | UTF-8 | 771 | 2.921875 | 3 | [] | no_license | ---
name: Secure An Advantage
type: Adventure
---
When **you assess a situation, make preparations, or attempt to gain leverage**, envision your action and roll. If you act...
- With speed, agility, or precision: Roll +edge.
- With charm, loyalty, or courage: Roll +heart.
- With aggressive action, forceful defense, s... |
Java | UTF-8 | 293 | 2.203125 | 2 | [] | no_license | package com.wcc.diary.util;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Utils {
static public String GetDateNow(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String date = sdf.format(new Date());
return date;
}
}
|
C# | UTF-8 | 2,183 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace sun.generating.tags
{
public abstract class tag : Parser, ITagInterpreter
{
public tag() { }
public tag(string exp) : base(exp) { }
public tag(string exp, string html) : base(exp, html) { }
... |
C | UTF-8 | 1,381 | 3.21875 | 3 | [] | no_license | #include <stdio.h>
#include <time.h>
#include <omp.h>
int main()
{
double x;
long int i,j,n;
int flag,thrd,choice;
time_t begin = time(NULL);
printf("Enter your Choice :\n ");
printf("\tSerial Code(Enter 0) \n");
printf("\tParallel Code(Enter 1) \n");
scanf("%d",&choice);
printf("Enter Number till wh... |
C | WINDOWS-1252 | 336 | 3.859375 | 4 | [] | no_license | #include <stdio.h>
#include <math.h>
int main()
{
float n, r;
printf("Escreva um valor: \n");
fflush(stdout);
scanf("%f",&n);
if(n >= 0)
{
r = sqrt(n);
printf("A raiz quadrada de %.2f eh %.2f ",n,r);
}
else
{
printf("!Infelizmente! No existe raiz quadrada de nemro negativo!");
}
re... |
C++ | UTF-8 | 458 | 2.578125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("C:\\Users\\my_code\\input.in", "r", stdin);
freopen("C:\\Users\\my_code\\output.in", "w", stdout);
#endif
priority_queue< int > q;
q.push(10230); // inserting 10230
q.push(1021); // inserting 1021
q.push(102322); // i... |
C++ | UTF-8 | 1,783 | 3.109375 | 3 | [] | no_license | /*
* author: daxing.yuan
* create: 2018-05-04
* email: daxing.yuan@yitu-inc.com
*/
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <climits>
#include <string>
#include <utility>
#include <functional>
#include <algorithm>
#include <stdio.h>
#include <sstream>
#include <unordered_map>
#i... |
JavaScript | UTF-8 | 775 | 2.5625 | 3 | [] | no_license | import React, { useState } from 'react';
import Scoreboard from './Scoreboard';
import allCountryScores from './scores';
import './App.css';
const App = () => {
const [scoreOrder, setScoreOrder] = useState("High");
const handleButtonClick = () => {
scoreOrder == "High" ? setScoreOrder ("Low") : setScoreOrde... |
C# | UTF-8 | 798 | 2.984375 | 3 | [] | no_license | using Facade.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Facade
{
public class ShapeMaker
{
public ShapeMaker()
{
this.Square = new Square();
this.Circle = new Circle();
... |
Shell | UTF-8 | 1,993 | 2.578125 | 3 | [] | no_license | #!/bin/bash
#MIT License
#Copyright (c) 2020 Kerus Ashe <github.com/kerus1024>
#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... |
PHP | UTF-8 | 1,081 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace AmoCRM\Collections\Leads;
use AmoCRM\Collections\BaseApiCollection;
use AmoCRM\Collections\Interfaces\HasPagesInterface;
use AmoCRM\Collections\Traits\PagesTrait;
use AmoCRM\Models\LeadModel;
/**
* Class LeadsCollection
*
* @package AmoCRM\Collections\Leads
*
* @method null|LeadModel current()
... |
C# | UTF-8 | 959 | 3.96875 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/*
Read 3 variables of char type.
Write message: “You enter (first char), (second char), (3 char)”
*/
namespace Presentation1_Task3
{
public class Program
{
public static void Main(str... |
C# | UTF-8 | 3,643 | 3.078125 | 3 | [] | no_license | using System;
using System.IO;
using System.Collections.Generic;
using System.Threading;
using System.Runtime.InteropServices;
namespace Melkior
{
public class Melkior
{
[DllImport("kernel32.dll")]
static extern void GetCurrentThreadStackLimits(out uint lowLimit, out uint highLimit);
[... |
Java | UTF-8 | 1,749 | 2.21875 | 2 | [
"Apache-2.0"
] | permissive | package au.usyd.elec5619.web;
import java.text.DateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org... |
C | UTF-8 | 1,278 | 3.671875 | 4 | [] | no_license | /*
* queue.c
*
* Created on: Dec 4, 2019
* Author: sayed
*/
#include "queue.h"
struct Queue* createQueue(unsigned int capacity) {
/*allocate a new queue in memory */
struct Queue *myqueue = (struct Queue*) malloc(sizeof(struct Queue));
myqueue->front =0 ;
myqueue->rear = 0;
myqueue->... |
JavaScript | UTF-8 | 2,205 | 3.640625 | 4 | [] | no_license | document.addEventListener("DOMContentLoaded", function () {
const friendsArray = ['LUCY', 'ASHLEY', 'STEPHEN', 'EDDIE', 'ASHA'];
// create a button that says 'Sing!'
let singButton = document.createElement('button');
let singButtonText = document.createTextNode('Sing!');
singButton.appendChild(sing... |
Python | UTF-8 | 11,336 | 3.234375 | 3 | [] | no_license | import numpy as np
import scipy.io as sio
import matplotlib.pyplot as plt
import random
from utils import *
import math
from collections import defaultdict
'''
MATCH_KEYPOINTS: Given two sets of descriptors corresponding to SIFT keypoints,
find pairs of matching keypoints.
Note: Read Lowe's Keypoint matching, findin... |
Markdown | UTF-8 | 16 | 4.09375 | 4 | [] | no_license | # WeatherPy-HW-6 |
Java | UTF-8 | 1,181 | 3.265625 | 3 | [] | no_license | public abstract class Lanche {
// Lanche tem preço
private double preco;
private int tempoPreparo;
private int tempoEntrega;
// Construtor da superclasse (classe abstrata)
public Lanche() {
this.preco=0;
this.tempoPreparo=0;
this.tempoEntrega=10;
}
public Lanche... |
Python | UTF-8 | 3,379 | 2.53125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | #!/usr/bin/env python3
# Author: Heresh Fattahi
import os
import argparse
import gdal
import isce
import isceobj
def cmdLineParser():
'''
Command line parser.
'''
parser = argparse.ArgumentParser(description = 'unwrap estimated wrapped phase',
formatter_class=argparse.ArgumentDefault... |
Python | UTF-8 | 1,128 | 3.84375 | 4 | [] | no_license | # Ordinary – 2500
# Pavillion – 3500
# Upper Pavillion – 4500
# Commentary Box – 6000
# VIP – 8000
# 10% discount for online booking
# 8% discount for advance booking
# no discount for ticket window.
# Ask user to enter the booking type like online, advance or window booking.
# Ask user to select the types of sea... |
Go | UTF-8 | 5,062 | 3.21875 | 3 | [
"MIT"
] | permissive | package arclib
import (
"bytes"
"encoding/binary"
"errors"
"io/ioutil"
"os"
)
var (
ErrDirectory = errors.New("requested path is a directory")
ErrInvalidRootNode = errors.New("root node was not a directory")
ErrInvalidMagic = errors.New("invalid ARC magic")
)
type ARC struct {
contents []ARCRecord
... |
Python | UTF-8 | 652 | 3.75 | 4 | [] | no_license | def smallestDifference(arrayOne, arrayTwo):
arrayOne.sort()
arrayTwo.sort()
data = []
i, j = 0, 0
smallest_val = float("inf")
while (i < len(arrayOne) and j < len(arrayTwo)):
arr1 = arrayOne[i]
arr2 = arrayTwo[j]
diff = abs(arr1-arr2)
if diff < smallest_val:
... |
Java | UTF-8 | 7,118 | 2.015625 | 2 | [] | no_license | package com.example.pc12_41.myapplication;
import android.Manifest;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationManager;
import android.net.Uri;
import andro... |
JavaScript | UTF-8 | 631 | 2.9375 | 3 | [] | no_license | const reducer = (state = {squares: new Array(9).fill(''), count: 0}, action) => {
switch(action.type) {
case 'ADD':
let data = action.payload
let currentSquares = state.squares
if(currentSquares[data] === '') {
let s_sign = (state.count%2 === 0) ? 'X' : 'O'
currentSquares[data] ... |
Java | UTF-8 | 851 | 2.359375 | 2 | [
"Apache-2.0"
] | permissive | package org.ovirt.engine.ui.webadmin.widget.renderer;
import java.util.ArrayList;
import com.google.gwt.text.shared.AbstractRenderer;
import com.google.gwt.user.client.ui.ValueLabel;
public class DetailsRenderer<V> extends AbstractRenderer<ArrayList<ValueLabel<V>>> {
String[] delimiters;
public DetailsRend... |
JavaScript | UTF-8 | 6,042 | 2.765625 | 3 | [] | no_license | // ↓宣言
let scene, renderer, camera, mesh, helper;
// 準備出来てないのでfalse
let ready = false;
//ブラウザーサイズを確認。これでアイちゃんの大きさを確定する。
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
//オブジェクト時間。要らないかもしれないけどオシャレなんでつけてる
const clock = new THREE.Clock();
// 外部ファイルとかどこのどれを読み込むの?を指定
// 仮にこのAudioClipをtru... |
Markdown | UTF-8 | 29,651 | 2.953125 | 3 | [
"MIT"
] | permissive |
##### 資治通鑑
`卷三十五 【漢紀二十七】`
* * *
起屠維協洽(己未),盡玄黓閹茂(壬戌),凡四年。
###### 孝哀皇帝元壽元年(己未、前二年)
*
春,正月,辛丑朔,詔將軍、中二千石舉明習兵法者各一人,因就拜孔鄉侯傅晏為大司馬、衞將軍,陽安侯丁明為大司馬、票騎將軍。
* 是日,日有食之。上詔公卿大夫悉心陳過失;又令舉賢良方正能直言者各一人。大赦天下。
丞相嘉奏封事曰:「孝元皇帝奉承大業,溫恭少欲,都內錢四十萬萬。嘗幸上林,後宮馮貴人從臨獸圈,猛獸驚出,貴人前當之,元帝嘉美其義,賜錢五萬。掖庭見親,有加賞賜,屬其人勿衆謝。示平惡偏,重失人心,賞賜節約。是時外戚貲千萬者少耳,故少府、水衡見錢多也。... |
Markdown | UTF-8 | 1,121 | 2.84375 | 3 | [] | no_license | # dfs-rule-search
A generalised exhaustive CA rule searcher
A collection of programs to find all the rules in which a pattern is an oscillator. Finds all isotropic two-state CA rules on the Moore neighbourhood in which the pattern of interest is an oscillator (within a fixed bounding box and maximum period). Uses a de... |
Python | UTF-8 | 568 | 3.25 | 3 | [
"MIT"
] | permissive | import sys
def wrap(filename, width):
res = []
w = int(width)
with open(filename) as f:
for line in f:
for i in range(0, len(line), w):
if len(line) <= i+w:
res.append(line[i:].strip())
break;
res.append(line[i:i+w... |
JavaScript | UTF-8 | 3,639 | 2.5625 | 3 | [
"MIT"
] | permissive | // Plugin Declaration
$.fn.sendkeys = function(x) {
x = x.replace(/([^{])\n/g, "$1{enter}"); // turn line feeds into explicit break insertions, but not if escaped
return this.each(function () {
bililiteRange(this).bounds("selection").sendkeys(x).select();
this.focus();
});
};
// Gets all the needed info ... |
PHP | UTF-8 | 870 | 2.546875 | 3 | [] | no_license | <?php
include("abrir_conexion.php");
$id_articulo = $_GET ['codigo'];
$id_comprador = $_GET ['usuario'];
echo $id_comprador;
//"INSERTAR!" codigo para insertar en una tabla de la base de datos
$tabla_db= 'ventas';
//Se crea la instruccion
$sql = "INSERT INTO $tabla_db (id_comprador, id_ar... |
Java | UTF-8 | 387 | 2.84375 | 3 | [] | no_license | /* The Book class */
class Book
{
private String title;
private String author;
private int date;
Book (String t, String a, int d)
{
title = t;
author = a;
date = d;
}
String getTitle()
{
return title;
}
String getAuthor()
{
return a... |
Java | UTF-8 | 1,795 | 2.203125 | 2 | [] | no_license | package edu.Team2974.IntegratedBot;
import edu.Team2974.IntegratedBot.commands.CommandBase;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.networktables.NetworkTableKeyNotDefined;
import edu.wpi.first.wpil... |
C++ | UTF-8 | 21,800 | 2.71875 | 3 | [] | no_license | #ifndef __MULTI_HASH_H_
#define __MULTI_HASH_H_
#include "IDAlloc.h"
#include "log.h"
/* one key--->multi values */
template<typename K,typename V> class Mulhash
{
public:
/* id to values area */
struct Idv
{
u32 next;
u32 count;
};
/* key to id area*/
struct Keyblk
{
K key;
u32 id;
u32 next;
};
/... |
JavaScript | UTF-8 | 1,972 | 2.59375 | 3 | [] | no_license |
/**
* @constructor
* @param {{fatal: boolean}} options
*/
function EUCKRDecoder(options) {
var fatal = options.fatal;
var /** @type {number} */ euckr_lead = 0x00;
/**
* @param {ByteInputStream} byte_pointer The byte stream to decode.
* @return {?number} The next code point decoded, o... |
Java | UTF-8 | 1,193 | 3.625 | 4 | [] | no_license | package com.company.test2018_001.questions;
import java.util.*;
/*
题目描述
有两个字符串(可能包含空格),请找出其中最长的公共连续子串,输出其长度。
输入描述:
给定两行字符串
长度在1000以内
输出描述:
输出这两个字符串的最长公共连续子串的长度
示例1
输入
abcde
bcdw
输出
3
*/
public class Question_014 {
public static void main(String[] args) {
S... |
C# | UTF-8 | 3,931 | 2.578125 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FadeData
{
float timeTotal;
float initialVolume;
float targetVolume;
public AudioSource sound;
public bool Initialize(AudioSource _sound, float _timeTotal, float _targetVolume)
{
i... |
Markdown | UTF-8 | 8,569 | 2.828125 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: vox-media
---
Businessmodel of Vox Media
---------------------------
### Customer Segments
Vox Media operates eight media outlets and brands, serving a range of customers. The Company’s customers can be organised into two categories: general consumers and advertisers.
Vox Media’s brands coll... |
SQL | UTF-8 | 2,765 | 3.515625 | 4 | [] | no_license |
INSERT INTO Customers (First_Name, Last_Name, [Address], [City], Province, Postal_Code, Phone_Number)
VALUES
('Scalli','Wag','80 Plank Walk', 'Halifax', 'NS', 'B2L1L1', '(902) 812-4567'),
('Inna','Chambers','2 Politician Street','Halifax','NS','B3M1M1','(902) 314-4212')
insert into Leases ([Date_Lease_Begins... |
PHP | UTF-8 | 2,319 | 3.265625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: razak
* Date: 3/24/2017
* Time: 1:22 PM
*/
require_once '../setting/init.php';
/**
* @param $marked_string unformatted string
* @return mixed clean string
*/
function strip_zeros_from_date($marked_string)
{
$no_zeros = str_replace('*0', '', $marked_string);
$c... |
C# | UTF-8 | 4,073 | 2.5625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
namespace EG
{
public static class GameObjectPool
{
private static Dictionary<string, CacheItem> pools = new Dictionary<string, Cach... |
Markdown | UTF-8 | 1,579 | 2.703125 | 3 | [] | no_license | ---
layout: default
title: "Geeky Giveaway Challenge"
permalink: /giveawaychallenge.html
---
<section class="container">
<div class="row">
<header class="highlight span12">
<h2>Geeky Giveaway Challenge</h2>
</header>
</div>
</section>
<section class="container">
<div class="row">
We often have things to give away out... |
Java | UTF-8 | 5,573 | 2.375 | 2 | [
"MIT"
] | permissive | package com.denbondd.restaurant.db.mysql;
import com.denbondd.restaurant.db.ConnectionPool;
import com.denbondd.restaurant.db.ReceiptDao;
import com.denbondd.restaurant.db.entity.Receipt;
import com.denbondd.restaurant.exceptions.DbException;
import com.denbondd.restaurant.util.SqlUtils;
import org.apache.logging.log4... |
C++ | UTF-8 | 8,531 | 2.875 | 3 | [] | no_license | #include "objeto3d.h"
Objeto3D::Objeto3D() {
calculosIniciales = false;
nVertices = nCaras = 0;
radioFrontera = 0;
}
void Objeto3D::generarRevolucion(float *puntos, int nPuntos, int nSecciones, float altura) {
QVector<Vertice> vertices;
QVector<Cara> caras;
for(float j = 0; j <= M_PI*2.0; j +... |
Python | UTF-8 | 2,847 | 3.0625 | 3 | [
"MIT"
] | permissive | import itertools
import sys
import functools
import pronouncing
import editdistance
import g2p_en
g2p_phones = g2p_en.G2p()
pronouncing.init_cmu()
def unpack(word_list):
return list(itertools.product(*word_list))
@functools.lru_cache()
def phones_for_closest_match(word):
"""Brute force. Look for lowest dist... |
C# | UTF-8 | 3,746 | 2.890625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using TodoAPI_CRUD.Models;
namespace TodoAPI_CRUD.Controllers
{
/// <summ... |
Python | UTF-8 | 2,300 | 2.65625 | 3 | [] | no_license | import mysql.connector
import json
from datetime import datetime
class DBOperation():
def __init__(self):
# We have below explicitly given db username and password
# self.mydb = mysql.connector.connect(host='localhost',user='vehicle_user',passwd = 'vehicle_password',
# ... |
Markdown | UTF-8 | 1,901 | 2.890625 | 3 | [
"MIT"
] | permissive | ---
layout: post
title: The Language of Self-Commodification
date: 2021-12-08
summary: Stop talking about “building your personal brand” or “selling yourself.”
categories: [personal]
tags: [personal]
---
<img src = "/assets/images/xiaolong-wong-pdx1LH_TMJM-unsplash.jpg">
People often complain abou... |
C# | UTF-8 | 1,253 | 2.75 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SharpenedMinecraft.Types.Enums
{
//http://wiki.vg/Protocol#Player_Digging
public enum DiggingStatus : int
{
StartedDigging = 0,
CancelledDigging = 1... |
Java | UTF-8 | 931 | 2.375 | 2 | [] | no_license | package com.hung.junit.domain;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.hung.auction.domain.Domain;
// simple test to see if simple cobertura is configured correctly
public class DomainTest {
private static Logger... |
Markdown | UTF-8 | 2,603 | 2.8125 | 3 | [] | no_license | # Falls prevention with RNNs
This repository contains scripts responsible for training, tuning and testing recurrent neural networks capable of detecting presynkope state of patients based on their medical temporal data (heart rate, mean blood pressure).
# Requirements
```
python >= 3.6.2
numpy >= 1.15.0
pandas >= 0... |
PHP | UTF-8 | 1,768 | 2.90625 | 3 | [] | no_license | <?php
/**
* This component is used to display the listing of all available crash
* reports.
*
* @author Gary Ng
*/
const LIMIT = 50; // Max Crash Reports Limit
$xml = simplexml_load_file(REPORTS_XML_PATH);
$items = $xml->children();
$count = count($items);
if ($count > 0) {
$min = min($count, LIMIT);
?>
<sp... |
Java | UTF-8 | 1,144 | 1.765625 | 2 | [] | no_license | package com.megacenter.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.megacenter.Model.Proform... |
Markdown | UTF-8 | 5,803 | 3.03125 | 3 | [] | no_license | # Error Handling Debugging
### Execution Contexts and Variable Scope
* Every statement in a script lives in one of three
execution contexts:
* 1- **Global Context** Code that is in the script, but not in a function. There is only one global context in any page.
* 2- **Function Context** Code that is being run withi... |
C# | UTF-8 | 2,666 | 2.5625 | 3 | [] | no_license | using System.Windows;
using System.Windows.Media;
namespace UI_Resource_Themer
{
/// <summary>
/// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
///
/// Step 1a) Using this custom control in a XAML file that exists in the current project.
/// Add this XmlNamespace att... |
Java | UTF-8 | 849 | 2.359375 | 2 | [] | no_license | package org.testerselenium.intermedio;
//import java.lang.reflect.Method;
import org.testng.ITestContext;
import org.testng.annotations.DataProvider;
public class DataProviderClassByITestContext {
//esto es utilizando ITestContext con DataProvider
@DataProvider(name = "SearchProvider")
public Object[][]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.