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
Python
UTF-8
7,195
2.515625
3
[ "MIT", "Apache-2.0" ]
permissive
""" Copyright 2019 Akvelon Inc. 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 in writing, software dis...
Go
UTF-8
1,189
3.984375
4
[ "Apache-2.0" ]
permissive
package heap // 比较两个元素,判断a是否应该在b前面 type less func(a, b int) bool // 原地建堆 // 数据的下标从0开始 // 当前元素下标i,左节点下标i*2+1,右节点下标i*2+2 func buildHeap(data []int, less less) { n := len(data) firstLeafI := n/2 - 1 // 第一个非叶子节点 // 先从第一个非叶子节点开始,因为叶子节点没有子节点,没什么好比的。 // 从下面开始堆化,这样每个节点就是和自己的左右子节点比,把最小/最大数放到堆顶 for i := firstLeafI; i >= 0...
C++
UTF-8
1,341
2.953125
3
[]
no_license
// Copyright 2018, Vahid Kazemi #ifndef IMAGE_H_ #define IMAGE_H_ #include <vector> #include "./color.h" template<class T> class Image { public: Image() : width_(0), height_(0) {} Image(int width, int height) : width_(width), height_(height), pixels_(width_ * height_) {} Image(Image&& image) : width_(i...
C++
UTF-8
950
2.890625
3
[]
no_license
bool UpdateMainStorage(bool includeCommission, bool triggerReports, bool backupRequired, bool USonly, bool override) { // ... return true; } bool ReportsNeeded() { return true; } struct MainStorageOptions { bool includeCommission=false; bool triggerReports=false; bool backupRequired=false; bool USonly=f...
Java
UTF-8
1,668
2.625
3
[]
no_license
package Page; public class Page { public Page(){} public Page(int pageIndex){this.pageIndex=pageIndex;} int pageIndex=0; //当前页号 int pageRow=2; //每页行数 int rowCount=1; //总行数 String direct="showPageUser?pageIndex="; //定向地址 public void setDirect(String direct) {t...
JavaScript
UTF-8
2,663
2.59375
3
[]
no_license
import React, { Component } from "react"; import weather from "../../API/weather"; import SearchBar from "../Layout/SearchBar/SearchBar"; import Today from "./Today/Today"; import ForecastList from "./ForecastList/ForecastList"; import Condition from "../Layout/Condition/Condition"; import "./Home.css"; class Home ex...
Markdown
UTF-8
15,410
2.953125
3
[]
no_license
--- title: Coronavirus Guide for F&B date: 2020-03-14T21:48:09Z draft: false --- # Coronavirus Guide for F&B ### What is coronavirus (aka COVID-19) and why does it matter? * COVID-19, sometimes simply called coronavirus, is an illness that can affect your lungs and airways. It starts out like a cold or the flu but...
C
UTF-8
436
4
4
[]
no_license
#include <stdio.h> /** * _strncat - Concatenate two strings. * @dest: Is the char array with 98 slots. * @src: Is the source array that want to storage in dest * @n: number of elements of the src * Return: Dest string. */ char *_strncat(char *dest, char *src, int n) { int i = 0, ind; while (dest[i] != '\0') ...
JavaScript
UTF-8
1,897
3.765625
4
[]
no_license
console.log('js methods') const obj = { helloKitty: function () { console.log('😸') }, name: 'Dicky' } // for (let i = 0; i < cities.length; i++) { // console.log(cities[i]) // } // let citiesWithI = [] // for (city of cities) { // if (city.includes('i')) { // citiesWithI.push...
Java
UTF-8
1,167
3.4375
3
[]
no_license
package com.atguigu.strategy.improve; /** * @author shengxiao * @date 2021/9/30 23:17 */ // ConcreteContext角色 // ConcreteContext角色 负责使用 Strategy角色。ConcreteContext角色保存了 ConcreteStrategy角色的实例, // 并使用 ConcreteStrategy角色去实现需求 public class PekingDuck extends Duck { // 写个构造器,传入到FlyBehavior 的 对象...
Java
UTF-8
1,638
2.234375
2
[]
no_license
package konicki.mateusz.greendaosample.components.match; import android.databinding.DataBindingUtil; import android.databinding.ViewDataBinding; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.Window; import android.view.WindowManager; ...
Markdown
UTF-8
2,020
2.78125
3
[]
no_license
# OAuth-Authorization-Server-demo A very simple web application to upload files into google drive using PHP, JS and Google Drive API version 2. Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Prerequisites This project i...
Java
UTF-8
8,067
2.140625
2
[]
no_license
package com.example.yangg.classtable; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.CheckBox; import android.widg...
Shell
UTF-8
1,009
3.8125
4
[ "MIT" ]
permissive
#!/bin/bash # Dependencies: # # - ReBirth Windows application -> https://en.wikipedia.org/wiki/ReBirth_RB-338 # - wine to run the application # - ALSA loopback device (via module snd_aloop) to use by wine # - zita-a2j to route wine's ALSA loopback output to jack # - gksudo to mount the ReBirth ISO REBIRTH_HOME=~...
Swift
UTF-8
6,481
4.46875
4
[]
no_license
//: Playground - noun: a place where people can play import UIKit var str = "Hello, Objects and Classes" // 1 Creation: Use class followed by the class’s name to create a class. (declaraion) // A property declaration in a class is written the same way as a constant or variable declaration, except that // it is...
C
UTF-8
2,266
3.84375
4
[]
no_license
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> struct Node { int num; struct Node * next; }; struct Node * head = NULL; void printList() { struct Node * temp = head; while (temp != NULL) { printf("%d ",temp->num); temp = temp->next; } printf("\n"); } void add(int n) { struct...
Java
UTF-8
291
2.875
3
[]
no_license
import java.util.ArrayList; public abstract class DiceGame extends Game { protected Dice dice; public DiceGame(Player players, Integer numberOfDice) { super(players); dice = new Dice(numberOfDice); } public Dice getDice() { return dice; } }
Java
UTF-8
555
1.6875
2
[]
no_license
package own.stu.distributedTransaction.pay.service.user.dao; import org.springframework.stereotype.Component; import own.stu.distributedTransaction.common.core.dao.MyMapper; import own.stu.distributedTransaction.pay.service.user.entity.RpUserInfo; import java.util.List; import java.util.Map; @Component public interf...
TypeScript
UTF-8
417
2.734375
3
[ "MIT" ]
permissive
import { Database } from 'better-sqlite3' export type TDbPriceInfo = { id: number priceUsd: number createdAt: number } export const insertPriceInfo = ( db: Database, values: Omit<TDbPriceInfo, 'id' | 'createdAt'>, ): void => { db.prepare( `INSERT INTO priceInfo( priceUsd, createdAt ) VALUES ...
Java
UTF-8
3,152
2.3125
2
[]
no_license
package com.naqi.mj.model; import java.util.ArrayList; import java.util.List; public class Game { //游戏桌子 private RoomTable roomTable; //----游戏相关------------ //牌 private List<Integer> mahjongs = new ArrayList<Integer>(); //麻将牌当前索引 private int currentIndex; //庄家位置 private int zhuangIndex; //当前轮到哪家 private in...
Java
WINDOWS-1250
1,832
2.90625
3
[]
no_license
package datos.dao; import java.util.ArrayList; import org.hibernate.Session; import org.hibernate.Transaction; import datos.configuracion.Conexion; import modelo.entidades.Autor; public class AutorDAO { public void insertarAutor(Autor autor) { Transaction t = null; try(Session ses = Conexion.obtenerSesion())...
JavaScript
UTF-8
1,520
4.0625
4
[]
no_license
const planets = ['Земля', 'Марс', 'Венера', 'Юпитер']; // Пиши код ниже этой строки const planetsLengths = planets.map(planet => planet.length); console.log(planetsLengths); // Задание // Дополни код так, чтобы в переменной planetsLengths получился массив длин названий планет. Обязательно используй метод map(). // ...
Python
UTF-8
1,308
3.8125
4
[]
no_license
#implements the backtracking method to solve the puzzle def find(board): for i in range(len(board)): for j in range(len(board[0])): if board[i][j] == 0: return (i, j) #row, column return None def is_valid(board, input_val, pos): #check the row for i in range(len(bo...
TypeScript
UTF-8
1,680
2.546875
3
[ "MIT" ]
permissive
import SourceToken from 'coffee-lex/dist/SourceToken'; import { MemberAccessOp } from 'decaffeinate-parser/dist/nodes'; import { PatcherContext, PatchOptions, RepeatableOptions } from '../../../patchers/types'; import NodePatcher from './../../../patchers/NodePatcher'; import IdentifierPatcher from './IdentifierPatcher...
C
UTF-8
552
2.609375
3
[]
no_license
#include "led_rgb.h" void Init_RGB(void){ GPIO_SetDir(PORT_RGB, RED_PIN, GPIO_DIR_OUTPUT); GPIO_SetDir(PORT_RGB, GREEN_PIN, GPIO_DIR_OUTPUT); GPIO_SetDir(PORT_RGB, BLUE_PIN, GPIO_DIR_OUTPUT); } //Funciona a nivel bajo void encender_led(int pin,int frecuencia){ GPIO_PinWrite(PORT_RGB,pin,0); osD...
Java
UTF-8
1,180
2.15625
2
[]
no_license
package com.yzhang.monsterhunterworldcompanion.appdatabase.skill; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.OnConflictStrategy; import androidx.room.Query; import androidx.room.Update; import java.util.List; @Dao publi...
Python
UTF-8
355
2.96875
3
[]
no_license
# SIGMOID Compute sigmoid functoon # J = SIGMOID(z) computes the sigmoid of z. import numpy as np def sigmoid(z): # You need to return the following variables correctly g = np.zeros(z.shape) # ====================== YOUR CODE HERE ====================== # =========================================...
Java
UTF-8
5,916
2.09375
2
[]
no_license
/* * Copyright 2013 Samuel Franklyn <sfranklyn@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 at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
PHP
UTF-8
10,266
3.25
3
[]
no_license
<?php /***** * PBFTP is a PHP class designed to use FTP functions as an adhoc API for * premium Photobucket accounts. It can upload files, create directories, * delete directories, navigate directories, display images in a directory, * and display a links of WWW links to images in an album. It cannot delet...
Markdown
UTF-8
1,040
2.71875
3
[]
no_license
## Tecnologias utilizadas 🛠 - [CRA](https://github.com/facebook/create-react-app) - [Node.js](https://nodejs.org/en/) - [Yarn](https://yarnpkg.com/en/) ## Stack ⚙️ - React (Create React App) - Redux - Styled components ## Como rodar ▶️ No diretório do projeto, insira o comando: ### `yarn` Para instalar as depend...
Java
ISO-8859-1
839
4.0625
4
[]
no_license
package main; public class OperadoresAritmeticos { public static void main(String[] args) { //Operadores Aritmeticos int variableX = 50, variableY = 10; int resultado; resultado = variableX + variableY; System.out.println(resultado); resultado = variableX - variableY; System...
Python
UTF-8
3,169
2.875
3
[ "BSD-3-Clause" ]
permissive
""" Group from which to select manufacturer and model """ import PySide2.QtCore as QtCore import PySide2.QtWidgets as QtWidgets from . import config from ..lib.driver import Driver class DriverSelectionGroup(QtWidgets.QGroupBox): """ Group from which to select manufacturer and model """ driver_changed = QtCo...
Markdown
UTF-8
927
3.03125
3
[]
no_license
# Homework Assignment w/Bootstrap ## In this submission I have made a mobile responsive website with bootstrap. All pages can be resized. I concentrated on overriding classes and nested classes in bootstrap with css. ## Content 1. Index 2. Contact 3. Portfolio>Rock Paper Scissors assignment [rps.html] ## Respon...
C++
UTF-8
917
2.78125
3
[]
no_license
#include <iostream> #include <list> #include <vector> #include <algorithm> using namespace std; list<int> t[101]; list<int>::iterator iter; list<int>::iterator iter2; int main(){ int N, M; cin >> N >> M; pair<int, int> *p = new pair<int, int>[M]; for (int i = 1; i <= N; i++){ t[i].push_back(i); } for (int i = 0...
Java
UTF-8
1,385
2.53125
3
[]
no_license
package com.ar9013.life10; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.Timer; public class ...
C++
UTF-8
2,141
2.71875
3
[]
no_license
/* Imperial College London HPC Assignment Task 2 Dominic Pickford 01272723 This is the header file declaring all the functions that are key to task 2 The variables used are all explained in function T2_inputs DGBMV documentation http://www.netlib.org/lapack/explore-html/d7/d15/group__double__blas__level2_g...
C#
UTF-8
723
2.59375
3
[ "MIT" ]
permissive
using System; using System.Threading.Tasks; using Discord.Commands; using Discord.WebSocket; namespace NadekoBot.Core.Common.TypeReaders { public class KwumTypeReader : NadekoTypeReader<kwum> { public KwumTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { ...
Java
UTF-8
3,155
1.882813
2
[]
no_license
package com.testwa.distest.server.mapper; import com.testwa.distest.DistestWebApplication; import com.testwa.distest.server.condition.TestcaseCondition; import com.testwa.distest.server.condition.TestcaseDetailCondition; import com.testwa.distest.server.entity.Testcase; import com.testwa.distest.server.entity.Testcase...
C++
GB18030
1,052
3.6875
4
[]
no_license
//File:ַ.cpp //һַ80ַȥظַ󣬰ַASCIIֵӴС #include <stdlib.h> #include <iostream> using namespace std; int main() { int n=0,m=0,i; bool flag; char str[80]; cout<<"Please input a string:"; cin.getline (str,80); for (i=0;str[i]!='\0';++i) { flag=false; for (int j=0;s...
Java
UTF-8
353
2.78125
3
[]
no_license
package set1_forloop_labs; public class CoolNumbersRunner { public static void main(String args[]) { CoolNumbers test = new CoolNumbers(); test.printResult(250); test.printResult(1250); test.printResult(2250); test.printResult(5500); test.printResult(9500); test.printResult(23500); test...
JavaScript
UTF-8
1,797
2.9375
3
[]
no_license
import './index.html'; import './style.css'; import { Drink } from './Drink'; const navBtnElm = document.querySelector('#nav-btn'); const navElm = document.querySelector('nav'); const menuAtrElm = document.querySelectorAll('.menu-a'); //funkce která schová a otevírá menu const hideNav = () => { navElm.classList.to...
Markdown
UTF-8
405
2.53125
3
[ "MIT" ]
permissive
# _Language_ #### _This website is about different languages in computer programming._ #### By _**Tajo Fisher**_ ## Technology Used * HTML * CSS * JS * Bootstrap ## Description * A website containing information on languages ## Known Bugs * _No Known issues_ ## License * [MIT](link) * copyright(c) 2021 * [...
Python
UTF-8
1,834
3.4375
3
[]
no_license
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def rob(self, root, can_take=True, memo=None): """ :type root: TreeNode ...
Python
UTF-8
595
3.09375
3
[]
no_license
n = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) A.sort() B.sort() sumA = 0 sumB = 0 while len(A) > 0 or len(B) > 0: if len(A) > 0: if len(B) < 1 or A[len(A)-1] >= B[len(B)-1]: sumA += A[len(A)-1] A.pop() else: B.pop() el...
C++
UTF-8
397
3.1875
3
[]
no_license
// Even Numbers solution in C++ for CodeEval.com by Steven A. Dunn #include <cstdlib> #include <fstream> #include <iostream> using namespace std; int main(int argc, char* argv[]) { ifstream inputFile(argv[1]); string line; if (inputFile) { while (getline(inputFile, line)) { int n = atoi(line.c_str()); ...
Java
UTF-8
379
3.03125
3
[]
no_license
abstract public class Bank { //put abstract class because we have abstract functions inside abstract public void openAccount(); abstract public void showbalance(); //this means use this method but override it public void AccountClose() { } final public void Welcome() { //final means you have to use th...
Markdown
UTF-8
1,487
2.640625
3
[]
no_license
# Kidney_Disease_Analysis_With_MachineLearning_And_Automation Kidney disease can affect your body’s ability to clean our blood, filter extra water out of our blood, and help control your blood pressure. It can also affect red blood cell production and vitamin D metabolism needed for bone health. When your kidneys are...
C++
GB18030
6,838
2.765625
3
[]
no_license
#include "Mesh.h" #include <QFile> #include "../math/Utils.h" void Mesh::normalize() { // centered at (0,0,0), max length = 1 float model_l = this->max[0] - this->min[0]; model_l = this->max[1] - this->min[1] > model_l ? this->max[1] - this->min[1] : model_l; model_l = this->max[2] - this->max[2] > model_l ? this-...
Markdown
UTF-8
11,052
2.890625
3
[ "Apache-2.0" ]
permissive
--- title: The day of the Jeff toc: true donate: false tags: [] date: 2018-05-14 09:34:36 categories: English --- 这里是前言和简介 Listening materials for The day of the Jeff. ### Getting Up The worst part of the day for me is definitely when I have to get up. Waking up, that I can handle. But getting up? That, I hate. The...
JavaScript
UTF-8
805
3.046875
3
[]
no_license
const continuousNumbers = require('./continuousNumbers'); test('When array is [1,7,7,9], output should be 2', () => { expect(continuousNumbers([1,7,7,9])).toBe(2); }); test('When array is [1,7,7,2,9,9,9], output should be 3', () => { expect(continuousNumbers([1,7,7,2,9,9,9])).toBe(3); }); test('When array is...
Ruby
UTF-8
1,387
3.171875
3
[]
no_license
require 'bundler/setup' require 'dino' class Board attr_reader :temp_sensor, :button attr_reader :led_red, :led_green, :led_yellow def initialize @board = Dino::Board.new(Dino::TxRx::Serial.new) @button = Dino::Components::Button.new(pin: 2, board: @board) @temp_sensor = Dino::Components:...
C#
UTF-8
1,915
2.921875
3
[ "Apache-2.0" ]
permissive
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Linq; using System.Threading.Tasks; namespace Spyder.Client { public delegate Task TestHandler(); /// <summary> /// Handles performance metrics and reporting for derived test classes. /// </summary> [TestClass] publ...
Rust
UTF-8
2,114
2.75
3
[ "LLVM-exception", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
use std::convert::TryFrom; use wasm_encoder::ValType; use wasmparser::{Type, TypeDef}; use crate::error::EitherType; #[derive(Debug, Clone)] pub enum PrimitiveTypeInfo { I32, I64, F32, F64, Empty, } #[derive(Debug, Clone)] pub struct FuncInfo { pub params: Vec<PrimitiveTypeInfo>, pub retu...
Java
UTF-8
559
1.945313
2
[]
no_license
package com.example.demo.service; import java.util.List; import org.springframework.stereotype.Service; import com.example.demo.model.AccommodationCategory; import com.example.demo.model.AccommodationType; import com.example.demo.model.dto.AccommodationTypeDTO; @Service public interface AccommodationTypeService { ...
Markdown
UTF-8
10,857
2.546875
3
[ "CC-BY-3.0", "CC-BY-4.0", "MIT" ]
permissive
<properties pageTitle="Aplicativo de Node usando Socket.io | Microsoft Azure" description="Saiba como usar socket.io em um aplicativo de Node hospedado no Azure." services="cloud-services" documentationCenter="nodejs" authors="rmcmurray" manager="wpickett" editor=""/> <tags ms.s...
Java
UTF-8
1,511
2.078125
2
[]
no_license
package com.nic.cloud.service; import cn.hutool.json.JSONUtil; import com.nic.cloud.config.InputSource; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.stream.annotation.StreamListener; import org.springframework.integration.annotation.ServiceActivator; import org.springframework.messaging.support.E...
Java
UTF-8
678
1.84375
2
[]
no_license
package cn.net.immortal.user.controller; //import org.springframework.boot.SpringBootConfiguration; //import org.springframework.security.config.annotation.web.builders.HttpSecurity; //import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; //import org.springframework.sec...
Java
UTF-8
9,243
2.171875
2
[ "MIT" ]
permissive
package com.example.nutzdemo.Module; import com.example.nutzdemo.Bean.Product; import com.example.nutzdemo.Bean.User; import com.example.nutzdemo.Bean.VerificationCode; import com.example.nutzdemo.Util.MD5Utils; import com.example.nutzdemo.Util.MailService; import com.example.nutzdemo.Util.Toolkit; import org.nutz.dao...
Swift
UTF-8
2,966
2.921875
3
[]
no_license
// // ViewController.swift // Lighthouse // // Created by Alina Yu on 10/29/18. // Copyright © 2018 Alina Yu. All rights reserved. // import UIKit import CoreData import CoreLocation import AVFoundation class HomeViewController: UIViewController { // MARK: - Location let location = Location() // set ...
TypeScript
UTF-8
2,718
2.65625
3
[ "MIT" ]
permissive
import * as React from 'react'; import { useAsPressable, useKeyCallback, useOnPressWithFocus, useViewCommandFocus, useAsToggle, } from '@fluentui-react-native/interactive-hooks'; import { CheckboxProps, CheckboxInfo, CheckboxState } from './Checkbox.types'; import { IPressableProps } from '@fluentui-react-nat...
C++
UTF-8
585
3.421875
3
[]
no_license
#include<iostream> using namespace std; /*El usuario ingresa numeros para identificar si es par o impar deteniendoce cuando ingrese -1*/ int main(){ int i; /*do{ cout<<"ingrese numero"<<endl; cin>>i; if(i%2==0){cout<<i<<" Es Par"<<endl;} else{cout<<i<<" Es Impar"<<endl;...
Java
UTF-8
1,930
2.515625
3
[]
no_license
package de.ids_mannheim.korap.sru; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; /** Handler for parsing the match snippet from KorAP search API. * * @author margaretha * */ public class KorapMatchHandler extends DefaultHandler{ private KorapMatch...
C#
UTF-8
2,029
2.625
3
[]
no_license
// Project by Bauss using System; namespace CandyConquer.WorldApi.Enums { /// <summary> /// Enumeration of item positions. /// </summary> public enum ItemPosition { /// <summary> /// Inventory /// </summary> Inventory = 0, /// <summary> /// Head /// </summary> Head = 1, /// <summary> /// Neck...
Python
UTF-8
702
2.8125
3
[]
no_license
from numpy import * import numpy as np data = [ {'x':np.array([0, 0, 0]), 'y': 1}, {'x':np.array([1, 0, 0]), 'y': 1}, {'x':np.array([1, 0, 1]), 'y': 1}, {'x':np.array([1, 1, 0]), 'y': 1}, {'x':np.array([0, 0, 1]), 'y': -1}, {'x':np.array([0, 1, 1]), 'y': -1}, {'x':np.array([0, 1, 0]), 'y': ...
C++
UTF-8
534
3.09375
3
[]
no_license
#include "Collider.h" Collider::Collider() { } Collider::~Collider() { } void Collider::init(int w, int h, int x, int y) { collider_rect = {w, h, x, y}; } bool Collider::collides(SDL_Rect obj) { if (collider_rect.x + (collider_rect.w) >= obj.x && collider_rect.x <= obj.x + (obj.w)) { if (colli...
Java
UTF-8
4,693
2.65625
3
[]
no_license
package uk.co.mobsoc.MobsGames.Player; import java.util.ArrayList; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockIgniteEvent; import org.bukkit.event.block.BlockPlaceEvent; import ...
JavaScript
UTF-8
2,337
2.859375
3
[]
no_license
//nouvelle fonction pour faire DEL sur les cases // var nb = 0; // $( document ).ready(function() { // $('.case').keydown(function(e){ // console.log("1 nb= "+nb+" "+e.keyCode); // if (e.keyCode == '08') { // e.preventDefault(); // console.log("2 nb= "+nb); // if (nb == 1) { // //pre...
Java
UTF-8
639
2.359375
2
[]
no_license
package br.com.alexandreesl.handson.rest; public class Department { private long id; private String name; private String minSalary; private String maxSalary; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setNa...
Python
UTF-8
18,361
2.96875
3
[]
no_license
""" @author: Mamunur Rahman """ import numpy as np import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import pandas as pd from imblearn.over_sampling import SMOTE, ADASYN, BorderlineSMOTE from sklearn.preprocessing import StandardScaler from sklearn.model_selection import StratifiedKFol...
Python
UTF-8
3,822
3.1875
3
[ "MIT" ]
permissive
#!/usr/bin/env python # urlUniq.py takes a list of URLs and uniqs them. # If the file contains both http and https, it dumps all duplicate https # this is useful for creating list-based vuln scans in dire times import re #************************************ # Definitions # This controls results per parameter RESUL...
Python
UTF-8
14,400
2.53125
3
[]
no_license
# coding: utf-8 # In[ ]: from __future__ import division from numpy.random import randn from pandas import Series import numpy as np import pandas as pd import os import time; import datetime import redis np.set_printoptions(precision=4) import sys; #%pwd # In[ ]: config_parms = { 'minute_file_path' : 'E:/...
C++
UTF-8
808
2.765625
3
[ "MIT" ]
permissive
/* * Standby: Several colored dots, weaving in and out of sync with each other */ const uint8_t FADE_RATE = 2; // How long should the trails be. Very low value = longer trails. void juggle() { const uint8_t NUM_DOTS = 4; // Number of dots in use. const uint8_t HUE_INC = 16; // Incremental change in hue...
C
EUC-JP
4,756
2.75
3
[ "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/** * @file feature_postprocess.c * * <EN> * @brief A sample plugin for feature vector postprocessing * </EN> * * <JA> * @brief ħ̤θץ饰Υץ * </JA> * * @author Akinobu Lee * @date Sun Aug 10 15:14:19 2008 * * $Revision: 1.1 $ * */ /** * Required for a file * - get_plugin_info() * * Optiona...
Java
UTF-8
5,460
3.84375
4
[]
no_license
package io.github.netdex.mingame.physics; public class Vector { public final static Vector ZERO = new Vector(0, 0); public double x; public double y; /** * Construct the vector with all components as 0 */ public Vector() { this.x = 0; this.y = 0; } /** * Construct the vector with provided double co...
SQL
UTF-8
267
2.625
3
[]
no_license
CREATE SCHEMA `databasetest` ; CREATE TABLE `databasetest`.`engineering` ( `Id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '' , `Name` VARCHAR(255) NOT NULL COMMENT '', PRIMARY KEY (`Id`) COMMENT '', UNIQUE INDEX `Name_UNIQUE` (`Name` ASC) COMMENT '');
C#
UTF-8
359
2.71875
3
[]
no_license
using System; namespace BookingApp { public class Booking { public DateTime startTime { get; private set; } public DateTime endTime { get; } public Booking(DateTime startTime, TimeSpan duration) { this.startTime = startTime; endTime = startTime.Add(dur...
Markdown
UTF-8
5,124
3.125
3
[ "MIT" ]
permissive
--- layout: post title: Deploying contracts with an EIP-1167 minimal proxy --- # Intro In this post we'll extend the Patreon contracts from my [previous post](https://daltyboy11.github.io/solidity-patreon-challenge/) with the [EIP-1167](https://eips.ethereum.org/EIPS/eip-1167) minimal proxy. The Minimal Proxy helps us...
Swift
UTF-8
2,286
2.796875
3
[ "MIT" ]
permissive
// // BlackMirrorzViews.swift // CloudCube // // Created by Josh Robbins on 15/06/2018. // Copyright © 2018 BlackMirrorz. All rights reserved. // import UIKit import ARKit //--------------------------------- //MARK: - BlackMirrorz Round Button //--------------------------------- @IBDesignable public class BlackM...
Go
UTF-8
1,407
3.15625
3
[]
no_license
package logger import ( "fmt" "io" "log" "os" "strconv" "encoding/json" ) const NONE = 0 const DEFAULT = 1 const ERROR = 2 const DEBUG = 3 const FATAL = 4 func Log(id string, data interface{}, level int) { ll, err := strconv.Atoi(os.Getenv("LOG_LEVEL")) if err != nil { ll = 1 } if ll < level ...
Java
UTF-8
4,930
2.046875
2
[ "Apache-2.0" ]
permissive
package com.github.whitepin.server.api.controller; import com.fasterxml.jackson.databind.exc.MismatchedInputException; import com.github.whitepin.server.api.dto.EvaluationAverageDTO; import com.github.whitepin.server.api.dto.EvaluationListDTO; import com.github.whitepin.server.api.service.EvaluationService; import com...
C
UTF-8
811
2.6875
3
[]
no_license
#ifndef _GESTION_DONNEE_H_ #define _GESTION_DONNEE_H_ /** * \file gestionDonnee.h * \brief ficher source contenant les prototypes des fonctions ralatives à le gestion des donnée * \author Florian.C * \version v1.0 * \date 4 juillet 2020 */ /** * \fn Caractere *chargeParametre(char nomFichier[], Parametre *param...
C
UTF-8
388
3.125
3
[]
no_license
#include <stdio.h> int main(int argc, char **argv) { int T, i, d, a; scanf("%d", &T); getchar(); for(i = 0; i < T; i++) { a = d = 0; char c; while(1) { c = getchar(); if(c == '(') { d++; } else if(c == ')') { d--; if(d < 0) { a = 1; } } else { break;...
Markdown
UTF-8
16,117
2.703125
3
[]
no_license
# Notes from WWDC2021 Lounges on June 8, 2021 ## devtools-lounge ### Concurrency Q: In what OSes will async/await and actors be supported? A: On Apple platforms, we currently support iOS 15, macOS Monterey, etc. This is tied to runtime integration with improvements to Dispatch in those OS releases for better...
Java
UTF-8
933
2.59375
3
[]
no_license
package com.standbyme.domain; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreType; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; @JsonIgnoreType public class Student implem...
C
UTF-8
939
3.109375
3
[ "MIT" ]
permissive
/********************************************** * plot_freq.c : Plots a frequency using python script * * Author: Aduri Sri Sambasiva Advaith * ***********************************************/ /* Order to be followed when piping data to be plotted: 1 - size of data 2 - data 3 - xlabel 4 - ylabel 5 - title Ps:- if mu...
Java
UTF-8
2,579
2.234375
2
[]
no_license
/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * * http://www.gnu.org/licenses/lgpl-3.0.txt * ...
Java
UTF-8
1,457
2.25
2
[]
no_license
package org.gvm.product.gvmpoin.module.rewardsystem; import java.util.ArrayList; import java.util.List; import org.gvm.product.gvmpoin.module.rewardsystem.reward.Reward; import org.gvm.product.gvmpoin.module.rewardsystem.reward.RewardRepository; import org.gvm.product.gvmpoin.module.rewardsystem.reward.rewardpopular.R...
Python
UTF-8
3,100
3.125
3
[]
no_license
def sum3(nums): l = len(nums) s= [] if l>2: for i in range(l): for j in range(i+1,l): for k in range(j+1,l): if nums[i]+nums[j]+nums[k] == 0: temp = [nums[i],nums[j],nums[k]] temp.sort() ...
Java
UTF-8
415
2.3125
2
[]
no_license
package constants; public enum ScriptType { NPC(-1), QUEST_START(0), QUEST_END(1), ITEM(2), ON_FIRST_USER_ENTER(-1), ON_USER_ENTER(-1), PORTAL(), EVENT(), REACTOR(); private final byte value; ScriptType() { this.value = -2; } ScriptType(int value) { ...
PHP
UTF-8
1,152
2.953125
3
[]
no_license
<?php namespace MovieParser\IMDB\Parser; class LoadTrivia { /** * @var \MovieParser\IMDB\Matcher\ProcessTrivia */ private $processTrivia; public function __construct( \MovieParser\IMDB\Matcher\ProcessTrivia $processTrivia ) { $this->processTrivia = $processTrivia; $this->client = new \GuzzleHttp\Cl...
Python
UTF-8
5,001
3.671875
4
[]
no_license
#!/usr/bin/env python3 import sys # Define and global variables and constants donors = {'Jimmy Nguyen': [100, 1350, 55], 'Steve Smith': [213, 550, 435], 'Julia Norton': [1500, 1500, 1500], 'Ed Johnson': [150], 'Elizabeth McBath': [10000, 1200] } class Donor(object):...
Python
UTF-8
436
3.6875
4
[]
no_license
import tensorflow as tf # 定义一个“计算图” a = tf.constant(1) # 定义一个常量Tensor(张量) b = tf.constant(1) c = a + b # 等价于 c = tf.add(a, b),c是张量a和张量b通过Add这一Operation(操作)所形成的新张量 sess = tf.Session() # 实例化一个Session(会话) c_ = sess.run(c) # 通过Session的run()方法对计算图里的节点(张量)进行实际的计算 print(c_)
C
UTF-8
342
3.328125
3
[]
no_license
#include<stdio.h> int main() { double balance, interest_rate, time, total_balance; printf("Enter the banlance, interest and annual fee: "); scanf("%lf %lf %lf", &balance, &interest_rate, &time); total_balance = ((balance * time * interest_rate)/100)+balance; printf("total balance will be : %.2lf...
PHP
UTF-8
1,385
2.609375
3
[]
no_license
<?php namespace App\Command; use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfo...
Markdown
UTF-8
1,879
2.625
3
[ "MIT" ]
permissive
--- path: "/blog/page_2916" title: "Part 2916" --- вной, вопроса о значении власти, те самые частные и биографические историки, о которых было говорено выше, признают как будто, что совокупность воль масс переносится на исторические лица безусловно, и потому, описывая какую-нибудь одну власть, эти историки предполагаю...
Markdown
UTF-8
6,992
2.5625
3
[]
no_license
--- layout: single title: Issue One Masthead category: [issue1] author_profile: false read_time: false comments: false share: true related: false --- ## Co-Founders ### Muskan Nagpal <br> ![](https://github.com/TheMedley/TheMedley.github.io/raw/master/assets/masthead/MuskanNagpal.jpg) <br> Muskan Nagpal, currently, ...
JavaScript
UTF-8
638
2.59375
3
[]
no_license
const sgMail = require("@sendgrid/mail"); require("dotenv").config(); sgMail.setApiKey(process.env.SENDGRID_API_KEY); exports.sendMessage = async (email, firstName, lastName, company, message) => { const msg = { to: process.env.TO, from: process.env.FROM, subject: "User has given you contact info", ht...
C#
UTF-8
1,176
3.734375
4
[ "MIT" ]
permissive
using System; using System.Collections; namespace ArrayListDemo { class ArrayListDemo { static void Main() { Car car1 = new Car(); car1.Make = "Benz"; car1.Model = "S600"; Car car2 = new Car(); car2.Make = "BMW"; car2.Model = "BMW7"; Book book1 = new Book();...
Markdown
UTF-8
1,215
2.578125
3
[]
no_license
PROBLEM: Although images play a vital role in the spread of information,but at same time they can also be used to disseminate misinformation on a wide scale. Viral social media posts and message forwards usually consist of an image and an associated title. Although the image might depict one a particular phenomenon or ...
Python
UTF-8
1,613
2.84375
3
[]
no_license
import cv2 import numpy as np import os import glob def histequ(gray, nlevels=256): # Compute histogram histogram = np.bincount(gray.flatten(), minlength=nlevels) print ("histogram: ", histogram) # Mapping function uniform_hist = (nlevels - 1) * (np.cumsum(histogram)/(gray.size * 1.0)) uniform...