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 | 3,461 | 2.546875 | 3 | [] | no_license | ---
layout: post
title: "2/12"
date: 2021-02-12 02:39:38 -0700
categories: Procedural Content Generation Independent Study
---
Constructive Generation
Dungeon generation typically has 3 elements: A representational model which abstracts the dungeon's structure, a method of constructing that model, and a method of c... |
Java | UTF-8 | 19,656 | 1.515625 | 2 | [] | no_license | package handlers;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.logging.log4j.Leve... |
Java | UTF-8 | 804 | 1.96875 | 2 | [] | no_license | package com.zx.train;
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
/**
* 图片文字提取
*/
public class Test3 {
//设置APPID/AK/SK
public static final String APP_ID = "17723363";
public static final String API_KEY = "aD4SDTgEISUlAB0sm60cbOSb";
public static final Str... |
Markdown | UTF-8 | 12,589 | 3.296875 | 3 | [] | no_license | > 先赞后看,养成习惯 🌹 欢迎微信关注 `[Java编程之道] `每天进步一点点,沉淀技术分享知识。<br>
>后续发布的文章、源码等,都会收录到GitHub:`Xxianglei/Alei`仓库之中,欢迎大家前来自取。
今天由于时间关系就聊一点简单,我正在计划后期写作的文章,近期工作上接触了一些有意思的东西,后面会跟大家唠唠。如果你有意见或建议欢迎留言。📫<br>
`***文末有惊喜***` 🎁
# List 集合
---
- List集合代表一个**有序集合**,集合中每个元素都有其对应的顺序索引。List集合允许使用重复元素,可以通过索引来访问指定位置的集合元素。
- List接口继承于Collection接口... |
Markdown | UTF-8 | 4,978 | 3.984375 | 4 | [] | no_license | # ES6 Reference Guide

## Background
"ECMAScript" (also called "ES") is the name of the international standard defining JavaScript. Released in 2015, ES6 contains numerous changes to the language syntax and is the recommended version of this standard.
- - -
### Assigning Variables
... |
JavaScript | UTF-8 | 11,687 | 3.21875 | 3 | [] | no_license |
//Hi, thank you for grading my assigment, I would like clarify some thing that I have done here:
//I have not validated every input, but I have done quite a lot, mainly the ones that required text, I did validate each section except the feedback as the user should not be obligated to answer it.
//The person se... |
Python | UTF-8 | 5,391 | 3.453125 | 3 | [] | no_license | import sqlite3
import os
class KatakanaDatabaseUtilities():
"""Purpose of this class is to set-up connection with the katakana
database and fill it with the katakanas and options for the different game levels.
Idea is to use operations in this class once when the game is first established.
"""
de... |
C++ | UTF-8 | 2,260 | 2.765625 | 3 | [] | no_license | #include "stdafx.h"
#include "GridDistances.h"
#include "ParameterManager.h"
int g_relPosCountInRange= 0;
int g_absPosCountInRange= 0;
struct RelPos
{
int relX;
int relY;
float relDist;
};
RelPos *g_pDistMatrix= 0;
int g_entryCount= 0;
void ReleaseDistMatrix()
{
if (g_pDistMatrix)
{
delete [] g_pDistMatrix;
... |
JavaScript | UTF-8 | 1,014 | 3.71875 | 4 | [] | no_license | /**
* 策略模式
*/
// 普通情况下,没有使用策略模式
class User {
constructor(type) {
this.type = type;
}
buy() {
if (this.type === "ordinary") {
console.log("普通用户购买");
} else if (this.type === "member") {
console.log("会员用户购买");
} else if (this.type === "vip") {
... |
Java | UTF-8 | 353 | 2.40625 | 2 | [] | no_license | package model;
import java.util.List;
import java.util.Map;
public interface I_Portfolio<T extends I_OwnedStock> {
void setName(String n);
String getName();
List<T> getOwnedStocks();
double getTotalValue();
boolean addStock(String ticker, String name,int numberOfShares);
double getValueO... |
PHP | UTF-8 | 2,134 | 2.796875 | 3 | [] | no_license | <?php
namespace Spirit\View;
/**
* Class Template
* @package Spirit\View
*
* @method static in($block_name)
* @method static append($block_name)
* @method static prepend($block_name)
* @method static block($block_name)
* @method static view($tpl, $data = [])
* @method static save()
*/
class Template
{
... |
JavaScript | UTF-8 | 4,922 | 2.609375 | 3 | [] | no_license | "use strict";
const ECS = require('yagl-ecs'),
PIXI = require('pixi.js'),
math = require('../util/math'),
MessageManager = require('../messaging/messagemanager')
;
class Renderer extends ECS.System {
constructor( width, height) {
super();
this.renderer = new PIXI.WebGLRenderer(width, height);
t... |
TypeScript | UTF-8 | 2,041 | 2.59375 | 3 | [] | no_license | import { createPopper, Instance as Popper } from '@popperjs/core';
import { toHtml } from '../util/html';
const createInspector = () => {
const element = document.createElement('div');
element.setAttribute("style", "background: white; padding: 10px; border-radius: 8px; box-shadow: 10px 10px solid black");
... |
Java | UTF-8 | 1,089 | 2.25 | 2 | [] | no_license | package com.kkb.cubemall.gateway.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.reactive.CorsWebFilter;
import org.springframework.web.cors.reactive.UrlBa... |
C# | UTF-8 | 855 | 3.5625 | 4 | [] | no_license | using System.IO;
using System.Linq;
namespace CodeevalChallenges
{
public class _37_Pangrams
{
public _37_Pangrams(string text)
{
this.text = text.ToLower();
}
public string text { get; private set; }
public char[] missingLetters()
{
i... |
Python | UTF-8 | 792 | 3.828125 | 4 | [] | no_license | import datetime
today = datetime.date.today();
print('today is ', today)
from datetime import date, timedelta
today = date.today()
print('today is ', today)
# 년도, 월, 일 출력
print('연도: ', today.year)
print('월: ', today.month)
print('일: ', today.day)
# 날짜 계산
today = date.today()
print('어제: ', today + timedelta(days=-1))... |
Java | UTF-8 | 1,426 | 2.71875 | 3 | [] | no_license | package de.fub.bytecode.generic;
import de.fub.bytecode.Constants;
import de.fub.bytecode.ExceptionConstants;
/**
* Super class for the xRETURN family of instructions.
*
* @version $Id: ReturnInstruction.java,v 1.6 2001/07/03 08:20:18 dahm Exp $
* @author <A HREF="http://www.berlin.de/~markus.dahm/">M. Dahm</A>
... |
Java | UTF-8 | 149 | 1.875 | 2 | [] | no_license | public class Main {
public static void main(String [] args){
//Starts an intance of UI that runs the program
Ui.menu();
}
}
|
Markdown | UTF-8 | 2,164 | 3.375 | 3 | [] | no_license | # Hom Fried Rice
Yes, it's spelled correctly! We learned a fried rice recipe from the Hom family, and this is basically hacks on that one.
Ours makes use of an InstantPot, which makes rice cooking easy.
Thank you, Homs! :D
## Prepare Rice
The rice needs to be prepared ahead of time. It also needs to be cooked 'dry... |
Python | UTF-8 | 4,182 | 3.328125 | 3 | [] | no_license | import re
import pprint
from sys import argv
def syntaxCheck(jsonString):
if jsonString[0] != '{' or jsonString[-1] != '}':
return False
return bracketsMatch(jsonString)
# check if all open brackets/braces have a corresponding close character
def bracketsMatch(string):
bracketStack = []
braceStack =... |
Python | UTF-8 | 1,487 | 2.703125 | 3 | [] | no_license | import pygame, random
from componentes import Grid, Snake, Tempo, Pontos, Comida
cor_de_fundo = (100, 100, 100)
azul_claro = (130, 180, 200)
amarelo = (255, 255, 0)
preto = (0, 0, 0)
verde = (20, 110, 20)
largura = 620
altura = 680
grid_tam = (600, 600)
pos_grid = (10, 70)
cel_tam = (15, 15)
info_tam = (200, 50)
pos... |
Python | UTF-8 | 1,185 | 3.328125 | 3 | [] | no_license | # Support Vector Regression (SVR)
# Importing the libraries
from sklearn.metrics import r2_score
from sklearn.svm import SVR
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the data... |
Python | UTF-8 | 1,401 | 3.1875 | 3 | [] | no_license | #!/usr/bin/env python
# import required modules:
#
import os
import sys
import string
def dups(A):
current = []
counter = 0
while True:
maxbank = max(A)
maxind = A.index(maxbank)
A[maxind] = 0
while maxbank > 0:
# Check
if maxin... |
C++ | UTF-8 | 6,064 | 2.953125 | 3 | [] | no_license | #include "utils.h"
size_t nearestTwoPower(size_t num) {
size_t ones_count = 0;
size_t count = 0;
while (num) {
ones_count += num & 1;
++count;
num >>= 1;
}
if (ones_count == 1)
return count - 1;
return count;
}
void recursiveStrassen(
double *A, double *B, double *C,
int ... |
TypeScript | UTF-8 | 445 | 2.515625 | 3 | [] | no_license | import { LazyExoticComponent, ComponentType, ReactNode } from 'react';
interface IExtraProps {
[key: string]: any;
}
export interface IRoute {
path: string;
component?: LazyExoticComponent<ComponentType<any>>;
componentExtraProps?: IExtraProps;
// Preloader for lazy loading
fallback?: NonNullable<ReactNod... |
Java | UTF-8 | 894 | 2.203125 | 2 | [] | no_license | package com.example.ilijaangeleski.flixbus.model;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Created by Ilija Angeleski on 2/1/2018.
*/
public class Departures implements Serializable{
@SerializedName("direction")
private String direction;
@SerializedName("li... |
C++ | UTF-8 | 1,376 | 3.203125 | 3 | [] | no_license | class car_conf //configuratioin of car
{public:
double x;
double y;
double theta;
void setValue(double a, double b, double c)
{
x=a;
y=b;
theta=c;
}
};
class car_steering //drive with speed v and steering angle phi from one configuration to another
{public:
double v;
double phi;
void setValue(double a... |
Markdown | UTF-8 | 3,219 | 3.109375 | 3 | [] | no_license | # ASSIGNMENT 03 (updated): Introduction to Computational Media
**DUE:** 27 September 2018, 6:00 PM
## Brief
NOTE: As part of a bit of course restructuring, we are going to focus the next couple weeks on establishing a base level of computational literacy. As part of this effort, you will be assigned a "playlist" of ... |
C# | UTF-8 | 1,328 | 2.515625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DAL
{
public class BikeInfoServer
{
public static object MakeCard(string icno, string bikeno, string bikeowername, string bikeowertel, string bikeow... |
TypeScript | UTF-8 | 522 | 3.1875 | 3 | [
"MIT"
] | permissive | import * as test from 'tape';
import cache from '../cache';
test("cache", async t => {
const key = "1";
const value = "test";
await cache.setKey(key, value);
const result = await cache.getKey<string>(key);
t.equal(result, value);
t.end();
})
test("clone", async t => {
type TestObj = { de... |
Java | UTF-8 | 274 | 1.6875 | 2 | [
"MIT"
] | permissive | package com.drive.admin.repository;
import com.drive.common.core.biz.ResObject;
/**
* 测试分布式事务
*/
public interface AccountRepository {
/**
* 添加金额
* @param account
* @return
*/
ResObject increaseAmount(String account);
}
|
Java | UTF-8 | 8,942 | 1.648438 | 2 | [] | no_license |
package Netspan.NBI_14_0.API.Status;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlTyp... |
Python | UTF-8 | 163 | 3.328125 | 3 | [] | no_license | #! /usr/bin/env python3
def int_to_string(int):
return chr(int)
if __name__ == "__main__":
a = 65
print(a)
a = chr(a)
print(a)
|
Java | UTF-8 | 7,030 | 2.125 | 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 GUI;
import javafx.application.Platform;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.L... |
Python | UTF-8 | 76 | 3.171875 | 3 | [] | no_license | name = "gReElEy"
print(name.upper())
print(name.lower())
print(name.title()) |
JavaScript | UTF-8 | 1,205 | 3.421875 | 3 | [] | no_license | const { expect } = require('chai');
const Obstacle = require('../lib/Obstacle.js');
describe('Obstacle', () => {
let obstacle;
beforeEach(() => {
obstacle = new Obstacle();
});
it('should have an x property that defaults to 700', () => {
expect(obstacle.x).to.equal(700);
});
it('should have a y ... |
Java | UTF-8 | 2,117 | 1.96875 | 2 | [] | no_license | package org.triplea.game.server;
import static com.google.common.base.Preconditions.checkNotNull;
import static games.strategy.engine.framework.CliProperties.LOBBY_URI;
import games.strategy.engine.framework.startup.LobbyWatcherThread;
import games.strategy.engine.framework.startup.login.ClientLoginValidator;
import ... |
Java | UTF-8 | 196 | 2.125 | 2 | [] | no_license | package decorator;
/**
* Created with Intellij IDEA.
* Description:
* User: baby
* Date: 2017/8/21
* Time: 19:05
*/
public interface Shape {
/**
* Draw.
*/
void draw();
}
|
C# | UTF-8 | 2,402 | 2.609375 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using CatBoardApi.Models;
using System.Globalization;
namespace CatBoardApi.Controllers
{
[Route("api/boards/{boardId}/[controller]")]
[ApiControlle... |
Markdown | UTF-8 | 1,108 | 2.75 | 3 | [] | no_license | # MERN app
> CRUD API to get all the users from the MySQL database and to view their friends.
## MySQL Database
The SQL commands for creating the tables of the database is in the root directory under the name code.sql.
## Quick start
Launch the backend server locally and connect it to your MySQL database by prov... |
JavaScript | UTF-8 | 2,398 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | import { fetchJson, fetchText } from 'umbrella-common-js/ajax.js';
/**
*
* interface options {
* forceRefresh: boolean; don't use cache
* onlyIfCached: boolean; only return data from cache if available, don't fetch, superceded by forceRefresh
* isPaginated: boolean; if api route is paginated; the ... |
TypeScript | UTF-8 | 971 | 2.9375 | 3 | [] | no_license | import { User } from '../models';
import * as fromUsers from '../actions/user.actions';
export interface UserState {
users: User[];
}
export const initialState: UserState = {
users: []
};
export function userReducer(state = initialState, action: fromUsers.Actions): UserState {
switch (action.type) {
... |
Python | UTF-8 | 764 | 3.5 | 4 | [
"MIT"
] | permissive | import data
class Strings:
def __init__(self):
print(
"""
String Problems
1.winner of election
2.Maximum length of consecutive 1in a binary string
"""
)
def electionWinner(self, votes=data.electionWinner_Votes):
candidates =... |
C++ | UTF-8 | 2,829 | 2.953125 | 3 | [] | no_license | #include "stdafx.h"
#include "Stretch.h"
DWORD Stretch(UINT w, UINT h, UINT lower, UINT upper, UCHAR *img)
{
if(!img)
return FALSE;
if(upper > 255)
upper = 255;
if(lower < 0)
lower = 0;
UINT i = NULL;
UINT end = w*h;
DWORD min = NULL;
DWORD max = NULL;
FLOAT ratio = NULL;
DWORD temp = NULL;
GetMax... |
Python | UTF-8 | 54,915 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | # Copyright 2012-2021 M. Andersen and L. Vandenberghe.
# Copyright 2010-2011 L. Vandenberghe.
# Copyright 2004-2009 J. Dahl and L. Vandenberghe.
#
# This file is part of CVXOPT.
#
# CVXOPT is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# t... |
Python | UTF-8 | 455 | 2.734375 | 3 | [] | no_license | import heapq
N, M = map(int, input().split())
AB = (list(map(int, input().split())) for _ in range(N))
AB = sorted(AB, key=lambda x: x[0])
hq = []
ind = 0
ans = 0
for lim in range(1, M + 1):
for i in range(ind, N):
if AB[i][0] == lim:
AB[i][0], AB[i][1] = -AB[i][1], AB[i][0]
heapq.... |
Python | UTF-8 | 1,169 | 3.03125 | 3 | [] | no_license | from sklearn.ensemble import AdaBoostClassifier
from sklearn import datasets
from sklearn.model_selection import train_test_split
# классификатор опорных векторов
from sklearn.svm import SVC
from sklearn import metrics
# загрузка датасета
iris = datasets.load_iris()
X = iris.data
y = iris.target
# разделение данных на... |
Python | UTF-8 | 1,376 | 3.15625 | 3 | [] | no_license | from __future__ import division, print_function
# PHY407, Fall 2015, Q3
__author__ = "DUONG, BANG CHI"
# Import modules
from numpy import zeros, sin, pi
from matplotlib.pyplot import plot, legend, xlabel, ylabel, title, show, xlim
def T0(t):
A = 10
B = 12
tau = 365 # days = 12 months
return A + B*si... |
Java | UTF-8 | 1,212 | 4 | 4 | [] | no_license | import java.util.Random;
@SuppressWarnings("javadoc")
public class GuessingGame2 {
private int secret;
public GuessingGame2(int secret) {
this.secret = secret;
}
public boolean guessWins(int guess) {
return guess == this.secret;
}
public String messageForGuess(int guess) {
if (guess > this.secret) {
... |
Markdown | UTF-8 | 1,060 | 3.25 | 3 | [] | no_license | # thinkful-quiz-app
This is a quiz app that I made as part of Thinkful's Frontend Web Development Course
## Introduction
This is one of the earlier projects I made in the Thinkful coding bootcamp course. The focus of this project was to use jQuery to create a quiz app based on a subject of your choosing. I chose to ma... |
Java | UTF-8 | 604 | 2.15625 | 2 | [] | no_license | package com.qyer.javaapi.rest.service;
import org.springframework.stereotype.Component;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
/**
* Created by panqiang on 2017/5/14.
*/
@Component
@Path("/")
public class HomeServer ... |
JavaScript | UTF-8 | 894 | 2.890625 | 3 | [] | no_license | 'use strict';
const path = require('path');
const fs = require('fs');
// Based on your application's initial performance score, you may want to adjust this threshold.
// 1 is 100%; 0.91 is 91% etc.
const PERFORMANCE_THRESHOLD = 0.9;
const [reportPath] = process.argv.slice(2);
if (!reportPath) {
throw new RangeE... |
Java | UTF-8 | 829 | 3.53125 | 4 | [] | no_license | package algorithm.chapter3.template.greedy;
/**
* 【45. 跳跃游戏 II】给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。
* 你的目标是使用最少的跳跃次数到达数组的最后一个位置。 示例: 输入: [2,3,1,1,4] 输出: 2 解释: 跳到最后一个位置的最小跳跃数是 2。
* 从下标为 0 跳到下标为 1 的位置,跳 1 步,然后跳 3 步到达数组的最后一个位置。 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/jump-game-ii
* 著作权... |
Java | UTF-8 | 1,112 | 2.9375 | 3 | [] | no_license | package ru.ifmo.ctddev.isaev;
import java.io.Serializable;
/**
* Created by isae on 07.04.15.
*/
public enum Token implements LexicalUnit {
LPAREN("(","("),
RPAREN(")",")"),
PLUS("+","+"),
MINUS("-","-"),
MUL("*","*"),
END("$","$"),
EPS("","eps");
String token;
String graphName;... |
C# | UTF-8 | 1,396 | 3.671875 | 4 | [] | no_license | using System;
namespace praca_domowa_5
{
public class Menu
{
string name;
Product[] products;
public Menu()
{
this.name = "Food Hall";
this.products = new Product[] {
new Product("Sushi", 33.59),
new Product("Ramen", 31.50... |
C++ | UTF-8 | 3,986 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | #pragma once
namespace lazy
{
template<class T>
class Value
{
public:
Value(const T& v) :value(v) {}
template<class Enable = std::enable_if_t<std::is_arithmetic_v<T>>>
/*explicit*/ operator T() const { return value; }
template<class Enable = std::enable_if_t<std::is_invocable_v<T>>>
auto operator()() c... |
C++ | UTF-8 | 5,363 | 2.9375 | 3 | [] | no_license | //
// Created by MARTIN Benoît on 03/01/2019.
//
#ifndef MEMORY_CHAINED_BLOCK_ALLOCATOR_H
#define MEMORY_CHAINED_BLOCK_ALLOCATOR_H
#include <memory>
#include <cassert>
#include <forward_list>
#ifndef NDEBUG
#include <iostream>
#endif
namespace root88 {
namespace memory {
/**
* ChainedBlockAllocator
* STL complia... |
PHP | UTF-8 | 1,823 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace vps\tools\helpers;
/**
* Class RemoteFileHelper
* @package vps\tools\helpers
*/
class RemoteFileHelper extends \yii\helpers\BaseFileHelper
{
/**
* Checks if file is local.
* ```php
* RemoteFileHelper::isLocal('https://google.com');
* // return false
* ```
* @param $path
... |
Java | UTF-8 | 614 | 2.6875 | 3 | [] | no_license | package net.test;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
public class Solution {
Map<String, Integer> dayIndex = new HashMap<String, Integer>();
Map<String, Integer> monthIndex = new HashMap<String, Integer>();
Map<String, Integer> monthLength = new HashMap<String, Integer>();... |
Python | UTF-8 | 2,217 | 2.65625 | 3 | [] | no_license | from app import db
import os
import shutil
class SolutionFile(db.Model):
__tablename__ = "solution_file"
id = db.Column(db.Integer, index=True, primary_key=True)
name = db.Column(db.String(128), index=True)
solution_id = db.Column(db.Integer, db.ForeignKey("solution.id"))
solution = db.relationsh... |
Python | UTF-8 | 496 | 3.546875 | 4 | [
"MIT"
] | permissive | class Vocab:
def __init__(self, name):
self.name = name
self.word_index = {}
self.word_count = {}
self.index_word = {0: "SOS", 1: "EOS"}
self.num_words = 2
def add_sentence(self, sentence):
for word in sentence.split(' '):
self.add_word(word)
def add_word(self, word):
if word not in self.word_inde... |
Java | UTF-8 | 548 | 2.734375 | 3 | [] | no_license | package apm.muei.distancenevermatters.entities;
public class Dice {
private Long id;
private String name;
private int value;
private int img;
public Dice(Long id, String name, int value, int img) {
this.id = id;
this.name = name;
this.value = value;
this.img = img;
... |
Java | UTF-8 | 5,609 | 2.078125 | 2 | [] | no_license | package medoffice.entity;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persi... |
Java | UTF-8 | 110 | 1.84375 | 2 | [] | no_license | package lambdaMethodRef;
public interface ConvertBeta {
String convert(String str, int a, int b);
}
|
Java | UTF-8 | 89 | 1.726563 | 2 | [] | no_license | class ArrayUtilities {
static arrayToList(int[] args) {
int firstInt = args[0]
}
} |
JavaScript | UTF-8 | 27,016 | 2.75 | 3 | [] | no_license | function onPageLoad () {
if (window.location.search.length > 0) {
console.log("code exists");
handleRedirect();
}
}
async function createPlaylist(data) {
//make create playlist request first
let userid = window.localStorage.getItem("userid");
let username = window.localSto... |
TypeScript | UTF-8 | 599 | 2.84375 | 3 | [] | no_license | import * as React from "react";
export function memo<Params extends any[], Retn extends any>(factory: (...args: Params) => Retn) {
return (...args: Params): Retn => React.useMemo(() => factory(...args), args);
}
export function callback<Params extends any[], Retn extends (...args: any[]) => any>(factory: (...args... |
Markdown | UTF-8 | 2,454 | 2.765625 | 3 | [
"MIT"
] | permissive | [](https://nodei.co/npm/marked-man/)
marked-man(1) -- markdown to roff
=================================
SYNOPSIS
--------
```
marked-man README.md > doc/marked-man.1
```
See [marked README](https://github.com/chjj/marked) for documentation about how to use ... |
C++ | UTF-8 | 1,510 | 2.875 | 3 | [] | no_license | #ifndef STRATEGISTSSTUFF_H
#define STRATEGISTSSTUFF_H
#include "Strategists/samplestrategist.h"
#include "Strategists/Strategy_Ball.h"
#include "Strategists/Strategy_Guard.h"
#include "Strategists/robot_zap.h"
#include "Strategists/3v3/goalkeeper3v3.h"
#include "Strategists/3v3/striker3v3.h"
#include "Strateg... |
Markdown | UTF-8 | 4,470 | 3.25 | 3 | [
"CC0-1.0"
] | permissive | # How to convert your (/) root partition to btrfs
This how to describes the procedure to convert your linux root partition from ext4 to btrfs.
Use Case: Over a period of time, we make multiple changes to the OS, customize multiple applications and lose track of all the changes. Reinstalling the OS is really out of ... |
Java | UTF-8 | 362 | 2.046875 | 2 | [] | no_license | package org.midas.as;
import org.midas.MidasException;
public class AgentServerException extends MidasException
{
public AgentServerException(){}
public AgentServerException(Throwable arg0){super(arg0);}
public AgentServerException(String message){super(message);}
public AgentServerException(String arg0... |
C# | UTF-8 | 5,648 | 2.984375 | 3 | [
"MIT"
] | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace app
{
public class Program
{
private static readonly HttpClient _... |
Java | UTF-8 | 1,179 | 2.328125 | 2 | [
"MIT"
] | permissive | package com.example.myapplication4.book.brief;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.Fts4;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
@Fts4
@Entity
public class BookBriefDataBean {
... |
Markdown | UTF-8 | 3,156 | 2.765625 | 3 | [
"MIT"
] | permissive | # Purescript-Simple-JSON
[<img alt="build status" src="https://img.shields.io/github/workflow/status/justinwoo/purescript-simple-json/ci?logo=github&style=for-the-badge" height="20">](https://github.com/justinwoo/purescript-simple-json/actions?query=workflow%3Aci)
[<img alt="documentation status" src="https://img.shie... |
C# | UTF-8 | 2,000 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestCommon;
namespace A8
{
public class Q3PacketProcessing : Processor
{
public Q3PacketProcessing(string testDataName) : base(testDataName)
{ }
public override string Process(string inStr) =>
... |
Java | UTF-8 | 6,034 | 2.21875 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.timesheet.changeprofile;
import com.timesheet.bean.Employee;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.Date... |
JavaScript | UTF-8 | 7,505 | 3.4375 | 3 | [] | no_license | function cambia(){
var capa = document.getElementById("principalCurses");
borraHijos(capa);
var nodoTexto = document.createTextNode("HAS PULSADO EL BOTON PULSAR Y HAS HECHO MAGIA!!!!");
var nodoElement = document.createElement("h2");
nodoElement.appendChild(nodoTexto);
capa.appendChild(nodo... |
PHP | UTF-8 | 178 | 2.71875 | 3 | [] | no_license | <?php
include_once 'Product.php';
class ProductAA extends Product {
/**
* @return void
*/
public function writeln() {
print "ProductAA \n";
}
}
|
Markdown | UTF-8 | 6,250 | 2.65625 | 3 | [] | no_license | # 输入文字
## 输入文字的两种方式
对于输入文字,发现之前的可以工作的代码:
```python
self.driver(text=locator["text"]).set_text(text,timeout=WaitFind)
```
会出现:无法完整输入内容
具体现象:中文输入法中,输入了字母,但是丢失了数字 的效果:

且输入法此时已经也被换了(换成了 FastInputIME 或 系统自带(华为Swype) 输入法了)
注:
```python
sel... |
Ruby | UTF-8 | 2,067 | 2.828125 | 3 | [
"MIT"
] | permissive | # typed: ignore
# This file contains a fake implementation of the subset of `sorbet-runtime`
# used by Braid that performs no runtime checks. See the "Type checking"
# section of development.md for background.
require 'singleton'
# Create our fake module at `Braid::T` so that if someone loads Braid into the
# same ... |
Python | UTF-8 | 733 | 2.5625 | 3 | [] | no_license | import idx2numpy
import cPickle, gzip, numpy
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
#sess = tf.InteractiveSession()
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
print mnist
exit()
node1 = tf.constant(3.0, tf.float32)
node2 = tf.constant(4.0) # also tf... |
Python | UTF-8 | 674 | 3.015625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 6 19:07:08 2019
@author: ecorrea
"""
#P074: indexação booleana
import numpy as np
vet_filmes = np.array(['Procura Insaciável (1971)',
'Um Estranho no Ninho (1975)',
'Hair (1979)',
'Na Época do Ragtime (1981)',
'Amadeus (1984)',
... |
Shell | UTF-8 | 1,634 | 3.421875 | 3 | [] | no_license | #!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
source /usr/local/lib/my-notmuch-utils/commons.sh
LOCKFILE=/tmp/sync-mails-dotfile
echo "Start Sync Mails!"
echo "Check lockfile $LOCKFILE"
$dotlockfile_command -r 10 -l -p "$LOCKFILE"
[[ $? -ne 0 ]] && { sendWarning "Sync Mail" "Previous sync lasts too long!"; }
e... |
Java | UTF-8 | 1,225 | 2.546875 | 3 | [
"MIT"
] | permissive | package com.refinedmods.refinedstorage.api.network;
import com.refinedmods.refinedstorage.api.util.Action;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import java.util.Collection;
import java.util.function.Consumer;
/**
* Represents a graph of all the nodes connected to a network.
*... |
PHP | UTF-8 | 1,003 | 3.03125 | 3 | [] | no_license | <?php
require_once "./classes/response_doc.php";
class htmlDoc extends ResponseDoc
{
public function show()
{
$this->beginDoc();
$this->beginHeader();
$this->headerContent();
$this->endHeader();
$this->beginBody();
$this->bodyContent();
$this->endBody();... |
Python | UTF-8 | 2,048 | 3.265625 | 3 | [
"MIT"
] | permissive |
import pygame
from pytmx import *
from os import path
from .settings import *
from .characters import *
class TiledMap():
def __init__(self, filename, game):
self.data = []
with open(filename, 'rt') as f:
for line in f:
self.data.append(line)
self.scal... |
JavaScript | UTF-8 | 2,767 | 3.53125 | 4 | [] | no_license | /*
* KVUE class类
*
* KVue
*
* */
class KVue {
constructor(options) {
this.$options = options;
this.$data = options.data; // $data 实例属性
this.observe(options.data);
// 模拟一下watcher创建
// new Watcher();
// this.$data.name;
// new Watcher();
// this.$dat... |
C | UTF-8 | 2,494 | 3.0625 | 3 | [] | no_license | /*
* kv_trace.h
* Author : Heekwon Park
* E-mail : heekwon.p@samsung.com
*
* LOG & Elapsed time measurement funcionts
*/
#ifndef KV_TRACE_H
#define KV_TRACE_H
#include <time.h>
#include <stdio.h>
//////////////////// TIME //////////////////
typedef unsigned long long cycles_t;
#define DECLARE_ARGS(val, low, hi... |
Markdown | UTF-8 | 3,625 | 3.03125 | 3 | [] | no_license | # Cours de C#
## Création de la structure
`mkdir Isen.Cs && cd Isen.Cs`
`dotnet new sln`
Création du projet de type console :
`mkdir Isen.Cs.ConsoleApp && cd Isen.Cs.ConsoleApp`
`dotnet new console`
Création du projet de type librairie:
`mkdir Isen.Cs.Library && cd Isen.Cs.Library`
`dotnet new classlib`... |
Markdown | UTF-8 | 2,699 | 2.59375 | 3 | [] | no_license | <!-- markdownlint-disable MD002 MD041 -->
Há mais de 230 conectores de caixa de saída para automatização da Microsoft. Muitos desses conectores usam o Microsoft Graph para se comunicar com pontos de extremidade específicos de produtos da Microsoft. Além disso, há outros cenários em que pode ser necessário chamar o Mic... |
Python | UTF-8 | 152 | 2.734375 | 3 | [] | no_license | # coding=utf-8
def front_times(str, n):
if n < 0:
return 'not a valid number'
if len(str) > 2:
str = str[:3]
return str * n |
Python | UTF-8 | 713 | 2.875 | 3 | [] | no_license | class Solution:
def minCostToMoveChips(self, position: List[int]) -> int:
counters = {}
for v in position:
counters[v] = counters.get(v, 0) + 1
ans = sys.maxsize
for p in counters:
cost = 0
for q in counters:
... |
Java | UTF-8 | 1,231 | 2.453125 | 2 | [] | no_license | package com.hackusp.klabinusp.model;
public class Usuario {
private String id;
private String roleId;
private double pesoIc;
private double pesoEstagio;
private double pesoPalestra;
public Usuario(String id, String roleId, double pesoIc, double pesoEstagio, double pesoPalestra) {
this.... |
Python | UTF-8 | 1,021 | 4.21875 | 4 | [] | no_license | # Program Name: p27_Count_Letters_in_a_Random_List_of_Letters.py
# Name: Charlize Serrano
# Version: Python 3.7.0
# Date Started - Date Finished: 9/28/18 - 9/29/18
# Description: Write a program that generates a random list of letters.
from random import randint
empty_list = []
x = randint(50, 75)
b_count = 0
print... |
Java | UTF-8 | 3,959 | 2 | 2 | [] | no_license | package com.ahpu.ssm.service.admin;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ahpu.ssm.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ahpu.ssm.mapper.admin.OrderMapper;
import com.ahpu.ssm.mapper... |
Shell | UTF-8 | 205 | 3.03125 | 3 | [] | no_license | #!/usr/bin/env bash
set -euox pipefail
IFS=$'\n\t'
java-app.stop.main() {
cd $(dirname $(readlink -f $0))
local pid=java-example/pid
kill -9 $(cat $pid)
rm $pid
}
java-app.stop.main "$@"
|
Java | UTF-8 | 1,575 | 2.265625 | 2 | [] | no_license | package com.example.a76780.himalaya.adapters;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.example.a76780.himalaya.R;
import com.squareup.picasso.Picasso;
import com.ximalaya.ting.a... |
C++ | UTF-8 | 1,568 | 2.625 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PresidentialPardonForm.cpp :+: :+: :+: ... |
Python | UTF-8 | 2,318 | 3.03125 | 3 | [
"MIT"
] | permissive | """Alumno: Sergi Viel
usuario: evokraken
version 04.00
"""
"""
CONTROL DE CAMBIOS
La direccion se controla mediante un giro aleatorio 'cabeceo'.
El modulo controlado por un random de cero a 'magnitDePaso'.
Obtenemos el punto medio de cada paso. Trazamos un vector perpendicular
y a partir de el obtenemos dos p... |
Java | UTF-8 | 2,785 | 2.78125 | 3 | [] | no_license | import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
public class OrderDetail {
protected static int Number=0;
private String OrderId;
private String FoodItemId;
private int NumberofItems;
private... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.