Dataset Viewer
Auto-converted to Parquet Duplicate
file_id
int64
19
124M
content
stringlengths
42
939k
78,836,101
// SPDX-License-Identifier: MIT package com.dynamsoft.server; import java.io.File; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerCollection; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContex...
38,412,327
// SPDX-License-Identifier: Apache-2.0 package com.tmn.helloSpring.pojo; import java.util.ArrayList; import java.util.List; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @Component @Scope("prototype") //default is singleton check Shopping bean instanc...
117,949,084
// SPDX-License-Identifier: Apache-2.0 package com.tmn.spring; public class HelloSpring { public static void main(String[] args) { int num = 500; int num2 = 5500; System.out.println(new HelloSpring().addNum(num, num2)); } int addNum(int num,int num2){ return num+num2; } }
38,412,348
// SPDX-License-Identifier: MIT import java.util.Scanner; public class cameliadamian_d { public static void main(String[]args) { Scanner sc=new Scanner (System.in); int x=sc.nextInt(); int y=sc.nextInt(); int y1=x, y2=2*x; if(Math.abs(x)>5) { y=y1;} else { y=y2;} System.out.println("x="+...
53,377,175
// SPDX-License-Identifier: MIT import java.util.Scanner; public class DamianSlutuscanner2 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int l=(int) Math.sqrt(a*a+b*b); System.out.println("Ipotenuza:"+l); sc.close(); } }
55,625,645
// SPDX-License-Identifier: MIT public class cameliadamian_ifstatement2 { public static void main(String[] args) { int R=3,A=6; if(2*R==A) System.out.println("Cercul incape in patrat"); else System.out.println("Cercul nu incape in patrat"); } }
64,859,451
// SPDX-License-Identifier: MIT import java.util.Scanner; public class cameliadamian_ifstatement1 { public static void main(String[]args) { Scanner sc=new Scanner (System.in); double x=sc.nextInt(); double y=sc.nextInt(); double y1=Math.pow(x,2),y2=x+1; if(x<-5) { y=y1;} else if(x>=2) { y=y...
105,697,948
// SPDX-License-Identifier: MIT import java.util.Scanner; public class cameliadamianscanner{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int sum=a+b+c; System.out.println("Suma:"+sum); int med=a+b+c/3; System.o...
106,806,606
// SPDX-License-Identifier: MIT import java.util.Scanner; public class Damianscanner3 { public static void main(String[] args) { Scanner qwer = new Scanner(System.in); System.out.println("Introduceti cantitatea de fructe uscate:"); double m=qwer.nextByte(); System.out.println("Introduceti procentajul de pierd...
117,591,876
// SPDX-License-Identifier: MIT import java.util.Scanner; public class DamianSlutuscanner1 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int h=sc.nextInt(); int m=sc.nextInt(); int p1=h+m; System.out.println("Perioada in ore si minute:"+p1); int p2=h*60+m; System.out.println(...
123,168,244
// SPDX-License-Identifier: MIT import java.util.Scanner; public class cameliadamian_c { public static void main(String[]args) { Scanner sc=new Scanner (System.in); int x=sc.nextInt(); int y=sc.nextInt(); int y1=x,y2=x+4; if (x>=3) { y=y1;} else { y=y2;} System.out.println("x="+x+",y="+y); sc.cl...
123,367,546
// SPDX-License-Identifier: MIT public class cameliadamian_ifstatement { public static void main(String[] args) { int a=4,b=6; int c=a*a,d=a+b; if (a>0){ a=c;b=d;} else { a=d;b=c;} System.out.println("a="+a+",b="+b); } }
38,412,993
// SPDX-License-Identifier: MIT package depsolver; import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.JSON; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.*; class Package { private String name; private String version; private Int...
38,413,287
// SPDX-License-Identifier: MIT // Autor: Edwin J. Estrella Ayala // A00549508 // Curso: COMP 3800 - 78112 // Profesor: J. Navarro // Asignacion: Diseño de Analizador de Sintaxis package sintaxAnalyzer; public class Expression { String expression; public Expression() {} public Expression(...
38,414,411
// SPDX-License-Identifier: Apache-2.0 /* Generated by Streams Studio: January 22, 2020 at 11:34:22 AM GMT+1 */ package com.ibm.streamsx.redis; import java.net.URI; import java.net.URISyntaxException; import org.apache.log4j.Logger; import com.ibm.streams.operator.AbstractOperator; import com.ibm.streams.operator.O...
38,418,684
// SPDX-License-Identifier: MIT class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!! This is programming"); } }
38,421,092
// SPDX-License-Identifier: MIT package lee.study.proxyee.intercept.common; import io.netty.channel.Channel; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpContentDecompressor; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpObject...
38,421,318
// SPDX-License-Identifier: MIT /** * UNTOUCHABLE! You cannot change this file. * */ import java.util.Random; public class LunExServices implements ITC.SecurityExchangeTransmissionInterface { private static Random invisibleHand = new Random(); public double currentPrice(String symbol) { pauseToEmulateSendRec...
100,055,829
// SPDX-License-Identifier: MIT package ITC; public interface SecurityExchangeTransmissionInterface { double currentPrice(String symbol); }
38,422,991
// SPDX-License-Identifier: MIT package application ; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class JDBCMySQLDemo { public static void main(...
53,318,897
// SPDX-License-Identifier: MIT package application; import java.io.IOException; import java.net.URL; import java.sql.Connection; import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fx...
54,134,947
// SPDX-License-Identifier: MIT package application ; import java.util.Date; public class Employee { public int emp_id; public String emp_name; public String post; public int dept_id ; public String gender ; public int rights ; public Date dob; public String slot ; public Str...
121,950,436
// SPDX-License-Identifier: MIT package application ; public class admin_control { }
38,424,191
// SPDX-License-Identifier: MIT package game_wm56; /*********************************** *Game by Vidda Wenjun Mao * *Credit and reference * * picture and font resources * * from Battleheart * * Diablo 3 * * * * Inspired by * * Wind Fantasy * ...
119,857,306
// SPDX-License-Identifier: MIT package game_wm56; public class enemy { private static boolean[][] Enemy = new boolean[11][7]; public static void enemy_Init(){ for (int row = 1; row < 10; row ++) for (int col = 1; col < 6; col++) Enemy[row][col] = false; Enemy[2][1]=true; Enemy[5][3]=true; Enemy[8...
38,424,495
// SPDX-License-Identifier: MIT import java.util.concurrent.*; import java.util.concurrent.atomic.*; // Exchanger is a lock-free object that permits two threads // to exchange values, within a time limit. class Exchanger<T> { AtomicStampedReference<T> slot; static final int EMPTY = 0; static final int WAITING =...
61,758,678
// SPDX-License-Identifier: MIT import java.util.*; class Main { static Deque<Integer> stack; static EliminationBackoffStack<Integer> concurrentStack; static List<Integer>[] poppedValues; static int TH = 10, NUM = 1000; // Each unsafe thread pushes N numbers and pops N, adding // them to its own poppedVal...
65,312,518
// SPDX-License-Identifier: MIT import java.util.*; import java.util.concurrent.*; // Elimination array provides a list of exchangers which // are picked at random for a given value. class EliminationArray<T> { Exchanger<T>[] exchangers; final long TIMEOUT; final TimeUnit UNIT; Random random; // exchangers:...
109,133,721
// SPDX-License-Identifier: MIT import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; // Elimination-backoff stack is an unbounded lock-free LIFO // linked list, that eliminates concurrent pairs of pushes // and pops with exchanges. It uses compare-and-set (CAS) // atomic operation ...
112,711,579
// SPDX-License-Identifier: MIT class Node<T> { public T value; public Node<T> next; public Node(T x) { value = x; } }
38,425,135
// SPDX-License-Identifier: MIT import av.Alfabeto; import av.TrieST; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class teste1 { /** * Retorna o maior prefixo de s que seja * uma chave da trie ou null caso nao * haja resposta. * @...
71,084,928
// SPDX-License-Identifier: MIT /* * 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 av; import java.text.Normalizer; import java.util.regex.Pattern; /** * * @author Francisco ...
84,987,757
// SPDX-License-Identifier: MIT package av; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class AV { /** * Retorna o maior prefixo de s que seja * uma chave da trie ou null caso nao * haja resposta. * @param s * @param trie ...
38,427,641
// SPDX-License-Identifier: MIT public class HelloWorld{ public static void main (String[]args){ System.out.println("Alhamdulillah"); } }
38,427,947
// SPDX-License-Identifier: Apache-2.0 /* DefineConsensus.java 2012 Ⓒ CloudBrush, developed by Chien-Chih Chen (rocky@iis.sinica.edu.tw), released under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) at: https://github.com/ice91/CloudBrush */ package Brush; import java.io.I...
38,428,129
// SPDX-License-Identifier: Apache-2.0 package im.delight.android.audio; /* * Copyright (c) delight.im <info@delight.im> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
77,094,156
// SPDX-License-Identifier: Apache-2.0 package im.delight.android.audio; /* * Copyright (c) delight.im <info@delight.im> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
38,428,881
// SPDX-License-Identifier: Apache-2.0 package com.lgl.ninecut; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.UUID; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.grap...
106,912,368
// SPDX-License-Identifier: Apache-2.0 package com.lgl.ninecut; import java.io.File; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.text.T...
38,429,126
// SPDX-License-Identifier: MIT package com.shamus.main; import com.shamus.datax.NGramGenerator; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.Map; import java.util.Map.Entry; import java.util.PriorityQueue; import java.util.Scanner; import...
39,567,259
// SPDX-License-Identifier: MIT package com.shamus.datax; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; /** * Performs a map reduce of objects in a list and returns a Map<E, Integer>. * * @author drose */ public class MapReduce { private Ma...
73,423,457
// SPDX-License-Identifier: MIT package com.shamus.datax; import java.io.IOException; import java.io.Serializable; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java...
38,429,258
// SPDX-License-Identifier: Apache-2.0 package com.logztechstuff.core.inheritance.base; public class ProtectedCheckBaseMain { public static void main(String[] args) { ProtectedCheckSubClass sub = new ProtectedCheckSubClass(); System.out.println("Base class default variable with sub class obj::" + sub.default...
58,048,650
// SPDX-License-Identifier: Apache-2.0 package com.logztechstuff.core.inheritance.sub; public class ProtectedCheckMain { public static void main(String[] args) { ProtectedSubClass protectedSubClass = new ProtectedSubClass(); //Member variables System.out.println("Public variable::" + protectedSubClass.pu...
72,389,001
// SPDX-License-Identifier: Apache-2.0 package com.logztechstuff.core.inheritance.base; public class ProtectedCheckSubClass extends ProtectedCheckBaseClass{ }
80,608,483
// SPDX-License-Identifier: Apache-2.0 package com.logztechstuff.core.inheritance.sub; import com.logztechstuff.core.inheritance.base.ProtectedCheckBaseClass; public class ProtectedSubClass extends ProtectedCheckBaseClass{ protected String getBaseClassProtectedMember() { return protectedName; } }
99,179,491
// SPDX-License-Identifier: Apache-2.0 package com.logztechstuff.core.inheritance.base; public class ProtectedCheckBaseClass { public String publicName = "Base class publicName"; protected String protectedName = "Base class protectedName"; String defaultName = "Base class defaultName"; public String getPubli...
38,430,290
// SPDX-License-Identifier: MIT package FileIO.BasicIOHelper; import java.io.*; import java.util.Arrays; /** * Created by lazar on 9/8/2016. * Basic helper for simple File IO operations. * v1.0.1 * @author Tom Lazar * (262) 408-0490 * thomas.lazar@marquette.edu */ public class IOHelper { p...
68,343,110
// SPDX-License-Identifier: MIT package Algrothms.String.LongestCommonSubstring; import java.util.Scanner; /** * Created by tom lazar on 9/26/2016. */ public class LongestCommonSubstring { // Fields final static boolean DEBUG = true; // LCS Parameters private int MatchBonus; private int MisMatc...
38,430,575
// SPDX-License-Identifier: MIT //No space only tab package tcp; import java.util.Arrays; /** * * @author djsdvg */ public class TCP { int numSegments; int byt; int mSS; int cWND; int sSTHRESH; int []grafico; int totSeg; int rCVWND; /** * * @param byt byte ...
74,079,406
// SPDX-License-Identifier: MIT package tcp; /** * * @author djsdvg */ public class MainTCP { public static void main(String[] args) { // TODO code application logic here /* EXAMPLE TCP tcp1 = new TCP(104000,1200, 24000,20); TCP tcp2 = new TCP(46500,1500, 24000); TCP tc...
38,430,607
// SPDX-License-Identifier: MIT import java.util.Random; public class MyClass { public static void main(String args[]) { final String nextLine = "bctf{abcdefghijklmnop}"; char[] array2 = new char[nextLine.length()]; int[] array3 = { 19, 17, 15, 6, 9, 4, 18, 8, 16, 13, 21, 11, 7, 0, ...
60,769,210
// SPDX-License-Identifier: MIT import java.util.Random; public class MyClass { public static void main(String args[]) { final String nextLine = "bctf{abcdefghijklmnop}"; if (nextLine.length() != 22) { System.out.println("Not the flag :("); return; } ...
38,431,585
// SPDX-License-Identifier: Apache-2.0 package com.github.lindenb.jnihts.samtools; public class NativeHts { private static final boolean load() { try { System.loadLibrary("jnihts"); return true; } catch(UnsatisfiedLinkError err) { err.printStackTrace(); return false; }catch(SecurityException err) { err.pr...
45,536,632
// SPDX-License-Identifier: Apache-2.0 package test.github.lindenb.jnihts.samtools; import java.io.File; import com.github.lindenb.jnihts.samtools.NativeHts; import com.github.lindenb.jnihts.samtools.NativeSamReader; import com.github.lindenb.jnihts.samtools.NativeSamReaderFactory; import htsjdk.samtools.SAMRecord; ...
54,653,324
// SPDX-License-Identifier: Apache-2.0 package com.github.lindenb.jnihts.samtools; import java.io.File; public class NativeSamReaderFactory { public NativeSamReader open(String samFile) { if(!NativeHts.isEnabled()) return null; NativeSamReaderImpl reader = new NativeSamReaderImpl(samFile); return reader; ...
102,414,985
// SPDX-License-Identifier: Apache-2.0 package com.github.lindenb.jnihts.samtools; import java.io.ByteArrayInputStream; import java.io.IOException; import htsjdk.samtools.DefaultSAMRecordFactory; import htsjdk.samtools.SAMFileHeader; import htsjdk.samtools.SAMRecord; import htsjdk.samtools.SAMRecordFactory; import ht...
113,752,372
// SPDX-License-Identifier: Apache-2.0 package com.github.lindenb.jnihts.samtools; import java.io.Closeable; import htsjdk.samtools.SAMFileHeader; import htsjdk.samtools.SAMRecord; public interface NativeSamReader extends Closeable{ public SAMFileHeader getFileHeader() ; public SAMRecord advance(); }
38,434,142
// SPDX-License-Identifier: MIT package com.hz; public class Main { public static void main(String[] args) { Printer printer = new Console(); // Different kind of cards PostCard greeting = new GreetingCard(printer); PostCard graduation = new GraduationCard(printer); PostC...
40,756,839
// SPDX-License-Identifier: MIT package com.hz; public class GreetingCard extends PostCard { public GreetingCard(Printer printer) { super(printer); } @Override void print(){ this.printHeader(); this.printMessage(); this.printImage(); this.printFooter(); }...
60,519,218
// SPDX-License-Identifier: MIT package com.hz; abstract public class PostCard { public Printer printer; public PostCard(Printer printer) { this.printer = printer; } abstract void print(); abstract void printHeader(); abstract void printMessage(); abstract void printImage(); ...
79,694,129
// SPDX-License-Identifier: MIT package com.hz; public class ChristmasCard extends PostCard{ public ChristmasCard(Printer printer) { super(printer); } @Override void print(){ this.printMessage(); this.printHeader(); this.printImage(); this.printFooter(); }...
38,435,343
// SPDX-License-Identifier: MIT /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package multiserver; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.util.logg...
109,890,067
// SPDX-License-Identifier: MIT /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package multiserver; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.LinkedHashSet; import java.util.Set; import java.util.logging.Level...
38,435,379
// SPDX-License-Identifier: MIT import java.util.Scanner; public class Ex21 { static int N; static int[] game = new int[] {9, 2, 6, 5, 3, 1, 7, 5, 8, 4}; static int[][] scores; static char[][] moves; private static void printMatrix() { System.out.print(" "); for (int col=1; col<=N; col++) Syste...
53,552,563
// SPDX-License-Identifier: MIT import java.util.Scanner; public class Ex23 { private static int[][] matrix; private static String[][] path; private static String a, b; private static int score(int x, int y) { int diagonal = matrix[x - 1][y - 1] + match(a.charAt(x), b.charAt(y)); int up = 2 + matrix[x - 1][...
38,435,430
// SPDX-License-Identifier: MIT package com.spojipoliticare.igra; import com.spojipoliticare.igra.R; import android.os.Bundle; import android.annotation.SuppressLint; import android.app.Activity; import android.view.Menu; import android.webkit.WebView; import android.widget.Toast; public class MainActivity extends A...
38,435,743
// SPDX-License-Identifier: Apache-2.0 import java.net.*; import java.io.*; public class HttpClient { public static void main(String[] args) throws IOException { //读取用户指令,判断是否合法 if (args.length != 2) { System.out.println("Usage: java HttpClient <host_name> <port_number>"); System.exit(1); } ...
71,919,943
// SPDX-License-Identifier: Apache-2.0 import java.io.*; import java.net.*; import java.util.Scanner; public class HttpServer { @SuppressWarnings("resource") public static void main(String[] args) { //判断传入参数 if (args.length != 1) { System.out.println("Usage: java HttpServer <port_numbe...
38,437,271
// SPDX-License-Identifier: Apache-2.0 /** * 网络编程。<br> */ package javacore.net;
46,894,008
// SPDX-License-Identifier: Apache-2.0 package javacore.net.day23; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; /** * 网络编程(UDP-聊天)<br> * <p> * 编写一个聊天程序。<br> * 有收数据的部分,和发数据的部...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8