language
stringclasses
15 values
src_encoding
stringclasses
34 values
length_bytes
int64
6
7.85M
score
float64
1.5
5.69
int_score
int64
2
5
detected_licenses
listlengths
0
160
license_type
stringclasses
2 values
text
stringlengths
9
7.85M
C++
UTF-8
1,187
3.171875
3
[]
no_license
#include "vec4.h" namespace egc { vec4& vec4::operator =(const vec4 &srcVector) { x = srcVector.x; y = srcVector.y; z = srcVector.z; w = srcVector.w; return *this; } vec4 vec4::operator +(const vec4& srcVector) const { return vec4(x + srcVector.x, y + srcVector.y, z + srcVector.z, w + srcVector.w); } ...
Java
UTF-8
1,468
3.65625
4
[]
no_license
import java.time.*; import java.time.format.DateTimeFormatter; public class OrthoEasterTrinity { public static void main(String[] args) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy"); // Printing Orthodox Easter dates for current decade (2010 - 2019 yy): System.out.println("*****E...
C#
UTF-8
10,565
2.546875
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using osu.Framework.Graphics.Transforms; using osu.Framew...
TypeScript
UTF-8
1,303
2.546875
3
[]
no_license
export class OrderUnit { constructor(private pBrandId: number, private pBrand: string, private pProductId: number, private pProductName: string, private pPrice: number, private pQty: number, private pAmount: number, pri...
Markdown
UTF-8
2,588
3.609375
4
[]
no_license
--- title: OC开发之——类的合理设计(9) categories: - 开发 - A-基础语言 - Object-C tags: - OC abbrlink: b244e2b8 date: 2020-03-30 23:41:36 --- ## 一 概述 * 本文通过一个实例来讲解如何设计类更加合理有效 * 类:人:成员变量:性别,生日,体重,最喜欢的颜色,狗,方法:吃,跑步,遛狗,喂狗 * 类:狗:成员变量:体重,毛色;方法:吃,跑 <!--more--> ## 二 代码实现 ``` #include <Foundation/Foundation.h> typedef enum{ SexM...
TypeScript
UTF-8
302
3.015625
3
[]
no_license
'use script'; let matrix: number[][] = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ]; let index = 1; matrix.map(row => row[index]) const rotateMatrix = matrix => ( matrix[0].map((column, index) => ( matrix.map(row => row[index]) )) ); console.table(rotateMatrix(matrix.reverse()))
Java
UTF-8
707
2.84375
3
[]
no_license
package com.infoshareacademy; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Podaj ciąg liter: "); String letters = scanner.nextLine(); letters = letters.toLowerCase(); ...
Java
UTF-8
2,782
2.03125
2
[]
no_license
package cn.com.controllers; import cn.com.common.pageutil.Page; import cn.com.service.ICartService; import cn.com.service.IGoodsService; import cn.com.vo.CartModel; import cn.com.vo.CartQueryModel; import cn.com.vo.GoodsModel; import cn.com.vo.GoodsQueryModel; import org.springframework.beans.factory.annotation.Autowi...
Java
GB18030
7,490
1.90625
2
[]
no_license
package com.example.mytableball2; import java.util.HashMap; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.media.AudioManager; import android.os.Bundle; import android.os.Handler; import android.os...
C#
UTF-8
1,636
2.6875
3
[ "MIT" ]
permissive
using System; using System.Collections; using System.Collections.Generic; using WebSocketSharp; using UnityEngine; using Newtonsoft.Json; namespace MovingHud { public class WSClientController : MonoBehaviour { private string _url; private WebSocket _ws; private WSServerController _ws...
JavaScript
UTF-8
9,816
3.046875
3
[]
no_license
"use strict"; document.getElementById("new_profile_image").onclick = function(){ var image_input = document.getElementById("new_profile_pic_input"); image_input.click(); }; document.getElementById("new_profile_pic_input").onchange = function(event){ var selectedFile = event.target.files[0]; var reader...
Python
UTF-8
9,052
2.8125
3
[]
no_license
import itertools import math import tkinter as tk import numpy as np from DrawingCanvas.utils.dataclasses import Point from DrawingCanvas.utils.list_utils import arrange_points canvas_width = 400 canvas_height = 400 python_green = "#476042" class Board: def __init__(self, master, canvas): self.i = 0 ...
Python
UTF-8
4,952
2.796875
3
[ "MIT" ]
permissive
''' Test Cuckoo bucket. ''' import unittest from bitarray import bitarray from netaddr import IPAddress import mmh3 from cuckoo.bucket import Bucket class BucketTest(unittest.TestCase): ''' Test Cuckoo bucket. ''' def test_bucket(self): ''' Adding and deleting items in a bucket. ...
Java
UTF-8
1,261
2.359375
2
[]
no_license
package com.cybrilla.urlshortner.service; import com.cybrilla.urlshortner.exception.BadRequestException; import com.cybrilla.urlshortner.exception.NotFoundException; import com.cybrilla.urlshortner.model.UriData; import com.cybrilla.urlshortner.model.UriRequest; import com.cybrilla.urlshortner.repository.UrlShortnerRe...
Java
UTF-8
7,885
2.640625
3
[]
no_license
import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.Color; import javax.swing.JLabel; import javax.swing.SwingConstants; import java.awt.Font; import javax.swing.ImageIcon; import javax.swing...
C++
UTF-8
552
2.5625
3
[]
no_license
//https://atcoder.jp/contests/abc149/tasks/abc149_c #include<bits/stdc++.h> #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(30); using namespace std; typedef long long ll; //Prime Number (n>1) int prime(ll n) { int flag=1; for(ll i=2;i<=n/2;i++){ if(n%i==0){ fl...
Java
UTF-8
1,349
3.546875
4
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package assignment_6; import java.util.Scanner; /** * * @author Pures8098 */ public class A6Q1 { /** * @param args the command line arguments */ public static void main(String[] a...
Python
UTF-8
2,493
3.28125
3
[]
no_license
''' This file is used if you are using Harm3D's DUMP_COORDS_FOR_IGM option. That command will dump five txt files per processor. Each file will contain the cartesian coordinates for a different cell location - 3 faces, 1 corner, 1 center. concat.py will then concatenate each processor's file to one large file. This lea...
Java
UTF-8
184
1.78125
2
[]
no_license
package level_1.hw8.calc_with_gui; public class CalculatorFactory { public static CalculatorService getCalculatorService() { return new CalculatorServiceImpl(); } }
Java
UTF-8
600
2.53125
3
[]
no_license
package com.spliwise.spliwiseapp.model; import java.util.HashMap; import java.util.Map; import com.spliwise.spliwiseapp.entity.User; public class UserModel { private static UserModel instance; private Map<String, User> userTable; private UserModel() { userTable = new HashMap<String, User>(); } public stat...
Python
UTF-8
277
2.671875
3
[]
no_license
class Solution: def heightChecker(self, heights: List[int]) -> int: hs=sorted(heights) count =0 for i in range(len(heights)): if heights[i]!=hs[i]: count+=1 return count
Java
UTF-8
495
3.046875
3
[]
no_license
/** Class Department */ public class Department { private String depName; private String depHead; /** Constructor */ public Department(String depName, String depHead) { this.depName = depName; this.depHead = depHead; } /** Gets depName */ public String getDepName() { return depName; } ...
Python
UTF-8
1,584
3
3
[]
no_license
from command_notes import take_note from command_wiki import search_wiki from command_meaning import find_meaning from command_cricket import get_score_live from nltk.corpus import stopwords possible_stopwords = stopwords.words('english') dispatcher_based_on_keywords = [ (['take','note'], take_note), (['wikipedia...
Java
UTF-8
1,359
1.921875
2
[]
no_license
package com.zrp.mallplus.pms.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.zrp.mallplus.utils.BaseEntity; import lombok.Data; import ...
C
UTF-8
351
3.171875
3
[ "MIT" ]
permissive
#include <stdio.h> int main () { int i, t, l, j, k, sum; scanf ("%d", &t); for (i=1; i<=t; i++) { scanf ("%d", &k); sum=0; for (j=1; j<=k; j++) { scanf ("%d", &l); if (j==(k/2)+1) sum= l; } printf ("Case %d: %d\n", ...
C++
UTF-8
3,722
3.609375
4
[]
no_license
#ifndef Triangle_H #define Triangle_H #include "ObjectVertex.h" #include "FloatTriple.h" #include <iostream> class Triangle { public: Triangle(ObjectVertex* v1, ObjectVertex* v2, ObjectVertex* v3) { this->v1 = v1; this->v2 = v2; this->v3 = v3; setNormal(); } bool lessThan(Triangle rhs, int projection); fl...
Java
UTF-8
429
3.390625
3
[]
no_license
class ArmstrongNumbers { boolean isArmstrongNumber(int numberToCheck) { int number = numberToCheck; int length = String.valueOf(number).length(); double answer = 0; while (number > 0) { int digit = number % 10; answer += Math.pow(digit,length); number = numbe...
Markdown
UTF-8
839
2.90625
3
[]
no_license
# Native object vs Host object ## Native Object ECMAScript 明細で意味論的な部分を完全に定義した Object であり、次のようなものがある。 - `Object` - `Function` - `Date` - `Math` - `parseInt` - `eval` ... <br> ## Host Object Javascript を実行する環境に属するものでその環境にしかない Object。Browser の場合次のようなものがある。 - `window` - `document` - `location` - ...
Markdown
UTF-8
9,632
2.53125
3
[ "Apache-2.0" ]
permissive
<img src=https://raw.githubusercontent.com/amitshekhariitbhu/RxJava2-Android-Samples/master/assets/rxjava2.png > # 通过Example来学习RxJava2 for Android [![Mindorks](https://img.shields.io/badge/mindorks-opensource-blue.svg)](https://mindorks.com/open-source-projects) [![Android Arsenal](https://img.shields.io/badge/Androi...
C++
UTF-8
424
3.5
4
[]
no_license
// compute fibonacci number #include <iostream> using namespace std; unsigned fibonacci(size_t n) { if (n <= 1) { return n; } int f_minus2 = 0; int f_minus1 = 1; for (int i = 2; i <= n; ++i) { auto f = f_minus1 + f_minus2; f_minus2 = f_minus1; f_minus1 = f; } return f_minus1; } // time O(n); space O(1...
Markdown
UTF-8
1,183
2.609375
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
## BagIt Support - Automatic checksum validation on zip file upload The BagIt file handler detects and transforms zip files with a BagIt package format into Dataverse DataFiles. The system validates the checksums of the files in the package payload as described in the first manifest file with a hash algorithm that we s...
Java
UTF-8
2,378
1.90625
2
[]
no_license
package com.jhta.finalproject.admin.controller; import java.util.HashMap; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; ...
Java
UTF-8
1,155
3.171875
3
[]
no_license
package Orders; import com.company.Item; import java.time.LocalDateTime; import java.util.HashMap; public class Order { private HashMap<Item, OrderDetails> order; private double totalPrice = 0; private final int id; private final LocalDateTime receiveDate; public Order(HashMap<Item, OrderDetails...
JavaScript
UTF-8
837
2.53125
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
function a() { return <div></div>; } function a() { return <div>text</div>; } function a() { return <div a="a" b="b" c={c}/>; } function a() { return <div a="a" b="b" c={c} d="d"/>; } function a() { return <div><span/></div>; } function a() { return <a><div><span/></div></a>; } a(<div></div>); a...
Markdown
UTF-8
3,930
2.59375
3
[ "MIT" ]
permissive
# go.auth an http authentication API for the Go programming language. Integrates with 3rd party auth providers to add security to your web application. go get github.com/dchest/authcookie go get github.com/bradrydzewski/go.auth Python's Tornado framework, specifically their auth module, was the main inspirat...
Java
UTF-8
492
1.75
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 ejb.session.stateless; import entity.Fridge; import java.util.List; public interface FridgeControllerRemote { pub...
Markdown
UTF-8
1,224
3.25
3
[]
no_license
# Leedcode: 1155. Number of Dice Rolls With Target Sum. - https://leetcode.com/problems/number-of-dice-rolls-with-target-sum/ - https://gist.github.com/lbvf50mobile/eee251a5326bf0ff928f0202a7418972 Need to read the description carefully becacause if deny this rule it's leadst to a bunch of different mistakes. ```Ru...
Java
UTF-8
6,059
2.65625
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 org.pochocloapps.pochoclocritics.repositorios; import java.sql.Connection; import java.sql.PreparedStatement; import ...
Markdown
UTF-8
2,422
2.8125
3
[]
no_license
# mongoSncfApi # Projet Final de Mongodb avec utilisation de l'API Sncf ## Les commentaires de l'équipe Dans ce repo vous pourrez trouver quelques fichier python : **apiSncf.py** contient le code dans lequel nous allons demander les informations sur trois types de trains. Pour construire notre base de données, nous...
Python
UTF-8
2,562
2.6875
3
[]
no_license
# intial fork from https://github.com/SaquibAhmad/Kaggle/blob/master/whats-cooking/source/svm_model.ipynb import pandas as pd import json import numpy as np import re from scipy import sparse from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.multiclass import OneVsRestClassifier from sklearn.prep...
C++
UTF-8
1,827
2.828125
3
[]
no_license
/** * @ Author: Paul Creze * @ Description: Scheduler */ #include <signal.h> #include <iostream> #include "Scheduler.hpp" /** @brief Store the SIGINT trigger state */ static bool IsKilled = false; static void SigIntHandler(int) { IsKilled = true; } Scheduler::Scheduler(std::vector<std::string> &&arguments)...
Markdown
UTF-8
887
2.703125
3
[]
no_license
## Markets Service Manager ### Dependencies - $ gem install bundler (if bundler is not installed) - $ bundle install ### Run Tests - $ ruby test/test\_service\_manager.rb ### CLI - $ ./sm_cli apps [YYYY-MM-DD] [--config-dir=path/to/config/dir] - Lists apps that should be running on a given ISO 8601 date. Defaults ...
C#
UTF-8
855
3.234375
3
[]
no_license
using System; namespace LeetCode { public class grumpy_bookstore_owner { public int MaxSatisfied(int[] customers, int[] grumpy, int minutes) { var total = 0; for (int i = 0; i < customers.Length; i++) { if (grumpy[i] == 0) { ...
Markdown
UTF-8
1,318
3.296875
3
[]
no_license
An implementation of a lazy-loaded Singleton design pattern, or more spesifically an initialization-on-demand holder idiom. One of the more meaningful situations to use Singletons are with loggers. This project implements a logger that keeps track of the amount of spacepollen in multiple spacebeehives. Spacebees colle...
C++
UTF-8
2,915
2.953125
3
[ "MIT" ]
permissive
#include <QtAlgorithms> #include <QVariant> #include <QDebug> #include "treeitem.h" TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent) { m_parentItem = parent; m_itemData = data; qDebug() << "[TreeItem::TreeItem] Item created: " << this; } TreeItem::TreeItem(TreeItem *parent) { m_pa...
TypeScript
UTF-8
4,698
2.8125
3
[]
no_license
const d3 = require("d3"); export interface ConnectorConfig { leds: number; dma?: number; brightness?: number; gpio?: number; type?: "rgb" | "rbg" | "grb" | "gbr" | "bgr" | "brg"; } export interface Connector { configure: (config: ConnectorConfig) => void; reset: () => void; render: (pi...
Python
UTF-8
16,416
3.015625
3
[ "MIT" ]
permissive
import warnings import os import numpy as np import pandas as pd import networkx as nx import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns def create_df_sns_barplot(bundleGraphs, original_network): """ In order to plot barplot (with error bars) with the help of seaborn, it is ...
C++
UTF-8
479
2.65625
3
[]
no_license
#pragma once #include <qglobal.h> template <typename T> class Singleton { private: Singleton(const Singleton<T>&); Singleton& operator=(const Singleton<T>&); protected: static T* msSingleton; public: Singleton() { Q_ASSERT(!msSingleton); msSingleton = static_cast<T*>(this); } ~Singleton() { Q_ASSERT(msSingl...
C++
UTF-8
1,363
3.234375
3
[]
no_license
#include "stringUtil.h" TStrParam StringUtil::split(const std::string& str, char ch) { TStrParam vec; if( str.empty() ) return vec; std::string::size_type startIdx(0); while(true) { std::string::size_type startIdy = str.find_first_of(ch, startIdx); if( startIdy == std...
Java
UTF-8
460
2.34375
2
[]
no_license
package vo; public class MovieMainVO { private String mvNo; private String mvPoster; public MovieMainVO() { } public MovieMainVO(String mvNo, String mvPoster) { this.mvNo = mvNo; this.mvPoster = mvPoster; } public String getMvNo() { return mvNo; } public void setMvNo(String mvNo) { this.mvNo = mv...
JavaScript
UTF-8
10,705
2.734375
3
[]
no_license
/* Il carcere di Gotham City Sei appena stato nominato direttore presso il carcere di Gotham City. Hai l'arduo compito di scrivere un programma che gestisca: - I dati anagrafici delle guardie - I dati anagrafici dei detenuti - I fascicoli personali dei detenuti, che devono contenere almeno queste info...
JavaScript
UTF-8
7,292
2.78125
3
[]
no_license
const config = { type: Phaser.AUTO, width: GAME_WIDTH, height: GAME_HEIGHT, physics: { default: 'arcade', arcade: { gravity: { y: 0 } } }, scene: { preload: preload, create: create, update: update } }; const game = new Phaser.Game(config); let gameScene; let cells; functi...
C++
UTF-8
701
3.15625
3
[]
no_license
#include <Servo.h> Servo leftMotor; // create servo object to control a servo Servo rightMotor; #define leftPin 6 #define rightPin 5 void setup() { Serial.begin(9600); leftMotor.attach(leftPin); rightMotor.attach(rightPin); Serial.println("** TESTING LEFT MOTOR **"); leftMotor.write(20); rightMotor.w...
Java
UTF-8
2,700
1.96875
2
[]
no_license
/* * Copyright (C) 2013 Tecomgroup. * All Rights Reserved. */ package com.tecomgroup.qos.domain.pm; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import com.tecomgroup.qos.domain.MAgentTask; import com.tecomgroup.qos.domain.MResultParameterConfiguration.ParameterIdentifier; ...
Java
UTF-8
2,583
2.59375
3
[ "Apache-2.0" ]
permissive
/** * Copyright 2014 Zhenguo Jin (jingle1267@163.com) * <p/> * 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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless require...
Go
UTF-8
3,903
3.015625
3
[ "MIT" ]
permissive
package internal import ( "fmt" "github.com/wesovilabs/beyond/logger" "regexp" "strings" ) const exprPkg = `[a-zA-Z0-9_*\/]+\.` const exprObj = `[a-zA-Z0-9_*]+\?*\.` const exprFunc = "[a-zA-Z0-9_*]+" const exprArgs = `[a-zA-Z0-9_*,.{}()[\]/]+` var regExp = func() *regexp.Regexp { expr := `^` expr += fmt.Sprint...
C#
UTF-8
4,225
2.890625
3
[]
no_license
using System; using System.Collections.Generic; using System.Messaging; using MessageBusPatterns.MessageBus.Shared; namespace MessageBusPatterns.MessageBus.Server { class MessageBus { private MessageQueue _mq; /// <summary> /// The constructor is used to setup the peek on the message q...
Markdown
UTF-8
2,744
2.6875
3
[]
no_license
--- title: '[Java] Heap Size 설정' layout: --- ![Java](https://user-images.githubusercontent.com/1871682/98905964-a77a4280-24ff-11eb-8a57-cef41caf4a4f.png) # [Java] Heap Size 설정 ## Java Heap 설정의 일반적인 오류 ### 단위 누락 * 용량 Size의 구분(m, g, M, G)이 없는 경우 byte로 인식하여 오류 발생, 명확하게 단위를 붙여서 설정하며, 단위의 대/소문자는 구분하지 않음 ```sh $ jav...
Java
UTF-8
4,858
1.890625
2
[]
no_license
package com.pinhuba.core.pojo; /** * 数据库表名:OA_CHATTERS */ public class OaChatters extends BaseBean implements java.io.Serializable { /** * 通讯手册表 */ private static final long serialVersionUID = 1311360319835826446L; private String oaChatEmp; // 人员姓名 private Integer oaChatSex; // 性别 private String oaChatCom;...
Markdown
UTF-8
1,284
3.84375
4
[ "DOC", "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
本文档中使用的伪类型与变量 -------------------------- 伪类型(pseudo-types) 是 PHP 文档里用于指示参数可以使用的类型和值。 请注意,它们不是 PHP 语言里原生类型。 所以不能把伪类型用于自定义函数里的类型约束(typehint)。 ### mixed *mixed* 说明一个参数可以接受多种不同的(但不一定是所有的)类型。 例如 <span class="function">gettype</span> 可以接受所有的 PHP 类型,<span class="function">str\_replace</span> 可以接受字符串和数组。 ### number *numb...
Python
UTF-8
1,539
3.375
3
[ "MIT" ]
permissive
# Time complexity : O(n + m) # Space: O(m) class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ if n < 1: return if (m) < 1: nums1[...
Java
UTF-8
4,062
2.109375
2
[]
no_license
package com.github.graph.ui.fragments; import android.os.Bundle; import android.support.v4.content.Loader; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import com.github.graph.R; import com.github.graph.core.loader.ContributorsLoader; i...
C
UTF-8
8,083
2.59375
3
[ "MIT" ]
permissive
#include "Clock.h" /** * @feature Year must be within 2021-2255. */ uint8_t calender[4] = {21, 6, 20, 0}; uint8_t* const year = calender; uint8_t* const month = calender + 1; uint8_t* const date = calender + 2; uint8_t* const solarTerm = calender + 3; uint8_t time[3] = {12, 0, 0}; uint8_t* const hour = time; uint8_t...
JavaScript
UTF-8
1,752
4.375
4
[]
no_license
const HangMan = function(word, remainingGuesses) { this.word = word.toLowerCase().split(''); this.returnedWord = []; this.remainingGuesses = remainingGuesses; this.guessedLetters = ['c', 'a']; this.outOfGuesses = false; this.found = false; } HangMan.prototype.getPuzzle = function() { this.s...
Java
UTF-8
496
2.1875
2
[]
no_license
package in.happycoding.test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import in.happycoding.bean.Employee; import in.happycoding.bean.Student; public class TestApp { public static void main(String[] args) { ApplicationCon...
TypeScript
UTF-8
1,434
2.59375
3
[]
no_license
// Angular import { PipeTransform } from '@angular/core'; import { ControlType } from '../../angular/common/base/controlType'; import { PipeType } from './../../angular/services/pipe.service'; import { IDateDisplayInfo } from './dateDisplayInfo.interface'; import { IDisplayInfo } from './displayInfo.interface'; import...
Java
UTF-8
1,672
3.46875
3
[]
no_license
public class PrimeDifference { public static void main(String[] args) { primeDifference(2000); } public static void primeDifference(int num) { //int a = 0; int b = 3; int c = 0; int RA = 0; int RB = 0; //System.out.println(1 + " - " + 0 + " = " + 1); System.out.println(1); //System.ou...
C++
UTF-8
1,086
3.015625
3
[]
no_license
#pragma once #include <vector> using namespace std; // UNTESTED BUT SHOULD WORK namespace AudioLib { class Transfer { private: vector<double> b; vector<double> a; double bufIn[64]; double bufOut[64]; double Gain; // buffer size int modulo = 64; int index = 0; public: Transfer() { SetB...
C#
UTF-8
1,522
2.578125
3
[]
no_license
using System; using Task.DB; using Task.Serialization.DataContractSurrogate.Abstractions; namespace Task.Serialization.DataContractSurrogate { public class CustomerDataContractSurrogateDecorator : DataContractSurrogateDecorator { public CustomerDataContractSurrogateDecorator(Abstractions.DataContractS...
Python
UTF-8
9,056
2.921875
3
[ "MIT" ]
permissive
# coding: utf-8 from functools import lru_cache from charset_normalizer.constant import UNICODE_RANGES_ZIP, UNICODE_RANGES_NAMES, UNICODE_SECONDARY_RANGE_KEYWORD class UnicodeRangeIdentify: SUSPICIOUS_RANGES_CACHE = dict() @staticmethod @lru_cache(maxsize=8192) def find_letter_type(lett...
Python
UTF-8
1,030
4.4375
4
[]
no_license
## More on lists a = [3,4,2,4] # a = list() a.append(1) a.append(3) a.pop() a.insert(2,5) a.pop(4) print(a) a.sort() print(a) a.reverse() print(a) del a[2] print(a) x = a.index(2) print(x) print(a.count(2)) a.remove(2) print(a) print('='*50) ##Carefull b = a b.append(10) print(b) print(a) ## creating list comprehen...
PHP
UTF-8
8,935
3.078125
3
[]
no_license
<?php require "DBConnect.php"; /* Se chegar dado de operação do cliente no servidor pelo protocolo HTTP, utilizando o método POST, tratar este dado*/ if(isset($_POST['op'])){ // Se a operação for if($_POST['op'] == "obter dados tabelaApontamentosJornadaTrabMesCorrente") { // Obtém minutos trabalhados n...
Python
UTF-8
1,868
2.5625
3
[]
no_license
#encoding=utf-8 # import numpy as np # import time # axis=0 # a = np.arange(8).reshape(2,4) # b = np.arange(8).reshape(2,4) # # # time1 = time.time() # for i in range(10000): # a = np.concatenate((a, b), axis=axis) # print('concatenate time', time.time()-time1) # print(a.shape) # a = np.arange(8).reshape(2,4) # b =...
Java
UTF-8
3,362
2.296875
2
[]
no_license
package com.example.cdi182.adapter; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glid...
C++
UTF-8
713
3.453125
3
[ "MIT" ]
permissive
#pragma once #include <iostream> #include <vector> class PlugBoard{ public: //Structure for keeping track of which letter is paired with which struct PluggedPair{ char letter1; char letter2; bool PluggedPair::operator==(const PluggedPair &other); }; PlugBoard(); //Add a new pairing to the board void AddPai...
Java
UTF-8
131
2.0625
2
[]
no_license
package com.artigile.patterns.command; /** * @author IoaN, 2/18/12 1:55 PM */ public interface Command { void execute(); }
Java
UTF-8
4,446
2.015625
2
[ "MIT" ]
permissive
package jelectrum; import java.util.TreeMap; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.HashSet; import org.bitcoinj.core.Sha256Hash; import org.bitcoinj.core.Address; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionInput; import org.bitcoinj.cor...
Markdown
UTF-8
5,432
2.703125
3
[]
no_license
--- description: "Steps to Prepare Ultimate Octupus with potatoes in a Dutch oven" title: "Steps to Prepare Ultimate Octupus with potatoes in a Dutch oven" slug: 1198-steps-to-prepare-ultimate-octupus-with-potatoes-in-a-dutch-oven date: 2020-06-03T21:12:25.885Z image: https://img-global.cpcdn.com/recipes/e0931f19d578cd...
C#
UTF-8
1,966
3.015625
3
[ "MIT" ]
permissive
using System; using System.Linq; namespace DeveloperCommands { /// <summary> /// Restricts availability of a command to certain context types. /// </summary> [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] public class ContextFilterAttribute : Attribute { /// <summar...
Java
UTF-8
1,385
2.578125
3
[]
no_license
package sg.edu.rp.c346.id18016204.p02_holidays; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; impor...
Java
UTF-8
386
2.296875
2
[]
no_license
package be.hogent.Eva2017g5.EVAH5.domainAndModel; import com.google.gson.annotations.SerializedName; /** * Created by sofie. */ public class Ingredient { @SerializedName("name") private String name; @SerializedName("amount") private int amount; public String getName() { return name; ...
Python
UTF-8
1,043
3.828125
4
[]
no_license
from typing import Tuple def linear_search(sorted_list: list, value: int) -> Tuple[bool, int]: for i in range(0, len(sorted_list)): if sorted_list[i] == value: return True, i return False, -1 def jump_search(sorted_list: list, value: int, step_size: int) -> Tuple[bool, int]: for i...
TypeScript
UTF-8
1,176
2.578125
3
[]
no_license
import { Request, Response } from 'express'; import companyStatic from '../../db/companys/company.static'; import { company } from '../../db/companys/company.types'; import jwt from '../../middlewares/jwt'; class Company { private req: Request; private res: Response; private companyIds: string[]; con...
C
UTF-8
330
3.21875
3
[]
no_license
/* Programme produit le par Gabriel LEBIS */ #include <stdio.h> #include <string.h> void swap(int *tab){ tab[0] = tab[0] + tab[1]; tab[1] = tab[0] - tab[1]; tab[0] = tab[0] - tab[1]; } int main(){ int tab[2]={5,10}; printf("a=%d\nb=%d\n", tab[0],tab[1]); swap(tab); printf("a=%d\nb=%d\n", tab[0],tab[1]...
Java
UHC
1,196
3.65625
4
[]
no_license
package nl_study_02; import java.util.Arrays; import java.util.Scanner; public class Main_Ѱ_4344_1 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int C = scanner.nextInt(); // ׽Ʈ ̽ for(int i = 0; i < C; i++) { // C int N = scanner.nextInt(); // л int[] scores ...
JavaScript
UTF-8
497
3.3125
3
[]
no_license
// function makePizza const makePizza = function () { console.log("kneed deeg"); console.log("Beleg het deeg"); console.log("Plaats de pizza in de oven"); console.log("eet de pizza op"); }; const makeSushi = function () { console.log("Pak wat zeewier"); console.log("Beleg met rijst en rol op"); console.l...
Python
UTF-8
2,507
3.171875
3
[]
no_license
from datetime import * from time import sleep import sys now = datetime.now() def lpRecording(lp, League_Points): add_nulls = lambda number : "{0:0{1}d}".format(number, 2) date = ("{}/{}/{}: ".format(now.month, now.day, now.year)) + '\n' if League_Points >0: x = "+"+add_nulls(League_Points) else...
C#
UTF-8
1,055
2.703125
3
[]
no_license
namespace TaskManager.WPF.Models { using TaskManager.Models; using TaskManager.Models.Enums; public class LoggedUser { public static LoggedUser Instance { get; } = new LoggedUser(); public WPFApplicationUser User { get; set; } private ActiveTask ActiveTask { get; set; } = new...
Java
UTF-8
1,488
2.609375
3
[]
no_license
package amol_P.Assignment_5; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import amol_P.Assignment_5.Start; public class TC_05 extends Start { void checkDetails(String fName,String lName,String company) { System.out.println("Enter First Name"); driver.findElement(By.xpath("//input[@name='...
Go
UTF-8
1,117
2.640625
3
[]
no_license
package consulagt import ( "io" "net/http" "sync" "time" ) //DefaultHealthy set healthy check by default // 关闭健康检查 const DefaultHealthy = "default-healthy" func addRegistered(serviceID string, svcMeta *ServiceMeta) { registeredSvc.Store(serviceID, svcMeta) } func markRegistered(serviceID string) { // register...
Java
UTF-8
169
1.96875
2
[]
no_license
package com.munoz.services; public enum NumberValue { ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, SKIP, DRAWTWO, REVERSE, WILDDRAWFOUR, WILD, ZERO; }
Java
UTF-8
2,449
1.65625
2
[]
no_license
package com.facebook.payments.checkout; import com.facebook.inject.Lazy; import com.facebook.payments.checkout.recyclerview.CheckoutRowViewHolderFactory; import com.facebook.payments.checkout.recyclerview.CheckoutRowsGenerator; import com.facebook.payments.checkout.recyclerview.CheckoutSubScreenParamsGenerator; import...
Python
UTF-8
267
2.515625
3
[]
no_license
# -*- coding:utf8 -*- from win32com import client def convert_doc_to_docx(src, dst): """ 将doc转化成docx """ word = client.Dispatch('Word.Application') doc = word.Documents.Open(src) doc.SaveAs(dst, 16) doc.Close() word.Quit()
TypeScript
UTF-8
771
2.78125
3
[]
no_license
interface keyObject { [key:string]: string } interface ajaxParams { url: string, method?: string, data?: string | Document | Blob | ArrayBufferView | ArrayBuffer | FormData | URLSearchParams | ReadableStream<Uint8Array> | null | undefined, headers?: keyObject, requestList?: Array<any> } export...
TypeScript
UTF-8
5,093
2.546875
3
[ "MIT" ]
permissive
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { expect } from 'chai'; import * as moment from 'moment'; import { HouseEditComponent } from './house-edit.component'; imp...
C#
UTF-8
4,852
3.5625
4
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Visitor { //Purpose: Represent a method to be performed on the elements of an object structure. Visitor lets you //define a new method without changing the classes of the elements on ...
JavaScript
UTF-8
461
2.578125
3
[]
no_license
(function clearDB(){ document.getElementById('clearDB').onclick = function(){ document.getElementById('confirmClearDBBox').style.display = 'block'; } function closeBox(){ document.getElementById('confirmClearDBBox').style.display = 'none'; } document.getElementById('noClearBtn').oncl...
JavaScript
UTF-8
650
2.53125
3
[]
no_license
const Information = require('../model/cvModel'); function cvController() { async function getInformation(req, res) { const Informations = await Information.find(); try { res.json(Informations); } catch (error) { res.status(404); res.send(error); } } async function getInformatio...
Java
UTF-8
1,732
2.671875
3
[]
no_license
package de.hskempten.tabulang.datatypes.exceptions; import de.hskempten.tabulang.tokenizer.TextPosition; public class IllegalFunctionArgumentException extends InterpreterException{ public IllegalFunctionArgumentException(String message) { super(message); } public IllegalFunctionArgumentException(...
Java
UTF-8
203
1.546875
2
[]
no_license
package kq.server.service; import com.alibaba.fastjson.JSONObject; import kq.server.bean.Message; import kq.server.bean.User; public interface ChouqianService { String getChouqianRes(User user); }