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 |
|---|---|---|---|---|---|---|---|
C++ | UTF-8 | 2,110 | 3.0625 | 3 | [
"MIT"
] | permissive | /* Copyright (c) 2011 Andrée Ekroth
* See the file LICENSE.txt for copying permission.
*/
#ifndef KKE_ARGPARSER_HPP
#define KKE_ARGPARSER_HPP
#include "IO/Argument.hpp"
#include "Interface/INoncopyable.hpp"
#include "Utilities/FNV1aHash.hpp"
#include "Utilities/Singleton.hpp"
#include <string>
#include <unordered_... |
C | UTF-8 | 408 | 3.09375 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main()
{
int nums[] = {-1,0,1,2,-1,-4};
int numsSize = sizeof(nums)/sizeof(nums[0]);
int** ret = NULL;
int retSize = 0;
int i;
ret = threeSum(&(nums[0]),numsSize,&retSize);
if(ret){
for(i = 0; i < retSize; i++){
printf("ret[%d] = %d\t%d\t%d\n"... |
Markdown | UTF-8 | 1,732 | 2.578125 | 3 | [] | no_license | # Secret Task Force - Wireframe (IECSE)
> Developer : S Sitaraman (a.k.a hackerbone), Team ID : 57744 (Solo)
- Designed a responsive Cartel themed minimalist website for the given prompt. The website is hosted currently on netlify. [Site Link](https://stf-hackerbone.netlify.app/)
- Frameworks and Software used : Rea... |
Java | UTF-8 | 376 | 2.59375 | 3 | [] | no_license | package com.xuke.unit.api.stringdemo;
public class StringApiDemo {
public static void main(String[] args) {
byte[] bt= {97,98,99,100};
String str=new String(bt);
System.out.println(str);
//int offset, int length
String str2=new String(bt,0,2);
System.out.println(str2);
String str3=new String(new ... |
Java | UTF-8 | 181 | 1.664063 | 2 | [] | no_license | package com.yourplace.custom.reservation.service;
import com.yourplace.custom.reservation.vo.ReviewVO;
public interface ClickedReviewService {
void clickedReview(ReviewVO vo);
}
|
Python | UTF-8 | 4,521 | 2.6875 | 3 | [
"MIT"
] | permissive | import re
import os
from pymongo import MongoClient
from tqdm import tqdm
import datetime
MongoUrl = "xxx"
# 清洗库
res_kb_process = "xxxx"
res_kb_process_expert = "xxxx"
dir_path = os.path.dirname(__file__)
class ExperienceExtractor(object):
def __init__(self):
self.load_experience_position()
... |
Shell | UTF-8 | 1,163 | 3.078125 | 3 | [] | no_license | ### VI mode ###
bindkey -v
#bindkey '^R' history-incremental-search-backward
#bindkey '^P' up-history
#bindkey '^N' down-history
#bindkey '^w' backward-kill-word
#bindkey '^a' beginning-of-line
#bindkey '^e' end-of-line
bindkey "^Q" push-line
### Zsh options ###
setopt promptsubst
setopt append_history
setopt share_hi... |
Ruby | UTF-8 | 1,377 | 3.359375 | 3 | [
"MIT"
] | permissive | # SYNOPSIS
# Provides a set of position sizing methods featuring
# - Kelly criteria
# - Optimal F
# - Secure F
# - Fractional F
# - Percent (from available margin).
#
# First release: Cássio Jandir Pagnoncelli (cassiopagnoncelli@gmail.com)
# Licence: MIT.
#
class PositionSizing
attr_accessor :account ... |
Python | UTF-8 | 745 | 2.625 | 3 | [] | no_license | from benchopt import BaseObjective
import numpy as np
class Objective(BaseObjective):
name = "Total Variation"
parameters = {
'reg': [.1],
'lmbd': [1., 0.01]
}
def __init__(self, reg=.1, lmbd=.1):
self.lmbd = lmbd
self.reg = reg
def set_data(self, X, y):
... |
Markdown | UTF-8 | 2,111 | 3.203125 | 3 | [] | no_license | Cinch is a Javascript source transformation tool. It allows you to write asynchronous, non-blocking code in a clean, synchronous form.
Cinch modules use the extension `.js_` and contain regular Javascript syntax, with one bonus. The Cinch engine will transform any function whose name ends in an underscore into async... |
Python | UTF-8 | 1,365 | 3.21875 | 3 | [] | no_license | import hub
rollcorrection = 5 # Compensate for 0 position not being O
pitchcorrection = 5 # Compensate for 0 position not being O
pitchmotor= hub.port.E
rollmotor= hub.port.F
# Normalizes PWM values. For positive values
# - clips values close to 0 to 0
# - clips small values to a minimum PWM value that ma... |
Java | UTF-8 | 677 | 1.9375 | 2 | [] | no_license | package com.ixonos.skillnet.logic.dao.impl;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.ixonos.skillnet.logic.bean.GroupMember;
import com.... |
Markdown | UTF-8 | 741 | 2.5625 | 3 | [] | no_license | # EasyFinance
This is Web server of Easy Finance , an individual finacial management application.
Easy finance is my graduation project, it includes a Web application and an iOS Application.
- Platform: Web & iOS
- Programming Languages: Java, JavaScript, Objective-C
- Supported Languagues: English.
- Features
- Ma... |
C++ | UTF-8 | 797 | 3.265625 | 3 | [] | no_license | #pragma once
using namespace std;
#include <string>
#include <iostream>
class Student
{
public:
Student(int, string, float);
void display();
protected:
int num;
string name;
float score;
};
Student::Student(int n,string nam,float s) {
num = n;
name = nam;
score = s;
}
void Student::display() {
cout << "st... |
JavaScript | UTF-8 | 1,172 | 2.765625 | 3 | [] | no_license | require('../spec.helper')
describe("BMICalculator metric", function() {
let calculator;
let person;
beforeEach(function() {
person = new Person({weight: 90, height: 186});
calculator = new BMICalculator();
});
it ("calculates BMI for a person using metric method", function() {
... |
Java | UTF-8 | 951 | 2.546875 | 3 | [] | no_license | package com.altunsoy.customer;
import lombok.Setter;
@Setter
public class CustomerService {
private CustomerRepository customerRepository;
private NotifiCationService notifiCationService;
public CustomerRepository getMusteriRepository() {
return customerRepository;
}
public void deletecustomer(Integer must... |
JavaScript | UTF-8 | 1,215 | 2.609375 | 3 | [] | no_license | var matches =
"msMatchesSelector" in Element.prototype ? "msMatchesSelector" :
"webkitMatchesSelector" in Element.prototype ? "webkitMatchesSelector" :
"matches";
var util = module.exports = {
wait(duration, callback) {
setTimeout(callback, duration || 400);
},
addClass(element, name) {
element.cla... |
Java | UTF-8 | 1,307 | 2.40625 | 2 | [
"Apache-2.0"
] | permissive | /*
Copyright 2019 Fausto Spoto (fausto.spoto@univr.it)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
Python | UTF-8 | 1,875 | 3.078125 | 3 | [] | no_license | # Actualizar registro o fila existente.OK
import fdb
import numpy as np
import pandas as pd
from tkinter import *
def actualizar(id,nom):
con = fdb.connect(
dsn='localhost:C:/data/FILM.FDB',
user='SYSDBA', password='udelas')
cursor = con.cursor()
#OJO: todo el query debe estar contenido entre doble... |
Markdown | UTF-8 | 13,961 | 2.96875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | # Options Strategy Structure
!!! Links
- **[List of Strategies](index.md)**
- **[Strategy Design (workflow of a strategy)](../pyalgotrad/structure.md)**
## 1. Initial steps
i. Create a new strategy file with a unique file name.
eg: strategy_```<developer_initials>```_options_ema_crossover.py
!!!Note... |
SQL | UTF-8 | 5,556 | 4.3125 | 4 | [] | no_license |
-- @@ 생성시 제약조건 설정
-- emp02 테이블 생성
DROP TABLE IF EXISTS emp02;
CREATE TABLE emp02 (
empno decimal(4,0)
, eanme nvarchar(15)
, sal decimal(7,2)
, comm decimal(7,2)
, job nvarchar(4)
, deptno decimal(2,0)
);
-- emp03 테이블 생성
-- empno 에 not null 조건 설정.
-- ename 에 not null 조건 설정.
DROP TABLE IF EXIST... |
Shell | UTF-8 | 1,090 | 3.546875 | 4 | [] | no_license | # make docker audit information
date +"%Y-%m-%d_%H-%M-%S" > $DOCKER_DIR/01_BUILD_DATE.var
echo $BASE_IMAGE > $DOCKER_DIR/02_BASE_IMAGE.var
echo $IMAGE_NAME > $DOCKER_DIR/03_IMAGE_NAME.var
echo $IMAGE_VERSION > $DOCKER_DIR/04_IMAGE_VERSION.var
echo $GIT_COMMIT > $DOCKER_DIR/05_GIT_COMMIT.var
#add docker info to a hist... |
Java | UTF-8 | 294 | 1.890625 | 2 | [
"Apache-2.0"
] | permissive | package ai.labs.lifecycle;
import ai.labs.memory.IConversationMemory;
/**
* @author ginccc
*/
public interface ILifecycleManager {
void executeLifecycle(final IConversationMemory conversationMemory) throws LifecycleException;
void addLifecycleTask(ILifecycleTask lifecycleTask);
}
|
Python | UTF-8 | 898 | 3.078125 | 3 | [] | no_license | import os
import re
import random
import time
def insertionSort(dataArray, numToAdd):
dataArray.append(numToAdd)
counter = (len(dataArray)-1)
if counter <= 0:
return dataArray
else:
while dataArray[counter] < dataArray[counter-1] and counter > 0:
tempValStore = dataArray[coun... |
Shell | UTF-8 | 825 | 3.09375 | 3 | [] | no_license | #!/bin/sh
gcc nwrites_to_crash.c -o nwrites_to_crash
#set_crash sets n_writes_to_crash
./ nwrites_to_crash 4
cd test
#For each of the following commands, nwrites_to_crash decrements by 1
#But all commands are executed normally
echo 'hello' >> hello.txt
echo 'hi' > color.txt
ln world.txt copy_of_world.txt
ln -s ... |
Java | UTF-8 | 3,090 | 2.4375 | 2 | [
"Apache-2.0"
] | permissive | package ru.intertrust.cm.core.business.api.dto.impl;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import ru.intertrust.cm.core.model.FatalException;
import static org.junit.Assert.assertEquals;
/**
* @author vmatsukevich
* Date: 9/18/13
* Time: 11:29 AM
... |
Python | UTF-8 | 1,788 | 2.84375 | 3 | [
"MIT"
] | permissive | import matplotlib.pyplot as plt
import torch
import numpy as np
def valid(data):
if data is None:
return False
if data.x is None:
return False
if data.x.shape[1] == 0:
return False
return True
def generate_histc(dataset):
ini_val = np.float64(0.0)
num_pairs = []
pos... |
Python | UTF-8 | 607 | 2.828125 | 3 | [] | no_license | import argparse
# 处理命令行
parser = argparse.ArgumentParser()
parser.add_argument("-n", dest="n", type=int, help="Number of events")
parser.add_argument("-g", "--geo", dest="geo", type=str, help="Geometry file")
parser.add_argument("-o", "--output", dest="opt", type=str, help="Output file")
args = parser.parse_args()
im... |
Java | UTF-8 | 486 | 3.40625 | 3 | [] | no_license | package javawork;
import java.util.*;
public class ex15 {
public static void main(String[] args) {
/* Write a program to calculate the sum of the digits of a 3-digit number.
Number : 132 Output : 6*/
Scanner sc = new Scanner(System.in);
System.out.println("Enter a 3 digit no");
... |
Java | UTF-8 | 3,407 | 1.875 | 2 | [] | no_license | package com.girfa.apps.wifitalkie.helper;
import java.lang.reflect.Method;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.... |
Java | UTF-8 | 3,725 | 2.53125 | 3 | [] | no_license | package com.learning.springreactive.inventory_reactive;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.data.mongo.DataMong... |
Python | UTF-8 | 745 | 3.46875 | 3 | [
"MIT"
] | permissive | # Max Consecutive Ones
# https://leetcode.com/explore/learn/card/fun-with-arrays/521/introduction/3238
class Solution:
def findMaxConsecutiveOnes(self, nums):
start_pos = 0
end_pos = 0
max_len = 0
pos = 0
while (pos < len(nums)):
if nums[pos] == 1:
... |
Java | UTF-8 | 961 | 2.234375 | 2 | [
"Apache-2.0"
] | permissive | package service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import io.web.LoadFile;
/**
* Se... |
Java | UTF-8 | 982 | 2.1875 | 2 | [] | no_license | package com.example.ranggarizky.nami.model;
/**
* Created by ranggarizky on 1/30/2017.
*/
public class Kartu {
private String xl,telkomsel,ooredo,axis,tri,other;
public void setAxis(String axis) {
this.axis = axis;
}
public void setOoredo(String ooredo) {
this.ooredo = ooredo;
... |
PHP | UTF-8 | 7,199 | 2.734375 | 3 | [] | no_license |
<?php
$m_inspection = new controllerClass(); // instantiate in controllerClass object
$inspection_validation = array('plqinsp_date', 5, 'date', 'plqinsp_comments', 5, 'comments',
'fkvendor_id', 2, 'vendor', 'fkplaqueinspectiontype_id', 2, 'inspection type');
$result = $m_inspection->getPlaqueByID($_GET['id']); ... |
JavaScript | UTF-8 | 752 | 2.96875 | 3 | [] | no_license | //Obtener los elementos de la clase .close
let links = document.querySelectorAll(".close");
//Recorrerlos
links.forEach(function(link) {
//Agregar un evento click a cada uno de ellos - case sensitive
link.addEventListener("click", function(ev) {
ev.preventDefault();
let content = document.querySelector('... |
Markdown | UTF-8 | 544 | 2.78125 | 3 | [] | no_license | # Food Recipe Web-scraper
This project was created to develop a solution to a constant problem I've had:
You have certain ingredients available in your pantry, but you're unsure as to what you can make.
The food recipe web-scraper (currently) takes in a single ingredient and returns the top 20 recipes from [allrecipes... |
C++ | UTF-8 | 1,874 | 2.59375 | 3 | [] | no_license | /*
* CLProgramManager.cpp
*
* Created on: Apr 27, 2011
* Author: tychi
*/
#include "CLProgramManager.h"
#include "Buffer/IntermediateResultBuffersManager.h"
#include <boost/foreach.hpp>
namespace Flewnit
{
CLProgramManager::CLProgramManager( bool useCacheUsingOpenCLImplementation)
:
mIntermediateResu... |
Java | UTF-8 | 16,647 | 1.804688 | 2 | [] | no_license | package com.helloyuyu.routerwrapper.compiler;
import android.support.annotation.NonNull;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javap... |
Markdown | UTF-8 | 494 | 2.671875 | 3 | [] | no_license | #Bongo Dashboard
Use Nodejs to create a simple Real Time Dashboard.
Convert HTTP POST in to a socket event sent to browser.

##Events Emulator
Run Order emulator
```
node run order_example.js
```
##Server
Run Dashboard Server
```
node run app.js
```
##Mongo DB
You need to ... |
C++ | UTF-8 | 3,133 | 3.296875 | 3 | [] | no_license | #ifndef BOARDMANAGER_H
#define BOARDMANAGER_H
#include "board.h"
#include "../file/filemanager.h"
#include "../file/boarddata.h"
/** \brief Class managing the board and communicating with UI.
*/
class BoardManager
{
public:
/** \brief Standard constructor returning new BoardManager object.
*/
BoardMan... |
PHP | UTF-8 | 2,920 | 2.8125 | 3 | [] | no_license | <?php
class Image extends fActiveRecord {
protected $file;
protected function configure() {
//
}
public function genId(){
// Generate random UUIDs until it is unique
while(1) {
$uuid = '';
while (strlen($uuid) < CI_UUID_LENGTH){
$uuid .= substr(CI_UUID_CHARS, rand(0,strlen(CI_UUID_CHAR... |
C# | UTF-8 | 2,885 | 2.609375 | 3 | [] | no_license | using System;
using System.Reflection;
using NTools.Logging.Log4Net;
namespace NTools.Core.Reflection {
/// <summary>
/// Abstract base class for member access by reflection.
/// </summary>
[Serializable]
public abstract class MemberReflector {
private static readonly ITraceLog s_log = TraceLogManager.Ge... |
Java | UTF-8 | 2,128 | 2.125 | 2 | [] | no_license |
package net.wit.entity;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import... |
Java | UHC | 993 | 3.84375 | 4 | [] | no_license | package workbook.StepA;
import java.util.Scanner;
public class A7_GigaToByte {
private int gigabytes;
private int megabytes;
private int kilobytes;
private long bytes;
/** **/
public A7_GigaToByte() {
input();
}
/** **/
public void printResult() {
System.out.println("ԷϽ 뷮");
Sys... |
Python | UTF-8 | 466 | 3.5 | 4 | [] | no_license | from turtle import *
def draw_square():
i = 0
j = 9
iteration = 1
while(iteration < j):
for iteration in range(1, j):
while (i < 4):
forward(30)
right(90)
i += 1
forward(30)
i = 0
j -= 1
iterati... |
Java | UTF-8 | 801 | 1.859375 | 2 | [] | no_license | package com.internexa.dynamics.steps;
import com.internexa.dynamics.pageObjects.LoginDynamicsPage;
import net.thucydides.core.annotations.Step;
public class LoginDynamicsSteps {
LoginDynamicsPage loginDynamicsPage;
@Step
public void login_dynamics(String strUsuario, String strPass) {
//Paso Com... |
Markdown | UTF-8 | 801 | 3.09375 | 3 | [] | no_license | # mongoose-transaction256
package for mongoose transaction (based on mongoose transaction)
Use ```npm install mongoose-transaction256``` to install package
then
```
const transaction = require('mongoose-transaction256');
const ModelName1 = require('./models/x'); // ModelName is your model for example : User, Restaur... |
Java | UTF-8 | 1,761 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | package dev.jpestana.mifitanalyzer.DataImporter.Entities;
import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.Objects;
@Entity
@Table(name = "activityminute")
public class ActivityMinute {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id... |
C++ | UTF-8 | 592 | 2.625 | 3 | [] | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int n;
cin>>n;
long long a;
vector<long long> v;
for(int i=1;i<=n;i++)
{
scanf("%lld",&a);
v.push_back(a);
}
int ans=0;
for(int i=1;i<v.size();)
{ /*cout<<v[i-1]<<' '<<v[i]<<' ... |
Java | UTF-8 | 12,390 | 3.09375 | 3 | [] | no_license | package University;
import java.util.ArrayList;
import java.util.Scanner;
public class Student extends User
{
private String nric;
ArrayList<Marks> mark = new ArrayList<>();
/**
* Creates a student based on various attributes
**/
public Student(int studId, String studFName, String studLName, String studEma... |
Python | UTF-8 | 8,691 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | from __future__ import division
import abc
import collections
import math
import sys
import numpy as np
import tensorflow as tf
EpsDelta = collections.namedtuple("EpsDelta", ["spent_eps", "spent_delta"])
class MomentsAccountant(object):
"""Privacy accountant which keeps track of moments of privacy loss.
Note: ... |
Java | UTF-8 | 631 | 1.992188 | 2 | [
"Apache-2.0"
] | permissive | package com.algorand.auction.rest.request;
import java.math.BigDecimal;
public class PlaceBidRequest {
private String token;
private BigDecimal amount;
private int auctionId;
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amou... |
PHP | UTF-8 | 1,181 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
Python | UTF-8 | 1,621 | 2.59375 | 3 | [] | no_license | from ptpython import *
from fake_useragent import UserAgent
from selenium import webdriver
from bs4 import BeautifulSoup as BS
import requests
import pandas as pd
df = pd.read_excel('Final_Table.xlsx')
url_1 = 'https://www.google.com/search?q='
url_2 = 'https://www.firmenwissen.de/index.html'
ua = UserAgent()
header... |
SQL | UTF-8 | 2,289 | 3.53125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `db_dev_doctor_labelling`.`user` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`email` VARCHAR(255) NULL DEFAULT NULL,
`name` VARCHAR(255) NULL DEFAULT NULL,
`password` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 2
DEFAULT CHARACTER SET = utf8
COLLA... |
JavaScript | UTF-8 | 1,258 | 2.84375 | 3 | [] | no_license | import { YoutubeApi } from './YoutubeApi.js';
import { Card } from './Card.js';
import { Section } from './Section.js';
import { searchForm, elementsList, input, keywordElem } from './constants.js';
//создание экземпляра класса YoutubeApi
export const youtubeApi = new YoutubeApi ({
baseUrl: 'https://www.googleapis.c... |
Markdown | UTF-8 | 10,729 | 2.84375 | 3 | [] | no_license | title: PyCharm - HotKeys!
---
body:
***
###Работа с закладками:
| |
|---------------------------------------------------------------------------------------|
|Поставить или снять закладку |**F11*... |
Python | UTF-8 | 1,877 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | """Univariate repeated measures ANOVA
Rutherford (2001) Examples, cross-checked results:
factorial anova
Independent Measures (p. 53):
SS df MS MS(denom) df(denom) F p
-------------------------------------------------------------------------
A 432.00 1 ... |
Java | UTF-8 | 509 | 1.9375 | 2 | [] | no_license | package com.floatinvoice.business.dao;
import com.floatinvoice.messages.BaseMsg;
import com.floatinvoice.messages.RegistrationStep2CorpDtlsMsg;
import com.floatinvoice.messages.RegistrationStep3UserPersonalDtlsMsg;
public interface RegistrationDao {
BaseMsg registerSignInInfo(String userEmail, String passwo... |
Java | UTF-8 | 2,200 | 2.453125 | 2 | [] | no_license | package ajax.jquery.autocomplete;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import ajax.... |
TypeScript | UTF-8 | 3,117 | 2.546875 | 3 | [
"MIT"
] | permissive | import * as GamesConfig from './games.config.json';
import {Module} from '../../libs/module';
import Game2048 from './2048/2048.game';
import BlockrainGame from "./blockrain/blockrain.game";
import TowerGame from './tower/tower.game';
import * as $ from 'jquery';
import template from './games.template.html';
export de... |
C++ | UTF-8 | 223 | 2.78125 | 3 | [] | no_license | #pragma once
template <class Pred, class It>
size_t CountIf(It first, const It last, Pred const & pred)
{
size_t result = 0;
for (; first != last; ++first)
{
if (pred(*first))
{
++result;
}
}
return result;
} |
Python | UTF-8 | 297 | 4.125 | 4 | [] | no_license | # To take input from user we use input() function
name = input("Enter your name: ")
print("Hello "+name)
# input(Always takes input as a string)
age=input("Enter your age: ") # This age is in String
print("Your age is "+age) # Agr age int mn huta tou ye concatenate ni huta
|
Java | UTF-8 | 620 | 2.90625 | 3 | [] | no_license | import java.io.*;
/******************************************************
The main class used to test LexemeGenerator.
******************************************************/
class main
{
public static void main(String[] args) throws IOException
{
File f = null;
if(args.length <1)
{
System.err.println("Us... |
C++ | UTF-8 | 2,881 | 3.59375 | 4 | [] | no_license | #include<iostream>
#include<vector>
#include<map>
#include<math.h>
using namespace std;
class Apothecary{
public:
vector<int> balance(int W){
//// (1) check about how many objects are needed to measure the weight
// proposition:
// x can be represented just by {i_1, ..., i_n}
// ... |
C# | UTF-8 | 538 | 2.796875 | 3 | [] | no_license | using BooleanRegisterUtilityAPI.BoolParsingToken.LogicBlock;
namespace BooleanRegisterUtilityAPI
{
public class LessDuoLogic : DoubleLogicBlock
{
public LessDuoLogic(LogicBlock left, LogicBlock right) : base(left, right)
{
}
public override bool ComputedBoolean(bool vl, bool v... |
Python | UTF-8 | 3,544 | 3.09375 | 3 | [] | no_license | class Constellation():
def __init__(self):
pass
def __str__(self):
returnStr = f"""
Name : {self.GetName()}\n
IAU Abbriviation : {self.GetIAU()}\n
Right ascension start in time : {self.GetRAStartTime()}\n
Right ascension end in time : {self.GetRAEndTime()}\n
Right ascension start in degre... |
Java | UTF-8 | 3,910 | 2.15625 | 2 | [] | no_license | package tech.qijin.cell.im.test;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import tech.qijin.cell.im.base.*;
import tech.qijin.cell.im.base.MessageSendBo;
import tech.qijin.cell.im.db.model.ImMessage;
import tech.qijin.cell.im.service.CellImMessageSe... |
Java | UTF-8 | 387 | 1.890625 | 2 | [] | no_license | package com.dao;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import com.entity.Note;
public interface NoteDao extends JpaRepository<Note, Integer> {
public Note findById(Integer id);
public Page<Note... |
Shell | UTF-8 | 314 | 2.515625 | 3 | [
"MIT"
] | permissive | # -*- mode: sh -*-
# vim: set ft=sh:
function zpwrFasdFList(){
fasd -f |& perl -lne 'for (reverse <>){do{($_=$2)=~s@$ENV{HOME}@~@;print} if m{^\s*(\S+)\s+(\S+)\s*$}}' |
eval "$ZPWR_FZF -m --no-sort --border $FZF_CTRL_T_OPTS" |
perl -pe 's@^([~]*)([^~].*)$@$1"$2"@;s@\s+@ @g;'
}
zpwrFasdFList "$@"
|
Java | UTF-8 | 9,575 | 2.171875 | 2 | [] | no_license | package com.yunda.jcbm.webservice;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import com.yunda.frame.util.ExceptionUtil;
import com.yu... |
Markdown | UTF-8 | 1,780 | 4.03125 | 4 | [] | no_license | # 797. All Paths From Source to Target
#### [link](https://leetcode.com/problems/all-paths-from-source-to-target/)
#### Description
Given a directed, acyclic graph of `N` nodes. Find all possible paths from node `0` to node `N-1`, and return them in any order.
The graph is given as follows: the nodes are 0, 1, ...... |
JavaScript | UTF-8 | 932 | 2.96875 | 3 | [] | no_license | import React, {Component} from 'react';
class Counter extends Component {
state = {
count: 0
};
increaseHandler = () => {
const count = this.state.count + 1;
console.log("increasing count")
this.setState ({
count
})
}
decreaseHandler = () ... |
C++ | UTF-8 | 458 | 3.078125 | 3 | [] | no_license | #include<stdio.h>
#include<iostream>
using namespace std;
void pr(int o,int n)
{
if(n<=o)
{
cout<<n<<" ";
pr(o,n+5);
}
}
void print(int o,int n)
{
if(n<=0)
{
pr(o,n);
return;
}
cout<<n<<" ";
print(o,n-5);
}
int main()
{
int t;
ci... |
Java | UTF-8 | 3,596 | 2.40625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2010 , 2014 Thorsten Frank (accounting@tfsw.de).
*
* 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
*
* ... |
C++ | UTF-8 | 1,100 | 3.015625 | 3 | [] | no_license |
#include <stdio.h>
#include <avr/io.h>
#define StepPin 22
#define DirPin 24
#define Slp 26
int stepset=0;
int stepspd = 1000;
void setup()
{
pinMode(StepPin,OUTPUT);
pinMode(DirPin,OUTPUT);
pinMode(Slp,OUTPUT);
digitalWrite(Slp,LOW);
}
void loop()
{
A_clockwise();
delay(1000);
clockwise();
del... |
JavaScript | UTF-8 | 466 | 2.859375 | 3 | [] | no_license | var colisoes = 0;
var passos_no_tempo = 10000;
function setup() {
createCanvas(windowWidth,200);
background(55);
bloco1 = new Bloco(100,0,1,50); //posi x, vel, massa, lado
bloco2 = new Bloco(300,-2/passos_no_tempo,1,100);
}
function draw() {
background(55);
for(var i = 0; i<passos_no_tempo; i++){
... |
Python | UTF-8 | 4,427 | 3.390625 | 3 | [] | no_license | import os
# the program will first ask for password and username
pass_word= input("Enter your password : ")
user_name= input("Enter your username : ")
#then take the password and username intered and check if they are available
#the program will display the invail text if they are not correct until user enters co... |
Python | UTF-8 | 2,128 | 2.734375 | 3 | [] | no_license | from django.core.management.base import BaseCommand, CommandError
# import the necessary packages
# from picamera.array import PiRGBArray
# from picamera import PiCamera
import picamera
import picamera.array
import time
import cv2
import imutils
import numpy as np
class Command(BaseCommand):
help = 'Start captu... |
SQL | UTF-8 | 8,839 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 28, 2019 at 03:22 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SQL | UTF-8 | 1,720 | 4.0625 | 4 | [] | no_license | SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia')
SELECT name FROM world WHERE continent = 'Europe'
AND gdp / population > (SELECT gdp/population FROM world WHERE name = 'United Kingdom')
SELECT name, continent FROM world
WHERE continent IN(SE... |
Java | UTF-8 | 619 | 2.40625 | 2 | [
"MIT"
] | permissive | package com.noxception.midisense.interpreter.rrobjects;
import com.noxception.midisense.config.dataclass.RequestObject;
import java.util.UUID;
public class ProcessFileRequest extends RequestObject {
/** ATTRIBUTE */
private final UUID fileDesignator; //unique identifier for file
/**
* CONSTRUCTOR
... |
Rust | UTF-8 | 505 | 3.046875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | use tranche::BasedTranche;
fn do_test<T>(slice: &impl AsRef<[T]>) {
let mut tranche = BasedTranche::new(slice);
assert_eq!(tranche.offset(), 0);
tranche.take_first().unwrap();
assert_eq!(tranche.offset(), 1);
tranche.take_front(2).unwrap();
assert_eq!(tranche.offset(), 3);
}
#[test]
fn test_... |
C++ | UTF-8 | 7,873 | 4.03125 | 4 | [] | no_license | //Justin Foster - CS303 Lab 3
//Implementing these functions using a premade stack + queue implemented with vectors
#include<iostream>
#include<vector>
#include<string>
using namespace std;
//Stack implementation
class my_Stack {
private:
int size;
int back;
vector<int> vec;
public:
my_Stack() {
size = 0;
bac... |
Java | UTF-8 | 1,931 | 2.9375 | 3 | [] | no_license | package it.uniclam.db;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* Connessione DB con JDBC driver
*
*/
public class DBUtility {
public static final String DRIVERNAME = "com.mysql.jdbc.... |
Java | UTF-8 | 9,571 | 1.726563 | 2 | [] | no_license | package com.agnet.leteApp.fragments.main.sales;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import androi... |
Java | UTF-8 | 5,042 | 1.914063 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2018 Hippo B.V. (http://www.onehippo.com)
*
* 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 applic... |
JavaScript | UTF-8 | 775 | 3.90625 | 4 | [] | no_license | /**
* Shifts an encryped Caesar cipher back to decode it.
* Takes in a numeric value to shift the str parameter to the left by,
* wrapping around for any ascii value below 65.
*
* @param {Number} shift - A number to shift the cipher by
* @param {String} str - A string parameter
* @returns {String} - Returns a d... |
Java | UTF-8 | 401 | 1.859375 | 2 | [] | no_license | package yuweixiang.first.dal.daointerface;
import yuweixiang.first.dal.dataobject.OrderFeeDO;
public interface OrderFeeDOMapper {
int deleteByPrimaryKey(Long id);
int insert(OrderFeeDO record);
int insertSelective(OrderFeeDO record);
OrderFeeDO selectByPrimaryKey(Long id);
int updateByPrimaryK... |
C++ | UTF-8 | 4,893 | 3.28125 | 3 | [] | no_license | //
// SingleLinkedList.cpp
// DoubleLinkedListImpl
//
// Created by Sumanth Sai on 9/30/16.
// Copyright © 2016 Sumanth Sai. All rights reserved.
//
#include <iostream>
#include "SingleLinkedList.h"
using namespace std;
//This Method appends data to the list
void LinkedList::append(int item){
str = new S... |
JavaScript | UTF-8 | 1,418 | 2.734375 | 3 | [] | no_license | 'use strict'
const cheerio = require('cheerio')
const writeFile = require('fs')
const request = require('request')
const parseGameInfo = (title) => {
let atIndex = title.indexOf(' at ')
let boxIndex = title.indexOf('Box Score')
let hocIndex = title.indexOf('Hockey')
return {
date : title.substring(boxInde... |
Python | UTF-8 | 245 | 3.0625 | 3 | [
"MIT"
] | permissive | import openpyxl
class Excel:
def __init__(self, file_path):
wb = openpyxl.load_workbook('file_path')
self.sheet = wb.get_sheet_by_name('Лист1')
def get_value(self, position):
return self.sheet[position].value |
PHP | UTF-8 | 1,012 | 2.90625 | 3 | [] | no_license | <?php
namespace SsoSdk;
/**
* soap header验证需要的信息载体
*
* @author jiang <mylampblog@163.com>
*/
abstract class AbstractSoapHeaderInfo {
/**
* soap header所需要的参数
*
* @var array
*/
public $headerUser;
/**
* soap header所需要的参数
*
* @var array
*/
public $headerPas... |
JavaScript | UTF-8 | 1,418 | 2.734375 | 3 | [] | no_license | import React from 'react'
import { Cell } from 'fixed-data-table'
export default class StatCell extends React.Component {
constructor() {
super()
this.timer = null
this.state = {
className: ''
}
}
componentWillReceiveProps(nextProps) {
if (nextProps.value > this.props.value) {
... |
C++ | UTF-8 | 692 | 2.625 | 3 | [] | no_license | //
// Filter.hpp
//
//
// Created by Martino Milani on 26.05.19.
//
#ifndef Filter_h
#define Filter_h
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <iostream>
namespace py = pybind11;
class Filter{
// Abstract base class from which all filters have to inherit to obey the API.
// Fu... |
Python | UTF-8 | 11,710 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... |
Markdown | UTF-8 | 2,800 | 3.359375 | 3 | [] | no_license | # dynamic_calendar
A calendar that allows scheduling of dynamic events - Python3
Modules Used:
functools in 'models/events.py' - line 6, 20-30, 65, 75-79
datetime in 'models/events.py' - line 6, 20-30, 65, 75-79, 138-234
flask in server.py - line 8-243
pymongo - line 10-11, 53-67, etc.
bson - line ... |
TypeScript | UTF-8 | 511 | 2.796875 | 3 | [] | no_license | export enum StatusEnum {
Correct = 'Correct',
Wrong = 'Wrong',
AlmostCorrect = 'AlmostCorrect',
}
export interface IGameState {
grid: GridType
noise: string[]
solution: string[]
size: number
}
export interface INavigationState {
currentPage: string
}
export interface IStoreState {
game: IGameState
... |
Java | UTF-8 | 7,134 | 2.6875 | 3 | [] | no_license | package fmi.informatics.gui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.