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 |
|---|---|---|---|---|---|---|---|
Rust | UTF-8 | 1,647 | 3.140625 | 3 | [
"MIT"
] | permissive | use crate::code::exp::{ExpLoc, Exp, find_range, SourceRange};
use crate::code::translator::Context;
use crate::{Encode, write_array};
use std::fmt::Write;
use anyhow::Error;
/// Return expression.
#[derive(Debug)]
pub struct Ret<'a> {
/// Result tuple.
pub ret_list: Vec<ExpLoc<'a>>,
/// is explicit return ... |
TypeScript | UTF-8 | 2,764 | 2.765625 | 3 | [
"MIT"
] | permissive | /// <reference path='../../Typings/tsd.d.ts' />
module Orckestra.Composer {
/**
* Separates the logic that retrieves the data and maps it to the entity model from the application services that acts on the model.
*/
export interface ICartRepository {
/**
* Get the cart of the current... |
C++ | UTF-8 | 2,253 | 3.515625 | 4 | [
"MIT"
] | permissive | /*********
-*- Made by VoxelPixel
-*- For YouTube Tutorial
-*- https://github.com/VoxelPixel
-*- Support me on Patreon: https://www.patreon.com/voxelpixel
*********/
#include <iostream>
#include <sstream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
void cipherEncryption(){
stri... |
Java | UTF-8 | 1,275 | 2.734375 | 3 | [] | no_license | package by.bsuir;
import by.bsuir.autobase.entity.*;
import by.bsuir.autobase.presentation.View;
import java.io.*;
public class Main {
public static void main(String[] args){
View.chooseActionLoop();
}
private static AutoBase loadAutoBase()
{
try(
// Reading the ob... |
Markdown | UTF-8 | 562 | 2.5625 | 3 | [] | no_license | +++
title = "Awesome terminal emulator for Windows"
date = "2014-12-02 21:15:37"
categories = [
"CLI"
]
+++
Cmder is a software package created out of pure frustration over the absence of nice console emulators on Windows. It is based on amazing software, and spiced up with the Monokai color scheme and a custom pr... |
Python | UTF-8 | 2,114 | 2.546875 | 3 | [] | no_license | import torch
from torch.nn import Module, Parameter
from torchgibbs.log_pdf import normal_log_pdf
class DistributionSampler(Module):
def sample(self, *inputs):
pass
class GaussianMixtureMultinomial(DistributionSampler):
def __init__(self, means, cov=None):
super().__init__()
self.me... |
PHP | UTF-8 | 3,607 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use CodeIgniter\Controller;
use App\Models\producto;
class Productos extends Controller{
public function index() {
$producto=new Producto();
$datos['productos']=$producto->orderBy('codigo','ASC')->findAll();
$datos['cabecera']=view('templates... |
C++ | UTF-8 | 3,354 | 2.546875 | 3 | [
"MIT"
] | permissive | #include "debug.h"
#include "core\concurrency\concurrency.h"
#include "core\helper\timer.h"
#include "core\string\string.h"
#include "core\common\version.h"
#include "core\container\staticArray.h"
#include "core\platform\platform.h"
#include <stdarg.h>
#include <stdexcept>
#include <fstream>
#include <iostream>
#inclu... |
Java | UTF-8 | 7,007 | 1.625 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*******************************************************************************
* Copyright 2019 Huawei Technologies Co.,Ltd.
*
* 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
*
* ... |
Python | UTF-8 | 12,708 | 2.609375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
import asyncio
from time import sleep
from pprint import pprint, pformat
from statistics import median
from gpiozero import DigitalOutputDevice
import json
import logging
import sys
import subprocess
import datetime
import websockets
from w1thermsensor import W1ThermSensor
import sispm
logging.... |
JavaScript | UTF-8 | 626 | 2.578125 | 3 | [] | no_license | plugSimpleBar('#trades-table-fixed');
let tds = document.querySelectorAll('td, th');
let t = new Date();
new FlexTable('.trades-table');
t = new Date() - t;
let info = document.getElementById('box-info-run');
if (info) {
info.innerHTML = `Время работы скрипта: ${t} мс <br> количество ячеек в таблице ${tds.length}`... |
Markdown | UTF-8 | 6,153 | 3.390625 | 3 | [] | no_license | # 撒母耳记上 - 第二十章
1 大卫从拉玛的拿约逃跑而来,在约拿单面前说:「我作了什么?我有什么愆?在你父亲面前我犯的什么罪,他竟寻索我性命呢?」
2 约拿单对他说:「你绝对不至于死:我父亲作的,无论大小事,没有不向我披露的;为什么这事我父亲偏要对我隐瞒呢?决无此理。」
3 大卫回答(传统:又起誓)说:「你父亲准知道你跟我好;故此他心里说:『不如不叫约拿单知道这事,恐怕他担忧。』虽然如此,我指着永活的永恒主,也指着你的性命来起誓:我与死之间,只有一步之隔罢了。」
4 约拿单对大卫说:「你心里切愿(传统:说)着什么?我总要为你作成。」
5 大卫对约拿单说:「看哪,明天是初一,我不(传统:本... |
Python | UTF-8 | 2,988 | 2.578125 | 3 | [] | no_license | from math import *
class A2_node:
def __init__(self, t, l, r):
self.t = t
self.l = l
self.r = r
def __str__(self):
return "(A2_node: id=" + self.s + str(self.l) +", " + str(self.r) + ")"
def __repr__(self):
return str(self)
def spread(self, s, arr):
self.... |
C# | UTF-8 | 3,892 | 3.3125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp6
{
class SuDu
{
public SuDu()
{
}
public static int[][] arrray1;
public static int[][] getSuDu()
{
... |
Markdown | UTF-8 | 5,051 | 2.625 | 3 | [] | no_license | [Return to the index page](/using-cloud/) | [Print this page](https://gitprint.com/alphagov/using-cloud/blob/master/help-for-end-users/Trello/Using-Trello-securely.md)
***
## Using Trello securely
Government staff are responsible for checking the applications they use are secure. This guidance will help you use Trel... |
Markdown | UTF-8 | 704 | 2.625 | 3 | [] | no_license | # Учебное API "Test API"
### Установка:
1. Скачать репозиторий
2. Перейти в директорию с проектом
3. `npm install`
4. `npm start`
Cервер запустится по адресу http://localhost:7777
### API документация:
- GET /users - список пользователей
- GET /users/:id - пользователь с заданным id (от 1001 до 1004)
- POST /u... |
Python | UTF-8 | 702 | 3.171875 | 3 | [] | no_license | #!/usr/bin/python3
"""
Preventing SQL Injection
"""
import sys
import MySQLdb
def Selector():
"""
Selector with preventing SQL Injection
"""
username, password, database, state = sys.argv[1:]
db = MySQLdb.connect(host="localhost", user=username,
passwd=password, db=datab... |
Python | UTF-8 | 1,554 | 2.71875 | 3 | [] | no_license | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
from tkinter.ttk import Notebook
from tkcalendar import DateEntry
GUI = Tk()
GUI.title('Expense and Income Recorder')
GUI.geometry('700x500')
GUI.state('zoomed')
Tab = Notebook(GUI)
F1 = Frame(Tab,width=500 , height=500)
F... |
Java | UTF-8 | 620 | 2.984375 | 3 | [] | no_license | import javax.swing.JOptionPane;
public class euclidean {
public static void main(String[] args){
int d=0;
int i =1;
int a= Integer.parseInt(JOptionPane.showInputDialog(" silahkan masukkan bilangan petama = "));
int b= Integer.parseInt(JOptionPane.showInputDia... |
PHP | UTF-8 | 3,906 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the doctrine spatial extension.
*
* PHP 7.4 | 8.0
*
* (c) Alexandre Tranchant <alexandre.tranchant@gmail.com> 2017 - 2021
* (c) Longitude One 2020 - 2021
* (c) 2015 Derek J. Lambert
*
* For the full copyright and license information, please view the LICENSE
* file that was dis... |
Java | UTF-8 | 5,723 | 2.234375 | 2 | [] | no_license | package com.group1.booking.impl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configura... |
JavaScript | UTF-8 | 8,335 | 2.609375 | 3 | [] | no_license | /*
The code to build the resume will go here.
*/
//here bio object
var bio = {
"name" : "Modhi Saleh",
"role" : "front end Ninja",
"contacts" : {
"mobile": "0555555555",
"email": "modhi_saleh_92@hotmail.com",
"github": "ModhiSaleh",
"location": "Saudi Arabia-Riyadh"... |
Markdown | UTF-8 | 685 | 2.703125 | 3 | [] | no_license | ---
layout: singleidea
authors: [aosdict]
category: [vanilla]
tags: [luck, code internals]
---
Fuzz the turn on which Luck times out by hashing ubirthday together with (turns/300), and taking the result modulo 300. This means that Luck will still time out once every 300 turns, but the player can't predict the exact tur... |
Java | UTF-8 | 1,212 | 3.390625 | 3 | [] | no_license | package filter;
import java.io.PrintWriter;
import java.io.StringWriter;
public class ResponseBufferWriter extends PrintWriter{
public ResponseBufferWriter() {
super(new StringWriter(4096)); //이 super가 의미 하는 것은 PrintWriter.PrintWriter(Writer out)생성자이다.
//new StringWriter는 StringWriter 객체를 생성하면서 기본 객체인 out의 데이터... |
C# | UTF-8 | 951 | 2.9375 | 3 | [] | no_license | private System.Windows.Forms.PictureBox[] imgVictim = new PictureBox[3]; //array for victim images
public void victimsRun()
{
victimTimer.Enabled = true; //starts the timer
string fileName = "";
PictureBox[] victim = new PictureBox[3];
for (int i = 0; i < imgVictim.Length; i+... |
C# | UTF-8 | 1,533 | 2.75 | 3 | [] | no_license | namespace JiuJitsuNotes.Migrations
{
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using JiuJitsuNotes.Models;
using jiujitsuNotes.Models.NotesModel;
internal sealed class Configuration : DbMigrationsCon... |
Rust | UTF-8 | 407 | 2.921875 | 3 | [] | no_license | use std::thread;
use std::sync::{Arc, Mutex};
fn main() {
let data = Arc::new(Mutex::new(0));
let mut handles = vec![];
for _ in 0..5 {
let data = data.clone();
handles.push(thread::spawn(move || {
let mut data = data.lock().unwrap();
*data += 1;
}));
}
... |
JavaScript | UTF-8 | 620 | 3.46875 | 3 | [] | no_license | function f (array) {
let result = [];
for (let i = 0; i < array.length; i++) {
let currentRow = array[i].split(" -> ");
let currName = currentRow[0];
let currAge = Number(currentRow[1]);
let currGrade = currentRow[2];
let currStudent = {
name:currName,
... |
Markdown | UTF-8 | 6,386 | 2.578125 | 3 | [
"MIT"
] | permissive | ---
title: "구글 스프레드시트로 주식 정보 불러오기 완전 쉬워요~ (w/ Yahoo Finance)"
date: 2023-02-14
author: Astro36
category: javascript
tags: [google_sheets, google_finance, google_apps_script, gas, javascript]
thumbnail: /assets/posts/2023-02-14-google-sheet-stock-price/thumbnail.jpg
---
[구글 스프레드시트](https://www.google.com/intl/ko/sheets... |
Markdown | UTF-8 | 2,215 | 3.328125 | 3 | [] | no_license | # Instructable Read.me Part 1
## Ellen Morningstar (Previously Kearns, I know this is probably confusing)
**Overview** - I found this week to be a little more difficult due to proper structure. I struggled with getting my code to look perfect. I also have these weird large gap breaks between my codes that appear on m... |
Java | UTF-8 | 364 | 1.84375 | 2 | [] | no_license | package com.zuoyueer.dao;
import com.zuoyueer.domain.Departments;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author Zuoyueer
* Date: 2019/12/1
* Time: 14:53
* @projectName Framework
* @description: TODO
*/
public interface DepartmentsDao {
@Select("select * from departments"... |
Python | UTF-8 | 3,765 | 2.953125 | 3 | [
"MIT"
] | permissive | # -*- coding: utf-8 -*-
"""."""
import tkinter as tk
from tkinter.messagebox import showerror, showinfo
from style.material_design_colors import red
class UpdateUser(tk.Toplevel):
def __init__(self, master=None, data=None):
super().__init__(master)
self.master = master
self.user_data = da... |
Java | UTF-8 | 4,791 | 2.109375 | 2 | [] | no_license | /**
* This class is generated by jOOQ
*/
package am.ik.gitbucketoauth.jooq.tables.records;
import am.ik.gitbucketoauth.jooq.tables.IssueLabel;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record4;
import org.jooq.Row4;
import org.jooq.impl.UpdatableRecordImpl;
/**
* This class is g... |
Java | UTF-8 | 1,703 | 1.921875 | 2 | [
"Apache-2.0"
] | permissive | package com.mysticcoders.mysticpaste.web.pages.history;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
import org.apache.wicket.markup.html.navigation.paging.IPageable;
import org.apache.wicket.markup.html.navigation.paging.IPagingLabel... |
PHP | UTF-8 | 778 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Identimo\Storage;
use Identimo\Storage\Iterator\UserIterator;
use Identimo\User;
use YPHP\Storage\EntityStorage;
class UserStorage extends EntityStorage{
/**
* Create a new iterator from an ArrayObject instance
*
* @return UserIterator
*/
public function getIterator()
... |
C++ | GB18030 | 637 | 3.3125 | 3 | [] | no_license | /* ģ ɸ*/
/*dzŵ㷨*/
#include<iostream>
#include<cmath>
using namespace std;
bool flag[10000000];
int main()
{
int n,m,a;
cin>>n>>m;;
flag[1]=1;
flag[0]=1;
for(int i=2;i<=sqrt(n)+1;i++)//
{
if(flag[i]==0)//flag[i]ûбκɸ
{
for(int j=i*2;j<=n;j+=i)
flag[j]=1;/... |
Java | UTF-8 | 610 | 2.265625 | 2 | [
"MIT"
] | permissive | package seedu.address.model;
import javafx.collections.ObservableList;
import seedu.address.model.module.Module;
import seedu.address.model.module.student.Student;
/**
* Unmodifiable view of a TAB.
*/
public interface ReadOnlyTeachingAssistantBuddy {
/**
* Returns an unmodifiable view of the modules list.
... |
Markdown | UTF-8 | 1,133 | 2.9375 | 3 | [] | no_license | # 자바 기초
## CQRS
> CQRS는 Command and Query Responsibility Segregation(명령과 조회의 책임 분리)을 나타낸다. 이름처럼 시스템에서 명령을 처리하는 책임과 조회를 처리하는 책임을 분리하는 것이 CQRS의 핵심이다.
<img src = "https://blog.nebrass.fr/wp-content/uploads/cqrs-simple-diagram-886x1024.png" height="500">
- 명령(Command) : 시스템의 상태를 변경하는 작업
- ex) 주문 취소, 배송 완료
- 쿼리(Query) : ... |
C++ | UTF-8 | 11,377 | 2.765625 | 3 | [] | no_license | #ifndef _OBJECTS_HPP_
#define _OBJECTS_HPP_
#include "GlobalDefines.hpp"
#include "VectorClass.hpp"
#include "SortedLists.hpp"
#include <vector>
#include <iostream>
namespace Objects
{
namespace Abstract
{
class Color;
class SpatialData;
};
namespace Concepts
{
namespace ... |
C# | UTF-8 | 3,893 | 3.5625 | 4 | [] | no_license | using System;
using System.Text;
internal enum Direction
{
Horizontal,
Vertical,
SlashDiag,
BackSlashDiag
}
class FindLongestSequenceOfEqualStringsInMatrix
{
static void Main()
{
string[,] matrix = new string[,]
{
{"ff", "mm", "mm", "vv"},
{"gg", "ff"... |
JavaScript | UTF-8 | 2,572 | 2.703125 | 3 | [] | no_license | /**
* Namespace of notifications management
**/
var SecurityNamespace = function(ko, koPurple)
{
var self = this;
//
// Private
//
var privateKey = ko.observable(null); //This needs to be an observable for the computed function IsLogged
var baseServiceUrl = null;
var AuthenticationCallbackFunction = nul... |
Java | UTF-8 | 1,753 | 2.015625 | 2 | [] | no_license | package org.example;
import org.openqa.selenium.By;
public class RegisterPage extends Util {
LoadProp loadProp = new LoadProp(); //LoadProp Object Created
private By _firstName = By.xpath("//input[@id=\"FirstName\"]");
private By _lastName = By.xpath("//input[@id=\"LastName\"]");
private By _dateOfBir... |
Java | UTF-8 | 498 | 1.773438 | 2 | [
"MIT"
] | permissive | package com.infinityraider.elementalinvocations.reference;
import com.infinityraider.elementalinvocations.registry.ItemRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
public class InventoryTabs {
public static final CreativeTabs ELEMENTAL_INVOCATIONS = new CreativeTab... |
Java | GB18030 | 466 | 3.796875 | 4 | [] | no_license | package com.baguaxingqiu.array;
public class StrengthenForLoop {
/**
* @param args
* ǿforѭҳǸ
*/
public static void main(String[] args) {
int a[] = new int[5];
for (int i = 0; i < a.length; i++) {
a[i] = (int)(Math.random()*100);
System.out.println(a[i]);
}
int b = 0;
for(int eac... |
C++ | UTF-8 | 4,014 | 2.546875 | 3 | [] | no_license | #include <cstdio>
using namespace std;
const int maxn = 150010;
struct edge {
int to, nxt;
};
edge G[maxn << 1];
int head[maxn], cnt;
void dfs(const int&);
int c[maxn], dfn[maxn];
void build(const int&, const int&, const int&);
long long query(const int&, const int&, const int&);
inline void access(int);
int main... |
Python | UTF-8 | 675 | 3.09375 | 3 | [] | no_license | #!/usr/local/bin/ python3
# -*- coding:utf-8 -*-
# __author__ = "zenmeder"
class Solution(object):
def minPathSum(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
if not grid or not grid[0]:
return 0
dp = [[0 for j in range(len(grid[i]))] for i in range(len(grid))]
for i in range(len(grid)... |
PHP | UTF-8 | 853 | 2.703125 | 3 | [] | no_license | <?php
require_once 'manageDiscourseUser.php';
class LinkUser extends ManageDiscourseUser
{
public function __construct()
{
parent::__construct();
$this->addArg(
'muser',
self::$mUserDescription,
true
);
$this->addArg(
'duser',
... |
Go | UTF-8 | 191 | 3.015625 | 3 | [] | no_license | package main
import ("fmt"
"time"
)
func main(){
go hello()
time.Sleep(1*time.Second)
fmt.Println("Hi from main")
}
func hello(){
fmt.Println("Hello all good morning from goroutine")
} |
PHP | UTF-8 | 734 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace EMS\CommonBundle\Exception;
final class DateTimeCreationException extends \RuntimeException
{
private function __construct(string $message = '', int $code = 0, \Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
/**
... |
Java | UTF-8 | 570 | 2.84375 | 3 | [] | no_license | package com.javarush.task.task04.task0443;
/*
Как назвали, так назвали
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
String name = new Scanner(System.in).nextLine();
int y = new Scanner(System.in).nextInt();
... |
Shell | UTF-8 | 750 | 4.0625 | 4 | [
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | permissive | #! /bin/bash
# docker-tag.sh - Create a new tag for a set of Agoric Docker images
set -xe
SRCTAG=$1
DSTTAG=$2
DOCKERUSER=${3-agoric}
if [ -z "$DSTTAG" ]; then
echo 1>&2 "Usage: $0 SRCTAG DSTTAG"
exit 1
fi
for img in agoric-sdk cosmic-swingset-setup cosmic-swingset-solo deployment; do
SRC="ghcr.io/$DOCKERUSER/$... |
TypeScript | UTF-8 | 615 | 2.90625 | 3 | [
"MIT"
] | permissive | import RequiredFieldValidator from '../validators/required';
import Validator from '../validator';
import {MessageHandler} from '../messages';
/**
* Marks the field as required.
* @param message [Optional] Overrides the default validation error message.
* @returns {function(Object, string): void} A field validation... |
Java | UTF-8 | 19,093 | 1.835938 | 2 | [] | no_license | package saioapi.app.web;
//import java.io.File;
//import java.io.FileInputStream;
//import java.util.Arrays;
//
//import saioapi.base.Update;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import ... |
C++ | UTF-8 | 610 | 2.59375 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int adjust(int k,int s){
if(k<=s){
return k;
}
else{
return adjust(k-s,s);
}
}
int main()
{
int t;
cin>>t;
while(t--){
ll n,k;
cin>>n>>k;
ll *a=new ll[n];
... |
Java | UTF-8 | 2,131 | 3.375 | 3 | [] | no_license | import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/** https://www.codewars.com/kata/55084d3898b323f0aa000546 */
public class CaesarTwo {
private static final int NUM_OF_SPLITS = 5;
public static List<String> encodeStr(String s, int shift) {
String encrypted = encr... |
Markdown | UTF-8 | 973 | 2.6875 | 3 | [
"MIT"
] | permissive | # Security Policy
## Supported Versions
Currently, only one supported version of the software is supported at any one time.
Should an update become available, you should be able to automatically roll up to the next version.
Version 1.x.x will fail to update.
| Version | Supported | Automatic updates |
| --... |
TypeScript | UTF-8 | 3,457 | 2.890625 | 3 | [
"MIT"
] | permissive | import * as ns from '../../ns'
import { commentStyle, formHeadingStyle, formGroupStyle } from '../../style'
export type FieldParamsObject = {
size?: number, // input element size attribute
type?: string, // input element type attribute. Default: 'text' (not for Comment and Heading)
element?: string, // element t... |
Markdown | UTF-8 | 4,184 | 3.015625 | 3 | [
"MIT"
] | permissive | # wp media regenerate
Regenerates thumbnails for one or more attachments.
### OPTIONS
[<attachment-id>...]
: One or more IDs of the attachments to regenerate.
[\--image_size=<image_size>]
: Name of the image size to regenerate. Only thumbnails of this image size will be regenerated, thumbnails of other ... |
C++ | UTF-8 | 1,829 | 2.671875 | 3 | [] | no_license | #include "asc_hip_force/ASCHipForce.hpp"
namespace atrias {
namespace controller {
ASCHipForce::ASCHipForce(AtriasController *parent, string name) :
AtriasController(parent, name),
flightPD(this, "flightPD"),
stancePD(this, "stancePD"),
toeDecode(this, "toeDecode")
{
// Initialize our gains to something safe.
t... |
Java | UTF-8 | 1,428 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | package com.bfsi.egalite.util;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import com.bfsi.egalite.view.R;
/**
* To access the customer details in ... |
Rust | UTF-8 | 1,930 | 2.796875 | 3 | [] | no_license | use serde::{Deserialize, Deserializer, Serialize};
use serde_json::Value;
use crate::{
net_config::NetConfig,
tournament::{
round_robin::RoundRobin,
single_elim::SingleElim,
},
local_remote::{IPlayer, RemotePlayer},
};
use std::net::TcpListener;
#[derive(Debug)]
pub struct TournConfig ... |
Java | UTF-8 | 3,718 | 2.09375 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | package com.songsy.iframe.core.persistence.provider.service;
import com.songsy.iframe.core.persistence.datasource.annotation.BindingDataSources;
import com.songsy.iframe.core.persistence.provider.Page;
import com.songsy.iframe.core.persistence.provider.entity.BaseEntity;
import com.songsy.iframe.core.persistence.provi... |
Go | UTF-8 | 547 | 3.4375 | 3 | [] | no_license | package tictactoe
import (
"math/rand"
"time"
)
func init() {
rand.Seed(time.Now().Unix())
}
type Player interface {
Play(ttt *TicTacToe) Position
Mark() Mark
}
type RandomPlayer struct {
mark Mark
}
func NewRandomPlayer(mark Mark) *RandomPlayer {
return &RandomPlayer{
mark: mark,
}
}
func (r *RandomPl... |
C# | UTF-8 | 3,432 | 2.71875 | 3 | [
"BSD-2-Clause"
] | permissive | using System;
using System.Xml.Linq;
using NUnit.Framework;
using twopointzero.Lml.Importers;
namespace twopointzero.LmlTests.Importers.AppleITunesXmlImporterTests
{
[TestFixture]
public class GetPrimitiveValue
{
private static void AssertPrimitiveEntryIsEqual(string input, object expected)
... |
Java | UTF-8 | 500 | 1.953125 | 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 com.leapfrog.DAO;
import com.leapfrog.Entity.Client;
import java.net.Socket;
import java.util.List;
/**
*
* @author BkoNod... |
Java | UTF-8 | 1,552 | 1.78125 | 2 | [] | no_license | package com.ynpulse.hht_juai;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;... |
Java | UTF-8 | 606 | 2.15625 | 2 | [] | no_license | package br.com.lojamodel.daogeneric;
import java.sql.PreparedStatement;
import java.util.Calendar;
import java.util.List;
public class DAOGenericJDBC<T> implements DAO<T> {
@Override
public void inserir(T t) {
}
@Override
public void remover(T t) {
// TODO Auto-generated method stub
}
@Override
pu... |
C++ | UTF-8 | 1,058 | 2.65625 | 3 | [] | no_license | #pragma once
#include <vector>
#include <iostream>
#include "entt.hpp"
//all the component includes
#include <Header/Camera.h>
#include <Header/Mesh.h>
#include <Header/Transform.h>
#include <Header/Material.h>
#include <Header/LightSource.h>
class ECS
{
public:
static void AttachRegistry(entt::registry* reg);
... |
Java | UTF-8 | 465 | 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 javaapplication23;
import java.util.EventObject;
/**
*
* @author Vladimir
*/
public class ReservoirEvent extends EventObje... |
Java | UTF-8 | 9,787 | 2.375 | 2 | [] | no_license | package com.kwon.notice.model.dao;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
impor... |
Java | UTF-8 | 1,310 | 2.5625 | 3 | [] | no_license | package agent;
import java.util.ArrayList;
import java.util.HashMap;
import negotiator.AgentID;
import negotiator.Bid;
import negotiator.BidHistory;
import negotiator.bidding.BidDetails;
import negotiator.issue.Issue;
import negotiator.issue.IssueDiscrete;
import negotiator.issue.ValueDiscrete;
import neg... |
C++ | UTF-8 | 366 | 2.5625 | 3 | [] | no_license | #include "waitcondition.h"
void Wait::run(){
qDebug()<<Wait::currentThreadId();
waitcondition.wait(&mutex);
qDebug()<<Wait::currentThreadId()<<"global:"<<global;
Wait::sleep(2);
}
void Wakeup::run(){
mutex.lock();
global = global + 5;
Wakeup::sleep(2);
mutex.unlock();
// waitcondit... |
Go | UTF-8 | 333 | 3.234375 | 3 | [] | no_license | package main
import (
"fmt"
"strings"
)
func strStr(haystack string, needle string) int {
temp := strings.Split(haystack, needle)
if len(temp) == 1 && needle != "" {
return -1
}
if len(temp) > 1 {
if len(temp[0]) != 0 {
return len(temp[0])
}
}
return 0
}
func main() {
t := strStr("a", "")
fmt... |
Java | UTF-8 | 2,290 | 2.625 | 3 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GameFiles;
import java.util.Random;
/**
*
* @author Connor
*/
public class Randomizer {
/**
* Generate whole numbers between the given ranges. Start is minimum number. End is max number.
... |
Markdown | UTF-8 | 932 | 2.703125 | 3 | [] | no_license | Topic: Advanced Time Series
Case: Walker Advertising: Los Defensores and 1-800-THE-LAW2 (QA-0912.pdf)
Data: Areas_Master.csv, CallsTable.zip, MediaPlacement.zip
Code: WalkerStarter.ipynb
Assignment:
1. Read Walker Advertising: Los Defensores and 1-800-THE-LAW2 Click for more... |
C++ | UTF-8 | 1,104 | 3.984375 | 4 | [] | no_license | /*
Exercise 2-4. For your birthday you’ve been given a long tape measure and an instrument that measures angles (the angle between the horizontal and a line to the top of a tree, for instance). If you know the distance, d, you are from a tree, and the height, h, of your eye when peering into your angle-measuring device... |
Java | UTF-8 | 536 | 2.109375 | 2 | [] | no_license | package repositories.model;
import models.Brand;
import models.Model;
import play.mvc.Http;
import java.util.Optional;
import java.util.concurrent.CompletionStage;
import java.util.stream.Stream;
public interface IModelRepository {
CompletionStage<Stream<Model>> list();
CompletionStage<Optional<Model>> getB... |
C++ | UTF-8 | 41,192 | 2.671875 | 3 | [
"MIT"
] | permissive | #include "FileUtilities_TD.h"
internal b32
WriteEntireFile(bucket_allocator *Bucket, u8 *Filename, u32 MemorySize, void *Memory)
{
b32 Result = false;
string_w FileNameWide = {};
ConvertString8To16(&Bucket->Transient, Filename, &FileNameWide);
Result = WriteEntireFile(&FileNameWide, MemorySize, Me... |
C# | UTF-8 | 19,189 | 2.609375 | 3 | [] | no_license | using Extensions;
using Extensions.Enums;
using Finances.Classes.Categories;
using Finances.Classes.Data;
using Finances.Classes.Database;
using Finances.Classes.Sorting;
using Finances.Pages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using S... |
TypeScript | UTF-8 | 4,164 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | import CryptoSuite from '../../lib/interfaces/CryptoSuite';
import { TestPublicKey } from './TestPublicKey';
/**
* A {@link CryptoSuite} used for unit testing
*/
export default class TestCryptoSuite implements CryptoSuite {
private readonly id: number;
private static called: {[id: number]: number} = {};
privat... |
Python | UTF-8 | 73,721 | 2.796875 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# weather.py
# A.1.0
'''weather script for Pontis Weather Station
'''
# Rev A.1.0 - Field test release 10/10/19
import time
from datetime import datetime
import RPi.GPIO as GPIO
import math
import random
# files required in folder
import I2C_LCD_driver3
import tsl2591
... |
Go | UTF-8 | 2,935 | 2.78125 | 3 | [
"MIT"
] | permissive | package models
import (
"encoding/json"
"fmt"
"math/rand"
"time"
"github.com/dtop/go.ginject"
"github.com/google/go-querystring/query"
"gopkg.in/redis.v4"
)
type (
// Session interface
Session interface {
New() Session
FromSessionID(sessID string) error
Store(sessID ...string) error
GetSessionID()... |
Python | UTF-8 | 2,197 | 3.171875 | 3 | [] | no_license | import requests
from requests.auth import HTTPBasicAuth
import sys
import time
def downloadFile(url, directory) :
"""Downloads the file given in url displaying a nice progress bar during the
process.
"""
# Define local filename from url last part
localFilename = url.split('/')[-1]
# Download f... |
Python | UTF-8 | 75 | 3.1875 | 3 | [] | no_license | n = list(input().split())
print(n[-1]) #последний элемент
|
Java | UTF-8 | 215 | 1.5625 | 2 | [] | no_license | package spring.s4.datasmap.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import spring.s4.datasmap.model.Place;
public interface PlaceRepo extends JpaRepository<Place,Integer > {
}
|
JavaScript | UTF-8 | 816 | 2.53125 | 3 | [] | no_license | import axios from "axios";
import React, { useState } from "react";
import "./FileUpload.scss";
export default function FileUpload() {
const [file, setFiles] = useState(null);
const handleChange = (event) => {
console.log(event.target.files);
setFiles({ file: event.target.files[0] });
};
const handleSubmit =... |
C | UTF-8 | 817 | 3.8125 | 4 | [] | no_license | /*Design, Develop and Implement a Program in C for the following Stack
Applications
a. Evaluation of Suffix expression with single digit operands and
operators:+, -, *, /, %, ^
b. Solving Tower of Hanoi problem with n disks*/
#include<stdio.h>
#include<stdlib.h>
void towerOfHanoi(int n,char fromTower,char toT... |
Python | UTF-8 | 672 | 2.6875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
import random
from Crypto.Util.number import *
FLAG = open('./flag', 'rb').read()
def pad(data, block_size):
padlen = block_size - len(data) - 2
if padlen < 8:
raise ValueError
return b'\x00' + bytes([random.randint(1, 255) for _ in range(padlen)]) + b'\x00' + data
def main... |
C | UTF-8 | 927 | 3.296875 | 3 | [] | no_license | #include <stdio.h>
#include<stdlib.h>
#include<math.h>
//print all prime number between low and high , including them
void printPrime(int low, int high) {
if(high == 1)
return;
if(low > high)
return;
char *arr = (char*)malloc(sizeof(char)*(high+1));
int index=0;
arr[0] = '0';
arr[1] = '0';... |
TypeScript | UTF-8 | 227 | 2.984375 | 3 | [
"MIT"
] | permissive | export class Base {
a: string = '';
constructor() {}
}
export class D extends Base {
// D overwrites a property coming from the base class.
a: any;
constructor(a: string) {
super();
this.a = a + '!!!';
}
}
|
Markdown | UTF-8 | 15,015 | 2.53125 | 3 | [] | no_license | #第94章 互咬<br /> 正在李丰话不成话的时候,旁边那位鹰甲终于将铁面罩推了上去,不慌不忙地露了个石破天惊的面:“皇上,乱臣贼子都已经束手就擒,还请您多保重龙体,天子为社稷呕心沥血,何需为几个反贼伤身?” 那声音太耳熟了,李丰扭头一看,呆住了,扶着他的那鹰甲竟是本该在南边的顾昀。 顾昀突然出现吓坏了一帮人。 吕常脑子里“嗡”一声,杨荣桂跟他保证过,说那边行动万般小心,安定侯完全被他们瞒过去了! 在他原计划里,所有的布置都要在雁王离京的这段时间内完成——刘崇山那他说东不往西的蠢货是颗棋子,给个棒棰就当针,只要诱得他杀了李丰,杨荣桂不必出头,叫刘崇山将雁王接手推出来,到时候雁王是自愿的也好,是被杨荣桂... |
Java | UTF-8 | 1,605 | 2.140625 | 2 | [] | no_license | /**
*
*/
package io.assignment.account.api.v1;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Component;
import io.assignment.account.client.TransactionV1;
import io.assignment.account.entity.v1.AccountEntit... |
C++ | UTF-8 | 1,501 | 2.84375 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
#include <unistd.h>
int i4c(char a)
{
return a-48;
}
int Isthe2DigNumOk(char a,char b)
{
if (i4c(a)== 1 || (i4c(a) == 2 && i4c(b) >= 0 && i4c(b) <= 6))
{
return 1;
}
else
{
return 0;
}
}
int findWrongDecodes(char* num)
{
int len = strlen(num);
int res[len];
... |
Python | UTF-8 | 1,065 | 2.671875 | 3 | [] | no_license | # html session css
# http://docs.cherrypy.org/en/latest/tutorials.html
import os, os.path
import random
import string
import cherrypy
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """
<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
... |
Python | UTF-8 | 2,804 | 2.8125 | 3 | [] | no_license | import unittest
from unittest.mock import patch
import requests
from bs4 import BeautifulSoup
from crawler_world import (
get_page, page_is_404, assemble_url_page, get_search_page_links, num_search_pages, request_redirected,
)
def search_results_counter(bs_search_obj) -> int:
counter = bs_search_obj.find('spa... |
Ruby | UTF-8 | 1,053 | 2.515625 | 3 | [
"MIT"
] | permissive | require 'sge_tagger'
include SGETagger
describe Tagger do
TEMP_DIR = 'tmp'
DIR1 = 'dir1'
context 'tmp dir containing one file and one dir' do
before(:each) do
# make a dir containing one file and one dir
FileUtils.rm_rf(TEMP_DIR)
Dir.mkdir TEMP_DIR
Dir.chdir TEMP_DIR do
File... |
Java | UTF-8 | 1,446 | 1.921875 | 2 | [
"Apache-2.0",
"Elastic-2.0",
"SSPL-1.0",
"LicenseRef-scancode-other-permissive"
] | permissive | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
Java | UTF-8 | 1,413 | 2.890625 | 3 | [] | no_license | package gyakorlat2;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;
public class Client2 {
public static void main(String[] args) throws IOException {
Socket socket = new Socket(... |
TypeScript | UTF-8 | 1,475 | 2.59375 | 3 | [] | no_license | import { ActionsTestData } from '../../shared/interfaces/actionTestData';
import { testTopDebts } from '../test-data';
import { DebtsListActionTypes, DebtsListActions } from './types';
import { loadDebtsStart, loadDebtsSuccess, loadDebtsError } from './actions';
describe('Debts Filter Actions', () => {
const testDat... |
Python | UTF-8 | 105 | 3.609375 | 4 | [] | no_license | def factorial1(x):
if x==0:
return 1
else:
return x*factorial1(x-1)
print(factorial1(4)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.