language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 5,747 | 2.625 | 3 | [] | no_license | # EGL OrientDB CRUD Generator
Epsilon EGL demo project to generate OrientDB CRUD implementation using the Graph API
## DISCLAIMER
I am **NOT** an experienced DB programer and thus the generated code will most likely be "ugly"; incorrect separation of concerns, incorrect use of Frames and Pipes, inefficent, wrong de... |
C | UTF-8 | 352 | 3.46875 | 3 | [] | no_license | #include<stdio.h>
int main()
{
int k;
int r = 0;
int s = 0;
int t = 0;
printf("Unesite magicni broj k: ");
scanf_s("%d", &k);
switch (k)
{
case 0:
r++;
break;
case 1:
s++;
break;
case 2: case 3: case 4:
t++;
break;
default:
break;
}
printf("r = %d\n", r);
printf("s = %d\n", s);
prin... |
C++ | UTF-8 | 20,624 | 3.03125 | 3 | [] | no_license | #include "PJCalibDetector.h"
/* Constructor */
PJCalibDetector::PJCalibDetector(Mat* image)
{
this->image = image;
/* Split image in Red Green & Blue */
split(*this->image, this->rgbPlanes);
/* Threshold the blue image */
this->blueThreshold = new Mat;
this->greenThreshold = new Mat;
this->redThreshold = new ... |
Java | UTF-8 | 479 | 1.9375 | 2 | [] | no_license | package nanifarfalla.app.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import nanifarfalla.app.model.Contrato;
@Repository
public interface ContratoRepository extends JpaRepository<Cont... |
Markdown | UTF-8 | 6,282 | 2.71875 | 3 | [] | no_license | ---
description: Découverte de Framework7
---
# M4B103-seance-3
Framework7 va vous offrir tout un arsenal d'outils pour développer votre appli mobile avec des popups, des menus déroulants, des panneaux , des formulaires, des calendriers... le tout adapté aux mobiles et à son ergonomie, à travers des classes CSS et du... |
Python | UTF-8 | 190 | 3.40625 | 3 | [] | no_license | # sum of n natural nrmbers
# ask a user for natural numbe(n)
# print total from 1 to n
num = int(input("enter number to sum "))
i = 1
sum = 0
while i<=num:
sum += i
i +=1
print(sum) |
C# | UTF-8 | 6,112 | 2.78125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MachinesRUs.Machines;
using MachinesRUs.Observer;
using MachinesRUs.Controls;
using MachinesRUs.Dia... |
C++ | UTF-8 | 10,456 | 2.578125 | 3 | [] | no_license | #include "slackRemover.h"
void slackInfo::allDirFilesdum(const string tDir){
const string newtDir = tDir;
allDirFiles(newtDir);
}
// good function to pthread
void slackInfo::allDirFiles(const string& tDir){
//fileStat hfile;
namespace fs = boost::filesystem;
fs::path targetDir(tDir);
fs::directory_ite... |
PHP | UTF-8 | 2,409 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $t) {
$t->increments... |
Python | UTF-8 | 2,179 | 3.21875 | 3 | [
"BSD-3-Clause"
] | permissive | #!/usr/bin/env python3
"""Basic demo on how to run a Finger Robot with torque control."""
import os
import numpy as np
from ament_index_python.packages import get_package_share_directory
import robot_interfaces
import robot_fingers
def get_random_torque():
"""Generate a random torque within a save range."""
... |
Go | UTF-8 | 345 | 3.078125 | 3 | [] | no_license | package main
import "fmt"
func main() {
// var (
// ia int = 1
// fb float64 = 1.0
// )
// fmt.Printf("%p, %p\n", &ia, &fb)
var flag string = "I will hard-working in ByteDance."
ptr := &flag
fmt.Printf("ptr is %T\n", ptr)
fmt.Printf("%s\n", *ptr)
value := *ptr
fmt.Printf("value is %T\n", value)
fmt... |
Java | UTF-8 | 2,693 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | package foundation.base.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import java.util.ArrayList;
import java.util.List;
/**
* Created by wu_jian on 2015/7/30.
*/
public abstract class CommonList... |
Markdown | UTF-8 | 856 | 2.625 | 3 | [] | no_license | # Yii2 [Tabler](https://github.com/tabler/tabler) Theme (Bootstrap 4)
It is a free admin template for backend of yii framework 2 based on [Tabler](https://github.com/tabler/tabler) theme. Tabler is free and open-source HTML Dashboard UI Kit built on Bootstrap 4
This extension consists assets bundles,, some page v... |
C | UTF-8 | 1,818 | 2.640625 | 3 | [] | no_license | /**
******************************************************************************
* @文件 ci100x_ir.c
* @作者 chipintelli软件团队
* @版本 V1.0.0
* @日期 2016-4-9
* @概要 这个文件提供接口函数来控制chipintelli公司的CI100X芯片的红外发送接收模块.
******************************************************************************
* @注意
... |
Markdown | UTF-8 | 6,366 | 3.53125 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | ---
alias: [Strike Price]
created: 2021-03-02T23:45:25 (UTC +11:00)
tags: [Strike Price Definition, Strike Price Definition]
source: https://www.investopedia.com/terms/s/strikeprice.asp
author: Jason Fernando
---
# Strike Price Definition
> ## Excerpt
> Strike price is the price at which a derivative contract can be ... |
Java | UTF-8 | 1,858 | 2.234375 | 2 | [] | no_license | package basic.booking.controller;
import basic.booking.domain.Reserve;
import basic.booking.domain.User;
import basic.booking.repos.ReserveRepo;
import basic.booking.repos.SubjectRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.annotation.AuthenticationPrinc... |
Java | UTF-8 | 418 | 2.46875 | 2 | [
"MIT"
] | permissive | package exitIT;
import org.junit.Test;
import static org.junit.Assert.*;
import exit.*;
import place.*;
public class OneWayDoorIT {
@Test
public void getNextPlace() {
Place p = new Room(null,null,0,null,null);
Place p2 = new Room(null,null,0,null,null);
OneWayDoor e = new OneWayDoor(... |
JavaScript | UTF-8 | 3,252 | 2.671875 | 3 | [
"MIT"
] | permissive | /* jshint unused: false */
define([ 'underscore', 'dungcarv' ], function(_, dungCarv) {
"use strict";
var bits = {
0x01: 'NW',
0x02: 'N',
0x04: 'NE',
0x08: 'E',
0x10: 'SE',
0x20: 'S',
0x40: 'SW',
0x80: 'W'
};
var toDirection = {
0x01 : { x: -1, y: -1 },
0x02 : { x: 0, ... |
C++ | UTF-8 | 5,406 | 2.546875 | 3 | [] | no_license |
#include "mygui_osgtexture.h"
#include <osg/Texture2D>
#include <osgDB/ReadFile>
#include <MyGUI_Gui.h>
#include "log.hpp"
#include "mygui_osgdiagnostic.h"
#include "mygui_osgrendermanager.h"
namespace TK
{
OSGTexture::OSGTexture(const std::string &name)
: mName(name)
, mFormat(MyGUI::PixelFormat::Unknow)
... |
Java | UTF-8 | 1,483 | 2.40625 | 2 | [
"Apache-2.0"
] | permissive | package io.smartcat.cassandra.diagnostics.info;
/**
* Thread pool stats info class.
*/
public class TPStatsInfo {
/**
* Thread pool name.
*/
public final String threadPool;
/**
* Thread pool active tasks.
*/
public final long activeTasks;
/**
* Thread pool pending task... |
Java | UTF-8 | 2,279 | 3.078125 | 3 | [] | no_license | package com.swedbank.entry_test.util;
import com.swedbank.entry_test.util.data.DecathlonResultEntry;
import com.swedbank.entry_test.util.data.Position;
import java.util.*;
/**
* @author ben
* @version 1.0
*/
public class DecathlonEntryOrganiser {
private final DecathlonPointsCounter counter;
public Deca... |
Java | UTF-8 | 876 | 2.84375 | 3 | [] | no_license | package com.example.solitare2114.controller;
import java.util.ArrayList;
import java.util.List;
import com.example.solitare2114.GameView;
public class GameController extends Controller
{
public GameController(GameView gv)
{
super(gv);
myControllers = new ArrayList<Controller>();
}
Lis... |
Java | UTF-8 | 2,490 | 2.59375 | 3 | [] | no_license | package pt.ulisboa.tecnico.sirs;
import pt.ulisboa.tecnico.sirs.exception.SecurityLibraryException;
import pt.ulisboa.tecnico.sirs.security.Signable;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.security.PublicKey;
import java.security.cert.Certificate;
import java.security.cert.CertificateEnc... |
C++ | UTF-8 | 704 | 2.71875 | 3 | [] | no_license | /*#define bzz 2
#define rl 1
int option;
int led = 6;
void setup(){
Serial.begin(115200);
pinMode(led, OUTPUT);
pinMode(bzz, OUTPUT);
pinMode(rl,OUTPUT);
}
void loop(){
//si existe información pendiente
if (Serial.available()>0){
//leeemos la opcion
char option = Serial.read();
... |
C++ | UTF-8 | 688 | 2.96875 | 3 | [] | no_license | #pragma once
#include<string>
class Client{
public:
Client();
Client(std::string nom, std::string prenom ,int nbr_reservation=1);
//Client(std::string nom, std::string prenom, int nbr_reservation=1);
// Les setters permettront d'entrer les informations du client ou de les modifier
void setId(int id) ;
void setN... |
Python | UTF-8 | 275 | 3.921875 | 4 | [
"CC0-1.0"
] | permissive | upper = int(input("Enter the num"))
print("primes under", upper)
for num in range(upper):
if num > 1:
# check for factors
for i in range(2,num):
if (num % i) == 0:
break
else:
print(num,"is a prime number") |
PHP | UTF-8 | 96 | 2.78125 | 3 | [] | no_license | <?php
namespace strategy;
interface StrategyInterface
{
public function caculatePrice();
} |
PHP | UTF-8 | 609 | 2.515625 | 3 | [] | no_license | <?php
namespace controller\dashboard;
class home extends \SUP\controller {
function __invoke($request, $response, $args) {
if ($this->container->auth->getUser()->is(ROLE_ADMIN)) {
return $this->sendResponse($request, $response, "dash/admin.phtml");
} else if ($this->container->auth->... |
Java | UTF-8 | 1,159 | 1.914063 | 2 | [] | no_license | package in.mangoo.mangooonlinefooddelivery.ViewHolder;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import in.mangoo.mangooonlinefooddelivery.Interface.... |
Java | UTF-8 | 531 | 2.609375 | 3 | [] | no_license | package com.company;
public class Main {
public static void main(String[] args) {
bank bank = new bank("Hieudz");
bank.addBranch("Ha Noi");
bank.addBranch("Hcm");
bank.addCustomer("Ha Noi","Hieu",100);
bank.addCustomer("Ha Noi","Nam",200);
bank.addCustomer("Ha Noi",... |
Python | UTF-8 | 2,610 | 2.6875 | 3 | [] | no_license | import copy
import numpy as np
# import pandas as pd
# from blur_map import first_generation_particles,resampling
def read_pgm(map_path):
"""Return a raster of integers from a PGM as a list of lists."""
pgmf = open(map_path, 'rb')
a = pgmf.readline()
assert a == b'P5\n'
(width, height) = [int(i) f... |
C# | UTF-8 | 1,949 | 2.59375 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// Display the contents of the inventory in the agents UI, except for the flags
/// which continue to be rendered
/// </summary>
public class InventoryDisplay : MonoBehaviour
{
public GameObject Ite... |
Go | UTF-8 | 3,666 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | // Copyright 2022 uTLS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tls
import (
"golang.org/x/crypto/cryptobyte"
)
// Only implemented client-side, for server certificates.
// Alternate certificate message formats (htt... |
Java | UTF-8 | 4,264 | 1.820313 | 2 | [] | no_license | package com.tencent.mm.plugin.backup.h;
import com.tencent.mm.bp.a;
import e.a.a.b;
import java.util.LinkedList;
public final class r extends a {
public String ID;
public long kyX;
public int kza;
public int kzb;
public int kzc;
public long kzd;
public long kze;
public LinkedList<t> kz... |
JavaScript | UTF-8 | 1,555 | 2.625 | 3 | [] | no_license | class TallyMap {
constructor(brain, key) {
this.brain = brain;
this.key = key;
}
forUser(uid) {
const userMap = this.brain.get(this.key) || {};
return userMap[uid] || {};
}
modifyTally(uid, key, delta) {
const userMap = this.brain.get(this.key) || {};
const userTally = userMap[uid] |... |
Python | UTF-8 | 889 | 2.640625 | 3 | [] | no_license | # import CoronaEDA2 as ceda
# print(ceda.cities_of_state('Kerala'))
def sum(a, b):
return a + b
# print(sum(3, 3))
# app5 = DjangoDash('vaccine_1')
# vaccine1 = ceda.vaccine_administered('India')
# app5.layout = html.Div(children=[
# html.Br(),
# html.Div(className='card', id='div5', style={'text-align': 'center... |
Markdown | UTF-8 | 1,040 | 2.890625 | 3 | [] | no_license | ## ScareBnB
[ScareBnB](https://scarebnb-aa.herokuapp.com/) allows users to host or book haunted locations around the world. This website is a mobile first web application using Ruby on Rails for the backend with a Postgres DB. The frontend is built using ReactJS and JQuery.
ScareBnB is a personal project by Hunter Ho... |
C | UTF-8 | 191 | 3.65625 | 4 | [] | no_license | #include<stdio.h>
int main(){
int n, fat=1;
printf("Digite um núemro inteiro: ");
scanf("%d", &n);
for(int i=n; i>=1; i--){
fat = fat*i;
}
printf("Fatorial = %d\n", fat);
}
|
PHP | UTF-8 | 290 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries\Attachmentable;
use App\Attachment;
trait HasAttachments
{
/**
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function attachments()
{
return $this->morphMany(Attachment::class, 'attachmentable');
}
} |
Python | UTF-8 | 217 | 3.15625 | 3 | [] | no_license | # function to reverse the number
def revNum(n):
pass
# function to check whether the number is prime or not
def isPrime(n):
pass
def main():
# take input
pass
if __name__ == "__main__":
main()
|
C | UTF-8 | 491 | 3.28125 | 3 | [] | no_license | #include <stdio.h>
#include <time.h>
#include <stdlib.h>
void main(){
int n[10];
int i, n_max = 0, n_min = 10;
srand((unsigned)time(NULL));
for(i = 1; i <= 10; i++){
n[i] = rand() % 10 + 1;
printf("%d ", n[i]);
if(n[i] >= n_max){
n_max = n[i];
}
if(n[... |
C++ | UTF-8 | 1,955 | 2.96875 | 3 | [] | no_license | //
// Created by Florian on 06.12.17.
//
#include "AirConditioner.h"
AirConditioner::AirConditioner(uint8_t dhtPin, uint8_t heatPadPin, uint8_t fanPin, float desiredTemperature,
float temperatureOffset, unsigned long updateTime) {
this->heatPadPin = heatPadPin;
this->fanPin = fa... |
Python | UTF-8 | 1,842 | 2.53125 | 3 | [] | no_license | from selenium import webdriver
from pages.loginfunc.login_page import LoginPage
from utilities.status import Status
import unittest
import pytest
@pytest.mark.usefixtures("oneTimeSetUp", "setUp")
class LoginTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def classSetup(self, oneTimeSetUp):
se... |
Java | UTF-8 | 321 | 2.984375 | 3 | [] | no_license | package basic_Input;
import java.util.Scanner;
public class B_109 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num1 = sc.nextInt();
int num2 = sc.nextInt();
int num3 = sc.nextInt();
System.out.printf("sum = %d%navg = %d", num1+num2+num3, (num1+num2+num3)/3);
}
}... |
Java | UTF-8 | 3,424 | 2.671875 | 3 | [] | no_license | package com.hdlink.online.model;
import com.hdlink.online.defines.ServiceFilterType;
import java.util.*;
/**
* Created by zhongqiling on 14-11-6.
*/
public class CarServiceCenter {
static public String WHOLE = "whole";
//客户端暂存得全部服务
public List<CarService> services = new ArrayList<CarService>();
... |
Java | GB18030 | 870 | 2.390625 | 2 | [] | no_license | package springloz;
import java.io.Serializable;
/**
* @ԭ maintenanceQuality_table
* @ԭ reason String
@ intflag int --------nochange
*/
public class MaintenanceReason implements Serializable {
private String reason;
private String intflag;
public String getReason() {
return reason;
}
public vo... |
Java | UTF-8 | 1,262 | 3.046875 | 3 | [] | no_license | package com.interlan.test.test;
import java.time.Clock;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class Producer {
private SharedTable sharedTable;
public Producer(SharedTable sharedTable) {
// TODO Auto-generated constructor stub
this.sharedTable = sharedTabl... |
C++ | UTF-8 | 7,529 | 2.859375 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <cmath>
#include "Object.h"
#define REACTION_TIME 0.01
#define GRAVITATION 700
#define sqr(x) (x) * (x)
sf::RenderWindow *Window = nullptr;
Object::Object ():
pos_ (sf::Vector2f ()),
v_ (sf::Vector2f ()),
size_ (sf::Vector2f ()),
m_ (),
friction_ (),
sprite_ (sf... |
Java | UTF-8 | 4,514 | 2.25 | 2 | [
"MIT"
] | permissive | package org.kelab.admin.ke.role;
import java.util.ArrayList;
import java.util.List;
import org.kelab.admin.ke.menu.MenuAdminService;
import org.kelab.admin.ke.user.UserAdminService;
import org.kelab.model.KeRole;
import org.kelab.model.KeRoleMenu;
import com.jfinal.kit.Ret;
import com.jfinal.plugin.active... |
Python | UTF-8 | 6,239 | 2.53125 | 3 | [
"BSD-3-Clause",
"CC0-1.0",
"MIT",
"Unlicense",
"Apache-2.0"
] | permissive | #!python3
#encoding:utf-8
import dataset
from bs4 import BeautifulSoup
import time
import os.path
import requests
class GnuSite(object):
def __init__(self, path_gnu_licenses_sqlite3):
self.__db_license = dataset.connect('sqlite:///' + path_gnu_licenses_sqlite3)
def GetAll(self):
for lang in se... |
Swift | UTF-8 | 1,124 | 2.734375 | 3 | [] | no_license | //
// options.swift
// Game jr.
//
// Created by WALLS BENAJMIN A on 4/11/16.
// Copyright © 2016 WALLS BENAJMIN A. All rights reserved.
//
import Foundation
import SpriteKit
class OptionsMenu : SKScene {
var backButton : SKLabelNode?
override func didMoveToView(view: SKView) {
backButto... |
Python | UTF-8 | 1,501 | 2.640625 | 3 | [] | no_license | import numpy as np
def compute_essential_matrix(points_1, points_2, k_1, k_2, normalize=True):
f = fundamental_eight_point(points_1, points_2, normalize)
return np.matmul(k_2.T, np.matmul(f, k_1))
def fundamental_eight_point(points_1, points_2, normalize):
if normalize:
t_1, t_2 = normalization_... |
Java | UTF-8 | 889 | 2.109375 | 2 | [] | no_license | import allen.dao.UserMapper;
import allen.pojo.User;
import allen.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import java.util.List;
/**
* @author Allen
* @date 2020/11/13 10:59
*/
public class UserMapperTest {
@Test
public void getUserList(){
SqlSession... |
Markdown | UTF-8 | 9,684 | 2.71875 | 3 | [] | no_license | ---
layout: default
title: "2789.周恩来在卫生系统“打倒老爷卫生部大会”上的讲话"
weight: 2789
---
1967-9-27
周恩来在卫生系统“打倒老爷卫生部大会”上的讲话
周恩来
1967.09.27
同志们,战友们:
在我们今天这个联合大会上,我应该首先代表我们伟大领袖毛主席和他的亲密战友林副主席(热烈鼓掌)、代表党中央、国务院、中央军委、中央文革小组问你们好!祝贺你们。(热烈鼓掌,口号)你们这次由卫生部的两派进行在大批判的运动当中,进行了革命的大联合,也推动了卫生系统的革命大联合。这是由于你们过去坚持反对我们党内一小撮的走资派,刘、邓、陶,同时结合到他们在卫生系统的一些黑... |
Markdown | UTF-8 | 5,606 | 2.625 | 3 | [] | no_license | # Parameters
A default parameter configuration is available in `default.yaml`. The parameters are categorized after model components where e.g. `asr.opt` contains parameters relvant for the ASR optimizer, `asr.mdl` contains ASR model parameters and `asr` contains other parameters in general.
A couple of other hyperpar... |
Go | UTF-8 | 1,029 | 2.875 | 3 | [
"MIT"
] | permissive | package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"time"
"github.com/valyala/fasthttp"
)
func convertPDF(ctx *fasthttp.RequestCtx) {
if string(ctx.Method()) != "POST" {
ctx.Error("post only", 405)
return
}
if ctx.PostBody() == nil {
ctx.Error("Body is missing", 400)
return
}
tmpFileNam... |
C++ | UTF-8 | 1,960 | 2.640625 | 3 | [
"MIT"
] | permissive | ////////////////////////////////////////////////////////////////
// MSDN Magazine -- July 2001
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Compiles with Visual C++ 6.0. Runs on Win 98 and probably Win 2000 too.
// Set tabsize = 3 in your editor.
//
#includ... |
Python | UTF-8 | 548 | 3.796875 | 4 | [] | no_license | import random
def get_valid(message):
value = int(input(message))
while not(value > 0):
value = int(input('Введите корректное (целое, положительное) значение: '))
return value
def play():
#print('Удадайте число от 0 до 100')
number = random.randint(0, 101)
if number == get_valid('Удадай... |
TypeScript | UTF-8 | 8,278 | 3.09375 | 3 | [
"MIT",
"BSD-2-Clause"
] | permissive | import { RuleTester } from '@typescript-eslint/rule-tester';
import rule from '../../src/rules/dot-notation';
import { getFixturesRootDir } from '../RuleTester';
const rootPath = getFixturesRootDir();
const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'modul... |
Markdown | UTF-8 | 3,002 | 3.203125 | 3 | [] | no_license | # Summary from https://thrift-tutorial.readthedocs.io/en/latest/thrift-types.html
# Thrift type system
include base types like **bool, byte, double, string and integer** but also special types like **binary** and it also supports **structs**(equivalent to classes but without inheritance) and also **containers**(list,... |
Python | UTF-8 | 1,204 | 4.03125 | 4 | [] | no_license | print("\tStock Transaction Program ")
print("Total number of Stocks joe purchase was 1000 ")
print("Share purchase amount per stock 32.87$")
Invest = 32.87 * 1000
print("Joe invest " + str(Invest) + "$ last month")
Commission_for_Broker = (2/100)* Invest
print("Commission for stock broker is 2% from total amoun... |
JavaScript | UTF-8 | 99 | 2.8125 | 3 | [] | no_license | let elementH1 = document.querySelector("h1");
let myName = "Simon Gørtz";
elementH1.innerHTML = myName; |
Java | UTF-8 | 2,148 | 2.78125 | 3 | [] | no_license | package org.simpleframework.mvc.processor.impl;
import lombok.extern.slf4j.Slf4j;
import org.simpleframework.mvc.processor.RequestProcessor;
import org.simpleframework.mvc.processor.RequestProcessorChain;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
/**
* 静态资源请求处理,包括但不限于图片、css、以及js文件... |
C# | UTF-8 | 2,854 | 2.671875 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using OMSAPI.DataContext;
using OMSAPI.Interfaces;
using OMSAPI.Models;
namespace OMSAPI.Services
{
class SalesOrderHeaderService : ISalesOrderHeader
{
private OMSDbContext _context;
public S... |
Java | UTF-8 | 1,230 | 3.421875 | 3 | [] | no_license |
package oop;
public class Test {
public static void main(String[] args) {
Teacher teacher1=new Teacher();//decaring and creating object...
// teacher1.setInformation("Sumaiya Islam","Female",1712);
teacher1.displayInformation();
/* teacher1.name="Sumaiya Islam";
teacher1.gender="Fema... |
Java | UTF-8 | 1,061 | 3.34375 | 3 | [] | no_license | package _03_array_method.thuchanh;
import java.util.Scanner;
public class DaoNguocPhanTuCuaMang {
public static void main(String[] args) {
int size;
Scanner scanner = new Scanner(System.in);
do {
System.out.println("moi ban nhap chieu dai mang");
size = scanner.next... |
SQL | UTF-8 | 690 | 3.53125 | 4 | [] | no_license | --코딩테스트 연습>JOIN>보호소에서 중성화한 동물
-- MySQL 코드를 입력하세요
SELECT i.animal_id, i.animal_type, i.name
FROM animal_ins i
JOIN animal_outs o ON i.animal_id = o.animal_id
WHERE i.sex_upon_intake LIKE 'Intact%'
AND (o.sex_upon_outcome LIKE 'Spayed%'
OR o.sex_upon_outcome LIKE 'Neutered%'
)
ORDER BY i.animal_i... |
Python | UTF-8 | 691 | 3 | 3 | [] | no_license | #!/usr/bin/python3
# closing a window with a button
import sys
from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton, QToolTip)
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
qbtn = QPushButton('Quit', self)
qbtn.... |
Java | GB18030 | 5,596 | 2.046875 | 2 | [] | no_license | package com.oa.dispatch.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet... |
Java | UTF-8 | 349 | 2.546875 | 3 | [] | no_license | package thinking.in.patterns.singleton.p1;
/**
* Created by Administrator on 2016/11/7.
*/
public class SingletonLazy {
private SingletonLazy(){}
private static class Holder{
private static SingletonLazy instance = new SingletonLazy();
}
public static SingletonLazy getInstance(){
ret... |
Java | UTF-8 | 1,091 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | package com.edison;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
/**
* Created by wangzhengfei on 16/7/5.
*/
public class ExecutorCompletionServiceTest extends ThreadPool {
public static void main(String[] args) throws InterruptedException, ExecutionException {
Syste... |
C# | UTF-8 | 594 | 2.59375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace KingBellyCore.Models
{
public class RestaurantList
{
public List<Restaurant> Restaurants { get; set; }
public RestaurantList()
{
Restaurants = getRestaurants();
... |
JavaScript | UTF-8 | 759 | 2.546875 | 3 | [] | no_license | var jwt=require("jsonwebtoken");
module.exports=function(req,res,next){
var bearerHeader = req.headers["authorization"];
if(typeof bearerHeader!== 'undefined'){
var bearerToken = bearerHeader.split(" ")[1];
//req.token=bearerToken;
jwt.verify(bearerToken,process.env.SE... |
C# | UTF-8 | 917 | 2.90625 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MapGenerator
{
public enum TileType
{
WALL,
FLOOR,
GROUND,
DOOR,
}
public class Map
{
public TileType[,] tiles;
public List<Rect> rooms;
public Map... |
C++ | UTF-8 | 859 | 2.6875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
string st1 = "", st2 = "";
cin >> st1 >> st2;
vector<vector<int> > d;
d.resize(st1.size() + 1);
for (int i = 0; i < d.size(); i++)
d[i].resize(st2.size() + 1);
for (int i = 0; i <= st1.size(); i++)
d[i][0] = i;
for ... |
Shell | UTF-8 | 330 | 2.546875 | 3 | [] | no_license | #!/bin/bash
app=cg
for x in coreconstrained fair
do
for y in `seq 1 1 112`
do
../scripts/get-num-threads.py $app.$x.$y.log >> $app.$x.threads
done
done
for x in poweraware slackaware
do
for y in `seq 30 5 330`
do
../scripts/get-num-threads.py $app.$x.$y.log >> $app.$x.threads
... |
Markdown | UTF-8 | 565 | 2.90625 | 3 | [] | no_license | ---
title: How to start the time machine?
keywords: time machine, tachyon, 4d
---
So, you found yourself [into the lab](070-lab.md). You need some help with it. Look at the time machine and then go to lecture hall. The students will help you.
# I need...
You need:
- [4D glasses](100-4d-glasses.md)
- [Something that... |
PHP | UTF-8 | 2,412 | 2.890625 | 3 | [] | no_license | <?php
namespace PicqerImporter;
class OrderImporter {
protected $picqerclient;
protected $config;
public function __construct($picqerclient, $config)
{
$this->picqerclient = $picqerclient;
$this->config = $config;
}
public function importOrders($orders, $reference)
{
... |
C++ | UTF-8 | 2,210 | 3.40625 | 3 | [] | no_license | #include "fixed_sz_allocator.hpp"
#include <gtest/gtest.h>
#include <iostream>
TEST(allocator, base_operations) {
using T = double;
constexpr size_t n = 15;
reserve_allocator<T, n> fxd_alloc;
// Elements can be allocates just one per request
for (size_t i = 2; i < n; ++i) {
EXPECT_THROW... |
JavaScript | UTF-8 | 3,329 | 3.921875 | 4 | [] | no_license | //Codigo del cuadrado
console.group('Cuadrados');
function perimetroCuadrado(lado){
return lado * 4;
};
function areaCuadrado(lado){
return lado * lado;
};
console.groupEnd();
//Codigo del triangulo
console.group('Triangulos');
function perimetroTriangulo(lado1,lado2,base){
return lado1 + lado2 + base;
};
... |
C++ | UTF-8 | 939 | 3.125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
class node{
public:
int data;
node* prev;
node(int x){
this->data = x;
this->prev = NULL;
}
};
void multiply(node *tail, int n)
{
node *temp=tail;
node *prevNode=tail;
int carry=0;
while(temp!=NULL){
int data=temp->data * n + ... |
Python | UTF-8 | 826 | 3.546875 | 4 | [] | no_license | #!/usr/bin/python3
"""Module and function must be documented"""
def island_perimeter(grid):
"""returns perimeter"""
if len(grid) == 0 or grid is None:
return 0
height = len(grid)
lenght = len(grid[0])
perimeter = 0
for lists in grid:
for items in lists:
if type(i... |
JavaScript | UTF-8 | 565 | 3.34375 | 3 | [] | no_license | (function nameList() {
var i;
var arr = [];
for (i = 1; i <= 5; i++) {
arr.push(prompt('Введите имя №' + i));
}
var name = prompt('Введите ваше имя пользователя');
function nameCompare(name) {
for (var i = 0; i < nameList.length; ++i) {
if (nameList[i] === name) {
... |
PHP | UTF-8 | 11,192 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
include '../PHP/Conexion.php';
include 'plantilla2.php';
$string = $_POST['periodo1'];
$arreglo = explode('-', $string, 3);
$arreglo2 = explode('-',$_POST['periodo2'],3);
$mes = "error semantico";
$mes2 = "" ;
//$opcion = $arreglo[1];
switch ($arreglo[1]) {
case 1:
$mes = "Enero... |
Java | UTF-8 | 7,346 | 1.90625 | 2 | [] | no_license | package com.onethousandprojects.appoeira.serverStuff.methods;
import android.location.Location;
import android.util.Pair;
import android.widget.Toast;
import androidx.annotation.NonNull;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.ma... |
SQL | UTF-8 | 347 | 3.90625 | 4 | [] | no_license | SELECT IL.NAME, I.DESCRIPTION
FROM ISSUESLISTS IL, ISSUES I
WHERE IL.ID = I.ISSUESLIST_ID;
SELECT U.FIRSTNAME, U.LASTNAME, I.DESCRIPTION
FROM USERS U, ISSUES I
WHERE U.ID = I.USER_ID_ASSIGNEDTO;
SELECT U.FIRSTNAME, U.LASTNAME, COUNT(*) AS ISSUES
FROM ISSUES I, USERS U
WHERE U.ID = I.USER_ID_ASSIGNEDTO
GROUP BY U.FIRS... |
C++ | UTF-8 | 3,070 | 2.734375 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
using namespace std;
vector<vector<int>> field;
vector<vector<int>> minLength;
vector<vector<int>> used;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int w, h;
int x1, y1;
i... |
C++ | UTF-8 | 493 | 3.046875 | 3 | [] | no_license | /*
ID: ishan-sang
PROG: Reverse integer
LANG: C++
*/
int Solution::reverse(int A)
{
int sign = 0;
if(A<0)
sign = 1;
A = abs(A);
long long int N = 0;
while(A)
{
N = N*10 + A%10;
A/=10;
}
if(sign == 0)
{
if(N>INT_M... |
C# | UTF-8 | 1,534 | 3.34375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BasicExam19December2014
{
class Program
{
static void Main(string[] args)
{
string yearType = Console.ReadLine();
if(yearType == "leap")
... |
C++ | UTF-8 | 2,532 | 3.46875 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include <stack>
#include <queue>
#include <string>
#include "data.h"
using namespace std;
int main() {
cout << "" << endl;
Data GHG_Emission;
stack <Data> Stack;
queue <Data> Queue;
priority_queue <Data> finalsortedList;
ofstream myfile;
myfile.op... |
JavaScript | UTF-8 | 2,459 | 2.53125 | 3 | [
"MIT"
] | permissive | $.getScript("./JS/util.js");
$(document).ready(function () {
aboutUsAnimation();
headerAnimation();
});
/**
* hide about us
* show about us
*/
function aboutUsAnimation() {
$("#aboutUsClosed").on('click', function () {
$('#aboutUsContents').fadeOut('slow');
$('.aboutUsClosed').fadeOut('... |
Python | UTF-8 | 408 | 2.984375 | 3 | [] | no_license |
class UDPFileSender(object):
def __init__(self, sender):
self.sender = sender
def readFile2bytes(self, file_name):
file_bytes = None
try:
f = open(file_name, 'rb')
file_bytes = f.read()
except IOError:
print("无法打开文件 -> ", file_name)
... |
C# | UTF-8 | 2,323 | 2.953125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSRunner.Base
{
public class Events : IDisposable
{
protected bool disposed;
internal Events()
{ }
event RunnerEvent runnerEvent;
internal ev... |
Java | UTF-8 | 821 | 1.585938 | 2 | [] | no_license | package com.github.client;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import... |
C++ | UTF-8 | 7,424 | 2.609375 | 3 | [] | no_license | #include <stan/math.hpp>
#include <gtest/gtest.h>
#include <dist/bicop_BB1_log.hpp>
#include <dist/bicop_survival_BB1_log.hpp>
#include <dist/bicop_r90_BB1_log.hpp>
#include <dist/bicop_r270_BB1_log.hpp>
#include <iostream>
TEST(Copula_density, BB1_copula_v) {
using stan::math::var;
double v_val = 0.8;
... |
C++ | UTF-8 | 3,600 | 3.484375 | 3 | [] | no_license | //
// CircularBufferTest.cpp
// PROI-LAB1
//
// Created by Michał Świętochowski on 07.11.2013.
// Copyright (c) 2013 Michal Swietochowski. All rights reserved.
//
#include "CircularBufferTest.h"
void CircularBufferTest::runTests()
{
cout << "0. Initial buffer (test of << operator):" << endl << buffer << endl ... |
Java | UTF-8 | 4,398 | 2.265625 | 2 | [] | no_license | package com.qiushui.base.security.aspect;
import java.lang.reflect.Field;
import java.util.List;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignatur... |
C++ | UTF-8 | 2,017 | 3 | 3 | [] | no_license | #include <string>
#include <iostream>
#include "Building.h"
#include "GameBoard.h"
#include "AcademicBuilding.h"
using namespace std;
AcademicBuilding::AcademicBuilding(std::string n, int i, GameBoard *g,
int c, int ic, int t0, int t1, int t2, int t3, int t4, int t5, int b):
Building{n, i, g, c}, ... |
Markdown | UTF-8 | 8,566 | 2.953125 | 3 | [] | no_license | ## IMPORTANT
Read this ENTIRE document before beginning work.
## Collaboration
ONE person from the group will fork this repo from ACA. That person will give everyone else permissions as a "collaborator". From that point on, you will all clone THE ONE repo and your changes will be in the form of __pull requests__. Fo... |
Java | UTF-8 | 129,449 | 1.976563 | 2 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bill;
import Database.DBconnection;
import Storage.stockDetails;
import home.HomeOverView;
import java.awt.Color;
import java.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.