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
226
2.578125
3
[ "MIT" ]
permissive
**SmartFormat** is a **string composition** library written in C# that can format data into a string with a minimal, intuitive syntax. See [further information on the wiki](https://github.com/scottrippey/SmartFormat.NET/wiki).
Markdown
UTF-8
491
2.6875
3
[]
no_license
# TextBox.Copy Method (Outlook Forms Script) Copies the contents of an object to the Clipboard. ## Syntax _expression_. **Copy** _expression_A variable that represents a **TextBox** object. ## Remarks The original content remains on the object. The actual content that is copied depends on the object. For e...
C#
UTF-8
307
2.515625
3
[]
no_license
public async Task<Parent> GetParent(int id) { var parent = context.Parents .Include(p => p.Children) .SingleOrDefaultAsync(p => p.Id == id); parent.Result.Children = parent.Result.Children.OrderBy(c => c.Sequence).ToList(); return await parent; }
Java
UTF-8
229
2.609375
3
[]
no_license
package calc; public class Farenheit { float gradosf=70.3f; float gradosc; public void calcular () { double calcular; calcular= ((gradosf-32)*5/9); System.out.println("La temperatura es"+calcular); } }
Python
UTF-8
508
2.9375
3
[]
no_license
from selenium import webdriver import os from time import sleep dr=webdriver.Chrome() file_path='file:///'+os.path.abspath('locator.html') dr.get(file_path) #Task 6.1 Type something in the outsize textfield dr.find_element_by_name('outsize').send_keys('something') # Task 6.2 Type something in the inside textfield ...
Java
UTF-8
845
2.140625
2
[]
no_license
package com.alantran.android.swipe; /** * Created by alantran on 5/16/16. */ public class ScheduleDB { private static final String DB_NAME = "schedule.db"; private static final int DB_VERSION = 1; private static final String SCHEDULE_TABLE = "scheduletable"; private static final String COL_ID = "_id...
C#
UTF-8
1,038
2.796875
3
[]
no_license
using System.ComponentModel.DataAnnotations; namespace library_online_system_asp_dot_net.Models { public class Borrower { [Required] public string Username { get; set; } [Required] public string Password { get; set; } [Required] public string Fullname { get; se...
Java
UTF-8
11,698
1.960938
2
[ "Apache-2.0" ]
permissive
package com.hubspot.rosetta; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.ut...
Markdown
UTF-8
2,047
2.859375
3
[ "BSD-3-Clause" ]
permissive
Author: Suji Version: 0.2 Addon to show alliance DPS and damage in real time. Abbreviation: //sb This addon allows players to see their DPS live while fighting enemies. Party and alliance member DPS is also dispalyed. In addition to DPS, each player's total damage and their percent contribution is also displayed. Not...
SQL
UTF-8
818
4.40625
4
[]
no_license
--get the count of records with the same input and a different output select count(s2.id) as TotalProblems, s1.id, s1.timestamp from States s1 inner join States s2 on s1.length = s2.length inner join Episodes e1 on s1.episodeId = e1.id inner join Episodes e2 on s2.episodeId = e2.id where s1.crossSection = s2.cros...
C#
UTF-8
8,854
2.625
3
[]
no_license
using System; using System.Data; using System.Text; using System.Data.OleDb; using Jyson.MyCodeManage.Utility; using Jyson.MyCodeManage.DBUtility; namespace Jyson.MyCodeManage.DAL { /// <summary> /// 数据访问类:CodeContent /// </summary> public partial class CodeContent { public CodeContent() {} #region Method...
Markdown
UTF-8
5,051
2.875
3
[ "MIT" ]
permissive
# Understanding Pedestrian Behavior to Improve Autonomous Driving Cars A major dilemma faced by autonomous cars is understanding the intention of other road users and communicating with them. To investigate one aspect of this, specifically pedestrian crossing behavior, we shall analyze a large dataset of pedestrian sa...
Ruby
UTF-8
246
2.765625
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
class User attr_accessor :first_name, :last_name def initialize(first_name = nil, last_name = nil) #if arguments are not set to nil default, #teacher will not work @first_name = first_name @last_name = last_name end end
Java
UTF-8
6,487
2.015625
2
[]
no_license
package com.calf.module.order.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.ui.Model; impo...
C++
UTF-8
292
3.015625
3
[]
no_license
void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: for (int i=0; i<=10; i++){ //Using '<=' makes it count till 10 Serial.print(i); Serial.println("Hello World"); delay(1000); } }
C#
UTF-8
4,191
2.578125
3
[]
no_license
namespace EaslyCompiler { using System.Diagnostics; using CompilerNode; /// <summary> /// A C# property type. /// </summary> public interface ICSharpPropertyType : ICSharpType { /// <summary> /// The Easly type from which the C# type is created. /// </summary> ...
Java
UTF-8
4,333
2.328125
2
[]
no_license
package net.crate.compiler; import static java.util.stream.Collectors.toList; import static javax.lang.model.element.Modifier.PUBLIC; import static net.crate.compiler.LessTypes.asType; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeVariableName; import ...
Python
UTF-8
2,622
3.484375
3
[ "MIT" ]
permissive
#!/usr/bin/env python # Test suite for budgeting module import budgeting def disptotals(proj): msg = 'Total in all accounts = ' + str(proj.total('acct')) + '\n' + \ 'Total available to budget = ' + str(proj.availbudget()) return(msg) # Create a new project proj = budgeting.Project('Test project','USD...
Markdown
UTF-8
1,981
2.953125
3
[ "MIT" ]
permissive
# Contributing :tada::clinking_glasses: First off, thanks for taking the time to contribute! :tada::clinking_glasses: Contributions are always welcome, no matter how small. The following is a small set of guidelines for how to contribute to the project ## Where to start ### Code of Conduct This project adheres to...
Markdown
UTF-8
6,364
4.25
4
[]
no_license
# Python's built-in functions In this lesson we will have a look at some of Python built-in functions that will simplify our code making it cleaner, easier to read and in some scenarios, even faster. ### any() The **any()** function returns **True** if any element of an iterable is **True**. If not, it returns **Fa...
TypeScript
UTF-8
1,440
2.84375
3
[]
no_license
import { Notification } from '../notification' import { INotification } from '../../declarations' import { Client } from '../client' describe('The Notification class models the notification entity in the domain', () => { it("should be able to create a notification sucessfully", async () => { const client ...
Python
UTF-8
115
4
4
[ "MIT" ]
permissive
age = int(input("What is your age?")) print("You have ", 100 - age, " years to go before you turn 100 years old.")
Java
UTF-8
1,276
2.546875
3
[]
no_license
package com.fullsail.android.busted; import java.util.ArrayList; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.fullsail.android.busted.object.Member; class Mem...
Markdown
UTF-8
2,087
3.21875
3
[]
no_license
Chapter 8 ========= ## Exercise 8.1 > output "Goodbye!" to `os` ## Exercise 8.2 ```cpp ostream print(ostream os); //-> ostream& print(ostream &os); ``` ## Exercise 8.3 ```cpp istream& readAll(istream &is) { char ch; while(is >> ch) cout << ch; is.clear(); return is; } ``` ## Exercise 8.4 ```cpp #include <...
Java
UTF-8
347
2.34375
2
[]
no_license
package javaer.code; import java.util.regex.Pattern; public class Task { public static void main(String args[]) { String content ="I am noob" + "from runnoob.com"; String pattern =".*runnoob.*"; boolean isMatch = Pattern.matches(pattern,content); System.out.println("结果"+is...
Java
UTF-8
8,208
2.09375
2
[]
no_license
import java.util.Calendar; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; public class QuoteToSubscription { private static int counter = 100; private static ...
Markdown
UTF-8
436
2.625
3
[]
no_license
# vr-createathon A group project by 4 developer/designers, as a first forray into Virtual Reality. None of us have explored any of these VR concepts or technologies before, so this is our first experience with everything, done in a few hours at a createathon event. We created a lovely low-poly landscape in pastel colo...
C#
UTF-8
1,112
2.609375
3
[ "Apache-2.0" ]
permissive
using System; using Sanford.StateMachineToolkit; namespace TestExample { /// <summary> /// Summary description for Class1. /// </summary> internal class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] private static void Main(string[] args) ...
JavaScript
UTF-8
1,275
2.546875
3
[]
no_license
import React from 'react'; import { useSelector, useDispatch } from 'react-redux' import { startGetUsers, createUsers } from './redux/reducers/users.actions' import { getPost } from './redux/reducers/posts.actions' function App() { const dispatch = useDispatch(); const users = useSelector(store => store.users.user...
JavaScript
UTF-8
3,190
3.8125
4
[]
no_license
"use strict" function dieFour(){ var getDieFour = Math.floor(Math.random()*4 + 1); // var score; // score = getDieFour return getDieFour; console.log(getDieFour); } // var rolledDye = dieFour(); function dieSix(){ var getDieSix = Math.floor(Math.random()*6+1); var score; score = getDieSix; return getDieSix...
JavaScript
UTF-8
208
2.75
3
[]
no_license
export default function getMaxId(contacts) { let maxId = 0; for (let i = 0; i < contacts.length; i++) { if (maxId < contacts[i]["id"]) { maxId = contacts[i]["id"] } } return maxId + 1; }
Markdown
UTF-8
2,410
3.34375
3
[]
no_license
# Full Stack Autocomplete Search Bar ## This is a design exercise that was coded in *5 hours* for an assessment not a finished product An autocomplete search bar with client server and database implemented. Designed from scratch in **1 day** from this prompt: #### Design a web client that allows a user to input a s...
C++
UTF-8
1,581
2.890625
3
[ "MIT" ]
permissive
#include "enemy.h" Enemy::Enemy(){ enemy_pos_x = 0; enemy_pos_y = 0; enemy_vel_x = 0; enemy_vel_y = 0; radius = 16; enemy_live = false; user = NULL; id = 0; vilain = al_load_bitmap("img/enemy.png"); } void Enemy::spawn_enemy(int random_corner){ if (random_corner == 0){ enemy_pos_x = 1; ene...
Java
UTF-8
7,287
2.328125
2
[]
no_license
/*** * Copyright (c) 2011 Moises P. Sena - www.moisespsena.com * All rights reserved. * * 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 *...
Markdown
UTF-8
3,838
2.546875
3
[]
no_license
AWS API Gateway deployment template =================================== This is a small template to deploy different endpoints to an AWS API Gateway. It is not intended to be used as is, it's not an out of the box system to be used. All this is, is a template to get you started with a setup for your own system, Too m...
Java
UTF-8
3,958
1.953125
2
[]
no_license
package com.programs.gis.control; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class PageController { /*echarts测试*/ @RequestMapping("/echarts") public String getEcharts() { return "chartShow"; } /*地图测试...
Rust
UTF-8
7,140
2.84375
3
[]
no_license
use std::io::{self, BufRead, BufReader, Seek}; use std::sync::Arc; use tempfile::tempdir; use crate::app_state::AppState; use crate::data_source::*; use crate::row::Row; use crate::{GulpError, header::*}; use crate::cell::*; type LinesReturnType = Vec<String>; /// Trait for converting FileWithHeader via various form...
Markdown
UTF-8
7,478
2.9375
3
[]
no_license
# NEAT-spaceinvaders We use NeuroEvoultion of Augumenting Topologies or NEAT to solve the famous ATARI game SpaceInvaders with the help of OpenAI's gym and NEAT-python ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. #...
Java
UTF-8
434
1.710938
2
[]
no_license
package com.apps.azurehorsecreations.shop.ui; import com.apps.azurehorsecreations.shop.di.component.NetComponent; import com.apps.azurehorsecreations.shop.di.scope.CustomScope; import dagger.Component; /** * Created by pattycase on 4/24/18. */ @CustomScope @Component(dependencies = NetComponent.class, modules = P...
Swift
UTF-8
1,095
2.671875
3
[]
no_license
// // TableViewCell.swift // RounderCorner // // Created by FanYu on 1/3/2016. // Copyright © 2016 FanYu. All rights reserved. // import UIKit class TableViewCell: UITableViewCell { @IBOutlet weak var image1: UIImageView! @IBOutlet weak var image2: UIImageView! @IBOutlet weak var colorView: UIView! ...
Python
UTF-8
734
3.03125
3
[]
no_license
from schedule.constants import gameslot_week, NUM_TEAMS, NUM_WEEKS import numpy as np def consecutive_road_games(schedule): """ Count the total number of times a team has 3 or more consecutive road games. Args: schedule: the schedule Return: The total number of times a teams has 3 or more consecutive roa...
C
UTF-8
1,611
3.15625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <pthread.h> #include "pid.h" #define MIN_PID 100 #define MAX_PID 1000 struct pid_cache { unsigned int pid_bit; struct pid_cache *next; }; static struct pid_cache *cache; //header linked list static unsigned int *map; static unsigned int last_set_b...
Java
GB18030
3,617
1.96875
2
[]
no_license
package com.schoolcontact.Base; import io.rong.imkit.RongIM; import android.app.ActivityManager; import android.app.Application; import android.content.Context; import android.content.SharedPreferences; import com.fasterxml.jackson.databind.ObjectMapper; import com.schoolcontact.listener.ConversationListClickListener...
C++
UTF-8
965
2.796875
3
[]
no_license
/************************************************************************* > File Name: 509_智力大冲浪.cpp > Author: > Mail: > Created Time: 2020年05月13日 星期三 21时02分40秒 ************************************************************************/ #include<iostream> #include<algorithm> using namespace std; struct node{ ...
Java
UTF-8
7,951
1.804688
2
[]
no_license
package jiang.photo.picker.activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widg...
Python
UTF-8
389
3.265625
3
[]
no_license
import sys def main(): partial = sys.argv[1] # 2nd argument is ISBN for x in range(11): total = (int(partial[0]) * 5) + \ (int(partial[1]) * 4) + \ (int(partial[2]) * 3) + \ (int(partial[3]) * 2) + x if total % 11 == 0: if x == 10: print("X") else: ...
Shell
UTF-8
5,184
3.78125
4
[ "GPL-2.0-only", "MIT", "GPL-2.0-or-later", "GPL-1.0-or-later" ]
permissive
#!/bin/sh # make-bindist.sh for the OPENSERVER, UNIXWARE & SOLARIS SDL ports # # written by Marco van den Heuvel <blackystardust68@yahoo.com> # # make-bindist.sh <strip> <vice-version> <prefix> <cross> <--enable-arch> <zip|nozip> <x64sc-included> <system> <infodir> <mandir> <topsrcdir> <make-command> # ...
Ruby
UTF-8
596
3.796875
4
[]
no_license
class Student attr_accessor :_name attr_accessor :_sex def initialize(n, s) @_name = n @_sex = s end end class StudentList include Enumerable def initialize @students = [] end def << (student) @students << student end def each @students.each do |student| yield student ...
Python
UTF-8
1,346
2.890625
3
[]
no_license
import socket import os import signal import subprocess def create_socket(): global host global port global s host= "192.168.1.101" port= 6895 s= socket.socket() def bind_socket(): global host global port global s s.bind((host, port)) print(f"Socket bound with {host} {port}...
Java
UTF-8
526
2.203125
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 pooBiblioteca.exceptions; /** * * @author vinicius.presoto */ public class EmprestimoException extends Exception...
Python
UTF-8
4,119
2.75
3
[]
no_license
#!/usr/bin/env python import os from lxml import etree import lxml.html as lh import sqlite3 import datetime a_full = [] a_full_clean = [] a_add_only = [] a_phone_only = [] a_inspect_date = [] a_inspect_date_clean = [] a_inspect_type = [] a_currstate = [] a_violations = [] def get_a_full(): full = chtml.xpath("...
Java
UTF-8
1,612
2.03125
2
[]
no_license
package com.mtesitoo.backend.service; import android.content.Context; import com.mtesitoo.backend.R; import com.mtesitoo.backend.model.AuthorizedStringRequest; import com.mtesitoo.backend.model.URL; import com.mtesitoo.backend.model.header.Authorization; import com.mtesitoo.backend.service.logic.ICallback; i...
Markdown
UTF-8
9,411
3.0625
3
[]
no_license
# xamla_motion_examples This repository contains several examples being part of a Rosvita project. Every example script lies in a corresponding folder in the Rosvita project. For some examples, a corresponding directory can be found in the Rosvita WorldView containing objects which are used or generated by the script....
Swift
UTF-8
2,219
3.078125
3
[]
no_license
// // DataObservable.swift // LittleLives // // Created by HAO XUAN on 27/3/21. // import Foundation import Combine enum ContentType: String { case portfolio = "Portfolio" case checkInAndOut = "Check In & Out" case health = "Health" case fees = "Fees" } struct ContentItem: Hashable { var date:...
C
UTF-8
2,560
4.1875
4
[ "MIT" ]
permissive
/* Instruction Sum Array Write a method sum (sum_array in python, SumArray in C#) that takes an array of numbers and returns the sum of the numbers. These may be integers or decimals for Ruby and any instance of Num for Haskell. The numbers can also be negative. If the array does not contain any numbers then you ...
Python
UTF-8
600
3.6875
4
[]
no_license
def check_asc(max): i = 1 temp = max[0] while (i < len(max)): if (temp > max[i]): return False temp = max[i] i = i +1 return True def a(): Test = input(); # for Tests count = 0 # for counting list = [] while (Test != 0): Test = Test - 1 count = count - 1 check = 1 max...
C#
UTF-8
9,485
2.65625
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; using System.Threading; using WisorLibrary.Utilities; namespace WisorLib { class ThreeOptionSearch { // General Parameters private double minAmtOptX = -...
Python
UTF-8
301
3.265625
3
[]
no_license
def eh_trio(a, b, c): a = a**2 b = b**2 c = c**2 return a + b == c for a in range(1, 999): for b in range(a, 1000): c = 1000 - a - b if c < a or c < b or b == a: continue if eh_trio(a, b, c): print(a*b*c)
Python
UTF-8
910
3.109375
3
[]
no_license
from classes.lesson import Lesson from csv_utils.writer import Writer from csv_utils.common import Common from classes.book import Book def print_lessons(filename, lesson_numbers, word_keys=None): path = Common.GENERATED_PATH + filename lessons = [] for lesson_number in lesson_numbers: lesson_num...
C++
UTF-8
1,561
2.78125
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** Server.cpp ** File description: ** Server.cpp */ #include <iostream> #include "Server.hpp" Server::Server(const std::string &ip, int port) : sock(ip, port), manager(sock) { std::thread([&](){ manager.checkPlayerTimestamp(); }).detach(); } Server::~Server() { } void Se...
Java
UTF-8
655
1.820313
2
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
/******************************************************************************* * Copyright (c) 2003-2016 Broad Institute, Inc., Massachusetts Institute of Technology, and Regents of the University of California. All rights reserved. *******************************************************************************/ p...
Python
UTF-8
2,122
4.34375
4
[]
no_license
""" Objective Yesterday's challenge taught you to manage exceptional situations by using try and catch blocks. In today's challenge, you're going to practice throwing and propagating an exception. Check out the Tutorial tab for learning materials and an instructional video! Task Write a Calculator class with a...
SQL
UTF-8
144
2.84375
3
[]
no_license
SELECT SUM(Invoice.Total) FROM Invoice WHERE InvoiceDate LIKE '%2009%'; SELECT SUM(Invoice.Total) FROM Invoice WHERE InvoiceDate LIKE '%2011%';
Go
UTF-8
491
2.578125
3
[]
no_license
package main import ( "fmt" twiliogo "github.com/carlosdp/twilio-go" "os" ) // func main() { // fmt.Println("send sms") // sendSms(os.Getenv("ANAHEIM")) // } func sendSms(to string, beer string) { client := twiliogo.NewClient(os.Getenv("SID"), os.Getenv("AUTH_TOKEN")) message := fmt.Sprintf(beer) _,...
Java
UTF-8
4,866
2.40625
2
[]
no_license
package eu.openminted.toolkit.database.services.impl; import eu.openminted.toolkit.database.exceptions.DatabaseException; import eu.openminted.toolkit.database.model.GenericFile; import eu.openminted.toolkit.database.services.GenericArticleFileDAO; import java.sql.PreparedStatement; import java.sql.ResultSet; import j...
C++
UTF-8
248
2.5625
3
[]
no_license
#pragma once #include "GridSprite.h" class Boulder : public GridSprite { public: Boulder(sf::Texture& _texture, GridObject::Type _type = GridObject::BOULDER); void update(const float& _dtAsSeconds) override; protected: float counter = 0; };
Markdown
UTF-8
259
2.578125
3
[ "MIT" ]
permissive
<cn> #### 输入框组合 输入框的组合展现。 注意:使用 `compact` 模式时,不需要通过 `Col` 来控制宽度。 </cn> <us> #### Input Group Input.Group example Note: You don't need `Col` to control the width in the `compact` mode. </us>
Java
UTF-8
1,924
4
4
[ "MIT" ]
permissive
package question; import java.util.Arrays; public class Question05 { public static void input(int[][] caseArray, int[] answerArray) { System.out.println("두 자연수 a와 b의 최대공약수를 구하는 알고리즘"); System.out.println("솔루션 1 : while문으로 모듈러스 연산"); for (int i = 0; i < caseArray.length; i++) { System.out.printf("입력...
Python
UTF-8
583
3.859375
4
[]
no_license
''' https://www.geeksforgeeks.org/longest-palindrome-substring-set-1/ https://leetcode.com/problems/palindromic-substrings/solution/ palindrome substrings ''' def isPalindrome(s,lo,hi): while lo<hi: if s[lo]!=s[hi]: return False lo+=1 hi-=1 return True def countSubstrings(s,n): ...
C++
UTF-8
1,201
2.90625
3
[ "MIT", "NCSA" ]
permissive
#include "gauss_line.hpp" namespace neon { gauss_line::gauss_line(int const minimum_degree) { switch (minimum_degree) { case 1: { m_weights = {2.0}; m_coordinates = {{0, 0.0}}; break; } case 2: case 3: { m_weights ...
Java
UTF-8
1,611
1.507813
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright 2011 Alex 'Ript' Malyshev <alexript@gmail.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 ...
C++
UTF-8
2,526
2.671875
3
[]
no_license
/* * Класс для реализации фильтра Маджвика. * * Версия: 1.0.1. * Автор: Ivan Barinov <bari_ivan@mail.ru> */ #ifndef __KDR_IMU_AHRSMADGWICK_ARDUINO #define __KDR_IMU_AHRSMADGWICK_ARDUINO #include "AHRSFilter.h" // Эмпирически вычисленная ошибка измерений гироскопа #define KDR_F_GYRO_MEAS_ERROR KDR_CONST_P...
Python
UTF-8
973
3.859375
4
[]
no_license
#Converting a hex base number to base 17 number import math s=raw_input('Enter the hex number : ') n=len(s) ans=0 def hexrtn(c): if c.isalpha(): if c=='A': return 10 elif c=='B': return 11 elif c=='C': return 12 elif c=='D': return 13 ...
JavaScript
UTF-8
1,622
2.796875
3
[]
no_license
function canvasRemove(piece){ //캔버스 초기화 var ctx = piece.canvas.getContext('2d'); ctx.clearRect(0, 0, piece.canvas.width, piece.canvas.height); } function canvasClick(num){ //캔버스 클릭 if(startYN){ if(pieceTemp != null){//전에 선택한 말이 있을때 if(piArr[num].vali == 'on'){ //말 클릭 if(pieceTemp.player = turn){ //내 차례가 맞...
Markdown
UTF-8
491
2.640625
3
[]
no_license
# A keygen for an encryption method *All work done in this repo is just for study purposes, please support all developers' hard work.* ![screenshot](./screenshot.png) ## A story about this keygen I've been studying reverse engineering for a while, and this is the first program that I reversed by myself. Though de...
C
UTF-8
524
3.390625
3
[]
no_license
/* 27. Write a program to execute ls -Rl bythe following system calls e. execvp */ #include <unistd.h> #include <stdio.h> #include <errno.h> #include <string.h> int main() { char *argv[] = {"ls", "-Rl", NULL}; char *file = "ls"; char *envp[] = {"PATH=usr/bin/" ,NULL}; errno = 0; //sett...
TypeScript
UTF-8
646
2.765625
3
[ "MIT" ]
permissive
import React from 'react'; import { isFunction } from '@liuyunjs/utils/lib/isFunction'; import { useConst } from './useConst'; export const useReactionRef = <S extends any>(input: S) => { const [ref, set] = React.useState<{ current: S }>({ current: input }); React.useMemo(() => { if (input !== undefined) ref....
JavaScript
UTF-8
12,650
2.734375
3
[]
no_license
var a = document.getElementById("tab1"); var b = document.getElementById("tab2"); var c = document.getElementById("tab3"); var d = document.getElementById("tab4"); var e = document.getElementById("tab5"); var f = document.getElementById("tab6"); function loadUtama(){ document.getElementById("utama").style....
Markdown
UTF-8
1,416
2.78125
3
[]
no_license
# sql-challenge It is a beautiful spring day, and it is two weeks since you have been hired as a new data engineer at Pewlett Hackard. The first major task is a research project on employees of the corporation from the 1980s and 1990s. All that remain of the database of employees from that period are six CSV files. T...
Java
UTF-8
1,195
2.9375
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pt1uf4.nilmartinez; /** * * @author nmartinez */ public abstract class Persona { protected String dni; pro...
JavaScript
UTF-8
12,137
3.078125
3
[]
no_license
function unhide(clickedbutton, elementClass,){ var color = document.body.style.backgroundColor ="white"; var checkstatus = document.getElementById(elementClass); var instructions = document.getElementById("instructions"); if(checkstatus){ if(checkstatus.className == "hide"){ checksta...
Java
UTF-8
3,635
2.34375
2
[]
no_license
package com.sombra.edu.library.demo.service; import com.sombra.edu.library.demo.converter.BookAuthorConverter; import com.sombra.edu.library.demo.dto.BookAuthorDto; import com.sombra.edu.library.demo.entity.Author; import com.sombra.edu.library.demo.entity.Book; import com.sombra.edu.library.demo.entity.BookAuthor; im...
Java
UTF-8
1,361
1.859375
2
[]
no_license
// // Decompiled by Procyon v0.5.36 // package com.sun.jna.platform.win32.COM; import com.sun.jna.platform.win32.WinDef; import com.sun.jna.platform.win32.WinNT; import com.sun.jna.platform.win32.Guid; import com.sun.jna.Pointer; public class ConnectionPoint extends Unknown implements IConnectionPoint { public...
Markdown
UTF-8
122,229
2.84375
3
[ "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- editable: false --- # Monitoring API, gRPC: DashboardService A set of methods for managing dashboards. | Call | Description | | --- | --- | | [Get](#Get) | Returns the specified dashboard. | | [List](#List) | Retrieves the list of dashboards in the specified folder. | | [Create](#Create) | Creates a new dashboar...
Python
UTF-8
3,757
3.125
3
[]
no_license
import csv import pandas as pd basePath = '../singleWordEvaluation/data/' englishDictDataText = basePath + 'unix-english.txt' allTestDataCsv = basePath + 'allTestData.csv' trainingDataCsv = basePath + 'trainingDataCsv.csv' testDataCsv = basePath + 'testDataCsv.csv' passwordDataText = basePath + 'rockyou.txt' maxLength...
Java
UTF-8
2,844
2.609375
3
[]
no_license
package org.jamesblog.article.model; /** * Created by jamescsh on 10/14/17. */ import javax.persistence.Id; /** * 文章 */ public class Article extends BaseModel { @Id private long id; private String title; private String subtitle; private String author; private String content; private...
Java
UTF-8
2,884
2.359375
2
[]
no_license
package jp.gr.java_conf.kmine27.spring.session.redis.controller; import java.io.Serializable; import java.net.InetAddress; import java.net.UnknownHostException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spri...
Java
UTF-8
2,258
2.375
2
[]
no_license
package com.cargo.entities; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class ConsignmentDetails implements Serializable { private static final long serialVersionUID = 1L;...
Rust
UTF-8
2,424
3.078125
3
[]
no_license
extern crate rand; use rand::thread_rng; use rand::Rng; use std::fs::{File, OpenOptions}; use std::path::PathBuf; use chrono; use std::path::Path; use std::env; use std::io::{BufRead, BufReader, BufWriter, Write}; use clap::{Arg, App}; fn main() { let matches = App::new("Whatdo") .about("Fixing decision ...
C#
UTF-8
1,438
2.796875
3
[]
no_license
using System; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; namespace WebApplication1.ApiModel { /// <summary> /// /// </summary> [DataContract] public class Order { /// <summary> /// Order id /// </summ...
TypeScript
UTF-8
3,164
2.734375
3
[]
no_license
export class PokemonModel{ private _id: number; private _name: string; private _height: string; private _weight: string; private _attaque: number; private _defense: number; private _hp: number; private _speed: number; private _attaqueSpecial: number; private _defenseSpecial: numb...
Java
UTF-8
355
1.5
2
[]
no_license
package com.nisum; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootRestApiCassandraExampleApplication { public static void main(String[] args) { SpringApplication.run(SpringBootRestApiCassandraExa...
TypeScript
UTF-8
404
2.546875
3
[]
no_license
import { Student } from '../student-config/student.model'; import { ADD_STUDENT, DELETE_STUDENT } from './student-reducers-constants'; export function addStudentReducer(state: Student[] = [], action) { switch (action.type) { case ADD_STUDENT: return [...state, action.payload]; case DELETE_STUDENT: ...
Java
UTF-8
540
3.171875
3
[]
no_license
package Recursion; import java.util.Scanner; public class Tower_Of_Hanoi { public static void main(String[] args) { Scanner input=new Scanner(System.in); int n=input.nextInt(); int d1=input.nextInt(); int d2=input.nextInt(); int d3=input.nextInt(); toh(n,d1,d2,d3); ...
Java
UTF-8
204
1.515625
2
[ "Apache-2.0" ]
permissive
package com.cattailsw.nanidroid.shiori; public interface Shiori { public String getModuleName(); public String request(String req); public void terminate(); public void unloadShiori(); }
JavaScript
UTF-8
2,962
2.578125
3
[ "MIT", "GPL-3.0-only" ]
permissive
const moment = require("moment"); const config = { client: "mysql", connection: process.env.DATABASE_URL, pool: { min: 2, max: 30 } }; const db = require("knex")(config); const prettyPrint = obj => JSON.stringify(obj, null, 2); const BATCH_SIZE = 10000; let amountDone = 0; let lastId = 0; main() .t...
Python
UTF-8
2,153
3.59375
4
[]
no_license
# Longest Collatz sequence # The following iterative sequence is defined for the set of positive integers: # # n → n/2 (n is even) # n → 3n + 1 (n is odd) # # Using the rule above and starting with 13, we generate the following sequence: # # 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 # It can be seen that this sequenc...
Java
UTF-8
165
1.804688
2
[]
no_license
package functionParser; final class IdOp extends FunctionOp{ IdOp(PolyEvaluator pev){ super(pev);} public final void doOp(){ output.num = pe.evaluate();} }
Python
UTF-8
2,856
2.53125
3
[]
no_license
#QUBO #Import dimod import dimod #Exact solver finds energies for all states. exactsolver = dimod.ExactSolver() #Set up the QUBO. #Embedding explicitly expressed, with chainstrength variable. #Chainstrength variable chainstrength = 1 #Define Q-Matrix Q = {(0, 0): 2, (1, 1): chainstrength, (5, 5): chainstrength, (0, 4)...
C++
UTF-8
553
3.4375
3
[]
no_license
#include <iostream> #include <conio.h> #include <math.h> using namespace std; void solicitarNum(); void funPot(int x, int y); int num, potencia; int main(){ cout << ".::Programa de exponentes::." << endl; solicitarNum(); funPot(num, potencia); getch(); return 0; } void solicitarNum(){ cout << "Ingresa u...