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
ff0c1e791927dccb4da39e81631006e699d615dc
5d76b555a3614ab0f156bcad357e45c94d121e2d
/src-v3/com/crumby/lib/router/AssetWrapper.java
0c206aa5355551ca6ffed8c25741b0d6b48f652e
[]
no_license
BinSlashBash/xcrumby
8e09282387e2e82d12957d22fa1bb0322f6e6227
5b8b1cc8537ae1cfb59448d37b6efca01dded347
refs/heads/master
2016-09-01T05:58:46.144411
2016-02-15T13:23:25
2016-02-15T13:23:25
51,755,603
5
1
null
null
null
null
UTF-8
Java
false
false
521
java
package com.crumby.lib.router; import android.content.res.AssetManager; import java.io.IOException; import java.io.InputStream; public class AssetWrapper implements FileOpener { private AssetManager manager; public AssetWrapper(AssetManager manager) { this.manager = manager; } public InputStream open(String filename) { try { return this.manager.open(filename); } catch (IOException e) { e.printStackTrace(); return null; } } }
[ "binslashbash@otaking.top" ]
binslashbash@otaking.top
c97ff1ce4eb574963480e6bc727b80c5d17ecae8
53f3d495ee5f3499f0587cb0e652999d1dcdc155
/app/src/main/java/com/example/admin/myappwechat/fragment/WeChatFragment.java
4268e5af5e0d0c65ba8cc294b88fc9b619ffad84
[]
no_license
yuxh3/MyAppWeChat
6cfaca69ed4464f6a5322083560de7b19f63a31a
23bdd7d86b3cba5c248a21b2353be4d67312420e
refs/heads/master
2020-05-29T14:41:19.042689
2016-07-13T05:42:08
2016-07-13T05:42:08
63,217,235
1
0
null
null
null
null
UTF-8
Java
false
false
2,269
java
package com.example.admin.myappwechat.fragment; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.widget.ImageButton; import android.widget.PopupWindow; import android.widget.RelativeLayout; import com.example.admin.myappwechat.R; import com.example.admin.myappwechat.ui.WeChatDatilActivity; import butterknife.Bind; import butterknife.OnClick; /** * Created by admin on 2016/7/7. */ public class WeChatFragment extends BaseFragment { @Bind(R.id.right_btn) ImageButton rightBtn; @Bind(R.id.rl_wechat) RelativeLayout rlWechat; private PopupWindow pop; private View view1; @Override public View initView(LayoutInflater inflater) { View view = inflater.inflate(R.layout.viewpager_wechat, null); return view; } @Override protected void initDate() { } @OnClick({R.id.right_btn, R.id.rl_wechat}) public void onClick(View view) { switch (view.getId()) { case R.id.right_btn: view1 = View.inflate(getContext(), R.layout.pop_fragment, null); if (pop == null){ pop = new PopupWindow(view1,260,340); } pop.setFocusable(true); pop.setTouchable(true); pop.setAnimationStyle(R.style.popwin_anim_style); pop.showAsDropDown(rightBtn,-180,10); pop.setOutsideTouchable(true); pop.setBackgroundDrawable(new ColorDrawable(0x00000000)); view1.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (pop != null | pop.isShowing()) { pop.dismiss(); pop = null; } return false; } }); break; case R.id.rl_wechat: Intent intent = new Intent(getContext(),WeChatDatilActivity.class); startActivity(intent); break; } } }
[ "yuxh3@lenovo.com" ]
yuxh3@lenovo.com
c9a7030075443947ee5eccb4237ce8453f2905cf
3c36c9c7be3ffb4874f6c4d08cf69bb9c2f62406
/icm-parent/icm-core/src/main/java/com/github/jochenw/icm/core/impl/plugins/DefaultSqlStatementExecutor.java
68aa595764f4e031a35a38c03ba82858eefc7efe
[ "Apache-2.0" ]
permissive
jochenw/icm
72466df6daf32a40ea8b38e3854a96f00e49cf7c
000318976d3449b77c6b568020cafc9b53e430f6
refs/heads/master
2021-12-26T16:03:01.201541
2021-07-08T15:23:40
2021-07-08T15:23:40
144,324,302
0
0
Apache-2.0
2021-12-14T20:33:03
2018-08-10T19:21:51
Java
UTF-8
Java
false
false
898
java
package com.github.jochenw.icm.core.impl.plugins; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import com.github.jochenw.icm.core.api.cf.InjectLogger; import com.github.jochenw.icm.core.api.log.IcmLogger; import com.github.jochenw.icm.core.api.plugins.SqlStatementExecutor; public class DefaultSqlStatementExecutor implements SqlStatementExecutor { @InjectLogger private IcmLogger logger; @Override public void execute(Connection pConnection, String pStatement) throws SQLException { logger.debug(pStatement); try (PreparedStatement stmt = pConnection.prepareStatement(pStatement)) { stmt.executeUpdate(); } } @Override public PreparedStatement prepare(Connection pConnection, String pStatement) throws SQLException { logger.debug(pStatement); return pConnection.prepareStatement(pStatement); } }
[ "jochen.wiedmann@softwareag.com" ]
jochen.wiedmann@softwareag.com
1260b6357b1fc6de1f618c84c867572f7c6eee4e
1e4aa0789bf1af0385855ceda183fd99fc52b762
/CustomervisitApp/src/jp/co/hiroshimabank/services/ScheduleServices.java
6796b1bce3df00d73dce82463324d66d5fe3b6fd
[]
no_license
dittyQu/RouteOptimizer
ca96cd9083c382dc6fc9411cc520d3b77a83526c
6e83c46a926811002ce638cd078845f63159f72d
refs/heads/master
2016-09-05T11:06:16.258154
2015-05-05T13:43:49
2015-05-05T13:43:49
35,099,763
0
0
null
null
null
null
UTF-8
Java
false
false
19,483
java
/** * スケジュールに関連するリクエストを受け付けるクラスです。 */ package jp.co.hiroshimabank.services; import java.sql.Connection; import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Map; import javax.ws.rs.Consumes; import javax.ws.rs.CookieParam; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.NewCookie; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import jp.co.hiroshimabank.bean.Constant; import jp.co.hiroshimabank.bean.Event; import jp.co.hiroshimabank.dao.CustomerDAO; import jp.co.hiroshimabank.dao.EventDAO; import jp.co.hiroshimabank.db.DBAccessor; import jp.co.hiroshimabank.dto.EventDTO; import jp.co.hiroshimabank.utils.DateUtils; import jp.co.hiroshimabank.utils.LogUtils; import jp.co.hiroshimabank.utils.TokenNotUpdatedException; import jp.co.hiroshimabank.utils.UserNotLoginException; /** * @author 日本IBM 梅沢 * */ @Path("/schedule") public class ScheduleServices { @Context UriInfo uriInfo; /** * イベントを複数件移動時間も込みでスケジュールに登録します。 * * @param customerId * お客様ID * @param time * お客様会議時間(単位は分) * @param duration * 移動時間(単位は秒) * @return */ @Path("/initevents") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response initializeSchedule(@FormParam("id") int[] customerId, @FormParam("time") int[] time, @FormParam("duration") int[] duration,@CookieParam("HBank Agent") String cookie) { // public Response initializeSchedule(@FormParam("id") int[] customerId, // @FormParam("time") int[] time, @FormParam("duration") int[] duration) { // ユーザがログイン済みか、ログインしてから30分たっているか確認します。 int userId = 0; NewCookie updatedcookie=null; try { Map<String, String> token = GenericServiceUtils.addToken(cookie); // クッキーに入っている値を初期化します。 updatedcookie = new NewCookie("HBank Agent", token.get("token"), "/Customervist/", uriInfo.getBaseUri().getHost(), null, 30*60, false); userId = Integer.parseInt(token.get("userId")); LogUtils.print("トークン発行 :" + updatedcookie); } catch (TokenNotUpdatedException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } catch (UserNotLoginException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } int visitCount = customerId.length; List<EventDTO> listevents = new ArrayList<EventDTO>(); DBAccessor accessor = new DBAccessor(); Connection conn = accessor.getConnection(); try { List<EventDTO> tmp = new ArrayList<EventDTO>(); Calendar calendar = DateUtils.getCalender(); for (int i = 0; i < visitCount; i++) { if (i == 0) { listevents = generateEventDTO(conn, userId, customerId[i], time[i], duration[i], DateUtils.getTimestamp(calendar), calendar); } else { calendar.add(Calendar.MINUTE, DateUtils.INTERVALEVENT); tmp = generateEventDTO(conn, userId, customerId[i], time[i], duration[i], DateUtils.getTimestamp(calendar), calendar); for (int j = 0; j < tmp.size(); j++) { listevents.add(tmp.get(j)); } } } EventDAO eventDao = new EventDAO(conn); eventDao.addEvents(listevents); conn.commit(); } catch (Exception e) { try { conn.rollback(); } catch (Exception e2) { LogUtils.print(e2); } return Response.status(500).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); // return Response.status(500).build(); } finally { try { conn.close(); } catch (Exception e2) { LogUtils.print(e2); } } return Response.ok().header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); // return Response.ok().build(); } /** * イベントを一件移動時間も込みでスケジュールに登録します。 * * @param customerId * お客様ID * @param time * お客様会議時間(単位は分) * @param duration * 移動時間(単位は秒) * @return */ @Path("/initevent") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response initializeSchedule(@FormParam("id") int customerId, @FormParam("time") int time, @FormParam("duration") int duration,@CookieParam("HBank Agent") String cookie) { // public Response initializeSchedule(@FormParam("id") int customerId, // @FormParam("time") int time, @FormParam("duration") int duration) { // ユーザがログイン済みか、ログインしてから30分たっているか確認します。 int userId = 0; NewCookie updatedcookie=null; try { Map<String, String> token = GenericServiceUtils.addToken(cookie); // クッキーに入っている値を初期化します。 updatedcookie = new NewCookie("HBank Agent", token.get("token"), "/Customervist/", uriInfo.getBaseUri().getHost(), null, 30*60, false); userId = Integer.parseInt(token.get("userId")); LogUtils.print("トークン発行 :" + updatedcookie); } catch (TokenNotUpdatedException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } catch (UserNotLoginException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } DBAccessor accessor = new DBAccessor(); Connection conn = accessor.getConnection(); try { // イベント登録 List<EventDTO> listevents = new ArrayList<EventDTO>(); Calendar calendar = DateUtils.getCalender(); listevents = generateEventDTO(conn, userId, customerId, time, duration, DateUtils.getTimestamp(calendar), calendar); EventDAO eventDao = new EventDAO(conn); eventDao.addEvents(listevents); conn.commit(); } catch (Exception e) { try { conn.rollback(); } catch (Exception e2) { LogUtils.print(e2); } // return Response.status(500).build(); return Response.status(500).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } finally { try { conn.close(); } catch (Exception e2) { LogUtils.print(e2); } } // return Response.ok().build(); return Response.ok().header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } /** * 指定した期間のイベント情報をすべて取得します。 * * @param start * 指定した期間開始時間(ミリ秒) * @param end * 指定した期間終了時間(ミリ秒) * @return */ @Path("/event") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response initializeSchedule(@FormParam("start") String start, @FormParam("end") String end,@CookieParam("HBank Agent") String cookie) { // public Response initializeSchedule(@FormParam("start") String start, // @FormParam("end") String end) { // ユーザがログイン済みか、ログインしてから30分たっているか確認します。 int userId = 0; NewCookie updatedcookie=null; try { Map<String, String> token = GenericServiceUtils.addToken(cookie); // クッキーに入っている値を初期化します。 updatedcookie = new NewCookie("HBank Agent", token.get("token"), "/Customervist/", uriInfo.getBaseUri().getHost(), null, 30*60, false); userId = Integer.parseInt(token.get("userId")); LogUtils.print("トークン発行 :" + updatedcookie); } catch (TokenNotUpdatedException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } catch (UserNotLoginException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } List<EventDTO> events = new ArrayList<EventDTO>(); DBAccessor accessor = new DBAccessor(); Connection conn = accessor.getConnection(); try { EventDAO eventDao = new EventDAO(conn); // イベント取得 Calendar calendar = DateUtils.getCalender(); calendar.setTimeInMillis(Long.parseLong(start)); Timestamp startTime = DateUtils.getTimestamp(calendar); calendar.setTimeInMillis(Long.parseLong(end)); Timestamp endTime = DateUtils.getTimestamp(calendar); events = eventDao.getEventLists(userId, startTime, endTime); conn.commit(); } catch (SQLException e) { try { conn.rollback(); } catch (Exception e2) { LogUtils.print(e2); } // return Response.status(500).build(); return Response.status(500).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } finally { try { conn.close(); } catch (Exception e2) { LogUtils.print(e2); } } // 画面Beanに変換 List<Event> listEvent = convertEvetList(events); // return Response.ok(listEvent).build(); return Response.ok(listEvent).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } /** * イベント情報を更新します。 * * @param eventId * イベントID * @param title * イベントタイトル * @param start * イベント開始時間 * @param end * イベント終了時間 * @return */ @Path("/update") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response updateSchedule(@FormParam("id") String eventId, @FormParam("title") String title, @FormParam("start") String start, @FormParam("end") String end,@CookieParam("HBank Agent") String cookie) { // public Response updateSchedule(@FormParam("id") String eventId, // @FormParam("title") String title, @FormParam("start") String start, // @FormParam("end") String end) { // ユーザがログイン済みか、ログインしてから30分たっているか確認します。 int userId = 0; NewCookie updatedcookie=null; try { Map<String, String> token = GenericServiceUtils.addToken(cookie); // クッキーに入っている値を初期化します。 updatedcookie = new NewCookie("HBank Agent", token.get("token"), "/Customervist/", uriInfo.getBaseUri().getHost(), null, 30*60, false); userId = Integer.parseInt(token.get("userId")); LogUtils.print("トークン発行 :" + updatedcookie); } catch (TokenNotUpdatedException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } catch (UserNotLoginException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } // 入力チェック if (title == null || "".equals(title)) { // タイトルがnullもしくは空ならばエラー // return Response.status(400).build(); return Response.status(400).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } if (DateUtils.toDateFromString(start, DateUtils.DATE_FORM_007) == null) { // フォーマットが指定以外ならばエラー // return Response.status(400).build(); return Response.status(400).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } if (DateUtils.toDateFromString(end, DateUtils.DATE_FORM_007) == null) { // フォーマットが指定以外ならばエラー // return Response.status(400).build(); return Response.status(400).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } if (DateUtils.toDateFromString(start, DateUtils.DATE_FORM_007) .getTime() > DateUtils.toDateFromString(end, DateUtils.DATE_FORM_007).getTime()) { // スタート時間がエンド時間よりも未来ならばエラー // return Response.status(400).build(); return Response.status(400).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } DBAccessor accessor = new DBAccessor(); Connection conn = accessor.getConnection(); try { EventDTO eventDto = new EventDTO(); eventDto.setEventId(eventId); eventDto.setUserId(userId); eventDto.setEventName(title); Calendar calendar = DateUtils.getCalender(); calendar.setTime(DateUtils.toDateFromString(start, DateUtils.DATE_FORM_007)); eventDto.setEventStartTime(DateUtils.getTimestamp(calendar)); calendar.setTime(DateUtils.toDateFromString(end, DateUtils.DATE_FORM_007)); eventDto.setEventEndTime(DateUtils.getTimestamp(calendar)); EventDAO eventDao = new EventDAO(conn); // イベント更新 eventDao.updateEvent(eventDto); conn.commit(); } catch (Exception e) { try { conn.rollback(); } catch (Exception e2) { LogUtils.print(e2); } // return Response.status(500).build(); return Response.status(500).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } finally { try { conn.close(); } catch (Exception e2) { LogUtils.print(e2); } } // return Response.ok().build(); return Response.ok().header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } /** * イベント詳細情報を取得します。 * * @param eventId * イベントID * @return */ @Path("/detail") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response getEventDetail(@FormParam("eventId") String eventId,@CookieParam("HBank Agent") String cookie) { // public Response getEventDetail(@FormParam("eventId") String eventId) { // ユーザがログイン済みか、ログインしてから30分たっているか確認します。 int userId = 0; NewCookie updatedcookie=null; try { Map<String, String> token = GenericServiceUtils.addToken(cookie); // クッキーに入っている値を初期化します。 updatedcookie = new NewCookie("HBank Agent", token.get("token"), "/Customervist/", uriInfo.getBaseUri().getHost(), null, 30*60, false); userId = Integer.parseInt(token.get("userId")); LogUtils.print("トークン発行 :" + updatedcookie); } catch (TokenNotUpdatedException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } catch (UserNotLoginException e) { //return Response.status(401).build(); return Response.status(401).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } // 入力チェック if (eventId == null || "".equals(eventId)) { // タイトルがnullもしくは空ならばエラー // return Response.status(400).build(); return Response.status(400).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } DBAccessor accessor = new DBAccessor(); Connection conn = accessor.getConnection(); EventDTO eventDto = new EventDTO(); try { EventDAO eventDao = new EventDAO(conn); // イベント更新 eventDto = eventDao.getEventDetail(eventId, userId); conn.commit(); } catch (Exception e) { try { conn.rollback(); } catch (Exception e2) { LogUtils.print(e2); } // return Response.status(500).build(); return Response.status(500).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } finally { try { conn.close(); } catch (Exception e2) { LogUtils.print(e2); } } // return Response.ok(eventDto).build(); return Response.ok(eventDto).header("Set-Cookie", updatedcookie.toString() + ";HttpOnly").build(); } /** * DTOからBeanに変換します。 * * @param events * イベントリスト * @return 表示するイベントリスト */ private List<Event> convertEvetList(List<EventDTO> events) { List<Event> listEvent = new ArrayList<Event>(); for (EventDTO dto : events) { Event event = new Event(); event.setId(dto.getEventId()); event.setTitle(dto.getEventName()); event.setStart(DateUtils.getDate2(dto.getEventStartTime())); event.setEnd(DateUtils.getDate2(dto.getEventEndTime())); event.setTextColor(Constant.TEXTCOLOR); event.setBackgroundColor(event.generateColor(event.getEnd(), event.getId())); event.setBorderColor(event.generateColor(event.getEnd(), event.getId())); event.setEditable(false); listEvent.add(event); } return listEvent; } /** * 追加するイベントのリストを作成します。 * * @param conn * DBとのコネクション * @param userId * ユーザID * @param customerId * お客様Id * @param time * お客様会議時間(単位は分) * @param duration * 移動時間(単位は秒) * @param startTime * イベント(移動+イベント)開始時間 * @return */ private List<EventDTO> generateEventDTO(Connection conn, int userId, int customerId, int time, int duration, Timestamp startTime, Calendar calendar) throws SQLException { List<EventDTO> listevents = new ArrayList<EventDTO>(); // お客様住所名前取得 CustomerDAO customerDao = new CustomerDAO(conn); String address = customerDao.getCustomerAddressName(customerId) .getCustomerAddress(); String name = customerDao.getCustomerAddressName(customerId) .getCustomerName(); // イベント登録 // 移動イベント EventDTO moveEventDto = new EventDTO(); moveEventDto.setEventId(moveEventDto.generateId("move", customerId)); moveEventDto.setUserId(userId); moveEventDto.setEventStartTime(startTime); calendar.add(Calendar.SECOND, duration); moveEventDto.setEventEndTime(DateUtils.getTimestamp(calendar)); moveEventDto.setEventLocation(address); moveEventDto.setEventName(setEventName("move", name)); listevents.add(moveEventDto); // 会議イベント EventDTO meetingEvent = new EventDTO(); meetingEvent.setEventId(meetingEvent.generateId("meeting", customerId)); meetingEvent.setUserId(userId); calendar.add(Calendar.MINUTE, DateUtils.INTERVALMOVE); meetingEvent.setEventStartTime(DateUtils.getTimestamp(calendar)); calendar.add(Calendar.MINUTE, time); meetingEvent.setEventEndTime(DateUtils.getTimestamp(calendar)); meetingEvent.setEventLocation(address); meetingEvent.setEventName(setEventName("meeting", name)); listevents.add(meetingEvent); return listevents; } /** * イベントの名前を作成します。 * * @param eventType * イベントタイプ move or meeting * @param customerName * お客様名 * @return */ private String setEventName(String eventType, String customerName) { String eventName = ""; if ("move".equals(eventType)) { return eventName + customerName + "様先へ " + Constant.MOVE; } else if ("meeting".equals(eventType)) { return eventName + customerName + "様先へ " + Constant.MEETING; } else { return eventName; } } }
[ "ditty.qu@gmail.com" ]
ditty.qu@gmail.com
cbfcc5e4bfb655f82cfac6734a6b6038ee3f453a
d4183c6d08c9c9569b6167983b825d032305a50e
/app/src/main/java/com/copasso/chaoniu/utils/GlideCacheUtil.java
7c8b62b395898c1210042e9f7bb5cda24444ff12
[]
no_license
dc9669/chaoniu
3ca5b26c963fd688ffcc6a5c06d0fa9b97e6b24b
a8f79c5978d777ba4f6a714478aa8eca3234e6a1
refs/heads/master
2022-06-24T07:17:45.208407
2020-05-06T09:37:03
2020-05-06T09:37:14
259,568,312
0
0
null
null
null
null
UTF-8
Java
false
false
5,299
java
package com.copasso.chaoniu.utils; import android.content.Context; import android.os.Looper; import android.text.TextUtils; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.cache.ExternalCacheDiskCacheFactory; import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory; import java.io.File; import java.math.BigDecimal; /**Glide缓存工具类 * Created by zhouas666 on 2018/1/14. */ public class GlideCacheUtil { private static GlideCacheUtil inst; public static GlideCacheUtil getInstance() { if (inst == null) { inst = new GlideCacheUtil(); } return inst; } /** * 清除图片磁盘缓存 */ public void clearImageDiskCache(final Context context) { try { if (Looper.myLooper() == Looper.getMainLooper()) { new Thread(new Runnable() { @Override public void run() { Glide.get(context).clearDiskCache(); // BusUtil.getBus().post(new GlideCacheClearSuccessEvent()); } }).start(); } else { Glide.get(context).clearDiskCache(); } } catch (Exception e) { e.printStackTrace(); } } /** * 清除图片内存缓存 */ public void clearImageMemoryCache(Context context) { try { if (Looper.myLooper() == Looper.getMainLooper()) { //只能在主线程执行 Glide.get(context).clearMemory(); } } catch (Exception e) { e.printStackTrace(); } } /** * 清除图片所有缓存 */ public void clearImageAllCache(Context context) { clearImageDiskCache(context); clearImageMemoryCache(context); String ImageExternalCatchDir = context.getExternalCacheDir() + ExternalCacheDiskCacheFactory.DEFAULT_DISK_CACHE_DIR; deleteFolderFile(ImageExternalCatchDir, true); } /** * 获取Glide造成的缓存大小 * * @return CacheSize */ public String getCacheSize(Context context) { try { return getFormatSize(getFolderSize(new File(context.getCacheDir() + "/" + InternalCacheDiskCacheFactory.DEFAULT_DISK_CACHE_DIR))); } catch (Exception e) { e.printStackTrace(); } return "0.00 byte"; } /** * 获取指定文件夹内所有文件大小的和 * * @param file file * @return size * @throws Exception */ private long getFolderSize(File file) throws Exception { long size = 0; try { File[] fileList = file.listFiles(); for (File aFileList : fileList) { if (aFileList.isDirectory()) { size = size + getFolderSize(aFileList); } else { size = size + aFileList.length(); } } } catch (Exception e) { e.printStackTrace(); } return size; } /** * 删除指定目录下的文件,这里用于缓存的删除 * * @param filePath filePath * @param deleteThisPath deleteThisPath */ private void deleteFolderFile(String filePath, boolean deleteThisPath) { if (!TextUtils.isEmpty(filePath)) { try { File file = new File(filePath); if (file.isDirectory()) { File files[] = file.listFiles(); for (File file1 : files) { deleteFolderFile(file1.getAbsolutePath(), true); } } if (deleteThisPath) { if (!file.isDirectory()) { file.delete(); } else { if (file.listFiles().length == 0) { file.delete(); } } } } catch (Exception e) { e.printStackTrace(); } } } /** * 格式化单位 * * @param size size * @return size */ private static String getFormatSize(double size) { double kiloByte = size / 1024; if (kiloByte < 1) { return size + "Byte"; } double megaByte = kiloByte / 1024; if (megaByte < 1) { BigDecimal result1 = new BigDecimal(Double.toString(kiloByte)); return result1.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "KB"; } double gigaByte = megaByte / 1024; if (gigaByte < 1) { BigDecimal result2 = new BigDecimal(Double.toString(megaByte)); return result2.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "MB"; } double teraBytes = gigaByte / 1024; if (teraBytes < 1) { BigDecimal result3 = new BigDecimal(Double.toString(gigaByte)); return result3.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "GB"; } BigDecimal result4 = new BigDecimal(teraBytes); return result4.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "TB"; } }
[ "1139485407@qq.com" ]
1139485407@qq.com
2af6b19f9ba1bb0b049e27ec57073632210877d5
c3fffb9250f190c993eedf8b76060784fb7c8b22
/app/src/main/java/uk/ac/cam/cl/lm649/bonjourtesting/messaging/jpake/JPAKEClient.java
b43e0158458b99b66f7d16a73d263a478dabce71
[ "Apache-2.0" ]
permissive
laszlomakk/BonjourKeyGossiping
29d46fc4b98a2cfe0380b8e1af6cdda03d2e1259
ee0eeff988d4fd323705b904ecaa3d72d2f0f546
refs/heads/master
2021-07-25T21:36:13.761113
2017-11-05T18:34:39
2017-11-05T18:34:39
109,604,055
0
0
null
null
null
null
UTF-8
Java
false
false
12,892
java
package uk.ac.cam.cl.lm649.bonjourtesting.messaging.jpake; import android.support.annotation.NonNull; import org.bouncycastle.crypto.CryptoException; import org.bouncycastle.crypto.Digest; import org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant; import org.bouncycastle.crypto.agreement.jpake.JPAKEPrimeOrderGroup; import org.bouncycastle.crypto.agreement.jpake.JPAKEPrimeOrderGroups; import org.bouncycastle.crypto.agreement.jpake.JPAKERound1Payload; import org.bouncycastle.crypto.agreement.jpake.JPAKERound2Payload; import org.bouncycastle.crypto.agreement.jpake.JPAKERound3Payload; import org.bouncycastle.crypto.digests.SHA256Digest; import java.io.IOException; import java.math.BigInteger; import java.security.SecureRandom; import java.util.Locale; import java.util.UUID; import uk.ac.cam.cl.lm649.bonjourtesting.Constants; import uk.ac.cam.cl.lm649.bonjourtesting.messaging.MsgClient; import uk.ac.cam.cl.lm649.bonjourtesting.messaging.messages.Message; import uk.ac.cam.cl.lm649.bonjourtesting.messaging.messages.types.MsgJPAKERound1; import uk.ac.cam.cl.lm649.bonjourtesting.messaging.messages.types.MsgJPAKERound2; import uk.ac.cam.cl.lm649.bonjourtesting.messaging.messages.types.MsgJPAKERound3; import uk.ac.cam.cl.lm649.bonjourtesting.util.FLogger; public class JPAKEClient { private static final String TAG = "JPAKEClient"; private JPAKEParticipant participant; private final String myParticipantId; private final String otherParticipantId; public final boolean iAmTheInitiator; public final String sharedSecret; private BigInteger keyingMaterial; private byte[] sessionKey = null; private boolean retrievedSessionKey = false; private final UUID handshakeId; private final String strHandshakeId; private final long creationTime; public static final long TIMEOUT_IN_MSEC = 5 * Constants.MSECONDS_IN_MINUTE; public enum State { INITIALISED, ROUND_1_SEND, ROUND_1_RECEIVE, ROUND_2_SEND, ROUND_2_RECEIVE, ROUND_3_SEND, ROUND_3_RECEIVE, FINISHED, FAILED } // note: being in a state shows what the last thing we did is // e.g. being in state State.ROUND_1_SEND means round1Send() has already been called private State state = State.INITIALISED; protected JPAKEClient(boolean iAmTheInitiator, UUID handshakeId, @NonNull String sharedSecret) { this.iAmTheInitiator = iAmTheInitiator; if (iAmTheInitiator) { myParticipantId = "alice"; otherParticipantId = "bob"; } else { myParticipantId = "bob"; otherParticipantId = "alice"; } this.handshakeId = handshakeId; this.strHandshakeId = createHandshakeIdLogString(handshakeId); creationTime = android.os.SystemClock.elapsedRealtime(); this.sharedSecret = sharedSecret; initJPAKEParticipant(sharedSecret); FLogger.d(TAG, "JPAKEClient created. sharedSecret: " + sharedSecret + strHandshakeId); } private void initJPAKEParticipant(@NonNull String sharedSecret) { JPAKEPrimeOrderGroup group = JPAKEPrimeOrderGroups.NIST_3072; Digest digest = new SHA256Digest(); SecureRandom random = new SecureRandom(); participant = new JPAKEParticipant( myParticipantId, sharedSecret.toCharArray(), group, digest, random); } public synchronized boolean round1Send(@NonNull MsgClient msgClient) throws IOException { FLogger.d(TAG, "round1Send() called while in state: " + state + strHandshakeId); if (state == State.ROUND_1_SEND) return true; if (state != State.INITIALISED) { FLogger.w(TAG, "round1Send() called in invalid state " + state.name() + strHandshakeId); return false; } JPAKERound1Payload round1Payload = participant.createRound1PayloadToSend(); Message msg = new MsgJPAKERound1( handshakeId, round1Payload.getGx1(), round1Payload.getGx2(), round1Payload.getKnowledgeProofForX1(), round1Payload.getKnowledgeProofForX2() ); msgClient.sendMessage(msg); state = State.ROUND_1_SEND; return true; } private synchronized boolean _round1Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound1 msg) throws CryptoException { FLogger.d(TAG, "round1Receive() called while in state: " + state + strHandshakeId); switch (state) { case INITIALISED: try { round1Send(msgClient); } catch (IOException e) { FLogger.e(TAG, "round1Receive() tried to call round1Send() but IOE - " + e + strHandshakeId); return false; } break; case ROUND_1_SEND: break; default: FLogger.w(TAG, "round1Receive() called while in state " + state.name() + strHandshakeId); return false; } if (state != State.ROUND_1_SEND) throw new IllegalStateException("state: " + state); JPAKERound1Payload round1Payload = new JPAKERound1Payload( otherParticipantId, msg.gx1, msg.gx2, msg.knowledgeProofForX1, msg.knowledgeProofForX2); participant.validateRound1PayloadReceived(round1Payload); state = State.ROUND_1_RECEIVE; return true; } /** * @return whether validation succeeded */ public boolean round1Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound1 msg) { try { return _round1Receive(msgClient, msg); } catch (CryptoException e) { state = State.FAILED; FLogger.w(TAG, String.format(Locale.US, "round1Receive(). validation failed. IP: %s, oParticipantId: %s, Exception: %s" + strHandshakeId, msgClient.strSocketAddress, otherParticipantId, e)); return false; } } public synchronized boolean round2Send(@NonNull MsgClient msgClient) throws IOException { FLogger.d(TAG, "round2Send() called while in state: " + state + strHandshakeId); if (state == State.ROUND_2_SEND) return true; if (state != State.ROUND_1_RECEIVE) { FLogger.w(TAG, "round2Send() called in invalid state " + state.name() + strHandshakeId); return false; } JPAKERound2Payload round2Payload = participant.createRound2PayloadToSend(); Message msg = new MsgJPAKERound2( handshakeId, round2Payload.getA(), round2Payload.getKnowledgeProofForX2s() ); msgClient.sendMessage(msg); state = State.ROUND_2_SEND; return true; } private synchronized boolean _round2Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound2 msg) throws CryptoException { FLogger.d(TAG, "round2Receive() called while in state: " + state + strHandshakeId); switch (state) { case ROUND_1_RECEIVE: try { round2Send(msgClient); } catch (IOException e) { FLogger.e(TAG, "round2Receive() tried to call round2Send() but IOE - " + e + strHandshakeId); return false; } break; case ROUND_2_SEND: break; default: FLogger.w(TAG, "round2Receive() called while in state " + state.name() + strHandshakeId); return false; } if (state != State.ROUND_2_SEND) throw new IllegalStateException("state: " + state); JPAKERound2Payload round2Payload = new JPAKERound2Payload(otherParticipantId, msg.a, msg.knowledgeProofForX2s); participant.validateRound2PayloadReceived(round2Payload); calcKeyingMaterial(); state = State.ROUND_2_RECEIVE; return true; } /** * @return whether validation succeeded */ public boolean round2Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound2 msg) { try { return _round2Receive(msgClient, msg); } catch (CryptoException e) { state = State.FAILED; FLogger.w(TAG, String.format(Locale.US, "round2Receive(). validation failed. IP: %s, oParticipantId: %s, Exception: %s" + strHandshakeId, msgClient.strSocketAddress, otherParticipantId, e)); return false; } } private synchronized void calcKeyingMaterial() { keyingMaterial = participant.calculateKeyingMaterial(); sessionKey = deriveSessionKey(keyingMaterial); } public synchronized boolean round3Send(@NonNull MsgClient msgClient) throws IOException { FLogger.d(TAG, "round3Send() called while in state: " + state + strHandshakeId); if (state == State.ROUND_3_SEND) return true; if (state != State.ROUND_2_RECEIVE) { FLogger.w(TAG, "round3Send() called in invalid state " + state.name() + strHandshakeId); return false; } JPAKERound3Payload round3Payload = participant.createRound3PayloadToSend(keyingMaterial); Message msg = new MsgJPAKERound3( handshakeId, round3Payload.getMacTag()); msgClient.sendMessage(msg); state = State.ROUND_3_SEND; return true; } private synchronized boolean _round3Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound3 msg) throws CryptoException { FLogger.d(TAG, "round3Receive() called while in state: " + state + strHandshakeId); switch (state) { case ROUND_2_RECEIVE: try { round3Send(msgClient); } catch (IOException e) { FLogger.e(TAG, "round3Receive() tried to call round3Send() but IOE - " + e + strHandshakeId); return false; } break; case ROUND_3_SEND: break; default: FLogger.w(TAG, "round3Receive() called while in state " + state.name() + strHandshakeId); return false; } if (state != State.ROUND_3_SEND) throw new IllegalStateException("state: " + state); JPAKERound3Payload round3Payload = new JPAKERound3Payload(otherParticipantId, msg.macTag); participant.validateRound3PayloadReceived(round3Payload, keyingMaterial); state = State.ROUND_3_RECEIVE; if (retrievedSessionKey) { state = State.FINISHED; } return true; } /** * @return whether validation succeeded */ public boolean round3Receive(@NonNull MsgClient msgClient, @NonNull MsgJPAKERound3 msg) { try { return _round3Receive(msgClient, msg); } catch (CryptoException e) { state = State.FAILED; FLogger.w(TAG, String.format(Locale.US, "round3Receive(). validation failed. IP: %s, oParticipantId: %s, Exception: %s" + strHandshakeId, msgClient.strSocketAddress, otherParticipantId, e)); return false; } } // TODO use a secure key derivation function private static byte[] deriveSessionKey(@NonNull BigInteger keyingMaterial) { SHA256Digest digest = new SHA256Digest(); byte[] keyByteArray = keyingMaterial.toByteArray(); byte[] output = new byte[digest.getDigestSize()]; digest.update(keyByteArray, 0, keyByteArray.length); digest.doFinal(output, 0); return output; } public byte[] getSessionKey() { retrievedSessionKey = true; switch (state) { case ROUND_3_RECEIVE: state = State.FINISHED; // fall through case FINISHED: return sessionKey; default: throw new IllegalStateException("state: " + state); } } public boolean isInProgress() { switch (state) { case FAILED: case FINISHED: return false; default: return !hasTimedOut(); } } public boolean hasHandshakeFinishedSuccessfully() { return state == State.FINISHED || state == State.ROUND_3_RECEIVE; } private boolean hasTimedOut() { long curTime = android.os.SystemClock.elapsedRealtime(); return creationTime + TIMEOUT_IN_MSEC < curTime; } public static String createHandshakeIdLogString(UUID handshakeId) { return " (hs-" + handshakeId + ")"; } }
[ "makklaci@gmail.com" ]
makklaci@gmail.com
0308e85950407d63a114c69497cefa0e5103c55a
6666f344edcca7e7e09c2877e43ed801d6a1f62c
/java/crossover/test01/src/main/java/com/something/product/impl/SalaryReporter.java
4082177c8b23c545bae8b0c04f99395d57799424
[ "Apache-2.0" ]
permissive
mertnuhoglu/study
a125a518522e8cfa45e75b744544d66f9337505f
1e2b246ee0e0dfe607a06eaf761457631077d110
refs/heads/master
2023-05-28T08:40:48.845395
2023-05-12T11:52:02
2023-05-12T11:52:02
32,158,078
2
3
Apache-2.0
2020-10-12T21:11:05
2015-03-13T13:43:39
HTML
UTF-8
Java
false
false
1,776
java
package com.something.product.impl; public class SalaryReporter { public String report() { return internalReport("first last", false); } public String csvSalaryReport() { return internalReport("last,first", false); } public String hourlyPeopleSalaryReport() { return internalReport("first last", true); } private String internalReport(String t, boolean hourlyOnly) { String result = ""; for(Person p : Person.allPeople) { String firstLast = String.format("%s%s%s,%s\n", p.firstName, "%s", p.lastName, "%s"); String lastFirst= String.format("%s%s%s,%s\n", p.lastName, "%s", p.firstName, "%s"); if (p.annualSalary != null) { if (!hourlyOnly) { String firstLastLine = String.format(firstLast, "%s", p.annualSalary.toString()); String lastFirstLine = String.format(lastFirst, "%s", p.annualSalary.toString()); if (t.equals("first last")) { result += String.format(firstLastLine, " "); } if (t.equals("first.last")) { result += String.format(firstLastLine, "."); } if (t.equals("last,first")) { result += String.format(lastFirstLine, ","); } } } else { final Double vacationSum = p.isPaidVacation ? 0 : p.vacationDays * 8 * p.hourlyRate; final Double salary = p.hourlyRate * 40 * 52 - vacationSum; String firstLastLine = String.format(firstLast, "%s", salary.toString()); String lastFirstLine = String.format(lastFirst, "%s", salary.toString()); if (t.equals("first last")) { result += String.format(firstLastLine, " "); } if (t.equals("first.last")) { result += String.format(firstLastLine, "."); } if (t.equals("last,first")) { result += String.format(lastFirstLine, ","); } } } return result; } }
[ "mert.nuhoglu@gmail.com" ]
mert.nuhoglu@gmail.com
76489b74bede9d990bf6919438c274722e28e2df
24601bb6e06c7f2281502e7424ab6a372422c4a3
/Exercise10.java
c04a160c2e4463d8760e2707b4e8ca2abe469362
[]
no_license
nnicha123/Java
ae8d2ade6ce15c9b9ec3167aefe950f30adfcd89
811ad97210d03a5897041e45819fd637ffc4072c
refs/heads/master
2022-12-19T15:25:35.369406
2020-10-02T09:05:31
2020-10-02T09:05:31
291,896,882
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
public class Exercise10 { public static void main(String[] z){ int num = 463561, letterNum; String str = Integer.toString(num); for(int i=0;i<str.length();i++){ letterNum = Character.getNumericValue(str.charAt(i)); System.out.print(letterNum + ": "); for(int j=0;j<letterNum;j++){ System.out.print('o'); } System.out.println(' '); } } }
[ "nicha_nga@hotmail.com" ]
nicha_nga@hotmail.com
13b497ea9ea6b6ba2c19c547d917aa511acf19e2
bfd3534f4f35691162fb3145ee63604e0c077ef8
/src/Factory/Method/Pattern/FactoryB.java
d404ff8e8d0ea138640decc0e0409bf907382f52
[]
no_license
RX1226/DesignPattern
3361c2decf09719b6bb45ebfbe6540637df74871
02baefe5cb16ef003b911e9a6eedc2affbdcaea7
refs/heads/master
2023-06-12T07:38:22.174347
2021-06-25T13:22:00
2021-06-25T13:22:00
373,421,356
1
0
null
null
null
null
UTF-8
Java
false
false
245
java
package Factory.Method.Pattern; import Factory.Simple.Pattern.Product; import Factory.Simple.Pattern.ProductB; public class FactoryB implements NewFactory{ @Override public Product getProduct() { return new ProductB(); } }
[ "0979097955s@gmail.com" ]
0979097955s@gmail.com
aacf90eee703289116e5e43ca59248e83d1a84ff
ed3bccd412e16b54d0fec06454408bc13c420e0d
/HTOAWork/src/com/ht/service/finance/FinanceFeedbackdetailService.java
6c14774228af2e0d912fac5bf8c812633d7eb811
[]
no_license
Hholz/HTOAWork
387978548874d1660c559b30b97b9570956b47dd
bacafc4e291e4e9f68bfded90bf3698c704c874c
refs/heads/master
2021-01-12T05:23:07.621967
2017-01-03T12:44:51
2017-01-03T12:44:51
77,915,150
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
package com.ht.service.finance; import java.util.List; import com.ht.popj.finance.FinanceFeedbackdetail; public interface FinanceFeedbackdetailService { int insertSelective(FinanceFeedbackdetail record); int insert(FinanceFeedbackdetail record); List<FinanceFeedbackdetail> selectAll(); List<FinanceFeedbackdetail> selectDynamic(FinanceFeedbackdetail record); int updateByPrimaryKeySelective(FinanceFeedbackdetail record); int deleteByPrimaryKey(Integer id); }
[ "h_holz@qq.com" ]
h_holz@qq.com
f59f2f65167c45462ba91306ef81e03626278561
a820fd6b990f96a3f1b7ae66664adf439b7ab4ae
/src/test/java/test/TestCase4.java
ecd79d8fe7bf53635115ba94c7f4ce7229f5b5b9
[]
no_license
mehmetgul/OlympicsTableProject
feb4a7bcc0507f842afac48285c134883fa806df
64c383c811770924ab1afb36ee4ca515343b1670
refs/heads/master
2023-05-11T16:01:43.298303
2020-01-13T07:32:11
2020-01-13T07:32:11
233,537,125
0
0
null
2023-05-01T20:26:18
2020-01-13T07:31:20
Java
UTF-8
Java
false
false
1,196
java
package test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.testng.annotations.Test; import pages.Base; import java.util.List; /** * Test Case 4: GET INDEX * Write a method that takes country name and returns the row and column number of * that country in that table. Return type must be an array of ints. Array length must be 2. */ public class TestCase4 extends Base { @Test(description = "Find the given country row and column number") public void getIndex() { String desiredCountry="Japan"; System.out.println("Row and Column Nanumber of " +desiredCountry+ " is "+ rowColumn(desiredCountry)); // System.out.println(rowColumn()); } public String rowColumn(String country) { List<WebElement> desiredCountryList = driver.findElements( By.xpath("//table[@class='wikitable sortable plainrowheaders jquery-tablesorter']/tbody/tr/th")); String rowColumn = ""; for (int i = 0; i < desiredCountryList.size(); i++) { if (country.equalsIgnoreCase(desiredCountryList.get(i).getText().trim().substring(0, desiredCountryList.get(i).getText().trim().indexOf(" ")))) { rowColumn += (i + 1) + " 2"; } } return rowColumn; } }
[ "mehmetgul@gmail.com" ]
mehmetgul@gmail.com
2b3a4e5bde6669de412bef6316ee3aae724fa5ce
3469c7d45dbf089cb4e0fed4081f9fbb1bf3ddcb
/dgut_ssm_service/src/main/java/cn/dgut/service/ISysLogService.java
efee6f4b22c791b42dfc6d28ab877593fdb86175
[]
no_license
FengSenHua/dgut_SSM
f71a3faadec5b6ea9dc351001de133daf37744e7
5087582032d3b65c1f90b45d20c063097aea5d76
refs/heads/master
2022-12-24T23:02:53.081430
2019-08-01T14:04:46
2019-08-01T14:04:46
199,183,802
0
0
null
2022-12-16T04:25:05
2019-07-27T15:42:31
JavaScript
UTF-8
Java
false
false
182
java
package cn.dgut.service; import cn.dgut.domain.SysLog; import java.util.List; public interface ISysLogService { void saveSysLog(SysLog sysLog); List<SysLog> findAll(); }
[ "1146977578@qq.com" ]
1146977578@qq.com
9b37e1149910b2491495cf4ce8cbbaa9993c5529
a25301bf5baa309540f7486d14fae6113bc8351f
/app/src/main/java/com/atta/findme/menu/ShopMenuActivity.java
c54ccf4a97d911a3dd526da4770a0375858553dd
[]
no_license
MostafaAtta/FindMe
3229d8e7002b6299096ed09d1fb353b738a0a537
98b5e87decd77661730fdf310f6d6da63c3b5848
refs/heads/master
2020-06-04T11:16:26.352603
2019-06-14T20:07:21
2019-06-14T20:07:21
191,440,102
0
0
null
null
null
null
UTF-8
Java
false
false
3,211
java
package com.atta.findme.menu; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import com.andremion.counterfab.CounterFab; import com.atta.findme.CategoriesActivity; import com.atta.findme.R; import com.atta.findme.cart.CartActivity; import com.atta.findme.model.Product; import com.atta.findme.model.ProductsAdapter; import com.atta.findme.model.Shop; import java.util.ArrayList; public class ShopMenuActivity extends AppCompatActivity implements ShopMenuContract.View{ RecyclerView recyclerView; ShopMenuPresenter shopMenuPresenter; CounterFab counterFab; ImageView backToMain; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shop_menu); recyclerView = findViewById(R.id.recycler); counterFab = findViewById(R.id.fab); backToMain = findViewById(R.id.btn_back); shopMenuPresenter = new ShopMenuPresenter( this, this); final Shop shop = (Shop) getIntent().getSerializableExtra("shop"); backToMain.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(ShopMenuActivity.this, CategoriesActivity.class); if (shop != null){ intent.putExtra("fragment", shop.getCategory()); } startActivity(intent); } }); shopMenuPresenter.getProducts(shop.getCategory(), shop.getId()); shopMenuPresenter.getCartItemsNum(); counterFab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (counterFab.getCount() > 0) { Intent intent = new Intent(ShopMenuActivity.this, CartActivity.class); startActivity(intent); }else showMessage("Cart is empty"); } }); } @Override public void showRecyclerView(ArrayList<Product> products) { ProductsAdapter myAdapter = new ProductsAdapter(this, shopMenuPresenter, this, products); recyclerView.setLayoutManager(new GridLayoutManager(this, 3)); recyclerView.setAdapter(myAdapter); } @Override public void showMessage(String message) { Toast.makeText(this,message,Toast.LENGTH_LONG).show(); } @Override public void addToCart(Product product) { shopMenuPresenter.addToCart(product); } @Override public void increaseCartSign() { counterFab.increase(); } @Override public void decreaseCartSign() { counterFab.decrease(); counterFab.setCount(0); } @Override public void clearCartSign() { counterFab.setCount(0); } @Override public void setCounterFabCount(int numOfCartItem) { counterFab.setCount(numOfCartItem); } }
[ "mostafa.sa.atta@gmail.com" ]
mostafa.sa.atta@gmail.com
f057e211bb615326a11d451dc89f9f22c57c22bf
d837e8b5042551481c3e732678608185ca788427
/wise/src/edu/ucla/wise/persistence/data/UserData.java
775047b287eea870ddd73852f474f801068e4e4a
[ "BSD-3-Clause" ]
permissive
pralavgoa/SecureWise
45f6bbff15d7b269d50e60cdc15fb299df1e644e
23599058f7eb2b8e29b964594bbd5e746f8165e3
refs/heads/master
2021-01-15T21:20:27.907704
2016-06-15T21:43:46
2016-06-15T21:43:46
22,177,526
0
0
null
null
null
null
UTF-8
Java
false
false
3,010
java
/** * Copyright (c) 2014, Regents of the University of California * 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 reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder 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 HOLDER 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 edu.ucla.wise.persistence.data; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Iterables; import com.google.common.collect.Multimap; /** * Class to represent User Data. */ public class UserData { /** * Id of the user for the data */ private final int userId; /** * Id of the survey to which this answer belongs */ private final int surveyId; private final Multimap<String, String> textAnswers; private final Multimap<String, Integer> numericAnswers; public UserData(int userId, int surveyId) { this.userId = userId; this.surveyId = surveyId; this.textAnswers = ArrayListMultimap.create(); this.numericAnswers = ArrayListMultimap.create(); } public void addAnswer(String questionId, String answer) { this.textAnswers.put(questionId, answer); } public void addAnswer(String questionId, int answer) { this.numericAnswers.put(questionId, answer); } public String getTextAnswer(String questionId) { return Iterables.getLast(this.textAnswers.get(questionId)); } public int getNumericAnswer(String questionId) { return Iterables.getLast(this.numericAnswers.get(questionId)); } public int getUserId() { return this.userId; } public int getSurveyId() { return this.userId; } }
[ "pralavgoa@gmail.com" ]
pralavgoa@gmail.com
25c47f7250ffcf643a08d69b9b8bfb54d5479d6b
7ddf96f35d1d5a443ae271f7b7f14df16b7d2e10
/src/main/java/com/springionic/dto/CredenciaisDTO.java
295143a14316c4871938d6c13d83c3179d330fd2
[]
no_license
wandersonpereiradev/app_springionic_backend
899d1a8baa9b5a9912ae729d3e6eb8fddc9724e7
f57a5e78e767ac81e8beece014158a883255a0c8
refs/heads/master
2022-12-17T12:47:19.306657
2020-09-24T23:51:33
2020-09-24T23:51:33
288,251,968
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.springionic.dto; import java.io.Serializable; public class CredenciaisDTO implements Serializable { private static final long serialVersionUID = 1L; public String email; public String senha; public CredenciaisDTO() {} public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getSenha() { return senha; } public void setSenha(String senha) { this.senha = senha; } }
[ "wanderson.maria@spread.com.br" ]
wanderson.maria@spread.com.br
e4c8b41cb7e9c3a362ffcb622b5356edb532c511
63d319fbd88e49701d8dcc2919c8f3a6013e90d0
/Applications/CIM/plugins/es.tid.cim.diagram/src/es/tid/cim/diagram/edit/policies/NetworkPortCanonicalEditPolicy.java
7e475c2b32bc1cf3245a0ceb622e94b738416b6b
[]
no_license
DevBoost/Reuseware
2e6b3626c0d434bb435fcf688e3a3c570714d980
4c2f0170df52f110c77ee8cffd2705af69b66506
refs/heads/master
2021-01-19T21:28:13.184309
2019-06-09T20:39:41
2019-06-09T20:48:34
5,324,741
1
1
null
null
null
null
UTF-8
Java
false
false
701
java
package es.tid.cim.diagram.edit.policies; import java.util.Collection; import java.util.Collections; import java.util.List; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy; import org.eclipse.gmf.runtime.notation.View; /** * @generated */ public class NetworkPortCanonicalEditPolicy extends CanonicalEditPolicy { /** * @generated */ protected List getSemanticChildrenList() { return Collections.EMPTY_LIST; } /** * @generated */ protected boolean isOrphaned(Collection semanticChildren, final View view) { return false; } /** * @generated */ protected String getDefaultFactoryHint() { return null; } }
[ "jendrik.johannes@devboost.de" ]
jendrik.johannes@devboost.de
e1864d80c003b570b5447d438299455bb171c54b
620a39fe25cc5fbd0ed09218b62ccbea75863cda
/wfj_front/src/tuan/dao/imp/TuanProductTypeDao.java
957b544bb755cc568b1d3a0f72ca91a6c2c350b5
[]
no_license
hukeling/wfj
f9d2a1dc731292acfc67b1371f0f6933b0af1d17
0aed879a73b1349d74948efd74dadd97616d8fb8
refs/heads/master
2021-01-16T18:34:47.111453
2017-08-12T07:48:58
2017-08-12T07:48:58
100,095,588
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package tuan.dao.imp; import tuan.dao.ITuanProductTypeDao; import tuan.pojo.TuanProductType; import util.dao.BaseDao; /** * 团购商品分类Dao接口实现类 * @author * */ public class TuanProductTypeDao extends BaseDao <TuanProductType> implements ITuanProductTypeDao { }
[ "hukelingwork@163.com" ]
hukelingwork@163.com
8bf7eff78262018422f4d360ffc673a5f6be37d3
23c3b0c8c47d1e1bde12b14c6c4c72fa6a28a1d3
/src/com/mycompany/Entite/Utilisateur_Malade.java
32d0309995b4ea1fa81a7ca920591d031004f5b5
[]
no_license
COVID-19-Esprit/Mobile
dba689d34fbc52b970de9ee841b121e7549cd5da
e012c062a4122fab6dc456d70e0390a07541c4f0
refs/heads/master
2022-11-23T17:25:53.007174
2020-07-19T09:17:22
2020-07-19T09:17:22
280,830,388
0
0
null
null
null
null
UTF-8
Java
false
false
2,355
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 com.mycompany.Entite; /** * * @author Achref */ public class Utilisateur_Malade { private int id; private String nomMalade; private String prenomMalade; private String ageMalade; private String adresseMalade; private String telephoneMalade; private String mailMalade; private String code; public Utilisateur_Malade(){}; public Utilisateur_Malade(String nomMalade , String prenomMalade , String ageMalade , String adresseMalade , String telephoneMalade , String mailMalade , String code ) { this.id=id; this.nomMalade=nomMalade; this.prenomMalade=prenomMalade; this.ageMalade=ageMalade; this.adresseMalade=adresseMalade; this.telephoneMalade=telephoneMalade; this.mailMalade=mailMalade; this.code=code; } public int getId() { return id; } public void setId(int id) { this.id = id; } public void setNomMalade(String nomMalade) { this.nomMalade = nomMalade; } public String getNomMalade() { return nomMalade; } public void setPrenomMalade(String prenomMalade) { this.prenomMalade = prenomMalade; } public String getPrenomMalade() { return prenomMalade; } public void setAgeMalade(String ageMalade) { this.ageMalade = ageMalade; } public String getAgeMalade() { return ageMalade; } public void setAdresseMalade(String adresseMalade) { this.adresseMalade = adresseMalade; } public String getAdresseMalade() { return adresseMalade; } public void setTelephoneMalade(String telephoneMalade) { this.telephoneMalade = telephoneMalade; } public String getTelephoneMalade() { return telephoneMalade; } public void setMailMalade(String mailMalade) { this.mailMalade = mailMalade; } public String getMailMalade() { return mailMalade; } public void setCode(String code) { this.code = code; } public String getCode() { return code; } }
[ "achref.hammami@esprit.tn" ]
achref.hammami@esprit.tn
c4b0eae4e1a2fd2d9b104a34ae67912e6eeb3f3b
eff5eb71f0879796b50392b3972d07684550e9a6
/epubreader/src/androidTest/java/com/boyad/epubreader/ExampleInstrumentedTest.java
d6f7078a1cea81970dfe2f122442fb22423483f8
[]
no_license
boyad-zl/MyEbookReader
a966d08c42e92e74a819d71d26a7288fc7d1a953
8b921670b98bbd3897cefd9c774d01283ea8265f
refs/heads/master
2021-09-15T16:47:03.470010
2018-06-07T07:08:50
2018-06-07T07:08:50
110,975,748
12
1
null
null
null
null
UTF-8
Java
false
false
751
java
package com.boyad.epubreader; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.epubreader.test", appContext.getPackageName()); } }
[ "foosaa@126.com" ]
foosaa@126.com
33afbfa6a181d60f396ab98d16f6e38160d1ed74
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Cloudstack/578_1.java
2192b1441c4e206a379d7c0dad9cce09842cada0
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
2,743
java
//,temp,GlobalLoadBalancingRulesServiceImplTest.java,934,977,temp,GlobalLoadBalancingRulesServiceImplTest.java,503,564 //,3 public class xxx { void runDeleteGlobalLoadBalancerRuleTestWithLbRules() throws Exception { TransactionLegacy txn = TransactionLegacy.open("runDeleteGlobalLoadBalancerRuleTestWithLbRules"); GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl(); gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class); gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class); gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class); gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class); gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class); gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class); gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class); gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class); gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class); gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class); DeleteGlobalLoadBalancerRuleCmd deleteCmd = new DeleteGlobalLoadBalancerRuleCmdExtn(); Class<?> _class = deleteCmd.getClass().getSuperclass(); Account account = new AccountVO("testaccount", 1, "networkdomain", (short)0, UUID.randomUUID().toString()); when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account); Field gslbRuleId = _class.getDeclaredField("id"); gslbRuleId.setAccessible(true); gslbRuleId.set(deleteCmd, new Long(1)); GlobalLoadBalancerRuleVO gslbRule = new GlobalLoadBalancerRuleVO("test-gslb-rule", "test-gslb-rule", "test-domain", "roundrobin", "sourceip", "tcp", 1, 1, 1, GlobalLoadBalancerRule.State.Active); when(gslbServiceImpl._gslbRuleDao.findById(new Long(1))).thenReturn(gslbRule); GlobalLoadBalancerLbRuleMapVO gslbLmMap = new GlobalLoadBalancerLbRuleMapVO(1, 1, 1); List<GlobalLoadBalancerLbRuleMapVO> gslbLbMapVos = new ArrayList<GlobalLoadBalancerLbRuleMapVO>(); gslbLbMapVos.add(gslbLmMap); when(gslbServiceImpl._gslbLbMapDao.listByGslbRuleId(new Long(1))).thenReturn(gslbLbMapVos); try { gslbServiceImpl.deleteGlobalLoadBalancerRule(deleteCmd); Assert.assertTrue(gslbRule.getState() == GlobalLoadBalancerRule.State.Revoke); Assert.assertTrue(gslbLmMap.isRevoke() == true); } catch (Exception e) { s_logger.info("exception in testing runDeleteGlobalLoadBalancerRuleTestWithLbRules. " + e.toString()); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
64ce90578954d39cca7380cc2ea3c87e18295dc2
50cee9b11cf7d514671a356bbbc82e7be9f65e97
/RightPercProbability.java
9379f7e7dfbe5b6dbcaceb53ed79911bcbbc7879
[]
no_license
sverrirarnors/tolvunarfraedi
c9ebf27256cd2c7eb31d2516278123347996d8f6
cc7cf944c766fe13eba3e281af567c85e814e0da
refs/heads/master
2020-03-29T15:56:07.399707
2018-11-26T12:21:54
2018-11-26T12:21:54
150,088,593
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
public class RightPercProbability { // do specified number of trials and return fraction that percolate public static double evaluate(int n, double p, int trials) { int count = 0; for (int t = 0; t < trials; t++) { boolean[][] isOpen = RightPercolation.random(n, p); if (RightPercolation.percolates(isOpen)) count++; } return (double) count / trials; } public static void main(String[] args) { int n = Integer.parseInt(args[0]); double p = Double.parseDouble(args[1]); int trials = Integer.parseInt(args[2]); double q = evaluate(n, p, trials); StdOut.println(q); } }
[ "sverrirarnors@gmail.com" ]
sverrirarnors@gmail.com
095aedc677cf8efe26d007c740c87ba81b4086bb
28d82cc0f03d8ea4954fe2f233059d743eda40c8
/백준/N_17103.java
29f5968589e4768dee7826b4fcbfcd6d7cf96011
[]
no_license
myeongmy/algorithm_with_Java
bc0d5d7634d8db1bf01f2de08fbb29b25044c3cf
3e5a20f47c09f9366e348d8417f1dd471c0200d0
refs/heads/master
2021-06-24T00:19:25.484714
2020-12-15T07:31:43
2020-12-15T07:31:43
168,832,688
0
0
null
null
null
null
UHC
Java
false
false
1,781
java
//백준 17103번 /*문제 골드바흐의 추측: 2보다 큰 짝수는 두 소수의 합으로 나타낼 수 있다. 짝수 N을 두 소수의 합으로 나타내는 표현을 골드바흐 파티션이라고 한다. 짝수 N이 주어졌을 때, 골드바흐 파티션의 개수를 구해보자. 두 소수의 순서만 다른 것은 같은 파티션이다. 입력 첫째 줄에 테스트 케이스의 개수 T (1 ≤ T ≤ 100)가 주어진다. 각 테스트 케이스는 한 줄로 이루어져 있고, 정수 N은 짝수이고, 2 < N ≤ 1,000,000을 만족한다. 출력 각각의 테스트 케이스마다 골드바흐 파티션의 수를 출력한다.*/ package codingtest_study.백준; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class N_17103 { public static void main(String[] args) { // TODO Auto-generated method stub boolean[] check = new boolean[1000001]; ArrayList<Integer> prime = new ArrayList<Integer>(); check[0] = true; check[1] = true; for (int i = 2; i <= 1000000; i++) { if (check[i] == false) { prime.add(i); for (int j = 2; i * j <= 1000000; j++) { check[i * j] = true; } } } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { int T = Integer.parseInt(br.readLine()); for (int i = 0; i < T; i++) { int N = Integer.parseInt(br.readLine()); int resultNum = 0; for (int j = 0; j< prime.size() && prime.get(j) < N; j++) { //런타임 에러난 부분 if (check[N - prime.get(j)] == false) { if (prime.get(j) <= N - prime.get(j)) resultNum++; } } System.out.println(resultNum); } } catch (IOException e) { e.printStackTrace(); } } }
[ "kp6069@naver.com" ]
kp6069@naver.com
5e8cfab7ec2135e94cb1dc570007371d9351182e
efb8d99b1b69925de72e17688051f912eb087ac9
/src/model/entity/EmployeeEntity.java
713180db04cd481b32dc65e47d349fb2246d5336
[]
no_license
MahanZiyari/GolestanSystemProject
8fd0cbd21cd592980e6195e1a803f9b13f0af9bc
8bcba9dccb36322cd3e6174d35f53f40566ac169
refs/heads/master
2022-12-06T12:52:45.155448
2020-08-29T04:38:24
2020-08-29T04:38:24
291,027,943
1
0
null
null
null
null
UTF-8
Java
false
false
934
java
package model.entity; public class EmployeeEntity implements User { private long id, salary; private String name, pass, post; public long getId() { return id; } public EmployeeEntity setId(long id) { this.id = id; return this; } public long getSalary() { return salary; } public EmployeeEntity setSalary(long salary) { this.salary = salary; return this; } public String getName() { return name; } public EmployeeEntity setName(String name) { this.name = name; return this; } public String getPass() { return pass; } public EmployeeEntity setPass(String pass) { this.pass = pass; return this; } public String getPost() { return post; } public EmployeeEntity setPost(String post) { this.post = post; return this; } }
[ "maziuar.mz.021@gmail.com" ]
maziuar.mz.021@gmail.com
a09f4ac03b0ed78a551386db4b754fdf14f1cb17
83de532872e0763adeaa497995975c7ca2545fac
/src/main/java/com/ferreirarubens/accesscontrol/common/config/data/serializers/LocalDateTimeDeserializer.java
b3947e7dad30b532ddd7795a39b39a057d7062d3
[]
no_license
ferreirarubens/spring-access-control
3a111d9587324ba2756f66300ea36640b5de18d4
c3ebe82c8a725fbddcdd7a0ef0143895aaf993a6
refs/heads/master
2022-04-05T17:02:08.302660
2020-02-10T00:07:25
2020-02-10T00:07:25
238,253,844
1
0
null
null
null
null
UTF-8
Java
false
false
855
java
package com.ferreirarubens.accesscontrol.common.config.data.serializers; import java.io.IOException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; public class LocalDateTimeDeserializer extends StdDeserializer<LocalDateTime> { private static final long serialVersionUID = 1L; private LocalDateTimeDeserializer() { super(LocalDateTime.class); } @Override public LocalDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { String string = parser.getText().trim(); if (string.length() == 0) return null; return LocalDateTime.parse(string, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); } }
[ "rubens.ferreira@mv.com.br" ]
rubens.ferreira@mv.com.br
a73a6f96da3c26372213e24e2dc75a09a03e8e92
b89bcefd24d87025b55e48b702aa8be791c68a91
/src/main/java/com/hongdu/src/datastructurejava/tree/base/api/baseapi/TreeInterface.java
a6c97f617f13646d5f78c4c6189fcc4056851be3
[]
no_license
hddudu/daily_concat_code
03895abdf4311ecb8aa5856c8b7d7827f5e4830d
fa71024e80fb6b7414eb950603b3c3bf398e505f
refs/heads/master
2022-12-30T03:23:57.665030
2019-06-06T15:56:17
2019-06-06T15:56:17
145,688,275
0
0
null
2022-12-16T04:43:02
2018-08-22T09:40:44
JavaScript
UTF-8
Java
false
false
258
java
package com.hongdu.src.datastructurejava.tree.base.api.baseapi; /** * 树的常用操作 * @param <E> */ public interface TreeInterface<E> { E getRootData(); int getHeight(); int getNumberOfNodes(); boolean isEmpty(); void clear(); }
[ "15574948314@163.com" ]
15574948314@163.com
64ea5ab909124bc3aa96ca8236eb6e8d86a87dc3
c5119142b87e383b6e5ecd60accd77c8b943ffe8
/src/main/java/tutsviews/lms/service/impl/CourseServiceImpl.java
0c32897a3985dbffeeb2a14a60fbea59dfcbe2af
[]
no_license
tutsviews-lms/backend
884259d183eb9f373f3491ee76068918671496f2
1b9a8b857ea28625a932d28f220a147d980a8d8d
refs/heads/master
2020-04-02T22:59:08.185762
2017-02-19T16:08:34
2017-02-19T16:08:34
61,879,026
1
1
null
null
null
null
UTF-8
Java
false
false
1,125
java
package tutsviews.lms.service.impl; import java.util.List; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import tutsviews.lms.domain.course.Course; import tutsviews.lms.repository.CourseRepository; import tutsviews.lms.service.CourseService; @Service @Transactional public class CourseServiceImpl implements CourseService { @Autowired CourseRepository courseRepository; @Autowired Logger logger; public List<Course> getAllCourses() { return courseRepository.findAll(); } public Course getOneCourse(int id) { return courseRepository.findOne((long) id); } public Course createCourse(Course course) { return courseRepository.save(course); } public boolean deleteCourse(int id) { if (!(courseRepository.findOne((long) id)==null)) { courseRepository.delete((long) id); logger.info("Course with id "+id +" have been deleted."); return true; }else logger.error("cannot delete course with id "+id); return false; } }
[ "zaier.alaeddine@gmail.com" ]
zaier.alaeddine@gmail.com
36ee5808c1acbcac90d9ff45bd8cb8fbca654bf7
26511516bf48a096ec60cde1f54529a6b7999c14
/src/com/pradeeprizal/ask/farmersmkt/FarmersMarketStreamHandler.java
3e8a0b331047101482ab61ec116cf6157bcfcd26
[]
no_license
rizalp1/farmers-market-alexa-skill
c6a75be0a55f5f1ae198425707c447ea600486e2
ad6e07253ddbd33492f1c9b9d3541aa6fc12fb48
refs/heads/master
2020-03-18T20:50:26.268736
2018-07-08T02:45:41
2018-07-08T02:45:41
135,241,658
0
0
null
null
null
null
UTF-8
Java
false
false
1,544
java
/* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license" file accompanying this file. This file 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.pradeeprizal.ask.farmersmkt; import com.amazon.ask.Skill; import com.amazon.ask.Skills; import com.amazon.ask.SkillStreamHandler; import com.pradeeprizal.ask.farmersmkt.handlers.*; public class FarmersMarketStreamHandler extends SkillStreamHandler { private static Skill getSkill() { return Skills.standard() .addRequestHandlers( new CancelandStopIntentHandler(), new FarmersMarketWhichIntentHandler(), new FarmersMarketDescribeIntentHandler(), new HelpIntentHandler(), new LaunchRequestHandler(), new SessionEndedRequestHandler()) // Add your skill id below .withSkillId("amzn1.ask.skill.72e8eb9c-8efe-4ebd-b3bb-e605621159e3") .build(); } public FarmersMarketStreamHandler() { super(getSkill()); } }
[ "pkrl2002@gmail.com" ]
pkrl2002@gmail.com
34161335a0fcbf1c4c2805fd9137012c029cb7c8
95b93c921adf5c09793c41a7f0104374201212ab
/ws-Client/src/main/java/demo/spring/service_large/SayHi994Response.java
5dd29844d8c2dbe18a2e57af2769e67d2e1fa0dd
[]
no_license
yhjhoo/WS-CXF-AuthTest
d6ad62bdf95af7f4832f16ffa242785fc0a93eb8
ded10abaefdc2e8b3b32becdc6f5781471acf27f
refs/heads/master
2020-06-15T02:21:42.204025
2015-04-08T00:05:02
2015-04-08T00:05:02
33,409,007
0
1
null
null
null
null
UTF-8
Java
false
false
1,435
java
package demo.spring.service_large; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for sayHi994Response complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="sayHi994Response"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sayHi994Response", propOrder = { "_return" }) public class SayHi994Response { @XmlElement(name = "return") protected String _return; /** * Gets the value of the return property. * * @return * possible object is * {@link String } * */ public String getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link String } * */ public void setReturn(String value) { this._return = value; } }
[ "yhjhoo@163.com" ]
yhjhoo@163.com
5e66dd916529d95eefe09e4f4e71f81316331ad6
9702a51962cda6e1922d671dbec8acf21d9e84ec
/src/main/com/topcoder/web/ejb/user/UserBean.java
efd7f24fb4dfabba4fa627bf9945a6785f121c61
[]
no_license
topcoder-platform/tc-website
ccf111d95a4d7e033d3cf2f6dcf19364babb8a08
15ab92adf0e60afb1777b3d548b5ba3c3f6c12f7
refs/heads/dev
2023-08-23T13:41:21.308584
2023-04-04T01:28:38
2023-04-04T01:28:38
83,655,110
3
19
null
2023-04-04T01:32:16
2017-03-02T08:43:01
Java
UTF-8
Java
false
false
20,113
java
package com.topcoder.web.ejb.user; import com.topcoder.shared.util.DBMS; import com.topcoder.shared.util.logging.Logger; import com.topcoder.util.idgenerator.IDGenerationException; import com.topcoder.web.common.IdGeneratorClient; import com.topcoder.web.common.RowNotFoundException; import com.topcoder.web.ejb.BaseEJB; import javax.ejb.EJBException; import javax.naming.InitialContext; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * @author Nathan Egge (negge@vt.edu) */ public class UserBean extends BaseEJB { private final static Logger log = Logger.getLogger(UserBean.class); public long createNewUser(String handle, char status, String dataSource, String idDataSource) throws EJBException { long ret = 0; try { ret = IdGeneratorClient.getSeqId("USER_SEQ"); } catch (IDGenerationException e) { throw new EJBException(e); } createUser(ret, handle, status, dataSource); return ret; } public void createUser(long userId, String handle, char status, String dataSource) throws EJBException { log.debug("createUser called. user_id=" + userId + " " + "handle=" + handle + " " + "status=" + status); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("INSERT "); query.append("INTO user (user_id,handle,status) "); query.append("VALUES (?,?,?)"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); ps.setString(2, handle); ps.setString(3, "" + status); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows inserted into 'user'. " + "Inserted " + rc + ", should have inserted 1.")); } } catch (SQLException sqle) { DBMS.printSqlException(true, sqle); throw (new EJBException(sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public void setFirstName(long userId, String firstName, String dataSource) throws EJBException { log.debug("setFirstName called. user_id=" + userId + " " + "first_name=" + firstName); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET first_name=? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, firstName); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public void setLastName(long userId, String lastName, String dataSource) throws EJBException { log.debug("setLastName called. user_id=" + userId + " " + "last_name=" + lastName); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET last_name=? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, lastName); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public void setMiddleName(long userId, String middleName, String dataSource) throws EJBException { log.debug("setMiddleName called. user_id=" + userId + " " + "middle_name=" + middleName); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET middle_name=? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, middleName); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public void setActivationCode(long userId, String code, String dataSource) throws EJBException { log.debug("setActivationCode called. user_id=" + userId + " " + "code=" + code + " db=" + dataSource); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET activation_code=? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, code); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public void setStatus(long userId, char status, String dataSource) throws EJBException { log.debug("setStatus called. user_id=" + userId + " " + "status=" + status); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET status=? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, String.valueOf(status)); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public String getFirstName(long userId, String dataSource) throws EJBException { log.debug("getFirstName called. user_id=" + userId); String first_name = null; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT first_name "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { first_name = rs.getString(1); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (first_name); } public String getMiddleName(long userId, String dataSource) throws EJBException { log.debug("getMiddleName called. user_id=" + userId); String middleName = null; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT middle_name "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { middleName = rs.getString(1); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (middleName); } public String getLastName(long userId, String dataSource) throws EJBException { log.debug("getLastName called. user_id=" + userId); String last_name = null; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT last_name "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { last_name = rs.getString(1); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (last_name); } public String getActivationCode(long userId, String dataSource) throws EJBException { log.debug("getActivationCode called. user_id=" + userId + " db=" + dataSource); String code = null; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT activation_code "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { code = rs.getString(1); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (code); } public void setHandle(long userId, String handle, String dataSource) throws EJBException { log.debug("setHandle called. user_id=" + userId); Connection conn = null; PreparedStatement ps = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("UPDATE user "); query.append("SET handle = ? "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setString(1, handle); ps.setLong(2, userId); int rc = ps.executeUpdate(); if (rc != 1) { throw (new EJBException("Wrong number of rows updated in 'user'. " + "Updated " + rc + ", should have updated 1.")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(ps); close(conn); close(ctx); } } public String getHandle(long userId, String dataSource) throws EJBException { log.debug("getHandle called. user_id=" + userId); String handle = ""; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT handle "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { handle = rs.getString(1); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (handle); } public char getStatus(long userId, String dataSource) throws EJBException { log.debug("getStatus called. user_id=" + userId); char status = 0; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT status "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); if (rs.next()) { status = rs.getString(1).charAt(0); } else { throw (new EJBException("No rows found when selecting from 'user' with " + "user_id=" + userId + ".")); } } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return (status); } public boolean userExists(long userId, String dataSource) throws EJBException { PreparedStatement ps = null; ResultSet rs = null; Connection conn = null; boolean userExists = false; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT 'X' "); query.append("FROM user "); query.append("WHERE user_id=?"); ps = conn.prepareStatement(query.toString()); ps.setLong(1, userId); rs = ps.executeQuery(); userExists = rs.next(); } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return userExists; } public boolean userExists(String handle, String dataSource) throws EJBException { PreparedStatement ps = null; ResultSet rs = null; Connection conn = null; boolean userExists = false; InitialContext ctx = null; try { conn = DBMS.getConnection(dataSource); StringBuffer query = new StringBuffer(1024); query.append("SELECT 'X' "); query.append("FROM user "); query.append("WHERE lower(handle) = lower(?)"); ps = conn.prepareStatement(query.toString()); ps.setString(1, handle); rs = ps.executeQuery(); userExists = rs.next(); } catch (SQLException _sqle) { DBMS.printSqlException(true, _sqle); throw (new EJBException(_sqle.getMessage())); } finally { close(rs); close(ps); close(conn); close(ctx); } return userExists; } public void setPassword(long userId, String password, String dataSource) throws EJBException { int ret = update("user", new String[]{"password"}, new String[]{password}, new String[]{"user_id"}, new String[]{String.valueOf(userId)}, dataSource); if (ret != 1) { throw (new EJBException("Wrong number of rows updated in " + "'user'. Updated " + ret + ", " + "should have updated 1.")); } } public String getPassword(long userId, String dataSource) throws EJBException, RowNotFoundException { return selectString("user", "password", new String[]{"user_id"}, new String[]{String.valueOf(userId)}, dataSource); } }
[ "amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9" ]
amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9
cc7f13b8a312f6353a99b4a42d4c20b04f047f37
ad96e5a376c89b29a1837dc95092771138c5ed47
/BookingWebApplication/src/main/java/utils/Add_Screenshot.java
4129d70ef65f5b5de2088e7abec74ef6813cedfa
[]
no_license
pmpatil16/BDD_Cucumber
7ccacae03307c01bda8c03fe7c475314abc5f098
7ba58e2ebc63fe4db09212f975e28b34260cd411
refs/heads/main
2023-02-20T18:46:52.886144
2021-01-28T11:58:55
2021-01-28T11:58:55
333,735,198
0
0
null
null
null
null
UTF-8
Java
false
false
49
java
package utils; public class Add_Screenshot { }
[ "pmpatil106@gmail.com" ]
pmpatil106@gmail.com
d98bfc8d3d6c517ed45701bd593a6c46ffabec2a
910cdc95968fc118d5006755d94b9fd2748606f6
/GUC_1-ejb/src/java/app/dao/IncidenciaFacade.java
948b722df37c469df9fc6b3382851ecc3cb22366
[]
no_license
naoual/MasPatatas
a04641b36a5d7435403b3e0e2d8a2bc4a80d92f3
567a3949085acff0e870b543174dd8b89be9be22
refs/heads/master
2016-08-04T10:28:36.216916
2013-04-29T13:18:40
2013-04-29T13:18:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package app.dao; import app.entity.Incidencia; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; /** * * @author Naoual Amasri */ @Stateless public class IncidenciaFacade extends AbstractFacade<Incidencia> implements IncidenciaFacadeLocal { @PersistenceContext(unitName = "GUC_1-ejbPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public IncidenciaFacade() { super(Incidencia.class); } }
[ "am_naoual@hotmail.com" ]
am_naoual@hotmail.com
75ffe110d85ce5cc350a593157cdabff537f5ef8
7b0058cfc537d2e75b5459c584aac3dbfce6d281
/health_parent/health_service_provider/src/main/java/com/itheima/dao/SetmealDao.java
90dba6cbfc97043c5f46be87807283302a83b782
[]
no_license
peasshoter/health
2158942fe46fc98b81fe0e25dc7a1eb64de9efc1
47014693b59626e37e477a7798e3739b3e967121
refs/heads/master
2023-06-15T23:22:28.070846
2021-07-11T07:17:46
2021-07-11T07:17:46
383,508,433
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.itheima.dao; import com.github.pagehelper.Page; import com.itheima.entity.QueryPageBean; import com.itheima.entity.Result; import com.itheima.pojo.Setmeal; import java.util.List; import java.util.Map; public interface SetmealDao { void add(Setmeal setmeal); void setfksetmealcheckgroup(Map<String, Integer> map); Page<Setmeal> findpage(String condition); List<Setmeal> findAll(); Setmeal findById(int id); List<Map<String, Object>> findSetmealCount(); }
[ "meishichao6666@163.com" ]
meishichao6666@163.com
546e7222be6f93d77e9eab6299a6e49566d38544
d689bcc8a85520c6fb524c4af0b790ff1bd24132
/springboot-leyou-item/springboot-leyou-item-interface/src/main/java/com/juzipi/demo/pojo/Sku.java
c640b1e780c549e87f469c3ca2f23f94224af889
[]
no_license
jzxp/springboot-leyou
023970c068b866ba139358c7d85ec95a27c85f91
f15002ec696bbf6163c77c038daeeb075f47cb0e
refs/heads/master
2023-03-03T14:32:07.448715
2021-02-07T12:40:22
2021-02-07T12:40:22
335,234,205
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package com.juzipi.demo.pojo; import lombok.Data; import javax.persistence.*; import java.util.Date; @Data @Table(name = "tb_sku") public class Sku { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private Long spuId; private String title; private String images; private Long price; private String ownSpec;// 商品特殊规格的键值对 private String indexes;// 商品特殊规格的下标 private Boolean enable;// 是否有效,逻辑删除用 private Date createTime;// 创建时间 private Date lastUpdateTime;// 最后修改时间 @Transient private Integer stock;// 库存 }
[ "1124685815@qq.com" ]
1124685815@qq.com
d721392b6e2e53a75cf066fdaa5d1275a5db9e5d
d343a3c602e5628d060454246c73305380230e23
/src/codewarsJosephusSurvivor/JosephusSurvivor.java
dfee53e0a009ea5f6d1ba246c1bc42ed1d5a50a7
[]
no_license
Jamie95187/codewarsJosephusSurvivor
9e942a17ef17118d23cabb4c19cd6f792edd5d36
417288ae5112177007f1e9ca47bec3632704c6be
refs/heads/master
2022-04-21T02:47:44.733864
2020-04-17T08:03:45
2020-04-17T08:03:45
256,109,954
0
0
null
null
null
null
UTF-8
Java
false
false
682
java
/* * This is a solution to the codewars problem: * https://www.codewars.com/kata/555624b601231dc7a400017a/train/java * Solved using TDD processes. Consult Readme for full details. * * @author Jamie Wong * @version 13.0.0 * @since 17/04/2020 */ package codewarsJosephusSurvivor; public class JosephusSurvivor { static int lastElement(final int n, final int k) { if (k == 1) { return n; } CircularLinkedList soldiers = new CircularLinkedList(); for (int i = 1; i <= n; i++) { soldiers.addNode(i); } // delete all but one soldier for (int j = 0; j < n - 1; j++) { soldiers.deleteNodeInStepOfi(k); } return soldiers.getHeadValue(); } }
[ "jamiewong63@googlemail.com" ]
jamiewong63@googlemail.com
f59d76560f121c7289f0a70a4acaac07ab579b52
408d0eae04f0545a7823144cf7c9865b10279504
/src/main/java/fracCalc/FracCalc.java
19cd99e3f5d438ebe5f3ba34ed1ec2243d20bf11
[]
no_license
NHS-2019-P5-AP-Comp-Sci/fractioncalculator-Armaanh
5e4da1048df335a3906179cf51824e5c31c401c8
ec85ccd31d1ed4790accf3dcaf5048c5c143f832
refs/heads/master
2020-09-06T20:18:31.119525
2019-12-10T03:39:56
2019-12-10T03:39:56
220,539,527
0
0
null
null
null
null
UTF-8
Java
false
false
933
java
/** * @author Mr. Rasmussen */ package fracCalc; public class FracCalc { public static void main(String[] args) { // TODO: Read the input from the user and call produceAnswer with an equation } // ** IMPORTANT ** DO NOT DELETE THIS FUNCTION. This function will be used to test your code // This function takes a String 'input' and produces the result // // input is a fraction string that needs to be evaluated. For your program, this will be the user input. // e.g. input ==> "1/2 + 3/4" // // The function should return the result of the fraction after it has been calculated // e.g. return ==> "1_1/4" public static String produceAnswer(String input) { // TODO: Implement this function to produce the solution to the input return ""; } // TODO: Fill in the space below with any helper methods that you think you will need }
[ "joshrasmussen34@gmail.com" ]
joshrasmussen34@gmail.com
ac31ac6cedf1484520ce2b78aea35995c250f0af
aeee42e886e3a49edf8cc3195738d8e91cdca311
/lesBonsComptes/app/src/main/java/com/example/lesbonscomptes/Due.java
d05af594cab0ac3ba353e27856b05404b9e75ae6
[]
no_license
ABouchebaba/lesBonsComptes
01277357f6650589d37184b860999b80c96c2327
1b0cf5fa89bc39dcea878270f35ff2c9a50764d3
refs/heads/master
2023-03-27T19:52:11.807447
2021-03-24T11:51:36
2021-03-24T11:51:36
347,627,704
0
0
null
null
null
null
UTF-8
Java
false
false
685
java
package com.example.lesbonscomptes; import com.example.lesbonscomptes.db.DbHelper; import com.example.lesbonscomptes.models.Member; public class Due { private Member member; private float totalDue; public Due(DbHelper db, long idMember, float dueAmount){ this.member = Member.find(db,idMember); this.totalDue = dueAmount; } public Member getMember(){return member;} public float getTotalDue(){return totalDue;} public void increaseDue(float increaseAmount){ this.totalDue = this.totalDue + increaseAmount; } public void decreaseDue(float decreaseAmount){ this.totalDue = this.totalDue - decreaseAmount; } }
[ "rabia.sofiane94@gmail.com" ]
rabia.sofiane94@gmail.com
781f8d59d7bfcb9ad71a1528d753a7278f6f76d5
1ef4d95915cb37ae26f1a00c11072ef89f3b073d
/sitegen/src/main/java/io/helidon/sitegen/PageRenderer.java
e952fdaa0a71d852cfed4354c08dfc6000610937
[ "Apache-2.0" ]
permissive
diogene/helidon-build-tools
1871a3ab95a6ebde034c90020edfd4cac0b38195
d9f133cd4d16f63f5c98b561ff0aa98ed99017f3
refs/heads/master
2020-03-31T09:22:30.850467
2018-09-14T03:19:35
2018-09-14T03:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,509
java
/* * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. * * 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 io.helidon.sitegen; import java.io.File; import io.helidon.sitegen.Page.Metadata; /** * Capability to render and read metadata for specific type of document. * * @author rgrecour */ public interface PageRenderer { /** * Read a given document metadata. * @param source the file to read the metadata from * @return the {@link Metadata} instance, never {@code null} */ Metadata readMetadata(File source); /** * Process the rendering of a given document. * @param page the {@link Page} representing the document * @param ctx the context representing the site processing invocation * @param pagesdir the directory where to generate the rendered pages * @param ext the file extension to use for the rendered pages */ void process(Page page, RenderingContext ctx, File pagesdir, String ext); }
[ "robot@helidon.io" ]
robot@helidon.io
1fb7c6cf66197c7fd98201d242926b3685286ea9
677887671cede181d2b13f7e0f80c3cc58c67b93
/src/main/java/com/wx/mall/entity/model/GoodsProperty.java
370bd5c2da5fe54cc1110fa219ca1e26e809eff3
[]
no_license
jiangjianshi/wx_mall
3c60e05fc9c259b112a4de166b041de2e0d63a55
184fe6beb6acf22ac03443dc6fd8a73b0a2812dc
refs/heads/master
2020-03-24T14:20:29.832846
2018-08-30T15:21:57
2018-08-30T15:21:57
142,765,076
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package com.wx.mall.entity.model; import lombok.Data; import lombok.ToString; import java.util.Date; /** * Created by bairong on 2018/8/8. */ @Data @ToString public class GoodsProperty { private Integer id; // private Integer goodsId; //商品ID private Integer propTypeId; //类型ID private String propValue; // private double addedPrice; //附件价格 private Integer addedAmount; //附件数量 private Date createTime; // private Date updateTime; // }
[ "jianshi.jiang@100credit.com" ]
jianshi.jiang@100credit.com
4c48c2f66aa5f042532bbb312eecae175f37b864
fd779ecb3c5d2e55082c2a20238438ae14d011f0
/algo_ds/src/main/java/test/string/RunLengthEncoding.java
e3801a52f9cd9d0b9d9e96411227b07e04fc8bed
[]
no_license
vivekmurugesan/experiments
4cdbdd822912a8c95894e0e9eec0f8a85832c6fb
bad205c46ab98414117e562a835afeb7e7150858
refs/heads/master
2022-09-11T06:12:09.232386
2021-04-14T08:13:55
2021-04-14T08:13:55
40,645,604
18
17
null
2022-09-01T22:54:01
2015-08-13T07:43:10
Java
UTF-8
Java
false
false
703
java
package test.string; public class RunLengthEncoding { public static void main(String[] args) { String input = "aaabbbbccd"; System.out.printf(" input: %s \t encoding: %s", input, runLenEncoding(input)); } public static String runLenEncoding(String input) { char[] chArray = input.toCharArray(); char prevChar = 0; int counter = 0; StringBuilder sb = new StringBuilder(); for(char c : chArray) { if(c == prevChar) counter++; else { if(prevChar != 0) sb.append(counter).append(prevChar); // Resetting the counter and prevChar prevChar = c; counter = 1; } } sb.append(counter).append(prevChar); return sb.toString(); } }
[ "vivek.murugesan@gmail.com" ]
vivek.murugesan@gmail.com
41e1e84394dcbda033a34261812af2bf880968d1
e8305bd5a38bf2e7c6a80585be59a51de978d585
/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/BundleDependencyAnnotationParallelTest.java
8008784025300ec74482e5fe8b9ac4cfa4bab99f
[ "Apache-2.0" ]
permissive
apache/felix-dev
f266ea8f7d34aa18e0bc168a13106c52358d9670
d3b8b7984d04129d44018676cce615578275c84c
refs/heads/master
2023-09-04T08:09:33.449135
2023-09-02T10:14:18
2023-09-02T10:14:18
242,854,622
112
134
Apache-2.0
2023-09-06T05:06:54
2020-02-24T22:09:29
Java
UTF-8
Java
false
false
1,116
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.felix.dm.runtime.itest.tests; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class BundleDependencyAnnotationParallelTest extends BundleDependencyAnnotationTest { public BundleDependencyAnnotationParallelTest() { setParallel(); } }
[ "pderop@apache.org" ]
pderop@apache.org
0431d3a2c79e111696cd550117c208e3a6db0d5e
185e9f880eb330a97ddb0002e6ba20a2316224ba
/teacher-substitution/src/main/java/com/slidetorial/teachersubstitution/event/package-info.java
95acb995adb9b55c1b3d2e860ee84ee8b580e5a3
[]
no_license
mikewojtyna/teacher-substitution
e9bbf236898a8dbf3fb73cfb02cc28ee4f53f70f
12a13186bb24329d9c444808ca85fb61bbdc5710
refs/heads/master
2021-01-20T01:23:29.015166
2017-04-24T18:36:37
2017-04-24T18:36:37
89,272,258
0
0
null
null
null
null
UTF-8
Java
false
false
125
java
/** * */ /** * Events infrastructure code. * * @author goobar * */ package com.slidetorial.teachersubstitution.event;
[ "qoobar@gmail.com" ]
qoobar@gmail.com
7d1fff282548dddf4fe8fbea49a974e5feaae7e9
c1034a9746b3fa502b4aff259727b0d081c72670
/src/com/manish/Main.java
8301dddab57702a1db8f2b6875914bd8e3dda3d6
[]
no_license
ManishMaheshwari/TestOOM
39e6a18741aa4d9d438fba8343c0378ae5db38d8
94b0f06d06caa1fd8aabba660a2252a57c4194d5
refs/heads/master
2021-01-15T13:36:27.085027
2017-08-08T10:34:06
2017-08-08T10:34:06
99,679,583
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package com.manish; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; public class Main { public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> { System.out.println(">>>>>>>>>>>>>>>>>>>>>>>Caught OOM from ThreadId " + thread.getId() + " This message printed by: " + Thread.currentThread().getId()); // System.out.format("Caught {}, from ThreadId {}. This message printed by: {} %n", // throwable.getClass(), thread.getId(), Thread.currentThread().getId()); }); ExecutorService fixedPool = Executors.newFixedThreadPool(10); for (int i = 0; i < 1000000000; i++) { fixedPool.submit(new Task()); } } }
[ "mmaheshwari@expedia.com" ]
mmaheshwari@expedia.com
880b6e25d4ae248f6f4e2fadfb8323eb93a06537
1c9a51aee24e5cf6001fb3a64a5a5a193400accb
/Example/src/main/java/eu/trumm/Example/BookRepository.java
372e8b60d40009e88d0e540a16c62a1336a457b9
[]
no_license
c981890/rehearsals
d92c54f7d8ac412c5c0b58220c94a19c6ad16c48
576fc9f36246d1e394c1d8bb3ae360e8b6261426
refs/heads/master
2020-04-29T14:56:41.073960
2019-03-31T08:14:03
2019-03-31T08:14:03
176,212,541
0
0
null
null
null
null
UTF-8
Java
false
false
224
java
package eu.trumm.Example; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface BookRepository extends JpaRepository<Book, Long> { }
[ "aiki.trumm@mail.ee" ]
aiki.trumm@mail.ee
8291c01ad0779c0947167ab2f800b44ca6ffef35
83b72f9d5a89d6f5ea73fc415fbc155bef0083a9
/client/src/sample/Windows/Loader.java
779a5e14667aa28235a8ee6c8a688f62720152fc
[]
no_license
Sleepy228/MotorShow
fc4e305762a1ca9d6fbaccb07693ffd23826bbae
bf9def9e4d45130fe79353d833b389be2eebf541
refs/heads/master
2023-02-27T04:54:45.448939
2021-01-11T19:32:16
2021-01-11T19:32:16
328,689,859
1
0
null
null
null
null
UTF-8
Java
false
false
410
java
package sample.Windows; import javafx.fxml.FXMLLoader; import java.io.IOException; public class Loader { public FXMLLoader loaderSet(String path) { FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource(path)); try { loader.load(); } catch (IOException e) { e.printStackTrace(); } return loader; } }
[ "dimaSleepy@gmail.com" ]
dimaSleepy@gmail.com
cb6d18a8d5c46187a8e8cff16956e0f66bf7c225
9a971d276ad4e1e2ac425298d93f15adc533e4ca
/3º Semestre - Análise e Desenvolvimento de Sistemas/java-workspace/Apostila_Java/src/exercicios_6FluxodeControle/FuncionarioTeste.java
d75d2211fe4d4789eb2d993bfd9e439d13989e07
[]
no_license
gabrielripardo/Workspace-da-Faculdade-
d87a053c010c803913c58794c11f2d0fec9cc6f4
b637823ae5774163e9b6aa07bf9f404870633313
refs/heads/master
2021-06-28T09:22:04.064492
2017-09-15T09:51:04
2017-09-15T09:51:04
103,635,953
0
0
null
null
null
null
UTF-8
Java
false
false
2,125
java
/** * @nome: Dados_funcionario.jar * @Função: Construa uma classe que peça o Nome, Endereço, Sexo, Cidade, Estado, Idade dos funcionários. Além disto, * dado o Salário Bruto do funcionário, calcule o seu Salário Líquido. Considere que os descontos podem ser o Vale * Transporte (2%), Vale Alimentação (5%) e Plano de Saúde (10%). * @author: Gabriel Ripardo * @Data_de_criação: 12/04/2017 * @Comments: Dificuldade em inserir vários nomes em uma mesma linha. Problema com com nextLine, next.. */ package exercicios_6FluxodeControle; import java.util.Scanner; public class FuncionarioTeste { public static void main(String []args){ Funcionario gabriel = new Funcionario(); Scanner entrance = new Scanner(System.in); // Entrada de dados pelo terminal System.out.print(""); System.out.print("Nome: "); String nom = entrance.nextLine(); System.out.print("Sexo: "); String sex = entrance.next(); System.out.print("Salário: "); float liq = entrance.nextFloat(); System.out.print("Idade: "); int years = entrance.nextInt(); System.out.print("Cidade: "); String pog = entrance.nextLine(); String city = entrance.nextLine(); System.out.print("Endereco: "); String endr = entrance.nextLine(); System.out.print("Estado: "); String est = entrance.nextLine(); // Inserindo valores da entrada nos parâmetros dos métodos gabriel.setLiquid(liq); gabriel.setNome(nom); gabriel.setSexo(sex); gabriel.setIdade(years); gabriel.setCidade(city); gabriel.setEndereco(endr); gabriel.setEstado(est); // Imprimindo todos os retornos de cada método System.out.println("\n\n>>>>> Suas informações <<<<"); System.out.println("Nome: " + gabriel.getNome()); System.out.println("Salário liquído: R$ " + gabriel.getLiquid()); System.out.println("Sexo: " + gabriel.getSexo()); System.out.println("Idade: " + gabriel.getIdade()); System.out.println("Cidade: " + gabriel.getCidade()); System.out.println("Endereço: " + gabriel.getEndereco()); System.out.println("Estado: " + gabriel.getEstado()); } }
[ "gts.senna@gmail.com" ]
gts.senna@gmail.com
f8ceb7076818e13ff25cb4e0a717f150b0109fb4
e35e8bdaad202fa7c0bbf771ada52567d9316e49
/checkout-cart/src/main/java/com/urbanclap/checkoutcart/frame_work/market/interfaces/IMarketView.java
a4ace5f0c7cb9e690990b19b5c5540326db8d4e7
[ "MIT" ]
permissive
urbanclap-engg/android-checkout-cart
a4b8ddb85e56a5023eb03ceec5df5ee6719f2938
e31ade7fcef9f9e5fdf91951ed9e317994ea6cbd
refs/heads/master
2022-03-27T15:28:40.210364
2019-12-03T10:16:16
2019-12-03T10:16:16
126,003,948
4
3
MIT
2019-12-03T10:16:17
2018-03-20T10:59:45
Java
UTF-8
Java
false
false
833
java
package com.urbanclap.checkoutcart.frame_work.market.interfaces; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.View; import android.view.ViewGroup; import com.urbanclap.checkoutcart.frame_work.market.MarketManager; /** * @author : Adnaan 'Zohran' Ahmed <adnaanahmed@com.urbanclap> * @version : 1.0.0 * @since : 14 Mar 2018 1:37 PM */ public interface IMarketView { void addNavigationBar(@Nullable View navigationBar, @NonNull ViewGroup.LayoutParams layoutParams); void addStickyViewHolder(@Nullable View stickyView, @NonNull ViewGroup.LayoutParams layoutParams); void addIMarketSectionView(@Nullable View marketSectionView, @NonNull ViewGroup.LayoutParams layoutParams); void bindMarketManager(@NonNull MarketManager<?, ?, ?> marketManager); }
[ "adnaanahmed@urbanclap.com" ]
adnaanahmed@urbanclap.com
9eb07188d3e718f0e5bfa435bfb2a1aada37cba2
207bdc32984a1bfb17d5373316b8cf2710268378
/JavaBase/workspace/day07-20180305/src/lesson03/Demo01.java
64fdd89b1745dbb1d13e5579f002c8ea133770bb
[]
no_license
frank-lam/JavaWebLearn
49ecd03ed55362f4d3a00e106bf222d7499bfcde
9be28d346b425fad34e739227ea879557bbd5d5a
refs/heads/master
2020-04-25T08:14:55.793363
2018-12-08T15:53:09
2018-12-08T15:53:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
package lesson03; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; public class Demo01 { public static void main(String[] args) { // TODO Auto-generated method stub //回顾以前说过的线程安全问题 [看源码讲解] /* Vector,StringBuffer,Hashtable * * //1.面试题:Vector和ArrayList有什么区别 Vector是线程安全的,ArrayList是线程不安全的 Vector的方法声明了synchronized //2.StringBuffer和StringBuilder有什么区别? StringBuffer是线程安全的,StringBuilder是线程不安全的 //3.Hashtable和HashMap的区别 Hashtable是线程安全的,HashMap是线程不安全的*/ Vector v; ArrayList al; StringBuffer sb; StringBuilder sb1; Hashtable ht; HashMap hm; Collections cs;//集合工具类 } }
[ "1924949262@qq.com" ]
1924949262@qq.com
0798bd3dec3cfd194d5d9c0238c8e384128919ee
0608262ab6d758a5c468ed12b3f4d8ecf459817f
/src/main/java/org/nuist/raft/rpc/DefaultRpcClient.java
ccac953e6489c56bd85bd93b30e017848417f9e9
[]
no_license
xiazhixiang/raft-kv
84312837556e8e36de6324030e79b3f2d2e9ca87
700140c15274653ebe7a202218d3a6ac0a18c317
refs/heads/master
2022-12-10T23:13:43.323476
2020-09-08T07:09:43
2020-09-08T07:09:43
291,208,898
14
2
null
null
null
null
UTF-8
Java
false
false
1,204
java
//package org.nuist.raft.rpc; // //import com.alipay.remoting.exception.RemotingException; // //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; // //import org.nuist.raft.exception.RaftRemotingException; // ///** // * // * // */ //public class DefaultRpcClient implements RpcClient { // // public static Logger logger = LoggerFactory.getLogger(DefaultRpcClient.class.getName()); // // private final static com.alipay.remoting.rpc.RpcClient CLIENT = new com.alipay.remoting.rpc.RpcClient(); // static { // CLIENT.init(); // } // // // @Override // public Response send(Request request) { // return send(request, 200000); // } // // @Override // public Response send(Request request, int timeout) { // Response result = null; // try { // result = (Response) CLIENT.invokeSync(request.getUrl(), request, timeout); // } catch (RemotingException e) { // //e.printStackTrace(); // logger.info("rpc RaftRemotingException "); // throw new RaftRemotingException(); // } catch (InterruptedException e) { // e.printStackTrace(); // } // return (result); // } //}
[ "1217937285@qq.com" ]
1217937285@qq.com
8a99ccdbc0d05a08d368874168e9eb7d79968619
cb80a1f2f8237347845b3b6680652f32fbc95d0f
/app/src/main/java/android/bignerdbranch/com/CheckInListActivity.java
070b16b00103a3744ad9bb563b1951b13e31e189
[]
no_license
samlawlerr/CheckIn
de65587526cf338bed51365dce935456ecc88208
75ac63c258237ad6d47ab767a22ed5c91417ae7a
refs/heads/master
2022-02-27T04:46:05.927105
2019-10-26T08:01:03
2019-10-26T08:01:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
250
java
package android.bignerdbranch.com; import android.support.v4.app.Fragment; public class CheckInListActivity extends SingleFragmentActivity { @Override protected Fragment createFragment() { return new CheckInListFragment(); } }
[ "xJLsRzs57h7a7R8" ]
xJLsRzs57h7a7R8
6fbd9d82daef2cb99aa6e2abfc9f333756ee6f43
ace322a5ecedca360a8a7271cd84cc13e5b01197
/forge-gui-desktop/src/main/java/forge/screens/home/quest/package-info.java
1b0c46b65f069cc1b683c72cf4504b84bbd0964b
[]
no_license
diab0l/mtg-forge
32d4739f99d201b04b81c1b9bfe3a09260f98143
3277a0c2e02dabca5b03f365c593e6ce8091e317
refs/heads/master
2021-01-17T06:09:49.780171
2016-01-26T17:51:32
2016-01-26T17:51:32
50,458,943
3
3
null
null
null
null
UTF-8
Java
false
false
62
java
/** Forge Card Game. */ package forge.screens.home.quest;
[ "drdev@269b9781-a132-4a9b-9d4e-f004f1b56b58" ]
drdev@269b9781-a132-4a9b-9d4e-f004f1b56b58
6525a0ba34862f530ba29187c9a25c72b33a6cc5
a90b1cf7dc8ec7095d9dc1e1601994e6e52180a4
/app/src/main/java/com/example/administrator/mengbaofushiji/db/DBConsts.java
4f0d49bf6aa9d6b2f6b2d4ee7122e5468bf6c80c
[]
no_license
WeekGeng/MengBaoFuShiJi
2fdab806c84bb238157587a07d24bce17e7c87ce
2ce6835426faf7397c706faa28e472422692a676
refs/heads/master
2021-01-10T18:53:21.619011
2015-06-10T06:26:55
2015-06-10T06:26:55
34,090,428
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package com.example.administrator.mengbaofushiji.db; /** * Created by Administrator on 2015/5/8. */ public class DBConsts { /** * 个人资料的数据库 * person数据库名 * personData数据表名 * imgUrl 头像路径 * nickName 昵称 */ public static final String DATABASE_HOME_PERSONAL_DATA="person"; public static final String TABLE_HOME_PERSONAL_DATA="personData"; public static final String TABLE_HOME_PERSONAL_DATA_IMAGE_URL="imgUrl"; public static final String TABLE_HOME_PERSONAL_DATA_NICK="nickName"; }
[ "13162833922" ]
13162833922
658ad18003dbdc0014cb15b1cd31e011597887cb
e674e7d4cc2ec14743ab1bbc326cd1c53cd8d243
/src/test/java/com/ZTP_1/AppTest.java
e2588e7213f995087e1e89cd9ef2f3f59ab88d89
[]
no_license
landerixx/ZTP_1
da97d8ab6e8c377d7de4c2d4e6ad00cd8b489d90
3fa371eb9ddafe001186cbf3e3bdc2ac61f015de
refs/heads/master
2021-01-17T12:04:51.430202
2017-03-15T16:30:03
2017-03-15T16:30:03
84,056,082
0
0
null
null
null
null
UTF-8
Java
false
false
9,662
java
package com.ZTP_1; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } } /* StudentDaoImpl stdao= new StudentDaoImpl(); Student stud = new Student(); stud.setStudentId(3); stud.setStudentName("Nowak"); // stdao.addStudent(stud); List<Student> stList= stdao.getAllStudents(); for(Student st: stList) System.out.println(st); Student zBazy = stdao.getStudent(3); System.out.println(zBazy); zBazy.setStudentName("POPRAWIONE"); //stdao.updateStudent(zBazy); Student zBazy2= stdao.getStudent(3); System.out.println(zBazy2); System.out.println("USUWAMY"); //stdao.deleteStudent(3); List<Student> stList2= stdao.getAllStudents(); for(Student st: stList2) System.out.println(st); */ //////////// //KURSY // /* KursDaoImpl kursdao = new KursDaoImpl(); Kurs kurs = new Kurs(); kurs.setKursId(2); kurs.setKursName("JAVA"); //kursdao.addKurs(kurs); kurs.setKursName("PROGRAMOWANIE"); kursdao.updateKurs(kurs); Kurs kurs2 = kursdao.getKurs(1); System.out.println(kurs2); //kursdao.deleteKurs(1); List<Kurs> kursy = kursdao.getAllCourses(); for(Kurs k: kursy) System.out.println(k); */ //ZAPISANY /* Zapisany zapisany = new Zapisany(); zapisany.setKursId(1); zapisany.setStudentId(4); ZapisanyDaoImpl zapDao = new ZapisanyDaoImpl(); //zapDao.addZapisany(zapisany); //zapDao.deleteZapisany(1,4); List<Zapisany> zapisanyList = zapDao.getAllZapisany(); for(Zapisany zap: zapisanyList) System.out.println(zap); Zapisany zap2 = zapDao.getZapisany(2,3); System.out.println(zap2); */ //SERVICY /* //STUDENT StudentDaoImpl stdao= new StudentDaoImpl(); StudentService stService = new StudentServiceImpl(stdao); List<Student> listastud= stService.getAll(); for(Student st: listastud) System.out.println(st); Student s= stService.get(3); Student s2 = stService.get(4); // nie ma studenta o podanym ID -> wychodzi NULL System.out.println(s); stService.add(s); // w bazie jest juz taki student Student nowy = new Student(8, "Nowy"); //stService.add(nowy); // juz nowy.setStudentName("NowyUpdate"); //stService.update(nowy); //zupdatowany Student s3 = new Student (100,"Nie w Bazie"); stService.update(s3); // nie istnieje student w bazie o takim ID List<Integer> indeksy = stService.getAllIndexes(); System.out.println(indeksy); //stService.remove(nowy); stService.remove(s3); // nie istnieje student w bazie o takim ID listastud= stService.getAll(); for(Student st: listastud) System.out.println(st); */ // //KURSY //ZAPISANY /* //UTWORZ KURS System.out.println("Tworzysz kurs. Podaj indeks"); kursIndex = scanner.nextInt(); System.out.println("Podaj nazwe kursu"); kursName = scanner.next(); kursController.createKurs(kursIndex,kursName); //WYSWIETL WSZYSTKIE KURSY kursController.displayCourses(); //EDYTUJ NAZWE KURSU System.out.println("Podaj nr indeksu kursu, ktoremu chcesz zmienic nazwe."); kursIndex = scanner.nextInt(); System.out.println("Podaj nowa nazwe"); kursName = scanner.next(); kursController.changeCourseName(kursIndex,kursName); //WYSWIETL KURS System.out.println("Podaj nr indedksu kursu, ktorego chcesz wyswietlic"); kursIndex=scanner.nextInt(); kursController.showCourse(kursIndex); */ //STUDENCI /* //UTWORZ STUDENTA System.out.println("Tworzysz studenta. Podaj indeks"); studentIndex = scanner.nextInt(); System.out.println("Podaj nazwe studenta"); studentName = scanner.next(); studentController.createStudent(studentIndex,studentName); //WYSWIETL WSZYSTKICH STUDENTOW studentController.displayAllStudents(); //EDYTUJ NAZWE Studenta System.out.println("Podaj nr indeksu studenta, ktoremu chcesz zmienic nazwe."); studentIndex = scanner.nextInt(); System.out.println("Podaj nowa nazwe"); studentName = scanner.next(); studentController.changeStudentName(studentIndex,studentName); studentController.displayAllStudents(); //WYSWIETL STUDENTA System.out.println("Podaj nr indeksu studenta, ktorego chcesz wyswietlic"); studentIndex=scanner.nextInt(); studentController.displayStudent(studentIndex); */ //============================== //SPRAWDZAM zapisanyDAO delete ALL STUDENTS/COURSES //DAM TRUE USUNIETE WSZYSTKIE KURSY STUDENTA //DAM FALSE USUNIETE WSZYSSCY STUDENCI KURSU // zapisanyDao.deleteAllZapisany(3,true); //zapisanyService.deleteAllZapisanyStudentsFromKurs(3); // zapisanyService.deleteAllZapisanyCoursesFromStudent(5); //KOLEJNY ETAP /* //WYSWIETL KURS WRAZ Z JEGO STUDENTAMI System.out.println("Podaj nr indeksu kursu, ktorego chcesz wyswietlic razem z zapisanymi studentami"); kursIndex=scanner.nextInt(); kursController.displayCourseWithStudents(kursIndex); */ /* //WYSWIETL STUDENTA Z JEGO KURSAMI System.out.println("Podaj nr indeksu studenta, ktorego chcesz wyswietlic z jego kursami"); studentIndex=scanner.nextInt(); studentController.displayStudentWithCourses(studentIndex); */ //ZAPIS STUDENTA KA KURS /* System.out.println("Podaj nr studenta, jakiego chcesz zapisac na kurs"); studentIndex=scanner.nextInt(); System.out.println("Podaj nr kursu"); kursIndex=scanner.nextInt(); studentController.enrollStudentforCourse(studentIndex,kursIndex); */ //USUWAMY Kurs STUDENTA /* System.out.println("Podaj nr studenta, jakiego chcesz wypisac z kursu"); studentIndex=scanner.nextInt(); System.out.println("Podaj nr kursu z jakiego chcesz go wypisac"); kursIndex=scanner.nextInt(); studentController.removeFromCourse(studentIndex,kursIndex); */ //USUWAMY studenta z kursu /* System.out.println("Podaj id kursu z ktorego chcesz wypisac studenta"); kursIndex=scanner.nextInt(); System.out.println("Podaj id studenta"); studentIndex=scanner.nextInt(); kursController.cancelStudent(kursIndex,studentIndex); */ //USUWAMY WSZYSTKIE KURSY STUDENTA /* System.out.println("Podaj nr studenta, jakiego chcesz wypisac z wszystkich kursow"); studentIndex=scanner.nextInt(); //studentController.removeFromAllCourses(studentIndex); */ /* //USUWAMY WSZYSTKICH STUDENTOW Z KURSU System.out.println("Podaj id kursu z ktorego chcesz wypisac wszystkich studentow"); kursIndex=scanner.nextInt(); kursController.cancelAllStudents(kursIndex); */ /* //USUWAMY STUDENTA Z BAZY!! System.out.println("Podaj nr studenta, jakiego chcesz usunac z bazy"); studentIndex=scanner.nextInt(); studentController.removeStudent(studentIndex); */ //USUWAMY KURS Z BAZY!! /* System.out.println("Podaj id kursu z ktorego chcesz wypisac studenta"); kursIndex=scanner.nextInt(); kursController.removeCourse(kursIndex); scanner.close(); */ //TESTY XML /* KursDaoXML kursDao =new KursDaoXML(); //kursDao.addKurs(new Kurs(5,"dupa4")); kursDao.deleteKurs(3); List<Kurs> kursy = kursDao.getAllCourses(); for(Kurs k:kursy) System.out.println(k); */ /* StudentDao studentDao = new StudentDaoXML(); //studentDao.addStudent(new Student(162, "adamefranek")); Student st=studentDao.getStudent(162); System.out.println(st); List<Student> lista = studentDao.getAllStudents(); System.out.println( lista); st.setStudentName("poprawiony"); studentDao.updateStudent(st); lista = studentDao.getAllStudents(); System.out.println( lista); studentDao.deleteStudent(12); lista = studentDao.getAllStudents(); System.out.println( lista); */ /* ZapisanyDao zapisanyDao = new ZapisanyDaoXML(); // zapisanyDao.addZapisany(new Zapisany(5001,45)); Zapisany zap = zapisanyDao.getZapisany(1,6); System.out.println(zap); List<Zapisany> listaz = zapisanyDao.getAllZapisany(); System.out.println(listaz); // zapisanyDao.deleteZapisany(2,2); zapisanyDao.deleteAllZapisany(45,true); listaz = zapisanyDao.getAllZapisany(); System.out.println(listaz); */
[ "landerixx@gmail.com" ]
landerixx@gmail.com
0611c61a0cf92be53ae1cdc54f08e19968aa14ac
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/com/tencent/mobileqq/filemanager/activity/base/QfileFileItemHolder.java
a580518443a85324878ac50f7907a37bcabc2d2a
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
908
java
package com.tencent.mobileqq.filemanager.activity.base; import android.widget.Button; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; import com.tencent.mobileqq.filemanager.widget.AsyncImageView; public class QfileFileItemHolder implements Cloneable { public int a; public Button a; public CheckBox a; public ImageView a; public ProgressBar a; public RelativeLayout a; public TextView a; public AsyncImageView a; public Object a; public TextView b; public TextView c; public TextView d; } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: com.tencent.mobileqq.filemanager.activity.base.QfileFileItemHolder * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
7ab8d66491a801eece47e5b73a895b7443af0b8c
cff5e6a2c9ce026b2945dd4fb9cdf29d79c669cc
/gyk3417/app/src/androidTest/java/com/example/android/gyk3417/ExampleInstrumentedTest.java
d5b56cd0cf3a67b964286b608430db7c32dcb00d
[]
no_license
gyk2019/gyk301
2fdc2b791a590f4bf3e59cab7dac6d400e7db55d
7e28eb8418866bc9f4fedd64a0969c13ea5a6dff
refs/heads/master
2020-05-15T14:18:38.551162
2019-04-19T22:33:45
2019-04-19T22:33:45
182,331,385
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.example.android.gyk3417; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.android.gyk3417", appContext.getPackageName()); } }
[ "android@Semihs-MacBook-Pro.local" ]
android@Semihs-MacBook-Pro.local
08fc3fb831382e6c661feda5840927aaa8b89ddf
507f75456ce02182178c90bcd175863258ba2c1a
/src/main/java/com/sf/arch/udata/privilege/pojo/PrivilegeDO.java
1e0b3f956a8753a0e0c8b04f567bfa0ee168d54b
[ "Apache-2.0" ]
permissive
sunxyq/AuthControll
fd5470bc87f0847219c81bf89d890995ab5a04bc
429c7d03638697de3c95914b1598da02e9f7fa9c
refs/heads/master
2020-03-21T07:25:49.485481
2018-06-22T08:58:45
2018-06-22T08:58:45
138,279,665
1
0
null
null
null
null
UTF-8
Java
false
false
2,411
java
package com.sf.arch.udata.privilege.pojo; import org.hibernate.validator.constraints.NotBlank; import javax.persistence.*; import javax.validation.constraints.NotNull; @Entity @Table(name="privilege") public class PrivilegeDO { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotBlank @Column(name="privilege_no") private String privilegeNO; @NotBlank @Column(name="privilege_name") private String privilegeName; @NotBlank @Column(name="product_name") private String productName; @NotNull @Column(name="privilege_type") private Integer privilegeType; @NotBlank @Column(name="privilege_action") private String privilegeAction; @NotNull @Column(name="description") private String description; @NotNull @Column(name="status") private Integer status; @NotNull @Column(name="ctime") private Integer ctime; @NotNull @Column(name="utime") private Integer utime; public String getPrivilegeNO() { return privilegeNO; } public void setPrivilegeNO(String privilegeNO) { this.privilegeNO = privilegeNO; } public String getPrivilegeName() { return privilegeName; } public void setPrivilegeName(String privilegeName) { this.privilegeName = privilegeName; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public Integer getPrivilegeType() { return privilegeType; } public void setPrivilegeType(Integer privilegeType) { this.privilegeType = privilegeType; } public String getPrivilegeAction() { return privilegeAction; } public void setPrivilegeAction(String privilegeAction) { this.privilegeAction = privilegeAction; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public Integer getCtime() { return ctime; } public void setCtime(Integer ctime) { this.ctime = ctime; } public Integer getUtime() { return utime; } public void setUtime(Integer utime) { this.utime = utime; } }
[ "yongqingxiang@sf-express.com" ]
yongqingxiang@sf-express.com
3795a89c83302d063b024e6ca12fcf7cb219bfd9
d98fe6d98e6dfebd1fb364158d8d95d374cffb70
/Test/Test_Blockchain.java
77f1a8354186206273b2c9daff1a91903b48b551
[ "MIT" ]
permissive
Darker97/Buchhaltung-in-der-Blockchain
d64ee67f7683a07dc181864f49ce5ed396eb99f6
f2da20b91d547c5bded3e2b7871478416d0813e5
refs/heads/master
2020-06-29T00:15:48.283264
2019-08-03T14:04:58
2019-08-03T14:04:58
200,381,931
0
0
null
null
null
null
UTF-8
Java
false
false
1,408
java
package com.ugsbo.Buchhaltung; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import ugsbo.com.buchhaltung.Blockchain; public class Test_Blockchain { public Blockchain Workingobjekt; @Before public void setUp() throws Exception { Workingobjekt = new Blockchain(); } @Test public void hinzufügen() { int eingabe = 500; int ergebnis; Workingobjekt.add(eingabe); ergebnis = Workingobjekt.kontostand(); assertEquals("eingabe und Ergebnis sind gleich", eingabe, ergebnis); } @Test public void hinzufügenNegativ() { int eingabe = -500; int ergebnis; Workingobjekt.add(eingabe); ergebnis = Workingobjekt.kontostand(); assertEquals("eingabe und Ergebnis sind gleich", eingabe, ergebnis); } @Test public void hinzufügenIstNull() { int eingabe = 0; int ergebnis; Workingobjekt.add(eingabe); ergebnis = Workingobjekt.kontostand(); assertEquals("eingabe und Ergebnis sind gleich", eingabe, ergebnis); } @Test public void hinzufügenMehrAlsEinmal() { int eingabe = 100; int erwartet = 300; int ergebnis; Workingobjekt.add(eingabe); Workingobjekt.add(eingabe); Workingobjekt.add(eingabe); ergebnis = Workingobjekt.kontostand(); assertEquals("eingabe und Ergebnis sind gleich", erwartet, ergebnis); } }
[ "christian@baltzer.de" ]
christian@baltzer.de
9f0166b334cbbd9f3830a8ea854bb3fd25c478fb
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/android/support/p029v7/widget/C1418m.java
fa15ec6a49fb9c85ff01884f04b08bdbc60f4556
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,610
java
package android.support.p029v7.widget; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Resources.NotFoundException; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build.VERSION; import android.support.p022v4.content.res.C0700e.C0701a; import android.support.p022v4.widget.C1036b; import android.support.p022v4.widget.C1056n; import android.support.p029v7.appcompat.R$styleable; import android.text.method.PasswordTransformationMethod; import android.util.AttributeSet; import android.widget.TextView; import java.lang.ref.WeakReference; /* renamed from: android.support.v7.widget.m */ final class C1418m { /* renamed from: a */ private final TextView f5523a; /* renamed from: b */ private C1363at f5524b; /* renamed from: c */ private C1363at f5525c; /* renamed from: d */ private C1363at f5526d; /* renamed from: e */ private C1363at f5527e; /* renamed from: f */ private C1363at f5528f; /* renamed from: g */ private C1363at f5529g; /* renamed from: h */ private final C1420n f5530h = new C1420n(this.f5523a); /* renamed from: i */ private int f5531i; /* renamed from: j */ private Typeface f5532j; /* renamed from: k */ private boolean f5533k; /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6558a(WeakReference<TextView> weakReference, Typeface typeface) { if (this.f5533k) { this.f5532j = typeface; TextView textView = (TextView) weakReference.get(); if (textView != null) { textView.setTypeface(typeface, this.f5531i); } } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6559a(boolean z) { this.f5523a.setAllCaps(z); } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6560a(boolean z, int i, int i2, int i3, int i4) { if (!C1036b.f3605a) { mo6562b(); } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6561a(int[] iArr, int i) throws IllegalArgumentException { this.f5530h.mo6574a(iArr, i); } /* access modifiers changed from: 0000 */ /* renamed from: c */ public final boolean mo6563c() { return this.f5530h.mo6578e(); } /* access modifiers changed from: 0000 */ /* renamed from: d */ public final int mo6564d() { return this.f5530h.f5538a; } /* access modifiers changed from: 0000 */ /* renamed from: e */ public final int mo6565e() { return this.f5530h.mo6569a(); } /* access modifiers changed from: 0000 */ /* renamed from: f */ public final int mo6566f() { return this.f5530h.mo6575b(); } /* access modifiers changed from: 0000 */ /* renamed from: g */ public final int mo6567g() { return this.f5530h.mo6576c(); } /* access modifiers changed from: 0000 */ /* renamed from: h */ public final int[] mo6568h() { return this.f5530h.f5539b; } /* access modifiers changed from: 0000 */ /* renamed from: b */ public final void mo6562b() { this.f5530h.mo6577d(); } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6552a() { if (!(this.f5524b == null && this.f5525c == null && this.f5526d == null && this.f5527e == null)) { Drawable[] compoundDrawables = this.f5523a.getCompoundDrawables(); m7021a(compoundDrawables[0], this.f5524b); m7021a(compoundDrawables[1], this.f5525c); m7021a(compoundDrawables[2], this.f5526d); m7021a(compoundDrawables[3], this.f5527e); } if (VERSION.SDK_INT < 17) { return; } if (this.f5528f != null || this.f5529g != null) { Drawable[] compoundDrawablesRelative = this.f5523a.getCompoundDrawablesRelative(); m7021a(compoundDrawablesRelative[0], this.f5528f); m7021a(compoundDrawablesRelative[2], this.f5529g); } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6553a(int i) { this.f5530h.mo6570a(i); } C1418m(TextView textView) { this.f5523a = textView; } /* renamed from: b */ private void m7022b(int i, float f) { this.f5530h.mo6571a(i, f); } /* renamed from: a */ private void m7021a(Drawable drawable, C1363at atVar) { if (drawable != null && atVar != null) { C1393g.m6904a(drawable, atVar, this.f5523a.getDrawableState()); } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6554a(int i, float f) { if (!C1036b.f3605a && !mo6563c()) { m7022b(i, f); } } /* renamed from: a */ private void m7020a(Context context, C1365av avVar) { this.f5531i = avVar.mo6390a(2, this.f5531i); int i = 10; boolean z = false; if (avVar.mo6406g(10) || avVar.mo6406g(11)) { this.f5532j = null; if (avVar.mo6406g(11)) { i = 11; } if (!context.isRestricted()) { final WeakReference weakReference = new WeakReference(this.f5523a); try { this.f5532j = avVar.mo6391a(i, this.f5531i, (C0701a) new C0701a() { /* renamed from: a */ public final void mo1053a(int i) { } /* renamed from: a */ public final void mo1054a(Typeface typeface) { C1418m.this.mo6558a(weakReference, typeface); } }); if (this.f5532j == null) { z = true; } this.f5533k = z; } catch (NotFoundException | UnsupportedOperationException unused) { } } if (this.f5532j == null) { String d = avVar.mo6400d(i); if (d != null) { this.f5532j = Typeface.create(d, this.f5531i); } } return; } if (avVar.mo6406g(1)) { this.f5533k = false; switch (avVar.mo6390a(1, 1)) { case 1: this.f5532j = Typeface.SANS_SERIF; return; case 2: this.f5532j = Typeface.SERIF; return; case 3: this.f5532j = Typeface.MONOSPACE; break; } } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6556a(Context context, int i) { C1365av a = C1365av.m6742a(context, i, R$styleable.TextAppearance); if (a.mo6406g(12)) { mo6559a(a.mo6394a(12, false)); } if (VERSION.SDK_INT < 23 && a.mo6406g(3)) { ColorStateList e = a.mo6402e(3); if (e != null) { this.f5523a.setTextColor(e); } } if (a.mo6406g(0) && a.mo6401e(0, -1) == 0) { this.f5523a.setTextSize(0, 0.0f); } m7020a(context, a); a.mo6393a(); if (this.f5532j != null) { this.f5523a.setTypeface(this.f5532j, this.f5531i); } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6557a(AttributeSet attributeSet, int i) { ColorStateList colorStateList; ColorStateList colorStateList2; boolean z; boolean z2; ColorStateList colorStateList3; boolean z3; boolean z4; ColorStateList colorStateList4; ColorStateList colorStateList5; AttributeSet attributeSet2 = attributeSet; int i2 = i; Context context = this.f5523a.getContext(); C1393g a = C1393g.m6901a(); C1365av a2 = C1365av.m6744a(context, attributeSet2, R$styleable.AppCompatTextHelper, i2, 0); int g = a2.mo6405g(0, -1); if (a2.mo6406g(3)) { this.f5524b = m7019a(context, a, a2.mo6405g(3, 0)); } if (a2.mo6406g(1)) { this.f5525c = m7019a(context, a, a2.mo6405g(1, 0)); } if (a2.mo6406g(4)) { this.f5526d = m7019a(context, a, a2.mo6405g(4, 0)); } if (a2.mo6406g(2)) { this.f5527e = m7019a(context, a, a2.mo6405g(2, 0)); } if (VERSION.SDK_INT >= 17) { if (a2.mo6406g(5)) { this.f5528f = m7019a(context, a, a2.mo6405g(5, 0)); } if (a2.mo6406g(6)) { this.f5529g = m7019a(context, a, a2.mo6405g(6, 0)); } } a2.mo6393a(); boolean z5 = this.f5523a.getTransformationMethod() instanceof PasswordTransformationMethod; if (g != -1) { C1365av a3 = C1365av.m6742a(context, g, R$styleable.TextAppearance); if (z5 || !a3.mo6406g(12)) { z2 = false; z = false; } else { z = a3.mo6394a(12, false); z2 = true; } m7020a(context, a3); if (VERSION.SDK_INT < 23) { if (a3.mo6406g(3)) { colorStateList5 = a3.mo6402e(3); } else { colorStateList5 = null; } if (a3.mo6406g(4)) { colorStateList = a3.mo6402e(4); } else { colorStateList = null; } if (a3.mo6406g(5)) { colorStateList4 = a3.mo6402e(5); } else { colorStateList4 = null; } } else { colorStateList5 = null; colorStateList4 = null; colorStateList = null; } a3.mo6393a(); colorStateList3 = colorStateList4; colorStateList2 = colorStateList5; } else { colorStateList3 = null; z2 = false; z = false; colorStateList2 = null; colorStateList = null; } C1365av a4 = C1365av.m6744a(context, attributeSet2, R$styleable.TextAppearance, i2, 0); if (z5 || !a4.mo6406g(12)) { z3 = z2; z4 = z; } else { z4 = a4.mo6394a(12, false); z3 = true; } if (VERSION.SDK_INT < 23) { if (a4.mo6406g(3)) { colorStateList2 = a4.mo6402e(3); } if (a4.mo6406g(4)) { colorStateList = a4.mo6402e(4); } if (a4.mo6406g(5)) { colorStateList3 = a4.mo6402e(5); } } ColorStateList colorStateList6 = colorStateList3; ColorStateList colorStateList7 = colorStateList2; ColorStateList colorStateList8 = colorStateList; if (VERSION.SDK_INT >= 28 && a4.mo6406g(0) && a4.mo6401e(0, -1) == 0) { this.f5523a.setTextSize(0, 0.0f); } m7020a(context, a4); a4.mo6393a(); if (colorStateList7 != null) { this.f5523a.setTextColor(colorStateList7); } if (colorStateList8 != null) { this.f5523a.setHintTextColor(colorStateList8); } if (colorStateList6 != null) { this.f5523a.setLinkTextColor(colorStateList6); } if (!z5 && z3) { mo6559a(z4); } if (this.f5532j != null) { this.f5523a.setTypeface(this.f5532j, this.f5531i); } this.f5530h.mo6573a(attributeSet2, i2); if (C1036b.f3605a && this.f5530h.f5538a != 0) { int[] iArr = this.f5530h.f5539b; if (iArr.length > 0) { if (((float) this.f5523a.getAutoSizeStepGranularity()) != -1.0f) { this.f5523a.setAutoSizeTextTypeUniformWithConfiguration(this.f5530h.mo6575b(), this.f5530h.mo6576c(), this.f5530h.mo6569a(), 0); } else { this.f5523a.setAutoSizeTextTypeUniformWithPresetSizes(iArr, 0); } } } C1365av a5 = C1365av.m6743a(context, attributeSet2, R$styleable.AppCompatTextView); int e = a5.mo6401e(6, -1); int e2 = a5.mo6401e(8, -1); int e3 = a5.mo6401e(9, -1); a5.mo6393a(); if (e != -1) { C1056n.m4572b(this.f5523a, e); } if (e2 != -1) { C1056n.m4575c(this.f5523a, e2); } if (e3 != -1) { C1056n.m4577d(this.f5523a, e3); } } /* renamed from: a */ private static C1363at m7019a(Context context, C1393g gVar, int i) { ColorStateList b = gVar.mo6491b(context, i); if (b == null) { return null; } C1363at atVar = new C1363at(); atVar.f5345d = true; atVar.f5342a = b; return atVar; } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final void mo6555a(int i, int i2, int i3, int i4) throws IllegalArgumentException { this.f5530h.mo6572a(i, i2, i3, i4); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
267b2b8d2cb6213bf1d66d717c1637e632873f44
7d7694aff7c8070f2705514dd4ec50d15e9b98c4
/AgentSystemEJB/ejbModule/session/AgentBeanRemote.java
e7423e2d77962c0aec040ffb2aeea9227cf2ad90
[]
no_license
alien93/at2
1de072b3182fc7887476cb0088bf776a90ecf50a
e74c11742be0d7d4b3386e4dd93b26fae06b339f
refs/heads/master
2021-01-01T05:09:58.447391
2016-05-26T01:46:30
2016-05-26T01:46:30
58,332,389
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package session; import java.util.ArrayList; import javax.ejb.Remote; import entities.AID; import entities.Agent; import entities.AgentType; @Remote public interface AgentBeanRemote { //dobavi listu svih tipova agenata na sistemu ArrayList<AgentType> getTypes(); //dobavi sve pokrenute agente sa sistema ArrayList<Agent> getRunningAgents(); //pokreni agenta određenog tipa sa zadatim imenom AID runAgent(AgentType type, String agentName); //zaustavi određenog agenta boolean stopAgent(AID aid); }
[ "nina.marjanovic@gmail.com" ]
nina.marjanovic@gmail.com
13627cd87c501beaa90acf5fe88ebe548404b1fa
46e2d33bc55b9fcef13893857e974f3e1405695c
/src/main/java/net/joningi/coredata/sync/DirectoryObserver.java
25f1c2500c12c78f0c6a87b0e6bba84292b5676f
[ "Apache-2.0" ]
permissive
joningis/coredatasync
c873659b87fe8894e6b901b2982c113a6dc26330
4775b8020747d58f0e7f551b775873fda28f2e70
refs/heads/master
2016-08-08T16:40:46.634164
2015-06-18T22:00:21
2015-06-18T22:00:21
32,983,685
0
0
null
null
null
null
UTF-8
Java
false
false
204
java
/* * Copyright 2015 Azazo * */ package net.joningi.coredata.sync; import java.nio.file.Path; public interface DirectoryObserver { public void directoryChange( Path path, FileEvent fileEvent); }
[ "joningis@gmail.com" ]
joningis@gmail.com
b61a07f6961e7ee858262b9173732cedb4060ec9
b72bdccc52f01ae448f3705cfa591125602a9766
/src/main/java/com/us/rk/model/serviceImpl/MemberServiceImpl.java
895c6692e01858e41c3a940a541f30e61701a47f
[]
no_license
RealKite/RK
dbbe0cd72a66514321716d68ac6063614304a1fa
1273ef8350abf42e6584933514c8641f334454b8
refs/heads/master
2022-12-21T09:19:00.090269
2019-11-09T09:40:01
2019-11-09T09:40:01
219,125,624
0
0
null
2022-12-16T09:44:11
2019-11-02T08:29:44
JavaScript
UTF-8
Java
false
false
682
java
package com.us.rk.model.serviceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import com.us.rk.model.dao.MemberMapper; import com.us.rk.model.dto.MemberBean; import com.us.rk.model.service.MemberService; @Service("memberService") public class MemberServiceImpl implements MemberService{ @Autowired MemberMapper memberMapper; @Override public void signCheck(MemberBean memberBean) { memberMapper.insertMember(memberBean); } @Override public int idCheck(String id) { System.out.println("serviceImpl: "+id); return memberMapper.idCheck(id); } }
[ "55530212+jangjinseon@users.noreply.github.com" ]
55530212+jangjinseon@users.noreply.github.com
5dfae244eed6d2674ed288b614710aa10144bb2a
12d82b205e2afb4c160e0f2c523dde45a8c545bd
/pril_xo/src/main/java/com/pril_xo/vo/ExceptionLogVO.java
bfd412dcfffb99d5117708e0fee800b0b8c76de2
[]
no_license
Pril233/myBlog
c72423702679fe52f1dbda62e0759fb914f19452
9345adea519fcc737ce22a732dc2695464b8e3d2
refs/heads/master
2023-03-26T01:59:57.989383
2021-03-31T06:38:22
2021-03-31T06:38:22
343,652,192
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package com.pril_xo.vo; /*import com.moxi.mougblog.base.vo.BaseVO;*/ import com.pril_base.vo.BaseVO; import lombok.Data; /** * <p> * ExceptionLogVO * </p> * * @author 陌溪 * @since 2020年4月7日11:45:40 */ @Data public class ExceptionLogVO extends BaseVO<ExceptionLogVO> { /** * 操作IP */ private String ip; /** * ip来源 */ private String ipSource; /** * 请求方法 */ private String method; /** * 描述 */ private String operation; /** * 参数 */ private String params; /** * 异常对象json格式 */ private String exceptionJson; /** * 异常简单信息,等同于e.getMessage */ private String exceptionMessage; /** * 开始时间 */ private String startTime; }
[ "chenzihao@sunline.cn" ]
chenzihao@sunline.cn
a061f335fd06adf7abb7af6df71e1ce79ed3a64f
bc8ffe580e8ce0788f05d9f89b2f1cb3c156e2e4
/app/src/main/java/com/codebreaker/rajaongkir/Ongkir.java
7acc297de65745645a2bec34c58bd5c9332b35e7
[]
no_license
hamam99/Cek-Ongkir
0ed1e8b14f334767cc947ba242f1bcf7abe62c6c
8a1226a04b52e468c27abda7e4bb4e19a58f0cf0
refs/heads/master
2021-01-19T01:49:43.997640
2016-10-01T16:15:43
2016-10-01T16:15:43
69,738,360
0
2
null
null
null
null
UTF-8
Java
false
false
710
java
package com.codebreaker.rajaongkir; /** * Created by kira on 30/09/2016. */ public class Ongkir { private String nama, desc, harga, waktu; public Ongkir() { } public String getNama() { return nama; } public void setNama(String nama) { this.nama = nama; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getHarga() { return harga; } public void setHarga(String harga) { this.harga = harga; } public String getWaktu() { return waktu; } public void setWaktu(String waktu) { this.waktu = waktu; } }
[ "zero.saturnus@gmail.com" ]
zero.saturnus@gmail.com
b3b983b50243e7633248b7e2477650ee10b7a4e6
25171ba24bf86c6265be323715de9a3b8fbbd2f6
/app/src/main/java/com/hearxgroup/mhealthintegrationdemo/Presenter.java
21e2a92795157828bacb3cbcc24914644744c074
[]
no_license
hearSmart/android-exampleproject-mhealthintegration
7133cad12673fb43e3d1168d2cae07eea7b4b71f
bc480200cdae3355717bbfd4463f0502c5d84cde
refs/heads/master
2021-01-25T12:48:40.736193
2018-06-11T12:10:59
2018-06-11T12:10:59
123,510,327
0
0
null
null
null
null
UTF-8
Java
false
false
3,272
java
package com.hearxgroup.mhealthintegrationdemo; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; import com.google.gson.Gson; import com.hearxgroup.mhealthintegrationdemo.Models.HearTest.HearTestTest; import com.hearxgroup.mhealthintegrationdemo.Models.HearTest.HearTestTestRequest; import com.hearxgroup.mhealthintegrationdemo.Models.MHealth.HearscreenTest; import com.hearxgroup.mhealthintegrationdemo.Models.MHealth.MHealthTestRequest; import java.util.List; /** * Copyright (c) 2017 hearX Group (Pty) Ltd. All rights reserved * Created by David Howe on 2018/03/02. * hearX Group (Pty) Ltd. * info@hearxgroup.com */ public class Presenter { private Contract.PresenterToUIInterface uiInterface; public Presenter(Contract.PresenterToUIInterface uiInterface) { this.uiInterface = uiInterface; } protected void uiEventBtnClkGo(MHealthTestRequest testRequest) { Bundle bundle = new Bundle(); bundle.putString(Constants.BUNDLE_EXTRA_MHTEST_REQUEST_JSON, testRequest.toJson()); openApp(bundle, Constants.REQUEST_HEARING_TEST_ACTION_NAME); } protected void uiEventBtnClkGo(HearTestTestRequest testRequest) { Bundle bundle = new Bundle(); bundle.putString(Constants.BUNDLE_EXTRA_HEARTEST_TEST_REQUEST_JSON, testRequest.toJson()); openApp(bundle, Constants.REQUEST_HEARTEST_TEST_ACTION_NAME); } protected void actionReceivedHSTest(Context activityContext, HearscreenTest test) { showDialog(activityContext, "HS TEST RECEIVED!", new Gson().toJson(test)); } protected void actionReceivedHTTest(Context activityContext, HearTestTest test) { showDialog(activityContext, "HearTest Test Received!", new Gson().toJson(test)); } private boolean openApp(Bundle bundle, String actionName) { Intent newIntent = new Intent(actionName); newIntent.setType("text/plain"); PackageManager packageManager = IntegrationApplication.getAppContext().getPackageManager(); List<ResolveInfo> activities = packageManager.queryIntentActivities(newIntent, 0); boolean isIntentSafe = activities.size() > 0; if (isIntentSafe) { if(bundle!=null) newIntent.putExtras(bundle); newIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); uiInterface.launch(newIntent); return true; } return false; //MHEALTH APP INSTALLATION COULD NOT BE FOUND } private void showDialog(Context activityContext, String title, String message){ AlertDialog.Builder builder = new AlertDialog.Builder(activityContext); builder.setTitle(title); builder.setMessage(message); builder.setPositiveButton("GREAT!", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.setCancelable(false); builder.create().show(); } }
[ "umbredave@gmail.com" ]
umbredave@gmail.com
2e60080c47df05d29121b716e1bc0e60ad5e30d4
88734c341cdf472f6aef14605f904c2855a5ae38
/src/main/java/com/tech/web/prueba/negocio/impl/ItinerarioDeTrabajoWilsonNegocioImpl.java
27f45de01be219948b328e25ed151ad4df0ff8f0
[]
no_license
gtorres04/CarguePerezosoTECH
beda9f91ec1f9b5a2d1e1b2ad9ba75de71e93d53
ca5ce1c615d6aa5af2d6f5e2a6ea6796d6a29ec6
refs/heads/master
2020-12-03T00:42:02.746453
2017-12-26T22:27:54
2017-12-26T22:27:54
96,064,209
0
0
null
null
null
null
UTF-8
Java
false
false
8,293
java
/** * */ package com.tech.web.prueba.negocio.impl; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.springframework.stereotype.Repository; import com.tech.web.prueba.dominio.ArticuloATrastear; import com.tech.web.prueba.dominio.DiaDeTrabajo; import com.tech.web.prueba.exception.CargaPerezosaException; import com.tech.web.prueba.negocio.IItinerarioDeTrabajoWilsonNegocio; import com.tech.web.prueba.support.AdmonLogger; import com.tech.web.prueba.support.Constantes.Mensajes; import com.tech.web.prueba.support.Utilidades; /** * @author gerlinorlandotorressaavedra * */ @Repository public class ItinerarioDeTrabajoWilsonNegocioImpl implements IItinerarioDeTrabajoWilsonNegocio { /** * instancia logger */ private static final AdmonLogger LOGGER = AdmonLogger .getInstance(Logger.getLogger(ItinerarioDeTrabajoWilsonNegocioImpl.class)); private DiaDeTrabajo[] itinerarioDeTrabajo; /** * alamcena true si se va agregar un articulo */ private boolean agregarCantidadArticulosDeldia; /** * alamcena true si se va agregar un el peso de un articulo. */ private boolean agregarPesoDelArticulo; /** * Se almacena el numero del dia en gestion. */ private int ordenDelDiaEnGestion; /** * Almacena el numero del articulo del dia en gestion. */ private int ordenDelArticuloEnGestion; /* * (non-Javadoc) * * @see com.tech.web.prueba.negocio.IItinerarioDeTrabajoWilsonNegocio# * organizarItinerario(java.lang.String) */ @Override public DiaDeTrabajo[] organizarItinerario(String rutaArchivo) throws CargaPerezosaException { rastrearArchivoInput(rutaArchivo); agregarCantidadArticulosDeldia = false; agregarPesoDelArticulo = false; ordenDelDiaEnGestion = 0; ordenDelArticuloEnGestion = 0; return this.itinerarioDeTrabajo; } /* * (non-Javadoc) * * @see com.tech.web.prueba.negocio.IItinerarioDeTrabajoWilsonNegocio# * maximoNumeroDeViajesEnElDia(com.tech.web.prueba.dominio.DiaDeTrabajo) */ @Override public int maximoNumeroDeViajesEnElDia(DiaDeTrabajo diaDeTrabajo) { List<Integer> pesosArticulos = Utilidades .getCollectionDePesosDeLosArticulosDelDia(diaDeTrabajo.getArticulosATrastiar()); List<int[]> viajesArticulos = new ArrayList<>(); while (!pesosArticulos.isEmpty()) { int peso = pesosArticulos.get(0); int numeroDeProductosDebajoDeEl = (int) (Math.ceil(50.0 / peso) - 1); if ((numeroDeProductosDebajoDeEl + 1) > pesosArticulos.size()) { int[] viajeMenor = Utilidades.getViajeMenosPesado(viajesArticulos); int[] viajeNuevoAgregandoUltimosArticulos = new int[viajeMenor.length + pesosArticulos.size()]; int i = 0; for (i = 0; i < viajeMenor.length; i++) { viajeNuevoAgregandoUltimosArticulos[i] = viajeMenor[i]; } for (int pesoRestante : pesosArticulos) { viajeNuevoAgregandoUltimosArticulos[i++] = pesoRestante; } viajesArticulos.remove(viajeMenor); viajesArticulos.add(viajeNuevoAgregandoUltimosArticulos); pesosArticulos.clear(); continue; } pesosArticulos.remove(0); int[] viajeDeArticulos = new int[numeroDeProductosDebajoDeEl + 1]; int index = 0; viajeDeArticulos[index++] = peso; if (1 <= numeroDeProductosDebajoDeEl) { int controlIndiceAgregar = numeroDeProductosDebajoDeEl; while (0 < controlIndiceAgregar) viajeDeArticulos[index++] = pesosArticulos.get(pesosArticulos.size() - (controlIndiceAgregar--)); controlIndiceAgregar = numeroDeProductosDebajoDeEl; for (int i = 0; i < controlIndiceAgregar; i++) { pesosArticulos.remove(pesosArticulos.size() - 1); } } viajesArticulos.add(viajeDeArticulos); } return viajesArticulos.size(); } /** * Recorre el archivo y se toman los datos del archivo Input. * * @param rutaArchivo * @throws CargaPerezosaException */ private void rastrearArchivoInput(String rutaArchivo) throws CargaPerezosaException { String cadena; FileReader f = null; int numeroLinea = 0; try { f = new FileReader(rutaArchivo); BufferedReader b = new BufferedReader(f); while ((cadena = b.readLine()) != null) { if (0 == numeroLinea) { crearDiasDeTrabajo(cadena); this.agregarCantidadArticulosDeldia = true; numeroLinea++; continue; } if (this.agregarCantidadArticulosDeldia) { crearArticulosDelDiaATrastear(cadena); numeroLinea++; continue; } if (this.agregarPesoDelArticulo) { asignarValoresAArticulosATrastiar(cadena); numeroLinea++; continue; } } b.close(); f.close(); } catch (IOException e) { LOGGER.warn(e); throw new CargaPerezosaException( String.format(Mensajes.ERROR_ARCHIVO_NO_ENCONTRADO.getMensaje(), rutaArchivo)); } } /** * Se asigna el nombre y el peso de los articulos. * * @param cadenaPesoDelArticuloATrastiar * @throws CargaPerezosaException */ private void asignarValoresAArticulosATrastiar(String cadenaPesoDelArticuloATrastiar) throws CargaPerezosaException { int pesoDelArticuloATrastiar = 0; try { pesoDelArticuloATrastiar = Integer.parseInt(cadenaPesoDelArticuloATrastiar); if (1 >= pesoDelArticuloATrastiar && 100 <= pesoDelArticuloATrastiar) { throw new CargaPerezosaException(Mensajes.ERROR_RESTRICCION_PESO_ARTICULO.getMensaje()); } } catch (NumberFormatException e) { LOGGER.warn(e); throw new CargaPerezosaException(Mensajes.ERROR_CASTING_PESO_ARTICULO.getMensaje()); } itinerarioDeTrabajo[this.ordenDelDiaEnGestion - 1].getArticulosATrastiar()[this.ordenDelArticuloEnGestion] .setNombre("Articulo" + (this.ordenDelDiaEnGestion - 1) + this.ordenDelArticuloEnGestion); itinerarioDeTrabajo[this.ordenDelDiaEnGestion - 1].getArticulosATrastiar()[this.ordenDelArticuloEnGestion] .setPeso(pesoDelArticuloATrastiar); this.ordenDelArticuloEnGestion++; if (this.ordenDelArticuloEnGestion == itinerarioDeTrabajo[this.ordenDelDiaEnGestion - 1] .getArticulosATrastiar().length) { this.agregarPesoDelArticulo = false; this.agregarCantidadArticulosDeldia = true; } } /** * Se crean los objetos de articulos a trastear, validando las restricciones * de la cantidad de articulos a trastear diarios. * * @param cadenaCantidadDeArticuloAtrastear * @throws CargaPerezosaException */ private void crearArticulosDelDiaATrastear(String cadenaCantidadDeArticuloAtrastear) throws CargaPerezosaException { int cantidadDeArticuloAtrastear = 0; try { cantidadDeArticuloAtrastear = Integer.parseInt(cadenaCantidadDeArticuloAtrastear); if (1 >= cantidadDeArticuloAtrastear && 100 <= cantidadDeArticuloAtrastear) { throw new CargaPerezosaException(Mensajes.ERROR_RESTRICCION_CANTIDAD_ARTICULOS_TRATEAR.getMensaje()); } } catch (NumberFormatException e) { LOGGER.warn(e); throw new CargaPerezosaException(Mensajes.ERROR_CASTING_CANTIDAD_ARTICULOS_TRASTEAR.getMensaje()); } ArticuloATrastear[] articulosATrastiar = new ArticuloATrastear[cantidadDeArticuloAtrastear]; for (int i = 0; i < articulosATrastiar.length; i++) { articulosATrastiar[i] = new ArticuloATrastear(); } itinerarioDeTrabajo[this.ordenDelDiaEnGestion].setArticulosATrastiar(articulosATrastiar); this.agregarCantidadArticulosDeldia = false; this.ordenDelDiaEnGestion++; this.ordenDelArticuloEnGestion = 0; this.agregarPesoDelArticulo = true; } /** * Se crean los objetos de dias de trabajos de wilson, validando las * restricciones de la cantidad de dias de trabajo. * * @param cantidadDeDias */ private void crearDiasDeTrabajo(String cadenaCantidadDeDias) throws CargaPerezosaException { int cantidadDeDias = 0; try { cantidadDeDias = Integer.parseInt(cadenaCantidadDeDias); if (1 >= cantidadDeDias && 500 <= cantidadDeDias) { throw new CargaPerezosaException(Mensajes.ERROR_RESTRICCION_CANTIDAD_DIAS_LABORALES.getMensaje()); } } catch (NumberFormatException e) { LOGGER.warn(e); throw new CargaPerezosaException(Mensajes.ERROR_CASTING_CANTIDAD_DIAS_LABORALES.getMensaje()); } itinerarioDeTrabajo = new DiaDeTrabajo[cantidadDeDias]; for (int i = 0; i < itinerarioDeTrabajo.length; i++) { itinerarioDeTrabajo[i] = new DiaDeTrabajo(); } } }
[ "gerlinorlandotorressaavedra@192.168.0.27" ]
gerlinorlandotorressaavedra@192.168.0.27
630986da26b669c9a39ee41206bf881b92c3b1e7
d3b3d14496afddb3237b2bece3102ce465693172
/gimt-web/src/edu/gimt/controller/LogoutAction.java
3087236921b3a6afb27458477019ff9fc4f255a3
[]
no_license
vmsobrino/TFG-IncidenciasGeolocalizadas
6811069be24c3159f5a0d14bff79346107eed40e
bbd71d43cd9eb3babe409f316936573653acc6be
refs/heads/master
2020-06-23T15:05:09.468652
2019-07-24T16:14:28
2019-07-24T16:14:28
198,657,646
0
0
null
null
null
null
UTF-8
Java
false
false
828
java
package edu.gimt.controller; import com.opensymphony.xwork2.ActionSupport; /** * Logout Action */ public class LogoutAction extends ActionSupport { private static final long serialVersionUID = -5404993019124031949L; public String execute() { // response.setContentType("text/html"); // Cookie[] cookies = request.getCookies(); // if (cookies != null) { // for (Cookie cookie : cookies) { // cookie.setMaxAge(0); // response.addCookie(cookie); // } // } // // invalidate sessions // HttpSession session = request.getSession(false); // if (session != null) { // session.invalidate(); // } // // no encoding because we have invalidated the session // response.sendRedirect("./login.jsp"); return SUCCESS; } }
[ "victorsobrino@hotmail.com" ]
victorsobrino@hotmail.com
0680bf4f1c1476e56a449f4b4c9eaacbab3d50db
84722e073597f61c8a08b6062807d6140534a5a1
/oveEksamen/listOve/TestList.java
44d39933c9bd52536ed549c30a2e6bf3e64aff13
[]
no_license
tageh/Java_OOP
237c3d24b605463200d2633f49f928d96081b507
18316ec7d92389c93bde7c5b42461bc0f8b7379c
refs/heads/master
2023-06-22T11:14:00.929830
2021-07-28T18:56:11
2021-07-28T18:56:11
328,597,666
0
0
null
null
null
null
UTF-8
Java
false
false
883
java
import java.util.*; import java.io.*; class TestList{ public static void main(String[] args) throws IOException{ Liste<String> MyList = new Liste<String>(); Scanner inp = new Scanner(System.in); System.out.println("What do you want to add to the list: "); String input = inp.nextLine(); do{ MyList.add(new String(input)); input = inp.nextLine(); }while(!input.equals("Exit")); System.out.println("Printing out list: \n"); MyList.printList(); try{ FileWriter writer = new FileWriter("name.txt"); for(int i = 0; i<MyList.sizeList(); i++){ writer.write(MyList.get(i).toString()+ "\n"); } writer.close(); }catch(IOException e){ e.printStackTrace(); } } }
[ "tage.hisdal@gmail.com" ]
tage.hisdal@gmail.com
759ad1c6c61fc781a052560badf82c84338a8155
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/branches/Extension API/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/policies/StateCompartmentCanonicalEditPolicy.java
d824d661a1837a9f70ba52bd9ebd0c1a9a23d3cf
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,880
java
/** * Copyright (c) 2011 committers of YAKINDU and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * Contributors: * committers of YAKINDU - initial API and implementation * */ package org.yakindu.sct.ui.editor.policies; import java.util.List; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.emf.ecore.EObject; import org.eclipse.gmf.runtime.diagram.core.util.ViewType; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy; import org.eclipse.gmf.runtime.notation.View; import org.yakindu.sct.model.sgraph.State; import org.yakindu.sct.ui.editor.utils.SemanticHintUtil; /** * @author andreas muelder */ public class StateCompartmentCanonicalEditPolicy extends CanonicalEditPolicy { @SuppressWarnings("rawtypes") @Override protected List getSemanticChildrenList() { return getSemanticHost().getRegions(); } @Override public State getSemanticHost() { return (State) super.getSemanticHost(); } @Override public IGraphicalEditPart getHost() { return (IGraphicalEditPart) super.getHost(); } @Override protected String getFactoryHint(IAdaptable elementAdapter) { EObject modelElement = (EObject) elementAdapter .getAdapter(EObject.class); String factoryHint = SemanticHintUtil.getSemanticHint(modelElement); return factoryHint; } protected boolean shouldDeleteView(View view) { if (ViewType.NOTE.equals(view.getType()) || ViewType.NOTEATTACHMENT.equals(view.getType()) || ViewType.TEXT.equals(view.getType())) { return false; } return true; } }
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
e6ea294ccbdad1fd09bea1e22c01e9de2f1ba333
8a093f232da0362e238fd27b3928a3bae49a73a6
/src/main/java/pl/edu/pw/mini/sozpw/webinterface/ui/pages/SettingsPage.java
aa5ae843c9b2bf454b42f45faa784477c61c76ce
[]
no_license
pawel001/sozpw
fb485a495e194a64a6d28b7bb0f8af495ab5f154
ad46cc30a02ff09695a1b4d0ed7ffadd6bea40ae
refs/heads/master
2021-01-17T17:07:06.500476
2013-01-30T14:48:10
2013-01-30T14:48:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
package pl.edu.pw.mini.sozpw.webinterface.ui.pages; import pl.edu.pw.mini.sozpw.webinterface.services.LoginService; import pl.edu.pw.mini.sozpw.webinterface.services.LoginServiceAsync; import pl.edu.pw.mini.sozpw.webinterface.ui.dialogs.InfoDialog; import pl.edu.pw.mini.sozpw.webinterface.ui.dialogs.StyledDialogBox; import pl.edu.pw.mini.sozpw.webinterface.utils.Validator; import com.google.gwt.core.shared.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; public class SettingsPage extends SettingsPageGenerated { public SettingsPage(final String username) { getChangePassButton().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { getErrorLabel().setText(""); String oldPass = getOldPassTextBox().getValue(); String newPass = getNewPassTextBox().getValue(); String newPassConf = getNewPassConfirmTextBox().getValue(); if (Validator.verifyPass(newPass, newPassConf)) { LoginServiceAsync loginService = (LoginServiceAsync) GWT .create(LoginService.class); loginService.changePassword(username, oldPass, newPass, new AsyncCallback<Boolean>() { @Override public void onSuccess(Boolean result) { if (result) { getOldPassTextBox().setText(""); getNewPassTextBox().setText(""); getNewPassConfirmTextBox().setText(""); StyledDialogBox sdb = new StyledDialogBox("Potwierdzenie"); sdb.add(new InfoDialog(sdb, "Hasło zostało zmienione")); sdb.center(); } else { getErrorLabel().setText( "Nie można zmienić hasła"); } } @Override public void onFailure(Throwable caught) { Window.alert("changePassword() failed"); } }); } else { getErrorLabel().setText("Niepoprawne nowe hasło"); } } }); } }
[ "klimekpawel@gmail.com" ]
klimekpawel@gmail.com
702edbc939d673985066f2b5ba2792c1bcd9d0dd
314977f005da1b4fc3877aa8ee06e1ec5cb5d1df
/src/RgbControllerGUI.java
adb55cb0314fa65d914e51debf21e162d5464c27
[]
no_license
dsmaugy/RGB_Lighting
f06fda5a39114ce93a3cffe61a741b29ff425d43
5a881bae87a38df9f49f3b48d73c8571df1b64df
refs/heads/master
2021-06-08T21:59:40.098227
2017-01-02T01:07:03
2017-01-02T01:07:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,506
java
/** * Created by Darwin on 12/29/2016. */ import javafx.event.ActionEvent; import org.ardulink.core.events.RplyEvent; import org.ardulink.core.qos.ResponseAwaiter; import org.ardulink.gui.RGBController; import java.awt.*; import java.awt.event.ActionListener; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.sound.sampled.LineUnavailableException; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class RgbControllerGUI { private Patterns pattern = new Patterns(); private JFrame frame; private JPanel pane; private JPanel pane2; // Slider Declaration private JSlider red; private JSlider green; private JSlider blue; // Slider Label Declaration private JLabel redLabel; private JLabel greenLabel; private JLabel blueLabel; private JButton stop; private JButton taylor; private JButton theatherChase; private JButton coolPattern; private JTextField taylorDelay; private JTextField coolPatternDelay; private JTextField coolPatternR; private JTextField coolPatternG; private JTextField coolPatternB; private JLabel cpDelayLabel; private JLabel cpRLabel; private JLabel cpGLabel; private JLabel cpBLabel; private Integer redValue = 0; private Integer greenValue = 0; private Integer blueValue = 0; private RgbController controller = new RgbController("COM9"); public RgbControllerGUI() { frame = new JFrame("RGB Controller"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setUpSlider(); setUpButton(); pane = new JPanel(); pane.add(red); pane.add(redLabel); pane.add(green); pane.add(greenLabel); pane.add(blue); pane.add(blueLabel); setUpSecondPane(); frame.setLayout(new GridLayout(2, 1)); frame.add(pane2); frame.add(pane); } private void setUpSecondPane() { pane2 = new JPanel(); pane2.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); //Delay Label c.gridx = 0; c.gridy = 0; pane2.add(cpDelayLabel, c); // Red Label c.gridx = 1; c.gridy = 0; pane2.add(cpRLabel, c); //Green label c.gridx = 2; c.gridy = 0; pane2.add(cpGLabel, c); //Blue label c.gridx = 3; c.gridy = 0; pane2.add(cpBLabel, c); //Delay Input c.gridx = 0; c.gridy = 1; pane2.add(coolPatternDelay, c); //Red Input c.gridx = 1; c.gridy = 1; pane2.add(coolPatternR, c); //Green Input c.gridx = 2; c.gridy = 1; pane2.add(coolPatternG, c); //Blue Input c.gridx = 3; c.gridy = 1; pane2.add(coolPatternB, c); //Cool Pattern Button c.gridx = 0; c.gridy = 2; c.gridwidth = 2; pane2.add(coolPattern, c); //Theather Chase Button c.gridx = 2; c.gridy = 2; c.gridwidth = 2; pane2.add(theatherChase, c); //Taylor c.gridx = 4; c.gridy = 2; c.gridwidth = 2; pane2.add(taylor, c); //Stop c.gridx = 6; c.gridy = 2; c.gridwidth = 2; pane2.add(stop, c); //Taylor Delay c.gridx = 2; c.gridy = 3; c.gridwidth = 2; pane2.add(taylorDelay, c); } // Sets up the sliders and the slider labels private void setUpSlider() { red = new JSlider(JSlider.VERTICAL, 0, 255, 1); red.addChangeListener(new SlideListener()); red.setMajorTickSpacing(15); red.setMinorTickSpacing(5); red.setPaintTicks(true); red.setPaintLabels(true); green = new JSlider(JSlider.VERTICAL, 0, 255, 1); green.addChangeListener(new SlideListener()); green.setMajorTickSpacing(15); green.setMinorTickSpacing(5); green.setPaintTicks(true); green.setPaintLabels(true); blue = new JSlider(JSlider.VERTICAL, 0, 255, 1); blue.addChangeListener(new SlideListener()); blue.setMajorTickSpacing(15); blue.setMinorTickSpacing(5); blue.setPaintTicks(true); blue.setPaintLabels(true); redLabel = new JLabel("Red: 0"); greenLabel = new JLabel("Green: 0"); blueLabel = new JLabel("Blue: 0"); } private void setUpButton() { coolPattern = new JButton("Cool Pattern!"); coolPattern.addActionListener(new ButtonListener()); coolPatternR = new JTextField(3); coolPatternG = new JTextField(3); coolPatternB = new JTextField(3); coolPatternDelay = new JTextField(3); taylorDelay = new JTextField(5); cpRLabel = new JLabel("Red"); cpGLabel = new JLabel("Green"); cpBLabel = new JLabel("Blue"); cpDelayLabel = new JLabel("Delay"); theatherChase = new JButton("Theather Chase"); theatherChase.addActionListener(new ButtonListener()); taylor = new JButton("???"); taylor.addActionListener(new ButtonListener()); stop = new JButton("stop"); stop.addActionListener(new ButtonListener()); } public void display() { frame.pack(); frame.setVisible(true); } public int getTaylorDelay() { return Integer.parseInt(taylorDelay.getText()); } private class SlideListener implements ChangeListener { public void stateChanged(ChangeEvent event) { redValue = new Integer(red.getValue()); redLabel.setText("Red: " + redValue); blueValue = new Integer(blue.getValue()); blueLabel.setText("Blue: " + blueValue); greenValue = new Integer(green.getValue()); greenLabel.setText("Green: " + greenValue); try { controller.setColor(redValue.toString(), greenValue.toString(), blueValue.toString()); } catch (IOException ioe) { ioe.printStackTrace(); } } } private class ButtonListener implements ActionListener { @Override public void actionPerformed(java.awt.event.ActionEvent e) { try { if (e.getSource() == coolPattern) { controller.wipeColor(coolPatternR.getText(), coolPatternG.getText(), coolPatternB.getText(), coolPatternDelay.getText()); } else if (e.getSource() == theatherChase) { controller.theaterChase(coolPatternR.getText(), coolPatternG.getText(), coolPatternB.getText(), coolPatternDelay.getText(), "3"); } else if (e.getSource() == taylor) { pattern.playTSwizzle(); TimeUnit.MILLISECONDS.sleep(200); pattern.setDelayTime(getTaylorDelay()); pattern.beginThread(); } else if (e.getSource() == stop) { pattern.stop(); } } catch (IOException ioe) { ioe.printStackTrace(); } catch (InterruptedException e1) { e1.printStackTrace(); } catch (LineUnavailableException e1) { e1.printStackTrace(); } } } }
[ "darwin78913@gmail.com" ]
darwin78913@gmail.com
bffeeeab1d2b504eff676ce3732b17645b99d9ea
cf70c244b158bb6535ef28a9cf4a1ecca47511bb
/app/src/main/java/recipeit/recipeit/accueilFRG.java
baf53cf4a9e1090510a222bb1d60b4f5674c587c
[]
no_license
Kryddd/PJS4_app
e2dd850c657750a90556d145f040bb5155428da3
bbdfe13e6bc81cc979860326728e245ad5c7ccdb
refs/heads/master
2021-05-10T16:30:00.587159
2018-02-20T10:06:25
2018-02-20T10:06:25
118,579,608
0
0
null
null
null
null
UTF-8
Java
false
false
3,599
java
package recipeit.recipeit; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; /** * A simple {@link Fragment} subclass. * Activities that contain this fragment must implement the * {@link accueilFRG.OnFragmentInteractionListener} interface * to handle interaction events. * Use the {@link accueilFRG#newInstance} factory method to * create an instance of this fragment. */ public class accueilFRG extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private OnFragmentInteractionListener mListener; public accueilFRG() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment accueilFRG. */ // TODO: Rename and change types and number of parameters public static accueilFRG newInstance(String param1, String param2) { accueilFRG fragment = new accueilFRG(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_accueil_frg, container, false); } // TODO: Rename method, update argument and hook method into UI event public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); } }
[ "elenaa.t@hotmail.fr" ]
elenaa.t@hotmail.fr
cc0055bff38fb4024205ffd7f3a6fe4430ae12c2
e820097c99fb212c1c819945e82bd0370b4f1cf7
/gwt-sh/src/main/java/com/skynet/spms/client/gui/finance/apply/PayApplyPanel.java
f51cdde9097b3fa89bd819586d4969ecabd6dfa2
[]
no_license
jayanttupe/springas-train-example
7b173ca4298ceef543dc9cf8ae5f5ea365431453
adc2e0f60ddd85d287995f606b372c3d686c3be7
refs/heads/master
2021-01-10T10:37:28.615899
2011-12-20T07:47:31
2011-12-20T07:47:31
36,887,613
0
0
null
null
null
null
UTF-8
Java
false
false
2,968
java
package com.skynet.spms.client.gui.finance.apply; import com.skynet.spms.client.PanelFactory; import com.skynet.spms.client.ShowcasePanel; import com.skynet.spms.client.entity.DataInfo; import com.skynet.spms.client.feature.data.DataSourceTool; import com.skynet.spms.client.feature.data.DataSourceTool.PostDataSourceInit; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.VisibilityMode; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.layout.SectionStack; import com.smartgwt.client.widgets.layout.SectionStackSection; import com.smartgwt.client.widgets.layout.VLayout; public class PayApplyPanel extends ShowcasePanel { private static final String DESCRIPTION = "付款申请管理信息维护页面"; private PayApplyButtonToolBar payApplyToolBar; private PayApplyList payApplyList; private VLayout mainPanelLayout; private DataInfo dataInfomation; public static class Factory implements PanelFactory { private String DESCRIPTION = "付款申请管理模块"; private String id; @Override public Canvas create() { PayApplyPanel panel = new PayApplyPanel(); id = panel.getID(); return panel; } @Override public String getID() { // TODO Auto-generated method stub return id; } @Override public String getDescription() { // TODO Auto-generated method stub return DESCRIPTION; } } @Override public Canvas getViewPanel() { // TODO Auto-generated method stub String modName="account.applyManager.payApplyManager"; String dsName="finance_payApply_dataSource"; mainPanelLayout = new VLayout(); SectionStack mainStack = new SectionStack(); mainStack.setVisibilityMode(VisibilityMode.MULTIPLE); mainStack.setAnimateSections(true); payApplyList = new PayApplyList(); DataSourceTool dataSourceTool = new DataSourceTool(); dataSourceTool.onCreateDataSource(modName, dsName, new PostDataSourceInit() { @Override public void doPostOper(DataSource dataSource, DataInfo dataInfo) { // TODO Auto-generated method stub payApplyList.setHeight(200); payApplyList.setAutoFetchData(true); payApplyList.setShowFilterEditor(true); payApplyList.setDataSource(dataSource); payApplyList.setPayApplyDataInfo(dataInfo); dataInfomation= dataInfo; payApplyList.fetchData(); payApplyList.drawPayApplyList(); } }); final SectionStackSection payApplyMainSection = new SectionStackSection("付款申请管理"); //payApplyList.drawPayApplyList(); payApplyToolBar = new PayApplyButtonToolBar(payApplyList); payApplyMainSection.setItems(payApplyToolBar, payApplyList); payApplyMainSection.setExpanded(true); mainStack.addSection(payApplyMainSection); mainPanelLayout.addMember(mainStack); return mainPanelLayout; } }
[ "usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d" ]
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
2e203504c1ef238686aedf355ad57bb76932d777
54d91731d61c6f047f91d45f873350eb25afa569
/src/main/java/com/github/margeobur/noirpvp/listeners/PlayerDeathListener.java
bb6c2a143e6cd565b221e41fa866086f84341e3c
[]
no_license
Noirland/NoirPVP
1050f7aa590f465b5c2f1f54a55699e15cb441ec
e087d2c406748bbd2b9899641a008a7caa9671bb
refs/heads/master
2020-03-30T08:24:32.710150
2018-12-20T08:26:09
2018-12-20T08:26:09
151,012,666
0
0
null
null
null
null
UTF-8
Java
false
false
2,603
java
package com.github.margeobur.noirpvp.listeners; import com.github.margeobur.noirpvp.PVPPlayer; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.PlayerDeathEvent; import java.time.LocalDateTime; /** * Listens to and handles events directly related to PVP deaths */ public class PlayerDeathListener implements Listener { /** * Listens for player deaths, determines if they are PVP related and handles them accordingly. * Any death < 5 seconds after a player damages another player is regarded as a PVP death. */ @EventHandler(priority = EventPriority.HIGHEST) public void onPlayerDie(PlayerDeathEvent event) { PVPPlayer playerInfo = PVPPlayer.getPlayerByUUID(event.getEntity().getUniqueId()); if(playerInfo == null) { // shouldn't happen return; } LocalDateTime currentTime = LocalDateTime.now(); if (playerInfo.getLastPVP() == null) { playerInfo.doRegularDeath(); return; } LocalDateTime pvpDeactivationTime = playerInfo.getLastPVP().plusSeconds(5); if(currentTime.isBefore(pvpDeactivationTime)) { doPVPDeath(event, playerInfo); } else { playerInfo.doRegularDeath(); } if(event.getEntity().getLastDamageCause().getCause().equals(EntityDamageEvent.DamageCause.STARVATION)) { if(event.getEntity().getLocation().getBlock().getTemperature() >= 1.1) { event.setDeathMessage(event.getEntity().getDisplayName() + " succumbed to heat stroke."); } else if(event.getEntity().getLocation().getBlock().getTemperature() <= 0.05) { event.setDeathMessage(event.getEntity().getDisplayName() + " froze to death."); } } } /** * Handles a PVP death */ private void doPVPDeath(PlayerDeathEvent event, PVPPlayer playerInfo) { event.setKeepInventory(true); event.setKeepLevel(true); // This will send a message to the player and update their state: playerInfo.doPvPDeath(); Player attacker = Bukkit.getPlayer(playerInfo.getLastAttackerID()); PVPPlayer attackerPVP = PVPPlayer.getPlayerByUUID(attacker.getUniqueId()); Player victim = event.getEntity(); PVPPlayer victimPVP = PVPPlayer.getPlayerByUUID(victim.getUniqueId()); attackerPVP.doMurder(victimPVP); } }
[ "margeobur@gmail.com" ]
margeobur@gmail.com
1c1373805cba58aad67e2e3ea8a24787340dd4e3
eadbe1069fc828f0ef6de37e186139a64c222cf4
/alakazam-resteasy/src/test/java/io/alakazam/resteasy/validation/ValidRepresentation.java
1d68be0ccc4b8c21f26b84aa398a71dee9620a23
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
jasongardnerlv/alakazam
07fa26e71312c8f71ee0c5b6524ea8a940dc0a75
3350fe1da1322125bbfb7450b0d44b383b64bb8f
refs/heads/master
2021-01-02T22:44:24.760268
2015-07-10T22:46:21
2015-07-10T22:46:21
26,203,728
0
2
null
2015-07-08T19:22:06
2014-11-05T04:53:22
Java
UTF-8
Java
false
false
392
java
package io.alakazam.resteasy.validation; import com.fasterxml.jackson.annotation.JsonProperty; import org.hibernate.validator.constraints.NotEmpty; public class ValidRepresentation { @NotEmpty private String name; @JsonProperty public String getName() { return name; } @JsonProperty public void setName(String name) { this.name = name; } }
[ "jason.gardner@kaseya.com" ]
jason.gardner@kaseya.com
c73efcd2cbef8a595de20b73eef98249c6502b97
48d3377ad5343031b5d4c0930d9d38d36af14653
/src/net/rdyonline/android_training/greendao/data/RoomPopulator.java
79d7afe9d6caad370f23914c99c97c02cc8de705
[ "Apache-2.0" ]
permissive
hoombar/android-training
3629b74c8cd5518ebe96d13127dceb3ddaaf2272
0d096a8d53457260c4165ce86ef05fbba907e401
refs/heads/master
2021-01-10T20:59:31.634318
2015-01-11T12:00:36
2015-01-11T12:00:36
20,013,828
0
2
null
null
null
null
UTF-8
Java
false
false
969
java
package net.rdyonline.android_training.greendao.data; import net.rdyonline.android_training.orm.Conference; import net.rdyonline.android_training.orm.Room; import net.rdyonline.android_training.orm.dao.RoomDao; public class RoomPopulator extends Populator { @Override public void populateData() { // assign them all to the first conference (example data..) Conference conf = mSession.getConferenceDao().loadAll().get(0); addRoom(conf, 100, "Kitchen"); addRoom(conf, 100, "Ball Room"); addRoom(conf, 100, "Conservatory"); addRoom(conf, 100, "Dining room"); addRoom(conf, 100, "Library"); } private void addRoom(Conference conference, long capacity, String name) { RoomDao dao = mSession.getRoomDao(); Room entity = new Room(); entity.setConference(conference.getId()); entity.setCapacity(capacity); entity.setName(name); dao.insert(entity); } @Override public void deleteData() { mSession.getRoomDao().deleteAll(); } }
[ "ben@rdydev.com" ]
ben@rdydev.com
a79b3529045df5ba2d1661c77406ffb80cf7e946
76f8f139e6eebdfb9bdcb487191ff6ba478d7ce5
/src/HomeWork2.java
dcabfa6418b59b71b2427b0fba2300af15bfa9b6
[]
no_license
Royaldegree1/Helloooo
9670809d8c87b21afb3e07d2e41f97c0ffef91d5
53d5fc5a54779deac7dc389d3a43210665146ae9
refs/heads/master
2020-05-03T00:09:19.617947
2019-04-12T02:01:17
2019-04-12T02:01:17
178,302,000
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
import java.util.Scanner; public class HomeWork2 { public static void main(String[] args) { // Program to find largest number among three numbers using nested if //provided by a user (numbers must be distinct) int num1, num2, num3;//largest Scanner input=new Scanner(System.in); System.out.println("Please enter 3 distinct double values"); num1=input.nextInt(); num2=input.nextInt(); num3=input.nextInt(); //5 , 3 , 4 if (num1>num2) { if (num1>num3) { System.out.println(num1+ " is the largest"); } else { System.out.println(num3+ " is the largest");} }else{//assuming num2>num1 if (num2>num3) { System.out.println(num2+ " is the largest"); }else { System.out.println(num3+ " is the largest"); //if(num1>num2){ // if (num1>num3) { // largest=num1; // }else { // largest=num3; // System.out.println(" The largest number is "+largest); } } } }
[ "nationalharbor722@gmail.com" ]
nationalharbor722@gmail.com
42d76086c5d0217434ecfca0a315fa1bae74d352
c5095adeb8cb816f7cceae38a6ccd078b353e99b
/ant/build/real/Generic/midp2/en_US/source/AnimationThread.java
a6bf094f959eece2fc95fb44a49a78e2a5f6daaf
[]
no_license
thilinah/jgeek
7ee94ee95800116ac97ba18615aae59ead4e7efd
a0cfc63cfcac3544419b4b26f2777774bface658
refs/heads/master
2020-05-19T09:52:59.902138
2008-08-17T23:12:22
2008-08-17T23:12:22
36,595,912
0
0
null
null
null
null
UTF-8
Java
false
false
6,573
java
//#condition polish.usePolishGui /* * Created on 15-Mar-2004 at 10:52:57. * * Copyright (c) 2004-2005 Robert Virkus / Enough Software * * This file is part of J2ME Polish. * * J2ME Polish is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * J2ME Polish 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with J2ME Polish; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Commercial licenses are also available, please * refer to the accompanying LICENSE.txt or visit * http://www.j2mepolish.org for details. */ // package de.enough.polish.ui; import javax.microedition.lcdui.Displayable; //import de.enough.polish.util.ArrayList; /** * <p>Is used to animate Screens, Backgrounds and Items.</p> * <p> * You can specify the animation interval in milliseconds in the variables section of * your build.xml script. * Example: * <pre> * <variables> * <variable name="polish.animationInterval" value="200" /> * </variables> * </pre> * sets the interval to 200 ms. When not specified, the default interval * of 100 ms will be used. * </p> * <p>Copyright Enough Software 2004, 2005</p> * <pre> * history * 15-Mar-2004 - rob creation * </pre> * @author Robert Virkus, robert@enough.de */ public class AnimationThread extends Thread { //#ifdef polish.animationInterval:defined //#= public final static int ANIMATION_INTERVAL = ${polish.animationInterval}; //#else public final static int ANIMATION_INTERVAL = 100; //#endif //#ifdef polish.sleepInterval:defined //#= private final static int SLEEP_INTERVAL = ${polish.sleepInterval}; //#else private final static int SLEEP_INTERVAL = 300; //#endif protected static boolean releaseResourcesOnScreenChange; private static ArrayList animationList; /** * Creates a new animation thread. */ public AnimationThread() { //#if polish.cldc1.1 && polish.debug.error //# super("AnimationThread"); //#else super(); //#endif //#if polish.blackberry and false //# // # Application app = Application.getApplication(); //# // # app.addKeyListener( this ); //# // # app.addTrackwheelListener( this ); //#endif } /** * Animates the current screen. */ public void run() { long sleeptime = ANIMATION_INTERVAL; // int animationCounter = 0; while ( true ) { try { Thread.sleep(sleeptime); Screen screen = StyleSheet.currentScreen; if (screen != null) { boolean animated = screen.animate(); if (animated) { //System.out.println("AnimationThread: screen needs repainting"); //#if polish.Bugs.displaySetCurrentFlickers && polish.useFullScreen //# if ( MasterCanvas.instance != null ) { //# MasterCanvas.instance.repaint(); //# } //#else screen.repaint(); //#endif sleeptime = ANIMATION_INTERVAL; } if (animationList != null) { Object[] animationItems = animationList.getInternalArray(); for (int i = 0; i < animationItems.length; i++) { Item item = (Item) animationItems[i]; if (item == null) { break; } if ( item.animate() ) { // repaint only area of item: item.repaint(); } } } if (releaseResourcesOnScreenChange) { Displayable d = StyleSheet.display.getCurrent(); if (d != screen) { StyleSheet.currentScreen = null; } } } else { if (releaseResourcesOnScreenChange) { StyleSheet.releaseResources(); releaseResourcesOnScreenChange = false; } sleeptime = SLEEP_INTERVAL; } } catch (InterruptedException e) { // ignore } catch (Throwable e) { //#debug error //# System.out.println("unable to animate screen" + e ); e.printStackTrace(); } } } /** * Adds the given item to list of items that should be animated. * Typically an item adds itself to the list in the showNotify() method and * then de-registers itself in the hideNotify() method. * * @param item the item that needs to be animated regardless of it's focused state etc. * @see #removeAnimationItem(Item) */ public static void addAnimationItem( Item item ) { if (animationList == null) { animationList = new ArrayList(); } if (!animationList.contains(item)) { animationList.add( item ); } } //#if polish.LibraryBuild //# /** //# * Adds the given item to list of items that should be animated. //# * Typically an item adds itself to the list in the showNotify() method and //# * then de-registers itself in the hideNotify() method. //# * //# * @param item the item that needs to be animated regardless of it's focused state etc. //# * @see #removeAnimationItem(javax.microedition.lcdui.CustomItem) //# */ //# public static void addAnimationItem( javax.microedition.lcdui.CustomItem item) { //# // ignore //# } //#endif /** * Removes the given item to list of items that should be animated. * Typically an item adds itself to the list in the showNotify() method and * then de-registers itself in the hideNotify() method. * * @param item the item that does not need to be animated anymore * @see #addAnimationItem(Item) */ public static void removeAnimationItem( Item item ) { if (animationList != null) { animationList.remove(item); } } //#if polish.LibraryBuild //# /** //# * Removes the given item to list of items that should be animated. //# * Typically an item adds itself to the list in the showNotify() method and //# * then de-registers itself in the hideNotify() method. //# * //# * @param item the item that does not need to be animated anymore //# * @see #addAnimationItem(javax.microedition.lcdui.CustomItem) //# */ //# public static void removeAnimationItem( javax.microedition.lcdui.CustomItem item) { //# // ignore //# } //#endif }
[ "thilina.hasantha@gmail.com" ]
thilina.hasantha@gmail.com
b8930e2ddf8f07fce9bbc45f5ee23a22cb433fe8
06a62720a9a900fc3895b73b84c6b0ac5af3390b
/src/com/rocky/javamg/modules/cms/web/front/WeixinController.java
816ffbc0b2141ef14a0e673b265c482caef952b1
[ "Apache-2.0" ]
permissive
irocky1/javamg
92237131c3389032acdb90e6ac23af203a3c2e60
caf41b0e2995d51eb212712e52792f2a863de155
refs/heads/master
2021-09-12T17:34:45.882972
2018-04-19T08:40:35
2018-04-19T08:40:35
116,548,977
0
1
null
null
null
null
UTF-8
Java
false
false
2,478
java
/** * */ package com.rocky.javamg.modules.cms.web.front; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.rocky.javamg.common.web.BaseController; import com.rocky.javamg.modules.cms.utils.WiexinSignUtil; /** * 测试Controller * * @version 2014-02-28 */ @Controller @RequestMapping(value = "${frontPath}/weixin") public class WeixinController extends BaseController { /** * * @param signature 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数。 * @param timestamp 时间戳 * @param nonce 随机数 * @param echostr 随机数 * @return */ @RequestMapping(value = "", method = RequestMethod.GET) @ResponseBody public String get(String signature, String timestamp, String nonce, String echostr, HttpServletRequest request) { System.out.println("=============================================== get start"); for (Object o : request.getParameterMap().keySet()){ System.out.println(o + " = " + request.getParameter((String)o)); } System.out.println("=============================================== get end"); // 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败 if (WiexinSignUtil.checkSignature(signature, timestamp, nonce)) { return echostr; } return ""; } @RequestMapping(value = "", method = RequestMethod.POST) @ResponseBody public String post(String signature, String timestamp, String nonce, String echostr, HttpServletRequest request) { System.out.println("=============================================== post start"); for (Object o : request.getParameterMap().keySet()){ System.out.println(o + " = " + request.getParameter((String)o)); } System.out.println("=============================================== post end"); StringBuilder result = new StringBuilder(); result.append("<xml>" + "<ToUserName><![CDATA[toUser]]></ToUserName>" + "<FromUserName><![CDATA[fromUser]]></FromUserName>" + "<CreateTime>12345678</CreateTime>" + "<MsgType><![CDATA[text]]></MsgType>" + "<Content><![CDATA[你好]]></Content>" + "</xml>"); return result.toString(); } }
[ "guoshilei@syswin.com" ]
guoshilei@syswin.com
45efbc451f0f4c9b3b0bd479f512b66c7743b034
863f0a692b4510984ba5bf797e34db09af75bae2
/MyFristWebServiceClient/src/com/yang/my/firstjwsclient/ObjectFactory.java
6be781310b06996fcd3f4fefd73de3ea36473a9d
[]
no_license
riocat/webServiceTestFirst
9f8efda5332e1c66f4ef839f01a3558dca869461
35c87fd24406f0a73b0f311c2f2ab9d28b7d02a7
refs/heads/master
2021-01-19T23:19:12.937903
2017-05-23T06:46:43
2017-05-23T06:46:43
88,958,403
0
0
null
2017-05-23T06:46:43
2017-04-21T08:01:59
Java
UTF-8
Java
false
false
2,544
java
package com.yang.my.firstjwsclient; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the com.yang.my.firstjwsclient package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { private final static QName _SayHelloWorldFrom_QNAME = new QName("http://example/", "sayHelloWorldFrom"); private final static QName _SayHelloWorldFromResponse_QNAME = new QName("http://example/", "sayHelloWorldFromResponse"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.yang.my.firstjwsclient * */ public ObjectFactory() { } /** * Create an instance of {@link SayHelloWorldFromResponse } * */ public SayHelloWorldFromResponse createSayHelloWorldFromResponse() { return new SayHelloWorldFromResponse(); } /** * Create an instance of {@link SayHelloWorldFrom } * */ public SayHelloWorldFrom createSayHelloWorldFrom() { return new SayHelloWorldFrom(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link SayHelloWorldFrom }{@code >}} * */ @XmlElementDecl(namespace = "http://example/", name = "sayHelloWorldFrom") public JAXBElement<SayHelloWorldFrom> createSayHelloWorldFrom(SayHelloWorldFrom value) { return new JAXBElement<SayHelloWorldFrom>(_SayHelloWorldFrom_QNAME, SayHelloWorldFrom.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link SayHelloWorldFromResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://example/", name = "sayHelloWorldFromResponse") public JAXBElement<SayHelloWorldFromResponse> createSayHelloWorldFromResponse(SayHelloWorldFromResponse value) { return new JAXBElement<SayHelloWorldFromResponse>(_SayHelloWorldFromResponse_QNAME, SayHelloWorldFromResponse.class, null, value); } }
[ "hubanya@sina.com" ]
hubanya@sina.com
976db2aad8a98900db1b0a0d6fd8f8d5212d0f09
b9aec2fea2aea7bc45254f4ccd7005d4111229b8
/modele/Modele_moniteur.java
bbb5d9c8850f9ef66a96f7b44cedcfc08b2a5911
[]
no_license
azrael2162/PPEclientlourd
7875e08e0220f8719e9193b8e2e04fa943bfdc05
9c8a75e0dcda7805d7804ebe050f66046de41da9
refs/heads/master
2020-05-02T12:20:37.461296
2019-05-23T02:32:45
2019-05-23T02:32:45
177,955,995
0
0
null
null
null
null
UTF-8
Java
false
false
7,551
java
package modele; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Formatter; import controleur.moniteur; public class Modele_moniteur { private static String encryptPassword(String password) { String sha1 = ""; try { MessageDigest crypt = MessageDigest.getInstance("SHA-1"); crypt.reset(); crypt.update(password.getBytes("UTF-8")); sha1 = byteToHex(crypt.digest()); } catch(NoSuchAlgorithmException e) { e.printStackTrace(); } catch(UnsupportedEncodingException e) { e.printStackTrace(); } return sha1; } private static String byteToHex(final byte[] hash) { Formatter formatter = new Formatter(); for (byte b : hash) { formatter.format("%02x", b); } String result = formatter.toString(); formatter.close(); return result; } //REALISATION DES QUATRES FONCTIONS public static ArrayList<moniteur> selectAll() { ArrayList<moniteur> lesmoniteurs = new ArrayList<moniteur>(); Bdd uneBdd = new Bdd("localhost:3306","autoEcole","root","root"); uneBdd.seConnecter(); String requete = "select * from moniteur;"; try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); ResultSet unRes = unStat.executeQuery(requete); while (unRes.next()) { int idu = unRes.getInt("idu"); String nom = unRes.getString("nom"); String prenom = unRes.getString("prenom"); String date_embauche = unRes.getString("date_embauche"); String datenaissa = unRes.getString("datenaissa"); String mail = unRes.getString("mail"); String passwd = unRes.getString("passwd"); int idgrp = unRes.getInt("idgrp"); moniteur unMoniteur = new moniteur(idu, nom, prenom,date_embauche,datenaissa,mail,passwd,idgrp); lesmoniteurs.add(unMoniteur); } unStat.close(); unRes.close(); } catch (SQLException exp) { System.out.println("Erreur de la requete" + requete); } return lesmoniteurs; } public static void insert (moniteur unMoniteur) { String mdp = ""; mdp = Modele_moniteur.encryptPassword(unMoniteur.getPasswd()); String requete = "insert into Moniteur values (null,'"+unMoniteur.getDate_embauche()+"','"+unMoniteur.getNom()+"','"+unMoniteur.getPrenom()+"','"+unMoniteur.getDatenaissa()+"','"+unMoniteur.getMail()+"','"+mdp+"','"+unMoniteur.getIdgrp()+"');"; Bdd uneBdd = new Bdd("localhost:3306", "autoEcole", "root", "root"); uneBdd.seConnecter(); try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); unStat.execute(requete); } catch (Exception exp) { System.out.println("Erreur de la requete" + requete +"\n"+ exp); } uneBdd.seDeconnecter(); } public static void delete (moniteur unMoniteur) { String requete = "delete from Moniteur where"; String tab[] = new String [7]; int i = 0; if (unMoniteur.getIdu() != 0) { tab[i++] = " idu ='"+unMoniteur.getIdu(); } if (! unMoniteur.getDate_embauche().equals("")) { tab[i++] = " date_embauche ='"+unMoniteur.getDate_embauche()+"'"; } if (! unMoniteur.getNom().equals("")) { tab[i++] = " nom ='"+unMoniteur.getNom()+"'"; } if (! unMoniteur.getPrenom().equals("")) { tab[i++] = " prenom ='"+unMoniteur.getPrenom()+"'"; } if (! unMoniteur.getDatenaissa().equals("")) { tab[i++] = " datenaissa ='"+unMoniteur.getDatenaissa()+"'"; } if (! unMoniteur.getMail().equals("")) { tab[i++] = " mail ='"+unMoniteur.getMail()+"'"; } if (unMoniteur.getIdgrp() != 0) { tab[i++] = " idgrp ='"+unMoniteur.getIdgrp(); } for (int j=0; j < i ; j++) { if (j == 0) { requete += tab[j]; } else { requete += " and " + tab[j]; } } Bdd uneBdd = new Bdd("localhost:3006", "autoEcole", "root", "root"); uneBdd.seConnecter(); try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); unStat.execute(requete); } catch (SQLException exp) { System.out.println("Erreur requete :"+ requete); } uneBdd.seDeconnecter(); } public static moniteur rechercherID(moniteur unMoniteur) { moniteur resultat = null; String requete = "select * from moniteur where " + "idu = " + unMoniteur.getIdu()+";"; Bdd uneBdd = new Bdd("localhost:3306", "autoEcole", "root", "root"); uneBdd.seConnecter(); try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); ResultSet unRes = unStat.executeQuery(requete); if (unRes.next()) { int idu = unRes.getInt("idu"); String date_embauche = unRes.getString("date_embauche"); String nom = unRes.getString("nom"); String prenom = unRes.getString("prenom"); String datenaissa = unRes.getString("datenaissa"); String mail = unRes.getString("mail"); String passwd = unRes.getString("passwd"); int idgrp = unRes.getInt("idgrp"); resultat = new moniteur(idu, date_embauche, nom, prenom,datenaissa, mail, passwd, idgrp); } unStat.close(); unRes.close(); } catch (SQLException exp) { System.out.println("Erreur de la requete" + requete); } return resultat; } public static ArrayList<moniteur> rechercher (String mot) { ArrayList<moniteur> lesUsers = new ArrayList<moniteur>(); String requete = "select * from moniteur where " + "idu like '%"+mot+"%' or " + "date_embauche like '%"+mot+"%' or " + "nom like '%"+mot+"%' or " + "prenom"+mot+"%' or " + "datenaissa like '%"+mot+"%' or " + "mail like '%"+mot+"%' or " + "prenom like '%"+mot+"%' or " + "passwd like '%"+mot+"%' or " + " idgrp like '%"+mot+"%' or " + " idgrp like '%"+mot+"%' ; "; Bdd uneBdd = new Bdd("localhost", "autoEcole", "root", "root"); uneBdd.seConnecter(); try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); ResultSet unRes = unStat.executeQuery(requete); while (unRes.next()) { int idu = unRes.getInt("idu"); String date_embauche = unRes.getString("date_embauche"); String nom = unRes.getString("nom"); String prenom = unRes.getString("prenom"); String datenaissa = unRes.getString("datenaissa"); String mail = unRes.getString("mail"); String passwd = unRes.getString("passwd"); int idgrp = unRes.getInt("idgrp"); moniteur unUser = new moniteur(idu, date_embauche, nom, prenom,datenaissa, mail, passwd, idgrp); lesUsers.add(unUser); } unStat.close(); unRes.close(); } catch (SQLException exp) { System.out.println("Erreur de la requete" + requete); } return lesUsers; } public static String [] verifConnexion (String mail, String mdp) { String tab[] = new String [3]; tab[0]= mail; tab[1]= mdp; tab[2]= ""; //cryptage du mdp : String email,passwd; email= "vincent.pinelli@wanadoo.fr"; passwd = "slipknot"; mdp = Modele_moniteur.encryptPassword(passwd); String requete="Select * from moniteur where mail ='" +email+"' AND passwd = '" +mdp+"' ;"; Bdd uneBdd = new Bdd("localhost:3306","autoEcole", "root", "root"); uneBdd.seConnecter(); try{ Statement unStat = uneBdd.getMaConnexion().createStatement(); ResultSet unRes = unStat.executeQuery(requete); if (unRes.next()) { tab[2] = unRes.getString("idu"); } } catch (SQLException exp) { System.out.println("Erreur execution :" + requete); exp.printStackTrace(); } uneBdd.seDeconnecter(); return tab; } // }
[ "maiden2164@gmail.com" ]
maiden2164@gmail.com
51c830f6907cab884fcc403b7dceb705d07afabc
6fb4a418624eecd681e6afd1dad587f5eb94f887
/LetterAvg.java
afdf5d0c4f5935abc38bfee8e35f4ff7447fab91
[]
no_license
BlakeBranstool/Project2
f7c9166c5219ce867a39973a03b6dd9ac6e69faf
8ee0331e9db1a0c4b77cd119911df941c3bef32c
refs/heads/master
2020-08-07T12:49:24.138997
2019-10-09T15:01:48
2019-10-09T15:01:48
213,457,307
0
0
null
null
null
null
UTF-8
Java
false
false
1,342
java
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; public class LetterAvg { private static final int LINES_TO_SKIP = 3; private static final int STATION_ID_LENGTH = 4; private String letterAverage; private int numStations; private ArrayList<String> list; public LetterAvg(char letterAverage) throws IOException { this.letterAverage = letterAverage + ""; list = new ArrayList<String>(); findNumStations(); } private void findNumStations() throws IOException { BufferedReader br = new BufferedReader(new FileReader(new File("Mesonet.txt"))); for(int index = 0; index < LINES_TO_SKIP; ++index) { br.readLine(); } String nextLine = br.readLine(); numStations = 0; while((nextLine != null)) { nextLine = nextLine.replace(" ", "").substring(0, STATION_ID_LENGTH); if(nextLine.substring(0, 1).equalsIgnoreCase(letterAverage)) { list.add(nextLine); ++numStations; } nextLine = br.readLine(); } br.close(); } public int numberOfStationWithLetterAvg() { return numStations; } public String toString() { String str = String.format("\nThey are:"); for(int index = 0; index < list.size(); ++index) { str += String.format("\n%s", list.get(index)); } return str; } }
[ "blake.branstool@ou.edu" ]
blake.branstool@ou.edu
6e89c6afc6d5a797637d23f4f7e3caed98e4460f
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
/src/main/java/com/autonavi/tbt/ServiceFacilityInfo.java
4947785267e0ec21c165eb26a962b40503b069e9
[]
no_license
makewheels/AnalyzeBusDex
42ef50f575779b66bd659c096c57f94dca809050
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
refs/heads/master
2021-10-22T07:16:40.087139
2019-03-09T03:11:05
2019-03-09T03:11:05
173,123,231
0
0
null
null
null
null
UTF-8
Java
false
false
277
java
package com.autonavi.tbt; import p054u.aly.bi_常量类; public class ServiceFacilityInfo { public double lat = 0.0d; public double lon = 0.0d; public String name = bi_常量类.f6358b_空串; public int remainDist = -1; public int type = 0; }
[ "spring@qbserver.cn" ]
spring@qbserver.cn
98592b12a6e51284d26fc7013c50e9cb7b565ff2
8669ebd0a75bf991999b1e1fff41e9b35d89e1bf
/java/src/at/htldornbirn/nwes/controller/DryRunWindowController.java
fbe3bdc069859e29956a56ef1923e8bd19e86500
[]
no_license
DasElias/DotMatrix
128588db15325cbb0a852292f5fc5385f25dcba1
b28b7d5727b197d3f0017b53e4bae3fb7ccde2dc
refs/heads/master
2020-09-06T14:50:59.262287
2020-01-10T15:39:21
2020-01-10T15:39:21
220,456,819
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package at.htldornbirn.nwes.controller; import java.util.Arrays; public class DryRunWindowController extends AbstractWindowController { @Override protected void beforeWindowCreationHook() { // empty method body } @Override protected void afterWindowCreationHook() { // empty method body } @Override protected void modelChangedHook() { System.out.print("["); for(byte b : model.get()) { System.out.print(String.format("0x%02X", b)); System.out.print(", "); } System.out.print("]" + System.lineSeparator()); } @Override protected void onWindowCloseHook() { // empty method body } }
[ "elias.horner@student.htldornbirn.at" ]
elias.horner@student.htldornbirn.at
3ae5dfc181e8242ae19cf17a12a4c0e2c4434a8e
547b4a73ff153f199ab08c25959bfe4db8e46b4f
/GElogistica/src/main/java/projeto/logistica/junioegustavo/DAO/CargaDAO.java
e8f5cb960fb309b60aeae773b74db9db767657bd
[]
no_license
gustavogustavogustavo/GElogistica
d711e61937881633c377ac7b5b46a70531018e19
66709b47f145d6a4533e99425408c21941bb8094
refs/heads/master
2021-07-21T21:48:50.543837
2018-12-03T12:30:02
2018-12-03T12:30:02
143,714,582
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package projeto.logistica.junioegustavo.DAO; import java.util.List; import projeto.logistica.junioegustavo.entities.Carga; import projeto.logistica.junioegustavo.filtros.CargaFiltro; public class CargaDAO extends DAO<Carga> { public CargaDAO() { super(Carga.class); } public List<Carga> findBy(CargaFiltro filtro) { return null; } }
[ "Aluno@DESKTOP-LDNVJ6K" ]
Aluno@DESKTOP-LDNVJ6K
02052c8ac08deb305c1102bb82bdbee65778e8c6
990a24d6cf398bc9fc5755cdf885aa3755294d50
/src/main/java/com/lk/pearson/converter/core/HtmlToWordConverterStrategy.java
c01bc7939244bf0fb2ae8c835fd2c86c5f4d8646
[]
no_license
isharaj/test-repo2
4c235f6b7d0bcfb89c665f62c066af3c001a7e73
2217c17f0a288d0987e46069ee9e60cdf2731bf3
refs/heads/master
2020-12-25T14:22:53.371379
2016-08-18T08:34:53
2016-08-18T08:34:53
65,979,932
0
0
null
null
null
null
UTF-8
Java
false
false
3,322
java
package com.lk.pearson.converter.core; import java.io.File; import java.io.IOException; import java.util.Date; import org.docx4j.jaxb.Context; import org.docx4j.openpackaging.contenttype.ContentType; import org.docx4j.openpackaging.packages.WordprocessingMLPackage; import org.docx4j.openpackaging.parts.PartName; import org.docx4j.openpackaging.parts.WordprocessingML.AlternativeFormatInputPart; import org.docx4j.relationships.Relationship; import org.docx4j.wml.CTAltChunk; import com.lk.pearson.converter.constants.Outputs; import com.lk.pearson.converter.exceptions.CoreConversionFailedException; import com.lk.pearson.converter.util.ConverterHelper; import com.lk.pearson.domain.Input; import com.lk.pearson.domain.Output; import com.lk.pearson.input.format.filters.HtmlFilters; public class HtmlToWordConverterStrategy implements ConversionStrategy { private static final String tempFileStorageLocationName = "TempHtmlContainer"; private static final String filePathSeparator = "\\"; private static Outputs outputFormat; public Output convert(Input input) throws CoreConversionFailedException { ConverterHelper converterUtil = new ConverterHelper(); String inputFileName = input.getInputFileName(); String inputHtml = input.getInputAsString(); byte[] outpuDoc = convertHtmlToDoc(inputHtml, inputFileName); Output outputObject = converterUtil.createOutputFromStream(outpuDoc, input.getInputFileName() , input.getToken() , outputFormat.DOCX); return outputObject; } public byte[] convertHtmlToDoc(String html, String docTitle) throws CoreConversionFailedException { long startTime = new Date().getTime(); HtmlFilters htmlModifier = new HtmlFilters(); WordprocessingMLPackage wordMLPackage; String stroageLocationPath = ""; ConverterHelper converterUtil = new ConverterHelper(); html = htmlModifier.removeHyperLinksFromHtmlString(html); try { stroageLocationPath = converterUtil.createTempLocationInUserDirectory(tempFileStorageLocationName); wordMLPackage = WordprocessingMLPackage.createPackage(); AlternativeFormatInputPart afiPart = new AlternativeFormatInputPart(new PartName("/hw.html")); afiPart.setBinaryData(html.getBytes()); afiPart.setContentType(new ContentType("text/html")); Relationship altChunkRel = wordMLPackage.getMainDocumentPart().addTargetPart(afiPart); CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk(); ac.setId(altChunkRel.getId()); wordMLPackage.getMainDocumentPart().addObject(ac); wordMLPackage.getContentTypeManager().addDefaultContentType("html", "text/html"); wordMLPackage.save(new java.io.File(stroageLocationPath + filePathSeparator + docTitle.trim() + ".docx")); File generatedWordDoc = new File(stroageLocationPath + filePathSeparator + docTitle.trim() + ".docx"); byte[] binaryOutput = null; try { binaryOutput = converterUtil.getFileAsByteArray(generatedWordDoc); } catch (IOException e) { throw new CoreConversionFailedException(e.getMessage()); } long endTime = new Date().getTime(); long timeSpent = (endTime - startTime); System.out.println("======= CONVERTED FILE: "+docTitle+" in "+timeSpent +" mseconds."); return binaryOutput; }catch (Exception e) { throw new CoreConversionFailedException(e.getMessage()); } } }
[ "ishara.jayawickrama@pearson.com" ]
ishara.jayawickrama@pearson.com
b6e9dc5b38188f5b3b2ac6c24c2edc859dc95778
4a7f7481a3aaa22c4b3ad28b989d38a83d29376f
/src/main/java/com/yixi/rabbit/config/WebConfig.java
db22cf804b60174f55ce233c58bb7d8dac096e1c
[]
no_license
heiliguai/rabbitshop
7bc8390961421f975a13a3cc731f573ec2435611
641698d43691eb5c23acfab847e8d1ff8478afc1
refs/heads/master
2020-05-24T09:25:35.936007
2017-03-13T15:34:56
2017-03-13T15:34:56
84,843,064
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package com.yixi.rabbit.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; /** * Created by eguoyix on 17/3/13. */ @Configuration @EnableWebMvc @ComponentScan(value={"com.yixi.rabbit.*"}) public class WebConfig { }
[ "546452539@qq.com" ]
546452539@qq.com
c4762679ca3e280c472868cd3e3311b722069668
e7d1e794dbd51f499bc1350510537a35efe1b174
/WebProjekat/src/servisi/NewSubforumService.java
fbd9e8d56321b27a1471e55232cee3066078163a
[]
no_license
twiste9/Reddit_look-alike
4d6085a53892a5c7eda94cb673bec076ef4afa06
60b94a25d28e99cc10db8aa76d3b239a0bddce53
refs/heads/master
2021-07-05T11:05:57.669756
2017-09-30T17:34:13
2017-09-30T17:34:13
105,386,614
0
0
null
null
null
null
UTF-8
Java
false
false
3,081
java
package servisi; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import modeli.*; @Path("/noviPodforum") public class NewSubforumService { @Context HttpServletRequest request; @Context HttpServletResponse response; @Context ServletContext ctx; @GET @Path("/userExists/{username}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public boolean daLiKorisnikPostoji(@PathParam("username") String userName){ if(Korisnici.getInstance().getKorisnici().containsKey(userName)){ return true; } return false; } @POST @Path("/dodaj") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public int dodajPodforum(Podforum p) throws FileNotFoundException, IOException{ Korisnik user = (Korisnik) request.getSession().getAttribute("korisnik"); p.setOdgovornimoderator(user.getKorisnicko()); p.setTeme(new ArrayList<Tema>()); return PodForumi.getInstance().addForums(p); } @POST @Path("/dodajIkonicu/{naziv}") @Consumes(MediaType.MULTIPART_FORM_DATA) public void dodajSliku(InputStream inputStream, @PathParam("naziv") String idPodforuma) throws IOException{ PodForumi lista = PodForumi.getInstance(); String naziv = ""; for(Podforum p : lista.getPodForumi()){ if(p.getNaziv().equals(idPodforuma)){ naziv = p.getIkonica(); } } OutputStream outputStream = null; try { outputStream = new FileOutputStream(new java.io.File(ctx.getRealPath("slike\\" + naziv))); //outputStream = new FileOutputStream(new java.io.File("C:\\Users\\Radanovic\\Desktop\\javaEE_projects\\WebProjekat\\WebContent\\slike\\" + naziv)); //System.out.println(ctx.getRealPath("slike\\" + naziv)); //System.out.println("C:\\Users\\Radanovic\\Desktop\\javaEE_projects\\WebProjekat\\WebContent\\slike\\" + naziv); int read = 0; byte[] bytes = new byte[1024]; while ((read = inputStream.read(bytes)) != -1) { outputStream.write(bytes, 0, read); } } catch (IOException e) { System.out.println("error1"); } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { System.out.println("error2"); } } if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { System.out.println("error3"); } } } for(Podforum p : lista.getPodForumi()){ if(!naziv.equals("")){ if(p.getNaziv().equals(idPodforuma)){ p.setIkonica("slike\\"+naziv); lista.save(); } } } } }
[ "radanovicstefan@gmail.com" ]
radanovicstefan@gmail.com
795750deac640f6909182e809235bd8ce10182f0
b7bd90c74b36b821aff4380405728b80866df480
/src/main/java/com/ljx/blog/service/UserService.java
0186b33cf0aed2f4b6acd483e06bb8015eec1c94
[]
no_license
wwwljxw/blog
4cd7ec5b47a92e58ad1f7f6ba8e3fd70dfbeb5fc
f5b758b7cf0d9a189b3da62930a32c9641248f92
refs/heads/master
2023-04-16T02:47:20.388805
2021-04-29T01:58:25
2021-04-29T01:58:25
346,641,520
0
0
null
null
null
null
UTF-8
Java
false
false
196
java
package com.ljx.blog.service; import com.ljx.blog.entity.User; /** * @author Lin * @Description 用户业务层接口 */ public interface UserService { User checkUser(String username); }
[ "ljx282018@icloud.com" ]
ljx282018@icloud.com
aa1048534d10864733b5449d606dd279a1cc1a19
b6017b2feeb4feb14336cb00e074bce6e4234026
/app/src/main/java/com/xzwzz/mimi/ui/adapter/LiveChannelAdapter2.java
9618a8ccdfc752edc56c1b70baf05b781a6c26fd
[]
no_license
gaoyuan117/MiMi
2495536fcb0b69cde2a6d926e31d73e0eac56c7c
0bc00a5ccd4f7746b0a993466a628325c63cbb47
refs/heads/master
2020-03-28T20:53:50.932241
2018-09-17T11:01:03
2018-09-17T11:01:03
149,111,919
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
package com.xzwzz.mimi.ui.adapter; import android.support.annotation.Nullable; import android.widget.ImageView; import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.xzwzz.mimi.R; import com.xzwzz.mimi.bean.ChannelDataBean2; import com.xzwzz.mimi.glide.GlideApp; import com.xzwzz.mimi.glide.GlideCircleTransform; import java.util.ArrayList; import java.util.List; /** * Created by aaaa on 2018/5/16. */ public class LiveChannelAdapter2 extends BaseQuickAdapter<ChannelDataBean2.DataBean, BaseViewHolder> { public LiveChannelAdapter2() { this(new ArrayList<>()); } public LiveChannelAdapter2(@Nullable List<ChannelDataBean2.DataBean> data) { super(R.layout.item_live_channel, data); } @Override protected void convert(BaseViewHolder helper, ChannelDataBean2.DataBean item) { helper.setText(R.id.tv_name, item.getTitle()); helper.setText(R.id.tv_peoplenum, item.getPep()+""); GlideApp.with(mContext) .load(item.getImg()) .placeholder(R.color.color_darker_gray) .transition(new DrawableTransitionOptions().crossFade()) .into((ImageView) helper.getView(R.id.iv_cover)); GlideApp.with(mContext) .load(item.getImg()) .transform(new GlideCircleTransform(mContext)) .transition(new DrawableTransitionOptions().crossFade()) .into((ImageView) helper.getView(R.id.iv_avatar)); } }
[ "1179074755@qq.com" ]
1179074755@qq.com
69baf6f43d82ac33f4e69fbef5a2a6a28b5515ff
4ef169d27cbbe0d41b9af7ac2e22f8d29161d664
/src/main/java/de/hpi/matcher/services/MatchEanStrategy.java
12b6683c817c19c66e35e22be3d3fb1a0494435c
[]
no_license
HPI-BP2017N2/Matcher
273bdcd18a628406dc870a5633aaee3b6e754e55
dd2c06f2352e7879c7f44fe2e123daa691002d95
refs/heads/master
2020-03-09T11:38:09.075434
2018-06-18T14:08:01
2018-06-18T14:08:01
110,996,128
1
0
null
2018-02-13T14:01:41
2017-11-16T16:36:44
Java
UTF-8
Java
false
false
943
java
package de.hpi.matcher.services; import de.hpi.matcher.dto.ShopOffer; import de.hpi.matcher.persistence.ParsedOffer; import de.hpi.matcher.persistence.repo.ParsedOfferRepository; import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; @Getter(AccessLevel.PRIVATE) @Setter(AccessLevel.PRIVATE) @RequiredArgsConstructor public class MatchEanStrategy implements MatchIdentifierStrategy { private final ParsedOfferRepository repository; @Override public ParsedOffer match(long shopId, ShopOffer offer) { if(offer.getEan() == null) return null; String normalizedEan = deleteLeadingZeros(offer.getEan()); return getRepository().getByEan(shopId, normalizedEan); } private String deleteLeadingZeros(String ean) { return ean.replaceFirst("^0+", ""); } @Override public String getMatchingReason() { return "ean"; } }
[ "lindnerdaniel@yahoo.de" ]
lindnerdaniel@yahoo.de
caca765388577055e6680474295da71a132a89f3
f163b86f4eba5d7598415943f5ae536c2b616723
/src/varviewer/client/services/SampleListService.java
06db663209d43be1de09e719e95bb5a1e14a1537
[]
no_license
brendanofallon/VarViewer
34def3fd5128a0544218033d6fa86b59cb33e45d
af44922bf18677a04cd2f92dade2b6d87fc1ca79
refs/heads/master
2021-05-04T09:39:06.180251
2015-07-17T14:45:03
2015-07-17T14:45:03
7,565,687
0
1
null
2017-09-20T18:12:27
2013-01-11T19:38:31
Java
UTF-8
Java
false
false
338
java
package varviewer.client.services; import varviewer.shared.SampleListResult; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath("samplelist") public interface SampleListService extends RemoteService { SampleListResult getSampleList(); }
[ "brendanofallon@fastmail.fm" ]
brendanofallon@fastmail.fm
e8c79238da15c1c63fff8c712dc3003dfe136474
ff0c33ccd3bbb8a080041fbdbb79e29989691747
/jdk.javadoc/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java
9e73546d40949598da5f0606cbbd08c97bf46fad
[]
no_license
jiecai58/jdk15
7d0f2e518e3f6669eb9ebb804f3c89bbfb2b51f0
b04691a72e51947df1b25c31175071f011cb9bbe
refs/heads/main
2023-02-25T00:30:30.407901
2021-01-29T04:48:33
2021-01-29T04:48:33
330,704,930
0
1
null
null
null
null
UTF-8
Java
false
false
10,903
java
/* * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.javadoc.internal.doclets.formats.html; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import java.util.TreeSet; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.Entity; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; import jdk.javadoc.internal.doclets.formats.html.markup.TagName; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.formats.html.markup.Table; import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; import jdk.javadoc.internal.doclets.toolkit.Content; import jdk.javadoc.internal.doclets.toolkit.util.ClassUseMapper; import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Generate package usage information. * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class PackageUseWriter extends SubWriterHolderWriter { final PackageElement packageElement; final SortedMap<String, Set<TypeElement>> usingPackageToUsedClasses = new TreeMap<>(); final String packageUseTableSummary; private final Navigation navBar; /** * Constructor. * * @param configuration the configuration * @param mapper a mapper to provide details of where elements are used * @param filename the file to be generated * @param pkgElement the package element to be documented */ public PackageUseWriter(HtmlConfiguration configuration, ClassUseMapper mapper, DocPath filename, PackageElement pkgElement) { super(configuration, configuration.docPaths.forPackage(pkgElement).resolve(filename)); this.packageElement = pkgElement; // by examining all classes in this package, find what packages // use these classes - produce a map between using package and // used classes. for (TypeElement usedClass : utils.getEnclosedTypeElements(pkgElement)) { Set<TypeElement> usingClasses = mapper.classToClass.get(usedClass); if (usingClasses != null) { for (TypeElement usingClass : usingClasses) { PackageElement usingPackage = utils.containingPackage(usingClass); Set<TypeElement> usedClasses = usingPackageToUsedClasses .get(utils.getPackageName(usingPackage)); if (usedClasses == null) { usedClasses = new TreeSet<>(comparators.makeGeneralPurposeComparator()); usingPackageToUsedClasses.put(utils.getPackageName(usingPackage), usedClasses); } usedClasses.add(usedClass); } } } packageUseTableSummary = resources.getText("doclet.Use_Table_Summary", resources.getText("doclet.packages")); this.navBar = new Navigation(packageElement, configuration, PageMode.USE, path); } /** * Generate a class page. * * @param configuration the current configuration of the doclet. * @param mapper the mapping of the class usage. * @param pkgElement the package being documented. * @throws DocFileIOException if there is a problem generating the package use page */ public static void generate(HtmlConfiguration configuration, ClassUseMapper mapper, PackageElement pkgElement) throws DocFileIOException { DocPath filename = DocPaths.PACKAGE_USE; PackageUseWriter pkgusegen = new PackageUseWriter(configuration, mapper, filename, pkgElement); pkgusegen.generatePackageUseFile(); } /** * Generate the package use list. * @throws DocFileIOException if there is a problem generating the package use page */ protected void generatePackageUseFile() throws DocFileIOException { HtmlTree body = getPackageUseHeader(); Content mainContent = new ContentBuilder(); if (usingPackageToUsedClasses.isEmpty()) { mainContent.add(contents.getContent("doclet.ClassUse_No.usage.of.0", utils.getPackageName(packageElement))); } else { addPackageUse(mainContent); } bodyContents.addMainContent(mainContent); HtmlTree footer = HtmlTree.FOOTER(); navBar.setUserFooter(getUserHeaderFooter(false)); footer.add(navBar.getContent(Navigation.Position.BOTTOM)); addBottom(footer); bodyContents.setFooter(footer); body.add(bodyContents); printHtmlDocument(null, getDescription("use", packageElement), body); } /** * Add the package use information. * * @param contentTree the content tree to which the package use information will be added */ protected void addPackageUse(Content contentTree) { Content content = new ContentBuilder(); if (configuration.packages.size() > 1) { addPackageList(content); } addClassList(content); contentTree.add(content); } /** * Add the list of packages that use the given package. * * @param contentTree the content tree to which the package list will be added */ protected void addPackageList(Content contentTree) { Content caption = contents.getContent( "doclet.ClassUse_Packages.that.use.0", getPackageLink(packageElement, utils.getPackageName(packageElement))); Table table = new Table(HtmlStyle.useSummary, HtmlStyle.summaryTable) .setCaption(caption) .setHeader(getPackageTableHeader()) .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast); for (String pkgname: usingPackageToUsedClasses.keySet()) { PackageElement pkg = utils.elementUtils.getPackageElement(pkgname); Content packageLink = links.createLink(getPackageAnchorName(pkg), new StringContent(utils.getPackageName(pkg))); Content summary = new ContentBuilder(); if (pkg != null && !pkg.isUnnamed()) { addSummaryComment(pkg, summary); } else { summary.add(Entity.NO_BREAK_SPACE); } table.addRow(packageLink, summary); } contentTree.add(table); } /** * Add the list of classes that use the given package. * * @param contentTree the content tree to which the class list will be added */ protected void addClassList(Content contentTree) { TableHeader classTableHeader = new TableHeader( contents.classLabel, contents.descriptionLabel); HtmlTree ul = new HtmlTree(TagName.UL); ul.setStyle(HtmlStyle.blockList); for (String packageName : usingPackageToUsedClasses.keySet()) { PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName); HtmlTree section = HtmlTree.SECTION(HtmlStyle.detail) .setId(getPackageAnchorName(usingPackage)); String tableSummary = resources.getText("doclet.Use_Table_Summary", resources.getText("doclet.classes")); Content caption = contents.getContent( "doclet.ClassUse_Classes.in.0.used.by.1", getPackageLink(packageElement, utils.getPackageName(packageElement)), getPackageLink(usingPackage, utils.getPackageName(usingPackage))); Table table = new Table(HtmlStyle.useSummary, HtmlStyle.summaryTable) .setCaption(caption) .setHeader(classTableHeader) .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast); for (TypeElement te : usingPackageToUsedClasses.get(packageName)) { DocPath dp = pathString(te, DocPaths.CLASS_USE.resolve(docPaths.forName(te))); Content stringContent = new StringContent(utils.getSimpleName(te)); Content typeContent = links.createLink(dp.fragment(getPackageAnchorName(usingPackage)), stringContent); Content summary = new ContentBuilder(); addIndexComment(te, summary); table.addRow(typeContent, summary); } section.add(table); ul.add(HtmlTree.LI(section)); } Content li = HtmlTree.SECTION(HtmlStyle.packageUses, ul); contentTree.add(li); } /** * Get the header for the package use listing. * * @return a content tree representing the package use header */ private HtmlTree getPackageUseHeader() { String packageText = resources.getText("doclet.Package"); String name = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement); String title = resources.getText("doclet.Window_ClassUse_Header", packageText, name); HtmlTree bodyTree = getBody(getWindowTitle(title)); Content headerContent = new ContentBuilder(); addTop(headerContent); Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(packageElement), contents.moduleLabel); navBar.setNavLinkModule(linkContent); navBar.setUserHeader(getUserHeaderFooter(true)); headerContent.add(navBar.getContent(Navigation.Position.TOP)); ContentBuilder headingContent = new ContentBuilder(); headingContent.add(contents.getContent("doclet.ClassUse_Title", packageText)); headingContent.add(new HtmlTree(TagName.BR)); headingContent.add(name); Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headingContent); Content div = HtmlTree.DIV(HtmlStyle.header, heading); bodyContents.setHeader(headerContent) .addMainContent(div); return bodyTree; } }
[ "caijie2@tuhu.cn" ]
caijie2@tuhu.cn
af3c036be00563b584013ac6fa5142f91445c57b
edf1814d569c2f00ea232b8f40f5d335eeae2a10
/lab4/src/numbers/Numbers.java
edca52d10987efd36169e51773234eb9782a58fd
[]
no_license
Riushk/devshilt-lab
44f34ebcd7093acfa125b80690bb321c10b249ea
186e8fc6f3c7c7c25ceca4aaa7ba88eb467a504e
refs/heads/main
2023-09-01T10:30:10.929041
2021-10-12T04:44:23
2021-10-12T04:44:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
675
java
package numbers; //<applet code=Numbers width=200 height=200></applet> import java.applet.*; import java.awt.*; import java.awt.event.*; public class Numbers extends Applet implements ActionListener { Button btnNumbers[] = new Button[15]; TextField txtNumber = new TextField(10); public void init() { for (int index = 0; index <= 14; index++) { btnNumbers[index] = new Button("" + (index + 1)); btnNumbers[index].addActionListener(this); add(btnNumbers[index]); } add(txtNumber); } public void actionPerformed(ActionEvent e) { // get the label of clicked button String label = ((Button) e.getSource()).getLabel(); txtNumber.setText(label); } }
[ "61698354+GD3242@users.noreply.github.com" ]
61698354+GD3242@users.noreply.github.com
2b6a8599a25f2e22c5919c1ac71d023f1347e8a6
9bb8c6be406383f1055e8e20499215403be11bcb
/se/kth/id1212/tudd/db/server/FileDAO.java
8dce650942fdad48d347515f07832e54e9aaf58a
[]
no_license
Uddekudde/ID1212
b2dbd89bf273d971402d24149ae0b9599ce7b615
80f35b35679a2864387f591dc7e2bbc3f2de02ca
refs/heads/master
2021-08-23T06:18:15.031789
2017-12-03T21:09:09
2017-12-03T21:09:09
112,862,127
0
0
null
null
null
null
UTF-8
Java
false
false
10,288
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 se.kth.id1212.tudd.db.server; import se.kth.id1212.tudd.db.server.Client; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; /** * * @author udde */ public class FileDAO { private static final String USER_TABLE = "USERS"; private static final String PASSWORD_COLUMN = "PASSWORD"; private static final String USERNAME_COLUMN = "USERNAME"; private static final String FILE_TABLE = "FILE"; private static final String FILENAME_COLUMN = "FILENAME"; private static final String SIZE_COLUMN = "SIZE"; private static final String OWNER_COLUMN = "OWNER"; private static final String PUBLIC_COLUMN = "ACCESS"; private static final String dbms = "derby"; private static final String fileCatalogName = "FileCatalog"; private PreparedStatement createUserStmt; private PreparedStatement findUserStmt; private PreparedStatement findAllAccountsStmt; private PreparedStatement deleteUserStmt; private PreparedStatement changeBalanceStmt; private PreparedStatement createFileStmt; private PreparedStatement deleteFileStmt; private PreparedStatement findFileStmt; private PreparedStatement findAllFilesStmt; private PreparedStatement updateFileStmt; public FileDAO() throws Exception { try { Connection connection = createDatasource(); prepareStatements(connection); } catch (ClassNotFoundException | SQLException exception) { System.out.println(exception.getMessage()); throw new Exception("Could not connect to datasource.", exception); } } private Connection connectToFileDB(String dbms, String datasource) throws ClassNotFoundException, SQLException, Exception { if (dbms.equalsIgnoreCase("derby")) { Class.forName("org.apache.derby.jdbc.ClientXADataSource"); return DriverManager.getConnection( "jdbc:derby://localhost:1527/" + datasource + ";create=true"); } else { throw new Exception("Unable to create datasource, unknown dbms."); } } private boolean tablesExist(Connection connection) throws SQLException { int tableNameColumn = 3; DatabaseMetaData dbm = connection.getMetaData(); try (ResultSet rs = dbm.getTables(null, null, null, null)) { for (; rs.next();) { if (rs.getString(tableNameColumn).equals(USER_TABLE)) return true; if (rs.getString(tableNameColumn).equals(FILE_TABLE)) return true; } return false; } } private Connection createDatasource() throws ClassNotFoundException, SQLException, Exception { Connection connection = connectToFileDB(dbms, fileCatalogName); if (!tablesExist(connection)) { Statement statement = connection.createStatement(); statement.executeUpdate("CREATE TABLE " + USER_TABLE + " (" + USERNAME_COLUMN + " VARCHAR(32) PRIMARY KEY, " + PASSWORD_COLUMN + " VARCHAR (32))"); statement.executeUpdate("CREATE TABLE " + FILE_TABLE + " (" + FILENAME_COLUMN + " VARCHAR(32) PRIMARY KEY, " + SIZE_COLUMN + " INT, " + OWNER_COLUMN + " VARCHAR (32), " + PUBLIC_COLUMN + " VARCHAR (32))"); } return connection; } public void createUser(String username, String password) throws Exception { String failureMsg = "Could not create the account: " + username; try { createUserStmt.setString(1, username); createUserStmt.setString(2, password); int rows = createUserStmt.executeUpdate(); if (rows != 1) { throw new Exception(failureMsg); } } catch (SQLException sqle) { throw new Exception(failureMsg, sqle); } } public void deleteUser(String username) throws Exception { try { deleteUserStmt.setString(1, username); deleteUserStmt.executeUpdate(); } catch (SQLException sqle) { throw new Exception("Could not delete the account: " + username, sqle); } } public void createFile(String filename, int size, String owner, String access) throws Exception { String failureMsg = "Could not create file: " + filename; try { createFileStmt.setString(1, filename); createFileStmt.setInt(2, size); createFileStmt.setString(3, owner); createFileStmt.setString(4, access); int rows = createFileStmt.executeUpdate(); if (rows != 1) { throw new Exception(failureMsg); } } catch (SQLException sqle) { throw new Exception(failureMsg, sqle); } } public void deleteFile(String file) throws Exception { try { deleteFileStmt.setString(1, file); deleteFileStmt.executeUpdate(); } catch (SQLException sqle) { throw new Exception("Could not delete the file: " + file, sqle); } } public void updateFile(String filename, String newFilename, int newSize, String newAccess) throws Exception { try { updateFileStmt.setString(1, newFilename); updateFileStmt.setInt(2, newSize); updateFileStmt.setString(3, newAccess); updateFileStmt.setString(4, filename); updateFileStmt.executeUpdate(); } catch (SQLException sqle) { throw new Exception("Could not update the file: " + filename, sqle); } } public Client findUserByName(String user) throws Exception { String failureMsg = "Could not search for specified user."; ResultSet result = null; try { findUserStmt.setString(1, user); result = findUserStmt.executeQuery(); if (result.next()) { return new Client(result.getString(USERNAME_COLUMN), result.getString(PASSWORD_COLUMN)); } } catch (SQLException sqle) { throw new Exception(failureMsg, sqle); } finally { try { result.close(); } catch (Exception e) { throw new Exception(failureMsg, e); } } return null; } public File findFileByName(String filename) throws Exception { String failureMsg = "Could not search for specified file."; ResultSet result = null; try { findFileStmt.setString(1, filename); result = findFileStmt.executeQuery(); if (result.next()) { return new File(result.getString(FILENAME_COLUMN), result.getInt(SIZE_COLUMN), result.getString(OWNER_COLUMN), result.getString(PUBLIC_COLUMN)); } } catch (SQLException sqle) { throw new Exception(failureMsg, sqle); } finally { try { result.close(); } catch (Exception e) { throw new Exception(failureMsg, e); } } return null; } public List<File> findAllFiles(String username) throws Exception { String failureMsg = "Could not list files."; List<File> accounts = new ArrayList<>(); findAllFilesStmt.setString(1, username); try (ResultSet result = findAllFilesStmt.executeQuery()) { while (result.next()) { accounts.add(new File(result.getString(FILENAME_COLUMN), result.getInt(SIZE_COLUMN), result.getString(OWNER_COLUMN), result.getString(PUBLIC_COLUMN))); } } catch (SQLException sqle) { throw new Exception(failureMsg, sqle); } return accounts; } private void prepareStatements(Connection connection) throws SQLException { createUserStmt = connection.prepareStatement("INSERT INTO " + USER_TABLE + " VALUES (?, ?)"); deleteUserStmt = connection.prepareStatement("DELETE FROM " + USER_TABLE + " WHERE " + USERNAME_COLUMN + " = ?"); createFileStmt = connection.prepareStatement("INSERT INTO " + FILE_TABLE + " VALUES (?, ?, ?, ?)"); deleteFileStmt = connection.prepareStatement("DELETE FROM " + FILE_TABLE + " WHERE " + FILENAME_COLUMN + " = ?"); updateFileStmt = connection.prepareStatement("UPDATE " + FILE_TABLE + " SET "+FILENAME_COLUMN+" = ?, "+SIZE_COLUMN + " = ?, "+PUBLIC_COLUMN+" = ? WHERE "+FILENAME_COLUMN+" = ?"); findUserStmt = connection.prepareStatement("SELECT * from " + USER_TABLE + " WHERE " + USERNAME_COLUMN+ " = ?"); findFileStmt = connection.prepareStatement("SELECT * from " + FILE_TABLE + " WHERE " + FILENAME_COLUMN + " = ?"); findAllFilesStmt = connection.prepareStatement("SELECT * from " + FILE_TABLE + " WHERE NOT " + PUBLIC_COLUMN+" = 'private' OR " + OWNER_COLUMN +" = ?"); } }
[ "tudd@kth.se" ]
tudd@kth.se
864d65b13836e9267b50ef9b901299204af5b0b5
016f9e2e2542d790d20677ceafbada3ec9f2eeb9
/src/main/java/com/github/flobrgn/bittrexjava/responses/GetOrderResponse.java
4be22352fa8f6c9e00945e61536a77374a193d11
[ "MIT" ]
permissive
FloBrgn/bittrex-java
bc709a385e8a4b09d050c0558c22e5aedbc74819
16d0ac28f6ce83fd66d59d24baa7a4f667730681
refs/heads/master
2021-08-16T11:28:56.013360
2017-11-19T18:25:42
2017-11-19T18:25:42
111,305,231
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
package com.github.flobrgn.bittrexjava.responses; import com.github.flobrgn.bittrexjava.model.Order; import com.google.gson.annotations.SerializedName; class GetOrderResponse extends Response { @SerializedName("result") public Order _result; }
[ "bourgoin.florian@gmail.com" ]
bourgoin.florian@gmail.com
b352d35271e5a989975261f25f03b649ea4bb923
4e5fef0fabb489641831dc642b13320d431a3805
/src/encryption/Solution.java
9a0981267f6ddd68d23ff0afcf52af5b966530b0
[]
no_license
a-klimashevsky/hackerrank-solutions
bf3e6d92c16db75e1ad0a073fa0ebb340484afab
c066c45b0ac27fabec9ab6502aa5a4a244def41d
refs/heads/master
2021-07-04T18:35:53.547657
2021-06-08T11:09:50
2021-06-08T11:09:50
83,907,973
0
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
package encryption; import java.util.*; /** * https://www.hackerrank.com/challenges/encryption */ class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); String out = new Solution().encrypt(s); System.out.println(out); } String encrypt(String src) { int l = src.length(); double sqrt = Math.sqrt(l); int lowBound = (int) Math.floor(sqrt); int upBound = (int) Math.ceil(sqrt); int rows = lowBound; int cols = upBound; int dim = rows * cols; while(dim < l){ rows++; dim = rows * cols; } for (int i = rows; i <= cols; i++) { for (int j = cols; j >= rows; j--) { if (i <= j && i * j >= l && i * j < dim) { rows = i; cols = j; dim = rows * cols; } } } StringBuilder builder = new StringBuilder(); for (int i = 0; i < cols; i++) { for (int j = 0; j < rows; j++) { int index = j * cols + i; if (index < src.length()) { builder.append(src.charAt(index)); } } builder.append(" "); } return builder.toString(); } }
[ "gladiator1988@gmail.com" ]
gladiator1988@gmail.com
0bd7459cc72a4db54960932399833f53548ec353
4e463cf651929f3d87a57cf71238521d9bec990c
/hengjia-api-web/src/main/java/com/baibei/hengjia/api/modules/cash/service/ICashFunctionService.java
fa359efd37a0dd068d9c83cb11417225d7e978e9
[]
no_license
yyhLogin/hengjia
2e54a355273659c341f93ab51f63d62f0a3bce26
8cdc18c14aa97046d9bc8b86aaf007a3c49f9a8f
refs/heads/master
2022-04-24T20:21:27.958289
2020-04-21T06:34:18
2020-04-21T06:34:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
801
java
package com.baibei.hengjia.api.modules.cash.service; import com.baibei.hengjia.api.modules.cash.base.BaseRequest; import com.baibei.hengjia.api.modules.cash.base.BaseResponse; import com.baibei.hengjia.api.modules.cash.enumeration.CashFunctionType; import com.baibei.hengjia.common.tool.api.ApiResult; import java.util.Map; public interface ICashFunctionService<T extends BaseRequest, V extends BaseResponse> { /** * 获取请求类型 * * @return */ CashFunctionType getType(); /** * 获取银行的请求 * * @param backMessages 请求消息体 * @return */ String response(Map<String, String> backMessages); /** * 组成请求参数,发送给银行 * * @return */ ApiResult<V> request(T request); }
[ "hwq8910@163.com" ]
hwq8910@163.com
3ceec0d46132b83514f62e021eeb6ec2383d1b63
c9b8db6ceff0be3420542d0067854dea1a1e7b12
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb6/Rule_CONSIGNEE_NAME.java
e5f205c4fe6af3c6c84f4999b07fac690331db44
[ "Apache-2.0" ]
permissive
ganzijo/portfolio
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
a31834b23308be7b3a992451ab8140bef5a61728
refs/heads/master
2021-04-15T09:25:07.189213
2018-03-22T12:11:00
2018-03-22T12:11:00
126,326,291
0
0
null
null
null
null
UTF-8
Java
false
false
2,186
java
package com.ke.css.cimp.fwb.fwb6; /* ----------------------------------------------------------------------------- * Rule_CONSIGNEE_NAME.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:37:30 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_CONSIGNEE_NAME extends Rule { public Rule_CONSIGNEE_NAME(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_CONSIGNEE_NAME parse(ParserContext context) { context.push("CONSIGNEE_NAME"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; @SuppressWarnings("unused") int c1 = 0; for (int i1 = 0; i1 < 35 && f1; i1++) { Rule rule = Rule_Typ_Text.parse(context); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = true; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_CONSIGNEE_NAME(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("CONSIGNEE_NAME", parsed); return (Rule_CONSIGNEE_NAME)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "whdnfka111@gmail.com" ]
whdnfka111@gmail.com
935937aa1ff83862532b5d2de22a5dd7ae46b491
a83c29f898538dba334430abb8bcc70adacad614
/app/src/main/java/com/example/zihan/a2048/Card.java
8bcca469808e0f49c276c7214304f20940720951
[]
no_license
Aceyee/Android-2048
b68ce8311ae4a630b12845314a990a715b12b367
ff3e60ab392dbdc7a5fd20cddf9d8632da526afd
refs/heads/master
2021-05-09T05:20:16.568979
2018-02-14T04:48:42
2018-02-14T04:48:42
119,305,218
0
0
null
null
null
null
UTF-8
Java
false
false
2,083
java
package com.example.zihan.a2048; /** * Created by Zihan on 2018/1/29. */ import android.content.Context; import android.support.annotation.NonNull; import android.util.Log; import android.view.Gravity; import android.widget.FrameLayout; import android.widget.TextView; public class Card extends FrameLayout { private int num = 0; private TextView label; public Card(Context context) { super(context); label = new TextView(getContext()); label.setTextSize(32); label.setGravity(Gravity.CENTER); LayoutParams lp = new LayoutParams(-1, -1); lp.setMargins(10,10,0,0); addView(label, lp); setNum(0); } public int getNum(){ return num; } public void setNum(int num){ this.num = num; if(num<=0){ label.setText(""); }else { label.setText(num + ""); } setColor(); } public void setColor(){ if(this.getNum()==2){ label.setBackgroundColor(0xffeee4da); }else if(this.getNum()==4){ label.setBackgroundColor(0xffede0c8); }else if(this.getNum()==8){ label.setBackgroundColor(0xfff2b178); }else if(this.getNum()==16){ label.setBackgroundColor(0xfff59563); }else if(this.getNum()==32){ label.setBackgroundColor(0xfff67c5f); }else if(this.getNum()==64){ label.setBackgroundColor(0xfff65d3b); }else if(this.getNum()==128){ label.setBackgroundColor(0xffedcf72); }else if(this.getNum()==256){ label.setBackgroundColor(0xffedcb60); }else if(this.getNum()==512){ label.setBackgroundColor(0xffedc850); }else if(this.getNum()==1024){ label.setBackgroundColor(0xffedc53e); }else if(this.getNum()==2048){ label.setBackgroundColor(0xffebbb18); }else{ label.setBackgroundColor(0x33ffffff); } } public boolean equals(Card o){ return this.getNum()==o.getNum(); } }
[ "zaeye1028@gmail.com" ]
zaeye1028@gmail.com
5bbc07402cf86fb9d40923add5b65555dfb71f60
0b95c70d35f93a58d09dc0a682185642689e37c9
/src/main/java/br/com/eits/boot/domain/repository/academia/exercicio/IExercicioGrupoMuscularRepository.java
aefddf1da2c06525016085fb62a93a264120ba1e
[]
no_license
susynatsumi/gym-body-system
a11372a45e747bc7ab1009cdf61004785d63f07a
6f045b187b0f12c3fa82c0a05abe8d2733aa7155
refs/heads/master
2020-03-22T10:00:51.914538
2018-10-24T21:33:06
2018-10-24T21:33:06
139,875,377
0
1
null
null
null
null
UTF-8
Java
false
false
510
java
package br.com.eits.boot.domain.repository.academia.exercicio; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import br.com.eits.boot.domain.entity.academia.exercicio.ExercicioGrupoMuscular; public interface IExercicioGrupoMuscularRepository extends JpaRepository<ExercicioGrupoMuscular, Long> { Page<ExercicioGrupoMuscular> findByExercicio_id(Long id, Pageable pageable); }
[ "eduardo.lava@hotmail.com" ]
eduardo.lava@hotmail.com
6b7fa8d5b116958b4818b10094ca2e2be17ffea2
1305a5d246dea2c2136204db8b8a2e88b6e2a3a8
/src/java/com/mazars/management/web/forms/ContactSetInactiveForm.java
9daac0f062e53dbc2c22d8d2c5a888bc29a057d2
[]
no_license
alexeyglazov/kronos
e475ca9e39448153e3c8be64308c3daf9ef7fad9
623594a3c40f3aa82242d675b274f88984264c25
refs/heads/master
2021-06-13T16:35:41.248064
2021-03-22T22:32:32
2021-03-22T22:32:32
53,580,287
0
0
null
null
null
null
UTF-8
Java
false
false
766
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.mazars.management.web.forms; import com.google.gson.Gson; /** * * @author glazov */ public class ContactSetInactiveForm { private Long id; private String reason; public ContactSetInactiveForm() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public static ContactSetInactiveForm getFromJson(String json) { Gson gson = new Gson(); return gson.fromJson(json, ContactSetInactiveForm.class); } }
[ "alexey.e.glazov@gmail.com" ]
alexey.e.glazov@gmail.com