language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 679 | 2.46875 | 2 | [] | no_license | package com.automation.Utils;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class UsefulMethods {
public static void waitForVisibilityOfElement(WebDriver driver, WebEle... |
Shell | UTF-8 | 286 | 2.546875 | 3 | [] | no_license | #!/bin/sh
if [ -d "work" ]; then
sudo rm -fr work
fi
echo "Create database volume..."
mkdir -p work/data
sudo chcon -Rt container_file_t work
podman unshare chown -R 27:27 work
# TODO Add podman run for mysql image here
sleep 9
# TODO Add podman run for todonodejs image here
|
Go | UTF-8 | 714 | 2.8125 | 3 | [] | no_license | package usecase
import (
"github.com/hikaru7719/receipt-rest-api/domain/model"
"testing"
)
func TestReceiptUsecase_GetReceipt(t *testing.T) {
usecaseTest := NewReceiptUsecase(&ReceiptRepositoryStub{})
actual, err := usecaseTest.GetReceipt(1)
if err != nil {
t.Error("error")
}
if actual.Name != "test" {
t... |
Java | UTF-8 | 2,927 | 4.03125 | 4 | [] | no_license |
/**
* Write a description of class Person here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Person
{
// instance variables - replace the example below with your own
private String firstName, secondName;
/**
* Constructor for objects of class Person
*/
... |
C | UTF-8 | 841 | 3.5 | 4 | [] | no_license | #include <stdio.h>
typedef char BYTE;
// program name, original file, output file
int main(int argc, char *argv[])
{
int nOfSegments = 0;
int start = 0;
int end = 0;
BYTE temp;
FILE *inptr = fopen(argv[1], "r");
FILE *outptr = fopen(argv[2], "wb");
printf("How many segments?... |
Java | UTF-8 | 905 | 3.984375 | 4 | [] | no_license | package ex02;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class MainEx02 {
public static void main(String[] args) {
List<Integer> lista = new ArrayList<>();
lista.add(1);
lista.add(5);
lista.add(5);
lista.add(6)... |
C# | UTF-8 | 1,410 | 2.609375 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FindClosest : MonoBehaviour
{
private CursorPos cursor;
public BuildGround closestBuildGround;
public float x;
public float y;
private void Start()
{
cursor = GameObject.Find("Canvas").GetComp... |
Java | UTF-8 | 1,144 | 2.90625 | 3 | [] | no_license | package com.danwink.simgame;
import java.util.ArrayList;
import java.util.HashMap;
public class SimElement
{
SimElement parent;
String name;
private String fullname;
HashMap<String, SimElement> children = new HashMap<String, SimElement>();
ArrayList<Action> ontick = new ArrayList<Action>();
public void tick... |
Rust | UTF-8 | 839 | 3.953125 | 4 | [] | no_license | fn main() {
part1();
part2();
part3();
}
fn part1() {
let mut s = String::new();
s.push_str("create_string");
println!("{}", s);
let mut s2 = "initial contents".to_string();
s2.push_str(": test");
println!("{}", s2);
}
fn part2() {
{
let mut s = String::from("foo");
... |
Java | UTF-8 | 1,168 | 1.867188 | 2 | [] | no_license | package com.bin.easymobilecare.api;
import com.bin.easymobilecare.ApiPojo.BrandCategoryResponse;
import com.bin.easymobilecare.ApiPojo.Login.LoginRequest;
import com.bin.easymobilecare.ApiPojo.Login.LoginStatusResponse;
import com.bin.easymobilecare.ApiPojo.NotificationRequest;
import com.bin.easymobilecare.ApiPojo.No... |
Markdown | UTF-8 | 2,616 | 3.03125 | 3 | [] | no_license | # OGMeet
This project was generated with angular as front-end and spring-boot as back-end.
## Project Description
All students and Faculty can login into Dashboard but the functionality differs. OCMS is a management system for managing student attendance and also faculty attendance and is a means of communication be... |
Java | UTF-8 | 321 | 1.5625 | 2 | [] | no_license | package pl.pwn.reaktor.medoda;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MedodaShopApplication {
public static void main(String[] args) {
SpringApplication.run(MedodaShopApplication.class, args);
}
}... |
Java | UTF-8 | 1,417 | 2.03125 | 2 | [] | no_license | package com.vanilla.healthmanagement.controller;
import com.github.pagehelper.PageInfo;
import com.vanilla.healthmanagement.pojo.Member;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.ut... |
Rust | UTF-8 | 364 | 3.5625 | 4 | [
"MIT"
] | permissive | fn main() {
let mut counter = 0;
let result = loop {
counter += 1;
if counter == 10 {
break counter * 2;
}
};
assert_eq!(result, 20);
let a = [10, 20, 30, 40, 50];
for e in a.iter() {
println!("Value: {}", e);
}
for number in (1..4).rev()... |
Swift | UTF-8 | 523 | 2.84375 | 3 | [
"MIT"
] | permissive | //
// MovieListViewModel.swift
// TheMovieApp
//
// Created by CİHAN ÖZTÜRK on 31.01.2021.
// Copyright © 2021 CİHAN ÖZTÜRK. All rights reserved.
//
import Foundation
import UIKit
struct MovieListViewModel {
var imageURL: String?
var title: String?
var isHiddenFavIcon: Bool = true
init(image... |
C | UTF-8 | 1,464 | 2.90625 | 3 | [] | no_license | #include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <math.h>
#define SAMPLE_RATE 44100 //Hz
#define TIME 10.0 //sec
#define PI 3.141592
float osc_sin(float t){
return sin(2.*PI * t);
}
float osc_sqr(float t){
t = fmod(t,1.0f);
return t < 0.5 ? -1 : 1;
}
float osc_saw(float t){
t = fmod... |
Java | UTF-8 | 1,875 | 2.390625 | 2 | [] | no_license | package cn.zup.iot.timerdecision.service.settings;
/**
* 区域类型
* @author samson
*
*/
public enum WeatherType
{
/**
晴
*/
qing(0),
/**
多云
*/
duoyun(1),
/**
阴
*/
yin(2),
/**
阵雨
*/
zhenyu(3),
/**
雷阵雨
*/
leizhenyu(4),
/**
雷阵雨伴有冰雹
*/
leizhenyubanyoubingbao(5),
/**
雨夹雪
*/
yujiaxu... |
C# | UTF-8 | 1,918 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml.Xsl;
namespace CryptoJokerDecryptor
{
public partial class KeyValidationWindow : Form
{
const int PublicPrivateKeyLength... |
Python | UTF-8 | 1,534 | 3.015625 | 3 | [
"MIT"
] | permissive | """
Main Function for wol(wiley online library, https://onlinelibrary.wiley.com/)
"""
from toc.toc_wol import WOLTOC
from paper.paper_wol import WOLPaper
from excel.excel import Excel
from openpyxl.styles import Font
def wol(toc_url,
base_url = "https://onlinelibrary.wiley.com",
save_excel = "resu... |
Python | UTF-8 | 849 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# https://github.com/joeyajames/Python/blob/master/Web%20Data%20Mining/Python%20Requests.ipynb
# https://www.youtube.com/watch?v=ChwSD5e0Qs0
import requests
payload = {'page': 2, 'count': 25 }
r = requests.get('https://httpbin.org/get', params=payload)
print('r.text... |
C++ | UTF-8 | 4,570 | 2.921875 | 3 | [] | no_license | #ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H
#include "gamedatamodel.h"
#include <memory>
#include <QObject>
#include <QSizeF>
/** Значение по умолчанию радиуса "пузырей"
*/
const double defaultRadiusOfCircles = 50;
/** Значение по умолчанию времени жизни "пузыря"
*/
const int defaultLifeTimeOfCircles = 5 * 10... |
C++ | UTF-8 | 567 | 2.90625 | 3 | [] | no_license | /*
? ? ??????
?????20110102
? ?????
?????????????????
**/
void check(int *a);
int g_lenth;
int main()
{
char a[101];
int b[100];
cin.getline(a, 101);
g_lenth = strlen(a);
for(int i = 0; i < g_lenth; i++)
{
if(a[i] == a[0])
b[i] = 1;
else
b[i] = 2;
}
check(b);
retu... |
C++ | UTF-8 | 2,580 | 2.515625 | 3 | [
"MIT"
] | permissive | #pragma once
#include <geneial/algorithm/diagnostics/Diagnostics.h>
#include <memory>
#include <algorithm>
#include <iomanip>
geneial_private_namespace(geneial)
{
geneial_private_namespace(algorithm)
{
geneial_export_namespace
{
template<typename FITNESS_TYPE>
Diagnostics<FITNESS_TYPE>::Diagnostics(const std::shar... |
Swift | UTF-8 | 4,895 | 3.015625 | 3 | [] | no_license | //
// ContactController.swift
// ContactList
//
// Created by Shak Feizi on 5/14/21.
//
import UIKit
import CloudKit
class ContactController {
// Shak notes: Properties
// sharedInstance
static let sharedInstance = ContactController()
// SOT
var contactsArray: [Contact] = []
// Databa... |
Java | UTF-8 | 431 | 3.46875 | 3 | [] | no_license | import java.util.*;
class User{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("Name :");
String name = sc.next();
System.out.println("Roll No :");
int Roll = sc.nextInt();
System.out.println("Field of intrest :");
String Intrest = sc.next();
S... |
C# | UTF-8 | 3,385 | 2.53125 | 3 | [
"MIT"
] | permissive | // Copyright (c) True Goodwill. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace FFT.Oanda.Orders
{
using System;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
/// <summary>
/// A StopLossOrder i... |
Java | UTF-8 | 396 | 1.851563 | 2 | [] | no_license | package com.mshis.medicalSystem.dao.medicalrecord;
import com.mshis.medicalSystem.pojo.bean.CaseHistory;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* description:
* author: 沫凌
* create: 2019-07-18 10:07
*/
public interface DiseaseRecordDao extends JpaRepository<CaseHistory,Integer> {
C... |
Java | UTF-8 | 1,195 | 2.5625 | 3 | [] | no_license | package xyz.elfanrodhian.myfamilylocator.models;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
public class TimelineItem {
private FamilyMember familyMember;
String date;
Long timestamp;
public TimelineItem() {
}
public TimelineItem(FamilyMember fa... |
C# | UTF-8 | 2,099 | 2.765625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AerolineaFrba
{
public class Cliente
{
int id;
decimal dni;
string nombre;
string apellido;
string dir;
decimal telefono;
strin... |
PHP | UTF-8 | 6,948 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* Query Service
* =============
*
* Have the different queries here to be
* used in other services
*/
namespace fishawack\triton\services;
use fishwack\triton\Triton;
use Craft;
use craft\elements\Entry;
use craft\elements\Category;
use craft\elements\GlobalSet;
use yii\base\Component;
class Query... |
C++ | UTF-8 | 235 | 2.71875 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
int a[]={16, 17, 4, 3, 5, 2};
int m=-1;
for(int j=5;j>=0;j--)
{
int t=a[j];
a[j]=m;
if(t>m)
m=t;
}
for(int i=0;i<6;i++)cout<<a[i]<<" ";
}
|
Java | UTF-8 | 9,890 | 2.28125 | 2 | [] | no_license | //*****************************************************************************
// Author: Rafael Geraldeli Rossi
// E-mail: rgr.rossi at gmail com
// Last-Modified: January 29, 2015
// Description:
//*****************************************************************************
package TCTInterfaces.Parameters... |
Markdown | UTF-8 | 4,353 | 2.640625 | 3 | [] | no_license | # Getting Started
<%= title("Installation") %>
Before installing make sure you have the required dependencies installed:
* [Go](https://golang.org) version `1.7` or greater.
* GCC, or equivalent C compiler for [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3).
* [OPTIONAL] [node](https://github.com/nodejs/node... |
Markdown | UTF-8 | 2,945 | 3.21875 | 3 | [] | no_license | # Super Resolution Using GAN
## Objective
- The main objective was recover or restore high resolution image from low resolution image.
- In this project low resolution images were converted to high resolutions images by applying Generative Adversarial Networks.
- GANs are class of AI algorithms used in Unsupervised Ma... |
Java | UTF-8 | 2,558 | 2.234375 | 2 | [] | no_license | package com.yaoguang.greendao.entity.company.user;
/**
* 用户查询条件类
*
* @author ZhangDeQuan
* @time 2016年9月30日 上午11:07:49
*/
public class UserCondition {
// 当前登录用户ID
private String userId;
// 当前登录用户归属部门ID
private String userOfficeId;
// 归属公司ID
private String companyId;
// 归属部门ID
private String officeId;... |
Swift | UTF-8 | 6,897 | 2.53125 | 3 | [] | no_license | import UIKit
import Network
var heroRes3 : [Hero] = []
var filtering = false
var filteredArray = [Hero]()
class apiTestViewController: UIViewController {
@IBOutlet weak var testingCollectionView: UICollectionView!
@IBOutlet weak var navBarItem: UINavigationItem!
var heroRes2 = [Hero]()
var search... |
Java | UTF-8 | 6,547 | 1.9375 | 2 | [
"Apache-2.0"
] | permissive | package timchat.ui;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.... |
Java | UTF-8 | 1,017 | 2.671875 | 3 | [] | no_license | package edu.buffalo.cse.ir.wikiindexer.tokenizer.rules;
import edu.buffalo.cse.ir.wikiindexer.tokenizer.TokenStream;
import edu.buffalo.cse.ir.wikiindexer.tokenizer.TokenizerException;
import edu.buffalo.cse.ir.wikiindexer.tokenizer.rules.TokenizerRule.RULENAMES;
@RuleClass(className = RULENAMES.SPECIALCHARS)
public c... |
Python | UTF-8 | 2,820 | 2.5625 | 3 | [] | no_license | from ..models import Battle, King
from .serializers import BattleSerializer, StatsSerializer
from got.response import JSONResponse
from rest_framework.views import APIView
from ..stats import Stats
class BattleListView(APIView):
"""
API View for the /list endpoint
"""
permission_classes = ()
def ... |
TypeScript | UTF-8 | 748 | 2.859375 | 3 | [
"MIT"
] | permissive | import { Issue } from './issue';
/** The result of a JQL search. */
export interface SearchResults {
/** Expand options that include additional search result details in the response. */
expand?: string;
/** The index of the first item returned on the page. */
startAt?: number;
/** The maximum number of resul... |
Java | UTF-8 | 911 | 2.234375 | 2 | [] | no_license | package com.sqli.imputation.service.impl;
import com.sqli.imputation.domain.Activity;
import com.sqli.imputation.service.ActivityPopulatorService;
import com.sqli.imputation.service.ActivityService;
import com.sqli.imputation.service.dto.ActivityDTO;
import org.springframework.beans.factory.annotation.Autowired;
impor... |
JavaScript | UTF-8 | 685 | 2.984375 | 3 | [] | no_license | document.addEventListener('DOMContentLoaded', restore_options);
const body = document.querySelector('body');
body.addEventListener('click', ()=> txtDomainName.focus());
const btnSave = document.getElementById('btnSave');
btnSave.addEventListener('click', save_options);
const txtDomainName = document.getElement... |
Markdown | UTF-8 | 3,685 | 2.828125 | 3 | [] | no_license | <h1 align="center">
<img src=".github/banner.png" alt="Time & Attendance">
</h1>
<p align="center">Registre e acompanhe seus pontos eletrônicos de maneira simples e fácil!</p>
<h4 align="center">Versão 1.0</h4>
<p align="center">
<a href="#-sobre">Sobre</a> |
<a href="#-tecno... |
PHP | UTF-8 | 2,641 | 3.09375 | 3 | [] | no_license | <?php
/**
* @file
*
* @package \Bookpro\Database\DatabaseAbstract
*/
namespace Bookpro\Database;
/**
* Class DatabaseAbstract
*/
abstract class DatabaseAbstract
{
/**
* @var $database static; Should allow connection Mysql, same for all subclasses
*/
private static $database;
... |
Python | UTF-8 | 153 | 3.375 | 3 | [
"MIT"
] | permissive | '''8. Write a Python program to check a dictionary is empty or not.'''
dict1 = {'a': 2, 'b': 3, 'c': 34}
dict2 = {}
print(any(dict1))
print(any(dict2))
|
Python | UTF-8 | 690 | 3.03125 | 3 | [] | no_license | from .angle import *
def plot_test():
"""Make sure that the red x is inside the halo of blue dots."""
import matplotlib.pyplot as plt
deviationfrompole=.1
fig,ax=plt.subplots(figsize=(10,4),ncols=2)
sxy=SphereCoordinate(pi+.5,pi-deviationfrompole)
xy=[sxy.random_shift(bds=((1+cos(.05))/2,(1+... |
Ruby | UTF-8 | 1,808 | 3.984375 | 4 | [] | no_license | require "byebug"
def two_sum_v1?(arr, target)
arr.each_with_index do |ele1, idx1| #o(n)
arr.each_with_index do |ele2, idx2| #o(n)
if idx1 < idx2
return true if ele1 + ele2 == target
end
end
end
false
end
arr = [0, 1, 5, 7]
def two_sum_v2?(arr,tar... |
Shell | UTF-8 | 266 | 3.28125 | 3 | [
"MIT"
] | permissive | #!/bin/bash
NODEID=`cat /etc/node_id`
if [ "$NODEID" == "1" ]; then
LOCALIP=`curl -s http://169.254.169.254/2011-05-01/meta-data/local-ipv4`
for i in $(seq 5 -1 1)
do echo "$LOCALIP mongo load complete, ready for transfer or resuming in $i"
sleep 60
done
fi
|
SQL | UTF-8 | 5,540 | 3.6875 | 4 | [] | no_license | create table tb_client(
client_id int primary key,
client_fname nvarchar(50),
client_lname nvarchar(50),
client_phone int,
client_email nvarchar(50),
client_address nvarchar(50)
);
create table tb_car(
car_id int primary key,
car_model nvarchar(50),
cal_color nvarchar(50),
rental_price int
);
create t... |
JavaScript | UTF-8 | 2,086 | 2.78125 | 3 | [] | no_license | const passport = require('passport');
const UserModel = require('../models/user-model.js');
// it determines what gets saved into the session when you log in.
passport.serializeUser((userFromDb, done) => {
// tell passport we want to save the ID inside the session
done(null, userFromDb._id);
});
// it tells ... |
Python | UTF-8 | 7,238 | 3.40625 | 3 | [] | no_license | # neuralnet.py
# ---------------
# Licensing Information: You are free to use or extend this projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to the University of Illinois at Urbana-Champaign
#
# Crea... |
Java | UTF-8 | 247 | 3.0625 | 3 | [] | no_license | public class OffByOne implements CharacterComparator {
@Override
public boolean equalChars(char first, char second) {
int diff = first - second;
int gapNum = 1;
return (diff == gapNum) || (diff == -gapNum);
}
}
|
Markdown | UTF-8 | 6,668 | 3.65625 | 4 | [] | no_license | [TOC]
### JavaScript概述
- 简介:是基于对象和事件驱动的语言,应用于客户端;是基于对象的,它给我们提供了很多对象,可以直接拿过来使用。
- 事件驱动:html做网站的静态效果,javasript做出动态效果;
- 客户端:即浏览器;
- 特点:
- 交互性(信息的动态交互)
- 安全性(不可以直接访问本地硬盘)
- 跨平台性(只要是可以解析js的浏览器都可以执行,和平台无关)
- javascript的组成
- ECMAScript
- ECMA:欧洲计算机协会
- 由ECMA组织指定的js的语法,语句……
- BOM【broswer... |
Java | UTF-8 | 753 | 3.609375 | 4 | [] | no_license | package com.company;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Введите размер массива: ");
int size = scanner.nextInt();
int[] mas = new int[size];
for (int i = 0; i < mas.length; i++) {
int a = 1... |
PHP | UTF-8 | 1,896 | 2.8125 | 3 | [] | no_license | <?php
/*
* This file is part of sebastian/object-graph.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace SebastianBergmann\ObjectGraph;
use Seba... |
Java | UTF-8 | 920 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | package com.googlecode.dex2jar.ir.ts;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
public class UniqueQueue<T> extends LinkedList<T> {
private static final long serialVersionUID = 7578371020752763662L;
Set<T> set = new HashSet<>();
public Uni... |
C# | UTF-8 | 5,263 | 3.59375 | 4 | [] | no_license | using System;
using System.Collections.Generic;
namespace BuilderDesignPatternExample
{
/// <summary>
/// The 'Product' class
/// </summary>
class Vehicle
{
VehicleType vehicleType;
Dictionary<PartType, string> parts = new Dictionary<PartType, string>();
// Constructor
... |
Python | UTF-8 | 580 | 3.859375 | 4 | [] | no_license | # Assignment 3-1
def calculator (val1, val2, opt):
if opt == '+':
return val1 + val2
elif opt == '-':
return val1 - val2
elif opt == '*':
return val1 * val2
elif opt == '/':
return val1 / val2
elif opt == '//':
return val1 // val2
elif opt == '%':
... |
Java | UTF-8 | 1,193 | 2.859375 | 3 | [] | no_license | package de.moritz.upperbuchstabe;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class QueueTest {
private Queue queue;
@Before
public void erzeugeQueue(){
queue = new Queue(3);
}
@Test(expected=IllegalArgumentException.class, timeout=1000)
... |
Java | UTF-8 | 489 | 1.984375 | 2 | [] | no_license | package com.acme.account.dto.request;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
@AllArgsConstructor
@Getter
@Builder(toBuilder = true)
@NoArgsConstructor
pu... |
Java | UTF-8 | 411 | 2.046875 | 2 | [] | no_license | package com.skillindia.datajpa.course;
import javax.persistence.Column;
import javax.persistence.Id;
public class Course {
private static final long serialVersionUID = 1L;
@Id
@Column(unique=true)
private int courseId;
private String courseName;
private String courseDescription;
private int courseDuration;
... |
Markdown | UTF-8 | 6,423 | 2.953125 | 3 | [] | no_license | ### 陆抗国战解析
武将技能:
【恪守】
当你受到伤害后时,你可以弃置两张颜色相同的手牌,然后此伤害-1。同时若你已确定势力且没有与你势力相同的其他角色,则你进行一次判定,若结果为红色,你摸一张牌。
【筑围】
你的判定牌生效后,你可以获得之,然后你可令当前回合角色本回合使用杀的次数上限+1,手牌上限+1。
**历史背景**
【恪守】来源于陆抗做事严格遵守,绝不改变的态度。
【筑围】来源于“西陵破晋”,吴军日夜在西陵筑造围墙抵御羊祜。
**技能剖析**
【恪守】
①“当你受到伤害后时,你可以弃置两张颜色相同的手牌”,首先得是受到伤害时,可以弃置同颜色的手牌,没有说一回合一次,所以只要你牌够多,抗下所有伤害也不在... |
C++ | UTF-8 | 5,109 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | #include "halley/tools/make_font/font_face.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include <halley/text/halleystring.h>
#include <memory>
#include <halley/support/exception.h>
#include <halley/maths/vector2.h>
#include <halley/file_formats/image.h>
#include "halley/text/string_converter.h"
using namespace Hal... |
Java | UTF-8 | 4,521 | 2.765625 | 3 | [] | no_license | /* CLASE ListarCompras
* RESPONSABILIDAD Listar los clientes de la galeria
* DESCRIPCION Aplicacion que lista las compras de un cliente
* COLABORACION Trabaja con las clases: MenuGaleria, EgaleriaDeArte, Cliente, MostrarComras, Listar
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;... |
Markdown | UTF-8 | 1,067 | 3.4375 | 3 | [] | no_license | # MyQueue Problem
Implement a MyQueue class which implements a queue using two stacks.
## Solution
This solution was tested on Ruby 2.4.3 but should run on earlier versions. The solution implements a `Stack`
class and its associated `StackNode` in `stack.rb`. Only the `Stack` class is used in the solution for the `MyQ... |
C | UTF-8 | 406 | 3.609375 | 4 | [] | no_license | #include<stdio.h>
float potencia(float a, int b);
int main(){
int i, j;
for(i=2; i<=10; i++){
for(j=0; j<=10; j++){
printf("%.2f ", potencia(i, j));
}
printf("\n");
}
printf("\n\n");
return 0;
}
float potencia(float b, int e){
int i;
float resultado;
resultado = b;
if(e==0){
return ... |
Python | UTF-8 | 2,845 | 2.78125 | 3 | [] | no_license | # coding=utf-8
# coding: utf-8
import random
from flask import *
import time
from Task import Task
from threading import Thread
class MyApp():
"""Small class for holding flask application
object Task()
list of all connected clients"""
def __init__(self):
self.fl = Flask(__name__)
self... |
Markdown | UTF-8 | 2,050 | 2.609375 | 3 | [
"MIT"
] | permissive | # isthemunibusy-go
This was originally a project to predict how crowded the muni trains would be, but given the current circumstances with COVID-19, I have decided to pivot this project to be a feature test admin tool.
## Features
- Create a new feature test (DONE)
- Name
- Start date
- End date
- Var... |
Shell | UTF-8 | 946 | 2.984375 | 3 | [] | no_license | #!/bin/bash
# example file. Put this into the project root folder and run.
SRC_ROOT=/nfs/masi/xuk9/singularity/thorax_combine/conda_base/src/thorax_pca
PYTHON_ENV=/home/local/VANDERBILT/xuk9/anaconda3/envs/python37/bin/python
CONFIG=${SRC_ROOT}/config/pca_conda_base.yaml
PROJ_ROOT="$( cd "$( dirname "${BASH_SOURCE[... |
Markdown | UTF-8 | 3,493 | 3.421875 | 3 | [] | no_license | ---
title: <Python><PAT> 1138 Postorder Traversal
date: 2019-09-05 22:16:24
tags:
- PAT
- 题解
cover: http://pwb80dtf4.bkt.clouddn.com/PAT-cover.webp
categories: PAT
top_img: http://pwb80dtf4.bkt.clouddn.com/PAT-top.webp
description: 前序中序转后序
---
# 题目
Suppose that all the keys in a binary tree are distinct positive inte... |
Java | UTF-8 | 950 | 2.203125 | 2 | [] | no_license | package com.engulf.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpSession;
@Controller
public class LoginController {
@RequestMapping("/toLogin")
public String toLogin(String username, Stri... |
Markdown | UTF-8 | 14,371 | 3.171875 | 3 | [
"MIT"
] | permissive | # My People
## Introduction
One of my new favourite features in Windows is: My People. My People makes it easy to stay connected with contacts you often engage with. My People gives users the ability to pin their favourite contact to the task bar. Users can interact with their contact through voice, video, and text fr... |
C | UTF-8 | 1,119 | 2.609375 | 3 | [] | no_license | /*------------------------------------------------------------------------------------------------------------------
-- HEADER FILE: translat.h - This file provides all related to the translation of an input buffer received from a
-- pipe in response to the input of special characters, de... |
Markdown | UTF-8 | 465 | 2.84375 | 3 | [] | no_license | ### svelte.parse
```js
ast: object = svelte.parse(
source: string,
options?: {
filename?: string,
customElement?: boolean
}
)
```
`parse` 函数用来解析一个组件并返回它的抽象语法树。
```js
const svelte = require('svelte/compiler');
const ast = svelte.parse(source, { filename: 'App.svelte' });
```
与编译用的 `generate: false` 选项不同的是,这个... |
Java | UTF-8 | 3,190 | 2.46875 | 2 | [] | no_license | // RTEFX - Rich Text Editor for JavaFX
// Copyright (C) 2003, 2018 Robert Lichtenberger
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of t... |
Markdown | UTF-8 | 784 | 2.65625 | 3 | [] | no_license | # Sentiment Analysis and Feature selection on a Large Movie Review Dataset.
* The source of the dataset is:[dataset_link] (http://ai.stanford.edu/~amaas/data/sentiment/)
* Both train and test dataset contains 25000 reviews respectively.
### The notebook covers the following topics:
* Read file from our path to loca... |
Markdown | UTF-8 | 834 | 3.140625 | 3 | [] | no_license | ## 常用Date/Time函数
| 函数 | 描述 |
| ------------------------------------------------------------ | -------------------------------------------------- |
| [date_default_timezone_set()](https://www.w3school.com.cn/php/fu... |
Java | UTF-8 | 1,711 | 2.84375 | 3 | [] | no_license | package com.example.nicolascarraggi.trgrd.rulesys;
/**
* Created by nicolascarraggi on 26/04/17.
*
* An event that occurs when an input action happens on a device.
*
*/
public class InputActionEvent extends Event {
private InputAction inputAction;
private String type;
// SKELETON constructor
pu... |
C | UTF-8 | 539 | 2.671875 | 3 | [] | no_license | #define _CRT_SECURE_NO_DEPRECATE
#include "shared.h"
void InitializeTrace(){
int i = 0;
for (i = 0; i < TRACE_SIZE; i++){
trace[i].CDB = -1;
trace[i].execution = -1;
trace[i].issued = -1;
trace[i].valid = 0;
memset(trace[i].instruction, 0, 16);
}
}
void PrintTrace(){
int i = 0;
FILE *dest = FileOpen... |
C# | UTF-8 | 2,857 | 2.84375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Windows.UI.Popups;
using App1.Common;
using App1.Model;
using App1.View;
namespace App1.View_Model
{
class EventViewModel : No... |
Java | UTF-8 | 7,508 | 1.679688 | 2 | [] | no_license | package com.bw.movie.activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformatio... |
JavaScript | UTF-8 | 1,177 | 2.78125 | 3 | [] | no_license | var dateApp = {
init: function() {
console.log('init js date');
/********************************* AU CHARGEMENT DE LA PAGE *********************************/
// Transforme le format des dates
$(document).ready(function () {
// Transforme le format des da... |
Java | UTF-8 | 7,287 | 2.203125 | 2 | [] | no_license | package com.example.batchdataapp.config;
import com.example.batchdataapp.entity.Person;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframew... |
SQL | UTF-8 | 474 | 3.09375 | 3 | [] | no_license | /* Formatted on 12/2/2015 4:03:08 (QP5 v5.252.13127.32867) */
SELECT SUM (plan) plan,
SUM (fakt) / 1000 fakt,
SUM (plan_ng) plan_ng,
SUM (fakt_ng) / 1000 fakt_ng,
SUM (plan_coffee) plan_coffee,
SUM (fakt_coffee) / 1000 fakt_coffee
FROM networkplanfact npf
WHERE npf.YEAR = :y
... |
C# | UTF-8 | 5,012 | 2.671875 | 3 | [
"MS-PL",
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | permissive | using System.Collections.Generic;
using System.Runtime.Versioning;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace Demo.WinForms.WindowsDX.Test;
[SupportedOSPlatform("windows7.0")]
public class Engine
{
private const int PaddleWidth = 50;
... |
Python | UTF-8 | 1,114 | 3.0625 | 3 | [] | no_license | import pandas as pd
class Model(object):
"""Abstract class for models. Every model should at least define:
- identifier: ID of the model, as string (eg.: xgboost)
- train: train the model and define self.model
- predict: predict tournament data and save it to file"""
def __init__(self,... |
Python | UTF-8 | 2,414 | 3.8125 | 4 | [] | no_license | #!/usr/bin/python
# coding:utf-8
"""
@author: yyhaker
@contact: 572176750@qq.com
@file: 买卖股票的最佳时机III(可以购两次).py
@time: 2019/8/16 21:44
"""
class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
# 思路:双指针,维护两个指针i, j;i之前的买一次,i-j买一次
... |
Markdown | UTF-8 | 2,684 | 3.3125 | 3 | [] | no_license | +++
title = "2020-11-16: English"
date = 2020-11-16T10:37:43+09:00
tags = ["English self-learning"]
+++
## Review 11/16 lesson: Discussion
[Mental Models and Making Decisions You Don’t Regret](https://dariusforoux.com/mental-models/)
### Notes
1. Answer compound questions respectively and concisely.
2. Use preposit... |
Java | UTF-8 | 1,139 | 3.28125 | 3 | [] | no_license | package cn.itcast.multithread;
import java.util.Random;
/**
* Created by Admin on 8/31/2016.
* <p>
* 使用ThreadLocal来改写ThreadScopeSharedData
*/
public class ThreadLocalTest {
private static ThreadLocal<Integer> myThreadLocal = new ThreadLocal();
private static class A {
void printData() {
... |
Java | UTF-8 | 7,550 | 2.515625 | 3 | [] | 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 studentsSchoolOfArts;
import studentSchoolOfComputing.*;
import com.jfoenix.controls.JFXCheckBox;
import classes.DatabaseConne... |
Markdown | UTF-8 | 2,760 | 2.890625 | 3 | [] | no_license | ---
date: 2021-05-18 13:00
title: What’s Next? - May 2021
description:
---
You might just have finished reading our [progress report from the last three months](/posts/progress-update-may-2021/). Now it’s time to talk about what we’re planning for the next few months!
Like last time, this is a list of areas that we’l... |
Java | UTF-8 | 3,172 | 1.789063 | 2 | [] | no_license | package com.tencent.mm.plugin.ipcall.a.a;
import com.tencent.mm.bp.b;
import com.tencent.mm.protocal.c.azf;
import java.util.Iterator;
import java.util.LinkedList;
public final class c {
public String fHE;
public String fJt;
public String fqG;
public int jlI;
public LinkedList<azf> krz = new Linke... |
PHP | UTF-8 | 4,117 | 2.65625 | 3 | [] | no_license | <?php
abstract class Df_Core_Block_Element extends Df_Core_Block_Template {
/**
* @override
* @return string
*/
public function getArea() {return Df_Core_Const_Design_Area::FRONTEND;}
/** @return string */
public function getCssClassesAttributeAsString() {
if (!isset($this->{__METHOD__})) {
$this->{__ME... |
Python | UTF-8 | 12,009 | 2.984375 | 3 | [] | no_license | import os
import re
from functools import reduce
DIRECTIONS = ['north', 'south', 'east', 'west']
OPPOSITES = {'north': 'south', 'south': 'north', 'east': 'west', 'west': 'east'}
class TileMosaic():
def __init__(self, tiles):
self.tiles = tiles
self.mosaic = None
def get_tile_by_id(self, id):
... |
Markdown | UTF-8 | 3,854 | 2.734375 | 3 | [] | no_license | # Image/Video Grey-to-Color
# Introduction
In image colorization, goal is to produce a colored image given a grayscale input image. This
problem is challenging because it is multimodal -- a single grayscale image may correspond to
many plausible colored images. As a result, traditional models often relied on significan... |
Python | UTF-8 | 2,522 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | # Copyright 2014, 2015 Rogier van Dalen.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
Python | UTF-8 | 5,120 | 3.21875 | 3 | [
"MIT"
] | permissive | import unittest
import pymatrices as pm
class testArray(object):
def __init__(self, value, result):
self.value = value
self.result = result
verticalVector = testArray([[1]
,[2]
,[3]
,[4]], [4, 1])
horizontalVector = test... |
JavaScript | UTF-8 | 1,670 | 2.5625 | 3 | [] | no_license | const {
beforeAll,
afterAll,
describe,
test,
expect,
} = require('@jest/globals');
const { connect, close } = require('./db');
const { getLatest, add, remove } = require('../controller/best');
beforeAll(async () => {
await connect();
});
afterAll(async () => {
await close();
});
const getSamplePhoto = ... |
Java | UTF-8 | 12,292 | 2.171875 | 2 | [
"MIT"
] | permissive | package org.ergvein;
import android.annotation.TargetApi;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.LinkProperties;
import android.net.Network;
import android.net.NetworkInfo;
import android.net.RouteInfo;
import android.os.Build;
import android.util.Log;
import java.i... |
JavaScript | UTF-8 | 268 | 3.21875 | 3 | [
"MIT"
] | permissive | // array include user
// get the name out of array by find and use the function
let arrOne = [
{id: 1, name:"pooya"},
{id: 2, name:"pari"},
{id: 3, name:"masih"},
{id: 4, name:"mohammad"}
];
let user = arrOne.find(item => item.id == 1);
alert(user.name)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.