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
2,744
2.78125
3
[ "MIT" ]
permissive
using System; using System.Runtime.Serialization; using Newtonsoft.Json; namespace Schema.NET { /// <summary> /// A reservation for a taxi.&lt;/p&gt; /// &lt;p&gt;Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reserva...
C#
UTF-8
675
2.78125
3
[]
no_license
var csvlines = File.ReadAllLines(filename); // IEnumerable<string> //var csvLinesData = csvlines.Select(l => l.Split(',').Skip(1).ToArray()); // IEnumerable<string[]> // Instead of skipping the first column, skip the first line! var csvLinesData = csvlines.Skip(1).Select(l => l.Split(',').ToArray()); // I...
Java
UTF-8
3,410
2.328125
2
[]
no_license
package com.BankSystem; import java.sql.Date; public class User { private int accountNo; private String firstName; private String lastName; private String email; private String mobile; private String PAN; private String aadhar; private String address; private Date DOB...
JavaScript
UTF-8
2,840
2.875
3
[]
no_license
//emcc hctree.cpp r2e.cpp list.cpp ordering.cpp proximity.cpp -s ALLOW_MEMORY_GROWTH=1 -s "EXPORTED_FUNCTIONS=['_hctree_sort','_ellipse_sort','_computeProximity']" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall','cwrap']" -o seriation.js //emcc hctree.cpp r2e.cpp list.cpp ordering.cpp proximity.cpp -s "EXPORTED_FUNCTIONS=[...
PHP
UTF-8
998
3.53125
4
[]
no_license
<!DOCTYPE html> <!-- 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. --> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php $list="人...
PHP
UTF-8
5,482
2.796875
3
[ "Apache-2.0" ]
permissive
<?php /** * This example retrieves a previously created ad units and creates * a tree. * * Tags: InventoryService * * PHP version 5 * * Copyright 2011, Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with th...
TypeScript
UTF-8
2,752
3.34375
3
[]
no_license
import produce from "./produce"; describe("produce", () => { it("Returns same object if not modified", () => { const obj = { a: 1, b: "some str", c: { nestedProp: 1 } }; const newState = produce(obj, (draft) => {}); expect(newState).toStrictEqual(obj); ...
Markdown
UTF-8
11,658
2.515625
3
[ "MIT", "CC-BY-4.0", "CC-BY-3.0" ]
permissive
PSR-4 Dodatok ============= 1. Zhrnutie ---------- Účelom je špecifikovanie pravidiel pre spoluprácu PHP autoloadera, ktorý mapuje menné priestory do ciest súboroých systémov a ktorý môže existovať spolu s ostatnými registrovanými SPL autoloadermi. Týmto vlastne doplňuje PSR-0 a nie ho nahrádza. 2. Prečo sa unúvať?...
Python
UTF-8
3,461
4.71875
5
[]
no_license
''' This program applies string manipulation on the text ' The python course is the best course that I have ever taken. ''' def main(): # Initialize... print('Initialize... (String Functionality with Naive Strings Practice)') s = ' The Python course is the best course that I have ever taken. ' print(...
JavaScript
UTF-8
2,036
3.140625
3
[]
no_license
'use strict'; const serviceRequest = require('request'); let _report = ''; const getLabel = (int) => { let label = ''; const even = (int % 2 === 0); const mod3 = (int %3 === 0); if (even) { if (mod3) { label = 'divisible by two and three'; } else {label = 'even'} } else if (mod3) { label = 'divisible...
Python
UTF-8
2,032
2.84375
3
[ "MIT-0" ]
permissive
import csv import time from Constant import DATABASE_NAME, TABLE_NAME class CsvIngestionExample: def __init__(self, client): self.client = client def bulk_write_records(self, filepath): with open(filepath, 'r') as csv_file: # creating a csv reader object csv_reader = c...
Java
UTF-8
1,464
2.734375
3
[]
no_license
package Barricades; import java.awt.BorderLayout; import java.awt.Font; import java.awt.Graphics; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; ...
Java
UTF-8
16,423
2.65625
3
[]
no_license
/** * */ package hillbillies.tests.unit; import static hillbillies.tests.util.PositionAsserts.assertDoublePositionEquals; import static org.junit.Assert.*; import ogp.framework.util.Util; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import hillbillies.model.*; import...
PHP
UTF-8
7,760
2.59375
3
[]
no_license
<?php namespace App\DataFixtures; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\Persistence\ObjectManager; use App\Entity\Formation; use App\Entity\Entreprise; use App\Entity\Stage; use App\Entity\User; class AppFixtures extends Fixture { public function load(ObjectManager $manager) { ...
Python
UTF-8
6,578
2.53125
3
[]
no_license
#!/usr/bin/env python2 # import os import sys import time import hmac import fcntl import socket import select import hashlib import termios import argparse from Crypto.Cipher import AES class AuthenticationError(Exception): pass class Crypticle(object): """Authenticated encryption class Encryption algorithm: A...
Python
UTF-8
13,070
2.546875
3
[ "MIT" ]
permissive
''' Created on 19 oct. 2016 @author: supermanue ''' from sys import argv, exit import os from macpath import split from math import sqrt from sys import maxint as MAXINT import time ####### #Format of input file: prefix.numTasks #format of created scripts: prefix.numTasks_nodesxcoresPerNode combinationsACME=[[1,1...
C++
UTF-8
1,570
3.640625
4
[]
no_license
// // Created by matthew on 30.05.19. // #include "linked_list.h" LinkedListIndexError::LinkedListIndexError ( unsigned int index ) : errorMessage{ "Cannot insert object under index " + to_string ( index ) + "!"} {} template < typename T > LinkedList<T>::LinkedList( ): first{nullptr} {} template < typename T > L...
Java
UTF-8
6,075
2.25
2
[]
no_license
/** */ package at.jku.weiner.c.parser.parser; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Labeled Statement</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link at.jku.weiner.c.parser.parser.LabeledStatement#getIdent <em>Ide...
PHP
UTF-8
728
3
3
[]
no_license
<?php /** * @author jarik <jarik1112@gmail.com> * @date 2/17/15 * @time 2:41 PM */ namespace Framework\Interfaces; interface ResponseInterface { /** * Send response to browser * * @return void */ public function send(); /** * Set response http code * * @param ...
Java
UTF-8
1,934
2.203125
2
[]
no_license
package com.tianlong.asystem.weixin.web.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.tianlong.asystem.w...
Java
UTF-8
513
2.03125
2
[]
no_license
package com.thunsaker.brevos.data.events; import com.thunsaker.android.common.bus.BaseEvent; import com.thunsaker.brevos.data.api.Bitmark; import com.thunsaker.brevos.data.api.BitmarkInfo; public class GetInfoTrendingEvent extends BaseEvent { public BitmarkInfo info; public Bitmark bitmark; public GetInf...
C#
UTF-8
10,412
3.25
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using System.Diagnostics; using System.IO; namespace Parallel { class ParallelMultiplication { static Random rand = new Random(); public stati...
C++
UTF-8
1,387
4.0625
4
[]
no_license
/* Name: Muhammad Wasif Ali Wasif Student ID: 20i-2315 Section: SE-R */ #include <iostream> #include <cmath> using namespace std; double sum1 (int n);// prototype the function run the first formula double sum2 (int n);// prototype the function run the second formula double sum3 (int n);// prototype the function run t...
Java
UTF-8
2,391
2.328125
2
[]
no_license
package com.roma.qa.utils; import com.roma.qa.base.TestBase; import org.apache.commons.compress.archivers.dump.InvalidFormatException; import org.apache.commons.io.FileUtils; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.usermodel.Workbook; impor...
Java
UTF-8
1,286
3.921875
4
[]
no_license
package day11stringmethods; public class String01 { public static void main(String[] args) { //15.substring() String s1 = "Java OOP language oldugu icin populerdir."; System.out.println(s1.substring(3));// a OOP languagedir System.out.println(s1.substring(5));//OOP languagedir System.out.println(s1.s...
JavaScript
UTF-8
196
3.0625
3
[]
no_license
const obj = { name: 'Alexei', age: 20, language: 'Spanish' } const { name, ...rest} = obj; console.log(name, rest) const extraInfo = { ...obj, status: 'alive' } console.log(extraInfo)
Java
UTF-8
608
2.265625
2
[]
no_license
package com.bookstore.services; import java.util.ArrayList; import java.util.List; import com.bookstore.dao.BookDAO; import com.bookstore.model.Book; public class BookService { public static List<Book> retrieveAllBooks() { List<Book> books = BookDAO.getInstance().retrieveAllBooks(); return books; } public...
Markdown
UTF-8
2,644
3.28125
3
[ "MIT" ]
permissive
# SideKicK SideKicK is a collection of convenient helper methods in Swift to promote speed and intuitive coding. ## Documentation ### String ##### subscript(index: Int) -> String Subscripting with an integer gives you the character at that index. Negative integers give you character starting from the end of the str...
Ruby
UTF-8
438
3.125
3
[]
no_license
def sort_characters self.downcase.chars.sort.join end def sort_characters self.downcase.chars.sort.join end def anagram_groups self.sort_characters.uniq end def combine_anagrams(words) anagram_groups = words.anagram_groups result = [] anagram_groups.each { |i| (result << []) } words.each do |word| ...
C#
UTF-8
4,224
2.921875
3
[]
no_license
using RssYandexUi.Models; using RssYandexUi.Services; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace RssYandexUi { public partial class F...
Markdown
UTF-8
9,848
3.15625
3
[ "MIT" ]
permissive
# 10-微前端架构 ## 一 大型项目迭代问题 对公共逻辑的抽象是软件工程不可绕开的话题,前端也不例外。在前端开发中,组件抽取、公共模块抽取是最常见的业务解耦方式。随着企业业务的发展,这些抽象的模块可能需要运用到许多不同的工程中,这就需要考虑如何组织、使用这些技术积累。 我们通常采取的技术方案是:将公共模块打包为 npm 包,在各个项目、模块中导入使用,但这很容易带来以下缺点: - (1)发布效率不高:如果公共模块的逻辑出现变化,需要重新打包、发版,使用该模块的项目都要进行更新。若 npm 包内涉及的业务较多,就会让维护该包的精力不断放大。 - (2)多团队协作不规范:不同团队的 npm 包容易出现不同包规范不同现象。 ...
JavaScript
UTF-8
5,392
3.21875
3
[]
no_license
// function form_ansobj(node) // { // let inps = node.querySelectorAll("input"); // let inp; // for (let inp_node of inps) // if (inp_node.type != "hidden") // { // inp = inp_node; // break; // } // let ans_obj = { input : inp }; // let label = node.querySelector("label"); // if (label.childElementC...
Java
UTF-8
3,142
3.46875
3
[]
no_license
import com.vehicles.project.Car; import com.vehicles.project.Wheel; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static void main (String[] args) { /* Request the car information...
Java
UTF-8
1,240
1.820313
2
[]
no_license
package com.yd.ydbi.cainiao.service.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.yd.common.runtime.CIPRuntime; import com.yd.ydbi.cainiao.dao.Cn_compst_scorMapper; import com.yd.ydbi.cainiao...
Markdown
UTF-8
787
2.953125
3
[]
no_license
# Prediction_using_Supervised_learning Predicting the percentage of an student based on the no. of study hours. THE-SPARKS-FOUNDATION-TASKS This repository contains the tasks that I have completed while working as Data Science & Business Analyst Intern for The Sparks Foundation. 🔭Internship Category - Data Science an...
Python
UTF-8
4,261
3.375
3
[]
no_license
SCENE1 = 'scene1' SCENE2 = 'scene2' SCENE3 = 'scene3' SCENE4 = 'scene4' SCENE5 = 'scene5' SCENE6 = 'scene6' SCENE7 = 'scene7' SCENE8 = 'scene8' SCENE9 = 'scene9' scenes = {SCENE1 : ("Mooky is bored. Then he has an idea! He will go skiing. He grabs his ski stuff and drives to the nearest ski place, Mooker Woods. He sta...
Java
UTF-8
674
3.734375
4
[]
no_license
package com.hillel; import java.util.Scanner; public class ArrayConsole{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n; do{ System.out.print("Enter N elements of array(>1): "); n = scanner.nextInt(); }while(n < ...
Python
UTF-8
192
4.15625
4
[]
no_license
''' Write a program to calculate the factorial of a given number. Input: 5 Output: The Factorial of 5 is: 120 ''' fact=1 n=int(input("Input:")) for i in range(1,n+1): fact=fact*i print(fact)
Shell
UTF-8
3,083
2.65625
3
[ "MIT" ]
permissive
if [ -z ${century+x} ]; then century=$1; fi if [ -z ${decade+x} ]; then decade=$2; fi if [ -z ${year+x} ]; then year=$3; fi #century=19 #decade=99 #year=1999 cd EastCoast/release_locations/ numfiles=(*) numfiles=${#numfiles[@]} cd #rm -rfv go.sh.* #rm -rfv run.sh.* #rm -rfv run_sub.sh.* #rm -rfv /sb/project/uxb-46...
Markdown
UTF-8
12,871
2.859375
3
[]
no_license
# MessageParser.NET MessageParser.NET Is Simple Mesage Parser For XML,ISO 8583,EXCEL,JSON,Batch File Nuget Url: http://www.nuget.org/packages/MessageParser.NET/ EXCEL: MessageParser.NET.Tools.ExcelParser excel = new MessageParser.NET.Tools.ExcelParser(@"E:\Path\ExcelFile.xlsx"); var temp = e...
Markdown
UTF-8
5,446
3.609375
4
[ "MIT" ]
permissive
# Contextfun [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mittelholcz/contextfun/blob/master/LICENSE) [![pypi](https://img.shields.io/badge/pypi-0.7.0-blue.svg)](https://pypi.org/project/contextfun/) The *contextfun* python package provides functions for context-based filtering a...
Java
UTF-8
9,420
2.125
2
[]
no_license
package com.oneshoppoint.yates.model; import javax.persistence.*; /** * Created by robinson on 4/6/16. */ @Entity @Table(name="orders") public class Order extends Model { private String invoiceNo; private String customerFirstname; private String customerLastname; private String customerPhoneNumber; ...
JavaScript
UTF-8
9,962
2.921875
3
[]
no_license
/* Goal: Have the images and information correspond to the correct team Write functions for a first place to a 5th place team */ fetch('http://api.football-data.org/v2/competitions/2021/standings', { headers: { 'X-Auth-Token': '49f98870ef244fa5b61b175735463b0c' } }) .then((res) => { ...
Markdown
UTF-8
2,886
3.015625
3
[]
no_license
Now that we have seen the basics of how the YAML files are written, let's start building out the db.yaml file. 1. Create a file named `db.yaml` in the workshop directory: `touch ~/workshop/db.yaml`{{execute}} 2. The following code is a good starting point for our Postgres database. You'll notice that we added anothe...
JavaScript
UTF-8
105
2.90625
3
[]
no_license
/*Decrement operator is -- in JavaScript*/ var myVar = 11; // Only change code below this line myVar--;
Go
UTF-8
1,543
3.796875
4
[]
no_license
package main import ( "fmt" "time" ) var i int // índice do array var array [30]string // array de 'caracteres' var flags [3]chan int // canais de sincronização var end chan int // canal para join dos trabalhos finalizados type contexto struct { // estrutura contexto para as três linhas de execuç...
Java
UTF-8
5,383
2.40625
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 model; import java.util.ArrayList; import java.util.Arrays; import static model.Lib.loadTable; import static model.Manager.ava...
Python
UTF-8
364
3.375
3
[]
no_license
from tkinter import * def inc(): global n n.set(n.get() + 1) print("hello") def dec(): global n n.set(n.get() - 1) print("hello") root = Tk() n = IntVar() root.title("updown") Button(root, text = "UP", command = inc).pack() Button(root, text = "DOWN", command = dec).pack() l = Label(root, ...
Markdown
UTF-8
6,260
3.03125
3
[]
no_license
#### :pushpin: 트랜잭션 Transaction * ##### 최종 결과를 내기까지 하나의 작업 단위를 의미. * ##### Oracle DataBase는 개발자가 전달한 insert, update, delete 문을 메모리상에서만 수행하고 디스크에 반영하지 않음(테이블생성,삭제는 자동 디스크 반영됨) ##### => 실수로 인한 데이터의 유실을 막기 위함. * ##### 데이터 베이스를 조작하는 작업이 완료되고 모두 정상적으로 되었아면 이를 디스크에 반영해야함. * ##### 작업이 시작되고 디스크에 반영될 때까지의 작업...
Java
UTF-8
2,628
2
2
[]
no_license
package com.example.graduate.mappers; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.example.graduate.pojo.BookOperationLog; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache....
Markdown
UTF-8
1,057
2.6875
3
[]
no_license
[Live site!](http://printsy.herokuapp.com) ![printsyy](https://user-images.githubusercontent.com/63718493/126942397-88c0c172-235c-4c2a-a570-6840ca0912ca.gif) # Overview Printsy is an etsy clone that specializes in buying and selling 3d printed items! Similar to Etsy, it is an e-commerce site where users can browse ...
Markdown
UTF-8
2,891
2.765625
3
[ "CC-BY-4.0", "MIT" ]
permissive
--- description: "Learn more about: Working with XML Schemas" title: "Working with XML Schemas" ms.date: "03/30/2017" ms.assetid: bbbcc70c-bf9a-4f6a-af72-1bab5384a187 --- # Working with XML Schemas To define the structure of an XML document, as well as its element relationships, data types, and content constraints, yo...
Java
UTF-8
1,687
2.109375
2
[]
no_license
package com.bridge.entity; import java.util.Date; public class User { private Integer userId; private String userName; private String nickName; private String password; private String phone; private String email; private Date lastSendEmailTime; private String remark; private Integ...
JavaScript
UTF-8
824
2.671875
3
[]
no_license
import React, {Component} from 'react'; import styled from 'styled-components'; const Text=styled.span` font-size: 20px; color: ${props=>(props.ok ? 'lightgrey' : 'black')}; ` class CarItem extends Component{ constructor(props){ super(props) this.state={ done: false ...
Markdown
UTF-8
5,294
2.953125
3
[]
no_license
--- layout: blog permalink: "/blog/ivory-stone-with-view-cyprus/" classes: blog title: Amazing Stone for an Amazing View in Cyprus meta: title: Norstone Ivory Rock Panels on Exterior of Vacation Home description: Norstone Ivory Rock Panels are used in two different outdoor locations on this exceptional vacation...
JavaScript
UTF-8
1,085
2.8125
3
[]
no_license
const request = require('request-promise') const cheerio = require('cheerio') const name = 'PWN dictionary' const keyword = 'pwn' const url = query => `https://sjp.pwn.pl/szukaj/${query}.html` const removeSpaces = query => { return query.replace(/\s+[\n\r]/g, ', ').replace(/\s+/g,' ').trim() } const pwnContent = ...
Swift
UTF-8
469
2.78125
3
[]
no_license
import Foundation class DateFormats { static let shortFormatter = { () -> DateFormatter in let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd" return formatter }() static let longFormatter = { () -> DateFormatter in let formatter = DateFormatter() ...
C
UTF-8
710
4
4
[]
no_license
//Sieve of eratosthenes using loop #include <stdio.h> #include <math.h> #include <stdbool.h> void main() { int testCases, n; printf("Enter number of testCases: "); scanf("%d",&testCases); for( int k=1 ; k<=testCases ; k++ ) { printf("\nTest Case %d: " , k); scanf("%d",&n); bool sieve[n+1]; for( int i...
JavaScript
UTF-8
152
3.125
3
[]
no_license
let salaries = { John: 100, Ann: 160, Pete: 130 } var sum = 0; for (key in salaries) { sum += salaries[key]; } document.write(sum);
C
UTF-8
489
4
4
[]
no_license
/* Write a C program to input any character and check whether it is alphabet, digit or special character. source by com.adygreg [29:11:2020] */ #include <stdio.h> int main (void) { char c; printf("Enter :: "); scanf("%c", &c); if((c >= 'a' && c <= 'z')||(c >= 'A' && c...
Markdown
UTF-8
6,047
2.625
3
[ "MIT" ]
permissive
# Short description: Health check for a Galera cluster node (MySQL, MariaDB, Percona XtraDB). # Long description: This image provides a health check for Galera cluster nodes. It works by spinning up a gevent server, connecting to the instance and checking its current status and variables. Health check gevent server...
Markdown
UTF-8
4,105
2.6875
3
[ "MIT" ]
permissive
DEPRECATED. Goodbye, adiós, au revoir, auf Wiedersehen, zàijiàn. Please the utilities in [@feathers-plus/feathers-common-hooks](https://feathers-plus.github.io/v1/feathers-hooks-common/) ## feathers-hooks-utils Utility library for writing [Feathersjs](http://feathersjs.com/) hooks. [![Build Status](https://travis-ci....
Java
UTF-8
651
1.90625
2
[]
no_license
package com.saber.multiplication.multiplicationv2.services.impl; import com.saber.multiplication.multiplicationv2.dto.User; import com.saber.multiplication.multiplicationv2.repositories.UserRepository; import com.saber.multiplication.multiplicationv2.services.UserService; import lombok.RequiredArgsConstructor; import ...
Java
UTF-8
2,086
2.421875
2
[]
no_license
package hotel.gen.cxf; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>RoomTypes的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * <p> * <pre> * &lt;simpleType name="RoomTypes"&gt; * &lt;restriction base="{http://www.w3.org/2...
Markdown
UTF-8
22,862
3.375
3
[]
no_license
# Data acquistion and understanding *Big Data* has become part of the lexicon of organizations worldwide, as more and more organizations look to leverage data to drive more informed business decisions. With this evolution in business decision-making, the amount of raw data collected, along with the number and diversit...
C#
UTF-8
2,497
2.578125
3
[]
no_license
using Core.UsuallyCommon.Database; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Core.GeneratorWindows { public...
Java
UTF-8
1,361
2.75
3
[]
no_license
package entities; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity public class Student { @Id @GeneratedValue Long id; String first_name; String last_name; @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "student_subject", joinColum...
Java
UTF-8
2,015
2.453125
2
[]
no_license
package org.ht.hprim.parser; import org.ht.hprim.parser.HPRIMSDelimiters; import static org.junit.Assert.*; import java.io.IOException; import org.junit.Test; public class HPRIMSDelimitersTest { @Test public void testSetGetDelimitersTrue() throws IOException { char[] toTest = new char[]{'a', 'b', 'c', 'd', 'e'...
TypeScript
UTF-8
576
2.546875
3
[]
no_license
import { SECRET_KEY } from "./../config"; import jwt from "jsonwebtoken"; export const checkAuth = (context: any) => { const authHeader = context.request.headers.authorization; if (authHeader) { const token = authHeader.split("Bearer ")[1]; if (token) { try { const user = jwt.verify(token, S...
Python
UTF-8
6,859
2.609375
3
[]
no_license
import os import numpy as np import pandas as pd import sklearn.metrics import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix from sklearn.metrics import precision_recall_curve from sklearn.metrics import plot_precision_recall_curve def eval(pred_path): pred_df = pd.read_csv(pred_path) ...
Java
UTF-8
1,698
1.726563
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2012. Piraso Alvin R. de Leon. All Rights Reserved. * * See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The Piraso licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in ...
Markdown
UTF-8
795
3.046875
3
[ "MIT" ]
permissive
--- title: Grading --- - *Clicker-Based Class Exercises (10%)* : Will occur regularly, and will be **group** work. They will typically be pencil-and-paper exercises that must be completed without the use of a computer. **You need to acquire a** [clicker](http://acms.ucsd.edu/faculty/clickers/) clicker f...
Python
UTF-8
2,261
4.5
4
[]
no_license
# string_exercises.py # # # ip - 4/18 ########################## ### Uppercase a String ### ########################## ''' string = str(input("Enter a string... ")).upper() print(string) ''' ########################### ### Capitalize a String ### ########################### ''' stri...
Markdown
UTF-8
18,775
3.265625
3
[]
no_license
<div class="article__intro"> [en]: <> (Responsive layout grid) # 响应式布局网格 [en]: <> (The Material Design responsive layout grid adapts to screen size and orientation, ensuring consistency across layouts.) 译文 <nav> [en]: <> (Columns, gutters, and margins) [en]: <> (Grid customization) [en]: <> (Breakpoints) [en]: <> (...
Java
UTF-8
132
2.515625
3
[]
no_license
public class CallSingleton implements Runnable{ CallSingleton(){ } public void run(){ Singleton.getInstance(); } }
JavaScript
UTF-8
476
3.046875
3
[]
no_license
const numFrames = 12; const images = []; let currentFrame = 0; function preload(){ for (let i = 0; i < numFrames; i++){ let imageName = '../../media/frame-' + String(i).padStart(4, "0") + ".png"; images[i] = loadImage(imageName); } } function setup(){ createCanvas(640, 480); frameRate(24)...
Python
UTF-8
1,596
3.046875
3
[]
no_license
import tkinter import time def clear(): login = ent_login.get() passwd = ent_pass.get() ent_login.delete(0, 'end') ent_pass.delete(0, 'end') lbl_info.pack() def update(): global label,photo,i,window if(i==20): i=0 photo = tkinter.PhotoImage(file = '10sec_loading_bar.gif', form...
Python
UTF-8
111
2.921875
3
[]
no_license
import sys import stdio import math a = float(sys.argv[1]) stdio.writeln(math.sin(a) ** 2 + math.cos(a) ** 2)
JavaScript
UTF-8
359
2.84375
3
[ "MIT" ]
permissive
//state argument != app state, == state reducer responsible for export default function(state=null, action) { //don't modify old state here, return a new state to replace old one switch(action.type) { case "BOOK_SELECTED": console.log("active payload->",action.payload); return ac...
Java
UTF-8
1,667
2.890625
3
[ "MIT" ]
permissive
package com.jingyuyao.tactical.view.world.component; import com.badlogic.ashley.core.Component; import com.badlogic.gdx.utils.Pool.Poolable; import com.google.common.base.Optional; import com.jingyuyao.tactical.model.world.Direction; import com.jingyuyao.tactical.view.world.resource.WorldTexture; import java.util.Map;...
Java
UTF-8
819
2.34375
2
[ "Apache-2.0" ]
permissive
package ru.radiomayak.podcasts; import android.support.annotation.NonNull; import android.support.annotation.Nullable; class PodcastLayoutContent { private final Podcast podcast; private final boolean isArchived; private final Records records; private final long nextPage; PodcastLayoutContent(@Nu...
Java
UTF-8
238
1.625
2
[ "Apache-2.0" ]
permissive
package com.fernandocejas.aragorn.runtime.util; /** * Indicates that the visibility of a type or member has been relaxed to make the code testable. * Idea borrowed from Google Collections :) */ public @interface VisibleForTesting { }
Java
UTF-8
3,276
2.359375
2
[ "Apache-2.0" ]
permissive
package com.zoranbogdanovski.searchmoviesapp.ui; import android.content.Context; import android.graphics.Color; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bump...
PHP
UTF-8
2,525
2.859375
3
[ "MIT" ]
permissive
<?php namespace pointybeard\Kickstarter\ExportParser\Lib; use pointybeard\Kickstarter\ExportParser\Lib\Exceptions\ZipArchiveException; final class BackerArchive extends ZipArchiveExtended { private $rewards = null; private $files = []; private $path = null; public function __construct($file) { ...
C++
UTF-8
2,500
2.6875
3
[]
no_license
void display_init() { digitalWrite(CS, HIGH); u8g2.begin(); } void u8g2_prepare(void) { u8g2.setFont(u8g2_font_open_iconic_all_2x_t); // 18 pixel font type. For value labeling u8g2.setFontRefHeightExtendedText(); u8g2.setDrawColor(1); // set default black color with white backgr...
Shell
UTF-8
889
3.328125
3
[ "BSD-3-Clause" ]
permissive
#!/bin/bash set -e -u -x function repair_wheel { wheel="$1" if ! auditwheel show "$wheel"; then echo "Skipping non-platform wheel $wheel" else auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/ fi } for PYBIN in /opt/python/*/bin; do if [[ $PYBIN == *"36"* ]] || [[ $PYBIN...
Java
UTF-8
6,945
2.015625
2
[]
no_license
package cc.lkme.addemo; import android.Manifest; import android.annotation.TargetApi; import android.app.DownloadManager; import android.app.Service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.P...
Java
UTF-8
1,734
2.171875
2
[]
no_license
package com.brothergang.demo.aop; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import android.widget.To...
C++
UTF-8
5,542
2.640625
3
[]
no_license
#ifndef NODETREEOTHER_HPP #define NODETREEOTHER_HPP #include "nodetree.hpp" #include "dataMapOther.hpp" #include "modelParam.hpp" class TreeClassOther; class NodeOther: public Node { public: ModelParamBase** paramsOriginal; ModelParamBase** paramsSoFar; virtual bool writeThetaforMerged(int a, int b, dataMap** ...
Shell
UTF-8
722
2.8125
3
[]
no_license
#!/bin/bash set -e set -u # https://noamlewis.wordpress.com/2013/01/24/git-admin-an-alias-for-running-git-commands-as-a-privileged-ssh-identity/ # Run git commands as the SSH identity provided by the keyfile ~/.ssh/admin git config --global --remove-section alias git config --global alias.my \!"$HOME/config_scripts/gi...
Python
UTF-8
1,974
2.75
3
[]
no_license
import sys import json from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * class MainWindow(QWidget): def __init__(self, parent=None): super().__init__(parent=parent) self.setupData() self.setupUi() def setupData(self): self.tr = json.load(open('drugs_trname.json')) self.sc ...
Python
UTF-8
541
3.578125
4
[]
no_license
def bar(a_list): print("a_list is:",a_list) print("a_list id is:", id(a_list)) b_list = a_list + [1] print("a_list is:",a_list) print("b_list is:",b_list) print("b_list id is:", id(b_list)) b_list[3][0] = 0 print("b_list is:",b_list) print("b_list id is:", id(b_list)) #Cre...
C
UTF-8
510
2.828125
3
[ "MIT" ]
permissive
#include "stack.h" int main(int argc, char **argv) { char *line, input[MAXCHAR], *x; int len; void *st; st = createStack(); x = fgets(input, MAXCHAR, stdin); while (x) { len = strlen(x); if (len != 1) { line = (char *)malloc(sizeof(char)*len); strcpy(line, x); push(st, (void *)line); } else { ...
Python
UTF-8
706
4.34375
4
[]
no_license
"""The built in function eval takes a string and evaluates it using use python interpreter. Write a function called eval_loop that iteratively prompts the user, takes the resulting input and evaluates it using eval, and prints the result. It should continue until the user enters "done", and then, returns the valu...
Ruby
UTF-8
340
3.90625
4
[]
no_license
def while_loop(numbers = [], augmenter = 1) (0..6).each{|i| puts "At the top i is #{i}" numbers.push(i) i += augmenter puts "Numbers now: ", numbers puts "At the bottom i is #{i}" } return numbers end numbers = while_loop([],20) puts "The numbers: " # remember you can write this 2 other ways? numbers.e...
JavaScript
UTF-8
980
2.53125
3
[]
no_license
module.exports= function(app) { const db = require('./db'); app.get('/teams', function(req,res){ res.send(db); }); app.get('/teams/:id', function(req,res){ const id = req.params.id; db.teams.hasOwnPeoperty(id) ? res.status(200).json(db.teams[id]) : res.status(404).send("404 error"); ...
Python
UTF-8
410
2.59375
3
[ "MIT" ]
permissive
from datetime import datetime from django.utils import timezone def fromtimestamp(timestamp): return datetime.fromtimestamp(timestamp, tz=timezone.get_current_timezone()) def strptime(date_string, format, default_tz=timezone.utc): dt = datetime.strptime(date_string, format) if timezone.is_naive(dt): ...
Markdown
UTF-8
5,623
2.6875
3
[]
no_license
--- layout: post title: "Parts Search and Availability" category: "Parts Sales Order" icon: "icon-gear" type: "api" comments: false description: Allow user to search for parts by part ID, Description and by part Supplier (Manufacturer) --- The Part Search API is used to search for parts by part ID, Descri...
JavaScript
UTF-8
1,711
2.578125
3
[]
no_license
import { decodeJSONNoAck} from './utils' import {SET_LOBBY} from '../store/mutations.type' const newLobbyManager = (socket, store) => { store const obj = { joinLobby(lobbyName) { return new Promise((resolve, reject) => { socket.emit('join', JSON.stringify({ ...
PHP
UTF-8
825
2.984375
3
[]
no_license
<?php var_dump($_GET); var_dump( isset($_GET['page']) ); var_dump( empty($_GET['page']) ); var_dump( $_POST ); $first_name = isset( $_POST['first_name'] ) ? $_POST['first_name'] : ''; $email = $_POST['email'] ?? ''; $email = !empty($_POST['email']) ? $_POST['email'] : ''; // same as line above ?> <!DOCTYPE htm...