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 | 496 | 2.109375 | 2 | [] | no_license | package by.it.dubatovka.project_helpdesk.java;
import by.it.dubatovka.project_helpdesk.java.beans.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
public class CmdLogout extends Action {
@Override
Action execute(HttpServletRequest req)
{
HttpSession sessi... |
JavaScript | UTF-8 | 5,389 | 3.015625 | 3 | [] | no_license | /**
* Base object that owns the events subsystem
*
* usage: after object declaration add:
* "ObjectConstructorName.prototype = new BasiinObjectPrototype ();"
* At object instantiation call addEvents(obj) where `obj` is an object that
* holds the event names eg: {onLoad:fn, onComplete:otherFn}
*
* whenever... |
JavaScript | UTF-8 | 1,031 | 2.515625 | 3 | [] | no_license | const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const departmentSchmema = mongoose.Schema({
admin_id:{
type:String,
required:true
},
department_name:{
type:String,
required:true
},
department_id:{
type:String,
unique:true,
... |
TypeScript | UTF-8 | 294 | 3.640625 | 4 | [] | no_license | interface A<T>{
T1: T
}
interface B{
T2: number
}
interface C extends A<string>, B{
T3:number[]
}
const u:C = { //u变量必须同时实现interface A, interface B, interface C
T1:'text',
T2:123,
T3: [1,2,3]
}
console.log('123')
console.log('456')
console.log('789') |
C# | UTF-8 | 1,802 | 2.96875 | 3 | [
"BSD-3-Clause"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Framework
{
using System.Web.UI;
public static class WebExtensions
{
public static T FindControlByID<T>(this Control container, string id) where T : Control
{
return container.FindC... |
Java | UTF-8 | 1,037 | 2.28125 | 2 | [] | no_license | package com.my3w.farm.activity.icamera.entity;
public class CameraEntity {
private String name;
private String uid;
private String username;
private String userpass;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
pu... |
C# | UTF-8 | 4,249 | 2.6875 | 3 | [] | no_license | using System;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading.Tasks;
namespace SamplesTestProyect.AsyncAwait
{
[TestClass]
public class AsyncAwaitTests
{
[TestMethod]
public async Task UltraSimpleAsyncTest()
... |
C# | UTF-8 | 806 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Domain
{
public class Customer
{
private int id;
private string name;
private string address;
private int zip;
private string town;
priv... |
C | UTF-8 | 421 | 3.21875 | 3 | [] | no_license | /*program to diaplay no of days in the month depending on user input*/
#include<stdio.h>
int main(){
int a;
printf("enter the no of the month");
scanf("%d",&a);
switch(a){
case 1: case 3:case 5:case 7:case 8:case 10:case 12:printf("no of days are 31");
break;
case 4:case 6:case 9:case 11:printf("no of days are 30");... |
JavaScript | UTF-8 | 1,827 | 3.46875 | 3 | [] | no_license | var parksList = document.querySelector('#parksList');
var searchBox = document.querySelector('#searchBox');
var parksPromise;
function makeParksList(data) {
data.forEach(park => {
console.log("makeParksList Ran")
var search = searchBox.textContent;
if (search === null) {
create... |
Java | ISO-8859-1 | 2,193 | 2.84375 | 3 | [] | no_license | package pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import util.Funcoes;
public class PedidoPage {
private WebDriver driver; // variavel padrao para todas as classes de paginas
public PedidoPage(WebDriver driver) { // construtor padro para todas as classes de pginas
this.driver ... |
Java | UTF-8 | 4,149 | 1.742188 | 2 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | /*******************************************************************************
* Copyright 2018 572682
*
* 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/... |
Java | UTF-8 | 296 | 2.171875 | 2 | [] | no_license | package com.mm.zb.utils;
import java.math.BigDecimal;
/**
* Creat by ZB
* 2019-02-23 0:48
*/
public class EarnUtils {
public static BigDecimal yesterdayEarn(BigDecimal b) {
BigDecimal a = new BigDecimal(3650.00);
BigDecimal c = b.divide(a, 2);
return c;
}
}
|
PHP | UTF-8 | 901 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Awethemes\Database;
use Database\Query\Builder;
use Database\Query\Grammars\MySqlGrammar;
class Grammar extends MySqlGrammar {
/**
* {@inheritdoc}
*/
public function parameter( $value ) {
if ( $this->isExpression( $value ) ) {
return $this->getValue( $value );
}
if ( is_numeric( $value... |
Java | UTF-8 | 1,074 | 2.671875 | 3 | [] | no_license | package com.examplemobileappcompany.projectprep4thread;
import android.app.Activity;
import org.greenrobot.eventbus.EventBus;
/**
* Created by admin on 8/11/2017.
*/
public class ThreadImpl extends Thread {
MainActivity activity;
public ThreadImpl(MainActivity activity){
this.activity = activity... |
Java | UTF-8 | 5,173 | 2.140625 | 2 | [] | no_license | package com.gkzxhn.gkprison.userport.activity;
import android.app.ProgressDialog;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import com.gkzxhn.gkprison.R;
import com.... |
JavaScript | UTF-8 | 1,013 | 2.671875 | 3 | [] | no_license | export function jsonParse (value) {
if (value) {
try {
return JSON.parse(value);
} catch (e) {
return null;
}
}
return value;
}
export function queryStringParse (locationSearch) {
const search = locationSearch.substring(1);
const json = '{"' + decodeURI(search).replace(/"/g, '\\"').re... |
Python | UTF-8 | 2,498 | 3.390625 | 3 | [] | no_license | print('''
*******************************************************************************
| | | |
_________|________________.=""_;=.______________|_____________________|_______
| | ,-"_,="" `"=.| |
|_______________... |
TypeScript | UTF-8 | 2,596 | 3.046875 | 3 | [
"MIT"
] | permissive | /**
* This file is part of spy4js which is released under MIT license.
*
* The LICENSE file can be found in the root directory of this project.
*
*/
import { Spy } from '../../src/spy';
const IRL = {
saveTheWorld: () => 'feed some koalas',
doWithTree: (action: string) => `${action} the tree`,
giveBana... |
Python | UTF-8 | 808 | 2.875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 27 23:01:45 2019
@author: juan
"""
import numpy as np
import os
import matplotlib.pyplot as plt
#%%
total_mediciones = []
files_list = os.listdir('.')
tiempo, davs = [], []
files_list.pop(0)
for s in files_list:
data = np.load(s)
tiempo.append(data[0])
davs... |
Java | UTF-8 | 4,037 | 2.515625 | 3 | [] | no_license | package com.exclusive.firmansp.crud;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.exclusive.firmansp.crud.domain.Siswa;
import java.util.ArrayList;
impor... |
Java | UTF-8 | 2,247 | 2.28125 | 2 | [
"MIT"
] | permissive | package jbse.algo.meta;
import static jbse.algo.Util.failExecution;
import static jbse.bc.Signatures.SUN_UNIXNATIVEDISPATCHER;
import static jbse.common.Type.binaryClassName;
import java.lang.reflect.Field;
import java.util.function.Supplier;
import jbse.algo.Algo_INVOKEMETA_Nonbranching;
import jbse.algo.StrategyUp... |
PHP | UTF-8 | 2,954 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace ReverseGeocoderCache;
class CacheClient
{
protected $cacheFrontEnd = false;
protected $dataProvider = false;
protected $profiler = false;
public function setDataProvider($dataProvider)
{
$this->dataProvider = $dataProvider;
}
public function setCacheFrontEnd($fron... |
C | UTF-8 | 1,519 | 3.109375 | 3 | [] | no_license | #include <math.h>
#include <trans.h>
#pragma function(asinf, acosf, atan2f, atanf, ceilf, expf, fabsf, floorf, fmodf, log10f, logf, powf, sinf, cosf, sinhf, coshf, sqrtf, tanf, tanhf)
float __cdecl asinf (float x) {return (float)asin((double) x);}
float __cdecl acosf (float x) {return (float)acos((double) x);... |
Java | UTF-8 | 237 | 1.828125 | 2 | [] | no_license |
package controller;
import java.util.List;
/**
*
* @author Izaquias
*/
public interface Controller {
public String salvar();
public String atualizar();
public Object buscar(Long chave);
public List listarTodos();
}
|
C++ | UTF-8 | 486 | 2.671875 | 3 | [] | no_license | #include "gamebutton.h"
GameButton::GameButton(QWidget *parent) : QPushButton(parent)
{
}
GameButton::GameButton(int x, int y, QWidget *parent) : QPushButton(parent)
{
this->setX(x);
this->setY(y);
}
GameButton::~GameButton()
{
}
void GameButton::setX(int x)
{
this->x = x;
}
void GameButton::setY(int y)... |
Markdown | UTF-8 | 886 | 2.90625 | 3 | [
"MIT",
"CC-BY-4.0"
] | permissive | ---
-api-id: M:Windows.Graphics.Imaging.PixelDataProvider.DetachPixelData
-api-type: winrt method
---
<!-- Method syntax
public byte[] DetachPixelData()
-->
# Windows.Graphics.Imaging.PixelDataProvider.DetachPixelData
## -description
Returns the internally-stored pixel data.
## -returns
The pixel data.
## -remarks... |
Java | UTF-8 | 3,943 | 2.203125 | 2 | [] | no_license | package com.androidhuman.example.navigationdrawer.basicfragments.app;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
... |
Python | UTF-8 | 831 | 3.453125 | 3 | [] | no_license | import tkinter as tk
window = tk.Tk()
window.title('my window')
window.geometry('200x200')
l = tk.Label(window, bg='yellow', width=20, text='empty')
l.pack()
canvas = tk.Canvas(window, bg='blue', height=100, width=200)
#canvas.pack()
image_file = tk.PhotoImage(file='ins.gif')
image = canvas.create_image(10, 10, an... |
Python | UTF-8 | 607 | 3.203125 | 3 | [] | no_license | """
CP1404/CP5632 Practical 10 - Wiki
"""
import wikipedia
def main():
"""Program to search Wikipedia."""
prompt = input("Enter a page title or search phrase: ")
while prompt != "":
try:
# page_title = wikipedia.page(prompt, auto_suggest=False)
page_title = wikipedia.page(... |
JavaScript | UTF-8 | 751 | 2.703125 | 3 | [] | no_license | function authControl (req, res, next) {
let data =''
req.on('data',chunk=>data+=chunk)
req.on('end',()=>{
try {
if(data) data = JSON.parse(data)
else throw 'hech narsa kiritilmadi'
let {username,password,contact,age,gender} = data
if(!username||username.length<3||username>30) throw 'invalid username... |
Python | UTF-8 | 2,401 | 2.953125 | 3 | [] | no_license | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("FileName", help = "Name of the read file.")
parser.add_argument("Size_of_truss", help = "What kind of truss we are searching for.")
args = parser.parse_args()
graphDict = {}
with open(args.FileName) as f:
line = f.readline()
while line:
... |
Python | UTF-8 | 4,743 | 2.890625 | 3 | [] | no_license | import numpy as np
import math
print("Assignment 3.3: Decoupled Power Flow with R = X")
# Choose method
primal = 0
dual = 0
standard = 1
if primal:
print("\nPrimal method:")
elif dual:
print("\nDual method:")
elif standard:
print("\nStandard method:")
buses = np.array([1, 2, 3])
v = np.ones(3)
theta =... |
C# | UTF-8 | 5,243 | 2.984375 | 3 | [] | no_license | using System;
using System.Linq;
using Provausio.Testing.Generators.Generators.Names;
using Xunit;
namespace Provausio.Testing.Generators.Tests.UnitTests.Names
{
public class NameGeneratorTests
{
[Fact]
public void Generate_MaleNames_GeneratesMaleNames()
{
// arrange
... |
Markdown | UTF-8 | 1,807 | 2.65625 | 3 | [] | no_license | # nc-news - frontend project :newspaper:
A Reddit-style React news app.
View articles by topic or author.<br />
Sort by newest, top rated and hottest.<br />
View individual articles with more detail and comments. <br />
When logged in, user can post a comment of delete their own comments.
Hosted project [here](https... |
Markdown | UTF-8 | 1,084 | 2.6875 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: "Невозможно преобразовать аргумент "<имя_аргумента>" в числовое значение | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.technology:
- "devlang-visual-basic"
ms.topic: "article"
f1_keywords:
- "vbrArgumentNotNumeric1"
ms.assetid: 1901c4d4-abbe-462f-a450-5d907d485e94
... |
Python | UTF-8 | 566 | 3.671875 | 4 | [] | no_license | class Node:
def __init__(self,val):
self.val=val
self.next=None
def traverse(self):
node=self
while node!=None:
print(node.val)
node=node.next
def size(self):
node=self
count=0
while node!=None:
count+=1
... |
C++ | UTF-8 | 925 | 3.078125 | 3 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
void solve()
{
int no_of_elements, m;
cin >> no_of_elements >> m;
vector <int> A(no_of_elements + 1);
vector <int> frequency(m + 1);
for(int i = 1; i <= no_of_elements; i++)
{
cin >> A[i];
frequency[A[... |
JavaScript | UTF-8 | 2,225 | 2.78125 | 3 | [] | no_license | import firebase from '~/plugins/firebase' // firebaseの初期化設定ファイル
import { firestoreAction } from 'vuexfire' // vuecfireが用意しているfirestoreActionを呼び出す
// データベースの設定
const db = firebase.firestore()
const todosRef = db.collection('todos') // "collectionはtodosを使う" という設定
// ステートの定義
// todo一覧を管理するtodosを配列で定義しておく
export const sta... |
C++ | UTF-8 | 625 | 3.421875 | 3 | [] | no_license | #include <iostream>
#include <cmath>
#include <stdlib.h>
using namespace std;
float norma(float &re, float &im ){
return sqrt(re*re + im*im);
}
float angulo(float &re, float &im){
return atan2(im,re);
}
int main( int argc, char** argv ){
// Recordar que la parte real e imaginaria será pasado por parámetros d... |
Rust | UTF-8 | 1,942 | 2.859375 | 3 | [] | no_license | use std::net::{TcpStream, TcpListener};
use std::io::Write;
use std::io::Read;
use std::thread;
//use std::str::FromStr;
extern crate ore_http;
fn main() {
let listener = TcpListener::bind("127.0.0.1:8931").unwrap();
for stream in listener.incoming() {
match stream {
Ok(stream) => {
... |
SQL | UTF-8 | 443 | 3.21875 | 3 | [] | no_license | ### Schema
CREATE DATABASE IF NOT EXISTS burgers_db;
USE burgers_db;
CREATE TABLE burgers
(
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
INSERT INTO burgers (name, devoured) VALUES ('Cheese burger', FALSE);
INSERT INTO burgers (name, devoured) VA... |
JavaScript | UTF-8 | 5,183 | 2.75 | 3 | [] | no_license | // Khởi tạo mảng Post
var Post = [
{
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet... |
Markdown | UTF-8 | 1,352 | 2.9375 | 3 | [
"MIT"
] | permissive | # OoooWeeee
<p align="center">
<img src="logo.jpeg" width="200" height="200" />
</p>
#### Programming using phrases Mr.PoopyButHole Whould Say
## Example
##### Adds 2 and 5 and Displays The Result
```
oow oow eeo oow
oow oow oow oow
ooo oee oow eeo
woo wee oow oow
oow oow oow oow
oow oow ooo oee
oow oow oow oow... |
Java | UTF-8 | 1,359 | 1.859375 | 2 | [
"AGPL-3.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-commercial-license",
"AGPL-3.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package de.adorsys.opba.protocol.xs2a.service.xs2a.dto.oauth2;
import de.adorsys.opba.protocol.bpmnshared.dto.DtoMapper;
import de.adorsys.opba.protocol.xs2a.context.Xs2aContext;
import de.adorsys.xs2a.adapter.api.Oauth2Service;
import lombok.Data;
import org.mapstruct.Mapper;
import javax.validation.constraints.NotB... |
Java | UTF-8 | 1,029 | 2.34375 | 2 | [] | no_license | package com.alienlab.ziranli.service;
import com.alienlab.ziranli.domain.ExhibitionNameList;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
/**
* Service Interface for managing ExhibitionNameList.
*/
public interface ExhibitionNameListService {
/**
* Save a e... |
Python | UTF-8 | 2,823 | 2.703125 | 3 | [] | no_license |
from kivy.core.window import Window
from kivy.graphics import Rectangle
from kivy.graphics import Color
from kivy.base import EventLoop
from .locals import *
try:
import android
except:
android = False
class DummyDisplay(object):
def __init__(self, width, height):
self.width = width
self.... |
C++ | UTF-8 | 6,622 | 2.859375 | 3 | [] | no_license | #ifndef UEP_BLOCK_DECODER_HPP
#define UEP_BLOCK_DECODER_HPP
#include <forward_list>
#include <set>
#include <vector>
#include "counter.hpp"
#include "lazy_xor.hpp"
#include "log.hpp"
#include "message_passing.hpp"
#include "packets.hpp"
#include "rng.hpp"
#include "utils.hpp"
namespace uep {
/** Converter to evalua... |
C++ | UTF-8 | 1,101 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | #pragma once
#include "JackTokens.hpp"
#include <vector>
#include <sstream>
#include <string>
using namespace std;
class CompilationEngine
{
protected:
vector<JackToken*> _tokens;
int _tokenCounter = 0;
ostringstream output;
public:
CompilationEngine(vector<JackToken*> tokens)
: _tokens(tokens)
{}
void clear... |
C | UTF-8 | 815 | 2.90625 | 3 | [] | no_license | /*
** my_showmem.c for my_lib in /home/benjamin/Dropbox/func/
**
** Made by Benjamin
** Login <benjamin.solca@epitech.eu>
**
** Started on Sun Apr 2 19:47:19 2017 Benjamin
** Last update Mon Apr 17 15:36:13 2017 Benjamin
*/
#include "bs.h"
static void print_show_mem(char* str, int size)
{
int i;
my_putptr_b... |
Shell | UTF-8 | 583 | 2.734375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | #!/bin/sh
######
## Script to launch Windows NT 3.51 on QEMU without overflow errors
_INSTALLER_ISO="install.iso"
_INSTALL_DISK1="disk1.img"
_TARGET_BLOCK="/dev/adaX"
qemu-system-i386 \
-machine type=isapc \
-cpu 486 \
-boot once=a \
-m size=32M \
-k en-us ... |
Markdown | UTF-8 | 1,474 | 2.953125 | 3 | [] | no_license | # DB_project
Zadanie z kursu C++/STL (Coders School/Wrocław/luty 2019)
Projekt akademickiej bazy danych bez interfejsu dla użytkownika. Studenci i pracownicy celowo są trzymani w jednym kontenerze(vector), aby pokazać wynikające z tego problemy.
Napisz program, który będzie akademicką "bazą danych". Wymagania do 09.0... |
C# | UTF-8 | 3,310 | 2.515625 | 3 | [
"MIT"
] | permissive | using System;
using System.Diagnostics;
using System.Net.Sockets;
using Net.Remote;
namespace Megumin.Remote
{
/// <summary>
/// 安全关闭一个socket很麻烦,根本搞不清楚调用那个函数会抛出异常。
/// </summary>
public class SocketCloser
{
readonly object innerlock = new object();
public bool IsDisconnecting { get... |
Java | UTF-8 | 145 | 2.15625 | 2 | [] | no_license | package ItemiComanda;
public class PutInBottle implements Pachet
{
@Override
public String pachet() {
return "In sticla";
}
}
|
C++ | UTF-8 | 2,533 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | #include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
#include <eosiolib/transaction.hpp>
#include <eosiolib/crypto.h>
#include <string>
namespace Oasis {
using namespace eosio;
using std::string;
class Players : public contract {
using contract::contract;
public:
Playe... |
Python | UTF-8 | 8,783 | 2.59375 | 3 | [] | no_license | #-*-coding:utf-8-*-
# author: by chenzhen
# =============================================================================================
from tkinter import *
import tkinter
import tkinter.filedialog
import os
import tkinter.messagebox
from PIL import Image, ImageTk
from tkinter import ttk
import deepdre... |
Java | UTF-8 | 4,340 | 2.640625 | 3 | [] | no_license | package com.focaplo.ishout;
import java.util.logging.Logger;
public class MessageQueue {
private static final Logger log = Logger.getLogger(MessageQueue.class.getName());
public static int defaultSize = 1000;
public long totalMessage=0;
public long getTotalMessage() {
return totalMessage;
}
public voi... |
Shell | UTF-8 | 361 | 2.578125 | 3 | [
"MIT"
] | permissive | #!/bin/bash
echo "Installing Spotify..."
# Add the repository
add-repo "deb http://repository.spotify.com stable non-free"
# Add the repository signing key to be able to verify downloaded packages
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886
# Update list of available packages
apt-upda... |
Python | UTF-8 | 164 | 3.5 | 4 | [] | no_license | #n_dice task
a = input ("Please enter the number dice's sides: ")
b = int(a)
from random import randint
dice = randint (1, b)
print ("You have thrown:")
print(dice) |
Python | UTF-8 | 255 | 3.125 | 3 | [] | no_license | class Appliance:
month = 30
"""cost: float - passed upon initialization. The cost is for a single day"""
def __init__(self, cost: float):
self.cost = cost
def get_monthly_expense(self):
return self.cost * Appliance.month
|
Java | UTF-8 | 6,720 | 1.96875 | 2 | [] | no_license |
package org.geojsf.model.xml.geojsf;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.... |
JavaScript | UTF-8 | 1,829 | 2.625 | 3 | [
"MIT"
] | permissive | /**
* Created by KlimMalgin on 21.10.2014.
*/
'use strict';
var assert = require("assert");
var Morphine = require("../Morphine");
describe('Builder tests', function () {
var builder = MorphineShareApi.builder;
describe('Проверка сборки объекта', function () {
it('Сборка набора вложенных объектов... |
Java | UTF-8 | 9,220 | 1.734375 | 2 | [
"BSD-3-Clause"
] | permissive | /*
* This software is distributed under following license based on modified BSD
* style license.
* ----------------------------------------------------------------------
*
* Copyright 2003 The Nimbus Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*... |
C# | UTF-8 | 4,358 | 3.09375 | 3 | [
"MIT"
] | permissive | ///////////////////////////////////////////////////////////////////////////
// TestUtilities.cs - aids for testing //
// Version 1.0 //
// Jim Fawcett, CSE681-OnLine Software Modeling & Analysis, Spring 2017 //
///////////////... |
Java | UTF-8 | 2,791 | 2.40625 | 2 | [] | no_license | package com.sun.mail.imap;
import com.sun.mail.iap.ProtocolException;
import com.sun.mail.imap.protocol.IMAPProtocol;
import com.sun.mail.imap.protocol.ListInfo;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.MethodNotSupportedException;
public class Defau... |
Java | UTF-8 | 11,020 | 2.59375 | 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 edu.uan.fis.jeesample.dao.impl;
import edu.uan.fis.jeesample.dao.ClienteDao;
import edu.uan.fis.jeesample.dto.Cliente;
import ... |
Python | UTF-8 | 2,604 | 3.65625 | 4 | [] | no_license | class DuLNode(object):
def __init__(self, k, v, pre, nxt):
self.pre = pre
self.nxt = nxt
self.key = k
self.value = v
class LRUCache(object):
def __init__(self, capacity):
"""
:type capacity: int
"""
self.capacity = capacity
self.head = D... |
Java | UTF-8 | 640 | 3.109375 | 3 | [
"NCSA"
] | permissive | import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] coinVals = new int[m];
for (int i =0; i<m; i++){
... |
C++ | UTF-8 | 1,195 | 3.046875 | 3 | [] | no_license | /**
Dragon
Dragon Logic Class responsible for creating the light show on the CC3200 Demo Board.
created 7 June 2015
by Mitchell McGinnis
*/
int buttonState = 0;
int led1 = 2;
int led2 = 3;
//Prepare the LED's and Pins for the Dragons
void setupDragon() {
pinMode(led1, OUTPUT);
pinMode(le... |
C++ | UTF-8 | 419 | 2.765625 | 3 | [] | no_license | #include "pch.h"
#include "Wache.h"
Wache::Wache()
{
_state = new WachePatrouillieren();
}
Wache::~Wache()
{
}
void Wache::handleInput(string input)
{
WacheStatus* state = _state->handleInput(*this, input);
if (state != nullptr)
{
_state->exit(*this);
delete _state;
_state = state;
_state->entry(*this);... |
Python | UTF-8 | 142 | 2.859375 | 3 | [] | no_license | def classifica_idade(x):
if x<11:
return crianca
elif 12<x<17:
return adolescente
else:
return adulto
|
PHP | UTF-8 | 465 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Commands;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SayHelloWorld extends Command
{
public function configure()
{
$this->setName('say:hello')->setDescription('Say He... |
Python | UTF-8 | 1,303 | 2.9375 | 3 | [] | no_license | #This program should be called from the main folder as following
#
#python -m examples.lstm_example
import numpy as np
from optimizer.lstm import LSTMNet
from core.bot import Bot
print "Loading dataset"
train_set = np.load("dataset/SP500/train_set.npy")
validation_set = np.load("dataset/SP500/validation_set.npy")
#v... |
Shell | UTF-8 | 400 | 3.265625 | 3 | [] | no_license | #!/bin/bash
echo "what is your name"
read name
echo "select the operation, $name ************"
echo " 1)tell a joke"
echo " 2)Show disk usage"
echo " 3)Show current dir"
echo " 4)exit"
read n
while true ;
do
case $n in
1) echo "this is a joke";;
2) df;;
3) pwd;;
4) echo "goodbye, $name"
... |
Java | UTF-8 | 668 | 2.109375 | 2 | [] | no_license | package app.flora.Models;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Payment {
@SerializedName("friendly_name")
@Expose
private String friendly_name;
@SerializedName("system_name")
@Expose
private String system_name;
public... |
JavaScript | UTF-8 | 1,659 | 3.15625 | 3 | [] | no_license | /**
* @param {String} url
* @description 从URL中解析参数
*/
export const getParams = url => {
const keyValueArr = url.split('?')[1].split('&')
let paramObj = {}
keyValueArr.forEach(item => {
const keyValue = item.split('=')
paramObj[keyValue[0]] = keyValue[1]
})
return paramObj
}
/**
* @returns {String... |
Shell | UTF-8 | 870 | 2.828125 | 3 | [] | no_license | #!/bin/bash
source /home/xuemm/software/gromacs-5.0.7/bin/GMXRC
GMXGMP='gmx grompp'
MDRUN='gmx mdrun'
array_ele=(`seq -0.010 0.001 0.010`)
CP=/bin/cp
RM=/bin/rm
MV=/bin/mv
for ele in ${array_ele[@]}
do
DIR="E_$ele"
if [ -e $DIR ]; then
cd $DIR
else
mkdir $DIR && cd $DIR
fi
ELE=$ele
$CP ../md.mdp md.mdp
$CP ../gmx.qsub... |
Java | UTF-8 | 354 | 2.53125 | 3 | [] | no_license | package models;
public class ReTransaction {
public Transaction t;
public User u;
public Transaction getT() {
return t;
}
public void setT(Transaction t) {
this.t = t;
}
public User getU() {
return u;
}
public void setU(User u) {
this.u = u;
}
public ReTransaction(Transaction t, User u) {
super();... |
C# | UTF-8 | 2,179 | 3.171875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Rock_Paper_Scissors
{
class Player
{
public string name;
public VARIANTS VARIANTS;
private Random rnd = new Random();
private int variants;
pub... |
C | UTF-8 | 217 | 3.0625 | 3 | [] | no_license | #include<stdio.h>
int main()
{
long long int dub,num;
int power=0;
printf("Enter the number \n num=");
scanf("%lld",&num);
dub=num;
while(num!=1)
{
num=num>>1;
power++;
}
printf("%lld = 2^%d",dub,power);
return 0;
}
|
JavaScript | UTF-8 | 2,486 | 3.234375 | 3 | [
"MIT"
] | permissive | import FS from "fs";
import Path from "path";
import _ from "lodash-fp";
import { split } from "../helpers";
export const title = "Day 5: Doesn't He Have Intern-Elves For This?";
export function isNiceString(string) {
// Contains at least 3 vowels.
const vowels = ["a", "e", "i", "o", "u"];
const threeVo... |
JavaScript | UTF-8 | 140 | 3.328125 | 3 | [
"MIT"
] | permissive | // Write an expression that calculates trapezoid's
// area by given sides a and b and height h.
var a=3,b=4,h=5;
console.log(((a+b)/2)*h); |
Shell | UTF-8 | 3,984 | 3.4375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
set -f
PATH_SSL="/etc/ssl/certs"
# Path to the custom Homestead $(hostname) Root CA certificate.
PATH_ROOT_CNF="${PATH_SSL}/ca.homestead.$(hostname).cnf"
PATH_ROOT_CRT="${PATH_SSL}/ca.homestead.$(hostname).crt"
PATH_ROOT_KEY="${PATH_SSL}/ca.homestead.$(hostname).key"
# Path to the custom site cer... |
SQL | UTF-8 | 1,773 | 3.03125 | 3 | [] | no_license | INSERT INTO USERS (name, email, password)
VALUES ('User One', 'user.one@ukr.net', 'password'),
('User Two', 'user.two@ukr.net', 'password'),
('Admin One', 'admin.one@gmail.com', 'admin'),
('Admin Two', 'admin.two@gmail.com', 'admin');
INSERT INTO USER_ROLES (role, user_id)
VALUES ('ROLE_USER', 1),... |
Markdown | UTF-8 | 3,235 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | ## Sublime text 3 中Package Control 的安装与使用方法
Package Control插件本身是一个为了方便管理插件的插件,在Sublime text 3中,Package Control 的安装方法一开始出来的方法是要先安装Git,再输入代码来安装,原因说是“sublime text 3更新的python的函数,说白了就是API不同了,导致基于python开发的插件很多都不能工作”。不过后来出了个方便的安装方法,下面介绍一下。
插播:[代码编辑器Sublime Text 3 免费使用方法与简体中文汉化包下载](http://devework.com/sublime-text-... |
C# | UTF-8 | 533 | 3.59375 | 4 | [
"Apache-2.0"
] | permissive | using System;
public class PriceCalculator
{
private decimal totalPrice;
public PriceCalculator(decimal price, int days, Enum season, Enum discount)
{
var priceTemp = days * price * (int)(object)season;
TotalPrice = priceTemp - ((priceTemp / 100m) * (int)(object)discount);
Console.... |
Markdown | UTF-8 | 3,253 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | # Quizzo Server
> The backend for QUIZZO app.
![[GitHub package.json version]](https://img.shields.io/github/package-json/v/ibtesam123/Quizzo-Server)
![[GitHub last commit]](https://img.shields.io/github/last-commit/ibtesam123/Quizzo-Server)

![[GitHub... |
C++ | UTF-8 | 2,598 | 2.796875 | 3 | [] | no_license | // Ardumower Sunray
// Copyright (c) 2013-2020 by Alexander Grau, Grau GmbH
/*
test pathfinder
*/
#include "PathFinderTest.h"
#include <Arduino.h>
#include "../../map.h"
#include "../../robot.h"
bool PathFinderTest::findValidPoint(Point &pt){
int timeout = 10000;
float d = 30.0;
while (timeout > 0){
pt... |
C++ | UTF-8 | 1,278 | 2.53125 | 3 | [] | no_license | #ifndef BOARDLAYOUT_H
#define BOARDLAYOUT_H
#include <QLayout>
class BoradLayout : public QLayout
{
public :
enum Position {
West,
North,
South,
East,
Center
};
explicit BoradLayout(QWidget *parent, int margin = 0, int space = 0);
BoradLayout(... |
Swift | UTF-8 | 4,902 | 2.734375 | 3 | [] | no_license | //
// RepoDetailsViewModel.swift
// GHRepoBrowser
//
// Created by Andrzej Puczyk on 17/07/2019.
// Copyright © 2019 Andrzej Puczyk. All rights reserved.
//
import UIKit
protocol RepoDetailsViewModeling: ViewControllerModeling, UITableViewDataSource, UITableViewDelegate {
var onReloadData: (() -> Void)? { get... |
C++ | UTF-8 | 1,938 | 2.859375 | 3 | [] | no_license | #include "helium/type/IOHelper.h"
std::string FileIOHelper::GetIntCode() {
return R"prefix(
int get_int() {
int ret;
fscanf(int_input_fp, "%d", &ret);
return ret;
}
void input_int(int *a) {
*a = get_int();
}
void input_int_name(int *a, char *name) {
*a = get_int();
fprintf(output_fp, "input: int %s=%d\n... |
Markdown | UTF-8 | 1,314 | 2.96875 | 3 | [] | no_license | # TO-DO MERN APP
Simple app with auth and crud to add, edit and delete tasks.
## Stack
* Node.js 15.9.0
* Nestjs 7.5.5
* MongoDB 4.4.0
# How to run it?
## Prerequisites
* Just NodeJS installing in your system and MongoDB (But you can use Atlas)
## Installing
### 1. Clone the repo
```
git clone https://githu... |
Java | UTF-8 | 4,501 | 2.25 | 2 | [] | no_license | import java.io.IOException;
import java.util.*;
import java.text.*;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.M... |
JavaScript | UTF-8 | 946 | 2.75 | 3 | [] | no_license | // $("#country-name").change(function () {
$(".arrow").on("click", function () {
var apiKey = "9a8f851c653056267377aaa5a4b7723d";
var userQury = $("#country-name option:selected").val();
console.log("user qr: ", userQury);
$.ajax({
url: "https://restcountries.eu/rest/v2/a... |
C++ | UTF-8 | 2,512 | 3.078125 | 3 | [] | no_license | #include <iostream>
#include <cassert>
#include "TimeSeries/MetaParameter.hpp"
#include "TimeSeries/Optimizable.hpp"
class TestOptimizable : public Leph::Optimizable
{
public:
TestOptimizable() :
Leph::Optimizable()
{
Leph::Optimizable::resetParameters();
}
... |
Java | UTF-8 | 1,500 | 2.953125 | 3 | [] | no_license | import java.util.ArrayList;
import java.util.List;
public class PersonDataLoader {
public static List<Person> getPersonList()
{
Person p1 = new Person();
p1.setPersonNumber(1);
p1.setName("Dileepa");
p1.setAge(28);
p1.setStatus(Person.SINGLE);
p1.setSalary(190.... |
Java | UTF-8 | 395 | 2.3125 | 2 | [] | no_license | /**
* Alipay.com Inc.
* Copyright (c) 2004-2020 All Rights Reserved.
*/
package dsa.binaryTree;
/**
* @author rahul.jaiman
* @version $Id: TreeNode.java, v 0.1 2020-05-06 12:04 rahul.jaiman Exp $$
*/
public class TreeNode {
public int data;
public TreeNode left, right;
public TreeNode(int data) {
... |
C++ | UTF-8 | 1,964 | 3.140625 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int countOccurence(int arr[],int key,int start,int end)
{
int count=0;
int mid=(start+end)/2;
if(start>end)
return -1;
if(arr[mid]==key)
{
int found=mid;
while(mid >=0 && arr[mid]==key )
{
cou... |
Java | UTF-8 | 1,582 | 4.09375 | 4 | [] | no_license | package com.in28mins.referencetypes;
public class ReferenceTypes {
@SuppressWarnings("unused")
public static void main(String[] args) {
// all the primitive types will be stored in Stack memory (specific for each
// method)
// a primitive type variable is a location & it holds it value
// if you assign one ... |
Python | UTF-8 | 73 | 2.8125 | 3 | [] | no_license | print("Hello IOT")
value1 = 15
value2 =15.6
sum= value1+value2
print(sum) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.