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
cca0deaa-de6f-408e-abd0-c3319c9752d6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-06-30T14:05:36", "repo_name": "clingen-data-model/clingen-interpretation", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1226, "line_count": 29, "lang": "en", "doc_type": "text", "blob_id": "cf5769eeb727c0a5acfd15db6619df0e83c8af52", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/clingen-data-model/clingen-interpretation
264
FILENAME: README.md
0.273574
# interpretation Allele (variant) interpretation model and API for ClinGen # Viewing the documentation ```bash bundle install # assumes a working ruby and bundle installation, gets all of the ruby dependencies # only needs to be done once (or when dependencies change) bundle exec middleman # now you should be able to view docs in a browser # at http://localhost:4567 ``` # Updating examples An extensive set of examples are being developed in a google sheets document that is tranformed to json for display/documentation. The partially-transformed example data gets stored in `data/flattened` with each sheet being stored as a separate JSON file. To regenerate this "flattened" data: ```bash # from within the working directory... rm data/flattened/* # this step is necessary to make sure the prior generated data is removed bundle exec ruby ./get_examples.rb ``` Then you can `git diff` to see changes since the last time the sheets data was updated in the repository. If you like them, you can `git add data/flattened` and `git commit`... Or you can run `bundle exec ruby reformat_examples.rb` to get a hierarchical view of the data (with appropriate links among data items).
2b5bddb7-3c80-4104-96bd-90dec679dec2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-18 10:05:14", "repo_name": "antoyohan/Sample_2", "sub_path": "/app/src/main/java/com/example/ando/sample_2/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1056, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "936f10e626babd5b51be885ad76d306c1b584782", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/antoyohan/Sample_2
193
FILENAME: MainActivity.java
0.242206
package com.example.ando.sample_2; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import com.example.ando.sample_2.di.ActivityModule; import com.example.ando.sample_2.di.DaggerActivityComponent; import com.example.ando.sample_2.models.Employee; import com.example.ando.sample_2.models.Vehicle; import javax.inject.Inject; /** * Handles main screen */ public class MainActivity extends AppCompatActivity { @Inject Employee mEmployee; @Inject Vehicle mVehicle; @Inject MainActivityViewModel mainActivityViewModel; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DaggerActivityComponent.builder(). applicationComponent(((SampleApplication) getApplication()).getmApplicationComponent()). activityModule(new ActivityModule(this)).build().inject(this); mainActivityViewModel.setApplication((SampleApplication) getApplication()); } }
3e4fc1e7-6b77-4535-8f4d-30bc7d85ddfc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2009-11-23 22:35:58", "repo_name": "benmoran/Affect-Sampler", "sub_path": "/src/net/benmoran/affectsampler/SyncResult.java", "file_name": "SyncResult.java", "file_ext": "java", "file_size_in_byte": 440, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "f148a1812f7b2af128f1df03ce96516f3fd325c1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/benmoran/Affect-Sampler
255
FILENAME: SyncResult.java
0.279828
/* * * Copyright 2009 (C) Ben Moran * * 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 net.benmoran.affectsampler; public class SyncResult { private Exception mException; private int mCount; public boolean isOK() { return mException == null; } public int getCount() { return mCount; } public Exception getException() { return mException; } public SyncResult(Exception exception) { super(); this.mException = exception; } public SyncResult(int count) { super(); this.mCount = count; } }
d095af00-cce3-4040-81f8-dde9bee2788a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-05-01T23:10:35", "repo_name": "kishima/micro_mruby_for_arduino_uno", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1130, "line_count": 60, "lang": "en", "doc_type": "text", "blob_id": "c29af79a6717ba26b160cef80e1b40b36481d215", "star_events_count": 11, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/kishima/micro_mruby_for_arduino_uno
295
FILENAME: README.md
0.259826
# micro mruby for arduino uno This is my experimental project to show that mruby/c can work on Arduino Uno, which has 2KB RAM. I call it "micro mruby", which is a subset of mruby/c with a lot of limitation. # Required environment * Arduino Uno * Arduino IDE * Complile environment for C (gcc, make) # How to run it? ## Install Copy micro_mruby_for_arduino_uno to the Arduino library folder like other libraries. ## Prepare a transcoder tool This project needs a transcoder tool. This transcodes a mrb file to C header file for mruby/c. ``` $ cd tool $ make ``` You will get the TransCoder. ## Compile target mruby code Please compile your target mruby code. I confirmed it with mruby ver1.3. Latest master version is not supported since the bytecode format is updated. ``` $ mrbc code.rb ``` ## Transcode ``` $ Transcode code.mrb ``` It will make to files in /src. They are "code.h" and "symbol_ids.h". ## Make a binary Open Ardiono IDE. Implement the following sketch. ```C #include "mmruby_arduino.h" void setup() { mmruby_setup(); mmruby_run(); } void loop(){} ``` Then compile and run it on Arduino Uno.
72e370e9-b004-4769-bf0c-ee2277256d74
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-10 18:20:17", "repo_name": "jonahboe/TallyUp", "sub_path": "/app/src/main/java/com/tallyup/datacontainers/Item.java", "file_name": "Item.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "2a4a25d646d70aca90afcb9947b26de8f05f137b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jonahboe/TallyUp
253
FILENAME: Item.java
0.26588
package com.tallyup.datacontainers; /** * One item within a category of inventory. Though it is one item, it can have a varying quantity. */ public class Item { String name; int quantity; /** * What does an item have? * @param name It's name. * @param quantity How many? */ public Item(String name, int quantity) { this.name = name; this.quantity = quantity; } /** * Able to get name. * @return name */ public String getName() { return name; } /** * Able to set the name. * @param name is the name that is to be set for the name. */ public void setName(String name) { this.name = name; } /** * Able to get the quantity. * @return how many of that item you have. */ public int getQuantity() { return quantity; } /** * Able to set the quantity. * @param quantity is the amount of that particular item you have. */ public void setQuantity(int quantity) { this.quantity = quantity; } }
ebdfb80d-ce28-4eaf-88c8-4db897456d27
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-19 22:30:29", "repo_name": "Jucida/SWCAMP-", "sub_path": "/Test2Intent/app/src/main/java/org/androidtown/test2intent/SampleList2Activity.java", "file_name": "SampleList2Activity.java", "file_ext": "java", "file_size_in_byte": 1251, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "772cdf205e1bc3f68c397ac970d76da0c81a797a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Jucida/SWCAMP-
270
FILENAME: SampleList2Activity.java
0.280616
package org.androidtown.test2intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ListView; import android.widget.SimpleAdapter; import java.util.ArrayList; import java.util.HashMap; import static android.R.layout.simple_list_item_2; public class SampleList2Activity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample_list2); ListView listView = (ListView)findViewById(R.id.simple_list2_listView); ArrayList<HashMap<String, String>> hashMapList1 = new ArrayList<HashMap<String, String>>(2); for (int i = 0; i < 10; i++){ HashMap<String,String> map = new HashMap<String, String>(); map.put("line1", "첫번째 줄의" + i + "번"); map.put("line2", "두번째 줄의" + i + "번"); hashMapList1.add(map); } String[] from = {"lin1", "lin2"}; int[] to = {android.R.id.text1, android.R.id.text2}; SimpleAdapter simpleAdapter2 = new SimpleAdapter(this, hashMapList1, simple_list_item_2, from, to); listView.setAdapter(simpleAdapter2); } }
b1e0e059-9991-48eb-ab66-b9ea317535fc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-23 23:45:52", "repo_name": "m4t3u2/aw-restful-spring", "sub_path": "/src/main/java/br/dev/simon/booksapi/services/AuthorsService.java", "file_name": "AuthorsService.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "19bc3d6a67740f2388fd09f3545df5689e1b9979", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/m4t3u2/aw-restful-spring
231
FILENAME: AuthorsService.java
0.286968
package br.dev.simon.booksapi.services; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import br.dev.simon.booksapi.domain.Author; import br.dev.simon.booksapi.repository.AuthorsRepository; import br.dev.simon.booksapi.services.exceptions.AuthorExistException; import br.dev.simon.booksapi.services.exceptions.AuthorNotExistException; @Service public class AuthorsService { @Autowired private AuthorsRepository authorsRepository; public List<Author> list() { return authorsRepository.findAll(); } public Author find(Long id) { Optional<Author> author = authorsRepository.findById(id); if (author.isPresent() == false) { throw new AuthorNotExistException("Author not found!"); } return author.get(); } public Author save(Author author) { if (author.getId() != null) { Optional<Author> exist = authorsRepository.findById(author.getId()); if (exist.isPresent() == true) { throw new AuthorExistException("Autor já existe!"); } } return authorsRepository.save(author); } }
74cb460a-8b10-4a7c-b597-de8768c878eb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-01 15:17:41", "repo_name": "alifianif/MessengerSISTER", "sub_path": "/MessengerSISTER/src/Client/TerimaThread.java", "file_name": "TerimaThread.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "336dd4858c940cb7b7b0f79138818c7fe3f27b84", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/alifianif/MessengerSISTER
205
FILENAME: TerimaThread.java
0.295027
/* * 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 Client; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.Socket; /** * * */ public class TerimaThread implements Runnable { Socket socket=null; BufferedReader terima=null; //constructor public TerimaThread(Socket sock) { this.socket = sock; } //method run public void run() { try{ terima = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));//get inputstream String terimapesan = null; while((terimapesan = terima.readLine()) != null) { System.out.println("Pesan Dari Server : " + terimapesan); System.out.println("Kirim Pesan Anda : "); }// end while }catch(Exception e){ System.out.println(e.getMessage()); } } }
36937fa6-efd9-4fb3-86e4-d7567c005367
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-05-12T21:33:44", "repo_name": "poojaghatge6/Information-Storage-and-Retrieval", "sub_path": "/Search Engine for Clinical Data/readme.md", "file_name": "readme.md", "file_ext": "md", "file_size_in_byte": 1217, "line_count": 13, "lang": "en", "doc_type": "text", "blob_id": "2874419ca406fd3f168ad8d03698071444861ad4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/poojaghatge6/Information-Storage-and-Retrieval
261
FILENAME: readme.md
0.261331
[Click here to watch Demo](https://www.screencast.com/t/gK8oWTB4wQRZ) [Click here to view presentation](https://github.com/poojaghatge6/Information-Storage-and-Retrieval/blob/master/Search%20Engine%20for%20Clinical%20Data/Search%20Engine%20for%20clinical%20data.pptx) Background: The goal of the project is to retrieve relevant scientific abstracts and clinical trials related to the patient’s medical condition. The projects aim to help in the treatment, prevention, and prognosis of the disease pertaining to a patient. The patient can find relevant clinical trials to enroll or would have been eligible to enroll from the retrieved Clinical Trial documents. The scientific abstracts contain information related to the role of certain mutated genes in causing diseases.The clinical trial data contains information related to patient characteristics, disease characteristics, criteria and eligibility to enroll. The search would retrieve entire articles of scientific abstracts and Clinical Trials. Dataset: http://www.trec-cds.org/2018.html Outcome: Search Engine to retrieve clinical documents pertaining to the patient’s medical condition. Technology Stack: Python, Elastic Search, PHP, CSS, JavaScript
ffebac5c-a79f-4436-bdf7-34592ca75d9f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-17 03:52:50", "repo_name": "lixingjie123/Employee-Performance-Evaluation-System", "sub_path": "/Employee-Performance-Evaluation-System/src/main/java/com/epes/demo/entity/UserLogin.java", "file_name": "UserLogin.java", "file_ext": "java", "file_size_in_byte": 1113, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "f66720230e7ec075057cf404c02a7ae128ca019f", "star_events_count": 12, "fork_events_count": 5, "src_encoding": "UTF-8"}
https://github.com/lixingjie123/Employee-Performance-Evaluation-System
281
FILENAME: UserLogin.java
0.229535
package com.epes.demo.entity; import com.gitee.sunchenbin.mybatis.actable.annotation.Column; import com.gitee.sunchenbin.mybatis.actable.annotation.Table; import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.util.Date; /** * Description: * Date: 2018/3/19 * Time: 17:00 * * @Author lixingjie * @Modifice */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @ToString @Table(name = "demo_user_login") public class UserLogin extends BaseEntity{ @Column(name = "id", type = MySqlTypeConstant.CHAR, length = 36, isKey = true, isNull = false) private String id; @Column(name = "password", type = MySqlTypeConstant.VARCHAR, isNull = false) private String password; @Column(name = "createtime", type = MySqlTypeConstant.DATETIME) private String createtime; @Column(name = "modifiedtime", type = MySqlTypeConstant.DATETIME) private String modifiedtime; @Column(name = "dr", type = MySqlTypeConstant.INT) private Integer dr; }
2996429e-0ab3-4ace-969a-6517b4e9a8a1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-08-29 22:02:52", "repo_name": "TickleThePanda/location-history", "sub_path": "/apps/web/src/main/java/uk/co/ticklethepanda/carto/apps/web/config/WorldMapConfig.java", "file_name": "WorldMapConfig.java", "file_ext": "java", "file_size_in_byte": 1225, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "3384f5a69af43e056e7f9588318d24b0d3eba483", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/TickleThePanda/location-history
248
FILENAME: WorldMapConfig.java
0.29584
package uk.co.ticklethepanda.carto.apps.web.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import uk.co.ticklethepanda.carto.apps.web.CountryPolygonLoader; import uk.co.ticklethepanda.carto.core.projection.LongLat; import uk.co.ticklethepanda.carto.core.projection.Projector; import uk.co.ticklethepanda.carto.core.world.WorldMap; import uk.co.ticklethepanda.carto.core.world.WorldMapDrawer; import java.io.IOException; import java.util.Collections; import java.util.List; @Configuration public class WorldMapConfig { @Bean(name="worldMapDrawer") public WorldMapDrawer worldMapDrawer( @Value("${countries.file.path:}") String filePath, Projector projector ) throws IOException { if (!filePath.equals("")) { List<List<LongLat>> countries = CountryPolygonLoader.countryPolygonLoader(filePath); WorldMap worldMap = new WorldMap(countries); return WorldMapDrawer.createProjector(projector, worldMap); } else { return new WorldMapDrawer(projector, Collections.emptyList()); } } }
8943a914-2f80-47f0-918d-e4321a01d162
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-04-07T10:10:41", "repo_name": "Querijn/PoroQueue", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1107, "line_count": 15, "lang": "en", "doc_type": "text", "blob_id": "6e93888a5f2f4564f6f2025d881b75503e9c0db7", "star_events_count": 2, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/Querijn/PoroQueue
253
FILENAME: README.md
0.239349
# PoroQueue Load up poros without changing your summoner icon. ## What is it? Ever had that issue where you load into ARAM, URF or Nexus Blitz and thought; "Oh dang, I've forgotten to equip my poro!"? Well no longer, because this application will make sure that don't have to forget anymore. You load up this app, set it to startup with Windows and let it run in the background. Set your own poro icons and they will all load up and unload automatically. ## How do I get/use it? You simply go to [Releases](https://github.com/Querijn/PoroQueue/releases) and download the latest version. Place it somewhere you won't easily delete it by accident, and run it. When you are logged into League, it will automatically display your icons if you have any, and show the default icon it will switch back to afterwards. Queue up for any of the supported gamemodes, and your icon will automatically change! You can close the window, as long as the application remains running in the background. ![A screenshot showing what it looks like](https://github.com/Querijn/PoroQueue/raw/master/Images/FirstVersion.png)
83084552-7222-43b5-98ba-a2c7d9337cd2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-12 11:57:15", "repo_name": "Efgar/BackendTest", "sub_path": "/src/main/java/com/efgh/revolut/backendtest/service/UserService.java", "file_name": "UserService.java", "file_ext": "java", "file_size_in_byte": 1004, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "fd19a311016c42194ffd1d5d78e0a59622913afa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Efgar/BackendTest
198
FILENAME: UserService.java
0.250913
package com.efgh.revolut.backendtest.service; import com.efgh.revolut.backendtest.entities.User; import com.efgh.revolut.backendtest.entities.UserId; import com.efgh.revolut.backendtest.repositories.UserRepo; public class UserService { private UserRepo userRepo; public UserService(UserRepo userRepo) { this.userRepo = userRepo; } public User addUser(User user) { if (user == null || user.getUserId() == null) { throw new IllegalArgumentException("Invalid user provided"); } if (userRepo.getUserById(user.getUserId()) != null) { throw new IllegalArgumentException("There is already a registered user for the provided ID"); } return userRepo.addUser(user); } public User getUser(UserId userId) { User user = userRepo.getUserById(userId); if (user == null) { throw new IllegalArgumentException("No user registered for the provided ID"); } return user; } }
03048608-647a-4729-88e5-4ab8a4767352
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-03-09T16:02:25", "repo_name": "Sami-BA/IMT2020", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1132, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "9a37d63dded164caef5a8fa13ff15c5ee02608a1", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Sami-BA/IMT2020
277
FILENAME: README.md
0.255344
# How to submit your solution 1. Get a GitHub account, if you don't have one already. 2. Clone this repository with the "Fork" button in the top right corner of the page (if you're not reading this on GitHub, go to <https://github.com/lballabio/IMT2018> first). 3. Check out your clone to your machine. 4. Enter the folder corresponding to your project and modify the contained files. Feel free to add Visual Studio projects, Makefiles, or any other file you might need. You can also add your report there. 5. When you want me to see your progress (ideally, as soon as you have a sketch of the solution), push your changes to your clone and submit a pull request. This is only needed the first time; afterwards, push the new changes to your fork and they will be added to the existing pull request automatically. More detailed instructions for forking and creating pull requests are available at <https://help.github.com/articles/fork-a-repo> and <https://help.github.com/articles/using-pull-requests>. A basic guide to GitHub is at <https://guides.github.com/activities/hello-world/>. Good luck!
5c32fb81-24ca-44f5-8fce-079d85d24b8e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-12 20:05:38", "repo_name": "pasha009/Badminton_Score_Tracker", "sub_path": "/app/src/main/java/com/example/ansh/scoretracker/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "1fec5845a294c903fa44cd533e642424d780d3b8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pasha009/Badminton_Score_Tracker
172
FILENAME: MainActivity.java
0.217338
package com.example.ansh.scoretracker; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button newmatch = (Button) findViewById(R.id.newmatch); Button viewresults = (Button) findViewById(R.id.viewresults); newmatch.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), Start_activity.class); startActivity(intent); } }); viewresults.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), ViewActivity.class); startActivity(intent); } }); } }
3db27531-0ef6-4a37-badf-bc470e1493f0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-31 12:10:49", "repo_name": "JaledMC/Learning-Java", "sub_path": "/GuessMovie/src/LetterFinder.java", "file_name": "LetterFinder.java", "file_ext": "java", "file_size_in_byte": 1227, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "7390ba57d94019c9fa2cf168008a2e176ee38b2b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JaledMC/Learning-Java
248
FILENAME: LetterFinder.java
0.283781
import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; import java.util.concurrent.ThreadLocalRandom; public class LetterFinder { /**Read the file, store all the titles in an array, and select a random one**/ private ArrayList titles= new ArrayList(); private String title; private String fileName = "/home/habib/IdeaProjects/GuessMovie/movieTitles.txt"; public void getFile() { Scanner scanner = new Scanner(System.in); this.fileName = scanner.nextLine(); } public String getTitle() { return this.title; } public void readTitles() { try { FileReader file = new FileReader("/home/habib/IdeaProjects/GuessMovie/" + this.fileName); Scanner fileInput = new Scanner(file); while(fileInput.hasNextLine()){ this.titles.add(fileInput.nextLine()); } } catch (IOException e) { System.out.println("File doesn't exist"); } } public void selectTitle() { int randNumber = ThreadLocalRandom.current().nextInt(0, this.titles.size()); this.title = (String) this.titles.get(randNumber); } }
4a3ef746-2a5c-4214-b3c6-e4856401ca3c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-04 07:59:52", "repo_name": "ajunu/Phase1FinalProject", "sub_path": "/Phase1Pro/src/FileOperations/searchFile.java", "file_name": "searchFile.java", "file_ext": "java", "file_size_in_byte": 1114, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "2d0d4ec53b6ea36ac059a0871fbd9c7b15a5af94", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ajunu/Phase1FinalProject
204
FILENAME: searchFile.java
0.294215
package FileOperations; import java.io.File; import java.io.IOException; public class searchFile implements OperationsSearch{ // This method searches for a file in the directory irrespective of case -sensitivity @Override public String searchFile(String FolderPath,String FileName) throws IOException { displayFile obj =new displayFile(); int count=obj.countFilesFunc(FolderPath); String DirectoryName=FolderPath+"\\"; String fileFound=null; if(count>0) { File file =new File(DirectoryName+FileName); if(file.exists()){ fileFound=DirectoryName+FileName; System.out.println("File Exists"+" "+DirectoryName+FileName); } else{ fileFound=null; System.out.println("File Not Found"); } } else{ System.out.println("Directory is empty"); } return fileFound; } } interface OperationsSearch { public String searchFile(String FolderPath,String FileName) throws IOException; }
ee66a793-9efd-4d58-a545-c181eba0b911
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-12 07:55:16", "repo_name": "PayU-EMEA/paytouch-android", "sub_path": "/sample/full-application/src/main/java/com/payu/android/merchant/MerchantApplication.java", "file_name": "MerchantApplication.java", "file_ext": "java", "file_size_in_byte": 1213, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "83fe82c0758144ebae103bf58fb300daeb36fcab", "star_events_count": 2, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/PayU-EMEA/paytouch-android
210
FILENAME: MerchantApplication.java
0.278257
package com.payu.android.merchant; import android.app.Application; import android.content.Context; import com.payu.android.merchant.injection.AndroidModule; import com.payu.android.merchant.injection.DaggerSampleComponent; import com.payu.android.merchant.injection.SampleComponent; import org.jetbrains.annotations.NotNull; import lombok.AccessLevel; import lombok.NoArgsConstructor; import timber.log.Timber; public class MerchantApplication extends Application { @NoArgsConstructor(access = AccessLevel.PRIVATE) public final static class DaggerComponentInitializer { public static SampleComponent init(@NotNull Context app) { return DaggerSampleComponent.builder() .androidModule(new AndroidModule(app.getApplicationContext())) .build(); } } private SampleComponent objectGraph; public static SampleComponent component(Context context) { return ((MerchantApplication) context.getApplicationContext()).objectGraph; } @Override public void onCreate() { super.onCreate(); Timber.plant(new Timber.DebugTree()); objectGraph = DaggerComponentInitializer.init(this); } }
9f09cd33-af2d-4127-b478-448378dc6f4b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-21 09:13:04", "repo_name": "happyxiaoha/plalform-gateway", "sub_path": "/gateway-web/src/main/java/cn/dceast/platform/gateway/auth/util/ReadFileReplace.java", "file_name": "ReadFileReplace.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "59b565bc3955b911cf492685df83664ce3519da2", "star_events_count": 0, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/happyxiaoha/plalform-gateway
228
FILENAME: ReadFileReplace.java
0.273574
package cn.dceast.platform.gateway.auth.util; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class ReadFileReplace { public static void main(String[] args) { try { // read file content from file StringBuffer sb = new StringBuffer(""); FileReader reader = new FileReader("d://nested//nginx830new.conf"); BufferedReader br = new BufferedReader(reader); String str = null; while ((str = br.readLine()) != null) { sb.append(str + "\r\n"); System.out.println(str); } br.close(); reader.close(); // write string to file FileWriter writer = new FileWriter("d://nested//test2.txt"); BufferedWriter bw = new BufferedWriter(writer); bw.write(sb.toString()); bw.close(); writer.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
a98345e1-73ab-4604-b98c-a6ef8e54ed45
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-19 22:23:57", "repo_name": "anjeludo/bot-ahorro", "sub_path": "/src/main/java/es/tecnova/telegram/bots/commands/AddUser.java", "file_name": "AddUser.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "f0ff5280b53a7e48e46124cd27571aaf85d17595", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/anjeludo/bot-ahorro
207
FILENAME: AddUser.java
0.287768
package es.tecnova.telegram.bots.commands; import java.util.List; import org.telegram.telegrambots.api.methods.send.SendMessage; import org.telegram.telegrambots.api.objects.Message; import org.telegram.telegrambots.logging.BotLogger; import es.tecnova.telegram.ConfigurationHandler; import es.tecnova.telegram.User; import es.tecnova.telegram.Util; public class AddUser extends Command { private static final String LOGTAG = "AddUser"; public AddUser(Command c) { super(c); } @Override public void run(Message message, SendMessage replyMessage, List<SendMessage> othersMsg) { BotLogger.info(LOGTAG, message.getText()); if (Util.countWords(message.getText()) == 2) { String userName = Util.getLastWord(message.getText()); User u = new User(); u.setName(userName); ConfigurationHandler.get().getConf().getUsers().put(u.getName(), u); ConfigurationHandler.get().save(); ConfigurationHandler.get().reload(); } } }
127b596d-22f4-49f5-a4a8-942878303e84
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-30 13:14:42", "repo_name": "techcoderepository/examsimulator", "sub_path": "/src/main/java/com/exam/simulator/model/Company.java", "file_name": "Company.java", "file_ext": "java", "file_size_in_byte": 1213, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "1f5d447c38928cebd75f81fedd0a1f3d7059d253", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/techcoderepository/examsimulator
236
FILENAME: Company.java
0.285372
package com.exam.simulator.model; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; @Entity public class Company { @Id //@GeneratedValue(strategy = GenerationType.SEQUENCE) private Integer companyId; private String name; @OneToMany(targetEntity=Branch.class,cascade = CascadeType.ALL , fetch = FetchType.LAZY, mappedBy = "company") private List<Branch> branches = new ArrayList<>(); public void addBranches(Branch branch){ branches.add(branch); branch.setCompany(this); } public void removeBranches(Branch branch){ branches.remove(branch); branch.setCompany(null); } public Integer getCompanyId() { return companyId; } public void setCompanyId(Integer companyId) { this.companyId = companyId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Branch> getBranches() { return branches; } public void setBranches(List<Branch> branches) { this.branches = branches; } }
87e1b65e-910e-4f03-8e8c-12919d05c85c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-13 17:34:02", "repo_name": "cechiu/Snake", "sub_path": "/MazeApp/MyStack.java", "file_name": "MyStack.java", "file_ext": "java", "file_size_in_byte": 1129, "line_count": 68, "lang": "en", "doc_type": "code", "blob_id": "9f8a12ddb8f14c4a3f364c9b169e0646ce73b1fc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cechiu/Snake
245
FILENAME: MyStack.java
0.292595
/** * Neha Kaki * Creates an arbitrarily large stack */ import java.util.*; public class MyStack<T> implements StackADT<T> { //arraylist that is a stack private ArrayList<T> data; public MyStack() { data = new ArrayList<T>(); } public void push(T item) { data.add(item); } public T pop() throws NoSuchElementException { if (data.size() == 0) { throw new NoSuchElementException(); } else { return data.remove(data.size()-1); } } public T peek() throws NoSuchElementException { if (data.size() == 0) { throw new NoSuchElementException(); } else { return data.get(data.size()); } } public int size() { return data.size(); } public boolean isEmpty() { if (data.size() ==0) { return true; } else { return false; } } public void clear() { data = null; } }
7ab11481-a924-4a35-be27-da27fd88753a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-11-17T09:03:32", "repo_name": "kojiyamauchi/typescript-work", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1011, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "c80818c8116896c20808f9ea323d4b0ac6807d02", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kojiyamauchi/typescript-work
267
FILENAME: README.md
0.252384
<h1 align="center"> 💉<br> Work of TypeScript on Project No.*** </h1> ## 🌡 Resource. ``` resource | |- /base -> TypeScript. | |- *.js -> Creates Entry Point for Each View Page. | |- /Apps -> App**.ts is Choose Required Modules.ts for Each Pages. And Pass to *.js | |- /Modules -> Various Modules.ts | | |- /Globals -> Set Modules to Be Used on All Pages. | | | - It Will Always be Imported into AppGlobal.ts. | | |- /Commons -> Set Modules to Be Used on Multiple Pages. | | | - When App**.ts Imported Modules From This Directory, | | | Get DOM From Their Constructor, Distribute DOM to Each Modules. | | |- /Privates -> Set Modules to Be Used on Single Pages. | | | |- /SubModules -> When Create Sub Modules.( Like a Mixins.) | |- /types -> Type Files. / Declaration ・ Type ・ Interface ・ Enum | |- /tests -> Add Test Files. ( Use Jest. ) ``` <h2 align="center">🧪</h2>
5c61d607-68d4-4946-bc04-315328468353
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-23 16:13:11", "repo_name": "rclark1212/BuildItBigger", "sub_path": "/myshowjokelib/src/main/java/app/com/example/android/myshowjokelib/ShowJoke.java", "file_name": "ShowJoke.java", "file_ext": "java", "file_size_in_byte": 1036, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "3fa08a77152a083eef1a79929240e9c5e139e204", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rclark1212/BuildItBigger
212
FILENAME: ShowJoke.java
0.233706
package app.com.example.android.myshowjokelib; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.View; import android.widget.TextView; import android.widget.Toast; /** * Created by rclark on 1/9/2016. * Shows a joke when invoked with an intent... */ public class ShowJoke extends ActionBarActivity { final public static String JOKE_ARG = "JOKE_ARG"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.show_joke); Intent intent = getIntent(); if (intent != null) { //get the joke from the intent String joke = intent.getStringExtra(JOKE_ARG); TextView text = (TextView) findViewById(R.id.joke_text); if (text != null) { text.setText(joke.toCharArray(), 0, joke.length()); } //Toast.makeText(this, joke, Toast.LENGTH_SHORT).show(); } } }
23830e03-c68c-4e82-88b4-45a8c00f2b13
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-03-23T01:37:38", "repo_name": "Mrk-Nguyen/corgibot", "sub_path": "/Slack_Setup.md", "file_name": "Slack_Setup.md", "file_ext": "md", "file_size_in_byte": 1227, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "2897c9cbb48715aae29df06032e563f09f1ced35", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Mrk-Nguyen/corgibot
442
FILENAME: Slack_Setup.md
0.173288
# Corgi-Bot Setup on Slack 1. Go to: https://YOURCOMPANYHERE.slack.com/apps/A0F7XDU93-hubot 2. Click the button "Add Configuration" 3. Fill out info here: ![](http://i.imgur.com/0j0aHJa.png) Recommend you come up with a clever name such as "jarvis" or "pollo" for your bot. Here is a good pic of Pollo you can use: ![](https://instagram.fsnc1-1.fna.fbcdn.net/vp/94fe4ae141f3bd1c2b7f9907dca7be13/5B319FB0/t51.2885-19/s320x320/26869144_1977647955596072_3418444468947255296_n.jpg) 4. Copy the API Token and set it in your environment variable on your server (or send the token to someone who is setting up the server for you). 5. Wait for the token to be added and for the server to be deployed. 6. Create a private channel and invite your bot with `/invite @pollo`, assuming you named your bot "pollo" 7. Issue a command to test the bot: `pollo corgi me` 8. Other commands the bot supports: - `corgi me` - `corgi bomb` - `corgi bomb N` where N is number of pics - `stumps` - `love you` - `have a bone` 9. Corgi bot also has `pug-me` too that supports the commands - `pug me` - `pug bomb` - `pug bomb N` where N is number of pics 10. Invite the bot to whatever other channel you want the corgi-bot to be in.
2179860a-cd77-4644-ba8e-4c9e90bac568
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-18 05:58:32", "repo_name": "AFinalStone/HM-Tools", "sub_path": "/library/src/main/java/com/hm/iou/tools/ViewConcurrencyUtil.java", "file_name": "ViewConcurrencyUtil.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "ca777773e645e63a35ac10973fbb017527b831d9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AFinalStone/HM-Tools
287
FILENAME: ViewConcurrencyUtil.java
0.285372
package com.hm.iou.tools; import android.view.View; /** * 防止按钮并发 * Created by sll on 2017/6/8. */ public class ViewConcurrencyUtil { // 两次点击按钮之间的点击间隔不能少于600毫秒 private static final int MIN_CLICK_DELAY_TIME = 600; private static long lastClickTime; /** * 是否是快速点击,所有按钮共用一个 * * @return */ public static boolean isFastClicks() { boolean flag = false; long curClickTime = System.currentTimeMillis(); if ((curClickTime - lastClickTime) < MIN_CLICK_DELAY_TIME) { flag = true; } else { lastClickTime = curClickTime; } return flag; } /** * 是否是快速点击 * * @param view * @return */ public static boolean isFastClick(View view) { boolean flag = false; Long t = (Long) view.getTag(R.id.iv_toast_icon); if (t != null && (System.currentTimeMillis() - t) < MIN_CLICK_DELAY_TIME) { flag = true; } else { view.setTag(R.id.iv_toast_icon, System.currentTimeMillis()); } return flag; } }
2f0b4e1b-2757-4d76-93a8-648f71432257
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-03 06:58:41", "repo_name": "lkwdzh/SuperAndroid", "sub_path": "/app/src/main/java/com/example/wytings/activity/ActivityScroll.java", "file_name": "ActivityScroll.java", "file_ext": "java", "file_size_in_byte": 1128, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "e00e3c461e1238e8377769b265126fe0d249ebb2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lkwdzh/SuperAndroid
235
FILENAME: ActivityScroll.java
0.29584
package com.example.wytings.activity; import android.widget.ScrollView; import com.example.wytings.R; import com.example.wytings.utils.MyLog; import com.example.wytings.widget.SuperScrollView; /** * Created by Rex on 2016/3/12. * https://github.com/wytings */ public class ActivityScroll extends BaseActivity { public SuperScrollView scrollView; @Override protected void initialize() { setExtraContent(R.layout.activity_scroll); scrollView = getViewById(R.id.scrollView); scrollView.setOnScrollChangeListener(new SuperScrollView.OnScrollChangeListener() { @Override public void onScrollChanged(ScrollView view, SuperScrollView.ScrollState state) { if (state != SuperScrollView.ScrollState.SCROLLING) { showToast(state); MyLog.d("IDLE - " + view.getScrollX() + "," + view.getScrollY() + "," + state.toString()); } else { MyLog.d("SCROLLING - " + view.getScrollX() + "," + view.getScrollY() + "," + state.toString()); } } }); } }
1e899ba6-e245-4288-9e5b-dbe1dc702267
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-23 16:53:10", "repo_name": "origamigt/modulo_catastro", "sub_path": "/sgm-core/src/main/java/com/origami/sgm/samdoc/composite/SamdocUpload.java", "file_name": "SamdocUpload.java", "file_ext": "java", "file_size_in_byte": 1006, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "9e541ec901d4a1b643fc185d3857117abf6e2a39", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/origamigt/modulo_catastro
204
FILENAME: SamdocUpload.java
0.218669
/* * 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 com.origami.sgm.samdoc.composite; import javax.annotation.PostConstruct; import javax.el.MethodExpression; import javax.faces.component.FacesComponent; import javax.faces.component.UINamingContainer; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; /** * Controladro de compomente de subuda de archivos. * * @author Fernando */ @FacesComponent("samdocUpload") public class SamdocUpload extends UINamingContainer { @PostConstruct public void init() { } public void uploadListener(ActionEvent event) { FacesContext context = FacesContext.getCurrentInstance(); MethodExpression eventListener = (MethodExpression) getAttributes().get("subidaListener"); eventListener.invoke(context.getELContext(), null /* new Object[] { }*/); } }
137d1960-dd59-4236-be30-dc772b006dc4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-21 10:42:28", "repo_name": "NaumTinga/PortManagement", "sub_path": "/src/Model/EmpresaDeContacto.java", "file_name": "EmpresaDeContacto.java", "file_ext": "java", "file_size_in_byte": 1215, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "9c8ee0cc4fca8932b3fbf5182e032417becc6a21", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/NaumTinga/PortManagement
256
FILENAME: EmpresaDeContacto.java
0.259826
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Model; import IContrato.IEmpresaContacto; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; /** * * @author NAUM */ @Entity @Table(name = "empresaDeContacto") public class EmpresaDeContacto implements Serializable,IEmpresaContacto { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int empresaContactoId; private String nome; @Override public long getEmpresaContactoId() { return empresaContactoId; } @Override public void setEmpresaContactoId(int empresaContactoId) { this.empresaContactoId = empresaContactoId; } @Override public String getNome() { return nome; } /** * * @param nome */ @Override public void setNome(String nome) { this.nome = nome; } }
18684371-f508-4b33-aa81-2c10ae426620
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-03-08T09:03:33", "repo_name": "ludawei/myPelicanBlog", "sub_path": "/content/posts/一些有趣的api.md", "file_name": "一些有趣的api.md", "file_ext": "md", "file_size_in_byte": 1867, "line_count": 46, "lang": "zh", "doc_type": "text", "blob_id": "df3e834bb3295abd3cfe071dc77fae45da47f0ff", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ludawei/myPelicanBlog
537
FILENAME: 一些有趣的api.md
0.295027
Title: 一些有趣的api Date: 2018-11-19 Tags: api, 工具 Category: 其它 Slug: some-fun-api #### **1,随机得到一句话** https://v1.hitokoto.cn 接口文档:[https://hitokoto.cn/api](https://hitokoto.cn/api) 一言网(Hitokoto.cn)创立于2016年,隶属于萌创Team,目前网站主要提供一句话服务。 动漫也好、小说也好、网络也好,不论在哪里,我们总会看到有那么一两个句子能穿透你的心。我们把这些句子汇聚起来,形成一言网络,以传递更多的感动。如果可以,我们希望我们没有停止服务的那一天。 简单来说,一言指的就是一句话,可以是动漫中的台词,也可以是网络上的各种小段子。 或是感动,或是开心,有或是单纯的回忆。来到这里,留下你所喜欢的那一句句话,与大家分享,这就是一言存在的目的。 #### **2,随机得到一张图片** http://lorempixel.com/200/200/ https://source.unsplash.com/random/200x200 https://picsum.photos/200/200/?random http://img.xjh.me/random_img.php 获取指定QQ的头像: http://q2.qlogo.cn/headimg_dl?dst_uin=#QQ号#&spec=100 spec 的参数可以是 40, 100, 640 #### **3,随机得到一首诗** http://gxy.me/2017/07/23/qts-api/ 中国古诗词数据库: https://github.com/chinese-poetry/chinese-poetry 诗词搜索接口: http://api.jisuapi.com/tangshi/search #### **4,深度学习生成图片、写诗** https://github.com/chenyuntc/pytorch-book/tree/master/chapter7-GAN生成动漫头像 https://github.com/chenyuntc/pytorch-book/tree/master/chapter9-神经网络写诗(CharRNN) 藏头诗接口:http://t.davhui.top/app/tangshi/一二三四 参考网站: https://hitokoto.cn/api https://blog.csdn.net/qq_38318303/article/details/80066619 https://github.com/chenyuntc/pytorch-book
27682d39-01c6-4e6c-9445-66d241d4cafc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-21 16:41:02", "repo_name": "marektalaj/event-tickets-app", "sub_path": "/tickets-app/src/main/java/org/kupbilet/tickets/domain/ConfirmationModel.java", "file_name": "ConfirmationModel.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "c2a129502e631f4724dfd427e5c17ff0add97da5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/marektalaj/event-tickets-app
236
FILENAME: ConfirmationModel.java
0.279828
package org.kupbilet.tickets.domain; public class ConfirmationModel { private User user; private Ticket[] tickets; public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Ticket[] getTickets() { return tickets; } public void setTickets(Ticket[] tickets) { this.tickets = tickets; } public String getMessege() { StringBuilder messege=new StringBuilder(); if(tickets!=null){ for (Ticket ticket:tickets){ messege.append("Bilet o identyfikatorze: "); messege.append(ticket.getId()); messege.append(", na wydarzenie: "); messege.append(ticket.getEventId().getName()); messege.append(", w cenie: "); messege.append(ticket.getPrice()); messege.append(" | "); } } System.out.println(messege.toString()); return messege.toString(); } public void setMessege(String messege) { } }
53922688-de6c-4cc3-a437-37718f3c170b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-04 10:29:04", "repo_name": "stanislav-pimenov/microservices-samples", "sub_path": "/microservice-2-feign/src/main/java/com/epam/microservice/hello/consumer/HandshakeController.java", "file_name": "HandshakeController.java", "file_ext": "java", "file_size_in_byte": 1130, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "8321d2bcc72efec30a99bcba921c7a5d1fdfb35c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/stanislav-pimenov/microservices-samples
219
FILENAME: HandshakeController.java
0.273574
package com.epam.microservice.hello.consumer; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.IntStream; @RestController //@EnableCircuitBreaker public class HandshakeController { @Autowired HelloClient helloClient; @RequestMapping(path = "/test") @HystrixCommand String doSmth() { //return helloClient.askForHello(); for (int i=0; i< 25; i++) { helloClient.askForHello(); try { // request must follow more frequent than 1 per seconds. In this case circuit breaker will open TimeUnit.MILLISECONDS.sleep(400); } catch (InterruptedException e) { e.printStackTrace(); } } return "ok"; } }
3041d4ac-ad57-4186-90c1-2860ccfe2e5b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-09-30 08:58:43", "repo_name": "dzhukov89/test", "sub_path": "/src/main/java/quenue/TestProducer.java", "file_name": "TestProducer.java", "file_ext": "java", "file_size_in_byte": 1000, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "abf2d2fc6eec0f2d5f521e0b5b0577f862463be8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dzhukov89/test
203
FILENAME: TestProducer.java
0.261331
package quenue; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.ConnectionFactory; import java.io.IOException; /** * @author abelski */ public class TestProducer { private static final String QUEUE_NAME = "testQ"; public static void main(String[] args) throws IOException, InterruptedException { ConnectionFactory factory = new ConnectionFactory(); factory.setHost("localhost"); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); channel.exchangeDeclare("testQ", "fanout"); Integer i =0; while (true) { channel.queueDeclare(QUEUE_NAME, false, false, false, null); channel.basicPublish("testQ", "testS", null, i.toString().getBytes()); System.out.println(" [x] Шлем '" + i++ + "'"); Thread.sleep(1000); } // channel.close(); // connection.close(); } }
e0ad0a3b-7181-476d-9cc5-fde9c9a5974c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-04 10:38:37", "repo_name": "mrKyleWang/hystrix_demo", "sub_path": "/service/src/test/java/RxJavaTest.java", "file_name": "RxJavaTest.java", "file_ext": "java", "file_size_in_byte": 1235, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "b0cf728f7eca1dab2c29b429e4b917f89212fd72", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mrKyleWang/hystrix_demo
299
FILENAME: RxJavaTest.java
0.273574
import org.junit.Test; import rx.Observable; import rx.Subscriber; import rx.schedulers.Schedulers; /** * @author KyleWang * @version 1.0 * @date 2019年09月04日 */ public class RxJavaTest { @Test public void test() { Observable<String> observable = Observable.create((Observable.OnSubscribe<String>) subscriber -> { int count = 1; while (true) { try { System.out.println(Thread.currentThread().getName() + " : observable on next"); Thread.sleep(1000); subscriber.onNext(count++ + ""); } catch (Exception e) { subscriber.onError(e); } } }).subscribeOn(Schedulers.newThread()).observeOn(Schedulers.newThread()); Subscriber<String> subscriber = new Subscriber<String>() { @Override public void onCompleted() { System.out.println(Thread.currentThread().getName() + " : subscriber on completed"); } @Override public void onError(Throwable throwable) { System.out.println(Thread.currentThread().getName() + " : subscriber on error"); } @Override public void onNext(String s) { System.out.println(Thread.currentThread().getName() + " : subscriber on next,msg:" + s); } }; observable.subscribe(subscriber); while (true){ } } }
3f8a7442-3b77-45ff-9572-50826bc73f3b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-28 22:18:03", "repo_name": "codeShuriken/points", "sub_path": "/src/main/java/com/fetchrewards/points/controller/PointsController.java", "file_name": "PointsController.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "b372d8588c128a30f7a7c1aecde10deccd6b2f67", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/codeShuriken/points
183
FILENAME: PointsController.java
0.279828
package com.fetchrewards.points.controller; import com.fetchrewards.points.entities.Payer; import com.fetchrewards.points.entities.Points; import com.fetchrewards.points.entities.Transaction; import com.fetchrewards.points.services.PointsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Map; @RestController @RequestMapping("api/v1/points") public class PointsController { @Autowired private PointsService pointsService; @PostMapping("/addPoints") public Transaction addPoints(@RequestBody Transaction transaction){ return pointsService.addPoints(transaction); } @PostMapping("/spendPoints") public Iterable<Payer> spendPoints(@RequestBody Points points){ return pointsService.spendPoints(points.getPoints()); } @GetMapping("/payersBalance") public Map<String, Integer> getPayersBalance(){ return pointsService.getPayersBalance(); } }
de50d8f4-1621-4398-8bc6-7008090b8dff
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-26 02:00:47", "repo_name": "PBO-Training/vd_phi", "sub_path": "/Back End/MasterService/src/main/java/com/brycen/hrm/masterservice/ms021001Search/MS021001SearchRequest.java", "file_name": "MS021001SearchRequest.java", "file_ext": "java", "file_size_in_byte": 1129, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "0d38d009b8e15a935d186d814df802746a0698fe", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PBO-Training/vd_phi
251
FILENAME: MS021001SearchRequest.java
0.23793
package com.brycen.hrm.masterservice.ms021001Search; import com.brycen.hrm.common.base.BaseRequest; /** * [Description]: Modal contain data need to receive from client to search<br> * [ Remarks ]:<br> * [Copyright]: Copyright (c) 2020<br> * * @author Brycen VietNam Company * @version 1.0 */ public class MS021001SearchRequest extends BaseRequest { private String languageCategoryName; private String languageCategoryCode; public MS021001SearchRequest(String languageCategoryName, String languageCategoryCode) { super(); this.languageCategoryName = languageCategoryName; this.languageCategoryCode = languageCategoryCode; } public String getLanguageCategoryName() { return languageCategoryName; } public void setLanguageCategoryName(String languageCategoryName) { this.languageCategoryName = languageCategoryName; } public String getLanguageCategoryCode() { return languageCategoryCode; } public void setLanguageCategoryCode(String languageCategoryCode) { this.languageCategoryCode = languageCategoryCode; } }
e8454db5-e8a7-4681-8562-5181b250a18b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-31 09:59:57", "repo_name": "jsaguiar/androidMouse", "sub_path": "/MouseBits/MouseBits/src/main/java/com/alltheware/mousebits/Bluetooth.java", "file_name": "Bluetooth.java", "file_ext": "java", "file_size_in_byte": 966, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "8f3c33033984d92044f1e0e8e6b7be1a8c6ec96b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jsaguiar/androidMouse
198
FILENAME: Bluetooth.java
0.213377
package com.alltheware.mousebits; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.Intent; import android.view.View; import java.util.Set; /** * Created by joao on 4/10/14. */ public class Bluetooth { private BluetoothAdapter BA; private Set<BluetoothDevice> pairedDevices; public Bluetooth(BluetoothAdapter BA, Set<BluetoothDevice> pairedDevices) { this.BA = BluetoothAdapter.getDefaultAdapter();; this.pairedDevices = pairedDevices; } public void on(View view){ if (!BA.isEnabled()) { Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); //startActivityForResult(turnOn, 0); //Toast.makeText(MouseActivity.this, "Turned on", Toast.LENGTH_LONG).show(); } else{ // Toast.makeText(getApplicationContext(),"Already on", //Toast.LENGTH_LONG).show(); } } }
f4a4a960-e034-41cf-8949-c1a2ecab38b3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-26 01:24:06", "repo_name": "MiracleDx/Multi-Threading", "sub_path": "/src/com/multi/threading/threadpermessage/EchoServer.java", "file_name": "EchoServer.java", "file_ext": "java", "file_size_in_byte": 1324, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "dfbb650b8777863f2eb4469a0f172935d38fc55e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MiracleDx/Multi-Threading
366
FILENAME: EchoServer.java
0.286968
package com.multi.threading.threadpermessage; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; /** * EchoServer * Thread-Per-Message 服务端原封不动的将客户端的请求发送回客户端 OpenJDK轻量级线程->Fiber * @author Dongx * Description: * Created in: 2019-11-26 下午2:17 * Modified by: */ public class EchoServer { void server() { ServerSocketChannel ssc = null; try { ssc = ServerSocketChannel.open().bind(new InetSocketAddress(8080)); // 处理请求 while (true) { // 接收请求 SocketChannel sc = ssc.accept(); // 每个请求都创建一个线程 new Thread(() -> { // 读socket ByteBuffer rb = ByteBuffer.allocateDirect(1024); try { sc.read(rb); // 模拟处理请求 Thread.sleep(2000); // 写socket ByteBuffer wb = (ByteBuffer) rb.flip(); sc.write(wb); sc.close(); } catch (IOException | InterruptedException e) { e.printStackTrace(); } }).start(); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (ssc != null) { ssc.close(); } } catch (IOException e) { e.printStackTrace(); } } } }
f33bd7cf-83c0-4de3-9e14-78a060e4a829
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-07 09:49:27", "repo_name": "Baskarr18/InterviewTask", "sub_path": "/app/src/main/java/com/example/root/jsonparsingwithrealm/model/GeoPojo.java", "file_name": "GeoPojo.java", "file_ext": "java", "file_size_in_byte": 1223, "line_count": 63, "lang": "en", "doc_type": "code", "blob_id": "a92ba184133a510578ecd1dd8071d0e0b04ba9b5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Baskarr18/InterviewTask
285
FILENAME: GeoPojo.java
0.267408
package com.example.root.jsonparsingwithrealm.model; import android.os.Parcel; import android.os.Parcelable; /** * Created by root on 6/8/17. */ public class GeoPojo implements Parcelable { private String lat; private String lng; public GeoPojo(String lat, String lng) { this.lat = lat; this.lng = lng; } private GeoPojo(Parcel in) { lat = in.readString(); lng = in.readString(); } public static final Creator<GeoPojo> CREATOR = new Creator<GeoPojo>() { @Override public GeoPojo createFromParcel(Parcel in) { return new GeoPojo(in); } @Override public GeoPojo[] newArray(int size) { return new GeoPojo[size]; } }; public String getLat() { return lat; } public void setLat(String lat) { this.lat = lat; } public String getLng() { return lng; } public void setLng(String lng) { this.lng = lng; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(lat); dest.writeString(lng); } }
75292410-db3d-413a-9c6e-64774a23944c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-06 01:21:01", "repo_name": "Douglas-Palte/dougp-socin", "sub_path": "/src/test/java/br/com/dougp/socin/UserTests.java", "file_name": "UserTests.java", "file_ext": "java", "file_size_in_byte": 1045, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "73af2ef96e10360f40829f7a979ce81c32a149dc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Douglas-Palte/dougp-socin
205
FILENAME: UserTests.java
0.247987
package br.com.dougp.socin; import static org.assertj.core.api.Assertions.assertThat; import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.cloud.openfeign.EnableFeignClients; import br.com.dougp.socin.domain.entity.UserEntity; import br.com.dougp.socin.service.UserService; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @EnableFeignClients class UserTests { @Autowired private UserService userService; @Autowired private TestRestTemplate restTemplate; @Test void servico() { List<UserEntity> users = userService.getAllUsers(); assertThat(users).hasSizeGreaterThan(0); } @Test void endPoint() { String body = this.restTemplate.getForObject("/users", String.class); assertThat(body).contains("admin"); } }
c1ecce5f-3464-46ba-b4d9-6243ed111e72
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-20 23:45:23", "repo_name": "ahohm/gestionAbscence", "sub_path": "/src/main/java/com/aho/gestionabscence/model/Classe.java", "file_name": "Classe.java", "file_ext": "java", "file_size_in_byte": 1212, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "35450e662002e526775371f5bcc9bd59218a9f7d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ahohm/gestionAbscence
271
FILENAME: Classe.java
0.262842
package com.aho.gestionabscence.model; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import javax.validation.constraints.Size; import java.util.List; @Data @NoArgsConstructor @AllArgsConstructor @Entity public class Classe { @Id @GeneratedValue(strategy = GenerationType.IDENTITY ) private long id; @Size(min=3, max=30) private String libel; @Size(min=3, max=30) private String nomComplet; @JsonIgnore @OneToMany(mappedBy = "classe", cascade = CascadeType.ALL, fetch = FetchType.LAZY) private List<Abscence> abscences; @JsonIgnore @ManyToMany(mappedBy = "classes") private List<Matiere> matieres; @JsonIgnore @OneToMany private List<Etudiant> etudiants; @Override public String toString() { return "Classe{" + "id=" + id + ", libel='" + libel + '\'' + ", nomComplet='" + nomComplet + '\'' + ", abscences=" + abscences + ", matieres=" + matieres + ", etudiants=" + etudiants + '}'; } }
3cf2f0e3-8a20-41fb-adaf-497b3fa7b15a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-07 08:24:14", "repo_name": "xmRobinYu/pattern-factory", "sub_path": "/learn-spring/gp-spring/src/main/java/com/gp/mymvcframework/myspring/aop/aspect/MyAfterThrowingAdviceInterceptor.java", "file_name": "MyAfterThrowingAdviceInterceptor.java", "file_ext": "java", "file_size_in_byte": 1023, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "731a045dca5a7013104cf5db3ce808dd829ba77a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xmRobinYu/pattern-factory
220
FILENAME: MyAfterThrowingAdviceInterceptor.java
0.249447
package com.gp.mymvcframework.myspring.aop.aspect; import com.gp.mymvcframework.myspring.aop.intercept.MyMethodInterceptor; import com.gp.mymvcframework.myspring.aop.intercept.MyMethodInvocation; import java.lang.reflect.Method; public class MyAfterThrowingAdviceInterceptor extends MyAbstractAspectAdvice implements MyAdvice, MyMethodInterceptor { private String throwingName; public MyAfterThrowingAdviceInterceptor(Method method, Object aspectTarget) { super(method, aspectTarget); } @Override public Object invoke(MyMethodInvocation mi) throws Throwable { //从被织入的代码中才能拿到,JoinPoint Object object = null; try { object = mi.proceed(); } catch (Throwable e) { invokeAdviceMethod(mi, null, e.getCause()); setThrowName(e.getMessage()); throw e; } return object; } public void setThrowName(String throwName) { this.throwingName = throwName; } }
a28f43b2-e6e9-4061-9299-de32b74befaa
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-11 03:10:29", "repo_name": "Lcicero/testeSquadra", "sub_path": "/src/main/java/com/br/testesquadra/web/bean/util/componentes/CustomResourceHandler.java", "file_name": "CustomResourceHandler.java", "file_ext": "java", "file_size_in_byte": 1129, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "25ad71eba37561b89a01ebc350b36732af28feac", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Lcicero/testeSquadra
227
FILENAME: CustomResourceHandler.java
0.26971
package com.br.testesquadra.web.bean.util.componentes; import javax.faces.application.Resource; import javax.faces.application.ResourceHandler; public class CustomResourceHandler extends javax.faces.application.ResourceHandlerWrapper { private static final String LIBRARY_JS = "js"; private static final String LIBRARY_CSS = "css"; private static final String LIBRARY_SPARK = "spark-layout"; private final ResourceHandler wrapped; public CustomResourceHandler(final ResourceHandler wrapped) { this.wrapped = wrapped; } @Override public ResourceHandler getWrapped() { return this.wrapped; } @Override public Resource createResource(final String resourceName, final String libraryName) { final Resource resource = super.createResource(resourceName, libraryName); if ((resource != null) && (libraryName != null) && (libraryName.equalsIgnoreCase(CustomResourceHandler.LIBRARY_JS) || libraryName.equalsIgnoreCase(CustomResourceHandler.LIBRARY_CSS) || libraryName.equalsIgnoreCase(CustomResourceHandler.LIBRARY_SPARK))) { return new CustomResource(resource); } else { return resource; } } }
b57b0028-47ac-4df6-bedf-ed99119ae7c5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-06 13:39:06", "repo_name": "cyberpwnn/ReactPlugin", "sub_path": "/src/main/java/org/cyberpwn/react/controller/Controller.java", "file_name": "Controller.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 73, "lang": "en", "doc_type": "code", "blob_id": "d4b49bc22fcc6c396406ab73ed4f431ebe7cf9c0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cyberpwnn/ReactPlugin
248
FILENAME: Controller.java
0.279042
package org.cyberpwn.react.controller; import org.bukkit.event.Listener; import org.cyberpwn.react.React; import org.cyberpwn.react.util.Dispatcher; public class Controller implements Controllable, Listener { protected final Dispatcher dispatcher; protected final React react; public Controller(React react) { this.react = react; dispatcher = new Dispatcher(this.getClass().getSimpleName()); this.react.register(this); this.react.registerController(this); } @Override public void start() { } @Override public void stop() { } @Override public void tick() { } public void i(String s) { dispatcher.i(s); } public void s(String s) { dispatcher.s(s); } public void f(String s) { dispatcher.f(s); } public void w(String s) { dispatcher.w(s); } public void o(String s) { dispatcher.o(s); } public Dispatcher getDispatcher() { return dispatcher; } public React getReact() { return react; } }
560d6395-5c36-41b7-ac9a-1d244ef59a02
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-12 22:09:56", "repo_name": "VoxleJ/ALControlV3", "sub_path": "/app/src/main/java/com/example/luke/alcontrolv2/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1062, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "1fd52c6180704ae4f7c113148c91c56a6f45455d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/VoxleJ/ALControlV3
185
FILENAME: MainActivity.java
0.205615
package com.example.luke.alcontrolv2; import android.content.Intent; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { private Button button; // Used to load the 'native-lib' library on application startup. static { System.loadLibrary("native-lib"); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle("ALControl"); button = findViewById(R.id.welcome_button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { openActivity2(); } }); } public void openActivity2() { Intent intent = new Intent(this, Activity2.class); startActivity(intent); } }
e260b999-087a-4d2a-b707-519c5cd5f438
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-13 14:19:00", "repo_name": "fenglin098/ZorkProj.", "sub_path": "/src/Room.java", "file_name": "Room.java", "file_ext": "java", "file_size_in_byte": 1227, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "9d30d6369057d24600927bf3cbcfaef7d8dc4bc2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fenglin098/ZorkProj.
242
FILENAME: Room.java
0.279042
import java.util.ArrayList; public class Room { private int row; private int col; private ArrayList<String> items; private String name; private ArrayList<String> direction; public Room() { } public Room(ArrayList<String> items, String name, ArrayList<String> direction) { this.items = items; this.name = name; this.direction = direction; } public ArrayList<String> getItems() { return items; } public void setItems(ArrayList<String> items) { this.items = items; } public String getName() { return name; } public void setName(String name) { this.name = name; } public ArrayList<String> getDirection() { return direction; } public void setDirection(ArrayList<String> direction) { this.direction = direction; } public int userDirection(String x) { switch (x) { case "n": row--; break; case "s": row++; break; case "w": col--; break; case "e": col++; break; } } }
1fdc4e63-828d-4ed8-86e8-4f6af3914ff3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-05 15:26:53", "repo_name": "danish1408/TDD-Framework-TestNG", "sub_path": "/src/test/java/com/freecrm/test/LoginPageTest.java", "file_name": "LoginPageTest.java", "file_ext": "java", "file_size_in_byte": 1053, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "ef301b9fa307c9cb238d8a8ebd8c640ed6e5df7f", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/danish1408/TDD-Framework-TestNG
221
FILENAME: LoginPageTest.java
0.267408
package com.freecrm.test; import com.freecrm.base.BaseClass; import com.freecrm.pages.Homepage; import com.freecrm.pages.LoginPage; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.asserts.Assertion; import static com.freecrm.base.BaseClass.*; public class LoginPageTest extends BaseClass { LoginPage loginPage; Homepage homePage; public LoginPageTest() { super(); } @BeforeMethod public void setUp() { initialization(); loginPage = new LoginPage(); } @Test(priority = 1) public void loginPageTitleTest() { Boolean b = loginPage.validatelink(); Assert.assertTrue(b); } @Test(priority = 3) public void loginTest() { homePage = loginPage.login(prop.getProperty("username"), prop.getProperty("password")); Assert.assertNotNull(homePage); } @AfterMethod public void tearDown() { driver.quit(); } }
cb52d383-ea5a-4f8e-aba3-15805211dd90
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-13 23:07:39", "repo_name": "Dunateo/Minesweeper", "sub_path": "/src/main/java/com/cir3/minesweeper/domain/Utilisateur.java", "file_name": "Utilisateur.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "c5880dc5f27648746426ddeee1fc2d300510dd99", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Dunateo/Minesweeper
261
FILENAME: Utilisateur.java
0.250913
package com.cir3.minesweeper.domain; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity(name = "utilisateur") public class Utilisateur { @Id @Column @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false, unique = true) private String pseudo; @OneToMany(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE }, mappedBy = "user") private Set<Partie> partie = new HashSet<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getPseudo() { return pseudo; } public void setPseudo(String pseudo) { this.pseudo = pseudo; } public Set<Partie> getPartie() { return partie; } public void setPartie(Set<Partie> partie) { this.partie = partie; } public void setPartieUnit(Partie part) { this.partie.add(part); } }
a926bee3-2fd7-444a-b9b7-e76bba426204
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-18 09:08:50", "repo_name": "LucasLinard/Cinephilia", "sub_path": "/app/src/main/java/tech/linard/android/cinephilia/Activities/TrailerAdapter.java", "file_name": "TrailerAdapter.java", "file_ext": "java", "file_size_in_byte": 1213, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "e1cca54f508cb4cebf7a2ac1f608f0a317c7e9a6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LucasLinard/Cinephilia
249
FILENAME: TrailerAdapter.java
0.295027
package tech.linard.android.cinephilia.Activities; import android.content.Context; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.ArrayList; import tech.linard.android.cinephilia.Model.Review; import tech.linard.android.cinephilia.Model.Trailer; import tech.linard.android.cinephilia.R; /** * Created by lucas on 15/01/17. */ public class TrailerAdapter extends ArrayAdapter<Trailer> { public TrailerAdapter(Context context, ArrayList<Trailer> trailers) { super(context, 0, trailers); } @NonNull @Override public View getView(int position, View convertView, ViewGroup parent) { View listItemView = convertView; if (listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate(R.layout.trailer_list_item, parent, false); } Trailer currTrailer= getItem(position); TextView content = (TextView) listItemView.findViewById(R.id.trailer_item_name); content.setText(currTrailer.getName()); return listItemView; } }
074e6f71-ded7-43b7-b4b4-bfdbe85db124
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-21 12:21:02", "repo_name": "smfx1314/website", "sub_path": "/src/main/java/com/jiangfx/service/Impl/BannerServiceImpl.java", "file_name": "BannerServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1150, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "188876483428195a8ccd9bfb3689e8c9b20a96cd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/smfx1314/website
252
FILENAME: BannerServiceImpl.java
0.249447
package com.jiangfx.service.Impl; import com.jiangfx.entity.Banner; import com.jiangfx.mapper.BannerMapper; import com.jiangfx.service.BannerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * Created by jiangfeixiang on 2018/5/3 */ @Service public class BannerServiceImpl implements BannerService { //注入BannerMapper @Autowired private BannerMapper bannerMapper; /** * 查询所有banner * @return */ @Override public List<Banner> getAllBanner() { List<Banner> banner = bannerMapper.getAllBanner(); if (banner.size()>0){ return banner; } return null; } /** * 添加banner */ @Override @Transactional public void saveBanner(Banner banner) { bannerMapper.saveBanner(banner); } /** * 删除banner * @param id */ @Override @Transactional public void deleteBanner(Integer id) { bannerMapper.deleteBanner(id); } }
d6994064-e178-4303-a3c5-bda5abbae3ca
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-11 03:33:13", "repo_name": "himmat1/Android-App-Cultural-Safari", "sub_path": "/Downloads/FinalProjHimmatSinghItp341/app/src/main/java/com/itp341/singh/himmat/finalprojhimmatsinghitp341/PagerAdapter.java", "file_name": "PagerAdapter.java", "file_ext": "java", "file_size_in_byte": 1227, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "8ef718bffd4819764eab81f698b303c434e4bcb3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/himmat1/Android-App-Cultural-Safari
281
FILENAME: PagerAdapter.java
0.283781
package com.itp341.singh.himmat.finalprojhimmatsinghitp341; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import com.itp341.singh.himmat.finalprojhimmatsinghitp341.AccountInfo.AccountPage; /** * Created by himmatsingh on 4/30/17. */ public class PagerAdapter extends FragmentStatePagerAdapter { int mNumOfTabs; public PagerAdapter(FragmentManager fm, int NumOfTabs) { super(fm); this.mNumOfTabs = NumOfTabs; } @Override public Fragment getItem(int position) { switch (position) { case 0: ReligionListFragment tab1 = new ReligionListFragment(); return tab1; case 1: MessageBoardFragment tab2 = new MessageBoardFragment(); return tab2; case 2: AccountPage tab3 = new AccountPage(); return tab3; case 3: AboutFragment tab4 = new AboutFragment(); return tab4; default: return null; } } @Override public int getCount() { return mNumOfTabs; } }
2ab97161-b4db-4edd-b39d-f4fb1a14ebc6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-19 21:23:40", "repo_name": "rafoli/hackathon", "sub_path": "/modules/pdfgen-web/src/main/java/com/liferay/hackathon/users/web/controller/UsersController.java", "file_name": "UsersController.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "5d5bf324dc08ba061ad38667a7072bc13ef858e1", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/rafoli/hackathon
250
FILENAME: UsersController.java
0.284576
package com.liferay.hackathon.users.web.controller; import java.util.Collections; import java.util.Set; import javax.ws.rs.ApplicationPath; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Application; import javax.ws.rs.core.MediaType; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import com.liferay.hackathon.users.service.UsersCreatedService; @Component(immediate = true, service = Application.class) @ApplicationPath("/users") public class UsersController extends Application { // ============== // JAX-RS setup // ============== public Set<Object> getSingletons() { return Collections.<Object> singleton(this); } @GET @Path("/count") @Produces(MediaType.APPLICATION_JSON) public String count() { String result = usersCreateService.getUsersCount(); return "{\"message\":\"" + result + "\"}"; } // ============== // References // ============== @Reference public void setUsersCreatedService(UsersCreatedService usersCreateService) { this.usersCreateService = usersCreateService; } private UsersCreatedService usersCreateService; }
0b18c6e3-a186-4c3a-9202-a65400b9731a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-03 08:05:12", "repo_name": "MSN-04/BESTTEAM", "sub_path": "/bestTeam/src/action/BestSellerAction.java", "file_name": "BestSellerAction.java", "file_ext": "java", "file_size_in_byte": 1003, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "901a46cdf03c705071b0046f7e72ab0a43c0db3a", "star_events_count": 2, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/MSN-04/BESTTEAM
211
FILENAME: BestSellerAction.java
0.291787
package action; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import svc.ShopMainService; import vo.ActionForward; import vo.ItemBean; import vo.PageInfo; public class BestSellerAction implements Action { @Override public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = null; ArrayList<ItemBean> itemList = new ArrayList<>(); String taste = "all"; String filter = "popular"; int degree = 1; // 리스트 개수 ShopMainService shopMainService = new ShopMainService(); int listCount = shopMainService.getListCount(taste, degree); // 총 리스트 받아옴 itemList = shopMainService.getItemList(1, 4, taste, filter, degree); request.setAttribute("itemList", itemList); forward = new ActionForward(); forward.setPath("./index/index.jsp"); return forward; } }
040bd21a-4b9d-4858-9741-a6a3eb11567d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-25 08:54:22", "repo_name": "eriklievaart/q", "sub_path": "/main/java/com/eriklievaart/q/engine/impl/ShellStringBuilder.java", "file_name": "ShellStringBuilder.java", "file_ext": "java", "file_size_in_byte": 1225, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "a8c08e06d5589acef9a0e08444c1f0e90f265d38", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/eriklievaart/q
262
FILENAME: ShellStringBuilder.java
0.289372
package com.eriklievaart.q.engine.impl; import com.eriklievaart.q.engine.parse.ShellArgument; import com.eriklievaart.toolkit.lang.api.concurrent.Prototype; import com.eriklievaart.toolkit.lang.api.str.Str; @Prototype public class ShellStringBuilder { private final StringBuilder builder; public ShellStringBuilder() { builder = new StringBuilder(); } public ShellStringBuilder(final String name) { builder = new StringBuilder(name); } public ShellStringBuilder appendFlagName(final String name) { builder.append(" -").append(name); return this; } public ShellStringBuilder appendArgument(final ShellArgument argument) { builder.append(" "); switch (argument.getType()) { case VARIABLE: builder.append('$').append(argument.getValue()); break; case STRING: builder.append("`").append(argument.getValue()).append("`"); break; default: throw new IllegalArgumentException(Str.sub("unknown type: %", argument.getType())); } return this; } public ShellStringBuilder appendSwallowed(final String swallowed) { if (swallowed != null) { builder.append("|").append(swallowed); } return this; } @Override public String toString() { return builder.toString(); } }
68927ad9-9592-4201-b94e-5e6875098bb7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-26 10:08:48", "repo_name": "developTiger/sy-oa", "sub_path": "/lemon-deanery/src/main/java/com/sunesoft/lemon/deanery/car/domain/ItemProject.java", "file_name": "ItemProject.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "b62cbd7b19dc8bd9fd8ff590513059cc50723ca3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/developTiger/sy-oa
236
FILENAME: ItemProject.java
0.243642
package com.sunesoft.lemon.deanery.car.domain; import com.sunesoft.lemon.fr.ddd.BaseEntity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; /** * Created by swb on 2016/12/16. */ @Entity @Table(name = "syy_oa_itemsproject") public class ItemProject extends BaseEntity{ @Column(name = "items_id",columnDefinition = "NUMBER(19)") private Long itemsId; public Long getItemsId() { return itemsId; } public void setItemsId(Long itemsId) { this.itemsId = itemsId; } @Column(name = "item_name", columnDefinition = "VARCHAR2(50)") private String itemName; public String getItemName() { return itemName; } public void setItemName(String itemName) { this.itemName = itemName; } public ItemProject(Long itemsId, String itemName) { this.itemsId = itemsId; this.itemName = itemName; } public ItemProject() { } }
4eef3128-df82-4067-82ef-1488e0c53d72
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-04 22:05:17", "repo_name": "sharee-app/veverka-backend", "sub_path": "/src/main/java/cz/sharee/backend/domain/tests/Test.java", "file_name": "Test.java", "file_ext": "java", "file_size_in_byte": 1106, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "ab65d1594893c424578bec3f3ec8dd465a973338", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sharee-app/veverka-backend
240
FILENAME: Test.java
0.272799
package cz.sharee.backend.domain.tests; import cz.sharee.backend.domain.TestStatus; import cz.sharee.backend.domain.enumeration.Subjects; import cz.sharee.backend.domain.enumeration.TestType; import cz.sharee.backend.domain.profile.User; import lombok.Data; import javax.persistence.*; import java.util.Set; @Entity @Data public class Test { @Id @GeneratedValue private Long id; @Column(nullable = false) private String name; @OneToOne private Badge badge; @OneToMany private Set<Question> questions; @ManyToOne private User creator; @OneToMany(mappedBy = "reportedTest") private Set<TestReport> testReports; @Column(nullable = false) private Integer points; @Column(nullable = false) @Enumerated(EnumType.STRING) private Subjects subject; @Column(nullable = false) @Enumerated(EnumType.STRING) private TestType type; // community test has to be approved in admin console @Column(nullable = false) @Enumerated(EnumType.STRING) private TestStatus testStatus = TestStatus.WAITING_FOR_APPROVAL; }
a7adb309-141d-491d-8c25-cae30d703544
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-21 16:11:57", "repo_name": "pandrioli/moviews", "sub_path": "/app/src/main/java/digitalhouse/android/a0317moacns1c_02/Model/Media/ImageContainer.java", "file_name": "ImageContainer.java", "file_ext": "java", "file_size_in_byte": 1130, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "d6f83c3a94e491c857b7ed01314216eac5fce765", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pandrioli/moviews
260
FILENAME: ImageContainer.java
0.253861
package digitalhouse.android.a0317moacns1c_02.Model.Media; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import digitalhouse.android.a0317moacns1c_02.Mappers.ImageMapper; /** * Created by Pablo on 25/05/2017. */ public class ImageContainer implements Serializable { private Integer id; private ArrayList<Image> backdrops; private ArrayList<Image> posters; public ImageContainer(){ backdrops = new ArrayList<>(); posters = new ArrayList<>(); } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public ArrayList<Image> getBackdrops() { return backdrops; } public void setBackdrops(ArrayList<Image> backdrops) { this.backdrops = backdrops; } public ArrayList<Image> getPosters() { return posters; } public void setPosters(ArrayList<Image> posters) { this.posters = posters; } public List<String> getURLsList() { ArrayList<String> URLsArray = ImageMapper.map(backdrops); return URLsArray; } }
0a1193b4-6fa9-4eb3-a439-25873cbc773f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-11-13 04:53:03", "repo_name": "nuclearg/nagisa", "sub_path": "/nagisa-lang/src/main/java/com/github/nuclearg/nagisa/lang/lexer/LexToken.java", "file_name": "LexToken.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 55, "lang": "zh", "doc_type": "code", "blob_id": "941b20dc70735d9de11a0c63d1fa7662cd8a5bfb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nuclearg/nagisa
273
FILENAME: LexToken.java
0.277473
package com.github.nuclearg.nagisa.lang.lexer; import com.github.nuclearg.nagisa.lang.lexer.NagisaLexDefinition.NagisaLexTokenType; import com.github.nuclearg.nagisa.lang.util.Range; /** * 词法元素 * * @author enji.lj * */ public final class LexToken { /** * 词法元素类型 */ private final LexTokenType type; /** * 对应的实际文本 */ private final String text; /** * 在源文件中的位置 */ private final Range range; LexToken(LexTokenType type, String text, Range range) { this.type = type; this.text = text; this.range = range; } /** 词法元素类型 */ public LexTokenType getType() { return this.type; } /** 对应的实际文本 */ public String getText() { return this.text; } /** 在源文件中的位置 */ public Range getRange() { return this.range; } @Override public String toString() { if (this.type == NagisaLexTokenType.EOL) return "[EOL]"; else return this.text + "[" + this.type + "]"; } }
a7eaaf13-0251-405e-84d8-17ddc4312f79
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-02 16:46:30", "repo_name": "abhilashguha91/XMLtoCSVGeneratorProject", "sub_path": "/XMLtoCSVGeneratorProject/src/com/test/to/GenericXMLTO.java", "file_name": "GenericXMLTO.java", "file_ext": "java", "file_size_in_byte": 1067, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "c3d6defae0246755828ed306879393e4edf0ac05", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/abhilashguha91/XMLtoCSVGeneratorProject
265
FILENAME: GenericXMLTO.java
0.285372
package com.test.to; import java.util.ArrayList; import java.util.List; /** * The Transition Object contains the generic tree of the * XML key values. * * @author abguha * @version 1.0 * @since 2017-02-16 */ public class GenericXMLTO { private String key; private String value; private String type; private List<GenericXMLTO> children = null; public GenericXMLTO(String key, String value, String type) { super(); this.key = key; this.value = value; this.type = type; this.children = new ArrayList<GenericXMLTO>(); } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getType() { return type; } public void setType(String type) { this.type = type; } public List<GenericXMLTO> getChildren() { return children; } public void setChildren(List<GenericXMLTO> children) { this.children = children; } }
8a1d087e-55eb-4889-92ee-b17b4f86327a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-01 13:46:57", "repo_name": "luialbeto/individualSeleniumCucumber", "sub_path": "/src/test/java/io/cucumber/luiz/pages/SitePageElementsMap.java", "file_name": "SitePageElementsMap.java", "file_ext": "java", "file_size_in_byte": 1129, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "f161c7dccf6366723547ca4035587f2c9a7773df", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/luialbeto/individualSeleniumCucumber
214
FILENAME: SitePageElementsMap.java
0.245085
package io.cucumber.luiz.pages; import static org.junit.Assert.assertTrue; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; public class SitePageElementsMap { public static WebDriver browser; public void seleciono(String string, String string2) { Select selectDropdown = new Select(CommonPage.browser.findElement(By.name(string))); selectDropdown.selectByValue(string2); } public void preencho(String string, String string2) { WebElement input = CommonPage.browser.findElement(By.name(string)); input.sendKeys(string2); } public void pressiono_next(String string) { CommonPage.browser.findElement(By.cssSelector("button[id='next" + string.replace(" ", "") + "']")).click(); } public void formulario(String string) throws InterruptedException { String formularios = CommonPage.browser.findElement(By.cssSelector("li[class='idealsteps-step-active']")) .getText(); assertTrue(formularios.contains(string)); } }
e3f4fda1-4caa-4c7b-8802-87b70565426e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-08-20 16:36:08", "repo_name": "jonahseguin/drink", "sub_path": "/src/main/java/com/jonahseguin/drink/provider/spigot/CommandSenderProvider.java", "file_name": "CommandSenderProvider.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "023cf7eb9e9846c63f3d90e23c1fbc18f6e64609", "star_events_count": 81, "fork_events_count": 32, "src_encoding": "UTF-8"}
https://github.com/jonahseguin/drink
257
FILENAME: CommandSenderProvider.java
0.255344
package com.jonahseguin.drink.provider.spigot; import com.jonahseguin.drink.argument.CommandArg; import com.jonahseguin.drink.exception.CommandExitMessage; import com.jonahseguin.drink.parametric.DrinkProvider; import org.bukkit.command.CommandSender; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.lang.annotation.Annotation; import java.util.Collections; import java.util.List; public class CommandSenderProvider extends DrinkProvider<CommandSender> { public static final CommandSenderProvider INSTANCE = new CommandSenderProvider(); @Override public boolean doesConsumeArgument() { return false; } @Override public boolean isAsync() { return false; } @Override public boolean allowNullArgument() { return true; } @Nullable @Override public CommandSender defaultNullValue() { return null; } @Override @Nullable public CommandSender provide(@Nonnull CommandArg arg, @Nonnull List<? extends Annotation> annotations) throws CommandExitMessage { return arg.getSender(); } @Override public String argumentDescription() { return "sender"; } }
d710f11e-9f70-40c2-b20f-8c9fc487f759
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-11-13T12:40:53", "repo_name": "gitdoit/learning-springboot", "sub_path": "/spring-websocket/src/main/java/org/seefly/springwebsocket/interceptor/HandshakeInterceptor.java", "file_name": "HandshakeInterceptor.java", "file_ext": "java", "file_size_in_byte": 1251, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "852e05cf9fdb682ea5d0041d974e21ed6c7a71a2", "star_events_count": 2, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/gitdoit/learning-springboot
231
FILENAME: HandshakeInterceptor.java
0.229535
package org.seefly.springwebsocket.interceptor; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.stereotype.Component; import org.springframework.web.socket.WebSocketHandler; import javax.servlet.http.HttpSession; import java.util.Map; /** * WebSocket握手前后处理 有意思 * @author liujianxin * @date 2019-02-20 09:36 */ @Component public class HandshakeInterceptor implements org.springframework.web.socket.server.HandshakeInterceptor { @Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception { ServletServerHttpRequest servletRequest = (ServletServerHttpRequest)request; HttpSession session = servletRequest.getServletRequest().getSession(); attributes.put("httpSessionId",session.getId()); return true; } @Override public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception exception) { System.out.println("握手后~~~~"); } }
046eaeeb-f81f-47f9-9d59-71e0666963bb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-15 15:10:19", "repo_name": "santiagoalar/appraisalReport", "sub_path": "/src/main/java/org/example/domain/appraiser/commands/Create_appraiser.java", "file_name": "Create_appraiser.java", "file_ext": "java", "file_size_in_byte": 1061, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "ae67fee55d3f6a18764b68a6316e15de1c872f46", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/santiagoalar/appraisalReport
229
FILENAME: Create_appraiser.java
0.264358
package org.example.domain.appraiser.commands; import co.com.sofka.domain.generic.Command; import org.example.domain.appraiser.values.Appraiser_id; import org.example.generic_values.Email; import org.example.generic_values.Full_name; import org.example.generic_values.Phone_number; public class Create_appraiser implements Command { private final Appraiser_id appraiser_id; private final Full_name full_name; private final Phone_number phone_number; private final Email email; public Create_appraiser(Appraiser_id appraiser_id, Full_name full_name, Phone_number phone_number, Email email) { this.appraiser_id = appraiser_id; this.full_name = full_name; this.phone_number = phone_number; this.email = email; } public Appraiser_id getAppraiser_id() { return appraiser_id; } public Full_name getFull_name() { return full_name; } public Phone_number getPhone_number() { return phone_number; } public Email getEmail() { return email; } }
56716a35-7cb0-48fd-8b8b-8d2ac8271b16
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-11 19:56:44", "repo_name": "bdeasy/commerce-web-android", "sub_path": "/app/src/androidTest/java/com/us/masterpass/referenceApp/utils/Screenshot.java", "file_name": "Screenshot.java", "file_ext": "java", "file_size_in_byte": 1065, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "48cfd473c247d35f730d3b688caac8b1c1ee982d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bdeasy/commerce-web-android
186
FILENAME: Screenshot.java
0.247987
package com.us.masterpass.referenceApp.utils; import android.app.Activity; import android.support.test.InstrumentationRegistry; import android.support.test.uiautomator.UiDevice; import com.squareup.spoon.Spoon; import java.io.File; public class Screenshot { public static void capture(String title){ Activity activity = ((TestApplication) InstrumentationRegistry.getTargetContext().getApplicationContext()).getCurrentActivity(); File outputFile = Spoon.screenshot(activity, title); UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()).takeScreenshot(outputFile); } public static void capture(String title, String testClass, String testMethod) { Activity activity = ((TestApplication) InstrumentationRegistry.getTargetContext().getApplicationContext()).getCurrentActivity(); File outputFile = Spoon.screenshot(activity, title, testClass, testMethod); UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()).takeScreenshot(outputFile); } }
297bba0e-b92a-4259-9071-e0fdd39c2d6f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-25 08:04:27", "repo_name": "Divya0317/Divya", "sub_path": "/src/test/java/resources/stepdefination/project1.java", "file_name": "project1.java", "file_ext": "java", "file_size_in_byte": 1232, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "ea3b8ac1f65be18ab033f660e97516f8ce474907", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Divya0317/Divya
269
FILENAME: project1.java
0.26588
package resources.stepdefination; import cucumber.api.java.en.*; public class project1 { @Given("^user is having valid url$") public void user_is_having_valid_url() { // Write code here that turns the phrase above into concrete actions System.out.println("success"); String str= null; int a=10; int b=0; try{ System.out.println(str.length()); str= "Divya"; } catch(NullPointerException npe) { System.out.println("catch block"); } catch(Exception npe){ System.out.println("parent exception block"); } finally { System.out.println("final block"); } } @Then("^application should launch$") public void application_should_launch(){ // Write code here that turns the phrase above into concrete actions System.out.println("succecess1"); try { throw new NullPointerException(); } catch(NullPointerException npe){ System.out.println("safas"); } } @Then("^sample throws$") public void sample_throws() throws Throwable { // Write code here that turns the phrase above into concrete actions throw new Exception(); } public void sample() throws Throwable{ throw new Exception(); } }
eddad185-9f5e-4d72-9a13-b1688c7e532e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-15 08:44:01", "repo_name": "WRGZTTT/Demo1", "sub_path": "/app/src/main/java/com/example/wegz/demo1/TitleLayout.java", "file_name": "TitleLayout.java", "file_ext": "java", "file_size_in_byte": 1130, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e33ba81e2c3d7956f906b1696a5a253db847f7ac", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/WRGZTTT/Demo1
198
FILENAME: TitleLayout.java
0.214691
package com.example.wegz.demo1; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; public class TitleLayout extends LinearLayout { public TitleLayout(Context context, AttributeSet attrs) { super(context,attrs); LayoutInflater.from(context).inflate(R.layout.title,this); Button titleAids = (Button) findViewById(R.id.title_aids); Button titleMap = (Button) findViewById(R.id.title_map); Button titleKnowledge = (Button) findViewById(R.id.title_knowledge); titleAids.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); titleMap.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); titleKnowledge.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); } }
c459357c-c899-4ab4-92eb-febd26ea3822
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-02 17:37:35", "repo_name": "lesinsa/horn-soft-pub", "sub_path": "/commons/http-logger/http-logger/src/main/java/com/horn/common/logging/config/HttpLogConfiguration.java", "file_name": "HttpLogConfiguration.java", "file_ext": "java", "file_size_in_byte": 1227, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "598e9cee2315bc4f00a9eaabb8c4565407015c95", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lesinsa/horn-soft-pub
261
FILENAME: HttpLogConfiguration.java
0.245085
package com.horn.common.logging.config; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.List; /** * @author by lesinsa on 26.09.2015. */ @XmlRootElement(name = "http-log-config") @XmlAccessorType(XmlAccessType.FIELD) public class HttpLogConfiguration { @XmlElement(name = "reader-datasource") private String readerDataSource; @XmlElement(name = "appender") private List<AppenderDef> appenderDefs; @XmlElement(name = "logger") private List<LoggerDef> loggerDefs; public String getReaderDataSource() { return readerDataSource; } public void setReaderDataSource(String readerDataSource) { this.readerDataSource = readerDataSource; } public List<AppenderDef> getAppenderDefs() { if (appenderDefs == null) { appenderDefs = new ArrayList<>(); } return appenderDefs; } public List<LoggerDef> getLoggerDefs() { if (loggerDefs == null) { loggerDefs = new ArrayList<>(); } return loggerDefs; } }
3a439a7a-d4dc-46ab-b84c-62de54a91c27
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-02 08:52:54", "repo_name": "fiveqiao/pinyougou", "sub_path": "/pinyougou-page-service/src/main/java/com/pinyougou/page/service/impl/PageDeleteListener.java", "file_name": "PageDeleteListener.java", "file_ext": "java", "file_size_in_byte": 1006, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "70648e74715554d439ade68b6e86b4d2de971aab", "star_events_count": 4, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fiveqiao/pinyougou
193
FILENAME: PageDeleteListener.java
0.229535
package com.pinyougou.page.service.impl; import com.pinyougou.page.service.ItemPageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.ObjectMessage; import java.io.Serializable; @Component public class PageDeleteListener implements MessageListener { @Autowired private ItemPageService itemPageService; @Override public void onMessage(Message message) { ObjectMessage objectMessage = (ObjectMessage) message; try { Long[] goodsIds = (Long[]) objectMessage.getObject(); System.out.println("ItemDeleteListener 监听接收到消息..." + goodsIds); boolean result = itemPageService.deleteItemHtml(goodsIds); System.out.println("网页删除结果:"+result); } catch (JMSException e) { e.printStackTrace(); } } }
a15ae8e9-6d95-483e-871c-9c34a2f6a437
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-27 01:50:05", "repo_name": "BobCN2017/CNiaoShop", "sub_path": "/src/main/java/com/ff/pp/cniao/fragment/BaseFragment.java", "file_name": "BaseFragment.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "45966e6909cd2fbd231d3c70040842bd69f63177", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BobCN2017/CNiaoShop
216
FILENAME: BaseFragment.java
0.250913
package com.ff.pp.cniao.fragment; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.support.v4.app.Fragment; import android.text.TextUtils; import com.ff.pp.cniao.Application.MyApplication; import com.ff.pp.cniao.LoginActivity; /** * Created by PP on 2017/4/12. */ public class BaseFragment extends Fragment { public void startActivityAfterCheckLogin(Intent intent) { if (TextUtils.isEmpty(MyApplication.getInstance().getToken())) { Intent loginIntent = new Intent(getContext(), LoginActivity.class); startActivity(loginIntent); MyApplication.getInstance().putFinalIntent(intent); } else { startActivity(intent); } } public void startActivityForResultAfterCheckLogin( Intent intent, int requestCode) { if (TextUtils.isEmpty(MyApplication.getInstance().getToken())) { Intent loginIntent = new Intent(getContext(), LoginActivity.class); startActivity(loginIntent); MyApplication.getInstance().putFinalIntent(intent, requestCode); } else { startActivityForResult(intent, requestCode); } } }
cf82cb6a-f8a2-448c-b0b5-6afd0734b0d1
{"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/ui/CollectionActivity.java", "file_name": "CollectionActivity.java", "file_ext": "java", "file_size_in_byte": 1241, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "cce949c4e761565f7a9f77a86566cc708e8e50e3", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/csuczh/GouDaForAndroid
215
FILENAME: CollectionActivity.java
0.216012
package com.dg.app.ui; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import com.dg.app.AppManager; import com.dg.app.R; import com.dg.app.fragment.CollectionFragment; import com.umeng.message.PushAgent; public class CollectionActivity extends FragmentActivity { private FragmentManager fm; private FragmentTransaction transaction; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PushAgent.getInstance(this).onAppStart(); try { setContentView(R.layout.activity_setting); CollectionFragment collectionFragment = new CollectionFragment(); fm = getSupportFragmentManager(); transaction = fm.beginTransaction(); transaction.replace(R.id.fl_setting_content, collectionFragment); transaction.commit(); } catch (Exception e) { e.printStackTrace(); } AppManager.getAppManager().addActivity(this); } @Override protected void onDestroy() { super.onDestroy(); // 销毁碎片控制器 } }
fcde003c-46f8-40c8-99ec-255ebf8780be
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-01 05:12:16", "repo_name": "wphillips6/SAD_Project4", "sub_path": "/SAD_Project4/src/proj4/common/TeacherAssistant.java", "file_name": "TeacherAssistant.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "3ca0e9beb97f25b1f8fd7c693b852c46bcc9c1ca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wphillips6/SAD_Project4
285
FILENAME: TeacherAssistant.java
0.267408
package proj4.common; import java.util.List; public class TeacherAssistant { private String name; private String taID; private int availNextTerm; private List<Course> teachableCourses; private String strComp; public TeacherAssistant() { this.taID = ""; this.name = ""; this.availNextTerm = 0; this.strComp = ""; } public TeacherAssistant(String id, String name, int availNextTerm) { this.taID = id; this.name = name; this.availNextTerm = availNextTerm; this.strComp = ""; } public int getAvailNextTerm() { return availNextTerm; } public void setAvailNextTerm(int availNextTerm) { this.availNextTerm = availNextTerm; } public String getStrComp() { return strComp; } public void setStrComp(String strComp) { this.strComp = strComp; } public String getName() { return name; } public void setName(String n) { this.name = n; } public List<Course> getTeachableCourses() { return teachableCourses; } public void setTeachableCourses(List<Course> c) { this.teachableCourses = c; } public String getTaID() { return taID; } }
ce22697d-5931-434c-90ea-3f39e302b8af
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-25 10:28:48", "repo_name": "salesoptimizer/release-notes", "sub_path": "/src/main/java/models/ReleaseNote.java", "file_name": "ReleaseNote.java", "file_ext": "java", "file_size_in_byte": 998, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "9dda77971e7b894576e245cfe77c992e3d906358", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/salesoptimizer/release-notes
227
FILENAME: ReleaseNote.java
0.23092
package models; public class ReleaseNote { private String ticketId; private String ticketDate; private String packVersion; private String releaseNotes; public ReleaseNote() { } public ReleaseNote(String ticketId, String ticketDate, String packVersion, String releaseNotes) { this.ticketId = ticketId; this.ticketDate = ticketDate; this.packVersion = packVersion; this.releaseNotes = releaseNotes; } public String getTicketId() { return ticketId; } public void setTicketId(String ticketId) { this.ticketId = ticketId; } public String getTicketDate() { return ticketDate; } public void setTicketDate(String ticketDate) { this.ticketDate = ticketDate; } public String getPackVersion() { return packVersion; } public void setPackVersion(String packVersion) { this.packVersion = packVersion; } public String getReleaseNotes() { return releaseNotes; } public void setReleaseNotes(String releaseNotes) { this.releaseNotes = releaseNotes; } }
39734315-1502-4196-891b-905b8d51842f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-16 10:00:47", "repo_name": "dengbin19910916/order-puller", "sub_path": "/order-puller-core/src/main/java/com/willowleaf/orderpull/core/job/JdbcTimeInterval.java", "file_name": "JdbcTimeInterval.java", "file_ext": "java", "file_size_in_byte": 1239, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "935f3aefdd102c10bb158594f7507a6e22ab22d3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dengbin19910916/order-puller
222
FILENAME: JdbcTimeInterval.java
0.289372
package com.willowleaf.orderpull.core.job; import com.willowleaf.orderpull.core.TimeInterval; import com.willowleaf.orderpull.core.data.OperationRepository; import com.willowleaf.orderpull.core.model.OperationLog; import com.willowleaf.orderpull.core.model.Order; import java.time.LocalDateTime; import java.util.Optional; /** * 基于数据库实现的时间区间。 */ public class JdbcTimeInterval implements TimeInterval { private final OperationRepository operationRepository; private final JobProperties jobProperties; JdbcTimeInterval(OperationRepository operationRepository, JobProperties jobProperties) { this.operationRepository = operationRepository; this.jobProperties = jobProperties; } @Override public LocalDateTime getStartTime(Order.Channel channel) { Optional<OperationLog> lastOperation = operationRepository.findLastOperateTime(channel); return lastOperation.isPresent() ? lastOperation.get().getOperationTime() : jobProperties.getStartTime(); } @Override public LocalDateTime getEndTime(Order.Channel channel) { return getStartTime(channel).plusSeconds(jobProperties.getTimeInterval()); } }
b4395565-d616-4b6d-ba2b-6792d5bfaeee
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-17T11:52:11", "repo_name": "DasserBasyouni/MyAndroidCoursesApps", "sub_path": "/app/src/main/java/unitedapps/com/googleandroidcourses/Courses/DevelopingAndroidApps/PopularMovies_V2/pm2_Utils.java", "file_name": "pm2_Utils.java", "file_ext": "java", "file_size_in_byte": 1130, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "5bdfbc57f1a1e3e60964daa3cc48e10c0db36976", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DasserBasyouni/MyAndroidCoursesApps
257
FILENAME: pm2_Utils.java
0.295027
package unitedapps.com.googleandroidcourses.Courses.DevelopingAndroidApps.PopularMovies_V2; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; /** Created by DB-Project on 8/16/2017. */ class pm2_Utils { public static String strSeparator = "__,__"; static Bitmap getImageFromByteArray(byte[] image) { return BitmapFactory.decodeByteArray(image, 0, image.length); } static String getRateFormat(String rate) { return rate + "/10"; } static String[] getArrayFormat(String array) { return array.split(strSeparator); } static String[] getYoutubeTrailers(String[] youtubeTrailers) { for(int i=0; i<youtubeTrailers.length ;i++){ youtubeTrailers[i] = "https://www.youtube.com/watch?v=" + youtubeTrailers[i]; } return youtubeTrailers; } static String getRunTimeFormat(String time) { return time + "mins"; } static boolean isThisTablesSW600Plus(Context context) { return context.getResources().getConfiguration().smallestScreenWidthDp >= 600; } }
91f4495b-2cbf-4aba-afe7-c5cf78b900e6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-11-21T20:03:59", "repo_name": "mattiaspalmgren/snowily", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1076, "line_count": 19, "lang": "en", "doc_type": "text", "blob_id": "0b0e58ce9f8ac4fae66c87b2be65aab1f67f3a42", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mattiaspalmgren/snowily
246
FILENAME: README.md
0.255344
# snowily A prototype/proof of concept of creative ski map. By combining height, location, weather and direction data, the applications tries to predict the the snow conditions at certain areas in the resort and from that prediction create a ski map, that colors the slopes according to snow conditions rather than difficulty level. The actual snow-type classification isn't implemented in this phase, but the colors is generated randomly just to present the interface. The resort-data have been manually gathered as a proof of concept only for one resort. The resort is named 'Grimentz', so that's the one you should browse in order to see the ski map. ## Start it [Install node](https://docs.npmjs.com/getting-started/installing-node) to be able to use npm (the node package manager). Then, to install all the dependencies and fire up the app, run: ```bash npm install npm run start ``` Then you're good to go, open up a browser and go to [localhost:8080](http://localhost:8080). ## Data Data via [interactive things](https://github.com/interactivethings/swiss-maps/).
13b7d27e-c78e-454d-893d-407dfe3e9573
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-05 18:15:18", "repo_name": "Rofelmau/FussballView", "sub_path": "/src/Model/Match.java", "file_name": "Match.java", "file_ext": "java", "file_size_in_byte": 1082, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "d1df5ab3bb1a5cd8de32e8f3ea6a7e88c4894822", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Rofelmau/FussballView
247
FILENAME: Match.java
0.294215
package Model; import java.time.LocalDateTime; public class Match { private int matchId; private boolean isFinished; private Team teamHome; private Team teamGuest; private int goalTeam1; private int goalTeam2; private LocalDateTime dateOfMatch; public Match(int matchId, boolean isFinished, Team teamHome, Team teamGuest, int goalOne, int goalTwo, LocalDateTime dateOfMatch) { this.matchId = matchId; this.isFinished = isFinished; this.teamHome = teamHome; this.teamGuest = teamGuest; this.goalTeam1 = goalOne; this.goalTeam2 = goalTwo; this.dateOfMatch = dateOfMatch; } public Team getTeamGuest() { return teamGuest; } public Team getTeamHome() { return teamHome; } public int getGoalTeam1(){ return this.goalTeam1; } public int getGoalTeam2(){ return this.goalTeam2; } public boolean isFinished() { return isFinished; } public LocalDateTime getDateOfMatch() { return dateOfMatch; } }
4124a58e-45e1-4ba2-bff2-760f3aa8fcd5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-05-05T18:42:16", "repo_name": "evpozz/CIM540", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1214, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "7bc47f3884dcf9d03b5c9788b12e645ff6dc6e74", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/evpozz/CIM540
247
FILENAME: README.md
0.221351
# CIM540 ## Elizabeth Pozzuoli Dedicated, creative and hardworking. These skills have allowed me to excel in my studies at the University of Miami School of Communication as a public relations major and marketing and interactive media minor. In high school, I held numerous leadership positions including in the arts, sports and community service. As an intern at Outside Eyes Limited, a public relations firm, I am attained public relations and communications skills that supplement my classroom instruction. This past summer, being an intern for Spirit Airlines, I was able to learn that taking the initiative will lead you to lots of new and unexpected opportunities. At UM, I am the graphic designer at the Student Activities and Student Organizations Office and the assistant PR manager of Distraction Magazine. In addition, I am a member of PRSSA, Zeta Tau Alpha, Orange Festival committee and Miss UM committee. I was recently chosen to be a Vice Chair for the Homecoming Executive Committee . I am always striving to bring 100 percent to my work. It is my goal to improve and learn from all of my experiences and opportunities. ![Profile](https://github.com/evpozz/CIM540/blob/master/profile.jpg)
52109342-bc6d-4be6-b9f5-b219e2324287
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-19 13:48:55", "repo_name": "RashidulHasanRatul/Selenium-20-days", "sub_path": "/Basic/DynamicXpath.java", "file_name": "DynamicXpath.java", "file_ext": "java", "file_size_in_byte": 1229, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "9df3cfbe90b39378e73d6de80af85b7be4afd9ad", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RashidulHasanRatul/Selenium-20-days
242
FILENAME: DynamicXpath.java
0.287768
package Testing; import io.github.bonigarcia.wdm.WebDriverManager; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class DynamicXpath { public static void main(String[] args) { WebDriverManager.chromedriver().setup(); WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); String Url = "http://18.209.122.163/admin/login"; driver.get(Url); WebElement email = driver.findElement(By.name("email")); WebElement password = driver.findElement(By.name("password")); //set the element input email.sendKeys("superadmin@gmail.com"); password.sendKeys("superadmin"); //find the button and click on it WebElement login = driver.findElement(By.className("btn-primary")); login.click(); WebElement catalogue = driver.findElement(By.linkText("Catalogue")); catalogue.click(); WebElement Product = driver.findElement(By.xpath("//a[@href='http://18.209.122.163/admin/product']")); Product.click(); } }
8003bc13-0c40-45ee-a4e8-835d69d42600
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-08 04:06:40", "repo_name": "austinwilson1224/CSC131project", "sub_path": "/CSC131project/src/server/Server.java", "file_name": "Server.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "688194b1d09cff0148ba87bb0a2f7b557449c53a", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/austinwilson1224/CSC131project
244
FILENAME: Server.java
0.27513
package server; public class Server { /** * this is where we need to code the listener method * * there will be an instance of an object of maybe a user * when the person loses their device they need to notify the server * that the device is gone * the listener will listen for when this call goes out and will update * the device status to show that it has been lost */ //private User user; //private Device device; private int serverID; /** *user notifies that the device has been lost){ update device status also when the device is found then update to not lost.... */ public void listener(){ // if(user.getDevice().isLost()) { //finish later //return user.getDevice().getLocation(); //} } public Server(int serverID) { this.serverID = serverID; } public void setID(int id) { this.serverID = id; } public int getID() { return this.serverID; } }
b75d80bb-622e-4be4-bba0-adb414a43e69
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-03T12:38:37", "repo_name": "PublicInMotionGmbH/ui-kit", "sub_path": "/packages/device-swap/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1100, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "1e17d53180f319cb2917a309ccbfe8f47e2e7156", "star_events_count": 10, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/PublicInMotionGmbH/ui-kit
255
FILENAME: README.md
0.249447
# Talixo Device Swap UI Component which represents Device Swap ## How to install Package is available as `@talixo/mobile-swap` in NPM registry, so you can use it in your project using `npm install @talixo/mobile-swap --save` or `yarn add @talixo/mobile-swap`. ## Requirements Your package should additionally have some extra dependencies: - `prop-types: ^15.6.1` - `react: ^16.2.0` These packages are required by `@talixo/mobile-swap`, but you have to install them manually, to avoid having different versions of these in your application. ## Supported props There are 3 properties used directly by this component, all other are passed to renderers. Property name | Type | Default | Description --------------|-----------|:-----------:|-------------------------------- defaultView | string | `"desktop"` | `"desktop"` or `"mobile"` - view used until device type is determined renderMobile | function | n/a | renderer for mobile view renderDesktop | function | n/a | renderer for desktop view ## Changelog - **0.1.0** - initial version
e3272bf8-b13c-4bce-940b-e299018ebe9b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-01-30T19:12:20", "repo_name": "ericpugh/drupal-relevant-content", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1103, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "d8a7fd39668d71bd27f9f9c75f2f1f1ba815c848", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ericpugh/drupal-relevant-content
230
FILENAME: README.md
0.221351
Relevant Content ============ Overview ------------ A Drupal 8 module that creates a block of other relevant content based on the number of like taxonomy terms the content references.[The project page on Drupal.org](https://www.drupal.org/project/relevant_content) Dependencies ----------- * Taxonomy * Block Installation ----------- 1. Place the module files in your modules directory. 2. Enable the Relevant Content module at (/admin/modules). 3. Place a Relevant Content block on the "Block Layout" admin page (/admin/structure/block). 4. Set the block settings: * Relevant Content serach criteria, the Vocabularies to use to calculate relevant content. * Number of items, the maximum number of relevant nodes to output. * Allowed results types, the content types to output. * View mode, the view mode of the output. (i.e. Teaser) 5. Set the remaining block settings as usually, including region and block visibility. Note: The Relevant Content block should be restricted to a Content Type or full node page, Relevant Content blocks output on other pages with return no results.
930b3abc-1e6a-4ad3-8e79-de2372ad08e9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-07 17:10:03", "repo_name": "krasus1966/FirstProject", "sub_path": "/src/cn/cx/xm/common/SqlHelper.java", "file_name": "SqlHelper.java", "file_ext": "java", "file_size_in_byte": 1148, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "fca87b1affbe92a6902aab6b1a38e9aea39a96cb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/krasus1966/FirstProject
198
FILENAME: SqlHelper.java
0.242206
package cn.cx.xm.common; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; public class SqlHelper { static{ try { Class.forName("com.mysql.cj.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); System.out.println("请先加载数据库驱动"); } } public static Connection getConnection() throws IOException, SQLException { InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("dbconfig.properties"); Properties properties = new Properties(); properties.load(in); String url=properties.getProperty("url"); String username = properties.getProperty("username"); String pwd = properties.getProperty("pwd"); Connection conn= DriverManager.getConnection(url,username,pwd); return conn; } public static void closeConnection(Connection conn) throws SQLException { if(conn!=null){ conn.close(); } } }
388c822c-6be7-4b15-86f2-76ed074e3e68
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-07 13:37:48", "repo_name": "RuofeiSun/gmall0101", "sub_path": "/gmall-manage-service/src/main/java/com/sunruofei/gmall/manage/impl/PmsProductImageServiceImpl.java", "file_name": "PmsProductImageServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1120, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "1a196a0d626556248a4ab9758cc7ef6429c5cc20", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RuofeiSun/gmall0101
255
FILENAME: PmsProductImageServiceImpl.java
0.259826
package com.sunruofei.gmall.manage.impl; import com.alibaba.dubbo.config.annotation.Service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.sunruofei.gmall.bean.PmsProductImage; import com.sunruofei.gmall.manage.mapper.PmsProductImageMapper; import com.sunruofei.gmall.service.PmsProductImageService; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; /** * <p> * 商品图片表 服务实现类 * </p> * * @author sunruofei * @since 2020-01-07 */ @Service public class PmsProductImageServiceImpl extends ServiceImpl<PmsProductImageMapper, PmsProductImage> implements PmsProductImageService { @Autowired PmsProductImageMapper pmsProductImageMapper; @Override public List<PmsProductImage> getPmsProductImageBySpuId(String spuId) { QueryWrapper<PmsProductImage> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("product_id", spuId); return pmsProductImageMapper.selectList(queryWrapper); } }
91198bc3-cf5d-48f7-9d74-322f0551cf81
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-10 08:57:31", "repo_name": "xushaohan/MesPad", "sub_path": "/app/src/main/java/com/eeka/mespad/utils/FormatUtil.java", "file_name": "FormatUtil.java", "file_ext": "java", "file_size_in_byte": 1067, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "64aceb7d1373454c74ce13d277938906c43cc61a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xushaohan/MesPad
245
FILENAME: FormatUtil.java
0.26588
package com.eeka.mespad.utils; import android.text.TextUtils; import com.eeka.mespad.manager.Logger; /** * 数据转换类,做转换异常处理 * Created by Lenovo on 2017/8/31. */ public class FormatUtil { /** * 字符串转float,以小数点开始或结尾时补0计算 */ public static float strToFloat(String str) { if (TextUtils.isEmpty(str)) { return 0; } if (str.startsWith(".")) { str = "0" + str; } if (str.endsWith(".")) { str = str + "0"; } try { return Float.parseFloat(str); } catch (NumberFormatException e) { Logger.w(e.toString()); } return 0; } public static int strToInt(String str) { if (TextUtils.isEmpty(str)) { return 0; } try { float aFloat = Float.parseFloat(str); return (int) aFloat; } catch (NumberFormatException e) { Logger.w(e.toString()); } return 0; } }
af2e0bc1-738a-49b0-98fb-aee18da5f318
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-18 01:51:45", "repo_name": "zhouyang0105/tech_selenium", "sub_path": "/src/test/java/com/hogwarts/testcase/BaseTest.java", "file_name": "BaseTest.java", "file_ext": "java", "file_size_in_byte": 1169, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "af996fc6710d6d5a6c2dd8574058d3bbb88904f1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhouyang0105/tech_selenium
241
FILENAME: BaseTest.java
0.262842
package com.hogwarts.testcase; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.safari.SafariDriver; /** 0.6 -selenium处理多浏览器-录播 * 初始化driver对象 */ public class BaseTest { public static WebDriver driver; @BeforeAll public static void initData(){ //driver初始化 String browserName = System.getenv("browser"); if("chrome".equals(browserName)){ System.setProperty("webdriver.chrome.driver", "/Users/xiaoyang/Documents/Applications/webDriver/chromedriver"); //驱动路径 driver=new ChromeDriver(); }else if("firefox".equals(browserName)){ //System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver"); driver=new FirefoxDriver(); }else if("safari".equals(browserName)){ driver=new SafariDriver(); } } @AfterAll public static void tearDown(){ driver.quit(); } }
ee0269f8-40d6-4b25-bddd-5eefc8a0194c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-15 11:28:09", "repo_name": "maxblumental/CleanMVPBoilerplate", "sub_path": "/app/src/main/java/com/maxblumental/cleanboilerplate/view/adapter/SearchTabsAdapter.java", "file_name": "SearchTabsAdapter.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "b439610cc13dae3927cf84083f0bd51d7ecf933c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/maxblumental/CleanMVPBoilerplate
240
FILENAME: SearchTabsAdapter.java
0.283781
package com.maxblumental.cleanboilerplate.view.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import com.maxblumental.cleanboilerplate.view.fragment.tabs.PageOneFragment; import com.maxblumental.cleanboilerplate.view.fragment.tabs.PageTwoFragment; public class SearchTabsAdapter extends FragmentPagerAdapter { private static final int TABS_NUMBER = 2; public SearchTabsAdapter(FragmentManager fm) { super(fm); } @Override public int getCount() { return TABS_NUMBER; } @Override public CharSequence getPageTitle(int position) { switch (position) { case 0: return "Page one"; case 1: return "Page two"; } throw new IndexOutOfBoundsException("Invalid tab index!"); } @Override public Fragment getItem(int position) { switch (position) { case 0: return new PageOneFragment(); case 1: return new PageTwoFragment(); } throw new IndexOutOfBoundsException("Invalid tab index!"); } }
843cabaa-8abd-4e0e-9128-26b3de63a61f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-11-01T10:11:28", "repo_name": "brettkirk/TripTracks", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1230, "line_count": 47, "lang": "en", "doc_type": "text", "blob_id": "2d6d5bc892d954170e991fdf118f71f8c6a07c84", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brettkirk/TripTracks
344
FILENAME: README.md
0.276691
# TripTracks ### Description This is a web app that produces playlists based on your location. The goal of the app is to create playlists that contain lyrics with reference to the places you are near. It will assign importance of areas based on population and distance from that city. The idea is to make an app that will produce the ideal soundtrack for a road trip. ### Tech Stack - node.js - react - react dom - material ui - material ui icons - jss - more - tech ### APIs Used - Spotify Web API - MusixMatch API - Geolocation stuffs ### Goals - [X] Get bare-bones ui viewable - [ ] Integrate Spotify with passport - [ ] Use geo-location to find nearby cities - [ ] Set importance ratings for cities - [ ] Store user profiles - [ ] Create settings page - [ ] Add genre filtering to settings page - [ ] Add theme selection to settings page? - [ ] Add more features <!--- ```javascript for (var i = 0; i < this.length; i++) { if (isTrue) { console.log('Wow!'); } } ``` ```javascript GET --header 'Accept: text/plain' 'https://api.musixmatch.com/ws/1.1/track.search?format=jsonp&callback=callback&q_lyrics=Sacramento&s_track_rating=desc&quorum_factor=1&apikey=db058398d44c276d263ee623a61b6b49' ``` --->
27b89fa9-e78b-47ed-ab29-cd212c75e820
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-07 16:01:14", "repo_name": "pc0531/xiaoming-api", "sub_path": "/XiaoMing-domain/src/main/java/com/xiaoming/enums/Constants.java", "file_name": "Constants.java", "file_ext": "java", "file_size_in_byte": 1107, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "be95ceb113c1056d516de4ea5ad3f88a293bbecd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pc0531/xiaoming-api
275
FILENAME: Constants.java
0.281406
package com.xiaoming.enums; public interface Constants { String LOGIN_TOKEN = "Authorization"; interface ExpTime { /** * 用户登录超时时间 */ int UserExpTime = 10 * 24 * 60 * 60 * 1000; /** * 判断超时时间 */ int JudgeExpTime = 20 * 60 * 1000; } interface PayStatus { int Success = 1; int Never = 2; } interface OrderStatus { int Canceled = 6;//已取消 int Complete = 5;//上课完成 int HavePay = 2;//已支付未分配课程 int WaitingPay = 1;//待支付 int Distribute = 3;//已分配 int Starting = 4;//已开始上课 int Canceling = 7;//申请取消 } interface MessageTypeCode { int STATUS_TYPE = 1000; //信息消息 int MSG_TYPE = 1001; } /* * Description: 用户状态码 */ interface UserStatusCode { boolean USER_ONLINE = true; boolean USER_OUTLINE = false; } }
62777bf0-8b3f-4890-8630-caf7680a62e6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-08 04:48:56", "repo_name": "jonathanaschultz/EventMap", "sub_path": "/app/src/main/java/edu/ucla/cs/eventmap/Comment.java", "file_name": "Comment.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "5103409b4e5d1cffc6ffa88d826db27f280c620b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jonathanaschultz/EventMap
210
FILENAME: Comment.java
0.253861
package edu.ucla.cs.eventmap; import java.io.Serializable; public class Comment implements Serializable { public String event; public String owner; public String username; public String comment; public String time; public long hash; //Comment creation time in milliseconds is the hash, odds of collision are nigh impossible public int pin; public Comment() { hash = 0; } public Comment(String event, String owner, String username, String comment, String time, long hash, int pin) { this.event = event; this.owner = owner; this.username = username; this.comment = comment; this.time = time; this.hash = hash; this.pin = pin; } @Override public boolean equals(Object v) { boolean equal = false; if (v instanceof Comment) { if (this.hash == ((Comment) v).hash) { equal = true; } } return equal; } }
988fb339-0c18-4f32-aec5-c0ce4fe64446
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-18 13:26:14", "repo_name": "RoverEast/E_task", "sub_path": "/elevator_task/src/main/java/com/epam/TransportationTask.java", "file_name": "TransportationTask.java", "file_ext": "java", "file_size_in_byte": 1070, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "4e29326afba2422d3e36b87ef35b352414786e4e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RoverEast/E_task
196
FILENAME: TransportationTask.java
0.243642
package com.epam; public class TransportationTask implements Runnable { private Passenger passenger; private volatile boolean complete; public TransportationTask(Passenger passenger) { this.passenger = passenger; } public synchronized void run() { passenger.setPassengerState(PassengerState.IN_PROGRESS); while (!complete) { try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } passenger.setPassengerState(PassengerState.COMPLETED); } public synchronized void checkFloor(Long floorNumber) { if (floorNumber.equals(passenger.getDestinationStory())) complete = true; notifyAll(); } public Passenger getPassenger() { return passenger; } public boolean isComplete() { return complete; } @Override public String toString() { return "TransportationTask{" + "passenger=" + passenger + '}'; } }
71d935a6-4360-4b19-8e16-d5f908a4fb7f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-10 05:28:23", "repo_name": "AmmarRabie/smart-lecture", "sub_path": "/app/src/main/java/cmp/sem/team8/smarlecture/home/newsfeed/NewsFeedActivity.java", "file_name": "NewsFeedActivity.java", "file_ext": "java", "file_size_in_byte": 1227, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "34c521f2a6c80e89d3ce45c47478ed36b5786365", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AmmarRabie/smart-lecture
216
FILENAME: NewsFeedActivity.java
0.259826
package cmp.sem.team8.smarlecture.home.newsfeed; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import cmp.sem.team8.smarlecture.R; import cmp.sem.team8.smarlecture.common.auth.firebase.FirebaseAuthService; import cmp.sem.team8.smarlecture.common.data.firebase.FirebaseRepository; import cmp.sem.team8.smarlecture.common.util.ActivityUtils; public class NewsFeedActivity extends AppCompatActivity { private NewsFeedPresenter newsFeedPresenter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_news_feed); NewsFeedFragment newsFeedFragment = (NewsFeedFragment) getSupportFragmentManager() .findFragmentById(R.id.contentFrame); if (newsFeedFragment == null) { newsFeedFragment = NewsFeedFragment.newInstance(); ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), newsFeedFragment, R.id.contentFrame); } // Create the presenter newsFeedPresenter = new NewsFeedPresenter(FirebaseAuthService.getInstance(), FirebaseRepository.getInstance(), newsFeedFragment); } }
cefc1d02-461c-4e8e-9d31-8045f22b3ae0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-01-19T17:58:30", "repo_name": "RedKenrok/Web-FittingIn", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 992, "line_count": 14, "lang": "en", "doc_type": "text", "blob_id": "ad4c8b126b789f21f9d5e7b824c9c0e0b02cc5ae", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RedKenrok/Web-FittingIn
229
FILENAME: README.md
0.290981
# Fitting in Fitting in is a two person co-operative game where one player takes control of the phone, the other stands in front of the back facing camera. The phone holder then has to tell -not show- the other how to has to pose themself based on the instruction on screen. The better you do the more points you will earn. The game utilizes PoseNet a neural network model build for Tensorflow.js made by Google's Deepmind team. Thanks to Tensorflow.js' ability to run locally on the browser all calculations happen on the device itself to ensure your privacy. ## Requirements To play the game grab a friend and open this webpage on a recent version of Chrome or FireFox using an Android device with a backwards facing camera. (Might work on other devices and browsers but has not been tested.) ## Development This game has been made by [Ron Dekker](https://www.rondekker.nl) and [Jesse Deerenberg](https://linkedin.com/in/jesse-deerenberg-b324113b) during the Global Game Jam of 2019.
4540aa11-e75b-4e41-9b77-ca7e956f996a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-22 07:45:46", "repo_name": "JoelSwa/getAppAndExercise-backend", "sub_path": "/src/main/java/se/joel/coredev/backend/repository/dto/WalkDTO.java", "file_name": "WalkDTO.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "160d0a7bb7abec62ee03639c1dbdcfbd88c33cf7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoelSwa/getAppAndExercise-backend
247
FILENAME: WalkDTO.java
0.240775
package se.joel.coredev.backend.repository.dto; import java.util.Collection; public class WalkDTO { private Long id; private String username; private String name; private Collection<GeofenceDTO> geofenceCollection; public WalkDTO(){} public WalkDTO(String username, String name, Collection<GeofenceDTO> geofenceDTOCollection){ this.username = username; this.name = name; this.geofenceCollection = geofenceDTOCollection; } public WalkDTO(String name, Collection<GeofenceDTO> geofenceDTOCollection){ this.name = name; this.geofenceCollection = geofenceDTOCollection; } public WalkDTO(Long id, String name){ this.id = id; this.name = name; } public WalkDTO(String name){ this.name = name; } public String getUsername() { return username; } public String getName() { return name; } public Long getId(){ return this.id; } public Collection<GeofenceDTO> getGeofenceCollection() { return geofenceCollection; } }
d37e007d-ea4e-4bb7-9602-a9252f175895
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-19 07:28:47", "repo_name": "469412882/DroidKit", "sub_path": "/imagemodule/src/main/java/com/yofish/imagemodule/ImgLoaderDelegate.java", "file_name": "ImgLoaderDelegate.java", "file_ext": "java", "file_size_in_byte": 1140, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "354769c08a16dff3fd020aa3cae40deee102acfc", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/469412882/DroidKit
241
FILENAME: ImgLoaderDelegate.java
0.272799
package com.yofish.imagemodule; import com.yofish.imagemodule.strategy.GlideStrategy; import com.yofish.imagemodule.strategy.IImgLoaderStrategy; /** * 图片加载委托类 * * Created by hch on 2017/8/1. */ public class ImgLoaderDelegate { private IImgLoaderStrategy iImgLoaderStrategy; /** * 默认使用Glide策略加载图片 */ private ImgLoaderDelegate() { iImgLoaderStrategy = getGlideStrategy(); } public static ImgLoaderDelegate getInstance() { return Singleton.INSTANCE.getInstance(); } private enum Singleton { INSTANCE; private ImgLoaderDelegate delegate; Singleton() { delegate = new ImgLoaderDelegate(); } private ImgLoaderDelegate getInstance() { return delegate; } } public IImgLoaderStrategy getLoader() { return iImgLoaderStrategy; } public void setLoader(IImgLoaderStrategy iImgLoaderStrategy) { this.iImgLoaderStrategy = iImgLoaderStrategy; } public GlideStrategy getGlideStrategy() { return GlideStrategy.getInstance(); } }
d11d8310-d326-4af5-b6b3-13a2cc9f8023
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-25 08:01:21", "repo_name": "q1113225201/java-learn", "sub_path": "/src/main/java/com/sjl/learn/service/impl/UserTypeServiceImpl.java", "file_name": "UserTypeServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1083, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "2a49521a72e32130befc34052d96ce17e0236cf3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/q1113225201/java-learn
225
FILENAME: UserTypeServiceImpl.java
0.253861
package com.sjl.learn.service.impl; import com.sjl.learn.dao.base.DbUserTypeMapper; import com.sjl.learn.domain.base.DbUserType; import com.sjl.learn.service.UserTypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class UserTypeServiceImpl implements UserTypeService { @Autowired private DbUserTypeMapper dbUserTypeMapper; @Override public DbUserType selectByPrimaryKey(Integer id) { return dbUserTypeMapper.selectByPrimaryKey(id); } @Override public List<DbUserType> selectByExample() { return dbUserTypeMapper.selectByExample(null); } @Override public int insert(DbUserType dbUserType) { return dbUserTypeMapper.insert(dbUserType); } @Override public int deleteByPrimaryKey(Integer id) { return dbUserTypeMapper.deleteByPrimaryKey(id); } @Override public int updateUser(DbUserType dbUserType) { return dbUserTypeMapper.updateByPrimaryKey(dbUserType); } }
064a7b81-2f44-4283-bf22-18c7e5cc2837
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-11 07:03:43", "repo_name": "Xiaoben336/RecyclerViewDemo", "sub_path": "/app/src/main/java/com/example/zjf/recyclerviewdemo/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "19e0aaea4fa68e8ddee2e23fb73b0c4c5264d70d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Xiaoben336/RecyclerViewDemo
187
FILENAME: MainActivity.java
0.23092
package com.example.zjf.recyclerviewdemo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.Button; public class MainActivity extends Activity implements View.OnClickListener{ private Button btnHomeActivity; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btnHomeActivity = (Button)findViewById(R.id.btnHomeActivity); btnHomeActivity.setOnClickListener(this); } @Override public void onClick(View v) { Intent intent = new Intent(); switch (v.getId()){ case R.id.btnHomeActivity: intent.setClass(MainActivity.this,HomeActivity.class); startActivity(intent); break; case R.id.btnGridLayoutActivityy: intent.setClass(MainActivity.this,GridLayoutActivity.class); startActivity(intent); break; } } }
e22059b3-da90-49e0-9dca-7762775c7657
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-06 11:52:01", "repo_name": "MaeveQIU/twu-biblioteca-shiqiu", "sub_path": "/src/com/twu/biblioteca/entity/Movie.java", "file_name": "Movie.java", "file_ext": "java", "file_size_in_byte": 1002, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "72c416ae72f26e7dbe8adf3c82fde78353137464", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MaeveQIU/twu-biblioteca-shiqiu
239
FILENAME: Movie.java
0.252384
package com.twu.biblioteca.entity; import java.util.Objects; public class Movie implements Item { private String name; private int year; private String director; private Double rating; public Movie(String name, int year, String director, Double rating) { this.name = name; this.year = year; this.director = director; this.rating = rating; } public String getName() { return name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Movie movie = (Movie) o; return year == movie.year && Objects.equals(name, movie.name) && Objects.equals(director, movie.director) && Objects.equals(rating, movie.rating); } @Override public int hashCode() { return Objects.hash(name, year, director, rating); } @Override public String toString() { return name + " | " + year + " | " + director + " | " + rating; } }
e057ef4f-fdc0-475a-b724-e18bdc78b8ec
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-24 15:08:51", "repo_name": "luckygy618/btp400_Lab_Simple-Chatroom", "sub_path": "/Chatroom/src/lab4/chat/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 1213, "line_count": 67, "lang": "en", "doc_type": "code", "blob_id": "09c008be46d77c74d00457af3ab13f923d761319", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/luckygy618/btp400_Lab_Simple-Chatroom
354
FILENAME: User.java
0.291787
/********************************************** Lab 4 Course:<BTP 400> - Semester 4 Last Name:<Cao> First Name:<GuoYu> ID:<061341145> Section:<NAA> This assignment represents my own work in accordance with Seneca Academic Policy. Signature GuoYu Cao Date:<2021-April-09> **********************************************/ package lab4.chat; /** * This is the User class that stores the user's name and ip address * * @author GuoYu Cao * @version 1.0 * @since 1.0 */ public class User { private String name; private String ip; /**. * This is constructor * @param name the name of the user * @param ip the IP of the user */ public User(String name, String ip) { this.name = name; this.ip = ip; } /** * Get the name of the user * @return name the name of the user */ public String getName() { return name; } /** * Set the name of the user *@param name the name of the user */ public void setName(String name) { this.name = name; } /** * Get the IP of the user * @return ip the IP of the user */ public String getIp() { return ip; } /** * Set the IP of the user * @param ip the ip of the user */ public void setIp(String ip) { this.ip = ip; } }
78a4e35f-ea86-4c42-b5da-b4527aa5537c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-24 01:44:47", "repo_name": "spectrumthunderbots/team7167_2019", "sub_path": "/src/main/java/frc/robot/subsystems/Sub_Lift.java", "file_name": "Sub_Lift.java", "file_ext": "java", "file_size_in_byte": 741, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "7ba366ed3244138dd82aa3e164ad10883fa46180", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/spectrumthunderbots/team7167_2019
258
FILENAME: Sub_Lift.java
0.286968
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package frc.robot.subsystems; import edu.wpi.first.wpilibj.VictorSP; import edu.wpi.first.wpilibj.command.Subsystem; import frc.robot.RobotMap; //import edu.wpi.first.wpilibj.Encoder; public class Sub_Lift extends Subsystem { //private Encoder lift_encoder= new Encoder(0, 1); VictorSP m_lift = null; public Sub_Lift() { m_lift = new VictorSP(RobotMap.m_lift); //lift_encoder.setDistancePerPulse(4*Math.PI); } public void move(double speed) { m_lift.set(speed); //addChild("Encoder", lift_encoder); } //public double getDistance(){ //return lift_encoder.getDistance(); // public void reset() { //lift_encoder.reset(); //} //} @Override public void initDefaultCommand() { } }
3e3cc73f-0fb7-4985-976a-33ffbafb1e13
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-24 14:33:25", "repo_name": "kopa4al2/simple-blog", "sub_path": "/src/main/java/com/example/website/models/entities/Role.java", "file_name": "Role.java", "file_ext": "java", "file_size_in_byte": 1213, "line_count": 64, "lang": "en", "doc_type": "code", "blob_id": "e7973cc78085c9ccc225446b4fc296b623d27087", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kopa4al2/simple-blog
264
FILENAME: Role.java
0.288569
package com.example.website.models.entities; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.util.HashSet; import java.util.Set; @Entity @Table(name = "roles") public class Role { @Id @Column(name="id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name="name") @NotNull private String name; @ManyToMany(mappedBy = "roles") private Set<User> users; public Role() { } public Integer getId() { return this.id; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Set<User> getUsers() { if(this.users == null) return new HashSet<>(); return this.users; } public void setUsers(Set<User> users) { this.users = users; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Role role = (Role) o; return name.equals(role.name); } @Override public int hashCode() { return name.hashCode(); } }