blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
5a993ec9baee294d05fcdb9df3303ad77e2d84bf
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_c78ace4993e22a0297b3f2e0d050a03775be7c1f/GameView/1_c78ace4993e22a0297b3f2e0d050a03775be7c1f_GameView_s.java
f02ad77aaf81a33cc6e1d0c11358287bb5ee43e7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,006
java
package se.chalmers.kangaroo.view; import java.awt.Polygon; import java.util.HashMap; import javax.swing.ImageIcon; import se.chalmers.kangaroo.constants.Constants; import se.chalmers.kangaroo.model.GameModel; import se.chalmers.kangaroo.model.creatures.BlackAndWhiteCreature; import se.chalmers.kangaroo.model.creatures.Creature; import se.chalmers.kangaroo.model.iobject.InteractiveObject; import se.chalmers.kangaroo.model.item.Item; import se.chalmers.kangaroo.model.utils.Position; /** * * @author alburgh * @modifiedby simonal * @modifiedby arvidk */ public class GameView extends JPanelWithBackground { private GameModel gm; private HashMap<Creature, Animation> creatureAnimations; private KangarooAnimation ka; public GameView(String imagepath, GameModel gm) { super(imagepath); this.gm = gm; creatureAnimations = new HashMap<Creature, Animation>(); AnimationFactory af = new AnimationFactory(); for(int i= 0; i < gm.getGameMap().getCreatureSize(); i++){ Creature c = gm.getGameMap().getCreatureAt(i); creatureAnimations.put(c, af.getAnimation(c)); } ka = new KangarooAnimation(gm.getKangaroo(),58, 64); } @Override public void paintComponent(java.awt.Graphics g) { super.paintComponent(g); Position p = gm.getKangaroo().getPosition(); int drawFrom = getLeftX(); int fixPosition = p.getX() / Constants.TILE_SIZE < 16 || drawFrom == gm.getGameMap().getTileWidth() - 33 ? 0 : p .getX() % 32; g.drawString("" + gm.getTime(), 10, 10); g.drawString("Deaths: " + gm.getDeathCount(), 100, 10); /* Render the tiles */ for (int y = 0; y < gm.getGameMap().getTileHeight(); y++) for (int x = drawFrom; x < drawFrom + 33; x++) { ImageIcon i = new ImageIcon("../gfx/tiles/tile_" + gm.getGameMap().getTile(x, y).getId() + ".png"); i.paintIcon(null, g, (x - drawFrom) * 32 - fixPosition, (y - 2) * 32); } /* Render the items */ for (int i = 0; i < gm.getGameMap().amountOfItems(); i++) { Item item = gm.getGameMap().getItem(i); if (item.getPosition().getX() > drawFrom && item.getPosition().getX() < drawFrom + 32) { ImageIcon img = new ImageIcon("../gfx/tiles/tile_" + item.getId() + ".png"); img.paintIcon(null, g, (item.getPosition().getX() - drawFrom) * 32 - fixPosition, (item.getPosition().getY() - 2) * 32); } } /* Render the interactive objects */ for (int i = 0; i < gm.getGameMap().getIObjectSize(); i++) { InteractiveObject io = gm.getGameMap().getIObject(i); if (io.getPosition().getX() > drawFrom && io.getPosition().getX() < drawFrom + 32) { ImageIcon img = new ImageIcon("../gfx/tiles/tile_" + io.getId() + ".png"); img.paintIcon(null, g, (io.getPosition().getX() - drawFrom) * 32 - fixPosition, (io.getPosition().getY() - 2) * 32); } } /* Render the creatures */ for (int i = 0; i < gm.getGameMap().getCreatureSize(); i++) { Creature c = gm.getGameMap().getCreatureAt(i); if (c.getPosition().getX() > drawFrom * 32 && c.getPosition().getX() < (drawFrom + 32) * 32) { int xP = c.getPosition().getX(); int yP = c.getPosition().getY(); int[] xs = { xP - drawFrom * 32 - fixPosition, xP - drawFrom * 32 + 64 - fixPosition, xP - drawFrom * 32 + 64 - fixPosition, xP - drawFrom * 32 - fixPosition }; int[] ys = { yP - 64, yP - 64, yP - 32, yP - 32 }; g.drawPolygon(xs, ys, 4); if(creatureAnimations.containsKey(c)) creatureAnimations.get(c).drawSprite(g, xP, yP); } } /* Draw the kangaroo based on where you are */ if (drawFrom == 0 && gm.getKangaroo().getPosition().getX() / Constants.TILE_SIZE != 16) { int[] xs = { p.getX(), p.getX() + 32, p.getX() + 32, p.getX() }; int[] ys = { p.getY() - 64, p.getY() - 64, p.getY() - 1, p.getY() - 1 }; //g.drawPolygon(new Polygon(xs, ys, 4)); ka.drawSprite(g, p.getX(), p.getY()); } else if (drawFrom == gm.getGameMap().getTileWidth() - 33) { int[] xs = { p.getX() - drawFrom * 32, p.getX() + 32 - drawFrom * 32, p.getX() + 32 - drawFrom * 32, p.getX() - drawFrom * 32 }; int[] ys = { p.getY() - 64, p.getY() - 64, p.getY() - 1, p.getY() - 1 }; //g.drawPolygon(new Polygon(xs, ys, 4)); ka.drawSprite(g, p.getX()-drawFrom*32-fixPosition, p.getY()); } else { int[] xs = { 16 * 32, 17 * 32, 17 * 32, 16 * 32 }; int[] ys = { p.getY() - 64, p.getY() - 64, p.getY() - 1, p.getY() - 1 }; //g.drawPolygon(new Polygon(xs, ys, 4)); ka.drawSprite(g, p.getX()-drawFrom*32-fixPosition, p.getY()); } } /* Private method for calculate the left side to render */ private int getLeftX() { int kPos = gm.getKangaroo().getPosition().getX() / Constants.TILE_SIZE; if (kPos < 16) return 0; if (gm.getGameMap().getTileWidth() - kPos < 17) return gm.getGameMap().getTileWidth() - 33; return kPos - 16; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b61f4794991e545ef7c01d253172145860620db2
9007acd1ba3a71515fb2479b14b6e66c802e969f
/tracker/tags/REL-0.3.5/com.verticon.tracker.fair/src/com/verticon/tracker/fair/validation/DepartmentValidator.java
b8a1be01dd0e19b7f37228a4b3f357cc5b788227
[]
no_license
jconlon/tracker
17d36709a52bf7ec5c758f30b66ea808fa9be790
937b3c30ac9937342ed27b984c2bd31f27bddb55
refs/heads/master
2020-03-08T05:31:34.895003
2018-04-03T19:20:38
2018-04-03T19:20:38
127,949,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,152
java
/** * <copyright> * </copyright> * * $Id$ */ package com.verticon.tracker.fair.validation; import org.eclipse.emf.common.util.EList; import com.verticon.tracker.fair.Division; import com.verticon.tracker.fair.Person; /** * A sample validator interface for {@link com.verticon.tracker.fair.Department}. * This doesn't really do anything, and it's not a real EMF artifact. * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. */ public interface DepartmentValidator { boolean validate(); boolean validateName(String value); boolean validateClass(EList<com.verticon.tracker.fair.Class> value); boolean validateSuperintendent(EList<Person> value); boolean validateClasses(EList<com.verticon.tracker.fair.Class> value); boolean validateSuperintendents(EList<Person> value); boolean validateDivision(Division value); boolean validateComments(String value); boolean validateDescription(String value); boolean validateSuperIntendent(EList<Person> value); }
[ "jconlon@verticon.com" ]
jconlon@verticon.com
609c7956e8aa4d71bf257697d5bcde36c18d0014
ab3eccd0be02fb3ad95b02d5b11687050a147bce
/apis/browser-api/src/main/java/fr/lteconsulting/jsinterop/browser/ElementTraversal.java
26fdcc115c2ce27f3e53bc4b684a7d80c4f7a4a2
[]
no_license
ibaca/typescript2java
263fd104a9792e7be2a20ab95b016ad694a054fe
0b71b8a3a4c43df1562881f0816509ca4dafbd7e
refs/heads/master
2021-04-27T10:43:14.101736
2018-02-23T11:37:16
2018-02-23T11:37:18
122,543,398
0
0
null
2018-02-22T22:33:30
2018-02-22T22:33:29
null
UTF-8
Java
false
false
1,321
java
package fr.lteconsulting.jsinterop.browser; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; /** * base type: ElementTraversal * flags: 32768 * declared in: apis/browser-api/tsd/lib.es6.d.ts:729271 * */ @JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object") public interface ElementTraversal { /* Properties */ @JsProperty( name = "childElementCount") Number getChildElementCount(); @JsProperty( name = "childElementCount") void setChildElementCount( Number value ); @JsProperty( name = "firstElementChild") Element getFirstElementChild(); @JsProperty( name = "firstElementChild") void setFirstElementChild( Element value ); @JsProperty( name = "lastElementChild") Element getLastElementChild(); @JsProperty( name = "lastElementChild") void setLastElementChild( Element value ); @JsProperty( name = "nextElementSibling") Element getNextElementSibling(); @JsProperty( name = "nextElementSibling") void setNextElementSibling( Element value ); @JsProperty( name = "previousElementSibling") Element getPreviousElementSibling(); @JsProperty( name = "previousElementSibling") void setPreviousElementSibling( Element value ); }
[ "ltearno@gmail.com" ]
ltearno@gmail.com
e55296f1eea826ff650207ef55958f03a0b9b7d4
ec667fbdc546892207813c1f67822734525cb0b7
/HostApplication/sdk/src/main/java/com/sdk/interactive/core/callback/SdkInitCallBack.java
47caee27f74a33bd9abef3535a644e6abb93e791
[ "Apache-2.0" ]
permissive
game-platform-awaresome/RePlugin-GameSdk
431307690410dbd354ed528cc4f1b249098edf54
1491a6a31c310d118aeb2a49d800206b4c889237
refs/heads/master
2020-04-01T08:44:37.358073
2018-08-07T07:04:31
2018-08-07T07:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.sdk.interactive.core.callback; import com.sdk.interactive.aidl.IInitCallBack; import com.sdk.interactive.util.SdkNotProguard; @SdkNotProguard public abstract class SdkInitCallBack extends IInitCallBack.Stub{ public abstract void onInitFailure(String msg); public abstract void onInitSuccess(String msg); }
[ "465265897@qq.com" ]
465265897@qq.com
4b1052a41216c0966589724082f90a50fc55c475
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator4091.java
23de2fd1990d2c7722169902c783c6bed59ca6df
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator4091 { public int execute(int temperatureDifference4091, boolean boilerStatus4091) { //sync _bfpnGUbFEeqXnfGWlV4091, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
63c643e35f720b2f73e4a2cde2260bcdae6f240b
bb85a06d3fff8631f5dca31a55831cd48f747f1f
/src/main/business/com/goisan/educational/place/building/dao/BuildingDao.java
4a1e0c4eaa712f793d6064ca1cca63f02902bbe1
[]
no_license
lqj12267488/Gemini
01e2328600d0dfcb25d1880e82c30f6c36d72bc9
e1677dc1006a146e60929f02dba0213f21c97485
refs/heads/master
2022-12-23T10:55:38.115096
2019-12-05T01:51:26
2019-12-05T01:51:26
229,698,706
0
0
null
2022-12-16T11:36:09
2019-12-23T07:20:16
Java
UTF-8
Java
false
false
953
java
package com.goisan.educational.place.building.dao; import com.goisan.educational.place.building.bean.Building; import com.goisan.system.bean.AutoComplete; import com.goisan.system.bean.Select2; import java.util.List; /** * Created by hanyu on 2017/7/13. */ public interface BuildingDao { List<Building> getBuildingList(String id); void insertBuilding(Building building); List<Building> buildingAction(Building building); Building getBuildingById(String id); void updateBuildingById(Building building); void deleteBuildingById(String id); List<AutoComplete> selectDept(); List<AutoComplete> selectPerson(); String getPersonNameById(String id); String getDeptNameById(String id); List<Building> selectAll1(String id); List<Building> selectAll2(String id); List<Building> selectAll3(String id); List<Building> checkName(Building building); List<Select2> getFloorByBuildingId(String id); }
[ "1240414272" ]
1240414272
508f4a8663e749fefcadcb9d5956853a24e0db7b
943f1efde32df9585bd29fd71329a56a74e40e5d
/keximbank/src/test/java/srssprojects/keximbank/ParameterExecution.java
831afde34c4a169d1957f2e778e6a95de930fca1
[]
no_license
automationtrainingcenter/neelima_bank
f5b36b6823e7972bc5e91b1db2f6c66d446d41a3
0e96fab4d62260b9d7b36a3d866b8e7393cd2a62
refs/heads/master
2020-04-03T01:57:23.679487
2018-10-28T07:02:46
2018-10-28T07:02:46
154,943,242
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package srssprojects.keximbank; import org.openqa.selenium.support.PageFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Parameters; public class ParameterExecution extends TestExecution { @BeforeClass(groups = { "branch", "create", "valid", "invalid", "reset", "cancel" }) @Parameters({"url", "brName"}) public void browserLaunch(String u, String browser) { launchBrowser(browser, u); keximHomePageObj = new KeximHomPage(driver); adminHomePageObj = PageFactory.initElements(driver, AdminHomePage.class); branchDetailsPageObj = PageFactory.initElements(driver, BranchDetailsPage.class); branchCreationPageObj = PageFactory.initElements(driver, BranchCreationPage.class); roleDetailsPage = PageFactory.initElements(driver, RoleDetailsPage.class); roleCreationPage = PageFactory.initElements(driver, RoleCreationPage.class); } @AfterClass(groups = { "branch", "create", "valid", "invalid", "reset", "cancel" }) public void tearDown() { closeBrowser(); } }
[ "atcsurya@gmail.com" ]
atcsurya@gmail.com
f06259f7e73ed05029ee224398b035222c21612e
2912ca5b4029d1cf79c12d80552126ff365cd65a
/szfy.bak/src/com/template/action/TreeAction.java
b0285d7e8a6c2a544ab32c2e3ce43ff32316847f
[]
no_license
javalife0312/money_work
c89ad8405d3d85b511f2e9a21d3519b6d67c79cb
7159fdd236fade9aa3a61d8d5918df1ccdf4c972
refs/heads/master
2021-01-23T10:57:13.749148
2018-03-18T04:17:34
2018-03-18T04:17:34
93,111,227
0
0
null
null
null
null
UTF-8
Java
false
false
7,633
java
package com.template.action; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONObject; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; import com.template.model.Org_Department; import com.template.model.Org_User; import com.template.model.Qxgl_Permission; import com.template.service.OrgUserService; import com.template.service.TreeService; import com.template.util.SysUtil; public class TreeAction extends ActionSupport { private static final long serialVersionUID = 1L; private HttpServletRequest request = ServletActionContext.getRequest(); private HttpServletResponse response = ServletActionContext.getResponse(); /********************************************************************************* * Spring注入 *********************************************************************************/ private TreeService treeService; private OrgUserService orgUserService; public TreeService getTreeService() { return treeService; } public void setTreeService(TreeService treeService) { this.treeService = treeService; } public OrgUserService getOrgUserService() { return orgUserService; } public void setOrgUserService(OrgUserService orgUserService) { this.orgUserService = orgUserService; } /********************************************************************************* * Spring注入 *********************************************************************************/ /** * 权限树 */ public void sysTree() { try { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); boolean sessionCheck = SysUtil.sessionCheck(request, response); if(sessionCheck){ Qxgl_Permission role = null; boolean leaf = true; String id = request.getParameter("id"); String json = "["; List<Object> list = new ArrayList<Object>(); list = treeService.listNodesByParent(id,"Qxgl_Permission"); if(list != null) { for(int i=0;i<list.size();i++){ role = (Qxgl_Permission)list.get(i); leaf = treeService.hasChild(role.getId()+""); json += "{id:"+role.getId()+",text:'"+role.getName()+"',icon:'img/tree/subsystem.png',leaf:"+leaf+",url:'"+role.getUrl()+"'},"; } if(json.length() > 1) { json = json.substring(0, json.length()-1); } } json += "]"; response.getWriter().print(json); }else { Map<String, String> jsonMap = new HashMap<String, String>(); jsonMap.put("success", "session"); String json = JSONObject.fromObject(jsonMap).toString(); response.getWriter().print(json); } } catch (Exception e) { e.printStackTrace(); } } /** * 登陆树 */ public void loginTree() { try { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); boolean sessionCheck = SysUtil.sessionCheck(request, response); if(sessionCheck){ Object uid = request.getSession().getAttribute("uid"); if(uid != null){ Org_User org_User = (Org_User) orgUserService.getById(uid+""); List<String> pms = new ArrayList<String>(); if(org_User.getPermissions() != null){ String[] qxs = org_User.getPermissions().split(","); for (String pm : qxs) { pms.add(pm); } } Qxgl_Permission role = null; boolean leaf = true; boolean checked = false; String psId = request.getParameter("id"); String json = "["; List<Object> list = new ArrayList<Object>(); list = treeService.listNodesByParent(psId,"Qxgl_Permission"); if(list != null) { for(int i=0;i<list.size();i++){ role = (Qxgl_Permission)list.get(i); leaf = treeService.hasChild(role.getId()+""); checked = pms.contains(role.getId()+""); if(checked){ json += "{id:"+role.getId()+",text:'"+role.getName()+"',icon:'img/tree/subsystem.png',leaf:"+leaf+",url:'"+role.getUrl()+"'},"; } } if(json.length() > 1) { json = json.substring(0, json.length()-1); } } json += "]"; response.getWriter().print(json); } }else { Map<String, String> jsonMap = new HashMap<String, String>(); jsonMap.put("success", "session"); String json = JSONObject.fromObject(jsonMap).toString(); response.getWriter().print(json); } } catch (Exception e) { e.printStackTrace(); } } /** * 组织部门树 */ public void orgTree() { try { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); boolean sessionCheck = SysUtil.sessionCheck(request, response); if(sessionCheck){ Org_Department role = null; String id = request.getParameter("id"); String json = "["; List<Object> list = new ArrayList<Object>(); list = treeService.listNodesByParent(id,"Org_Department"); if(list != null) { for(int i=0;i<list.size();i++){ role = (Org_Department)list.get(i); boolean leaf = true; if(role.getIsleaf() == 1){ leaf = false; } json += "{id:"+role.getId()+",text:'"+role.getName()+"',icon:'img/tree/subsystem.png',leaf:"+leaf+",path:'"+role.getPath()+"'},"; } if(json.length() > 1) { json = json.substring(0, json.length()-1); } } json += "]"; response.getWriter().print(json); }else { Map<String, String> jsonMap = new HashMap<String, String>(); jsonMap.put("success", "session"); String json = JSONObject.fromObject(jsonMap).toString(); response.getWriter().print(json); } } catch (Exception e) { e.printStackTrace(); } } /** * 分配权限树 */ public void sysCheckBoxTree() { try { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); boolean sessionCheck = SysUtil.sessionCheck(request, response); if(sessionCheck){ String userid = request.getParameter("userid"); boolean leaf = true; boolean checked = false; String id = request.getParameter("id"); String json = "["; List<Object> list = new ArrayList<Object>(); list = treeService.listNodesByParent(id,"Qxgl_Permission"); if(list != null) { Org_User org_User = (Org_User)orgUserService.getById(userid); List<String> pms = new ArrayList<String>(); if(org_User != null){ if(org_User.getPermissions() != null){ String[] pmses = org_User.getPermissions().split(","); for (String vl : pmses) { pms.add(vl); } } } for(int i=0;i<list.size();i++){ Qxgl_Permission role = (Qxgl_Permission)list.get(i); leaf = treeService.hasChild(role.getId()+""); checked = pms.contains(role.getId()+""); json += "{id:"+role.getId()+",text:'"+role.getName()+"',icon:'img/tree/subsystem.png',leaf:"+leaf+",url:'"+role.getUrl()+"',checked:"+checked+"},"; } if(json.length() > 1) { json = json.substring(0, json.length()-1); } } json += "]"; response.getWriter().print(json); }else { Map<String, String> jsonMap = new HashMap<String, String>(); jsonMap.put("success", "session"); String json = JSONObject.fromObject(jsonMap).toString(); response.getWriter().print(json); } } catch (Exception e) { e.printStackTrace(); } } }
[ "you@example.com" ]
you@example.com
0999f2eff5c6f776ab94aa76966375540b6c7e4b
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/ui/search/SearchHistoryType.java
5a796356db3637af0541ce76d8d5e5f678777819
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
892
java
package com.farsitel.bazaar.ui.search; import h.f.b.f; import h.k.m; /* compiled from: SearchHistoryItem.kt */ public enum SearchHistoryType { HISTORY, NONE; public static final a Companion = null; /* compiled from: SearchHistoryItem.kt */ public static final class a { public a() { } public final SearchHistoryType a(String str) { if (str == null) { return SearchHistoryType.NONE; } for (SearchHistoryType searchHistoryType : SearchHistoryType.values()) { if (m.b(str, searchHistoryType.name(), true)) { return searchHistoryType; } } return SearchHistoryType.NONE; } public /* synthetic */ a(f fVar) { this(); } } static { Companion = new a(null); } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
891e5692557e60b0308cff189b835569f02e28b2
92e7a62c54bcf24de97b5d4c1bb15b99f775bed2
/OpenConcerto/src/koala/dynamicjava/classinfo/ClassFinder.java
45722a58d880d3cb978268db2caded2923169732
[]
no_license
trespe/openconcerto
4a9c294006187987f64dbf936f167d666e6c5d52
6ccd5a7b56cd75350877842998c94434083fb62f
refs/heads/master
2021-01-13T02:06:29.609413
2015-04-10T08:35:31
2015-04-10T08:35:31
33,717,537
3
0
null
null
null
null
UTF-8
Java
false
false
2,747
java
/* * DynamicJava - Copyright (C) 1999 Dyade * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: The above copyright notice and this * permission notice shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL DYADE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH * THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of Dyade shall not be used in advertising or * otherwise to promote the sale, use or other dealings in this Software without prior written * authorization from Dyade. */ package koala.dynamicjava.classinfo; import koala.dynamicjava.tree.TypeDeclaration; /** * The instances of the classes that implements this interface are used to find the fully qualified * name of classes and to manage the loading of these classes. * * @author Stephane Hillion * @version 1.0 - 1999/06/12 */ public interface ClassFinder { /** * Returns the current package */ String getCurrentPackage(); /** * Loads the class info that match the given name in the source file * * @param cname the name of the class to find * @return the class info * @exception ClassNotFoundException if the class cannot be loaded */ ClassInfo lookupClass(String cname) throws ClassNotFoundException; /** * Loads the class info that match the given name in the source file * * @param cname the name of the class to find * @param cinfo the context where 'cname' was found * @return the class info * @exception ClassNotFoundException if the class cannot be loaded */ ClassInfo lookupClass(String cname, ClassInfo cinfo) throws ClassNotFoundException; /** * Adds a type declaration in the class info list * * @param cname the name of the class * @param decl the type declaration */ ClassInfo addClassInfo(String cname, TypeDeclaration decl); }
[ "guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b" ]
guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b
8246d0493cfbc17c230a85c83f5204005a68b2d6
d42072b4bcb2f254fbf22416ad7c3405e98c3edb
/CookBook1/src/main/java/ua/editor/MeasuringSystemEditor.java
57ab9f293d69e7085ac2166ba9d2f47fd73da38a
[]
no_license
SokolSerhiy/Logos
ec8423581d14d98fa768b8be45264f0e245d73a8
6f4f62b2abc9d5688695778edc69363dd1b39192
refs/heads/master
2021-01-01T20:35:03.276125
2017-08-20T23:02:35
2017-08-20T23:02:35
41,263,797
15
23
null
null
null
null
UTF-8
Java
false
false
552
java
package ua.editor; import java.beans.PropertyEditorSupport; import ua.entity.MeasuringSystem; import ua.service.MeasuringSystemService; public class MeasuringSystemEditor extends PropertyEditorSupport{ private final MeasuringSystemService systemService; public MeasuringSystemEditor(MeasuringSystemService systemService) { this.systemService = systemService; } @Override public void setAsText(String text) throws IllegalArgumentException { MeasuringSystem system = systemService.findOne(Long.valueOf(text)); setValue(system); } }
[ "sokol.serhij@gmail.com" ]
sokol.serhij@gmail.com
c296bef2fe96da639cb0cd79071cf1478537e4a7
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/HyperSQL/HyperSQL1419.java
8bdfb5870de09084dfee60b4110b5b65083de061
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
public BitMap(int size, boolean extend) { int words = size / Integer.SIZE; if (size == 0 || size % Integer.SIZE != 0) { words++; } map = new int[words]; canChangeSize = extend; limitPos = size; initialSize = size; }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
615b274b69db24ccc7486bcd6688a13ff7a3ff38
c7bde66e96dc508c32cd0101644d7ac258c4be27
/booking-mvc/src/main/java/org/thymeleaf/spring6/view/AjaxThymeleafView.java
2016db2d17d8e800eb9edf2813029da5728c524b
[]
no_license
Spring-Framework-Java-Apps/spring-webflow-samples
ad08ab09fbe12c9c680ec3798cb5ffd1ac405108
183438361362bafbc9d02556e195efa67efa4d96
refs/heads/master
2022-09-06T01:51:45.973567
2022-08-21T20:00:14
2022-08-21T20:00:14
251,044,004
0
0
null
2022-08-21T20:00:15
2020-03-29T13:53:01
null
UTF-8
Java
false
false
4,195
java
/* * ============================================================================= * * Copyright (c) 2011-2018, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ============================================================================= */ package org.thymeleaf.spring6.view; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; import org.springframework.webflow.context.servlet.AjaxHandler; import org.thymeleaf.exceptions.ConfigurationException; // Copied from thymeleaf-spring5. // Temporarily here until available in thymeleaf-spring6. /** * <p> * Subclass of {@link ThymeleafView} adding compatibility with AJAX events in * Spring JavaScript (part of Spring WebFlow). This allows this View implementation * to be able to return only <i>fragments</i> of the page. * </p> * <p> * These rendering of fragments is used, for example, in Spring WebFlow's &lt;render&gt; * instructions (though not only). * </p> * <p> * This view searches for a comma-separated list of <i>markup selectors</i> in a request * parameter called {@code fragments}. * </p> * * @author Daniel Fern&aacute;ndez * * @since 3.0.3 * */ public class AjaxThymeleafView extends ThymeleafView implements AjaxEnabledView { private static final Logger vlogger = LoggerFactory.getLogger(AjaxThymeleafView.class); private static final String FRAGMENTS_PARAM = "fragments"; private AjaxHandler ajaxHandler = null; public AjaxThymeleafView() { super(); } public AjaxHandler getAjaxHandler() { return this.ajaxHandler; } public void setAjaxHandler(final AjaxHandler ajaxHandler) { this.ajaxHandler = ajaxHandler; } @Override public void render(final Map<String, ?> model, final HttpServletRequest request, final HttpServletResponse response) throws Exception { final AjaxHandler templateAjaxHandler = getAjaxHandler(); if (templateAjaxHandler == null) { throw new ConfigurationException("[THYMELEAF] AJAX Handler set into " + AjaxThymeleafView.class.getSimpleName() + " instance for template " + getTemplateName() + " is null."); } if (templateAjaxHandler.isAjaxRequest(request, response)) { final Set<String> fragmentsToRender = getRenderFragments(model, request, response); if (fragmentsToRender == null || fragmentsToRender.size() == 0) { vlogger.warn("[THYMELEAF] An Ajax request was detected, but no fragments were specified to be re-rendered. " + "Falling back to full page render. This can cause unpredictable results when processing " + "the ajax response on the client."); super.render(model, request, response); return; } super.renderFragment(fragmentsToRender, model, request, response); } else { super.render(model, request, response); } } @SuppressWarnings({ "rawtypes", "unused" }) protected Set<String> getRenderFragments( final Map model, final HttpServletRequest request, final HttpServletResponse response) { final String fragmentsParam = request.getParameter(FRAGMENTS_PARAM); final String[] renderFragments = StringUtils.commaDelimitedListToStringArray(fragmentsParam); if (renderFragments.length == 0) { return null; } if (renderFragments.length == 1) { return Collections.singleton(renderFragments[0]); } return new HashSet<String>(Arrays.asList(renderFragments)); } }
[ "rstoyanchev@vmware.com" ]
rstoyanchev@vmware.com
3b2c8d9a415c8c0d08d47cf85f81353ee60a3032
c7330fb0a7376943ba80c98896e1e824436d6f76
/src/test/java/MavenOne/Demo.java
d4654119761d6b216798a60c073b2e1b911b1327
[]
no_license
BhargaviPaltur/Infy1
25fc9a50659c25b1688265f5b386bd6ed921607f
092f015a15a154508da3266765fe0f40f9b64c5d
refs/heads/main
2023-07-02T22:35:03.302652
2021-08-13T04:06:12
2021-08-13T04:06:12
395,505,834
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package MavenOne; import org.testng.annotations.Test; public class Demo{ @Test public void hi1() { System.out.println("hi1"); } @Test public void hi2() { System.out.println("hi2"); } @Test public void hi3() { System.out.println("hi3"); } }
[ "you@example.com" ]
you@example.com
7c52f5160c1559294d07c5e493a9e0af5ac74b22
7e41614c9e3ddf095e57ae55ae3a84e2bdcc2844
/development/workspace(helios)/Poseidon/src/com/gentleware/poseidon/custom/diagrams/node/impl/SensorCreateFacetImpl.java
b78a73b53657c0752092b47ab78efddef4d032ee
[]
no_license
ygarba/mde4wsn
4aaba2fe410563f291312ffeb40837041fb143ff
a05188b316cc05923bf9dee9acdde15534a4961a
refs/heads/master
2021-08-14T09:52:35.948868
2017-11-15T08:02:31
2017-11-15T08:02:31
109,995,809
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
package com.gentleware.poseidon.custom.diagrams.node.impl; import com.gentleware.poseidon.diagrams.gen.node.DslGenSensorCreateFacet; import org.eclipse.emf.ecore.EObject; import com.gentleware.poseidon.geometry.UPoint; import com.gentleware.poseidon.idraw.foundation.DiagramFacet; import com.gentleware.poseidon.idraw.foundation.persistence.PersistentFigure; import com.gentleware.poseidon.idraw.foundation.persistence.PersistentProperties; import com.gentleware.poseidon.idraw.nodefacilities.creationbase.NodeGem; import com.gentleware.poseidon.idraw.nodefacilities.nodesupport.BasicNodeGem; public class SensorCreateFacetImpl extends DslGenSensorCreateFacet { @Override public NodeGem createNodeGem(Object subject, DiagramFacet diagram, String figureId, UPoint location, PersistentProperties properties, BasicNodeGem basicGem) { return new SensorNodeGem((EObject) subject, diagram, figureId, extractFillColor(properties), properties, getFigureName()); } @Override public NodeGem createNodeGem(DiagramFacet diagram, PersistentFigure figure, BasicNodeGem basicGem) { return new SensorNodeGem(extractFillColor(figure.getProperties()), figure, getFigureName()); } }
[ "ygarba@gmail.com" ]
ygarba@gmail.com
6bc01f3f75a7ca0f4b220dca8c6f9b84fb005e8f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_633dfdfd8a6bf3a18187cad36aa84f9776978c32/MapParameters/2_633dfdfd8a6bf3a18187cad36aa84f9776978c32_MapParameters_s.java
77b4570184e9d0f346d026130d66fb0f78c77f4b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,317
java
package wint.mvc.parameters; import wint.lang.utils.MapUtil; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; public class MapParameters extends AbstractParameters { private Map<String, String[]> mapParameters; public MapParameters(Map<String, String[]> mapParameters) { super(); Map<String, String[]> newMapParameters = MapUtil.newHashMap(); for (Map.Entry<String, String[]> entry : mapParameters.entrySet()) { String paramName = normalizeName(entry.getKey()); String[] values = mapParameters.get(paramName); newMapParameters.put(paramName, values); } this.mapParameters = newMapParameters; } public Set<String> getNames() { return mapParameters.keySet(); } public String getStringImpl(String name, String defaultValue) { String[] ret = mapParameters.get(name); if (ret == null) { return defaultValue; } if (ret.length == 0) { return defaultValue; } return ret[0]; } public String[] getStringArrayImpl(String name, String[] defaultArray) { String[] ret = mapParameters.get(name); if (ret == null) { return defaultArray; } else { return ret; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ccfd6085ab5636cab8d5f7f827e2271111b1e90a
c1b23a03926012ccee280b3895f100cec61d2407
/topdeep_web_common/server/common-core/src/main/java/topdeep/commonfund/entity/hundsun/B045Output.java
23e350df750ebcd872a0d531359ad618e86f84db
[]
no_license
zhuangxiaotian/project
a0e548c88f01339993097d99ac68adcba9d11171
d0c96854b3678209c9a25d07c9729c613fe66d38
refs/heads/master
2020-12-05T23:14:27.354448
2016-09-01T07:19:22
2016-09-01T07:19:22
67,108,931
0
0
null
null
null
null
UTF-8
Java
false
false
253
java
package topdeep.commonfund.entity.hundsun; import java.io.Serializable; import java.util.*; import common.util.param.PropertyAttribute; /** * 签约协议表更新(B045) */ public class B045Output extends HundsunBaseOutput implements Serializable { }
[ "xtian.zhuang@topdeep.com" ]
xtian.zhuang@topdeep.com
18735333c76a467cec5c09bbca733c1929ddcf5d
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE90_LDAP_Injection/CWE90_LDAP_Injection__getQueryString_Servlet_61a.java
3dd4ce1fbf84a2377ab8c4dc6504f306e2b0e662
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
4,163
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE90_LDAP_Injection__getQueryString_Servlet_61a.java Label Definition File: CWE90_LDAP_Injection.label.xml Template File: sources-sink-61a.tmpl.java */ /* * @description * CWE: 90 LDAP Injection * BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter()) * GoodSource: A hardcoded string * Sinks: * BadSink : data concatenated into LDAP search, which could result in LDAP Injection * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ package testcases.CWE90_LDAP_Injection; import testcasesupport.*; import javax.naming.*; import javax.naming.directory.*; import javax.servlet.http.*; import java.util.Hashtable; import java.io.IOException; import org.apache.commons.lang.StringEscapeUtils; public class CWE90_LDAP_Injection__getQueryString_Servlet_61a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data = (new CWE90_LDAP_Injection__getQueryString_Servlet_61b()).bad_source(request, response); Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389"); DirContext ctx = new InitialDirContext(env); /* POTENTIAL FLAW: data concatenated into LDAP search, which could result in LDAP Injection */ String search = "(cn=" + data + ")"; NamingEnumeration<SearchResult> answer = ctx.search("", search, null); while (answer.hasMore()) { SearchResult sr = answer.next(); Attributes a = sr.getAttributes(); NamingEnumeration<?> attrs = a.getAll(); while (attrs.hasMore()) { Attribute attr = (Attribute) attrs.next(); NamingEnumeration<?> values = attr.getAll(); while(values.hasMore()) { IO.writeLine(" Value: " + values.next().toString()); } } } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data = (new CWE90_LDAP_Injection__getQueryString_Servlet_61b()).goodG2B_source(request, response); Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389"); DirContext ctx = new InitialDirContext(env); /* POTENTIAL FLAW: data concatenated into LDAP search, which could result in LDAP Injection */ String search = "(cn=" + data + ")"; NamingEnumeration<SearchResult> answer = ctx.search("", search, null); while (answer.hasMore()) { SearchResult sr = answer.next(); Attributes a = sr.getAttributes(); NamingEnumeration<?> attrs = a.getAll(); while (attrs.hasMore()) { Attribute attr = (Attribute) attrs.next(); NamingEnumeration<?> values = attr.getAll(); while(values.hasMore()) { IO.writeLine(" Value: " + values.next().toString()); } } } } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
a5112f700612bf806b24efc0cb6a6a7aa9788296
e62c3b93b38d2d7781d38ba1cdbabfea2c1cf7af
/BocBankMobile/src/main/java/com/boc/bocsoft/mobile/bocmobile/wxapi/WXEntryActivity.java
368be0cd9e10ae485139845ce7973202013a2b15
[]
no_license
soghao/zgyh
df34779708a8d6088b869d0efc6fe1c84e53b7b1
09994dda29f44b6c1f7f5c7c0b12f956fc9a42c1
refs/heads/master
2021-06-19T07:36:53.910760
2017-06-23T14:23:10
2017-06-23T14:23:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
package com.boc.bocsoft.mobile.bocmobile.wxapi; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.widget.Toast; import com.boc.bocsoft.mobile.bocmobile.ApplicationConst; import com.boc.bocsoft.mobile.bocmobile.R; import com.tencent.mm.sdk.openapi.BaseReq; import com.tencent.mm.sdk.openapi.BaseResp; import com.tencent.mm.sdk.openapi.IWXAPI; import com.tencent.mm.sdk.openapi.IWXAPIEventHandler; import com.tencent.mm.sdk.openapi.WXAPIFactory; /** * 微信分享的回调 */ public class WXEntryActivity extends Activity implements IWXAPIEventHandler { private final String TAG = "WXEntryActivity"; private IWXAPI api; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(TAG , "onCreate----------------------消息已发送"); api = WXAPIFactory.createWXAPI(this, ApplicationConst.APP_ID, false); api.registerApp(ApplicationConst.APP_ID); api.handleIntent(getIntent(), this); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Log.i(TAG , "onNewIntent----------------------"); setIntent(intent); api.handleIntent(intent, this); } /** * 微信发送的请求回调 * @param req */ @Override public void onReq(BaseReq req) { // TODO Auto-generated method stub Log.i(TAG, "onReq----------------------微信主动发送"); } /** * 第三方应用发送到微信的请求处理后的响应结果,将回调该方法 * @param resp */ @Override public void onResp(BaseResp resp) { Log.i(TAG, "onResp----------------------消息响应"); String result = ""; switch (resp.errCode) { case BaseResp.ErrCode.ERR_OK: result = getResources().getString(R.string.errcode_success); break; case BaseResp.ErrCode.ERR_USER_CANCEL: result = getResources().getString(R.string.errcode_cancel); break; case BaseResp.ErrCode.ERR_AUTH_DENIED: result = getResources().getString(R.string.errcode_deny); break; default: result = getResources().getString(R.string.errcode_unknown); break; } Toast.makeText(this, result, Toast.LENGTH_LONG).show(); } }
[ "15609143618@163.com" ]
15609143618@163.com
693b17579c1579157cf5591d988e19f1d2587e21
032179339c1e4003dafeb32f3a375167dedeaf2b
/java1/src/exam01/Exam08.java
08ff23b84029f762d605f8fa7d7b5f21f43b5f27
[]
no_license
cheolgyun/java1
ecf3df36e2b1d3cae142b3bc2c4e5f8bafa3f54d
1ada9936a76c6acac023dc816de34f77acf1e78a
refs/heads/master
2021-01-01T17:25:09.574386
2017-07-23T07:18:27
2017-07-23T07:18:27
98,068,027
0
0
null
null
null
null
UHC
Java
false
false
636
java
package exam01; import java.util.Scanner; public class Exam08 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("반복문의 시작값을 입력해주세요."); String initStr = scan.nextLine(); int initNum = Integer.parseInt(initStr); System.out.println("반복문의 종료값을 입력해주세요."); String finStr = scan.nextLine(); int finNum = Integer.parseInt(finStr); int num = 0; for (int i = initNum; i <= finNum; i++) { num += i; } System.out.println(num); } } // and 조건은 && or 조건은 ||(shift + \)
[ "DJA@DJA-PC" ]
DJA@DJA-PC
e4b4ba3b40a09cb67997f66980202d2fd4f3ac3a
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/tencentmap/mapsdk/a/kj.java
c198a1642159384946db820bd95b2f8702847707
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
678
java
package com.tencent.tencentmap.mapsdk.a; import android.view.animation.Interpolator; public class kj extends kk { private float e; private float f; protected void a(float paramFloat, Interpolator paramInterpolator) { float f1 = this.f; float f2 = this.e; paramFloat = paramInterpolator.getInterpolation(paramFloat); float f3 = this.e; if (this.d != null) { this.d.a((f1 - f2) * paramFloat + f3); } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes-dex2jar.jar!/com/tencent/tencentmap/mapsdk/a/kj.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
01bb3357734e7c7312e340a9c4a4dcba6dfef6f3
8523563143e69b9ca0326acafdaa646f1b57bb94
/tags/plantuml-7940/src/net/sourceforge/plantuml/cucadiagram/LinkMiddleDecor.java
1d4c1e10809f74c6603d91fca3269aa264bd6e24
[]
no_license
svn2github/plantuml
d372e8c5f4b1c5d990b190e2989cd8e5a86ed8fc
241b60a9081a25079bf73f12c08c476e16993384
refs/heads/master
2023-09-03T13:20:47.638892
2012-11-20T22:08:10
2012-11-20T22:08:10
10,839,094
0
0
null
null
null
null
UTF-8
Java
false
false
2,216
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2012, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML 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 3 of the License, or * (at your option) any later version. * * PlantUML 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 this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 4604 $ * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.svek.extremity.MiddleCircleCircledMode; import net.sourceforge.plantuml.svek.extremity.MiddleFactory; import net.sourceforge.plantuml.svek.extremity.MiddleFactoryCircle; import net.sourceforge.plantuml.svek.extremity.MiddleFactoryCircleCircled; public enum LinkMiddleDecor { NONE, CIRCLE, CIRCLE_CIRCLED, CIRCLE_CIRCLED1, CIRCLE_CIRCLED2; public MiddleFactory getMiddleFactory() { if (this == CIRCLE) { return new MiddleFactoryCircle(); } if (this == CIRCLE_CIRCLED) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.BOTH); } if (this == CIRCLE_CIRCLED1) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.MODE1); } if (this == CIRCLE_CIRCLED2) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.MODE2); } throw new UnsupportedOperationException(); } }
[ "arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1" ]
arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1
b874d47cfdb94680a2508b283a2ec6aa626116d9
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/92/767.java
7eed7adfeb24995ee672496237e9acb5b6a438df
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,864
java
package <missing>; public class GlobalMembers { public static int Main() { int[] n = new int[100]; int[][] T = new int[100][1001]; int[][] Q = new int[100][1001]; int i; int j; int k; int r; int t; int mo; int shi = 0; int s = 0; for (i = 0;i < 100;i++) { String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n[i] = Integer.parseInt(tempVar); } if (n[i] == 0) { break; } for (j = 0;j < n[i];j++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { T[i][j] = Integer.parseInt(tempVar2); } } for (j = 0;j < n[i];j++) { String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { Q[i][j] = Integer.parseInt(tempVar3); } } } for (j = 0;j < i;j++) { for (k = 0;k < n[j] - 1;k++) { for (r = 0;r < n[j] - 1 - k;r++) { if (T[j][r] < T[j][r + 1]) { t = T[j][r]; T[j][r] = T[j][r + 1]; T[j][r + 1] = t; } if (Q[j][r] < Q[j][r + 1]) { t = Q[j][r]; Q[j][r] = Q[j][r + 1]; Q[j][r + 1] = t; } } } mo = n[j] - 1; while (mo > shi) { if (T[j][mo] > Q[j][mo]) { s += 200; mo--; } else { if (T[j][shi] > Q[j][shi]) { s += 200; shi++; } else { t = T[j][mo]; for (k = mo;k > shi;k--) { T[j][k] = T[j][k - 1]; } T[j][shi] = t; if (T[j][shi] < Q[j][shi]) { s -= 200; } else if (T[j][shi] > Q[j][shi]) { s += 200; } shi++; } } } for (k = shi;k <= mo;k++) { if (T[j][k] > Q[j][k]) { s += 200; } else if (T[j][k] < Q[j][k]) { s -= 200; } } System.out.printf("%d\n",s); s = 0; shi = 0; } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
9f7e193c0b26e5fbb6887225af51fd8cccf99026
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/com/google/android/gms/location/zzah.java
88105ab990f8d367dd7a2cf811e662675b0e080a
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
1,526
java
package com.google.android.gms.location; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.internal.safeparcel.SafeParcelReader; public final class zzah implements Parcelable.Creator<LocationSettingsResult> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel); LocationSettingsStates locationSettingsStates = null; Status status = null; while (parcel.dataPosition() < validateObjectHeader) { int readHeader = SafeParcelReader.readHeader(parcel); switch (SafeParcelReader.getFieldId(readHeader)) { case 1: status = (Status) SafeParcelReader.createParcelable(parcel, readHeader, Status.CREATOR); break; case 2: locationSettingsStates = (LocationSettingsStates) SafeParcelReader.createParcelable(parcel, readHeader, LocationSettingsStates.CREATOR); break; default: SafeParcelReader.skipUnknownField(parcel, readHeader); break; } } SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader); return new LocationSettingsResult(status, locationSettingsStates); } public final /* synthetic */ Object[] newArray(int i) { return new LocationSettingsResult[i]; } }
[ "michael@districtrace.com" ]
michael@districtrace.com
dac3b9fe66f39809810a01583fc01ad8ee7f4a48
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/booter/TrafficStatsReceiver.java
de9763e34db97f903f6e33dbd69942118f1c64f6
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
1,996
java
package com.tencent.mm.booter; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.SystemClock; import com.tencent.mm.sdk.platformtools.bf; import com.tencent.mm.sdk.platformtools.w; import com.tencent.wcdb.database.SQLiteDatabase; public class TrafficStatsReceiver extends BroadcastReceiver { private long mLastTime = -1; public void onReceive(Context context, Intent intent) { w.d("MicroMsg.TrafficStats", "onRecieve"); long elapsedRealtime = SystemClock.elapsedRealtime(); bf.update(); if (this.mLastTime >= 0) { long j = elapsedRealtime - this.mLastTime; long bJL = bf.bJL() + bf.bJK(); long bJJ = bf.bJJ() + bf.bJI(); long bJP = bf.bJP() + bf.bJO(); long bJP2 = bf.bJP() + bf.bJO(); w.i("MicroMsg.TrafficStats", "Time: %d ms, System - [Mobile: %d, Wifi: %d, Speed: %.2f], WeChat - [Mobile: %d, Wifi: %d, Speed: %.2f]", Long.valueOf(j), Long.valueOf(bJL), Long.valueOf(bJJ), Double.valueOf(((double) (bJL + bJJ)) / ((double) (j / 1000))), Long.valueOf(bJP), Long.valueOf(bJP2), Double.valueOf(((double) (bJP + bJP2)) / ((double) (j / 1000)))); } this.mLastTime = elapsedRealtime; } public static void at(Context context) { ((AlarmManager) context.getSystemService("alarm")).setRepeating(3, SystemClock.elapsedRealtime(), 300000, PendingIntent.getBroadcast(context, 1, new Intent("com.tencent.mm.TrafficStatsReceiver"), SQLiteDatabase.CREATE_IF_NECESSARY)); w.i("MicroMsg.TrafficStats", "Register alarm, interval: %d ms", Long.valueOf(300000)); } public static void au(Context context) { ((AlarmManager) context.getSystemService("alarm")).cancel(PendingIntent.getBroadcast(context, 1, new Intent("com.tencent.mm.TrafficStatsReceiver"), SQLiteDatabase.CREATE_IF_NECESSARY)); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
66f2fd222a995c814528d7f3ece28d21db8a6569
cac3d2816f60200b7dd6eb3b1a0252c11aaa5c70
/stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/remoting/AgentClient.java
8a1ad1f9e69f5eb45fe4a91e91f9da892457ea88
[ "Apache-2.0" ]
permissive
serkan-ozal/hazelcast-stabilizer
01d1301dd3d3ccc892ac690b41fa497bd4c7b1b9
4acea5179f0f54c92fb9723ada8526998772849d
refs/heads/master
2021-01-24T00:24:22.101610
2014-08-22T20:40:02
2014-08-22T20:40:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,077
java
package com.hazelcast.stabilizer.coordinator.remoting; import com.hazelcast.stabilizer.Utils; import com.hazelcast.stabilizer.agent.remoting.AgentRemoteService; import com.hazelcast.stabilizer.common.AgentAddress; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.InetAddress; import java.net.Socket; import static com.hazelcast.stabilizer.Utils.closeQuietly; class AgentClient { final String publicAddress; final String privateIp; public AgentClient(AgentAddress address) { this.publicAddress = address.publicAddress; this.privateIp = address.privateAddress; } Object execute(AgentRemoteService.Service service, Object... args) throws Exception { Socket socket = newSocket(); try { ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); oos.writeObject(service); for (Object arg : args) { oos.writeObject(arg); } oos.flush(); ObjectInputStream in = new ObjectInputStream(socket.getInputStream()); Object response = in.readObject(); if (response instanceof Exception) { Exception exception = (Exception) response; Utils.fixRemoteStackTrace(exception, Thread.currentThread().getStackTrace()); throw exception; } return response; } finally { closeQuietly(socket); } } //we create a new socket for every request because it could be that the agents is not reachable //and we don't want to depend on state within the socket. private Socket newSocket() throws IOException { try { InetAddress hostAddress = InetAddress.getByName(publicAddress); return new Socket(hostAddress, AgentRemoteService.PORT); } catch (IOException e) { throw new IOException("Couldn't connect to publicAddress: " + publicAddress + ":" + AgentRemoteService.PORT, e); } } }
[ "jaromir.hamala@gmail.com" ]
jaromir.hamala@gmail.com
3a8c8940320a1c793bf401da475aa73e60629b34
1f513fcf30bbda468cfef3459ad55a9be25bb081
/vkefu03/src/main/java/com/yxm/util/server/ServerRunner.java
a50b4a68d33ba60839248e99e5edfffeb5f7f88e
[]
no_license
startshineye/vkefu
146cfef97f8af8d709d6e613afc58c5d6ee67237
ab77cab23756439213b35d6f5e8bd45a50c86aab
refs/heads/master
2021-03-19T06:20:33.513625
2017-10-29T15:50:43
2017-10-29T15:50:43
105,330,224
1
1
null
null
null
null
UTF-8
Java
false
false
1,404
java
package com.yxm.util.server; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; import com.corundumstudio.socketio.SocketIONamespace; import com.corundumstudio.socketio.SocketIOServer; import com.yxm.core.Context; import com.yxm.util.server.handler.AgentEventHandler; import com.yxm.util.server.handler.IMEventHandler; @Component public class ServerRunner implements CommandLineRunner{ private final SocketIOServer server; @Autowired public ServerRunner(SocketIOServer server){ System.out.println("***ServerRunner*** server "+server); this.server=server; } public void run(String... arg0) throws Exception { //System.out.println("**ServerRunner run**"+server+" imEventHandler"+imEventHandler+" agentHandler"+agentHandler); //System.out.println("**imEventHandlerRunner run**"+imEventHandler); server.getNamespace(Context.NameSpaceEnum.IM.getNamespace()).addListeners(new IMEventHandler(server)); server.getNamespace(Context.NameSpaceEnum.AGENT.getNamespace()).addListeners(new AgentEventHandler(server)); Collection<SocketIONamespace> allNamespaces = server.getAllNamespaces(); for (SocketIONamespace socketIONamespace : allNamespaces) { System.out.println(" socketIONamespace"+socketIONamespace.getName()); } server.start(); } }
[ "13001955858@163.com" ]
13001955858@163.com
38788abb1b0ab902a34f94e7fd3e233c376a3458
67d0c4a542cc27bb10e0ceca1f07a9f478cc2317
/src/com/xjgc/wind/datastatistics/dao/impl/WindPowScatterDaoImpl.java
aeb11c0b083f5532e3ff6843858fd22b80bcfd27
[]
no_license
willingox/DWE8000-REPORT
6b8ed454a47e36004a5660438d7ed1a6eae27cbd
492a4aa34aff08dee468a6d2fc4a029dd2f704cf
refs/heads/master
2023-07-20T20:36:51.001871
2021-09-08T08:21:58
2021-09-08T08:21:58
404,266,299
0
0
null
null
null
null
UTF-8
Java
false
false
7,121
java
package com.xjgc.wind.datastatistics.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; import org.apache.commons.dbcp.BasicDataSource; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; import com.xjgc.wind.datastatistics.dao.IWindPowScatterDao; import com.xjgc.wind.datastatistics.vo.DataStatisticsDataVo; import com.xjgc.wind.datastatistics.web.form.WindPowScatterDataForm; public class WindPowScatterDaoImpl extends JdbcDaoSupport implements IWindPowScatterDao{ private boolean isDBMysql(){ JdbcTemplate jdbcTemplate=getJdbcTemplate(); String driver=((BasicDataSource) jdbcTemplate.getDataSource()).getDriverClassName(); if(driver.equals("com.mysql.jdbc.Driver")){ return true; }else{ return false; } } public List<DataStatisticsDataVo> list(WindPowScatterDataForm queryFilter,Integer equipId){ String startDateStr=queryFilter.getStartDateDisp();//寮�鏃堕棿瀛楃涓� String endDateStr=queryFilter.getEndDateDisp();//缁撴潫鏃堕棿瀛楃涓� Date startDate=null; Date endDate=null; Calendar startCalendar=Calendar.getInstance(); Calendar endCalendar=Calendar.getInstance(); try { startDate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startDateStr); endDate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endDateStr); startCalendar.setTime(startDate); endCalendar.setTime(endDate); } catch (ParseException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } int startYear=startCalendar.get(Calendar.YEAR);//寮�骞翠唤 int endYear=endCalendar.get(Calendar.YEAR);//缁撴潫骞翠唤 String sql = ""; if (isDBMysql()==true) { if(startYear == endYear){ String tablenamew ="hisweatherdata_"+startYear; String tablenameg ="hisgenerator_"+startYear; sql +=" select h1.WINDVELVAL as WINDVELVAL1, g1.curp as POWER "; sql +=" from "+tablenamew+" h1, "+tablenameg+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and h1.equipid=g1.id and g.id=g1.id and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >='"+startDateStr+"' and h1.savetime <='"+endDateStr+"' "; } else{ String tablenamew1 ="hisweatherdata_"+startYear; String tablenameg1 ="hisgenerator_"+startYear; String tablenamew2 ="hisweatherdata_"+endYear; String tablenameg2 ="hisgenerator_"+endYear; sql +=" ( select h1.WINDVELVAL as WINDVELVAL1,g1.curp as POWER "; sql +=" from "+tablenamew1+" h1, "+tablenameg1+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and h1.equipid=g1.id and g.id=g1.id and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >='"+startDateStr+"' and h1.savetime <='"+endDateStr+"' ) union all "; sql +=" (select h1.WINDVELVAL as WINDVELVAL1,g1.curp as POWER "; sql +=" from "+tablenamew2+" h1, "+tablenameg2+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and h1.equipid=g1.id and g.id=g1.id and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >='"+startDateStr+"' and h1.savetime <='"+endDateStr+"' )"; } } if (isDBMysql()==false) { if(startYear == endYear){ String tablenamew ="hisweatherdata_"+startYear; String tablenameg ="hisgenerator_"+startYear; sql +=" select h1.WINDVELVAL as WINDVELVAL1, g1.curp as POWER "; sql +=" from "+tablenamew+" h1, "+tablenameg+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and h1.equipid=g1.id and g.id=g1.id and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >=to_date('"+startDateStr+"','yyyy-mm-dd hh24:mi:ss') and h1.savetime <=to_date('"+endDateStr+"','yyyy-mm-dd hh24:mi:ss') "; } else{ String tablenamew1 ="hisweatherdata_"+startYear; String tablenameg1 ="hisgenerator_"+startYear; String tablenamew2 ="hisweatherdata_"+endYear; String tablenameg2 ="hisgenerator_"+endYear; sql +=" ( select h1.WINDVELVAL as WINDVELVAL1,g1.curp as POWER "; sql +=" from "+tablenamew1+" h1, "+tablenameg1+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and h1.equipid=g1.id and g.id=g1.id and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >=to_date('"+startDateStr+"','yyyy-mm-dd hh24:mi:ss') and h1.savetime <=o_date('"+endDateStr+"','yyyy-mm-dd hh24:mi:ss') ) union all "; sql +=" (select h1.WINDVELVAL as WINDVELVAL1,g1.curp as POWER "; sql +=" from "+tablenamew2+" h1, "+tablenameg2+" g1 ,genpwd ge,generator g"; sql +=" where g1.curcmpstate = 2 and ge.WEATHERVAL*2=floor(h1.WINDVELVAL/0.5) and h1.equipid=g1.id and g.id=g1.id and g.genmodelid=ge.genmodelid and g1.curp>=ge.genpwd*ge.lowerLimits and g1.curp<=ge.genpwd*ge.upperlimits"; if (equipId != null) { sql += " and h1.equipid=" + equipId; } sql +=" and h1.savetime=g1.savetime and h1.savetime >=to_date('"+startDateStr+"','yyyy-mm-dd hh24:mi:ss') and h1.savetime <=to_date('"+endDateStr+"','yyyy-mm-dd hh24:mi:ss') )"; } } return getJdbcTemplate().query(sql, new WindPowScatterDataRowMapper()); } class WindPowScatterDataRowMapper implements RowMapper { public Object mapRow(ResultSet rs, int rowNo) throws SQLException { DataStatisticsDataVo object = new DataStatisticsDataVo(); object.setWindVelval1( rs.getFloat("WINDVELVAL1") ); object.setPower( rs.getFloat("POWER") ); return object; } } }
[ "249497110@qq.com" ]
249497110@qq.com
c1e89f3118c7bd1a007cb947e30e193c65d7699c
d6ba22a8a9dd431921b8af8982edf115e0f84e01
/stroom-task/stroom-task-api/src/main/java/stroom/task/api/Terminator.java
b8434df1fe1a5c6b6c98865d8b8abc6fce6507d6
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0", "CDDL-1.0", "GPL-1.0-or-later", "LGPL-2.0-or-later", "MPL-1.0", "CC-BY-4.0", "LicenseRef-scancode-public-domain", "EPL-1.0" ]
permissive
gchq/stroom
15dc1d4a8527fe7888d060d39e639b48183ff8bd
759370c31d5d441444bca9d59c41c54bc42816f2
refs/heads/master
2023-09-05T01:40:41.773252
2023-09-04T16:40:12
2023-09-04T16:40:12
72,740,687
442
65
Apache-2.0
2023-09-14T12:12:28
2016-11-03T11:55:47
Java
UTF-8
Java
false
false
246
java
package stroom.task.api; public interface Terminator { Terminator DEFAULT = new Terminator() {}; default boolean isTerminated() { return false; } default void checkTermination() throws TaskTerminatedException { } }
[ "stroomdev66@gmail.com" ]
stroomdev66@gmail.com
467d399a9b2a6445292b23a2655c25111368cfa5
1bad8b29b661cde256be8a425f4dfa54b434cf1b
/app/src/main/java/com/zhangwan/app/read/utils/Charset.java
07abbd3bdc30c3766f6bcef419d91adff122c85a
[]
no_license
EvlinLee/BookProject
78cc99080886356118b8ae551d7d15541a9c3f0d
718dcbf87ac85e4bd0ed826cb9bf25c81a891e2a
refs/heads/master
2020-04-01T13:40:53.900566
2018-06-16T12:31:48
2018-06-16T12:31:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.zhangwan.app.read.utils; /** * 编码类型 */ public enum Charset { UTF8("UTF-8"), UTF16LE("UTF-16LE"), UTF16BE("UTF-16BE"), GBK("GBK"); private String mName; public static final byte BLANK = 0x0a; private Charset(String name) { mName = name; } public String getName() { return mName; } }
[ "17301673845@163.com" ]
17301673845@163.com
f68369612180c08cac07854f216db2ec5fc9acf5
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/ui/main/stories/guide/activity/C2386h.java
6a4389f79754442d9cd5bcd02224efc1f475897c
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package com.huawei.ui.main.stories.guide.activity; import com.huawei.hwcloudmodel.callback.a; import com.huawei.p190v.C2538c; /* compiled from: BasicInfoSettingActivity */ class C2386h implements a<Boolean> { final /* synthetic */ BasicInfoSettingActivity f8649a; C2386h(BasicInfoSettingActivity basicInfoSettingActivity) { this.f8649a = basicInfoSettingActivity; } public void m12124a(Boolean bool, String str, boolean z) { C2538c.m12677c("BasicInfoSettingActivity", "mHWUserProfileMgr.setUserInfoToLocal() operationResult isSuccess=" + z); if (z) { this.f8649a.f8592T.sendEmptyMessage(3); } else { this.f8649a.f8592T.sendEmptyMessage(4); } } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
02e6b441a0d2f68d7c456f1ee4802cd0758d85e6
129d3432cd19a9605351daa38b32503f1eee810c
/src/main/java/org/cyclops/evilcraft/item/ItemBloodWaxedCoalConfig.java
c7ad7a4526b8420986211917ea0386f7ba38eaab
[ "CC-BY-4.0" ]
permissive
CyclopsMC/EvilCraft
d4876dbf64553cf0e8d44c6efc1519b19c62dd33
b23bb88f4a210868862a9be1597136d5da7dfa06
refs/heads/master-1.20
2023-09-03T19:52:58.613433
2023-08-29T16:54:10
2023-08-29T16:54:10
13,619,340
56
41
null
2023-07-29T05:05:15
2013-10-16T13:12:01
Java
UTF-8
Java
false
false
943
java
package org.cyclops.evilcraft.item; import net.minecraft.world.item.Item; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent; import org.cyclops.cyclopscore.config.extendedconfig.ItemConfig; import org.cyclops.evilcraft.EvilCraft; /** * Config for the Blood-Waxed Coal. * @author rubensworks * */ public class ItemBloodWaxedCoalConfig extends ItemConfig { public ItemBloodWaxedCoalConfig() { super( EvilCraft._instance, "blood_waxed_coal", eConfig -> new Item(new Item.Properties() ) ); MinecraftForge.EVENT_BUS.addListener(this::onFurnaceFuelBurnTimeEventEvent); } public void onFurnaceFuelBurnTimeEventEvent(FurnaceFuelBurnTimeEvent event) { if (event.getItemStack().getItem() == this.getInstance()) { event.setBurnTime(3200); } } }
[ "rubensworks@gmail.com" ]
rubensworks@gmail.com
0dce3afd9c31615acc5a8a583228a72b7d149b3f
1e529597119c81832f4fc4e397d08f865693b305
/src/main/java/com/io7m/ftgr/ReplayOpGitTag.java
5e461b98bf420fc36e9b35e881967ff8835513c6
[]
no_license
io7m/ftgr
ffd1f1d4e5a1442d67b20b194d5dfacf4cf270aa
55627dd0acca707fd546c1196f1c33a966d151eb
refs/heads/master
2021-01-10T18:29:36.398785
2015-08-23T14:22:34
2015-08-23T14:22:34
39,735,919
0
0
null
null
null
null
UTF-8
Java
false
false
2,461
java
/* * Copyright © 2015 <code@io7m.com> http://io7m.com * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package com.io7m.ftgr; import com.io7m.jnull.NullCheck; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.math.BigInteger; public final class ReplayOpGitTag implements ReplayOperationType { private static final Logger LOG; static { LOG = LoggerFactory.getLogger(ReplayOpGitTag.class); } private final GitExecutableType git; private final GitRepositorySpecificationType repos; private final BigInteger key; private final FossilCommit commit; private final FossilTagName tag_name; public ReplayOpGitTag( final GitExecutableType in_git, final GitRepositorySpecificationType in_repos, final FossilCommit in_commit, final BigInteger key_id, final FossilTagName in_tag_name) { this.git = NullCheck.notNull(in_git); this.repos = NullCheck.notNull(in_repos); this.commit = NullCheck.notNull(in_commit); this.key = NullCheck.notNull(key_id); this.tag_name = NullCheck.notNull(in_tag_name); } @Override public void execute(final DryRun dry_run) throws ReplayException { ReplayOpGitTag.LOG.info( "tag {} on branch {} ({})", this.commit.getCommitBlob(), this.commit.getBranch(), this.commit.getCommitComment()); try { final GitIdent ident = this.repos.getUserNameMapping( this.commit.getCommitUser()); this.git.createTag( this.repos, this.commit.getCommitTime(), ident, this.key, this.tag_name.toString()); } catch (final IOException e) { throw new ReplayException(e); } } }
[ "code@io7m.com" ]
code@io7m.com
936cbada86551f638250e0ad48966d0a3954dc3c
b4e9ce0429ed56e0134acfa92dbe24197da6db48
/Core/src/logicalPrograms/RemoveWhiteSpaces.java
7c6104dd7555ca3a07a15a52d292b6f90567ca80
[]
no_license
naidu8242/Core-Java-Practice
9724d819cc8f29322f7951815166a3e6bc62c655
5fe25c5a2bbd3a9cf20715813e182775ee078a0c
refs/heads/master
2020-09-17T23:37:59.046437
2019-12-04T09:34:54
2019-12-04T09:34:54
224,122,923
0
0
null
null
null
null
UTF-8
Java
false
false
250
java
package logicalPrograms; public class RemoveWhiteSpaces { public static void main(String[] args) { String str1 = "Saket Saurav is a QualityAna list"; String s2 = str1.replaceAll(" ", ""); System.out.println(s2); } }
[ "plakshunnaidu@gmail.com" ]
plakshunnaidu@gmail.com
94bf995cd08a224b48e8d1638ca0a86b5b1332eb
2c4023f4d1547b2491624057eb0292e3ccda3a85
/employee_20170322/src/main/java/com/test/sts/RegionController.java
f9a1a40b392c0d030b14217613b99481051fab7b
[]
no_license
hoya1753/employee_20170322
b63f9870c4fbea9c1f1b300d503a3996262769eb
92474c392fc082c83b1764083217ecd86a32ef60
refs/heads/master
2021-01-18T03:57:53.038772
2017-03-22T02:17:39
2017-03-22T02:17:39
85,774,931
0
0
null
null
null
null
UHC
Java
false
false
2,829
java
package com.test.sts; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; /* @Controller 어노테이션은 현재 클래스를 SpringWebMVC가 관리하는 컨트롤러로 등록할 때 사용 */ @Controller public class RegionController { // @Autowired 어노테이션을 이용한 자동 의존 주입 // DAO 객체에 대한 의존 주입 @Autowired private RegionDAO regionDAO; /* @RequestMapping 어노테이션에서 method 속성은 요청 방식(GET or POST)을 분석할 때 사용 */ /* @RequestMapping 어노테이션과 연결된 메소드만 서블릿 요청에 대한 응답 메소드가 될 수 있다. */ /* 응답 메소드의 매개 변수 지정은 SpringWebMVC에 의해 자동 분석되기 때문에, 필요한 객체를 요청할 때 사용한다. */ /* * method = {RequestMethod.GET, RequestMethod.POST}는 GET, POST 방식 두 가지 모두 수신 가능 */ // 지역 정보 전체 출력 @RequestMapping(value = "/regionlist.it", method = { RequestMethod.GET, RequestMethod.POST }) public String regionlist(ModelMap model) { List<Region> list = null; list = regionDAO.regionList(); /* 서블릿 액션의 결과를 JSP 페이지(View)에 전달하는 경우 Model 객체를 사용한다. */ model.addAttribute("list",list); /* View 정보를 반환하는 부분 */ return "regionlist"; // "/WEB-INF/views/regionlist.jsp" } // 지역 정보 추가 @RequestMapping(value = "/regioninsert.it", method = RequestMethod.POST) public String regioninsert(Region r) { // 수정 요청 데이터 수신 처리 -> 스프링이 자동 수신 (자료형 클래스 준비 or 멤버 변수 준비) regionDAO.add(r); /* View 정보를 반환하는 부분 */ return "redirect:regionlist.it"; } // 지역 정보 삭제 @RequestMapping(value = "/regiondelete.it", method = RequestMethod.POST) public String regiondelete(Region r) { // 수정 요청 데이터 수신 처리 -> 스프링이 자동 수신 (자료형 클래스 준비 or 멤버 변수 준비) regionDAO.remove(r); /* View 정보를 반환하는 부분 */ return "redirect:regionlist.it"; } // 지역 정보 수정 @RequestMapping(value = "/regionupdate.it", method = RequestMethod.POST) public String regionupdate(Region r) { // 수정 요청 데이터 수신 처리 -> 스프링이 자동 수신 (자료형 클래스 준비 or 멤버 변수 준비) regionDAO.modify(r); /* View 정보를 반환하는 부분 */ return "redirect:regionlist.it"; } }
[ "USER@USER-PC" ]
USER@USER-PC
c96e475efa60129eee66c5ca67839a2544bf54bd
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/integration-apis/outboundservices/testsrc/de/hybris/platform/outboundservices/retention/OutboundRetentionRulesIntegrationTest.java
3e89a108dfe37558d608e935582f1cce6f1216b7
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
1,200
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.outboundservices.retention; import java.util.List; import org.junit.Before; import com.google.common.collect.Lists; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.impex.jalo.ImpExException; import de.hybris.platform.integrationservices.retention.AbstractRetentionRulesIntegrationTest; @IntegrationTest public class OutboundRetentionRulesIntegrationTest extends AbstractRetentionRulesIntegrationTest { private static final List<String> TYPES_TO_CLEANUP = Lists.newArrayList("OutboundRequest", "OutboundRequestMedia"); @Before public void setUp() throws ImpExException { importData("/impex/essentialdata-outbound-item-cleanup-jobs.impex", "UTF-8"); } @Override protected List<String> getTypesToCleanup() { return TYPES_TO_CLEANUP; } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
ab6bdcb23cdc2c467b10c09a97e92c976555a3c9
23a210a857e1d8cda630f3ad40830e2fc8bb2876
/emp_7.3/emp/wygl/com/montnets/emp/wyquery/biz/RptWyConfBiz.java
768de2b9e651cc3e24ed08389e402e685a9583ed
[]
no_license
zengyijava/shaoguang
415a613b20f73cabf9ab171f3bf64a8233e994f8
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
refs/heads/main
2023-04-25T07:57:11.656001
2021-05-18T01:18:49
2021-05-18T01:18:49
368,159,409
0
0
null
null
null
null
UTF-8
Java
false
false
4,887
java
package com.montnets.emp.wyquery.biz; import com.montnets.emp.common.context.EmpExecutionContext; import com.montnets.emp.wyquery.bean.RptWyConfInfo; import com.montnets.emp.wyquery.bean.RptWyStaticValue; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class RptWyConfBiz { protected static final Map<String, List<RptWyConfInfo>> rptConfMap = new HashMap<String, List<RptWyConfInfo>>(); protected static final Map<String, String> titleMap = new HashMap<String, String>(); public static Map<String, List<RptWyConfInfo>> getRptConfMap() { return rptConfMap; } public static Map<String, String> getTitleMap() { return titleMap; } /** * 初始化报表列配置 * * @param basePath */ public static void initRptConf(String basePath) { // 输入流 InputStream inputStream = null; try { String configPathStr = "/wygl/wyquery/config/rptWyConf.xml"; File file = new File(basePath + configPathStr); if (file == null || file.isDirectory() || !file.exists()) { //设置默认值 setDefault(); EmpExecutionContext.error("加载报表列配置数据,获取不到列配置文件。filePath=" + basePath + configPathStr); return; } inputStream = new FileInputStream(file); // 通过SAX解析输入流 SAXReader reader = new SAXReader(); Document document = reader.read(inputStream); // 得到根元素 Element root = document.getRootElement(); //得到列表 List<Element> rootElementList = root.elements(); // 遍历所有子节点 for (Element elMenu : rootElementList) { List<RptWyConfInfo> rptConList = new ArrayList<RptWyConfInfo>(); List<Element> elementList = elMenu.elements(); for (Element elColumn : elementList) { //配置为不显示的,则不加载 if ("2".equals(elColumn.attributeValue("display"))) { continue; } RptWyConfInfo rptCon = new RptWyConfInfo(); rptCon.setMenuid(elMenu.attributeValue("menuid")); rptCon.setDescription(elMenu.attributeValue("desc")); rptCon.setColId(elColumn.attributeValue("colid")); rptCon.setDisplay(elColumn.attributeValue("display")); rptCon.setName(elColumn.getStringValue()); if (elColumn.attributeValue("type") != null) { rptCon.setType(elColumn.attributeValue("type")); } rptConList.add(rptCon); } rptConfMap.put(elMenu.attributeValue("menuid"), rptConList); } } catch (Exception e) { //设置默认值 setDefault(); EmpExecutionContext.error(e, "解析报表配置文件异常。"); } finally { if (inputStream != null) { // 释放资源 try { inputStream.close(); inputStream = null; } catch (IOException e) { EmpExecutionContext.error(e, "解析报表配置文件,关闭资源异常。"); } } } } /** * 设置默认值 */ public static void setDefault() { List<RptWyConfInfo> wyRptConList = getWyRptConfInfo(); rptConfMap.put(RptWyStaticValue.WY_RPT_CONF_MENU_ID, wyRptConList); } /** * 获取网优报表默认数据 * * @return */ private static List<RptWyConfInfo> getWyRptConfInfo() { List<RptWyConfInfo> rptConList = new ArrayList<RptWyConfInfo>(); RptWyConfInfo rptCon1 = new RptWyConfInfo(); rptCon1.setMenuid(RptWyStaticValue.WY_RPT_CONF_MENU_ID); rptCon1.setDescription("网优统计报表"); rptCon1.setColId(RptWyStaticValue.RPT_FSSUCC_COLUMN_ID); rptCon1.setDisplay("1"); rptCon1.setName("发送成功数"); rptConList.add(rptCon1); RptWyConfInfo rptCon2 = new RptWyConfInfo(); rptCon2.setMenuid(RptWyStaticValue.WY_RPT_CONF_MENU_ID); rptCon2.setDescription("网优统计报表"); rptCon2.setColId(RptWyStaticValue.RPT_RFAIL2_COLUMN_ID); rptCon2.setDisplay("1"); rptCon2.setName("接收失败数"); rptConList.add(rptCon2); return rptConList; } }
[ "2461418944@qq.com" ]
2461418944@qq.com
9a81c6d7ca1f0b15006b55ee139e6ffbe2023113
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/appbrand/jsapi/auth/a$a.java
ad7cb2a1d0c3c64946309312ab280a774664b1ad
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
1,628
java
package com.tencent.mm.plugin.appbrand.jsapi.auth; import a.l; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.appbrand.i; import java.util.HashMap; @l(dWo={1, 1, 13}, dWp={""}, dWq={"Lcom/tencent/mm/plugin/appbrand/jsapi/auth/AppBrandAuthJSAPIConcurrentQueue$Companion;", "", "()V", "DUMMY_IMPL", "Lcom/tencent/mm/plugin/appbrand/jsapi/auth/AppBrandAuthJSAPIExecutorService;", "TAG", "", "gAppIdToQueueMap", "Ljava/util/HashMap;", "Lcom/tencent/mm/plugin/appbrand/jsapi/auth/AppBrandAuthJSAPIConcurrentQueue;", "Lkotlin/collections/HashMap;", "obtainByRuntime", "runtime", "Lcom/tencent/mm/plugin/appbrand/AppBrandRuntime;", "plugin-appbrand-integration_release"}) final class a$a { public static b u(i parami) { AppMethodBeat.i(134647); if (parami == null) { parami = a.aCy(); AppMethodBeat.o(134647); } while (true) { return parami; synchronized (a.aCz()) { a.aCA(); Object localObject = (a)a.aCz().get(parami.getAppId()); if (localObject != null) { parami = (b)localObject; AppMethodBeat.o(134647); continue; } localObject = new com/tencent/mm/plugin/appbrand/jsapi/auth/a$a$a; ((a.a.a)localObject).<init>(parami); parami = (b)((a.f.a.a)localObject).invoke(); } } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.auth.a.a * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
882ea2014ed72f39bfdafe90ea97cd9214e3cf3d
dde804bed2655d40ce4cf4fb65701e652415b7d1
/ebaysdkcore/src/main/java/com/ebay/soap/eBLBaseComponents/ClassifiedAdAutoAcceptEnabledDefinitionType.java
16adb02c0778299d6264e7612d1e25a4a259fb6d
[]
no_license
mamthal/getItemJava
ceccf4a8bab67bab5e9e8a37d60af095f847de44
d7a1bcc8c7a1f72728973c799973e86c435a6047
refs/heads/master
2016-09-05T23:39:46.495096
2014-04-21T18:19:21
2014-04-21T18:19:21
19,001,704
0
1
null
null
null
null
UTF-8
Java
false
false
3,981
java
package com.ebay.soap.eBLBaseComponents; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * * Type defining the <b>ClassifiedAdAutoAcceptEnabled</b> field that is * returned under the <b>FeatureDefinitions</b> container of the * <b>GetCategoryFeatures</b> response (as long as * 'ClassifiedAdAutoAcceptEnabled' or 'ClassifiedAdAutoDeclineEnabled' is included as a <b>FeatureID</b> value in * the call request or no <b>FeatureID</b> values are passed into the call * request). This field is returned as an * empty element (a boolean value is not returned) if one or more eBay API-enabled sites * support the Classified Ad Auto Accept feature. * <br/><br/> * To verify if a specific eBay site supports the Classified Ad Auto Accept feature (for most * categories), look for a 'true' value in the * <b>SiteDefaults.ClassifiedAdAutoAcceptEnabled</b> field. * <br/><br/> * To verify if a specific category on a specific eBay site supports the Classified Ad Auto Accept feature, pass in a <b>CategoryID</b> value in the request, and then * look for a 'true' value in the <b>ClassifiedAdAutoAcceptEnabled</b> field * of the corresponding Category node (match up the <b>CategoryID</b> values * if more than one Category IDs were passed in the request). * * * <p>Java class for ClassifiedAdAutoAcceptEnabledDefinitionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ClassifiedAdAutoAcceptEnabledDefinitionType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ClassifiedAdAutoAcceptEnabledDefinitionType", propOrder = { "any" }) public class ClassifiedAdAutoAcceptEnabledDefinitionType implements Serializable { private final static long serialVersionUID = 12343L; @XmlAnyElement(lax = true) protected List<Object> any; /** * * * @return * array of * {@link Element } * {@link Object } * */ public Object[] getAny() { if (this.any == null) { return new Object[ 0 ] ; } return ((Object[]) this.any.toArray(new Object[this.any.size()] )); } /** * * * @return * one of * {@link Element } * {@link Object } * */ public Object getAny(int idx) { if (this.any == null) { throw new IndexOutOfBoundsException(); } return this.any.get(idx); } public int getAnyLength() { if (this.any == null) { return 0; } return this.any.size(); } /** * * * @param values * allowed objects are * {@link Element } * {@link Object } * */ public void setAny(Object[] values) { this._getAny().clear(); int len = values.length; for (int i = 0; (i<len); i ++) { this.any.add(values[i]); } } protected List<Object> _getAny() { if (any == null) { any = new ArrayList<Object>(); } return any; } /** * * * @param value * allowed object is * {@link Element } * {@link Object } * */ public Object setAny(int idx, Object value) { return this.any.set(idx, value); } }
[ "mamtha@mamtha-Dell.(none)" ]
mamtha@mamtha-Dell.(none)
aeabe7c68e18a80bce1f97103c5403699483ee95
b5f0e3254e8f6cc5736b9855d61bb9784c7bb0d8
/src/main/java/org/docksidestage/dockside/dbflute/bsentity/customize/BsVendorNumericDecimalSum.java
d7422f98f67a1f65cc27572ea554922f71a5f7ce
[ "Apache-2.0" ]
permissive
dbflute-test/dbflute-test-active-dockside
cd7d4e6125aad52fca743711d88c7204d3d337f5
997e80a8b9172e0460391618bdc5ec0089f7983c
refs/heads/master
2023-08-06T08:06:06.340015
2023-07-19T18:42:11
2023-07-19T18:42:11
24,588,835
1
2
Apache-2.0
2022-05-25T05:50:45
2014-09-29T09:48:15
Java
UTF-8
Java
false
false
5,378
java
package org.docksidestage.dockside.dbflute.bsentity.customize; import java.util.List; import java.util.ArrayList; import org.dbflute.dbmeta.DBMeta; import org.dbflute.dbmeta.AbstractEntity; import org.dbflute.dbmeta.accessory.CustomizeEntity; import org.docksidestage.dockside.dbflute.exentity.customize.*; /** * The entity of VendorNumericDecimalSum. * @author DBFlute(AutoGenerator) */ public abstract class BsVendorNumericDecimalSum extends AbstractEntity implements CustomizeEntity { // =================================================================================== // Definition // ========== /** The serial version UID for object serialization. (Default) */ private static final long serialVersionUID = 1L; // =================================================================================== // Attribute // ========= /** DECIMAL_DIGIT_SUM: {DECIMAL(2147483647, 2147483647)} */ protected java.math.BigDecimal _decimalDigitSum; // =================================================================================== // DB Meta // ======= /** {@inheritDoc} */ public DBMeta asDBMeta() { return org.docksidestage.dockside.dbflute.bsentity.customize.dbmeta.VendorNumericDecimalSumDbm.getInstance(); } /** {@inheritDoc} */ public String asTableDbName() { return "VendorNumericDecimalSum"; } // =================================================================================== // Key Handling // ============ /** {@inheritDoc} */ public boolean hasPrimaryKeyValue() { return false; } // =================================================================================== // Foreign Property // ================ // =================================================================================== // Referrer Property // ================= protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import return new ArrayList<ELEMENT>(); } // =================================================================================== // Basic Override // ============== @Override protected boolean doEquals(Object obj) { if (obj instanceof BsVendorNumericDecimalSum) { BsVendorNumericDecimalSum other = (BsVendorNumericDecimalSum)obj; if (!xSV(_decimalDigitSum, other._decimalDigitSum)) { return false; } return true; } else { return false; } } @Override protected int doHashCode(int initial) { int hs = initial; hs = xCH(hs, asTableDbName()); hs = xCH(hs, _decimalDigitSum); return hs; } @Override protected String doBuildStringWithRelation(String li) { return ""; } @Override protected String doBuildColumnString(String dm) { StringBuilder sb = new StringBuilder(); sb.append(dm).append(xfND(_decimalDigitSum)); if (sb.length() > dm.length()) { sb.delete(0, dm.length()); } sb.insert(0, "{").append("}"); return sb.toString(); } @Override protected String doBuildRelationString(String dm) { return ""; } @Override public VendorNumericDecimalSum clone() { return (VendorNumericDecimalSum)super.clone(); } // =================================================================================== // Accessor // ======== /** * [get] DECIMAL_DIGIT_SUM: {DECIMAL(2147483647, 2147483647)} <br> * @return The value of the column 'DECIMAL_DIGIT_SUM'. (NullAllowed even if selected: for no constraint) */ public java.math.BigDecimal getDecimalDigitSum() { checkSpecifiedProperty("decimalDigitSum"); return _decimalDigitSum; } /** * [set] DECIMAL_DIGIT_SUM: {DECIMAL(2147483647, 2147483647)} <br> * @param decimalDigitSum The value of the column 'DECIMAL_DIGIT_SUM'. (NullAllowed: null update allowed for no constraint) */ public void setDecimalDigitSum(java.math.BigDecimal decimalDigitSum) { registerModifiedProperty("decimalDigitSum"); _decimalDigitSum = decimalDigitSum; } }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
75d2d2e48f87337c097f991cfa198d4bb3157c11
e60866a9d4ef7e7494a9adf57ad948775f50a724
/src/com/bvan/oop/lesson7/wrapper/IntegerPool.java
2e4efcb55d77e422e8923e560ead763063f5d9cc
[]
no_license
bohdanvan/javaoop-group69
c157235733542a57a5d7baf87958b205a3ad702c
b9289c7e67a732f38737414309ecec727c221e3f
refs/heads/master
2021-09-05T10:11:50.585505
2018-01-26T09:23:04
2018-01-26T09:23:04
112,673,348
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.bvan.oop.lesson7.wrapper; /** * @author bvanchuhov */ public class IntegerPool { public static void main(String[] args) { Integer x1 = 100; Integer x2 = 100; Integer y1 = 200; Integer y2 = 200; System.out.println(x1 == x2); // true System.out.println(y1 == y2); // false } }
[ "bodya.van@gmail.com" ]
bodya.van@gmail.com
b793feef933d825c02477163311c8a638a862bb1
a7766ffe524fbb8fc98426e0a70b3f9ed04a318c
/gwt/src/main/java/org/openmetromaps/maps/gwt/client/DemoEntryPoint.java
a1c20ddccb878e2b57d67420d61e22c3afb66cc3
[]
no_license
OpenMetroMaps/OpenMetroMaps
f1b295f000a207ddd385e537caa49595c4bb5e76
7e15580aa11ff05e39d5167a9b534372b527159c
refs/heads/master
2022-05-15T23:16:41.294589
2022-04-06T06:44:26
2022-04-06T06:44:26
102,582,351
47
3
null
null
null
null
UTF-8
Java
false
false
4,464
java
// Copyright 2017 Sebastian Kuerten // // This file is part of OpenMetroMaps. // // OpenMetroMaps is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // OpenMetroMaps is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with OpenMetroMaps. If not, see <http://www.gnu.org/licenses/>. package org.openmetromaps.maps.gwt.client; import java.util.Map; import org.openmetromaps.maps.MapModel; import org.openmetromaps.maps.MapView; import org.openmetromaps.maps.gwt.ResizingAbsolutePanel; import org.openmetromaps.maps.gwt.ScrollableAdvancedPlanPanel; import org.openmetromaps.maps.gwt.StyleUtil; import org.openmetromaps.maps.gwt.Util; import org.openmetromaps.maps.xml.XmlModel; import org.openmetromaps.maps.xml.XmlModelConverter; import org.openmetromaps.maps.xml.XmlModelReader; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.DockLayoutPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.xml.client.Document; import com.google.gwt.xml.client.XMLParser; import de.topobyte.xml.domabstraction.gwtimpl.GwtDocument; import de.topobyte.xml.domabstraction.iface.ParsingException; public class DemoEntryPoint implements EntryPoint { private ScrollableAdvancedPlanPanel panel; private Label status; protected void setParameters(Map<String, String> params) { panel.setDebugSize(Util.getBoolean(params, "debug-size", false)); } protected void setModel(MapModel mapModel) { panel.setModel(mapModel); } @Override public void onModuleLoad() { RootPanel root = RootPanel.get("gwt"); ResizingAbsolutePanel main = new ResizingAbsolutePanel(); root.add(main); StyleUtil.absolute(main, 0, 0, 0, 0, Unit.PX); // This is required because RootPanel does not implement ProvidesResize Window.addResizeHandler(e -> main.onResize()); DockLayoutPanel dock = new DockLayoutPanel(Unit.EM); StyleUtil.absolute(dock, 0, 0, 0, 0, Unit.PX); main.add(dock); status = new Label("Initializing..."); panel = new ScrollableAdvancedPlanPanel(); dock.add(panel); addButtons(main); Map<String, String> params = Util.loadParameters("parameters"); setParameters(params); String filename = params.get("file"); Util.load(filename, xml -> parseXml(xml)); } private void addButtons(AbsolutePanel main) { VerticalPanel buttons = new VerticalPanel(); StyleUtil.absoluteTopRight(buttons, 1, 1, Unit.EM); main.add(buttons); Button buttonIn = new Button("+"); StyleUtil.setHeight(buttonIn, 3, Unit.EM); StyleUtil.setWidth(buttonIn, 100, Unit.PCT); StyleUtil.setProperty(buttonIn, "minWidth", 3, Unit.EM); buttons.add(buttonIn); Button buttonOut = new Button("-"); StyleUtil.setHeight(buttonOut, 3, Unit.EM); StyleUtil.setWidth(buttonOut, 100, Unit.PCT); StyleUtil.setProperty(buttonOut, "minWidth", 3, Unit.EM); buttons.add(buttonOut); StyleUtil.marginTop(buttonOut, 0.5, Unit.EM); buttonIn.addClickHandler(e -> { zoomIn(); }); buttonOut.addClickHandler(e -> { zoomOut(); }); } protected void zoomIn() { panel.setZoom(panel.getZoom() * 1.1); } protected void zoomOut() { panel.setZoom(panel.getZoom() / 1.1); } protected void parseXml(String xml) { Document doc = XMLParser.parse(xml); GwtDocument gwtDoc = new GwtDocument(doc); try { XmlModel xmlModel = XmlModelReader.read(gwtDoc); status.setText("stations: " + xmlModel.getStations().size()); MapModel mapModel = new XmlModelConverter().convert(xmlModel); MapView view = mapModel.getViews().get(0); String name = view.getName(); status.setText("view: " + name); setModel(mapModel); panel.render(); } catch (ParsingException e) { Window.alert("error while parsing document"); } } }
[ "sebastian@topobyte.de" ]
sebastian@topobyte.de
169c953ac3180fd7afaed90f31db7ea7a2e4e428
4d41728f620d6be9916b3c8446da9e01da93fa4c
/src/main/java/org/bukkit/material/Door.java
a60a105fc387e100d4c15cb5e291503111c1c470
[]
no_license
TechCatOther/um_bukkit
a634f6ccf7142b2103a528bba1c82843c0bc4e44
836ed7a890b2cb04cd7847eff2c59d7a2f6d4d7b
refs/heads/master
2020-03-22T03:13:57.898936
2018-07-02T09:20:00
2018-07-02T09:20:00
139,420,415
3
2
null
null
null
null
UTF-8
Java
false
false
2,948
java
package org.bukkit.material; import org.bukkit.Material; import org.bukkit.block.BlockFace; /** * Represents a door. * * @deprecated No longer functions. Do not use. */ @Deprecated public class Door extends MaterialData implements Directional, Openable { public Door() { super(Material.WOODEN_DOOR); } /** * @deprecated Magic value */ @Deprecated public Door(final int type) { super(type); } public Door(final Material type) { super(type); } /** * @deprecated Magic value */ @Deprecated public Door(final int type, final byte data) { super(type, data); } /** * @deprecated Magic value */ @Deprecated public Door(final Material type, final byte data) { super(type, data); } /** * @deprecated Does not work (correctly) anymore */ @Deprecated public boolean isOpen() { return ((getData() & 0x4) == 0x4); } /** * @deprecated Does not work (correctly) anymore */ @Deprecated public void setOpen(boolean isOpen) { setData((byte) (isOpen ? (getData() | 0x4) : (getData() & ~0x4))); } /** * @return whether this is the top half of the door */ public boolean isTopHalf() { return ((getData() & 0x8) == 0x8); } /** * Configure this part of the door to be either the top or the bottom half * * @param isTopHalf True to make it the top half. * @deprecated Shouldn't be used anymore */ @Deprecated public void setTopHalf(boolean isTopHalf) { setData((byte) (isTopHalf ? (getData() | 0x8) : (getData() & ~0x8))); } /** * @return BlockFace.SELF * @deprecated Does not work (correctly) anymore */ @Deprecated public BlockFace getHingeCorner() { byte d = getData(); if((d & 0x3) == 0x3) { return BlockFace.NORTH_WEST; } else if((d & 0x1) == 0x1) { return BlockFace.SOUTH_EAST; } else if((d & 0x2) == 0x2) { return BlockFace.SOUTH_WEST; } return BlockFace.NORTH_EAST; } @Override public String toString() { return (isTopHalf() ? "TOP" : "BOTTOM") + " half of " + super.toString(); } /** * Set the direction that this door should is facing. * * @param face the direction * @deprecated Does not work (correctly) anymore */ @Deprecated public void setFacingDirection(BlockFace face) { byte data = (byte) (getData() & 0x12); switch(face) { case NORTH: data |= 0x1; break; case EAST: data |= 0x2; break; case SOUTH: data |= 0x3; break; } setData(data); } /** * Get the direction that this door is facing. * * @return the direction * @deprecated Does not work (correctly) anymore */ @Deprecated public BlockFace getFacing() { byte data = (byte) (getData() & 0x3); switch(data) { case 0: return BlockFace.WEST; case 1: return BlockFace.NORTH; case 2: return BlockFace.EAST; case 3: return BlockFace.SOUTH; } return null; // shouldn't happen } @Override public Door clone() { return (Door) super.clone(); } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
52a44fdc846bcf4431c140458f3225006f85c335
abf3700fe9a279472cd2af25ff83db6f9afdc019
/src/main/java/com/zc/hashtable/FourSumCount454.java
d345f37895baeff8f27b21faf0c1c95b6d5b00fb
[]
no_license
zhangchao6018/LeetCode-solution
10e1401b1c20faffc5fbf29032dcbbf1829f28e8
cdfb8c3b49af8682faac4fc4bde5ed191ff6b803
refs/heads/master
2021-04-01T08:39:40.656245
2020-10-20T16:31:32
2020-10-20T16:31:32
248,174,299
2
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
package com.zc.hashtable; import java.util.HashMap; import java.util.Map; /** * 描述: *给定四个包含整数的数组列表 A , B , C , D ,计算有多少个元组 (i, j, k, l) ,使得 A[i] + B[j] + C[k] + D[l] = 0。 * * 为了使问题简单化,所有的 A, B, C, D 具有相同的长度 N,且 0 ≤ N ≤ 500 。所有整数的范围在 -228 到 228 - 1 之间,最终结果不会超过 231 - 1 。 * * 例如: * * 输入: * A = [ 1, 2] * B = [-2,-1] * C = [-1, 2] * D = [ 0, 2] * * 输出: * 2 * * 解释: * 两个元组如下: * 1. (0, 0, 0, 1) -> A[0] + B[0] + C[0] + D[1] = 1 + (-2) + (-1) + 2 = 0 * 2. (1, 1, 0, 0) -> A[1] + B[1] + C[0] + D[0] = 2 + (-1) + (-1) + 0 = 0 * * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/4sum-ii * 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 * * 49 * @Author: zhangchao **/ public class FourSumCount454 { //思路 Map保存前两个数组两元素的和,以及其组合的次数 ((a+b),count) //后两个数组两元素的和满足条件的结果:0-(a+b) = c+d // 时间复杂度: O(n^2) // 空间复杂度: O(n^2) public int fourSumCount(int[] A, int[] B, int[] C, int[] D) { Map<Integer,Integer> map = new HashMap<>(); for (int a : A) { for (int b : B) { if (!map.containsKey(a+b)){ map.put(a+b,1); }else{ map.put(a+b,map.get(a+b)+1); } } } int res = 0; for (int c : C) { for (int d : D) { if (map.containsKey(-(c+d))){ res+=map.get(-(c+d)); } } } return res; } public static void main(String[] args) { int [] A = {1,2}; int [] B = {-2,-1}; int [] C = {-1,2}; int [] D = {0,2}; System.out.println(new FourSumCount454().fourSumCount(A, B, C, D)); } }
[ "18910146715@163.com" ]
18910146715@163.com
bc03320a012daa91f49e2568f4459e17fdc7e581
4b2b6fe260ba39f684f496992513cb8bc07dfcbc
/com/planet_ink/coffee_mud/Locales/IndoorShallowWater.java
a6f9e2110c835030b6831572cfe5fc469860c15f
[ "Apache-2.0" ]
permissive
vjanmey/EpicMudfia
ceb26feeac6f5b3eb48670f81ea43d8648314851
63c65489c673f4f8337484ea2e6ebfc11a09364c
refs/heads/master
2021-01-18T20:12:08.160733
2014-06-22T04:38:14
2014-06-22T04:38:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,896
java
package com.planet_ink.coffee_mud.Locales; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2000-2014 Bo Zimmerman 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. */ @SuppressWarnings("unchecked") public class IndoorShallowWater extends ShallowWater implements Drink { @Override public String ID(){return "IndoorShallowWater";} public IndoorShallowWater() { super(); name="the water"; recoverPhyStats(); climask=Places.CLIMASK_WET; } @Override public int domainType(){return Room.DOMAIN_INDOORS_WATERSURFACE;} @Override protected int baseThirst(){return 0;} @Override public List<Integer> resourceChoices(){return CaveRoom.roomResources;} }
[ "vjanmey@gmail.com" ]
vjanmey@gmail.com
3db0ca63703fd942df8ae0172f93262c84a509e1
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-resteasy-eap/generated/src/gen/java/org/openapitools/model/OrgApacheFelixWebconsolePluginsEventInternalPluginServletProperties.java
126ebd488e675b12f7425e85af16d31316cb4dce
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
2,109
java
package org.openapitools.model; import java.util.Objects; import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.ConfigNodePropertyInteger; import javax.validation.constraints.*; import io.swagger.annotations.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen", date = "2019-08-05T01:00:05.540Z[GMT]") public class OrgApacheFelixWebconsolePluginsEventInternalPluginServletProperties { private ConfigNodePropertyInteger maxSize = null; /** **/ @ApiModelProperty(value = "") @JsonProperty("max.size") public ConfigNodePropertyInteger getMaxSize() { return maxSize; } public void setMaxSize(ConfigNodePropertyInteger maxSize) { this.maxSize = maxSize; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrgApacheFelixWebconsolePluginsEventInternalPluginServletProperties orgApacheFelixWebconsolePluginsEventInternalPluginServletProperties = (OrgApacheFelixWebconsolePluginsEventInternalPluginServletProperties) o; return Objects.equals(maxSize, orgApacheFelixWebconsolePluginsEventInternalPluginServletProperties.maxSize); } @Override public int hashCode() { return Objects.hash(maxSize); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrgApacheFelixWebconsolePluginsEventInternalPluginServletProperties {\n"); sb.append(" maxSize: ").append(toIndentedString(maxSize)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
8a7754cd262c077cb2300a2a9d03deb4f298a924
837c3c323dcfe706dc9cb95c13d8622b0c705bd4
/app/src/main/java/florent37/github/com/mam/ui/versions/recycler/VersionsHeaderViewHolder.java
de450057ca24486483a260346b5b7cb205db24c7
[ "Apache-2.0" ]
permissive
florent37/OpenMam-Android
b82512a5ffaa39b2196b4cc15de85fed4d8ad330
adb5432d316e78e9457de26209aba47946a0fa8a
refs/heads/master
2021-01-01T15:43:54.653006
2017-08-11T12:45:07
2017-08-11T12:45:07
97,689,169
1
1
null
null
null
null
UTF-8
Java
false
false
1,142
java
package florent37.github.com.mam.ui.versions.recycler; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.ButterKnife; import florent37.github.com.mam.R; import florent37.github.com.mam.common.ClickListenerWrapper; /** * Created by florentchampigny on 20/06/2017. */ public class VersionsHeaderViewHolder extends RecyclerView.ViewHolder { public static RecyclerView.ViewHolder build(ViewGroup parent, ClickListenerWrapper<VersionsAdapter.ClickListener> clickListenerClickListenerWrapper) { return new VersionsHeaderViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.appversion_header_cell, parent, false), clickListenerClickListenerWrapper); } private ClickListenerWrapper<VersionsAdapter.ClickListener> clickListenerWrapper; public VersionsHeaderViewHolder(View itemView, ClickListenerWrapper<VersionsAdapter.ClickListener> clickListenerWrapper) { super(itemView); ButterKnife.bind(this, itemView); this.clickListenerWrapper = clickListenerWrapper; } }
[ "florent.champigny@backelite.com" ]
florent.champigny@backelite.com
95d46a8e5e4bdd1133203effe4bf110897816e5b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project63/src/main/java/org/gradle/test/performance63_5/Production63_435.java
c4b32ab897b3fd4343f4db7901bf8a96f782e4e0
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance63_5; public class Production63_435 extends org.gradle.test.performance15_5.Production15_435 { private final String property; public Production63_435() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ed638f4021b984911a7bad8f23a5d4973f4b5383
5728f50a394b62394587b0b255a57dcf4d13d20d
/src/java/org/jsimpledb/core/FileType.java
c1cf1159d2bc305f308b0c272c0a42f82ac40404
[ "Apache-2.0" ]
permissive
mayoricodevault/jsimpledb
3d905744c7a5e55c1fe530dd6d91c99c4c730f1e
9ee8301a6cda92a2d85ec1b0d94cfde6a78e5e38
refs/heads/master
2021-06-13T06:30:51.209136
2015-05-08T15:56:55
2015-05-08T15:56:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
/* * Copyright (C) 2014 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.jsimpledb.core; import com.google.common.base.Converter; import java.io.File; /** * {@link File} type. Null values are supported by this class. */ class FileType extends StringEncodedType<File> { FileType() { super(File.class, 0, new Converter<File, String>() { @Override protected String doForward(File file) { if (file == null) return null; return file.toString(); } @Override protected File doBackward(String string) { if (string == null) return null; return new File(string); } }); } }
[ "archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f" ]
archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f
e9ef3c83b13bdd32bbc9abab133bd00ac716338f
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
/Talagram/com/google/android/gms/measurement/internal/zzcc.java
10584ad00126b38aa1166223f9c3f4a2c64e7267
[]
no_license
danielperez9430/Third-party-Telegram-Apps-Spy
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
refs/heads/master
2020-04-11T23:26:06.025903
2018-12-18T10:07:20
2018-12-18T10:07:20
162,166,647
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package com.google.android.gms.measurement.internal; import java.util.concurrent.Callable; final class zzcc implements Callable { zzcc(zzbv arg1, String arg2, String arg3, String arg4) { this.zzaqo = arg1; this.zzaqq = arg2; this.zzaeh = arg3; this.zzaeo = arg4; super(); } public final Object call() { zzbv.zza(this.zzaqo).zzly(); return zzbv.zza(this.zzaqo).zzjq().zzb(this.zzaqq, this.zzaeh, this.zzaeo); } }
[ "dpefe@hotmail.es" ]
dpefe@hotmail.es
9ba9be3d85e5e28852a406371d3275019247e3bf
cc28075c28a05af4a45d712d246a8983ed38786e
/com/sun/corba/se/PortableActivationIDL/ServerManagerOperations.java
52cc64519f43ac2cf58a8d573d58af735cad51c4
[]
no_license
lionhuo/jdk8u202
cabfaa57f37f149649ccf329812cf5a1dc3ad207
f03d6563dd4655b0491fe2f58a6cc16505caacbf
refs/heads/master
2020-04-22T19:38:29.464485
2019-02-14T02:59:51
2019-02-14T02:59:51
170,614,337
0
0
null
null
null
null
UTF-8
Java
false
false
771
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/ServerManagerOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /HUDSON/workspace/8-2-build-linux-amd64/jdk8u202/12319/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Saturday, December 15, 2018 12:40:35 PM PST */ /** Interface used to combine the Activator and Locator when both are * implemented together in the same process, as is currently the case * for our implementation. */ public interface ServerManagerOperations extends com.sun.corba.se.PortableActivationIDL.ActivatorOperations, com.sun.corba.se.PortableActivationIDL.LocatorOperations { } // interface ServerManagerOperations
[ "200583820@qq.com" ]
200583820@qq.com
5809c2c000c6440ebccc3d1a49e5734f052d32df
9254e7279570ac8ef687c416a79bb472146e9b35
/vod-20170321/src/main/java/com/aliyun/vod20170321/models/DescribeVodVerifyContentResponse.java
9bf8c34886656451d7bbc4913d7d9f29516e454e
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.vod20170321.models; import com.aliyun.tea.*; public class DescribeVodVerifyContentResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public DescribeVodVerifyContentResponseBody body; public static DescribeVodVerifyContentResponse build(java.util.Map<String, ?> map) throws Exception { DescribeVodVerifyContentResponse self = new DescribeVodVerifyContentResponse(); return TeaModel.build(map, self); } public DescribeVodVerifyContentResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public DescribeVodVerifyContentResponse setBody(DescribeVodVerifyContentResponseBody body) { this.body = body; return this; } public DescribeVodVerifyContentResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
72d084bda2093f3e2affebe3f173b140bad24594
ac42e48b636c722b3a61cf100730dcdab76c5189
/spring-boot-ConsumerLoans/src/main/java/com/slend/entity/validator/core/borrower/EmploymentTypeConstraintValidator.java
d7bedd291d9b24f96244e3f6def97f3e811a5963
[]
no_license
pulkitSL/TestProjects
25ef2136ced6ef156d2fd0d51b84d5e6f841933f
481d15f4036387ccf8f0e1189430583716bb7912
refs/heads/master
2020-12-02T07:58:07.409116
2017-07-10T08:30:43
2017-07-10T08:30:43
96,754,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,119
java
package com.slend.entity.validator.core.borrower; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import org.springframework.stereotype.Component; import com.slend.entity.core.borrower.EmploymentType; @Component public class EmploymentTypeConstraintValidator implements ConstraintValidator<CheckEmploymentType, EmploymentType> { @Override public void initialize(CheckEmploymentType arg0) { // TODO Auto-generated method stub } @Override public boolean isValid(EmploymentType employmentType, ConstraintValidatorContext validator) { System.out.println("*********************"); System.out.println(employmentType.toString()); System.out.println(employmentType); System.out.println("*********************"); if (employmentType.toString().equals(EmploymentType.SALARIED.toString()) || employmentType.toString().equals(EmploymentType.NON_SALARIED.toString())) return true; return false; /* * if (employmentType.toString() == (EmploymentType.SALARIED) || * employmentType == (EmploymentType.NON_SALARIED)) { return true; } */ } }
[ "you@example.com" ]
you@example.com
7efbd799f2cf393fd6cfe3804d921679e14441ee
f6c8c56969ea1be7dab4a99e1a3d5be6a9af697d
/L2JHellasC/java/com/l2jhellas/gameserver/handlers/itemhandlers/CompSpiritShotPacks.java
c8799754bee59cde153199088b5d5ed2d999e4f7
[]
no_license
AwakeNz/L2jHellas
25302349704c603122b6e49649d3fff3e83af899
d006d9be7312d926d4ffde4fed8d45d9728ebf0a
refs/heads/master
2021-06-21T15:09:51.344214
2017-08-16T15:39:58
2017-08-16T15:39:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,386
java
/* * This program 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 3 of the License, or (at your option) any later * version. * * This program 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 * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jhellas.gameserver.handlers.itemhandlers; import com.l2jhellas.gameserver.handler.IItemHandler; import com.l2jhellas.gameserver.model.L2ItemInstance; import com.l2jhellas.gameserver.model.actor.L2Playable; import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance; import com.l2jhellas.gameserver.network.SystemMessageId; import com.l2jhellas.gameserver.network.serverpackets.ItemList; import com.l2jhellas.gameserver.network.serverpackets.SystemMessage; public class CompSpiritShotPacks implements IItemHandler { private static final int[] ITEM_IDS = { 5140, 5141, 5142, 5143, 5144, 5145, 5256, 5257, 5258, 5259, 5260, 5261 }; @Override public void useItem(L2Playable playable, L2ItemInstance item) { if (!(playable instanceof L2PcInstance)) return; L2PcInstance activeChar = (L2PcInstance) playable; int itemId = item.getItemId(); int itemToCreateId; int amount; if (itemId < 5200) { // Normal Compressed Package of SpiritShots itemToCreateId = itemId - 2631; // Gives id of matching item for this pack amount = 300; } else { // Greater Compressed Package of Spirithots itemToCreateId = itemId - 2747; // Gives id of matching item for this pack amount = 1000; } activeChar.getInventory().destroyItem("Extract", item, activeChar, null); activeChar.getInventory().addItem("Extract", itemToCreateId, amount, activeChar, item); SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S); sm.addItemName(itemToCreateId); sm.addNumber(amount); activeChar.sendPacket(sm); ItemList playerUI = new ItemList(activeChar, false); activeChar.sendPacket(playerUI); } @Override public int[] getItemIds() { return ITEM_IDS; } }
[ "=" ]
=
ac7deee5a13731464368bd8b059bceef2246c018
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/hwfrd_frd2dl02.java
7f713cff50cce0abd558992f6573c5900d3d757f
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
212
java
// This file is automatically generated. package adila.db; /* * Huawei FRD-L02 * * DEVICE: HWFRD * MODEL: FRD-L02 */ final class hwfrd_frd2dl02 { public static final String DATA = "Huawei|FRD-L02|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
d925165ecfcb11d57f9ef86793e184ec9de2307d
67cbc9c5125df76324d78624e2281cb1fefc8a12
/application/src/main/java/org/mifos/framework/components/batchjobs/helpers/LoanArrearsAgingTask.java
04a2e7fdc85a3cddda13134602b7226757a1f8d1
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.5.x
86e785c062cb14be4597b33d15c38670c176120e
5734370912c47973de3889db21debb3ff7f0f6db
refs/heads/master
2023-08-28T09:48:46.266018
2010-07-12T04:43:46
2010-07-12T04:43:46
2,946,757
2
2
null
null
null
null
UTF-8
Java
false
false
1,109
java
/* * Copyright (c) 2005-2010 Grameen Foundation USA * 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. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.framework.components.batchjobs.helpers; import org.mifos.framework.components.batchjobs.MifosTask; import org.mifos.framework.components.batchjobs.TaskHelper; public class LoanArrearsAgingTask extends MifosTask { @Override public TaskHelper getTaskHelper() { return new LoanArrearsAgingHelper(this); } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
64fdc0a91ec0ea8b43684c251f12749f9ae6ed0f
39e32f672b6ef972ebf36adcb6a0ca899f49a094
/dcm4che14/tags/DCM4JBOSS_2_3/src/java/org/dcm4cheri/server/SyslogHandlerImpl.java
7e8ec0f6c80c2fa5c5015d20365d5c685dd152b0
[ "Apache-2.0" ]
permissive
medicayun/medicayundicom
6a5812254e1baf88ad3786d1b4cf544821d4ca0b
47827007f2b3e424a1c47863bcf7d4781e15e814
refs/heads/master
2021-01-23T11:20:41.530293
2017-06-05T03:11:47
2017-06-05T03:11:47
93,123,541
0
2
null
null
null
null
UTF-8
Java
false
false
2,656
java
/***************************************************************************** * * * Copyright (c) 2002 by TIANI MEDGRAPH AG * * * * This file is part of dcm4che. * * * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * *****************************************************************************/ package org.dcm4cheri.server; import java.net.DatagramPacket; import org.dcm4che.server.SyslogService; import org.dcm4che.server.UDPServer; /** * <description> * * @see <related> * @author <a href="mailto:{email}">{full name}</a>. * @author <a href="mailto:gunter@tiani.com">Gunter Zeilinger</a> * @version $Revision: 3656 $ $Date: 2003-06-10 01:17:51 +0800 (周二, 10 6月 2003) $ * */ public class SyslogHandlerImpl implements UDPServer.Handler { private final SyslogService service; public SyslogHandlerImpl(SyslogService service) { this.service = service; } public final void handle(DatagramPacket datagram) { byte[] buff = datagram.getData(); try { SyslogMsg msg = new SyslogMsg(buff,datagram.getLength()); service.process(msg.getTimestamp(), msg.getHost(), msg.getContent()); } catch (SyslogMsg.InvalidSyslogMsgException e) { e.printStackTrace(); } } }
[ "liliang_lz@icloud.com" ]
liliang_lz@icloud.com
9281d886e74cf7c035c20ab8baa67ffc2c94c815
d75c6c8877c83b8681dcac7401cdb49bd3d22218
/src/main/java/com/fpt/intern/bestcv/entity/DetailRegisterVip.java
daa312c65c4439e38be3f7e1a95629a1f6310e66
[]
no_license
ChanhDai2702/aaa
01ff3850a5b663d90fd498675bf608db8b2c347a
a0c9b79f042de93a90ea58680bafb0ffa6b60a27
refs/heads/master
2023-05-12T08:10:43.395736
2021-06-04T17:18:31
2021-06-04T17:18:31
373,912,247
0
0
null
null
null
null
UTF-8
Java
false
false
2,156
java
package com.fpt.intern.bestcv.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.springframework.data.annotation.CreatedDate; import com.fpt.intern.bestcv.entity.pk.DetailRegisterVip_PK; @Entity @Table(name = "DetailRegisterVip") @IdClass(DetailRegisterVip_PK.class) public class DetailRegisterVip { @Id @ManyToOne @JoinColumn(name = "RecruiterId", nullable = false) private Recruiter recruiter; @Id @ManyToOne @JoinColumn(name = "VipPackageId", nullable = false) private VipPackage vipPackage; @CreatedDate @Temporal(TemporalType.TIMESTAMP) @Column(name = "RegisterDate", updatable = false, nullable = false) @Id private Date registerDate; @Column(name = "ExpirationDate", nullable = false) @Temporal(TemporalType.TIMESTAMP) private Date expirationDate; public DetailRegisterVip(Recruiter recruiter, VipPackage vipPackage, Date registerDate, Date expirationDate) { super(); this.recruiter = recruiter; this.vipPackage = vipPackage; this.registerDate = registerDate; this.expirationDate = expirationDate; } public Recruiter getRecruiter() { return recruiter; } public void setRecruiter(Recruiter recruiter) { this.recruiter = recruiter; } public VipPackage getVipPackage() { return vipPackage; } public void setVipPackage(VipPackage vipPackage) { this.vipPackage = vipPackage; } public Date getRegisterDate() { return registerDate; } public void setRegisterDate(Date registerDate) { this.registerDate = registerDate; } public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } @Override public String toString() { return "DetailRegisterVip [recruiter=" + recruiter + ", vipPackage=" + vipPackage + ", registerDate=" + registerDate + ", expirationDate=" + expirationDate + "]"; } }
[ "daiviet1023@gmail.com" ]
daiviet1023@gmail.com
823b7d04e0bd61c9e2631f36deb83ac06ce3aa80
135bec354622330ea6bcf637ef52c7363fb97467
/src/SubjectHeadings/Arrays/CommonArray/FindAverage.java
8807547b5e35fde74ff7c91c8e5a337c2967823a
[]
no_license
Orlando-Houston/Java
1b057b2e6447ba79e2173462139c6714c6743b4c
b6ccbf6c05d9cbec9580875be7c5edd6e42f0de9
refs/heads/master
2020-08-31T09:12:40.047696
2020-06-23T22:44:04
2020-06-23T22:44:04
238,321,900
2
0
null
null
null
null
UTF-8
Java
false
false
850
java
package SubjectHeadings.Arrays.CommonArray; import java.util.Scanner; public class FindAverage { public static void main(String[] args) { System.out.println("How many numbers you want to enter?"); Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); /* Declaring array of n elements, the value * of n is provided by the user */ double[] arr = new double[n]; double total = 0; for(int i=0; i<arr.length; i++){ System.out.print("Enter Element No."+(i+1)+": "); arr[i] = scanner.nextDouble(); } scanner.close(); for(int i=0; i<arr.length; i++){ total = total + arr[i]; } double average = total / arr.length; System.out.format("The average is: %.3f", average); } }
[ "a.ozder@outlook.com" ]
a.ozder@outlook.com
3aa3969237fbddf039ae5230c73fd1a1820b91e0
8df418334d56ed08e8c59a65a8f563893a555b95
/_05_StackAndQueuesLab/_07_PalindromeChecker.java
20d849afae58661b748cd3313d590664aec05b17
[]
no_license
Andrey-V-Georgiev/Java_Advanced
b8e0151ef28ed38cac9af609253f76121283f3bd
fb87ba0f753345efa2630a071579cf83749df595
refs/heads/master
2021-05-06T11:49:17.652376
2017-12-14T18:22:10
2017-12-14T18:22:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
731
java
package _05_StackAndQueuesLab; import java.util.ArrayDeque; import java.util.Scanner; public class _07_PalindromeChecker { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String input = scanner.nextLine(); ArrayDeque<Character> queue = new ArrayDeque<>(); for (Character c : input.toCharArray()) { queue.offer(c); } boolean isPalindrome = true; while(queue.size() > 1){ char first = queue.pollLast(); char last = queue.poll(); if(first != last){ isPalindrome=false; break; } } System.out.println(isPalindrome); } }
[ "andrey.v.georgiev@gmail.com" ]
andrey.v.georgiev@gmail.com
077539f5f0045d95c8852e21767f1d8e5b1778ce
7c096d0348758a53734ff14a1a3960f8146dda62
/plugins/anatlyzer.testing.modelgen/src/anatlyzer/testing/modelgen/IModelGenerator.java
b9fb17aefc96caff557411338dd965a1c18e3cfe
[]
no_license
jdelara/MDETesting
21c8212aa2ffe98f4875d0065e601c079824b50b
3d8580508e0546540f96ad778636d597e587f158
refs/heads/master
2022-04-03T18:55:30.644858
2020-02-16T08:17:28
2020-02-16T08:17:28
114,287,941
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package anatlyzer.testing.modelgen; import java.util.List; import anatlyzer.testing.common.IProgressMonitor; /** * Represents a mechanism to generate models for a metamodel. * * @author jesus * */ public interface IModelGenerator { List<IGeneratedModelReference> generateModels(IProgressMonitor monitor); }
[ "jesus.sanchez.cuadrado@gmail.com" ]
jesus.sanchez.cuadrado@gmail.com
f48ada842a3f4d753b298c27c374dae76511cce0
92ddaa7be28d366b0a5fae96bae8d1b47b1091c6
/app/src/main/java/com/my/instantmessag/mydb/PersonInfo.java
0295f94999424eccb373f8a107ad9fc70c35130a
[]
no_license
dearHaoGeGe/Instantmessag
a6a95e84896134d9155f0b1f6090392b42d193f7
22727786801f507e7aae57bd0e4fff3fe89b99bb
refs/heads/master
2021-01-01T05:19:01.451748
2016-05-09T01:05:41
2016-05-09T01:05:41
58,315,765
1
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.my.instantmessag.mydb; /** * Created by dllo onDetailClick 16/3/7. */ public interface PersonInfo { String NICK_NAME = "nick_name"; String SEX="sex"; String HEAD_IMG ="head_img"; String USER="user_name"; String PERSON_TABLE_NAME ="User"; String COVER_IMG="cover_img"; }
[ "862157904@qq.com" ]
862157904@qq.com
08932366f8c90b313b2b4ed97905c20509a5da67
25c5d243ffac4b4f4f9efcd6a28cb41d51b23c90
/src/test/java/org/apache/sysds/test/functions/recompile/RandRecompileTest.java
3f41432b01b480929937cb6985605aaf4f5c6f57
[ "Apache-2.0" ]
permissive
apache/systemds
5351e8dd9aa842b693e8c148cf3be151697f07a7
73555e932a516063c860f5d05c84e6523cc7619b
refs/heads/main
2023-08-31T03:46:03.010474
2023-08-30T18:25:59
2023-08-30T18:34:41
45,896,813
194
167
Apache-2.0
2023-09-13T08:43:37
2015-11-10T08:00:06
Java
UTF-8
Java
false
false
5,346
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.sysds.test.functions.recompile; import org.junit.Assert; import org.junit.Test; import org.apache.sysds.conf.CompilerConfig; import org.apache.sysds.hops.OptimizerUtils; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.utils.Statistics; public class RandRecompileTest extends AutomatedTestBase { private final static String TEST_NAME1 = "rand_recompile"; //scalar values, IPA irrelevant private final static String TEST_NAME2 = "rand_recompile2"; //nrow private final static String TEST_NAME3 = "rand_recompile3"; //ncol private final static String TEST_DIR = "functions/recompile/"; private final static String TEST_CLASS_DIR = TEST_DIR + RandRecompileTest.class.getSimpleName() + "/"; private final static int rows = 200; private final static int cols = 200; @Override public void setUp() { addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[]{} )); addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[]{} )); addTestConfiguration(TEST_NAME3, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME3, new String[]{} )); } @Test public void testRandScalarWithoutRecompile() { runRandTest(TEST_NAME1, false, false); } @Test public void testRandScalarWithRecompile() { runRandTest(TEST_NAME1, true, false); } @Test public void testRandNRowWithoutRecompileWithoutIPA() { runRandTest(TEST_NAME2, false, false); } @Test public void testRandNRowWithRecompileWithoutIPA() { runRandTest(TEST_NAME2, true, false); } @Test public void testRandNColWithoutRecompileWithoutIPA() { runRandTest(TEST_NAME3, false, false); } @Test public void testRandNColWithRecompileWithoutIPA() { runRandTest(TEST_NAME3, true, false); } @Test public void testRandNRowWithoutRecompileWithIPA() { runRandTest(TEST_NAME2, false, true); } @Test public void testRandNRowWithRecompileWithIPA() { runRandTest(TEST_NAME2, true, true); } @Test public void testRandNColWithoutRecompileWithIPA() { runRandTest(TEST_NAME3, false, true); } @Test public void testRandNColWithRecompileWithIPA() { runRandTest(TEST_NAME3, true, true); } private void runRandTest( String testName, boolean recompile, boolean IPA ) { boolean oldFlagRecompile = CompilerConfig.FLAG_DYN_RECOMPILE; boolean oldFlagIPA = OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS; boolean oldFlagRand1 = OptimizerUtils.ALLOW_RAND_JOB_RECOMPILE; boolean oldFlagRand2 = OptimizerUtils.ALLOW_BRANCH_REMOVAL; boolean oldFlagRand3 = OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION; try { TestConfiguration config = getTestConfiguration(testName); config.addVariable("rows", rows); config.addVariable("cols", cols); loadTestConfiguration(config); /* This is for running the junit test the new way, i.e., construct the arguments directly */ String HOME = SCRIPT_DIR + TEST_DIR; fullDMLScriptName = HOME + testName + ".dml"; programArgs = new String[]{"-args", Integer.toString(rows), Integer.toString(cols) }; CompilerConfig.FLAG_DYN_RECOMPILE = recompile; OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS = IPA; //disable rand specific recompile OptimizerUtils.ALLOW_RAND_JOB_RECOMPILE = false; OptimizerUtils.ALLOW_BRANCH_REMOVAL = false; OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION = false; boolean exceptionExpected = false; runTest(true, exceptionExpected, null, -1); //CHECK compiled MR jobs int expectNumCompiled = -1; if( IPA ) expectNumCompiled = 0; else expectNumCompiled = 2;//rand, GMR Assert.assertEquals("Unexpected number of compiled MR jobs.", expectNumCompiled, Statistics.getNoOfCompiledSPInst()); //CHECK executed MR jobs int expectNumExecuted = -1; if( recompile ) expectNumExecuted = 0; else if( IPA ) expectNumExecuted = 0; else expectNumExecuted = 2; //rand, GMR Assert.assertEquals("Unexpected number of executed MR jobs.", expectNumExecuted, Statistics.getNoOfExecutedSPInst()); } finally { CompilerConfig.FLAG_DYN_RECOMPILE = oldFlagRecompile; OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS = oldFlagIPA; OptimizerUtils.ALLOW_RAND_JOB_RECOMPILE = oldFlagRand1; OptimizerUtils.ALLOW_BRANCH_REMOVAL = oldFlagRand2; OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION = oldFlagRand3; } } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
2a313298ae633bfe96e3a3469b915c4e4bdd721d
7c2f5bdf6199ee25afafbc8bc2eb77541976d00e
/Game/src/main/java/io/riguron/game/listener/state/waiting/WaitingOnlineIndexer.java
93116f770a00548d323fe9bcd1047af1e072bb9e
[ "MIT" ]
permissive
Stijn-van-Nieulande/MinecraftNetwork
0995d2fad0f7e1150dff0394c2568d9e8f6d1dca
7ed43098a5ba7574e2fb19509e363c3cf124fc0b
refs/heads/master
2022-04-03T17:48:42.635003
2020-01-22T05:22:49
2020-01-22T05:22:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
614
java
package io.riguron.game.listener.state.waiting; import lombok.RequiredArgsConstructor; import io.riguron.bukkit.server.OnlineIndexer; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; @RequiredArgsConstructor public class WaitingOnlineIndexer extends WaitingStateListener { private final OnlineIndexer onlineIndexer; @EventHandler public void join(PlayerJoinEvent e) { onlineIndexer.increment(); } @EventHandler public void quit(PlayerQuitEvent e) { onlineIndexer.decrement(); } }
[ "25826296+riguron@users.noreply.github.com" ]
25826296+riguron@users.noreply.github.com
35e04c714bcf4efd5299a13010bb373252857c26
e5c37bb14e53f778784805d0b8b77bde5a78ae60
/rabbitTool-core/src/main/java/com/rabbit/core/date/DateException.java
0271577dd57a3e7bc1c8d3bb2f0b8eaad1794e5a
[]
no_license
RabbitWFly/RabbitTool
b603a404ca953608c27d9641ca5689bfe6dfb0ca
06d56c78c65a6c96e475c340c846e26ba7abbb72
refs/heads/master
2021-06-26T22:30:57.887738
2019-11-18T07:13:28
2019-11-18T07:13:28
153,452,205
0
0
null
2020-10-13T17:32:24
2018-10-17T12:21:27
Java
UTF-8
Java
false
false
803
java
package com.rabbit.core.date; import com.rabbit.core.exceptions.ExceptionUtil; import com.rabbit.core.util.StrUtil; /** * 工具类异常 * @author xiaoleilu */ public class DateException extends RuntimeException{ private static final long serialVersionUID = 8247610319171014183L; public DateException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } public DateException(String message) { super(message); } public DateException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } public DateException(String message, Throwable throwable) { super(message, throwable); } public DateException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } }
[ "chentao@daokoudai.com" ]
chentao@daokoudai.com
5a126b84969abc7b1d57cfee5d50654b9a06676a
33f7b7950db2398877157eea5651f7bb9497cef9
/backend/src/main/java/com/algamoney/api/security/AppUserDetailsService.java
d6d77896052f8e67d237f35e96db6bb8dbcb9d41
[]
no_license
marcelosoliveira/projeto-controle-financeiro
95ec03d0c2f805845e931c91c30228144e9b5044
202836ae725b45941378870fe0c19441b1785f1a
refs/heads/master
2023-09-04T05:29:57.520078
2021-10-24T14:37:46
2021-10-24T14:37:46
403,731,699
0
0
null
null
null
null
UTF-8
Java
false
false
1,490
java
package com.algamoney.api.security; import java.util.Collection; import java.util.HashSet; import java.util.Optional; import java.util.Set; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.algamoney.api.model.Usuario; import com.algamoney.api.repository.UsuarioRepository; import lombok.AllArgsConstructor; @Service @AllArgsConstructor public class AppUserDetailsService implements UserDetailsService { private UsuarioRepository usuarioRepository; @Override public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { Optional<Usuario> usuarioOptional = usuarioRepository.findByEmail(email); Usuario usuario = usuarioOptional.orElseThrow(() -> new UsernameNotFoundException("Usuario e/ou senha incorretos!")); return new UsuarioSistema(usuario, getPermissoes(usuario)); } private Collection<? extends GrantedAuthority> getPermissoes(Usuario usuario) { Set<SimpleGrantedAuthority> authorities = new HashSet<>(); usuario.getPermissao().forEach(permissao -> authorities.add( new SimpleGrantedAuthority(permissao.getDescricao().toUpperCase()))); return authorities; } }
[ "msbobsk8@gmail.com" ]
msbobsk8@gmail.com
a865e6ce5a1bcfac9ee444fc4b618dcfde7657d2
0e145ed1e8bd4339d32c9eb95f6add0ca116c60f
/java-checks/src/main/java/org/sonar/java/checks/RunFinalizersCheck.java
696e9260a0318ad06020b81fc72a719607fefdbb
[]
no_license
a1dutch/sonar-java
0b0715827d9759cb50d0807df1275093abe41444
2f549430f4cada94db37c8786d40e2e181efc821
refs/heads/master
2021-01-22T16:31:59.393867
2015-03-17T12:57:56
2015-03-18T07:20:41
14,811,086
0
0
null
null
null
null
UTF-8
Java
false
false
2,525
java
/* * SonarQube Java * Copyright (C) 2012 SonarSource * dev@sonar.codehaus.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ package org.sonar.java.checks; import com.google.common.collect.ImmutableList; import org.sonar.api.server.rule.RulesDefinition; import org.sonar.check.Priority; import org.sonar.check.Rule; import org.sonar.java.checks.methods.AbstractMethodDetection; import org.sonar.java.checks.methods.MethodInvocationMatcher; import org.sonar.java.model.expression.MethodInvocationTreeImpl; import org.sonar.plugins.java.api.tree.MethodInvocationTree; import org.sonar.squidbridge.annotations.ActivatedByDefault; import org.sonar.squidbridge.annotations.SqaleConstantRemediation; import org.sonar.squidbridge.annotations.SqaleSubCharacteristic; import java.util.List; @Rule( key = "S2151", name = "\"runFinalizersOnExit\" should not be called", tags = {"bug", "cert", "security"}, priority = Priority.BLOCKER) @ActivatedByDefault @SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.INSTRUCTION_RELIABILITY) @SqaleConstantRemediation("20min") public class RunFinalizersCheck extends AbstractMethodDetection { @Override protected List<MethodInvocationMatcher> getMethodInvocationMatchers() { return ImmutableList.<MethodInvocationMatcher>builder() .add(MethodInvocationMatcher.create().typeDefinition("java.lang.Runtime").name("runFinalizersOnExit").addParameter("boolean")) .add(MethodInvocationMatcher.create().typeDefinition("java.lang.System").name("runFinalizersOnExit").addParameter("boolean")) .build(); } @Override protected void onMethodFound(MethodInvocationTree mit) { MethodInvocationTreeImpl miti = (MethodInvocationTreeImpl) mit; addIssue(mit, "Remove this call to \"" + miti.getSymbol().owner().getName() + ".runFinalizersOnExit()\"."); } }
[ "nicolas.peru@sonarsource.com" ]
nicolas.peru@sonarsource.com
60091792769afdb06831aa9cbfd86bb7161d969e
7e3a5e9c48279f81edbfbd946ef7c0b124c5f218
/member_project/src/com/javateam/member/util/ExceptionMetadata.java
2eb1a5f99f089c93dbd1f86a1a92ca226aff0ee3
[]
no_license
qkralswl689/JSP
54602561bee819079adbe67e1dc6c218111270b1
f75ef97bf266984221166a87f4f3a1645f2c3140
refs/heads/main
2023-04-25T09:14:25.973367
2021-05-21T07:53:30
2021-05-21T07:53:30
348,972,863
0
0
null
null
null
null
UTF-8
Java
false
false
1,584
java
package com.javateam.member.util; import java.sql.Connection; import java.sql.SQLException; /** * 예외처리 유틸리티(Utility) * * @author javateam */ public class ExceptionMetadata { private StackTraceElement ste; // 예외처리 리플렉션(reflection) 정보객체 private String className; // 클래스명 private String methodName; // 메서드명 /** * @param ste 예외처리 리플렉션(reflection) 정보객체 */ public ExceptionMetadata(StackTraceElement ste) { this.ste = ste; this.className = ste.getClassName(); this.methodName = ste.getMethodName(); } public StackTraceElement getSte() { return ste; } public void setSte(StackTraceElement ste) { this.ste = ste; } public String getClassName() { return className; } public void setClassName(String className) { this.className = className; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } /** * 예외처리 메시지 출력 * * @param e 예외처리 * @param con DB 연결 객체 * @param isRollback rollback 여부 */ public void printErr(Exception e, Connection con, boolean isRollback) { String temp[] = className.split("\\."); System.out.print(temp[temp.length-1]+"."+methodName + " "); System.out.println(e.getClass().getName().split("\\.")[2]+ " :\n"); e.printStackTrace(); // rollback if (isRollback == true) { try { con.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } // } } // }
[ "65608960+qkralswl689@users.noreply.github.com" ]
65608960+qkralswl689@users.noreply.github.com
8bdb94685f80f5999642810b9a49906610b519f6
f88ab225f8dda42410cb11bce2608a07aeeb7f35
/2. Interview/12OrderStatsHeapHash Teacher Files/Pep_JavaIP_12OrderStatsHeapHash_404KClosestElements.java
ce5b96de1b3347e34114a67ecdf160e2966bfaf4
[]
no_license
arunnayan/IP_questionSet
32b64c305edb88348c7626b2b42ab9d6529d4cb5
7a35951c5754ba4ca567c1357249f66e23fbe42c
refs/heads/master
2023-03-16T18:38:51.385676
2019-08-01T12:10:35
2019-08-01T12:10:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,448
java
package OrderStatsHeapHash; import java.util.Arrays; import java.util.Scanner; public class Pep_JavaIP_12OrderStatsHeapHash_404KClosestElements { /** * Find k closest elements to a given key in a sorted array. */ public static void main(String[] args) { Scanner scn = new Scanner(System.in); int k = scn.nextInt(); int X = scn.nextInt(); int[] arr = new int[scn.nextInt()]; for (int i = 0; i < arr.length; i++) { arr[i] = scn.nextInt(); } Arrays.sort(arr); // finds position of X int z = Arrays.binarySearch(arr, X); System.out.println(z); // Put point at left and right of X int lp = z - 1, rp = z + 1; //Print whichever is closest and move corresponding pointer while (lp >= 0 && rp < arr.length && k > 0) { if (arr[z] - arr[lp] < arr[rp] - arr[z]) { System.out.println(arr[lp]); lp--; k--; } else { System.out.println(arr[rp]); rp++; k--; } } // rp exhausted so print lp while (lp > 0 && k > 0) { System.out.println(arr[lp]); lp--; k--; } // lp exhausted so print rp while (rp < arr.length && k > 0) { System.out.println(arr[rp]); rp++; k--; } } } /*Test Cases: 4 35 12 16 22 30 35 39 42 45 48 50 53 55 56 Output: 30 39 42 45 5 24 5 21 22 23 24 30 Output: 23 22 21 30 This answer is valid only if element is present in the array. Source: https://www.geeksforgeeks.org/find-k-closest-elements-given-value/ */
[ "32850197+rajneeshkumar146@users.noreply.github.com" ]
32850197+rajneeshkumar146@users.noreply.github.com
2d7486d6519b589f8421d44f7586ee4d6b187bba
65c37921c5000bc01a428d36f059578ce02ebaab
/jooq/src/main/test/test/generated/pg_catalog/routines/Bpcharregexeq.java
9a2071166abfc401e9787167a26f557b892ed0b0
[]
no_license
azeredoA/projetos
05dde053aaba32f825f17f3e951d2fcb2d3034fc
7be5995edfaad4449ec3c68d422247fc113281d0
refs/heads/master
2021-01-11T05:43:21.466522
2013-06-10T15:39:42
2013-06-10T15:40:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,310
java
/** * This class is generated by jOOQ */ package test.generated.pg_catalog.routines; /** * This class is generated by jOOQ. */ @javax.annotation.Generated(value = {"http://www.jooq.org", "2.6.0"}, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings("all") public class Bpcharregexeq extends org.jooq.impl.AbstractRoutine<java.lang.Boolean> { private static final long serialVersionUID = -1209979412; /** * The procedure parameter <code>pg_catalog.bpcharregexeq.RETURN_VALUE</code> */ public static final org.jooq.Parameter<java.lang.Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN); /** * The procedure parameter <code>pg_catalog.bpcharregexeq._1</code> */ public static final org.jooq.Parameter<java.lang.String> _1 = createParameter("_1", org.jooq.impl.SQLDataType.CHAR); /** * The procedure parameter <code>pg_catalog.bpcharregexeq._2</code> */ public static final org.jooq.Parameter<java.lang.String> _2 = createParameter("_2", org.jooq.impl.SQLDataType.CLOB); /** * Create a new routine call instance */ public Bpcharregexeq() { super("bpcharregexeq", test.generated.pg_catalog.PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN); setReturnParameter(RETURN_VALUE); addInParameter(_1); addInParameter(_2); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(java.lang.String value) { setValue(test.generated.pg_catalog.routines.Bpcharregexeq._1, value); } /** * Set the <code>_1</code> parameter to the function * <p> * Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement! */ public void set__1(org.jooq.Field<java.lang.String> field) { setField(_1, field); } /** * Set the <code>_2</code> parameter IN value to the routine */ public void set__2(java.lang.String value) { setValue(test.generated.pg_catalog.routines.Bpcharregexeq._2, value); } /** * Set the <code>_2</code> parameter to the function * <p> * Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement! */ public void set__2(org.jooq.Field<java.lang.String> field) { setField(_2, field); } }
[ "lindomar_reitz@hotmail.com" ]
lindomar_reitz@hotmail.com
d3381dbf28d7b33dc7f412aeb01542802f0dde95
80b292849056cb4bf3f8f76f127b06aa376fdaaa
/java/game/tera/gameserver/network/serverpackets/S_Masstige_Status.java
07c6f34c084fa456374391283717874eec41a30b
[]
no_license
unnamed44/tera_2805
70f099c4b29a8e8e19638d9b80015d0f3560b66d
6c5be9fc79157b44058c816dd8f566b7cf7eea0d
refs/heads/master
2020-04-28T04:06:36.652737
2019-03-11T01:26:47
2019-03-11T01:26:47
174,964,999
2
0
null
2019-03-11T09:15:36
2019-03-11T09:15:35
null
UTF-8
Java
false
false
758
java
package tera.gameserver.network.serverpackets; import tera.gameserver.network.ServerPacketType; import tera.gameserver.network.serverpackets.ServerPacket; /** * Created by Luciole on 25/06/2016. */ public class S_Masstige_Status extends ServerPacket { private static final ServerPacket instance = new S_Masstige_Status(); public static ServerPacket getInstance() { return instance.newInstance(); } @Override public ServerPacketType getPacketType() { return ServerPacketType.S_MASSTIGE_STATUS; } @Override protected void writeImpl() { writeOpcode(); writeInt(0); writeInt(0); writeInt(0); writeInt(0); writeInt(0); writeInt(0); } }
[ "171296@supinfo.com" ]
171296@supinfo.com
1c0a87ed5d7395eb3de777e346d12ecf94282ed8
d52ef9b0e22f007e82c65a2b37c06085f889aba2
/src/main/java/org/avp/packets/client/PacketJellyLevelUpdate.java
cf3cf4480b7b1629ab2ef44502fdc0b12e5ffa46
[]
no_license
darthvader45/AliensVsPredator
37236b503446c4a2e4a5d913b9d69afd53e43e1f
ae68403983ef70da4cb7d75e1cae08b52dffa249
refs/heads/master
2021-01-12T13:14:35.867038
2016-10-27T15:12:18
2016-10-27T15:12:18
72,159,740
0
0
null
2016-10-28T00:35:38
2016-10-28T00:35:38
null
UTF-8
Java
false
false
1,336
java
package org.avp.packets.client; import org.avp.entities.mob.EntitySpeciesAlien; import com.arisux.amdxlib.lib.game.Game; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; public class PacketJellyLevelUpdate implements IMessage, IMessageHandler<PacketJellyLevelUpdate, PacketJellyLevelUpdate> { public int uuid, jellyLevel; public PacketJellyLevelUpdate() { ; } public PacketJellyLevelUpdate(int jellyLevel, int uuid) { this.jellyLevel = jellyLevel; this.uuid = uuid; } @Override public void fromBytes(ByteBuf buf) { this.jellyLevel = buf.readInt(); this.uuid = buf.readInt(); } @Override public void toBytes(ByteBuf buf) { buf.writeInt(this.jellyLevel); buf.writeInt(this.uuid); } @Override public PacketJellyLevelUpdate onMessage(PacketJellyLevelUpdate packet, MessageContext ctx) { EntitySpeciesAlien alien = ((EntitySpeciesAlien) Game.minecraft().thePlayer.worldObj.getEntityByID(packet.uuid)); if (alien != null) { alien.setJellyLevel(packet.jellyLevel); } return null; } }
[ "Ri5ux@users.noreply.github.com" ]
Ri5ux@users.noreply.github.com
311da56d571da431b1e60a768efd69a14b5143d6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_de0618f40d48da61db48d11c1ce873edd5ebcdad/GeneralTree/3_de0618f40d48da61db48d11c1ce873edd5ebcdad_GeneralTree_t.java
755c6a6ae8a50dba7e9932c97c192812d87c3354
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,353
java
package uk.ed.inf.tree; import java.util.Iterator; public final class GeneralTree<T extends ITreeNode<T>> implements ITree<T> { private final T rootNode; private final LCACalculator<T> lcaCalc; public GeneralTree(T rootNode){ if(rootNode == null) throw new NullPointerException("root node cannot be null"); this.rootNode = rootNode; this.lcaCalc = new LCACalculator<T>(rootNode); } /* (non-Javadoc) * @see uk.ed.inf.graph.impl.ITree#getRootNode() */ public T getRootNode(){ return this.rootNode; } /* (non-Javadoc) * @see uk.ed.inf.graph.impl.ITree#containsNode(T) */ public boolean containsNode(T testNode){ return this.containsNode(testNode.getIndex()); } /* (non-Javadoc) * @see uk.ed.inf.graph.impl.ITree#constainsNode(int) */ public boolean containsNode(int testIndex){ Iterator<T> iter = this.levelOrderIterator(); boolean retVal = false; while(iter.hasNext() && retVal == false){ T node = iter.next(); if(node.getIndex() == testIndex){ retVal = true; } } return retVal; } /* (non-Javadoc) * @see uk.ed.inf.graph.impl.ITree#get(int) */ public T get(int testIndex){ Iterator<T> iter = this.levelOrderIterator(); T retVal = null; while(iter.hasNext() && retVal == null){ T node = iter.next(); if(node.getIndex() == testIndex){ retVal = node; } } return retVal; } public T getLowestCommonAncestor(final T thisNode, final T thatNode){ if(!thisNode.getRoot().equals(this.rootNode) || !thatNode.getRoot().equals(this.rootNode)) throw new IllegalArgumentException("Noth nodes must belong to the same this tree"); this.lcaCalc.findLowestCommonAncestor(thisNode, thatNode); return this.lcaCalc.getLCANode(); } public Iterator<T> levelOrderIterator(){ return new LevelOrderTreeIterator<T>(this.rootNode); } /** * Tests if <code>testNode</code> is a descendant of <code>startNode</code>. This means traversing * from the <code>startNode</code> until it finds the <code>testNode</code>. * @param startNode the node to start from, can be null. * @param testNode the node to be tested, can be null. * @return <code>true</code> if <code>testNode</code> is an descendant of <code>startNode</code>, * <code>false</code> otherwise. */ public boolean isDescendant(T startNode, T testNode){ boolean retVal = false; Iterator<T> iter = new LevelOrderTreeIterator<T>(startNode); iter.next(); // skip startNode - something cannot be a descendant of itself while(iter.hasNext() && retVal == false){ T node = iter.next(); if(node.equals(testNode)){ retVal = true; } } return retVal; } public int size(){ Iterator<T> iter = this.levelOrderIterator(); int cnt = 0; while(iter.hasNext()){ iter.next(); cnt++; } return cnt; } public boolean isAncestor(T startNode, T testNode) { boolean retVal = false; Iterator<T> iter = new AncestorTreeIterator<T>(startNode); while(iter.hasNext() && retVal == false){ T node = iter.next(); if(node.equals(testNode)){ retVal = true; } } return retVal; } public ITreeWalker<T> levelOrderTreeWalker(ITreeNodeAction<T> visitorAction) { return new LevelOrderTreeWalker<T>(this.rootNode, visitorAction); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
408ba9d461163e560ce1f2e15e83af3c5a09e60f
064875f6746ff611f142c44c2e19deadbcb94b36
/platform/src/main/java/net/firejack/platform/service/content/broker/documentation/service/ReferenceWrapper.java
8401fd6424eed8fc40f188996a293bb475b55e36
[ "Apache-2.0" ]
permissive
alim-firejack/Firejack-Platform
d7faeb35091c042923e698d598d0118f3f4b0c11
bc1f58d425d91425cfcd6ab4fb6b1eed3fe0b815
refs/heads/master
2021-01-15T09:23:05.489281
2014-02-27T17:39:25
2014-02-27T17:39:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,005
java
/* * Firejack Open Flame - Copyright (c) 2011 Firejack Technologies * * This source code is the product of the Firejack Technologies * Core Technologies Team (Benjamin A. Miller, Oleg Marshalenko, and Timur * Asanov) and licensed only under valid, executed license agreements * between Firejack Technologies and its customers. Modification and / or * re-distribution of this source code is allowed only within the terms * of an executed license agreement. * * Any modification of this code voids any and all warranties and indemnifications * for the component in question and may interfere with upgrade path. Firejack Technologies * encourages you to extend the core framework and / or request modifications. You may * also submit and assign contributions to Firejack Technologies for consideration * as improvements or inclusions to the platform to restore modification * warranties and indemnifications upon official re-distributed in patch or release form. */ package net.firejack.platform.service.content.broker.documentation.service; import net.firejack.platform.core.model.registry.RegistryNodeModel; import net.firejack.platform.core.model.registry.RegistryNodeType; import java.util.List; public class ReferenceWrapper { private RegistryNodeModel reference; private RegistryNodeType type; private List<ReferenceWrapper> childrenReferences; public ReferenceWrapper(RegistryNodeModel reference) { this.reference = reference; this.type = reference.getType(); } public RegistryNodeModel getReference() { return reference; } public void setReference(RegistryNodeModel reference) { this.reference = reference; } public RegistryNodeType getType() { return type; } public void setType(RegistryNodeType type) { this.type = type; } public List<ReferenceWrapper> getChildrenReferences() { return childrenReferences; } public void setChildrenReferences(List<ReferenceWrapper> childrenReferences) { this.childrenReferences = childrenReferences; } }
[ "CF8DCmPgvS" ]
CF8DCmPgvS
3ec480c59f794d68a921ad6567a177c86944d504
e0630277dbd314dac2c247340b0b5a58146a069e
/src/main/java/com/kunsoftware/bean/DestinationRequestBean.java
bcce5866439931a6697048fd8e839af39ceae7c6
[ "Apache-2.0" ]
permissive
yanguangkun/KunSoftware_Tour
9be9302e9bd087b2da3d9cbc94b8d4c5b9a2db07
cffd7a8eb87a769b148f2c35656c7b706de0d16a
refs/heads/master
2016-09-15T17:09:52.923770
2014-06-04T07:06:33
2014-06-04T07:06:33
16,792,374
0
1
null
2016-03-09T20:16:01
2014-02-13T05:00:08
Java
UTF-8
Java
false
false
1,644
java
package com.kunsoftware.bean; import org.springframework.web.multipart.MultipartFile; public class DestinationRequestBean { private String name; private String nameEn; private String countryValue; private Integer galleryId; private String galleryName; private String imagePath; private MultipartFile imageFile; private String enable; private Integer orderValue; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNameEn() { return nameEn; } public void setNameEn(String nameEn) { this.nameEn = nameEn; } public String getCountryValue() { return countryValue; } public void setCountryValue(String countryValue) { this.countryValue = countryValue; } public Integer getGalleryId() { return galleryId; } public void setGalleryId(Integer galleryId) { this.galleryId = galleryId; } public String getGalleryName() { return galleryName; } public void setGalleryName(String galleryName) { this.galleryName = galleryName; } public String getImagePath() { return imagePath; } public MultipartFile getImageFile() { return imageFile; } public void setImageFile(MultipartFile imageFile) { this.imageFile = imageFile; } public void setImagePath(String imagePath) { this.imagePath = imagePath; } public String getEnable() { return enable; } public void setEnable(String enable) { this.enable = enable; } public Integer getOrderValue() { return orderValue; } public void setOrderValue(Integer orderValue) { this.orderValue = orderValue; } }
[ "yanguangkun@126.com" ]
yanguangkun@126.com
9d3194a9853e3b072ec9b55792c883abba514fbe
e6640144038dab496e868d28e324c3c72aaa0840
/src/main/树/t144/PreorderTraversal.java
0c22be386ca0d6f5e7c8ae99b89c2b846bebe8b5
[]
no_license
sotowang/leetcode
f8de0530521eb864b07509ae45c5c916341b5f12
83970f766c95ea8dd84b187dd583ee1ac6ee330e
refs/heads/master
2021-12-01T01:32:50.646299
2021-11-15T13:25:37
2021-11-15T13:25:37
207,312,983
1
0
null
null
null
null
UTF-8
Java
false
false
1,004
java
package 树.t144; import 深度优先搜索.TreeNode; import java.util.LinkedList; import java.util.List; public class PreorderTraversal { public List<Integer> preorderTraversal(TreeNode root) { List<Integer> res = new LinkedList<>(); if (root == null) { return res; } LinkedList<TreeNode> stack = new LinkedList<>(); stack.push(root); TreeNode p; while (!stack.isEmpty()) { p = stack.pop(); res.add(p.val); if (p.right != null) { stack.push(p.right); } if (p.left != null) { stack.push(p.left); } } return res; } public static void main(String[] args) { TreeNode t1 = new TreeNode(1); TreeNode t2 = new TreeNode(2); TreeNode t3 = new TreeNode(3); t1.right = t2; t2.left = t3; System.out.println(new PreorderTraversal().preorderTraversal(t1)); } }
[ "sotowang@qq.com" ]
sotowang@qq.com
1b41c1d9b00c3290101728a7948503c47d28ee26
7ad843a5b11df711f58fdb8d44ed50ae134deca3
/JDK/JDK1.8/src/javax/swing/plaf/metal/MetalMenuBarUI.java
42fb6e38f5cb578d247228063146a30e9fd87e74
[ "MIT" ]
permissive
JavaScalaDeveloper/java-source
f014526ad7750ad76b46ff475869db6a12baeb4e
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
refs/heads/main
2023-07-01T22:32:58.116092
2021-07-26T06:42:32
2021-07-26T06:42:32
362,427,367
0
0
null
null
null
null
UTF-8
Java
false
false
3,448
java
/* * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.swing.plaf.metal; import java.awt.*; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.*; /** * Metal implementation of <code>MenuBarUI</code>. This class is responsible * for providing the metal look and feel for <code>JMenuBar</code>s. * * @see javax.swing.plaf.MenuBarUI * @since 1.5 */ public class MetalMenuBarUI extends BasicMenuBarUI { /** * Creates the <code>ComponentUI</code> implementation for the passed * in component. * * @param x JComponent to create the ComponentUI implementation for * @return ComponentUI implementation for <code>x</code> * @throws NullPointerException if <code>x</code> is null */ public static ComponentUI createUI(JComponent x) { if (x == null) { throw new NullPointerException("Must pass in a non-null component"); } return new MetalMenuBarUI(); } /** * Configures the specified component appropriate for the metal look and * feel. * * @param c the component where this UI delegate is being installed * @throws NullPointerException if <code>c</code> is null. */ public void installUI(JComponent c) { super.installUI(c); MetalToolBarUI.register(c); } /** * Reverses configuration which was done on the specified component during * <code>installUI</code>. * * @param c the component where this UI delegate is being installed * @throws NullPointerException if <code>c</code> is null. */ public void uninstallUI(JComponent c) { super.uninstallUI(c); MetalToolBarUI.unregister(c); } /** * If necessary paints the background of the component, then * invokes <code>paint</code>. * * @param g Graphics to paint to * @param c JComponent painting on * @throws NullPointerException if <code>g</code> or <code>c</code> is * null * @see javax.swing.plaf.ComponentUI#update * @see javax.swing.plaf.ComponentUI#paint * @since 1.5 */ public void update(Graphics g, JComponent c) { boolean isOpaque = c.isOpaque(); if (g == null) { throw new NullPointerException("Graphics must be non-null"); } if (isOpaque && (c.getBackground() instanceof UIResource) && UIManager.get("MenuBar.gradient") != null) { if (MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar)c)) { JToolBar tb = (JToolBar)MetalToolBarUI. findRegisteredComponentOfType(c, JToolBar.class); if (tb.isOpaque() &&tb.getBackground() instanceof UIResource) { MetalUtils.drawGradient(c, g, "MenuBar.gradient", 0, 0, c.getWidth(), c.getHeight() + tb.getHeight(), true); paint(g, c); return; } } MetalUtils.drawGradient(c, g, "MenuBar.gradient", 0, 0, c.getWidth(), c.getHeight(),true); paint(g, c); } else { super.update(g, c); } } }
[ "panzha@dian.so" ]
panzha@dian.so
9beb7167753c2fe8f03b86014edb637292c00120
f2e744082c66f270d606bfc19d25ecb2510e337c
/sources/com/oneplus/utils/reflection/MethodReflection.java
768afcc435a3fd6a78a253ef3d2f3e5afe777889
[]
no_license
AshutoshSundresh/OnePlusSettings-Java
365c49e178612048451d78ec11474065d44280fa
8015f4badc24494c3931ea99fb834bc2b264919f
refs/heads/master
2023-01-22T12:57:16.272894
2020-11-21T16:30:18
2020-11-21T16:30:18
314,854,903
4
2
null
null
null
null
UTF-8
Java
false
false
1,655
java
package com.oneplus.utils.reflection; import com.oneplus.utils.reflection.utils.Assert; import com.oneplus.utils.reflection.utils.ConcurrentReferenceHashMap; import com.oneplus.utils.reflection.utils.ExceptionUtil; import java.lang.reflect.Method; import java.util.Arrays; import java.util.Map; public class MethodReflection { private static final Map<String, Method> DECLARED_METHOD_CACHE = new ConcurrentReferenceHashMap(32); public static Method findMethod(Class<?> cls, String str, Class<?>... clsArr) { Assert.notNull(cls, "Class must not be null"); Assert.notNull(str, "Method name must not be null"); Method method = DECLARED_METHOD_CACHE.get(cls.getName() + str + Arrays.toString(clsArr)); if (method != null) { return method; } for (Class<?> cls2 = cls; cls2 != null; cls2 = cls2.getSuperclass()) { Method[] methods = cls2.isInterface() ? cls2.getMethods() : cls2.getDeclaredMethods(); for (Method method2 : methods) { if (str.equals(method2.getName()) && (clsArr == null || Arrays.equals(clsArr, method2.getParameterTypes()))) { DECLARED_METHOD_CACHE.put(cls.getName() + str + Arrays.toString(clsArr), method2); return method2; } } } return null; } public static Object invokeMethod(Method method, Object obj, Object... objArr) { try { return method.invoke(obj, objArr); } catch (ReflectiveOperationException e) { ExceptionUtil.handleReflectionException(e); return null; } } }
[ "ashutoshsundresh@gmail.com" ]
ashutoshsundresh@gmail.com
91ab50192fa074477ce09edbe91a60b6b1dac939
cd376874cc5788f8d63d2610ab6103994214c291
/src/main/java/org/vaadin/presentation/AppUI.java
53401ad68ca7eb66d43525f0c37a2e3136e4054c
[ "Unlicense" ]
permissive
vaadin/framework-bluemix-example
4bb9579505db5294ad52bd3d18921e2b0c188b42
2acfefed8651062bd5a8161b555b26bd3f13ee95
refs/heads/master
2021-10-21T22:04:36.423359
2019-08-02T13:32:16
2019-08-02T13:32:16
102,089,257
2
4
Unlicense
2021-04-19T14:51:36
2017-09-01T08:01:40
Java
UTF-8
Java
false
false
2,195
java
/* * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions that recognize copyright laws, the author or authors * of this software dedicate any and all copyright interest in the * software to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and * successors. We intend this dedication to be an overt act of * relinquishment in perpetuity of all present and future rights to this * software under copyright law. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * For more information, please refer to <http://unlicense.org/> */ package org.vaadin.presentation; import com.vaadin.annotations.Title; import com.vaadin.cdi.CDIUI; import com.vaadin.ui.UI; import org.vaadin.cdiviewmenu.ViewMenuUI; /** * UI class and its init method is the "main method" for Vaadin apps. * But as we are using Vaadin CDI, Navigator and Views, we'll just * extend the helper class ViewMenuUI that provides us a top level layout, * automatically generated top level navigation and Vaadin Navigator usage. * <p> * We also configure the theme, host page title and the widgetset used * by the application. * </p> * <p> * The real meat of this example is in CustomerView and CustomerForm classes. * </p> */ @CDIUI("") @Title("Simple CRM") public class AppUI extends ViewMenuUI { /** * @return the currently active UI instance with correct type. */ public static AppUI get() { return (AppUI) UI.getCurrent(); } }
[ "matti@vaadin.com" ]
matti@vaadin.com
0b6da5ed6979b91f6f4616616570199692495e4b
d384dd7a9c4effc5e7ffe974f431d80923279295
/src/main/java/org/motechproject/tujiokowe/service/impl/HolidayCsvImportCustomizer.java
b4362001e4ea2e00d340eae61cba209ae09df8be
[ "Apache-2.0" ]
permissive
motech-implementations/tujiokowe
7406d478de8322578ac38b69b4b0638a47c10e32
0133da6573d9b862b2a0ed737d6d72d99ef32266
refs/heads/dev
2022-12-22T11:52:10.255024
2020-10-31T18:54:13
2020-10-31T18:54:13
223,919,300
0
0
Apache-2.0
2022-12-15T23:56:54
2019-11-25T10:15:03
Java
UTF-8
Java
false
false
1,690
java
package org.motechproject.tujiokowe.service.impl; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.joda.time.LocalDate; import org.joda.time.format.DateTimeFormat; import org.motechproject.mds.service.DefaultCsvImportCustomizer; import org.motechproject.mds.service.MotechDataService; import org.motechproject.tujiokowe.domain.Holiday; import org.motechproject.tujiokowe.service.HolidayService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class HolidayCsvImportCustomizer extends DefaultCsvImportCustomizer { private static final String HOLIDAY_DATE_FORMAT = "yyyy-MM-dd"; private HolidayService holidayService; @Override public Object findExistingInstance(Map<String, String> row, MotechDataService motechDataService) { String holidayDate = row.get(Holiday.HOLIDAY_DATE_FIELD_NAME); if (StringUtils.isBlank(holidayDate)) { holidayDate = row.get(Holiday.HOLIDAY_DATE_FIELD_DISPLAY_NAME); } if (StringUtils.isNotBlank(holidayDate)) { LocalDate date = LocalDate.parse(holidayDate, DateTimeFormat.forPattern(HOLIDAY_DATE_FORMAT)); return holidayService.findByDate(date); } return null; } @Override public Object doCreate(Object instance, MotechDataService motechDataService) { return holidayService.create((Holiday) instance); } @Override public Object doUpdate(Object instance, MotechDataService motechDataService) { return holidayService.update((Holiday) instance); } @Autowired public void setHolidayService(HolidayService holidayService) { this.holidayService = holidayService; } }
[ "pmuchowski@soldevelo.com" ]
pmuchowski@soldevelo.com
f71e78abdb3751f2e1412b84305aeb380fedc74d
34ed294866440f11f0d46fc33b49da970e292294
/src/AdvanceExample/AdvanceExamples_01/Code_08_MaxDistanceInTree.java
652886b446914d844fe49f07efea608c0b7cb1be
[]
no_license
songwell1024/Algorithm-JAVA
f4033128ce4327335c9225c3235ed2a489734066
bfdc8a4291984f324d4cb07ce42233919af1367a
refs/heads/master
2021-07-15T10:12:05.692703
2019-01-03T13:55:22
2019-01-03T13:55:22
109,383,871
1
0
null
null
null
null
UTF-8
Java
false
false
1,440
java
package AdvanceExample.AdvanceExamples_01; /** * 二叉树节点间距离的概念:二叉树一个节点到另一个节点间最短线路上的节点 数量,叫做两个节点间的距离。 给定一棵二叉树的头节点head,请返回这棵二叉树上的最大距离。 其实一棵树的最大距离是左子树的最大深度 + 右子树的最大深度 +1,或者是左子树的最大距离,或者是右5子树的最大距离 依次递归 * @author WilsonSong * @date 2019/1/1/001 */ public class Code_08_MaxDistanceInTree { public class Node{ public Node left; public Node right; public int value; public Node(int value){ this.value = value; } } public static int getLongestDis(Node head){ int[] record = new int[1]; //数组是一个全局的变量,存放的是左右子树的最大深度 return process(head, record); } public static int process(Node head, int[] record){ if (head == null){ record[0] = 0; return 0; } int lmax = process(head.left, record); int leftDepth = record[0]; int rmax = process(head.right, record); int rifhtDepth = record[0]; int CurMaxLength = leftDepth + rifhtDepth + 1; record[0] = Math.max(leftDepth, rifhtDepth) + 1; return Math.max(Math.max(lmax,rmax), CurMaxLength); } }
[ "zysong0709@foxmail.com" ]
zysong0709@foxmail.com
20d54944506c2fb07661b0e84285755febd1587f
4ead80ec478a9ae03c73c7408436bd507be7b6a9
/lib/common/src/main/java/study/daydayup/wolf/common/model/annotation/column/UseLessKey.java
b2b964e3bbcecd0c93cfd8a77dae5bc31b61b2ed
[ "MIT" ]
permissive
timxim/wolf
cfea87e0efcd5c6e6ff76c85b3882ffce60dde07
207c61cd473d1433bf3e4fc5a591aaf3a5964418
refs/heads/master
2022-11-12T15:13:33.096567
2020-07-04T14:03:53
2020-07-04T14:03:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package study.daydayup.wolf.common.model.annotation.column; /** * study.daydayup.wolf.common.model.annotation.column * * @author Wingle * @since 2019/10/29 12:27 下午 **/ public @interface UseLessKey { }
[ "winglechen@gmail.com" ]
winglechen@gmail.com
fca052eedb3dc72ceedeec46b0961f50c01dc1e6
ecb347a820405fd7c7a7c77f7c7c5a1b3a82c1f2
/tests/io.sarl.util.tests/src/test/java/io/sarl/util/tests/util/AddressScopeTest.java
db464d361062cf1aac4c9b3fb0169062fede4e36
[ "Apache-2.0" ]
permissive
interventionlabs/sarl
6003c303382eb7b22a18bf131764f607488fc46f
e0ba1a47c93b2be01bcb5f5af7125a8d86dcd548
refs/heads/master
2020-07-10T18:09:32.442040
2019-08-22T15:59:54
2019-08-22T15:59:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,649
java
/* * $Id$ * * SARL is an general-purpose agent programming language. * More details on http://www.sarl.io * * Copyright (C) 2014-2019 the original authors or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.sarl.util.tests.util; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import io.sarl.lang.core.Address; import io.sarl.tests.api.AbstractSarlTest; import io.sarl.util.AddressScope; /** * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ */ @SuppressWarnings("all") public class AddressScopeTest extends AbstractSarlTest { @Mock private Address base1; @Mock private Address base2; @Mock private Address base3; private AddressScope scope; @Before public void setUp() { this.scope = new AddressScope(this.base1, this.base2); } @Test public void matches() { assertTrue(this.scope.matches(this.base1)); assertTrue(this.scope.matches(this.base2)); assertFalse(this.scope.matches(this.base3)); } }
[ "galland@arakhne.org" ]
galland@arakhne.org
1a2b0cd7012eecee36419159cf23055ad763b6d0
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE190_Integer_Overflow/s06/CWE190_Integer_Overflow__short_console_readLine_postinc_81_base.java
5c26b4570c228151597ee4d7da369b64b0fda4bd
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
941
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__short_console_readLine_postinc_81_base.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-81_base.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: increment * GoodSink: Ensure there will not be an overflow before incrementing data * BadSink : Increment data, which can cause an overflow * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE190_Integer_Overflow.s06; import testcasesupport.*; import javax.servlet.http.*; public abstract class CWE190_Integer_Overflow__short_console_readLine_postinc_81_base { public abstract void action(short data ) throws Throwable; }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
f922fe4ddf08e9798fea053b6aab62108c42724b
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/cgeo_c-geo-opensource/main/src/cgeo/geocaching/connector/trackable/GeokretyLoggingManager.java
8bc46b05b019b671a0c34159c62ed3a8e2f7cbbc
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,516
java
// isComment package cgeo.geocaching.connector.trackable; import cgeo.geocaching.models.Geocache; import cgeo.geocaching.connector.LogResult; import cgeo.geocaching.enumerations.StatusCode; import cgeo.geocaching.log.AbstractLoggingActivity; import cgeo.geocaching.log.LogTypeTrackable; import cgeo.geocaching.log.TrackableLog; import cgeo.geocaching.utils.Log; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import android.support.annotation.NonNull; import java.util.ArrayList; import java.util.Calendar; import java.util.List; public class isClassOrIsInterface extends AbstractTrackableLoggingManager { public isConstructor(final AbstractLoggingActivity isParameter) { super(isNameExpr); } @Override public List<LogTypeTrackable> isMethod() { return isMethod(); } @Override public LogResult isMethod(final Geocache isParameter, final TrackableLog isParameter, final Calendar isParameter, final String isParameter) { try { final ImmutablePair<StatusCode, List<String>> isVariable = isNameExpr.isMethod(isMethod(), isNameExpr, isNameExpr, isNameExpr, isNameExpr); final String isVariable = isNameExpr.isMethod().isMethod() ? "isStringConstant" : isNameExpr.isMethod(isNameExpr.isMethod(), "isStringConstant"); return new LogResult(isNameExpr.isMethod(), isNameExpr); } catch (final Exception isParameter) { isNameExpr.isMethod("isStringConstant", isNameExpr); } return new LogResult(isNameExpr.isFieldAccessExpr, "isStringConstant"); } @Override @NonNull public List<LogTypeTrackable> isMethod() { final List<LogTypeTrackable> isVariable = new ArrayList<>(); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); return isNameExpr; } @Override public boolean isMethod() { return true; } @Override public boolean isMethod() { return true; } @Override public void isMethod(final String isParameter) { throw new UnsupportedOperationException(); } @Override public boolean isMethod() { return true; } @Override public boolean isMethod() { return true; } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
ceaf2a272fb7c9509565d0aa66380e40ca021c74
c8b4de3d5a9c2d56164f2f39556807b96374021c
/src/openccsensors/common/CommonProxy.java
8305f915bd92c0a02f49dfedddcb717aaa5f2e9e
[ "MIT" ]
permissive
nevercast/OpenCCSensors
76c867de8fa30ce2e2acf8f83aa64e60c23ba4cd
f03ad9fdd253ca05d817d941796f00e435aa4248
refs/heads/master
2021-01-15T18:59:30.773098
2013-03-21T14:37:10
2013-03-21T14:37:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,733
java
package openccsensors.common; import java.io.File; import java.io.IOException; import java.util.Map.Entry; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import dan200.turtle.api.TurtleAPI; import openccsensors.OpenCCSensors; import openccsensors.api.EnumItemRarity; import openccsensors.api.ISensor; import openccsensors.api.SensorCard; import openccsensors.common.block.BlockGauge; import openccsensors.common.block.BlockSensor; import openccsensors.common.item.ItemGeneric; import openccsensors.common.item.ItemSensorCard; import openccsensors.common.item.meta.ItemMetaAdvancedAmplifier; import openccsensors.common.item.meta.ItemMetaRangeExtensionAntenna; import openccsensors.common.item.meta.ItemMetaSignalAmplifier; import openccsensors.common.sensor.PowerSensor; import openccsensors.common.sensor.DroppedItemSensor; import openccsensors.common.sensor.MachineSensor; import openccsensors.common.sensor.InventorySensor; import openccsensors.common.sensor.MinecartSensor; import openccsensors.common.sensor.ProximitySensor; import openccsensors.common.sensor.SignSensor; import openccsensors.common.sensor.SonicSensor; import openccsensors.common.sensor.TankSensor; import openccsensors.common.sensor.MagicSensor; import openccsensors.common.sensor.WorldSensor; import openccsensors.common.tileentity.TileEntityGauge; import openccsensors.common.tileentity.TileEntitySensor; import openccsensors.common.turtle.TurtleUpgradeSensor; import openccsensors.common.util.LanguageUtils; import openccsensors.common.util.OCSLog; import openccsensors.common.util.ResourceExtractingUtils; public class CommonProxy { public void init() { initSensors(); initBlocks(); initItems(); if (OpenCCSensors.Config.turtlePeripheralEnabled) { TurtleAPI.registerUpgrade(new TurtleUpgradeSensor()); } NetworkRegistry.instance().registerGuiHandler(OpenCCSensors.instance, new GuiHandler()); TileEntityGauge.addGaugeSensor(OpenCCSensors.Sensors.powerSensor); TileEntityGauge.addGaugeSensor(OpenCCSensors.Sensors.inventorySensor); setupLuaFiles(); setupLanguages(); } private void initSensors() { OpenCCSensors.Sensors.proximitySensor = new ProximitySensor(); OpenCCSensors.Sensors.droppedItemSensor = new DroppedItemSensor(); OpenCCSensors.Sensors.signSensor = new SignSensor(); OpenCCSensors.Sensors.minecartSensor = new MinecartSensor(); OpenCCSensors.Sensors.sonicSensor = new SonicSensor(); OpenCCSensors.Sensors.tankSensor = new TankSensor(); OpenCCSensors.Sensors.inventorySensor = new InventorySensor(); OpenCCSensors.Sensors.worldSensor = new WorldSensor(); OpenCCSensors.Sensors.powerSensor = new PowerSensor(); OpenCCSensors.Sensors.machineSensor = new MachineSensor(); OpenCCSensors.Sensors.magicSensor = new MagicSensor(); } private void initBlocks() { OpenCCSensors.Blocks.sensorBlock = new BlockSensor(); OpenCCSensors.Blocks.gaugeBlock = new BlockGauge(); } private void initItems() { // metas OpenCCSensors.Items.genericItem = new ItemGeneric(); OpenCCSensors.Items.rangeExtensionAntenna = new ItemMetaRangeExtensionAntenna(1); OpenCCSensors.Items.signalAmplifier = new ItemMetaSignalAmplifier(2); OpenCCSensors.Items.advancedAmplifier = new ItemMetaAdvancedAmplifier(3); OpenCCSensors.Items.sensorCard = new ItemSensorCard(); OpenCCSensors.Items.sensorCard.registerSensors(); } public void registerRenderInformation() { } public File getBase() { return FMLCommonHandler.instance().getMinecraftServerInstance().getFile("."); } private void setupLuaFiles() { ModContainer container = FMLCommonHandler.instance().findContainerFor(OpenCCSensors.instance); File modFile = container.getSource(); File baseFile = getBase(); String destFolder = String.format("mods\\OCSLua\\%s\\lua", container.getVersion()); if (modFile.isDirectory()) { File srcFile = new File(modFile, OpenCCSensors.LUA_PATH); File destFile = new File(baseFile, destFolder); try { ResourceExtractingUtils.copy(srcFile, destFile); } catch (IOException e) { } } else { ResourceExtractingUtils.extractZipToLocation(modFile, OpenCCSensors.LUA_PATH, destFolder); } } private void setupLanguages() { LanguageUtils.setupLanguages(); } }
[ "mikeefranklin@gmail.com" ]
mikeefranklin@gmail.com
43e52adb315b01ec0a05a4fc84e04458ba86304f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_9e5501a849e6b5e9e57126f4b2fa30a5b7472498/ServicesHandler/2_9e5501a849e6b5e9e57126f4b2fa30a5b7472498_ServicesHandler_t.java
1af8c14d482709b13ef0270f58990c70a7e0711a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,900
java
package ch.amana.android.cputuner.hw; import android.bluetooth.BluetoothAdapter; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.net.wifi.WifiManager; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.telephony.TelephonyManager; import ch.amana.android.cputuner.helper.Logger; import ch.amana.android.cputuner.helper.SettingsStorage; import ch.amana.android.cputuner.model.PowerProfiles; public class ServicesHandler { /** * The preferred network mode 7 = Global 6 = EvDo only 5 = CDMA w/o EvDo 4 = * CDMA / EvDo auto 3 = GSM / WCDMA auto 2 = WCDMA only 1 = GSM only 0 = GSM * / WCDMA preferred * */ public static final int MODE_2G_3G_PREFERRD = 0;// GSM / WCDMA preferred public static final int MODE_2G_ONLY = 1;// GSM only public static final int MODE_3G_ONLY = 2;// WCDMA only private static final String MODIFY_NETWORK_MODE = "com.android.internal.telephony.MODIFY_NETWORK_MODE"; private static final String NETWORK_MODE = "networkMode"; private static WifiManager wifi; private static WifiManager getWifiManager(Context ctx) { if (wifi == null) { wifi = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE); } return wifi; } public static void enableWifi(Context ctx, boolean enable) { if (!enable && !SettingsStorage.getInstance().isSwitchWifiOnConnectedNetwork() && isWifiConnected(ctx)) { Logger.i("Not switching wifi since we are connected!"); return; } if (getWifiManager(ctx).setWifiEnabled(enable)) { Logger.i("Switched Wifi to " + enable); } } public static boolean isWifiConnected(Context ctx) { return getWifiManager(ctx).getConnectionInfo().getNetworkId() > -1; } public static boolean isWifiEnabaled(Context ctx) { return getWifiManager(ctx).isWifiEnabled(); } public static boolean isGpsEnabled(Context ctx) { return GpsHandler.isGpxEnabled(ctx); } public static void enableGps(Context ctx, boolean enable) { GpsHandler.enableGps(ctx, enable); } public static boolean isBlutoothEnabled() { BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (bluetoothAdapter == null) { return false; } return bluetoothAdapter.isEnabled(); } public static void enableBluetooth(boolean enable) { BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (bluetoothAdapter == null) { Logger.i("Not switching bluetooth since its not present"); return; } if (bluetoothAdapter.isEnabled() == enable) { Logger.i("Allready correct bluethooth state "); return; } if (enable) { bluetoothAdapter.enable(); } else { bluetoothAdapter.disable(); } Logger.i("Switched bluethooth to " + enable); } public static int whichMobiledata3G(Context context) { switch (getMobiledataState(context)) { case MODE_2G_ONLY: return PowerProfiles.SERVICE_STATE_2G; case MODE_2G_3G_PREFERRD: return PowerProfiles.SERVICE_STATE_2G_3G; case MODE_3G_ONLY: return PowerProfiles.SERVICE_STATE_3G; default: return Integer.MAX_VALUE; } } public static boolean isPhoneIdle(Context context) { final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return tm.getCallState() == TelephonyManager.CALL_STATE_IDLE; } // From: // /cyanogen/frameworks/base/services/java/com/android/server/status/widget/NetworkModeButton.java // line 97 public static void enable2gOnly(Context context, int profileState) { /** * The preferred network mode 7 = Global 6 = EvDo only 5 = CDMA w/o EvDo * 4 = CDMA / EvDo auto 3 = GSM / WCDMA auto 2 = WCDMA only 1 = GSM only * 0 = GSM / WCDMA preferred * */ if (!isPhoneIdle(context)) { Logger.w("Phone not idle, not switching moble data"); return; } int state = -7; switch (profileState) { case PowerProfiles.SERVICE_STATE_2G: state = MODE_2G_ONLY; break; case PowerProfiles.SERVICE_STATE_2G_3G: state = MODE_2G_3G_PREFERRD; break; case PowerProfiles.SERVICE_STATE_3G: state = MODE_3G_ONLY; break; } if (state == getMobiledataState(context)) { Logger.i("Not switching 2G/3G since it's already in correct state."); return; } Intent intent = new Intent(MODIFY_NETWORK_MODE); intent.putExtra(NETWORK_MODE, state); context.sendBroadcast(intent); Logger.i("Switched 2G/3G to " + state); } private static int getMobiledataState(Context context) { int state = 99; try { state = android.provider.Settings.Secure.getInt(context .getContentResolver(), "preferred_network_mode"); } catch (Exception e) { } return state; } public static boolean isBackgroundSyncEnabled(Context context) { return ContentResolver.getMasterSyncAutomatically(); } public static void enableBackgroundSync(Context context, boolean b) { try { if (ContentResolver.getMasterSyncAutomatically() == b) { Logger.i("Not switched background syc state is correct"); return; } ContentResolver.setMasterSyncAutomatically(b); } catch (Throwable e) { Logger.e("Cannot switch background sync", e); } Logger.i("Switched background syc to " + b); } public static boolean isMobiledataConnectionEnabled(Context context) { return MobiledataWrapper.getInstance(context).getMobileDataEnabled(); } public static void enableMobileData(Context context, boolean enable) { try { if (!isPhoneIdle(context)) { Logger.w("Phone not idle, not switching mobledata"); return; } MobiledataWrapper mdw = MobiledataWrapper.getInstance(context); if (!mdw.canUse()) { return; } if (mdw.getMobileDataEnabled() == enable) { Logger.i("Not switched mobiledata state is correct"); return; } mdw.setMobileDataEnabled(enable); } catch (Throwable e) { Logger.e("Cannot switch mobiledata ", e); } Logger.i("Switched mobiledata to " + enable); } public static void enableAirplaneMode(Context context, boolean enabled) { if (isAirplaineModeEnabled(context) == enabled) { return; } Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, enabled ? 1 : 0); Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.putExtra("state", enabled); context.sendBroadcast(intent); } public static boolean isAirplaineModeEnabled(Context context) { try { int airplaineMode = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON); return airplaineMode != 0; } catch (SettingNotFoundException e) { Logger.e("Cannot read airplaine mode, assuming no", e); return false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
52168ef96b106ff9581c672d4c7f11da19e43403
e3a09a1c199fb3e32d1e43c1393ec133fa34ceab
/game/data/scripts/handlers/effecthandlers/ReduceDropPenalty.java
f9a403b8fd20e05f8773900eb6948d5122c027ef
[]
no_license
Refuge89/l2mobius-helios
0fbaf2a11b02ce12c7970234d4b52efa066ef122
d1251e1fb5a2a40925839579bf459083a84b0c59
refs/heads/master
2020-03-23T01:37:03.354874
2018-07-14T06:52:51
2018-07-14T06:52:51
140,927,248
1
0
null
2018-07-14T07:49:40
2018-07-14T07:49:39
null
UTF-8
Java
false
false
2,195
java
/* * This file is part of the L2J Mobius project. * * This program 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 3 of the License, or * (at your option) any later version. * * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.effecthandlers; import com.l2jmobius.gameserver.enums.ReduceDropType; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.stats.Stats; /** * @author Sdw */ public class ReduceDropPenalty extends AbstractEffect { private final double _exp; private final double _deathPenalty; private final ReduceDropType _type; public ReduceDropPenalty(StatsSet params) { _exp = params.getDouble("exp", 0); _deathPenalty = params.getDouble("deathPenalty", 0); _type = params.getEnum("type", ReduceDropType.class, ReduceDropType.MOB); } @Override public void pump(L2Character effected, Skill skill) { switch (_type) { case MOB: { effected.getStat().mergeMul(Stats.REDUCE_EXP_LOST_BY_MOB, (_exp / 100) + 1); effected.getStat().mergeMul(Stats.REDUCE_DEATH_PENALTY_BY_MOB, (_deathPenalty / 100) + 1); break; } case PK: { effected.getStat().mergeMul(Stats.REDUCE_EXP_LOST_BY_PVP, (_exp / 100) + 1); effected.getStat().mergeMul(Stats.REDUCE_DEATH_PENALTY_BY_PVP, (_deathPenalty / 100) + 1); break; } case RAID: { effected.getStat().mergeMul(Stats.REDUCE_EXP_LOST_BY_RAID, (_exp / 100) + 1); effected.getStat().mergeMul(Stats.REDUCE_DEATH_PENALTY_BY_RAID, (_deathPenalty / 100) + 1); break; } } } }
[ "conan_513@hotmail.com" ]
conan_513@hotmail.com
8169f2dae70d0bf4d9b99667845400590a5d16ae
5637c49aae26518aff327641ab597f90f8126bff
/src/org/cakelab/omcl/DownloadManager.java
d16f4193b6d5cc7974ca20d85c0e01fbc59f1b68
[]
no_license
homacs/org.cakelab.omcl
596a28d52eb254c50cfd4670667796ca74ea32a0
9fd5f80673f6684ad36dec71ecbbb14534d811a8
refs/heads/master
2020-07-21T17:55:42.359978
2019-09-07T09:56:59
2019-09-07T09:56:59
206,935,711
0
1
null
null
null
null
UTF-8
Java
false
false
2,630
java
package org.cakelab.omcl; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.SocketTimeoutException; import java.net.URL; import java.net.URLConnection; import org.cakelab.omcl.taskman.TaskMonitor; import org.cakelab.omcl.utils.Md5Sum; import org.cakelab.omcl.utils.UrlConnectionUtils; import org.cakelab.omcl.utils.log.Log; public class DownloadManager { private static final int CONNECT_TIMEOUT = 15000; private static final int READ_TIMEOUT = 10000; public static void download(URL url, File targetLocation, String checksum, TaskMonitor monitor) throws IOException { IOException lastException = null; for (int i = 0; i < 10; i++) { if (i > 0) Log.info("retrying download of " + url.toString()); if (targetLocation.exists()) { // TODO: implement download resume targetLocation.delete(); } URLConnection connection = UrlConnectionUtils.openConnection(url, CONNECT_TIMEOUT, READ_TIMEOUT); try { connection.connect(); } catch (SocketTimeoutException e) { Log.warn("socket connect timeout"); continue; } InputStream in = null; try { in = connection.getInputStream(); monitoredDownload(in, targetLocation, connection.getContentLength(), monitor); } catch (SocketTimeoutException e) { Log.warn("socket read timeout"); lastException = e; continue; } catch (IOException e) { throw e; } finally { if (in != null) in.close(); } if (checksum != null && checksum.trim().length()>0 && !Md5Sum.check(targetLocation, checksum)) { targetLocation.delete(); Log.warn("checksum check failed"); lastException = new IOException("checksum check failed"); continue; } else { // we have the data and it is valid. lastException = null; break; } } if (lastException != null) { // looks like we finally failed, so propagate the exception throw lastException; } } private static void monitoredDownload(InputStream in, File targetLocation, int total, TaskMonitor monitor) throws IOException { FileOutputStream out = new FileOutputStream(targetLocation); try { byte [] buffer = new byte [1024]; int len; int current = 0; while (0 < (len = in.read(buffer))) { out.write(buffer, 0, len); current += len; try { monitor.updateProgress(total, current, ((float)current)/total, "downloading"); } catch (Throwable e) { Log.error("reporting progress failed. Monitor muted."); monitor = TaskMonitor.NULL_MONITOR; } } } finally { out.close(); } } }
[ "homac@strace.org" ]
homac@strace.org
d3e099e91677961b7c47cb5439601503874dd019
e011a28593abac051f5dde9408f1beac7da5402b
/services/src/main/java/za/co/opencollab/simulator/paygate/util/PaygateFormUtil.java
52dfa5dcbdcfb1bf676a275075e8f398e59c23ba
[]
no_license
OpenCollabZA/payment-simulator
d89353ccd8a8fe3c20b32615783bee407479c959
751079d88592ddffec96535aefe18992c03b5c2e
refs/heads/master
2022-09-22T11:05:36.719545
2020-12-03T13:13:26
2020-12-03T13:13:26
139,044,514
0
0
null
2022-09-08T08:18:35
2018-06-28T16:39:53
Java
UTF-8
Java
false
false
2,518
java
package za.co.opencollab.simulator.paygate.util; import za.co.opencollab.simulator.paygate.dto.PayWebNotificationInfo; import za.co.opencollab.simulator.paygate.dto.PayWebResponseInfo; import javax.ws.rs.core.Form; import static za.co.opencollab.simulator.paygate.PaygateConstants.*; /** * Utility to convert DTO objects to formbased objects that can be submitted. */ public final class PaygateFormUtil { /** * Convert a <code>PayWebNotificationInfo</code> to a form. * @param payWebNotificationInfo The object to convert. * @return The submittable form. */ public static Form createForm(PayWebNotificationInfo payWebNotificationInfo){ Form form = new Form(); form.param(PARAM_PAYGATE_ID, payWebNotificationInfo.getPaygateId()); form.param(PARAM_PAY_REQUEST_ID, payWebNotificationInfo.getPayRequestId()); form.param(PARAM_REFERENCE, payWebNotificationInfo.getReference()); form.param(PARAM_TRANSACTION_STATUS, payWebNotificationInfo.getTransactionStatus()); form.param(PARAM_RESULT_CODE, payWebNotificationInfo.getResultCode()); form.param(PARAM_AUTH_CODE, payWebNotificationInfo.getAuthCode()); form.param(PARAM_CURRENCY, payWebNotificationInfo.getCurrency()); form.param(PARAM_AMOUNT, payWebNotificationInfo.getAmount()); form.param(PARAM_RESULT_DESC, payWebNotificationInfo.getResultDesc()); form.param(PARAM_TRANSACTION_ID, payWebNotificationInfo.getTransactionId()); form.param(PARAM_RISK_INDICATOR, payWebNotificationInfo.getRiskIndicator()); form.param(PARAM_PAY_METHOD, payWebNotificationInfo.getPayMethod()); form.param(PARAM_PAY_METHOD_DETAIL, payWebNotificationInfo.getPayMethodDetail()); form.param(PARAM_USER1, payWebNotificationInfo.getUser1()); form.param(PARAM_USER2, payWebNotificationInfo.getUser2()); form.param(PARAM_USER3, payWebNotificationInfo.getUser3()); form.param(PARAM_VAULT_ID, payWebNotificationInfo.getVaultId()); form.param(PARAM_PAYVAULT_DATA_1, payWebNotificationInfo.getPayvaultData1()); form.param(PARAM_PAYVAULT_DATA_2, payWebNotificationInfo.getPayvaultData2()); form.param(PARAM_CHECKSUM, payWebNotificationInfo.getChecksum()); return form; } public static Form createForm(PayWebResponseInfo responseInfo){ Form form = new Form(); form.param(PARAM_PAY_REQUEST_ID, responseInfo.getPayRequestId()); form.param(PARAM_PAYGATE_ID, Long.toString(responseInfo.getPaygateId())); form.param(PARAM_REFERENCE, responseInfo.getReference()); form.param(PARAM_CHECKSUM, responseInfo.getChecksum()); return form; } }
[ "charl.thiem@gmail.com" ]
charl.thiem@gmail.com
169bbc433fcee496a74bf68d109dffe93fbe1521
55cd9819273b2a0677c3660b2943951b61c9e52e
/gtl/src/main/java/com/basics/cu/entity/CuCustomerRefereeBase.java
0957ab609b931ed97469327c1470f4b1295506d7
[]
no_license
h879426654/mnc
0fb61dff189404f47e7ee1fb6cb89f0c1e2f006f
9e1c33efc90b9f23c47069606ee2b0b0073cc7e3
refs/heads/master
2022-12-27T05:26:22.276805
2019-10-21T05:16:14
2019-10-21T05:16:14
210,249,616
0
0
null
2022-12-16T10:37:07
2019-09-23T02:36:55
JavaScript
UTF-8
Java
false
false
1,083
java
package com.basics.cu.entity; public class CuCustomerRefereeBase extends BaseBean{ /** * 用户ID */ private String id; /** * 推荐人ID */ private String refereeId; private String customerPhone; private String customerName; private String realName; public String getId(){ return this.id; } public void setId(String id){ this.id=id; } public String getRefereeId(){ return this.refereeId; } public void setRefereeId(String refereeId){ this.refereeId=refereeId; } public String getCustomerPhone() { return customerPhone; } public void setCustomerPhone(String customerPhone) { this.customerPhone = customerPhone; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName; } }
[ "879426654@qq.com" ]
879426654@qq.com
471fea5f4a5c61c07af264b378d473d09d73a5e5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_459/Testnull_45885.java
3370837da86bd7b6361599d96aa2f8bbb792f914
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_459; import static org.junit.Assert.*; public class Testnull_45885 { private final Productionnull_45885 production = new Productionnull_45885("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
74b4ee3ba388754c0a6fef520eef30a557aa5110
8071ef15949cf98c59867ca739cfb757b6ba7dfa
/app/src/main/java/com/res/cloudspot/util/StringUtil.java
67d34a577dc5da5c6cd260b3d1814026564b5763
[]
no_license
ajacker/CloudSpot
a20c632d74edd4a27b7f5a6335314834216a4dbb
fc54e0c68901176ace2b956f77cba895fc65e020
refs/heads/master
2020-08-15T12:00:18.662327
2019-10-15T15:51:36
2019-10-15T15:51:36
215,337,646
3
1
null
null
null
null
UTF-8
Java
false
false
7,322
java
package com.res.cloudspot.util; import android.util.SparseArray; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; /** * @author ajacker */ public class StringUtil { public static SparseArray<String> titles = new SparseArray<>(); public static HashMap<String, ArrayList<String>> imgUrls = new HashMap<>(); public static ArrayList<String> poems = new ArrayList<>(); static { titles.put(1, "高积云"); titles.put(2, "卷云"); titles.put(3, "层积云"); titles.put(4, "积云"); titles.put(5, "荚状云"); } static { poems.add("—《关山月》\n明月出天山,\n苍茫云海间"); poems.add("—《独坐敬亭山》\n众鸟高飞尽 ,\n孤云独去闲。"); poems.add("—《寻隐者不遇》\n只在此山中,\n云深不知处。"); poems.add("—《春夜喜雨》\n野径云俱黑,\n江船火独明。"); poems.add("—《渡荆门送别》\n月下飞天镜,\n云生结海楼。"); poems.add("—《别董大》\n千里黄云白日曛,\n北风吹雁雪纷纷。"); poems.add("—《早发白帝城》\n朝辞白帝彩云间,\n千里江陵一日还。"); poems.add("—《山行》\n远上寒山石径斜,\n白云深处有人家。"); poems.add("—《凉州词》\n黄河远上白云间,\n一片孤城万仞山。"); poems.add("—《白雪歌送武判官归京》\n瀚海阑干百丈冰,\n愁云惨淡万里凝。"); poems.add("—《立春日晓望三素云》\n晴晓初春日,\n高心望素云。\n彩光浮玉辇,\n紫气隐元君。"); poems.add("—《东峰亭各赋一物得岭上云》\n伫立增远意,\n中峰见孤云。"); poems.add("—《咏云》\n帝乡白云起,\n飞盖上天衢。"); poems.add("—《云》\n龙似瞿唐会,\n江依白帝深。"); poems.add("—《云》\n渡江随鸟影,\n拥树隔猿吟。\n莫隐高唐去,\n枯苗待作霖。"); } static { imgUrls.put("高积云", new ArrayList<>(Arrays.asList( "https://i.loli.net/2019/09/23/gF6dTfuGk1DNCBi.jpg", "https://i.loli.net/2019/09/23/HK2SNmEIsOy6Xea.jpg", "https://i.loli.net/2019/09/23/TCi9GrFb6AnMXad.jpg", "https://i.loli.net/2019/09/23/Zb57LrH2JDNYURd.jpg", "https://i.loli.net/2019/09/23/2tgGjauK85WFlrM.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/GVY4T8XTE4qxo0jFtRjoZTgJikJf2kSJN*S*2ei68.U!/b/dDcBAAAAAAAA&bo=ngKeAgAAAAARFyA!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/0hirm*g.lXjbJKpnIQZAKrtrAoJNEK5kvonfeOsnJCA!/b/dLYAAAAAAAAA&bo=sAEgAQAAAAARF7A!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/bgj9fXXZ8hiJetAo7khRhJZc0gmNdM5xh86L.5wiND8!/b/dLYAAAAAAAAA&bo=wgEsAQAAAAARF84!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/541V6O.lFVzpHvcet7bTx.iS8NZJ8yiVsU*VATAoL4U!/b/dLYAAAAAAAAA&bo=sgN0AgAAAAARF.c!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/yMTHI7D9M*Bfg0DyIovI6g8kHmAZiRxIfrRIssMIgeo!/b/dMMAAAAAAAAA&bo=AASrAgAAAAARF40!&rf=viewer_4.jpg" ))); imgUrls.put("卷云", new ArrayList<>(Arrays.asList( "https://i.loli.net/2019/09/23/bYg8QqUndG9zw5D.jpg", "https://i.loli.net/2019/09/23/PGsxCcrgF6tWdjY.jpg", "https://i.loli.net/2019/09/23/DLpSGRrJ7Uogq5t.jpg", "https://m.qpic.cn/psb?/V11qpDYW2MBfNr/4LmzMxyMMpdqviWRmn*mpyYd6MfL0Kn9d.AN17*wplI!/b/dLYAAAAAAAAA&bo=AATJAgAAAAARB*8!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/UL5FJpLDMmtBEpq60i7zVActy9FbVC8OZ*J0Ddn4SB8!/b/dL8AAAAAAAAA&bo=2AKKAQAAAAARF3E!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/MYyYizRp1tgx3OVumb54SoY33ACWpdJp6MLVM7d5iAw!/b/dLYAAAAAAAAA&bo=gAKQAQAAAAARFzM!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/JeFksUEMVhzVd66LyGy6fIVvOGbWGObfGLCCnFnp5Ew!/b/dFMBAAAAAAAA&bo=gALgAQAAAAARF0M!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/HtfyD48ki92xV79ZfRb9TVPhpr9NHgIsZg.XKZAlkHM!/b/dFMBAAAAAAAA&bo=6AObAgAAAAARF1I!&rf=viewer_4.jpg" ))); imgUrls.put("层积云", new ArrayList<>(Arrays.asList( "https://i.loli.net/2019/09/23/eqkoQ28sY4MRBjx.jpg", "https://i.loli.net/2019/09/23/eBCbcjILaAWQGOZ.jpg", "https://i.loli.net/2019/09/23/b4lMf6OU5Ydek9G.jpg", "https://i.loli.net/2019/09/23/MWmxXUz6G7IRCTv.jpg", "https://i.loli.net/2019/09/23/JkFz15HjyXBxmt9.jpg", "https://i.loli.net/2019/09/23/CSIbp9mza5DsWuG.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/yhBl086uwEEJNtnZlXQf4LwXCYYHQkaZ2nZAWvKVQD8!/b/dFMBAAAAAAAA&bo=6AObAgAAAAARF1I!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/8Ki19DFggrQQOJH558GvzeGUF2MERax3hPJ.wbCa8bo!/b/dLYAAAAAAAAA&bo=hANZAgAAAAARF*w!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/dTZQ9Rhk0IOP6o4WC3I0erpQaqsp*ak7dJvewMyADpE!/b/dL4AAAAAAAAA&bo=.QE*AQAAAAARF.Y!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/xZBn*4bgqZDj3i7UvDJFiE7j4e3eLur9bp1w*rREKJE!/b/dMMAAAAAAAAA&bo=lAK4AQAAAAARFw8!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/KAc9039e4wSbW*lAKCfQ51iZP7RyJ0ekY*SAdf.w4S8!/b/dMUAAAAAAAAA&bo=1AN6AgAAAAARF48!&rf=viewer_4.jpg" ))); imgUrls.put("积云", new ArrayList<>(Arrays.asList( "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/c3Rva*.ttG5rGZmiTdyNnky2qMlXQKsL1pS23pJF8*I!/b/dLYAAAAAAAAA&bo=LAGiAQAAAAARF64!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/N16N1WSl*1zlVrG.C7ShNpdCaaj0TTth4sxt5VaeDqo!/b/dMQAAAAAAAAA&bo=FAW8AwAAAAARF44!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/ZI.N.ufnNCiloMbDdvLQKgJSiiXnCii6i.c.1DtW66U!/b/dFIBAAAAAAAA&bo=*wOqAgAAAAARF3Q!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/Oi.dqlm0*sOQVBv*5GENoJJrYrUov2h0uSvo3HeiVZU!/b/dE4BAAAAAAAA&bo=lwFkAgAAAAARF9A!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/gBTNMm3W0sSMvy3m83zPTGd7JUj5h8q6.2M8u1xdsJA!/b/dIMAAAAAAAAA&bo=*wOqAgAAAAARF3Q!&rf=viewer_4.jpg" ))); imgUrls.put("荚状云", new ArrayList<>(Arrays.asList( "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/6eTmbmKMm7CQzKENnrho*wiVqJ0BJ1XCU3lS.rz19fo!/b/dMMAAAAAAAAA&bo=4AFoAQAAAAARF6g!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/eFjwT5u..hr8LiW6oNABUsWtFeHrrK4mpyfUSVL3MtQ!/b/dDUBAAAAAAAA&bo=6AOmAgAAAAARF28!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/nd9k.jNCNjJVNGlGEAUKvym9WYM*dEw09PRqI4jWcIo!/b/dIMAAAAAAAAA&bo=wgOBAgAAAAARF2I!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/mDAAYpKlayMy6cwyJNgDV8cHB7QUI5wFWT.slKLN4pI!/b/dLgAAAAAAAAA&bo=gALgAQAAAAARF0M!&rf=viewer_4.jpg", "http://m.qpic.cn/psb?/V11qpDYW2MBfNr/UdpCv2fOnhn.VWU1IRYmn2XcgiCLDh0DAbWTfEy9hMI!/b/dLgAAAAAAAAA&bo=AAXQAgAAAAARF*c!&rf=viewer_4.jpg" ))); } public static String addSpaceBetweenWords(String str) { return str.replace("", " ").trim(); } }
[ "ajacker@foxmail.com" ]
ajacker@foxmail.com
e60ecba448fa29017c443b13cc36ebb8c3d4d37c
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/65_gsftp-com.isnetworks.ssh.FileList-1.0-6/com/isnetworks/ssh/FileList_ESTest_scaffolding.java
c8c8e5c8967cb3e2525b34bcbcb15d25283fdde8
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,957
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 19:46:44 GMT 2019 */ package com.isnetworks.ssh; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class FileList_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.isnetworks.ssh.FileList"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/evosuite-model-seeding-ee/evosuite-model-seeding-empirical-evaluation"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.home", "/home/pderakhshanfar"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FileList_ESTest_scaffolding.class.getClassLoader() , "com.isnetworks.ssh.FileListItem", "com.isnetworks.ssh.FileList" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FileList_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.isnetworks.ssh.FileList" ); } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
0cddd276359ba9710a30fafd1b87050c72ff5af1
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/Worldz/src/net/worldwizard/worldz/objects/PoisonBomb.java
49785e6a94b9b143693ccfad27462310acca6570
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
2,289
java
/* Worldz: A World-Exploring Game Copyright (C) 2008-2010 Eric Ahnell Any questions should be directed to the author via email at: worldz@worldwizard.net */ package net.worldwizard.worldz.objects; import net.worldwizard.worldz.PreferencesManager; import net.worldwizard.worldz.Worldz; import net.worldwizard.worldz.game.ObjectInventory; import net.worldwizard.worldz.generic.GenericUsableObject; import net.worldwizard.worldz.generic.WorldObject; public class PoisonBomb extends GenericUsableObject { // Constants private static final int EFFECT_RADIUS = 2; // Constructors public PoisonBomb() { super(1); } @Override public String getName() { return "Poison Bomb"; } @Override public String getPluralName() { return "Poison Bombs"; } @Override public String getDescription() { return "Poison Bombs poison anything in an area of radius 2 centered on the target point."; } @Override public boolean arrowHitAction(final int locX, final int locY, final int locZ, final int dirX, final int dirY, final int arrowType, final ObjectInventory inv) { // Act as if bomb was used this.useAction(null, locX, locY, locZ); // Destroy bomb Worldz.getApplication().getGameManager().morph(new Empty(), locX, locY, locZ); // Stop arrow return false; } @Override public void useAction(final WorldObject mo, final int x, final int y, final int z) { if (Worldz.getApplication().getPrefsManager() .getSoundEnabled(PreferencesManager.SOUNDS_GAME)) { this.playUseSound(); } // Poison objects that react to poison Worldz.getApplication().getWorldManager().getWorld() .radialScanPoisonObjects(x, y, z, PoisonBomb.EFFECT_RADIUS); // Poison the ground, too Worldz.getApplication().getWorldManager().getWorld() .radialScanPoisonGround(x, y, z, PoisonBomb.EFFECT_RADIUS); } @Override public void useHelper(final int x, final int y, final int z) { this.useAction(null, x, y, z); } @Override public String getUseSoundName() { return "explode"; } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
872c636431bb35d34e06044608cb9cecad0007b7
b18b4efe8b3d8e26ca463b16eeafee8e7da9ba19
/src/main/java/boteelis/vision/algorithms/Segmentation.java
1c713c796234041d73700e8fcd1f2428e8dfa787
[ "Apache-2.0" ]
permissive
tlaukkan/boteelis
d5b1c3d730bf8ba1d5b694be75395e5e4fb2eb68
37fe5e858207ac7a0e838e32bb6d043e0bd23ddc
refs/heads/master
2021-01-22T01:21:37.485194
2013-07-24T06:19:37
2013-07-24T06:19:37
11,495,820
1
0
null
null
null
null
UTF-8
Java
false
false
5,510
java
package boteelis.vision.algorithms; import javax.imageio.ImageIO; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; /** * Efficient image manipulation example. * * @author Tommi S.E. Laukkanen */ public class Segmentation { public static void main(final String[] args) throws IOException { final String inputImageFile = args[0]; final String outputImageFile = args[1]; BufferedImage inputImage = ImageIO.read(new FileInputStream(inputImageFile)); int type = inputImage.getType(); if(type!=BufferedImage.TYPE_INT_ARGB) { BufferedImage tempImage = new BufferedImage(inputImage.getWidth(),inputImage.getHeight(),BufferedImage.TYPE_INT_ARGB); Graphics g = tempImage.createGraphics(); g.drawImage(inputImage,0,0,null); g.dispose(); inputImage = tempImage; } int width = inputImage.getWidth(); int height = inputImage.getHeight(); BufferedImage outputImage = new BufferedImage(inputImage.getWidth(),inputImage.getHeight(),BufferedImage.TYPE_INT_ARGB); long startTimeMillis = System.currentTimeMillis(); int[] inputColors = ((DataBufferInt) inputImage.getRaster().getDataBuffer()).getData(); int[] outputColors = ((DataBufferInt) outputImage.getRaster().getDataBuffer()).getData(); int tolerance = 50; for (int x = 0; x < width; x++) { float segmentRed = 0; float segmentGreen = 0; float segmentBlue = 0; int segmentCount = 0; for (int y = 0; y < height; y++) { int i = x + y * width; float red = (inputColors[i] >> 16) & 0xff; float green = (inputColors[i] >> 8) & 0xff; float blue = (inputColors[i] >> 0) & 0xff; float delta = Math.abs(red - segmentRed) + Math.abs(green - segmentGreen) + Math.abs(blue - segmentBlue); if (delta > tolerance || y == height - 1) { int color = (int) 255; color = (color << 8) + (int) segmentRed; color = (color << 8) + (int) segmentGreen; color = (color << 8) + (int) segmentBlue; for (int dy = -segmentCount; dy < (y == height - 1 ? 1 : 0); dy++) { int j = i + dy * width; outputColors[j] = color; int k = j + 1; if (k < width * height) { float red2 = (inputColors[k] >> 16) & 0xff; float green2 = (inputColors[k] >> 8) & 0xff; float blue2 = (inputColors[k] >> 0) & 0xff; float delta2 = Math.abs(red2 - segmentRed) + Math.abs(green2 - segmentGreen) + Math.abs(blue2 - segmentBlue); if (delta2 <= tolerance) { inputColors[k] = color; } } } segmentRed = red; segmentGreen = green; segmentBlue = blue; segmentCount = 1; } else { segmentRed = (segmentRed * segmentCount + red) / (segmentCount + 1); segmentGreen = (segmentGreen * segmentCount + green) / (segmentCount + 1); segmentBlue = (segmentBlue * segmentCount + blue) / (segmentCount + 1); segmentCount ++; } } } /*for (int y = 0; y < height; y++) { float segmentRed = 0; float segmentGreen = 0; float segmentBlue = 0; int segmentCount = 0; for (int x = 0; x < width; x++) { int i = x + y * width; float red = (inputColors[i] >> 16) & 0xff; float green = (inputColors[i] >> 8) & 0xff; float blue = (inputColors[i] >> 0) & 0xff; float delta = Math.abs(red - segmentRed) + Math.abs(green - segmentGreen) + Math.abs(blue - segmentBlue); if (delta > tolerance || x == width - 1) { int color = (int) 255; color = (color << 8) + (int) segmentRed; color = (color << 8) + (int) segmentGreen; color = (color << 8) + (int) segmentBlue; for (int dx = -segmentCount; dx < (x == width - 1 ? 1 : 0); dx++) { outputColors[i + dx] = color; } segmentRed = red; segmentGreen = green; segmentBlue = blue; segmentCount = 1; } else { segmentRed = (segmentRed * segmentCount + red) / (segmentCount + 1); segmentGreen = (segmentGreen * segmentCount + green) / (segmentCount + 1); segmentBlue = (segmentBlue * segmentCount + blue) / (segmentCount + 1); segmentCount ++; } } }*/ System.out.println("Manipulation took: " + (System.currentTimeMillis() - startTimeMillis) + "ms."); ImageIO.write(outputImage, "png" ,new FileOutputStream(outputImageFile, false)); } }
[ "tommi.s.e.laukkanen@gmail.com" ]
tommi.s.e.laukkanen@gmail.com
d9ce45b03c6dc2301975ca65d70711bbc5808442
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava11/Foo683.java
bfee3e06b5d617ba796b72ef215736278d1a288b
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava11; public class Foo683 { public void foo0() { new applicationModulepackageJava11.Foo682().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
d780c6c638b9995169b3f8448d1185b1eb92f496
be79f0d3b6fbd4ef444ef66b85b693b3f637c771
/src/main/java/stepic/algorithmsdatastructures/m2/l0202/PriorityQueue.java
55a06c8a50ac194819d56592c83727cfd5d27b63
[]
no_license
dendevjv/stpc-algds
9f00dc9e6f7ced6d46856534e66833941d5e44d7
add95bc2c0aa11f0ada5191ab09f8367091ef4c0
refs/heads/master
2021-01-10T11:57:48.057338
2016-02-02T10:26:11
2016-02-02T10:26:11
49,361,131
0
0
null
null
null
null
UTF-8
Java
false
false
2,011
java
package stepic.algorithmsdatastructures.m2.l0202; public class PriorityQueue { private static final int INITIAL_CAPACITY = 1; private int size; private int[] data; public PriorityQueue() { data = new int[INITIAL_CAPACITY]; } public PriorityQueue(int[] values) { data = new int[values.length]; for (int v : values) { add(v); } } public void add(int v) { ensureCapacity(size + 1); if (size > 0) { int i = size; data[i] = v; siftUp(i); } else { data[0] = v; } size++; } public int getNext() { int next = data[0]; if (size > 1) { int last = data[size - 1]; data[0] = last; siftDown(0); } size--; return next; } public int peekNext() { return data[0]; } public boolean isEmpty() { return size == 0; } private void siftUp(int i) { int p = (i - 1) / 2; if (p >= 0) { if (data[p] < data[i]) { swap(p, i); siftUp(p); } } } private void siftDown(int i) { int left = i * 2 + 1; if (left < size) { int greater = left; int right = i * 2 + 2; if (right < size && data[left] < data[right]) { greater = right; } if (data[i] < data[greater]) { swap(i, greater); siftDown(greater); } } } private void swap(int p, int i) { int tmp = data[p]; data[p] = data[i]; data[i] = tmp; } private void ensureCapacity(int capacity) { if (capacity > data.length) { data = java.util.Arrays.copyOf(data, data.length * 2); } } }
[ "dendevjv@yandex.ru" ]
dendevjv@yandex.ru
667eae448adc72139486edf2d9f6f0f1f320ad50
b92cc373c96c62b0ddc62f67fb22cc24d0fcff1f
/src/main/java/com/haoche/yltms/system/repository/FeedbackRepository.java
52a3a11ded1bf4cbfe3d4e3ae093a0194ea2ae16
[]
no_license
jiansp/yltms
f465d9e6cb801aab944a7791cd6b65e7b45e7a49
e0af2b0fc6a7d3d2452f82ece765eba8d6f9ce63
refs/heads/master
2020-04-28T22:41:45.955112
2019-05-09T15:15:01
2019-05-09T15:15:01
175,374,250
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.haoche.yltms.system.repository; import com.haoche.yltms.system.model.Feedback; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface FeedbackRepository extends JpaRepository<Feedback, String>, JpaSpecificationExecutor<Feedback> { }
[ "email@example.com" ]
email@example.com
8be370a8332da5049248cddd4ea9d01b8eb644f6
2b1821134bb02ec32f71ddbc63980d6e9c169b65
/algorithms/src/main/java/com/github/mdssjc/algorithms/introcs/chapter4/section43/Queue.java
92163a2b0189086bbbd2a65b1826ffb2b05d37c1
[]
no_license
mdssjc/study
a52f8fd6eb1f97db0ad523131f45d5caf914f01b
2ca51a968e254a01900bffdec76f1ead2acc8912
refs/heads/master
2023-04-04T18:24:06.091047
2023-03-17T00:55:50
2023-03-17T00:55:50
39,316,435
3
1
null
2023-03-04T00:50:33
2015-07-18T23:53:39
Java
UTF-8
Java
false
false
5,296
java
package com.github.mdssjc.algorithms.introcs.chapter4.section43; import com.github.mdssjc.algorithms.utils.Executor; import com.github.mdssjc.algorithms.utils.TestDrive; import edu.princeton.cs.introcs.StdIn; import edu.princeton.cs.introcs.StdOut; import java.util.Iterator; import java.util.NoSuchElementException; /** * Program 4.3.6 Generic FIFO queue (linked list). * <p> * Compilation: javac Queue.java * Execution: java Queue < input.txt * Data files: https://introcs.cs.princeton.edu/43stack/tobe.txt * <p> * A generic queue, implemented using a linked list. * <p> * % java Queue < tobe.txt * to be or not to be (2 left on queue) * * @author Marcelo dos Santos * */ /** * The {@code Queue} class represents a first-in-first-out (FIFO) * queue of generic items. * It supports the usual <em>enqueue</em> and <em>dequeue</em> * operations, along with methods for peeking at the top item, * testing if the queue is empty, getting the number of items in the * queue, and iterating over the items in FIFO order. * <p> * This implementation uses a singly-linked list with a nested class for * linked-list nodes. * The <em>enqueue</em>, <em>dequeue</em>, <em>peek</em>, <em>size</em>, and <em>is-empty</em> * operations all take constant time in the worst case. * <p> * For additional documentation, see <a href="https://introcs.cs.princeton.edu/43stack">Section 4.3</a> of * <i>Introduction to Programming in Java: An Interdisciplinary Approach</i> by Robert Sedgewick and Kevin Wayne. * * @author Robert Sedgewick * @author Kevin Wayne * * @param <Item> the generic type of an item in this queue */ @TestDrive(input = "tobe.txt", inputFile = true) public class Queue<Item> implements Iterable<Item> { private int n; private Node first; private Node last; private class Node { private Item item; private Node next; } /** * Initializes an empty queue. */ public Queue() { this.first = null; this.last = null; this.n = 0; } /** * Returns true if this queue is empty. * * @return {@code true} if this queue is empty; {@code false} otherwise */ public boolean isEmpty() { return this.first == null; } /** * Returns the number of items in this queue. * * @return the number of items in this queue */ public int size() { return this.n; } /** * Returns the number of items in this queue. * * @return the number of items in this queue */ public int length() { return this.n; } /** * Returns the item least recently added to this queue. * * @return the item least recently added to this queue * @throws NoSuchElementException if this queue is empty */ public Item peek() { if (isEmpty()) { throw new NoSuchElementException("Queue underflow"); } return this.first.item; } /** * Add the item to the queue. */ public void enqueue(final Item item) { final var oldlast = this.last; this.last = new Node(); this.last.item = item; this.last.next = null; if (isEmpty()) { this.first = this.last; } else { oldlast.next = this.last; } this.n++; } /** * Removes and returns the item on this queue that was least recently added. * * @return the item on this queue that was least recently added * @throws NoSuchElementException if this queue is empty */ public Item dequeue() { if (isEmpty()) { throw new NoSuchElementException("Queue underflow"); } final var item = this.first.item; this.first = this.first.next; this.n--; if (isEmpty()) { this.last = null; } return item; } /** * Returns a string representation of this queue. * * @return the sequence of items in FIFO order, separated by spaces */ @Override public String toString() { final var s = new StringBuilder(); for (final var item : this) { s.append(item); s.append(' '); } return s.toString(); } /** * Returns an iterator that iterates over the items in this queue in FIFO order. * * @return an iterator that iterates over the items in this queue in FIFO order */ @Override public Iterator<Item> iterator() { return new ListIterator(); } private class ListIterator implements Iterator<Item> { private Node current = Queue.this.first; @Override public boolean hasNext() { return this.current != null; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Item next() { if (!hasNext()) { throw new NoSuchElementException(); } final var item = this.current.item; this.current = this.current.next; return item; } } /** * Unit tests the {@code Queue} data type. */ public static void main(final String[] args) { Executor.execute(Queue.class, args); final var queue = new Queue<String>(); while (!StdIn.isEmpty()) { final var item = StdIn.readString(); if (!item.equals("-")) { queue.enqueue(item); } else if (!queue.isEmpty()) { StdOut.print(queue.dequeue() + " "); } } StdOut.println("(" + queue.size() + " left on queue)"); } }
[ "mdssjc@gmail.com" ]
mdssjc@gmail.com