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
19,794
3.078125
3
[]
no_license
import unittest from multiset import * class TestContained(unittest.TestCase): def test_element_contained(self): Multi1 = MultiSet() Multi1.insert('a') result = 'a' in Multi1 expected = True self.assertEqual(result, expected) def test_string_contained(self): M...
Markdown
UTF-8
892
3.046875
3
[]
no_license
# QuizApp This is a Science Quiz app that quizes a user about a general science Knowledge. The app gets the user's name with an edit text view and get gender with a radio button. the app comprises 10 questions, the questions with more than one correct option uses check boxes, the questions with only one correct option...
Python
UTF-8
1,389
3.046875
3
[]
no_license
#!/usr/bin/env python3 # tratando de escribir el stdout a un archivo import os, socket, subprocess #Server def main(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((socket.gethostname(), 1234)) # socket.gethostname() = localhost s.listen(1) conn, addr = s.accept() print(f"con...
C#
UTF-8
2,626
3.234375
3
[]
no_license
using ExcelDataReader; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SeleniumProject.ComponentHelper { public class ExcelReaderHelper_KD { private static IDictionary<string,IExcelD...
Markdown
UTF-8
9,407
3.0625
3
[]
no_license
具体查看: [主题/theme/说明文档](https://vuepress.vuejs.org/zh/theme/) [默认主题配置/说明文档](https://vuepress.vuejs.org/zh/theme/default-theme-config.html) [自定义主题/说明文档](https://vuepress.vuejs.org/zh/theme/) [默认主题配置/仓库](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/theme-default) *继承默认主题,自定义主题* 通过上面的说明文档,就可以配置主题了! -...
PHP
UTF-8
691
2.9375
3
[]
no_license
<?php /** * Class CheckJoomlaCredentials */ class CheckJoomlaCredentials { /** * @param string $username * @param string $password * @param \User $user * * @return bool */ public function checkLegacyJoomlaCredentials($username, $password, \User $user) { list($legac...
C#
UTF-8
3,036
3.1875
3
[]
no_license
using System; using System.Globalization; namespace Telekad.Utils { public static class AttributeUtils { /// <summary> /// Attempts to retrieve an attribute from a type /// </summary> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBas...
Ruby
UTF-8
3,061
2.734375
3
[]
no_license
require 'util/http_verify_none.rb' require 'net/https' require 'uri' require 'cgi' require 'yaml' class Autoingestion ITUNES_URL = "https://reportingitc.apple.com/autoingestion.tft" attr_accessor :username attr_accessor :password attr_accessor :vendor_number attr_accessor :type_of_report attr_accessor :da...
C++
UTF-8
2,539
2.609375
3
[ "BSD-3-Clause" ]
permissive
#pragma once struct fuku_tds_section { uint32_t offset; uint32_t size; uint16_t index; uint16_t type; }; enum fuku_tds_result { tds_result_ok, tds_result_error }; struct fuku_tds_linenumbers_block { uint32_t segment_id; uint32_t block_start; uint32_t block_end; std::map<uint...
PHP
UTF-8
202
3.0625
3
[ "MIT" ]
permissive
#!/usr/bin/env php <?php $scope = 12; $width = 4; for($y = 1; $y <= $scope; ++$y) { for($x = 1; $x <= $scope; ++$x) { echo str_pad($x * $y, $width, ' ', STR_PAD_LEFT); } echo PHP_EOL; }
C
UTF-8
15,528
2.5625
3
[]
no_license
#include "ConsoleShell.h" #include "Console.h" #include "Keyboard.h" #include "Utility.h" #include "PIT.h" #include "RTC.h" #include "AssemblyUtility.h" #include "Task.h" #include "ShutDownPC.h" // 커맨드 테이블 정의하기, 커맨드 테이블에서 문자열 비교후 함수 포인터를 사용해서 해당 커맨드를 실행할 것이다 SHELLCOMMANDENTRY gs_vstCommandTable[] = { {"help", "Show H...
C#
UTF-8
1,126
2.671875
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CellScript: MonoBehaviour { /** * Ссылка на текстовое поле */ public Text textField; /** * Ссылка на кнопку */ public Button button; /** * Значение ячейки */ private int m_value = ...
C
UTF-8
315
3.78125
4
[]
no_license
#include<stdio.h> //Program to swap two integers void swap(int *c,int *d); int main() { int a, b; printf("Enter 2 numbers"); scanf("%d %d", &a, &b); swap(&a, &b); printf("swapping...\n"); printf("a = %d, b = %d\n", a, b); } void swap(int *c, int *d) { int temp = *c; *c =*d; *d = temp; }
C
UTF-8
2,713
3.1875
3
[]
no_license
/* ** EPITECH PROJECT, 2018 ** tests_count_len ** File description: ** Implementation of tests_count_len */ #include "mysh.h" #include <criterion/criterion.h> #include <criterion/redirect.h> #include <stdio.h> #include <ctype.h> Test(count_len, my_strlen_ko) { int result = my_strlen(NULL); cr_assert_eq(resul...
JavaScript
UTF-8
2,136
2.796875
3
[]
no_license
const { Usuario } = require('../models/usuario'); const { ObjectID } = require('mongodb'); module.exports = { // Gets all the users index: async (req, res, next) => { const users = await Usuario.find({}); res.status(200).json(users); }, // Creates a new user postUser: async (req, res, next) => { try {...
Markdown
UTF-8
3,162
2.71875
3
[ "Apache-2.0" ]
permissive
## Spring 整合 JMS Spring 对一些模版方法进行了一些封装。 1. Spring 配置文件 ```xml <beans> <bean id="connectionFactory" class="org.apache,.activemq.ActiveMQConnectionFactory"> <property name="brokerURL"> <value>tcp://localhost:61616</value> </property> </bean> <bean id="jmsTemplate" class="org.s...
JavaScript
UTF-8
1,824
2.515625
3
[ "MIT" ]
permissive
import ProxyPlatform from '../Proxy/ProxyPlatform'; import {DIRECTION_NONE, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_RIGHT, DIRECTION_LEFT} from '../Entity/Item'; export default class KeyboardController { _proxy: ProxyPlatform; constructor(game, proxy: ProxyPlatform) { this._proxy = proxy; thi...
C++
UTF-8
1,784
3.09375
3
[]
no_license
#pragma once #ifdef MYDLLLOADLIB_EXPORTS #define MYDLLLOADLIB_API __declspec(dllexport) #else #define MYDLLLOADLIB_API __declspec(dllimport) #endif class IDoubleLinkedList { public: virtual ~IDoubleLinkedList() { ; } virtual void Clean() = 0; virtual bool Empty() = 0; // Add a new element at the head of the li...
SQL
UTF-8
2,924
3.40625
3
[]
no_license
CREATE TABLE IF NOT EXISTS plots( x INT NOT NULL, y INT NOT NULL, wood INT, clay INT, iron INT, stone INT, food INT, total INT, background INT, plot_type VARCHAR(50), layer INT, region INT, hospital BOOLEAN, sovable BOOLEAN, ...
Python
UTF-8
922
3.90625
4
[]
no_license
""" Robert Graham (rpgraham84@gmail.com) Project Euler Counting Sundays Problem 19 You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has ...
Swift
UTF-8
4,019
2.625
3
[]
no_license
// // CardViewController.swift // oliginal game // // Created by kaoru akiba on 2017/05/21. // Copyright © 2017年 kaoru akiba. All rights reserved. // import UIKit class CardViewController: UIViewController { @IBOutlet var label1: UILabel!//相手左から1番目 @IBOutlet var label2: UILabel!//相手左から2番目 @IBOutlet v...
Markdown
UTF-8
3,280
2.953125
3
[ "MIT" ]
permissive
# Ring Contrastive Learning A PyTorch implementation of *Conditional Negative Sampling for Contrastive Learning of Visual Representations* (https://arxiv.org/abs/2010.02037). ## Abstract Recent methods for learning unsupervised visual representations, dubbed contrastive learning, optimize the noise-contrastive estim...
PHP
UTF-8
1,474
3.359375
3
[]
no_license
<?php namespace App\Presentation\DTO; use App\Domain\Entity\Board; use App\Domain\ValueObject\Sign; class GameState { /** * @var Sign[][] */ private $boardState; /** * @var string */ private $nextMove; /** * @var bool */ private $isOver; /** * @var st...
Markdown
UTF-8
637
2.640625
3
[]
no_license
## To start the app 1. `yarn` to install dev dependencies 2. `yarn start-server` to run the server. 3. `yarn start` to run the frontend. Go to **http://lvh.me:8080** in your browser where you can see the web application running. 4. For production run the `yarn build` command. ## Deployment You can easily deploy ...
Markdown
UTF-8
4,101
2.65625
3
[]
no_license
# Auto_Operation_WeChat_robot 这个项目是一个微信机器人,由广东海洋大学互联网社群技术部开发。通过本机器人可以实现自动化的管理社群涉及的大量群聊,减轻管理人员的压力。 ## 功能一:定时向指定群聊发送新闻 自动爬取网页信息,然后对信息进行处理之后,发送到特定微信群的中。有以下这些功能: ### 1、定时(15min)爬取readhub.me的新闻内容 ### 2、将新闻内容存入到数据库当中 数据库长这样: ![db_sample](https://codingnote.oss-cn-shenzhen.aliyuncs.com/db_sample.png) ### 3、定时从数据库中获取新闻内容...
Markdown
UTF-8
1,772
3.109375
3
[]
no_license
# Main Project: * Create 2 Receivers and 3 Senders where the Senders are sending data to the Receivers. * The 5 Programs are running concurrently on the same machine. # Jobs ## Sender * Create a random 32 bit number generator for each of the senders * Assign and store the values **251, 257, or 997** to the res...
Python
UTF-8
2,756
3.546875
4
[]
no_license
# Welcome to Po's Python Pong Game # By Po Kealiinohomoku # Intensive Project 1 import turtle # Screen setup win = turtle.Screen() win.title("Po's Python Pong") win.bgcolor("black") win.setup(width=800, height=600) win.tracer(0) # Gameplay objects # Score Variables score_a = 0 score_b = 0 # Player 1 Paddle pad...
C++
UTF-8
1,135
2.875
3
[]
no_license
#include "list_layout.h" ui::uint ui::ListLayout::width_horizontal() const { ui::uint pad1 = padding(); ui::uint width = pad1; for(uint i = 0 ; i < childrenCount() ; i++) { View* currChild = getChild(i); width += currChild->width() + pad1; } return width; } ui::uint ui::ListLayout:...
C
UTF-8
694
2.9375
3
[ "MIT" ]
permissive
/** \file crc16.h \brief functions for calculating 16 bit cyclic redundancy codes \CRC-16/IBM/SDLC */ #ifndef CRC16_H #define CRC16_H #include <stddef.h> #include <stdint.h> /** \brief initial crc value */ #define CRC16_INIT (0xffff) /** \brief finalize crc value \param val an initialized crc value \return a final...
Java
UTF-8
760
2.953125
3
[]
no_license
package sa.main.controller; import sa.main.model.Obstacle; import sa.main.model.Player; public class GameController { private Player player; private Obstacle obstacle; private boolean touched; public GameController(Player player, Obstacle obstacle){ this.player = player; this.obstacle = obstacle; }...
Java
UTF-8
634
1.90625
2
[]
no_license
package com.official.foundation.facade.user; import com.official.foundation.domain.po.user.Account; import com.official.foundation.facade.BaseFacadeService; public interface AccountFacadeService extends BaseFacadeService<Account,Long>{ /** * 根据用户名/邮箱/验证手机 获取账号信息 * @param username * @return */ pub...
C++
UTF-8
416
3.25
3
[]
no_license
#include<stdio.h> #include<vector> #include<iostream> #include<string> using namespace std; void all_permute(string &arr,int l,int r) { if(l==r) cout<<arr<<endl; else { for(int i=0;i<=r-l;i++) { swap(arr[l],arr[l+i]); all_permute(arr,l+1,r); swap(arr[l],arr[l+i]); //backtrack } } } int ...
Python
UTF-8
313
2.5625
3
[]
no_license
from numpy import* m=array(eval(input("medias:"))) p=array(eval(input("presenca:"))) v3=int(input("carga horaria:")) ap=0 rf=0 rn=0 v=zeros(3, dtype=int) for i in range(size(m)): y=v3*75/100 if(m[i]>=5 and p[i]>=y): ap+=1 elif(m[i]<5): rn=rn+1 elif(p[i]<y): rf=rf+1 v[0]=ap v[1]=rn v[2]=rf print(v)
TypeScript
UTF-8
217
2.796875
3
[ "MIT" ]
permissive
/** * @internal */ export interface SkyDateRange { /** * Specifies the last date in the date range. */ endDate?: Date; /** * Specifies the first date in the date range. */ startDate?: Date; }
Python
UTF-8
1,294
3.296875
3
[ "MIT" ]
permissive
#Crosby Ravert and Akshit Pathania #Pitt-Bradford: Object Oriented Programming, Spring 21 from matplotlib.pyplot import plot, bar, show, subplots import matplotlib.pyplot as plt file = open("batting.csv") file.readline() year = [] battingAvg = [] bestAvg = [] tempYearAvgs = [] yearCounter = 1871 batterCount = 0 yearl...
C++
UTF-8
866
2.96875
3
[ "MIT" ]
permissive
class Solution { public: int myAtoi(string str) { long long num=0; bool negative = false; int index = 0, sz = str.length(); while(index<sz && str[index]==' '){ index++; } if(index<sz){ if(str[index]=='-'){ negative = true; ...
PHP
UTF-8
912
2.609375
3
[ "MIT" ]
permissive
<?php namespace RabbitCMS\Templates\Http\Requests; use Illuminate\Routing\Route; use RabbitCMS\Carrot\Http\Request; class TemplateRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { retur...
JavaScript
UTF-8
2,435
3.125
3
[]
no_license
const pokemonList = document.querySelector('.pokemon--list'); const btn = document.querySelector('.btn-load-more'); const modal = document.querySelector('.modal'); const backdrop = document.querySelector('.backdrop'); const app = document.querySelector('.app'); let offset = 0; let limit = 20; const loadPokemones =...
C#
UTF-8
3,503
3.203125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SOLIDBuzzFuzz { public class BuzzFuzz : IEnumerator<string>, IEnumerable<string> { internal class Substitution { public Substitution(int digit, string wor...
Markdown
UTF-8
628
2.734375
3
[ "MIT" ]
permissive
# Math-tokenizer # [![Build Status](https://travis-ci.org/DahlitzFlorian/math-tokenizer.svg?branch=master)](https://travis-ci.org/DahlitzFlorian/math-tokenizer) ## Description ## This is a simple and lightweighted tokenizer for mathematical functions written in pure Python. It was tested with Python >= 3.4. version 1...
Python
UTF-8
885
3.703125
4
[]
no_license
from django.shortcuts import render, HttpResponse # Create your views here. def hello(request, nome, idade): return HttpResponse(f'<h1>Hello {nome}, você tem {idade} anos, correto?</h1>') def soma(request, numero1, numero2): resultado = numero1 + numero2 return HttpResponse(f'<h1>A soma de {numero1} + {n...
C#
UTF-8
3,498
3.125
3
[ "BSD-2-Clause" ]
permissive
using System; #if !NET35 using System.Collections.Concurrent; #endif using System.Collections; using System.Collections.Generic; using System.Linq; namespace SharpRaven.Utilities { public class CircularBuffer<T> { #if NET35 private class ConcurrentQueue<T> : ICollection, IEnumerable<T> ...
PHP
UTF-8
1,197
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Auth; use App\EmailConfirmation; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class EmailVerificationController extends Controller { /** * Verifies the user email * * @param $id * @param $token * @return \Illuminate\Contracts\Vi...
Swift
UTF-8
2,108
2.859375
3
[]
no_license
// // XMLExtensions.swift // xccikit-cov // // Created by Tristian Azuara on 11/13/20. // import Foundation //let XMLHeader = XMLElement(name: "?xml", attributes: [ // "version": "1.0", // "encoding": "UTF-8", // "standalone": "yes" //]) //XMLHeader //<!DOCTYPE report // PUBLIC '-//JACOCO//DTD Report 1....
C++
UTF-8
7,485
3.46875
3
[]
no_license
// // Map.cpp // Proj2 // // Created by Mitchell McLinton on 23/1/20. // Copyright © 2020 Mitchell McLinton. All rights reserved. // #include "Map.h" #include <iostream> // TODO: Implement constructor Map::Map() : m_nItems(0) { dummy.next = &dummy; dummy.prev = &dummy; } // TODO: Implement destructor Map...
Markdown
UTF-8
1,608
3.078125
3
[]
no_license
# Alphabet_Soup ## Project Description The project consisted of creating a machine learning model to predict the success of a venture paid by Alphabet Soup. ## Resources - Data source: - charity_data.csv - Software: Python 3.7.7, Jupyter Notebook, Visual Studio Code 1.43.1 ## Preprocessing * Dropped identificati...
Python
UTF-8
168
3.09375
3
[ "CC0-1.0" ]
permissive
f = open('temp.txt', 'w') lines = ['line {}\n'.format(i) for i in range(10)] f.writelines(lines) f.close() f = open('temp.txt', 'r+') f.write('new line') f.close()
JavaScript
UTF-8
1,396
2.796875
3
[ "MIT", "Apache-2.0" ]
permissive
/* @flow */ import React, { Component } from 'react'; /** * Implements a toolbar in React/Web. It is a strip that contains a set of * toolbar items such as buttons. * * @class StatelessToolbar * @extends Component */ export default class StatelessToolbar extends Component { /** * Base toolbar component...
Markdown
UTF-8
2,820
2.59375
3
[]
no_license
# \raw_image_development_anchor + \raw_image_anchor file records image data captured by the camera's image sensor without any processing + things editable only with \raw_image_link\plural{s}: + white balance (thus don't worry about a white balance setting when shooting raw) + overexposed highlights which hid the...
Java
UTF-8
1,200
2.015625
2
[]
no_license
package com.kk.weather.entity; /** * * @author KGZ * @date 2018/11/26 */ public class User { private int userId; private String nickName; private String account; private String password; //星座 private String constellation; private String email; public String getNickName() { ...
JavaScript
UTF-8
1,286
3.21875
3
[]
no_license
let React = require('react'); let TemperatureInput = require('./TemperatureInput'); class Calculator extends React.Component{ constructor(props) { super(props); this.changeCelsius = this.changeCelsius.bind(this); this.changeFarenheit = this.changeFarenheit.bind(this); this.state = {...
Python
UTF-8
11,958
2.609375
3
[]
no_license
#FIXME: This doesn't close its connections!!!! import serial import socket import Queue import thread import threading import time import json #TODO:redo this naming scheme serialPortAddresses = ['/dev/ttyACM0', '/dev/ttyACM1', '/dev/ttyACM2', '/dev/ttyACM3', '/dev/ttyACM4', '/dev/ttyACM5', '/dev/ttyACM6', '/dev/ttyA...
Python
UTF-8
125
3.5625
4
[]
no_license
A = int(input("ingrese el valor(entero) A")) B = int(input("ingrese el valor(entero) B")) RES = (A + B)** (2 / 3) print(RES)
C++
UTF-8
293
3.171875
3
[]
no_license
#include <iostream> using namespace std; int group(int x) { if (x == 2) return 0; if (x == 4 || x == 6 || x == 9 || x == 11) return 1; return 2; } int main(int argc, char *argv[]) { int x, y; cin >> x >> y; if (group(x) == group(y)) printf("Yes\n"); else printf("No\n"); return 0; }
Python
UTF-8
2,157
3.46875
3
[]
no_license
import pyglet from pyglet.gl import * #global size of all tiles tile_size = 16 def set_tile_size(size): tile_size = size #class that defines all tiles class tile: def __init__(self): #all tiles have the same size self.size = tile_size #use pyglet to create a texture self.imag...
C
UTF-8
352
3.734375
4
[ "MIT" ]
permissive
#include <stdio.h> void swap(int *x, int *y){ int temp; temp = *x; *x = *y; *y = temp; } void sort(int *x, int *y, int *z){ if (*x < *y) swap(x, y); if (*x < *z) swap(x, z); if (*y < *z) swap(y, z); } int main(){ int x, y, z; scanf("%d%d%d", &x, &y, &z); sort(&x, &y, &z); printf("%d %d ...
C#
UTF-8
2,255
2.71875
3
[]
no_license
using System; using System.IO; using System.Collections.Generic; using System.Xml.Serialization; using System.Collections; namespace Common { [Serializable] public class Path : IEquatable<Path> { public String name; public List<Node> points; public float time; public const int NOISE = -1; public co...
Java
UTF-8
773
2.515625
3
[]
no_license
package com.kevin.datastruct.controller; import com.google.common.util.concurrent.RateLimiter; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * @author chenligeng * guava 缓存限流 */ @RestController @Slf4j ...
Python
UTF-8
992
3.078125
3
[]
no_license
''' Bubble Charts(冒泡图) ''' # 加载numpy和pandas包 import numpy as np import pandas as pd # 加载plotly包 import plotly as py from plotly.offline import plot # 加载数据 timesData = pd.read_csv("./timesData.csv") import plotly.graph_objs as go # 准备数据 x2011 = timesData.student_staff_ratio[timesData.year == 2011] x2012 = timesData...
PHP
UTF-8
190
2.875
3
[]
no_license
<?php $a = "testing srtlen"; echo strlen($a); //spasi ikut di hitung echo "<br>"; echo str_word_count($a); echo "<br>"; echo strrev($a); echo "<br>"; echo str_replace("e", "a", $a); ?>
JavaScript
UTF-8
2,850
2.609375
3
[]
no_license
const axios = require('axios'); const request = require('request'); const yelp = require('yelp-fusion'); const mongoose = require('mongoose'); const express = require('express'); const bodyParser = require('body-parser'); const { API_TOKEN } = require('./env/config.js'); const chalk = require('chalk'); let apiKey; try...
Java
UTF-8
823
2.671875
3
[]
no_license
package com.example.personacrud.domain; import com.example.personacrud.domain.values.IsProfessional; import com.example.personacrud.domain.values.Name; import com.example.personacrud.domain.values.Phone; public final class PersonBuilder { protected Name name; protected Phone phone; protected IsProfessiona...
C
GB18030
4,046
2.84375
3
[]
no_license
#include"DS1302.h" #include "delay.h" uint8_t read[7]={0x81,0x83,0x85,0x87,0x89,0x8b,0x8d};//롢֡ʱա¡ܡļĴַ uint8_t write[]={0x80,0x82,0x84,0x86,0x88,0x8a,0x8c};//д롢֡ʱա¡ܡļĴַ /*PA4.6Ϊ*/ /*PA5Ϊ©ģʽģʽܹʵ˫IO*/ void ds1302_GPIO_Configuration(void) { GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out...
Java
UTF-8
425
2.890625
3
[]
no_license
package Visual; import java.awt.Color; import java.awt.Frame; public class FirstFrame extends Frame{ public static void main(String args[]){ FirstFrame fr=new FirstFrame("First container!"); fr.setSize(240,240); fr.setBackground(Color.yellow); fr.setVisible(true); } public FirstFrame(Str...
Java
UTF-8
2,378
1.851563
2
[]
no_license
package com.qdxy.app.lhjh.activities.storageRoom; import android.os.Bundle; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.View; import com.lf.tempcore.tempActivity.TempActivity; import com.qdxy.app.lhjh.R; import com.qdxy.app.lhjh.emues.CommonTyp...
Go
UTF-8
247
3.21875
3
[ "MIT" ]
permissive
package leap // IsLeapYear check if the year is leap or not func IsLeapYear(year int) bool { leap := false if year%4 == 0 { leap = true if year%100 == 0 { leap = false if year%400 == 0 { leap = true } } } return leap }
Java
UTF-8
4,563
3.78125
4
[]
no_license
package com.udemy.trees; import java.util.PriorityQueue; public class Heap { private int[] heap; private int size; public Heap(int capacity){ this.heap = new int[capacity]; } /** * Max heap * First insert left most position * then heapify by swapping with the parent until ...
Java
UTF-8
1,157
2.171875
2
[]
no_license
package besttelecomspring.repository; import besttelecomspring.domain.Mark; import besttelecomspring.domain.Product; import besttelecomspring.domain.Type; import java.util.List; import java.util.Optional; public interface ProductRepository { Product addProduct(Product product); List<Type> getTypeList(); ...
PHP
UTF-8
960
2.515625
3
[]
no_license
<?php declare(strict_types=1); /** * This file is part of AsyncVerimail. * * Copyright (c) 2020 Balovnev Anton <an43.bal@gmail.com> */ namespace App\Throttling; use Closure; use React\EventLoop\LoopInterface; use React\Stream\ReadableStreamInterface; class Factory { private LoopInterface $eventLoop; pub...
Java
UTF-8
5,730
2.1875
2
[]
no_license
package com.example.adriana.news; import android.text.TextUtils; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.Http...
Java
UTF-8
7,827
2.359375
2
[]
no_license
package com.spw.elife.util; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.sql.DriverManager; import java.sql.ResultSet; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Li...
Java
UTF-8
336
1.546875
2
[]
no_license
package com.shgx.subbus.subbusone; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SubbusoneApplication { public static void main(String[] args) { SpringApplication.run(SubbusoneApplication.class, ...
Java
GB18030
900
2.140625
2
[]
no_license
package cn.edu.cust.srvs; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import cn.edu.cust.dao.DaoSupport; import cn.edu.cust.util.Info; @Service("/agencySrv") public class AgencySrv { @Resource(name="daoSupp...
Java
UTF-8
1,362
3.296875
3
[ "Apache-2.0" ]
permissive
package rui.coder.algorithms.algs4.第一章_基础.a_第一节_基础编程模型.a_答疑; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class IntegerOverflowTest { @Test void abs() { assertEquals(-2147483648,Math.abs(-2147483648)); System.o...
Python
UTF-8
1,189
2.5625
3
[ "MIT" ]
permissive
import sys import os import time import socket import random import time import main class portchange: def attack(self): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(1490) main.Hasky.clear(self) print(os.system("figlet 'Port Change DDOS' -f digital...
Python
UTF-8
1,433
2.96875
3
[]
no_license
# Problem from UVA # https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2498 parent = dict() ranks = dict() members = dict() def make_set(): global parent, ranks, members parent = dict() ranks = dict() members = dict() def find_set(u): if parent.get(u) is not No...
C++
UTF-8
3,048
2.90625
3
[]
no_license
#include "trackIMU.h" namespace rgbd { imuTrack::imuTrack() { theta = glm::vec3(0); } imuTrack::~imuTrack() { } void imuTrack::processGyro(k4a_imu_sample_t imuValues) { if (first) // On the first iteration, use only data from accelerometer to set the camera's initial position { ...
C++
UTF-8
514
2.546875
3
[]
no_license
#include "Headers/includes.hpp" #include "Headers/window.h" Window::Window(QWidget *parent): QWidget(parent=0) { grid = new QGridLayout(this); grid->setOriginCorner(Qt::TopLeftCorner); setLayout(grid); } void Window::addWidgetWindow(QWidget *widget, int x, int y, int dx, int dy){ if (dx != 0 && dy != 0){ grid...
C++
UTF-8
434
2.625
3
[]
no_license
#include <bits/stdc++.h> struct pe{ long long a, b, c; }p[100005]; bool cmp(const pe &a, const pe &b){ return a.c<b.c; } int main(){ int n; long long k1, k2, sum=1; std::cin>>n>>k1>>k2; for(int i=0;i<n;i++){ std::cin>>p[i].a>>p[i].b; p[i].c=p[i].a*p[i].b; } std::sort(p, p+n, cmp); for(int i=0;i<n-1;i++){...
Java
UTF-8
3,608
2.25
2
[]
no_license
package com.wlyu.bubbles; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.lang.reflect.Type; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.wlyu.bubbles.PullToRefreshListView.OnRefreshListener; import java.util.ArrayList; import java...
Java
UTF-8
2,616
1.9375
2
[]
no_license
package com.erzihutama.erzihutamaapps.View.profil; import android.app.Dialog; import android.app.DialogFragment; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android...
JavaScript
UTF-8
1,401
2.578125
3
[ "MIT" ]
permissive
'use strict'; const R = require('ramda'), __ = require('./_private.js'); const isNumberBetween = R.curry((min, max, n) => { return R.is(Number, n) && n > min && n < max; }); const isNumberBetweenInclusive = R.curry((min, max, n) => { return R.is(Number, n) && n >= min && n <= max; }); const numberIsOneOf...
C
UTF-8
355
3.625
4
[]
no_license
#include<stdio.h> int main() { int x; //入力される秒数 int a, b, c; //時間 //入力 printf("秒数を入力→ "); scanf("%d", &x); //処理 a = x / 3600; b = x % 3600 / 60; c = x % 3600 % 60; //出力 printf("時, 分, 秒 = %d, %d, %d\n", a, b, c);//h, m, s return 0; }
Markdown
UTF-8
5,621
2.765625
3
[]
no_license
+++ titre = "<em>Snatch, tu braques ou tu raques</em>, Guy Ritchie" title = "Snatch, tu braques ou tu raques, Guy Ritchie" url = "/snatch-braques-raques-ritchie" date = "2015-08-02T18:43:41" Lastmod = "2015-08-02T18:49:26" cover = "https://voiretmanger.fr/wp-content/2015/08/snatch-brad-pitt.jpg" categorie = [ "À voir" ...
JavaScript
UTF-8
2,325
3.875
4
[]
no_license
const poem = ` The dogs are running. The dogs are happy. The owners are drunk. No dogs survived. `; const sentenceStarterWords = []; const createMarkovTable = text => { const table = {}; let words = text.split(/[ ;\-\n]+/); words = words.filter( word => word.length > 0 ); // // words = words.filter( func...
Java
UTF-8
776
2.375
2
[]
no_license
package com.alexandre.springmvc; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; @SpringBootApplication public class SpringmvcApplication { public static void main(String[] a...
C++
UTF-8
695
3.765625
4
[]
no_license
#include <iostream> #include <thread> /* * Compilation instructions * $ g++ hello_world.cpp -std=c++0x -lpthread -o hello * $ ./hello */ void add_2(int * temp) { *temp += 2; return; } void divide_2(int * temp) { *temp /= 2; return; } int main() { /* * lambda expression: * all...
Python
UTF-8
4,506
3.03125
3
[ "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
from enum import Enum from math import sqrt from test.lonestar.calculate_degree import calculate_degree import numpy as np from katana import do_all, do_all_operator from katana.local import Graph, ReduceSum class DegreeType(Enum): IN = 1 OUT = 2 @do_all_operator() def sum_degree_operator( graph: Grap...
SQL
UTF-8
5,733
3.25
3
[]
no_license
-- ------------------------------------------------------------------ -- Title: Extraction of treatments -- Notes: This query extracts information about treatments that patients received during their ICU stay. -- We can observed that treatments with the same name or same function were grouped. -- For instance...
JavaScript
UTF-8
2,221
3.140625
3
[]
no_license
/* This has to be changed for different exercises. Mainly the DOM Related parts - dealing with the model display */ class View extends ViewBase { constructor(){ super(...arguments) this.arrayBodyHelper = new Div ($ (ARRAY_BODY)); this.c = 0; this.elementsByIndex = [ ]; } // start up a new ...
Markdown
UTF-8
5,736
2.75
3
[ "MIT" ]
permissive
--- layout: post title: 2020《Paired Representation Learning for Event and Entity Coreference》 categories: [Note, Entity Coreference, Event Coreference] description: 通过成对特征学习解决事件与实体同指 keywords: Joint Model,Cross-document,Coreference Resolution mathjax: true original: true author: 黄琮程 authorurl: https://github.com/Ottohc...
C
UTF-8
1,162
2.703125
3
[]
no_license
/*int path=0, i, j, k; for(k=0; k<n; k++){ for(i=0; i<n; i++){ for(j=0; j<n; j++){ path+=m[i][k]*m[k][j]; } } }*/ #include<stdio.h> int main(void) { int n; int m[26][26],i,j,ed=0,nd=0,ad=0,aed=0; int ch,ch1; int path=0, k; printf("enter:how many vertics: \n"); scanf("%d",&n); printf("now ente...
Java
UTF-8
1,373
2.25
2
[]
no_license
package tipqc.cite.techproject.magnacarta.iwatch.lawsearch.magnadatabase; /** * Created by Benjoe on 2/23/14. */ public class MagnaCartaTableDB { String chapter = null; String lawdescription = null; String section = null; String subsection = null; String keywordtag = null; Stri...
Python
UTF-8
730
3.359375
3
[ "MIT" ]
permissive
# Title: AMPPS_linker # Author: Joseph Whittington # Dependencies: python 2.7.* # Description: This script links the directory it's in to AMPPS # **run the program by typing "python linker.py with optional filepath" import os from sys import argv def main(argv): ampps_path = argv[1] if len(argv) > 1 else '/Appli...
Python
UTF-8
677
3.296875
3
[]
no_license
# -*- coding: utf-8 -*- """ @Time : 2021/8/11 5:34 下午 @Auth : Codewyf @File :HJ4 字符串分隔.py @IDE :PyCharm @Motto:Go Ahead Instead of Hesitating """ while True: try: inpt = input() if len(inpt) < 8: res = inpt + '0' * (8 - len(inpt)) print(res) else: time = ...
Java
UTF-8
2,594
2.96875
3
[]
no_license
package br.com.amil.model; import java.time.Duration; import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; import static java.util.Map.Entry.comparingByValue; public class Player implements Comparable<Player> { private final String name; private Integer kills; private Integer ...
Python
UTF-8
540
2.8125
3
[]
no_license
class Solution(object): def canWin(self, s): """ :type s: str :rtype: bool """ memo={} def can(piles): piles=tuple(sorted(p for p in piles if p>=2)) if not piles in memo: memo[piles]=any(not can(piles[:i]+(j, pile-2-j)+piles[i+1...
Java
UTF-8
1,399
2.171875
2
[]
no_license
package loginserver.network.gameserver.clientpackets; import java.nio.ByteBuffer; import loginserver.dao.AccountDAO; import loginserver.model.Account; import loginserver.network.gameserver.GsClientPacket; import loginserver.network.gameserver.GsConnection; import loginserver.network.gameserver.serverpackets.SM_LS_CON...
C#
UTF-8
1,305
3.21875
3
[]
no_license
using BDDSpecFlow.Example; using NUnit.Framework; using TechTalk.SpecFlow; namespace BDDSpecFlow.Steps { [Binding] public sealed class CalculatorStepDefinitions { private readonly ScenarioContext _scenarioContext; private int result; private Calculator calculator = new Calculator...
Java
UTF-8
385
1.96875
2
[]
no_license
package com.spl.serendipity928.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.Map; @Data @AllArgsConstructor @NoArgsConstructor public class ReportMessage { /** * 示例:{"e":1,"m":"今天已经填报了","d":{}} */ private Integer e; private Str...