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 | 4,492 | 2.640625 | 3 | [] | no_license | $( document ).ready(function() {
//==============================================================================
var activeItem;
function initialize() {
//-----------start variable scope for each object----------------------
var mapOptions = {
zoom: 13,
center: new google.maps.LatLng(42.139541,-87.928747)
};
... |
C++ | UTF-8 | 2,397 | 2.65625 | 3 | [] | no_license | #include "framebuffer.h"
namespace gl
{
Framebuffer::Framebuffer()
{
float quadVertices[24] = { // vertex attributes for a quad that fills the entire screen in Normalized Device Coordinates.
// positions // texCoords
-1.0f, 1.0f, 0.0f, 1.0f,
-1.0f, -1.0f, 0.0f, 0.0f,
1.0f, -1.0f, 1.0f, 0.... |
Go | UTF-8 | 3,213 | 2.78125 | 3 | [] | no_license | package dbservice
import (
"log"
dbcommon "github.com/Ankr-network/dccn-common/db"
common_proto "github.com/Ankr-network/dccn-common/protos/common"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
type DBService interface {
// Get gets a dc item by pb's id.
Get(id int64) (*common_proto.DataCenter, error)
// Ge... |
PHP | UTF-8 | 9,231 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/** ---- eapie ----
* 优狐积木框架,让开发就像组装积木一样简单!
* 解放千千万万程序员!这只是1.0版本,后续版本势如破竹!
*
* QQ群:523668865
* 开源地址 https://gitee.com/lxh888/openshop
* 官网 http://eonfox.com/
* 后端框架文档 http://cao.php.eonfox.com
*
* 作者:绵阳市优狐网络科技有限公司
* 电话/微信:18981181942
* QQ:294520544
*/
namespace eapie\engine\table;
use eapie\main;... |
PHP | UTF-8 | 602 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use App\KindSport;
use Illuminate\Database\Seeder;
class KindSportSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$type_sports = [
'Футбол',
'Баскетбол',
'Бокс',
'Хокей',
... |
Swift | UTF-8 | 1,696 | 3.03125 | 3 | [
"MIT"
] | permissive | //
import RangicCore
import SwiftyJSON
class SensitiveLocations {
let SensitiveDistanceInMeters: Double = 50
static var sharedInstance: SensitiveLocations {
struct _Singleton {
static let instance = SensitiveLocations()
}
return _Singleton.instance
}
fileprivate(... |
TypeScript | UTF-8 | 422 | 3.15625 | 3 | [] | no_license | export interface IQuestion {
statement: string;
answer: string;
penalty: number;
}
export class Question implements IQuestion {
public statement: string;
public answer: string;
public penalty: number;
constructor(
statement?: string,
answer?: string,
penalty?: number,
) {
this... |
Java | UTF-8 | 8,951 | 2.234375 | 2 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.chl.LifeOfAGoblin.jME3.factory;
import com.jme3.bullet.collision.shapes.BoxCollisionShape;
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
import com.jme3.bullet.control.CharacterControl;
impo... |
Python | UTF-8 | 2,736 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | #!/usr/bih/env python
from ..signalfd import Signalfd as _Signalfd
from collections import deque as _deque
import asyncio as _asyncio
class Signalfd_async:
def __init__(self, signals=[], flags=0, *, loop=None):
self._loop = loop or _asyncio.get_event_loop()
self._signalfd = _Signalfd(signals, flags... |
Python | UTF-8 | 2,426 | 3.125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 5 22:13:34 2016
@author: Yulia PC
Графики зависимостей уровня употребления
алкогольных напитков для девушек и парней по возрасту
в рабочие дни
"""
import pylab
pylab.xkcd()
import matplotlib.pyplot as plt
import seaborn
import pandas as pd
# открываем файл с данными
d... |
C# | UTF-8 | 954 | 3.375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeEval
{
class DeltaTime
{
static void CalcTimeDiff(DateTime s1, DateTime s2)
{
long diff = Math.Max(s1.Ticks, s2.Ticks) - Math.Min(... |
Java | UTF-8 | 30,325 | 2.296875 | 2 | [] | no_license | package org.cougaar.cpe.unittests;
import org.cougaar.cpe.model.*;
import org.cougaar.cpe.mplan.ManueverPlanner;
import org.cougaar.cpe.splan.SPlanner;
import org.cougaar.cpe.planning.zplan.BNAggregate;
import org.cougaar.cpe.planning.zplan.ZoneWorld;
import org.cougaar.cpe.planning.zplan.ZonePlanner;
import org.couga... |
Python | UTF-8 | 1,721 | 3.28125 | 3 | [] | no_license | import unittest
from classes import State
class StateTest(unittest.TestCase):
def test_access(self):
s = State()
s.field = 3
self.assertEqual(s.field, 3)
def test_nested_access(self):
s = State()
s.field = State()
s.field.subfield = 3
self.assertEqual(s... |
Python | UTF-8 | 134 | 3.90625 | 4 | [] | no_license | #Accept an integer as input. Find the quotient when 3^{35} is divided by x and print the output.
x=int(input())
y=(3**35)
print(y//x) |
C# | UTF-8 | 2,431 | 2.921875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
namespace CryptoExchange.Net
{
public static class ExtensionMethods
{
public static void AddParameter(this Dictionary<string, object> parameters, string key, string value)
... |
C# | UTF-8 | 329 | 2.671875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GameOfDice
{
class Dice
{
public int value;
public void rollDice()
{
Random rnd = new Random();
this.value = rnd.Next(1, 6);
}
... |
Java | UTF-8 | 1,517 | 3.96875 | 4 | [] | no_license | class Collar
{
}
class Dog
{
Collar c; // instance var
String name; // instance var
public Dog(String name)
{
this.name = name;
}
public static void main(String [] args)
{
Dog d; // local var: d
d = new Dog("Lassie");
d.go(d);
}
void go(Dog dog) // local var: dog
{
c = new Collar();
do... |
Java | UTF-8 | 388 | 1.773438 | 2 | [] | no_license | package th.go.excise.ims.ia.vo;
public class Int0804HeaderTable {
private String gfDepositCode;
private String area;
public String getGfDepositCode() {
return gfDepositCode;
}
public void setGfDepositCode(String gfDepositCode) {
this.gfDepositCode = gfDepositCode;
}
public String getArea() {
return are... |
Java | ISO-8859-1 | 8,533 | 2.453125 | 2 | [] | no_license | package Pacman.game;
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferStrategy;
import java.util.ArrayList;
import java.util.Date;
import Pacman.creatures.Ghost;
import Pacman.creatures.Player;
im... |
JavaScript | UTF-8 | 3,707 | 2.78125 | 3 | [
"MIT"
] | permissive | "use strict"
const Zet = require('./zet')
// Zet.profile({
// scope : exports
// });
var ZetTestClass = Zet.declare({
// superclass : null,
defineBody: function (self) {
// Constructor Function
self.construct = function construct(id) {
self.id = id
}
}
})
var ZetTest... |
Java | UTF-8 | 834 | 2.46875 | 2 | [
"Apache-2.0"
] | permissive | package org.adligo.xml_io.shared.schema;
public class AnyMutant implements I_Any {
private String minOccurs;
private String maxOccurs;
public AnyMutant() {
}
public AnyMutant(I_Any other) {
minOccurs = other.getMinOccurs();
maxOccurs = other.getMaxOccurs();
}
/* (non-Javadoc)
* @see org.adligo.xm... |
Python | UTF-8 | 538 | 3.375 | 3 | [] | no_license | import sys
import calendar
def main(year):
cal = calendar.Calendar(year)
cal.mark_days(1, [13,21])
cal.mark_days(2, [1,28])
cal.mark_days(4, [21], '\u263a')
cal.mark_days(10, [31], 'H')
cal.set_month(1)
cal.display_calendar()
cal.set_month(2)
cal.display_calendar()
cal.set_mo... |
Java | UTF-8 | 904 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | package ru.job4j.array;
import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
/**.
* class for selection sort array (Bubble sort)
* @author
* @version $Id$
* @since 0.1
*/
public class BubbleSortTest {
/**.
* test {1, 2, 3, 4, 5} to {5, 4, 3, 2, 1}
... |
Java | UTF-8 | 4,101 | 1.742188 | 2 | [] | no_license | package poly.entity;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@Entity
public class PHONG {
@Id
private int ID_PHONG;
@ManyToOne
@JoinColumn(name = "ID_LP")
private LOAI_PHONG loai_phong;
private String TEN_PHONG;
p... |
Python | UTF-8 | 377 | 3.625 | 4 | [] | no_license | #CREAR UNA FUNCION QUE CALCULE EL PROMEDIO DE NOTAS DE UN ARREGLO.
def promedioNotas(arreglo):
avg = 0.0
suma = 0.0
for c in range(len(arreglo)):
suma = arreglo[c] + suma
avg = suma / len(arreglo)
return avg
notas = [5.5, 6.6, 7, 2.5, 4.5, 5.3, 3.4, 5.8, 7, 1.1, 2.3]
res = promedioNotas(no... |
C++ | UTF-8 | 888 | 3.3125 | 3 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
void swap(int &x, int &y) {
int tmp = x;
x = y;
y = tmp;
}
void backtracking(vector<int>& nums, vector<vector<int> > &ans, int k, int n) {
if (k == n) {
ans.push_back(nums);
return;
}
for (int i = k; i < n; i++) {
... |
C | UTF-8 | 373 | 3.796875 | 4 | [] | no_license | #include <stdio.h>
int main()
{
int n, o, rem, r= 0;
printf("Enter a three digit integer: ");
scanf("%d", &number);
o= n;
while (o!= 0)
{
rem= o%10;
r+= rem*rem*rem;
o /= 10;
}
if(r== n)
printf("%d is an Armstrong number.",n);
else
printf("... |
C++ | UTF-8 | 3,661 | 2.546875 | 3 | [] | no_license | //
// main.cpp
// cplusplus
//
// Created by soonhyuk on 2020/01/22.
// Copyright © 2020 soonhyuk. All rights reserved.
//
#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <utility>
#include <string.h>
#include <algorithm>
#include <stdio.h>
using namespace std;
vector<pair<int,int>... |
Java | UTF-8 | 1,604 | 2.359375 | 2 | [] | no_license | package com.github.valentin.fedoskin.fb2me.desktop;
import javafx.concurrent.Task;
import javafx.concurrent.WorkerStateEvent;
import javafx.event.EventHandler;
import javafx.util.Callback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.valentin.fedoskin.fb2me.desktop.shell.Shell... |
Markdown | UTF-8 | 602 | 3 | 3 | [
"MIT"
] | permissive | # db-truncate
db-truncate truncates MySql database tables to specified number of rows. It's useful for
developing purposes when you want to reduce database size and preserve its structure.
### Installation
db-truncate requires PHP >= 5.3
```
composer global require idealogica/db-truncate:~1.0.0
```
### Usage
```... |
Java | UTF-8 | 1,817 | 3.046875 | 3 | [] | no_license | package shapes;
import java.util.LinkedList;
import impl.Calc;
import impl.CalcTuple;
import impl.MyMaterial;
import impl.MyPoint3D;
import impl.MyRay;
public class MySphere implements MyShape{
private LinkedList<MyPoint3D> keyPoints; // sphere center
private MyMaterial material; // material
private float radius... |
Markdown | UTF-8 | 1,049 | 2.859375 | 3 | [] | no_license | # Frontend Mentor - 3-column preview card component solution
This is a solution to the [3-column preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/3column-preview-card-component-pH92eAR2-). Frontend Mentor challenges help you improve your coding skills by building realistic ... |
Java | UTF-8 | 353 | 3.8125 | 4 | [] | no_license | package com.dsa.recursion;
public class FibonacciSeries {
public static void main(String[] args) {
System.out.println(printFibonacciNumber(6));
// 0 1 1 2 3 5 8 13 21 34
}
private static int printFibonacciNumber(int i) {
if (i <= 1) {
return i;
}
return printFibonacciNumber(i - 1) + prin... |
Ruby | UTF-8 | 469 | 2.796875 | 3 | [
"MIT"
] | permissive | module OptionsManager
def require_options(options, required_params)
missing_args = []
required_params.each do |param|
missing_args << param.to_s if options[param].nil?
end
raise ArgumentError, "Missing required argument: #{missing_args.join(',')}" unless missing_args.empty?
end
def validat... |
C++ | UTF-8 | 3,180 | 2.6875 | 3 | [] | no_license | #include "TriangularObstacleModel.h"
#include "../../../../../common/definitionlevels/DefinitionLevel3.h"
#include "../../../../../common/Definition.h"
#include "../../../../../utils/physics/CustomPhysicsBody.h"
const int TriangularObstacleModel::MOVE_VERTICAL = 0;
const int TriangularObstacleModel::MOVE_HORIZONTAL = ... |
Java | UTF-8 | 863 | 2.984375 | 3 | [] | no_license | import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import java.util.Objects;
@AllArgsConstructor
@Setter
@Getter
public class Match implements Comparable<Match> {
private long size;
private String name;
public int compareTo(Match o) {
if (this.getSize() == o.getSize()) ... |
C# | UTF-8 | 2,402 | 3.921875 | 4 | [] | no_license | using System;
using System.IO;
using System.Collections.Generic;
namespace AlgorithmPrograms
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welcome To Algorithm Programs!");
Console.WriteLine("\nEnter 1-to Calculate Permutation of a string using... |
Java | UTF-8 | 97 | 1.6875 | 2 | [] | no_license | package org.hcj.spring.Work.Automation;
public interface IStudent4 {
public void read4();
}
|
Python | UTF-8 | 695 | 2.65625 | 3 | [
"MIT"
] | permissive | __author__ = 'Guorong Xu<g1xu@ucsd.edu>'
import os
import sys
import subprocess
from multiprocessing import Pool
def upload_file(input_file):
print input_file
s3_location = ""
subprocess.call(["aws", "s3", "cp", input_file, s3_location])
if __name__ == '__main__':
work_dir = sys.argv[1]
file_ex... |
Python | UTF-8 | 766 | 3.03125 | 3 | [] | no_license | # https://codeforces.com/contest/722/problem/A
#coding: utf-8
time_format1 = raw_input()
time_format2 = raw_input().split(":")
aux = ""
if (time_format1 == "12"):
if(int(time_format2[0]) > 12):
if(time_format2[0][1] == "0"):
aux += "1"
else:
aux += "0"
aux += time_format2[0][1]
elif(int(time_for... |
C++ | UTF-8 | 2,654 | 2.609375 | 3 | [] | no_license | /*
* Security.h
*/
#ifndef SECURITY_H_
#define SECURITY_H_
#include "CommandClass.h"
#include "Mutex.h"
#include "AES.h"
namespace OpenZWave
{
class ValueBool;
class Msg;
/** \brief Implements COMMAND_CLASS_SECURITY (0x98), a Z-Wave device command class.
*/
class Security: public... |
C++ | UTF-8 | 1,442 | 2.75 | 3 | [
"MIT"
] | permissive | #ifndef __STRUCTUREAGENT_H__
#define __STRUCTUREAGENT_H__
#include "../MainAgents/BaseAgent.h"
using namespace BWAPI;
using namespace std;
/** The StructureAgent is the base agent class for all agents handling buildings. If a building is created and no
* specific agent for that type is found, the building is assign... |
JavaScript | UTF-8 | 4,669 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | 'use strict';
(function(){
$(document).ready(function(){
tableau.extensions.initializeAsync({'configure': configure}).then(function(){
const dashboard=tableau.extensions.dashboardContent.dashboard;
var selectedValues=[];
try{
dashboard.getParametersAsync(... |
Java | UTF-8 | 1,591 | 3.6875 | 4 | [] | no_license | package exams.n0;
import java.util.Arrays;
public class N88 {
public static void main(String[] args) {
int[] nums1 = new int[]{3,5,7,9, 0, 0, 0, 0, 0, 0,0,0};
int[] nums2 = new int[]{2,4,6,8,10,12,14};
new N88().merge(nums1, 4, nums2, 7);
System.out.println(Arrays.toString(nums1));
int[] nums = {45,23,... |
C++ | UTF-8 | 1,416 | 2.625 | 3 | [
"BSD-2-Clause"
] | permissive | ///////////////////////////////////////////////////////////
// Registration.h
// Implementation of the Class Registration
// Created on: 13-Apr-2020 2:51:39 PM
// Original author: svanausdall
///////////////////////////////////////////////////////////
#if !defined(EA_5144F149_491F_42ae_8A59_8CBC9AE58D6A__INCL... |
JavaScript | UTF-8 | 373 | 2.984375 | 3 | [] | no_license | window.addEventListener('load',inicializarEventos,false);
function inicializarEventos()
{
var ob1=document.querySelector("#boton1");
ob1.addEventListener('click',presion,false);
}
function presion(e)
{
var ob1=document.querySelector(".mensaje");
ob1.style.backgroundColor='#ff0';
var ob2=document.querySelect... |
C++ | UTF-8 | 3,051 | 3.3125 | 3 | [] | no_license | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const long long MIN_VALUE = -100000000;
struct SegTree {
int vl = 0;
int vr = 0;
long long data = 0;
long long setted = MIN_VALUE;
SegTree *left_child = nullptr;
SegTree *right_child = nullptr;
... |
Markdown | UTF-8 | 2,019 | 2.5625 | 3 | [
"MIT"
] | permissive | <h2 align="center"> Dog_Breed_Classifier </h2>



<h3>Abstract: </h3>
<p>The ... |
Markdown | UTF-8 | 1,868 | 2.984375 | 3 | [] | no_license | <h1> Django Based URL Shortener</h1>
<p>A Django web based application which takes a url and shortens the given url in from of 7.0.0.1:8000/{Some_Short_Url}. When the short url is generated the user can click on the given short url or can copy anc paste that url in the new tab.</p>
<h2>How it works</h2>
<p>
The url sh... |
Java | UTF-8 | 3,928 | 1.984375 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2021 ThoughtWorks, Inc.
*
* 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 agr... |
C | UTF-8 | 544 | 3.734375 | 4 | [] | no_license | #include <stdio.h>
int main(int argc, char** argv) {
// This is a signle line comment
// It will be ignored by the compiler
// Even if there's code after it!
// int a = 420;
/* This is a block comment
* You don't _need_ to format it like this,
* but I like it this way because it looks pr... |
Ruby | UTF-8 | 1,296 | 2.90625 | 3 | [
"MIT"
] | permissive | module MdnQuery
# An entry of the Mozilla Developer Network documentation.
class Entry
# @return [String]
attr_reader :title, :description, :url
# Creates a new entry.
#
# @param title [String] the title of the entry
# @param description [String] a small excerpt of the entry
# @param ur... |
Java | UTF-8 | 985 | 2.109375 | 2 | [] | no_license | package my.rinat.wsserver.boundary;
import lombok.RequiredArgsConstructor;
import my.rinat.country.gen.GetCountryRequest;
import my.rinat.country.gen.GetCountryResponse;
import my.rinat.wsserver.domain.country.Countries;
import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.s... |
Python | UTF-8 | 384 | 2.953125 | 3 | [] | no_license | f=open("archivo.txt","w")
f.write("32 espacio \n")
f.write("33 !\n")
f.write("34 '' \n")
f.write("35 # \n")
f.write("36 $ \n")
f.write("37 % \n")
f.write("38 & \n")
f.write("39 ' \n")
f.write("40 ( \n")
f.write("41 ) \n")
f.write("41 * \n")
f.write("43 + \n")
f.write("44 , \n")
f.close()
f=open("... |
C++ | UTF-8 | 3,166 | 3.609375 | 4 | [] | no_license | #include <iostream>
#include <string>
class DataMahasiswa
{
private:
std::string nama;
char nim[15];
public:
void inputData()
{
std::cout << "\n";
inputNama();
inputNim();
std::cout << "\n";
}
void inputNama()
{
std::cout << "Input Nama Anda : ";
... |
PHP | UTF-8 | 1,055 | 3.421875 | 3 | [] | no_license | <?php
namespace model;
class Boat
{
private $id;
private $type;
private $length;
private $owner;
public function __construct($type, $length, $ownerID, $id = 0){
$this->SetType($type);
$this->SetLength($length);
$this->SetOwner($ownerID);
$this->SetID($id);
}
... |
Markdown | UTF-8 | 926 | 2.671875 | 3 | [] | no_license | ### Naive Bayes Classifier
The file presents Naive Bayes Classifier written by me.
The class was testes with data sets taken from website: [Machine Learning Depository](https://archive.ics.uci.edu/ml/datasets.html)
The algorithm is good for classification problem with categorital data.
Exemplary results:
* Balloon d... |
Python | UTF-8 | 525 | 3.15625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
# 標準入力を取得
N, X, M = list(map(int, input().split()))
# 求解処理
def f(x: int, m: int) -> int:
return x**2 % m
A = [X]
s = {X}
i = 0
while True:
A_next = f(A[-1], M)
if A_next in s:
i = A.index(A_next)
break
else:
A.append(A_next)
s.add(A_next)
loo... |
C# | UTF-8 | 10,539 | 2.875 | 3 | [] | no_license | using UnityEngine;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Contains information about a city and its contents.
/// Also contains a reference to its neighbors and the
/// GameObject that represents it.
/// </summary>
public class City : Place
{
// Tracks adjacent cities
private L... |
Markdown | UTF-8 | 3,930 | 2.84375 | 3 | [
"MIT"
] | permissive | # 설정 파일 만들기
[출처](https://www.wagavulin.jp/entry/2011/11/27/222654 )
## 조건 있는 컴파일 지정 방법
```
#include <cstdio>
int main(){
#if USE_FEATURE_X
printf("use feature-x\n");
#else
printf("do not use feature-x\n");
#endif
return 0;
}
```
이 코드는 USE_FEATURE_X 값에 의해 컴파일 결과가 달라질 것이지만, 이 값을... |
Java | UTF-8 | 4,536 | 2.40625 | 2 | [] | no_license | package pers.hyu.jwtdemo.share.util;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailService;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder;
import com.amazonaws.services.simpleemail.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import pers.hyu.jwt... |
Java | UTF-8 | 6,341 | 2.5625 | 3 | [] | no_license | package com.gempukku.lotro.game;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class LotroCardBlueprintLibrary {
private String[] _packageNames =
... |
Java | UTF-8 | 6,550 | 3.390625 | 3 | [] | no_license | /**
* Program: NFLPlayer
* File: NFLPlayer.java
* Summary: Programs creates a abstract NFLPlayer class.
* Author: Jason E. Borum Date:
* December 24, 2017
**/
abstract class NFLPlayer { // Begin abstract NFL Player Class
// Declaring NFL Player Instance Variables
private String playerNameFirst; // ... |
C++ | UTF-8 | 992 | 2.53125 | 3 | [
"MIT"
] | permissive | #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
using namespace std;
int main()
{
//freopen("c:\\cygwin64\\home\\xs\\mygit\\acm\\in", "r", stdin);
//insert code
int t;
cin>>t;
while(t--)
{
int n,m,k;
cin>>n>>m>>k;
int ar[12][12]={0};
char re[12][12]={0};
int x... |
C++ | WINDOWS-1251 | 8,523 | 3.125 | 3 | [] | no_license | #include "spinlock.h"
size_t spinlock::count;
void spinlock::lock()
{
//.
while (f.test_and_set(std::memory_order_relaxed))//// true
{
// std::cout<<"\nlock...";
m_write_entered = 1;
}
//std::cout << "\nlock once";
}
void spinlock::unlock()
{
f.clear(); // false
//st... |
C++ | UTF-8 | 2,099 | 3.25 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <functional>
#include <iterator>
#include <utility>
using namespace std;
class Solution {
public:
string shortestCompletingWord(strin... |
C | UTF-8 | 1,476 | 4.03125 | 4 | [] | no_license | #include <stdio.h>
#define DATA_SIZE 8
void ShowData(int num[], int n);
void BubbleSort(int num[], int n);
void InsSort(int num[], int n) ;
// データを表示する関数
void ShowData(int num[], int n)
{
int i;
for(i=0; i < n; i++) {
printf("%d ", num[i]);
}
printf("\n");
}
void BubbleSort(int x[ ], int n)
{
int i, j... |
PHP | UTF-8 | 1,192 | 3.171875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace XonneX\AdventOfCode\Y2020\Solutions\Day2;
use PHPUnit\Framework\TestCase;
class Day2Test extends TestCase
{
public function testSolvePartOneExample(): void
{
$day2 = new Day2();
/** @noinspection SpellCheckingInspection */
$day2->setDebugInpu... |
Java | UTF-8 | 2,449 | 2.53125 | 3 | [] | no_license | package com.example.exam_set1;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class Set_7_second extends AppCompatActivity {
@... |
Java | UTF-8 | 324 | 1.6875 | 2 | [] | no_license | /*
* Decompiled with CFR 0_129.
*/
package org.apache.http.auth;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public enum AuthProtocolState {
UNCHALLENGED,
CHALLENGED,
HANDSHAKE,
FAILURE,
SUCCESS;
private AuthProtocolState() {
}... |
JavaScript | UTF-8 | 4,712 | 2.71875 | 3 | [] | no_license | import http from 'http';
import fs from 'fs';
import {join} from 'path';
import pipe from './pipe';
import Router from './Router';
let server = http.createServer();
// fs.readFile('./assets/img/goo.png', (err, data) => {
// if (err) {
// throw err;
// }
// console.log('data gambar !!', data);
// });
let du... |
C++ | UTF-8 | 1,071 | 2.640625 | 3 | [] | no_license | #pragma once
#include <functional>
#include <condition_variable>
#include <mutex>
#include "Types.hpp"
#include "Work.hpp"
class ParIter;
class ParIterExecutor {
public:
using Func = std::function<void(uint64 value)>;
ParIterExecutor(ParIter& parIter, const Func& func, uint64 start, uint64 end)
... |
Java | UTF-8 | 342 | 3.078125 | 3 | [] | no_license | import java.util.*;
public class LinkedListTest
{
public static void main(String[] args)
{
LinkedList ll = new LinkedList();
ll.offer("Alex");
ll.offer("Bob");
ll.offer("Catalina");
System.out.println(ll);
ll.offerLast("Dick");
System.out.println(ll);
ll.offerFirst("Easbella");
System.ou... |
Shell | UTF-8 | 655 | 2.953125 | 3 | [] | no_license | #!/bin/bash
RPCLIST="discover fan verify user modify limit config"
SPECLIST="share"
function gen_rpc()
{
for srv in $RPCLIST; do
echo $srv
protoc --go_out=plugins=grpc:../proto/$srv/ ../proto/$srv/$srv.proto -I../.. -I../proto/$srv
done
}
function gen_spec()
{
for srv in $SPECLIST; do
... |
Ruby | UTF-8 | 304 | 3.546875 | 4 | [] | no_license | name_age ={"ajay"=>23,"Kalyan"=>25,"naveen"=>23}
puts name_age.keys
puts name_age.values
puts name_age.has_key?("ajay")
puts name_age.select {|k,v| v == 25}
puts name_age.select {|k,v| k=="ajay"}
str ="this is a string"
puts s=String.new(str)
puts name_age.inspect
puts name_age.rehash |
SQL | UTF-8 | 5,187 | 3.40625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 10.1.21-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.4.0.5125
-- ------------------------------------------------... |
Java | UTF-8 | 570 | 3.421875 | 3 | [] | no_license | package com.skilldistillery.blackjack;
public class Dealer extends BlackJackHand implements ShowHand {
public Dealer() {}
// Shows one card face and one blank card.
public String toString() {
String showCards = "" + cards.get(0);
return showCards;
}
@Override
// The interface method shows full had when ne... |
C++ | UTF-8 | 1,124 | 2.640625 | 3 | [] | no_license | //
// compiler.cpp
// CARM-Compiler
//
// Created by Ollie Ford on 01/03/2015.
// Copyright (c) 2015 OJFord. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <stdexcept>
#include <string>
#include "invoc-args.h"
#include "parser/parser.h"
int main(const int argc, const char* argv[]){
Invoc... |
C++ | UTF-8 | 1,147 | 2.703125 | 3 | [
"MIT"
] | permissive | //
// Window.cpp
// GorillaBeats
//
// Created by Cyrus Gao on 25/05/2019.
// Copyright © 2019 gb. All rights reserved.
//
#include "Window.hpp"
int Window::run() {
// safely convert long to int without warning
int size = static_cast<int>(this->objectVector.size());
while (!glfwWindowShouldClose(window)) {
... |
Shell | UTF-8 | 1,504 | 3.140625 | 3 | [] | no_license | #!/bin/bash
# Download Drush v3 from D.O and make it work on `drush` (OS X / Linux / *nix)
# quickly put together by stemount, adapted by KarenS
# move to home dir
cd ~
# remove current drush (if existent)
rm -rf ~/.drush/
# create drush directory (and hide it)
mkdir ~/.drush/
# move to new dir
cd ~/.drush/
# get D... |
C++ | UTF-8 | 1,914 | 2.671875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int prod, i, ind, j;
string g[100], str;
char T, NT;
string a, b;
vector <string> alpha;
vector <string> beta;
cin>>prod;
for (i = 0; i < prod; i++) cin>>g[i];
cout<<endl;
for (i = 0; i < prod; i++) {
str = g[i];
... |
Python | UTF-8 | 494 | 2.890625 | 3 | [] | no_license | import logging
# 提前进行logger的创建,模块的日志按照原始root的配置
import foo
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.info('Start reading database')
# read database here
records = {'john': 55, 'tom': 66}
logger.debug('Records: %s', records)
logger.info('Updating records ...')
# 经过上面的渲染,更改了fo... |
C++ | UTF-8 | 2,146 | 3.390625 | 3 | [] | no_license | #include <iostream>
#include "string.h"
#include <iomanip>
using namespace std;
class MyTime
{
public:
MyTime();
MyTime(int h, int m,int s):hour(h),minute(m),second(s){}
void SetTime(int hh,int mm,int ss){
hour=hh;
minute=mm;
second=ss;
}
void print_12(){
if (hour>=12)
{
zone[0]='P';
... |
C | UTF-8 | 575 | 2.953125 | 3 | [
"MIT"
] | permissive | //
// Created by James Miles on 31/08/2021.
//
#include <sys/socket.h>
#include <netdb.h>
#include <printf.h>
int main() {
int s;
struct addrinfo hints, *res;
// do the lookup - assume that 'hints' has already been filled in
getaddrinfo("www.example.com", "http", &hints, &res);
// you should do ... |
Java | UTF-8 | 1,238 | 2.75 | 3 | [] | no_license | package client.client.modele.entite;
import java.util.Objects;
public class User {
private String id;
private String pseudo;
private String pwd;
public User() {
}
public User(String pseudo, String password) {
this.pseudo = pseudo;
this.pwd = password;
}
public Use... |
Python | UTF-8 | 106,040 | 2.515625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
# IMPORTANDO LIBRERIAS NECESARIAS
from reportlab.platypus import Paragraph
from reportlab.platypus import Image
from reportlab.platypus import SimpleDocTemplate, Image
from reportlab.platypus import Spacer
from reportlab.lib.styles import getSampleStyleSheet # -> Importa clase d... |
Java | UTF-8 | 327 | 2.921875 | 3 | [] | no_license | package br.usjt.OO;
public class Cilindro extends Tridimensional{
private double volume;
public Cilindro(double raio, double altura) {
this.volume = (Math.PI * Math.pow(raio, 2)*altura);
}
public double volume() {
return volume;
}
@Override
public String toString() {
return "Cilindro";... |
C++ | UTF-8 | 3,833 | 2.59375 | 3 | [
"MIT",
"MIT-0"
] | permissive | //
// tcp.cpp
// Luves
//
// Created by leviathan on 16/5/17.
// Copyright © 2016年 leviathan. All rights reserved.
//
#include "tcpServer.h"
namespace luves {
//
//TCP Server模块
//用于新建TCP服务端
//
TcpServer::~TcpServer()
{
delete listenChannel_;
}
void TcpServer::Bin... |
Python | UTF-8 | 7,210 | 2.859375 | 3 | [] | no_license | #!/usr/bin/env python
__date__="May 3 2017"
__location__="SEH 7th Floor"
__author__="Sanjeev Sariya"
long_description="""
Take in genus name
Take in FASTA file current_Bacteria_unaligned.fa
These seqeunces are to be printed in an output directory
These sequences will be merged with previous RDP work
Remember to rem... |
Java | UHC | 2,387 | 4.3125 | 4 | [] | no_license | /*
# for(ݺ)
- ݺó Ư ʿ ϰ ó ȰǴ .
- for( ʱⰪ; ݺ ; Ѱ( );{
ݺ ( -ʱⰪ Ȱ)
}
- ʱⰪ : int count=1; int idx=0; cnt=100;
- ݺ : count < 100();, cnt > 0();, idx < 迭.length;
- : count++, cnt--, count+=2, cnt-=5
# 迭 ȿ ȰǴ for 2°
- Ϲ primitive data 迭, ü 迭
- String
names={"ȣ", "", ""};
names[0] : "ȣ" Ͱ ... |
Markdown | UTF-8 | 1,733 | 2.953125 | 3 | [] | no_license | # Deleting XDCR replications automation
Couchbase url_encoded_replication_id API creation and deletion.
I was looking a way to create and delete XDCR replications automatically via API but I didn't find any step-by-step doc.
First of all , we need to place uuid generate by API XDCR replication creation in a file while ... |
C++ | UTF-8 | 2,480 | 3.8125 | 4 | [] | no_license | /* Carlos Adiel Diaz del Cid
Carnet: DD18003
Una empresa comercializadora contrata vendedores a los cuales les paga un salaria
que va de acuerdo al total de las ventas realizadas en el mes.
realizar un programa en c++ que sistematice este procedimiento y al ingresar las
ventas de un empleado inmediatamente m... |
Markdown | UTF-8 | 1,538 | 2.953125 | 3 | [] | no_license | # Mixed Neural Style Transfer

(The image in the center is in the combined style of the images on the left and the right.)
## Description
In this project, I use an idea inspired by one of my academ... |
C# | UTF-8 | 3,068 | 3.328125 | 3 | [
"MIT",
"CC-BY-4.0"
] | permissive | // System.Net.FileWebResponse.GetResponseStream.
/* This program demonstrates the 'GetResponseStream' method of the 'FileWebResponse' class.
It creates a 'FileWebRequest' object and queries for a response.
The response stream obtained is piped to a higher level stream reader. The reader reads
256 characters ... |
C++ | UTF-8 | 2,156 | 3.25 | 3 | [] | no_license |
// COS30008 - Problem Set 7, 2019
#include "NTree.h"
#include "TreeVisitor.h"
#include <iostream>
#include <string>
using namespace std;
void testDepthFirstTraversal()
{
string A("A");
string A1("AA");
string A2("AB");
string A3("AC");
string AA1("AAA");
string AB1("ABA");
string AB2("ABB");
typedef NTree... |
JavaScript | UTF-8 | 1,122 | 3.0625 | 3 | [] | no_license | class Worker {
constructor() {
console.log('Event listeners being added');
let btn = document.getElementById('_getImages');
btn.addEventListener('click', this.getImages );
}
getImages() {
console.log('Get images here');
let url = "https://api.github.com/users";
console.log(`Fetch url ${u... |
Java | UTF-8 | 245 | 2.140625 | 2 | [] | no_license | package com.example.heuristic;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class Car {
private double width=1200;
private double height=600;
private List<Cage> cageList=new ArrayList<>();
}
|
Markdown | UTF-8 | 4,252 | 2.703125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Sub 式 (Visual Basic)
ms.date: 07/20/2015
helpviewer_keywords:
- lambda expressions [Visual Basic], sub expression
- Sub Expression [Visual Basic]
- subroutines [Visual Basic], sub expressions
ms.assetid: 36b6bfd1-6539-4d8f-a5eb-6541a745ffde
ms.openlocfilehash: d284e629ea0b0a4e9b6eb9e098612bb07c38723b
ms.sour... |
PHP | UTF-8 | 1,235 | 2.65625 | 3 | [] | no_license | <?php
namespace Awz\Note\Models;
use Illuminate\Database\Eloquent\Model;
class Note extends Model {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'notes';
/**
* The database primary key value.
*
* @var string
*/
protected $... |
C# | UTF-8 | 1,878 | 2.671875 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// This is a class to save information about the animals on the boat
/// </summary>
public class VaisseauDataManager : MonoBehaviour
{
private Dictionary<EtreVivant, int> dataModel = AnimalDataModel.GetDataModel();
v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.