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
Java
UTF-8
962
2.5
2
[]
no_license
package com.cg.hcs.validation; import com.cg.hcs.exception.*; public class ValidateImplementation{ public static void TestNameValidate(String testName) throws TestNameException{ String pattern="[A-Za-z\\s]{1,20}"; if(!testName.matches(pattern)) throw new TestNameException(); } public static void D...
Java
UTF-8
4,840
1.820313
2
[]
no_license
package com.fangzhurapp.technicianport.frag; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import ...
C
UTF-8
1,005
3.296875
3
[ "MIT" ]
permissive
// %%cpp atomic_example3.c // %run gcc -fsanitize=thread atomic_example3.c -lpthread -o atomic_example3.exe // %run ./atomic_example3.exe > out.txt // %run cat out.txt #include <stdatomic.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> // ПЛОХОЙ КОД!!! _Atomic int* x; int main(int argc, char* argv[]) {...
Shell
UTF-8
222
2.53125
3
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
#!/bin/bash function SafePwrCycle() { sync ; sync sudo umount -fa > /dev/null 2&>1 # Write CPLD register to initiate cold reboot sudo echo 0 > /sys/bus/i2c/devices/i2c-0/0-0041/cold_reset } SafePwrCycle
Python
UTF-8
1,190
2.859375
3
[]
no_license
""" These are rules about how to build IHME paths. A path has: 1) A base disk location for all data. /ihme, or J:/ihme. 2) A team location, such as /forecasting. 3) A role for a dataset, such as sev_data, or sev_forecasts. 4) A date an description, as YYYMMDD_whatever. 5) Subdirectories for results. """ import os impo...
Java
UTF-8
355
2.515625
3
[]
no_license
package Coocking; public class ChoiceRecepe { public Recepe recipe; public ChoiceRecepe(){ this.recipe=null; } public ChoiceRecepe(Recepe recipe){ this.recipe=recipe; } public String getStep(int step){ return recipe.getStrps().get(step); } public String getImagePath(int step){ return recipe.ge...
C++
UTF-8
841
3.296875
3
[]
no_license
#pragma once #include<iostream> using namespace std; template<typename T> class static_ctor_dtor{ public: struct helper { helper(){ cout<<"static_ctor_dtor helper constructor"<<endl; T::static_constructor(); } ~helper(){ cout<<"static_ctor_dtor helper...
Python
UTF-8
6,122
3.484375
3
[]
no_license
import pygame from pygame.locals import * import random import time WHITE = (255, 255, 255) BLACK = (0, 0, 0) BACKGROUND_X = 700 BACKGROUND_Y = 400 SIZE = 20 SPEED_BALL = 2 SPEED_PLAYER = 2 class Ball: def __init__(self, surface): self.parent_screen = surface self.x = int(BACKGROUND_X / 2 - 50) ...
Swift
UTF-8
700
2.90625
3
[]
no_license
// // WindowRouter.swift // MovieDatabase // // Created by Oleksii Kalentiev on 11/28/18. // Copyright © 2018 Oleksii Kalentiev. All rights reserved. // import UIKit public protocol WindowRouterType: class { var window: UIWindow { get } init(window: UIWindow) func setRootModule(_ module: Presentable) ...
SQL
UTF-8
1,067
2.609375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : bendi Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : sqldemo Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-10-20 09:19:12 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
Java
UTF-8
1,757
2.171875
2
[]
no_license
package com.jju.yuxin.jokeformvp.bean; /** * ============================================================================= * Copyright (c) 2017 yuxin All rights reserved. * Packname com.jju.yuxin.jokeformvp.bean * Created by yuxin. * Created time 2017/6/4 0004 上午 9:36. * Version 1.0; * Describe : * History: ...
PHP
UTF-8
496
2.546875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\modules\main\rbac; use yii\rbac\Rule; /** * Class CreateRule * Проверка прав на создание модели * @package app\modules\main\rbac * @author Churkin Anton <webadmin87@gmail.com> */ class CreateRule extends Rule { public $name = 'canCreate'; /** * @inheritdoc */ public f...
SQL
UTF-8
724
3.828125
4
[]
no_license
SELECT COUNT(first_name) FROM employees WHERE first_name is not null; SELECT COUNT(DISTINCT first_name) FROM employees; -- *** KEY *** 要注意 aggregate function 會 ignore NULL values unless told not to SELECT COUNT(*) FROM salaries WHERE salary >= 100000; show tables; SELECT ...
C#
UTF-8
3,809
2.546875
3
[ "MIT" ]
permissive
using System; using System.Collections; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; using System.IO; namespace Kaisa { public sealed class Archive : IEnumerable<ArchiveMember> { public ArchiveIndexV1 IndexV1 { get; } public ArchiveIndexV2? In...
Java
UTF-8
405
2.828125
3
[]
no_license
package com.cadmus.multithreading.EvenOddThread; public class MainRunner { public static void main(String[] args) { Printer printer = new Printer(); Thread oddThread = new Thread(new TaskMaster(10, printer, true), "OddThread"); Thread evenThread = new Thread(new TaskMaster(10, printer, fal...
Java
UTF-8
1,540
2.234375
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com; import com.globalalignment.AlignmentComparator; import com.globalalignment.ExperimentBean; import com.globalalignment.ResultBean; import com.model.AlignmentsReader; import com.model.scorematrix.ScoreMatrixR...
Swift
UTF-8
4,313
2.59375
3
[ "MIT" ]
permissive
// // ZInternet.Apple.swift // // Created by Tor Langballe on 11/15/18. // import Foundation class ZIPAddress { var ip4String = "127.0.0.1" func GetIp4String() -> String { return ip4String } init(ip4String:String = "") { self.ip4String = ip4String } } struct ZInternet {...
C++
UTF-8
2,344
3.171875
3
[]
no_license
#include <string> #include <iostream> #include <fstream> #include "Player.h" #include "Team.h" using namespace std; Team::Team() { name = "City"; for (int i=0; i<25; i++) { players[i] = Player(); } } Team::Team(string s) { ifstream file(s); string f, l, con, pow, spe, glo, arm; int c, p, sp, g, a; getl...
Java
UTF-8
341
2.328125
2
[]
no_license
package ee.netgroup.su.diagnostic.cli.disease; import java.util.List; public class DiseaseParser { public Disease getParsedDisease(List<String> rawDiseaseInfo) { Disease disease = new Disease(); disease.setName(rawDiseaseInfo.remove(0)); disease.setSymptoms(rawDiseaseInfo); retu...
Markdown
UTF-8
1,829
3.484375
3
[]
no_license
## Что покажет приведенный ниже фрагмент кода? ```python s = 'abcdefg' print(s[2:5]) ``` ответ: `s = 'abcdefg' print(s[2:5])` ## Что покажет приведенный ниже фрагмент кода? ```python s = 'abcdefg' print(s[3:]) ``` ответ: `defg` ## Что покажет приведенный ниже фрагмент кода? ````python s = 'abcdefg' print(s[:3]) ...
Python
UTF-8
343
3.4375
3
[]
no_license
import operator s=raw_input("Enter a sentence : ").split(" ") l1=dict() for i in range(0,len(s)): c=1 if(str(s[i]) not in l1.keys()): for j in range(i+1,len(s)): if(s[i]==s[j]): c=c+1 l1.update({str(s[i]):str(c)}) #print(str(s[i])+" "+str(c)) l= sorted(l1.items(), key=operator.itemget...
Markdown
UTF-8
897
2.953125
3
[]
no_license
!SLIDE center # The Winner is *Javascript* ![Victory](VictoryFace2.png) !SLIDE center # *Jeff Atwood's Law* ## Any application that can be written in JavaScript, will eventually be written in JavaScript. !SLIDE bullets # Javascript ## Lisp in C clothing ![Lisp XKCD](xkcd-c224-lisp.jpg) !SLIDE # Y Combinator ...
Markdown
UTF-8
4,712
2.65625
3
[ "MIT" ]
permissive
# Facebook-clone <!-- TABLE OF CONTENTS --> ## Table of Contents * [About the Project](#about-the-project) * [Built With](#built-with) * [Features](#features) * [Roadmap](#roadmap) * [Getting Started](#getting-started) * [Prerequisites](#prerequisites) * [Installation](#installation) * [Run](#run) * [Lice...
JavaScript
UTF-8
2,388
3.953125
4
[]
no_license
function zadanie2() { var tab = []; for (var i = 1; i <= 100000; i++) { //console.log("Nasza liczba to:",i); var x = i; var liczba = x % 10; var sum = 0 while (x>0) { sum += liczba; if ((i % liczba) != 0) {break;} if (liczb...
Python
UTF-8
115
3.375
3
[]
no_license
n = input() cnt = n.count('4') + n.count('7') if(cnt == 4 or cnt == 7): print("YES") else: print("NO")
Markdown
UTF-8
4,311
3.53125
4
[]
no_license
--- title: Retrieve a Fragment from a ViewPager --- ## 问题描述 ## 我们有一个ViewPager 里面有三个Fragment > * Fragment1 > * Fragment2 > * Fragment3 如果我们要在获取其中一个**Fragment**实例要怎么做? ### 一般情况下我们会这么做: ### 之前我的写法: ```java private List<Fragment> mFragments = new ArrayList<>(); private List<String> mFragmentTitles = new ArrayList<>(...
Java
UTF-8
987
2.890625
3
[ "Apache-2.0" ]
permissive
package ru.nik66.bot; import org.junit.Test; import static org.junit.Assert.assertThat; import static org.hamcrest.core.Is.is; public class DummyBotTest { @Test public void whenAskHiBotThenAnswerHiSmartAss() throws Exception { DummyBot bot = new DummyBot(); String expected = "Hi, smart ass....
Python
UTF-8
1,629
3.59375
4
[]
no_license
""" Basic class to visualize 3D images with numpy and matplotlib """ import numpy as np class SliceViewer(object): def __init__(self, ax, *X, **kwargs): """ Parameters ---------- self: type description ax: matplotlib.Axes axes where to show the image...
Python
UTF-8
963
2.5625
3
[]
no_license
from collections import defaultdict def solve(): n=int(input()) l=list(map(int,input().split())) o,e,r,lst=[],[],[],[] for i in range(len(l)): if l[i]&1: o.append(i) else: e.append(i) if len(o)&1: r.extend([o[0],e[0]]) else: if len(e): ...
Python
UTF-8
762
3.703125
4
[]
no_license
html = """<table> <tbody> <tr> <th colspan="8"> <span> <a href="/link">Table Title</a> </span> </th> </tr> <tr> <th>Info1</th> <th>Info2</th> <th>Info3</th> <th>Info4</...
Java
UTF-8
4,425
2.578125
3
[]
no_license
package gui; import java.util.Enumeration; import javax.swing.AbstractButton; import javax.swing.ButtonGroup; import rome2rio.Rome2Rio; public class GuiUtils { public GuiUtils() { } public static String getSelectedButtonText(ButtonGroup buttonGroup) { for (Enumeration<AbstractButton> buttons = buttonGroup.g...
Python
UTF-8
3,625
2.859375
3
[ "MIT" ]
permissive
import requests from bs4 import BeautifulSoup print() Movie_Content="" Movie_Content+="\n" #request the IMDB Movie search Page content page= requests.get("https://www.imdb.com/find?q="+inp+"&ref_=nv_sr_sm") soup = BeautifulSoup(page.content,'html.parser') #Fetch t...
Java
UTF-8
1,695
2.109375
2
[]
no_license
package com.ptaas.controller; import java.util.Collection; import javax.validation.constraints.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariab...
PHP
UTF-8
1,188
2.59375
3
[ "BSD-3-Clause" ]
permissive
<?php namespace common\models; use frontend\modules\store\models\StoreProductSize; use Yii; /** * This is the model class for table "{{%store_order_product}}". * * @property integer $id * @property integer $order_id * @property integer $product_id * @property integer $size_id * @property integer $cert_id * @...
JavaScript
UTF-8
4,443
2.515625
3
[]
no_license
var pool = require('./index'); var Topic = {}; Topic.getAll = (courseID, callback) => { pool.getConnection((err, connection) => { if (err) { console.log(err); return; } //?表示等待填充的数据,这种方式可以防止MYSQL注入攻击 var query = 'SELECT * from user, topic WHERE course_id = ?...
PHP
UTF-8
1,425
2.625
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\WelcomeController; use App\Http\Controllers\UserController; use App\Http\Controllers\ContactController; /* |-------------------------------------------------------------------------- | Web Routes |----------------------------------------------------...
Python
UTF-8
2,456
3.4375
3
[]
no_license
import random from classmodule import Information def my_function(text_to_display): print('text from my_function :: {}'.format(text_to_display)) def random_events(person_info): scenarios = [{"event": "You got hit by a school bus, oh shit! You're down ", "$amount" : -8000 , "health" : -50, "mental_h...
Java
UTF-8
316
2.15625
2
[]
no_license
package com.example.huangruqi.pattern.facade.sample; /** * @data: 2019/2/20 11:22 * @author: 黄汝琪 * @Email: * @Description: */ public class Client { public static void main(String[] args) { MobilePhone phone = new MobilePhone(); phone.takePicture(); phone.videoChat(); } }
Java
UTF-8
409
1.914063
2
[]
no_license
package com.cloudtravel.cloudtravelandroid.main.item; import lombok.Data; @Data public class PlaceRcmdItem { private String title; private String city; private int imageId; private String url; public PlaceRcmdItem(String title, String city, int imageId, String url) { this.title = title; ...
C++
GB18030
13,592
2.53125
3
[]
no_license
/* * Copyright 2001 LinkAge Co.,Ltd. Inc. All Rights Reversed */ /*********************************************************************************/ /*** Name : CONFIG.CPP ***/ /*** ***/ /*...
Python
UTF-8
3,790
3.640625
4
[]
no_license
#!/usr/bin/env python3 import csv contact_list = {} class Contact: def __init__(self, first, last, mail, silent=False): self.first = first self.last = last self.mail = mail self.silent = silent contact_list[self.first] = self if not self.silent: print('...
Java
UTF-8
532
2.84375
3
[]
no_license
package org.cen.robot.control; public enum PIDMotionType { /** * The robot goes forward or backward. */ MOTION_TYPE_FORWARD_OR_BACKWARD(0x00), /** * The robot do a rotation. */ MOTION_TYPE_ROTATION(0x01), /** * The robot do a rotation with One Wheel */ MOTION_TYPE_ROTATION_ONE_WHEEL(0x02), /** ...
Python
UTF-8
1,213
2.734375
3
[]
no_license
import cassandra from cassandra.cluster import Cluster from cql_queries import create_keyspace, drop_table_queries, create_table_queries def create_keyspace(): """ - connects to cluster on local machine - creates keyspace sparkifydb - creates session on keyspace sparkifydb """ cluster = Clust...
JavaScript
UTF-8
102
2.6875
3
[]
no_license
var ingredient = ["eggs", "milk", "butter"] console.log(ingredient [1]); console.log(ingredient [2]);
SQL
UTF-8
2,306
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.6 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 30, 2016 at 10:17 AM -- Server version: 5.6.16 -- PHP Version: 5.5.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
Java
UTF-8
1,996
2.1875
2
[ "MIT" ]
permissive
package com.chenkh.vchat.client.frame.chat; import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import com.chenkh.vchat.base.msg.ChatMsg; import com.chenkh.vchat.client.IContext; import com.chenkh.vchat.client.UserMgr; import com.chenkh.vchat.c...
Java
UTF-8
453
1.640625
2
[]
no_license
package com.example.hanyan.hanee.dto.request; import lombok.Data; import java.io.Serializable; /** * @author vigo.xian */ @Data public class UserInfoAddVO implements Serializable { private static final long serialVersionUID = 4856696343700550078L; /** * 用户名 * */ private String username; ...
Python
UTF-8
379
2.71875
3
[]
no_license
from pymongo import MongoClient def search(table_name, id_field, id, db_url='localhost', db_port=27017): client = MongoClient(db_url, db_port) db = client['northwind'] table = db[table_name] return [doc for doc in table.find({id_field: id})] def example_queries(): print(search('products', 'produc...
Java
UTF-8
2,258
2.359375
2
[]
no_license
package com.lk.lankabell.android.activity.tsr.activity; import java.util.ArrayList; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.lk.lankabell.android.activity....
Java
UTF-8
1,654
4.0625
4
[ "BSD-2-Clause" ]
permissive
import java.util.Stack; import java.util.EmptyStackException; /** Clas to hold two stacks and operate between them */ public class MultiStack<T> { private Stack<T> a = new Stack(); private Stack<T> b = new Stack(); /** Push onto the A Stack * * @param item */ public void PushA(T item) { a.pu...
Python
UTF-8
1,095
4.3125
4
[]
no_license
import random colors = 'orange pink indigo green red yellow blue magenta cyan' colorslist = colors.split() #Split a string into a list random.shuffle(colorslist) #Shuffle a list print ('The shuffled list:', colorslist) print ('The minimum is:', min(colorslist)) #Minimum of list print ('The maximum is:', max(colorsli...
Java
UTF-8
3,965
3.828125
4
[]
no_license
/** * This is a simple craps game, in which the user is asked if they want to play and see rules * * @author Kareem Ansari * @version 2021-2-2 */ import java.util.Scanner; public class Craps { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("W...
PHP
UTF-8
1,259
2.90625
3
[]
no_license
<?php class ListTest extends TestCase{ public function testStore() { $params = array( 'user_id' => '2', 'movie_id' => '1234' ); $favorite = new Favorite($params); $watchlist = new Watchlist($params); $seenlist = new Seenlist($params); $this->assertTrue($favorite->save(), '...
Markdown
UTF-8
2,321
2.5625
3
[]
no_license
--- author: Jen Carlson date: February 21, 2012 4:36 PM title: One Of The Last Meals On The Titanic Revealed In Menu Being Auctioned Off --- <p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"> <img alt="lgmenutitanic.jpeg" src="https://web.archive.org/web/20120222211336im_/http://gothamist.com/...
Java
UTF-8
2,794
1.984375
2
[]
no_license
/* File generated by Magnet rest2mobile 1.1 - Sep 18, 2017 3:52:26 PM @see {@link http://developer.magnet.com} */ package kdmc_kumar.Webservices_NodeJSON.MastersRestAPI; import com.magnet.android.mms.MagnetMobileClient; import com.magnet.android.mms.controller.AbstractControllerSchemaFactory; import com.magnet....
C++
UTF-8
2,163
2.921875
3
[]
no_license
// data_structure_assignment.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include "pch.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #define Ok 0x01 #define MemoryOverFlow 0x02 #define OutOfIndex 0x03 #define TestFailed 0xfff #define MAX_SIZE 1000 typedef struct { /*从0编号到n-1*/ char elem[MAX_SIZE]; ...
TypeScript
UTF-8
2,946
3.671875
4
[]
no_license
import { nFromArray, oneFromArray, shuffle } from "./array-utils"; describe("array utils", () => { describe("shuffle", () => { // There's only so much that I can do to test this without monkeypatching Math.random it("works with empty array", () => { const result = shuffle([]); expect(result.length).toBe(0);...
Java
UTF-8
373
1.65625
2
[]
no_license
package com.springcloud.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class SysServiceProvide implements java.io.Serializable{ /** * */ private static final long serialVersionUID = 726389635798006...
C++
UTF-8
1,374
2.796875
3
[]
no_license
#include "tcpsocket.h" #include "udpsocket.h" int main(int argc, char* argv[]) { if (argc != 3) { cout << "ip port..." << endl; return -1; } string ip = argv[1]; unsigned short port = atoi(argv[2]); struct sockaddr_in addr; addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr(ip.c_str()); ...
Markdown
UTF-8
784
2.609375
3
[]
no_license
# canaryleakdetection Simple Example Code How to use Canary Leak Detector ## Synopsis Simple implementation using Canary Leak Detector on Android App, which it's will give you notification and show which part of your code that causing memory leak. In this example code will give you memory leak when async task get inte...
Java
UTF-8
1,023
2.453125
2
[]
no_license
package club.kidgames.liquid.merge.filters.strings; import javax.swing.text.MaskFormatter; import liqp.filters.Filter; /** * */ public class USPhoneNumberFormatFilter extends Filter { public USPhoneNumberFormatFilter() { super("usphone"); } @Override public Object apply(Object o, Object......
JavaScript
UTF-8
6,622
2.734375
3
[ "MIT" ]
permissive
import React, { Component} from 'react' import ReactDOM from 'react-dom' import Header from './Header.js' import Filter from './Filter.js' import Listings from './Listings.js' import listingsData from './listingsdata.js' class App extends Component { constructor () { super() this.state = { listingsDa...
PHP
UTF-8
1,080
2.75
3
[ "MIT" ]
permissive
<?php namespace Hail; /** * Class Output * * @package Hail * @property-read Output\Json $json * @property-read Output\Jsonp $jsonp * @property-read Output\File $file * @property-read Output\Text $text * @property-read Output\Template $template * @property-read Output\Redirect $redirect */ cla...
Java
UTF-8
227
1.710938
2
[]
no_license
package com.lppz.exception; public class RestHttpLogException extends Exception { /** * */ private static final long serialVersionUID = 2283328026170246096L; public RestHttpLogException(String e) { super(e); } }
Java
UTF-8
9,102
2.53125
3
[]
no_license
package se.fluff.aoc; import java.io.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.*; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.text.SimpleDateFormat; import java.util.Da...
Python
UTF-8
4,302
3.640625
4
[]
no_license
import random import math from playing_cards import Card from playing_cards import Deck def blackjack(): deck_cards = Deck() deck_cards.shuffle() dealt_hands = deal_hand(deck_cards) player_hand = dealt_hands[0] dealer_hand = dealt_hands[1] if calculate_hand(player_hand) == 21: initial_...
C++
UTF-8
5,795
2.8125
3
[]
no_license
#pragma once #include <algorithm> #include <array> #include <iostream> #include <vector> #include "domain/tiles/defs.hpp" #include "util/debug.hpp" #include "util/permutation.hpp" namespace mjon661 { namespace tiles { //Stores tiles as array[position] = tile at that position. template<int H, int W> struct Boa...
Java
UTF-8
1,161
1.679688
2
[]
no_license
package com.cti.vpx.listener; import com.cti.vpx.controls.hex.MemoryViewFilter; import com.cti.vpx.model.BIST; import com.cti.vpx.model.VPX.PROCESSOR_LIST; public interface VPXCommunicationListener extends VPXUDPListener { public void updateExit(int val); public void updateTestProgress(PROCESSOR_LIST pT...
TypeScript
UTF-8
1,764
3.640625
4
[]
no_license
//---------------------------------------- function numeroPar(arrayN:number[]):boolean{ let i:number=0; let par:boolean=false; while(i<arrayN.length && !par){ if(arrayN[i]%2==0){ par=true; } i++; } return par; } let arrayN:number[] =[23,5,1,45,2]; cons...
C++
UTF-8
2,187
2.546875
3
[ "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
/* $Id: fbCore.cpp,v 1.20 2008/04/23 01:21:42 ctubbsii Exp $ */ /** * fbCore.cpp * @author Byron Heads * @date March 10, 2008 */ #include "global.h" #include "fbData.h" #include "fbDiskDetector.h" #include "fbScheduler.h" #include "fbHttpServer.h" volatile bool FlashBackRunning; void sigterm_handler(int s); /** ...
Markdown
UTF-8
5,417
2.953125
3
[ "MIT" ]
permissive
# TICK Sandbox This repo is a quick way to get the entire TICK Stack spun up and working together. It uses [docker](https://www.docker.com/) to spin up the full TICK stack in a connected fashion. This is heavily tested on Mac and should mostly work on linux and Windows. To get started you need a running docker instal...
Java
UTF-8
569
2.21875
2
[]
no_license
package view; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import controller.PersonagemController; import model.Personagem; @ManagedBean(name = "personagemView") @ViewScoped public class PersonagemView { private List<Personag...
Swift
UTF-8
5,278
4.3125
4
[]
no_license
//-------------set of classes ---------------- class Person { var name: String var age: Int init(name: String, age: Int) { self.name = name self.age = age } } //var p1 = Set<Person>() // error - type person does not conformed to protocol Hashable var p2 = [Int: Person]() // no error ...
Java
UTF-8
472
2.046875
2
[]
no_license
package com.kepler.jd.sdk.exception; public class KeplerNoThisCategoryException extends Exception { private static final long serialVersionUID = 1; public KeplerNoThisCategoryException() { } public KeplerNoThisCategoryException(String str, Throwable th) { super(str, th); } public Kep...
Java
UTF-8
3,972
2.34375
2
[]
no_license
package com.pages; import com.WebDriverSingleton; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.List; /** * Create...
Java
UTF-8
651
1.78125
2
[]
no_license
package com.example.tanawatk.mvvmandroid.service.repo; import android.content.Context; import com.example.tanawatk.mvvmandroid.common.ResponseHandler; import com.example.tanawatk.mvvmandroid.di.qualifier.ApplicationContext; import com.example.tanawatk.mvvmandroid.service.model.ResponseModel; import javax.inject.Inje...
C#
UTF-8
1,485
2.921875
3
[]
no_license
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 lab_5 { public partial class Form2 : Form { public Form2() ...
Markdown
UTF-8
4,169
2.984375
3
[ "Apache-2.0" ]
permissive
程序员最佳网站 ====== ![][1] 作为程序员,你经常会发现自己是某些网站的永久访问者。它们可以是教程、参考或论坛。因此,在这篇文章中,让我们看看给程序员的最佳网站。 ### W3Schools W3Schools 是为初学者和有经验的 Web 开发人员学习各种编程语言的最佳网站之一。你可以学习 HTML5、CSS3、PHP、 JavaScript、ASP 等。 更重要的是,该网站为网页开发人员提供了大量资源和参考资料。 [![w3schools logo][2]][3] 你可以快速浏览各种关键字及其功能。该网站非常具有互动性,它允许你在网站本身的嵌入式编辑器中尝试和练习代码。该网站是你作为网页开发人员经常访问的少...
Java
UTF-8
2,949
3.34375
3
[]
no_license
package com.java.hackerrank.trie; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; public class Contacts { private static Map<Character, Trie> contactsList = new HashMap<>(); private static final Scanner scanne...
Java
UTF-8
2,882
1.914063
2
[ "Unlicense" ]
permissive
package viaversion.viaversion.protocols.protocol1_13to1_12_2.providers.blockentities; import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.IntTag; import com.github.steveice10.opennbt.tag.builtin.ListTag; import com.github.steveice10.opennbt.tag.builtin.StringT...
C
ISO-8859-1
1,779
3.96875
4
[]
no_license
/* Fuente: ESPACIOS.C Programa: ELIMINA ESPACIOS POR LA DERECHA E IZQUIERDA Descripcin: Las funciones ELIMINA_ESPACIOS_IZQ y ELIMINA_ESPACIOS_DER, reciben una cadena de caracteres y devuelven la propia cadena una vez que han eliminado respectivamente los espacios en blanco de comienzo y final de la cadena *...
Ruby
UTF-8
944
2.546875
3
[ "MIT" ]
permissive
require "test_helper" class NebTest < Neb::TestCase def setup @account = Neb::Account.create @password = '123456' end def test_create_account_with_random_private_key assert_equal 64, @account.private_key.size assert_equal 128, @account.public_key.size assert_equal 35, @account.address.si...
PHP
UTF-8
3,496
2.96875
3
[]
no_license
<?php /** * Created by JetBrains PhpStorm. * User: wickb * Date: 07.08.13 * Time: 17:54 * To change this template use File | Settings | File Templates. */ namespace TechDivision\PhpTokenUsage\Entities; class Result { public $name = ''; public $labels = array(); public $fileCount = 0; public $...
Java
UTF-8
1,696
2.234375
2
[]
no_license
package Model; import java.util.ArrayList; public class LibModel { private String book_id; public ArrayList<String> branch_id= new ArrayList<String>(); public ArrayList<Integer> no_copies= new ArrayList<Integer>(); public ArrayList<Integer> available= new ArrayList<Integer>(); private int brid; private String ...
Java
UTF-8
1,707
2.609375
3
[]
no_license
package com.sky.flow.exception; import java.util.Arrays; import java.util.List; import java.util.logging.Level; /** * 流程异常 * @author 王帆 * @date 2019年5月16日 下午3:30:55 */ public class FlowException extends Exception{ /***/ private static final long serialVersionUID = 1L; private Level level; ...
C
UTF-8
378
2.53125
3
[]
no_license
#include <stdint.h> #include "joystick.h" #include "movement.h" action_t movementFromJoystick(){ uint16_t moves = 0; moves += readJoystick(JOYSTICK_MIDDLE) << 0; moves += readJoystick(JOYSTICK_LEFT) << 1; moves += readJoystick(JOYSTICK_RIGHT) << 2; moves += readJoystick(JOYSTICK_UP) << 3; moves...
C#
UTF-8
3,535
2.859375
3
[]
no_license
using System; using System.Linq; namespace OpenIRacingTools.Sdk { public static class Calculations { public static TimeSpan? CalculateDeltaBetweenCars(this Sdk sdk, int carIdxAhead, int carIdxBehind) { if (sdk.TelemetryData == null) { return null; ...
Markdown
UTF-8
631
3.546875
4
[]
no_license
# 1 https://www.careercup.com/question?id=5174694727647232 Given a 2D matrix of integers, sort it such that: - every row is sorted in ascending order from left to right - every column is sorted in ascending order from top to down - all items in the same row are unique You may assume the input matrix is always val...
JavaScript
UTF-8
1,934
3.0625
3
[ "MIT" ]
permissive
/** * Status model builder class. * * @namespace status-model * @returns A status builder access object. */ function nonDataStatusResponse() { var util = require('util'); var constants = require('../constants'); /** * Build a blank status object. * <pre><code> * { * status: n...
C++
UTF-8
542
2.671875
3
[]
no_license
int main() { int a[5][5],i,j; int k,m,n,l,p=0,flag=0; for(i=0;i<=4;i++) { for(j=0;j<=4;j++) { scanf("%d",&a[i][j]); } } for(i=0;i<=4;i++) { k=a[i][0];m=i;n=0; for(j=1;j<=4;j++)//in a row { if(a[i][j]>k) { k=a[i][j]; m=i;n=j; } } for(l=0;l<=4;l++)//in...
Markdown
UTF-8
1,865
4.28125
4
[]
no_license
# Binary Tree Level Order Traversal II **题目:** Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). **翻译:** 给定一个二叉树,返回它的节点的值的自底向上的顺序遍历的结果。(即,从左到右,从叶子到根) **例子:** ``` Given binary tree [3,9,20,null,null,15,7], 3 / \ ...
Java
UTF-8
2,827
2.59375
3
[]
no_license
package com.domain.admin; import com.domain.people.Learner; import org.springframework.boot.autoconfigure.domain.EntityScan; import java.util.Objects; import java.util.Set; @EntityScan public class Attendance { private String learnerID; private int noOfDaysAbsent; private String noOfDaysPresent; pr...
Python
UTF-8
4,648
2.640625
3
[]
no_license
import numpy as np import pandas import tensorflow as tf import csv import os, time import matplotlib as mpl if os.environ.get('DISPLAY','') == '': print('no display found. Using non-interactive Agg backend') mpl.use('Agg') import matplotlib.pyplot as plt MAX_DOCUMENT_LENGTH = 100 MAX_LABEL = 15 HIDDEN_SIZE = ...
JavaScript
UTF-8
1,145
2.84375
3
[ "CC0-1.0" ]
permissive
fs = require('fs'); global.geocodelist = null; function loadGeocoder() { console.log("Loading Geocoder"); var res = fs.readFileSync('./api/helpers/countries_geocoded.json'); global.geocodelist = JSON.parse(res).data; return global.geocodelist; } module.exports = { geoCodeByISO3: function(ccc) { ...
JavaScript
UTF-8
522
2.546875
3
[]
no_license
// Hamburger Menu Open Close on Mobile document.querySelector('.toggle').addEventListener('click', () => { document.querySelector('.toggle').classList.toggle('active'); document.querySelector('nav').classList.toggle('active'); }); //Form Submit Response document.querySelector('form').addEventListener('sub...
Java
UTF-8
4,183
2.015625
2
[]
no_license
package com.yuanbao.park.shiro.VO; import java.util.Date; import java.util.List; import com.yuanbao.park.entity.UUser; public class UserVO { private Long id; private String name; private String password; private String salt; private String department; private String position; priv...
Markdown
UTF-8
815
2.515625
3
[]
no_license
titanium-formatted-field ================================================= This module returns extended TextField. It fixes [JIRA TIMOB-7637](https://jira.appcelerator.org/browse/TIMOB-7637) - inability to set field max length on Android. Entry may be restricted on length, content (numbers/phonenumbers/anychar) and nu...
Markdown
UTF-8
1,404
3.109375
3
[]
no_license
# lecture ## Swift(구조체와 클래스) ### 구조체선언법: struct 구조체이름{ 프로퍼티와 메서드 } ### 클래스선언법: class 클래스 이름 { 프로퍼티와 메서드들 } ### Class, Struct의 공통점 값을 저장할 프로퍼티를 선언할 수 있습니다. 함수적 기능을 하는 메서드를 선언 할 수 있습니다. 내부 값에. 을 사용하여 접근할 수 있습니다. 생성자를 사용해 초기 상태를 설정할 수 있습니다. extension을 사용하여 기능을 확장할 수 있습니다. Protocol을 채택하여 기능을 설정할 수 있습니 ### Class (클래스) ...
Java
UTF-8
1,702
2.515625
3
[]
no_license
package com.udacity.jwdnd.course1.cloudstorage.services; import com.udacity.jwdnd.course1.cloudstorage.mapper.FilesMapper; import com.udacity.jwdnd.course1.cloudstorage.model.BinaryFile; import com.udacity.jwdnd.course1.cloudstorage.model.Files; import org.springframework.stereotype.Service; import org.springframework...
Java
UTF-8
287
1.554688
2
[]
no_license
package com.miduchina.wrd.api.mapper.heatanalysis; import com.miduchina.wrd.po.home.HeatShare; import org.apache.ibatis.annotations.Mapper; /** * @auther Administrator * @vreate 2019-05 16:43 */ @Mapper public interface HeatMapper { HeatShare findShareCode(String shareCode); }