id
stringlengths
36
36
meta
stringlengths
429
697
url
stringlengths
27
109
tokens
int64
137
584
domain_prefix
stringlengths
16
106
score
float64
0.16
0.3
code_content
stringlengths
960
1.25k
3075a117-cd3a-4786-b232-5b4855772327
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-10-09T19:09:05", "repo_name": "techgaun/til", "sub_path": "/linux/journalctl-quick-cheatsheet.md", "file_name": "journalctl-quick-cheatsheet.md", "file_ext": "md", "file_size_in_byte": 1218, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "d02d63aa9983217be2faac0cedbfc680ef73d22e", "star_events_count": 7, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/techgaun/til
306
FILENAME: journalctl-quick-cheatsheet.md
0.246533
## Journalctl Quick Cheatsheet - systemd-journald system service is responsible for collecting and storing log data. It creates and maintains structured, indexed journals based on logging information that is received from a variety of sources. - One of the main changes in journald was to replace simple plain text log files with a special file format optimized for log messages. This file format allows system administrators to access relevant messages more efficiently. It also brings some of the power of database-driven centralized logging implementations to individual systems. - You are supposed to use the `journalctl` command to query log files. ### Cheatsheets - sshd logs : `journalctl _COMM=sshd` - sshd logs in json format : `journalctl _COMM=sshd -o json-pretty` - filter by date range : `journalctl --since "2015-01-10" --until "2015-01-11 03:00"` - another filter by date range example : `journalctl --since 09:00 --until "1 hour ago"` - logs since boot : `journalctl -b` - follow logs : `journalctl -f` - disk usage of all journal files : `journalctl --disk-usage` - Reduce disk usage below specified size : `journalctl --vacuum-size=1G` Source : [htop explained](https://peteris.rocks/blog/htop/)
bc43a54f-4df1-4e73-b66c-48cffa739346
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-09 17:20:20", "repo_name": "muhammadaqilp/BismillahYukBisaYuk", "sub_path": "/app/src/main/java/com/example/bismillahyukbisayuk/ProfileActivity.java", "file_name": "ProfileActivity.java", "file_ext": "java", "file_size_in_byte": 1089, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "ce0e9ba8c256e97d1a2ad3336c1e7e699d90edda", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/muhammadaqilp/BismillahYukBisaYuk
172
FILENAME: ProfileActivity.java
0.195594
package com.example.bismillahyukbisayuk; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.TextView; //import android.support.v7.widget.Toolbar; import androidx.appcompat.widget.Toolbar; import androidx.appcompat.app.AppCompatActivity; import com.google.firebase.auth.FirebaseAuth; public class ProfileActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_profile); Toolbar toolbar = findViewById(R.id.toolbar_layout); setSupportActionBar(toolbar); TextView logout = findViewById(R.id.backtohome); logout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FirebaseAuth.getInstance().signOut(); startActivity(new Intent(ProfileActivity.this, LoginActivity.class) .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)); } }); } }
8f4db484-faf8-4c5a-b345-0a4b37ca2996
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-18 01:10:42", "repo_name": "fanqilongmoli/BankPDA", "sub_path": "/app/src/main/java/com/flc/bankpda/modules/dopackage/PackageTypeChooseActivity.java", "file_name": "PackageTypeChooseActivity.java", "file_ext": "java", "file_size_in_byte": 1234, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "88e078cc85d9b38cd2389712aca88da2fb0a9c58", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fanqilongmoli/BankPDA
243
FILENAME: PackageTypeChooseActivity.java
0.247987
package com.flc.bankpda.modules.dopackage; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.flc.bankpda.R; import com.flc.bankpda.base.BaseMvpActivity; public class PackageTypeChooseActivity extends BaseMvpActivity { private ImageView iv_package2; private ImageView iv_package1; @Override protected int getLayoutId() { return R.layout.activity_package_type_choose; } @Override protected void init(Bundle savedInstanceState) { iv_package2 = ((ImageView) findViewById(R.id.iv_package2)); iv_package1 = ((ImageView) findViewById(R.id.iv_package1)); // 点击一代包 findViewById(R.id.rl_package1).setOnClickListener(v -> { iv_package1.setVisibility(View.VISIBLE); iv_package2.setVisibility(View.GONE); }); // 点击二代包 findViewById(R.id.rl_package2).setOnClickListener(v -> { iv_package1.setVisibility(View.GONE); iv_package2.setVisibility(View.VISIBLE); }); findViewById(R.id.tv_confirm).setOnClickListener(v -> startActivity(new Intent(mContext,PackageActivity.class))); } }
54f82fdb-1289-434a-b344-06fea03d3c75
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-24 09:28:45", "repo_name": "Moonllit/vk-client", "sub_path": "/app/src/main/java/com/support/android/vkclient/domain/dto/Photo.java", "file_name": "Photo.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "96f5f8aaa05984683c556d9444635573432e3fe1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Moonllit/vk-client
224
FILENAME: Photo.java
0.206894
package com.support.android.vkclient.domain.dto; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class Photo { @SerializedName("id") @Expose private int id; @SerializedName("sizes") @Expose private List<PhotoSize> sizes = null; @SerializedName("text") @Expose private String text; @SerializedName("date") @Expose private int date; public int getId() { return id; } public void setId(int id) { this.id = id; } public List<PhotoSize> getSizes() { return sizes; } public void setSizes(List<PhotoSize> sizes) { this.sizes = sizes; } public String getText() { return text; } public void setText(String text) { this.text = text; } public int getDate() { return date; } public void setDate(int date) { this.date = date; } }
26667a64-0feb-4003-92a8-51d961baeecf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-04-23T18:25:10", "repo_name": "TarasVtOrg/gulp_starter", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1133, "line_count": 29, "lang": "en", "doc_type": "text", "blob_id": "edb69665b2a4de834f3c3cc85df4b062beb1d6ab", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TarasVtOrg/gulp_starter
293
FILENAME: README.md
0.249447
# Gulp starter config ## Before working: 1. Create project directory [dir_folder]. 2. Install Node.js and npm: - Inside the dir, type ```npm init``` and compose the package.json by your data; - To install any one package ```npm [i or install] [--save or --save-dev] [package repo or package alias]```; - To remove -//- ```npm [rm or remove] [--save or --save-dev] [package repo or package alias]```; 3. Initialize empty git repo, type ```git init```; 4. ## Working with vcs [version control system]: 1. Type ```git add .``` to set all changed files to register; 2. Type ```git commit -m '[you comment of last commit]'``` 3. Type ```git push origin [name of your current branch, possible it is [master]]```. Looks like ```git push origin master```; 4. Type ```git pull origin [name of branch, possible it cout be master]```; Looks like ```git pull origin master```; - To create new branch ```git branch [name of your future branch]```; - To checkout to new one ```git checkout [name of your existing branch]```; ## Working with gulp: 1. for dev ```gulp``` or ```gulp develop```; 2. for buld ```gulp build```;
cb30a48e-50b8-4f51-89d8-779cc8d18ae1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-04 14:24:14", "repo_name": "lejolly/kvm-builder", "sub_path": "/src/main/java/kvm/InstallKVM.java", "file_name": "InstallKVM.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "6b355b0a70f55df34ed0e7f53b6e3ff872f9dc7a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lejolly/kvm-builder
204
FILENAME: InstallKVM.java
0.264358
package kvm; import utils.FileUtils; import java.io.BufferedWriter; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; // step 1 public class InstallKVM { private static final String KVM_INSTALL_SCRIPT = "KVM-install.sh"; protected static void createInstallScript(String root) { try { Path installScriptPath = Paths.get(root + KVM.KVM_ROOT_FOLDER + KVM.STEP_1_INSTALL_KVM_FOLDER + KVM_INSTALL_SCRIPT); BufferedWriter bufferedWriter = FileUtils.createAndWriteToFile(installScriptPath); FileUtils.writeLine(bufferedWriter, "#!/bin/bash"); FileUtils.writeLine(bufferedWriter, "sudo apt-get -qq update"); FileUtils.writeLine(bufferedWriter, "sudo apt-get -qq -y install qemu-kvm libvirt-bin virtinst bridge-utils"); bufferedWriter.flush(); bufferedWriter.close(); } catch (IOException e) { e.printStackTrace(); } } }
a77d74d3-8611-4af5-a94a-52e4729cbe3b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-27 18:11:19", "repo_name": "guptapankaj/japache", "sub_path": "/src/main/java/SimpleHttpServer.java", "file_name": "SimpleHttpServer.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "cd71c0c4bea233e3dbd4f40c9b068d58e971f319", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/guptapankaj/japache
225
FILENAME: SimpleHttpServer.java
0.220007
import com.sun.org.apache.xalan.internal.xsltc.dom.SimpleResultTreeImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import util.PropertiesReader; import javax.xml.soap.SAAJResult; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; /** * Created by pgupta10 on 27/08/16. */ public class SimpleHttpServer { private static final Logger LOGGER = LoggerFactory.getLogger(SimpleHttpServer.class); public static void main(String[] args) { try ( ServerSocket serverSocket = new ServerSocket(PropertiesReader.getHttpPort()); Socket clientSocket = serverSocket.accept(); PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true); BufferedReader in = new BufferedReader( new InputStreamReader(clientSocket.getInputStream())); ) { String inputLine; while ((inputLine = in.readLine()) != null) { LOGGER.debug(inputLine); } }catch (Exception e){ LOGGER.error(e.getMessage()); } } }
78d96c4d-2f15-41af-95f8-16cb74bff3aa
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-01 14:30:52", "repo_name": "avijit-bairagi/address-book-android", "sub_path": "/app/src/main/java/com/avijit/addressbook/api/RetrofitClient.java", "file_name": "RetrofitClient.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e5445c27ca3a2ee964e22d4900c70a6319dc3c60", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/avijit-bairagi/address-book-android
194
FILENAME: RetrofitClient.java
0.268941
package com.avijit.addressbook.api; import com.avijit.addressbook.common.Constants; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class RetrofitClient { private static RetrofitClient retrofitClient; private Retrofit retrofit; private RetrofitClient() { final OkHttpClient okHttpClient = new OkHttpClient.Builder() .readTimeout(Constants.READ_TIME_OUT, TimeUnit.SECONDS) .connectTimeout(Constants.CONNECT_TIME_OUT, TimeUnit.SECONDS) .build(); retrofit = new Retrofit.Builder() .baseUrl(Constants.BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .client(okHttpClient) .build(); } public static synchronized RetrofitClient getInstance() { if (retrofitClient == null) retrofitClient = new RetrofitClient(); return retrofitClient; } public ContactApi getApi() { return retrofit.create(ContactApi.class); } }
07c70b60-03ac-4054-9d52-551c75bc8bf2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-10-24 07:52:46", "repo_name": "ieatbyte/YangtzeNews", "sub_path": "/YangtzeNews/app/src/main/java/com/yangtze/ieatbyte/yangtzenews/HomeFragmentViewCache.java", "file_name": "HomeFragmentViewCache.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "5116fc9db9920d11968d0efce82dbe2b43dfb55a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ieatbyte/YangtzeNews
222
FILENAME: HomeFragmentViewCache.java
0.290176
package com.yangtze.ieatbyte.yangtzenews; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import java.util.HashMap; /** * Invalid. Just as singleton model. */ public class HomeFragmentViewCache { HashMap<String, ViewGroup> mCache; private static class HomeFragmentViewCacheLoader { private static HomeFragmentViewCache INSTANCE = new HomeFragmentViewCache(); } private HomeFragmentViewCache() { if (HomeFragmentViewCacheLoader.INSTANCE != null) { throw new IllegalStateException("Already instantiated"); } mCache = new HashMap<String, ViewGroup>(); } public static HomeFragmentViewCache getInstance() { return HomeFragmentViewCacheLoader.INSTANCE; } public void put(String key, ViewGroup viewGroup) { mCache.put(key, viewGroup); } public ViewGroup get(String key) { return mCache.get(key); } public void remove(String key) { mCache.remove(key); } public void clear() { mCache.clear(); } }
b713be25-6c3b-4b43-8deb-c577ca0f992f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-26 03:07:30", "repo_name": "felaco/spring-surbtc-plots", "sub_path": "/src/main/java/org/facosta/springsurbtcplots/HighChart_Integration/rangeSelector/Button.java", "file_name": "Button.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 66, "lang": "en", "doc_type": "code", "blob_id": "50dd1ec10439c7d30e90ec5551e6803c8d886aba", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/felaco/spring-surbtc-plots
254
FILENAME: Button.java
0.285372
package org.facosta.springsurbtcplots.HighChart_Integration.rangeSelector; public class Button { private String type; private int count; private String text; public Button(Type type, int count, String text) { this.type = type.getTypeStr(); this.count = count; this.text = text; } public Button(Type type, int count) { this(type, count, type.toString()); } public Button(Type type) { this(type, 1, type.toString()); } public String getType() { return type; } public void setType(Type type) { this.type = type.getTypeStr(); } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public String getText() { return text; } public void setText(String text) { this.text = text; } @Override public String toString() { return "Button{" + "type=" + type + ", count=" + count + ", text='" + text + '\'' + '}'; } }
b9a7db4c-71d2-48c1-b602-ebfaec21d0c2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-21 01:15:24", "repo_name": "filipeamorais/alura_selenium", "sub_path": "/src/alura_selenium/TesteAutomatizado.java", "file_name": "TesteAutomatizado.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "673d38e472ebcd3564c7e7981e8b07a056a4d126", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "ISO-8859-1"}
https://github.com/filipeamorais/alura_selenium
295
FILENAME: TesteAutomatizado.java
0.259826
package alura_selenium; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; public class TesteAutomatizado { public static void main (String[] args) { FirefoxDriver driver; // por ser uma nova versão preciso setar o webdriver // System.setProperty("webdriver.firefox.marionette", "C:\\Users\\12129\\OneDrive - Underwriters Laboratories\\11.Test Automation\\Selinium\\geckodriver-v0.19.1-win64\\geckodriver.exe"); System.setProperty("webdriver.gecko.driver", "C:\\Users\\afilipem\\Documents\\Instaladores\\Selenium\\geckodriver-v0.19.1-win64\\geckodriver.exe"); driver = new FirefoxDriver(); // acessa o site do google driver.get("http://www.google.com.br/"); // digita no campo com nome "q" do google WebElement campoDeTexto = driver.findElement(By.name("q")); campoDeTexto.sendKeys("Caelum"); // submete o form campoDeTexto.submit(); /* public static void main(String[] args) { TesteAutomatizado myObj = new TesteAutomatizado(); myObj.invokeBrowser(); }*/ } }
1a88f906-040f-4278-809c-fe6e7b0a6a73
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-09 05:57:39", "repo_name": "bartektenDev/FireLink", "sub_path": "/androidApplication/FireLink/app/src/main/java/theandroidguy/bart/firelink/fragment/RecievedFragment.java", "file_name": "RecievedFragment.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "32be7a791ce733631b719640fafc4575e249a52d", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bartektenDev/FireLink
221
FILENAME: RecievedFragment.java
0.218669
package theandroidguy.bart.firelink.fragment; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import theandroidguy.bart.firelink.R; public class RecievedFragment extends Fragment { private static final String TAG = RecievedFragment.class.getSimpleName(); //saved devices json private final static String DEVICES = "devices.txt"; public RecievedFragment() { // Required empty public constructor } public static RecievedFragment newInstance(String param1, String param2) { RecievedFragment fragment = new RecievedFragment(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_recieved, container, false); return view; } }
9096ae9d-5318-432d-8b98-c3ef7b814f06
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-03 18:45:26", "repo_name": "Extrauren/ProyectoAvanzada", "sub_path": "/src/main/java/Vista/VentanaGenerica.java", "file_name": "VentanaGenerica.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "12a225b5239bb872a174806752560258a1bbbe6a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Extrauren/ProyectoAvanzada
216
FILENAME: VentanaGenerica.java
0.279042
package Vista; import javax.swing.*; import java.awt.*; public class VentanaGenerica { public static void ventanaMostrar(String titulo,String texto){ JDialog vent = new JDialog(); vent.setTitle(titulo); Container contMostrar= vent.getContentPane(); contMostrar.setLayout(new BoxLayout(contMostrar, BoxLayout.Y_AXIS)); JLabel textoM = new JLabel(texto); vent.getContentPane().add(textoM); vent.setPreferredSize(new Dimension(400,300)); vent.pack(); vent.setVisible(true); } public static void ventanaMostrarLista(String titulo, String[] datos){ JDialog vent = new JDialog(); vent.setTitle(titulo); Container cont = vent.getContentPane(); cont.setLayout(new BoxLayout(cont, BoxLayout.Y_AXIS)); JList lista = new JList(datos); vent.getContentPane().add(lista); vent.setPreferredSize(new Dimension(400,300)); vent.pack(); //vent.setLayout(new FlowLayout()); vent.setVisible(true); } }
f900c679-1833-495d-8529-b5f2acddcca3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-11 09:58:46", "repo_name": "slienau/bachelor-thesis", "sub_path": "/fog-orchestrator/src/main/java/de/tuberlin/aot/thesis/slienau/orchestrator/NodeRedFlowDatabase.java", "file_name": "NodeRedFlowDatabase.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "9bc0bfebffe794c3b3b9d3624acd79630fdd89b7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/slienau/bachelor-thesis
216
FILENAME: NodeRedFlowDatabase.java
0.267408
package de.tuberlin.aot.thesis.slienau.orchestrator; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import de.tuberlin.aot.thesis.slienau.orchestrator.models.NodeRedFlow; import java.io.IOException; public class NodeRedFlowDatabase { private static final NodeRedController flowDatabaseInstance = new NodeRedController("flowDatabaseInstance", "localhost", 2880); private static NodeRedFlowDatabase instance; private NodeRedFlowDatabase() { } public static synchronized NodeRedFlowDatabase getInstance() { if (NodeRedFlowDatabase.instance == null) NodeRedFlowDatabase.instance = new NodeRedFlowDatabase(); return NodeRedFlowDatabase.instance; } public NodeRedFlow getFlowByName(String flowName) throws IOException { JsonNode flow = flowDatabaseInstance.getFlowByName(flowName); ((ObjectNode) flow).put("disabled", false); return new NodeRedFlow(flowName, flow); } }
c9238f18-4c6b-482b-a816-ef0247dcf615
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-04-21 02:48:20", "repo_name": "beeflamian/Ycompiler", "sub_path": "/src/SymbolTable.java", "file_name": "SymbolTable.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "98672887863963863c313cc2b7f70f144c7a96be", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/beeflamian/Ycompiler
258
FILENAME: SymbolTable.java
0.23231
import java.util.HashMap; import java.util.Map; public class SymbolTable { private String curScope; private String curVarType; private String symbolId; HashMap<String, SymbolObject> symbol = new HashMap<String, SymbolObject>(); public SymbolTable() { } public SymbolTable(String newScope) { this.curScope = newScope; } public boolean isLegal(SymbolObject newSymbol) { symbolId = newSymbol.getId(); if(symbol.containsKey(symbolId)) return false; else return true; } public HashMap<String, SymbolObject> getSymbols() { return symbol; } public SymbolObject getSymbol(String symbolName) { return symbol.get(symbolName); } public void addToTab(SymbolObject newSymbol) { symbol.put(newSymbol.getId(), newSymbol); } public void setScopeId(String id) { curScope = id; } public String getScopeId() { return curScope; } public void setVarType(String type) { curVarType = type; } public String getVarType() { return curVarType; } public void printErr() { System.out.println("DECLARATION ERROR " + symbolId); } }
30513383-d986-4b91-9dad-b8550f08f81a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-11-19T00:34:07", "repo_name": "eduardovilaca96/formacao", "sub_path": "/demo/src/main/java/pt/mac/demo/entities/CustomUserDetails.java", "file_name": "CustomUserDetails.java", "file_ext": "java", "file_size_in_byte": 1217, "line_count": 63, "lang": "en", "doc_type": "code", "blob_id": "f5f58f8d264fb450938b21ca297df3baa5d1ab37", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/eduardovilaca96/formacao
268
FILENAME: CustomUserDetails.java
0.256832
package pt.mac.demo.entities; import java.util.Collection; import java.util.Collections; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; /** * * @author mario * @since 23/10/2021 */ public class CustomUserDetails implements UserDetails { private static final long serialVersionUID = -2495228964187111887L; private User entity; public CustomUserDetails(User user) { this.entity = user; } @Override public String getUsername() { return this.entity.getUsername(); } @Override public String getPassword() { return this.entity.getPassword(); } @Override public Collection<? extends GrantedAuthority> getAuthorities() { return Collections.<GrantedAuthority>singletonList(new SimpleGrantedAuthority("User")); } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } public User getEntity() { return this.entity; } }
e4c3a538-7bec-4bcb-bd73-136da9b4372b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-17 01:07:02", "repo_name": "jacksparrow414/netty-demo", "sub_path": "/src/main/java/org/example/server/handler/FirstServerHandler.java", "file_name": "FirstServerHandler.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "b4624d0a1adcb41d8d60bfb5c73f8105e890fec1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jacksparrow414/netty-demo
215
FILENAME: FirstServerHandler.java
0.267408
package org.example.server.handler; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Date; public class FirstServerHandler extends ChannelInboundHandlerAdapter { /** * 在连接中读取数据. * @param ctx * @param msg */ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { ByteBuf byteBuf = (ByteBuf) msg; System.out.println(new Date() + ": 服务器读取到数据:" + byteBuf.toString(Charset.defaultCharset())); ctx.channel().writeAndFlush(getByteBuf(ctx)); } private ByteBuf getByteBuf(ChannelHandlerContext ctx) { ByteBuf byteBuf = ctx.alloc().buffer(); byte[] bytes = "hello, this is server firstHandler message".getBytes(StandardCharsets.UTF_8); byteBuf.writeBytes(bytes); return byteBuf; } }
560ce211-d044-4250-8fc9-a03ffe6c2073
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-03-25 22:16:06", "repo_name": "indivisible-irl/TwistedMinecraftAdmin", "sub_path": "/src/com/indivisible/twistedserveradmin/commands/RestartCmd.java", "file_name": "RestartCmd.java", "file_ext": "java", "file_size_in_byte": 1017, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "d1f2f37d68b2f47e17d8c76432aa80eefcd598bb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/indivisible-irl/TwistedMinecraftAdmin
220
FILENAME: RestartCmd.java
0.226784
package com.indivisible.twistedserveradmin.commands; import java.util.List; public class RestartCmd implements ICmd { //// Help Strings private static final String NAME = "restart"; private static final String HELP_SHORT = "Restarts a running Sever. (Starts if offline)"; private static final String HELP_LONG = "Usage :: admin restart <nick>\n" + " Restarts a running server (or starts if offline).\n" + " Type 'admin online' to see a list of running servers"; //// constructor public RestartCmd() {} //// Command methods public String getName() { return NAME; } public boolean matchName(String test) { return NAME.equals(test); } public String getShortHelp() { return HELP_SHORT; } public String getLongHelp(List<String> args) { return HELP_LONG; } //// invoke public boolean invoke(List<String> args) { return false; } }
18c08181-dc3c-4019-b0dc-b3c939c31e8c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-05 13:48:52", "repo_name": "Wood-Water-Peng/SwangyiMusic", "sub_path": "/app/src/main/java/com/example/jackypeng/swangyimusic/rx/converter/ExGsonResponseBodyConverter.java", "file_name": "ExGsonResponseBodyConverter.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "5c0a1e4e9bb5cfb948ce18d9723b9fcaf631e56e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Wood-Water-Peng/SwangyiMusic
208
FILENAME: ExGsonResponseBodyConverter.java
0.224055
package com.example.jackypeng.swangyimusic.rx.converter; import com.google.gson.Gson; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.lang.reflect.Type; import okhttp3.ResponseBody; import retrofit2.Converter; public class ExGsonResponseBodyConverter<T> implements Converter<ResponseBody, T> { private final Gson gson; private final Type type; public ExGsonResponseBodyConverter(Gson gson, Type type) { this.gson = gson; this.type = type; } /** * 进行解析预处理操作 * * @param responseBody * @return * @throws IOException */ @Override public T convert(ResponseBody responseBody) throws IOException { String value = responseBody.string(); try { new JSONObject(value); return gson.fromJson(value, type); } catch (JSONException e) { e.printStackTrace(); throw new com.alibaba.fastjson.JSONException(value); } } }
dd178747-b55c-41de-986b-ea805feb13bb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-05 02:31:16", "repo_name": "MinhQuan77/realestate", "sub_path": "/src/main/java/com/project/realestate/entity/District.java", "file_name": "District.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "dd56daf905538eecf9e1a5779a4cd418cf6cd6c9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MinhQuan77/realestate
275
FILENAME: District.java
0.282988
package com.project.realestate.entity; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class District { private int id; private String districtName; @Id @Column(name = "id") public int getId() { return id; } public void setId(int id) { this.id = id; } @Basic @Column(name = "district_name") public String getDistrictName() { return districtName; } public void setDistrictName(String districtName) { this.districtName = districtName; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; District district = (District) o; if (id != district.id) return false; if (districtName != null ? !districtName.equals(district.districtName) : district.districtName != null) return false; return true; } @Override public int hashCode() { int result = id; result = 31 * result + (districtName != null ? districtName.hashCode() : 0); return result; } }
dac707ee-8e18-4790-a470-b75fd4cbb7f3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-15 12:15:34", "repo_name": "sxrCode/adselflx1", "sub_path": "/mainmodule/src/main/java/com/sxr/com/mainmodule/view/DetailTitleView.java", "file_name": "DetailTitleView.java", "file_ext": "java", "file_size_in_byte": 1104, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "346154c0a0879ef1cd0b2f2bab1703980fc976b0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sxrCode/adselflx1
232
FILENAME: DetailTitleView.java
0.239349
package com.sxr.com.mainmodule.view; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.RelativeLayout; import android.widget.TextView; import com.sxr.com.mainmodule.R; /** * Created by DELL on 2017/11/26. */ public class DetailTitleView extends RelativeLayout { private TextView mTitleView; private TextView mStateView; public DetailTitleView(Context context, AttributeSet attrs) { super(context, attrs); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.view_detail_title, this); mTitleView = (TextView) getChildAt(0); mStateView = (TextView) getChildAt(1); } public TextView getTitleView() { return mTitleView; } public void setTitleView(TextView titleView) { mTitleView = titleView; } public TextView getStateView() { return mStateView; } public void setStateView(TextView stateView) { mStateView = stateView; } }
36e31a43-ea5a-4cc6-a3e3-34aed532c374
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-07-22T16:39:46", "repo_name": "gini/gini-demo-ios", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1060, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "8ee9579d84c1d43ca181585a0cc78eae6e6b9700", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gini/gini-demo-ios
235
FILENAME: README.md
0.226784
GiniVision SDK for iOS Example App ====================================== This is an example app for the GiniVision SDK for iOS. See http://developer.gini.net/ginivision-ios/html/index.html for further documentation. Before You Can Run The App -------------------------- In order to use the Gini SDK you have to edit the ``GiniDempoAppDelegate.m`` file and replace the values of ``your_gini_client_id`` and ``your_gini_client_secret`` in ``application:didFinishLaunchingWithOptions:`` with valid credentials. Please send an email to technical-support@gini.net if you haven't received credentials yet. For the Gini Vision Library you have to enter valid credentials into the ``pod-install-example.sh`` file. Afterwards rename it to ``pod-install.sh``. Build & Install the App ----------------------- Go into the project directory and enter: ``` $ sh pod-install.sh ``` This will install all dependencies. If you haven't used CocoaPods before follow the guide on [cocoapods.org](https://cocoapods.org/). After installing you can run the Gini Demo app.
996ecfb8-50ce-48e0-b10e-1b0a1fb230b5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-14 02:41:54", "repo_name": "CTSN/TestRetrofit", "sub_path": "/app/src/main/java/stu/com/testretrofit/network/NetWorkClient.java", "file_name": "NetWorkClient.java", "file_ext": "java", "file_size_in_byte": 1047, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "1d08b6bdc796fa2b073176693581866f3ae81e5f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/CTSN/TestRetrofit
207
FILENAME: NetWorkClient.java
0.273574
package stu.com.testretrofit.network; import retrofit2.Retrofit; import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory; import retrofit2.converter.gson.GsonConverterFactory; import stu.com.testretrofit.commons.Constans; /** * Created by xmg on 2016/12/12. */ public class NetWorkClient { private static NetWorkApi netWorkApi; public NetWorkClient(){ } public void init(){ if (netWorkApi == null) { Retrofit retrofit = new Retrofit.Builder() //添加基地址 .baseUrl(Constans.BASE_URL) //添加RxJava回调方式 .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) //添加一个Gson转换工厂 .addConverterFactory(GsonConverterFactory.create()) .build(); netWorkApi = retrofit.create(NetWorkApi.class); } } public static NetWorkApi getSnackApi() { return netWorkApi; } }
460fffe9-6190-4a9f-80e5-2d2310a1fb0a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-01 10:08:55", "repo_name": "fantagero/the-mars-roller-challenge", "sub_path": "/src/main/java/com/grubtech/model/Grid.java", "file_name": "Grid.java", "file_ext": "java", "file_size_in_byte": 1132, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "0a5d86f2a349722fc306faf04405a35cdadd5c8a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fantagero/the-mars-roller-challenge
247
FILENAME: Grid.java
0.286169
package com.grubtech.model; public class Grid { private DirectionType[][] plateau; private final int upperRightX; private final int upperRightY; private Point activePoint; private DirectionType activeDirection; public Grid(int upperRightX, int upperRightY) { this.upperRightX = upperRightX; this.upperRightY = upperRightY; plateau = new DirectionType[upperRightX+1][upperRightY+1]; } public Point getActivePoint() { return activePoint; } public void setActivePoint(Point activePoint) { this.activePoint = activePoint; } public void setPlateau(DirectionType[][] plateau) { this.plateau = plateau; } public DirectionType[][] getPlateau() { return plateau; } public DirectionType getActiveDirection() { return activeDirection; } public void setActiveDirection(DirectionType activeDirection) { this.activeDirection = activeDirection; } public int getUpperRightX() { return upperRightX; } public int getUpperRightY() { return upperRightY; } }
e84965d1-c464-4e1c-9934-465afea6674e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-04 02:25:25", "repo_name": "ArtemiyYarovenko/GIF_search", "sub_path": "/app/src/main/java/com/example/gif_app/DataBase/Converters.java", "file_name": "Converters.java", "file_ext": "java", "file_size_in_byte": 1037, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "b7d4668518644742a5010ea3da35f6187129a7ab", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ArtemiyYarovenko/GIF_search
209
FILENAME: Converters.java
0.264358
package com.example.gif_app.DataBase; import androidx.room.TypeConverter; import com.Object.Analytics; import com.Object.Images; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; class Converters { @TypeConverter public static String StringfromImages(Images images) { Gson gson = new Gson(); String json = gson.toJson(images); return json; } @TypeConverter public static Images ImagesfromString(String string){ Type Images = new TypeToken<Images>(){}.getType(); return new Gson().fromJson(string, Images); } @TypeConverter public static String StringfromAnalyctics(Analytics analytics) { Gson gson = new Gson(); String json = gson.toJson(analytics); return json; } @TypeConverter public static Analytics AnalyticsfromString(String string){ Type Analytics = new TypeToken<Analytics>(){}.getType(); return new Gson().fromJson(string, Analytics); } }
e5c82e82-2264-4767-90b6-5cdedc0028ab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-24 02:01:51", "repo_name": "htchepannou/uds-service", "sub_path": "/src/main/java/com/tchepannou/uds/dto/PermissionResponse.java", "file_name": "PermissionResponse.java", "file_ext": "java", "file_size_in_byte": 997, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "20492ad978205368aac0c5b82ef21d82b2c22854", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/htchepannou/uds-service
184
FILENAME: PermissionResponse.java
0.258326
package com.tchepannou.uds.dto; import com.google.common.base.Preconditions; import com.tchepannou.uds.domain.Permission; public class PermissionResponse { //-- Attributes private final long id; private final String name; //-- Constructor private PermissionResponse(Builder builder){ Permission permission = builder.permission; this.id = permission.getId(); this.name = permission.getName(); } //-- Getter/Setter public long getId() { return id; } public String getName() { return name; } public static class Builder { private Permission permission; public PermissionResponse build () { Preconditions.checkState(permission != null, "permission is not set"); return new PermissionResponse(this); } public Builder withPermission (final Permission permission) { this.permission = permission; return this; } } }
acf346d7-c222-4ebe-9e10-ba3a1e6f86f1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-28 08:49:07", "repo_name": "BondarBohdan/MoviesChecklist", "sub_path": "/src/main/java/filter/UserFilter.java", "file_name": "UserFilter.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "7f67af438558ce32e6334fcc487ea2221a20b329", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BondarBohdan/MoviesChecklist
217
FILENAME: UserFilter.java
0.26971
package filter; import constant.ServletURL; import javax.servlet.*; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; @WebFilter(urlPatterns = {"/settings.jsp", "/myMovies.jsp", "/addToMyMovies.jsp", "/settings", "/myMovies", "/addToMyMovies", "/setWatched"}) public class UserFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; HttpSession session = request.getSession(); if (session.getAttribute("userCredentials") != null) { filterChain.doFilter(request, response); } else { response.sendRedirect(ServletURL.LOG_IN.getUrl()); } } @Override public void destroy() { } }
9895bf79-042d-4551-93e6-8eb55c17086e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-25 04:17:40", "repo_name": "LakshminarayananG/FullStackDev", "sub_path": "/spring-demo/src/main/java/com/practice/aopAnnotations/Demo.java", "file_name": "Demo.java", "file_ext": "java", "file_size_in_byte": 1019, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "86fb78f13581e322ff8f5dfab9cc8dca76c8fe8a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LakshminarayananG/FullStackDev
203
FILENAME: Demo.java
0.249447
package com.practice.aopAnnotations; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; @Configuration @ComponentScan("com.practice.aopAnnotations") @EnableAspectJAutoProxy(proxyTargetClass = true) public class Demo { public static void main(String[] args) { try { AnnotationConfigApplicationContext appContext = new AnnotationConfigApplicationContext(Demo.class); OpenDoor openDoor = (OpenDoor) appContext.getBean("openDoorImpl"); System.out.println(openDoor.getClass().getName()); openDoor.openDoorWithKey(100); CloseDoor closeDoor = (CloseDoor) appContext.getBean("closeDoorImpl"); closeDoor.closeDoorWithName("Lakshmi"); System.out.println(closeDoor.getClass().getSimpleName()); appContext.close(); } catch (Exception e) { e.printStackTrace(); } } }
df98865c-fd30-4fc4-9d6e-37f86980da01
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-04 16:57:24", "repo_name": "IrmantasCivilis/BakingApp", "sub_path": "/app/src/main/java/com/example/android/bakingapp/fragments/InstructionFragment.java", "file_name": "InstructionFragment.java", "file_ext": "java", "file_size_in_byte": 1052, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "b78fbf7ef2d9a8c08ef88698bda39127c48a7d32", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/IrmantasCivilis/BakingApp
173
FILENAME: InstructionFragment.java
0.225417
package com.example.android.bakingapp.fragments; import android.os.Bundle; import android.support.annotation.NonNull; 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.TextView; import com.example.android.bakingapp.R; public class InstructionFragment extends Fragment { public InstructionFragment() { } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_instruction, container, false); Bundle instruction = getArguments(); if (instruction != null) { String instructionString = instruction.getString("Instruction"); TextView textView = rootView.findViewById(R.id.instruction_text_view); textView.setText(instructionString); } return rootView; } }
61ad97a5-b5ef-4ca8-91a2-445204be2fbe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-27 07:10:44", "repo_name": "gonghojin/DiversityOpensourceLearn", "sub_path": "/SpringBootJPA/src/test/java/com/gongdel/springbootjpa/repository/note/NoteTest.java", "file_name": "NoteTest.java", "file_ext": "java", "file_size_in_byte": 1116, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "43768508ee9613b92238653102b13842c57a184a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gonghojin/DiversityOpensourceLearn
211
FILENAME: NoteTest.java
0.2227
package com.gongdel.springbootjpa.repository.note; import com.gongdel.springbootjpa.domain.note.Note; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; @RunWith(SpringRunner.class) @SpringBootTest public class NoteTest { @Autowired private NoteRepository noteRepository; @After public void cleanup() { noteRepository.deleteAll(); } @Test public void note_등록() { // given Note note = new Note(); note.setTitle("테스트 타이틀"); note.setContent("테스트 내용"); // when noteRepository.save(note); // then Note testEntity = noteRepository.findAll().get(0); assertThat(testEntity.getTitle()).isEqualTo(note.getTitle()); assertThat(testEntity.getContent()).isEqualTo(note.getContent()); } }
43219f55-9882-4c2e-8b83-dd35f8df0ecd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-03 08:58:36", "repo_name": "Nimesh175/Royal-institute-hibernate", "sub_path": "/src/lk/ijse/royal/main/AppInitlizer.java", "file_name": "AppInitlizer.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "19f3d636cfb2226c232956143e17a0472572c6e4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Nimesh175/Royal-institute-hibernate
189
FILENAME: AppInitlizer.java
0.243642
package lk.ijse.royal.main; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.stage.StageStyle; import java.io.IOException; public class AppInitlizer extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) throws IOException { Parent root = FXMLLoader.load(this.getClass().getResource( "../view/StudentForm.fxml")); Scene scene=new Scene(root, Color.TRANSPARENT); primaryStage.setScene(scene); primaryStage.setResizable(false); primaryStage.initStyle(StageStyle.DECORATED); //title Icon Change primaryStage.getIcons().add( new Image(getClass().getResourceAsStream("../resource/icon1.png"))); primaryStage.centerOnScreen(); primaryStage.show(); } }
15713f07-7879-4d03-871c-054bdf87e824
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-03-19 10:01:58", "repo_name": "3awsomies/derbydump", "sub_path": "/src/main/java/com/db/exporter/beans/Database.java", "file_name": "Database.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 70, "lang": "en", "doc_type": "code", "blob_id": "55fd30ae28e5813cd22b6a24854c3adaa33fb573", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/3awsomies/derbydump
283
FILENAME: Database.java
0.273574
package com.db.exporter.beans; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Represents a database. * */ public class Database { private String databaseName; private List<Table> tables = new ArrayList<Table>(); private Map<String, List<String>> dataMap; /** * @return the tables */ public List<Table> getTables() { return tables; } public void addTable(Table table) { if (table != null) { tables.add(table); } } /** * @param tables the tables to set */ public void setTables(List<Table> tables) { this.tables = tables; } /** * @return the databaseName */ public String getDatabaseName() { return databaseName; } /** * @param databaseName the databaseName to set */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } /** * @return the dataMap */ public Map<String, List<String>> getDataMap() { return dataMap; } /** * @param dataMap the dataMap to set */ public void setDataMap(Map<String, List<String>> dataMap) { this.dataMap = dataMap; } }
5cf41c16-d8fd-4681-8da6-3971a928a44c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-06 00:00:20", "repo_name": "brandonmanson/SwaggerGenerator", "sub_path": "/src/main/java/com/brandonmanson/services/AnalyticsReportingService.java", "file_name": "AnalyticsReportingService.java", "file_ext": "java", "file_size_in_byte": 1027, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "eec594bc315d72b90f5701289dcf7303a4b1df23", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brandonmanson/SwaggerGenerator
227
FILENAME: AnalyticsReportingService.java
0.23231
package com.brandonmanson.services; import com.brandonmanson.models.SlackRequest; import io.keen.client.java.KeenClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.Map; /** * Created by brandonmanson on 3/29/17. */ @Service public class AnalyticsReportingService { @Value("${keen.project.id}") private String projectId; @Value("${keen.write.key}") private String writeKey; @Value("${swaggy.dev.channel.id}") private String swaggyDevChannelId; @Value("${analytics.stream.id}") private String streamId; public void track(SlackRequest request) { if (!request.getChannelId().equals(swaggyDevChannelId)) { Map<String, Object> event = new HashMap<String, Object>(); event.put("channel", request.getChannelId()); event.put("team", request.getTeamId()); KeenClient.client().addEvent(streamId, event); } } }
c940b1ab-db4a-41de-a97b-e164a63be915
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-02 19:59:50", "repo_name": "Kalkazar/social-media-assessment", "sub_path": "/src/main/java/com/cooksys/ftd/socialmedia/controller/ValidateController.java", "file_name": "ValidateController.java", "file_ext": "java", "file_size_in_byte": 1022, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "b0baa68b75456802611ce162f8226df988431a47", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Kalkazar/social-media-assessment
186
FILENAME: ValidateController.java
0.239349
package com.cooksys.ftd.socialmedia.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import com.cooksys.ftd.socialmedia.service.ValidateService; @RestController public class ValidateController { private ValidateService validateService; @Autowired public ValidateController(ValidateService validateService) { super(); this.validateService = validateService; } //@GetMapping("validate/tag/exists/{label}") @GetMapping("validate/username/available/@{username}") public boolean usernameAvailable(@PathVariable("username") String username) { return !this.validateService.usernameExists(username); } @GetMapping("validate/username/exists/@{username}") public boolean usernameExists(@PathVariable("username") String username) { return this.validateService.usernameExists(username); } }
9d437fbc-6619-4380-9034-88ac067b5f64
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-23 20:36:03", "repo_name": "diegodh1/pokeApi", "sub_path": "/src/main/java/com/example/poke/pokeApi/models/ExternalApi/PokemonApiOther.java", "file_name": "PokemonApiOther.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "7a96b5350d2cb8824cb84497d681850347960971", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/diegodh1/pokeApi
240
FILENAME: PokemonApiOther.java
0.250913
package com.example.poke.pokeApi.models.ExternalApi; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class PokemonApiOther { //variables @JsonAlias("dream_world") private PokemonApiPhoto dreamWorld; @JsonProperty("official-artwork") private PokemonApiPhoto officialArtwork; //empty constructor public PokemonApiOther(){ } //constructor public PokemonApiOther(PokemonApiPhoto dreamWorld, PokemonApiPhoto officialArtwork){ this.dreamWorld = dreamWorld; this.officialArtwork = officialArtwork; } //setters public void setDreamWorld(PokemonApiPhoto value){ this.dreamWorld = value; } public void setOfficialArtWork(PokemonApiPhoto value){ this.officialArtwork = value; } //getters public PokemonApiPhoto getDreamWorld(){ return this.dreamWorld; } public PokemonApiPhoto getOfficialArtWork(){ return this.officialArtwork; } }
619fffe9-dee1-4c41-982a-291a46dc477a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-16 21:57:02", "repo_name": "jasch87/xbox-live-samples", "sub_path": "/MobileSDK/Samples-Native/Sample-Android/app/src/main/java/xbl/sample/android/layers/SocialGroupViewLayer.java", "file_name": "SocialGroupViewLayer.java", "file_ext": "java", "file_size_in_byte": 1217, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "207928589d5765a8ffe65d94d231029f88d74d84", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jasch87/xbox-live-samples
217
FILENAME: SocialGroupViewLayer.java
0.291787
package xbl.sample.android.layers; import android.graphics.Color; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import xbl.sample.android.MainActivity; import xbl.sample.android.R; import xbl.sample.android.views.MenuView; public class SocialGroupViewLayer { private static final String TAG = "Social Group View Layer"; public native void InitializeNativeVars(); private MainActivity m_activity; public SocialGroupViewLayer(MainActivity activity) { m_activity = activity; InitializeNativeVars(); } public void Update(double dt) { } public void show(LinearLayout layout) { // Bind Menu Button { Button buttonMenuBack = m_activity.findViewById(R.id.button_MenuBack); buttonMenuBack.setText(R.string.button_socialGroupsMenu); buttonMenuBack.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { m_activity.menuView.changeLayer(MenuView.MVL_SOCIAL_GROUPS); } }); buttonMenuBack.setVisibility(View.VISIBLE); } } }
d463b3e9-68f2-469d-a1bc-4eec04dfa255
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-05-16T21:50:43", "repo_name": "FrancescoPalma/React_ATM_Machine", "sub_path": "/node_modules/nwb/docs/ProjectTypes.md", "file_name": "ProjectTypes.md", "file_ext": "md", "file_size_in_byte": 1103, "line_count": 24, "lang": "en", "doc_type": "text", "blob_id": "92d30100a235edc45d077449f0b43de01cf12a1a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/FrancescoPalma/React_ATM_Machine
249
FILENAME: ProjectTypes.md
0.214691
## Project Types nwb supports creation and development of the following project types: **React apps** - React web applications. **React component modules** - reusable React components which will be published to npm. The React component template includes a React demo app in `demo/src/`. **Web apps** - web applications which don't use React. **Web modules** - "web module" is just a shorter way of saying "a module which will be published to npm and is expected to be able to run in a browser as a dependency of a webapp"... except we just had to say that anyway, All project templates are pre-configured to: * have Git ignore built resources * run their tests on [Travis CI](https://travis-ci.org/), with code coverage results posted to [codecov.io](https://codecov.io/) and [coveralls](https://coveralls.io) * publish to npm appropriately: * apps have `private: true` set by default so they can't be published to npm by accident * components and web modules will only publish source and ES5/UMD builds to npm Each template also comes with a working, minimal unit test to get you started.
7e9d6808-42ad-430c-a95f-600f3e82c7f8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-19 07:04:20", "repo_name": "gaoyussdut/EIOS", "sub_path": "/talend/talend-mdm/src/main/java/top/toptimus/service/DataModelRuntimeService.java", "file_name": "DataModelRuntimeService.java", "file_ext": "java", "file_size_in_byte": 1309, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "6ea8ee27dfc6562d4ed9fc19d3cdf9410d7cd76b", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/gaoyussdut/EIOS
320
FILENAME: DataModelRuntimeService.java
0.283781
package top.toptimus.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import top.toptimus.entity.DataModelEntity; import top.toptimus.meta.TalendMetaInfo; import java.io.IOException; import java.util.List; @Service public class DataModelRuntimeService { @Autowired private DataModelEntity dataModelEntity; /** * 运行时调用,用来获取关联键,用来做关联查询,之前的SELECT类型逻辑 * * @param x_pk_x_talend_id talend model id * @param tokenMetaId token meta id * @param key 字段 * @return TalendMetaInfo */ public TalendMetaInfo getTalendMetaInfo(String x_pk_x_talend_id, String tokenMetaId, String key) throws IOException { return dataModelEntity.getTalendMetaInfo(x_pk_x_talend_id, tokenMetaId, key); } /** * 取schema中所有关联定义 * * @param x_pk_x_talend_id talend model id * @param referenceEntityTypeName 联表名 * @return 关联定义 */ public List<TalendMetaInfo> getTalendReference(String x_pk_x_talend_id, String referenceEntityTypeName) throws IOException { return dataModelEntity.getTalendReference(x_pk_x_talend_id, referenceEntityTypeName); } }
f3a9f026-cc28-4598-ab7f-ded749af57e3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-04 21:07:53", "repo_name": "segfaultx/swtp", "sub_path": "/src/main/java/de/hsrm/mi/swtp/exchangeplatform/messaging/message/ExchangeplatformStatusMessage.java", "file_name": "ExchangeplatformStatusMessage.java", "file_ext": "java", "file_size_in_byte": 1135, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "16de99682b473245026922dee23b1361b4dfad5d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/segfaultx/swtp
219
FILENAME: ExchangeplatformStatusMessage.java
0.23793
package de.hsrm.mi.swtp.exchangeplatform.messaging.message; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import de.hsrm.mi.swtp.exchangeplatform.messaging.message.enums.MessageType; import de.hsrm.mi.swtp.exchangeplatform.model.serializer.ExchangeplatformMessageSerializer; import lombok.AccessLevel; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.FieldDefaults; @Data @EqualsAndHashCode(callSuper = true) @FieldDefaults(level = AccessLevel.PRIVATE) @JsonSerialize(using = ExchangeplatformMessageSerializer.class) public class ExchangeplatformStatusMessage extends Message { @JsonProperty("type") MessageType messageType = MessageType.EXCHANGEPLATFORM_STATUS; @JsonProperty("tradesActive") Boolean isActive = false; @JsonProperty("message") String message = "Tauschbörse ist jetzt %s."; @Builder public ExchangeplatformStatusMessage(Boolean isActive) { this.isActive = isActive; } public String getMessage() { return String.format(message, isActive ? "aktiv": "inaktiv"); } }
19658afc-981b-4b1b-a550-0c0af3f75ce3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-23 02:32:59", "repo_name": "fitzero/pocket", "sub_path": "/src/main/java/org/hunter/pocket/uuid/UuidGeneratorFactory.java", "file_name": "UuidGeneratorFactory.java", "file_ext": "java", "file_size_in_byte": 1027, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "36c7dd601642cfa448d016cdfde158f24165f34d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fitzero/pocket
208
FILENAME: UuidGeneratorFactory.java
0.255344
package org.hunter.pocket.uuid; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * @author wujianchuan 2019/2/14 */ public class UuidGeneratorFactory { private static final Map<String, UuidGenerator> GENERATOR_POOL = new ConcurrentHashMap<>(6); private static final UuidGeneratorFactory OUR_INSTANCE = new UuidGeneratorFactory(); public static UuidGeneratorFactory getInstance() { return OUR_INSTANCE; } private UuidGeneratorFactory() { } public UuidGenerator getUuidGenerator(String generatorId) { return GENERATOR_POOL.get(generatorId); } public void registerGenerator(UuidGenerator uuidGenerator) { synchronized (this) { if (GENERATOR_POOL.containsKey(uuidGenerator.getGeneratorId())) { throw new RuntimeException("This logo already exists. Please use another one."); } else { GENERATOR_POOL.put(uuidGenerator.getGeneratorId(), uuidGenerator); } } } }
109a4e64-e7b2-4eca-8ab3-61b95e74914b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-21 20:43:44", "repo_name": "cclose1/Utils", "sub_path": "/src/org/cbc/sql/SQLInsertBuilder.java", "file_name": "SQLInsertBuilder.java", "file_ext": "java", "file_size_in_byte": 1102, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "1207902c960768142f562e4ce64a9a9b90cf4d76", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cclose1/Utils
218
FILENAME: SQLInsertBuilder.java
0.293404
/* * 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.cbc.sql; /** * * @author Chris */ public class SQLInsertBuilder extends SQLBuilder { public SQLInsertBuilder(String table, String protocol) { this.table = table; this.protocol = protocol; } @Override public String build() { StringBuilder sql = new StringBuilder("INSERT " + table + "(\r\n "); StringBuilder values = new StringBuilder(") VALUES (\r\n"); char sep = ' '; for (Field f : fields) { sql.append(sep); sql.append("\r\n "); sql.append(f.getName()); values.append(sep); values.append("\r\n "); values.append(f.getValue()); sep = ','; } values.append(")"); sql.append(values); addWhere(sql); return sql.toString(); } }
df333d71-b4cf-4a0a-ac11-eefa9078e21c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-16 04:09:43", "repo_name": "csuczh/GouDaForAndroid", "sub_path": "/GouDaForAndroid/dg/src/main/java/com/dg/app/bean/MapList.java", "file_name": "MapList.java", "file_ext": "java", "file_size_in_byte": 1120, "line_count": 68, "lang": "en", "doc_type": "code", "blob_id": "041ece9673198fdabff6ebd9839bc67e4ece1087", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/csuczh/GouDaForAndroid
297
FILENAME: MapList.java
0.252384
package com.dg.app.bean; import java.util.ArrayList; import java.util.List; /** *狗搭列表实体类 * * @author czh * @created 2015年9月8日 */ public class MapList extends Entity implements ListEntity<MapNodes> { public final static int CATALOG_ALL = 1;//所有的狗搭的模块 public final static int CATALOG_LIUGOU = 2;//遛狗菜单 public final static int CATALOG_XIANGQIN= 3;//相亲菜单 public final static int CATALOG_JIYANG = 4;//寄养菜单 private int catalog; private int pageSize; private int GouDaCount; private List<MapNodes> list = new ArrayList<MapNodes>(); public int getCatalog() { return catalog; } public void setCatalog(int catalog) { this.catalog = catalog; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getGouDaCount() { return GouDaCount; } public void setGouDaCount(int gouDaCount) { GouDaCount = gouDaCount; } public List<MapNodes> getList() { return list; } public void setList(List<MapNodes> list) { this.list = list; } }
385e7201-92b1-4181-a0bc-9d1f68769026
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-04-04 09:12:02", "repo_name": "KingJA/DidaDemoAS", "sub_path": "/dida_demo/src/main/java/com/dida/first/dialog/DialogSaveImg.java", "file_name": "DialogSaveImg.java", "file_ext": "java", "file_size_in_byte": 1222, "line_count": 67, "lang": "en", "doc_type": "code", "blob_id": "7c9f67d1078a2914012a46f398293ddceaea0442", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KingJA/DidaDemoAS
276
FILENAME: DialogSaveImg.java
0.285372
/** * */ package com.dida.first.dialog; import android.content.Context; import android.view.View; import android.widget.RelativeLayout; import com.dida.first.R; /** * @author KingJA * @data 2015-8-26 下午2:53:07 * @use */ public class DialogSaveImg extends DialogBaseAlert { private RelativeLayout rl_save_image; private OnSaveListener onSaveListener; /** * @param context */ public DialogSaveImg(Context context) { super(context); } @Override public void initView() { setContentView(R.layout.dialog_text); rl_save_image = (RelativeLayout) findViewById(R.id.rl_save_image); } @Override public void initNet() { } @Override public void initEvent() { rl_save_image.setOnClickListener(this); } @Override public void initData() { } @Override public void childClick(View v) { if (v.getId() == R.id.rl_save_image) { onSaveListener.OnSave(); dismiss(); } } public interface OnSaveListener { void OnSave(); } public void setOnSaveListener(OnSaveListener onSaveListener) { this.onSaveListener = onSaveListener; } }
978dd765-12df-43cb-a168-e5796e4942d5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-08-06T13:03:36", "repo_name": "s-shin/local-settings", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1077, "line_count": 42, "lang": "en", "doc_type": "text", "blob_id": "9222117285ccfa0b36784f3873b83df8d7e249fc", "star_events_count": 4, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/s-shin/local-settings
243
FILENAME: README.md
0.273574
Local Settings ============== This package allows you to extend the current config with project-local settings. ![demo](https://raw.githubusercontent.com/s-shin/local-settings/master/demo.gif) Installation ------------ ``` apm install local-settings ``` Usage ----- * Make `.atomrc.cson` file in the root of the current workspace. `.atomrc.cson` can include any settings which are available in `config.cson`. * Execute `Local Settings: Enable` from the command palette (`cmd+shift+p`). * If you edit `.atomrc.cson` after enabled, execute `Local Settings: Reload`. * If you want to restore settings, execute `Local Settings: Disable`. Configuration ------------- You can configure some settings by `config.cson`. ``` 'local-settings': 'configFileName': '.atomrc' # '.cson' is automatically appended 'autoEnable': false # if true, enable local settings on opening project ``` If you change `config.cson`, do `Window: Reload`. Notice ------ Currently the config file in the first project is used in any projects when you load multiple projects in the tree view.
a27007f9-a77b-4a09-86c7-03af3c90268c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-14 17:37:38", "repo_name": "jrod730/DFSOptimizer", "sub_path": "/app/src/main/java/com/example/jrod730/dfsoptimizer/DFS.java", "file_name": "DFS.java", "file_ext": "java", "file_size_in_byte": 1049, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "01eaeed0e59ddc2b556244b8e49874474ee71366", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jrod730/DFSOptimizer
190
FILENAME: DFS.java
0.217338
package com.example.jrod730.dfsoptimizer; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class DFS extends AppCompatActivity { private Button mcashGame; private Button mgpp; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dfs); mcashGame = (Button) findViewById(R.id.cashgame); mgpp = (Button) findViewById(R.id.gpp); mcashGame.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(DFS.this, CashGame.class)); } }); mgpp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(getBaseContext(), GPP.class)); } }); } }
93e4db2f-f3fd-4d9e-84ee-59d827ccfa3f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-23 00:12:33", "repo_name": "lenik/stack", "sub_path": "/plover/core/plover-arch/src/main/java/com/bee32/plover/arch/util/FriendData.java", "file_name": "FriendData.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "076e147163ee53640335cc771cdd616484df1648", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lenik/stack
235
FILENAME: FriendData.java
0.267408
package com.bee32.plover.arch.util; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URL; public class FriendData { public static String script(Class<?> clazz, String extension) { return script(clazz, extension, "utf-8"); } public static String script(Class<?> clazz, String extension, String charset) { String resource = clazz.getName().replace('.', '/'); resource = "/" + resource + "." + extension; URL url = clazz.getResource(resource); ByteArrayOutputStream buf = new ByteArrayOutputStream(); try (InputStream in = url.openStream()) { int b; while ((b = in.read()) != -1) { buf.write(b); } } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } if (charset == null) charset = "utf-8"; String s; try { s = new String(buf.toByteArray(), charset); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e.getMessage(), e); } return s; } }
8a9bc939-1364-4624-839b-d5865a279949
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-21 16:51:55", "repo_name": "AndyShan/OPOS", "sub_path": "/OPOS/app/src/main/java/com/sudoku/ad/opos/MyImageButtonLayout.java", "file_name": "MyImageButtonLayout.java", "file_ext": "java", "file_size_in_byte": 1018, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "98530b4e8d3bbbc79b3b5608cc848479cddf8776", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/AndyShan/OPOS
186
FILENAME: MyImageButtonLayout.java
0.23793
package com.sudoku.ad.opos; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; /** * Created by AD on 2015/9/2. */ public class MyImageButtonLayout extends LinearLayout { private ImageView imageView; private TextView textView; private Context mContext; public MyImageButtonLayout(Context context, AttributeSet attrs) { super(context, attrs); LayoutInflater.from(context).inflate(R.layout.layout_image_button, this, true); mContext = context; imageView = (ImageView)findViewById(R.id.imagebutton_image); textView = (TextView)findViewById(R.id.imagebutton_text); } public void setImage(int id){ imageView.setImageResource(id); } public void setText(String string){ textView.setText(string); } public void setSize(int size){ textView.setTextSize(size); } }
4e66be78-0337-44ea-b54a-9d6a904de155
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-15 10:08:01", "repo_name": "moutainhigh/pioneer-ttf-sharding", "sub_path": "/pioneer-ttf-decoder/pioneer-ttf-decoder-common/src/main/java/com/atsz/qtd/event/StByRangeReportDateEvent.java", "file_name": "StByRangeReportDateEvent.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "eaf7fb7b584e89c9a71ec670497b025eacfcb870", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/moutainhigh/pioneer-ttf-sharding
297
FILENAME: StByRangeReportDateEvent.java
0.273574
package com.atsz.qtd.event; import com.atsz.qtd.common.enums.EventType; import com.atsz.qtd.entity.*; import lombok.Data; import org.springframework.context.ApplicationEvent; import java.util.List; /** * @author : Jerry_Zheng * @pakcageName :com.atsz.qtd.event * @project : pioneer-ttf-sharding * @date : 2019/7/31 16:34 */ @Data public class StByRangeReportDateEvent extends ApplicationEvent { public StByRangeReportDateEvent(Object source, ByrangeReport report, ByrangeTtf ttfBase, ByrangeTtfData ttfData) { super(source); this.eventType = EventType.INSERT; this.ttfBase = ttfBase; this.ttfData = ttfData; this.report = report; } public StByRangeReportDateEvent(Object source, EventType eventType, ByrangeReport report, ByrangeTtf ttfBase, ByrangeTtfData ttfData) { super(source); this.ttfBase = ttfBase; this.eventType = eventType; this.report = report; this.ttfData = ttfData; } private EventType eventType; private ByrangeTtf ttfBase; private ByrangeTtfData ttfData; private ByrangeReport report; }
3fa31c1b-0086-4524-a2c5-e69ae501e59d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-10 18:01:09", "repo_name": "FrankieCamelCase/CucumberProject", "sub_path": "/src/test/java/com/libraryapp/utils/TakeScreenShot.java", "file_name": "TakeScreenShot.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "1b03756fecfd56379de9f6ed6b5ddee640418356", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/FrankieCamelCase/CucumberProject
194
FILENAME: TakeScreenShot.java
0.26588
package com.libraryapp.utils; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; public class TakeScreenShot { /** Take screen shot **/ public static void takeScreenshot(String fileName){ File scrFile = ((TakesScreenshot)Driver.getDriver()).getScreenshotAs(OutputType.FILE); String path = System.getProperty("user.dir") + File.separator + "test-output" + File.separator + "screenshots" + File.separator + getTodaysDate() + " " + fileName + ".png"; try { FileUtils.copyFile(scrFile, new File(path)); } catch (IOException e){ e.printStackTrace(); } } public static String getTodaysDate(){ return(new SimpleDateFormat("yyyyMMdd").format(new Date())); } }
73c647df-d4e4-457b-bec3-3ac390d1de6c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-19 11:56:59", "repo_name": "manishbit97/andoid-studio-codes", "sub_path": "/appp23/src/com/example/appp23/MainActivity23.java", "file_name": "MainActivity23.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "158c35df80761e337f73481b9cf61d92a1a310ba", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/manishbit97/andoid-studio-codes
218
FILENAME: MainActivity23.java
0.267408
package com.example.appp23; import android.os.Bundle; import android.app.Activity; import android.view.Display; import android.view.Menu; import android.view.Surface; import android.view.WindowManager; import android.widget.Toast; public class MainActivity23 extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity23); WindowManager wm=getWindowManager(); Display d=wm.getDefaultDisplay(); int rot=d.getRotation(); if(rot==Surface.ROTATION_0||rot==Surface.ROTATION_270) { Toast.makeText(getApplicationContext(), "potrait mode", Toast.LENGTH_LONG).show(); } else { Toast.makeText(getApplicationContext(), "Landscape mode", Toast.LENGTH_LONG).show(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main_activity23, menu); return true; } }
8095f198-63c7-4d88-9fe2-e11a868df4d2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-11 22:18:54", "repo_name": "zavbak/Remider", "sub_path": "/app/src/main/java/com/anit/remider/PreferenceHelper.java", "file_name": "PreferenceHelper.java", "file_ext": "java", "file_size_in_byte": 1077, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "746e2ef3c9cee5ad2552098976d014abf9f0181c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zavbak/Remider
202
FILENAME: PreferenceHelper.java
0.267408
package com.anit.remider; import android.content.Context; import android.content.SharedPreferences; /** * Created by 79900 on 04.07.2016. */ public class PreferenceHelper { private static PreferenceHelper instannce; private Context context; private SharedPreferences sharedPreferences; public static final String SPLASH_IS_INVISIBLE = "splash_is_invisible"; private PreferenceHelper() { } public static PreferenceHelper getInstance(){ if(instannce==null){ instannce = new PreferenceHelper(); } return instannce; } public void init(Context context){ this.context = context; sharedPreferences = context.getSharedPreferences("preference",Context.MODE_PRIVATE); } public void putBoolean(String key,Boolean value){ SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(key,value); editor.apply(); } public Boolean getBoolean(String key){ return sharedPreferences.getBoolean(key,false); } }
0fc77de9-549a-4141-ab77-e184b36187b1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-18 07:58:59", "repo_name": "zhengqingya/java-workspace", "sub_path": "/SpringBoot系列/56-整合EasyExcel操作Excel/demo/src/main/java/com/zhengqing/demo/api/EasyExcelReadTestController.java", "file_name": "EasyExcelReadTestController.java", "file_ext": "java", "file_size_in_byte": 1244, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "a330acdf1355f83dd97f661f86372dd5a9e09c87", "star_events_count": 30, "fork_events_count": 24, "src_encoding": "UTF-8"}
https://github.com/zhengqingya/java-workspace
285
FILENAME: EasyExcelReadTestController.java
0.229535
package com.zhengqing.demo.api; import com.zhengqing.demo.service.IEasyExcelReadService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; /** * <p> 测试EasyExcel </p> * * @author zhengqingya * @description * @date 2022/1/24 17:37 */ @Slf4j @RestController @RequestMapping("/easyExcel/read/test") @Api(tags = {"EasyExcel-read-api"}) public class EasyExcelReadTestController { @Resource private IEasyExcelReadService easyExcelReadService; @ApiOperation("最简单的读") @PostMapping(value = "simpleRead") public void simpleRead(@RequestPart @RequestParam MultipartFile file) { this.easyExcelReadService.simpleRead(file); } // @ApiOperation("导出") // @GetMapping(value = "/export") // public void writeExcel(HttpServletResponse response) { // List<ExportModel> list = this.getList(); // String fileName = "Excel导出测试"; // String sheetName = "sheet1"; // EasyExcelUtil.writeExcel(response, list, fileName, sheetName, ExportModel.class); // } }
9b0c3a24-6ca9-4857-a34e-d98c33fe451b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-13 19:49:55", "repo_name": "sanjoy-gwtp/partner-servcie", "sub_path": "/src/main/java/com/surjo/admin/controller/PasswordController.java", "file_name": "PasswordController.java", "file_ext": "java", "file_size_in_byte": 1080, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "fe9bc92ea2450a5b725baef96f8bd8734072b8b9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sanjoy-gwtp/partner-servcie
198
FILENAME: PasswordController.java
0.220007
package com.surjo.admin.controller; import com.surjo.admin.response.OtpResponse; import com.surjo.admin.service.PasswordService; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * Created by sanjoy on 5/17/17. */ @RestController @RequestMapping(path = "/password") public class PasswordController { private final PasswordService passwordService; public PasswordController(PasswordService passwordService) { this.passwordService = passwordService; } @RequestMapping(method = RequestMethod.GET,path = "otp") public OtpResponse getOtp(@RequestParam String mobileNumber) { return passwordService.request(mobileNumber); } @RequestMapping(method = RequestMethod.GET,path = "forgot") public OtpResponse forgot(@RequestParam String secret,@RequestParam String otp) { return passwordService.verify(secret,otp); } }
e13e4b78-a91c-47cc-b87d-c765b2ccaff2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-12 08:30:33", "repo_name": "achuthakethari/File-Read-and-write-in-OOPs", "sub_path": "/Filerd.java", "file_name": "Filerd.java", "file_ext": "java", "file_size_in_byte": 1043, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "d947efdcbc181c75ca6d32e30684bf0f203c44ee", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/achuthakethari/File-Read-and-write-in-OOPs
197
FILENAME: Filerd.java
0.253861
package oopstudent; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; /* read the file specified in filepath, first time it reads libname.csv and returns NIE,Mysore and * second time it reads libbooks.csv and returns Java,Buyya,2014,McGraHill */ public class Filerd { String lines=""; public String readFromFile(String filepath) { try { FileReader fr = new FileReader(filepath); BufferedReader br = new BufferedReader(fr); String currentline = ""; currentline = br.readLine(); while (currentline != null) { lines += currentline + "\n"; currentline = br.readLine(); } br.close(); fr.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return (lines); } }
7b80b010-605e-44e6-a6ff-e26cec3a658e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-19 13:44:24", "repo_name": "alapierre/sample-ws", "sub_path": "/spring-boot-rest/src/main/java/pl/com/softproject/ws/rest/util/HttpEntityUtil.java", "file_name": "HttpEntityUtil.java", "file_ext": "java", "file_size_in_byte": 1070, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "281d6433cb6f78a70f51e99757f4d45de11def16", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/alapierre/sample-ws
230
FILENAME: HttpEntityUtil.java
0.280616
/** * Copyright 2015-09-24 the original author or authors. */ package pl.com.softproject.ws.rest.util; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import java.net.URI; /** * @author Adrian Lapierre <adrian@softproject.com.pl> */ public class HttpEntityUtil { public static <T> ResponseEntity<T> ok(final T body) { return ResponseEntity.ok(body); } public static ResponseEntity<?> ok() { return ResponseEntity.ok().build(); } public static ResponseEntity<?> notFound() { return new ResponseEntity<>(null, HttpStatus.NOT_FOUND); } public static <T> ResponseEntity<T> responseEntity(final T body) { if(body != null) { return ok(body); } else return new ResponseEntity<>(HttpStatus.NOT_FOUND); } public static URI uri(String path, Object... params) { URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}") .buildAndExpand(params).toUri(); return uri; } }
c4dded64-a204-4280-a6f3-0c2989d03610
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-07-12T11:05:01", "repo_name": "Vishal023/Weather-Reasoning", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1232, "line_count": 41, "lang": "en", "doc_type": "text", "blob_id": "4ffadc5978c6fe02bc71007dda0561c7b5403034", "star_events_count": 4, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Vishal023/Weather-Reasoning
368
FILENAME: README.md
0.280616
# Make sure your fork/star this repo before cloning to your local system # Weather Reasoning System An artificial intelligence weather reasoning project which tells you the weather forecast of the next day. It also had auto day and night mode. ![Home Page](https://drive.google.com/uc?id=1bbDqaUw-_JwjlrXt751pjmyj3vKs2s6t) ## TECHNOLOGY USED This reasoning system uses: * [Python](https://www.python.org/) * [GUI] * [MATPLOTLIB] * [PANDAS] * [TKINTER] GUI * [SQLITE] v3 ## WORKING WATCH THIS VIDEO TO VIEW THE WORKING OF THIS GUI APP [VIDEO](https://drive.google.com/open?id=1ExX7HGeQVpdYtISiS8hr09AIQ7QxWZam) ## INSTALLATION Weather Reasoning requires [Python](https://www.python.org/) v3+ to run. [Jupyter Notebook](https://jupyter.org/) Clone the repository HTTPS: https://github.com/Vishal023/Weather-Reasoning.git Download: Dowload the GUI folder and execute the code inside WeatherReasoning.ipynb ## NOTE Note: The images,database and dataset file should be in the same directory as the WeatherReasoning.ipynb ## JUNK [11809777_K18KR](https://github.com/Vishal023/Weather-Reasoning/tree/master/11809777_K18KR) this folder was used for Class Project Purpose.
5e778d61-00d3-44f9-b1ac-19eaad81485c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-10 14:33:13", "repo_name": "cmplx-xyttmt/KenyaJavaDevs", "sub_path": "/app/src/main/java/android/andela/com/kenyajavadevs/testhelper/TestHelper.java", "file_name": "TestHelper.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "b3bed96e9f493cbd1c7fcef0d1bd2c338b7cae4f", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/cmplx-xyttmt/KenyaJavaDevs
254
FILENAME: TestHelper.java
0.280616
package android.andela.com.kenyajavadevs.testhelper; import android.andela.com.kenyajavadevs.model.GithubUser; import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.io.BufferedReader; import java.io.Reader; import java.io.StringReader; import java.util.Arrays; public class TestHelper { private GithubUser[] users; public TestHelper() { String json = "[\n" + " {\n" + " \"login\": \"user1\",\n" + " \"avatar_url\": \"user1.png\",\n" + " \"url\": \"github.com/user1\",\n" + " \"name\": \"user1\"\n" + " }\n" + "]\n"; GsonBuilder builder = new GsonBuilder(); builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); Gson gson = builder.create(); Reader reader = new BufferedReader(new StringReader(json)); users = gson.fromJson(reader, GithubUser[].class); } public GithubUser[] getUsers() { return Arrays.copyOf(users, users.length); } }
e12424cf-ef0a-41d5-9624-fd6e5a279a0b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-04-15 07:31:35", "repo_name": "kfirst/OFSim", "sub_path": "/simulator/src/csnet/openflow/packet/model/Packet.java", "file_name": "Packet.java", "file_ext": "java", "file_size_in_byte": 1250, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "e3e74eac370d1029c7f71934bcfb7d435c7fefb7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kfirst/OFSim
253
FILENAME: Packet.java
0.294215
package csnet.openflow.packet.model; public class Packet implements Comparable<Packet> { public static enum SizeType { total, header, one } /** * 报文包含的数据 */ public PacketData data; /** * 报文包含的统计信息 */ public PacketStatistic statistic; public int getSize(SizeType type) { switch (type) { case total: return data.octets; case header: return data.headerOctets; case one: return 1; } return 0; } public String getNetworkId() { return data.getNetworkId(); } public String getTransportId() { return data.getTransportId(); } public long getTimestamp() { return statistic.timestamp; } public void setTimestamp(long timestamp) { statistic.timestamp = timestamp; } @Override public String toString() { StringBuilder ret = new StringBuilder(data.toString()); ret.append("\n"); ret.append(statistic.toString()); return ret.toString(); } @Override public int compareTo(Packet o) { return statistic.compareTo(o.statistic); } }
e87ea529-427a-4165-a286-f7e7bc3bbbbf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-20 14:00:10", "repo_name": "andreyfillipe/nosso-banco-digital", "sub_path": "/src/main/java/com/andreyfillipe/nossobancodigital/resource/TransferenciaResource.java", "file_name": "TransferenciaResource.java", "file_ext": "java", "file_size_in_byte": 1066, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "a096db1daf9202be825673638990ae39c18ae2b1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/andreyfillipe/nosso-banco-digital
189
FILENAME: TransferenciaResource.java
0.217338
package com.andreyfillipe.nossobancodigital.resource; import com.andreyfillipe.nossobancodigital.entity.dto.TransferenciaDTO; import com.andreyfillipe.nossobancodigital.service.TransferenciaService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; @RestController @RequestMapping("/api/transferencias") public class TransferenciaResource { private TransferenciaService transferenciaService; public TransferenciaResource(TransferenciaService transferenciaService) { this.transferenciaService = transferenciaService; } @PostMapping public ResponseEntity<Void> transferencia(@RequestBody @Valid TransferenciaDTO dto) { //Realizar transferência this.transferenciaService.transferencia(dto); return ResponseEntity.ok().build(); } }
3ebb351b-b738-4986-82ac-d274f22dfeab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-07-16T02:37:30", "repo_name": "xiaolunan/img-folder", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1439, "line_count": 56, "lang": "zh", "doc_type": "text", "blob_id": "3369f1a5727f95832b5fbd42a4dbe3457d989689", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xiaolunan/img-folder
584
FILENAME: README.md
0.26588
# img-folder ## 源码图片资源 ### 我挥舞着键盘和本子,发誓要把这个世界写的明明白白。 ![JAVA](http://img.hb.aicdn.com/4100e2b13b2e7b961a8da905fd24b2885f926805e07c-7N6IPd_fw658 "JAVA") ### 我挥舞着键盘和本子,发誓要把这个世界写的明明白白。 A:嘿 //是什么意思啊? B:嘿. A:呃 我问你 //是什么意思啊? B:问吧. A:我刚才不是问了么? B:啊? A:你再看看记录... B:看完了. A:......所以 B:所以什么? A:你存心耍我呢吧? B:没有啊 你想问什么? ........ ### 我挥舞着键盘和本子,发誓要把这个世界写的明明白白。 ### 如何解决系统问题 ![JAVA](http://7vzp4h.com1.z0.glb.clouddn.com/1077.png "JAVA") ### 我挥舞着键盘和本子,发誓要把这个世界写的明明白白。 ![JAVA](https://pic2.zhimg.com/9efabb419018aaa171e3d053010b17d9_b.png "JAVA") ![JAVA](https://pic2.zhimg.com/092ce58753b48a40b8cdbafc9c30e441_b.png "JAVA") ![JAVA](https://pic2.zhimg.com/73b5b41e3a293a114a56de93ae5ad911_b.png "JAVA") ![JAVA](https://pic3.zhimg.com/deb862e799d1c4704839ca1e9a8ba2d6_b.png "JAVA") ![JAVA](https://pic2.zhimg.com/6baa5c75a3150d7225a27b73c9f3e7d9_b.png "JAVA") ![JAVA](https://pic3.zhimg.com/b1a96b0da0950a7b5d5317fc691f1902_b.png "JAVA") ### JAVA is a good language.卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡
c01be8dc-c92b-4161-95c1-e2d9368b5b87
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-26 15:01:57", "repo_name": "git-gao/java300", "sub_path": "/src/com/java/annotation/orm/Student.java", "file_name": "Student.java", "file_ext": "java", "file_size_in_byte": 1082, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "5c9635401bab8b9be6cc359fb771a11be9d8cf7f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/git-gao/java300
278
FILENAME: Student.java
0.280616
package com.java.annotation.orm; import com.java.annotation.MyAnnotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * ORM 思想,对象关系映射 * 数据库表:tb_student * 字段:id long 10 主键 * name String 20 * age int 3 */ @StuTable("tb_student") @MyAnnotation public class Student { @StuField(columnName = "id", type = "long", length = 10) private long id; @StuField(columnName = "name", type = "String", length = 20) private String name; @StuField(columnName = "age", type = "int", length = 3) private int age; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
53003ed5-5506-48e9-99cb-cc38764ee55e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-03-10T20:16:08", "repo_name": "bhanuchaddha/Kahoot-Replica", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1134, "line_count": 40, "lang": "en", "doc_type": "text", "blob_id": "c4a252ae9ac85cdb890e56bf915db40cb7ff0f98", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/bhanuchaddha/Kahoot-Replica
284
FILENAME: README.md
0.26588
# Kahoot Replica ## Technology being used * Spring Boot * Swagger Code gen - to generate rest client **db url** http://localhost:8080/h2-console https://api.themoviedb.org/3/movie/550?api_key= #### Popular Movies https://api.themoviedb.org/3/discover/movie?sort_by=popularity.desc&api_key= ### Road Map * Quiz Should be sent with unique Id and 10 random questions. Quiz should persist. >> DONE * Persist the db in file. Dont call the service if questions exist. >> DONE ##### Quiz * Quiz should not have answers >> DONE * Answers could be submitted to a quiz and result should be available ##### Session * Session should have one quiz and multiple users to play. * Each user get their uniqe id * Session can be in memory ##### Leader Board * Session should have leader board ##### Real time Quiz * Use WebSockets * Each question should appear for certain time and answer should be shown at the end * Real time LeaderBoard should be available * Winner should be shown at the end of the quiz ##### Important Links Nice article on one-to-many https://www.callicoder.com/hibernate-spring-boot-jpa-one-to-many-mapping-example/
185c3fad-fb00-48d9-98ea-254638d178bc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-08-25 04:06:36", "repo_name": "LeCheng09/LeChengCMS", "sub_path": "/src/com/lecheng/cms/base/DataBase.java", "file_name": "DataBase.java", "file_ext": "java", "file_size_in_byte": 1062, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "cf5e4433c4087baed22857807bb015b68de299f1", "star_events_count": 1, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/LeCheng09/LeChengCMS
277
FILENAME: DataBase.java
0.264358
package com.lecheng.cms.base; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public class DataBase { private static Connection conn; private static ResultSet rs; private static PreparedStatement ps; /** * 数据库连接 */ public Connection getConn() { try { // 加载数据库驱动 Class.forName("com.mysql.jdbc.Driver"); // 创建数据库连接 conn = DriverManager .getConnection("jdbc:mysql://192.168.1.18:3306/cms?user=root&password=root"); } catch (Exception e) { System.out.println(e.getMessage()); } return conn; } /** * 数据库关闭 * * @param ResultSet * @param PreparedStatement * @param Connection */ public void closeConn(ResultSet myrs, PreparedStatement myps, Connection myconn) { try { if (myrs != null) { myrs.close(); } if (myps != null) { myps.close(); } if (myconn != null) { myconn.close(); } } catch (Exception e) { System.out.println(e.getMessage()); } } }
a9772f7d-87f9-4c84-aed6-05dea58b8083
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-18 07:27:09", "repo_name": "javaeezhou/btDemo01", "sub_path": "/src/main/java/cn/bt/btdemo/service/jwt/JwtUserDetailsService.java", "file_name": "JwtUserDetailsService.java", "file_ext": "java", "file_size_in_byte": 1114, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "59f43ab2d86ea1f972e32b101479349cc5ac0067", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/javaeezhou/btDemo01
202
FILENAME: JwtUserDetailsService.java
0.242206
package cn.bt.btdemo.service.jwt; import cn.bt.btdemo.dao.IAdminDao; import cn.bt.btdemo.entity.admin.Admin; import cn.bt.btdemo.model.jwt.JwtUserFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; @Service("jwtUserDetailsService") public class JwtUserDetailsService implements UserDetailsService { @Autowired private IAdminDao adminDao; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { Admin a = new Admin(); a.setUsername(username); a.setStatus(1); Admin admin = adminDao.findOneAdminByCondition(a); if (admin == null) { throw new UsernameNotFoundException(String.format("No user found with username '%s'.", username)); } else { return JwtUserFactory.create(admin); } } }
a5ca7864-515c-45cc-ad0e-ae0d1de52409
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-25 01:36:14", "repo_name": "CSY9257/springcloud-sjgc", "sub_path": "/springcloud-eureka-client/src/test/java/com/sjgc/ExtendMySQLMaxValueIncrementerTest.java", "file_name": "ExtendMySQLMaxValueIncrementerTest.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "6a52271a4313ce942191f28d0945204b04aaa012", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/CSY9257/springcloud-sjgc
238
FILENAME: ExtendMySQLMaxValueIncrementerTest.java
0.282988
/** * */ package com.sjgc; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author sunff */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:idLeaf/extendmysqlapplicationContext.xml"}) public class ExtendMySQLMaxValueIncrementerTest { @Autowired @Qualifier("order") private DataFieldMaxValueIncrementer incrementer; @Test public void test() { int i = 0; while (i < 10) { System.out.println("long id=" + incrementer.nextLongValue()); System.out.println("int id=" + incrementer.nextIntValue()); System.out.println("string id=" + incrementer.nextStringValue()); i++; try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } } }
02e408b2-028f-49b7-8590-b54b34f1569a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-15 17:21:21", "repo_name": "brutchm/ProyectoEstructurasII", "sub_path": "/src/com/company/bl/MultipleListArchNode.java", "file_name": "MultipleListArchNode.java", "file_ext": "java", "file_size_in_byte": 1000, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "26f44836daefabefb4c7a57e796744bc28eff7ee", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brutchm/ProyectoEstructurasII
211
FILENAME: MultipleListArchNode.java
0.249447
package com.company.bl; public class MultipleListArchNode { private int cost; private MultipleListArchNode next; private MultipleListNode vertex; public MultipleListArchNode(){ this.next = null; this.vertex = null; } public MultipleListArchNode(int cost){ this.cost = cost; this.next = null; this.vertex = null; } public MultipleListArchNode(int cost, MultipleListNode vertex){ this.cost = cost; this.next = null; this.vertex = vertex; } public int getCost(){ return this.cost; } public MultipleListArchNode getNext(){ return this.next; } public MultipleListNode getVertex(){ return this.vertex; } public void setCost(int cost){ this.cost = cost; } public void setNext(MultipleListArchNode next){ this.next = next; } public void setVertex(MultipleListNode vertex){ this.vertex = vertex; } }
b966c6f2-446c-45f2-903d-1206035cb082
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-19 07:51:03", "repo_name": "liuwy5/project", "sub_path": "/shiro/src/main/java/com/controller/web/IndexController.java", "file_name": "IndexController.java", "file_ext": "java", "file_size_in_byte": 1073, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "c588118df3aefab31dd29836db60d073e1622d24", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liuwy5/project
174
FILENAME: IndexController.java
0.247987
package com.controller.web; import com.entity.Resource; import com.service.ResourceService; import com.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; import java.util.Set; @Controller public class IndexController extends BaseController { @Autowired private UserService userService; @Autowired private ResourceService resourceService; @RequestMapping("/") public String index(Model model) { String username = getUsername(); Set<String> permissions = userService.findPermissions(username); List<Resource> menus = resourceService.findMenus(permissions); model.addAttribute("menus", menus); model.addAttribute("username", username); return "index"; } @RequestMapping("/welcome") public String welcome() { return "welcome"; } }
6824c87d-89e4-4d1a-9718-0319d783880a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-10 17:55:41", "repo_name": "tstephen/bpsim", "sub_path": "/BPSim/src/main/java/org/bpsim/validator/ReportingErrorHandler.java", "file_name": "ReportingErrorHandler.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "a152021c8c85fb26bf61217dc401feb88a285539", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tstephen/bpsim
219
FILENAME: ReportingErrorHandler.java
0.279828
/* * This work by WfMC is licensed under a Creative Commons Attribution 3.0 * Unported License. */ package org.bpsim.validator; import java.util.ArrayList; import java.util.List; import org.bpsim.validator.ValidationError.ValidationLevel; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXParseException; /** * * @author tim.stephenson@knowprocess.com * */ public class ReportingErrorHandler implements ErrorHandler { private List<ValidationError> errors = new ArrayList<ValidationError>(); public void warning(SAXParseException e) { System.out.println(e.getMessage()); errors.add(new ValidationError(ValidationLevel.WARN, e.getMessage())); } public void error(SAXParseException e) { System.out.println(e.getMessage()); errors.add(new ValidationError(ValidationLevel.ERROR, e.getMessage())); } public void fatalError(SAXParseException e) { System.out.println(e.getMessage()); errors.add(new ValidationError(ValidationLevel.FATAL, e.getMessage())); } public List<ValidationError> getErrors() { return errors; } }
812eebf2-0883-4e03-bf88-4b9cdde6dc4e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-26 15:19:51", "repo_name": "amuna/HoloSimulator", "sub_path": "/app/src/main/java/com/example/ahmednaeem/holosimulator/HomeFragment.java", "file_name": "HomeFragment.java", "file_ext": "java", "file_size_in_byte": 1218, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "de106ffc4a25b07ccfe41ac3a9e88928a681c309", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/amuna/HoloSimulator
199
FILENAME: HomeFragment.java
0.20947
package com.example.ahmednaeem.holosimulator; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; public class HomeFragment extends Fragment { @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_home, container, false); ImageView publicSpeaking = (ImageView) rootView.findViewById(R.id.imageView2); publicSpeaking.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.replace(R.id.container, new ControlFragment()).commit(); transaction.addToBackStack(null); } }); return rootView; } }
ee8e0a87-b8be-401d-8265-172371749afd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-09-19T14:02:47", "repo_name": "fedgut/building_with_responsive_design", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 983, "line_count": 41, "lang": "en", "doc_type": "text", "blob_id": "bd02c0b68bee69436630ad36a4b44327a3b7eaa9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fedgut/building_with_responsive_design
316
FILENAME: README.md
0.247987
# Building with responsive design A clone of TNW magazine with responsive design [Demo](https://raw.githack.com/fedgut/building_with_responsive_design/create-tnw-page/index.html) [Exact same demo but with media query reporters](https://raw.githack.com/fedgut/building_with_responsive_design/create-tnw-page/indexMQ.html) ## Breakpoints: Width of: 840 and below 841 to 1110 1111 and above ## 840: Everything is in a single column, Nav bar replaced by menu icon ## 841 to 1110: Body moves to 2 or 3 collumns Nav Bar has menu links ## 1110 and above: Body now is in 3 or 4 columns # Built With - HTML - CSS # Authors - [Eduardo Gutierrez](https://github.com/fedgut) -[Abdul-samii Ajala](https://github.com/jalasem) # Acknowledgments - [Microverse](https://microverse.org) - [TNW](https://thenextweb.com/) - [VS Code](https://code.visualstudio.com/) # Contact [@eduardogpulido](https://twitter.com/eduardogpulido) [@AJALAABDULSAMII](https://twitter.com/AJALAABDULSAMII)
06167d93-3991-4194-aaee-78788a7805f5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-21 02:49:48", "repo_name": "unixminecraft/CVPortal", "sub_path": "/mc/src/main/java/org/cubeville/portal/actions/Teleport.java", "file_name": "Teleport.java", "file_ext": "java", "file_size_in_byte": 1037, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "6c702aab28bf2aebd657fdf13d4f520aa2262ce4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/unixminecraft/CVPortal
216
FILENAME: Teleport.java
0.246533
package org.cubeville.portal.actions; import java.util.HashMap; import java.util.Map; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.configuration.serialization.SerializableAs; @SerializableAs("Teleport") public class Teleport implements Action { Location location; public Teleport(Location location) { this.location = location; } public Teleport(Map<String, Object> config) { this.location = (Location) config.get("location"); } public Map<String, Object> serialize() { Map<String, Object> ret = new HashMap<>(); ret.put("location", location); return ret; } public void execute(Player player) { player.teleport(location); } public String getLongInfo() { return " - &bTeleport: " + location; } public String getShortInfo() { return "TP"; } public boolean isSingular() { return true; } public Location getLocation() { return location; } }
4730f4f0-2260-4c51-bc37-96a7e20afd99
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-02 04:00:26", "repo_name": "phuonglee/springboot-training", "sub_path": "/src/main/java/com/example/springbootdemo/model/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 1071, "line_count": 66, "lang": "en", "doc_type": "code", "blob_id": "db85d634084aca22c46c0b61ce52e181f7e5bbbb", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/phuonglee/springboot-training
244
FILENAME: User.java
0.272799
package com.example.springbootdemo.model; import java.io.Serializable; import javax.persistence.*; /** * The persistent class for the USERS database table. * */ @Entity @Table(name="USERS") @NamedQuery(name="User.findAll", query="SELECT u FROM User u") public class User implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(unique=true, nullable=false) private Long id; @Column(nullable=false) private int age; @Column(nullable=false, length=30) private String name; @Column(nullable=false) private double salary; public User() { } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public double getSalary() { return this.salary; } public void setSalary(double salary) { this.salary = salary; } }
f8327632-53d3-4a94-95f5-801d0af148b3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-08-10 08:43:00", "repo_name": "jjhjjhjjh/root", "sub_path": "/src/org/jjh/st/search/controller/STListController.java", "file_name": "STListController.java", "file_ext": "java", "file_size_in_byte": 1132, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "287580375df627ebcfc279cc417f76fd594ca7b6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jjhjjhjjh/root
237
FILENAME: STListController.java
0.287768
package org.jjh.st.search.controller; import java.util.List; import javax.servlet.http.HttpSession; import org.jjh.member.model.StudentDto; import org.jjh.st.search.model.STListSearchService; 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.RequestMethod; import org.springframework.web.servlet.ModelAndView; @Controller public class STListController { @Autowired StudentDto sdto; @Autowired STListSearchService sls; @RequestMapping(value="/st/list.it", method=RequestMethod.GET) public ModelAndView controll(ModelAndView mav){ List li = sls.readAllService(); System.out.println(li); mav.addObject("list", li); mav.setViewName("tiles:st_search.list"); return mav; } @RequestMapping(value="/st/list.it", method=RequestMethod.POST) public ModelAndView controll2(ModelAndView mav){ List li = sls.readAllService(); System.out.println(li); mav.addObject("list", li); mav.setViewName("tiles:st_search.list"); return mav; } }
b3e97b44-7ff4-4a3a-ac80-5c26ec8725ec
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-30 20:25:32", "repo_name": "woltsu/owasp", "sub_path": "/src/main/java/owasp/dao/NewsDao.java", "file_name": "NewsDao.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "6acd72210d6bf05febea942ec2d6a1c495b132cf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/woltsu/owasp
226
FILENAME: NewsDao.java
0.288569
package owasp.dao; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import owasp.domain.Account; import owasp.domain.News; @Component public class NewsDao { private final String TABLE = "News"; @Autowired private Database database; public void insert(String content, Account a) { try { database.getConnection().createStatement().executeUpdate("INSERT INTO " + TABLE + "(content, publisher) VALUES('" + content + "', '" + a.getUsername() + "');"); } catch (Exception e) { e.printStackTrace(); } } public List<News> getNews() { List<News> news = new ArrayList(); try { ResultSet rs = database.getConnection().createStatement().executeQuery("SELECT * FROM " + TABLE); while (rs.next()) { news.add(new News(rs.getString("content"), rs.getString("publisher"))); } } catch (Exception e) { e.printStackTrace(); } return news; } }
44b0d841-ef1d-4c75-ae0c-0bbe746aa31e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-02-18 21:44:51", "repo_name": "mihkell/random", "sub_path": "/src/main/java/eu/nomme/client/activities/ContactActivity.java", "file_name": "ContactActivity.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "bea2ab31fe38523527abf280a91e63c6520609fe", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mihkell/random
315
FILENAME: ContactActivity.java
0.29584
package eu.nomme.client.activities; import com.google.gwt.activity.shared.AbstractActivity; import com.google.gwt.event.shared.EventBus; import com.google.gwt.user.client.ui.AcceptsOneWidget; import eu.nomme.client.ClientFactory; import eu.nomme.client.activities.ui.interfaces.IAboutUI; public class ContactActivity extends AbstractActivity { private ClientFactory clientFactory; private IAboutUI aboutUI; public ContactActivity(ClientFactory clientFactory) { this.clientFactory = clientFactory; } @Override public void start(AcceptsOneWidget panel, EventBus eventBus) { aboutUI = clientFactory.getAboutUI(); aboutUI.setText( "Nomme OY \n" + "Raudtee 64 \n" + "11619 Tallinn\n" + "Estonia\n" + "\n" + "Email: info@nomme.eu\n" + "We will respond to your emails within 24h.\n" + "\n" + "Registration number: 12178186\n" + "IBAN: EE111010220200363223\n" + "SWIFT Code: EEUHEE2X \n"); aboutUI.getImage().setUrl("/nomme.eu-contact.jpg"); panel.setWidget(aboutUI); } }
9b232724-e457-47b9-9b7e-3d623bec0f2e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-14 21:04:47", "repo_name": "mdawidowski/Java-learning", "sub_path": "/Groceries-ArrayLists/Main.java", "file_name": "Main.java", "file_ext": "java", "file_size_in_byte": 1059, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "af1f80fe10c9f387786ca2d53de0e5daa6e3ef6c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mdawidowski/Java-learning
225
FILENAME: Main.java
0.286169
import java.util.Scanner; import java.util.ArrayList; public class Main{ public static void main(String[] args) { ArrayList<String> list = new ArrayList<String>(); boolean exists = false; Scanner in = new Scanner(System.in); list.add("bread"); list.add("cheese"); list.add("cookies"); list.add("cucumber"); list.add("orange"); System.out.println("List of products:"); System.out.println(list); System.out.print("Enter new product name or quit to exit: "); String product = in.next(); while(product.equalsIgnoreCase("quit") == false){ for (int i = 0; i < list.size(); i++) { if (product.equalsIgnoreCase(list.get(i))) { exists = true; System.out.println("This product is already on the list!"); } } if (exists == false) { list.add(product); } System.out.println(list); System.out.println("Enter new product name or quit to exit: "); product = in.next(); } } }
0bf3c34c-2113-4c33-ab6f-9f6f64181c61
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-17 19:05:00", "repo_name": "codelair-io/raptormp", "sub_path": "/server/src/main/java/mp/raptor/server/component/RegisterableServletComponent.java", "file_name": "RegisterableServletComponent.java", "file_ext": "java", "file_size_in_byte": 526, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "0d2af65197f8edaad995d56bd62d4d8fb8d967d1", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/codelair-io/raptormp
247
FILENAME: RegisterableServletComponent.java
0.274351
/* * Copyright 2019 RedBridge Technology AB * * 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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package mp.raptor.server.component; import io.undertow.servlet.api.ServletInfo; import mp.raptor.common.RegisterableComponent; /** * Purpose: * Defines a servlet registration component. * * @author Hassan Nazar */ public class RegisterableServletComponent implements RegisterableComponent<ServletInfo> { private ServletInfo servletInfo; @Override public ServletInfo getComponent() { return servletInfo; } @Override public void setComponent(final ServletInfo that) { this.servletInfo = that; } }
a7a06cae-b039-4b02-85b8-df8a4ebeceea
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-28 08:01:10", "repo_name": "opentichile/mineduc", "sub_path": "/earthquakes/src/main/java/cl/mineduc/sismologia/validator/CheckDateValidator.java", "file_name": "CheckDateValidator.java", "file_ext": "java", "file_size_in_byte": 965, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "14a009cf3f18b15a96e75001e01038c22e81290b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/opentichile/mineduc
177
FILENAME: CheckDateValidator.java
0.242206
package cl.mineduc.sismologia.validator; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; /** * * Validador de Fecha * * @author Alejandro Sandoval S. * */ public class CheckDateValidator implements ConstraintValidator<CheckDateFormat, String> { private String pattern; @Override public void initialize(CheckDateFormat constraintAnnotation) { this.pattern = constraintAnnotation.pattern(); } @Override public boolean isValid(String object, ConstraintValidatorContext constraintContext){ if ( object == null ) { return true; } try { Date date = new SimpleDateFormat(pattern).parse(object); System.out.println(date); return true; } catch (ParseException e) { return true; } } }
593ee136-8b94-4a79-9c59-cf4b55fe34e1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-10-18 09:37:26", "repo_name": "msccl/zhizhi", "sub_path": "/zz_developers/src/com/qkzz/web/developer/action/IndexAction.java", "file_name": "IndexAction.java", "file_ext": "java", "file_size_in_byte": 1046, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "fd55de20e136752d4565532e992e9e39667c1976", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/msccl/zhizhi
218
FILENAME: IndexAction.java
0.236516
package com.qkzz.web.developer.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.qkzz.util.CookieUtil; import com.qkzz.web.developer.bean.Developers; @Controller public class IndexAction { /** * 开发者首页,显示开发者信息 * @param request * @param response * @return */ @RequestMapping(value = {"/","/index"}, method = RequestMethod.GET) public String devIndex(HttpServletRequest request, HttpServletResponse response) { Developers ub = CookieUtil.getCookieUser(request,response); if(ub != null) { System.out.println("111111"); return "redirect:/developers/index"; } System.out.println("2222222"); request.setAttribute("pageTitle", "开发者管理系统"); request.setAttribute("user", ub); return "index"; } }
1d010c9a-d9ae-4825-a198-4c235896bd91
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-07 23:32:14", "repo_name": "devmorfeu/library-api", "sub_path": "/src/main/java/com/apirestlibrary/libraryapi/service/impl/EmailServiceImpl.java", "file_name": "EmailServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "6914d89c0d39c77ce5268c30618da2ec573f1cc4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/devmorfeu/library-api
222
FILENAME: EmailServiceImpl.java
0.226784
package com.apirestlibrary.libraryapi.service.impl; import com.apirestlibrary.libraryapi.service.EmailService; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Value; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.stereotype.Service; import java.util.List; @Service @RequiredArgsConstructor public class EmailServiceImpl implements EmailService { private final JavaMailSender javaMailSender; @Value("${application.mail-default-remetent}") private String remetentMail; @Override public void sendEmailsList(String messageMail, List<String> emailsList) { String[] arraysMail = emailsList.toArray(new String[emailsList.size()]); SimpleMailMessage simpleMailMessage = new SimpleMailMessage(); simpleMailMessage.setFrom(remetentMail); simpleMailMessage.setSubject("Livro com Empréstimo atrasado"); simpleMailMessage.setText(messageMail); simpleMailMessage.setTo(arraysMail); javaMailSender.send(simpleMailMessage); } }
abd0d4b0-d83e-4545-b8fc-3b3c24ea6155
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-29 00:00:52", "repo_name": "maroend/sorteo", "sub_path": "/models/com/sorteo/conciliacion/model/Colaborador.java", "file_name": "Colaborador.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "a6c5cf0ebb71866b5b1c44fb17cbc79d151bf66b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/maroend/sorteo
348
FILENAME: Colaborador.java
0.285372
package com.sorteo.conciliacion.model; import java.sql.ResultSet; import java.sql.SQLException; public class Colaborador{ public long pk; public long pkSector; public long pkNicho; public String clave; public String claveSector; public String claveNicho; public int talonarios; public double costo; public double abono; public double importe; public Colaborador() { } public Colaborador(ResultSet res) throws SQLException { this.pk = res.getLong("PK1"); this.clave = res.getString("CLAVE"); this.pkSector = res.getLong("PK_SECTOR"); this.claveSector = res.getString("CLAVE_SECTOR"); this.pkNicho = res.getLong("PK_NICHO"); this.claveNicho = res.getString("CLAVE_NICHO"); this.talonarios = res.getInt("TALONARIOS"); this.costo = res.getDouble("COSTO"); this.abono = res.getDouble("ABONO"); this.importe = 0; } public Colaborador(Colaborador c) { this.pk = c.pk; this.pkSector = c.pkSector; this.pkNicho = c.pkNicho; this.clave = c.clave; this.claveSector = c.claveSector; this.claveNicho = c.claveNicho; this.talonarios = c.talonarios; this.costo = c.costo; this.abono = c.abono; this.importe = c.importe; } public long getId() { return this.pk; } }
dba27bb2-1192-4ace-b13d-1eacbdddf503
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-10 16:36:00", "repo_name": "isdom/jocean-wechat", "sub_path": "/src/main/java/org/jocean/wechat/spi/msg/EnterSessionEvent.java", "file_name": "EnterSessionEvent.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "8ebde72539afbf1af7e524cab73197caf0199d62", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/isdom/jocean-wechat
211
FILENAME: EnterSessionEvent.java
0.2227
package org.jocean.wechat.spi.msg; import com.alibaba.fastjson.annotation.JSONField; public class EnterSessionEvent extends BaseWXMessage { @JSONField(name="Event") public String getEvent() { return _event; } @JSONField(name="Event") public void setEvent(final String event) { this._event = event; } @JSONField(name="SessionFrom") public String getSessionFrom() { return _sessionFrom; } @JSONField(name="SessionFrom") public void setSessionFrom(final String sessionFrom) { this._sessionFrom = sessionFrom; } private String _event; private String _sessionFrom; @Override public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("EnterSessionEvent [event=").append(_event).append(", sessionFrom=").append(_sessionFrom) .append(", base=").append(super.toString()).append("]"); return builder.toString(); } }
34c120ab-2f13-4a2d-b7bf-2925a2918439
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-27T13:58:51", "repo_name": "guoguocai/Design-Pattern", "sub_path": "/src/com/guoguocai/observer/demo2/notifyimp/Boss.java", "file_name": "Boss.java", "file_ext": "java", "file_size_in_byte": 1042, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "6016f7d36f9857457fb23bbe1bcd540ae214db90", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/guoguocai/Design-Pattern
250
FILENAME: Boss.java
0.261331
package com.guoguocai.observer.demo2.notifyimp; import com.guoguocai.observer.demo2.abs.Observer; import com.guoguocai.observer.demo2.interfaces.Subject; import java.util.ArrayList; import java.util.List; /** * 老板 * * @auther guoguocai * @date 2019/1/18 23:40 */ public class Boss implements Subject{ // 同事列表 private List<Observer> observers = new ArrayList<Observer>(); private String action; //增加 @Override public void attach(Observer observer) { observers.add(observer); } //减少 @Override public void detach(Observer observer) { observers.remove(observer); } //通知 @Override public void notifyPeople() { for (Observer ob: observers) { ob.update(); } } // 老板状态 public void setAction(String action) { this.action = action; } @Override public String getAction() { return this.action; } }
5fb140fb-95bd-4f91-8408-e1d23d6546cd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-04 16:48:22", "repo_name": "hmcts/sscs-tribunals-case-api", "sub_path": "/src/main/java/uk/gov/hmcts/reform/sscs/service/admin/RestoreCasesStatus.java", "file_name": "RestoreCasesStatus.java", "file_ext": "java", "file_size_in_byte": 1113, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "b31c7e5dd1008db8d9713a8034332e9106336df3", "star_events_count": 5, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/hmcts/sscs-tribunals-case-api
231
FILENAME: RestoreCasesStatus.java
0.273574
package uk.gov.hmcts.reform.sscs.service.admin; import java.util.List; public class RestoreCasesStatus { private int processedCount; private int successCount; private List<Long> failureIds; private boolean completed; public RestoreCasesStatus(int processedCount, int successCount, List<Long> failureIds, boolean completed) { this.processedCount = processedCount; this.successCount = successCount; this.failureIds = failureIds; this.completed = completed; } @Override public String toString() { return "RestoreCasesStatus{" + "processedCount=" + processedCount + ", successCount=" + successCount + ", failureCount=" + failureIds.size() + ", failureIds=" + getFailureIds(failureIds) + ", completed=" + completed + '}'; } private String getFailureIds(List<Long> ids) { return ids.toString(); } public boolean isOk() { return processedCount == successCount; } public boolean isCompleted() { return completed; } }
2fc29a4d-12af-4590-9208-9190662ae9ea
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-18 06:05:56", "repo_name": "WeihuaZhu/synchronous-chess", "sub_path": "/src/main/java/com/whzhu/chess/models/ChessPiece.java", "file_name": "ChessPiece.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "74e331dde3196d643cafbe9d63f5848a618df153", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/WeihuaZhu/synchronous-chess
251
FILENAME: ChessPiece.java
0.276691
package com.whzhu.chess.models; public abstract class ChessPiece implements ChessPieceRule { protected int row; protected int col; protected Color color; protected boolean alive; protected String role; protected boolean canBeBlocked; protected boolean atInitPosition; public ChessPiece(int row, int col, Color color, String role) { this.alive = true; this.atInitPosition = true; this.row = row; this.col = col; this.role = role; this.color = color; } public void setDead() { this.alive = false; } public Color getColor() { return color; } public int getRow() { return row; } public int getCol() { return col; } public boolean isAlive() { return alive; } protected void setPosition(int row, int col) { this.row = row; this.col = col; this.atInitPosition = false; // not atInitPosition once moved } @Override public String toString() { return String.format("%s-%s", role, color.toString()); } }
f9c0f4a9-556b-4c49-9d88-a6e9f3ca379b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-16 12:09:07", "repo_name": "Progern/NewsApplication", "sub_path": "/app/src/main/java/com/olegmisko/newsapplication/main/Services/NetworkConnectionService.java", "file_name": "NetworkConnectionService.java", "file_ext": "java", "file_size_in_byte": 1035, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "4689c8dbf84cbca43448479c26cee6b359350090", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Progern/NewsApplication
196
FILENAME: NetworkConnectionService.java
0.268941
package com.olegmisko.newsapplication.main.Services; import java.io.IOException; public class NetworkConnectionService { private static NetworkConnectionService instance = new NetworkConnectionService(); private NetworkConnectionService() { } public static NetworkConnectionService getInstance() { return instance; } /* This method sends a ping so we can actually check not if we're only * connected to the Internet but if there is an actual living connection * so we can load some data */ public static boolean checkInternetConnection() { Runtime runtime = Runtime.getRuntime(); try { Process ipProcess = runtime.exec("/system/bin/ping -c 1 8.8.8.8"); int exitValue = ipProcess.waitFor(); return (exitValue == 0); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } return false; } }
057cfa60-0215-498b-a7a1-8c8e85fb1804
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-13 08:21:58", "repo_name": "ChiangC/FMHttp", "sub_path": "/fmhttp/src/main/java/com/fmtech/fmhttp/db/PrivateDataBaseEnums.java", "file_name": "PrivateDataBaseEnums.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "932307747ee3df4b987e8f9bdddb58ccb19085de", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ChiangC/FMHttp
215
FILENAME: PrivateDataBaseEnums.java
0.250913
package com.fmtech.fmhttp.db; import android.os.Environment; import java.io.File; /** * ================================================================== * Copyright (C) 2018 FMTech All Rights Reserved. * * @author Drew.Chiang * @version v1.0.0 * @email chiangchuna@gmail.com * <p> * ================================================================== */ public enum PrivateDataBaseEnums { database("data/data/database/"); private String value; PrivateDataBaseEnums(String value) { this.value = value; } public String getValue() { /*UserDao userDao = BaseDaoFactory.getInstance().getDataHelper(UserDao.class, User.class); if (userDao != null) { User currentUser = userDao.getCurrentUser(); if (currentUser != null) { File file = new File(Environment.getExternalStorageDirectory(), "update"); if (!file.exists()) { file.mkdirs(); } return file.getAbsolutePath() + "/" + currentUser.getUser_id() + "/logic.db"; } }*/ return value; } }
fecaa6c9-f80a-490e-a436-370349e9793b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-04 08:14:31", "repo_name": "Catfeeds/myWorkspace", "sub_path": "/hlj_android_merchant/src/main/java/com/hunliji/marrybiz/model/revenue/BondBalanceDetail.java", "file_name": "BondBalanceDetail.java", "file_ext": "java", "file_size_in_byte": 1011, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "6f3516b09cb94e005179ab2fb4411d0b4a541382", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Catfeeds/myWorkspace
239
FILENAME: BondBalanceDetail.java
0.284576
package com.hunliji.marrybiz.model.revenue; import com.hunliji.marrybiz.util.JSONUtil; import org.json.JSONObject; /** * Created by werther on 6/21/16. */ public class BondBalanceDetail extends RevenueDetail { private double balance; public BondBalanceDetail(JSONObject jsonObject) { this.id = jsonObject.optLong("id", 0); this.amount = jsonObject.optDouble("value", 0); this.dateTime = JSONUtil.getDateTime(jsonObject, "created_at"); this.entityId = jsonObject.optLong("entity_id", 0); this.memo = JSONUtil.getString(jsonObject, "type_message"); this.title = JSONUtil.getString(jsonObject, "message"); this.type = jsonObject.optInt("type", 0); this.balance = jsonObject.optDouble("balance", 0); } @Override /** * 1:用户付款重置 2: 钱包余额充值 3:退款扣款 */ public int getType() { return super.getType(); } public double getBalance() { return balance; } }
be365a78-f8ac-4d0d-a9a4-7eee29d76f10
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-01-02T04:28:46", "repo_name": "adamclemmitt/simpleSCDE", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1035, "line_count": 16, "lang": "en", "doc_type": "text", "blob_id": "be47f788a2d343d6c4afc8061cdca9c344366129", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/adamclemmitt/simpleSCDE
210
FILENAME: README.md
0.289372
# Simplified Single-Cell Differential Expression Testing (`simpleSCDE`) This repository contains an R package for data manipulation and the simplified methods for analyzing single-cell RNA-seq data. The R package, titled `simpleSCDE`, is a wrapper for a previously developed SCDE testing package created by the Kharchenko Lab at Harvard University. ## Using `simpleSCDE` Included in this repository is a vignette providing detailed installation instructions for the `simpleSCDE` package. A summary of available methods is also included in the vignette, in addition to example commands that can be run on your own machine. ## Included Datasets The `simpleSCDE` package includes large planarian muscle data from both Fincher et al. and Scimone et al. Instructions for downloading data are included in the provided instructional vignette. ## Issues or Questions? Any issues or questions regarding the process detailed above or the `simpleSCDE` package in general should be reported to https://github.com/adamnc2/simpleSCDE/issues.
87d6cece-3bef-4dba-8cd6-72179bdc634b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-04-21 06:03:27", "repo_name": "hackathon-ro/frozenmediacenter", "sub_path": "/Core/src/net/frozenlogic/mediacenter/impl/ActivityContextImpl.java", "file_name": "ActivityContextImpl.java", "file_ext": "java", "file_size_in_byte": 1011, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "83b12765716214f277bccc4bbebdb6a231cc1f4e", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/hackathon-ro/frozenmediacenter
194
FILENAME: ActivityContextImpl.java
0.23092
package net.frozenlogic.mediacenter.impl; import net.frozenlogic.mediacenter.activities.*; public class ActivityContextImpl implements ActivityContext { private Activity currentActivity; private Activity defaultActivity; private MediaContext mediaContext; private UiContext uiContext; public ActivityContextImpl(Activity currentActivity, Activity defaultActivity, MediaContext mediaContext, UiContext uiContext) { this.currentActivity = currentActivity; this.defaultActivity = defaultActivity; this.uiContext = uiContext; this.mediaContext = mediaContext; } @Override public Activity getCurrentActivity() { return this.currentActivity; } @Override public Activity getDefaultActivity() { return this.defaultActivity; } @Override public MediaContext getMediaContext() { return this.mediaContext; } @Override public UiContext getUiContext() { return this.uiContext; } }
dee31ad6-eff6-48a7-aba4-798637ab849a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-18 06:24:51", "repo_name": "AlexAgnoII/WEBAPDE-MP3-FINAL", "sub_path": "/WEBAPDE-MP3/src/bean/Users.java", "file_name": "Users.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "b81a915fef195206268e860d8e1d50832a3840b6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AlexAgnoII/WEBAPDE-MP3-FINAL
202
FILENAME: Users.java
0.220007
package bean; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @Entity(name = "users") public class Users { @Id @Column private String users_username; @Column private String users_password; @Column private String users_shortdescription; @Override public String toString() { return "User [users_username=" + users_username + ", users_password=" + users_password + ", users_description=" + users_shortdescription + "]"; } public String getUsers_username() { return users_username; } public void setUsers_username(String users_username) { this.users_username = users_username; } public String getUsers_password() { return users_password; } public void setUsers_password(String users_password) { this.users_password = users_password; } public String getUsers_description() { return users_shortdescription; } public void setUsers_description(String users_description) { this.users_shortdescription = users_description; } }
93288128-3cb8-4bef-bf27-1f0f0c45ca33
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-13 03:08:28", "repo_name": "Sunilsharma054/PaxTechApp", "sub_path": "/app/src/main/java/in/paxtechnology/paxapp/Activity/KycActivity.java", "file_name": "KycActivity.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "6d01e2b587557608e95468364c9777035d59dd6e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Sunilsharma054/PaxTechApp
226
FILENAME: KycActivity.java
0.220007
package in.paxtechnology.paxapp.Activity; import androidx.appcompat.app.AppCompatActivity; import in.paxtechnology.paxapp.Activity.FeatureLoked; import in.paxtechnology.paxapp.R; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.TextView; public class KycActivity extends AppCompatActivity implements View.OnClickListener { TextView complete_kyc_tx; ImageView kyc_back_img; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().hide(); setContentView(R.layout.activity_kyc); complete_kyc_tx = findViewById(R.id.complete_kyc_tx); kyc_back_img = findViewById(R.id.kyc_back_img); complete_kyc_tx.setOnClickListener(this); kyc_back_img.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.complete_kyc_tx: startActivity(new Intent(this, FeatureLoked.class)); break; case R.id.kyc_back_img: onBackPressed(); break; } } }
ea9d174b-a5b1-42f8-b012-82dc6d23b0c3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-15 11:14:48", "repo_name": "BHLO/ssm", "sub_path": "/ssm_parent_69/ssm_service_69/src/main/java/cn/itcast/service/impl/RoleServiceImpl.java", "file_name": "RoleServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1047, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "6c8216c2ee6b073dfcf6aa91811d16ca1f512779", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BHLO/ssm
221
FILENAME: RoleServiceImpl.java
0.267408
package cn.itcast.service.impl; import cn.itcast.dao.RoleDao; import cn.itcast.domain.SysRole; import cn.itcast.service.RoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; @Service @Transactional public class RoleServiceImpl implements RoleService { @Autowired private RoleDao roleDao; @Override public List<SysRole> findAllRole() { return roleDao.findAllRole(); } @Override public void addRole(SysRole sysRole) { roleDao.addRole(sysRole); } @Override public SysRole findRoleById(Integer roleId) { return roleDao.findRoleById(roleId); } @Override public void managerRolePermission(Integer roleId, Integer[] ids) { roleDao.remove(roleId); if (ids != null && ids.length > 0) { for (Integer pid : ids) { roleDao.save(roleId, pid); } } } }
962803a9-119f-4638-85fe-6bde07c42d68
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-04 13:11:36", "repo_name": "sdf7895/YoutubeProject", "sub_path": "/app/src/main/java/com/example/youtubeproject/app/FinishDialog.java", "file_name": "FinishDialog.java", "file_ext": "java", "file_size_in_byte": 1113, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "917c8451d31302835baca6c09057557d29341f9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sdf7895/YoutubeProject
198
FILENAME: FinishDialog.java
0.235108
package com.example.youtubeproject.app; import android.app.Dialog; import android.content.Context; import android.support.annotation.NonNull; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.example.youtubeproject.Activity.HomeActivity; import com.example.youtubeproject.R; public class FinishDialog extends Dialog { public FinishDialog(@NonNull final Context context) { super(context); setContentView(R.layout.finish_dialog); TextView tv = findViewById(R.id.text); tv.setText(R.string.notice); Button button = findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); ((HomeActivity)context).finish(); } }); Button button2 = findViewById(R.id.button2); button2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); } }
c8864b86-4516-4338-bb91-f5986c940d06
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-08-29T07:58:45", "repo_name": "sero-cash/wiki", "sub_path": "/en/News/Release/SERO-BETANET-R2-HOTFIX.2.md", "file_name": "SERO-BETANET-R2-HOTFIX.2.md", "file_ext": "md", "file_size_in_byte": 1221, "line_count": 42, "lang": "en", "doc_type": "text", "blob_id": "9975075473a59afa7ee45f8ce92167e15ed0f2d8", "star_events_count": 10, "fork_events_count": 18, "src_encoding": "UTF-8"}
https://github.com/sero-cash/wiki
525
FILENAME: SERO-BETANET-R2-HOTFIX.2.md
0.26971
# BETANET-R2-HOTFIX.2 Release Announce ## Release Name BetaNet-R2-HOTFIX.2 ## Release Version v0.4.1-beta.r2-hotfix.2 ## New Features - [x] Performance optimization of multicore processor - [x] Fix the bugs of community feedback - [x] Wallet experience optimization ## Commitment ID go-sero bd871bb3b164ea835085c205297be6726adf0450 go-czero-import 362387d3b48aaffd2cb610a62de84e648e4adc6b console 20bf83d84485793a3e34fa832f365740ae36f994 wallet 7c25e1f1ba7ccc3cc1322dc6f1d70dd25951c9eb ## Release Packages > **The download address of binay packages:** > [https://github.com/sero-cash/go-sero/releases/tag/v0.4.1-beta.r2-hotfix.2](https://github.com/sero-cash/go-sero/releases/tag/v0.4.1-beta.r2-hotfix.2) > > gero-v0.4.1-beta.r2-hotfix.2-darwin-amd64.tar.gz _macos, md5: a35cfa1f9e_ > gero-v0.4.1-beta.r2-hotfix.2-linux-amd64-v3.tar.gz _centos & ubuntu, md5: d9e62e0321_ > gero-v0.4.1-beta.r2-hotfix.2-linux-amd64-v4.tar.gz _for fedora_ > gero-v0.4.1-beta.r2-hotfix.2-windows-amd64.tar.gz _windows, md5:0464710a03_ ## Related Resources BetaNet block explorer: http://explorer.web.sero.cash Source code location: https://github.com/sero-cash/go-sero Smart contract editor: http://remix.web.sero.cash
4206cd0a-d100-4493-b8ca-31e9d3890bd1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-12 04:46:51", "repo_name": "daggerok/thorntail-example", "sub_path": "/8/config/src/main/java/com/github/daggerok/resources/MyResource.java", "file_name": "MyResource.java", "file_ext": "java", "file_size_in_byte": 1020, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "efd325d01b9a058a80dc6e3c6903200e462ee4ce", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/daggerok/thorntail-example
226
FILENAME: MyResource.java
0.23793
package com.github.daggerok.resources; import com.github.daggerok.config.Config; import org.slf4j.Logger; import javax.ejb.Stateless; import javax.inject.Inject; import javax.json.JsonObject; import javax.ws.rs.*; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; @Path("") @Stateless @Produces(APPLICATION_JSON) @Consumes(APPLICATION_JSON) public class MyResource { @Inject Logger log; @Inject @Config("app.banner") String banner; @GET public JsonObject get(JsonObject map) { return jsonObject(GET.class.getSimpleName(), map); } @POST public JsonObject post(JsonObject map) { return jsonObject(POST.class.getSimpleName(), map); } @GET public void getVoid() { jsonObject(GET.class.getSimpleName(), null); } @POST public void postVoid() { jsonObject(POST.class.getSimpleName(), null); } private JsonObject jsonObject(String operation, JsonObject jsonObject) { log.info("[{}] {}: {}", banner, operation, jsonObject); return jsonObject; } }
ccad8cbc-58c7-4b44-8437-b30e1b08584b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-02 06:32:43", "repo_name": "keepqoing/fukoku_v3", "sub_path": "/src/main/java/kr/co/fukoku/filters/ProductStatusFreqFilter.java", "file_name": "ProductStatusFreqFilter.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "b8a6a5fc33a17b44a1ec63e00c2272080af54d7e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/keepqoing/fukoku_v3
226
FILENAME: ProductStatusFreqFilter.java
0.229535
package kr.co.fukoku.filters; public class ProductStatusFreqFilter { private String startDate; private String endDate; private String line; private String machine; public ProductStatusFreqFilter(){ startDate = ""; endDate = ""; line = ""; machine = ""; } public ProductStatusFreqFilter(String startDate, String endDate, String line, String machine) { this.startDate = startDate; this.endDate = endDate; this.line = line; this.machine = machine; } public String getStartDate() { return startDate; } public void setStartDate(String startDate) { this.startDate = startDate; } public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } public String getLine() { return line; } public void setLine(String line) { this.line = line; } public String getMachine() { return machine; } public void setMachine(String machine) { this.machine = machine; } }
9b2712c3-726e-46bf-b567-bd0ef3cb9b2a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-04 18:27:39", "repo_name": "DeniDunca/Restaurant", "sub_path": "/src/main/java/data/Serializer.java", "file_name": "Serializer.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "6869da13156ee4f75bb4b6c4d096a7d3bc25923b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DeniDunca/Restaurant
160
FILENAME: Serializer.java
0.288569
package data; import business.DeliveryService; import java.io.*; public class Serializer implements Serializable{ public void serialize(DeliveryService object) { try { FileOutputStream file = new FileOutputStream("delivery.ser"); ObjectOutputStream out = new ObjectOutputStream(file); out.writeObject(object); out.close(); file.close(); } catch (IOException e) { e.printStackTrace(); } } public DeliveryService deserialize(String path) { DeliveryService restaurant; try { FileInputStream file = new FileInputStream(path); ObjectInputStream in = new ObjectInputStream(file); restaurant = (DeliveryService) in.readObject(); in.close(); file.close(); return restaurant; } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); } return null; } }
95f43325-19e0-4a38-8732-41b3582007c4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-28 12:02:44", "repo_name": "basiji/Payamchin", "sub_path": "/app/src/main/java/utils/Dialogs.java", "file_name": "Dialogs.java", "file_ext": "java", "file_size_in_byte": 1035, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "acfe64c93ffbecfdb2274bdbcdc90ac224853ea0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/basiji/Payamchin
211
FILENAME: Dialogs.java
0.261331
package utils; import android.app.ProgressDialog; import android.content.Context; import android.graphics.Typeface; import android.text.Spannable; import android.text.SpannableString; import android.text.style.RelativeSizeSpan; import com.app.payamchin.R; import com.app.payamchin.helpers.Constants; public class Dialogs { private Context context; private Typeface sans; public Dialogs(Context context){ this.context = context; sans = Typeface.createFromAsset(context.getAssets(),"iransans.ttf"); } public ProgressDialog getProgressDialog(String message){ ProgressDialog pDialog = new ProgressDialog(context); pDialog.setIndeterminate(true); pDialog.setCancelable(false); SpannableString ss= new SpannableString(message); ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new CustomTypefaceSpan("", sans), 0, ss.length(), 0); pDialog.setMessage(ss); return pDialog; } }
e1e8f8b7-51c9-4a5f-83a0-80de906463cd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-07 01:06:39", "repo_name": "virtualSharif/person-management", "sub_path": "/src/main/java/com/wagawin/person/persistance/entity/Child.java", "file_name": "Child.java", "file_ext": "java", "file_size_in_byte": 1091, "line_count": 69, "lang": "en", "doc_type": "code", "blob_id": "a0aaddcffa0001f0b9c0beabacf5b72acab32038", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/virtualSharif/person-management
247
FILENAME: Child.java
0.253861
package com.wagawin.person.persistance.entity; import javax.persistence.*; import java.util.List; @Entity @DiscriminatorColumn(name = "type") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public class Child { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column private Integer id; @Column private String name; @Column private Integer age; @ManyToOne @JoinColumn private Person person; public Child(String name, Integer age, Person person) { this.name = name; this.age = age; this.person = person; } public Child() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } }