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
32fa8235-5fad-470d-8e3a-6c6d991dd1da
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-26 16:27:06", "repo_name": "univermal/webflux-mongodb-react-starter", "sub_path": "/backend/src/main/java/com/purini/config/SwaggerWebFilter.java", "file_name": "SwaggerWebFilter.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 25, "lang": "en", "doc_type": "code", "blob_id": "26189984885429e3401c31670660e9996648935c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/univermal/webflux-mongodb-react-starter
202
FILENAME: SwaggerWebFilter.java
0.206894
package com.purini.config; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.stereotype.Component; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebFilterChain; import reactor.core.publisher.Mono; @Component public class SwaggerWebFilter implements WebFilter { @Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) { ServerHttpRequest request = exchange.getRequest(); String path = request.getPath().pathWithinApplication().value(); if (path.startsWith("/api/swagger-ui") || path.startsWith("/api/webjars") || path.startsWith("/api/api-docs") || path.startsWith("/api/configuration") || path.startsWith("/api/swagger-resources") || path.startsWith("/api/v2/api-docs")) { exchange = exchange.mutate().request(request.mutate().path(path.substring(4)).build()).build(); } return chain.filter(exchange); } }
cce67850-3051-41e3-b348-7a15dc57a461
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-05 12:18:24", "repo_name": "nyilasypeter/progmaticapp", "sub_path": "/src/main/java/com/progmatic/progmappbe/helpers/MarkdownHelper.java", "file_name": "MarkdownHelper.java", "file_ext": "java", "file_size_in_byte": 1081, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "eebc3916c9330feabb245a0a8ac23902851d38d1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nyilasypeter/progmaticapp
199
FILENAME: MarkdownHelper.java
0.23231
package com.progmatic.progmappbe.helpers; import org.commonmark.node.*; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; import org.dozer.CustomConverter; public class MarkdownHelper implements CustomConverter { public static String markDownToHTMLSafe(String markdownString){ Parser parser = Parser.builder().build(); Node document = parser.parse(markdownString); HtmlRenderer renderer = HtmlRenderer .builder() .escapeHtml(true) .sanitizeUrls(true) .build(); String html = renderer.render(document); return html; } @Override public Object convert(Object existingDestinationFieldValue, Object sourceFieldValue, Class<?> destinationClass, Class<?> sourceClass) { if(sourceFieldValue == null){ return null; } if(!(sourceFieldValue instanceof String)){ return null; } String from = (String) sourceFieldValue; return markDownToHTMLSafe(from); } }
a93fe4b2-4140-4ae0-8088-22f93863c422
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-17 07:07:51", "repo_name": "razzmed/KyrgyzNameApp", "sub_path": "/app/src/main/java/com/example/kyrgyznameapp/BoysNamesDetailFragment.java", "file_name": "BoysNamesDetailFragment.java", "file_ext": "java", "file_size_in_byte": 1121, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "fd54ea2e68c8a1704367df9963932b08b623da59", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/razzmed/KyrgyzNameApp
209
FILENAME: BoysNamesDetailFragment.java
0.245085
package com.example.kyrgyznameapp; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class BoysNamesDetailFragment extends Fragment { private int boysNamesId; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_boys_names_detail, container, false); } @Override public void onStart() { super.onStart(); View view = getView(); if(view != null) { TextView nameTitle = view.findViewById(R.id.titleBoysNames); BoysNames boysNames = BoysNames.boysNames[boysNamesId]; nameTitle.setText(boysNames.getName()); TextView nameDescription = view.findViewById(R.id.descriptionBoysNames); nameDescription.setText(boysNames.getDescription()); } } public void setBoysNames(int id) { this.boysNamesId = id; } }
c989c07b-65d4-4dc2-9106-528560c3d0a1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-16 11:48:18", "repo_name": "JacobTheLiar/sda-4team-carrent", "sub_path": "/src/main/java/pl/team/carrent/employee/Role.java", "file_name": "Role.java", "file_ext": "java", "file_size_in_byte": 1202, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "a99d747634a716b5326ddc91f519573a106ef07a", "star_events_count": 5, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/JacobTheLiar/sda-4team-carrent
259
FILENAME: Role.java
0.242206
package pl.team.carrent.employee; import org.springframework.security.core.GrantedAuthority; import javax.persistence.*; import java.util.Objects; @Entity public class Role implements GrantedAuthority { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqRole") @SequenceGenerator(name = "seqRole", sequenceName = "seq_Role", allocationSize = 1) private int id; private String authority; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getAuthority() { return authority; } public void setAuthority(String authority) { this.authority = authority; } public Role() { } public Role(String authority) { this.authority = authority; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Role role = (Role) o; return Objects.equals(id, role.id) && Objects.equals(authority, role.authority); } @Override public int hashCode() { return Objects.hash(id, authority); } }
1de71f63-347a-48d3-9b32-9bd1b493de47
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-17 09:43:57", "repo_name": "ShivaaKg000/ConsigliaVIaggiDesktop", "sub_path": "/consiglia-viaggi-desktop/src/main/java/consigliaViaggiDesktop/view/MenuView.java", "file_name": "MenuView.java", "file_ext": "java", "file_size_in_byte": 1084, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "f1ca1523017dc76d71a79a9fa3be2945d526c12e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ShivaaKg000/ConsigliaVIaggiDesktop
217
FILENAME: MenuView.java
0.261331
package consigliaViaggiDesktop.view; import consigliaViaggiDesktop.Constants; import consigliaViaggiDesktop.controller.NavigationController; import javafx.fxml.FXML; import javafx.scene.layout.BorderPane; import javafx.scene.text.Text; import javafx.stage.Stage; public class MenuView { @FXML private Text welcomeText; @FXML private BorderPane menuView; public String userName; public void nomeUser(String username){ this.userName=username; } public void initialize() { welcomeText.setText("Benvenuto, "+this.userName); } @FXML private void logout(){ NavigationController.getInstance().navigateBack(); } @FXML private void recensioni() { Stage window = (Stage) menuView.getScene().getWindow(); NavigationController.getInstance().setCurrentStage(window); NavigationController.getInstance().navigateToView(Constants.REVIEW_VIEW); } @FXML private void strutture() { NavigationController.getInstance().navigateToView(Constants.ACCOMMODATION_VIEW); } }
888fe69f-bf69-46af-8ff1-f7794cdae853
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-27 13:59:04", "repo_name": "zhangqianvvip/demo3", "sub_path": "/workspace-sts-3.9.3.RELEASE/demo-1/src/main/java/com/controller/controller.java", "file_name": "controller.java", "file_ext": "java", "file_size_in_byte": 1127, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "096ca281298c73f3b7c1275776172e6afe9632cd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhangqianvvip/demo3
212
FILENAME: controller.java
0.242206
package com.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.example.bean.ConfigBean; @RestController //@EnableConfigrationProperties({ConfigBean.class}) @Component @Profile({"prod"}) public class controller { @Autowired ConfigBean configBean; @RequestMapping(value = "/config") public String config() { return configBean.toString(); } @Value("${hello:name}") private String hello; @Value("${name:age}") private String name; @RequestMapping(value = "/my") public String my() { return name; } @RequestMapping("hellow") public String hellow() { return ""; } @RequestMapping("hellow1") public String getMessage() { return this.hello + "" + this.name; } }
69b2860c-3ccf-49ce-96b8-11ff3c1a7653
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-08-19T10:23:44", "repo_name": "tanhauhau/tanhauhau.github.io", "sub_path": "/src/routes/notes/babel-flow-pragma-bug.md", "file_name": "babel-flow-pragma-bug.md", "file_ext": "md", "file_size_in_byte": 1199, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "e09cc50fc3cc7e121a818e5f01572b6c8b78aa44", "star_events_count": 33, "fork_events_count": 13, "src_encoding": "UTF-8"}
https://github.com/tanhauhau/tanhauhau.github.io
407
FILENAME: babel-flow-pragma-bug.md
0.214691
--- title: babel flow pragma bug tags: - babel - flow --- ## The article [Parsing error when calling generic function with type arguments](/parsing-error-flow-type-parameter-instantiation) ## Materials for the babel flow bug article - https://flow.org/en/docs/config/options/#toc-max-header-tokens-integer - https://github.com/facebook/flow/commit/ef73d5a76fbc52c191e3e0bbbf767c52b78f3fad - https://github.com/facebookarchive/node-haste/blob/master/README.md - https://github.com/babel/babylon/pull/76/files - https://astexplorer.net/ a<x>(y); // @flow a<x>(y); https://babeljs.io/repl#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=IYHgHgfAFAnglAbgFAHoUAIACAzANgewHclRJZEg&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=es2015%2Cflow%2Cenv&prettier=false&targets=&version=7.4.3&externalPlugins=%40babel%2Fplugin-syntax-flow%407.2.0 - issues - https://github.com/babel/babel/issues/9240 - https://github.com/facebook/flow/commit/ef73d5a76fbc52c191e3e0bbbf767c52b78f3fad - https://flow.org/en/docs/config/options/#toc-max-header-tokens-integer
f88ba76e-1365-4de1-b255-ae4a8f9e6b00
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-04-16T14:33:27", "repo_name": "DonovanGalloway/ISTA_220", "sub_path": "/Homework/Ch3Homework.md", "file_name": "Ch3Homework.md", "file_ext": "md", "file_size_in_byte": 1231, "line_count": 13, "lang": "en", "doc_type": "text", "blob_id": "82b983a821f6c377dcd458c3791c6e2694632182", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DonovanGalloway/ISTA_220
309
FILENAME: Ch3Homework.md
0.288569
# ISTA 220_C# CH2 HW ## Donovan Galloway ### February 27, 2018 1. What is a method? A named sequence of statements. Pg.59 1. What does a return statement do? Causes a method to finish, and controls return to the statement that called the method. Pg.61 1. What is an expression bodied method? A syntactic convenience; no different than an ordinary method. Pg.62 1. What is the scope of a variable? They can only be used after they have been created, and when the method ends the variable disappears and cannot be used elsewhere. Pg.66 1. What is an overloaded method? A method identifier that is declared more than once in the same scope using a different set of parameters. Pg.68 1. How do you call a method that requirements arguments? You supply a parenthesis with a comma-separated list of arguments, and the number and type of the arguments. Pg.68 1. How do you write a method, that is, specify the method definition, that requires a parameter list? 1. How do you a parameter specify as optional when defining a method? You provide a default value for the parameter. Pg.79 1. How do you pass an argument to a method as a named parameter? You specify the name of the parameter followed by a colon and the value to use. Pg.79
082df7b0-eacd-45a9-a689-4c599ab2e669
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-12-21 03:33:16", "repo_name": "329456618/saic", "sub_path": "/src/com/saic/sweep/activitys/sjyq/SjyqMainActivity.java", "file_name": "SjyqMainActivity.java", "file_ext": "java", "file_size_in_byte": 1152, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "e9983323fedad9bcf2d0d3ae7339814a8f7e2419", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/329456618/saic
288
FILENAME: SjyqMainActivity.java
0.272025
package com.saic.sweep.activitys.sjyq; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Toast; import com.lidroid.xutils.view.annotation.ContentView; import com.lidroid.xutils.view.annotation.event.OnClick; import com.saic.sweep.BaseActivity; import com.saic.sweep.R; @ContentView(R.layout.sjyqmain) public class SjyqMainActivity extends BaseActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } // android:text="查已盘记录" /> @OnClick(R.id.sntyv) public void sntyv(View btu) { Intent intent = new Intent(context, SntyvActivity.class); startActivity(intent); } // android:text="查未盘记录" /> @OnClick(R.id.sityv) public void sityv(View btu) { Toast.makeText(this, "查未盘记录", Toast.LENGTH_LONG).show(); } // android:text="按VIN查询" /> @OnClick(R.id.rvinsy) public void rvinsy(View btu) { Toast.makeText(this, "按VIN查询", Toast.LENGTH_LONG).show(); } // android:text="返回" /> @OnClick(R.id.rclk) public void rclk(View btu) { finish(); } }
59f7765c-8b69-4611-9b48-c5376bd6109e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-09 07:00:06", "repo_name": "liupanfeng/YangQuanClien", "sub_path": "/app/src/main/java/com/meishe/yangquan/wiget/CustomTextView.java", "file_name": "CustomTextView.java", "file_ext": "java", "file_size_in_byte": 1224, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "35528954105b8f0b12e2f5855fa7fe9554ee4d23", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liupanfeng/YangQuanClien
256
FILENAME: CustomTextView.java
0.205615
package com.meishe.yangquan.wiget; import android.content.Context; import android.graphics.Color; import android.util.AttributeSet; import androidx.appcompat.widget.AppCompatTextView; import com.meishe.yangquan.R; /** * @author liupanfeng * @desc 自定义文案 带有选中效果 * @date 2020/11/28 13:38 */ public class CustomTextView extends AppCompatTextView { private Context mContext; public CustomTextView(Context context) { super(context); init(context); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public CustomTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(context); } private void init(Context context) { this.mContext=context; this.setTextColor(Color.parseColor("#656565")); } @Override public void setSelected(boolean selected) { super.setSelected(selected); if (selected){ this.setTextColor(mContext.getResources().getColor(R.color.mainColor)); }else{ this.setTextColor(Color.parseColor("#656565")); } } }
19b569f7-6599-4b77-93f1-0931ee9dd8f3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-03-18 21:16:47", "repo_name": "ilovesoup/groovy-core", "sub_path": "/subprojects/groovy-json/src/main/java/groovy/json/internal/ArrayUtils.java", "file_name": "ArrayUtils.java", "file_ext": "java", "file_size_in_byte": 388, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "af30522529af726d7429e0d191d060a43568a8a3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ilovesoup/groovy-core
245
FILENAME: ArrayUtils.java
0.289372
/* * Copyright 2003-2014 the original author or authors. * * 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. * * Derived from Boon all rights granted to Groovy project for this fork. */ package groovy.json.internal; /** * @author Richard Hightower */ public class ArrayUtils { public static char[] copyRange( char[] source, int startIndex, int endIndex ) { int len = endIndex - startIndex; char[] copy = new char[len]; System.arraycopy( source, startIndex, copy, 0, Math.min( source.length - startIndex, len ) ); return copy; } }
39162108-4bc1-469c-ba16-6c18309623ae
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-09 01:20:26", "repo_name": "ChengMengYuan/Gank.io", "sub_path": "/app/src/main/java/com/cmy/bigsnow/utils/Event/MessageEvent.java", "file_name": "MessageEvent.java", "file_ext": "java", "file_size_in_byte": 1157, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "9f54953bb2e44a0fb2ecf8b76eddf12dd4c395f7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ChengMengYuan/Gank.io
256
FILENAME: MessageEvent.java
0.226784
package com.cmy.bigsnow.utils.Event; /** * @Author : mengyuan.cheng * @Version : 2017/8/10 * @E-mail : mengyuan.cheng.mier@gmail.com * @Description : */ public class MessageEvent { private String publish; private String subscriber; private Object message; /** * * @param publish 事件的发布者 * @param subscriber 事件的订阅者 * @param message 发送的内容 */ public MessageEvent(String publish, String subscriber, Object message) { this.publish = publish; this.subscriber = subscriber; this.message = message; } public MessageEvent(Object message) { this.message = message; } public String getPublish() { return publish; } public void setPublish(String publish) { this.publish = publish; } public String getSubscriber() { return subscriber; } public void setSubscriber(String subscriber) { this.subscriber = subscriber; } public Object getMessage() { return message; } public void setMessage(Object message) { this.message = message; } }
9511b3f3-c6ea-49b6-873c-f8eaa97c9b37
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-03 19:59:37", "repo_name": "Anmolk7/Wuber", "sub_path": "/app/src/main/java/com/example/rideshare/Home.java", "file_name": "Home.java", "file_ext": "java", "file_size_in_byte": 1202, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "9134bafd0d5d6db4bc24deab6b5c8a888fefdaa8", "star_events_count": 0, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/Anmolk7/Wuber
195
FILENAME: Home.java
0.213377
package com.example.rideshare; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; public class Home extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); ImageView driver= (ImageView) findViewById(R.id.driver); ImageView passenger=(ImageView) findViewById(R.id.passenger); driver.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(Home.this, MainActivity.class); intent.putExtra("userType", "driver"); startActivity(intent); } }); passenger.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(Home.this, MainActivity.class); intent.putExtra("userType", "passenger"); startActivity(intent); } }); } }
09b1ed62-79ca-4c83-9744-a089a55c5e65
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-01-12 18:45:58", "repo_name": "gdenning/pushsignal-server", "sub_path": "/src/main/java/com/pushsignal/xml/simple/TriggerAlertDTO.java", "file_name": "TriggerAlertDTO.java", "file_ext": "java", "file_size_in_byte": 1123, "line_count": 63, "lang": "en", "doc_type": "code", "blob_id": "3916f4edd837174a40cc932931117e68ddf5f558", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/gdenning/pushsignal-server
253
FILENAME: TriggerAlertDTO.java
0.245085
package com.pushsignal.xml.simple; import java.io.Serializable; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; @Root(name="triggerAlert", strict=false) public class TriggerAlertDTO implements Serializable { private static final long serialVersionUID = 1L; @Element private long triggerAlertId; @Element private long triggerId; @Element private UserDTO user; @Element private long modifiedDateInMilliseconds; @Element private String status; public void setTriggerAlertId(long triggerAlertId) { this.triggerAlertId = triggerAlertId; } public long getTriggerAlertId() { return this.triggerAlertId; } public void setTriggerId(long triggerId) { this.triggerId = triggerId; } public long getTriggerId() { return triggerId; } public void setUser(UserDTO user) { this.user = user; } public UserDTO getUser() { return user; } public long getModifiedDateInMilliseconds() { return modifiedDateInMilliseconds; } public void setStatus(String status) { this.status = status.toString(); } public String getStatus() { return this.status; } }
1dc2975e-c21c-444e-98bb-e22fae85bdeb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-06 16:06:01", "repo_name": "samuelpatmoretaetraining/CartoonCharacters", "sub_path": "/app/src/main/java/com/muelpatmore/cartooncharacters/CartoonCharacterApp.java", "file_name": "CartoonCharacterApp.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "f7384851ccc6aae855e284e1993e50513670d6d5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/samuelpatmoretaetraining/CartoonCharacters
193
FILENAME: CartoonCharacterApp.java
0.240775
package com.muelpatmore.cartooncharacters; import android.app.Application; import android.content.Context; import com.squareup.leakcanary.LeakCanary; import io.realm.Realm; import io.realm.RealmConfiguration; /** * Created by Samuel on 06/12/2017. */ public class CartoonCharacterApp extends Application { private static Context mContext; private static CartoonCharacterApp instance; @Override public void onCreate() { super.onCreate(); LeakCanary.install(this); instance = this; mContext = this.getApplicationContext(); Realm.init(mContext); RealmConfiguration realmConfig = new RealmConfiguration.Builder() .schemaVersion(1) .deleteRealmIfMigrationNeeded() .build(); Realm.setDefaultConfiguration(realmConfig); } public static Context getContext() { return mContext; } public static CartoonCharacterApp getInstance() { return instance; } }
2658abd7-755b-48cd-9d14-c36d3050847b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-30 01:17:22", "repo_name": "taller-2-slk-2019/AndroidApp", "sub_path": "/app/src/main/java/com/taller2/hypechatapp/notifications/UserMentionedNotification.java", "file_name": "UserMentionedNotification.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "4209baf35c6571d5f50da3858ccca018d1910e95", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/taller-2-slk-2019/AndroidApp
244
FILENAME: UserMentionedNotification.java
0.247987
package com.taller2.hypechatapp.notifications; import android.content.Context; import android.content.Intent; import com.taller2.hypechatapp.model.Channel; import com.taller2.hypechatapp.model.User; import com.taller2.hypechatapp.ui.activities.ChatActivity; public class UserMentionedNotification extends HypechatNotification { private Channel channel; private User sender; public UserMentionedNotification(Context context, Channel channel, User sender) { super(context); this.channel = channel; this.sender = sender; } @Override protected String getTitle() { return "Te han mencionado en un mensaje"; } @Override protected String getContent() { return sender.getName() + " te mencionó en el canal " + channel.getName(); } @Override protected Intent getIntent() { Intent intent = new Intent(context, ChatActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_HISTORY); intent.putExtra("organizationId", channel.organizationId); intent.putExtra("channelId", channel.getId()); return intent; } }
4fecc2f4-1972-4402-bba6-0ed8cd3810f0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-04 15:57:19", "repo_name": "mchangeoutlook/zdd", "sub_path": "/yanxin/src/com/tenotenm/yanxin/filters/Freego.java", "file_name": "Freego.java", "file_ext": "java", "file_size_in_byte": 1073, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "407f28bb75c343664488609779216c62178f8b54", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mchangeoutlook/zdd
242
FILENAME: Freego.java
0.247987
package com.tenotenm.yanxin.filters; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.tenotenm.yanxin.util.Bizutil; import com.tenotenm.yanxin.util.Reuse; @WebFilter("/freego/*") public class Freego implements Filter { @Override public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) arg0; HttpServletResponse res = (HttpServletResponse) arg1; req.setCharacterEncoding("UTF-8"); res.setCharacterEncoding("UTF-8"); res.setHeader("Access-Control-Allow-Origin", "*"); String ip = Reuse.getremoteip(req); try { Bizutil.ipdeny(ip, false); arg2.doFilter(req, res); }catch(Exception e) { Reuse.respond(res, null, e); } } }
8c0baac2-01a7-412f-a5cf-e99e8f4b4562
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-09 02:52:37", "repo_name": "debug-LiXiwen/wx", "sub_path": "/src/main/java/com/softlab/wx/common/util/CommonUtil.java", "file_name": "CommonUtil.java", "file_ext": "java", "file_size_in_byte": 1045, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "c803062f63c9f146a4729aed1273612ba0302e48", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/debug-LiXiwen/wx
223
FILENAME: CommonUtil.java
0.20947
package com.softlab.wx.common.util; import org.apache.commons.fileupload.disk.DiskFileItem; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.xml.ws.spi.http.HttpExchange; import java.io.File; import java.io.IOException; import java.io.InputStream; /** * 公共工具类 * Created by LiXiwen on 2019/3/25. */ public class CommonUtil { /** * MultipartFile 转换成File * * @param multfile 原文件类型 * @return File * @throws IOException */ public File multipartToFile(MultipartFile multfile){ File files = null; if (null != multfile){ File dfile = null; try{ dfile = File.createTempFile("prefix", "_" + multfile.getOriginalFilename()); multfile.transferTo(dfile); files = dfile; } catch(IOException e){ e.printStackTrace(); } } return files; } }
25e34890-9a4d-4f80-b5ad-4b0b44378a5d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-18 01:11:16", "repo_name": "UPMitd/MadridColab", "sub_path": "/madridColab/microservices/clients/comment-client/src/main/java/org/xcolab/client/comment/util/ThreadSortColumn.java", "file_name": "ThreadSortColumn.java", "file_ext": "java", "file_size_in_byte": 1088, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "d5e2ff2ab9fd4126ab63419df456c1a3fff12299", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/UPMitd/MadridColab
197
FILENAME: ThreadSortColumn.java
0.289372
package org.xcolab.client.comment.util; public enum ThreadSortColumn { TITLE("title"), REPLIES("comments"), LAST_COMMENTER("activityAuthor"), DATE("activityDate"); private final String identifier; ThreadSortColumn(String identifier) { this.identifier = identifier; } public static ThreadSortColumn from(String name) throws NoSuchThreadSortColumnException { for (ThreadSortColumn sortColumn : ThreadSortColumn.values()) { if (sortColumn.name().equalsIgnoreCase(name)) { return sortColumn; } } throw new NoSuchThreadSortColumnException("Invalid name: " + name); } public String getIdentifier(boolean ascending) { if (ascending) { return identifier; } else { return "-" + identifier; } } public static class NoSuchThreadSortColumnException extends RuntimeException { public NoSuchThreadSortColumnException(String message) { super(message); } } }
b1ef6035-9916-48d8-bedb-d106d88abcfe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-06-29T16:04:59", "repo_name": "lincolnge/lincolnge.github.com", "sub_path": "/_posts/2014-11-08-jquery-datepicker.md", "file_name": "2014-11-08-jquery-datepicker.md", "file_ext": "md", "file_size_in_byte": 1386, "line_count": 69, "lang": "zh", "doc_type": "text", "blob_id": "7ae45d196bc8e6e9ea9febf48143bbd342ed1d6b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lincolnge/lincolnge.github.com
384
FILENAME: 2014-11-08-jquery-datepicker.md
0.282196
--- layout: post title: "jQuery datepicker" date_time: "2014-11-08 12:14:36 +0800" description: "" category: - programming tags: [jQuery, Web 开发] --- jQuery UI datepicker 的一些实际应用. 演示效果请移步: <http://plnkr.co/edit/q5mLhKQ3S1KJP8KXg6dn> ### 第二个日期自动弹出. ---- 两个日历的时候(从xx日期到xx日期), 选择第一个日期后第二个日期将会弹出. html: <input type="text" class="datepicker in"> <input type="text" class="datepicker out"> Javascript: $( ".datepicker" ).datepicker({ onSelect: function(dateText, inst) { if ($(this).hasClass("in")) { setTimeout(function() { $('.out').focus(); }, 0); } } }); ### 第二个日期的最小值 ---- 当选择了第一个日期后, 第二个的日期应该大于第一个的日期, 设置第二个日期的最小值 html: <input type="text" class="datepicker in"> <input type="text" class="datepicker out"> Javascript: $( ".datepicker" ).datepicker({ onSelect: function(dateText, inst) { $( ".out" ).datepicker("option", "minDate", new Date($(".in").val()) ); } }); ### 在移动设备上 ---- 在移动设备上为了不弹出键盘 html: <input type="text" class="datepicker"> Javascript: $( ".datepicker" ).datepicker().attr('readonly', 'readonly'); ### 其他的建议参考官方文档 ---- <http://api.jqueryui.com/datepicker/>
86d526b6-dbb3-4f78-b80e-2696bb2a9201
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-02 13:07:29", "repo_name": "senpure/senpure-sport", "sub_path": "/senpure-sport-client/src/main/java/com/senpure/sport/data/protocol/message/handler/SCEchoMessageHandler.java", "file_name": "SCEchoMessageHandler.java", "file_ext": "java", "file_size_in_byte": 1022, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "7b2cf5fa7d573074fb54088d3b50bbcdfbc17c46", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/senpure/senpure-sport
241
FILENAME: SCEchoMessageHandler.java
0.264358
package com.senpure.sport.data.protocol.message.handler; import com.senpure.io.server.consumer.handler.AbstractConsumerMessageHandler; import com.senpure.sport.client.ui.ClientController; import com.senpure.sport.data.protocol.message.SCEchoMessage; import io.netty.channel.Channel; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** * @author senpure * @time 2019-7-4 17:47:02 */ @Component public class SCEchoMessageHandler extends AbstractConsumerMessageHandler<SCEchoMessage> { @Resource private ClientController clientController; @Override public void execute(Channel channel, SCEchoMessage message) { // logger.debug("\n{}",message.toString(null)); clientController.message(message.toString(null)); } @Override public int messageId() { // 2019-7-4 17:47:02 1000104 return SCEchoMessage.MESSAGE_ID; } @Override public SCEchoMessage newEmptyMessage() { return new SCEchoMessage(); } }
234a3499-a673-47c5-9277-187b6770c7c0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-11 07:08:59", "repo_name": "zhiwuwy/microcloud", "sub_path": "/microcloud-service/src/main/java/com/wy/service/fallback/IProductClientServiceFallbackFactory.java", "file_name": "IProductClientServiceFallbackFactory.java", "file_ext": "java", "file_size_in_byte": 1120, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "bc881a75ed5db0f441b9b45473d89af31f91e3ee", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhiwuwy/microcloud
220
FILENAME: IProductClientServiceFallbackFactory.java
0.210766
package com.wy.service.fallback; import com.wy.service.IProductClientService; import com.wy.vo.Product; import feign.hystrix.FallbackFactory; import org.springframework.stereotype.Component; import rx.Producer; import java.util.List; /** * @author wangyang * @date 2020/8/23 20:09 * @description: */ @Component public class IProductClientServiceFallbackFactory implements FallbackFactory<IProductClientService> { @Override public IProductClientService create(Throwable throwable) { return new IProductClientService() { @Override public Product getProduct(Long id) { Product product = new Product(); product.setProductId(1L); product.setProductName("fallbackName"); product.setProductDesc("fallbackDesc"); return product; } @Override public List<Product> listProduct() { return null; } @Override public boolean addProduct(Product product) { return false; } }; } }
e354caf2-a517-410d-bc9f-9d4666dae7d1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-12-20 08:26:12", "repo_name": "bjornakr/panda", "sub_path": "/src/main/java/no/atferdssenteret/panda/filter/Filter.java", "file_name": "Filter.java", "file_ext": "java", "file_size_in_byte": 1029, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "3b0d0cbba615616aa56641ab398f7694fa6e257f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bjornakr/panda
224
FILENAME: Filter.java
0.284576
package no.atferdssenteret.panda.filter; import java.util.Arrays; import java.util.LinkedList; import java.util.List; public class Filter { private final String name; private final Object[] filterValues; private final Object defaultValue; public Filter(String name, Object[] filterValues, Object defaultValue) { this.name = name; this.filterValues = valuesIncludingNoFilter(filterValues); this.defaultValue = defaultValue; } public Filter(String name, Object[] values) { this(name, values, null); } public String name() { return name; } public Object[] values() { return filterValues; } public Object defaultValue() { if (defaultValue == null) { return filterValues[0]; } return defaultValue; } private Object[] valuesIncludingNoFilter(Object[] filterValues) { List<Object> valuesIncludingNoFilter = new LinkedList<Object>(); valuesIncludingNoFilter.add("Alle"); valuesIncludingNoFilter.addAll(Arrays.asList(filterValues)); return valuesIncludingNoFilter.toArray(); } }
c6e71011-97ef-4045-9a54-ff4b00bdbf07
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-08 23:20:50", "repo_name": "quikkly/cordova-plugin-quikkly", "sub_path": "/src/android/net/quikkly/cordova/quikkly/QuikklyActivity.java", "file_name": "QuikklyActivity.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "65e0a3245301af983b8b5ff460d199757c09f770", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/quikkly/cordova-plugin-quikkly
238
FILENAME: QuikklyActivity.java
0.295027
/** * Simple ScanActivity subclass to grab and marshall * back the scanned code(s) to the call i.e. * QuikklyPlugin */ package net.quikkly.cordova.quikkly; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import net.quikkly.android.ui.ScanActivity; import net.quikkly.core.ScanResult; import net.quikkly.core.Tag; import java.util.ArrayList; public class QuikklyActivity extends ScanActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setContentView(net.quikkly.android.R.layout.quikkly_scan_activity); } public void onScanResult(@Nullable ScanResult result) { if(result != null && !result.isEmpty()) { Intent intent= new Intent(); ArrayList<String> tags = new ArrayList<>(); for (Tag iter : result.tags) { tags.add(iter.getData().toString()); } intent.putStringArrayListExtra(QuikklyPlugin.SCAN_CODE, tags); setResult(Activity.RESULT_OK, intent); finish(); } } }
db7ca613-3f28-48e6-acbd-af66f97367e1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-04 00:52:27", "repo_name": "JoaoRSilverio/monicet-backend", "sub_path": "/src/main/java/pt/geniusgrow/monicet/singletons/EbeanFactoryBean.java", "file_name": "EbeanFactoryBean.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "104e6e74f7c05f62481ea8365c00fd1592c8d31d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoaoRSilverio/monicet-backend
214
FILENAME: EbeanFactoryBean.java
0.252384
package pt.geniusgrow.monicet.singletons; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; import io.ebean.EbeanServer; import io.ebean.EbeanServerFactory; import io.ebean.config.CurrentUserProvider; import io.ebean.config.ServerConfig; /** * Spring factory for creating the EbeanServer singleton. */ @Component public class EbeanFactoryBean implements FactoryBean<EbeanServer> { @Autowired @Qualifier("CurrentUser") CurrentUserProvider currentUser; @Override public EbeanServer getObject() throws Exception { ServerConfig config = new ServerConfig(); config.setName("db"); config.setCurrentUserProvider(currentUser); config.loadFromProperties(); return EbeanServerFactory.create(config); } @Override public Class<?> getObjectType() { return EbeanServer.class; } @Override public boolean isSingleton() { return true; } }
36235100-4e29-4d4d-9f8e-08d0cc4b337f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-17 13:49:55", "repo_name": "caffeineLover/Doggie", "sub_path": "/src/main/java/com/peter/doggie/DoggiePlugin.java", "file_name": "DoggiePlugin.java", "file_ext": "java", "file_size_in_byte": 1201, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "b4e7d55b60f1de3139bb1c87d14fe886d262f2dc", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/caffeineLover/Doggie
242
FILENAME: DoggiePlugin.java
0.274351
package com.peter.doggie; import com.peter.doggie.handlers.WolfNameHandler; import com.peter.doggie.listeners.EntityDamageByEntityListener; import com.peter.doggie.listeners.EntityDamageListener; import com.peter.doggie.listeners.EntityTameListener; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; public class DoggiePlugin extends JavaPlugin { private WolfNameHandler wolfNameHandler; private String configFileName = "config.yml"; @Override public void onEnable() { File configFile = new File(getDataFolder(), this.configFileName); if( ! configFile.exists() ) { Bukkit.getLogger().info("Config file does not exist; copying the defaults from the jar file."); this.saveDefaultConfig(); } // Damage subsystem new EntityDamageByEntityListener(this); new EntityDamageListener(this); // Rich pet system new EntityTameListener(this); wolfNameHandler = new WolfNameHandler(this); } public WolfNameHandler getWolfNameHandler() { return wolfNameHandler; } }
ad96b667-4127-4fa3-9b14-742ee0897903
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-11 02:36:28", "repo_name": "JiayanDev/JYAndroid", "sub_path": "/library/src/main/java/com/jiayantech/library/utils/AssertsUtil.java", "file_name": "AssertsUtil.java", "file_ext": "java", "file_size_in_byte": 1221, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "5c68856645ab63f52759f8fb5c5d2838161f9535", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JiayanDev/JYAndroid
330
FILENAME: AssertsUtil.java
0.272799
package com.jiayantech.library.utils; import com.jiayantech.library.base.BaseApplication; import java.io.IOException; import java.io.InputStream; /** * @author 健兴 * @version 1.0 * @Description Asserts资源的相关工具 * @date 2014-4-29 * @Copyright: Copyright (c) 2013 Shenzhen Tentinet Technology Co., Ltd. Inc. * All rights reserved. */ public class AssertsUtil { /** * 描述:获取Asserts文件夹里面某个文件的字符串内容 * * @param fileName 文件名 * @return * @version 1.0 * @createTime 2014-4-19 上午10:29:34 * @createAuthor 健兴 * @updateTime 2014-4-119 上午10:29:34 * @updateAuthor 健兴 * @updateInfo (此处输入修改内容, 若无修改可不写.) */ public static String getAssertsFileString(String fileName) { try { InputStream is = BaseApplication.getContext().getAssets().open(fileName); int size = is.available(); byte[] buffer = new byte[size]; is.read(buffer); is.close(); return new String(buffer, "UTF-8"); } catch (IOException e) { e.printStackTrace(); } return null; } }
297b10f2-4cf4-43c0-bfd9-45581a946c6f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-13T03:15:10", "repo_name": "DongYF998/CatBlog", "sub_path": "/src/main/java/com/blog/cat/controller/AccountController.java", "file_name": "AccountController.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "deda51fd5e1fb895ed9ec779bfc68ee05c194ded", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DongYF998/CatBlog
224
FILENAME: AccountController.java
0.194368
package com.blog.cat.controller; import com.blog.cat.common.exception.UserException; import com.blog.cat.service.UserService; import com.blog.cat.util.TokenUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; /** * @Description: * @Date: 2020/4/8 * @Author: DongYiFan */ @RestController @RequestMapping("/api/account") @CrossOrigin public class AccountController { private UserService userService; private TokenUtil tokenUtil; @GetMapping("/get/userInfo") public void getUserInfo(HttpServletRequest request) throws UserException { String token = request.getHeader("token"); String uid = tokenUtil.getUid(token); } @Autowired public void setUserService(UserService userService) { this.userService = userService; } @Autowired public void setTokenUtil(TokenUtil tokenUtil) { this.tokenUtil = tokenUtil; } }
d0ec5023-c9d5-4c57-8283-7541fec47cce
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-18 21:45:31", "repo_name": "Elijah99/Network-apps-programming-coursework", "sub_path": "/Client/src/main/java/contoller/RegisterController.java", "file_name": "RegisterController.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "52e2563bab07c01baac0f932193c5e622d9ec7f1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Elijah99/Network-apps-programming-coursework
191
FILENAME: RegisterController.java
0.295027
package contoller; import interfaces.BaseController; import constants.ServerActions; import view.LoginWindow; import view.MainMenu; import view.RegisterWindow; import javax.swing.*; public class RegisterController extends BaseController<RegisterWindow> { public void registerUser(String login, String password, String companyName) { sendDataToServer(ServerActions.REGISTER); sendDataToServer(login + " " + password + " " + companyName); String result = getDataFromServer(); if (result.equalsIgnoreCase("REGISTERED")) { view.showMessageDialog("Registered", JOptionPane.INFORMATION_MESSAGE); LoginController loginController = new LoginController(); loginController.attachView(new LoginWindow()); loginController.logInUser(login, password); view.setVisible(false); } if(result.equalsIgnoreCase("USER_EXISTS")) { view.showMessageDialog("User exists, try again", JOptionPane.INFORMATION_MESSAGE); view.setVisible(false); new MainMenu().initWindow(); } } }
ea521285-2374-40c0-a2e7-0a615b2422ef
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-06-30T07:20:44", "repo_name": "daviddykeuk/template_go", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 993, "line_count": 47, "lang": "en", "doc_type": "text", "blob_id": "ab9fe490834af4790c2f0c1997cbd84591cdfc29", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/daviddykeuk/template_go
266
FILENAME: README.md
0.208179
![Test](https://github.com/daviddykeuk/template_go/workflows/Test/badge.svg?branch=master) # Go Template This is a Go template repo, designed to work with TDD/BDD and Functional Programming, ready to be built as a container or serverless function. ## Handlers The repo has multiple different types of handlers, found in `./src/handlers/` * Command Line or Container * API * AMQP * Kafka * MQTT * AWS Lambda * API Gateway * DynamoDB Streams * Event Bridge * Kinesis * S3 * SQS * SNS ## Databases The repo has implementations of object storage using different databases * CosmosDB * DynamoDB * MongoDB ## Event publishers The repo has implementations of different event publishers * AWS SQS * AWS SNS * AWS Event Bridge * AWS Kinesis * AMQP * Kafka * MQTT ## Build pipelines Using Docker and Make as build tools, the build pipelines can be run the same way on multiple build services * AWS CodeBuild * Azure DevOps * Github Actions * CircleCI * BuildKite * Travis CI
b89a8902-3569-429a-a8f2-b27408190d27
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-20 01:11:27", "repo_name": "chinayushuiquan/SmartHomeAndroid", "sub_path": "/app/src/main/java/kap/com/smarthome/android/presenter/constants/AllVariable.java", "file_name": "AllVariable.java", "file_ext": "java", "file_size_in_byte": 1498, "line_count": 68, "lang": "zh", "doc_type": "code", "blob_id": "9fd1b242f33d71051f506a76697da48747944a0e", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/chinayushuiquan/SmartHomeAndroid
371
FILENAME: AllVariable.java
0.258326
package kap.com.smarthome.android.presenter.constants; /** * Created by yushq on 2017/10/13 0013. * * 这个类中保存的是全局的变量字段,用于一些全局的参数 * 相当于map中的value 值 , 能对其中的值作更改 * * 相对应的 key 值可能保存在 AllConstants 类中 */ public class AllVariable { /** * wifi is_able */ public static boolean WIFI_CONNECT = false ; /** * MOBILE is_able */ public static boolean MOBILE_CONNECT = false ; /** * no is_able */ public static boolean NO_CONNECT = false ; /** * 连接上中继盒子 */ public static boolean CONNECT_RELAY = false; /** * 用户ID */ //当前登录的用户的 user_id; public static String CURRENT_USER_ID = ""; /** * 广播状态 相关 */ //是否成功添加了新的房间 默认为false public static boolean IS_BROAD_CAST_ADD_ROOM = false; //是否成功添加了新的设备 默认为false public static boolean IS_BROAD_CAST_ADD_NEW_DEVICE = false; /** * 和log有关的 */ //是否是debug模式,如果是该模式可以进行log打印输出 public static final boolean ISDEBUG = true; //是否是debug模式,如果是该模式可以进行log打印输出 public static final boolean ISDEBUG_KOTITAG = true; /** * device control json data */ public static String CURRENT_DEVICE_CONTROL = ""; }
c6b1c59a-19d5-4210-95ca-34d13acbb848
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-26 16:47:39", "repo_name": "adnaan1703/NativeSongListing", "sub_path": "/app/src/main/java/com/konel/kryptapps/nativesonglisting/repository/get_songs/entity/GetSongsResponse.java", "file_name": "GetSongsResponse.java", "file_ext": "java", "file_size_in_byte": 1089, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "5c819c3b87601a623bd033b5aaf2a80f8681ffe1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/adnaan1703/NativeSongListing
222
FILENAME: GetSongsResponse.java
0.242206
package com.konel.kryptapps.nativesonglisting.repository.get_songs.entity; import android.support.annotation.Nullable; import com.konel.kryptapps.nativesonglisting.repository.ResponseBaseModel; import java.util.List; public class GetSongsResponse extends ResponseBaseModel { private int resultCount; @Nullable private List<ResultsItem> results; public GetSongsResponse(int responseCode, boolean isError) { super(responseCode, isError); } public int getResultCount() { return resultCount; } public void setResultCount(int resultCount) { this.resultCount = resultCount; } public void setResults(@Nullable List<ResultsItem> results) { this.results = results; } @Nullable public List<ResultsItem> getResults() { return results; } @Override public String toString() { return "GetSongsResponse{" + "resultCount = '" + resultCount + '\'' + ",results = '" + results + '\'' + "}"; } }
6cc4586f-b63c-41ce-a7a6-f6af5e680596
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-06 02:56:12", "repo_name": "Littiger/FriendAssociation", "sub_path": "/FriendAssociation/src/com/yvlu/controller/controller/login/SetStatusController.java", "file_name": "SetStatusController.java", "file_ext": "java", "file_size_in_byte": 1167, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "bf829bcd30f56ed5e9315cbb0e20d512fd4a3928", "star_events_count": 3, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/Littiger/FriendAssociation
257
FILENAME: SetStatusController.java
0.279042
/** * */ package com.yvlu.controller.controller.login; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.yvlu.servlet.controller.login.SetLoginStatusServlet; import com.yvlu.tools.tools; /** * @desc 写入登录控制状态 * @author qiufeng * @version 1.0 * @time 2021年2月3日 下午3:35:46 */ @SuppressWarnings("serial") @WebServlet("/api/controller/login/poststatus") public class SetStatusController extends HttpServlet{ @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String token = request.getParameter("token"); String status = request.getParameter("status"); if(tools.isnull(token,status)){ tools.print(response, -1, "参数不全", null); }else{ if(status.equals("1") || status.equals("0")){ SetLoginStatusServlet.Info(token, status, response); }else{ tools.print(response, -2, "参数值异常", null); } } } }
9a9878a4-f1b4-428b-843f-f2d3290cc087
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-16 14:22:11", "repo_name": "DaimonCool2/concert_tickets2", "sub_path": "/src/main/java/kz/java/training/configuration/DatabaseConfiguration.java", "file_name": "DatabaseConfiguration.java", "file_ext": "java", "file_size_in_byte": 1116, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "a097aa8d2b82652367bbcb0034a9788e743cdf9c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DaimonCool2/concert_tickets2
195
FILENAME: DatabaseConfiguration.java
0.253861
package kz.java.training.configuration; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; @org.springframework.context.annotation.Configuration @EnableTransactionManagement public class DatabaseConfiguration { @Bean public DriverManagerDataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://127.0.0.1/concert_tickets?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false"); dataSource.setUsername("root"); dataSource.setPassword("root"); return dataSource; } @Bean public PlatformTransactionManager txManager() { return new DataSourceTransactionManager(dataSource()); } }
e57873ab-e831-4cb6-ba83-b883362fed6c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-05-04 19:47:10", "repo_name": "JPLEAL79/Training-Selenium-Java", "sub_path": "/src/test/java/pages/FiltrarPage.java", "file_name": "FiltrarPage.java", "file_ext": "java", "file_size_in_byte": 1111, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "852aab20a8d928269e2f1ba90e888bb61ec536f6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JPLEAL79/Training-Selenium-Java
238
FILENAME: FiltrarPage.java
0.272025
package pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.List; public class FiltrarPage { WebDriver driver; WebDriverWait wait; @FindBy(xpath = "//*[@id='vertical-filters-custom']/div[2]/div[2]/ul/div/li/label/span[1]") private List<WebElement> listaDeMarcas; @FindBy(xpath = "//*[@class='fb-filter-subcategory'][contains (text(),'Notebooks')]") private WebElement listaVisisble; public FiltrarPage(WebDriver driver) { this.driver = driver; wait = new WebDriverWait(driver, 15); PageFactory.initElements(this.driver, this); } public void obtenerDatosDeListaDeMarcas() { String nombreMarca = ""; for (WebElement marca : listaDeMarcas) { nombreMarca = marca.getText(); System.out.println(nombreMarca); } } public boolean listaVisisble(){ return listaVisisble.isDisplayed(); } }
c04499a3-87c5-4380-abfa-803616486469
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-06-17T02:26:44", "repo_name": "devonmoubry/Recreate-Twitter", "sub_path": "/readme.md", "file_name": "readme.md", "file_ext": "md", "file_size_in_byte": 1203, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "7dd8142843ee70c9440c2873afa34bd0f67082f7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/devonmoubry/Recreate-Twitter
268
FILENAME: readme.md
0.226784
What is it? ----------- TIY Spring 2017 Front End Assignment What should it do? ------------------ Create a twitter clone! EXPLORER MODE Using a fresh copy of the webpack-starter. Build the following features. Full user authentication including signup, login, and logout Full CRUD functionality for tweets. A user should be able to CRUD on their own tweets, but only read other users' tweets A 'feed' page that allows users to view all tweets posted by all users Style the site to be responsive! Include 'Profile' pages that allow users to view only tweets made by the viewed user, as well as info about that user ADVENTURER MODE Include an 'Edit Profile' page that allows users to modify their profile. Read the Backendless docs and allow users to verify their email address using the built in email verification service Allow users to include a profile image. Planning -------- <p align="center"> <img src="app/images/FullSizeRender.jpg-2.jpeg" width="350"/> <img src="app/images/FullSizeRender.jpg-4.jpeg" width="350"/> </p> [Live Version](friendly-meat.surge.sh) -------------------------------------------------------------------------------- Created by Devon Moubry. devon@moubry.com
3e627cc1-c24f-4124-8971-760028406231
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-21 16:58:45", "repo_name": "bobscott45/customer-tracker", "sub_path": "/src/main/java/dev/bobscott/customertracker/service/CustomerServiceImpl.java", "file_name": "CustomerServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "e53b3229c3ae3c07ec27a44fde36c43f64ff30f5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bobscott45/customer-tracker
193
FILENAME: CustomerServiceImpl.java
0.255344
package dev.bobscott.customertracker.service; import dev.bobscott.customertracker.dao.CustomerDAO; import dev.bobscott.customertracker.entity.Customer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.transaction.Transactional; import java.util.List; @Service public class CustomerServiceImpl implements CustomerService{ @Autowired private CustomerDAO customerDAO; @Override @Transactional public List<Customer> getCustomers() { List<Customer> customers = customerDAO.getCustomers(); return customers; } @Override @Transactional public void saveCustomer(Customer customer) { customerDAO.saveCustomer(customer); } @Override @Transactional public Customer getCustomer(long id) { return customerDAO.getCustomer(id); } @Override @Transactional public void deleteCustomer(long id) { customerDAO.deleteCustomer(id); } }
08f29923-a829-428e-9777-fc1d43253283
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-10-10T09:04:09", "repo_name": "J-0-K-E-R/Guess-It-", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1124, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "494dadd258179c0e4181b388c8a82e1cd877d9e7", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/J-0-K-E-R/Guess-It-
253
FILENAME: README.md
0.289372
# Guess It! "Guess It!" is a game created in JAVA. It's a simple game that gives you a set of categories to play in. It's a guess game related to Movies, Actors, Anime and Music. It gives player a part of picture on display. With time, more of picture is loaded and at last full picture is shown. A multi-choice answer option is provided for user to answer, only one of them is correct. Beware while answering, as time passes scores gets a decrement. Yeah! you can also take a zero by loading a full picture. You can simply run the game using the JAR file in given directory. To view the code, you'll need NetBeans to open the project. User need to create a account to play game. Every score and information will be stored in the database. An admin id is already created in the game that'll provide you a link to access the database. Use Wampserver/phpmyadmin for database. All of the instructions regarding the game is provided in game. Please be noted, database login is Username as "root" and password as "". *Without quotes. *Want to make any changes to database, don't forget to do that in the games source code.
67b3149f-299b-4542-98cd-628f9da4bdb4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-31T08:10:02", "repo_name": "Xiddler/PORTABLE_ENV", "sub_path": "/manjaro/reinstall/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1031, "line_count": 25, "lang": "en", "doc_type": "text", "blob_id": "136608cf04276b3cef1549a5fdbef3fdefd53b44", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Xiddler/PORTABLE_ENV
331
FILENAME: README.md
0.261331
Opened 2021-12-22 Edited: 2022-01-14 (fresh reinstall) Edited: 2022-02-22 Added some details This is a helper file when dealing with a full reinstall like I did in ~Dec 2021~ Jan 2022. I had a timeshift snapshot but for some reason the kernel and the boot process did not see eye-to-eye. Now, to do a timeshift restore, install the Manjaro 2022 USB drive as a live Linux, open Timeshift from there and do the restore. The file /run/media/donagh/01d4c077-4709-4b5b-9431-087bc9060d68/full_manjaro_reinstall_Jan2022.md has notes I took while reinstalling manjaro over the course of almost 2 days. I used the following command to archive this file PORTABLE_ENV rsync -a ~/SD64/full_manjaro_reinstall_Jan2022.md . NOTE: that the final . is the current folder! and is required for the command NOTE: maybe add this file to .gitignore. GOOD IDEA. The only glitch I could not easily fix was caffeine-ng. This is resolved using a KDE utility that "Inhibits automatic sleep and screen locking" END - 2022-02-22_11:12
40c79626-28e9-45b0-ba64-f7e8935ca474
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-02-13T20:21:44", "repo_name": "iceman11a/fuelcraft", "sub_path": "/src/main/java/iceman11a/fuelcraft/entity/EntityDieselTrainEngine.java", "file_name": "EntityDieselTrainEngine.java", "file_ext": "java", "file_size_in_byte": 1147, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "61c3198ce3574ef92f6bc1c869a514d74f7a9abf", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/iceman11a/fuelcraft
250
FILENAME: EntityDieselTrainEngine.java
0.242206
package iceman11a.fuelcraft.entity; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class EntityDieselTrainEngine extends Entity { public boolean canMove = false; // Can the diesel engine move public int engineTemperature = 0; public int engineSpeed = 0; // the current speed of the engine (MPH = Miles per Hour) public EntityDieselTrainEngine(World world) { super(world); } /* @Override public ContainerDieselEngine getContainer(InventoryPlayer inventoryPlayer) { return new ContainerDieselEngine(inventoryPlayer, null); } @SideOnly(Side.CLIENT) @Override public GuiFuelCraftInventory getGui(InventoryPlayer inventoryPlayer) { return new GuiDieselEngine(this.getContainer(inventoryPlayer), this); } */ @Override protected void entityInit() { } @Override protected void readEntityFromNBT(NBTTagCompound nbt) { } @Override protected void writeEntityToNBT(NBTTagCompound nbt) { } }
bd837123-e0d0-48a8-899c-57e636c7fa42
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-27 12:06:54", "repo_name": "ktoking/songs", "sub_path": "/src/main/java/com/fehead/songs/error/BusinessException.java", "file_name": "BusinessException.java", "file_ext": "java", "file_size_in_byte": 1405, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "90bce30ea2440d0e7f99da4b5c6a05727c8c3c6d", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ktoking/songs
370
FILENAME: BusinessException.java
0.276691
package com.fehead.songs.error; /** * 写代码 敲快乐 * だからよ...止まるんじゃねぇぞ * ▏n * █▏ 、⺍ * █▏ ⺰ʷʷィ * █◣▄██◣ * ◥██████▋ *  ◥████ █▎ *   ███▉ █▎ *  ◢████◣⌠ₘ℩ *   ██◥█◣\≫ *   ██ ◥█◣ *   █▉  █▊ *   █▊  █▊ *   █▊  █▋ *    █▏  █▙ *    █ * * @author Nightnessss 2019/7/8 16:27 */ public class BusinessException extends Exception implements CommonError { private CommonError commonError; // 直接接受EmBusinessError的传参用于构造业务异常 public BusinessException(CommonError commonError) { super(); this.commonError = commonError; } // 接受自定义errMsg的方式构造业务异常 public BusinessException(CommonError commonError, String errorMsg) { super(); this.commonError = commonError; this.commonError.setErrMsg(errorMsg); } @Override public int getErrorCode() { return this.commonError.getErrorCode(); } @Override public String getErrorMsg() { return this.commonError.getErrorMsg(); } @Override public CommonError setErrMsg(String errMsg) { this.commonError.setErrMsg(errMsg); return this; } }
7f7568e0-0eaa-410f-b0d9-0d735be17cbf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-07 06:15:21", "repo_name": "OpenModularTurretsTeam/OpenModularLighting", "sub_path": "/src/main/java/omtteam/openmodularlighting/client/gui/ModularLightingTab.java", "file_name": "ModularLightingTab.java", "file_ext": "java", "file_size_in_byte": 1083, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "91e86429301bf676af7e153144ac706b3eddc42b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OpenModularTurretsTeam/OpenModularLighting
232
FILENAME: ModularLightingTab.java
0.249447
package omtteam.openmodularlighting.client.gui; import mcp.MethodsReturnNonnullByDefault; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import omtteam.omlib.compatibility.minecraft.CompatCreativeTabs; import omtteam.openmodularlighting.init.ModBlocks; import omtteam.openmodularlighting.items.blocks.ItemBlockFloodlight; import omtteam.openmodularlighting.reference.Reference; @MethodsReturnNonnullByDefault public class ModularLightingTab extends CompatCreativeTabs { private static ModularLightingTab instance; @SuppressWarnings("SameParameterValue") private ModularLightingTab(String label) { super(label); } public static ModularLightingTab getInstance() { if (instance == null) { instance = new ModularLightingTab(Reference.MOD_ID); } return instance; } @Override public ItemStack getIconItemStack() { return new ItemStack(ModBlocks.floodlight); } @Override public Item getItem() { return new ItemBlockFloodlight(ModBlocks.floodlight); } }
f59c89ad-b45d-4bac-a7cf-99ebd2d50c33
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-12-28T16:55:49", "repo_name": "marcus-grant/dev-notes", "sub_path": "/js/react/react-animations.md", "file_name": "react-animations.md", "file_ext": "md", "file_size_in_byte": 1203, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "7256c35a5eecbb6a70bf0ffd5116642aa29f5e05", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/marcus-grant/dev-notes
356
FILENAME: react-animations.md
0.226784
React Animation Notes ===================== Miscellaneous ------------- - Pure CSS styling of react animations - The first method of animating react components I managed to get working was to just create two classnames for the same component, and during some event switching them - Then simply applying styles like these to the *active* and *inactive* states ```sass .box { background: blue; opacity: 0; height: 0px; width: 100px; transition: 1s; } .active { opacity: 1; height: 100px; transition: 1s; } ``` References ---------- [01]: https://reactcommunity.org/react-transition-group/ "React Transition Groups" [02]: https://blog.prototypr.io/using-reactcsstransitiongroup-for-enter-exit-animations-ea100d68e72f "Using ReactCSSTransitionGroups" [03]: http://www.thejoemorgan.com/blog/2016/01/05/creating-a-dropdown-menu-in-react/ "Medium, Huan Ji: React Page Transition" [04]: https://codepen.io/jschofie/pen/rGjmVp?editors=0110 "CodePen: Transitions React?!" 1. [ReactCommmunity: React Transition Groups][01] 2. [Prototypr.io: Using ReactCSSTransitionGroups for Enter-Exit Animations][02] 3. [Medium, Huan Ji: React Page Transition][03] 4. [CodePen: Transitions React?!][04]
db17f992-f639-4079-b9f8-72539d955a72
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-06 07:50:13", "repo_name": "cdc123/graduation", "sub_path": "/src/main/java/com/graduation/controller/MessageController.java", "file_name": "MessageController.java", "file_ext": "java", "file_size_in_byte": 1014, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "852bcb387780ee8227c03de68d7d9c604324c96f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cdc123/graduation
181
FILENAME: MessageController.java
0.262842
package com.graduation.controller; import com.graduation.service.MessageService; import com.graduation.utils.SessionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.List; @RestController @RequestMapping("/message") public class MessageController { @Autowired private MessageService service; @PostMapping(value = {"/addMessage"}) public void addMessage(HttpServletRequest request, String msg_text, int video_id) { int user_id = Integer.valueOf(SessionUtils.get_session_user(request)); service.addMessage(user_id, video_id, msg_text); } @PostMapping(value = {"/getMessage"}) public List getMessage(int pagenumber, int video_id) { return service.gerMessage(pagenumber, video_id); } }
5db98594-2b9c-4b85-8143-b6df3848f5a5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-19 06:29:49", "repo_name": "fengbinking/pay-wallet-api", "sub_path": "/src/test/java/com/ma/test/RedisTest.java", "file_name": "RedisTest.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "adaa03e40624115865c73534f30b367de52885e2", "star_events_count": 10, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/fengbinking/pay-wallet-api
249
FILENAME: RedisTest.java
0.23231
package com.ma.test; import com.ma.wallet.Application; import com.ma.wallet.core.cache.RedisUtils; import lombok.extern.log4j.Log4j; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.concurrent.TimeUnit; /** * Created by fengbin on 2017-08-22. */ @Log4j @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = Application.class) @ActiveProfiles(profiles = "pro") public class RedisTest { @Autowired private StringRedisTemplate redisTemplate; @Test public void test(){ RedisUtils.set("key1","JJJJJJJJddddddddddd"); log.info("key1:"+ RedisUtils.getString("key1")); RedisUtils.putStringToMap("a1","f1","bbb"); log.info(RedisUtils.getStringFromMap("a1","f2")); redisTemplate.expire("a1",10, TimeUnit.MINUTES); } }
62e33e45-9698-4d01-95ac-0f3cda38f562
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-25 18:01:04", "repo_name": "eduardogz94/SeguridadInformatica", "sub_path": "/DatabaseService/src/service/DatabaseManager.java", "file_name": "DatabaseManager.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "8e3d3ca6af02c8b22496b83feee18bc09b5ecd0b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/eduardogz94/SeguridadInformatica
228
FILENAME: DatabaseManager.java
0.256832
package service; import java.util.ArrayList; import javax.jws.WebService; import service.Database; @WebService(endpointInterface = "service.DatabaseInterface") public class DatabaseManager implements DatabaseInterface { public Database db = new Database(); public ArrayList<String> arr = new ArrayList<String>(); public ArrayList<String> users = new ArrayList<String>(); public int add(String email, String pass) { arr.add(email); System.out.println("Data History: " + arr); System.out.println("New User: " + email + " " + pass); int value = user(email, pass); return value; } public String show() { return "Recent Emails: " + arr; } public int user(String email, String pass) { int value; if (db.checkUser(email, pass) == true) { value = 1; } else { value = 0; } return value; } public String testConnection() { System.out.println("Testing Database Function"); String user = db.test(); return user; } }
b65a5fdc-f5c7-4d4c-a101-6e3cbe97330e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-17 10:35:24", "repo_name": "nekkantiravi/Testcucumber", "sub_path": "/shared/resources/src/main/java/com/macys/sdt/shared/steps/MEW/FacetSelections.java", "file_name": "FacetSelections.java", "file_ext": "java", "file_size_in_byte": 1011, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "77b827702987551c3dc085307aaba83ba4536c0c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nekkantiravi/Testcucumber
227
FILENAME: FacetSelections.java
0.27048
package com.macys.sdt.shared.steps.MEW; import com.macys.sdt.shared.actions.MEW.panels.FacetAccordionModel; import cucumber.api.java.en.And; import cucumber.api.java.en.When; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class FacetSelections { private static final Logger log = LoggerFactory.getLogger(FacetSelections.class); @When("^I select facet name \"([^\"]*)\"$") public void iSelectFacetName(String name) throws Throwable { FacetAccordionModel.selectFacetByName(name); log.info("selected facet with name "+name); } @And("^I select facet value \"([^\"]*)\"$") public void iSelectFacetValue(String value) throws Throwable { FacetAccordionModel.selectFacetValueByName(value); log.info("selected facet with value"+value); } @When("^I click on Apply button$") public void iClickOnApplyButton() throws Throwable { FacetAccordionModel.apply(); log.info("Successfully clicked on apply button"); } }
9fba3dd1-0ee0-40a9-99c7-99b54ba6bcaf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-17 13:38:43", "repo_name": "piotrrzysko/pik-shop", "sub_path": "/pik-shop-backend/src/main/java/pl/elka/pw/pik/shop/security/domain/model/Identity.java", "file_name": "Identity.java", "file_ext": "java", "file_size_in_byte": 1031, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "31d3a436edf334b92bdb4ad7bb1a9ab491fce92c", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/piotrrzysko/pik-shop
195
FILENAME: Identity.java
0.236516
package pl.elka.pw.pik.shop.security.domain.model; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import pl.elka.pw.pik.shop.domain.model.User; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import java.io.Serializable; @Entity public class Identity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String type; public String username; public String password; @OneToOne @JoinColumn(name = "USER_ID") public User user; public Identity() { } public Identity(User user, String password) { this.user = user; this.username = user.email; setEncodedPassword(password); } public void setEncodedPassword(String password) { this.password = new BCryptPasswordEncoder().encode(password); } }
d75ef0b4-8880-4d23-88a9-690379bcc158
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-12-09T11:05:17", "repo_name": "Open-NC/nc-reentry-resources-content", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1080, "line_count": 25, "lang": "en", "doc_type": "text", "blob_id": "3720b32da8797a99ad1fd0f255a2e10603a32db2", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Open-NC/nc-reentry-resources-content
238
FILENAME: README.md
0.224055
# NC Reentry Resources Content The original [Buncombe County Reentry Resources Hub](http://www.buncombereentryhub.org/) is implemented as a Wordpress website, and individual topic pages were written by a variety of people, so that they don't follow a single standard template. ONLINE GUID Generator [here](https://www.guidgenerator.com/online-guid-generator.aspx) In this implementation, content for a topic page for a given county has a strict form: 1. __Common Description__: a block of HTML text with information relevant statewide (or nationally) 2. __Local Description__: a block of HTML text with information relevant to the specific county 3. __National & State Resources__: a list of resources common to all counties 4. __Local Resources__: a list of resources relevant to the specific county 5. __211 Resources__: a list of resources pulled from the 211 database based on categories where all resources consist of: - Name - Short description - URL - Category For counties that do not have tailored content, the topic page will be created only from 1, 3, and 5.
5788b3ba-1815-4a0a-98f0-865e5435b9aa
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-18 09:09:26", "repo_name": "sandipphatangare123/MyWord", "sub_path": "/MyWord/app/src/main/java/com/sandip/util/UtilPref.java", "file_name": "UtilPref.java", "file_ext": "java", "file_size_in_byte": 1205, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "82a5b36144ba078b99d4bffe95372bea55f3672b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sandipphatangare123/MyWord
218
FILENAME: UtilPref.java
0.255344
package com.sandip.util; import android.content.Context; import android.content.SharedPreferences; /** * Created by ishwar on 14/1/17. */ public class UtilPref { public static String TAG="WordGenrator"; public static void saveToPrefs(Context context, String key, String value) { SharedPreferences prefs = context.getSharedPreferences(TAG, Context.MODE_PRIVATE); final SharedPreferences.Editor editor = prefs.edit(); editor.putString(key, value); editor.commit(); } public static String getFromPrefs(Context context, String key, String defaultValue) { SharedPreferences sharedPrefs = context.getSharedPreferences(TAG, Context.MODE_PRIVATE); try { return sharedPrefs.getString(key, defaultValue); } catch (Exception e) { e.printStackTrace(); return defaultValue; } } public static void deletePrefs(Context context, String key) { SharedPreferences prefs = context.getSharedPreferences(TAG, Context.MODE_PRIVATE); final SharedPreferences.Editor editor = prefs.edit(); editor.remove(key); //editor.apply(); editor.commit(); } }
22ad41eb-e820-4d41-b51b-9d43134227cc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-03-12T14:57:55", "repo_name": "SagarGhimire/python-", "sub_path": "/wm-project-midterm-SagarGhimire-master/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1124, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "1ad8b30ff45bda9c0195b6173d36986fcdd55605", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SagarGhimire/python-
247
FILENAME: README.md
0.290981
# Twitter Mining - Course: Web-Mining - Midterm Project - Developer: Sagar Ghimire ## Links - [Source](https://github.com/44520-w19/wm-project-midterm-SagarGhimire) ## Introduction I am looking at the Sentiment Analysis of public replies when Apple and Samsung tweets about their products especially their phone products. Stream of data used in this project is collection of tweets retrived from twitter using tweepy. The replies of the tweets are collected in specific dates when they offically release their products. ## Data Source -Twitter : Data is extracted using tweepy module and later done text mining for the statistical purposes. ## The Challenge **Getting the replies of the specific tweets** - Twitter API doesn't provide good source for extracting the replies of the tweets so I have to dig in more to get the replies for that tweet. - The second one is parsing the replies. As the replies were in html form so html parsing and unicode parsing has to be done for the analysis purposes. * Language: Python * Modules: Beautiful Soup, Vader lexicon **Chart Visualization: - Mathplotlib - Bar graph
e79ed5de-6043-4229-8d3e-0a90ce0a4af7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-20 15:51:02", "repo_name": "linkedpipes/etl", "sub_path": "/dataunit-core/src/main/java/com/linkedpipes/etl/dataunit/core/rdf/ChunkIterator.java", "file_name": "ChunkIterator.java", "file_ext": "java", "file_size_in_byte": 1202, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "48f707f25b9c32534f3804e73f952e4d4c63e51a", "star_events_count": 139, "fork_events_count": 37, "src_encoding": "UTF-8"}
https://github.com/linkedpipes/etl
245
FILENAME: ChunkIterator.java
0.27513
package com.linkedpipes.etl.dataunit.core.rdf; import org.apache.commons.io.FileUtils; import java.io.File; import java.util.Iterator; public class ChunkIterator implements Iterator<ChunkedTriples.Chunk> { private final Iterator<File> directoryIterator; private Iterator<File> fileIterator = null; private ChunkedTriples.Chunk nextChunk; public ChunkIterator(Iterator<File> directoryIterator) { this.directoryIterator = directoryIterator; prepareNext(); } @Override public boolean hasNext() { return this.nextChunk != null; } @Override public ChunkedTriples.Chunk next() { ChunkedTriples.Chunk chunk = this.nextChunk; prepareNext(); return chunk; } private void prepareNext() { if (this.fileIterator != null && this.fileIterator.hasNext()) { this.nextChunk = new DefaultChunk(this.fileIterator.next()); } else if (this.directoryIterator.hasNext()) { this.fileIterator = FileUtils.iterateFiles( this.directoryIterator.next(), null, true); prepareNext(); } else { this.nextChunk = null; } } }
07159ab3-b84f-47fe-8158-796cdfb16a93
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-12-09 10:37:08", "repo_name": "vizZ/soundscreen", "sub_path": "/Soundscreen/src/main/java/com/arturglier/mobile/android/soundscreen/data/helpers/UsersHelper.java", "file_name": "UsersHelper.java", "file_ext": "java", "file_size_in_byte": 1083, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "7f1ef500e5b8cf8c11bb6e15d71b647487c45624", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/vizZ/soundscreen
227
FILENAME: UsersHelper.java
0.27048
package com.arturglier.mobile.android.soundscreen.data.helpers; import android.database.sqlite.SQLiteDatabase; import com.arturglier.mobile.android.soundscreen.data.contracts.UsersContract; public class UsersHelper implements DataHelper { private static final String CREATE_TABLE_USERS = SQL.table(UsersContract.TABLE_NAME) .column(UsersContract._ID).asIntegerPrimaryKey() .column(UsersContract.ID).asIntegerNotNullUniqueOnConflictReplace() .column(UsersContract.URI).asText() .column(UsersContract.PERMA_LINK).asText() .column(UsersContract.USERNAME).asText() .column(UsersContract.AVATAR_URL).asText() .create(); @Override public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_TABLE_USERS); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if(oldVersion == 1) { db.execSQL("DROP TABLE IF EXISTS " + UsersContract.TABLE_NAME); db.execSQL(CREATE_TABLE_USERS); } } }
43f7109f-5cf3-43ec-a203-7a81c4b597d3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-19 11:56:59", "repo_name": "manishbit97/andoid-studio-codes", "sub_path": "/app8/src/com/example/app8/MainActivity8.java", "file_name": "MainActivity8.java", "file_ext": "java", "file_size_in_byte": 1123, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "0ad559fbfd1c33106709cae80a58040b69917b62", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/manishbit97/andoid-studio-codes
223
FILENAME: MainActivity8.java
0.286169
/*THIS IS AUTO COMPLETE TEXT VIEW SAMPLE PROGRAM.*/ package com.example.app8; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; public class MainActivity8 extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity8); String arr[]={"hema malini","Ranbir kapoor","Arjun kapoor","Shahrukh khan","Salman khan","Arbaaz khan"}; AutoCompleteTextView atv=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView1); ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,arr); atv.setAdapter(adapter); atv.setThreshold(2); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main_activity8, menu); return true; } }
de98a2db-222a-4891-8679-90ba919c3b7b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-02-15T13:15:42", "repo_name": "hzlmy2002/cloudflare_ddns", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1018, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "9617d1ec7fce7b8e98b08a17fd711cb3d7c853fa", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hzlmy2002/cloudflare_ddns
274
FILENAME: README.md
0.285372
# Usage 1. You should have one domain,and add a subdomain for this script.For example,if your domain name is "helloworld.com",your subdomain name might be "ddns.helloworld.com". 2. The most important thing is to get your cloudflare api key,it can be found at "https://dash.cloudflare.com/profile/api-tokens". The api_key is the "Global API Key". 3. Install the requirements. ``` pip3 install requests ``` 4. Edit "main.py" and input your own information then using cronjob to run this program automatically.Please be reminded that your should first setup the environment variables(CF_Email,CF_Key,CF_Domain,CF_Host) so that the script can run properly. ``` #note:This sample only takes effect if you are using vixie-cron(Debian,Ubuntu).If you are using cronie(Arch,Redhat),please use "export xxx" instead. CF_Email="xxx@gmail.com" CF_Key="adiauyicas4d5a465a46" CF_Domain="example.com" CF_Hosts="hostname1,hostname2" */5 * * * * /usr/bin/python3 /opt/cloudflare_ddns/main.py ``` 5. Now it should work, just enjoy.
c435ef38-e817-4a8c-9a13-19798497fca6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-18 10:38:46", "repo_name": "saiyen/SSHJTest", "sub_path": "/src/main/java/nl/hogeschool/Connection/SSHConnection.java", "file_name": "SSHConnection.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "044d4e477f1e01ac697e7ac5502c69855cf036e7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/saiyen/SSHJTest
251
FILENAME: SSHConnection.java
0.261331
package nl.hogeschool.Connection; import java.io.IOException; import net.schmizz.sshj.SSHClient; import net.schmizz.sshj.connection.ConnectionException; import net.schmizz.sshj.connection.channel.direct.Session; import net.schmizz.sshj.transport.TransportException; import net.schmizz.sshj.userauth.keyprovider.KeyProvider; public abstract class SSHConnection { protected static SSHClient sshClient; protected static Session session; public static void setSSHClient() throws IOException{ sshClient = new SSHClient(); sshClient.loadKnownHosts(); sshClient.connect("HostName"); KeyProvider loadKey = sshClient.loadKeys("Key"); sshClient.authPublickey("root",loadKey); } public static SSHClient getSSHClient(){ return sshClient; } public static void disconnectSSHClient() throws IOException{ sshClient.disconnect(); } public static void startSession() throws ConnectionException, TransportException{ session = getSSHClient().startSession(); } public static void endSession() throws TransportException, ConnectionException{ session.close(); } }
a893b15f-57a4-49ee-babb-0ad8f77623e5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-01 17:26:19", "repo_name": "MMorphy/DinoISuki", "sub_path": "/src/main/java/hr/go2/play/jobs/InvalidateSubscriptionJob.java", "file_name": "InvalidateSubscriptionJob.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "1c9e59831603e8c202b1b64b0deb9066abd72456", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MMorphy/DinoISuki
214
FILENAME: InvalidateSubscriptionJob.java
0.280616
package hr.go2.play.jobs; import java.util.Date; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.quartz.QuartzJobBean; import hr.go2.play.services.SubscriptionService; public class InvalidateSubscriptionJob extends QuartzJobBean { private static Logger logger = LoggerFactory.getLogger(InvalidateSubscriptionJob.class); @Autowired private SubscriptionService subscriptionService; @Override protected void executeInternal(JobExecutionContext context) throws JobExecutionException { logger.debug("InvalidateSubscriptionJob: Started"); Date now = new Date(); int numberOfInvalidatingSubscriptions = subscriptionService.numberOfInvalidatingSubscriptions(now); if (numberOfInvalidatingSubscriptions > 0) { logger.info("About to invalidate " + numberOfInvalidatingSubscriptions + " subscription(s)."); } subscriptionService.updateValidityByTime(now); logger.debug("InvalidateSubscriptionJob: Finished"); } }
8466431e-b3b3-40ba-bb9c-bdd229f14f73
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-18 14:25:32", "repo_name": "rpzhangp/spring", "sub_path": "/Mybatis/src/test/java/com/pei/test/Apptest.java", "file_name": "Apptest.java", "file_ext": "java", "file_size_in_byte": 1050, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "cd3cdd19142709933c0ae5a7225579340b24f511", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rpzhangp/spring
229
FILENAME: Apptest.java
0.240775
package com.pei.test; import com.pei.dao.GoodsDAO; import com.pei.pojo.Goods; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.Test; import java.io.IOException; import java.util.List; /** * @program: spring-demo-di-01 * @description * @author: 彭于晏 * @create: 2021-07-18 21:23 **/ public class Apptest { @Test public void testALL(){ try { SqlSessionFactory build = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("mybatis-config.xml")); SqlSession sqlSession = build.openSession(); GoodsDAO goodsDAO = sqlSession.getMapper(GoodsDAO.class); List<Goods> all = goodsDAO.findAll(); for (Goods goods : all) { System.out.println(goods); } sqlSession.close(); } catch (IOException e) { e.printStackTrace(); } } }
d8deda96-7c32-4884-bc27-6a3d303e52dd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-12 02:54:16", "repo_name": "spider-warrior/spring-boot-demo", "sub_path": "/wxsk-vr-mine-game-entity/src/main/java/com/wxsk/vr/mine/model/ReceiveEnergy.java", "file_name": "ReceiveEnergy.java", "file_ext": "java", "file_size_in_byte": 1069, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "28e51d9695f09acbf711dd6b6dc8cd2cce11e031", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/spider-warrior/spring-boot-demo
234
FILENAME: ReceiveEnergy.java
0.224055
package com.wxsk.vr.mine.model; import org.springframework.data.mongodb.core.mapping.Document; /** * 领取每日体力配置 */ @Document public class ReceiveEnergy extends BaseModel{ /** * 领取的时间段标记 */ private int num; /** * 领取开始时间 */ private String startTime; /** * 领取结束时间 */ private String endTime; public int getNum() { return num; } public void setNum(int num) { this.num = num; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public ReceiveEnergy() { super(); } public ReceiveEnergy(int num, String startTime, String endTime) { super(); this.num = num; this.startTime = startTime; this.endTime = endTime; } }
1fe27522-b5e5-4e1e-912c-f1f43f4ca6f2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-05-16T09:46:26", "repo_name": "MinusGix/minux-bits", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1121, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "2ce1355c380bda8bd6fb0f5986d65790c0693b50", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/MinusGix/minux-bits
263
FILENAME: README.md
0.193147
# MinuxBits A github pages site with various notes and thoughts on various things. Made purely in HTML, uses `tacit.css`. It would be nice to have some simple manner to lose the repetition that this has, as if I want to make a modification to the header (for example) then I have to modify it everywhere. TODO/IDEAs to write about: - Modding Dishonored with UnrealExplorer. - C Direct2D getting started guide, basically an adaption of https://docs.microsoft.com/en-us/windows/desktop/direct2d/getting-started-with-direct2d but for C - Overview of various Hex Editors - Thoughts on the problems of designing fantasy systems to interact with real world physical laws. - Learn about DirectX and write some about it? - Write about making a simple x11 program. - Making controlflow (such as if-statements) in brainfuck - Using Befunge-like to make a spellcrafting system for a game. - Using Befunge. - Basics of Hammer Map Editor - VMF file format - Basic Linux commands that I feel are important to know, and how to setup aliases since those are important. - (Ab)using JS Proxy & `with` statement to construct a simple DSL.
55d0d977-d109-4ecf-998f-b3019e63a820
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-10-18 01:39:56", "repo_name": "bejvisek/htools", "sub_path": "/src/main/java/io/github/htools/extract/modules/MarkDocNo.java", "file_name": "MarkDocNo.java", "file_ext": "java", "file_size_in_byte": 1199, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "c922ec8c027d88969126957472dbb871ddd31704", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bejvisek/htools
270
FILENAME: MarkDocNo.java
0.284576
package io.github.htools.extract.modules; import io.github.htools.search.ByteRegex; import io.github.htools.search.ByteSearchPosition; import io.github.htools.extract.Content; import io.github.htools.extract.Extractor; import io.github.htools.search.ByteSearch; import io.github.htools.search.ByteSearchSection; import io.github.htools.lib.Log; /** * Marks &lt;docno&gt; sections. * <p> * @author jbpvuurens */ public class MarkDocNo extends SectionMarker { public static Log log = new Log(MarkDocNo.class); public ByteSearch endmarker = ByteSearch.create("</docno>"); public MarkDocNo(Extractor extractor, String inputsection, String outputsection) { super(extractor, inputsection, outputsection); } @Override public ByteRegex getStartMarker() { return new ByteRegex("<docno>"); } @Override public ByteSearchSection process(Content content, ByteSearchSection section) { ByteSearchPosition end = endmarker.findPos(section); if (end.found() && end.start > section.innerstart) { return content.addSectionPos(outputsection, content.content, section.start, section.innerstart, end.start, end.end); } return null; } }
02301545-6286-45fb-a06e-14c2fac10184
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-04-18T22:32:53", "repo_name": "ITMCdev/vscode-extensions", "sub_path": "/node/CHANGELOG.md", "file_name": "CHANGELOG.md", "file_ext": "md", "file_size_in_byte": 1139, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "32b2486a8bd5b51686119406f7a55fc88cdabf29", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ITMCdev/vscode-extensions
378
FILENAME: CHANGELOG.md
0.236516
# Change Log All notable changes to the `node-extension-pack` extension pack will be documented in this file. ## 0.1.0 - 2021-04-20 - Removed `steoates.autoimport` (to be moved to `node-typescript-extension-pack`), `eg2.vscode-npm-script`, `vscode-proto3`. - Added `ms-vscode.node-debug2`, `chris-noring.node-snippets`, `bengreenier.vscode-node-readme` as extension pack - Added `itmcdev.generic-extension-pack`, `itmcdev.html-extension-pack`, `esbenp.prettier-vscode`, `dbaeumer.vscode-eslint`, `VisualStudioExptTeam.vscodeintellicode`, `SonarSource.sonarlint-vscode` as extension dependencies ## 0.0.9 - 2020-06-12 - Removed `orta.vscode-jest`, to be added to `node-test-extension-pack`. ## 0.0.8 - 2020-05-03 - Removed `itmcdev.generic-extension-pack` from the extension. ## 0.0.5 - 2018-04-16 - Add `itmcdev.generic-extension-pack`, `itmcdev.html-extension-pack` as part of the extension dependencies. ## 0.0.2 - 2018-08-22 - Add `vscode-npm-script` extension. - Add `npm-intellisensea` extension. - Removed `itmcdev` dependencies. Those should be installed independently from now. ## 0.0.1 - 2018-08-21 - Initial release
1ba09e1b-0c59-4e56-87db-c71e2a496387
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-16 04:59:11", "repo_name": "baozib/myWEbp", "sub_path": "/recyclework/src/main/java/com/baozi/domain/manager/ManagerComm.java", "file_name": "ManagerComm.java", "file_ext": "java", "file_size_in_byte": 1047, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "d5b64b10683b8c1563cfae9caec919ea2e2f1dc9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/baozib/myWEbp
208
FILENAME: ManagerComm.java
0.224055
package com.baozi.domain.manager; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.*; @Builder(toBuilder = true) @NoArgsConstructor @AllArgsConstructor @Data @ToString @TableName("manager_comm") @ApiModel("管理用户的评论表") public class ManagerComm extends Manager{ @ApiModelProperty("评论表id,自增") @TableId(type = IdType.AUTO) private Long id; @ApiModelProperty("评论者") @TableField("evaluator") private Long evaluator; @ApiModelProperty("评论者名称") private String evaluatorName; @ApiModelProperty("被评论者") @TableField("evaluated") private Long evaluated; @ApiModelProperty("被评论者名称") private String evaluatedName; @ApiModelProperty("内容") @TableField("content") private String content; }
598c893b-c64f-4af1-9158-6eb08f90c355
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-11-26 16:32:06", "repo_name": "Co-Di-Ana/CoDiAna-Beta", "sub_path": "/src/edu/codiana/execution/security/structures/risks/PackageSecurityRisk.java", "file_name": "PackageSecurityRisk.java", "file_ext": "java", "file_size_in_byte": 1057, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "4eff95389a5c1f6fa0005f7e1b283bcece919634", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Co-Di-Ana/CoDiAna-Beta
241
FILENAME: PackageSecurityRisk.java
0.280616
package edu.codiana.execution.security.structures.risks; /** * @author Jan Hybš * @version 1.0 */ public class PackageSecurityRisk extends SecurityRisk { private String packagePath; private final String lineImport; private final String lineUse; /** * Create instace using package path (such as "java.lang") and rule description * @param packagePath name of the package (such as "java.lang") * @param ruleDescription description */ public PackageSecurityRisk (String packagePath, String ruleDescription) { super (ruleDescription); this.packagePath = packagePath; this.lineImport = "import " + packagePath + "."; this.lineUse = packagePath; } @Override public boolean checkLine (String line) { if (line.indexOf (lineImport) != -1) return true; if (line.indexOf (lineUse) != -1) return true; return false; } @Override public String toString () { return String.format ("[ClassSecurityRisk package='%s' desc='%s']", packagePath, ruleDescription); } }
a7bfcb9e-270a-49d4-8312-918a6ed17ef7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-07 01:50:27", "repo_name": "1362289734/understandc", "sub_path": "/projects/javase/JavaseDemo01/5(1).30_File/src/club/banyuan/demo/io_api4/CharacterStream.java", "file_name": "CharacterStream.java", "file_ext": "java", "file_size_in_byte": 1142, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "d515aaf3ab8af23f47a463b8dea59753b704e683", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/1362289734/understandc
262
FILENAME: CharacterStream.java
0.277473
package club.banyuan.demo.io_api4; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; /** * @author sanye * @version 1.0 * @date 2020/5/30 3:22 下午 */ public class CharacterStream { public static void main(String[] args) throws IOException { Reader reader = new FileReader("Readme.md"); Writer writer = new FileWriter("Readme.md",true); // writer.write("张三丰"); // writer.append("蟋蟀"); // writer.flush(); // // BufferedReader bufferedReader=new BufferedReader(reader); // String str=null; //一次性读取文件里面一行的内容 // // while((str=bufferedReader.readLine())!=null){ // System.out.println("----"+str); // } // bufferedReader.close(); // //字符缓冲流使用的好处 BufferedWriter bufferedWriter=new BufferedWriter(writer); bufferedWriter.write("太极张三丰"); bufferedWriter.newLine(); bufferedWriter.write("武当张无忌"); bufferedWriter.newLine(); bufferedWriter.flush(); } }
77ed5ef2-db32-4129-9af2-3d4babf2885d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-06 17:57:19", "repo_name": "cnlkl/ConfigurableFrameLayout", "sub_path": "/app/src/main/java/cn/lkllkllkl/configurableframelayoutsample/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "626583b2ef0e7f23fb69668dc354fa99186ff252", "star_events_count": 16, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/cnlkl/ConfigurableFrameLayout
217
FILENAME: MainActivity.java
0.226784
package cn.lkllkllkl.configurableframelayoutsample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import cn.lkllkllkl.configurableframelayout.DraggableImageView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DraggableImageView draggableImageView1 = (DraggableImageView) findViewById(R.id.draggable_image_view_1); DraggableImageView draggableImageView2 = (DraggableImageView) findViewById(R.id.draggable_image_view_2); DraggableImageView draggableImageView3 = (DraggableImageView) findViewById(R.id.draggable_image_view_3); GlideApp.with(this) .load(R.drawable.black) .into(draggableImageView1); GlideApp.with(this) .load(R.drawable.cat) .into(draggableImageView2); GlideApp.with(this) .load(R.drawable.cat) .into(draggableImageView3); } }
55ac413a-3f10-4e6a-8ad9-eee8e46a3909
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-28 06:58:24", "repo_name": "ampie/serenity-filterchain", "sub_path": "/serenity-filterchain-core/src/main/java/net/serenitybdd/cucumber/filterchain/ProcessorLink.java", "file_name": "ProcessorLink.java", "file_ext": "java", "file_size_in_byte": 1071, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "0405ded5de99e1045221e2429b303e462fc90d0c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ampie/serenity-filterchain
222
FILENAME: ProcessorLink.java
0.293404
package net.serenitybdd.cucumber.filterchain; import net.thucydides.core.model.TestOutcome; import java.util.ArrayList; import java.util.List; public class ProcessorLink extends TestOutcomeLink<ProcessingStrategy> implements ReceivingLink, TestOutcomeProducingLink { private List<TestOutcomeProducingLink> sources = new ArrayList<>(); private List<TestOutcome> output; public List<TestOutcomeProducingLink> getSources() { return sources; } @Override public List<TestOutcome> produce() { if (this.output == null) { this.output = getImplementation().process(retrieveInputOutcomes()); } return this.output; } private List<TestOutcome> retrieveInputOutcomes() { List<TestOutcome> inputs = new ArrayList<>(); for (TestOutcomeProducingLink input : this.sources) { inputs.addAll(input.produce()); } return inputs; } @Override public void addSource(TestOutcomeLink source) { sources.add((TestOutcomeProducingLink) source); } }
ad288733-4a75-42c6-92f1-b502183bf6f1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-17 07:34:49", "repo_name": "WoXinfeiyang/OrientationTest", "sub_path": "/app/src/main/java/com/fxj/orientationtest/OrientationEventListenerActivity.java", "file_name": "OrientationEventListenerActivity.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "93e167086df3f58820cd1f13cec85ce4d2695b8d", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/WoXinfeiyang/OrientationTest
172
FILENAME: OrientationEventListenerActivity.java
0.256832
package com.fxj.orientationtest; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.OrientationEventListener; public class OrientationEventListenerActivity extends Activity { private String TAG=OrientationEventListenerActivity.class.getSimpleName(); private OrientationEventListener orientationEventListener; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.orientation_event_listener_activity_layout); orientationEventListener = new OrientationEventListener(this) { @Override public void onOrientationChanged(int orientation) { Log.d(TAG,"**onOrientationChanged**orientation="+orientation); } }; if(orientationEventListener.canDetectOrientation()){ orientationEventListener.enable(); }else{ orientationEventListener.disable(); } } @Override protected void onDestroy() { super.onDestroy(); orientationEventListener.disable(); } }
182ae6bb-7f8e-4e33-bf53-96f1a6ab4c60
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-07 22:43:06", "repo_name": "ymaletski/HierarchyProject", "sub_path": "/src/main/java/com/roxoft/hierarchy/dao/GeneralSystemsDAO.java", "file_name": "GeneralSystemsDAO.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "fead563a456a1509b177773f47c6ea9b915ffc72", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ymaletski/HierarchyProject
189
FILENAME: GeneralSystemsDAO.java
0.259826
package com.roxoft.hierarchy.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public abstract class GeneralSystemsDAO { private static final Logger LOGGER = LogManager.getLogger(GeneralSystemsDAO.class); protected Connection connection; protected PreparedStatement getPreparedStatement(String sql) { PreparedStatement preparedStatement = null; try { preparedStatement = connection.prepareStatement(sql); } catch (SQLException e) { LOGGER.error("SQLException in GeneralSystemsDAO.PreparedStatement(): ", e); } return preparedStatement; } protected void closePreparedStatement(PreparedStatement preparedStatement) { try { if (preparedStatement != null){ preparedStatement.close(); } } catch (SQLException e) { LOGGER.error("SQLException in GeneralSystemsDAO.closePreparedStatement(): ", e); } } }
e7ae2cd9-da48-4836-b2b1-e85e96cd2d06
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-06 03:18:12", "repo_name": "skygst/MyZhengHe", "sub_path": "/MyFrameDemo/src/main/java/com/gst/frame/ui/img_test/ImageViewDemoActivity.java", "file_name": "ImageViewDemoActivity.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "b5aa9734ed001401dfa6880e9908d19c822d95cc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/skygst/MyZhengHe
239
FILENAME: ImageViewDemoActivity.java
0.259826
package com.gst.frame.ui.img_test; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import com.gst.frame.R; import com.gst.frame.ui.BaseActivity; /** * Created by gst-pc on 2017/4/12. */ public class ImageViewDemoActivity extends BaseActivity implements View.OnClickListener { private Button btnPaowuxian; private Context mContext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.img_demo); init(); setView(); } private void init() { mContext = ImageViewDemoActivity.this; } private void setView() { btnPaowuxian = (Button) findViewById(R.id.btn_paowuxian); btnPaowuxian.setOnClickListener(this); } @Override public void onClick(View v) { if(v == btnPaowuxian) { gotoActivity(ImageParabolaActivity.class); } } private void gotoActivity(Class<?> classes) { startActivity(new Intent(mContext, classes)); } }
44677aab-93a5-4e1c-a727-0d516133b7f7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-25T10:30:37", "repo_name": "site-prism/site_prism", "sub_path": "/.github/CONTRIBUTING.md", "file_name": "CONTRIBUTING.md", "file_ext": "md", "file_size_in_byte": 996, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "fa1344d798957f8bc407ff49586668ce36231aa3", "star_events_count": 286, "fork_events_count": 47, "src_encoding": "UTF-8"}
https://github.com/site-prism/site_prism
240
FILENAME: CONTRIBUTING.md
0.247987
# PR template for SitePrism framework Thanks for offering to help by contributing a PR to site_prism. Please help us understand your change by including the following information in your PR. ## Type of PR - Feature / Bugfix / Refactor ## Reasons for Change If you feel it easier to describe the change with code blocks feel free ## Steps to reproduce (If a Bugfix) Show us a before / after from your PR. So ideally the situation beforehand which was broken, and afterwards it isn't broken. Try to include a Short, Self-Contained, Correct Compilable Example [SSCCE](http://sscce.org/) ## Pointers This repo is currently being monitored and maintained by the following tools - [rubocop](https://github.com/bbatsov/rubocop) : Ruby Style Guide best practices - [simplecov](https://github.com/colszowka/simplecov) : Gem code is all consumed in tests - [rspec](https://github.com/rspec/rspec) : Unit test coverage - [cucumber](https://github.com/cucumber/cucumber-ruby) : Feature test coverage
611cceee-dbe6-467d-aa10-157e50b50cee
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-23 16:39:21", "repo_name": "ashankaushalya97/MotorbikeShop-Management-System", "sub_path": "/pckg1/src/entity/Delivery.java", "file_name": "Delivery.java", "file_ext": "java", "file_size_in_byte": 1051, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "c17978dc9c368e3c720a83f293b21fbfed53e356", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ashankaushalya97/MotorbikeShop-Management-System
214
FILENAME: Delivery.java
0.246533
package entity; public class Delivery implements SuperEntity{ private DeliveryPK deliveryPK; private String address; private String states; public Delivery() { } public Delivery(DeliveryPK deliveryPK, String address, String states) { this.deliveryPK = deliveryPK; this.address = address; this.states = states; } public Delivery(String deliveryId,String orderId, String address, String states) { this.deliveryPK = new DeliveryPK(deliveryId,orderId); this.address = address; this.states = states; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getStates() { return states; } public void setStates(String states) { this.states = states; } public DeliveryPK getDeliveryPK() { return deliveryPK; } public void setDeliveryPK(DeliveryPK deliveryPK) { this.deliveryPK = deliveryPK; } }
bf679e8f-e19a-4379-a327-2ee3894802d8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-31 01:58:41", "repo_name": "zhangchennjupt/WhoIsTheUndercover", "sub_path": "/app/src/main/java/com/lorytech/WhoIsTheUndercover/ListAdapterUtil.java", "file_name": "ListAdapterUtil.java", "file_ext": "java", "file_size_in_byte": 993, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "012d13c1f5a3f52cc3dcbaabf3e06f4c427a1906", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhangchennjupt/WhoIsTheUndercover
210
FILENAME: ListAdapterUtil.java
0.286169
package com.lorytech.WhoIsTheUndercover; import android.view.View; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.ListView; /** * Created by HCF on 2017/8/23. */ public class ListAdapterUtil { /** * 设置ListView适配高度 * * @param listView */ public static void MeasureHeight(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter != null) { int totalHeight = 0; for (int k = 0; k < listAdapter.getCount(); k++) { View listItem = listAdapter.getView(k, null, listView); listItem.measure(0, 0); totalHeight += listItem.getMeasuredHeight(); } ViewGroup.LayoutParams params = listView.getLayoutParams(); params.height = totalHeight + (listView.getDividerHeight() * (listView.getCount() - 1)); listView.setLayoutParams(params); } } }
96fdd653-f88e-4902-9c7a-52486158b254
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-01 18:22:00", "repo_name": "yasham1990/apachemoonshot", "sub_path": "/Kafka/src/main/java/com/cmpe239/MessageReciever.java", "file_name": "MessageReciever.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "533c31fa6b4c9de2c7b22034d67840d871eb532f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yasham1990/apachemoonshot
222
FILENAME: MessageReciever.java
0.279042
package com.cmpe239; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class MessageReciever { String[] responseData; public String[] messageReciever() { String url = "http://localhost:8080/moonshotvalues"; try { //URL message receiver URL obj = new URL(url); HttpURLConnection connection = (HttpURLConnection) obj.openConnection(); connection.setRequestMethod("GET"); //Create InputReader BufferedReader inputReader = new BufferedReader(new InputStreamReader(connection.getInputStream())); String inputLine; String data = ""; while ((inputLine = inputReader.readLine()) != null) { data = inputLine; } inputReader.close(); responseData = data.split(";"); for (int i = 0; i < responseData.length; i++) { System.out.println("@@@ resp " + responseData[i]); } } catch (Exception e) { e.printStackTrace(); } return responseData; } }
8e9a292a-7e25-473b-bd28-68dada722ce2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-23 22:43:43", "repo_name": "wgcarvajal/gestorRecursosDeportivos", "sub_path": "/src/java/com/unicauca/gestorrecursosdeportivos/managedbeans/escenarios/ClasesController.java", "file_name": "ClasesController.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "a75fe43aadce7d8535e705d9f773fb464418a543", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wgcarvajal/gestorRecursosDeportivos
239
FILENAME: ClasesController.java
0.27513
/* * 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.unicauca.gestorrecursosdeportivos.managedbeans.escenarios; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.primefaces.context.RequestContext; /** * * @author geovanny */ @ManagedBean @ViewScoped public class ClasesController implements Serializable { public ClasesController() { } public void agregarClases() { this.refrescarVentanaAgregarClases(); this.abrirVentanaAgregarClases(); } public void abrirVentanaAgregarClases() { RequestContext requestContext = RequestContext.getCurrentInstance(); requestContext.execute("PF('ventanaAgregarClases').show()"); } public void refrescarVentanaAgregarClases() { RequestContext requestContext = RequestContext.getCurrentInstance(); requestContext.update("formAgregarClases"); } }
038c8ca1-521b-4c73-9092-4af159d9f677
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-10 08:52:05", "repo_name": "Sasinda98/CPMS_Project", "sub_path": "/app/src/main/java/com/construction/app/cpms/inventoryManagement/testParcel.java", "file_name": "testParcel.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "04a8251419b399e5071c204e614d8521777c984f", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Sasinda98/CPMS_Project
207
FILENAME: testParcel.java
0.240775
package com.construction.app.cpms.inventoryManagement; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import com.construction.app.cpms.R; import com.construction.app.cpms.inventoryManagement.beans.inventory_category_Bean; public class testParcel extends AppCompatActivity { private TextView tv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test_parcel); //Getting category object from category grid activity. //We get the image id and the category name for the query from this Intent intent = getIntent(); inventory_category_Bean catBean = intent.getParcelableExtra("catObj"); String catName = catBean.getName(); int imgID = catBean.getImageID(); ImageView imageView = findViewById(R.id.parcelImage); imageView.setImageResource(imgID); tv = (TextView) findViewById(R.id.parceltv); tv.setText(catName); } }
e393b824-8594-4c49-bd04-3011c96141f0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-12 15:16:44", "repo_name": "LoveAndroid01/BaseAndroid", "sub_path": "/baseandroidcore/src/main/java/com/hengyi/baseandroidcore/utils/CountDownUtils.java", "file_name": "CountDownUtils.java", "file_ext": "java", "file_size_in_byte": 1063, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "77e5b271fd0b5644067e06f669c7f36985f5dd46", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LoveAndroid01/BaseAndroid
227
FILENAME: CountDownUtils.java
0.291787
package com.hengyi.baseandroidcore.utils; import android.os.CountDownTimer; /** * Created by 繁华 on 2017/5/14. * 倒计时工具类 */ public class CountDownUtils { private setOnCountDownListener listener = null; private CountDownTimer timer = null; public CountDownUtils(int CountSecond, int IntervalSecond){ timer = new CountDownTimer(CountSecond,IntervalSecond){ @Override public void onTick(long millisUntilFinished) { if(listener != null) listener.onTick((int)(millisUntilFinished / 1000)); } @Override public void onFinish() { if(listener != null) listener.onFinish(); } }; } public void start(setOnCountDownListener listener){ this.listener = listener; timer.start(); } public void stop(){ timer.cancel(); } public interface setOnCountDownListener{ public void onTick(int second); public void onFinish(); } }
78ea817c-97fd-4663-9246-9634eb9b5076
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-07 05:46:50", "repo_name": "nhdxy/TallyBook", "sub_path": "/app/src/main/java/com/hoyden/db/DbHelper.java", "file_name": "DbHelper.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "5b0af755a95d8178e4f2c9953cb3a20aa905e372", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nhdxy/TallyBook
210
FILENAME: DbHelper.java
0.278257
package com.hoyden.db; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.hoyden.tallybook.MyApplication; /** * Created by nhd on 2017/4/7. */ public class DbHelper extends SQLiteOpenHelper { private static DbHelper instance; public DbHelper(Context context) { super(context, "tally.db", null, 2); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE tb_tally (id INTEGER PRIMARY KEY AUTOINCREMENT,date long,type text,content text,price float)"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS tb_tally"); onCreate(db); } public synchronized static DbHelper getInstance(){ if (null == instance) { instance = new DbHelper(MyApplication.getInstance()); } return instance; } }
e074cde5-41f2-4371-9c1e-a152ef11c1a7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-13 02:14:50", "repo_name": "Madwheel/WZAdLibrary", "sub_path": "/adlibrary/src/main/java/com/iwangzhe/adlibrary/AdApplication.java", "file_name": "AdApplication.java", "file_ext": "java", "file_size_in_byte": 1144, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "d8e06b50cc42c06630f35c6639b2a1ee6b57094c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Madwheel/WZAdLibrary
330
FILENAME: AdApplication.java
0.280616
package com.iwangzhe.adlibrary; import com.iwangzhe.adlibrary.adv.AdSystemMain; import com.iwangzhe.baselibrary.IRouter; import com.iwangzhe.baselibrary.IoKvdb; import com.iwangzhe.baselibrary.NetHttp; /** * author : 亚辉 * e-mail : 2372680617@qq.com * date : 2020/8/1113:46 * desc : */ public class AdApplication { private static AdApplication mAdApplication = null; public static AdApplication getInstance() { synchronized (AdApplication.class) { if (mAdApplication == null) { mAdApplication = new AdApplication(); } } return mAdApplication; } public NetHttp mNetHttp; private IoKvdb mIoKvdb; private IRouter mIRouter; public void init(NetHttp netHttp, IoKvdb ioKvdb, IRouter iRouter) { this.mNetHttp = netHttp; this.mIoKvdb = ioKvdb; this.mIRouter = iRouter; AdSystemMain.getInstance().born(); } public NetHttp getmNetHttp() { return mNetHttp; } public IRouter getmIRouter() { return mIRouter; } public IoKvdb getmIoKvdb() { return mIoKvdb; } }
5d18e86e-f176-42b7-b194-458cf5c83d16
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-19 11:00:49", "repo_name": "radeckid/Pixel_Warriors_JavaFX", "sub_path": "/src/pixel_warriors/ExitPrompt.java", "file_name": "ExitPrompt.java", "file_ext": "java", "file_size_in_byte": 1145, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "a0759315e848baeeb1852dc26859c006aad2045e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/radeckid/Pixel_Warriors_JavaFX
248
FILENAME: ExitPrompt.java
0.280616
package pixel_warriors; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; import javafx.stage.Stage; import java.util.Optional; public class ExitPrompt { public void makePrompt(Stage stage) { Alert alert = new Alert(Alert.AlertType.CONFIRMATION); alert.setTitle("Juz uciekasz?!"); alert.setHeaderText("Wylogować czy wyjść całkowicie?"); alert.setContentText("Wybierz jedną z opcji:"); alert.initOwner(stage); ButtonType buttonTypeOne = new ButtonType("Wyloguj"); ButtonType buttonTypeTwo = new ButtonType("Wyjdź z gry"); ButtonType buttonTypeThree = new ButtonType("Anuluj"); alert.getButtonTypes().setAll(buttonTypeOne, buttonTypeTwo, buttonTypeThree); Optional<ButtonType> result = alert.showAndWait(); if (result.get() == buttonTypeOne) { stage.close(); LoginDialog loginDialog = new LoginDialog(); loginDialog.makeLoginDialog(); } else if (result.get() == buttonTypeThree) { alert.close(); } else { stage.close(); } } }
26cd65d3-2482-47ac-a72b-12b8f613e681
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-13 01:52:03", "repo_name": "acefalobi/kidyview", "sub_path": "/core/src/main/java/com/ltst/core/data/response/ParentChildResponse.java", "file_name": "ParentChildResponse.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "8b18c2fe576ff27aba93f498fad8165e80212ca0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/acefalobi/kidyview
209
FILENAME: ParentChildResponse.java
0.218669
package com.ltst.core.data.response; import com.squareup.moshi.Json; /* response has info about child in specific ic_school for parent app */ public class ParentChildResponse { @Json(name = "school_id") private int schoolId; @Json(name = "school_title") private String schoolTitle; @Json(name = "school_avatar_url") private String schoolAvatar; @Json(name = "child_profile") private ChildResponse child; public ParentChildResponse(int schoolId, String schoolTitle, String schoolAvatar, ChildResponse child) { this.schoolId = schoolId; this.schoolTitle = schoolTitle; this.schoolAvatar = schoolAvatar; this.child = child; } public int getSchoolId() { return schoolId; } public String getSchoolTitle() { return schoolTitle; } public String getSchoolAvatar() { return schoolAvatar; } public ChildResponse getChild() { return child; } }
a34410ac-b6fe-4fca-b630-345f94294d6f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-06-11T14:45:03", "repo_name": "Welgriv/.emacs.d", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 979, "line_count": 18, "lang": "en", "doc_type": "text", "blob_id": "a718e092376a98e4695106c92d3f69fa8ad3c2d1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Welgriv/.emacs.d
297
FILENAME: README.md
0.242206
# .emacs.d My .emacs.d/ repo, with my customizations ## To properly enable spell-check : 1) Download aspell at http://aspell.net/ (tar file : http://mirror.ibcp.fr/pub/gnu/aspell/) 2) uncompress SOMEWHERE -> go in SOMEWHERE -> ./configure --disable-curses --prefix=PATH_TO_ASPELL_BIN -> make -> make install 3) Set PATH_TO_ASPELL_BIN between the "" in the init.el for ispell 4) Download any dictionary at http://mirror.ibcp.fr/pub/gnu/aspell/dict/ (exemple tar file for EN : http://mirror.ibcp.fr/pub/gnu/aspell/dict/en/aspell6-en-2018.04.16-0.tar.bz2) 5) uncompress SOMEWHERE_D -> go in SOMEWHERE_D -> ./configure --vars ASPELL=PATH_TO_ASPELL_BIN/aspell DESTDIR=PATH_TO_ASPELL_BIN/lib/ -> make -> make install (to be adapted...) 6) enjoy ## To use minted package in latex : 1) Download minted package at : https://ctan.org/pkg/minted 2) Exctract and run make to generate minted.sty 3) Copy minted.sty to TEXLIVEINSTALLDIR/texmf-local/tex/latex/local/ 4) Run texhash 5) Enjoye
4ee453c9-b086-4fbb-b41e-2d7046df95b9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-07-23T00:29:03", "repo_name": "suirad/Patreon-Slurp", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1107, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "dcb09f46dcf3da3bf986e04b1bd34d7e53c31576", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/suirad/Patreon-Slurp
277
FILENAME: README.md
0.290176
# PatreonSlurp **Using Patreon API Keys; pulls list of patrons to a file and cents donated to a configurable file.** ## Installation To get started, follow the guide below: 1. Ensure [Elixir](http://elixir-lang.org/install.html) is fully installed on the target machine. 2. Clone this repo to the target machine. 3. Navigate to <repo folder>/config/config.exs. Modify this file following the notes provided. 4. Navigate a shell window to the repo folder and type the following to download dependencies: mix deps.get 5. Now type the following to build the project: **WINDOWS(cmd):** set "MIX_ENV=prod" && mix escript.build **UNIX(bash)** MIX_ENV=prod mix escript.build **NOTE: This needs to be run after any following config changes.** 6. Use the following command under the repo directory to run it: escript patreon_slurp 7. File output will look like the following: <patron_name_1> <cents_donated_1> <patron_name_2> <cents_donated_2> <patron_name_n> <cents_donated_n>
8e37a9f9-03ff-4132-85e7-96ba788158fb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-01 15:52:17", "repo_name": "zhengldg/concurrency", "sub_path": "/src/main/java/com/mmall/concurrency/aqs/CyclicBarrierDemo.java", "file_name": "CyclicBarrierDemo.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "987a6973d3577e57bbb3c9e34877a3f8cd632ed4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhengldg/concurrency
251
FILENAME: CyclicBarrierDemo.java
0.288569
package com.mmall.concurrency.aqs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.*; /** * 控制一组数量的线程都准备就绪后,这些线程再继续往下执行 */ public class CyclicBarrierDemo { static Logger log = LoggerFactory.getLogger(CyclicBarrierDemo.class); static final int threadCount = 20; static CyclicBarrier cyclicBarrier = new CyclicBarrier(5); public static void main(String[] args) throws Exception { ExecutorService executorService = Executors.newCachedThreadPool(); for (int i = 0; i < threadCount; i++) { final int t = i; Thread.sleep(1000); executorService.execute(() -> { update(t); }); } log.info("finished"); executorService.shutdown(); } static void update(int i) { log.info("thread:{} is awaiting ", i); try { cyclicBarrier.await(); } catch (InterruptedException e) { e.printStackTrace(); } catch (BrokenBarrierException e) { e.printStackTrace(); } log.info("thread:{} is continue ", i); } }
8f8272c0-93aa-4f77-b958-e057a5006834
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-02-18T07:50:09", "repo_name": "alyssaq/face-find-fun", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1037, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "b5e0e1d734cafcf9307e683639617593e54416d3", "star_events_count": 7, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/alyssaq/face-find-fun
254
FILENAME: README.md
0.278257
#Face Find Fun Access webcam through the browser with [navigator.getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia) Face detection and tracking with [headtrackr](https://github.com/auduno/headtrackr) Drawing with [HTML5 canvas](http://www.html5canvastutorials.com/tutorials/html5-canvas-tutorials-introduction/) Current version tracks your face via webcam and places a party hat on top of your head. Moving your head to the right corner changes the visual CSS webkit-filter ##Demo## <https://alyssaq.github.io/face-find-fun> ##Usage 1) Install nodejs. The only node module dependency is express. 2) To grab node dependencies, run: > npm install 3) Enable getUserMedia() in chrome. In the URL, type: chrome://flags and search and enable: > **Enable screen capture support in getUserMedia()** 4) To run the web server, in the project folder: > node app.js 5) View the party hat on top of your head at: <http://localhost:8080/> 6) Have fun! Draw more shapes!
11fa3281-0427-4dc5-af27-b248eb2facc0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-21 06:04:17", "repo_name": "lulyfan/smartHome", "sub_path": "/data/src/main/java/com/ut/data/dataSource/remote/udp/cmd/ReadDeviceStateInfo.java", "file_name": "ReadDeviceStateInfo.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "4ebea27c84d002b9bea6f9c5b71a3d66e4ace50e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lulyfan/smartHome
263
FILENAME: ReadDeviceStateInfo.java
0.276691
package com.ut.data.dataSource.remote.udp.cmd; import com.ut.data.dataSource.remote.udp.Msg; import java.nio.ByteBuffer; import java.util.List; /** * Created by huangkaifan on 2018/6/12. */ public class ReadDeviceStateInfo extends CmdBase<ReadDeviceStateInfo.Data> { @Override public Msg build() { Msg msg = new Msg(); msg.setLinkCmd((byte) Info.LinkCMD.MULTI_INFO_FRAME); msg.setAppCmd((byte) Info.AppCMD.READ_DEVICE_STATE); msg.setSrcMac(netHelper.getSrcMac()); msg.setDestMac(BROADCAST_DEST_MAC); return msg; } @Override Data parse(Msg msg) { ByteBuffer buffer = ByteBuffer.wrap(msg.getContent()); Data data = new Data(); buffer.get(data.frameNum); buffer.get(data.totalFrame); buffer.get(data.deviceCount); return data; } @Override List<Data> parse(List<Msg> msgs) { return null; } public static class Data { byte[] frameNum = new byte[2]; byte[] totalFrame = new byte[2]; byte[] deviceCount = new byte[2]; } }
66f13b30-557b-4a02-b624-bcb7a8a32908
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-12 07:45:26", "repo_name": "debjava/jwt-spring-boot-openapi", "sub_path": "/src/main/java/com/ddlab/rnd/BootStrapInitializer.java", "file_name": "BootStrapInitializer.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "712a710561aea032ac77597a95c74fb0b894dfdd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/debjava/jwt-spring-boot-openapi
183
FILENAME: BootStrapInitializer.java
0.243642
package com.ddlab.rnd; import java.util.HashSet; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; import com.ddlab.rnd.entity.CreateUserRequest; import com.ddlab.rnd.role.Role; import com.ddlab.rnd.service.UserAuthService; @Component public class BootStrapInitializer implements ApplicationListener<ApplicationReadyEvent> { @Autowired private UserAuthService userAuthService; @Override public void onApplicationEvent(ApplicationReadyEvent event) { CreateUserRequest request = new CreateUserRequest(); request.setUsername("deba"); request.setPassword("Deba@1234"); Set<Role> authSet = new HashSet<Role>(); authSet.add(Role.ROLE_ADMIN); request.setAuthorities(authSet); userAuthService.upsert(request); } }
e2581d21-4941-4b67-9bbd-b26221ff1470
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-07 14:59:48", "repo_name": "code-kungfu/acorn", "sub_path": "/src/main/java/com/transferwise/acorn/webhook/VerifyWebhookRequest.java", "file_name": "VerifyWebhookRequest.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "a4f9a5026406f3910b21ac418c22d0894562a80d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/code-kungfu/acorn
194
FILENAME: VerifyWebhookRequest.java
0.261331
package com.transferwise.acorn.webhook; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; import java.util.Base64; @Service @RequiredArgsConstructor public class VerifyWebhookRequest { private final PublicKey publicKey; public void payload(String payload, String signature) { boolean signatureValid; try { Signature sign = Signature.getInstance("SHA256WithRSA"); sign.initVerify(publicKey); sign.update(payload.getBytes()); byte[] signatureBytes = Base64.getDecoder().decode(signature); signatureValid = sign.verify(signatureBytes); } catch (NoSuchAlgorithmException | SignatureException | InvalidKeyException e) { throw new WebhookRequestInvalid(); } if (!signatureValid) { throw new WebhookRequestInvalid(); } } }
30fc2a82-50b9-4c9f-9707-2d5ad4abd785
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-05-29T19:19:54", "repo_name": "manon-boiteau/simpleForm-LeReacteur", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1124, "line_count": 60, "lang": "en", "doc_type": "text", "blob_id": "cb976bd740830d24d6045dccee12456ec0429c62", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/manon-boiteau/simpleForm-LeReacteur
305
FILENAME: README.md
0.235108
# SIMPLE FORM 📝 ⛅️ April 2021 ✨ Frontend ## 🌈 Overview - Welcome dude --- Simple form made at [Le Reacteur](https://www.lereacteur.io/) Bootcamp. 2 screens are availables: form and informations filled. ![Screen 1](src/assets/img/screen-1.png) ![Screen 2](src/assets/img/screen-2.png) ## 👩🏻‍💻 Tasks --- ✘ Create layout ✘ Make responsive ✘ Display user's informations ✘ Use states ✘ Fix unvalid values (error messages) ## 📚 Stacks --- [Javascript](https://www.w3schools.com/js/default.asp) [ReactJS](https://fr.reactjs.org/docs/getting-started.html) [HTML5](https://www.w3schools.com/html/default.asp) [CSS3](https://www.w3schools.com/css/default.asp) ## 🗝 Installation and usage --- Be sure, you have installed all dependencies to run Reactthe project. ### 🚙 Running the project 1️. Clone this repository `git clone https://github.com/manon-boiteau/simpleForm-LeReacteur.git` `cd simpleForm-LeReacteur` 2️. Install packages `npm install` or `yarn` 3️. When installation is complete: `yarn start` 🙏🏻 Thank you @LeReacteur.
77dd0ec9-75f3-42a7-8b84-4348dfb01db7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-04 21:00:55", "repo_name": "sfdc-excel-macros/myfaces2a", "sub_path": "/myfaces2a/main/java/myfaces2a/GreetingService.java", "file_name": "GreetingService.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "0ff9d349cc841026e1a96298f7443f9c85b210bb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sfdc-excel-macros/myfaces2a
210
FILENAME: GreetingService.java
0.245085
package myfaces2a; import java.io.*; import java.sql.*; import javax.inject.Named; import javax.enterprise.context.ApplicationScoped; @Named @ApplicationScoped public class GreetingService { public String createGreeting(String name) { try { Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", ""); Statement stmt = c.createStatement(); stmt.execute("CREATE TABLE tbl2 (a int, b varchar(200));"); Statement stmt2 = c.createStatement(); stmt2.execute("INSERT INTO tbl2 (a, b) VALUES (1, '" + name + "');"); Statement stmt4 = c.createStatement(); stmt4.execute("DROP TABLE tbl2"); } catch (Exception e) { e.printStackTrace(); } try { FileInputStream fis = new FileInputStream(name); } catch (Exception ignore) { } return "Hello " + name + ". We hope you enjoy Apache MyFaces!"; } }
f02f0540-0207-4afc-8149-82368d952a8c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-07 15:08:35", "repo_name": "kara4k/MediaGrub", "sub_path": "/app/src/main/java/com/kara4k/mediagrub/view/flickr/search/FlickrPhotoSearchFragment.java", "file_name": "FlickrPhotoSearchFragment.java", "file_ext": "java", "file_size_in_byte": 1140, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "520492a1c057d862963edf789d7c0c8b071761cc", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kara4k/MediaGrub
240
FILENAME: FlickrPhotoSearchFragment.java
0.264358
package com.kara4k.mediagrub.view.flickr.search; import android.os.Bundle; import com.kara4k.mediagrub.di.DaggerViewComponent; import com.kara4k.mediagrub.di.modules.ViewModule; import com.kara4k.mediagrub.presenter.base.SearchPresenter; import com.kara4k.mediagrub.presenter.flickr.FlickrPhotoSearchPresenter; import com.kara4k.mediagrub.view.base.media.SearchFragment; import javax.inject.Inject; public class FlickrPhotoSearchFragment extends SearchFragment { @Inject FlickrPhotoSearchPresenter mPresenter; public static FlickrPhotoSearchFragment newInstance() { Bundle args = new Bundle(); FlickrPhotoSearchFragment fragment = new FlickrPhotoSearchFragment(); fragment.setArguments(args); return fragment; } @Override protected SearchPresenter getSearchPresenter() { return mPresenter; } @Override protected void injectDaggerDependencies() { DaggerViewComponent.builder() .appComponent(getAppComponent()) .viewModule(new ViewModule(this)) .build().injectFlickrPhotoSearchFragment(this); } }
011b8de8-cb9a-45cf-af80-1df2905136a6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-18 02:31:29", "repo_name": "egomezal/irpgeditor", "sub_path": "/src/main/java/org/egomez/irpgeditor/SubmitJob.java", "file_name": "SubmitJob.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "fd97c6d267b886af1aad75762c304ab6f965ce65", "star_events_count": 14, "fork_events_count": 4, "src_encoding": "UTF-8"}
https://github.com/egomezal/irpgeditor
207
FILENAME: SubmitJob.java
0.246533
package org.egomez.irpgeditor; import org.egomez.irpgeditor.event.ListenerSubmitJob; public class SubmitJob implements Runnable { String command; ListenerSubmitJob listener; AS400System system; public SubmitJob(AS400System system, String command, ListenerSubmitJob listener) { this.system = system; this.command = command; this.listener = listener; } protected void completed() { if (this.listener == null) { return; } new Thread(this).start(); } public void execute() throws Exception { this.system.call(this.command); completed(); } public String getCommand() { return this.command; } public AS400System getSystem() { return this.system; } @Override public void run() { this.listener.jobCompleted(this); } @Override public String toString() { return this.command; } }
4b10f936-77af-4b62-8e68-3ac3dfbd8c39
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-22 19:35:02", "repo_name": "KeyToTech/SpendsterAndroid", "sub_path": "/app/src/main/java/com/spendster/presentation/homeScreen/Dashboard/ExpenseViewHolder.java", "file_name": "ExpenseViewHolder.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "1c099b9d70eef9a214ba66ed872cded59f3fb758", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KeyToTech/SpendsterAndroid
173
FILENAME: ExpenseViewHolder.java
0.247987
package com.spendster.presentation.homeScreen.Dashboard; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.spendster.R; import com.spendster.data.entity.Expense; import androidx.recyclerview.widget.RecyclerView; public class ExpenseViewHolder extends RecyclerView.ViewHolder{ private ImageView expenseIcon; private TextView expenseTitle; private TextView expenseNote; private TextView expenseAmount; public ExpenseViewHolder(View itemView) { super(itemView); expenseIcon = itemView.findViewById(R.id.expenseIcon); expenseTitle = itemView.findViewById(R.id.expenseTitle); expenseNote = itemView.findViewById(R.id.expenseNote); expenseAmount = itemView.findViewById(R.id.expenseAmount); } public void bind(Expense expense){ expenseAmount.setText(Double.toString(expense.getAmount())); expenseNote.setText(expense.getNote()); } }
a9e141a9-6ef1-4317-bbe5-3769eeaa688b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-09 11:31:34", "repo_name": "leguang/chenjiang", "sub_path": "/app/src/main/java/com/shtoone/chenjiang/mvp/view/adapter/StaffRVAdapter.java", "file_name": "StaffRVAdapter.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "cbf389b4bfaba7aaf8bf0f7cca8a713be37993e6", "star_events_count": 4, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/leguang/chenjiang
275
FILENAME: StaffRVAdapter.java
0.243642
package com.shtoone.chenjiang.mvp.view.adapter; import android.text.Html; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.shtoone.chenjiang.R; import com.shtoone.chenjiang.mvp.model.entity.db.StaffData; /** * Author:leguang on 2016/10/9 0009 15:49 * Email:langmanleguang@qq.com */ public class StaffRVAdapter extends BaseQuickAdapter<StaffData, BaseViewHolder> { private static final String TAG = StaffRVAdapter.class.getSimpleName(); public StaffRVAdapter() { super(R.layout.item_rv_project_staff_fragment, null); } @Override protected void convert(BaseViewHolder holder, StaffData staffData) { holder.setText(R.id.tv_name_item_rv_project_staff_fragment, "姓名:" + staffData.getUserName()) .setText(R.id.tv_type_item_rv_project_staff_fragment, Html.fromHtml("类别:<font color=black>" + "司镜人员" + "</font>")) .setText(R.id.tv_phone_number_item_rv_project_staff_fragment, Html.fromHtml("电话:<font color=black>" + staffData.getUserPhone() + "</font>")); } }
026c15a6-250a-410e-85b2-265a2d7a14fb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-12 21:50:23", "repo_name": "Julesqo/RefinitivJuniorJavDvlpr", "sub_path": "/JuniorJavaDevlpr/src/main/java/taskA1/Output.java", "file_name": "Output.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "5259194ce6b7cdbb30d806c6b71872b08d6080d9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Julesqo/RefinitivJuniorJavDvlpr
224
FILENAME: Output.java
0.262842
package taskA1; import org.jsoup.Jsoup; import org.jsoup.nodes.Element; import org.jsoup.nodes.Document; import java.util.Scanner; public class Output { public static void main(String[] args) { final String url = "http://www.mercado.ren.pt/EN/Electr/MarketInfo/Gen/Pages/Forecast.aspx"; try{ final Document document = Jsoup.connect(url).timeout(0).get(); for (Element row : document.select("div.mainContent tr")) { final String hh = row.select("td:nth-of-type(1)").text(); final String wind = row.select("td:nth-of-type(2)").text(); final String solar = row.select("td:nth-of-type(3)").text(); final String others = row.select("td:nth-of-type(3)").text(); System.out.println(hh + " wind: " + wind + " solar: " +solar + " others: " +others); } } catch (Exception ex) { ex.printStackTrace(); } } }
cbad203f-c75f-4f9d-acfd-9e8f152689af
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-30 10:46:10", "repo_name": "mistvan/jWorship", "sub_path": "/src/sk/calvary/worship_fx/Playlist.java", "file_name": "Playlist.java", "file_ext": "java", "file_size_in_byte": 1141, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "e0b2e757605917118cecb9ffbbe0a42a8b9afdca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mistvan/jWorship
250
FILENAME: Playlist.java
0.29584
/* * Created on Nov 19, 2016 */ package sk.calvary.worship_fx; import javafx.beans.binding.Bindings; import javafx.beans.binding.StringBinding; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; public class Playlist { final StringProperty name = new SimpleStringProperty(this, "name", ""); final ObservableList<Song> items = FXCollections.observableArrayList(); void serialize(JSONSerializer s) { s.serialize(name); s.serializeObjectListAsStrings("items", items, (Song item) -> "song:" + item.getFileName(), n -> { if (n.startsWith("song:")) { return getApp().getSongByFileName(n.substring(5)); } return null; }); } static App getApp() { return App.app; } @Override public String toString() { return name.get() + " (" + items.size() + ")"; } private final StringBinding toString = Bindings .createStringBinding(this::toString, name, items); public StringBinding toStringProperty() { return toString; } }
93fe5d52-90d5-4475-9515-c3e3005a3766
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-01 03:45:28", "repo_name": "pomiyo/FinalTrash", "sub_path": "/app/src/main/java/com/example/taquio/trasearch/BusinessProfile/BusinessSellFragment.java", "file_name": "BusinessSellFragment.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "b1810f56fad36ba652810bb36c62b984e2553e4c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pomiyo/FinalTrash
214
FILENAME: BusinessSellFragment.java
0.239349
package com.example.taquio.trasearch.BusinessProfile; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.example.taquio.trasearch.R; /** * Created by Del Mar on 2/16/2018. */ public class BusinessSellFragment extends Fragment { private static final String TAG = "BusinessSellFragment"; Button btn; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.business_profile_sell_fragment, container, false); btn = (Button) view.findViewById(R.id.btnAddSell); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent i = new Intent(view.getContext(), BusinessSell.class); startActivity(i); } }); return view; } }
1bfca06b-12c8-4f5a-a7bb-07ce4090c892
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-05 22:20:17", "repo_name": "KaiKrk/Projet_6v2", "sub_path": "/src/main/java/com/projet6/Impl/Voie.java", "file_name": "Voie.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "c82cc0d78e132ff69284c1478974cfe0bbb49b45", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KaiKrk/Projet_6v2
263
FILENAME: Voie.java
0.255344
package com.projet6.Impl; import com.projet6.contrat.VoieDao; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.List; @AllArgsConstructor @NoArgsConstructor @Data @Entity @Table(name = "voie") public class Voie implements VoieDao { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "idvoie") private Long id; @Column(name = "nomvoie") private String nomVoie; private String cotation; @Column(name = "originenom") private String origineNom; @Column(name = "nombrepoint") private Integer nombrePoint; @ManyToOne @JoinColumn(name = "idsecteur") private Secteur secteur; @Override public void addVoie() { } @Override public void updateVoie() { } @Override public void deleteVoie() { } @Override public List<Voie> getAllVoie() { return null; } @Override public List<Voie> filterVoieByDifficulty(int minDifficulty, int maxDifficulty) { return null; } }
eab456c9-1807-4fed-8073-b5e44ed01e3a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-07-09T18:51:29", "repo_name": "jupyterlab/jupyterlab-latex", "sub_path": "/RELEASE.md", "file_name": "RELEASE.md", "file_ext": "md", "file_size_in_byte": 1140, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "5448f69a8f29d97e9f18dd806a81c8b7b5af2d35", "star_events_count": 600, "fork_events_count": 91, "src_encoding": "UTF-8"}
https://github.com/jupyterlab/jupyterlab-latex
281
FILENAME: RELEASE.md
0.229535
# Making a new release of jupyterlab_latex The extension can be published to `PyPI` and `npm` using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser). ## Automated releases with the Jupyter Releaser The extension repository should already be compatible with the Jupyter Releaser. Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information. Here is a summary of the steps to cut a new release: - Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser) - Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork - Go to the Actions panel - Run the "Draft Changelog" workflow - Merge the Changelog PR - Run the "Draft Release" workflow - Run the "Publish Release" workflow ## Publishing to `conda-forge` If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
92aa801d-5260-4b53-aa82-63fa9153d234
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2011-08-12 06:00:37", "repo_name": "ambatigan/kaarpool", "sub_path": "/server/src/com/saventech/kaarpool/RideDestination.java", "file_name": "RideDestination.java", "file_ext": "java", "file_size_in_byte": 993, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "7d00641023b9890566f9ae838954376cb4761b73", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ambatigan/kaarpool
177
FILENAME: RideDestination.java
0.279042
package com.saventech.kaarpool; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RideDestination extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("RideDestination servlet"); PrintWriter out=response.getWriter(); String rideid; rideid=request.getParameter("rideid"); System.out.println("rideid:"+rideid); DBInterface connect = DBInterface.getInstance(); String str = ""; if(connect.isConnectionOpen()) { str = connect.rideDestination(rideid); } out.print(str); } }