blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
07a497d5baa6741de9489544f084756d8685d08a
9950d7d77822aa9bf175f24e5fde7e74f468145e
/src/com/ceco/marshmallow/gravitybox/quicksettings/AirplaneModeTile.java
65c71c62f685a89e82ef7a42cbaf263bdce4c56a
[ "Apache-2.0" ]
permissive
pylerCM/GravityBox
1b4c00ce814490f439006a6dc96c804d62e03aaa
b376f3a4d0f8329a4c9411a52e1bc41850bb87b6
refs/heads/marshmallow
2020-02-26T16:22:17.940694
2016-03-03T16:46:52
2016-03-03T16:46:52
53,075,135
1
1
null
2016-03-03T18:57:09
2016-03-03T18:57:09
null
UTF-8
Java
false
false
872
java
package com.ceco.marshmallow.gravitybox.quicksettings; import android.provider.Settings; import de.robv.android.xposed.XSharedPreferences; public class AirplaneModeTile extends AospTile { public static final String AOSP_KEY = "airplane"; protected AirplaneModeTile(Object host, Object tile, XSharedPreferences prefs, QsTileEventDistributor eventDistributor) throws Throwable { super(host, "aosp_tile_airplane_mode", tile, prefs, eventDistributor); } @Override protected String getClassName() { return "com.android.systemui.qs.tiles.AirplaneModeTile"; } @Override public String getAospKey() { return AOSP_KEY; } @Override public boolean handleLongClick() { startSettingsActivity(Settings.ACTION_AIRPLANE_MODE_SETTINGS); return true; } }
[ "ceco@ceco.sk.eu.org" ]
ceco@ceco.sk.eu.org
cc975fd7a180b5cf76d2ea0be90a5a2852d43eaf
f697c0d6a5ec3f8c32fe6597c8c8d64b3e45bbd0
/src/patterns/creational/abstracfactory/colors/Blue.java
2004b3a17bce3740b57fdb02a3bbe32c46e3a113
[]
no_license
Nexxtor/DesignPattern
2f8bdfc7dafe23db699b0b4c289a4199789161d0
da15508853c0e96273a0d9a0de70175041eeded6
refs/heads/master
2020-03-17T04:31:37.000529
2018-05-16T14:02:01
2018-05-16T14:02:01
133,278,898
3
0
null
null
null
null
UTF-8
Java
false
false
171
java
package patterns.creational.abstracfactory.colors; public class Blue implements Color{ @Override public void fill() { System.out.println("Blue"); } }
[ "nestor.aldana1@gmail.com" ]
nestor.aldana1@gmail.com
09c120bf2f2b4dc5ae91a67a2382e5e161ba67fa
a78e998b0cb3c096a6d904982bb449da4003ff8b
/app/src/main/java/com/alipay/api/domain/SimpleShopModel.java
eee9e42a87f886f084b04a8035b4684f43c20780
[ "Apache-2.0" ]
permissive
Zhengfating/F2FDemo
4b85b598989376b3794eefb228dfda48502ca1b2
8654411f4269472e727e2230e768051162a6b672
refs/heads/master
2020-05-03T08:30:29.641080
2019-03-30T07:50:30
2019-03-30T07:50:30
178,528,073
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑商家中心员工管理的商户门店信息简单模型,包括门店id,门店名称 * * @author auto create * @since 1.0, 2018-03-23 11:31:55 */ public class SimpleShopModel extends AlipayObject { private static final long serialVersionUID = 5629169737341358393L; /** * 商户门店id */ @ApiField("shop_id") private String shopId; /** * 商户门店名称 */ @ApiField("shop_name") private String shopName; public String getShopId() { return this.shopId; } public void setShopId(String shopId) { this.shopId = shopId; } public String getShopName() { return this.shopName; } public void setShopName(String shopName) { this.shopName = shopName; } }
[ "452139060@qq.com" ]
452139060@qq.com
5eb874f20c074004d62cc5b6b17dbcf672fbe479
f959f18265b4a6459e9fde19389da4269eec5c4e
/LeetCode/src/problem427/Solution.java
ff13db0318f17bd13b6f8270fae05501dc4dc213
[]
no_license
mephisto9000/algo-problems
a3cc0b361bd8387322f8fd71eb12a384a4f206ef
2d5a5bf82e47832963a801b0c7196d4c43fd4c3e
refs/heads/master
2021-07-05T08:18:29.698527
2019-12-01T16:45:20
2019-12-01T16:45:20
64,581,353
0
0
null
2020-10-12T21:35:49
2016-07-31T07:04:57
Java
UTF-8
Java
false
false
1,362
java
package problem427; /* //Definition for a QuadTree node. class Node { public boolean val; public boolean isLeaf; public Node topLeft; public Node topRight; public Node bottomLeft; public Node bottomRight; public Node() {} public Node(boolean _val,boolean _isLeaf,Node _topLeft,Node _topRight,Node _bottomLeft,Node _bottomRight) { val = _val; isLeaf = _isLeaf; topLeft = _topLeft; topRight = _topRight; bottomLeft = _bottomLeft; bottomRight = _bottomRight; } }; */ class Solution { int[][] grid; public Node construct(int[][] grid) { this.grid = grid; int n = grid.length; return build(0,0, n); } Node build(int i1, int j1, int n) { Node ans = null; if (n==1) ans = new Node(grid[i1][j1]!=0, true, null, null, null, null); else { int m = n>>1; Node n1,n2,n3,n4 = null; n1 = build(i1, j1, m); //top left n2 = build(i1+m, j1, m); // bottom left n3 = build(i1, j1+m, m); // top right n4 = build(i1+m, j1+m, m); // bottom right if (n1.isLeaf && n2.isLeaf && n3.isLeaf && n4.isLeaf && n1.val == n2.val && n2.val == n3.val && n3.val == n4.val) ans = new Node(n1.val, true, null, null, null, null); else ans = new Node(false, false, n1, n3, n2, n4); } return ans; } }
[ "mephisto9000@gmail.com" ]
mephisto9000@gmail.com
7ce10d0006d9d02d6f3dc0a954dc3a34391eb850
2e9f2a68df10f154b3b8058eb981e4a9997814f2
/src/main/java/io/tarik/startrekproject/stapi/domain/character/CharacterSpecies.java
d26fb34d49e0ece91a2aaa10590033467b889bcb
[ "MIT" ]
permissive
tarikdemirci/startrekproject
b4c2045c6d34161d3c20e0e5eac629fa08592665
555a05090482fbf38f9bb183b74988461c605aa8
refs/heads/master
2021-08-10T17:56:07.989859
2017-11-12T21:44:37
2017-11-12T21:44:37
110,356,171
1
2
null
null
null
null
UTF-8
Java
false
false
200
java
package io.tarik.startrekproject.stapi.domain.character; import lombok.Builder; import lombok.Data; @Data @Builder public class CharacterSpecies { private String uid; private String name; }
[ "git@mail.tarik.io" ]
git@mail.tarik.io
030c6ad0694a28f31ffa5e5f8b1575aa3e064864
13d5901f8e7a409bdcb9513c4d1abdb6b409b57a
/src/main/java/com/opsmatters/media/model/monitor/ContentEvent.java
11f85b63d473237c0c380cb049b305a148412bd7
[ "Apache-2.0" ]
permissive
opsmatters/opsmatters-media
c0bb514c3916ca04020a546019fdbf8c2fd444ff
17bce8b631559fe1cab9a11b0f6500edc77047a2
refs/heads/master
2023-08-24T05:42:49.282980
2023-08-11T00:08:55
2023-08-11T00:08:55
231,911,537
1
0
Apache-2.0
2023-08-23T17:54:16
2020-01-05T12:08:07
Java
UTF-8
Java
false
false
3,256
java
/* * Copyright 2021 Gerald Curley * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.opsmatters.media.model.monitor; import com.opsmatters.media.cache.organisation.Organisations; import com.opsmatters.media.model.OwnedEntity; import com.opsmatters.media.model.organisation.Organisation; /** * Class representing a content monitor event. * * @author Gerald Curley (opsmatters) */ public abstract class ContentEvent extends OwnedEntity { private String code = ""; private String organisation = ""; private String monitorId = ""; /** * Default constructor. */ public ContentEvent() { } /** * Copy constructor. */ public ContentEvent(ContentEvent obj) { copyAttributes(obj); } /** * Copies the attributes of the given object. */ public void copyAttributes(ContentEvent obj) { if(obj != null) { super.copyAttributes(obj); setCode(obj.getCode()); setOrganisation(obj.getOrganisation()); setMonitorId(obj.getMonitorId()); } } /** * Returns the type of the event. */ public abstract EventType getType(); /** * Returns the monitor organisation. */ public String getCode() { return code; } /** * Sets the monitor organisation. */ public void setCode(String code) { this.code = code; Organisation organisation = Organisations.get(code); setOrganisation(organisation != null ? organisation.getName() : ""); } /** * Returns <CODE>true</CODE> if the monitor organisation has been set. */ public boolean hasCode() { return code != null && code.length() > 0; } /** * Returns the monitor organisation name. */ public String getOrganisation() { return organisation; } /** * Sets the monitor organisation name. */ public void setOrganisation(String organisation) { this.organisation = organisation; } /** * Returns <CODE>true</CODE> if the monitor organisation name has been set. */ public boolean hasOrganisation() { return organisation != null && organisation.length() > 0; } /** * Returns the monitor id. */ public String getMonitorId() { return monitorId; } /** * Sets the monitor id. */ public void setMonitorId(String monitorId) { this.monitorId = monitorId; } /** * Returns <CODE>true</CODE> if the monitor id has been set. */ public boolean hasMonitorId() { return monitorId != null && monitorId.length() > 0; } }
[ "gerald@opsmatters.com" ]
gerald@opsmatters.com
d8cde6978103951532d7051c1eb1c745106a70a1
36fe378f355afafd1ff0532bd8b416f4c5928f5f
/ServiceApi-ejb/src/main/java/py/com/mojeda/service/ejb/entity/TipoReferencias.java
3a7ec8dacbb0599b40c87fc58092089ea457c72d
[]
no_license
rodvanpy/service-api
150d2a49dcc2a728fb38cf45149ae31cbe86c3c5
4ae5df2f1f54e0563aa17daeae375cb8b887c7ca
refs/heads/master
2022-11-30T02:09:15.584536
2020-08-06T15:32:57
2020-08-06T15:32:57
285,607,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
/* * 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 py.com.mojeda.service.ejb.entity; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import org.hibernate.validator.constraints.NotEmpty; /** * * @author miguel.ojeda */ @Entity @Table(name = "TIPO_REFERENCIAS", schema = "PUBLIC") public class TipoReferencias extends Base{ private static final long serialVersionUID = 1574657L; private static final String SECUENCIA = "seq_tipo_referencia_id"; @Id @GeneratedValue(strategy = GenerationType.AUTO,generator = SECUENCIA) @SequenceGenerator(name=SECUENCIA, sequenceName=SECUENCIA, allocationSize = 1) @Column(name = "id") private Long id; @NotEmpty(message = "Ingrese Nombre") @Basic(optional = false) @Column(name = "NOMBRE") private String nombre; public TipoReferencias() { } public TipoReferencias(Long id) { this.setId(id); } /** * @return the id */ public Long getId() { return id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /** * @return the nombre */ public String getNombre() { return nombre; } /** * @param nombre the nombre to set */ public void setNombre(String nombre) { this.nombre = nombre; } }
[ "miguel.ojeda@coomecipar.coop.py" ]
miguel.ojeda@coomecipar.coop.py
1211001b9700d7799c0a3db01095b2d543c8be5e
b9d9415d7935641c52373d460f1e727d195e0d7b
/app/src/main/java/com/huwenkai/com/mobilesafe/Activity/HomeActivity.java
4ee4240c626c624f93f8b8ac998bafe2d093eff4
[]
no_license
huwenkai26/Mobilesafe
16b2987c7218112ce7892b3adf41effa5fbcf82d
6069587139c41785e93403550c22f007d1399c8f
refs/heads/master
2021-06-05T21:57:05.142758
2018-12-27T03:37:27
2018-12-27T03:37:27
56,838,394
0
0
null
null
null
null
UTF-8
Java
false
false
10,251
java
package com.huwenkai.com.mobilesafe.Activity; import android.app.Activity; import android.app.AlertDialog; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.GridView; import android.widget.ImageView; import android.widget.TextView; import com.huwenkai.com.mobilesafe.R; import com.huwenkai.com.mobilesafe.Util.ContactsValues; import com.huwenkai.com.mobilesafe.Util.MessageDigestUtils; import com.huwenkai.com.mobilesafe.Util.SpUtils; import com.huwenkai.com.mobilesafe.Util.ToastUtils; /** * 程序的主界面 * Created by huwenkai on 2016/4/23. */ public class HomeActivity extends Activity { private GridView mGv_home; private String[] mTitleStr; private int[] mIconIDs; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); initUI(); initData(); } private void initData() { mTitleStr = new String[]{"手机防盗", "通讯卫士", "软件管理", "进程管理", "流量统计", "手机杀毒", "缓存清理", "高级工具", "设置中心"}; mIconIDs = new int[]{R.drawable.home_safe, R.drawable.home_callmsgsafe, R.drawable.home_apps, R.drawable.home_taskmanager, R.drawable.home_netmanager, R.drawable.home_trojan, R.drawable.home_sysoptimize, R.drawable.home_tools, R.drawable.home_settings}; mGv_home.setAdapter(new MyAdapter()); mGv_home.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (position){ case 0: showdialog(); break; case 1: startActivity(new Intent(getApplicationContext(),BlackNumberActivity.class)); break; case 2: startActivity(new Intent(getApplicationContext(),AppManagerActivity.class)); break; case 3: startActivity(new Intent(getApplicationContext(),ProcessActivity.class)); break; case 7: startActivity(new Intent(getApplicationContext(),AToolActivity.class)); break; case 8: Intent intent = new Intent(getApplicationContext(),SettingsActivity.class); startActivity(intent); break; } } }); } private void showdialog() { //读取本地文件查看是否有保存密码 final String pwd = SpUtils.getString(ContactsValues.MOBILE_SAFE_PWD, "", this); //判断是密码是否为空 if (TextUtils.isEmpty(pwd)){ //弹出设置密码对话框 setMobliesafePwd(); }else { //弹出确认密码的对话框 confirmPwd(); } } private void confirmPwd() { AlertDialog.Builder builder = new AlertDialog.Builder(this); final AlertDialog alertDialog = builder.create(); final View view = View.inflate(this, R.layout.confrim_pwd, null); alertDialog.setView(view); alertDialog.show(); Button bt_yes = (Button) view.findViewById(R.id.bt_yes); Button bt_no = (Button) view.findViewById(R.id.bt_no); bt_no.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { alertDialog.dismiss(); } }); bt_yes.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TextView confirm_pwd = (TextView) view.findViewById(R.id.confirm_mobile_safe_pwd); if(!TextUtils.isEmpty(confirm_pwd.getText().toString())){ String local_pwd = SpUtils.getString(ContactsValues.MOBILE_SAFE_PWD, "", getApplicationContext()); String encryption_pwd = MessageDigestUtils.StringToMD5(confirm_pwd.getText().toString(),"MD5"); if(TextUtils.equals(local_pwd,encryption_pwd)){ // Intent intent = new Intent(HomeActivity.this,Testactivity.class); Intent intent = new Intent(HomeActivity.this,SetupvoerActivity.class); startActivity(intent); alertDialog.dismiss(); }else{ ToastUtils.show(getApplication(),"密码错误"); } }else{ ToastUtils.show(getApplication(),"密码不能为空"); } } }); } private void setMobliesafePwd() { //弹出初始化密码的对话框 AlertDialog.Builder builder = new AlertDialog.Builder(this); final AlertDialog alertDialog = builder.create(); final View view = View.inflate(this, R.layout.safe_dialog_pwd, null); alertDialog.setView(view); alertDialog.show(); Button bt_yes = (Button) view.findViewById(R.id.bt_yes); Button bt_no = (Button) view.findViewById(R.id.bt_no); bt_no.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { alertDialog.dismiss(); } }); bt_yes.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TextView mobile_safe_pwd = (TextView) view.findViewById(R.id.mobile_safe_pwd); TextView confirm_pwd = (TextView) view.findViewById(R.id.confirm_mobile_safe_pwd); if(!TextUtils.isEmpty(mobile_safe_pwd.getText().toString())&&!TextUtils.isEmpty(confirm_pwd.getText().toString())){ if(TextUtils.equals(mobile_safe_pwd.getText().toString(),confirm_pwd.getText().toString())){ // Intent intent = new Intent(HomeActivity.this,Testactivity.class); Intent intent = new Intent(HomeActivity.this,SetupvoerActivity.class); startActivity(intent); alertDialog.dismiss(); String string_pwd = confirm_pwd.getText().toString(); SpUtils.putString(ContactsValues.MOBILE_SAFE_PWD, MessageDigestUtils.StringToMD5(string_pwd,"MD5"),getApplicationContext()); }else{ ToastUtils.show(getApplication(),"密码不唯一"); } }else{ ToastUtils.show(getApplication(),"密码不能为空"); } } }); } private void initUI() { mGv_home = (GridView) findViewById(R.id.gv_home); } private class MyAdapter extends BaseAdapter { /** * How many items are in the data set represented by this Adapter. * * @return Count of items. */ @Override public int getCount() { return mIconIDs.length; } /** * Get the data item associated with the specified position in the data set. * * @param position Position of the item whose data we want within the adapter's * data set. * @return The data at the specified position. */ @Override public Object getItem(int position) { return mTitleStr[position]; } /** * Get the row id associated with the specified position in the list. * * @param position The position of the item within the adapter's data set whose row id we want. * @return The id of the item at the specified position. */ @Override public long getItemId(int position) { return position; } /** * Get a View that displays the data at the specified position in the data set. You can either * create a View manually or inflate it from an XML layout file. When the View is inflated, the * parent View (GridView, ListView...) will apply default layout parameters unless you use * {@link LayoutInflater#inflate(int, ViewGroup, boolean)} * to specify a root view and to prevent attachment to the root. * * @param position The position of the item within the adapter's data set of the item whose view * we want. * @param convertView The old view to reuse, if possible. Note: You should check that this view * is non-null and of an appropriate type before using. If it is not possible to convert * this view to display the correct data, this method can create a new view. * Heterogeneous lists can specify their number of view types, so that this View is * always of the right type (see {@link #getViewTypeCount()} and * {@link #getItemViewType(int)}). * @param parent The parent that this view will eventually be attached to * @return A View corresponding to the data at the specified position. */ @Override public View getView(int position, View convertView, ViewGroup parent) { View view= null; view = View.inflate(getApplicationContext(),R.layout.gv_item,null); ImageView iv_icon = (ImageView) view.findViewById(R.id.iv_icon); TextView tv_title = (TextView) view.findViewById(R.id.tv_title); iv_icon.setBackgroundResource(mIconIDs[position]); tv_title.setText(mTitleStr[position]); return view; } } }
[ "wen951219" ]
wen951219
b0d384919abe2c52374af94a269a4fbaf57b3542
0b24a0298e86488c0e0ceb7976cefa80b4dbd7f5
/src/main/java/org/saltyrtc/client/tasks/Task.java
22df5b383f0bbbda19fce573902176c445870e10
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
saltyrtc/saltyrtc-client-java
660f24d229696733995d8c7f58443063514d28bb
c8a9e39b4e02909bec1541a13353b3d4570d8736
refs/heads/master
2023-08-18T05:54:25.858822
2023-07-20T21:28:02
2023-07-20T21:28:02
61,617,184
4
3
Apache-2.0
2023-07-20T21:28:35
2016-06-21T08:41:12
Java
UTF-8
Java
false
false
2,656
java
package org.saltyrtc.client.tasks; import org.saltyrtc.client.annotations.NonNull; import org.saltyrtc.client.annotations.Nullable; import org.saltyrtc.client.exceptions.SignalingException; import org.saltyrtc.client.exceptions.ValidationError; import org.saltyrtc.client.messages.c2c.TaskMessage; import org.saltyrtc.client.signaling.SignalingInterface; import java.util.List; import java.util.Map; /** * A SaltyRTC task is a protocol extension to this protocol that will be negotiated during the * client-to-client authentication phase. Once a task has been negotiated and the authentication is * complete, the task protocol defines further procedures, messages, etc. * * All tasks need to implement this interface. */ public interface Task { /** * Initialize the task with the task data from the peer. * * The task should keep track internally whether it has been initialized or not. * * @param data The data sent by the peer in the 'auth' message. */ void init(SignalingInterface signaling, Map<Object, Object> data) throws ValidationError; /** * Used by the signaling class to notify task that the peer handshake is over. * * This is the point where the task can take over. */ void onPeerHandshakeDone(); /** * This method is called by SaltyRTC when a task related message * arrives through the WebSocket. * * @param message The deserialized MessagePack message. */ void onTaskMessage(TaskMessage message); /** * Send bytes through the task signaling channel. * * This method should only be called after the handover. * * Note that the data passed in to this method should *not* already be encrypted. Otherwise, * data will be encrypted twice. * * @param payload the *non-encrypted* data to be sent. * @throws SignalingException if the signaling state is not OPEN or if the handover hasn't taken * place yet. */ void sendSignalingMessage(byte[] payload) throws SignalingException; /** * Return the task protocol name. */ @NonNull String getName(); /** * Return the list of supported message types. * * Incoming messages with this type will be passed to the task. */ @NonNull List<String> getSupportedMessageTypes(); /** * Return the task data used for negotiation in the `auth` message. */ @Nullable Map<Object, Object> getData(); /** * This method is called by the signaling class when sending and receiving 'close' messages. */ void close(int reason); }
[ "danilo.bargen@threema.ch" ]
danilo.bargen@threema.ch
363c4fbf455dfac3c8c7219c48dc427019f26ed5
078fbddde0baaae9b3e9418fcec3805d54017cf0
/src/main/java/com/udaan/expense/entity/Expense.java
d0fb92e30aa27a18ee098ee75212dd6712c351f7
[]
no_license
smitagarg1/Splitwise
9259354eb98ae3210b755ac7227023fcd38d1a9d
d4aaf08269d45666aeb825a333b7b1d8267a630b
refs/heads/master
2023-06-22T11:07:05.026041
2021-07-30T15:43:09
2021-07-30T15:43:09
391,403,398
0
0
null
null
null
null
UTF-8
Java
false
false
61
java
package com.udaan.expense.entity; public class Expense { }
[ "smita.garg01@gmail.com" ]
smita.garg01@gmail.com
22aeaa261723c3c95d179cc3034e38e4ad0430fa
2ae045807aa9b60f9d2d6d0f0f185c455f34a06c
/app/src/main/java/ru/reactiveturtle/reactivemusic/player/DefaultAlbumCover.java
7ea29921790b70570ded952cd78677f355241d10
[]
no_license
ReactiveTurtle/ReactiveMusic
0828149aafe9d8ebcc4c13f116dbb158e406e8e4
27740f4d8256c64846a531e9af8eb5a19e221416
refs/heads/master
2023-07-31T09:11:51.550732
2021-09-24T15:31:39
2021-09-24T15:31:39
291,920,907
1
0
null
null
null
null
UTF-8
Java
false
false
1,613
java
package ru.reactiveturtle.reactivemusic.player; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.RectF; import android.graphics.drawable.BitmapDrawable; import androidx.annotation.ColorInt; import ru.reactiveturtle.reactivemusic.R; public final class DefaultAlbumCover { public static BitmapDrawable get(Resources resources, @ColorInt int color) { int width = 512; int height = 512; Bitmap note = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(resources, R.drawable.ic_note), width / 2, height / 2, true); Canvas canvas = new Canvas(note); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setColor(Color.WHITE); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)); canvas.drawRect(0, 0, width, height, paint); paint.setXfermode(null); Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); canvas = new Canvas(bitmap); paint.setColor(color); canvas.drawRoundRect(new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight()), width / 8f, height / 8f, paint); canvas.drawBitmap(note, (bitmap.getWidth() - note.getWidth()) / 2f, (bitmap.getHeight() - note.getHeight()) / 2f, paint); return new BitmapDrawable(resources, bitmap); } }
[ "aktuganovqwerty@gmail.com" ]
aktuganovqwerty@gmail.com
7c14cbbd90bc2819c85c84c31e1a4a25c6626363
ba614682d950fe0719a28a6f42b8a100e7346e71
/restlet/src/doctor_patient/ProjectApplication.java
b2f290a31b16cd52467131cfeb4a85753be7695f
[]
no_license
AshwinDNair/RestletDrPatientRepo
fa80f72afe44e753a2b60d3d1aa22d0bb667ed24
e9ab8419daf06f1b540e9eb509446deffb10dff6
refs/heads/main
2023-07-07T14:59:05.560992
2021-08-10T18:19:56
2021-08-10T18:19:56
337,649,415
0
0
null
null
null
null
UTF-8
Java
false
false
2,835
java
package doctor_patient; import org.restlet.Application; import org.restlet.Restlet; import org.restlet.Request; import org.restlet.Response; import org.restlet.routing.Router; import org.restlet.data.Status; import org.restlet.data.MediaType; import java.util.concurrent.CopyOnWriteArrayList; public class ProjectApplication extends Application { @Override public synchronized Restlet createInboundRoot() { Restlet janitor = new Restlet(getContext()) { public void handle(Request request, Response response) { String msg = null; String output = null; String sid = (String) request.getAttributes().get("id"); if (sid == null) msg = badRequest("No ID given.\n"); Integer id = null; try { id = Integer.parseInt(sid.trim()); } catch (Exception e) { msg = badRequest("Ill-formed ID.\n"); } Doctor doctor = Doctors.find(id); // find the doctor whose id has been passed as parameter CopyOnWriteArrayList<Patient> patients = Patients.getList(); for (Patient patient : patients) { if (patient.getDoctorId() == (doctor.getId())) { Patients.getList().remove(patient); } } if (doctor == null) msg = badRequest("No doctor with ID " + id + "\n"); else { Doctors.getList().remove(doctor); //removing the doctor object from the Doctor Array List //DoctorPatientUtil.writeDoctorFile(); updating the drs.db file has been disabled //DoctorPatientUtil.writePatientFile(); updating the patients.db file has been disabled msg = "Doctor with Id:" + id + " removed.\n"; } // Generate HTTP respoxnse. response.setEntity(msg, MediaType.TEXT_PLAIN); } }; // Create the routing table for various apis in DoctorPatient Information Service. Router router = new Router(getContext()); router.attach("/", PlainResource.class); router.attach("/doctors", PlainResourceDoctor.class); router.attach("/patients", PlainResourcePatient.class); router.attach("/doctors/{id}", PlainOneResourceDoctor.class); router.attach("/patients/{id}", PlainOneResourcePatient.class); router.attach("/xml", XmlAllResource.class); router.attach("/xml/doctors", XmlAllResourceDoctor.class); router.attach("/xml/doctors/{id}", XmlOneResourceDoctor.class); router.attach("/xml/patients", XmlAllResourcePatient.class); router.attach("/xml/patients/{id}", XmlOneResourcePatient.class); router.attach("/xml/{id}", XmlOneResource.class); router.attach("/create", CreateResource.class); router.attach("/update", UpdateResource.class); router.attach("/delete/{id}", janitor); // instance of Doctor class router.attach("/{id}", PlainOneResource.class); return router; } private String badRequest(String msg) { Status error = new Status(Status.CLIENT_ERROR_BAD_REQUEST, msg); return error.toString(); } }
[ "ashwin95.nair@gmail.com" ]
ashwin95.nair@gmail.com
36b1b0805da26de61f0ce4d793fd6782894a098e
5ad45f64170cf1834b8590986c333bda306878a2
/lab1.1/src/ro/unitbv/lab4/Problema2.java
7eac050ebb526d3704b838943dab0e51a8dc89e6
[]
no_license
Neghi/SDA
d3b189f3e9429a0055ab82f5fcb42d4b4ae9bc60
75984a3e34a7af59b2a15bf0d592ba0b7d437ca5
refs/heads/master
2021-02-15T20:17:58.178161
2020-05-07T13:55:41
2020-05-07T13:55:41
244,928,289
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
package ro.unitbv.lab4; import java.util.Scanner; public class Problema2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Introdu pozitia :"); int p = scanner.nextInt(); int[] sir = new int[10]; //sir[0]={ 15, 26, 2, 75, 47, 7, 25, 98, 3, 10}; sir[0]=15; sir[1]=26; sir[2]=2; sir[3]=75; sir[4]=47; sir[5]=7; sir[6]=25; sir[7]=98; sir[8]=3; sir[9]=10; int n=sir.length-1; for(int i = p ; i <n; i ++) { sir[i]=sir[i+1]; } sir[n]=0; System.out.println(java.util.Arrays.toString(sir)); } }
[ "andrei.neghina98@gmail.com" ]
andrei.neghina98@gmail.com
9019d1bc3366a549e133c2003f7d064fea782c04
72ede5ef2208b21e47dc11d0e613fba377342305
/src/prcatice/Threads.java
1e3f9e8e3e9c49e8f5cd2bd4373a2683d148f74f
[]
no_license
shubham3211/learnThreads
5f117df6f40271261b3b9f864d11b24a201b7611
130432fa12789cb447a714a1aad8b3899ce3cd3c
refs/heads/master
2020-08-23T07:50:45.337920
2019-11-07T14:23:28
2019-11-07T14:23:28
216,574,540
0
0
null
null
null
null
UTF-8
Java
false
false
1,015
java
package prcatice; import java.util.concurrent.*; class Display{ public void print(){ System.out.println("Shubham"); } } class Ac implements Runnable{ Display d; Ac(Display d){ this.d = d; } public void printNumbers(){ synchronized(this.d){ for(int i=0;i<10;i++){ System.out.println(i + Thread.currentThread().getName()); try{ Thread.sleep(500); }catch(InterruptedException e){ e.printStackTrace(); } } } } public void run(){ printNumbers(); } } public class Threads { public static void main(String args[]){ Display d = new Display(); Ac a1 = new Ac(d); Ac a2 = new Ac(d); Ac a3 = new Ac(d); Thread t1 = new Thread(a1); Thread t2 = new Thread(a2); Thread t3 = new Thread(a3); t1.start(); t2.start(); t3.start(); } }
[ "kumarsinghshubham32111@gmail.com" ]
kumarsinghshubham32111@gmail.com
8507f44d5107a622ba439277971179acb0c89d95
27274fcca8cb75fe322f7a9bfa00cef3bf6b35b4
/flink-streaming-web/src/main/java/com/flink/streaming/web/model/entity/JobConfig.java
f7408f36ea84717cd9082372f5a757962712fbfa
[]
no_license
wzwpanda/flink-streaming-platform-web
5ae82792585872063a98676d4e26f0d4d10c78ae
bd016266ce1e44306f21f68ffec0a88c44e1718f
refs/heads/master
2022-12-31T21:25:32.622974
2020-10-20T14:08:35
2020-10-20T14:08:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,652
java
package com.flink.streaming.web.model.entity; import lombok.Data; import java.util.Date; /** * * @author zhuhuipei * @date 2020-07-10 * @time 01:46 */ @Data public class JobConfig{ private Long id; /** * 任务名称 */ private String jobName; /** * flink的本地目录 */ private String deployMode; /** * flink运行配置 */ private String flinkRunConfig; /** * flink运行配置 */ private String flinkCheckpointConfig; /** * flink运行配置 */ private String jobId; /** * 1:开启 0: 关闭 */ private Integer isOpen; /** * @see com.flink.streaming.web.enums.JobConfigStatus * 1:运行中 0: 停止中 -1:运行失败 */ private Integer stauts; /** * udf注册名称如 * utc2local|com.streaming.flink.udf.UTC2Local 多个可用;分隔 * utc2local代表组册的名称 * com.streaming.flink.udf.UTC2Local代表类名 * */ private String udfRegisterName; /** * udf地址 如http://xxx.xxx.com/flink-streaming-udf.jar */ private String udfJarPath; /** * 最后一次启动时间 */ private Date lastStartTime; private Long lastRunLogId; /** * 更新版本号 用于乐观锁 */ private Integer version; private Integer isDeleted; /** * 创建时间 */ private Date createTime; /** * 修改时间 */ private Date editTime; private String creator; private String editor; /** * sql语句 */ private String flinkSql; }
[ "huipei.zhu@hipac.cn" ]
huipei.zhu@hipac.cn
88eb65c28f5b337700625201c51e28dd8c429378
3c638857e209e0931c8d4f632cb0ee8d43261b0a
/app/src/main/java/com/example/natnat/RankAdapter.java
211f13d7b88f037d53296dcb913eac7153879d54
[]
no_license
beekama/NatNat-App
fc111ca5c7f0eafe6789b5becb69122f82a651f9
3ee06a5b4db23b6b19090641c535107a30055bf6
refs/heads/master
2023-07-29T14:06:11.601354
2021-09-20T19:05:02
2021-09-20T19:05:02
405,421,359
0
0
null
null
null
null
UTF-8
Java
false
false
5,084
java
package com.example.natnat; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RatingBar; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.core.content.res.ResourcesCompat; import androidx.recyclerview.widget.RecyclerView; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.ArrayList; public class RankAdapter extends RecyclerView.Adapter { private Context context; private ArrayList<NatItem> items; Database db; UpdateDbInterface iface; public RankAdapter(Context context, ArrayList<NatItem> items, Database db, UpdateDbInterface iface) { this.context = context; this.items = items; this.db = db; this.iface = iface; } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); assert inflater != null; View view = inflater.inflate(R.layout.rank_nat_item, parent, false); return new LocalViewHolder(view); } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { LocalViewHolder lvh = (LocalViewHolder) holder; lvh.rank.setText(Integer.toString(position + 1)); lvh.textView.setText(items.get(position).restaurantName); lvh.textView.setTextSize(18); lvh.meal.setText(items.get(position).meal); lvh.textView.setTextSize(15); lvh.stars.setRating(items.get(position).gesamt); try { if(items.get(position).imagePath != null){ File f = new File(items.get(position).imagePath); if (f != null) { Bitmap bitmap = BitmapFactory.decodeStream(new FileInputStream(f)); lvh.imageView.setImageBitmap(bitmap); }} } catch (FileNotFoundException e) { e.printStackTrace(); } lvh.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString("restaurant", items.get(position).restaurantName); Intent myIntent = new Intent(v.getContext(), Extended.class); myIntent.putExtra("meal", items.get(position).meal); myIntent.putExtras(bundle); v.getContext().startActivity(myIntent); } }); lvh.itemView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { DialogInterface.OnClickListener dialogClickList = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which){ case DialogInterface.BUTTON_POSITIVE: iface.removeEntry(items.get(position)); break; case DialogInterface.BUTTON_NEGATIVE: break; } } }; AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setMessage("Do you really want to remove this NatEntry?").setPositiveButton("Yes", dialogClickList).setNegativeButton("Cancel", dialogClickList).show(); Toast toast = Toast.makeText(context, "successfully removed item", Toast.LENGTH_LONG); toast.show(); return true; } }); } @Override public int getItemCount() { return items.size(); } static class LocalViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { final TextView rank; final TextView meal; final TextView textView; final ImageView imageView; final RatingBar stars; LocalViewHolder(View itemView) { super(itemView); rank = itemView.findViewById(R.id.rank); meal = itemView.findViewById(R.id.tvMeal); textView = itemView.findViewById(R.id.tvRestaurant); itemView.setOnClickListener(this); imageView = itemView.findViewById(R.id.ivKnusperNat); stars = itemView.findViewById(R.id.stars); } @Override public void onClick(View view) { } } }
[ "k.aus.w@gmx.de" ]
k.aus.w@gmx.de
7468249d1e13db3377e5c754d06bdb25a3a8e706
61f20c7db881fffe31bd8cf73b3740731b948395
/src/com/sample/chapter04/item16/InstrumentedSet.java
8b69896b27de37d065ac1c3bb07d58fd6e5075b9
[]
no_license
alexpdh/effectiveJavaSample
b83b0a9df21beb4292240d5ab46dca1309fe224e
23ea77280282c4ab73e803efd68450e15c7394d0
refs/heads/master
2020-01-23T21:42:25.191601
2017-03-19T10:29:06
2017-03-19T10:29:06
74,687,018
2
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
/** * @Project Name:effectiveJavaSample * @File Name:InstrumentedSet.java * @Package Name:com.sample.chapter03.item16 * @Date:2016年12月26日下午10:03:14 * */ package com.sample.chapter04.item16; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Set; /** * @ClassName:InstrumentedSet * @Function:使用组合代替继承 * @version * * @author pengdh * @date: 2016年12月26日 下午10:03:14 */ //wrapper class - uses composition in place of inheritance public class InstrumentedSet<E> extends ForwardingSet<E> { private int addCount; public InstrumentedSet(Set<E> s) { super(s); } @Override public boolean add(E e) { addCount++; return super.add(e); } @Override public boolean addAll(Collection<? extends E> c) { addCount += c.size(); return super.addAll(c); } public int getAddCount() { return addCount; } public static void main(String[] args) { InstrumentedSet<String> s = new InstrumentedSet<String>(new HashSet<String>()); s.addAll(Arrays.asList("Snap", "Crackle", "Pop")); System.out.println(s.getAddCount()); } }
[ "alexpdh@163.com" ]
alexpdh@163.com
bc7a67cc3ed3a3cc68d6da2efc4651e76ab50378
29753d29d900b5e3203f6ba033cbee65ef23ff99
/JDBC_try/pics.java
5d84189efe476abe9c2bb69541bae86366830166
[]
no_license
xcymo/mysqlPractise
30f8ebdb80c8d5f4e1a4ea7acb54745b2acca535
a6dc04b6f4eb78a238ca773465c2db2b6caa75a3
refs/heads/master
2021-01-18T19:32:51.386845
2017-04-07T13:20:42
2017-04-07T13:20:42
86,901,199
0
0
null
null
null
null
UTF-8
Java
false
false
1,613
java
package JDBC_try; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import CRUD.DButils; public class pics { public static void main(String[] args0) { // picUpload(); picDownload(); } public static void picUpload() { Connection conn = null ; PreparedStatement stmt = null ; ResultSet rs = null ; try { conn = DButils.getConnection() ; String sql = "insert into pics(name) values (?)" ; stmt = conn.prepareStatement(sql) ; File f = new File("D:\\图片\\帅气的我.jpg") ; BufferedInputStream br = new BufferedInputStream(new FileInputStream(f)) ; stmt.setBinaryStream(1, br, (int)f.length()); stmt.executeUpdate() ; br.close(); }catch(Exception e) { }finally { DButils.closeAll(rs, stmt, conn); } } public static void picDownload() { Connection conn = null ; PreparedStatement ps = null ; ResultSet rs = null ; try { conn = DButils.getConnection() ; String sql = "select name from pics where id = 1" ; ps = conn.prepareStatement(sql) ; rs = ps.executeQuery() ; while (rs.next()) { InputStream is = rs.getBinaryStream("name"); FileOutputStream fos = new FileOutputStream(new File("pics.jpg")); byte[] arr = new byte[1024]; int i; while ((i = is.read(arr)) != -1) { fos.write(arr, 0, i); } } }catch(Exception e) { }finally { DButils.closeAll(rs, ps, conn); } } }
[ "361855254@qq.com" ]
361855254@qq.com
b82c3063ffd3dcb8034e621858409e530e9b28ed
7025c2c679614fbae2ba83bb84f7ed5e7df6b297
/src/test/java/com/singtel/assigment/test/AssignmentUnitTest.java
af23f2b5a8bb280357e8607b144f7082e28d1dbc
[]
no_license
dumidus/Singtel_Assignment
6c527a515c6acfcaa76ec85eed444a9d3d36ba1e
902be43408d5fa0ded2889cc6208b77f66bca687
refs/heads/master
2020-10-01T23:04:26.295725
2019-12-12T20:32:17
2019-12-12T20:32:17
227,642,204
0
0
null
null
null
null
UTF-8
Java
false
false
2,563
java
/** * */ package com.singtel.assigment.test; import org.junit.Test; import com.singtel.assignment.Bird; import com.singtel.assignment.Butterfly; import com.singtel.assignment.Cat; import com.singtel.assignment.Chicken; import com.singtel.assignment.Clownfish; import com.singtel.assignment.Dog; import com.singtel.assignment.Dolphine; import com.singtel.assignment.Duck; import com.singtel.assignment.Fish; import com.singtel.assignment.Parrot; import com.singtel.assignment.Rooster; import com.singtel.assignment.RoosterOtherWay; import com.singtel.assignment.Shark; /** * @author dumidu * */ public class AssignmentUnitTest { @Test public void testQ1_a() { Bird objBird = new Bird(); objBird.isWalk(); objBird.isFly(); objBird.isSing(); } @Test public void testQ2_a() { Duck objDuck = new Duck(); objDuck.isWalk(); objDuck.isFly(); objDuck.isSing(); objDuck.isSwimm(); } @Test public void testQ2_c() { Chicken objChicken = new Chicken(); objChicken.isWalk(); objChicken.isFly(); objChicken.isSing(); objChicken.isSwimm(); } @Test public void testQ3_a() { Rooster objRooster = new Rooster(); objRooster.isWalk(); objRooster.isFly(); objRooster.isSing(); objRooster.isSwimm(); } @Test public void testQ3_c() { RoosterOtherWay objRooster = new RoosterOtherWay(); objRooster.isWalk(); objRooster.isFly(); objRooster.isSing(); objRooster.isSwimm(); } @Test public void testQ4_a() { Parrot objParrot = new Parrot(); objParrot.setLivedWith(new Dog()); objParrot.isSing(); objParrot.isFly(); objParrot.isWalk(); } @Test public void testQ4_b() { Parrot objParrot = new Parrot(); objParrot.setLivedWith(new Cat()); objParrot.isSing(); objParrot.isFly(); objParrot.isWalk(); } @Test public void testQ4_c() { Parrot objParrot = new Parrot(); objParrot.setLivedWith(new Rooster()); objParrot.isSing(); objParrot.isFly(); objParrot.isWalk(); } @Test public void testBQ2_a() { Shark objShark = new Shark(); objShark.color(); objShark.eat(); objShark.size(); } @Test public void testBQ2_b() { Clownfish objClownfish = new Clownfish(); objClownfish.color(); objClownfish.size(); objClownfish.makeJokes(); } @Test public void testDQ1() { Butterfly objButterfly = new Butterfly(); objButterfly.isFly(); objButterfly.isSing(); objButterfly.isWalk(); } @Test public void testDQ2() { Butterfly objButterfly = new Butterfly(); objButterfly.setCaterpillar(true); objButterfly.isFly(); objButterfly.isWalk(); } }
[ "dumidusk@gmail.com" ]
dumidusk@gmail.com
83ac1e0bfb46b620d191535974714958935dee5a
89b6a894fccb6197d962658e75171fcf9a79c306
/ELearningProject/src/main/java/com/myclass/dto/UserDto.java
12f0e9e1c7c96f90d8a36e395740c0ef8af2eeb2
[]
no_license
longcualonglonglong11/Elearning
09b69f137bdc4e02779d2612d976f8505f4012eb
efc1f43ecb6112f7252ef77d64f41079ecaed32f
refs/heads/master
2022-12-23T13:52:06.087799
2020-09-19T14:16:47
2020-09-19T14:16:47
296,883,802
0
0
null
null
null
null
UTF-8
Java
false
false
3,434
java
package com.myclass.dto; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; import org.springframework.web.multipart.MultipartFile; import com.myclass.entity.Role; import com.sun.istack.NotNull; public class UserDto { private int id; @NotBlank(message = "Email can not be blank") private String email; @NotBlank(message = "Fullname can not be blank") private String fullname; @NotBlank(message = "Password can not be blank") private String password; // @NotBlank(message = "Confirm password can not be blank") private String confirmPassword; private String avatar; @NotBlank(message = "Phone can not be blank") private String phone; @NotBlank(message = "Address can not be blank") private String address; private int roleId; private String roleName; @Min(value = 0, message = "Balace can't be nagative") private double balance; private MultipartFile[] fileDatas; public UserDto(int id, String email, String fullname, String avatar, String phone, String address) { this.id = id; this.email = email; this.fullname = fullname; this.avatar = avatar; this.phone = phone; this.address = address; } public UserDto(int id, String email, String fullname, String avatar, String phone, String address, Role role) { this.id = id; this.email = email; this.fullname = fullname; this.avatar = avatar; this.phone = phone; this.address = address; this.roleName = role.getDescription(); this.roleId = role.getId(); } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getFullname() { return fullname; } public void setFullname(String fullname) { this.fullname = fullname; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public int getRoleId() { return roleId; } public void setRoleId(int roleId) { this.roleId = roleId; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public UserDto() { } public UserDto(int id, @NotBlank(message = "Fullname can not be blank") String fullname, String avatar) { super(); this.id = id; this.fullname = fullname; this.avatar = avatar; } public MultipartFile[] getFileDatas() { return fileDatas; } public void setFileDatas(MultipartFile[] fileDatas) { this.fileDatas = fileDatas; } public String getConfirmPassword() { return confirmPassword; } public void setConfirmPassword(String confirmPassword) { this.confirmPassword = confirmPassword; } public double getBalance() { return balance; } public void setBalance(double balance) { this.balance = balance; } }
[ "51012277+longcualonglonglong11@users.noreply.github.com" ]
51012277+longcualonglonglong11@users.noreply.github.com
17666082126eaa6ff145e60de4b8bf0333c83d29
8a38b4a30529b83b3353fd6201c1d397cc90c028
/app/src/main/java/com/android/onehuman/secretsantasms/database/DBHelper.java
06ee12a3af105d10326558739d75c3106d429c33
[]
no_license
bjlas/SecretSantaSMS
47943c6ad76ec9423c716dc1c43484b4c0f6dd7c
aee5f75ed3075e430b6e6ad302fa5b3458943cee
refs/heads/master
2022-03-26T21:49:14.535064
2020-01-10T13:20:14
2020-01-10T13:20:14
218,758,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,544
java
package com.android.onehuman.secretsantasms.database; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DBHelper extends SQLiteOpenHelper { private static DBHelper dbHelper; public static final int DATABASE_VERSION = 10; public static final String DATABASE_NAME = "SecretSantaSMS.db"; public static synchronized DBHelper getInstance(Context c) { if (dbHelper == null) { dbHelper = new DBHelper(c.getApplicationContext()); } return dbHelper; } private DBHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(DBContract.PersonEntry.SQL_CREATE_TABLE); db.execSQL(DBContract.ForbiddenEntry.SQL_CREATE_TABLE); db.execSQL(DBContract.GroupEntry.SQL_CREATE_TABLE); db.execSQL(DBContract.PersonsInGroupEntry.SQL_CREATE_TABLE); db.execSQL(DBContract.SolutionEntry.SQL_CREATE_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DBContract.PersonEntry.SQL_DELETE_ENTRIES); db.execSQL(DBContract.ForbiddenEntry.SQL_DELETE_ENTRIES); db.execSQL(DBContract.GroupEntry.SQL_DELETE_ENTRIES); db.execSQL(DBContract.PersonsInGroupEntry.SQL_DELETE_ENTRIES); db.execSQL(DBContract.SolutionEntry.SQL_DELETE_ENTRIES); onCreate(db); } }
[ "Blas.Gimeno@enernoc.com" ]
Blas.Gimeno@enernoc.com
881421edf4282553a34fa0993c85b6f86fcc0780
1fd476eff221752ee35d6b0633abe13a7a83f905
/lab5/lab0/src/main/java/TheatreBookerBean.java
1c33b2a0ca083002c320b5cabc52488603321f80
[ "MIT" ]
permissive
wolskiaxiom/soa-agh-course
94fd49e84b93d005a8cbf02433cdebd9510cbbba
b39cadf2a8b0e76fd3b6fcac4836b0a2b1e5ff01
refs/heads/master
2020-05-03T13:30:38.759091
2018-05-29T18:28:11
2018-05-29T18:28:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
import javax.annotation.PostConstruct; import javax.ejb.*; import org.jboss.logging.Logger; @StatefulTimeout(value = 360) @Stateful @Remote(TheatreBooker.class) public class TheatreBookerBean implements TheatreBooker { private static final Logger logger =Logger.getLogger(TheatreBooker.class); int money = 100; @EJB TheatreBox theatreBox; @PostConstruct public void createCustomer() { this.money=100; } public String bookSeat(int seatId) throws SeatBookedException, NotEnoughMoneyException { Seat seat = theatreBox.getSeatList().get(seatId); // Logika biznesowa. if (seat.isBooked()) { throw new SeatBookedException("To miejsce jest już zarezerwowane!"); } if (seat.getPrice() > money) { throw new NotEnoughMoneyException("Nie masz wystarczających środków, aby kupić ten bilet!"); } theatreBox.buyTicket(seatId); money = money -seat.getPrice(); logger.info("Rezerwacja przyjęta."); return "Rezerwacja przyjęta."; } }
[ "motek@student.agh.edu.pl" ]
motek@student.agh.edu.pl
99689bc56a8e1e6ff60982019683d6e7b413de45
0588a7498ec6eb64dfb7ab8bbd78f70c9c10cd5e
/messenger/src/main/java/com/karki/messenger/service/MessageService.java
b2cb8bdc4ef6d5c47473a177a46e941f6ac507b1
[]
no_license
nirozjung/RestAPIExample
e8e4a0a2c5d38178260bf5185c2328237c0831d4
a746b0a31cdda4d75bc7e2f44cbe141cbfaa45df
refs/heads/master
2021-01-12T04:14:25.423349
2017-01-01T19:08:48
2017-01-01T19:08:48
77,556,005
0
0
null
null
null
null
UTF-8
Java
false
false
1,883
java
package com.karki.messenger.service; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Map; import com.karki.messenger.database.DatabaseClass; import com.karki.messenger.exception.DataNotFoundException; import com.karki.messenger.model.Message; public class MessageService { private Map<Long, Message> messages = DatabaseClass.getMessages(); public MessageService() { messages.put(1L, new Message(1, "This is crazy", "Niroz")); messages.put(2L, new Message(2, "This is crazy", "Tom")); } public List<Message> getAllMessages() { return new ArrayList<Message>(messages.values()); } public Message getMessage(long id) { Message message= messages.get(id); if(message==null){ throw new DataNotFoundException("Message with id "+id+" not found"); } return message; } public List<Message> getAllMessageForYear(int year){ List<Message> messagesForYear=new ArrayList<Message>(); Calendar cal=Calendar.getInstance(); for(Message msg:messages.values()){ cal.setTime(msg.getCreated()); System.out.println("Calendar stuff **** "+cal); if(cal.get(Calendar.YEAR)==year) messagesForYear.add(msg); } return messagesForYear; } public List<Message> getAllMessagesPaginated(int start, int size){ List<Message> messagesPaginated=new ArrayList<Message>(messages.values()); if(start+size>messagesPaginated.size()) return new ArrayList<>(); return messagesPaginated.subList( start, start + size ); } public Message addMessage(Message message) { message.setId(messages.size() + 1); messages.put(message.getId(), message); return message; } public Message updateMessage(Message message) { if (message.getId() == 0) { return null; } messages.put(message.getId(), message); return message; } public Message removeMessage(long id) { return messages.remove(id); } }
[ "zorinzung@gmail.com" ]
zorinzung@gmail.com
f96f39d5e7f7b2590f43fb3279186af415db456c
e7d02ac1ffbdf6e91012341bb9fdea4c3e73b074
/src/pasito/ast/type/FieldDecl.java
e42ec09d63b1dadf8a57e269ed18ddc0db8d577e
[]
no_license
andrebts/PasitoCompiler
7e0e7c02eb38ae2c44a29291d9637b25688d0799
4611f3f3fd427530498de65a322577c4a3c981c4
refs/heads/master
2019-06-19T23:08:33.530824
2018-03-22T15:13:38
2018-03-22T15:13:38
105,955,217
1
0
null
null
null
null
UTF-8
Java
false
false
370
java
package pasito.ast.type; import pasito.ast.PasitoVisitor; /** * Created by ariel on 21/08/17. */ public class FieldDecl { public String name; public Type type; public FieldDecl(String name, Type type) { this.name = name; this.type = type; } public Object accept(PasitoVisitor visitor) { return visitor.VisitFieldDecl(this); } }
[ "senha1234" ]
senha1234
bae6e2a8eb59f2baadf35d8ee2ed2e54f12dfe14
6af10eb4a708825578ff3e8aa4426f719eb4edb9
/src/parser/elements/variables/Attribute.java
bbe9d9f55a19b20f4b3655b0619e6c46ef362510
[]
no_license
enotcz/Pasava-PL
81311c8e7ee07d0b4d129d479a34bfd5c7cd063b
6525b3d5b780885fdbb924cff5f3f6d4583ffed5
refs/heads/master
2020-08-19T02:12:26.303759
2019-10-17T18:46:45
2019-10-17T18:46:45
215,863,171
0
0
null
null
null
null
UTF-8
Java
false
false
700
java
package parser.elements.variables; import exceptions.AtributException; import parser.elements.identifiers.Identifier; public abstract class Attribute { private Identifier identifier; private double value; public Attribute(Identifier identifier, double value) { this.identifier = identifier; this.value = value; } public Attribute(Identifier identifier) { this.identifier = identifier; this.value = 0; } public String getName(){ return identifier.getName(); } public double getValue() { return value; } public void setValue(double value) throws AtributException { this.value = value; } }
[ "enot@post.cz" ]
enot@post.cz
79cd88116227b752f57ff925edc1113d6aad1b7f
9269b96bea399e4f689ecb6a6e8a6dded3e483a6
/src/main/java/com/bootdemo/lmy/demo/controller/IndexController.java
98e1d71a905020e676e5f92c6adc8c59507809b3
[]
no_license
Lxy518310/demo
68c9caf2e636056887b335bde0f96b0217bf782a
706c5a7137846840894e371b1fddeffde6173953
refs/heads/master
2022-06-22T12:11:19.917867
2020-02-01T08:51:32
2020-02-01T08:51:32
210,842,803
0
0
null
2022-06-21T01:57:18
2019-09-25T12:44:57
Java
UTF-8
Java
false
false
1,114
java
package com.bootdemo.lmy.demo.controller; import com.bootdemo.lmy.demo.dto.PageDTO; import com.bootdemo.lmy.demo.service.QuestionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; /** * @author 李 * @create 2019/9/24 23:14 */ @Controller public class IndexController { @Autowired private QuestionService questionService; @RequestMapping("/") public String index(@RequestParam(name = "page",defaultValue = "1") Integer page, @RequestParam(name="size",defaultValue = "7")Integer size, HttpServletRequest request, Model model){ String path=request.getServletPath(); PageDTO pageDTO =questionService.getPageDTO(page,size); model.addAttribute("questions",pageDTO); return "index"; } }
[ "1187950422@qq.com" ]
1187950422@qq.com
a36e775690ee8092f1b957cad906572a60cd1ece
925333e6ef8c99d9bf221e4529706c3bc62d3e9b
/app/src/main/java/kaylamacfarlane/cuttingboard/Conversion_Chart.java
578fbf802abe4493af933d87fea3e9bddaa57072
[]
no_license
kaymac048/CuttingBoard
091651ace781ecc7bf10767caee5680755d55a18
a8d6cdeccb3c92c8f66057eee380355dc3c1b552
refs/heads/master
2021-01-23T15:41:29.831603
2015-05-14T00:23:57
2015-05-14T00:23:57
32,094,791
0
3
null
2015-03-24T15:52:36
2015-03-12T18:36:03
Java
UTF-8
Java
false
false
7,038
java
package kaylamacfarlane.cuttingboard; import java.util.Locale; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentPagerAdapter; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class Conversion_Chart extends ActionBarActivity implements ActionBar.TabListener { /** * The {@link android.support.v4.view.PagerAdapter} that will provide * fragments for each of the sections. We use a * {@link FragmentPagerAdapter} derivative, which will keep every * loaded fragment in memory. If this becomes too memory intensive, it * may be best to switch to a * {@link android.support.v4.app.FragmentStatePagerAdapter}. */ SectionsPagerAdapter mSectionsPagerAdapter; /** * The {@link ViewPager} that will host the section contents. */ ViewPager mViewPager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_conversion__chart); // Set up the action bar. final ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); //actionBar.setDisplayShowTitleEnabled(false); // Create the adapter that will return a fragment for each of the three // primary sections of the activity. mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); // Set up the ViewPager with the sections adapter. mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(mSectionsPagerAdapter); // When swiping between different sections, select the corresponding // tab. We can also use ActionBar.Tab#select() to do this if we have // a reference to the Tab. mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { actionBar.setSelectedNavigationItem(position); } }); // For each of the sections in the app, add a tab to the action bar. for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) { // Create a tab with text corresponding to the page title defined by // the adapter. Also specify this Activity object, which implements // the TabListener interface, as the callback (listener) for when // this tab is selected. actionBar.addTab( actionBar.newTab() .setText(mSectionsPagerAdapter.getPageTitle(i)) .setTabListener(this)); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_conversion__chart, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @Override public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) { // When the given tab is selected, switch to the corresponding page in // the ViewPager. mViewPager.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) { } @Override public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) { } /** * A {@link FragmentPagerAdapter} that returns a fragment corresponding to * one of the sections/tabs/pages. */ public class SectionsPagerAdapter extends FragmentPagerAdapter { public SectionsPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { // getItem is called to instantiate the fragment for the given page. // Return a PlaceholderFragment (defined as a static inner class below). switch (position) { case 0: return new EquivalentsFragment(); case 1: return new UStoMetricFragment(); case 2: return new MetrictoUSFragment(); } return null; //return PlaceholderFragment.newInstance(position + 1); } @Override public int getCount() { // Show 3 total pages. return 3; } @Override public CharSequence getPageTitle(int position) { Locale l = Locale.getDefault(); switch (position) { case 0: return getString(R.string.title_section1).toUpperCase(l); case 1: return getString(R.string.title_section2).toUpperCase(l); case 2: return getString(R.string.title_section3).toUpperCase(l); } return null; } } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { /** * The fragment argument representing the section number for this * fragment. */ private static final String ARG_SECTION_NUMBER = "section_number"; /** * Returns a new instance of this fragment for the given section * number. */ public static PlaceholderFragment newInstance(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_conversion__chart, container, false); return rootView; } } }
[ "kaymac456@msn.com" ]
kaymac456@msn.com
f7b23411cae50e4fafe617c6ebb1df83936811cf
9c34b854ca36b0a81314617d27f60c92e4c9a650
/Oasis/src/java/modelo/BEAN/BeanEstaPedProd.java
b15d2f26d06b4f01df73a895c9eae5a16fe031cd
[]
no_license
santhenao/Oasis
8f37b612be527c61981c93235688c59866fd1803
1d63a1f654357ef9cc05238a6510166294bfe71a
refs/heads/master
2021-01-23T06:10:58.660186
2017-06-19T14:45:03
2017-06-19T14:45:03
92,199,387
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
package modelo.BEAN; public class BeanEstaPedProd { public int idEstaPedProd; public String NomEstaPedProd; public BeanEstaPedProd(int idEstaPedProd, String NomEstaPedProd) { this.idEstaPedProd = idEstaPedProd; this.NomEstaPedProd = NomEstaPedProd; } public BeanEstaPedProd() { } public int getIdEstaPedProd() { return idEstaPedProd; } public void setIdEstaPedProd(int idEstaPedProd) { this.idEstaPedProd = idEstaPedProd; } public String getNomEstaPedProd() { return NomEstaPedProd; } public void setNomEstaPedProd(String NomEstaPedProd) { this.NomEstaPedProd = NomEstaPedProd; } }
[ "Santiagoth@Santiago" ]
Santiagoth@Santiago
7b933c50fc0066b42e827d758999a73a501f00a9
b6ad9ec630431c36ba261ebdbc1c47915eeb6d7c
/app/src/main/java/com/example/intership_retrofit/persistence/DBWrapper.java
5a342a2d67cd8bdc6d75f9b54ca5612fd5eed7a1
[]
no_license
ArshakN/Intership_Retrofit
20a875ec569bab2c2843171296b90ffbc7a00298
e82f8206c77a4a364b63799166d19293242a5de1
refs/heads/master
2020-07-06T03:48:37.102376
2019-09-10T14:02:42
2019-09-10T14:02:42
202,879,966
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package com.example.intership_retrofit.persistence; import android.content.Context; import androidx.room.Room; public class DBWrapper { private static AppDatabase instance = null; public static void create(Context context) { if (instance == null) { synchronized (AppDatabase.class) { if (instance == null) { instance = Room.databaseBuilder(context, AppDatabase.class, "database").build(); } } } } public static AppDatabase getDatabase() { if (instance == null) { throw new IllegalStateException("Database not created"); } return instance; } }
[ "arshonster@gmail.com" ]
arshonster@gmail.com
4effd7510aeb45089b344008afeb37732082add3
fce7fad48b2c5ed298b1e25bd14fa794a73a8e2e
/src/test/java/ibis/structure/ImplicationsGraphTest.java
8ade7706d1f33b95b59e9fe72c246d08e5babc9b
[ "MIT" ]
permissive
dkosolobov/structure
046d3a3080514d0660841be9088bd9371e3fa383
f6866fedf380b663c8ceb7820b139eb903542cf2
refs/heads/master
2021-01-18T08:05:51.391205
2011-08-29T08:59:33
2011-08-29T08:59:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,277
java
package ibis.structure; import gnu.trove.list.array.TIntArrayList; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; public class ImplicationsGraphTest { ImplicationsGraph graph; @Test public void addImplication() { create(3); add(1, 3); assertTrue(graph.contains(1, 3)); assertTrue(graph.contains(-3, -1)); add(3, 3); assertTrue(graph.contains(3, 3)); assertTrue(graph.contains(-3, -3)); add(-3, 3); assertTrue(graph.contains(-3, 3)); assertFalse(graph.contains(3, -3)); } @Test public void stronglyConnectedComponents() throws ContradictionException { create(6); int[] colapsed; add(1, 2, 3); add(2, 1); add(3, 4, 5); add(4, 5, 6); add(5, 6); add(6, 4); graph.topologicalSort(); colapsed = graph.removeStronglyConnectedComponents(); compare(colapsed, 0, 1, 1, 3, 4, 4, 4); add(4, 3); graph.topologicalSort(); colapsed = graph.removeStronglyConnectedComponents(); compare(colapsed, 0, 1, 2, 3, 3, 5, 6); } @Test(expected=ContradictionException.class) public void stronglyConnectedComponentsContradiction() throws ContradictionException { create(3); add(-1, 3); add(3, 2); add(2, 1); add(1, -1); graph.topologicalSort(); graph.removeStronglyConnectedComponents(); } @Test public void propagate() throws ContradictionException { int[] propagated; create(6); add(1, 2, 3); propagated = graph.propagate(1).toArray(); assertFalse(graph.contains(1, 2)); assertFalse(graph.contains(-2, -1)); assertFalse(graph.contains(1, 3)); assertFalse(graph.contains(-3, -1)); compare(propagated, 1, 2, 3); create(6); add(1, 2); propagated = graph.propagate(2).toArray(); assertFalse(graph.contains(1, 2)); assertFalse(graph.contains(-2, -1)); compare(propagated, 2); create(6); add(5, 1); add(1, 2, 3); add(2, 4); add(3, 4); add(4, 1); propagated = graph.propagate(4).toArray(); assertFalse(graph.contains(1, 2)); assertFalse(graph.contains(-2, -1)); assertFalse(graph.contains(1, 3)); assertFalse(graph.contains(-3, -1)); assertFalse(graph.contains(5, 1)); assertFalse(graph.contains(-1, -5)); compare(propagated, 4, 1, 2, 3); create(6); add(5, 1); add(1, 2); add(2, 3); add(3, 4); add(4, 5); add(5, 1); add(1, 2); add(2, 3); add(3, 4); add(4, 5); propagated = graph.propagate(3).toArray(); compare(propagated, 3, 4, 5, 1, 2); } @Test(expected=ContradictionException.class) public void propagateContradiction() throws ContradictionException { create(4); add(-1, 1); add(1, 2); add(2, 3); add(3, 4); add(4, -1); graph.propagate(3); } private void create(int numVariables) { graph = new ImplicationsGraph(numVariables); } private void add(int source, int... edges) { for (int i = 0; i < edges.length; i++) { graph.add(source, edges[i]); } } private void compare(int[] array, int... elements) { assertEquals(new TIntArrayList(elements), new TIntArrayList(array)); } }
[ "brtzsnr@gmail.com" ]
brtzsnr@gmail.com
3535e63d7b2574f270376a5f07b20970c6c2ba9c
d4c9b467a8fd9a2209093a25fd387d530ba79d63
/src/tasks/IsTradingJiminua.java
c753c1c01673d947c5fa267c065967b09e961b26
[]
no_license
Bia10/DRunecraft
fb98e452f6b9b572004aae4b7ff07246e9848411
a1a3dcd98da05ac4b61f5d7074587ff6b82eeeaa
refs/heads/master
2020-04-23T10:22:01.989919
2019-02-17T06:30:10
2019-02-17T06:30:10
171,101,733
1
0
null
2019-02-17T09:05:00
2019-02-17T09:04:59
null
UTF-8
Java
false
false
289
java
package tasks; import org.rspeer.runetek.api.component.Shop; import task_structure.TreeTask; public class IsTradingJiminua extends TreeTask { public IsTradingJiminua() { super(false); } @Override public boolean validate() { return Shop.isOpen(); } }
[ "davidrodden273@gmail.com" ]
davidrodden273@gmail.com
c38d626ad7511ebce763cab229b0b38092403fc1
9cdd38ff34833717fa20f9d76f31092bcfabc9fc
/t_mall_publish/src/main/Java/com/atguigu/crud/service/UserService.java
e8854fd5ee331ce7b317630b6577544872d26375
[]
no_license
ldjz1989219/t_mall_publish
dd37f22d6cb18b3ae2f609cc9e6789ca7891fa31
81766e16e70d652a6ca7631ff873bf246cf86713
refs/heads/master
2021-01-19T21:13:50.510021
2017-04-18T14:15:15
2017-04-18T14:15:15
88,632,501
0
0
null
null
null
null
UTF-8
Java
false
false
172
java
package com.atguigu.crud.service; import com.atguigu.crud.entity.User; public interface UserService { public User checkLogin(String username, String password); }
[ "806626709@qq.com" ]
806626709@qq.com
86daf755b6daaab74678e9f19a2f4ec54e888aa9
457b5b15f43e34dde9079e07ad4b756eaee30ede
/src/main/java/com/algaworks/brewer/model/Fornecedor.java
ca39cb138562acde8145a22f4dd7eda817ba8866
[]
no_license
FelipeRomao/project-brewer
2b71a7289931867eae1ec76a75155c84be9099b0
b1aefedd6857edc22f20615738ab1a6ccc71b08c
refs/heads/master
2020-03-23T07:13:10.128288
2019-04-09T11:45:46
2019-04-09T11:45:46
135,854,450
0
0
null
null
null
null
UTF-8
Java
false
false
2,817
java
package com.algaworks.brewer.model; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.validator.constraints.Email; import org.hibernate.validator.constraints.NotBlank; import org.hibernate.validator.constraints.br.CNPJ; import com.algaworks.brewer.model.validation.group.CnpjGroup; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity @Table(name = "fornecedor") public class Fornecedor implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long codigo; @NotBlank(message = "Razão social é obrigatório") @Column(name = "razao_social") private String razaoSocial; @NotBlank(message = "CNPJ é obrigatório") @CNPJ(groups = CnpjGroup.class) private String cnpj; @NotBlank(message = "Inscrição estadual é obrigatório") @Column(name = "inscricao_estadual") private String inscricaoEstadual; private String telefone; @Email(message = "e-mail inválido") private String email; @JsonIgnore @Embedded private Endereco endereco; public Long getCodigo() { return codigo; } public void setCodigo(Long codigo) { this.codigo = codigo; } public String getRazaoSocial() { return razaoSocial; } public void setRazaoSocial(String razaoSocial) { this.razaoSocial = razaoSocial; } public String getCnpj() { return cnpj; } public void setCnpj(String cnpj) { this.cnpj = cnpj; } public String getInscricaoEstadual() { return inscricaoEstadual; } public void setInscricaoEstadual(String inscricaoEstadual) { this.inscricaoEstadual = inscricaoEstadual; } public String getTelefone() { return telefone; } public void setTelefone(String telefone) { this.telefone = telefone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Endereco getEndereco() { return endereco; } public void setEndereco(Endereco endereco) { this.endereco = endereco; } public boolean isNovo() { return codigo == null; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((codigo == null) ? 0 : codigo.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Fornecedor other = (Fornecedor) obj; if (codigo == null) { if (other.codigo != null) return false; } else if (!codigo.equals(other.codigo)) return false; return true; } }
[ "feliperomao.a@gmail.com" ]
feliperomao.a@gmail.com
155972aa3e391c4f0dc146983299ef0e4c0fc7b9
90497805b00cc4d55c6cf854b90bb5f25bf96392
/app/src/main/java/com/excel/smartcity/ui/fragment/PersonInfoFragment.java
3cd789dd30d879e7c91ee8e9856dbae7a4a5593f
[]
no_license
Alisa-J/SmartCity-1
5c05aaf2b887069820267e8cadb607d97adec44e
d5cd678eab00aef5ac7a159754395921ac618a48
refs/heads/main
2023-04-19T07:49:33.343650
2021-05-06T01:45:04
2021-05-06T01:45:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.excel.smartcity.ui.fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.excel.smartcity.R; public class PersonInfoFragment extends Fragment { @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_person, null); return view; } }
[ "wangtao1@sensetime.com" ]
wangtao1@sensetime.com
ff49ed120f23f1593781ba5260a45e5c0ae1a233
d71fbfdfe9fb5beb903584e11814d75035b71764
/devsBrsMarotos/DB/Models/MobOnRegionModel.java
74fbbb6d9b1d61141cb757b3a2448efbad62f2aa
[]
no_license
Ziden/NewKom
f41e39907c2cd559c9380a7adffc866706646ac9
04698975390ece0312407d394ad4cef67c37cd82
refs/heads/master
2020-12-31T05:10:24.892362
2017-11-14T12:56:53
2017-11-14T12:56:53
58,412,858
5
1
null
null
null
null
UTF-8
Java
false
false
452
java
/* * 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 devsBrsMarotos.DB.Models; import java.util.ArrayList; import java.util.List; /** * * @author User */ public class MobOnRegionModel { public List<ModelMobConfig> mobs = new ArrayList<ModelMobConfig>(); public String regionName = null; }
[ "gabriel.slomka@sonymobile.com" ]
gabriel.slomka@sonymobile.com
a6519e89c7517b9e085abd825f473147d1bb95c8
f67b4079520971f222ea0ffa14e17f20e4d06c2e
/designpattern-notebook/designpatterns/src/main/java/org/berlin/patterns/behavioral/visitor/IVisitorParticipantX.java
f703424a4d1ee3c492f05cceae534ecb95029421
[]
no_license
berlinbrown/DesignPatterns-Notebook
7bff53a7800081acff5198c1515533e9626a9eab
95c606337c7161ffbda3a0360dc424e4ed882297
refs/heads/master
2021-01-23T07:09:17.031886
2012-07-25T01:16:17
2012-07-25T01:16:17
5,173,166
1
0
null
null
null
null
UTF-8
Java
false
false
2,326
java
/** * Copyright (c) 2006-2010 Berlin Brown. All Rights Reserved * * http://www.opensource.org/licenses/bsd-license.php * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary * form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided * with the distribution. * Neither the name of the Botnode.com (Berlin Brown) * nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * ********************************************** * File : * * Date: 7/20/2012 * * bbrown Contact: Berlin Brown * <berlin dot brown at gmail.com> * * keywords: design patterns * * Based on design patterns book: * * Design Patterns - Elements of Reusable Object-Oriented Software * by: * Erich Gamma * Richard Helm * Ralph Johnson * John Vlissides * * Addison-Wesley 1995 * * URLs: * * https://github.com/berlinbrown * ********************************************** */ package org.berlin.patterns.behavioral.visitor; public interface IVisitorParticipantX { }
[ "berlin.brown@gmail.com" ]
berlin.brown@gmail.com
e68c126c04770bbbcf956bb4c82a7af7b5f9a35f
fb9e5e2e51c2165a79eee7756c5a9ae224bc22f7
/yandexmapkitlibrary/build/generated/source/r/androidTest/debug/ru/yandex/yandexmapkit/test/R.java
1163edad3bdedbc7ffdaeefc949e830cea6097ca
[]
no_license
Loki69/AndroidTest
61e19d5223708284d99fa5efade852450fcd8e0a
17d83b93b0678a8013cd83b833f27c36bde69b68
refs/heads/master
2016-08-12T18:17:16.457454
2015-10-04T13:48:03
2015-10-04T13:48:03
43,650,790
1
0
null
null
null
null
UTF-8
Java
false
false
3,508
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package ru.yandex.yandexmapkit.test; public final class R { public static final class attr { } public static final class drawable { public static final int ymk_balloon_black=0x7f020000; public static final int ymk_balloon_tail_black=0x7f020001; public static final int ymk_balloon_text_color=0x7f020002; public static final int ymk_empty_image=0x7f020003; public static final int ymk_find_me_drawable=0x7f020004; public static final int ymk_no_map_image=0x7f020005; public static final int ymk_scale=0x7f020006; public static final int ymk_sgrayvga=0x7f020007; public static final int ymk_sgreenvga=0x7f020008; public static final int ymk_sredvga=0x7f020009; public static final int ymk_stricolorvga=0x7f02000a; public static final int ymk_syellowvga=0x7f02000b; public static final int ymk_tlight_loading=0x7f02000c; public static final int ymk_tlight_no_level_active=0x7f02000d; public static final int ymk_tlight_no_level_active_pressed=0x7f02000e; public static final int ymk_tlight_no_level_inactive=0x7f02000f; public static final int ymk_tlight_no_level_inactive_pressed=0x7f020010; public static final int ymk_tlight_no_level_loading_1=0x7f020011; public static final int ymk_tlight_no_level_loading_2=0x7f020012; public static final int ymk_tlight_no_level_loading_3=0x7f020013; public static final int ymk_user_location_gps=0x7f020014; public static final int ymk_user_location_lbs=0x7f020015; public static final int ymk_where_am_i=0x7f020016; public static final int ymk_where_am_i_pressed=0x7f020017; public static final int ymk_ya_logo=0x7f020018; public static final int ymk_zoom_minus=0x7f020019; public static final int ymk_zoom_minus_drawable=0x7f02001a; public static final int ymk_zoom_minus_pressed=0x7f02001b; public static final int ymk_zoom_plus=0x7f02001c; public static final int ymk_zoom_plus_drawable=0x7f02001d; public static final int ymk_zoom_plus_pressed=0x7f02001e; } public static final class id { public static final int ymk_balloon_text_view=0x7f060000; public static final int ymk_find_me=0x7f060007; public static final int ymk_scale=0x7f060003; public static final int ymk_screen_buttons_bottom=0x7f060002; public static final int ymk_screen_buttons_top=0x7f060001; public static final int ymk_semaphore=0x7f060004; public static final int ymk_zoom_in=0x7f060005; public static final int ymk_zoom_out=0x7f060006; } public static final class layout { public static final int ymk_balloon_default_layout=0x7f030000; public static final int ymk_screen_buttons_layout=0x7f030001; } public static final class string { public static final int ymk_findme_not_found=0x7f050000; public static final int ymk_kilometers_short=0x7f050001; public static final int ymk_lang=0x7f050002; public static final int ymk_meters_short=0x7f050003; public static final int ymk_my_place=0x7f050004; } public static final class xml { public static final int ymk_map_layers=0x7f040000; } }
[ "mur0@mail.ru" ]
mur0@mail.ru
1fc504869be05245afe8f9b0dc1fbdf83d4608fa
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/SecureComms/code/base/common/src/com/tc/async/api/EventContext.java
212771f6b26f53c3416b559e945cd6e83f7f59d5
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
553
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tc.async.api; /** * @author steve Interface for Event Context. It is a tagging interface with no implementation (I'm generally not a big * tagging interface guy but I'm leaving this for now because seda has it and I'm giving it a chance For more * information of this kind of stuff google SEDA -Staged Event Driven Architecure */ public interface EventContext { // }
[ "mgovinda@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
mgovinda@7fc7bbf3-cf45-46d4-be06-341739edd864
14a9bb37a724533bbd6936721211fe28fd3d27b4
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/quarkus/src/main/java/com/surya/quarkus/LibraryResource.java
21e55dab8a1bb5d2dc0c60b30a11dde9bf85f2b9
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
545
java
package com.surya.quarkus; import com.surya.quarkus.model.Book; import com.surya.quarkus.service.LibraryService; import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import java.util.Set; @Path("/library") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class LibraryResource { @Inject LibraryService libraryService; @GET @Path("/book") public Set<Book> findBooks(@QueryParam("query") String query) { return libraryService.find(query); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
f7e015687af3b5affd69fca5135e7aa88847590d
867db89fc608f7c499089a420ec370e1896a248b
/Reply.java
76737775ac54ca8fd996a8f7e0f0201315da4bbd
[]
no_license
fzuknow/Iknow-beta
85bbeff0da26e3319c33f10fcd724f10b80018ae
c22dd6b58f3d6011461870a3ec6aa83663c040c7
refs/heads/master
2021-08-31T20:51:10.076502
2017-12-22T21:33:07
2017-12-22T21:33:31
114,471,157
0
0
null
null
null
null
UTF-8
Java
false
false
4,967
java
package com.example.chen.fzu; import android.app.ActionBar; import android.content.Context; import android.net.Uri; 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.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; public class Reply extends Fragment { private ListView msgListView; private EditText inputText; private Button send; private MsgAdapter adapter; private List<Msg> msgList = new ArrayList<Msg>(); // private View mView; @Nullable public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //注意View对象的重复使用,以便节省资源 // if (mView == null) { // mView = inflater.inflate(R.layout.fragment_reply,container, false); View view = inflater.inflate(R.layout.fragment_reply, null); // ActionBar actionBar = getSupportActionBar(); // actionBar.hide(); // // setContentView(R.layout.activity_main); initMsgs(); adapter = new MsgAdapter(getActivity(), R.layout.msg_item, msgList); inputText = (EditText) view.findViewById(R.id.input_text); send = (Button) view.findViewById(R.id.send); msgListView = (ListView) view.findViewById(R.id.msg_list_view); msgListView.setAdapter(adapter); send.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String content = inputText.getText().toString(); if (!"".equals(content)) { Msg msg = new Msg(content, Msg.TYPE_SEND); msgList.add(msg); adapter.notifyDataSetChanged(); msgListView.setSelection(msgList.size()); inputText.setText(""); } } }); return view; } private void initMsgs() { Msg msg1 = new Msg("Hello, how are you?", Msg.TYPE_RECEIVED); msgList.add(msg1); Msg msg2 = new Msg("Fine, thank you, and you?", Msg.TYPE_SEND); msgList.add(msg2); Msg msg3 = new Msg("I am fine, too!", Msg.TYPE_RECEIVED); msgList.add(msg3); } public class Msg { public static final int TYPE_RECEIVED = 0; public static final int TYPE_SEND = 1; private String content; private int type; public Msg(String content, int type) { this.content = content; this.type = type; } public String getContent() { return content; } public int getType() { return type; } } public class MsgAdapter extends ArrayAdapter<Msg> { private int resourceId; public MsgAdapter(Context context, int textViewResourceId, List<Msg> objects) { super(context, textViewResourceId, objects); resourceId = textViewResourceId; } public View getView(int position, View convertView, ViewGroup parent) { Msg msg = getItem(position); View view; ViewHolder viewHolder; if (convertView == null) { view = LayoutInflater.from(getContext()).inflate(resourceId, null); viewHolder = new ViewHolder(); viewHolder.leftLayout = (LinearLayout) view.findViewById(R.id.left_layout); viewHolder.rightLayout = (LinearLayout) view.findViewById(R.id.right_layout); viewHolder.leftMsg = (TextView) view.findViewById(R.id.left_msg); viewHolder.rightMsg = (TextView) view.findViewById(R.id.right_msg); view.setTag(viewHolder); } else { view = convertView; viewHolder = (ViewHolder) view.getTag(); } if (msg.getType() == Msg.TYPE_RECEIVED) { viewHolder.leftLayout.setVisibility(View.VISIBLE); viewHolder.rightLayout.setVisibility(View.GONE); viewHolder.leftMsg.setText(msg.getContent()); } else if (msg.getType() == Msg.TYPE_SEND) { viewHolder.rightLayout.setVisibility(View.VISIBLE); viewHolder.leftLayout.setVisibility(View.GONE); viewHolder.rightMsg.setText(msg.getContent()); } return view; } class ViewHolder { LinearLayout leftLayout; LinearLayout rightLayout; TextView leftMsg; TextView rightMsg; } } }
[ "408715746@qq.com" ]
408715746@qq.com
68653559f4b8fd95fab36e80b779b912f139b35e
0e669ddd11a814af1813d71c757f69443f5f75bc
/src/priv/scj/InteractiveSystem/websocket/Message.java
8f38b4b381b866b0123a97488fcc42fe5f1ba217
[]
no_license
1121719821/InteractiveSystem
57c306114b1987d8ce295d190f593a9e80c85fd2
31ab41b3653eda6d19efe8dca056ae493e6fcf18
refs/heads/master
2020-03-21T07:08:28.096647
2018-08-24T02:12:48
2018-08-24T02:12:48
138,262,802
1
0
null
null
null
null
UTF-8
Java
false
false
2,375
java
package priv.scj.InteractiveSystem.websocket; import java.util.Date; import com.google.gson.Gson; public class Message { // 上下线提醒 private String welcome; // 发送的消息 private String content; // 下线用户 private String leave; // 群聊所有成员列表 private String[] groupChatUserList; // 当前群聊的群名称 private String groupChatName; // 当用户收到聊天消息,聊天框的标题发生改变,变为与某用户正在聊天中 private String changeTitle; // 用户收到私聊的时候,在发送消息的时候直接发送给to private String to; // 前端的onload事件中,需要将消息的发送者取出来 private String messageFrom; // 前端的onload事件中,需要将消息的类型取出来,判断如何存储聊天记录 private Integer chatType; public String getContent() { return content; } public void setContent(String content) { this.content = content; } public void setContent(String name, String msg) { this.content = "<b>" + name + "</b> <small>" + new Date().toLocaleString() + "</small>:<br/> " + msg + "<br/>"; } public Message() { super(); } public String getWelcome() { return welcome; } public void setWelcome(String welcome) { this.welcome = welcome; } public String getLeave() { return leave; } public void setLeave(String leave) { this.leave = leave; } public String[] getGroupChatUserList() { return groupChatUserList; } public void setGroupChatUserList(String groupChatUserlist[]) { this.groupChatUserList = groupChatUserlist; } public String getGroupChatName() { return groupChatName; } public void setGroupChatName(String groupChatName) { this.groupChatName = groupChatName; } public String getChangeTitle() { return changeTitle; } public void setChangeTitle(String changeTitle) { this.changeTitle = changeTitle; } public String getTo() { return to; } public void setTo(String to) { this.to = to; } public String getMessageFrom() { return messageFrom; } public void setMessageFrom(String messageFrom) { this.messageFrom = messageFrom; } public Integer getChatType() { return chatType; } public void setChatType(Integer chatType) { this.chatType = chatType; } private static Gson gson = new Gson(); public String toJson() { return gson.toJson(this); } }
[ "1121719821@qq.com" ]
1121719821@qq.com
09030927542df8dc9a5809a028bad65740727cd8
28dc94be4ec882f53c9f502ae09f06a64842c048
/app/src/main/java/com/example/annisa/minimalist/Splashscreen.java
e6fa5cc7829d8f09fe133089314b38ba86731d3f
[]
no_license
annisagita/Milenials-Vit-master
1da5f64eead8ea900adecf6500923772bad251ea
e476e2ae1b9ff8b27883d196ab9964e023292ca3
refs/heads/master
2022-02-27T22:51:19.644381
2019-10-29T15:10:30
2019-10-29T15:10:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.example.annisa.minimalist; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import java.util.Timer; import java.util.TimerTask; public class Splashscreen extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splashscreen); new Timer().schedule(new TimerTask(){ @Override public void run(){ startActivity(new Intent(getApplicationContext(),Login.class)); } }, 3000); } }
[ "annisagita10@gmail.com" ]
annisagita10@gmail.com
041d5c5c15ebac363ffb384ad1b471ea468cd5ea
ca93c98eb71ff9af14d8b166131670a1f76e0179
/jk2020/src/edu/wlxy/ch10/FileAttributeTest.java
7a663c538da537ebad3f2bcd5a27e96a0ff65bb7
[]
no_license
llq557/repo3
097ccd806e333129775d16a5242c3a655d124d83
fa7814f6c8db8a094951df6604e35ee1d96b0d16
refs/heads/master
2022-10-13T10:32:11.072688
2020-06-11T13:56:31
2020-06-11T13:56:31
271,492,448
0
0
null
null
null
null
GB18030
Java
false
false
590
java
package edu.wlxy.ch10; import java.io.File; public class FileAttributeTest { public static void main(String[] args) { File file=new File("2020.jpeg"); System.out.println("文件或目录是否存在:"+file.exists()); System.out.println("是文件吗?"+file.isFile()); System.out.println("是目录吗?"+file.isDirectory()); System.out.println("文件名:"+file.getName()); System.out.println("文件路径:"+file.getPath()); System.out.println("文件绝对路径:"+file.getAbsolutePath()); System.out.println("文件大小(字节):"+file.length()); } }
[ "1622230871@qq.com" ]
1622230871@qq.com
0760a47f7cf6d9e821e9a9e9a6a4daddacc2a518
c1463b38566ad0bf2120ef672765ab32c96b3765
/src/me/timlampen/currency/RankDis.java
43f5132900f5109e79e8f4698a7ffacbd98d5b56
[]
no_license
dcplugins/DNCMain
017e61817ff357c0f3070203161f37753c97a2b3
23bc8766369561d057f12982ecd2e2bf95a19322
refs/heads/master
2021-01-13T01:44:44.636473
2015-02-17T05:40:11
2015-02-17T05:40:11
30,904,268
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package me.timlampen.currency; import java.util.HashMap; import java.util.Set; import java.util.UUID; import org.bukkit.ChatColor; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import me.timlampen.commands.Rankup; import me.timlampen.util.Main; public class RankDis{ Main p; Rankup r; public RankDis(Main p, Rankup r){ this.p = p; this.r = r; } public void doRank(Player player){ Set<String> set = p.getConfig().getConfigurationSection("rankup").getKeys(false); int i = 0; for(String s : set){ i++; if(p.perms.getPrimaryGroup(player).equals(s)){ player.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + ">>>YOU ARE HERE<<<"); } else{ player.sendMessage(ChatColor.YELLOW + "" + ChatColor.BOLD + + i + ChatColor.RED + " " + s + ChatColor.GREEN + " Cost: " + ChatColor.DARK_GRAY + r.getNextRankCost(s, player)); } } } }
[ "timothylampen7@gmail.com" ]
timothylampen7@gmail.com
341fe569c144d90c1eefcc5d74fd05b1c3c09ff5
5280da21908a69d263f36d3257593783149fa149
/JavaRushTasks/3.JavaMultithreading/src/com/javarush/task/task22/task2203/Solution.java
55b69bdb03c8a39bf2efbd69977aa36b96682eab
[]
no_license
alexmyrko/JavaRush
9851704a5cadd125b4ae772fe8acb772cd4a077f
6eb7f05610faf40427fe87b5c35fcfc987128223
refs/heads/master
2023-01-31T23:48:03.939652
2020-12-11T14:10:12
2020-12-11T14:10:12
285,014,728
0
0
null
null
null
null
UTF-8
Java
false
false
905
java
package com.javarush.task.task22.task2203; /* Между табуляциями */ public class Solution { public static String getPartOfString(String string) throws TooShortStringException { if (string == null) throw new TooShortStringException(); String[] strings = string.split("\t"); char[] chars = string.toCharArray(); int count = 0; for (int i = 0; i < chars.length; i++) { if (chars[i] == '\t') count++; } if (count < 2 || strings.length < 3) throw new TooShortStringException(); return strings[1]; } public static class TooShortStringException extends Exception { } public static void main(String[] args) throws TooShortStringException { System.out.println(getPartOfString("\tJavaRush - лучший сервис обучения Java.")); } }
[ "alex.myrko@gmail.com" ]
alex.myrko@gmail.com
bc5af3899b1bcf2a71238da2599d14499e494d61
d5a3f7d54a5489b53138af4a9743b87bea621f6c
/freemarker/src/main/java/com/example/freemarker/FreemarkerApplication.java
aab19e018ecc092bcc73a9a07c8ead1c35d63587
[]
no_license
HungryGoogle/springbootstudy2019
be626649f5059dfa51ed01eba4e5fb012e986080
46a64cab102289dc1f5aed830c35543b0c88d6c0
refs/heads/master
2020-04-14T23:35:06.602974
2019-01-20T12:55:00
2019-01-20T12:55:00
164,207,797
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.example.freemarker; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class FreemarkerApplication { public static void main(String[] args) { SpringApplication.run(FreemarkerApplication.class, args); } }
[ "liwenqing2008@126.com" ]
liwenqing2008@126.com
aa65fa700c74723ef94384f6363e32d73729c954
02071ade5cbb1e1df5ad6e25443de10dc3cbf0e5
/Coongli/src/main/java/com/coongli/repository/AdminisRepository.java
1432dd1f64b228a6fa36edea0d21ab245e19d285
[]
no_license
PedroGalvan/CoongliRepo
15d3da3291bc7483eca98f482f28ab7c526ebed3
29bea636e26bc862b98e282b4885ec9524a86c75
refs/heads/master
2021-01-10T16:03:19.125883
2016-01-26T19:51:26
2016-01-26T19:51:26
50,442,625
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.coongli.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import com.coongli.domain.Adminis; @Repository public interface AdminisRepository extends JpaRepository<Adminis, Integer>{ @Query("select a from Adminis a where a.userAccount.id=?1") Adminis findOneByPrincipal(int id); }
[ "pedrogalvanalbariza@gmail.com" ]
pedrogalvanalbariza@gmail.com
ec9c831703a7dbf505d850ac85553be00e5942b5
0bea8eeef1c3b5f704f480c5ffcc5dd15d1aef6b
/app/src/main/java/com/example/saksham/inventory/ItemAdapter.java
e6441bf0f4f990c96c87442822b4171c53234a8e
[]
no_license
Sakshamgupta20/Inventory-App
86c96ccdafc4d0225d774b5973524a5da0d97b5a
755b3993a11006c0050364d3ed641267184a26b3
refs/heads/master
2020-03-07T04:05:10.276061
2018-03-29T07:53:20
2018-03-29T07:53:20
127,255,766
0
0
null
null
null
null
UTF-8
Java
false
false
2,648
java
package com.example.saksham.inventory; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.CursorAdapter; import android.widget.TextView; import android.widget.Toast; import com.example.saksham.inventory.data.ItemContract; import com.example.saksham.inventory.data.ItemdbHelper; /** * Created by Saksham on 14-01-2018. */ public class ItemAdapter extends CursorAdapter { ItemAdapter(Context context, Cursor c) { super(context,c,0); } @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { return LayoutInflater.from(context).inflate(R.layout.list_item,parent,false); } @Override public void bindView(View view, final Context context, Cursor cursor) { String namestring=cursor.getString(cursor.getColumnIndex(ItemContract.ItemEntry.COLUMN_ITEM_PRODUCT_NAME)); String pricestring=cursor.getString(cursor.getColumnIndex(ItemContract.ItemEntry.COLUMN_ITEM_PRICE)); pricestring=pricestring + " $"; final String quantitystring=cursor.getString(cursor.getColumnIndex(ItemContract.ItemEntry.COLUMN_ITEM_QUANTITY)); TextView name=(TextView)view.findViewById(R.id.name1); TextView price=(TextView)view.findViewById(R.id.price1); TextView quantity=(TextView)view.findViewById(R.id.quantity1); Button saleButton=(Button)view.findViewById(R.id.sale); int currentId = cursor.getInt(cursor.getColumnIndex(ItemContract.ItemEntry.COLUMN_ID)); // Make the content uri for the current Id final Uri contentUri = Uri.withAppendedPath(ItemContract.ItemEntry.ContentUri, Integer.toString(currentId)); saleButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { int quantityint = Integer.valueOf(quantitystring); if (quantityint > 0) { quantityint = quantityint - 1; } ContentValues values = new ContentValues(); values.put(ItemContract.ItemEntry.COLUMN_ITEM_QUANTITY, quantityint); // update the database context.getContentResolver().update(contentUri, values, null, null); } }); name.setText(namestring); quantity.setText(quantitystring); price.setText(pricestring); } }
[ "sg20saksham@gmail.com" ]
sg20saksham@gmail.com
f7aaad943dbf895feb4c78f233f0c9caafa59699
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/23/org/apache/commons/lang3/builder/ToStringBuilder_append_910.java
75f0a199883e4ec44fcea46dd67602aaf6ce25f8
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,579
java
org apach common lang3 builder assist implement link object string tostr method enabl good consist code string tostr code built object aim simplifi process allow field name handl type consist handl null consist output arrai multi dimension arrai enabl detail level control object collect handl hierarchi write code pre person string ag smoker string string tostr string builder tostringbuild append append ag ag append smoker smoker string tostr pre produc string tostr format code person 7f54 stephen ag smoker code add superclass code string tostr code link append super appendsup append code string tostr code object deleg object link append string appendtostr altern method reflect determin field test field method code reflect string reflectiontostr code code access object accessibleobject set access setaccess code chang visibl field fail secur manag permiss set correctli slower test explicitli typic invoc method pre string string tostr string builder tostringbuild reflect string reflectiontostr pre builder debug 3rd parti object pre system println object string builder tostringbuild reflect string reflectiontostr object anobject pre exact format code string tostr code determin link string style tostringstyl pass constructor author apach softwar foundat author gari gregori author pete gieser version string builder tostringbuild builder string append code string tostr code code code param field fieldnam field param add code string tostr code string builder tostringbuild append string field fieldnam style append buffer field fieldnam
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
204de0c17e35e010d06f8c2415dcae082e734197
5a53ba2c332ef3ae2bcb3e3f4edf93e6bcac9d4d
/src/test/java/com/juanmagarcia/pillalas/repository/timezone/DateTimeWrapper.java
0104d7e6b509313be97f0afa5da156554ecba72e
[]
no_license
BulkSecurityGeneratorProject/pillalas
811db23e4b55edd3c036ae0bf957144f7005823c
85ec6762d34cd39b23afdfd0c066095fde1dfd91
refs/heads/master
2022-12-16T14:34:10.886551
2020-01-08T11:54:50
2020-01-08T11:54:50
296,571,279
0
0
null
2020-09-18T09:08:56
2020-09-18T09:08:55
null
UTF-8
Java
false
false
3,083
java
package com.juanmagarcia.pillalas.repository.timezone; import javax.persistence.*; import java.io.Serializable; import java.time.*; import java.util.Objects; @Entity @Table(name = "jhi_date_time_wrapper") public class DateTimeWrapper implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "instant") private Instant instant; @Column(name = "local_date_time") private LocalDateTime localDateTime; @Column(name = "offset_date_time") private OffsetDateTime offsetDateTime; @Column(name = "zoned_date_time") private ZonedDateTime zonedDateTime; @Column(name = "local_time") private LocalTime localTime; @Column(name = "offset_time") private OffsetTime offsetTime; @Column(name = "local_date") private LocalDate localDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Instant getInstant() { return instant; } public void setInstant(Instant instant) { this.instant = instant; } public LocalDateTime getLocalDateTime() { return localDateTime; } public void setLocalDateTime(LocalDateTime localDateTime) { this.localDateTime = localDateTime; } public OffsetDateTime getOffsetDateTime() { return offsetDateTime; } public void setOffsetDateTime(OffsetDateTime offsetDateTime) { this.offsetDateTime = offsetDateTime; } public ZonedDateTime getZonedDateTime() { return zonedDateTime; } public void setZonedDateTime(ZonedDateTime zonedDateTime) { this.zonedDateTime = zonedDateTime; } public LocalTime getLocalTime() { return localTime; } public void setLocalTime(LocalTime localTime) { this.localTime = localTime; } public OffsetTime getOffsetTime() { return offsetTime; } public void setOffsetTime(OffsetTime offsetTime) { this.offsetTime = offsetTime; } public LocalDate getLocalDate() { return localDate; } public void setLocalDate(LocalDate localDate) { this.localDate = localDate; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) o; return !(dateTimeWrapper.getId() == null || getId() == null) && Objects.equals(getId(), dateTimeWrapper.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "TimeZoneTest{" + "id=" + id + ", instant=" + instant + ", localDateTime=" + localDateTime + ", offsetDateTime=" + offsetDateTime + ", zonedDateTime=" + zonedDateTime + '}'; } }
[ "juanmagarciasp@gmail.com" ]
juanmagarciasp@gmail.com
1ee11e5dcf1b8e095a3060467686b4b4d4639c41
c63ad4adc5631dd3a8aa3c8be8a91e1671cbad48
/app/src/main/java/cn/xyy/tltms/app/update/ApkUpdateUtils.java
18252415a9a533df96912404191f7ea58854417f
[]
no_license
miamiby557/tltms
f5e2d8a657ee133bf7f9a04d3fe58fa8c16c3d76
b2184834ca6d07309e6f56bb27f5a8553c7fc955
refs/heads/master
2021-01-19T20:02:50.442522
2017-04-17T06:10:33
2017-04-17T06:10:33
88,477,095
0
0
null
null
null
null
UTF-8
Java
false
false
4,117
java
package cn.xyy.tltms.app.update; import android.app.DownloadManager; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.net.Uri; import android.util.Log; import android.widget.Toast; /** * Created by chiclaim on 2016/05/18 */ public class ApkUpdateUtils { public static final String TAG = ApkUpdateUtils.class.getSimpleName(); private static final String KEY_DOWNLOAD_ID = "downloadId"; public static void download(Context context, String url, String title) { long downloadId = SpUtils.getInstance(context).getLong(KEY_DOWNLOAD_ID, -1L); Log.e(TAG, "apk is already downloading:"+downloadId); if (downloadId != -1L) { FileDownloadManager fdm = FileDownloadManager.getInstance(context); int status = fdm.getDownloadStatus(downloadId); if (status == DownloadManager.STATUS_SUCCESSFUL) { //启动更新界面 Uri uri = fdm.getDownloadUri(downloadId); if (uri != null) { if (compare(getApkInfo(context, uri.getPath()), context)) { startInstall(context, uri); return; } else { fdm.getDm().remove(downloadId); } } start(context, url, title); } else if (status == DownloadManager.STATUS_FAILED) { start(context, url, title); } else { Log.d(TAG, "apk is already downloading"); } } else { start(context, url, title); } } private static void start(Context context, String url, String title) { Toast.makeText(context,"正在下载...",Toast.LENGTH_SHORT).show(); long id = FileDownloadManager.getInstance(context).startDownload(url, title, "下载完成后点击打开"); SpUtils.getInstance(context).putLong(KEY_DOWNLOAD_ID, id); Log.d(TAG, "apk start download " + id); } public static void startInstall(Context context, Uri uri) { Intent install = new Intent(Intent.ACTION_VIEW); install.setDataAndType(uri, "application/vnd.android.package-archive"); install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(install); } /** * 获取apk程序信息[packageName,versionName...] * * @param context Context * @param path apk path */ private static PackageInfo getApkInfo(Context context, String path) { PackageManager pm = context.getPackageManager(); PackageInfo info = pm.getPackageArchiveInfo(path, PackageManager.GET_ACTIVITIES); if (info != null) { //String packageName = info.packageName; //String version = info.versionName; //Log.d(TAG, "packageName:" + packageName + ";version:" + version); //String appName = pm.getApplicationLabel(appInfo).toString(); //Drawable icon = pm.getApplicationIcon(appInfo);//得到图标信息 return info; } return null; } /** * 下载的apk和当前程序版本比较 * * @param apkInfo apk file's packageInfo * @param context Context * @return 如果当前应用版本小于apk的版本则返回true */ private static boolean compare(PackageInfo apkInfo, Context context) { if (apkInfo == null) { return false; } String localPackage = context.getPackageName(); if (apkInfo.packageName.equals(localPackage)) { try { PackageInfo packageInfo = context.getPackageManager().getPackageInfo(localPackage, 0); if (apkInfo.versionCode > packageInfo.versionCode) { return true; } } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } } return false; } }
[ "849058520@qq.com" ]
849058520@qq.com
ca2cfae18f711c2b9ac872b924e5b59f4a5c575c
c9cba33410c7c79c54ae1d5f1da21b2358ccd220
/app/src/main/java/com/example/fingerprintdemo/FingerprintHandler.java
58b829353d9f62980d4a9fa35b3c8759d5e0bb00
[]
no_license
CodeReveal/Finger_Authentication_Android
1341286e0425a6af082e7832e8d4bd27b443e1c8
821ce2b519e019b5de4af4fdca481f20939b2ad4
refs/heads/master
2022-11-15T20:35:45.089412
2020-06-08T23:48:05
2020-06-08T23:48:05
270,857,186
0
0
null
null
null
null
UTF-8
Java
false
false
2,814
java
package com.example.fingerprintdemo; import android.Manifest; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.hardware.fingerprint.FingerprintManager; import android.os.CancellationSignal; import android.os.Handler; import android.widget.ImageView; import android.widget.TextView; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; /** * Created by whit3hawks on 11/16/16. */ public class FingerprintHandler extends FingerprintManager.AuthenticationCallback { private Context context; // Constructor public FingerprintHandler(Context mContext) { context = mContext; } public void startAuth(FingerprintManager manager, FingerprintManager.CryptoObject cryptoObject) { CancellationSignal cancellationSignal = new CancellationSignal(); if (ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) { return; } manager.authenticate(cryptoObject, cancellationSignal, 0, this, null); } @Override public void onAuthenticationError(int errMsgId, CharSequence errString) { this.update("Fingerprint Authentication error\n" + errString); } @Override public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) { this.update("Fingerprint Authentication help\n" + helpString); } @Override public void onAuthenticationFailed() { this.update("Fingerprint Authentication failed."); } @Override public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) { updateSuccess("Successfully login"); new Handler().postDelayed(new Runnable() { @Override public void run() { ((Activity) context).finish(); Intent intent = new Intent(context, MainActivity.class); context.startActivity(intent); } }, 2000); } private void updateSuccess(String e){ TextView textView = (TextView) ((Activity)context).findViewById(R.id.errorText); textView.setText(e); textView.setTextColor(ContextCompat.getColor(context, R.color.successText)); ImageView icon = (ImageView) ((Activity)context).findViewById(R.id.icon); icon.setColorFilter(ContextCompat.getColor(context, R.color.successText)); } private void update(String e){ TextView textView = (TextView) ((Activity)context).findViewById(R.id.errorText); textView.setText(e); ImageView icon = (ImageView) ((Activity)context).findViewById(R.id.icon); icon.setColorFilter(ContextCompat.getColor(context, R.color.errorText)); } }
[ "ratanakpek088@gmail.com" ]
ratanakpek088@gmail.com
e697073b3d36ce4feb76adb171f42e8af6fe82ea
f75c27ca49e38b8c1c89d029123af8765e169b77
/executors/YARN/src/main/java/ru/yandex/cern/yarntest/MyContainer.java
925f1b44d2646467571a96aad3fcb1fea2970d28
[]
no_license
anaderi/skygrid
a51b5302007e18109dc2732cd569727667514088
954c9de276065672910911ae2911807b6ed557c2
refs/heads/master
2020-12-24T16:23:51.999797
2016-03-10T17:55:49
2016-03-10T17:55:49
21,585,338
0
1
null
2015-12-21T20:27:04
2014-07-07T20:21:42
JavaScript
UTF-8
Java
false
false
2,852
java
package ru.yandex.cern.yarntest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import com.sun.tools.javac.util.Convert; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.net.NetUtils; import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MyContainer { private static final Logger LOG = LoggerFactory.getLogger(MyContainer.class); private String hostname; private YarnConfiguration conf; private FileSystem fs; private Path inputFile; private long start; private int stop; public MyContainer(String[] args) throws IOException { hostname = NetUtils.getHostname(); conf = new YarnConfiguration(); fs = FileSystem.get(conf); inputFile = new Path(args[0]); start = Long.parseLong(args[1]); stop = Integer.parseInt(args[2]); } public static void main(String[] args) { LOG.info("Container just started on {}", NetUtils.getHostname()); try { MyContainer container = new MyContainer(args); container.run(); } catch (IOException e) { e.printStackTrace(); } LOG.info("Container is ending..."); } private void run() throws IOException { LOG.info("Running Container on {}", this.hostname); /* FSDataInputStream fsdis = fs.open(inputFile); fsdis.seek(this.start); BufferedReader reader = new BufferedReader(new InputStreamReader(fsdis)); LOG.info("Reading from {} to {} from {}", start, start + length, inputFile.toString()); String current = ""; long bytesRead = 0; while (bytesRead < this.length && (current = reader.readLine()) != null) { bytesRead += current.getBytes().length; if (current.contains("CLINTON")) { LOG.info("Found CLINTON: {}", current); } } */ FSDataOutputStream output = fs.create( new Path("hdfs://master.local:9000/user/stromsund/CernYarnApp/results/Res" + start + "-" + stop)); for (long current = start; current < stop; ++current) { if (isPrime(current)) { String report = "Found prime: " + current + "\n"; LOG.info("Found prime: {}", current); output.write(report.getBytes()); } } output.close(); } private boolean isPrime(long num) { for (long del = 2; del < num; ++del) { if (num % del == 0) return false; } return true; } }
[ "stromsund@yandex-team.ru" ]
stromsund@yandex-team.ru
89ceea20da3eab406cfe8315001626e725a13d87
24ab66c5a694deed27c2ffe849accc87b0b47c4d
/DeskTreavel/src/main/java/com/duoc/desktravel/model/Destino.java
2e6fc0c2ca084e567060e2926533b7073a6fe0f8
[]
no_license
jfes-cx/DeskTravel
0deddeae03e876dc910e6daa5d768c98ed377d58
3ace2c04c1b51e0e0903b32b72987b2058672fbc
refs/heads/master
2021-07-17T03:36:43.833524
2017-10-23T20:31:21
2017-10-23T20:31:21
106,632,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,497
java
package com.duoc.desktravel.model; // Generated 15-10-2017 19:02:40 by Hibernate Tools 4.3.1 import java.math.BigDecimal; import java.util.HashSet; import java.util.Set; /** * Destino generated by hbm2java */ public class Destino implements java.io.Serializable { private BigDecimal iddestino; private Pais pais; private String nombredestino; private Set itinerarios = new HashSet(0); public Destino() { } public Destino(BigDecimal iddestino, Pais pais) { this.iddestino = iddestino; this.pais = pais; } public Destino(BigDecimal iddestino, Pais pais, String nombredestino, Set itinerarios) { this.iddestino = iddestino; this.pais = pais; this.nombredestino = nombredestino; this.itinerarios = itinerarios; } public BigDecimal getIddestino() { return this.iddestino; } public void setIddestino(BigDecimal iddestino) { this.iddestino = iddestino; } public Pais getPais() { return this.pais; } public void setPais(Pais pais) { this.pais = pais; } public String getNombredestino() { return this.nombredestino; } public void setNombredestino(String nombredestino) { this.nombredestino = nombredestino; } public Set getItinerarios() { return this.itinerarios; } public void setItinerarios(Set itinerarios) { this.itinerarios = itinerarios; } }
[ "JFES.CX@GMAIL.COM" ]
JFES.CX@GMAIL.COM
dd419012343f095fa58987d6f187d4b8e823888f
ba3ec007b94c4d594a4da7913b1c2c416daca28d
/main/java/moze_intel/projecte/rendering/CondenserItemRenderer.java
87e783ec8d4b1c1a11e66d2a54d3601e1f97615e
[]
no_license
SJ1133/ProjectE
8aed18b65a638957804b5e7dfba5667dc5222b37
387a9d0a43d2afdff3360d9f7d2e56536ad1b3e1
refs/heads/master
2020-12-11T07:46:59.430135
2014-10-28T16:24:48
2014-10-28T16:24:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,934
java
package moze_intel.projecte.rendering; import moze_intel.projecte.MozeCore; import net.minecraft.client.model.ModelChest; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class CondenserItemRenderer implements IItemRenderer { private final ResourceLocation texture = new ResourceLocation(MozeCore.MODID.toLowerCase(), "textures/blocks/condenser.png"); private final ModelChest model = new ModelChest(); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case ENTITY: renderCondenser(0.5F, 0.5F, 0.5F, 0); break; case EQUIPPED: renderCondenser(1.0F, 1.0F, 1.0F, 0); break; case EQUIPPED_FIRST_PERSON: renderCondenser(1.0F, 1.0F, 1.0F, 0); break; case INVENTORY: renderCondenser(0.0F, 0.075F, 0.0F, 0); break; default: break; } } private void renderCondenser(float x, float y, float z, int metaData) { FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture); GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); GL11.glRotatef(180, 1, 0, 0); GL11.glRotatef(-90, 0, 1, 0); model.renderAll(); GL11.glPopMatrix(); } }
[ "william.valla@yahoo.it" ]
william.valla@yahoo.it
064ddbb4937ec6c40b843be07b52bc34308b1655
726b1bfeefad9784e3d4db2e29c1cdaef20c99c5
/app/src/main/java/silin/theMovieDB_2_0/models/MovieReviewList.java
156ebce7f658cc39838a14e67d30b464d1ea5470
[]
no_license
wherego/theMovieDB_2_0
91801d1f0a9ea449447149abcd893df96154f000
8b05accedda86853f01475323af01429196e49ed
refs/heads/master
2021-01-20T15:13:09.119028
2016-08-15T23:08:49
2016-08-15T23:08:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
package silin.theMovieDB_2_0.models; import android.os.Parcelable; import com.google.auto.value.AutoValue; import com.squareup.moshi.JsonAdapter; import com.squareup.moshi.Moshi; import java.util.List; /** * Created on 12/25/15: theMovieDB_2_0 by @n1207n */ @AutoValue public abstract class MovieReviewList implements Parcelable { public abstract int id(); public abstract int page(); public abstract int total_pages(); public abstract int total_results(); public abstract List<MovieReview> results(); public static MovieReviewList create(int id, int page, int total_pages, int total_results, List<MovieReview> results) { return new AutoValue_MovieReviewList(id, page, total_pages, total_results, results); } // Moshi adapter public static JsonAdapter<MovieReviewList> jsonAdapter(Moshi moshi) { return new AutoValue_MovieReviewList.MoshiJsonAdapter(moshi); } }
[ "n1207n@gmail.com" ]
n1207n@gmail.com
d5d2fed25fcc25fade771d76a65534093747c0ec
4c9204c459a9d7d121a04bbf48c4c3f29b156d83
/LTM_guiHai/LTM_guiHai/LTM/UDP/ChuoiInHoa.java
8b5c07f8896aca611cbcefb3fe1128e6081ae25d
[]
no_license
hai-hash/Laptringmang
5a469cf5b1ee46d0a5b4dcab59fc5bd1eac477d9
af7cc5101c6f1825e8f2aa216ba73268e2683357
refs/heads/main
2023-07-09T17:03:02.349182
2021-08-16T02:47:14
2021-08-16T02:47:14
396,584,531
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
/* * 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 chuoiInHoa; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; /** * * @author User */ public class Client { public static void main(String[] args) throws SocketException, UnknownHostException, IOException { int port = 1111; DatagramSocket client = new DatagramSocket(); String msv = ";B17DCCNxxx;911"; byte[] guiMSV = msv.getBytes(); DatagramPacket gui,nhan,ketqua; gui = new DatagramPacket(guiMSV, guiMSV.length, InetAddress.getByName("localhost"), port); client.send(gui); byte[] nhanChuoi = new byte[1024]; nhan = new DatagramPacket(nhanChuoi, nhanChuoi.length); client.receive(nhan); String chuoiXL = new String(nhan.getData()).trim(); System.out.println(chuoiXL); String chuoiKQ = chuoiInHoa(chuoiXL); System.out.println(chuoiKQ); byte[] KQ = chuoiKQ.getBytes(); ketqua = new DatagramPacket(KQ, KQ.length, InetAddress.getByName("localhost"), port); client.send(ketqua); client.close(); // client.close(); } public static String chuoiInHoa(String s){ String[] arr = s.split(";"); String req = arr[0].trim(); String[] chuoiXL = arr[1].trim().split("\\s+"); String KQ = req + ";"; for (int i = 0; i < chuoiXL.length; i++) { String temp = chuoiXL[i].substring(0, 1).toUpperCase() + chuoiXL[i].substring(1).toLowerCase(); KQ += temp + " "; } return KQ.trim(); } }
[ "65753082+hai-hash@users.noreply.github.com" ]
65753082+hai-hash@users.noreply.github.com
67016d124e3c508e59a97cb9628f725af9ed1dc5
3f484d8581f096586f8059f87717aa853fe2761c
/plugins/kettle-shapefilereader-plugin/src/org/pentaho/gis/shapefiles/ShapeNull.java
772446fb2d3688f52b22ba291b27abbc07850723
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
stevens515/pentaho-kettle
52361a68878366882979ed3530b1a64a7b35a2fe
6e9daf417e020e358e38bb1213b1ce2c0b4378df
refs/heads/master
2020-04-05T23:12:59.798940
2016-06-22T20:15:48
2016-06-22T20:15:48
61,805,841
4
0
null
null
null
null
UTF-8
Java
false
false
1,568
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2015 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.pentaho.gis.shapefiles; /* * Created on 13-mei-04 * * @author Matt * */ public class ShapeNull extends Shape implements ShapeInterface { public ShapeNull(byte[] content) { super(Shape.SHAPE_TYPE_NULL); } public ShapeNull() { super(Shape.SHAPE_TYPE_NULL); } // X & Y can be "slighly" different when working whith doubles. // Therefor, we calculate the distance between the 2 points // If the distance is smaller then 0.0001 we consider them equal! // public boolean equals(ShapeNull p) { return false; } public String toString() { return getTypeDesc(); } }
[ "mdamour1976@gmail.com" ]
mdamour1976@gmail.com
998109ca00763110a4745c691f86cee4e0b314a5
5bb0879f2ab5415bf4867a16fbfa90de75cdf2f7
/springMVC/src/app04/service/ProductService.java
19e8ba3059d9a038c2283c9efbdc0aeba43dea7c
[]
no_license
csluoqi/SpringMVC
42ab54fa849b59995a537dbe070252b944d5f030
ed9d81d2f598aeff1f855c3a167fcadca27cdc0d
refs/heads/master
2021-01-10T13:16:38.021283
2016-01-01T13:39:20
2016-01-01T13:39:20
47,461,004
1
0
null
2016-01-01T13:39:20
2015-12-05T15:27:23
Java
UTF-8
Java
false
false
150
java
package app04.service; import app04.domain.Product; public interface ProductService { Product add(Product product); Product get(long id); }
[ "csluoqi@126.com" ]
csluoqi@126.com
62f98156f7facf816ea037f4b20b446ef795deb6
8c12f8584f9e5f280993ff1efb68d2c707e1be78
/21_06_14_collector/src/com/company/Main.java
adbce51442099801294d0e54e2631798603ecef7
[]
no_license
AR1988/telran_16
206151dea0e620c838d0815e6dfc55d4229a936e
0b2fb83c9df1dc40c322a9086e5b844e7f12e3ff
refs/heads/main
2023-07-27T23:32:57.988780
2021-09-10T09:16:31
2021-09-10T09:16:31
366,712,109
0
0
null
2021-08-02T09:51:47
2021-05-12T12:44:03
Java
UTF-8
Java
false
false
996
java
package com.company; import java.util.*; import java.util.stream.Collectors; public class Main { public static void main(String[] args) { List<Account> accounts = Arrays.asList( new Account(4000, "Vajsa"), new Account(1500, "Petja"), new Account(3000, "Maria") ); List<String> names = accounts.stream() .map(account -> account.getName()) .collect(Collectors.toList()); List<String> linkedListNames = accounts.stream() .map(account -> account.getName()) .collect(Collectors.toCollection(() -> new LinkedList<>())); Set<String> setNames = accounts.stream() .map(account -> account.getName()) .collect(Collectors.toSet()); TreeSet<String> setHashNames = accounts.stream() .map(account -> account.getName()) .collect(Collectors.toCollection(TreeSet::new)); } }
[ "andre.reutow@gmail.com" ]
andre.reutow@gmail.com
844cb9d41cd799be94fb641974a87c3aeecfb43e
187ccbd587dc6b946a4845d3fff353aa6838f6f1
/src/main/java/statemachine/seatheater/SeatHeaterState.java
67319f19b4bcf486241b5227bc8dc4d4327fd37c
[]
no_license
lippaitamas1021/training
dd1b52db60804ffeb1699254869393ffc7fa6e24
1f3f28d0286eff6798368b5c2a68b650046c3be1
refs/heads/master
2023-04-07T13:56:35.191872
2021-04-21T09:04:52
2021-04-21T09:04:52
345,300,131
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package statemachine.seatheater; public enum SeatHeaterState { ONE { public SeatHeaterState next() { return OFF; }}, TWO { public SeatHeaterState next() { return ONE; }}, THREE { public SeatHeaterState next() { return TWO; }}, OFF { public SeatHeaterState next() { return THREE; }}; public abstract SeatHeaterState next(); }
[ "lippaitamas1021@gmail.com" ]
lippaitamas1021@gmail.com
9d84afeeb8165340eee175162d0b9d859172231b
ebfa6fa794e07048344ab514a81da7c769ef7831
/app/Adviser/app/src/main/java/com/smu/appmod/ShowMessageActivity.java
dc9a97b0e8686bafa1d6d83c2a670756f589ace6
[]
no_license
zhiyuan-wan/appmod
8cbb0d070b531e9c336560f21b68921dfcc4b121
449be536e71073798f35195de662d4def3dae998
refs/heads/master
2020-04-05T14:52:24.820342
2018-11-20T02:28:20
2018-11-20T02:28:20
156,944,467
0
1
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.smu.appmod; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.text.Html; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import android.net.Uri; public class ShowMessageActivity extends Activity implements OnClickListener { Button ok_btn; String text; TextView tv; UtilityClass utility; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setTitle("Message"); setContentView(R.layout.dialogactivity1); Intent intent = getIntent(); text = intent.getStringExtra("message"); ok_btn = (Button) findViewById(R.id.ok_btn_id); tv = (TextView) findViewById(R.id.textView1); if (text.contains("Thank you") && text.contains("user survey")) { ok_btn.setText("Go to survey"); } tv.setText(Html.fromHtml(text)); ok_btn.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.ok_btn_id: if (text.contains("Thank you") && text.contains("user survey")) { String url = "https://docs.google.com/forms/d/1AhcKkGAdu1tvPG2iolmweOnusRNYAXMo94bLumcpzog"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); } this.finish(); break; } } }
[ "lingfengbao@smus-Mac.local" ]
lingfengbao@smus-Mac.local
b676a6c1080b2f365a605fb8aed4ed0539e4a49e
a36029d6ec84313e04a92b8b11e8894f5dd6cc79
/chap1/src/main/java/com/springinaction/spelsystem/Email.java
5bfa3e80be1223309127a067f0968b2f2f8f5797
[]
no_license
doomsday/spring_in_action_all
0329fcdab18e6c4f690b274a8317c04b8f3a250b
29a3e4f428902c1427f3d68e1637af906213ced4
refs/heads/master
2021-07-09T09:01:00.490732
2018-01-14T19:25:46
2018-01-14T19:25:46
110,168,658
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package com.springinaction.spelsystem; import org.springframework.stereotype.Component; /** * Created by drpsy on 31-Oct-17 (23:12). */ @Component public class Email { private String email = "hello@world.org"; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
[ "dr.psycho@live.com" ]
dr.psycho@live.com
3954281c7fb0623a223cf3ffc6691e46913507a8
95b7dd795b7292ea02275120689103375756bc00
/src/main/java/dto/AccountDTO.java
aba1b0f16bd4d36d7835c5101c83b4a31f872ec0
[]
no_license
NTDuong2405/Account
4bc249696cb06e9c74d1558bb162c90a623c1144
16f733aa84d42cd2f2b626edd445de8161902832
refs/heads/main
2023-05-30T21:36:54.242673
2021-06-21T14:09:34
2021-06-21T14:09:34
378,952,576
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
package dto; import entity.Account; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import service.ulti.DateTimeUtil; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.validation.constraints.NotBlank; @Getter @Setter @NoArgsConstructor public class AccountDTO { private String userName; private String fullName; private String email; private String passWord; private String role; private String status; private long createdAtMLS; private long updatedAtMLS; public AccountDTO(Account account){ this.userName = account.getUserName(); this.fullName = account.getFullName(); this.email = account.getEmail(); this.status = account.getStatusString(); this.passWord = account.getPassWord(); this.role = account.getRoleString(); } }
[ "ntduonga15568@gmail.com" ]
ntduonga15568@gmail.com
84479b2de66fde66bccef736ea39c18e66e28b86
af502a8d1bd37a8605cc56ecb010d0852bb716f4
/[2018-06-29_2018-07-05]ObjetUml/code/builderApp/src/builderApp/App.java
220e3f16ebd96df408c9355b6d1af43831401129
[]
no_license
ktmasa/javaee_formation
bdd1dbdefbd3440e71f205482cf2a4b42b6c4503
016fa6d6cc1728190fb568e0b46c9cfb919edb7e
refs/heads/master
2020-03-27T20:35:20.739360
2018-08-28T16:28:58
2018-08-28T16:28:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package builderApp; public class App { public static void main(String[] args) { OrdinateurBuilder builder = new OrdinateurBuilder(); Ordinateur o = builder.addHdd("disque 2 To") .setReseau(OrdinateurBuilder.RESEAU_100MBIT) .addHdd("disque ssd 500Go") .setSouris(false) .addRAM(8096) //.addRAM(153135435) .build(); System.out.println(o); } }
[ "vincent.courtalon@gmail.com" ]
vincent.courtalon@gmail.com
e8a78aa079ef5cffe9ed6778c618f3eb41c421ef
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-play-framework/generated/app/apimodels/ComAdobeFormsCommonServletTempCleanUpTaskProperties.java
cc129c20961713f939bd31a0be3c99154571ee88
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
4,459
java
package apimodels; import apimodels.ConfigNodePropertyString; import com.fasterxml.jackson.annotation.*; import java.util.Set; import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; /** * ComAdobeFormsCommonServletTempCleanUpTaskProperties */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen", date = "2019-08-05T00:55:42.601Z[GMT]") @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) public class ComAdobeFormsCommonServletTempCleanUpTaskProperties { @JsonProperty("scheduler.expression") private ConfigNodePropertyString schedulerExpression = null; @JsonProperty("Duration for Temporary Storage") private ConfigNodePropertyString durationForTemporaryStorage = null; @JsonProperty("Duration for Anonymous Storage") private ConfigNodePropertyString durationForAnonymousStorage = null; public ComAdobeFormsCommonServletTempCleanUpTaskProperties schedulerExpression(ConfigNodePropertyString schedulerExpression) { this.schedulerExpression = schedulerExpression; return this; } /** * Get schedulerExpression * @return schedulerExpression **/ @Valid public ConfigNodePropertyString getSchedulerExpression() { return schedulerExpression; } public void setSchedulerExpression(ConfigNodePropertyString schedulerExpression) { this.schedulerExpression = schedulerExpression; } public ComAdobeFormsCommonServletTempCleanUpTaskProperties durationForTemporaryStorage(ConfigNodePropertyString durationForTemporaryStorage) { this.durationForTemporaryStorage = durationForTemporaryStorage; return this; } /** * Get durationForTemporaryStorage * @return durationForTemporaryStorage **/ @Valid public ConfigNodePropertyString getDurationForTemporaryStorage() { return durationForTemporaryStorage; } public void setDurationForTemporaryStorage(ConfigNodePropertyString durationForTemporaryStorage) { this.durationForTemporaryStorage = durationForTemporaryStorage; } public ComAdobeFormsCommonServletTempCleanUpTaskProperties durationForAnonymousStorage(ConfigNodePropertyString durationForAnonymousStorage) { this.durationForAnonymousStorage = durationForAnonymousStorage; return this; } /** * Get durationForAnonymousStorage * @return durationForAnonymousStorage **/ @Valid public ConfigNodePropertyString getDurationForAnonymousStorage() { return durationForAnonymousStorage; } public void setDurationForAnonymousStorage(ConfigNodePropertyString durationForAnonymousStorage) { this.durationForAnonymousStorage = durationForAnonymousStorage; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeFormsCommonServletTempCleanUpTaskProperties comAdobeFormsCommonServletTempCleanUpTaskProperties = (ComAdobeFormsCommonServletTempCleanUpTaskProperties) o; return Objects.equals(schedulerExpression, comAdobeFormsCommonServletTempCleanUpTaskProperties.schedulerExpression) && Objects.equals(durationForTemporaryStorage, comAdobeFormsCommonServletTempCleanUpTaskProperties.durationForTemporaryStorage) && Objects.equals(durationForAnonymousStorage, comAdobeFormsCommonServletTempCleanUpTaskProperties.durationForAnonymousStorage); } @Override public int hashCode() { return Objects.hash(schedulerExpression, durationForTemporaryStorage, durationForAnonymousStorage); } @SuppressWarnings("StringBufferReplaceableByString") @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeFormsCommonServletTempCleanUpTaskProperties {\n"); sb.append(" schedulerExpression: ").append(toIndentedString(schedulerExpression)).append("\n"); sb.append(" durationForTemporaryStorage: ").append(toIndentedString(durationForTemporaryStorage)).append("\n"); sb.append(" durationForAnonymousStorage: ").append(toIndentedString(durationForAnonymousStorage)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
e18a1b3c26e3c452e2b01a245cf00fe466d7c07d
e88dc05ab33e19582c5bb079f106d2703d38d840
/eatgo-customer-api/src/main/java/kr/co/fastcampus/eatgo/Interfaces/RestaurantController.java
86e5402e951daeb2b8ac65770fe4d1e529f42134
[]
no_license
jxxxxe/SpringBoot_eatgo
e07b4f20e11e7aa12362d137f78064fe376b4be3
19a2a035b30256d176436ff0fba2535407aa3693
refs/heads/master
2023-02-26T09:47:51.593017
2021-02-04T01:21:35
2021-02-04T01:21:35
309,612,002
0
0
null
null
null
null
UTF-8
Java
false
false
3,267
java
package kr.co.fastcampus.eatgo.Interfaces; import kr.co.fastcampus.eatgo.application.RestaurantService; import kr.co.fastcampus.eatgo.domain.Restaurant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.net.URI; import java.net.URISyntaxException; import java.util.List; @CrossOrigin @RestController //바로 밑에 처럼 컨트롤러 객체를 만들지 않아도 됨 public class RestaurantController { // // @Autowired //컨트롤러를 만들어줄 때 스프링이 알아서 저장소를 여기에 생성 // private RestaurantRepository restaurantRepository; // //=new RestaurantRepository(); // 이렇게 직접 저장소 객체를 생성하지 않아도 자동 생성 // // @Autowired // private MenuItemRepository menuItemRepository; //새로운 저장소생성, autowired필요 // restaurantService로만 처리하므로 repository 삭제 @Autowired private RestaurantService restaurantService; //Menu~ -> import class @GetMapping("/restaurants") public List<Restaurant> list( @RequestParam("region") String region, @RequestParam("category") Long category ){ List <Restaurant> restaurants= restaurantService.getRestaurants(region,category); //새로운 메서드를 만들어서 (1)+(2)정보 모두 얻게 해보자 //=restaurantRepository.findAll(); //저장소에서 정보를 얻어서 그것을 레스토랑에 (1) 기본정보 //repository > field추가 // findAll() > create //restaurants.add(restaurant); // 리스트에 추가 return restaurants; //즉, 콜렉션=리스트 , 멤버=객체 } @GetMapping("/restaurants/{id}") //id값은 변수임 public Restaurant detail(@PathVariable("id") Long id){ //@path~ = 주소에 있는 변수를 파라메타로 Restaurant restaurant=restaurantService.getRestaurant(id); //(1)기본정보+(2)메뉴정보 >>> 어플리케이션(복잡한 것을 단순화) //에러처리 >> RestaurantErrorAdvice.class 생성해서 처리! // List<Restaurant> restaurants=new ArrayList<>(); //컬렉션 만듦 // restaurants.add(new Restaurant(1004L,"Bob zip","Seoul")); //멤버추가 // restaurants.add(new Restaurant(2020L,"Cyber Food","Seoul")); // => 위 세줄이 상단에 list()함수와 동일하다. -> 같은 부분을 저장하는 저장소(도메인에 속함) // Restaurant restaurant= restaurantRepository.findById(id); //(1)기본정보 // Restaurant restaurant=restaurants.stream() //컬렉션에서 찾아서 // .filter(r-> r.getId().equals(id)) //id를 얻어서 이와 같은 id를 찾음 // .findFirst() // .get(); //값을 얻음 // //.orElse(null) //값이 없다면 null을 얻음 // List<MenuItem> menuItems=menuItemRepository.findAllByRestaurantId(id); //(2)메뉴정보 // restaurant.setMenuItem(menuItems); //메뉴아이템 클래스추가(add->set) return restaurant; } }
[ "jeun318@gmail.com" ]
jeun318@gmail.com
7c4efd2afdc32a80e365fa2b78e3437f66932fc5
baf59d193eeaf7b28e178a72bdf477de9e8d2b36
/src/test/java/BAV_Lite_Test/TC_Consent_Text_200_PLUS.java
3742c38a14606f26b8e2a06e6a7a5f3a0dc1434b
[]
no_license
Testhub7/Test_Zoop1
af507672162c4579f827041c955c50bee15d7f16
b26e9d56fb9bc1c7d975725cecc17d0a0d1e9e34
refs/heads/main
2023-06-29T06:51:24.293455
2021-07-31T18:10:09
2021-07-31T18:10:09
391,502,267
0
0
null
null
null
null
UTF-8
Java
false
false
4,117
java
package BAV_Lite_Test; import io.restassured.RestAssured; import io.restassured.builder.RequestSpecBuilder; import io.restassured.http.ContentType; import io.restassured.response.Response; import io.restassured.specification.RequestSpecification; import junit.framework.Assert; import kong.unirest.Unirest; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.net.http.HttpResponse; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import io.restassured.path.json.JsonPath; import io.restassured.response.Response; import org.json.JSONArray; import org.json.JSONException; //import org.json.JSONObject; import org.json.simple.JSONObject; import org.json.JSONString; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import org.junit.runner.Request; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import baseTest.BaseClass; import files.ReUsableMethods; import static io.restassured.RestAssured.given; import static org.testng.Assert.assertEquals; //import org.json.Assertions; public class TC_Consent_Text_200_PLUS extends BaseClass { String p = LoadProperties().getProperty("baseUri_test"); String p1 = LoadProperties().getProperty("path_bav_lite"); String ContentType1 = LoadProperties().getProperty("ContentType"); String UserAgent1 = LoadProperties().getProperty("User-Agent"); String Accept1 = LoadProperties().getProperty("Accept"); String AcceptEncoding1 = LoadProperties().getProperty("Accept-Encoding"); String Connection1 = LoadProperties().getProperty("Connection"); String auth1 = LoadProperties().getProperty("auth"); String K = LoadProperties().getProperty("api-test-key"); String A = LoadProperties().getProperty("app-test-id"); String mode = LoadProperties().getProperty("mode"); String account_number = LoadProperties().getProperty("account_number"); String ifsc = LoadProperties().getProperty("ifsc"); String consent = LoadProperties().getProperty("consent_Y"); String consent_text = LoadProperties().getProperty("consent_text_BAV_200_Plus"); @Test public void APIResponse() throws IOException { System.out.println("mode is:" + mode); System.out.println("account_number is:" + account_number); System.out.println("ifsc is:" + ifsc); System.out.println("consent:" + consent); System.out.println("consent_text is:" + consent_text); // List<Map<String,Object>> requestList = new ArrayList<>(); Map<String, Object> dt = new HashMap<>(); // dt.put("mode", "sync"); dt.put("account_number", account_number); dt.put("ifsc", ifsc); dt.put("consent", consent); dt.put("consent_text", consent_text); System.out.println("Map is:" + dt); // requestList.add(dt); Map<String, Object> m1 = new HashMap<>(); m1.put("mode", mode); m1.put("data", dt); String response = RestAssured.given() .header("Content-Type", ContentType1) // request.header("Content-Length","<calculated when request is sent>"); // request.header("Host","<calculated when request is sent>"); .header("User-Agent", UserAgent1).header("Accept", Accept1).header("Accept-Encoding", AcceptEncoding1) .header("Connection", Connection1).header("auth", auth1) .header("app-id", A).header("api-key", K) .baseUri(p).body(m1).when() .post(p1).then().assertThat().log().all().extract().response().asString(); System.out.println("MAP :" + dt); JsonPath js = ReUsableMethods.rawToJson(response); int id = js.get("response_code"); String name = js.get("result.beneficiary_name"); String msg = js.get("response_message"); String bill = js.get("metadata.billable"); // int id = js.get("response_code"); System.out.println("beneficiary_name is :" + name); System.out.println("Response Code is :" + id); System.out.println("Response Message is :" + msg); System.out.println("Billable is :" + bill); assertEquals(id, 104); } }
[ "swapnil@vtestcorp.com" ]
swapnil@vtestcorp.com
86edb2b761224fe4009a5d8711a42205a34ceedf
5ea10a07e31792f8a7e694f68fae00b80f9a8e1e
/src/edu/hubu/util/LoginInterceptor.java
ecc74f89e8bdde4043a9fa706257fd2b3904b030
[]
no_license
rayshaw001/WECHAT-Server
c97dd3dbbc8ffe99b89843fc45333daf5f03be41
5bec81debfb722b7243829c942261d1ab22ed071
refs/heads/master
2021-01-22T06:37:11.989003
2016-05-12T15:46:38
2016-05-12T15:46:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
package edu.hubu.util; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; public class LoginInterceptor implements HandlerInterceptor { @Override public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception { // TODO Auto-generated method stub } @Override public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) throws Exception { // TODO Auto-generated method stub } @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception { // TODO Auto-generated method stub return isAllow(request,response); //response.getWriter().print(msg + status); } private boolean isAllow(HttpServletRequest request,HttpServletResponse response) { boolean flag = true; String URI = request.getRequestURI(); String msg ="请登录"; String allow[] = {"loging","test.do"}; for(String s:allow) { if(URI.contains(s)) { return flag; } } if(URI.contains("loged")) { if(request.getSession().getAttribute("user")!=null) { flag = true; //msg = "request successed"; } else { flag = false; } } else { flag = false; } return true; } }
[ "396301947@163.com" ]
396301947@163.com
880f15258b27bce2738f6ab28aced274e9898301
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/mm/protocal/c/aft.java
b450a5e31ef8c55db90c2b112f9a4ced748bdfb1
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,386
java
package com.tencent.mm.protocal.c; import com.tencent.mm.ba.a; import java.util.LinkedList; public final class aft extends a { public String aXz; public int efm; public String hHb; public float mFC; public int mFD; public LinkedList<Integer> mFE = new LinkedList(); public int mFF; public LinkedList<arf> mFG = new LinkedList(); public float mFH; public String mFI; public are mFJ; protected final int a(int i, Object... objArr) { if (i == 0) { a.a.a.c.a aVar = (a.a.a.c.a) objArr[0]; if (this.hHb != null) { aVar.e(1, this.hHb); } if (this.aXz != null) { aVar.e(2, this.aXz); } aVar.j(3, this.mFC); aVar.dV(4, this.mFD); aVar.c(5, this.mFE); aVar.dV(6, this.mFF); aVar.d(7, 8, this.mFG); aVar.j(8, this.mFH); if (this.mFI != null) { aVar.e(9, this.mFI); } aVar.dV(10, this.efm); if (this.mFJ == null) { return 0; } aVar.dX(11, this.mFJ.aHr()); this.mFJ.a(aVar); return 0; } else if (i == 1) { if (this.hHb != null) { r0 = a.a.a.b.b.a.f(1, this.hHb) + 0; } else { r0 = 0; } if (this.aXz != null) { r0 += a.a.a.b.b.a.f(2, this.aXz); } r0 = (((((r0 + (a.a.a.b.b.a.cw(3) + 4)) + a.a.a.a.dS(4, this.mFD)) + a.a.a.a.b(5, this.mFE)) + a.a.a.a.dS(6, this.mFF)) + a.a.a.a.c(7, 8, this.mFG)) + (a.a.a.b.b.a.cw(8) + 4); if (this.mFI != null) { r0 += a.a.a.b.b.a.f(9, this.mFI); } r0 += a.a.a.a.dS(10, this.efm); if (this.mFJ != null) { r0 += a.a.a.a.dU(11, this.mFJ.aHr()); } return r0; } else if (i == 2) { r0 = (byte[]) objArr[0]; this.mFE.clear(); this.mFG.clear(); a.a.a.a.a aVar2 = new a.a.a.a.a(r0, unknownTagHandler); for (r0 = a.a(aVar2); r0 > 0; r0 = a.a(aVar2)) { if (!super.a(aVar2, this, r0)) { aVar2.bQL(); } } return 0; } else if (i != 3) { return -1; } else { a.a.a.a.a aVar3 = (a.a.a.a.a) objArr[0]; aft com_tencent_mm_protocal_c_aft = (aft) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); LinkedList zQ; int size; a.a.a.a.a aVar4; boolean z; switch (intValue) { case 1: com_tencent_mm_protocal_c_aft.hHb = aVar3.pMj.readString(); return 0; case 2: com_tencent_mm_protocal_c_aft.aXz = aVar3.pMj.readString(); return 0; case 3: com_tencent_mm_protocal_c_aft.mFC = aVar3.pMj.readFloat(); return 0; case 4: com_tencent_mm_protocal_c_aft.mFD = aVar3.pMj.mH(); return 0; case 5: com_tencent_mm_protocal_c_aft.mFE = new a.a.a.a.a(aVar3.bQK().lVU, unknownTagHandler).bQH(); return 0; case 6: com_tencent_mm_protocal_c_aft.mFF = aVar3.pMj.mH(); return 0; case 7: zQ = aVar3.zQ(intValue); size = zQ.size(); for (intValue = 0; intValue < size; intValue++) { r0 = (byte[]) zQ.get(intValue); arf com_tencent_mm_protocal_c_arf = new arf(); aVar4 = new a.a.a.a.a(r0, unknownTagHandler); for (z = true; z; z = com_tencent_mm_protocal_c_arf.a(aVar4, com_tencent_mm_protocal_c_arf, a.a(aVar4))) { } com_tencent_mm_protocal_c_aft.mFG.add(com_tencent_mm_protocal_c_arf); } return 0; case 8: com_tencent_mm_protocal_c_aft.mFH = aVar3.pMj.readFloat(); return 0; case 9: com_tencent_mm_protocal_c_aft.mFI = aVar3.pMj.readString(); return 0; case 10: com_tencent_mm_protocal_c_aft.efm = aVar3.pMj.mH(); return 0; case 11: zQ = aVar3.zQ(intValue); size = zQ.size(); for (intValue = 0; intValue < size; intValue++) { r0 = (byte[]) zQ.get(intValue); are com_tencent_mm_protocal_c_are = new are(); aVar4 = new a.a.a.a.a(r0, unknownTagHandler); for (z = true; z; z = com_tencent_mm_protocal_c_are.a(aVar4, com_tencent_mm_protocal_c_are, a.a(aVar4))) { } com_tencent_mm_protocal_c_aft.mFJ = com_tencent_mm_protocal_c_are; } return 0; default: return -1; } } } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
b45ff357b59c5059bbe299de2a0e1b58c6561d74
a5b2d48ef018645a1c1c7c2df3693f0d3f22bb0d
/e3-parent/e3-manager-web/src/main/java/com/wheroj/e3/controller/ContentCategroyController.java
a874fb553900e4035332f143c6323d3ee8c5024e
[]
no_license
WheroJ/e3mall
2a0c25ba400a070b10924871855b23244100b145
7197c6ef68193c7661e6480de2abd1524ecdb442
refs/heads/master
2020-04-09T11:34:27.968842
2019-01-02T02:29:36
2019-01-02T02:29:36
160,315,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,692
java
package com.wheroj.e3.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.wheroj.common.pojo.Result; import com.wheroj.content.service.TbContentCategoryService; import com.wheroj.e3.ErrorCode; import com.wheroj.e3.pojo.EasyUITreeNode; import com.wheroj.e3.pojo.TbContentCategory; @RestController @RequestMapping("/content/category") public class ContentCategroyController { @Autowired private TbContentCategoryService categoryService; @GetMapping("/list") public List<EasyUITreeNode> getCategoryNodes( @RequestParam(value="id", defaultValue = "0") long parentId) { return categoryService.getCategoryNodes(parentId); } @PostMapping("/create") public Result<TbContentCategory> insert(long parentId, String name) { TbContentCategory category = categoryService.insert(parentId, name); return Result.ok(category); } @PostMapping("/update") public Result<TbContentCategory> update(long id, String name) { TbContentCategory category = categoryService.update(id, name); return Result.ok(category); } @PostMapping("/delete") public Result<?> delete(long id) { int count = categoryService.delete(id); if (count == 1) { return Result.ok(count); } else { return Result.error(ErrorCode.ERROR_DELETE_CATEGORY, "删除分类失败"); } } }
[ "hello19721001" ]
hello19721001
98cb397187f8358504d1aae08361c7886b2978e4
cf1e88f3048633c5251de87595de1a825b7064d8
/src/main/java/com/fenghua/auto/backend/core/utills/SpringValidationHelper.java
b74e7bd5996e1f5a9242e6074319b863983c1b72
[]
no_license
fightingBilling/skeleton-spring-web
64b77e2dc15849dbeecf48809e538e1b5e734721
f0c23867a7df6a6ab6239f747a66f6714800d793
refs/heads/master
2021-01-19T11:46:21.927365
2015-12-02T01:56:23
2015-12-02T01:56:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,181
java
package com.fenghua.auto.backend.core.utills; import java.lang.reflect.Field; import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; import javax.validation.ValidatorFactory; import javax.validation.groups.Default; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.fenghua.auto.backend.domain.mto.CommonMessageTransferObject; import com.fenghua.auto.backend.domain.mto.LabelError; import com.fenghua.auto.backend.domain.mto.MessageTransferObject; import com.fenghua.auto.backend.domain.validation.DomainValidationException; /** * @author shang yang * * @version * * @createTime:2015年11月26日 下午6:44:39 * */ public class SpringValidationHelper { private static Log log = LogFactory.getLog( SpringValidationHelper.class.getName() ); private static final ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); public static <T> MessageTransferObject validate( Class<T> objectClass, String value, String field ){ log.info("Spring Validation Helper start validate against Class:" + objectClass.getName() + "; Field:" + field + "; Value:" + value ); Validator validator = factory.getValidator(); T o = null; try { o = objectClass.newInstance(); Field f = objectClass.getDeclaredField(field); f.setAccessible(true); f.set(o, value); // set value } catch (InstantiationException | IllegalAccessException | NoSuchFieldException | SecurityException e) { throw new DomainValidationException( e.getMessage(), e.getCause() ); } Set<ConstraintViolation<T>> violations = validator.validateProperty( o, field, Default.class ); ConstraintViolation<T> violation = ( violations.iterator().hasNext() ? violations.iterator().next() : null ); // always fetch the first one only CommonMessageTransferObject transferObject = new CommonMessageTransferObject(); LabelError error = LabelErrorTranslator.translate2LabelError( violation ); if( error != null ){ transferObject.addErrors( error ); } return transferObject; } }
[ "comedshang@163.com" ]
comedshang@163.com
ac9d1bb3b62093731361e5bcab9da97b218babeb
1dad23f9c1c78dd4db90aef5e68b9e11ba74f04f
/src/test/leetcode/VerifyAlienDictionary953Test.java
caea0947bc2df7297149a2a5337108fd2ff24253
[]
no_license
omaksymov/algorithms
361578952b7deec161930ccaca4c60e77ffef5b1
28abc8bc1560d42b744dea59e8ce2d542c1ce64c
refs/heads/master
2020-04-10T10:14:04.663295
2019-07-23T07:59:20
2019-07-30T20:41:21
160,959,247
0
0
null
null
null
null
UTF-8
Java
false
false
2,635
java
package leetcode; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; @RunWith(Parameterized.class) public class VerifyAlienDictionary953Test { @Parameterized.Parameters public static List<TestItem953> data() { List<TestItem953> data = new ArrayList<>(); // As 'h' comes before 'l' in this language, then the sequence is sorted. data.add(new TestItem953(new String[]{"hello", "leetcode"}, "hlabcdefgijkmnopqrstuvwxyz", true)); data.add(new TestItem953(new String[]{"leetcode", "hello"}, "hlabcdefgijkmnopqrstuvwxyz", false)); // As 'd' comes after 'l' in this language, then words[0] > words[1], hence the sequence is unsorted. data.add(new TestItem953(new String[]{"word", "world", "row"}, "worldabcefghijkmnpqstuvxyz", false)); data.add(new TestItem953(new String[]{"world", "word", "ror"}, "worldabcefghijkmnpqstuvxyz", true)); /* The first three characters "app" match, and the second string is shorter (in size.) According to lexicographical rules "apple" > "app", because 'l' > '∅', where '∅' is defined as the blank character which is less than any other character. */ data.add(new TestItem953(new String[]{"apple", "app"}, "abcdefghijklmnopqrstuvwxyz", false)); data.add(new TestItem953(new String[]{"app", "apple"}, "abcdefghijklmnopqrstuvwxyz", true)); return data; } private TestItem953 testItem; public VerifyAlienDictionary953Test(TestItem953 testItem) { this.testItem = testItem; } @Test public void isAlienSorted_Solution1() { VerifyAlienDictionary953.Solution1 solution = new VerifyAlienDictionary953.Solution1(); boolean actualRes = solution.isAlienSorted(testItem.words, testItem.order); assertEquals(testItem.expectedRes, actualRes); } @Test public void isAlienSorted_Solution2() { VerifyAlienDictionary953.Solution2 solution = new VerifyAlienDictionary953.Solution2(); boolean actualRes = solution.isAlienSorted(testItem.words, testItem.order); assertEquals(testItem.expectedRes, actualRes); } private static class TestItem953 { private String[] words; private String order; private boolean expectedRes; private TestItem953(String[] words, String order, boolean expectedRes) { this.words = words; this.order = order; this.expectedRes = expectedRes; } } }
[ "oleksandr.maksymov@gmail.com" ]
oleksandr.maksymov@gmail.com
9c4cb15ff70a7f7c78c622dc83e680d1e3ac8105
9ae900793972692eefa5390cdc7d34d6507d7c7f
/09/WebApplication9/src/java/servlets/PerformStudentsFindingServlet.java
91ef8a419cee5c8707038daf8145dc86400271ef
[]
no_license
andreykrasnov92/Lab
14d8c6c817f34fb5219da1aec494205ee873437e
17866620c017d5570ae090e6823c4226b1286c78
refs/heads/master
2020-04-04T14:43:53.118448
2019-09-29T21:28:34
2019-09-29T21:28:34
23,635,456
0
0
null
null
null
null
UTF-8
Java
false
false
3,046
java
package servlets; import beans.DAOBeanRemote; import java.io.IOException; import javax.ejb.EJB; import javax.servlet.RequestDispatcher; 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 javax.servlet.http.HttpSession; import static shared.util.Utils.*; import static shared.util.XmlUtils.*; @WebServlet(name = "PerformStudentsUpdatingServlet", urlPatterns = {"/startperformstudentsfinding.jsp"}) public class PerformStudentsFindingServlet extends HttpServlet { @EJB private DAOBeanRemote bean; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); HttpSession session = request.getSession(); String studentName = (String) session.getAttribute("studentName"); try { String students = convertXMLToString(getStudentsXmlElement(bean.readStudentsByName(studentName))); session.setAttribute("students", students); RequestDispatcher dispatcher = request.getRequestDispatcher("/findstudentsresult.jsp"); if (dispatcher != null) { dispatcher.forward(request, response); } } catch (Exception ex) { printException(ex); session.setAttribute("errorMessage", ex.getLocalizedMessage()); RequestDispatcher dispatcher = request.getRequestDispatcher("/error.jsp"); if (dispatcher != null) { dispatcher.forward(request, response); } } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "andreykrasnov2012@gmail.com" ]
andreykrasnov2012@gmail.com
9a19dc85e83cb6c85596547a8c9dc901acb4e302
00ff46ba1c802670d7af310efceb12884cdc72a5
/src/test/java/com/sun/syndication/unittest/SyndFeedTest.java
3ece6b61a5c11ca8bfda73e7e6db93a80c887a51
[ "Apache-2.0" ]
permissive
annb/rome
052c6299d3821a5d030b1ac7e43dd9a22edc0077
a7883506f0eeb5c5b7ccfe30a3e250dd57cd6dc5
refs/heads/master
2016-09-05T20:18:02.871531
2013-05-10T07:22:42
2013-05-10T07:22:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,410
java
/* * Created on Jun 22, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package com.sun.syndication.unittest; import java.util.Date; import java.util.List; import com.sun.syndication.feed.synd.SyndEntry; import com.sun.syndication.feed.synd.SyndImage; import com.sun.syndication.io.impl.DateParser; /** * @author pat * */ public abstract class SyndFeedTest extends FeedTest { private String _prefix = null; protected SyndFeedTest(String feedType) { this(feedType,feedType+".xml"); } protected SyndFeedTest(String feedType,String feedFileName) { super(feedFileName); _prefix = feedType; } protected String getPrefix() { return _prefix; } protected void assertProperty(String property, String value) { assertEquals(property,getPrefix() + "." + value); } protected void assertEqualsStr(String expected, String actual) { assertEquals(_prefix + "." + expected, actual); } public void testPreserveWireFeed() throws Exception { assertNotNull(getCachedSyndFeed(true).originalWireFeed()); } public void testType() throws Exception { assertEquals(getCachedSyndFeed().getFeedType(),getPrefix()); } public void testTitle() throws Exception { assertEqualsStr("channel.title", getCachedSyndFeed().getTitle()); } public void testLink() throws Exception { assertEqualsStr("channel.link", getCachedSyndFeed().getLink()); } public void testDescription() throws Exception { assertEqualsStr("channel.description", getCachedSyndFeed().getDescription()); } public void testLanguage() throws Exception { assertEqualsStr("channel.language", getCachedSyndFeed().getLanguage()); } /* public void testCategories() throws Exception { List catlist = getCachedSyndFeed().getCategories(); //don't understand why this one fails assertEquals(2, catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0); assertEquals("channel.category[0]", cat.getName()); assertEquals("channel.category[0]^domain", cat.getTaxonomyUri()); cat = (SyndCategory)catlist.get(1); assertEquals("channel.category[1]", cat.getName()); assertEquals("channel.category[1]^domain", cat.getTaxonomyUri()); } */ public void testPublishedDate() throws Exception { assertEquals(DateParser.parseRFC822("Mon, 01 Jan 2001 00:00:00 GMT"), getCachedSyndFeed().getPublishedDate()); } //how do i get height and width? public void testImage() throws Exception { SyndImage img = getCachedSyndFeed().getImage(); assertEqualsStr("channel.image.description", img.getDescription()); assertEqualsStr("channel.image.link", img.getLink()); assertEqualsStr("channel.image.title", img.getTitle()); assertEqualsStr("channel.image.url", img.getUrl()); } public void testEntries() throws Exception { List entrylist = getCachedSyndFeed().getEntries(); assertEquals(2, entrylist.size()); } public void testEntryTitle() throws Exception { assertEqualsStr("channel.item[0].title", getEntryTitle(getCachedSyndFeed().getEntries().get(0))); assertEqualsStr("channel.item[1].title", getEntryTitle(getCachedSyndFeed().getEntries().get(1))); } public String getEntryTitle(Object o) throws Exception { SyndEntry e = (SyndEntry) o; return e.getTitle(); } public void testEntryDescription() throws Exception { assertEqualsStr("channel.item[0].description", getEntryDescription(getCachedSyndFeed().getEntries().get(0))); assertEqualsStr("channel.item[1].description", getEntryDescription(getCachedSyndFeed().getEntries().get(1))); } public String getEntryDescription(Object o) throws Exception { SyndEntry e = (SyndEntry) o; return e.getDescription().getValue(); } public void testEntryLink() throws Exception { assertEqualsStr("channel.item[0].link", getEntryLink(getCachedSyndFeed().getEntries().get(0))); assertEqualsStr("channel.item[1].link", getEntryLink(getCachedSyndFeed().getEntries().get(1))); } public String getEntryLink(Object o) { SyndEntry e = (SyndEntry) o; return e.getLink(); } public void testEntryPublishedDate() throws Exception { // this only works for RSS 0.93+ //assertEquals(DateParser.parseRFC822("Mon, 01 Jan 2001 00:00:00 GMT"), getEntryPublishedDate(getCachedSyndFeed().getEntries().get(0))); //assertEquals(DateParser.parseRFC822("Tue, 02 Jan 2001 00:00:00 GMT"), getEntryPublishedDate(getCachedSyndFeed().getEntries().get(1))); } public Date getEntryPublishedDate(Object o) { SyndEntry e = (SyndEntry) o; return e.getPublishedDate(); } /* public void testEntryCategories() throws Exception { SyndEntry e = (SyndEntry)getCachedSyndFeed().getEntries().get(0); List catlist = e.getCategories(); //don't understand why this one fails assertEquals(2, catlist.size()); SyndCategory cat = (SyndCategory)catlist.get(0); assertEquals("channel.item[0].category[0]", cat.getName()); assertEquals("channel.item[0].category[0]^domain", cat.getTaxonomyUri()); cat = (SyndCategory)catlist.get(1); assertEquals("channel.item[0].category[1]", cat.getName()); assertEquals("channel.item[0].category[1]^domain", cat.getTaxonomyUri()); //DO 2nd set of items } */ /* public void testEntryAuthor() throws Exception { assertEqualsStr("channel.item[0].author", getEntryAuthor(getCachedSyndFeed().getEntries().get(0))); assertEqualsStr("channel.item[1].author", getEntryAuthor(getCachedSyndFeed().getEntries().get(1))); } */ public String getEntryAuthor(Object o) { SyndEntry e = (SyndEntry) o; return e.getAuthor(); } /* //things you cannot get from SyndEntryImpl // <source url="http://localhost:8080/item0/source.url">item[0].source</source> // <enclosure url="http://localhost:8080/item0/enclosure0.url" length="100" type="audio/mpeg"/> // <enclosure url="http://localhost:8080/item0/enclosure1.url" length="1000" type="audio/mpeg"/> <category domain="item0.domain0">item0.category0</category> <category domain="item0.domain1">item0.category1</category> <pubDate>Thu, 08 Jul 1999 08:00:00 GMT</pubDate> <expirationDate>Thu, 08 Jul 1999 09:00:00 GMT</.expirationDate> <author>item0.author</author> <comments>http://localhost:8080/item0/comments</comments> <guid isPermaLink="true">http://localhost:8080/item0/guid</guid> //TODO: I still have the elements to test */ /* public void test() { assertEqualsStr(feed, ""); } public void test() { assertEqualsStr(feed, ""); } */ //Things that you cannot get form a SyndFeedImpl today //these need to be put in a RSS 2.0 module //or is a roundtrip to wirefeed the right way to do this? /* * <textInput> <title>Search</title> <description>Search this site:</description> <name>q</name> <link>http://example.org/mt/mt-search.cgi</link> </textInput> image height and width * //<copyright>Copyright 2004, Mark Pilgrim</copyright> public void test() { assertEqualsStr(getCachedSyndFeed()., ""); } //<generator>Sample Toolkit</generator> public void test() { assertEqualsStr(feed, ""); } // <managingEditor>editor@example.org</managingEditor> public void test() { assertEqualsStr(feed, ""); } // <webMaster>webmaster@example.org</webMaster> public void test() { assertEqualsStr(feed, ""); } <docs>http://blogs.law.harvard.edu/tech/rss</docs> <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/> <ttl>60</ttl> <rating>(PICS-1.1 �http://www.classify.org/safesurf/� l r (SS~~000 1))</rating> <skiphours> <hour>0</hour> <hour>1</hour> <hour>2</hour> <hour>3</hour> <hour>4</hour> <hour>5</hour> <hour>6</hour> <hour>7</hour> <hour>8</hour> <hour>9.5</hour> <hour>10</hour> <hour>11</hour> <hour>12</hour> <hour>13</hour> <hour>14</hour> <hour>15</hour> <hour>16</hour> <hour>17</hour> <hour>18</hour> <hour>19</hour> <hour>20</hour> <hour>21</hour> <hour>22</hour> <hour>23</hour> </skiphours> <skipdays> <day>Monday</day> <day>Tuesday</day> <day>Wednesday</day> <day>Thursday</day> <day>Friday</day> <day>Saturday</day> <day>Sunday</day> </skipdays> **/ /* * @see TestCase#tearDown() */ @Override protected void tearDown() throws Exception { super.tearDown(); } }
[ "annb@exoplatform.com" ]
annb@exoplatform.com
283d17e4d4e59a6c71383f46cca55b97b42100fd
a519a5ca2cd693327b376164edb38c4a9c4555bf
/Chapter3/5_Flurry/src/com/packtpub/ndkmastering/AppActivity.java
997644bcdc7d3684e3515313a1cac4ef2ff940a9
[ "MIT" ]
permissive
zhangxin8105/Mastering-Android-NDK
789c470d5cc0e77f87148944a85bd15920af01e6
3f4939642a3baf6ab673ed915c3bfbea329d7b5c
refs/heads/master
2022-04-01T23:01:09.150502
2020-02-03T02:09:27
2020-02-03T02:09:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,694
java
/* * Copyright (C) 2015 Sergey Kosarevsky (sk@linderdaum.com) * Copyright (C) 2015 Viktor Latypov (vl@linderdaum.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must display the names 'Sergey Kosarevsky' and * 'Viktor Latypov'in the credits of the application, if such credits exist. * The authors of this work must be notified via email (sk@linderdaum.com) in * this case of redistribution. * * 3. Neither the name of copyright holders nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package com.packtpub.ndkmastering; import android.app.Activity; import android.os.Bundle; import android.provider.Settings.Secure; import com.flurry.android.FlurryAgent; public class AppActivity extends Activity { static { System.loadLibrary( "NativeLib" ); } public static AppActivity m_Activity; @Override protected void onCreate( Bundle icicle ) { super.onCreate( icicle ); m_Activity = this; onCreateNative(); } @Override public void onStart() { super.onStart(); FlurryAgent.init(this, "9SW6PWCYSMVXDZFPJSJX"); FlurryAgent.onStartSession(this, "9SW6PWCYSMVXDZFPJSJX"); } @Override public void onStop() { FlurryAgent.onEndSession(this); super.onStop(); } public void TrackEvent( String EventID ) { FlurryAgent.logEvent( EventID ); } public static void Callback_TrackEvent( String EventID ) { if ( m_Activity == null ) return; m_Activity.TrackEvent( EventID ); } public static native void onCreateNative(); };
[ "sk@linderdaum.com" ]
sk@linderdaum.com
cf15c2e15d3e5e9e50748979b313d8ff21b9bee7
edab64395906fff320c16f53d262ac33176adb09
/src/agenda/TestContato.java
01aad5787cb0fb795ca5620839141e284b844676
[]
no_license
EndrioFelipe/Agenda
30a6895bef29be181ee2fde515742e3ce2d83a45
409ff25c96ea54f695d35e2293d25c65c3fdc52d
refs/heads/master
2021-01-01T05:25:20.613812
2016-05-12T19:35:45
2016-05-12T19:35:45
58,671,242
0
0
null
null
null
null
UTF-8
Java
false
false
1,129
java
/* * 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 agenda; /** * * @author endrio */ public class TestContato { public static void main(String[] args) { Agenda agenda = new Agenda(); Contato[] contatos1 = new Contato[3]; Contato contato = new Contato(); contato.setNome("João Pedro"); contato.setTelefone("31 1111-1111"); contato.setEmail("joaopedro@joao.com"); /*contatos1[1].setNome("faafa"); contatos1[1].setTelefone("adfadfdda"); contatos1[1].setEmail("fddafas"); contatos1[2].setNome("Pd!"); contatos1[2].setTelefone("6d6"); contatos1[2].setEmail("fdf");*/ contatos1[0]=contato; agenda.setContatos(contatos1); if (agenda!=null && agenda.getContatos()!=null){ for(Contato c : agenda.getContatos()){ System.out.println(c.getNome()+c.getTelefone()+c.getEmail()); } } } }
[ "endrio.souza@hotmail.com" ]
endrio.souza@hotmail.com
dde2e019c47da7f197d9fc4435c68379d9e0f309
98d313cf373073d65f14b4870032e16e7d5466f0
/gradle-open-labs/example/src/main/java/se/molybden/Class8211.java
33bfff70085eaffacc6567043e17b52c1b8b5c70
[]
no_license
Molybden/gradle-in-practice
30ac1477cc248a90c50949791028bc1cb7104b28
d7dcdecbb6d13d5b8f0ff4488740b64c3bbed5f3
refs/heads/master
2021-06-26T16:45:54.018388
2016-03-06T20:19:43
2016-03-06T20:19:43
24,554,562
0
0
null
null
null
null
UTF-8
Java
false
false
109
java
public class Class8211{ public void callMe(){ System.out.println("called"); } }
[ "jocce.nilsson@gmail.com" ]
jocce.nilsson@gmail.com
95a091791442bfb49d625e9b22271759df5abff5
3f2d4cf76067ff58bb20d1754254afc238045b8b
/chestbelt-desktop/src/main/java/org/thingml/chestbelt/desktop/SensorXmlClass.java
c987f54dcb6a1fb4d81e54e5f625a48558ba4973
[]
no_license
SINTEF-9012/chestbelt
dba23b6beb3411259ee58e2f18aaef8b5a8b6a58
9f7a126bcb0839b43745fe49da0ca10629253b9c
refs/heads/master
2021-01-10T22:06:52.959117
2014-11-12T14:27:46
2014-11-12T14:27:46
5,646,898
0
0
null
null
null
null
UTF-8
Java
false
false
3,940
java
package org.thingml.chestbelt.desktop; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.PropertyException; import javax.xml.bind.Unmarshaller; import org.thingml.chestbelt.driver.ChestBelt; /** * * @author stians */ public class SensorXmlClass { public String heartrate; public String temperature; public String activity; public String battery; public String posture; public String chronos; public String computer; //public String skinTemperature; SensorXmlClass(String heartrate, String temperature, String activity, String battery, String posture, String chronos) { this.heartrate = heartrate; this.temperature = temperature; this.activity = activity; this.battery = battery; this.posture = posture; this.chronos = chronos; //this.computer = computer; } public String getXml(){ String ret = ""; ArrayList<Value> ValueList = new ArrayList<Value>(); // create Values Value Value1 = new Value(); Value1.setVal(heartrate); Value1.setName("HR"); ValueList.add(Value1); Value Value2 = new Value(); Value2.setVal(temperature); Value2.setName("Temperature"); ValueList.add(Value2); Value Value3 = new Value(); Value3.setVal(posture); Value3.setName("Posture"); ValueList.add(Value3); Value Value4 = new Value(); Value4.setVal(activity); Value4.setName("Activity"); ValueList.add(Value4); Value Value5 = new Value(); Value5.setVal(battery); Value5.setName("BatteryStatus"); ValueList.add(Value5); Value Value6 = new Value(); Value6.setVal("0"); Value6.setName("Sensor Disconnect"); ValueList.add(Value6); Value Value7 = new Value(); Value7.setVal("0"); Value7.setName("Sensor Alarm"); ValueList.add(Value7); // create Sensorstore, assigning elements in sensor Sensor Sensorstore = new Sensor(); Sensorstore.setSensorId("ChestBelt"); Sensorstore.setComputerId(computer);//"Chestbelt 13606" Sensorstore.setTimeStamp(chronos);//"18.06.2014 16:43:49,61" Sensorstore.setDate("2014-02-10T12:09:32"); Sensorstore.setCompanyCode("42"); Sensorstore.setCompanyName("SINTEF"); Sensorstore.setUnitCode("Chestbelt 13606"); Sensorstore.setUnitSerial("1326000180"); Sensorstore.setUnitName("1326000180"); Sensorstore.setAlarmCode("10"); Sensorstore.setAlarmType("ChangedToNormal"); /* Sensorstore.setAlarmType("TagSerial/"); Sensorstore.setAlarmType("TagName"); Sensorstore.setAlarmType("ChangedToNormal");*/ Sensorstore.setValueList(ValueList); // create JAXB context and instantiate marshaller JAXBContext context; Marshaller m; ByteArrayOutputStream os = new ByteArrayOutputStream(); try { context = JAXBContext.newInstance(Sensor.class); m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(Sensorstore, os); ret = os.toString(); /* add codepage ??? */ int pos = ret.indexOf("<Sensor>"); if (pos != -1) ret = ret.substring(pos); } catch (JAXBException ex) { Logger.getLogger(SensorXmlClass.class.getName()).log(Level.SEVERE, null, ex); ret = "Error JAXBException"; return ret; } // Write to System.out return ret; } }
[ "stian.dragilos@gmail.com" ]
stian.dragilos@gmail.com
77cc777f74d1c0284dd0adcaccb726adfd532f0a
ebfd392722f5ff29dca43d24a645e13e37e7b498
/src/main/java/com/altmetrik/flights/Flights/json/Flight.java
6bd43f58c253d7962f92c310a63fa341aa79601a
[]
no_license
supriya22rama/Rest-api-challenge
2475df9de27acc20e2105f7dd44c5084f83d7167
2888a5fb8d2c422e61164c68844bb4c61136bfdf
refs/heads/master
2022-11-30T15:52:51.736686
2020-08-06T14:32:37
2020-08-06T14:32:37
274,161,978
0
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
package com.altmetrik.flights.Flights.json; import com.fasterxml.jackson.annotation.JsonProperty; public class Flight implements Comparable<Flight>{ private String number; private String iata; private String icao; private Codeshared codeshared; @JsonProperty("number") public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } @JsonProperty("iata") public String getIata() { return iata; } public void setIata(String iata) { this.iata = iata; } @JsonProperty("icao") public String getIcao() { return icao; } public void setIcao(String icao) { this.icao = icao; } @JsonProperty("codeshared") public Codeshared getCodeshared() { return codeshared; } public void setCodeshared(Codeshared codeshared) { this.codeshared = codeshared; } @Override public String toString() { return "Flight [number=" + number + ", iata=" + iata + ", icao=" + icao + ", codeshared=" + codeshared + "]"; } public int compareTo(Flight o) { return this.number.compareTo(o.number); } }
[ "supriya22.rama@gmail.com" ]
supriya22.rama@gmail.com
8aaa9526c7e48efe8afd105df6e631ecdb602db6
61602d4b976db2084059453edeafe63865f96ec5
/com/android/volley/h.java
13e09292ba43d6e8f7b82b68e3c95dd9efb214ca
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
129
java
package com.android.volley; /* compiled from: Network */ public interface h { j a(Request<?> request) throws VolleyError; }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
88081fd142a543c5eb5993b009df2d10b8486d14
52d429fb872a220781090548fd849f1368a9d16f
/src/test/java/com/example/submodules/SubmodulesApplicationTests.java
6b42139d22aea041d81314412ae5ef2bb2ce8db9
[]
no_license
isabella232/submodules-public
1a3ddf307ce1b041cb376640555e3b2855d18b11
f16b4d02862856aa0da275e0dd5fc74050973d8e
refs/heads/master
2023-03-15T16:19:45.235148
2019-02-07T11:27:20
2019-02-07T11:27:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.example.submodules; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SubmodulesApplicationTests { @Test public void contextLoads() { } }
[ "aniewielska@ebi.ac.uk" ]
aniewielska@ebi.ac.uk
f61a1c5b3132eea7059be44a535f77092efc6ce5
9e9ee0c5f01fec0e7dc40e364ce8fce675149ce5
/src/java/messages/ListaRezervacija.java
39dbdc8b34a220782dfd4fcd7cee5cc99c4ed211
[]
no_license
Sarrruman/KupacKlijent
5536cf00f2ded34ec4b4a263587e006021d1fae4
ab72c9dc068fb54d883843d766592ed75ac5d06f
refs/heads/master
2020-04-05T12:09:26.587945
2017-06-30T23:33:01
2017-06-30T23:33:01
95,232,482
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
/* * 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 messages; import beans.Rezervacija; import java.io.Serializable; import java.util.List; /** * * @author malenicn */ public class ListaRezervacija implements Serializable { static final long serialVersionUID = 42L; private List<Rezervacija> rezervacije; public List<Rezervacija> getRezervacije() { return rezervacije; } public void setRezervacije(List<Rezervacija> rezervacija) { this.rezervacije = rezervacija; } }
[ "nikola-malenic@msg-global.com" ]
nikola-malenic@msg-global.com
c7664ff93e31b273cd5eac61c36089a1fde42f4f
bcf21af9c50f3912a85d1d4652ea8f074955e6df
/src/main/java/com/geccocrawler/gecco/spider/HrefBean.java
a9719f6bfc25fd5c94dd57d5e2dc6be6cd8affbe
[ "MIT" ]
permissive
cloudyliu930/gecco
eba73144b5f0e739fd06745a644dd38ee34bf7d9
94afa4813e2fe6755143f867fd0e83714bd48ad2
refs/heads/master
2022-12-13T00:21:36.048650
2020-09-03T02:58:04
2020-09-03T02:58:04
292,450,575
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package com.geccocrawler.gecco.spider; import com.geccocrawler.gecco.annotation.Href; import com.geccocrawler.gecco.annotation.HtmlField; import com.geccocrawler.gecco.annotation.Text; public class HrefBean implements SpiderBean { private static final long serialVersionUID = -3770871271092767593L; @Href @HtmlField(cssPath="a") private String url; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "xtuhcy@163.com" ]
xtuhcy@163.com
39c7ec2dc80b90d098df72d15e0e6f0f19a4ae0a
e162532e2bdb7551c577fc172b0eafa093f99b25
/src/main/java/frc/robot/commands/AutonomousCommand.java
d6e16c3823a75c17b28542d58c41fa25ecb461b9
[]
no_license
Wildebots/Wildebots-2020
b48e00340c5806d494c66332108567eb85bacd3d
b0205c962fb4770f3312963b443bfbac9c8d3f82
refs/heads/master
2020-12-22T13:09:24.532035
2020-03-12T20:05:49
2020-03-12T20:05:49
236,793,314
0
0
null
null
null
null
UTF-8
Java
false
false
2,055
java
// RobotBuilder Version: 2.0 // // This file was generated by RobotBuilder. It contains sections of // code that are automatically generated and assigned by robotbuilder. // These sections will be updated in the future when you export to // Java from RobotBuilder. Do not put any code or make any change in // the blocks indicating autogenerated code or it will be lost on an // update. Deleting the comments indicating the section will prevent // it from being updated in the future. package frc.robot.commands; import edu.wpi.first.wpilibj.command.Command; import frc.robot.Robot; /** * */ public class AutonomousCommand extends Command { // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR public AutonomousCommand() { // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES } // Called just before this Command runs the first time @Override protected void initialize() { Robot.driveTrain.setDrive(0.0); } // Called repeatedly when this Command is scheduled to run @Override protected void execute() { Robot.driveTrain.autonomous(); } // Make this return true when this Command no longer needs to run execute() @Override protected boolean isFinished() { return false; } // Called once after isFinished returns true @Override protected void end() { Robot.driveTrain.endDrive(); } // Called when another command which requires one or more of the same // subsystems is scheduled to run @Override protected void interrupted() { end(); } }
[ "Smitypatel03@yahoo.com" ]
Smitypatel03@yahoo.com
590ae04296d6227b4324eb79d25242328c40d26b
6a13f5a927997f9b31bebe14870d469ce9bfc817
/src/main/java/com/transactionhandler/service/ItemTrackerService.java
3c5969ddf357a0cb159f37e6fde36a1bf256665a
[]
no_license
dafshar/Transaction-Handler
a755bea422f043904f1339810db556d46a39ccd0
4f80b1145bf00f16cd1a7e15412e5e900f3a59e4
refs/heads/master
2020-04-17T23:18:13.827201
2019-02-18T14:54:48
2019-02-18T14:54:48
167,029,884
0
0
null
null
null
null
UTF-8
Java
false
false
2,588
java
package com.transactionhandler.service; import java.util.HashSet; import java.util.Set; import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.core.scope.context.ChunkContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.transactionhandler.dom.ItemTracker; @Service public class ItemTrackerService<V> { private final ItemTracker itemTracker; private long jobExecutionId; private final Set<V> inputItems = new HashSet<>(); private final Set<V> processErrorItems = new HashSet<>(); private int loggingInterval = 1; private static Logger logger = LoggerFactory.getLogger(ItemTrackerService.class); public ItemTrackerService(final ItemTracker itemTrackerIn) { itemTracker = itemTrackerIn; } public void setJobExecutionId(final long jobExecutionIdIn) { jobExecutionId = jobExecutionIdIn; } public int getProcessErrorItemsSize() { return processErrorItems.size(); } public synchronized void addProcessErrorItem(final V item) { if(item == null) { logger.warn("Cannot add null process error item to ItemTracker"); return; } inputItems.add(item); processErrorItems.add(item); } public synchronized void increaseInputItemCount(ChunkContext context) { int count = context.getStepContext().getStepExecution().getReadCount(); if (count > 0 && count % loggingInterval == 0) { itemTracker.setItemCount(count); logger.info("Input Item count: " + itemTracker.getItemCount()); } } public synchronized void increaseProcessErrorItemCount(ChunkContext context) { int count = context.getStepContext().getStepExecution().getProcessSkipCount(); if (count > 0 && count % loggingInterval == 0) { itemTracker.setProcessErrorCount(count); logger.info("Processor Exception Skip Count: " + itemTracker.getProcessErrorCount()); } } public synchronized void addJobExecutionId(ChunkContext context) { Long jobExecutionId = context.getStepContext().getStepExecution().getJobExecutionId(); itemTracker.setJobExecutionId(jobExecutionId);; logger.info("Job Execution Id : " + itemTracker.getJobExecutionId()); } public ItemTracker buildItemTracker() { itemTracker.setJobExecutionId(jobExecutionId); itemTracker.setItemCount(inputItems.size()); itemTracker.setProcessErrorCount(processErrorItems.size()); return itemTracker; } }
[ "dafshar@deloitte.com" ]
dafshar@deloitte.com
828cbbfd576d0f46641b9c164ab5d195a890a612
f3c62177e9b112e6d6ba9fe4a1f277523bcbd2d3
/Solutions/901. Online Stock Span.java
61e525a0a69f1178aa1887a405a8d95950eb48c7
[]
no_license
FatmanaK/LeetCode-1
cf480c899e2d583d173d46d02c6751998a497e4c
2cc30303c91513f0dae61d4c8af839e252012674
refs/heads/master
2023-03-06T23:19:31.129702
2021-02-15T13:40:57
2021-02-15T13:40:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
class StockSpanner { Stack<Integer> prices, weights; public StockSpanner() { prices= new Stack<>(); weights= new Stack<>(); } public int next(int price) { int w = 1; while (!prices.isEmpty() && prices.peek() <= price) { prices.pop(); w += weights.pop(); } prices.push(price); weights.push(w); return w; } } /** * Your StockSpanner object will be instantiated and called as such: * StockSpanner obj = new StockSpanner(); * int param_1 = obj.next(price); */
[ "Priyanka.singh@cerence.com" ]
Priyanka.singh@cerence.com
2dab6610470b87c600171dd1ff30cc4dbabb854a
1b949586c8feb0fb5230382fa8501850893950b1
/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/ScheduledEmailConstants.java
359b3401174ef8ed807dfc45869f4d4f47ca00d9
[ "MIT", "BSD-3-Clause", "Apache-2.0", "LGPL-2.0-or-later", "LicenseRef-scancode-public-domain", "CDDL-1.1", "LicenseRef-scancode-free-unknown", "EPL-1.0", "Classpath-exception-2.0", "GPL-2.0-only" ]
permissive
cjxonix/fineractapp
44d3a66cf9eddc99bfa3d8f5697797bc855f8e46
b711fb2d142f5f7ecc39448fa868cc0542084328
refs/heads/master
2022-06-19T11:52:56.167338
2020-04-06T05:37:37
2020-04-06T05:37:37
253,395,889
0
0
Apache-2.0
2022-06-03T02:18:38
2020-04-06T04:39:14
Java
UTF-8
Java
false
false
5,268
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.campaigns.email; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; public class ScheduledEmailConstants { // define the API resource entity name public static final String SCHEDULED_EMAIL_ENTITY_NAME = "SCHEDULEDEMAIL"; // general API resource request parameter constants public static final String LOCALE_PARAM_NAME = "locale"; public static final String DATE_FORMAT_PARAM_NAME = "dateFormat"; // parameter constants for create/update entity API request public static final String NAME_PARAM_NAME = "name"; public static final String DESCRIPTION_PARAM_NAME = "description"; public static final String START_DATE_TIME_PARAM_NAME = "startDateTime"; public static final String RECURRENCE_PARAM_NAME = "recurrence"; public static final String EMAIL_RECIPIENTS_PARAM_NAME = "emailRecipients"; public static final String EMAIL_SUBJECT_PARAM_NAME = "emailSubject"; public static final String EMAIL_MESSAGE_PARAM_NAME = "emailMessage"; public static final String EMAIL_ATTACHMENT_FILE_FORMAT_ID_PARAM_NAME = "emailAttachmentFileFormatId"; public static final String STRETCHY_REPORT_ID_PARAM_NAME = "stretchyReportId"; public static final String STRETCHY_REPORT_PARAM_MAP_PARAM_NAME = "stretchyReportParamMap"; public static final String IS_ACTIVE_PARAM_NAME = "isActive"; // other parameter constants public static final String ID_PARAM_NAME = "id"; public static final String EMAIL_ATTACHMENT_FILE_FORMAT_PARAM_NAME = "emailAttachmentFileFormat"; public static final String PREVIOUS_RUN_DATE_TIME_PARAM_NAME = "previousRunDateTime"; public static final String NEXT_RUN_DATE_TIME_PARAM_NAME = "nextRunDateTime"; public static final String PREVIOUS_RUN_STATUS = "previousRunStatus"; public static final String PREVIOUS_RUN_ERROR_LOG = "previousRunErrorLog"; public static final String PREVIOUS_RUN_ERROR_MESSAGE = "previousRunErrorMessage"; public static final String NUMBER_OF_RUNS = "numberOfRuns"; public static final String STRETCHY_REPORT_PARAM_NAME = "stretchyReport"; // list of permitted parameters for the create report mailing job request public static final Set<String> CREATE_REQUEST_PARAMETERS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(LOCALE_PARAM_NAME, DATE_FORMAT_PARAM_NAME, NAME_PARAM_NAME, DESCRIPTION_PARAM_NAME, RECURRENCE_PARAM_NAME, EMAIL_RECIPIENTS_PARAM_NAME, EMAIL_SUBJECT_PARAM_NAME, EMAIL_MESSAGE_PARAM_NAME, EMAIL_ATTACHMENT_FILE_FORMAT_ID_PARAM_NAME, STRETCHY_REPORT_ID_PARAM_NAME, STRETCHY_REPORT_PARAM_MAP_PARAM_NAME, IS_ACTIVE_PARAM_NAME, START_DATE_TIME_PARAM_NAME))); // list of permitted parameters for the update report mailing job request public static final Set<String> UPDATE_REQUEST_PARAMETERS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(LOCALE_PARAM_NAME, DATE_FORMAT_PARAM_NAME, NAME_PARAM_NAME, DESCRIPTION_PARAM_NAME, RECURRENCE_PARAM_NAME, EMAIL_RECIPIENTS_PARAM_NAME, EMAIL_SUBJECT_PARAM_NAME, EMAIL_MESSAGE_PARAM_NAME, EMAIL_ATTACHMENT_FILE_FORMAT_ID_PARAM_NAME, STRETCHY_REPORT_ID_PARAM_NAME, STRETCHY_REPORT_PARAM_MAP_PARAM_NAME, IS_ACTIVE_PARAM_NAME, START_DATE_TIME_PARAM_NAME))); // list of parameters that represent the properties of a report mailing job public static final Set<String> REPORT_MAILING_JOB_DATA_PARAMETERS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(ID_PARAM_NAME, NAME_PARAM_NAME, DESCRIPTION_PARAM_NAME, RECURRENCE_PARAM_NAME, EMAIL_RECIPIENTS_PARAM_NAME, EMAIL_SUBJECT_PARAM_NAME, EMAIL_MESSAGE_PARAM_NAME, EMAIL_ATTACHMENT_FILE_FORMAT_PARAM_NAME, STRETCHY_REPORT_PARAM_NAME, STRETCHY_REPORT_PARAM_MAP_PARAM_NAME, IS_ACTIVE_PARAM_NAME, START_DATE_TIME_PARAM_NAME, PREVIOUS_RUN_DATE_TIME_PARAM_NAME, NEXT_RUN_DATE_TIME_PARAM_NAME, PREVIOUS_RUN_STATUS, PREVIOUS_RUN_ERROR_LOG, PREVIOUS_RUN_ERROR_MESSAGE, NUMBER_OF_RUNS))); // report mailing job configuration names public static final String GMAIL_SMTP_SERVER = "GMAIL_SMTP_SERVER"; public static final String GMAIL_SMTP_PORT = "GMAIL_SMTP_PORT"; public static final String GMAIL_SMTP_USERNAME = "GMAIL_SMTP_USERNAME"; public static final String GMAIL_SMTP_PASSWORD = "GMAIL_SMTP_PASSWORD"; }
[ "niwoogabajoel@gmail.com" ]
niwoogabajoel@gmail.com
17d173a4eb9214642d3ba428c0e4c9c1a3e5e179
ebb3f1e8245d36764464c009048afa2b50d2d044
/variability/org.eclipse.emf.henshin.variability.mergein/src/org/eclipse/emf/henshin/variability/mergein/mining/labels/DefaultNodeLabel.java
77cfe2056e6d37adae867ad02489c29164935a5b
[]
no_license
HeliumApple/HenshinForLiftedRule
57d50fd83c762e281ed5fb92a85e15d16cdba5ac
8e3df4d04d404fdab6de3d4cf79acbe5ce4ba7b2
refs/heads/master
2022-12-10T18:28:13.165111
2020-09-04T18:18:29
2020-09-04T18:18:29
290,025,292
1
1
null
null
null
null
ISO-8859-3
Java
false
false
1,606
java
package org.eclipse.emf.henshin.variability.mergein.mining.labels; import org.eclipse.emf.ecore.ENamedElement; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.henshin.model.Action.Type; import org.eclipse.emf.henshin.variability.mergein.normalize.HenshinNode; /** * This class represents the label of the graph nodes under mining. It * stores the type of a given node, and supports hashCode() and equals() * methods for the comparison of different instances. * * @author strüber * */ public class DefaultNodeLabel implements INodeLabel { protected EObject type; protected Type actionType; public DefaultNodeLabel(HenshinNode node) { this.type = node.getType(); this.actionType = node.getActionType(); } @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(actionType.name()); if (type instanceof ENamedElement) { result.append(""); result.append(((ENamedElement)type).getName()); } return result.toString(); } public EObject getType() { return type; } @Override public boolean equals(Object o) { if (!(o instanceof DefaultNodeLabel)) { return false; } DefaultNodeLabel other = (DefaultNodeLabel) o; if (!other.getType().equals(this.getType())) { return false; } if (!other.getActionType().equals(this.getActionType())) { return false; } return true; } private Type getActionType() { return actionType; } @Override public int hashCode() { return type.hashCode() + actionType.hashCode(); } @Override public String getLabelName() { return toString(); } }
[ "58273279+HeliumApple@users.noreply.github.com" ]
58273279+HeliumApple@users.noreply.github.com
bacf8447431e5a74266f6d2b876bfd3b635c304d
bb87c6d502e7ccf1fb957e1125fd301b534f4058
/Java/Matkul Algoritma (Error Semua)/pengulangan/whileswitch.java
32ecb9806a97c628e114aa8d7619281e08bcd1f5
[]
no_license
fathimaifa/Kodingan
888e587ef4ae7509efe543eb902637e3b4e12552
b8f4827bb948032c0f505f45037a7274b9f388fb
refs/heads/master
2020-12-14T07:22:40.663842
2020-01-18T04:12:46
2020-01-18T04:12:46
234,678,502
0
0
null
null
null
null
UTF-8
Java
false
false
1,097
java
import java.util.*; public class whileswitch { public static void main(String[] args) { Scanner in = new Scanner(System.in); int keluar; do{ int pil, s; double hasil; System.out.print("1. menghitung luas persegi \n2. menghitung volume kubus \n3. Square root \n4. reciprocal value \njawaban anda: "); pil = in.nextInt(); switch (pil){ case 1 : System.out.print("\nmasukan sisi persegi: "); s = in.nextInt(); hasil=s*s; System.out.print("luas = " + hasil); break; case 2 : System.out.print("\nmasukan sisi kubus: "); s = in.nextInt(); hasil=s*s*s; System.out.print("volume = " + hasil); break; case 3 : System.out.print("\nmasukan n: "); s = in.nextInt(); hasil=Math.sqrt(s); System.out.print("akar = " + hasil); break; case 4 : System.out.print("\nmasukan n: "); s = in.nextInt(); hasil=1/s; System.out.print("reciprocal = " + hasil); break; } System.out.print("\n\nApakah anda ingin keluar? (y/n) : "); keluar = in.next().charAt(0); }while(keluar=='n'); } }
[ "fathimaifa9@gmail.com" ]
fathimaifa9@gmail.com
78c19f101bbd481cadb95aa85e20a1242b20b2a0
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.5.5/code/base/dso-l2/src/com/tc/objectserver/dgc/impl/GCStatsEventPublisher.java
c173ce13bc988805036696da3cba0eebf6222976
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
4,298
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tc.objectserver.dgc.impl; import com.tc.objectserver.api.GCStats; import com.tc.objectserver.api.GCStatsEventListener; import com.tc.objectserver.core.impl.GarbageCollectionID; import com.tc.objectserver.dgc.api.GCStatsImpl; import com.tc.objectserver.dgc.api.GarbageCollectionInfo; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map.Entry; import java.util.concurrent.CopyOnWriteArrayList; public class GCStatsEventPublisher extends GarbageCollectorEventListenerAdapter { private final List gcStatsEventListeners = new CopyOnWriteArrayList(); private final LossyLinkedHashMap gcHistory = new LossyLinkedHashMap(1500); public void addListener(GCStatsEventListener listener) { gcStatsEventListeners.add(listener); } public GCStats[] getGarbageCollectorStats() { return gcHistory.values().toArray(new GCStats[gcHistory.size()]); } public GCStats getLastGarbageCollectorStats() { Iterator iter = gcHistory.values().iterator(); if (iter.hasNext()) { return (GCStats) iter.next(); } return null; } @Override public void garbageCollectorStart(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); push(info.getGarbageCollectionID(), gcStats); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorMark(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setMarkState(); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorPausing(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setPauseState(); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorMarkComplete(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setMarkCompleteState(); gcStats.setActualGarbageCount(info.getActualGarbageCount()); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorDelete(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setDeleteState(); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorCompleted(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setEndObjectCount(info.getEndObjectCount()); gcStats.setCompleteState(); fireGCStatsEvent(gcStats); } @Override public void garbageCollectorCanceled(GarbageCollectionInfo info) { GCStatsImpl gcStats = getGCStats(info); gcStats.setCanceledState(); fireGCStatsEvent(gcStats); } private GCStatsImpl getGCStats(GarbageCollectionInfo info) { GCStatsImpl gcStats = null; if ((gcStats = gcHistory.get(info.getGarbageCollectionID())) == null) { gcStats = new GCStatsImpl(info.getIteration(), info.isFullGC(), info.getStartTime()); push(info.getGarbageCollectionID(), gcStats); } gcStats.setActualGarbageCount(info.getActualGarbageCount()); gcStats.setBeginObjectCount(info.getBeginObjectCount()); gcStats.setCandidateGarbageCount(info.getCandidateGarbageCount()); gcStats.setDeleteStageTime(info.getDeleteStageTime()); gcStats.setElapsedTime(info.getElapsedTime()); gcStats.setMarkStageTime(info.getMarkStageTime()); gcStats.setPausedStageTime(info.getPausedStageTime()); gcStats.setEndObjectCount(info.getEndObjectCount()); return gcStats; } private void push(GarbageCollectionID id, GCStatsImpl stats) { gcHistory.put(id, stats); } public void fireGCStatsEvent(GCStats gcStats) { for (Iterator iter = gcStatsEventListeners.iterator(); iter.hasNext();) { GCStatsEventListener listener = (GCStatsEventListener) iter.next(); listener.update(gcStats); } } private static class LossyLinkedHashMap extends LinkedHashMap<GarbageCollectionID, GCStatsImpl> { private final int size; public LossyLinkedHashMap(int size) { this.size = size; } @Override protected boolean removeEldestEntry(Entry<GarbageCollectionID, GCStatsImpl> eldest) { return (size() < size) ? false : true; } } }
[ "cruise@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
e89601c9db52b1a840b2e12afe4c708b9f846d6e
84ce3184290452dc2119497657a9af3db95a7c8b
/src/main/java/com/project/pagination/controllers/UserController.java
2d5939937e26be6d7e12b3557e065f07a9cd92a2
[]
no_license
Morrantho/AJAX-Pagination
ab04c974ad8ad6c5547aca07899b832721e18487
e3ece2c6631467f1eb51f773b57619542d29de00
refs/heads/master
2021-04-12T11:32:21.274668
2018-03-24T19:23:24
2018-03-24T19:23:24
126,632,935
0
0
null
null
null
null
UTF-8
Java
false
false
1,833
java
package com.project.pagination.controllers; import java.security.Principal; import java.util.Date; import java.util.ArrayList; import java.text.SimpleDateFormat; import java.text.ParseException; import org.springframework.web.bind.annotation.CrossOrigin; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.project.pagination.repositories.UserRepository; import com.project.pagination.models.User; @Controller public class UserController{ private UserRepository uR; public UserController(UserRepository uR){ this.uR=uR; } @CrossOrigin(origins={"http://localhost:3000"}) @RequestMapping("/users") @ResponseBody public ArrayList<User> all(){ return (ArrayList<User>)uR.findAll(); } @CrossOrigin(origins={"http://localhost:3000"}) @RequestMapping("/users/{id}") @ResponseBody public User find(@PathVariable("id") Long id){ return (User)uR.findOne(id); } @CrossOrigin(origins={"http://localhost:3000"}) @PostMapping("/users/new") @ResponseBody public User create(@RequestBody User user){ uR.save(user); return user; } }
[ "morrantho@gmail.com" ]
morrantho@gmail.com
0ef7292617623a8bbbfb5014527fc67d3a2d6dcb
08f6f812f663f1c87c56a9adea43ff7f201cf0cc
/src/main/java/com/woundeddragons/securitystarter/web/api/common/delegate/AuthenticationDelegate.java
bcd16a09d8ea2223d75fe81876746483867403ed
[]
no_license
marcelomnc/spring-boot-security-backend-starter
170c2811cbb4024012a0d1a5a0462efe056f1512
1d2589b0060233881378eb53703e518fa362d6fa
refs/heads/master
2022-12-11T13:00:44.035446
2020-09-09T14:00:05
2020-09-09T14:00:05
270,837,609
0
0
null
null
null
null
UTF-8
Java
false
false
1,519
java
package com.woundeddragons.securitystarter.web.api.common.delegate; import com.woundeddragons.securitystarter.business.model.RoleByUser; import com.woundeddragons.securitystarter.business.model.User; import com.woundeddragons.securitystarter.business.service.RoleByUserService; import com.woundeddragons.securitystarter.business.service.UserService; import com.woundeddragons.securitystarter.web.api.common.JWTUtils; import com.woundeddragons.securitystarter.web.api.v1.response.AuthenticationResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Collection; import java.util.Date; @Component public class AuthenticationDelegate { @Autowired private UserService userService; @Autowired private RoleByUserService roleByUserService; public AuthenticationResponse doAuthentication(User user, boolean loginProcessCompleted) { Collection<RoleByUser> rolesByUser = null; if (loginProcessCompleted) { //Updating last login date for the user user.setDtLastLoginOn(new Date()); this.userService.save(user); rolesByUser = this.roleByUserService.findByUserId(user.getNmId()); } String jwt = JWTUtils.buildJWT(user, rolesByUser, !loginProcessCompleted); AuthenticationResponse toRet = new AuthenticationResponse(); toRet.setJwt(jwt); toRet.setMustVerify2FACode(!loginProcessCompleted); return toRet; } }
[ "marcelo@pig.gi" ]
marcelo@pig.gi
fceee3d8dca458e964f13632cb783132e04fdbec
e66b48cbf381594197f321c025abf1e1ca3cb576
/app/src/main/java/com/basestructure/restclient/RetrieveCommand.java
a777ba720eb7dbd6918c3097bb9597a57f50c444
[]
no_license
sambhaji213/BaseStructure
0712ea81ad51b9b827757a680baee9aaaac51066
f2cffaaa852b4f1cd26b6e596fa24d184206bf3b
refs/heads/master
2021-01-11T00:49:43.360640
2016-10-11T05:53:42
2016-10-11T05:53:42
70,483,004
1
0
null
2020-11-23T09:05:17
2016-10-10T11:51:43
Java
UTF-8
Java
false
false
1,311
java
package com.basestructure.restclient; import android.util.Log; import com.basestructure.data.DataContract; import com.basestructure.exceptions.DeviceConnectionException; import com.basestructure.exceptions.NetworkSystemException; import com.basestructure.exceptions.WebServiceFailedException; import com.basestructure.processor.Processor; import com.basestructure.provider.MethodEnum; public class RetrieveCommand extends RESTCommand { DataContract m_DataContract; public RetrieveCommand(DataContract dataContract){ m_DataContract=dataContract; } private static final String TAG = "RetrieveCommand"; @Override protected int handleRequest(String authToken ) throws DeviceConnectionException, NetworkSystemException, WebServiceFailedException { if ( Log.isLoggable( TAG, Log.INFO )) { Log.i( TAG, "executing RESTMethod.GET" ); } int statusCode = m_DataContract.handleRequest(MethodEnum.valueOf("GET"), authToken); return statusCode; } /** * Delegate error handling to the Processor. */ @Override public boolean handleError(int httpResult, boolean allowRetry) { return Processor.getInstance() .retrieveFailure( httpResult, allowRetry ); } }
[ "sambhaji2134@gmail.com" ]
sambhaji2134@gmail.com
bf1b25a400acb980e6c0a936ed564479aef64d16
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
/AL-Game/src/com/aionemu/gameserver/model/siege/Influence.java
36da0c7c70aab976a3d37ecd33f88eefb3314ceb
[]
no_license
EmuZONE/Aion-Lightning-5.1
3c93b8bc5e63fd9205446c52be9b324193695089
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
refs/heads/master
2020-03-08T14:38:42.579437
2018-04-06T04:18:19
2018-04-06T04:18:19
128,191,634
1
1
null
null
null
null
UTF-8
Java
false
false
9,228
java
/* * This file is part of Encom. **ENCOM FUCK OTHER SVN** * * Encom is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Encom is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with Encom. If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.model.siege; import com.aionemu.gameserver.model.Race; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.network.aion.serverpackets.SM_INFLUENCE_RATIO; import com.aionemu.gameserver.services.SiegeService; import com.aionemu.gameserver.utils.PacketSendUtility; import com.aionemu.gameserver.world.World; import java.util.Iterator; public class Influence { private static final Influence instance = new Influence(); //======[ABYSS]============= private float abyss_e = 0; private float abyss_a = 0; private float abyss_b = 0; //======[INGGISON]========== private float inggison_e = 0; private float inggison_a = 0; private float inggison_b = 0; //======[GELKMAROS]========= private float gelkmaros_e = 0; private float gelkmaros_a = 0; private float gelkmaros_b = 0; //======[KALDOR]============ private float kaldor_e = 0; private float kaldor_a = 0; private float kaldor_b = 0; //======[BELUS]============= private float belus_e = 0; private float belus_a = 0; private float belus_b = 0; //======[ASPIDA]============ private float aspida_e = 0; private float aspida_a = 0; private float aspida_b = 0; //======[ATANATOS]========== private float atanatos_e = 0; private float atanatos_a = 0; private float atanatos_b = 0; //======[DISILLON]========== private float disillon_e = 0; private float disillon_a = 0; private float disillon_b = 0; //======[GLOBAL]============ private float global_e = 0; private float global_a = 0; private float global_b = 0; private Influence() { calculateInfluence(); } public static Influence getInstance() { return instance; } public void recalculateInfluence() { calculateInfluence(); } private void calculateInfluence() { float balaurea = 0.0019512194f; float abyss = 0.006097561f; //======[ABYSS]========== float e_abyss = 0f; float a_abyss = 0f; float b_abyss = 0f; float t_abyss = 0f; //=======[INGGISON]====== float e_inggison = 0f; float a_inggison = 0f; float b_inggison = 0f; float t_inggison = 0f; //======[GELKMAROS]====== float e_gelkmaros = 0f; float a_gelkmaros = 0f; float b_gelkmaros = 0f; float t_gelkmaros = 0f; //======[KALDOR]====== float e_kaldor = 0f; float a_kaldor = 0f; float b_kaldor = 0f; float t_kaldor = 0f; for (SiegeLocation sLoc : SiegeService.getInstance().getSiegeLocations().values()) { switch (sLoc.getWorldId()) { //======[ABYSS]========== case 400010000: t_abyss += sLoc.getInfluenceValue(); switch (sLoc.getRace()) { case ELYOS: e_abyss += sLoc.getInfluenceValue(); break; case ASMODIANS: a_abyss += sLoc.getInfluenceValue(); break; case BALAUR: b_abyss += sLoc.getInfluenceValue(); break; } break; //=======[INGGISON]====== case 210050000: if (sLoc instanceof FortressLocation) { t_inggison += sLoc.getInfluenceValue(); switch (sLoc.getRace()) { case ELYOS: e_inggison += sLoc.getInfluenceValue(); break; case ASMODIANS: a_inggison += sLoc.getInfluenceValue(); break; case BALAUR: b_inggison += sLoc.getInfluenceValue(); break; } } break; //======[GELKMAROS]====== case 220070000: if (sLoc instanceof FortressLocation) { t_gelkmaros += sLoc.getInfluenceValue(); switch (sLoc.getRace()) { case ELYOS: e_gelkmaros += sLoc.getInfluenceValue(); break; case ASMODIANS: a_gelkmaros += sLoc.getInfluenceValue(); break; case BALAUR: b_gelkmaros += sLoc.getInfluenceValue(); break; } } break; //======[KALDOR]====== case 600090000: if (sLoc instanceof FortressLocation) { t_kaldor += sLoc.getInfluenceValue(); switch (sLoc.getRace()) { case ELYOS: e_kaldor += sLoc.getInfluenceValue(); break; case ASMODIANS: a_kaldor += sLoc.getInfluenceValue(); break; case BALAUR: b_kaldor += sLoc.getInfluenceValue(); break; } } break; } } //======[ABYSS]========= abyss_e = (e_abyss / t_abyss); abyss_a = (a_abyss / t_abyss); abyss_b = (b_abyss / t_abyss); //======[INGGISON]====== inggison_e = (e_inggison / t_inggison); inggison_a = (a_inggison / t_inggison); inggison_b = (b_inggison / t_inggison); //======[GELKMAROS]===== gelkmaros_e = (e_gelkmaros / t_gelkmaros); gelkmaros_a = (a_gelkmaros / t_gelkmaros); gelkmaros_b = (b_gelkmaros / t_gelkmaros); //======[KALDOR]===== kaldor_e = (e_kaldor / t_kaldor); kaldor_a = (a_kaldor / t_kaldor); kaldor_b = (b_kaldor / t_kaldor); //======[GLOBAL]======== global_e = (kaldor_e * balaurea + inggison_e * balaurea + gelkmaros_e * balaurea + abyss_e * abyss) * 100f; global_a = (kaldor_a * balaurea + inggison_a * balaurea + gelkmaros_a * balaurea + abyss_a * abyss) * 100f; global_b = (kaldor_b * balaurea + inggison_b * balaurea + gelkmaros_b * balaurea + abyss_b * abyss) * 100f; } @SuppressWarnings("unused") private void broadcastInfluencePacket() { SM_INFLUENCE_RATIO pkt = new SM_INFLUENCE_RATIO(); Iterator<Player> iter = World.getInstance().getPlayersIterator(); while (iter.hasNext()) { Player player = iter.next(); PacketSendUtility.sendPacket(player, pkt); } } //=======[GLOBAL]========= //======================== public float getGlobalElyosInfluence() { return global_e; } public float getGlobalAsmodiansInfluence() { return global_a; } public float getGlobalBalaursInfluence() { return global_b; } //========[ABYSS]======== //======================= public float getAbyssElyosInfluence() { return abyss_e; } public float getAbyssAsmodiansInfluence() { return abyss_a; } public float getAbyssBalaursInfluence() { return abyss_b; } //=======[INGGISON]====== //======================= public float getInggisonElyosInfluence() { return inggison_e; } public float getInggisonAsmodiansInfluence() { return inggison_a; } public float getInggisonBalaursInfluence() { return inggison_b; } //======[GELKMAROS]====== //======================= public float getGelkmarosElyosInfluence() { return gelkmaros_e; } public float getGelkmarosAsmodiansInfluence() { return gelkmaros_a; } public float getGelkmarosBalaursInfluence() { return gelkmaros_b; } //=======[KALDOR]======== //======================= public float getKaldorElyosInfluence() { return kaldor_e; } public float getKaldorAsmodiansInfluence() { return kaldor_a; } public float getKaldorBalaursInfluence() { return kaldor_b; } //======[PANESTERRA]===== //======================= public float getBelusElyosInfluence() { return belus_e; } public float getBelusAsmodiansInfluence() { return belus_a; } public float getBelusBalaursInfluence() { return belus_b; } public float getAspidaElyosInfluence() { return aspida_e; } public float getAspidaAsmodiansInfluence() { return aspida_a; } public float getAspidaBalaursInfluence() { return aspida_b; } public float getAtanatosElyosInfluence() { return atanatos_e; } public float getAtanatosAsmodiansInfluence() { return atanatos_a; } public float getAtanatosBalaursInfluence() { return atanatos_b; } public float getDisillonElyosInfluence() { return disillon_e; } public float getDisillonAsmodiansInfluence() { return disillon_a; } public float getDisillonBalaursInfluence() { return disillon_b; } /** * @return float containing dmg modifier for disadvantaged race */ public float getPvpRaceBonus(Race attRace) { float bonus = 1; float elyos = getGlobalElyosInfluence(); float asmo = getGlobalAsmodiansInfluence(); switch (attRace) { case ASMODIANS: if (elyos >= 0.81f && asmo <= 0.10f) { bonus = 1.2f; } else if (elyos >= 0.81f || (elyos >= 0.71f && asmo <= 0.10f)) { bonus = 1.15f; } else if (elyos >= 0.71f) { bonus = 1.1f; } break; case ELYOS: if (asmo >= 0.81f && elyos <= 0.10f) { bonus = 1.2f; } else if (asmo >= 0.81f || (asmo >= 0.71f && elyos <= 0.10f)) { bonus = 1.15f; } else if (asmo >= 0.71f) { bonus = 1.1f; } break; default: break; } return bonus; } }
[ "naxdevil@gmail.com" ]
naxdevil@gmail.com
b4722b162d53a22fe1bd87712cc645d22f1e3fdf
e02830a2147500e8a9d1cbdfde9c380e95b5eecf
/homework/design-pattern-app/src/com/techlabs/template/patterns/Cricket.java
c7233ff804e9456d1d81f161c5859238ba8e5d54
[]
no_license
niluumenat/swabhavNew
9f987e511fde22821edf5a080b0cd3ba1ade02bd
5f51cb9c4f8eed0dd6b19400cba46ba3f6b52771
refs/heads/master
2023-01-09T09:21:11.813973
2019-11-15T13:19:33
2019-11-15T13:19:33
204,118,588
0
0
null
2023-01-07T10:54:34
2019-08-24T06:29:38
HTML
UTF-8
Java
false
false
425
java
package com.techlabs.template.patterns; public class Cricket extends Game { @Override void initialize() { System.out.println("Cricket Game Initialized! Start playing."); } @Override void startPlay() { // TODO Auto-generated method stub System.out.println("Cricket game just started"); } @Override void endPlay() { // TODO Auto-generated method stub System.out.println("Cricket game finished"); } }
[ "menatnilam14@gmail.com" ]
menatnilam14@gmail.com
0f1af225709dcc090a3fb0fd3de6ad10ce745a1e
ff7153b4ac2f1570c4169e167a980fe341c0e101
/Chapter1/AlgorithmsAnalysis/src/Ex_1_4_6.java
afe8d31c26f4db4f0d359fef64dc02781ac2809f
[]
no_license
stafuc/Algorithms-Sedgewick-4th
a802ec1d7bc68a0587b31bad6c01e1b6b4b92c15
4fa4f8c6d0c210f29a16a151a456294dfa4f0d28
refs/heads/master
2020-12-24T13:29:20.076377
2015-03-17T08:28:04
2015-03-17T08:28:04
26,954,531
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
public class Ex_1_4_6 { public static int fun1(int N) { int sum = 0; for (int n = N; n > 0; n /= 2) { for (int i = 0; i < n; i++) { sum++; } } return sum; } public static int fun2(int N){ int sum = 0; for (int i = 1; i < N; i *= 2) { for (int j = 0; j < i; j++) { sum++; } } return sum; } public static int fun3(int N) { int sum = 0; for (int i = 1; i < N; i *= 2) { for (int j = 0; j < N; j++) { sum++; } } return sum; } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub for (int i = 1; i < Integer.MAX_VALUE / 30; i *= 10) { // StdOut.println(i); StopWatch s = new StopWatch(); // fun1(i); StdOut.printf("%5d %5d\n", i, fun3(i)); } } }
[ "stafuc@gmail.com" ]
stafuc@gmail.com
331a8a7079c922610acc12c5e16948b13f181742
b281966951ed991e96066571281d4cf57867b640
/src/main/java/br/com/maisvida/jobapp/service/imp/UserDetailServiceImp.java
094444313cc2f0546cf7ac4026c1accb1f710101
[]
no_license
lucasOliveira91/job-app-backend
93a418529390dc8e416aba51fbb293d475369669
f27a280884271a0a79ac78ca349b8b4b168b56af
refs/heads/master
2020-04-23T17:36:35.485955
2019-02-21T10:58:39
2019-02-21T10:58:39
171,337,502
0
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
package br.com.maisvida.jobapp.service.imp; import br.com.maisvida.jobapp.domain.User; import br.com.maisvida.jobapp.repository.UserRepository; import br.com.maisvida.jobapp.security.UserSS; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; @Service public class UserDetailServiceImp implements UserDetailsService { @Autowired private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { User user = userRepository.findByEmail(email); if(user == null) { throw new UsernameNotFoundException(email); } return new UserSS(user.getId(), user.getEmail(), user.getPassword(), null); } }
[ "ldoliveira91@outlook.com" ]
ldoliveira91@outlook.com
988d7f0e97f33421415858241c5dc9841333d3f2
d250381386ee9be47fb67fa6c7cc451c5cbe2e55
/services/ConnectPoint_Reservation/src/com/gzipcompressiontest/services/connectpoint_reservation/model/datacontract3/RetrieveBalanceResponse.java
4ebce0809b8e1355666ddd1f521297a7ead939fc
[]
no_license
wavemakerapps/Rest_With_Server_calls
2f50e2e46a4951a5521072d598cbd15ada62fb50
9ee4d729ff0b2ace4ac468b949d0071e944ef215
refs/heads/master
2021-05-13T15:42:49.334469
2018-01-09T06:34:36
2018-01-09T06:34:36
116,776,198
0
0
null
null
null
null
UTF-8
Java
false
false
2,894
java
/*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.gzipcompressiontest.services.connectpoint_reservation.model.datacontract3; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import com.gzipcompressiontest.services.connectpoint_reservation.model.datacontract5.ExceptionInformationException; /** * <p>Java class for RetrieveBalanceResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RetrieveBalanceResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Balance" type="{http://www.w3.org/2001/XMLSchema}decimal"/> * &lt;element name="Exceptions" type="{http://schemas.datacontract.org/2004/07/Radixx.ConnectPoint.Exceptions}ExceptionInformation.Exception"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RetrieveBalanceResponse", propOrder = { "balance", "exceptions" }) public class RetrieveBalanceResponse { @XmlElement(name = "Balance", required = true, nillable = true) protected BigDecimal balance; @XmlElement(name = "Exceptions", required = true, nillable = true) protected ExceptionInformationException exceptions; /** * Gets the value of the balance property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getBalance() { return balance; } /** * Sets the value of the balance property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setBalance(BigDecimal value) { this.balance = value; } /** * Gets the value of the exceptions property. * * @return * possible object is * {@link ExceptionInformationException } * */ public ExceptionInformationException getExceptions() { return exceptions; } /** * Sets the value of the exceptions property. * * @param value * allowed object is * {@link ExceptionInformationException } * */ public void setExceptions(ExceptionInformationException value) { this.exceptions = value; } }
[ "appTest1@wavemaker.com" ]
appTest1@wavemaker.com
ad8b5c1aa1c4ea425ac7da206ea8b60904c04876
bd497fa56eb59116a9cf060c7fb9e195c91be4a4
/app/src/main/java/com/hmw/mytoutiaoapp/database/table/MediaChannelTable.java
d616992eaded94dea35ee3f5d4490ea481b38821
[ "Apache-2.0" ]
permissive
hanmingwang/MyToutiaoApp
35654ef1a9a9095e8a1aa20920fc672cf5a81cd7
a5fe4b0f22994da835c3ed70ee29e8c85eb674df
refs/heads/master
2020-03-19T06:05:39.398299
2018-06-26T02:11:07
2018-06-26T02:11:07
135,990,008
0
0
null
null
null
null
UTF-8
Java
false
false
1,356
java
package com.hmw.mytoutiaoapp.database.table; /** * Created by han on 2018/6/6. */ public class MediaChannelTable { /** * 头条号信息表 */ public static final String TABLENAME = "MediaChannelTable"; /** * 字段部分 */ public static final String ID = "id"; public static final String NAME = "name"; public static final String AVATAR = "avatar"; public static final String TYPE = "type"; public static final String FOLLOWCOUNT = "followCount"; public static final String DESCTEXT = "descText"; public static final String URL = "url"; /** * 字段ID 数据库操作建立字段对应关系 从0开始 */ public static final int ID_ID = 0; public static final int ID_NAME = 1; public static final int ID_AVATAR = 2; public static final int ID_TYPE = 3; public static final int ID_FOLLOWCOUNT = 4; public static final int ID_DESCTEXT = 5; public static final int ID_URL = 6; /** * 创建表 */ public static final String CREATE_TABLE = "create table if not exists " + TABLENAME + "(" + ID + " text primary key, " + NAME + " text, " + AVATAR + " text, " + TYPE + " text, " + FOLLOWCOUNT + " text, " + DESCTEXT + " text, " + URL + " text) "; }
[ "you@example.com" ]
you@example.com