blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
6f9face448fddd0af6b6850a04e9da9e5edef4de
8354e7cbb85241446caf415736c1b3a5744d88ce
/rvspush2.0/src/com/osh/rvs/servlet/TriggerServlet.java
a036338e5c0c4232aaae35ad49d0e66c40b73853
[ "Apache-2.0" ]
permissive
liu-xiao-bao/RVS-OGZ
1c5a5afbf270d308a01c3c0bc15e41c97468f940
92acd605fc7459b55076bdbf4a0dcdec06bee4ca
refs/heads/master
2020-04-26T01:58:39.629461
2019-02-26T10:17:41
2019-02-26T10:17:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
15,344
java
package com.osh.rvs.servlet; import static framework.huiqing.common.util.CommonStringUtil.fillChar; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Collection; import java.util.Map; import javax.mail.internet.InternetAddress; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.websocket.MessageInbound; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.TransactionIsolationLevel; import org.apache.log4j.Logger; import com.osh.rvs.common.MailUtils; import com.osh.rvs.common.PathConsts; import com.osh.rvs.common.RvsUtils; import com.osh.rvs.entity.BoundMaps; import com.osh.rvs.entity.MaterialEntity; import com.osh.rvs.inbound.OperatorMessageInbound; import com.osh.rvs.inbound.PositionPanelInbound; import com.osh.rvs.job.DailyKpiJob; import com.osh.rvs.job.DailyWorkSheetsJob; import com.osh.rvs.job.PositionStandardTimeQueue; import com.osh.rvs.mapper.push.PositionMapper; import com.osh.rvs.service.MaterialService; import com.osh.rvs.service.ProductionFeatureService; import com.osh.rvs.service.TriggerPositionService; import framework.huiqing.common.mybatis.SqlSessionFactorySingletonHolder; public class TriggerServlet extends HttpServlet { private static final long serialVersionUID = -3163557381361759907L; Logger log = Logger.getLogger("TriggerServlet"); /** 进入等待区 */ private static final String METHOD_IN = "in"; /** 工位启动作业 */ private static final String METHOD_WORK = "start"; /** 工位完成作业 */ private static final String METHOD_FINISH = "finish"; /** 工位暂停 */ private static final String METHOD_PAUSE = "pause"; /** 中断再开(成为暂停) */ private static final String METHOD_RESUME = "resume"; /** 计划中断 */ private static final String METHOD_BREAK = "break"; /** 品保返回 */ private static final String METHOD_FORBID = "forbid"; /** 检测投线过期 */ private static final String METHOD_LATEINLINE = "lateinline"; /** 工位临时报表 */ private static final String METHOD_POSITION_REPORT = "preport"; /** 点检中断通知到线长 */ private static final String METHOD_BREAK_TO_TEC = "breakToTec"; /** 分配通箱库位 */ private static final String METHOD_ASSIGN_TC_SPACE = "assign_tc_space"; private static final String POSITION_601 = "00000000051"; /** 推送信息 */ private static final String METHOD_POST_MESSAGE = "postMessage"; /** 消耗品订购 **/ private static final String METHOD_CONSUMABLE_ORDER = "consumableOrder"; /**一周KPI**/ private static final String METHOD_WEEKLY_KPI = "weeklykpi"; /** 更新配置文件 **/ private static final String METHOD_UPDATE_PROPERTIES = "prop"; /** 开始工位标准工时警报计时 **/ private static final String METHOD_START_ALARM_CLOCK_QUEUE = "start_alarm_clock_queue"; /** 取消工位标准工时警报计时 **/ private static final String METHOD_STOP_ALARM_CLOCK_QUEUE = "stop_alarm_clock_queue"; @Override protected void service(HttpServletRequest req, HttpServletResponse arg1) throws ServletException, IOException { String uri = req.getRequestURI(); uri = uri.replaceFirst(req.getContextPath(), ""); uri = uri.replaceFirst(req.getServletPath(), ""); String addr = req.getRemoteAddr(); log.info("Get finger on :" + uri + " from " + addr); // 只有本机可以访问 if (!"0:0:0:0:0:0:0:1".equals(addr) && !"127.0.0.1".equals(addr)) { log.warn("推送只限服务器本机触发"); return; } String[] parameters = uri.split("\\/"); if (parameters.length > 3) { String method = parameters[1]; String target = parameters[2]; String object = parameters[3]; String action = ""; if(parameters.length == 5){ action = parameters[4]; } if (METHOD_IN.equals(method)) { // in(parameters); } else if (METHOD_WORK.equals(method)) { if (target.startsWith(POSITION_601)) { String[] ids = target.split("-"); ProductionFeatureService pfservice = new ProductionFeatureService(); pfservice.makeQaOverTime(ids[0], ids[1], object); } else { start(parameters); } } else if (METHOD_FINISH.equals(method)) { finish(parameters); } else if (METHOD_PAUSE.equals(method)) { } else if (METHOD_RESUME.equals(method)) { } else if (METHOD_BREAK.equals(method)) { breakPosition(target, object); } else if (METHOD_FORBID.equals(method)) { //终检返品 forbid(target); } else if (METHOD_LATEINLINE.equals(method)) { // 投线延迟 checklateinline(); } else if (METHOD_POSITION_REPORT.equals(method)) { // 生成临时工作记录表 positionReport(target); } else if (METHOD_BREAK_TO_TEC.equals(method)) { // 点检中断通知设备管理员 if (parameters.length > 4) { sendBreakMail2Dt(target, object, parameters[4]); } } else if (METHOD_POST_MESSAGE.equals(method)) { postMessage(parameters); } else if (METHOD_WEEKLY_KPI.equals(method)){ DailyKpiJob DailyKpiJob = new DailyKpiJob(); DailyKpiJob.trigger(target, object, action); } else if (METHOD_UPDATE_PROPERTIES.equals(method)){ PathConsts.load(); RvsUtils.initAll(); } else if (METHOD_START_ALARM_CLOCK_QUEUE.equals(method)){ startAlarmClockQueue(parameters); } else if (METHOD_STOP_ALARM_CLOCK_QUEUE.equals(method)){ PositionStandardTimeQueue.stopAlarmClockQueue(target, object); } } } private void startAlarmClockQueue(String[] parameters) { if (parameters.length < 8) { return; } String materialId = parameters[2]; String positionId = parameters[3]; String lineId = parameters[4]; String operatorId = parameters[5]; String sStandardMinute = parameters[6]; String sCostMinute = parameters[7]; Integer iStandardMinute = null; Integer iCostMinute = null; try { iStandardMinute = Integer.parseInt(sStandardMinute); iCostMinute = Integer.parseInt(sCostMinute); } catch (Exception e) { return; } if ("571".equals(positionId)) return; PositionStandardTimeQueue.startAlarmClockQueue(materialId, positionId, lineId, operatorId, iStandardMinute, iCostMinute); } /** * 信息刷新 * @param operator_ids */ private void postMessage(String... operator_ids) { try { Thread.sleep(4000); } catch (InterruptedException e) { } Map<String, MessageInbound> bMap = BoundMaps.getMessageBoundMap(); for (String operator_id : operator_ids) { MessageInbound mInbound = bMap.get(operator_id); if (mInbound != null && mInbound instanceof OperatorMessageInbound) ((OperatorMessageInbound)mInbound).newMessage(); } } private void sendBreakMail2Dt(String message, String section_id, String position_id) throws UnsupportedEncodingException { // 推送设备管理员发生不合格邮件 String position = "XXXX"; SqlSessionFactory factory = SqlSessionFactorySingletonHolder.getInstance().getFactory(); SqlSession conn = factory.openSession(TransactionIsolationLevel.READ_COMMITTED); String subject = null; String mailContent = null; Collection<InternetAddress> toIas = null; Collection<InternetAddress> ccIas = null; try { PositionMapper pMapper = conn.getMapper(PositionMapper.class); position = pMapper.getPositionWithSectionByID(section_id, position_id); toIas = RvsUtils.getMailIas("infect.break2dm.to", conn, null, null); ccIas = RvsUtils.getMailIas("infect.break2dm.cc", conn, null, null); } catch (Exception e) { log.error(e.getMessage(), e); } finally { if (conn != null) { conn.close(); } conn = null; } // 在"+ position +"发生点检不合格,请确认。 subject = RvsUtils.getProperty(PathConsts.MAIL_CONFIG, "infect.break2dm.title", position); // 发生的点检品管理标号为\n mailContent = RvsUtils.getProperty(PathConsts.MAIL_CONFIG, "infect.break2dm.content", message.replaceAll("_n_", "\n")); MailUtils.sendMail(toIas, ccIas, subject, mailContent); } private void breakPosition(String material_id, String position_id) { // TODO Auto-generated method stub } private void positionReport(String position_work) { DailyWorkSheetsJob job = DailyWorkSheetsJob.getInstance(); job.tempMake(position_work); } private void in(String... parameters) throws IOException { String position_id = fillChar(parameters[2], '0', 11, true); String section_id = ""; String material_id = null; // boolean isLight = false; // List<String> light_assigned_operator_ids = null; if (parameters.length > 3) section_id = parameters[3]; if (parameters.length > 4) material_id = parameters[4]; if (parameters.length > 5) { // if ("1".equals(parameters[5])) // isLight = true; } // 小修理工位等待处理 // if (isLight) { // SqlSessionManager conn = RvsUtils.getTempWritableConn(); // try { // conn.startManagedSession(false); // // 找到所有有操作权限的工作人员 // OperatorMapper oMapper = conn.getMapper(OperatorMapper.class); // List<OperatorEntity> operators = oMapper.getOperatorByPositionForLight(section_id, position_id); // // // 选出适合的工作人员 // light_assigned_operator_ids = new ArrayList<String>(); // String light_assigned_operator_id = null; // boolean selectFinished = false; // boolean selectFree = false; // Date lastDate = new Date(Long.MAX_VALUE); // for (OperatorEntity operator : operators) { // light_assigned_operator_ids.add(operator.getOperator_id()); // // 如果专门人员有空闲则指派 // if (operator.getFix_response() == 1 && operator.getAction_time() == null) { // light_assigned_operator_id = operator.getOperator_id(); // selectFinished = true; // } else // // // 如果其他人员有空闲则指派 // if (!selectFinished && operator.getAction_time() == null) { // light_assigned_operator_id = operator.getOperator_id(); // selectFree = true; // } else // // // 如果没有人空闲,选最早开始作业的人员 // if (!selectFinished && !selectFree) { // if (operator.getAction_time().before(lastDate)) { // lastDate = operator.getAction_time(); // light_assigned_operator_id = operator.getOperator_id(); // } // } // } // // // 建立小修理等待记录 // ProductionAssignMapper paMapper = conn.getMapper(ProductionAssignMapper.class); // ProductionAssignEntity inst = new ProductionAssignEntity(); // inst.setAssigned_operator_id(light_assigned_operator_id); // inst.setMaterial_id(material_id); // inst.setPosition_id(position_id); // paMapper.create(inst); // // // 通知线长 // List<OperatorEntity> leaders = oMapper.getLeadersByPosition(section_id, position_id); // for (OperatorEntity leader : leaders) { // light_assigned_operator_ids.add(leader.getOperator_id()); // } // // conn.commit(); // } catch (Exception e) { // log.error(e.getMessage(), e); // conn.rollback(); // light_assigned_operator_ids = null; // } finally { // if (conn != null && conn.isManagedSessionStarted()) { // conn.close(); // } // conn = null; // } // } // 通知使用该工位的页面 Map<String, MessageInbound> map = BoundMaps.getPositionBoundMap(); synchronized(map) { for (String positionKey : map.keySet()) { MessageInbound inbound = map.get(positionKey); if (inbound == null) { log.warn("对" + positionKey + "的连接不存在了"); } else { ((PositionPanelInbound) inbound).refreshWaiting(section_id, position_id); } } } // if (light_assigned_operator_ids != null) { // map = BoundMaps.getMessageBoundMap(); // synchronized(map) { // for (String operatorKey : map.keySet()) { // if (light_assigned_operator_ids.contains(operatorKey)) { // MessageInbound inbound = map.get(operatorKey); // if (inbound == null) { // log.warn("对" + operatorKey + "的连接不存在了"); // } else { // ((OperatorMessageInbound) inbound).refreshLightWaiting(); // } // } // } // } // } // 仕挂量检查 TriggerPositionService service = new TriggerPositionService(); service.checkOverLine(position_id, section_id, material_id); } private void start(String... parameters) throws IOException { String material_id = parameters[2]; String position_id = ""; String section_id = ""; if (parameters.length > 4) { position_id = parameters[3]; section_id = parameters[4]; } else { return; } // 通知使用该工位的页面 Map<String, MessageInbound> map = BoundMaps.getPositionBoundMap(); synchronized(map) { for (String positionKey : map.keySet()) { MessageInbound inbound = map.get(positionKey); if (inbound == null) { log.warn("对" + positionKey + "的连接不存在了"); } else { ((PositionPanelInbound) inbound).refreshWaiting(section_id, position_id); } } } } private void finish(String... parameters) throws IOException { String position_id = parameters[2]; String section_id = ""; if (parameters.length > 3) section_id = parameters[3]; // 通知使用该工位的页面 Map<String, MessageInbound> map = BoundMaps.getPositionBoundMap(); synchronized(map) { for (String positionKey : map.keySet()) { MessageInbound inbound = map.get(positionKey); if (inbound == null) { log.warn("对" + positionKey + "的连接不存在了"); } else { ((PositionPanelInbound) inbound).refreshWaiting(section_id, position_id); } } } } private void forbid(String material_id) throws IOException { // 推送终检返品邮件 String subject = PathConsts.MAIL_CONFIG.getProperty("forbid.qa.title"); MaterialService service = new MaterialService(); MaterialEntity bean = service.getMaterial(material_id); String mailContent = RvsUtils.getProperty(PathConsts.MAIL_CONFIG, "forbid.qa.content", bean.getSorc_no()); SqlSessionFactory factory = SqlSessionFactorySingletonHolder.getInstance().getFactory(); SqlSession conn = factory.openSession(TransactionIsolationLevel.READ_COMMITTED); try { Collection<InternetAddress> toIas = RvsUtils.getMailIas("forbid.qa.to", conn, null, null); Collection<InternetAddress> ccIas = RvsUtils.getMailIas("forbid.qa.cc", conn, null, null); MailUtils.sendMail(toIas, ccIas, subject, mailContent); } catch (Exception e) { log.error(e.getMessage(), e); } finally { if (conn != null) { conn.close(); } conn = null; } } private void checklateinline() { // 检测 MaterialService service = new MaterialService(); service.checkInlineService(); // String position_id = "00000000053"; // TODO // String section_id = ""; // // // 通知使用该工位的页面 // Map<String, MessageInbound> map = BoundMaps.getPositionBoundMap(); // synchronized(map) { // for (String positionKey : map.keySet()) { // MessageInbound inbound = map.get(positionKey); // if (inbound == null) { // log.warn("对" + positionKey + "的连接不存在了"); // } else { // ((PositionPanelInbound) inbound).refreshWaiting(section_id, position_id); // } // } // } } }
[ "43032093+fangke-ray@users.noreply.github.com" ]
43032093+fangke-ray@users.noreply.github.com
4668ffdd8c930f7c31f8730a3c659da4473bfbfa
9bc5133ee39547683809be1833cc06a1db47217a
/HelloCDUT/src/com/emptypointer/hellocdut/activity/ShowBigImage.java
baf6305b3cdfac4c5bd3078998d334d4c7e03b09
[]
no_license
sequarius/HelloCdut_Android
443a1339a38281c124b1c3bdb1a07c206a777d3b
cd408c04692bcfc84e0baa4dabc3384582cdb125
refs/heads/master
2021-05-01T16:25:29.499949
2016-11-16T02:40:20
2016-11-16T02:40:20
37,323,114
0
0
null
null
null
null
UTF-8
Java
false
false
7,775
java
package com.emptypointer.hellocdut.activity; import java.io.File; import java.util.HashMap; import java.util.Map; import android.annotation.SuppressLint; import android.app.ProgressDialog; import android.graphics.Bitmap; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.text.TextUtils; import android.util.DisplayMetrics; import android.view.View; import android.view.View.OnClickListener; import android.widget.ProgressBar; import com.easemob.chat.EMChatConfig; import com.easemob.chat.EMChatManager; import com.easemob.cloud.CloudOperationCallback; import com.easemob.cloud.HttpFileManager; import com.easemob.util.ImageUtils; import com.easemob.util.PathUtil; import com.emptypointer.hellocdut.R; import com.emptypointer.hellocdut.task.LoadLocalBigImgTask; import com.emptypointer.hellocdut.utils.ImageCache; import com.emptypointer.hellocdut.widget.photoview.PhotoView; /** * 下载显示大图 */ public class ShowBigImage extends BaseActivity { private ProgressDialog pd; private PhotoView image; private int default_res = R.drawable.default_avatar; // flag to indicate if need to delete image on server after download private boolean deleteAfterDownload; private boolean showAvator; private String localFilePath; private String username; private Bitmap bitmap; private boolean isDownloaded; private ProgressBar loadLocalPb; @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_show_big_image); super.onCreate(savedInstanceState); image = (PhotoView) findViewById(R.id.image); loadLocalPb = (ProgressBar) findViewById(R.id.pb_load_local); default_res = getIntent().getIntExtra("default_image", R.drawable.default_avatar); showAvator = getIntent().getBooleanExtra("showAvator", false); username = getIntent().getStringExtra("username"); deleteAfterDownload = getIntent().getBooleanExtra("delete", false); Uri uri = getIntent().getParcelableExtra("uri"); String remotepath = getIntent().getExtras().getString("remotepath"); String secret = getIntent().getExtras().getString("secret"); System.err.println("show big image uri:" + uri + " remotepath:" + remotepath); //本地存在,直接显示本地的图片 if (uri != null && new File(uri.getPath()).exists()) { System.err.println("showbigimage file exists. directly show it"); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); // int screenWidth = metrics.widthPixels; // int screenHeight =metrics.heightPixels; bitmap = ImageCache.getInstance().get(uri.getPath()); if (bitmap == null) { LoadLocalBigImgTask task = new LoadLocalBigImgTask(this, uri.getPath(), image, loadLocalPb, ImageUtils.SCALE_IMAGE_WIDTH, ImageUtils.SCALE_IMAGE_HEIGHT); if (android.os.Build.VERSION.SDK_INT > 10) { task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { task.execute(); } } else { image.setImageBitmap(bitmap); } } else if (remotepath != null) { //去服务器下载图片 System.err.println("download remote image"); Map<String, String> maps = new HashMap<String, String>(); String accessToken = EMChatManager.getInstance().getAccessToken(); maps.put("Authorization", "Bearer " + accessToken); if (!TextUtils.isEmpty(secret)) { maps.put("share-secret", secret); } maps.put("Accept", "application/octet-stream"); downloadImage(remotepath, maps); } else { image.setImageResource(default_res); } image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { finish(); } }); } /** * 下载图片 * * @param remoteFilePath */ private void downloadImage(final String remoteFilePath, final Map<String, String> headers) { pd = new ProgressDialog(this); pd.setProgressStyle(ProgressDialog.STYLE_SPINNER); pd.setCanceledOnTouchOutside(false); pd.setMessage("下载图片: 0%"); pd.show(); if (!showAvator) { if (remoteFilePath.contains("/")) localFilePath = PathUtil.getInstance().getImagePath().getAbsolutePath() + "/" + remoteFilePath.substring(remoteFilePath.lastIndexOf("/") + 1); else localFilePath = PathUtil.getInstance().getImagePath().getAbsolutePath() + "/" + remoteFilePath; } else { if (remoteFilePath.contains("/")) localFilePath = PathUtil.getInstance().getImagePath().getAbsolutePath() + "/" + remoteFilePath.substring(remoteFilePath.lastIndexOf("/") + 1); else localFilePath = PathUtil.getInstance().getImagePath().getAbsolutePath() + "/" + remoteFilePath; } final HttpFileManager httpFileMgr = new HttpFileManager(this, EMChatConfig.getInstance().getStorageUrl()); final CloudOperationCallback callback = new CloudOperationCallback() { public void onSuccess(String resultMsg) { runOnUiThread(new Runnable() { @Override public void run() { DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int screenWidth = metrics.widthPixels; int screenHeight = metrics.heightPixels; bitmap = ImageUtils.decodeScaleImage(localFilePath, screenWidth, screenHeight); if (bitmap == null) { image.setImageResource(default_res); } else { image.setImageBitmap(bitmap); ImageCache.getInstance().put(localFilePath, bitmap); isDownloaded = true; } if (pd != null) { pd.dismiss(); } } }); } public void onError(String msg) { File file = new File(localFilePath); if (file.exists()) { file.delete(); } runOnUiThread(new Runnable() { @Override public void run() { pd.dismiss(); image.setImageResource(default_res); } }); } public void onProgress(final int progress) { runOnUiThread(new Runnable() { @Override public void run() { pd.setMessage("下载图片: " + progress + "%"); } }); } }; new Thread(new Runnable() { @Override public void run() { httpFileMgr.downloadFile(remoteFilePath, localFilePath, EMChatConfig.getInstance().APPKEY, headers, callback); } }).start(); } @Override public void onBackPressed() { if (isDownloaded) setResult(RESULT_OK); finish(); } }
[ "sequarius@gmail.com" ]
sequarius@gmail.com
c1f8589bb82be6439e56637db1064a32d788ddd6
3f3b26cfef3ea58a994471d9dce6f6e18ff2d752
/fr.irit.ifx.metamodel.tests/src/fr/irit/ifclipse/metamodel/IFConfig/tests/VariableSetTest.java
3f6c59d3e85faf880c2d494c9243009af4697fe5
[]
no_license
elarbi/ifx
33d1340e6cf205daa27302bc9362f9e810e81ad3
62c70a11ae4e3add8af5f4ac00490b46a750bf0d
refs/heads/master
2016-09-05T14:05:35.198104
2012-06-13T13:09:05
2012-06-13T13:09:05
4,626,304
1
0
null
null
null
null
UTF-8
Java
false
false
1,980
java
/** * <copyright> * </copyright> * * $Id$ */ package fr.irit.ifclipse.metamodel.IFConfig.tests; import fr.irit.ifclipse.metamodel.IFConfig.IFConfigFactory; import fr.irit.ifclipse.metamodel.IFConfig.VariableSet; import junit.framework.TestCase; import junit.textui.TestRunner; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Variable Set</b></em>'. * <!-- end-user-doc --> * @generated */ public class VariableSetTest extends TestCase { /** * The fixture for this Variable Set test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected VariableSet fixture = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static void main(String[] args) { TestRunner.run(VariableSetTest.class); } /** * Constructs a new Variable Set test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public VariableSetTest(String name) { super(name); } /** * Sets the fixture for this Variable Set test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void setFixture(VariableSet fixture) { this.fixture = fixture; } /** * Returns the fixture for this Variable Set test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected VariableSet getFixture() { return fixture; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#setUp() * @generated */ @Override protected void setUp() throws Exception { setFixture(IFConfigFactory.eINSTANCE.createVariableSet()); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#tearDown() * @generated */ @Override protected void tearDown() throws Exception { setFixture(null); } } //VariableSetTest
[ "ElArbi@ElArbi-VAIO" ]
ElArbi@ElArbi-VAIO
ab55a5605dc87e0b3207e2f1fc00e726db172bc5
9310225eb939f9e4ac1e3112190e6564b890ac63
/kernel/kernel-util/src/main/java/org/sakaiproject/util/FormattedText.java
87c900adaa9dcc5aac6293f36a12f17495bb46f7
[ "ECL-2.0" ]
permissive
deemsys/version-1.0
89754a8acafd62d37e0cdadf680ddc9970e6d707
cd45d9b7c5633915a18bd75723c615037a4eb7a5
refs/heads/master
2020-06-04T10:47:01.608886
2013-06-15T11:01:28
2013-06-15T11:01:28
10,705,153
1
0
null
null
null
null
UTF-8
Java
false
false
7,471
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/kernel/branches/kernel-1.3.x/kernel-util/src/main/java/org/sakaiproject/util/FormattedText.java $ * $Id: FormattedText.java 122360 2013-04-08 15:58:29Z ottenhoff@longsight.com $ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.sakaiproject.component.cover.ComponentManager; import org.sakaiproject.util.api.FormattedText.Level; import org.sakaiproject.util.api.MockFormattedText; import org.w3c.dom.Element; /** * COVER * FormattedText provides support for user entry of formatted text; the formatted text is HTML. This * includes text formatting in user input such as bold, underline, and fonts. * * @deprecated use the {@link FormattedText} service instead of this cover */ @Deprecated public class FormattedText { private static final Log log = LogFactory.getLog(FormattedText.class); private static Object LOCK = new Object(); private static org.sakaiproject.util.api.FormattedText formattedText; protected static org.sakaiproject.util.api.FormattedText getFormattedText() { if (formattedText == null) { synchronized (LOCK) { org.sakaiproject.util.api.FormattedText component = (org.sakaiproject.util.api.FormattedText) ComponentManager.get(org.sakaiproject.util.api.FormattedText.class); if (component == null) { log.warn("Unable to find the FormattedText using the ComponentManager (this is OK if this is a unit test)"); // we will just make a new mock one each time but we will also keep trying to find one in the CM return new MockFormattedText(); } else { formattedText = component; } } } return formattedText; } public static String processFormattedText(String strFromBrowser, StringBuffer errorMessages) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages); } public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages); } /** * @see org.sakaiproject.util.api.FormattedText#processFormattedText(String, StringBuilder, Level) */ public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, Level level) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages, level); } public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean useLegacySakaiCleaner) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages, useLegacySakaiCleaner); } public static String processHtmlDocument(String strFromBrowser, StringBuilder errorMessages) { return getFormattedText().processHtmlDocument(strFromBrowser, errorMessages); } public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean checkForEvilTags, boolean replaceWhitespaceTags) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages, checkForEvilTags, replaceWhitespaceTags); } public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, boolean checkForEvilTags, boolean replaceWhitespaceTags, boolean useLegacySakaiCleaner) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages, null, checkForEvilTags, replaceWhitespaceTags, useLegacySakaiCleaner); } /** * @see org.sakaiproject.util.api.FormattedText#processFormattedText(String, StringBuilder, Level, boolean, boolean, boolean) */ public static String processFormattedText(String strFromBrowser, StringBuilder errorMessages, Level level, boolean checkForEvilTags, boolean replaceWhitespaceTags, boolean useLegacySakaiCleaner) { return getFormattedText().processFormattedText(strFromBrowser, errorMessages, level, checkForEvilTags, replaceWhitespaceTags, useLegacySakaiCleaner); } public static String escapeHtmlFormattedText(String value) { return getFormattedText().escapeHtmlFormattedText(value); } public static String escapeHtmlFormattedTextSupressNewlines(String value) { return getFormattedText().escapeHtmlFormattedTextSupressNewlines(value); } public static String escapeHtmlFormattedTextarea(String value) { return getFormattedText().escapeHtmlFormattedTextarea(value); } public static String convertPlaintextToFormattedText(String value) { return getFormattedText().convertPlaintextToFormattedText(value); } public static String escapeHtml(String value, boolean escapeNewlines) { return getFormattedText().escapeHtml(value, escapeNewlines); } public static void encodeFormattedTextAttribute(Element element, String baseAttributeName, String value) { getFormattedText().encodeFormattedTextAttribute(element, baseAttributeName, value); } public static String encodeUnicode(String value) { return getFormattedText().encodeUnicode(value); } public static String unEscapeHtml(String value) { return getFormattedText().unEscapeHtml(value); } public static String processAnchor(String anchor) { return getFormattedText().processAnchor(anchor); } public static String processEscapedHtml(String source) { return getFormattedText().processEscapedHtml(source); } public static String decodeFormattedTextAttribute(Element element, String baseAttributeName) { return getFormattedText().decodeFormattedTextAttribute(element, baseAttributeName); } public static String convertFormattedTextToPlaintext(String value) { return getFormattedText().convertFormattedTextToPlaintext(value); } public static String convertOldFormattedText(String value) { return getFormattedText().convertOldFormattedText(value); } public static boolean trimFormattedText(String formattedText, int maxNumOfChars, StringBuilder strTrimmed) { return getFormattedText().trimFormattedText(formattedText, maxNumOfChars, strTrimmed); } public static String decodeNumericCharacterReferences(String value) { return getFormattedText().decodeNumericCharacterReferences(value); } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
aa26c8c1bf451890d1b55af7afc7f6135626eff3
6672a0f9f0547b147fa560dae5ff1059fb9b9792
/src/Modelo/EstadoConsulta.java
42b2b88bb89aa3e1f1115ea83f6703d63e116ad0
[]
no_license
nico22utn/geriatrico
2bb814324607397c84e4f00050bb0593a8b3c157
57ad1d0229decfc0faf84e36afeef575575b09ea
refs/heads/master
2021-08-23T05:44:18.169076
2017-12-03T17:58:07
2017-12-03T17:58:07
111,321,087
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Modelo; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; /** * * @author User */ @Entity @Table(name="estadoConsulta") public class EstadoConsulta implements Serializable{ @Id @GeneratedValue private Long id; @Column private String nombre; public EstadoConsulta() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } }
[ "nico22utn@gmail.com" ]
nico22utn@gmail.com
ea3d5658bf11c48c0cf9751c8a9064d022a6e8ae
f0abc5db2b6b184490a5cc49a8ad3d492340045e
/src/main/java/com/faa/chain/LocalTest.java
f92babdc545f3116622d056bcba653f8d6a6ff73
[]
no_license
qiuhuifa/FaaChain-V2
a0d6add8c9f3638896c8ac5deea5d35ddcd627ab
41816fb4ea5b5811d35ad89707e166ff691ac60c
refs/heads/master
2023-01-20T12:10:37.631485
2020-11-30T03:32:42
2020-11-30T03:32:42
317,100,431
0
1
null
null
null
null
UTF-8
Java
false
false
3,895
java
package com.faa.chain; import com.faa.chain.node.Transaction; import com.faa.chain.protocol.FaaHttpClient; import com.faa.chain.token.CoinType; import com.faa.chain.token.CoinsBaseUnits; import com.faa.chain.token.FaaMain; import com.faa.chain.utils.Numeric; import com.faa.chain.crypto.*; import java.math.BigDecimal; public class LocalTest { /** * 主账户配置挖矿 * @return * @throws Exception */ public static void mining() throws Exception {} /** * 创建钱包 * @return * @throws Exception */ public static CredentialsWallet createCredentialsWallet() throws Exception { ECKeyPair ecKeyPair = Keys.createEcKeyPair(); return CredentialsWallet.create(ecKeyPair); } /** * 离线签名转账 faa * @param sendAddress * @param receiveAddress * @param quantity * @return */ public static String offLineTransactionFaa(String sendAddress, String receiveAddress, String quantity, String fee, String privateKey) { try{ //转币类型 FaaMain coinType = FaaMain.get(); //生成离线交易数据 String signedTransactionData = createRawTx(sendAddress, receiveAddress, quantity, fee, privateKey, coinType); // return signedTransactionData; //将离线交易数据广播 获取交易 hash String transactionHash = FaaHttpClient.faaSendRawTransaction(signedTransactionData); if(null == transactionHash){ return "-1"; }else { return transactionHash; } }catch (Exception e){ e.printStackTrace(); return "-1"; } } // 构造 signedTransactionData private static String createRawTx(String sendAddress, String receiveAddress, String quantity, String fee, String privateKey, CoinType coinType) throws Exception { BigDecimal _quantity_ = CoinsBaseUnits.toDecimals(quantity, coinType); BigDecimal _fee_ = CoinsBaseUnits.toBaseUnit(fee, coinType); RawTransaction rawTransaction = RawTransaction.createFaaTransaction(sendAddress, receiveAddress, _quantity_.toBigInteger(), _fee_.toBigInteger()); byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, CredentialsWallet.create(privateKey)); return Numeric.toHexString(signedMessage); } // 测试 生成离线交易签名数据 public static String createOffLineTransactionFaa(String sendAddress, String receiveAddress, String quantity, String fee, String privateKey) { try{ // 币类型 FaaMain coinType = FaaMain.get(); // 生成离线交易数据 String signedTransactionData = createRawTx(sendAddress, receiveAddress, quantity, fee, privateKey, coinType); return signedTransactionData; }catch (Exception e){ e.printStackTrace(); return "-1"; } } public static void main(String[] args) throws Exception { // LJL 生成离线签名交易 String signed = createOffLineTransactionFaa("FWC58026E5D9C64D4F427E48C8A341AF50732DEB46A9", "FW35B1A634BEA64BA2CBE10DBA67029954F4DD149FE5", "30168", "1.23", "fk63c7b1b87015b0fc95d1938b757ddc221f32078ba139ce67afd229f7f9166b0c8"); System.out.println("signed transaction: " + signed); System.out.println(); // LJL 验证离线签名交易 Transaction t = new Transaction(signed); int rtn = t.validate(); if (rtn == 0){ System.out.println("from: " + t.getFrom()); System.out.println("to: " + t.getTo()); System.out.println("value: " + t.getValue()); System.out.println("fee: " + t.getFee()); }else{ System.out.println("invalid transaction"); } } }
[ "qqfifa@yeah.net" ]
qqfifa@yeah.net
bcec9b92f513b30d4613e2705f3120545aaadc4a
2ded1865eeee0f5bb09e59c2bc2dd368b5009718
/org.datasphere.mdm.data/src/main/java/org/datasphere/mdm/data/exception/package-info.java
7e690430bd821db9cf30a504cd75e1c9a756b343
[]
no_license
datasphere-oss/datasphere-mdm
4d0fcabaafc1acd05b0955e8bee4e695e9e8fd50
971079f105cf92951df658a187d34e88044ef5d4
refs/heads/main
2023-08-20T20:58:41.403280
2021-10-17T07:23:20
2021-10-17T07:23:20
417,416,422
0
0
null
null
null
null
UTF-8
Java
false
false
124
java
/** * @author Mikhail Mikhailov * Exceptions, related to data processing. */ package org.datasphere.mdm.data.exception;
[ "theseusyang@gmail.com" ]
theseusyang@gmail.com
18aa30b47bdca1bba3771cf106f1ed16003b51ea
45bc4486c0215be18a3fa283ca3800d0c5f43390
/src/hcisr/lib/HCISRUsualMethodsDefinition.java
54c3c5160502389c5a31e3898082daa89647587b
[]
no_license
gstory/CS345HCISR
49a8ec5ca6dabdc93cfb94a79a04daacf40f97c5
7bbcc8684945dba3db6733364449bc2a69e83ba3
refs/heads/master
2021-01-18T14:18:28.888440
2012-04-23T10:21:36
2012-04-23T10:21:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
package hcisr.lib; import hcisr.*; import hcisr.ast.*; //a collection of external methods for booleans public class HCISRUsualMethodsDefinition{ public HCISRExternalCodeBlock identityEqualsMeth; public HCISRUsualMethodsDefinition(HCISRClassAST boolClass){ identityEqualsMeth = new HCISRUsualMethodsIEquals(boolClass); } } class HCISRUsualMethodsIEquals extends HCISRExternalCodeBlock{ HCISRClassAST boolClass; public HCISRUsualMethodsIEquals(HCISRClassAST booleanEquals){ boolClass = booleanEquals; } public HCISRInstance run(HCISRStackFrame sf,HCISRHeapLocation hl){ HCISRInstance i1 = sf.getLocation(0); HCISRInstance i2 = sf.getLocation(1); boolean areSame = i1 == i2; HCISRInstance ir = new HCISRInstance(boolClass); ir.addExternalVariables(new HCISRInstanceBooleanVars(areSame)); return ir; } }
[ "becrloon@yahoo.com" ]
becrloon@yahoo.com
fe5ceb8034aff7f91477ff4d9d24f709c115e50f
11ed6f6da0affc32e74d8f22d058045968bf4d4b
/src/main/java/com/johnny/Config.java
8fe94ffba25a21097420d47682fdecf37a996156
[]
no_license
theonlyjohnny/java-api
f662aeb21ff21e38cd81691111e567b5c6fd1668
69f454e8c3c6a9f4eed0644427176d4c07c7b094
refs/heads/master
2021-08-15T21:41:34.566149
2017-11-18T10:30:56
2017-11-18T10:30:56
111,194,116
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.johnny; import io.dropwizard.Configuration; import org.hibernate.validator.constraints.NotEmpty; public class Config extends Configuration { @NotEmpty public String name; public static void setName(String name) { name = name; } }
[ "johnnydallas0308@gmail.com" ]
johnnydallas0308@gmail.com
19f554e50321e37ce3ac940556358f40c18c9ba5
3122f98a18a72c4988c480a1e722cd36b03f8683
/app/src/main/java/com/example/myapplication/MainActivity.java
51a903391819f871ddd068080c1113306fac3499
[]
no_license
tku-1071android/hw2-edittext-toast-change-background-YuLing1025
f8d96f4478b1e76add7fa3e85567f2212cc662fc
debc601531a799d295a81eba05aada5f03311940
refs/heads/master
2020-05-07T22:22:48.359731
2019-04-17T05:46:11
2019-04-17T05:46:11
180,943,274
0
0
null
null
null
null
UTF-8
Java
false
false
1,953
java
package com.example.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends AppCompatActivity{ private EditText ed1, ed2, ed3; private TextView txv; @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getWindow().setBackgroundDrawableResource(R.drawable.aaaaa); } int size = 15; public void response(View v){ ed1= findViewById(R.id.editText); ed2= findViewById(R.id.editText2); ed3= findViewById(R.id.editText3); txv = findViewById(R.id.textView); float height = Float.parseFloat(ed2.getText().toString()); float weight = Float.parseFloat(ed3.getText().toString()); float BMI1 = calculateBMI(height,weight); String BMI2 = String.valueOf(BMI1); txv.setTextSize(size); txv.setText(ed1.getText().toString()+ "Hello+" + ",\n"+ "your BMI is"+ BMI2); Toast.makeText(this, standardBMI(BMI1), Toast.LENGTH_SHORT).show(); } private float calculateBMI(float ht, float wt){ float BMI = (float)(wt / Math.pow((ht/100),2)); return BMI; } private String standardBMI(double st) { String alert = ""; if (st > 25) { alert = String.valueOf("You ar too heavy!!!"); getWindow().setBackgroundDrawableResource(R.drawable.bbbbb); } else if(st<18.5){ alert = String.valueOf("You are too slim."); getWindow().setBackgroundDrawableResource(R.drawable.ccccc); } else{ alert = String.valueOf("Your body is good!"); } return alert; } }
[ "aaqws345@gmail.com" ]
aaqws345@gmail.com
08b587f9a8618746ea88f3fca0b71c260db7fb6e
67a1248d981248ac9c00861ecc76d822fc637312
/modules/FiltersAPI/src/main/java/org/gephi/filters/spi/Operator.java
1a9aa72b9baa280946237e74fc11eaca8623d3d8
[ "Apache-2.0", "CDDL-1.0", "GPL-3.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-free-unknown" ]
permissive
LiXiaoRan/Gephi_improved
186d229e14dfa83caaa3b3c12a7caa832b8107ee
c9d7ca0c9ac00b2519d1b3837ccc732b1cfe33bb
refs/heads/master
2022-09-21T19:12:39.263426
2019-07-01T08:49:13
2019-07-01T08:49:13
174,827,977
0
0
Apache-2.0
2022-09-08T00:59:36
2019-03-10T13:33:43
Java
UTF-8
Java
false
false
2,144
java
/* Copyright 2008-2010 Gephi Authors : Mathieu Bastian <mathieu.bastian@gephi.org> Website : http://www.gephi.org This file is part of Gephi. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2011 Gephi Consortium. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 3 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://gephi.org/about/legal/license-notice/ or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License files at /cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]" If you wish your version of this file to be governed by only the CDDL or only the GPL Version 3, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 3] license." If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 3 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 3 code and therefore, elected the GPL Version 3 license, then the option applies only if the new code is made subject to such option by the copyright holder. Contributor(s): Portions Copyrighted 2011 Gephi Consortium. */ package org.gephi.filters.spi; import org.gephi.graph.api.Graph; import org.gephi.graph.api.Subgraph; /** * * @author Mathieu Bastian */ public interface Operator extends Filter { public Graph filter(Subgraph[] graphs); public Graph filter(Graph graph, Filter[] filters); public int getInputCount(); }
[ "997843911@qq.com" ]
997843911@qq.com
27008a5179f51c72c8f9e80526dd19277a25574c
b26a504e104f1825f59a72131811792a6945cae1
/src/main/java/me/i2000c/newalb/custom_outcomes/rewards/PackManager.java
7974ef6eab6de4bb4e0045ae5812ffed1e1d9ddf
[ "MIT" ]
permissive
I2000C/NewAmazingLuckyBlocks
55d3090b33b2fb8d7c61cf65611815411acfe789
d19468db6076767be43bf5e867302f3f77d3c715
refs/heads/master
2023-08-03T18:03:01.722830
2023-07-19T10:06:07
2023-07-19T10:06:07
158,714,364
9
2
null
null
null
null
UTF-8
Java
false
false
6,084
java
package me.i2000c.newalb.custom_outcomes.rewards; import java.io.File; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import me.i2000c.newalb.NewAmazingLuckyBlocks; import me.i2000c.newalb.utils.Logger; import me.i2000c.newalb.utils2.ItemBuilder; import me.i2000c.newalb.utils2.OtherUtils; import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.inventory.ItemStack; public class PackManager{ private PackManager(){ } static{ packList = new LinkedHashMap<>(); } private static final NewAmazingLuckyBlocks PLUGIN = NewAmazingLuckyBlocks.getInstance(); public static final File OUTCOMES_FOLDER = new File(PLUGIN.getDataFolder(), "outcome_packs"); private static final Map<String, OutcomePack> packList; public static void loadPacks(){ if(!OUTCOMES_FOLDER.exists()){ OUTCOMES_FOLDER.mkdirs(); copyDefaultPacks(); } packList.clear(); for(File file : OUTCOMES_FOLDER.listFiles()){ if(!file.getName().endsWith(".yml")){ continue; } try{ OutcomePack pack = new OutcomePack(file); packList.put(pack.getPackname(), pack); }catch(Exception ex){ Logger.err("An error occurred while loading pack: \"" + file.getName() + "\""); ex.printStackTrace(); } } } public static OutcomePack getPack(String filename){ if(filename.endsWith(".yml")) { filename = OtherUtils.removeExtension(filename); } return packList.get(filename); } public static List<OutcomePack> getPacks(){ return new ArrayList(packList.values()); } public static List<OutcomePack> getSortedPacks(){ List<OutcomePack> list = PackManager.getPacks(); list.sort((OutcomePack pack1, OutcomePack pack2) -> pack1.getPackname().compareTo(pack2.getPackname())); return list; } public static void addNewPack(OutcomePack pack, CommandSender sender){ //<editor-fold defaultstate="collapsed" desc="Code"> if(packList.containsKey(pack.getPackname())){ Logger.sendMessage("&cPack &6\"" + pack.getPackname() + "\" &calready exists", sender); }else{ packList.put(pack.getPackname(), pack); } //</editor-fold> } public static void clonePack(String name, CommandSender sender){ //<editor-fold defaultstate="collapsed" desc="Code"> name = OtherUtils.removeExtension(name); OutcomePack pack = getPack(name); if(pack == null){ Logger.sendMessage("&cPack &6\"" + name + "\" &cdoesn't exist", sender); }else{ String newName = ""; for(int i=1; i<Integer.MAX_VALUE; i++){ newName = name + "_" + i + ".yml"; File file = new File(OUTCOMES_FOLDER, newName); if(!file.exists()){ break; } } OutcomePack newPack = pack.clonePack(newName); packList.put(OtherUtils.removeExtension(newName), newPack); Logger.sendMessage("&aPack &6\"" + name + "\" &ahas been &3cloned", sender); } //</editor-fold> } public static void renamePack(String oldName, String newName, CommandSender sender){ //<editor-fold defaultstate="collapsed" desc="Code"> newName = OtherUtils.removeExtension(newName); OutcomePack pack = getPack(OtherUtils.removeExtension(oldName)); if(pack == null){ Logger.sendMessage("&cPack &6\"" + oldName + "\" &cdoesn't exist", sender); }else if(getPack(newName) != null){ Logger.sendMessage("&cPack &6\"" + newName + "\" &calready exists", sender); }else{ packList.remove(oldName); pack.renamePack(newName); packList.put(newName, pack); Logger.sendMessage("&aPack &6\"" + oldName + "\" &ahas been renamed to &b\"" + newName + "\"", sender); } //</editor-fold> } public static void changePackIcon(String name, ItemStack icon, CommandSender sender){ //<editor-fold defaultstate="collapsed" desc="Code"> Material material = icon.getType(); if(material.name().contains("POTION")){ material = Material.POTION; } ItemStack newIcon = new ItemStack(material); if(NewAmazingLuckyBlocks.getMinecraftVersion().isLegacyVersion() && material != Material.POTION){ newIcon.setDurability(icon.getDurability()); } OutcomePack pack = getPack(OtherUtils.removeExtension(name)); pack.setIcon(newIcon); String iconString = ItemBuilder.fromItem(newIcon, false).toString(); pack.saveOutcomes(); Logger.sendMessage("&aIcon of pack &6\"" + name + "\" &ahas been changed to &b" + iconString, sender); //</editor-fold> } public static void removePack(String name, CommandSender sender){ //<editor-fold defaultstate="collapsed" desc="Code"> name = OtherUtils.removeExtension(name); OutcomePack pack = getPack(name); if(pack == null){ Logger.sendMessage("&cPack &6\"" + name + "\" &cdoesn't exist", sender); }else{ packList.remove(name); pack.delete(); Logger.sendMessage("&aPack &6\"" + name + "\" &ahas been &4deleted", sender); } //</editor-fold> } private static void copyDefaultPacks(){ File examplePackFile = new File(OUTCOMES_FOLDER, "example_pack.yml"); NewAmazingLuckyBlocks.getInstance().copyResource("outcome_packs/example_pack.yml", examplePackFile); File defaultPackFile = new File(OUTCOMES_FOLDER, "default_pack.yml"); NewAmazingLuckyBlocks.getInstance().copyResource("outcome_packs/default_pack.yml", defaultPackFile); } }
[ "prueb123i@outlook.es" ]
prueb123i@outlook.es
d821a64535a3d5e64d8bca308637575fdc1c62bf
2a33098ec27613ca8012f313a31f8acaff78b353
/src/loops/Factorial.java
4c2d5f094d5e9f2a7f924dc39aeea0d9096272fc
[]
no_license
NG10101/Java
9a1a186c55852d83591b64c66c9e8d819c544b7f
a483e3c8835b900598a485891ce8c0a4ba39cf61
refs/heads/master
2023-07-21T21:38:28.479470
2021-09-06T16:19:16
2021-09-06T16:19:16
403,686,199
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package loops; import java.util.Scanner; public class Factorial { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int factorial = 1; for(int i = n; i >= 1; i--) { factorial = factorial * i; } System.out.println(factorial); } }
[ "rocconimesh@gmail.com" ]
rocconimesh@gmail.com
857578fa5f4cb85812e971a4703a6bf301bb6529
246c2e66aec7bdb3335296d8e40df64e48eab25c
/src/stringsEx/Check.java
0d83c8c4c9f8effbc9e4b581546191e0c9975738
[]
no_license
avinashb9/JAVAPrograms
64832eb608199b530a2d6106eadabcb1d155e2b5
35a702a1f2f5a463c958a48c005d50c1b842a4cf
refs/heads/master
2023-06-24T10:38:28.434762
2023-06-08T16:32:43
2023-06-08T16:32:43
176,569,388
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package stringsEx; public class Check { int Check_a, Check_b; Check(int a, int b) { Check_a = a; Check_b = b; } public Check() { // TODO Auto-generated constructor stub } public static void main(String[] args) { // TODO Auto-generated method stub Check Check = new Check(); System.out.println(Check.Check_a+" "+Check.Check_b); } }
[ "avinash.bommidi93@gmail.com" ]
avinash.bommidi93@gmail.com
8ac4a1995b4a434476c1002d6b6c9cecc33abe10
40583bc0d2a7393d066d7de1273614aeaf5b98a6
/gowtham/Tables2.java
c1725d18f28cb59e275fde4e279774851f867707
[]
no_license
pbravichandhar/Neophytes-2k19
048c1e5c4686422e80fbe62f026142ff0f81d3c6
4a8f87968de71f9fa00645799689c71af58b7938
refs/heads/master
2023-01-05T20:51:08.414583
2020-02-25T07:54:50
2020-02-25T07:54:50
227,519,300
0
0
null
2022-12-22T14:25:54
2019-12-12T04:23:04
Java
UTF-8
Java
false
false
346
java
import java.util.Scanner; class Tables2{ public static void main(String[] args) { Scanner s=new Scanner(System.in); int n=s.nextInt(); int m=s.nextInt(); fun(n,m); } static void fun(int a,int b){ for(int i=1;i<=b;i++) { System.out.println(a+"*"+i+"="+(a*i)); } } }
[ "aplkgowtham0711@gmail.com" ]
aplkgowtham0711@gmail.com
643fcb9cb2ccbcce02dc0eb04ab8dab05a99a12e
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/chart/renderer/category/CategoryItemRenderer_setSeriesFillPaint_510.java
859443e01764183859d18929502e23f6fbc60b3c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,593
java
org jfree chart render categori plug object link categori plot categoryplot displai individu data item link categori dataset categorydataset defin method provid render implement custom render extend link abstract categori item render abstractcategoryitemrender render attribut defin seri approach base cover case seri defin categori item render categoryitemrender legend item sourc legenditemsourc set fill paint seri request send link render chang event rendererchangeev regist listen param seri seri index base param paint paint code code permit param notifi notifi listen seri fill paint getseriesfillpaint set seri fill paint setseriesfillpaint seri paint paint notifi
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
7e0b220f15f855c45563373256b263fbc82f39e7
8f1a1362b465c764d1167bcd9f056f90f0b0b9ed
/src/test/java/top/richardhao/lean/test/base/stringtest/StringFormat.java
a59b5983f3f01016a5cacbe533e6894f1f30b798
[]
no_license
RichardHaoFang/learn
d2a09a27e5aabf6ef776b7741563ee806b534a19
db4cf14274763816c95bb678c4e51429a1a36e3a
refs/heads/master
2021-06-30T00:58:07.425984
2019-12-26T08:29:36
2019-12-26T08:29:36
176,927,805
1
0
null
2020-10-13T12:28:26
2019-03-21T11:04:49
Java
UTF-8
Java
false
false
472
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package top.richardhao.lean.test.base.stringtest; /** * * @author RichardHaoFang */ public class StringFormat { public static void main(String[] args) { System.out.format("Row1: [%d %f]\n", 10, 12.123); System.out.printf("Row1: [%d %f]\n", 10, 12.123); } }
[ "1358125229@qq.com" ]
1358125229@qq.com
01500064707f394abdbb6e42d005718d852a70e9
98b23f9401023e70f60231fa0382436ba3668691
/voice/src/mvc/com/app/tools/QrCodeUtil.java
f7ec72832deccfb659645ca902e6d760719ab68b
[]
no_license
copperdong/Speech-standard-evaluation
5294847bcd842b9846f11aca7f32112213383b22
366d573fd12de1f34c46b5687d3e9f15208d61d9
refs/heads/master
2022-03-01T13:02:06.197641
2019-07-29T02:40:03
2019-07-29T02:40:03
null
0
0
null
null
null
null
GB18030
Java
false
false
3,145
java
package com.app.tools; import java.awt.image.BufferedImage; import java.io.File; import java.nio.file.FileSystems; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; import com.google.zxing.BarcodeFormat; import com.google.zxing.Binarizer; import com.google.zxing.BinaryBitmap; import com.google.zxing.DecodeHintType; import com.google.zxing.EncodeHintType; import com.google.zxing.LuminanceSource; import com.google.zxing.MultiFormatReader; import com.google.zxing.MultiFormatWriter; import com.google.zxing.Result; import com.google.zxing.client.j2se.BufferedImageLuminanceSource; import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import com.google.zxing.common.HybridBinarizer; import com.app.tools.RandomString; public class QrCodeUtil { private String fileContextPath; /** * 生成二维码 * <p> * TODO(这里描述这个方法详情– 可选) * * @param content 二维码的内容 * @param filePath临时文件的路径 */ public void encodeQrCode(String content, String filePath) { try { //需要创建一个临时文件,为了防止出现并发问题,现把二维码文件名用16为的UUID来命名 RandomString ran = new RandomString(); String fileName = ran.getRandomString(16) + ".png"; int width = 300; //二维码图像宽度 int height = 300; // 二维码图像高度 String format = "png";// 图像类型 Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>(); hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, width, height, hints);// 生成矩阵 Path path = FileSystems.getDefault().getPath(filePath, fileName); //由于生成二维码的方法没有返回值,现将二维码临时路径进行保存 this.setFileContextPath(path.toString()); MatrixToImageWriter.writeToPath(bitMatrix, format, path);// 输出图像 //System.out.println("输出成功."); } catch (Exception e) { // TODO: handle exception } } /** * 解析二维码 */ public void decodeQrCode(String filePath) { BufferedImage image; try { image = ImageIO.read(new File(filePath)); LuminanceSource source = new BufferedImageLuminanceSource(image); Binarizer binarizer = new HybridBinarizer(source); BinaryBitmap binaryBitmap = new BinaryBitmap(binarizer); Map<DecodeHintType, Object> hints = new HashMap<DecodeHintType, Object>(); hints.put(DecodeHintType.CHARACTER_SET, "UTF-8"); Result result = new MultiFormatReader().decode(binaryBitmap, hints);// 对图像进行解码 System.out.println("图片中内容: "); System.out.println("author: " + result.getText()); System.out.println("图片中格式: "); System.out.println("encode: " + result.getBarcodeFormat()); } catch (Exception e) { e.printStackTrace(); } } public String getFileContextPath() { return fileContextPath; } public void setFileContextPath(String fileContextPath) { this.fileContextPath = fileContextPath; } }
[ "562804497@qq.com" ]
562804497@qq.com
1a139a9907284344ca5b1956546ff09b738fc181
814dede64557ee6ed01c4eb84742700f61874fc1
/spring-advanced/src/main/java/com/yujianfei/aware/AwareService.java
a16226cac3b0d8eee367f4783a304cfa1d83bbf8
[]
no_license
yujianfei1986/highlight-spring4
9dd8a0887620fc1c5711b1157385afb70f5b6062
e699aed3cb708f091e576deb5eaf0aa740c2474f
refs/heads/master
2022-12-23T13:41:46.245808
2021-05-07T01:06:17
2021-05-07T01:06:17
230,220,823
2
0
null
2022-12-16T05:46:50
2019-12-26T07:54:08
Java
UTF-8
Java
false
false
1,708
java
package com.yujianfei.aware; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.BeanNameAware; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.stereotype.Service; import org.apache.commons.io.IOUtils; import java.io.IOException; /** * Created by Admin on 2019/12/6. * 集成 *Aware接口,获取spring Application Context服务 */ @Service("AwareService") public class AwareService implements BeanNameAware, BeanFactoryAware, ResourceLoaderAware { private String beanName; private ResourceLoader loader; private BeanFactory beanFactory; @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } @Override public void setBeanName(String beanName) { this.beanName = beanName; } @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.loader = resourceLoader; } public void outputResult() { System.out.println("Bean的名称为:" + beanName); System.out.println("AwareService的Bean类型为单例:" + beanFactory.isSingleton("AwareService")); Resource resource = loader.getResource("classpath:test.txt"); try { System.out.println("ResourceLoader加载的文件内容为: " + IOUtils.toString(resource.getInputStream())); } catch (IOException e) { e.printStackTrace(); } } }
[ "daredevil2@126.com" ]
daredevil2@126.com
197d8c22e3aa7a62fb511bd3a37555a3f11385c0
d98c0c191115b5e068128ed14ee97390709dfe9f
/platform-shop/src/main/java/com/platform/entity/GoodsIssueEntity.java
907948c298f46bc33283940044c3730c6c71ef1d
[ "Apache-2.0" ]
permissive
ivancoacher/weimall
1e5e02bdb8beebbd70bda8235067a876d33ecdb4
962ac8ccbf088ad2c4adf38bfa171c3ef5dcd796
refs/heads/master
2023-09-03T23:33:52.328482
2019-02-19T13:04:36
2019-02-19T13:04:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package com.platform.entity; import java.io.Serializable; /** * 实体 * 表名 nideshop_goods_issue * * * @date 2017-08-23 14:12:34 */ public class GoodsIssueEntity implements Serializable { private static final long serialVersionUID = 1L; //主键 private Integer id; //问题 private String question; //回答 private String answer; /** * 设置:主键 */ public void setId(Integer id) { this.id = id; } /** * 获取:主键 */ public Integer getId() { return id; } /** * 设置:问题 */ public void setQuestion(String question) { this.question = question; } /** * 获取:问题 */ public String getQuestion() { return question; } /** * 设置:回答 */ public void setAnswer(String answer) { this.answer = answer; } /** * 获取:回答 */ public String getAnswer() { return answer; } }
[ "liubaoq@gmail.com" ]
liubaoq@gmail.com
41631a1baf30f48bbe7f44c542a0059a50a5607a
3c51f3dc79613071b4acd79a5bf3ebc1b17cd8a7
/users/user-server/src/main/java/top/catalinali/user/utils/ResultVOUtil.java
b16376d42abd07b1cec6d13465400d68340e316d
[]
no_license
catalinaLi/springcloud_sell
a6d3983d0bb8a53bb8d20b3c2ee031e8872f29d3
6a9c644d9e85a1a2e3470d4750a59a2cbf84e87f
refs/heads/master
2020-03-19T09:35:34.528089
2018-07-10T08:52:30
2018-07-10T08:52:30
135,699,335
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
package top.catalinali.user.utils; import top.catalinali.user.enums.ResultEnum; import top.catalinali.user.vo.ResultVO; public class ResultVOUtil { public static ResultVO success(Object object) { ResultVO resultVO = new ResultVO(); resultVO.setCode(0); resultVO.setMsg("成功"); resultVO.setData(object); return resultVO; } public static ResultVO success() { ResultVO resultVO = new ResultVO(); resultVO.setCode(0); resultVO.setMsg("成功"); return resultVO; } public static ResultVO error(ResultEnum resultEnum) { ResultVO resultVO = new ResultVO(); resultVO.setCode(resultEnum.getCode()); resultVO.setMsg(resultEnum.getMessage()); return resultVO; } }
[ "lixin@weyao.com" ]
lixin@weyao.com
5a2dac7171ea3f768747dd357341aed5d2a87183
d3ccd36232fe5ce021d92a5e88bdb6d52adcb00c
/src/lambda/CalculadoraInt.java
ed7736feb65e4a86ce0f2ed241d9d3642e2d0f5f
[]
no_license
LuisPerez0790/java8
a9f1ec8b2d37739286a870d8727a1464821810ea
47a3ee369b542251dcec7c9529102fd9f6669dd0
refs/heads/master
2020-03-23T13:43:48.899705
2018-08-21T23:22:51
2018-08-21T23:22:51
141,633,991
0
0
null
null
null
null
UTF-8
Java
false
false
56
java
package lambda; public interface CalculadoraInt { }
[ "luis_perez992@hotmail.com" ]
luis_perez992@hotmail.com
1fd20fc4e7762228f57765851129b57040391029
7d1c29ea5a1e021e23351fdf06238813ca021430
/src/main/java/core/util/SqlData.java
ab4ca6dfc7f9a993cc75e836b046610f734b19f7
[]
no_license
qiwenxue/simple-mvc-lib
c5f0052e60f263f4d2f99f1384e8b9162c05df56
c7b819cd298a1ca20f02856ade53c06b216a29ac
refs/heads/master
2022-12-13T01:14:21.107157
2021-08-15T09:46:53
2021-08-15T09:46:53
200,182,318
0
1
null
2021-11-03T17:34:19
2019-08-02T06:55:17
Java
UTF-8
Java
false
false
272
java
package core.util; import java.io.Serializable; @SuppressWarnings("serial") public class SqlData implements Serializable{ private String sql; public String getSql() { return sql; } public void setSql(String sql) { this.sql = sql; } }
[ "qiwenxue@126.com" ]
qiwenxue@126.com
46094146f0d76cd0f5d9594e82454d1ddeb7d08f
875bf6ea2f0c00caaf6bf005249af1ca6428caa8
/DoublyLinkedList.java
59a5856cad154b2e02c0de37e88eb193549afeb3
[]
no_license
yordanovagabriela/Data-Structures
1e2159f357ed26aa332d8a48e67d227aa1cb79d7
6f6fd210ccc1f3be2d9374e19f9522db2bf38e5d
refs/heads/master
2021-01-10T01:06:34.179955
2015-12-10T21:54:42
2015-12-10T21:54:42
47,640,366
0
0
null
null
null
null
UTF-8
Java
false
false
3,998
java
import java.util.*; public class DoublyLinkedList { private class Node { Object element; Node previousNode; Node nextNode; Node(Object element) { this.element = element; } } private Node head; private Node tail; private int count; public DoublyLinkedList() { head = null; count = 0; } public void insertAtLastPosition(Object item) { Node newNode = new Node(item); if(head == null) { head = newNode; } else { tail.nextNode = newNode; newNode.previousNode = tail; } tail = newNode; count++; } public void insertAtFirstPosition(Object item) { Node newNode = new Node(item); if(head == null) { tail = newNode; } else { head.previousNode = newNode; } newNode.nextNode = head; head = newNode; count++; } public void insertAtInnerPosition(Object item, int index) { if(index >= count || index < 0) { throw new IndexOutOfBoundsException("Invalid index: " + index); } if(index == 0) { insertAtFirstPosition(item); return; } if(index == count - 1) { insertAtLastPosition(item); return; } Node newNode = new Node(item); Node current = head; int ind = 0; while(current.nextNode != null && ind != index) { current = current.nextNode; ind++; } (current.previousNode).nextNode = newNode; newNode.previousNode = (current.previousNode); newNode.nextNode = current; current.previousNode = newNode; count++; } public void deleteFirst() { if(head.nextNode == null) { tail = null; } else { head.nextNode.previousNode = null; } head = head.nextNode; count--; } public void deleteLast() { if(head.nextNode == null) { head = null; } else { (tail.previousNode).nextNode = null; } tail = tail.previousNode; count--; } public void deleteIndex(int index) { if(index >= count || index < 0) { throw new IndexOutOfBoundsException("Invalid index: " + index); } if(index == 0) { deleteFirst(); return; } if(index == count - 1) { deleteLast(); return; } Node current = head; int ind = 0; while(current.nextNode != null && ind != index) { ind++; current = current.nextNode; } (current.previousNode).nextNode = current.nextNode; (current.nextNode).previousNode = current.previousNode; count--; } public int deleteItem(Object item) { if(!contains(item)) { return -1; } int index = 0; Node current = head; while(current != null) { if((current.element != null && current.element.equals(item)) || (current.element == null) && (item == null)) { break; } current = current.nextNode; index++; } deleteIndex(index); return index; } public boolean contains(Object item) { int index = indexOf(item); boolean found = (index != -1); return found; } public int indexOf(Object item) { int index = 0; Node current = head; while(current != null) { if((current.element != null && current.element.equals(item)) || (current.element == null) && (item == null)) { return index; } current = current.nextNode; index++; } return -1; } public int getLength() { return count; } public Object elementAt(int index) { if(index >= count || index < 0) { throw new IndexOutOfBoundsException("Invalid index: " + index); } Node currentNode = this.head; for(int i = 0; i < index; i++) { currentNode = currentNode.nextNode; } return currentNode.element; } public Object[] getArray() { Object[] objects = new Object[getLength()]; for(int i = 0; i < getLength(); i++) { objects[i] = elementAt(i); } return objects; } public static void main(String[] args) { DoublyLinkedList dll = new DoublyLinkedList(); dll.insertAtLastPosition(1); dll.insertAtLastPosition(2); dll.insertAtLastPosition(5); //dll.deleteIndex(2); //dll.insertAtInnerPosition(0, 2); //dll.deleteIndex(1); //dll.deleteFirst(); //dll.deleteLast(); //dll.deleteLast(); for(Object o: dll.getArray()) { System.out.println(o); } } }
[ "gabriela.georgieva.yordanova@gmail.com" ]
gabriela.georgieva.yordanova@gmail.com
68cbe7d913fcbeb72240ca168ba17acbffda907c
7ee89b9bfc180161c48dc31d41f0fc15965a9188
/biliApp/src/main/java/io/ionic/ylnewapp/custom/NoTouchScrollViewpager.java
33f2ffbef1ffd7c7760130d5531c4693523cb800
[]
no_license
Lavned/myProject
dcec588d7779fa284f6aef9dc57499df0d04e0f8
3164cbf25f17ba12624dc9de4b95a7ad2057ddf0
refs/heads/master
2021-05-10T15:27:38.535500
2020-07-16T07:15:33
2020-07-16T07:15:33
118,551,170
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package io.ionic.ylnewapp.custom; import android.content.Context; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; /** * Created by guoziwei on 2017/11/15. */ public class NoTouchScrollViewpager extends ViewPager { public NoTouchScrollViewpager(Context context) { this(context, null); } public NoTouchScrollViewpager(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean onTouchEvent(MotionEvent ev) { return false; } @Override public boolean onInterceptTouchEvent(MotionEvent arg0) { return false; } }
[ "1464208707@qq.com" ]
1464208707@qq.com
f7ce16ebbc6edc87daddfea1e975a7c1efacd1be
dc1f024587288ac1ee24d15917ba1cc7c7fecd26
/src/EmployeeAPI.java
24a49ca036454c086ffd74d57a81a197f41c17d7
[]
no_license
KoshRules/Employee-Project
daf88890f4aff79f83113f26f9b1151273534421
62d484b59c78efdbde56017590e2c91f2bde99be
refs/heads/master
2023-02-04T21:00:33.570402
2020-12-20T11:48:51
2020-12-20T11:48:51
320,056,694
0
0
null
null
null
null
UTF-8
Java
false
false
4,320
java
import java.lang.reflect.Array; import java.util.*; public class EmployeeAPI { private ArrayList<Employee> employees; private EmployeeAPI employeeAPI; /** * EmployeeAPI constructor */ public EmployeeAPI() { employees = new ArrayList<>(); } /** * Get & Set */ public ArrayList<Employee> getEmployees() { return employees; } public void setEmployees(ArrayList<Employee> employees) { this.employees = employees; } public void addEmployee(Employee employee) { //get the employee information; //add it to employee arraylist; employees.add(employee); } //TODO public boolean addEmployeeToDepartment(int x, int y) { //find the employee; //add the employee to department arraylist; //show department list with employee added to it; return true; } public Employee getEmployee(int index) { Employee employee = null; if (Utilities.validIndex(index, employees)) { employee = employees.get(index); } return employee; } public Employee removeEmployee(int index) { if (Utilities.validIndex(index, employees)) { Employee employee = employees.get(index); employees.remove(index); return employee; } return null; } public int numberOfEmployees() {return employees.size();} public String listEmployees() { if (employees.size() <= 0) { return "No employees in list"; }else { String listOfEmployees = ""; for (int i = 0; i < employees.size(); i++) { listOfEmployees = listOfEmployees + i + ": " + employees.get(i) + "\n"; } return listOfEmployees; } } /** * @param manager builds and returns a list of employees(and their associated index num in the arraylist) * by their manager. each on a new line * @return this manager does not exist; if the manager doesnt exist * This manager has no employees in their department; if the manager exists, but has no employees * in their department */ //TODO public String listManagerEmployees(Manager manager) {return null;} /** * builds and returns a list of employees who are managers * @return No Managers in the system; if there are no anagers in the system */ //TODO public String listManagerEmployees() { return null; } /** * @param index searches through the employees collection for the employee with the supplied second name * @return the position of the employee; if employee exists * otherwise return -1 */ //TODO //public int searchEmployees(String index) {return null;} //TODO //public double totalSalariesOwed() {return null;} //TODO //public double avgSalariesOwed() {return null;} /** * calculates the employee with the highest (total) salary * @return employee object of that employee * null; if no employees */ //TODO public Employee employeeWithHighestPay() {return null;} /** * sorts the employees object in ascending alphabetical order (firstname) of employees */ //TODO public void sortEmployeesByFirstName() { //sort Employee ArrayList by fName asc alphabetical Collections.sort(employees); } /** * sorts the employees object in ascending alphabetical order (secondname) of employees */ //TODO public void sortEmployeesBySecondName() { //sort Employee ArrayList by sName asc alphabetical Employee sName[] = employees.get(listEmployees()); Collections.sort(employees); } //TODO private void swapEmployees(ArrayList<Employee> employees, int x, int y) { //get list of all employees //take first name index num to be swapped //take second name index num and switch with first index num //display updated employee list } //TODO public void load() {} //TODO public void save() {} }
[ "valen0866@msn.com" ]
valen0866@msn.com
c39619fe466aac5370b48fabbbf337d9af536faf
6fab41d76fa27f7dc4437212d681a2b53e5e7344
/lab10/Average.java
731e7cfc9b48227a89e3fe7dcaafcdb7fb0a500f
[]
no_license
gcc219/CSE2
0e1fc16c2876239d86e74f74bd47dbc728ba12e2
0936107cd9cad18fb4ef9896b45dbb6ea269bcb9
refs/heads/master
2016-09-06T06:16:24.714261
2015-11-20T14:36:21
2015-11-20T14:36:21
41,548,324
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
//George Cooper //CSE 002 //October 30, 2015 import java.util.Scanner; public class Average { public static void main(String[] args) { int n = 0; double average = 0; int sum = 0; Scanner myScanner = new Scanner(System.in); System.out.println("How many elements would you like your array to have?"); n = myScanner.nextInt(); int myArray[] = new int[n]; //For loop for initializing the array with random values: for (int i = 0; i < n; i++) { myArray[i] = (int)(Math.random() * 101); } //For loop for printing the values in the array System.out.print("The values in the array are: "); for (int i = 0; i < n; i++) { System.out.print(myArray[i] + " "); } System.out.println(""); //For loop for summing elements and creating average for (int i = 0; i < n; i++) { sum = sum + myArray[i]; } average = (double)sum/n; System.out.println("The average of the array is: " + average); //For loop for printing elements greater than average System.out.print("These values are above the average: "); for (int i = 0; i < n; i++) { if (myArray[i] >= average) System.out.print(myArray[i] + " "); } System.out.println(); } }
[ "gcc219@lehigh.edu" ]
gcc219@lehigh.edu
de4e07cf72f59cb68a442d391c1c09628cd9d8d6
fb5815e7f0d34da61b6e9ac2498b00decb420c94
/src/main/java/service/AnimalService.java
ab9c83351bcf997e71fc2dea3b92fa38faf48a80
[]
no_license
HenriqueBSS/bhenrique
56f11f3a9b02d38ded22ea8644bcdd213b98a9ff
bad74373966c92f18db8928faef7602379d80239
refs/heads/master
2022-11-20T11:14:09.800324
2019-12-14T01:00:39
2019-12-14T01:00:39
217,629,713
0
0
null
2022-11-16T12:36:36
2019-10-25T23:38:03
Java
UTF-8
Java
false
false
2,523
java
package service; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Set; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.inject.Inject; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; import javax.validation.ValidatorFactory; import dao.AnimalDAO; import dto.ViolacoesValidacao; import exception.ValidacaoException; import modelo.Animal; @Stateless @TransactionAttribute(TransactionAttributeType.SUPPORTS) public class AnimalService implements Serializable{ private static final long serialVersionUID = 1L; @Inject private AnimalDAO dao; public AnimalService() {} @TransactionAttribute(TransactionAttributeType.REQUIRED) public void cadastarAnimal(Animal animal) throws ValidacaoException{ validaAnimal(animal); dao.Cadastrar(animal); } public List<Animal> listarAnimal() { return dao.listaTodos(); } public Animal getAnimalPorId(Integer Cod_animal) { return dao.BuscaPorId(Cod_animal); } @TransactionAttribute(TransactionAttributeType.REQUIRED) public boolean removerAnimal(Integer Cod_animal) { boolean resultado = dao.removePorId(Cod_animal); dao.comitarCache(); return resultado; } @TransactionAttribute(TransactionAttributeType.REQUIRED) public void atualizarAnimal(Animal animal) throws Exception{ dao.Atualiza(animal); } @TransactionAttribute(TransactionAttributeType.REQUIRED) public void trocaAnimal(Integer Cod_animal, Animal animal) throws Exception{ animal.setCod_animal(Cod_animal); dao.Atualiza(animal); dao.comitarCache(); } @TransactionAttribute(TransactionAttributeType.REQUIRED) public void atualizarAnimal(Integer Cod_animal, Animal animal) throws Exception{ Animal AnimalDoBanco = dao.BuscaPorId(Cod_animal); AnimalDoBanco.atualizarCampos(animal); dao.Atualiza(AnimalDoBanco); dao.comitarCache(); } public void validaAnimal(Animal animal) throws ValidacaoException { ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); Validator validator = factory.getValidator(); Set<ConstraintViolation<Animal>> violations = validator.validate(animal); if(violations.size() > 0) { List<String> mensagens = new ArrayList<String>(); for (ConstraintViolation<Animal> vi : violations) { mensagens.add(vi.getMessage()); } throw new ValidacaoException(new ViolacoesValidacao(mensagens)); } } }
[ "20181D13GR0133@LABS.GARANHUNS.IFPE" ]
20181D13GR0133@LABS.GARANHUNS.IFPE
01b04f4429ceb0d87286cb3864ccd8df852c5d4e
1ea5d20d038e6b8129b7bd97b7f89755383089d5
/src/main/java/com/conceptboard/social/provider/forcedotcom/api/response/Attachment.java
4fb75e018791248f38f4ba1a74a57218f754277c
[]
no_license
conceptboard/dreamforce-12
4c2af0c5a1b8eba006ee47a0830169d92e409269
6c710bf20c667cf41bf871371b60d8b6c6fcb1f3
refs/heads/master
2016-09-06T06:04:46.630927
2012-09-20T19:40:12
2012-09-20T19:40:12
5,783,177
0
0
null
null
null
null
UTF-8
Java
false
false
106
java
package com.conceptboard.social.provider.forcedotcom.api.response; public interface Attachment { }
[ "christian.schroeder@conceptboard.com" ]
christian.schroeder@conceptboard.com
b120607cca2ac316848f6e35498ce7b8197f2cb8
782bfee285ebda125718a0b6134a7f983bab7abc
/spring-aop2/src/com/spring/aop/Main.java
5fd9c33450fac9d1016c4f44a2080535346916db
[]
no_license
dancesfly/spring
3d9626bb7c39c9aeb9000585cb7fa0dcdcd99de9
22dcca917fcb3e0e67ab00f8f2a50464447d6a02
refs/heads/master
2020-12-02T06:41:08.497176
2017-08-09T07:18:53
2017-08-09T07:18:53
96,877,982
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
package com.spring.aop; import org.springframework.context.ApplicationContext; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Main { public static void main(String[] args) { ApplicationContext ctx = new ClassPathXmlApplicationContext("hello-aop2.xml"); CarInterface carAop = ctx.getBean(CarInterface.class); Integer reslut = null; reslut = carAop.div(100, 1); System.out.println("reslut " + reslut); ((AbstractApplicationContext) ctx).close(); } }
[ "dancesfly@126.com" ]
dancesfly@126.com
445f235a599349bd5834c5e68fe79f3e0c08d020
0afd97a2277ddf8ebc955fee8497a964a770520f
/src/main/java/ru/elomonosov/level/InFileLevel.java
fbfbc5e6f8e56698236d636ca1c2d3e71a334132
[]
no_license
elomonosov/cache
5aa92394cf1801a1dfe39fb496cd8f478dcbbbe2
b11beeb5eeaa62bc7a1919ba6281cb8d28593bd8
refs/heads/master
2021-01-10T21:40:14.050778
2015-10-01T16:14:42
2015-10-01T16:14:42
40,060,280
0
0
null
null
null
null
UTF-8
Java
false
false
4,849
java
package ru.elomonosov.level; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.elomonosov.cache.CacheStrategy; import ru.elomonosov.cache.Cacheable; import ru.elomonosov.util.ClassNameUtil; import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Random; public class InFileLevel implements CacheLevel { private static final Logger logger = LoggerFactory.getLogger(ClassNameUtil.getCurrentClassName()); private Map<Long, Path> cachePaths; int maxSize; int order; CacheStrategy cacheStrategy; public InFileLevel(CacheStrategy cacheStrategy, int maxSize, int order) { this.maxSize = maxSize; this.order = order; this.cacheStrategy = cacheStrategy; switch (cacheStrategy) { case LEAST_RECENTLY_USED: { this.cachePaths = new LinkedHashMap<>(); break; } } } @Override public void put(Cacheable cacheable) throws CacheLevelException { Path oldPath = cachePaths.get(cacheable.getId()); if (oldPath != null) { // remove } else { try { Path path = Files.createTempFile(Paths.get(System.getProperty("user.dir"), "tmp"), "cache", ".tmp"); try (ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(path.toFile())))) { out.writeObject(cacheable); } cachePaths.put(cacheable.getId(), path); } catch (IOException e) { throw new CacheLevelException("", e); } } } @Override public Cacheable get(long id) throws CacheLevelException { Path path = cachePaths.get(id); Cacheable result; if (path == null) { result = null; } else { try { try (ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(path.toFile())))) { result = (Cacheable) in.readObject(); } } catch (IOException | ClassNotFoundException e) { throw new CacheLevelException("", e); } } return result; } @Override public Cacheable getByStrategy() throws CacheLevelException { Cacheable result; Long id = keyByStrategy(); if (id == null) { result = null; } else { result = get(id); } return result; } @Override public Cacheable pull(long id) throws CacheLevelException { Cacheable result = get(id); if (result != null) { try { Files.delete(cachePaths.get(id)); cachePaths.remove(id); } catch (IOException e) { throw new CacheLevelException("", e); } } return result; } @Override public Cacheable pullByStrategy() throws CacheLevelException { Cacheable result; Long id = keyByStrategy(); if (id == null) { result = null; } else { result = pull(id); } return result; } @Override public int size() throws CacheLevelException { return cachePaths.size(); } @Override public int maxSize() throws CacheLevelException { return maxSize; } @Override public boolean isFull() throws CacheLevelException { return cachePaths.size() == maxSize(); } @Override public int getOrder() { return order; } @Override public void clear() throws CacheLevelException { if (!cachePaths.isEmpty()) { try { for(Path path : cachePaths.values() ) { Files.delete(path); } cachePaths.clear(); } catch (IOException e) { throw new CacheLevelException("", e); } } } private long keyByStrategy() { long result = 0; switch (cacheStrategy) { case LEAST_RECENTLY_USED: { Iterator<Long> iterator = cachePaths.keySet().iterator(); result = iterator.next(); break; } case RANDOM: { int randomKeyNum = new Random().nextInt(cachePaths.size()); Iterator<Long> iterator = cachePaths.keySet().iterator(); for (int i = 0; i < randomKeyNum; i++) { iterator.next(); } result = iterator.next(); break; } } return result; } }
[ "voblin50" ]
voblin50
126fc61c72f6f8885872db38f6115d7e755ce9b9
c6b3b98d57c30fef90dd9dc626f4cc06515fda3e
/app/src/main/java/com/example/ml3t/isipertemuan1.java
13823baa0786c008f87401c75e164640da7272c8
[]
no_license
ibnuhaldun12/ML3T
aaf835ea21c2b837f38acc1092bf56a7ae16d496
453a999df3909832d8cdfa5b45af1ffdb3e052be
refs/heads/master
2023-05-26T18:55:49.502137
2021-06-08T04:00:50
2021-06-08T04:00:50
341,386,009
2
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.example.ml3t; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class isipertemuan1 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_isipertemuan1); } }
[ "ibnuhaldun12@gmail.com" ]
ibnuhaldun12@gmail.com
3c53d0090a90b5f0d6a58ad91c072e107a075219
f35a5af33996835095b322167e0dc6712c82ebfc
/src/main/java/com/miage/altea/game_ui/config/RestConfiguration.java
c01def684e83a6dd74ff2af1150eed0e621a763a
[]
no_license
Timothey-V/game-ui-Timothey-V
375a71877e06dfb742de733185754d1a83c78617
455c9b1cec528780ed2f2f1ccaa60236cd9793ff
refs/heads/master
2021-05-23T13:45:48.050262
2020-04-05T19:44:12
2020-04-05T19:44:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,540
java
package com.miage.altea.game_ui.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.http.HttpHeaders; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.support.BasicAuthenticationInterceptor; import org.springframework.web.client.RestTemplate; import java.util.List; @Configuration public class RestConfiguration { @Value("${trainer.service.username}") String username ; @Value("${trainer.service.password}") String password ; @Bean @Primary RestTemplate restTemplate(){ return new RestTemplate(); } @Bean RestTemplate trainerApiRestTemplate(){ RestTemplate rt = new RestTemplate() ; rt.setInterceptors(List.of((new BasicAuthenticationInterceptor(username,password)))); return rt; } @Autowired public void configureLocalInterceptor (RestTemplate rt){ rt.setInterceptors(List.of((httpRequest, bytes, clientHttpRequestExecution) -> { httpRequest.getHeaders().add(HttpHeaders.ACCEPT_LANGUAGE, LocaleContextHolder.getLocale().toLanguageTag()); return clientHttpRequestExecution.execute(httpRequest,bytes); })); } }
[ "Tim170298" ]
Tim170298
1358a12c6909d6785edf25a7f6aa9d06b62e433a
01d4967b9f8605c2954a10ed7b0e1d7936022ab3
/components/cronet/android/java/src/org/chromium/net/AsyncUrlRequestFactory.java
f1ce8295a46b553bb990b5e490b6239a1ab39696
[ "BSD-3-Clause" ]
permissive
tmpsantos/chromium
79c4277f98c3977c72104ecc7c5bda2f9b0295c2
802d4aeeb33af25c01ee5994037bbf14086d4ac0
refs/heads/master
2021-01-17T08:05:57.872006
2014-09-05T13:39:49
2014-09-05T13:41:43
16,474,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.net; import java.util.concurrent.Executor; /** * A factory for {@link AsyncUrlRequest}'s, which uses the best HTTP stack * available on the current platform. */ public abstract class AsyncUrlRequestFactory { /** * Creates an AsyncUrlRequest object. All AsyncUrlRequest functions must * be called on the Executor's thread, and all callbacks will be called * on the Executor's thread as well. * createAsyncRequest itself may be called on any thread. * @param url URL for the request. * @param listener Callback interface that gets called on different events. * @param executor Executor on which all callbacks will be called. * @return new request. */ public abstract AsyncUrlRequest createAsyncRequest(String url, AsyncUrlRequestListener listener, Executor executor); }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
5b5bb4e5c147e13e48dfb274a3de08760666be2a
97ffeac13441a35ac19b5d2b316dbcc1322a6029
/app/src/test/java/com/wenyi/hencoderview/ExampleUnitTest.java
776162bbc1a409b0b5e74f5ff26131fc36486dcf
[]
no_license
young508/HenCoderView
ad24bb0d6396e2076e651aaba813e099dd8e5347
d51e722592bc0d3845cb7b5705298ad2f0cf00de
refs/heads/master
2021-07-03T12:14:32.305637
2017-09-25T09:11:24
2017-09-25T09:11:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.wenyi.hencoderview; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "wangyangstudy@163.com" ]
wangyangstudy@163.com
72500062ee08d410a0c3cb35c4add6f9494e9681
cce4079c607220431bb945699ec61a5314b738aa
/src/main/java/com/himanshu/practice/y2018/sept/sept23/codeforces/C.java
eb7d76808ff6eab5974c316384167e5dc9d35dc9
[]
no_license
HimanshuBhardwaj/HelloToPractice
7937bd7df60528ac4a719ebfa9c6baf05496e309
fe64fca0b075b1e6de9b951762d965070d45aecc
refs/heads/master
2023-07-25T01:42:33.172867
2022-09-19T06:52:12
2022-09-19T06:52:12
136,215,479
0
0
null
2023-07-16T23:43:51
2018-06-05T18:00:51
Java
UTF-8
Java
false
false
1,716
java
package com.himanshu.practice.y2018.sept.sept23.codeforces; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Created by himanshubhardwaj on 23/09/18. */ public class C { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); char[] num = br.readLine().toCharArray(); int[] arr = new int[n]; int sum = 0; for (int i = 0; i < num.length; i++) { arr[i] = num[i] - '0'; sum += arr[i]; } boolean couldBeSplittedF = false; for (int numofSegMent = 2; (numofSegMent <= n) && (!couldBeSplittedF); numofSegMent++) { couldBeSplittedF = couldBeSplitted(arr, 0, sum, numofSegMent); } if (couldBeSplittedF) { System.out.print("YES"); } else { System.out.print("NO"); } } private static boolean couldBeSplitted(int[] arr, int start, int sum, int numofSegMent) { if (start >= arr.length || sum == 0) { return true; } if (sum % numofSegMent != 0) { return false; } int localSum = 0; int expectedSum = sum / numofSegMent; int pos = start; while ((pos < arr.length) && (localSum < expectedSum)) { localSum += arr[pos]; pos++; } if (localSum != expectedSum) { return false; } while (pos < arr.length && arr[pos] == 0) { pos++; } return couldBeSplitted(arr, pos, sum, numofSegMent); } }
[ "himanshubhardwaj169@gmail.com" ]
himanshubhardwaj169@gmail.com
1598c05e1e62d10073d582cbf58890a13a5522ae
104b421e536d1667a70f234ec61864f9278137c4
/code/com/google/android/gms/internal/af.java
f6f7550c726e72725b5d442712adb011d83c6264
[]
no_license
AshwiniVijayaKumar/Chrome-Cars
f2e61347c7416d37dae228dfeaa58c3845c66090
6a5e824ad5889f0e29d1aa31f7a35b1f6894f089
refs/heads/master
2021-01-15T11:07:57.050989
2016-05-13T05:01:09
2016-05-13T05:01:09
58,521,050
1
0
null
2016-05-11T06:51:56
2016-05-11T06:51:56
null
UTF-8
Java
false
false
5,895
java
package com.google.android.gms.internal; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public abstract interface af extends IInterface { public abstract void onAdClosed() throws RemoteException; public abstract void onAdFailedToLoad(int paramInt) throws RemoteException; public abstract void onAdLeftApplication() throws RemoteException; public abstract void onAdLoaded() throws RemoteException; public abstract void onAdOpened() throws RemoteException; public static abstract class a extends Binder implements af { public a() { attachInterface(this, "com.google.android.gms.ads.internal.client.IAdListener"); } public static af e(IBinder paramIBinder) { if (paramIBinder == null) { return null; } IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.ads.internal.client.IAdListener"); if ((localIInterface != null) && ((localIInterface instanceof af))) { return (af)localIInterface; } return new a(paramIBinder); } public IBinder asBinder() { return this; } public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2) throws RemoteException { switch (paramInt1) { default: return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2); case 1598968902: paramParcel2.writeString("com.google.android.gms.ads.internal.client.IAdListener"); return true; case 1: paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener"); onAdClosed(); paramParcel2.writeNoException(); return true; case 2: paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener"); onAdFailedToLoad(paramParcel1.readInt()); paramParcel2.writeNoException(); return true; case 3: paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener"); onAdLeftApplication(); paramParcel2.writeNoException(); return true; case 4: paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener"); onAdLoaded(); paramParcel2.writeNoException(); return true; } paramParcel1.enforceInterface("com.google.android.gms.ads.internal.client.IAdListener"); onAdOpened(); paramParcel2.writeNoException(); return true; } private static class a implements af { private IBinder ky; a(IBinder paramIBinder) { this.ky = paramIBinder; } public IBinder asBinder() { return this.ky; } public void onAdClosed() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener"); this.ky.transact(1, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void onAdFailedToLoad(int paramInt) throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener"); localParcel1.writeInt(paramInt); this.ky.transact(2, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void onAdLeftApplication() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener"); this.ky.transact(3, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void onAdLoaded() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener"); this.ky.transact(4, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void onAdOpened() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.ads.internal.client.IAdListener"); this.ky.transact(5, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } } } } /* Location: C:\Users\ADMIN\Desktop\foss\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\internal\af.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ASH ABHI" ]
ASH ABHI
212c338cebb6c05d99ef45e0e962b2438166cb86
c78ec9af6447be4abf7ce9fcaea3a0473d2c18ec
/src/horse_creator/Ika_toolbox.java
ba1e14e60604a58518f2f8ee9b65c57791b89d72
[]
no_license
airzhangfish/ika_map_editor
c2bef9648b181b1be6aaab868e8296806d7ca7b0
cfacc21a3e905569cefee9fc77b69b63ef629b65
refs/heads/master
2021-01-11T13:57:18.711557
2017-06-20T16:24:11
2017-06-20T16:24:11
94,911,700
5
0
null
null
null
null
GB18030
Java
false
false
2,414
java
package horse_creator; import java.awt.Container; import javax.swing.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; /** * 《流金岁月》赛马创建计算器 * @author airzhangfish * */ public class Ika_toolbox extends JFrame implements ActionListener { private static final long serialVersionUID = 1L; private static final String myversion = "0.01standard "; private JTabbedPane jtp; private JMenuBar jMenuBar1 = new JMenuBar(); private JMenu jMenuHelp = new JMenu("说明"); private JMenuItem jMenuHelpAbout = new JMenuItem("关于"); private JMenuItem jMenuHelpHelp = new JMenuItem("帮助"); private JMenuItem jMenuFileExit = new JMenuItem("退出"); public void actionPerformed(ActionEvent actionEvent) { Object source = actionEvent.getSource(); // 帮助 if (source == jMenuHelpHelp) { JOptionPane.showMessageDialog(this, helpStr, "帮助", JOptionPane.INFORMATION_MESSAGE); } // 关于 if (source == jMenuHelpAbout) { JOptionPane.showMessageDialog(this, aboutStr, "关于", JOptionPane.INFORMATION_MESSAGE); } // 软件退出 if (source == jMenuFileExit) { System.exit(0); } } // 关于 private String aboutStr = "《流金岁月》赛马创建计算器\n " + "Creator by airzhangfish \n " + " Version V0.03A in 2007-11-28 \n " + " E-mail&MSN:airzhangfish@hotmail.com"; // 帮助 private String helpStr = "《流金岁月》赛马创建计算器 使用帮助\n"; public Ika_toolbox() { this.setSize(400,240); // 将窗体的大小 this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setResizable(false); // 窗体不能改变大小 this.setTitle("《流金岁月》赛马创建计算器 "+myversion); // 设置标题 // help jMenuHelp.add(jMenuHelpHelp); jMenuHelp.add(jMenuHelpAbout); jMenuHelp.add(jMenuFileExit); jMenuHelpHelp.addActionListener(this); jMenuHelpAbout.addActionListener(this); jMenuFileExit.addActionListener(this); jMenuBar1.add(jMenuHelp); this.setJMenuBar(jMenuBar1); Container contents = getContentPane(); jtp = new JTabbedPane(JTabbedPane.TOP); jtp.addTab("赛马创建计算器",javachanger); jtp.addTab("比赛结果预测器",race); contents.add(jtp); setVisible(true); } JAVAchanger javachanger=new JAVAchanger(); raceresult race=new raceresult(); public static void main(String args[]) { SDef.setMySkin(2); new Ika_toolbox(); } }
[ "198379zxs" ]
198379zxs
4382d91ef0a35b3d8a46fee9665e124a970c1aa8
80ffa0341c8b906777d30ca38e7ba82f5f60f754
/minimize-malware-spread.java
9dced397e45e93780a2a51cd4c2c44e14734cbb8
[]
no_license
prg01/Graph-2
30a5f7ae4343d3c5044177ca894b7f054bd50579
d5c7e2cc9144e79532f5a0d1751163191be95b2c
refs/heads/master
2023-08-15T13:00:24.299042
2021-10-18T18:45:51
2021-10-18T18:45:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,221
java
//TC:O(v+e) //SC:O(v), travel nodes 3 times, groups, colors and infectedGroups array(i.e) O(3v) or 3n //running on leetcode: yes class Solution { int n; int[] colors; public int minMalwareSpread(int[][] graph, int[] initial) { if(graph == null || graph.length==0) return 0; //get the legth of the graph n = graph.length; //colors array to get the different groups of nodes (serves as visited array for the nodes) colors= new int[n]; //#groups int color = 0; //fill in the colors array with -1, no nodes are visited to start with //indices are the nodes, value of each index is the group the node belongs to Arrays.fill(colors, -1); for(int i=0; i<n; i++){ if(colors[i]==-1){ dfs(graph, i, color); color++; } } //#nodes in each group int[] groups = new int[color]; for(int col: colors){ groups[col]++; } //#infected nodes in each group int[] infectedGroups = new int[color]; for(int node : initial){ int colr = colors[node]; infectedGroups[colr]++; } int result=Integer.MAX_VALUE; for(int node: initial){ int colr = colors[node]; if(infectedGroups[colr] == 1){ if(result == Integer.MAX_VALUE){ result = node; } else if(groups[colors[result]]<groups[colors[node]]){ result = node; } else if(groups[colors[result]] == groups[colors[node]] && result>node) { result = node; } } } if(result == Integer.MAX_VALUE){ for(int node: initial){ result = Math.min(result, node); } } return result; } private void dfs(int[][] graph, int i, int color){ //base case if(colors[i] != -1) return; //logic colors[i]=color; for(int j=0; j<n; j++){ if(graph[i][j]==1){ dfs(graph, j, color); } } } }
[ "sharma.pragati04@gmail.com" ]
sharma.pragati04@gmail.com
0432f3d5d154a2a92e37cb55769303bba440074e
8d8869a9d205dec5e26e25b7ce4fbb97a80010b1
/TheaterTickets/src/Handler.java
5abb320672be2914aa81388ceab172b4bfd08e06
[]
no_license
NickSimos/softeng
70ab91be9e92af54892738e877498c08078a332a
6901980f721151c4093d651cca96752bca9d893a
refs/heads/master
2020-12-25T02:40:00.705268
2013-02-08T17:47:03
2013-02-08T17:47:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,422
java
import java.sql.*; public class Handler { public static Connection connect() { Connection connection = null; try { // Load the JDBC driver String driverName = "com.mysql.jdbc.Driver"; // MySQL MM JDBC driver Class.forName(driverName); // Create a connection to the database String url = "jdbc:mysql://127.0.0.1:3306/TheaterDB"; String username = "root"; String password = "root"; connection = DriverManager.getConnection(url, username, password); } catch (ClassNotFoundException e) { // Could not find the database driver } catch (SQLException e) { // Could not connect to the database } return connection; } public static ResultSet executeQuery(String query, Connection connection) { if (connect()!=null) { try { Statement statement = connection.createStatement(); statement.execute(query); return statement.getResultSet(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return null; } public static void disconnect(Connection connection) { if (connection !=null) { try { connection.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
[ "contact@emvlam.com" ]
contact@emvlam.com
50c5daa9efeebd947ded7c3b5c6cab7db2ef5121
8b64aa73cb6b96ad557006c28255fc8642cef0a7
/src/main/java/solveur/Approximation.java
7c575f0ec75ebab67aba2748a19900f189c7c7cd
[]
no_license
AdrienVaret/BenzenoidApplicationReleases
bac9ae1dfd8ee02cfc8ce5c5e16520d2e1700103
48ae31deda5f90dda5d45ac2bf1971adc1f1a6d8
refs/heads/main
2023-06-25T09:29:10.443429
2021-09-27T18:15:56
2021-09-27T18:15:56
392,052,500
0
1
null
null
null
null
UTF-8
Java
false
false
22,583
java
package solveur; import org.chocosolver.solver.Model; import org.chocosolver.solver.Solution; import org.chocosolver.solver.Solver; import org.chocosolver.solver.variables.*; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Pattern; import org.chocosolver.util.objects.graphs.UndirectedGraph; import org.chocosolver.util.objects.setDataStructures.SetType; import molecules.Node; import molecules.NodeSameLine; import parsers.GraphParser; import solveur.Aromaticity.RIType; import molecules.Molecule; import utils.EdgeSet; import utils.Interval; import utils.SubMolecule; import utils.Utils; import org.chocosolver.solver.search.strategy.strategy.*; import org.chocosolver.solver.search.strategy.selectors.values.IntDomainMin; import org.chocosolver.solver.search.strategy.selectors.variables.FirstFail; public class Approximation { static BufferedWriter log = null; private static String path = null; private static String nautyDirectory; private static boolean symmetries; private static final int MAX_CYCLE_SIZE = 4; public static int [][][] energies = new int[127][11][4]; public static int [][] circuits; public static int [] circuitCount; public static ArrayList<Integer> getVerticalNeighborhood(Molecule molecule, int hexagon, int [][] edgesCorrespondances, boolean left) { ArrayList<Integer> edges = new ArrayList<Integer>(); int [] hexagonVertices = molecule.getHexagons()[hexagon]; int x, y1, y2; if (left) { edges.add(edgesCorrespondances[hexagonVertices[4]][hexagonVertices[5]]); //System.out.println("adding (" + hexagonVertices[4] + ", " + hexagonVertices[5] + ")(" + edgesCorrespondances[hexagonVertices[4]][hexagonVertices[5]] + ")"); x = molecule.getNodesRefs()[hexagonVertices[4]].getX(); y1 = molecule.getNodesRefs()[hexagonVertices[4]].getY(); y2 = molecule.getNodesRefs()[hexagonVertices[5]].getY(); } else { edges.add(edgesCorrespondances[hexagonVertices[1]][hexagonVertices[2]]); //System.out.println("adding (" + hexagonVertices[1] + ", " + hexagonVertices[2] + ")(" + edgesCorrespondances[hexagonVertices[1]][hexagonVertices[2]] + ")"); x = molecule.getNodesRefs()[hexagonVertices[1]].getX(); y1 = molecule.getNodesRefs()[hexagonVertices[1]].getY(); y2 = molecule.getNodesRefs()[hexagonVertices[2]].getY(); } for (int i = 0 ; i < molecule.getNbNodes() ; i++) { for (int j = (i + 1) ; j < molecule.getNbNodes() ; j++) { if (molecule.getAdjacencyMatrix()[i][j] == 1) { Node u = molecule.getNodesRefs()[i]; Node v = molecule.getNodesRefs()[j]; if (left) { if ((u.getX() == v.getX()) && (u.getX() < x) && ((u.getY() == y1 && v.getY() == y2) || (u.getY() == y2 && v.getY() == y1))) { edges.add(edgesCorrespondances[i][j]); //System.out.println("adding (" + i + ", " + j + ")(" + edgesCorrespondances[i][j] + ")"); } } else { if ((u.getX() == v.getX()) && (u.getX() > x) && ((u.getY() == y1 && v.getY() == y2) || (u.getY() == y2 && v.getY() == y1))) { edges.add(edgesCorrespondances[i][j]); //System.out.println("adding (" + i + ", " + j + ")(" + edgesCorrespondances[i][j] + ")"); } } } } } //System.out.println(""); return edges; } public static void computeCyclesRelatedToOneHexagon(Molecule molecule, int hexagon) { int [] firstVertices = new int [molecule.getNbEdges()]; int [] secondVertices = new int [molecule.getNbEdges()]; Model model = new Model("Cycles"); UndirectedGraph GLB = new UndirectedGraph(model, molecule.getNbNodes(), SetType.BITSET, false); UndirectedGraph GUB = new UndirectedGraph(model, molecule.getNbNodes(), SetType.BITSET, false); for (int i = 0; i < molecule.getNbNodes(); i++) { GUB.addNode(i); for (int j = (i + 1); j < molecule.getNbNodes(); j++) { if (molecule.getAdjacencyMatrix()[i][j] == 1) { GUB.addEdge(i, j); } } } UndirectedGraphVar g = model.graphVar("g", GLB, GUB); BoolVar[] boolEdges = new BoolVar[molecule.getNbEdges()]; int [][] ME = new int [molecule.getNbNodes()][molecule.getNbNodes()]; int index = 0; for (int i = 0 ; i < molecule.getNbNodes() ; i++) { for (int j = (i+1) ; j < molecule.getNbNodes() ; j++) { if (molecule.getAdjacencyMatrix()[i][j] == 1) { boolEdges[index] = model.boolVar("(" + i + "--" + j + ")"); model.edgeChanneling(g, boolEdges[index], i, j).post(); firstVertices[index] = i; secondVertices[index] = j; ME[i][j] = index; ME[j][i] = index; index ++; } } } ArrayList<Integer> leftVerticalEdges = getVerticalNeighborhood(molecule, hexagon, ME, true); ArrayList<Integer> rightVerticalEdges = getVerticalNeighborhood(molecule, hexagon, ME, false); BoolVar[] left = new BoolVar[leftVerticalEdges.size()]; BoolVar[] right = new BoolVar[rightVerticalEdges.size()]; for (int i = 0 ; i < left.length ; i++) { left[i] = boolEdges[leftVerticalEdges.get(i)]; } for (int i = 0 ; i < right.length ; i++) { right[i] = boolEdges[rightVerticalEdges.get(i)]; } //model.sum(left, "=", 1).post(); //>= avant //model.sum(right, "=", 1).post(); //model.or(left).post(); //model.or(right).post(); //model.arithm(left[0], "=", 1).post(); //model.arithm(right[0], "=", 1).post(); /* Taille de la bande centrale */ IntVar[] indexesLeft = new IntVar[left.length]; IntVar[] indexesRight = new IntVar[right.length]; int maxSize = left.length + right.length - 1; int [] domainLeft = new int [left.length]; for (int i = 0 ; i < left.length ; i++) domainLeft[i] = i; int [] domainRight = new int [right.length]; for (int i = 0 ; i < right.length ; i++) domainRight[i] = left.length + i; for (int i = 0 ; i < indexesLeft.length ; i++) { indexesLeft[i] = model.intVar("ILeft_" + i, new int [] {0, domainLeft[i]}); } for (int i = 0 ; i < indexesRight.length ; i++) { indexesRight[i] = model.intVar("IRight_" + i, new int [] {0, domainRight[i]}); } /* * Fixing indexes variables values */ for (int i = 0 ; i < left.length ; i++) { model.ifThenElse(left[i], model.arithm(indexesLeft[i], "=", i), model.arithm(indexesLeft[i], "=", 0)); } for (int i = 0 ; i < right.length ; i++) { model.ifThenElse(right[i], model.arithm(indexesRight[i], "=", left.length + i), model.arithm(indexesRight[i], "=", 0)); } IntVar sumLeft = model.intVar("sumLeft", domainLeft); IntVar sumRight = model.intVar("sumRight", domainRight); model.sum(indexesLeft, "=", sumLeft).post(); model.sum(indexesRight, "=", sumRight).post(); int [] maxSizeDomain = new int [maxSize + 1]; for (int i = 0 ; i <= maxSize ; i++) { maxSizeDomain[i] = i; } IntVar taille = model.intVar("sizeBand", maxSizeDomain); model.sum(new IntVar[] {taille, sumLeft}, "=", sumRight).post(); model.arithm(taille, "<=", 5).post(); model.arithm(taille, ">", 0).post(); model.or(model.sum(left, "=", 1), model.arithm(left[0], "=", 1)).post(); model.or(model.sum(right, "=", 1), model.arithm(right[0], "=", 1)).post(); model.minDegree(g, 2).post(); model.maxDegree(g, 2).post(); model.connected(g).post(); /* model.or( model.and(model.arithm(model.nbNodes(g), "=", 6), model.sum(boolEdges, "=", 6)), model.and(model.arithm(model.nbNodes(g), "=", 10), model.sum(boolEdges, "=", 10)), model.and(model.arithm(model.nbNodes(g), "=", 14), model.sum(boolEdges, "=", 14)), model.and(model.arithm(model.nbNodes(g), "=", 18), model.sum(boolEdges, "=", 18)), model.and(model.arithm(model.nbNodes(g), "=", 22), model.sum(boolEdges, "=", 22)), model.and(model.arithm(model.nbNodes(g), "=", 26), model.sum(boolEdges, "=", 26)) ).post(); */ model.or( model.and(model.nbNodes(g, model.intVar(6)), model.sum(boolEdges, "=", 6)), model.and(model.nbNodes(g, model.intVar(10)), model.sum(boolEdges, "=", 10)), model.and(model.nbNodes(g, model.intVar(14)), model.sum(boolEdges, "=", 14)), model.and(model.nbNodes(g, model.intVar(18)), model.sum(boolEdges, "=", 18)), model.and(model.nbNodes(g, model.intVar(22)), model.sum(boolEdges, "=", 22)), model.and(model.nbNodes(g, model.intVar(26)), model.sum(boolEdges, "=", 26)) ).post(); model.getSolver().setSearch(new IntStrategy(boolEdges, new FirstFail(model), new IntDomainMin())); Solver solver = model.getSolver(); Solution solution; while(solver.solve()){ solution = new Solution(model); solution.record(); ArrayList<Integer> cycle = new ArrayList<Integer>(); for (int i = 0 ; i < boolEdges.length ; i++) { if (solution.getIntVal(boolEdges[i]) == 1) { cycle.add(firstVertices[i]); cycle.add(secondVertices[i]); } } EdgeSet verticalEdges = computeStraightEdges(molecule, cycle); ArrayList<Interval> intervals = (ArrayList<Interval>) computeIntervals(molecule, cycle, verticalEdges); Collections.sort(intervals); int cycleConfiguration = Utils.identifyCycle(molecule, intervals); List<Integer> hexagons = getHexagons(molecule, cycle, intervals); if (cycleConfiguration != -1/* && hexagons.contains(hexagon)*/) { SubMolecule subMolecule = substractCycleAndInterior(molecule, cycle, intervals); int nbPerfectMatchings = PerfectMatchingSolver.computeNbPerfectMatching(subMolecule); int [][] energiesCycle = energies[cycleConfiguration]; for (int idHexagon = 0 ; idHexagon < hexagons.size() ; idHexagon++) { int hexagonTreated = hexagons.get(idHexagon); if (hexagonTreated == hexagon) { for (int size = 0 ; size < 4 ; size ++) { if (energiesCycle[idHexagon][size] != 0) circuits[hexagon][size] += energiesCycle[idHexagon][size] * nbPerfectMatchings; } } } //System.out.println(hexagons); } //treatCycle(molecule, cycle); } //displayResults(); } public static void computeResonanceEnergy(Molecule molecule) throws IOException { energies = Utils.initEnergies(); circuits = new int[molecule.getNbHexagons()][MAX_CYCLE_SIZE]; circuitCount = new int[energies.length]; int [] firstVertices = new int [molecule.getNbEdges()]; int [] secondVertices = new int [molecule.getNbEdges()]; Model model = new Model("Cycles"); UndirectedGraph GLB = new UndirectedGraph(model, molecule.getNbNodes(), SetType.BITSET, false); UndirectedGraph GUB = new UndirectedGraph(model, molecule.getNbNodes(), SetType.BITSET, false); for (int i = 0; i < molecule.getNbNodes(); i++) { GUB.addNode(i); for (int j = (i + 1); j < molecule.getNbNodes(); j++) { if (molecule.getAdjacencyMatrix()[i][j] == 1) { GUB.addEdge(i, j); } } } UndirectedGraphVar g = model.graphVar("g", GLB, GUB); BoolVar[] boolEdges = new BoolVar[molecule.getNbEdges()]; int index = 0; for (int i = 0 ; i < molecule.getNbNodes() ; i++) { for (int j = (i+1) ; j < molecule.getNbNodes() ; j++) { if (molecule.getAdjacencyMatrix()[i][j] == 1) { boolEdges[index] = model.boolVar("(" + i + "--" + j + ")"); model.edgeChanneling(g, boolEdges[index], i, j).post(); firstVertices[index] = i; secondVertices[index] = j; index ++; } } } model.minDegree(g, 2).post(); model.maxDegree(g, 2).post(); model.connected(g).post(); model.or( model.and(model.nbNodes(g, model.intVar(6)), model.sum(boolEdges, "=", 6)), model.and(model.nbNodes(g, model.intVar(10)), model.sum(boolEdges, "=", 10)), model.and(model.nbNodes(g, model.intVar(14)), model.sum(boolEdges, "=", 14)), model.and(model.nbNodes(g, model.intVar(18)), model.sum(boolEdges, "=", 18)), model.and(model.nbNodes(g, model.intVar(22)), model.sum(boolEdges, "=", 22)), model.and(model.nbNodes(g, model.intVar(26)), model.sum(boolEdges, "=", 26)) ).post(); model.getSolver().setSearch(new IntStrategy(boolEdges, new FirstFail(model), new IntDomainMin())); Solver solver = model.getSolver(); Solution solution; while(solver.solve()){ solution = new Solution(model); solution.record(); ArrayList<Integer> cycle = new ArrayList<Integer>(); for (int i = 0 ; i < boolEdges.length ; i++) { if (solution.getIntVal(boolEdges[i]) == 1) { cycle.add(firstVertices[i]); cycle.add(secondVertices[i]); } } treatCycle(molecule, cycle); } } public static void displayResults() throws IOException{ System.out.println(""); System.out.println("LOCAL ENERGY"); log.write(path); if (symmetries) log.write(" symmetries\n"); else log.write("\n"); log.write("LOCAL ENERGY" + "\n"); int [] globalEnergy = new int[MAX_CYCLE_SIZE]; for (int i = 0 ; i < circuits.length ; i++) { System.out.print("H" + i + " : "); log.write("H" + i + " : "); for (int j = 0 ; j < MAX_CYCLE_SIZE ; j++) { System.out.print(circuits[i][j] + " "); log.write(circuits[i][j] + " "); globalEnergy[j] += circuits[i][j]; } System.out.println(""); log.write("\n"); } System.out.println(""); System.out.print("GLOBAL ENERGY : "); log.write("\n"); log.write("GLOBAL ENERGY : \n"); for (int i = 0 ; i < globalEnergy.length ; i++) { System.out.print(globalEnergy[i] + " "); log.write(globalEnergy[i] + " "); } System.out.println(""); System.out.println(""); log.write("\n"); //log.close(); } public static EdgeSet computeStraightEdges(Molecule molecule, ArrayList<Integer> cycle) { List<Node> firstVertices = new ArrayList<Node>(); List<Node> secondVertices = new ArrayList<Node>(); for (int i = 0 ; i < cycle.size() - 1 ; i += 2) { int uIndex = cycle.get(i); int vIndex = cycle.get(i + 1); Node u = molecule.getNodesRefs()[uIndex]; Node v = molecule.getNodesRefs()[vIndex]; if (u.getX() == v.getX()) { firstVertices.add(u); secondVertices.add(v); } } return new EdgeSet(firstVertices, secondVertices); } public static List<Interval> computeIntervals(Molecule molecule, ArrayList<Integer> cycle, EdgeSet edges){ List<Interval> intervals = new ArrayList<Interval>(); int [] edgesOK = new int [edges.size()]; for (int i = 0 ; i < edges.size() ; i ++) { if (edgesOK[i] == 0) { edgesOK[i] = 1; Node u1 = edges.getFirstVertices().get(i); Node v1 = edges.getSecondVertices().get(i); int y1 = Math.min(u1.getY(), v1.getY()); int y2 = Math.max(u1.getY(), v1.getY()); List<NodeSameLine> sameLineNodes = new ArrayList<NodeSameLine>(); for (int j = (i+1) ; j < edges.size() ; j++) { if (edgesOK[j] == 0) { Node u2 = edges.getFirstVertices().get(j); Node v2 = edges.getSecondVertices().get(j); int y3 = Math.min(u2.getY(), v2.getY()); int y4 = Math.max(u2.getY(), v2.getY()); if (y1 == y3 && y2 == y4) { edgesOK[j] = 1; sameLineNodes.add(new NodeSameLine(j, u2.getX())); } } } sameLineNodes.add(new NodeSameLine(i, u1.getX())); Collections.sort(sameLineNodes); for (int j = 0 ; j < sameLineNodes.size() ; j += 2) { NodeSameLine nsl1 = sameLineNodes.get(j); NodeSameLine nsl2 = sameLineNodes.get(j+1); Node n1 = edges.getFirstVertices().get(nsl1.getIndex()); Node n2 = edges.getSecondVertices().get(nsl1.getIndex()); Node n3 = edges.getFirstVertices().get(nsl2.getIndex()); Node n4 = edges.getSecondVertices().get(nsl2.getIndex()); intervals.add(new Interval(n1, n2, n3, n4)); } } } return intervals; } public static boolean hasEdge(Molecule molecule, int [] vertices, int vertex) { for (int u = 0 ; u < molecule.getNbNodes() ; u++) { if (molecule.getAdjacencyMatrix()[vertex][u] == 1 && vertices[u] == 0) return true; } return false; } public static SubMolecule substractCycleAndInterior(Molecule molecule, ArrayList<Integer> cycle, ArrayList<Interval> intervals) { int [][] newGraph = new int [molecule.getNbNodes()][molecule.getNbNodes()]; int [] vertices = new int [molecule.getNbNodes()]; int [] subGraphVertices = new int[molecule.getNbNodes()]; List<Integer> hexagons = getHexagons(molecule, cycle, intervals); for (Integer hexagon : hexagons) { int [] nodes = molecule.getHexagons()[hexagon]; for (int i = 0 ; i < nodes.length ; i++) vertices[nodes[i]] = 1; } int subGraphNbNodes = 0; int nbEdges = 0; for (int u = 0 ; u < molecule.getNbNodes() ; u++) { if (vertices[u] == 0) { for (int v = (u+1) ; v < molecule.getNbNodes() ; v++) { if (vertices[v] == 0) { newGraph[u][v] = molecule.getAdjacencyMatrix()[u][v]; newGraph[v][u] = molecule.getAdjacencyMatrix()[v][u]; if (molecule.getAdjacencyMatrix()[u][v] == 1) nbEdges ++; if (subGraphVertices[u] == 0) { subGraphVertices[u] = 1; subGraphNbNodes ++; } if (subGraphVertices[v] == 0) { subGraphVertices[v] = 1; subGraphNbNodes ++; } } } } } return new SubMolecule(subGraphNbNodes, nbEdges, molecule.getNbNodes(), subGraphVertices, newGraph); } public static boolean intervalsOnSameLine(Interval i1, Interval i2) { return (i1.y1() == i2.y1() && i1.y2() == i2.y2()); } public static List<Integer> getHexagons(Molecule molecule, ArrayList<Integer> cycle, ArrayList<Interval> intervals){ List<Integer> hexagons = new ArrayList<Integer>(); for (Interval interval : intervals){ int [] hexagonsCount = new int [molecule.getNbHexagons()]; for (int x = interval.x1() ; x <= interval.x2() ; x += 2){ int u1 = molecule.getCoords().get(x, interval.y1()); int u2 = molecule.getCoords().get(x, interval.y2()); for (Integer hexagon : molecule.getHexagonsVertices().get(u1)) { hexagonsCount[hexagon] ++; if (hexagonsCount[hexagon] == 4) hexagons.add(hexagon); } for (Integer hexagon : molecule.getHexagonsVertices().get(u2)){ hexagonsCount[hexagon] ++; if (hexagonsCount[hexagon] == 4) hexagons.add(hexagon); } } } return hexagons; } public static String displayCycle(ArrayList<Integer> cycle) { ArrayList<Integer> list = new ArrayList<Integer>(); for (Integer i : cycle) { if (!list.contains(i)) list.add(i); } Collections.sort(list); return list.toString(); } public static void treatCycle(Molecule molecule, ArrayList<Integer> cycle) { EdgeSet verticalEdges = computeStraightEdges(molecule, cycle); ArrayList<Interval> intervals = (ArrayList<Interval>) computeIntervals(molecule, cycle, verticalEdges); Collections.sort(intervals); int cycleConfiguration = Utils.identifyCycle(molecule, intervals); if (cycleConfiguration != -1) { circuitCount[cycleConfiguration] ++; ArrayList<Integer> hexagons = (ArrayList<Integer>) getHexagons(molecule, cycle, intervals); SubMolecule subMolecule = substractCycleAndInterior(molecule, cycle, intervals); int nbPerfectMatchings = PerfectMatchingSolver.computeNbPerfectMatching(subMolecule); int [][] energiesCycle = energies[cycleConfiguration]; if (hexagons.contains(0)) System.out.print(""); for (int idHexagon = 0 ; idHexagon < hexagons.size() ; idHexagon++) { int hexagon = hexagons.get(idHexagon); for (int size = 0 ; size < 4 ; size ++) { if (energiesCycle[idHexagon][size] != 0) circuits[hexagon][size] += energiesCycle[idHexagon][size] * nbPerfectMatchings; } } } } public static void computeResonanceEnergyWithSymmetries(Molecule molecule) throws IOException{ energies = Utils.initEnergies(); circuits = new int[molecule.getNbHexagons()][MAX_CYCLE_SIZE]; circuitCount = new int[energies.length]; ArrayList<ArrayList<Integer>> orbits = molecule.getOrbits(nautyDirectory); for (ArrayList<Integer> orbit : orbits) { int hexagon = orbit.get(0); computeCyclesRelatedToOneHexagon(molecule, hexagon); int [] result = circuits[hexagon]; for (int i = 1 ; i < orbit.size() ; i++) { int symmetricHexagon = orbit.get(i); circuits[symmetricHexagon] = result; } } displayResults(); } public static Aromaticity solve(Molecule molecule) throws IOException { computeResonanceEnergy(molecule); return new Aromaticity(molecule, circuits, RIType.OPTIMIZED); } public static void main(String[] args) throws IOException { symmetries = false;; if (args.length < 1) { System.err.println("ERROR: invalid argument(s)"); System.err.println("USAGE: java -jar Approximation.jar ${input_file_name} [-s | --symm]"); System.exit(1); } path = args[0]; if (args.length > 1 && (args[1].equals("-s") || args[1].equals("--symm"))) symmetries = true; nautyDirectory = null; if (symmetries) { if (args.length > 2) nautyDirectory = args[2]; else nautyDirectory = "."; } StringBuilder b = new StringBuilder(); String [] splittedFilename = path.split(Pattern.quote(".")); for (int i = 0 ; i < splittedFilename.length - 1 ; i++) { b.append(splittedFilename[i] + "."); } if (symmetries) b.append("log_symm"); else b.append("log"); String outputFileName = b.toString(); log = new BufferedWriter(new FileWriter(new File(outputFileName))); System.out.println("writing on : " + outputFileName); System.out.println("computing " + path + "\n"); Molecule molecule = GraphParser.parseUndirectedGraph(path, null, false); if (!symmetries) { long begin = System.currentTimeMillis(); computeResonanceEnergy(molecule); long end = System.currentTimeMillis(); long time = end - begin; displayResults(); System.out.println("time : " + time + " ms."); log.write("time : " + time + " ms." + "\n"); } else { long begin = System.currentTimeMillis(); computeResonanceEnergyWithSymmetries(molecule); long end = System.currentTimeMillis(); long time = end - begin; System.out.println("time : " + time + " ms."); log.write("time : " + time + " ms." + "\n"); } log.close(); } }
[ "adrien.varet@lis-lab.fr" ]
adrien.varet@lis-lab.fr
88e9b6b32ea14c802f9a4d168035d9f146315347
3ef119eb59b6ec8578ca7a5730dadabc1785a653
/src/main/java/com/sample/entities/util/KnowledgeSessionHelper.java
ab83340f11ac8c9801846821e669ab2187cd41e6
[]
no_license
piyushutreja/DroolAccount
a2c8085d255cc5a43960d126c3fd7e6879d82fd2
01476af108c629005bd61a640faa3027752c95f6
refs/heads/master
2021-01-19T10:42:43.194053
2017-04-12T09:02:01
2017-04-12T09:02:01
87,895,848
0
0
null
null
null
null
UTF-8
Java
false
false
3,461
java
package com.sample.entities.util; import org.kie.api.KieServices; import org.kie.api.event.rule.AfterMatchFiredEvent; import org.kie.api.event.rule.AgendaEventListener; import org.kie.api.event.rule.AgendaGroupPoppedEvent; import org.kie.api.event.rule.AgendaGroupPushedEvent; import org.kie.api.event.rule.BeforeMatchFiredEvent; import org.kie.api.event.rule.MatchCancelledEvent; import org.kie.api.event.rule.MatchCreatedEvent; import org.kie.api.event.rule.ObjectDeletedEvent; import org.kie.api.event.rule.ObjectInsertedEvent; import org.kie.api.event.rule.ObjectUpdatedEvent; import org.kie.api.event.rule.RuleFlowGroupActivatedEvent; import org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent; import org.kie.api.event.rule.RuleRuntimeEventListener; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.StatelessKieSession; public class KnowledgeSessionHelper { public static KieContainer createRuleBase() { KieServices ks = KieServices.Factory.get(); KieContainer kieContainer = ks.getKieClasspathContainer(); return kieContainer; } public static StatelessKieSession getStatelessKnowledgeSession(KieContainer kieContainer, String sessionName) { StatelessKieSession kSession = kieContainer.newStatelessKieSession(sessionName); return kSession; } public static KieSession getStatefulKnowledgeSession(KieContainer kieContainer, String sessionName) { KieSession kSession = kieContainer.newKieSession(sessionName); return kSession; } public static KieSession getStatefulKnowledgeSessionWithCallback(KieContainer kieContainer, String sessionName) { KieSession session = getStatefulKnowledgeSession(kieContainer, sessionName); session.addEventListener(new RuleRuntimeEventListener() { public void objectInserted(ObjectInsertedEvent event) { System.out.println("Object inserted \n" + event.getObject().toString()); } public void objectUpdated(ObjectUpdatedEvent event) { System.out.println("Object was updated \n" + "new Content \n" + event.getObject().toString()); } public void objectDeleted(ObjectDeletedEvent event) { System.out.println("Object retracted \n" + event.getOldObject().toString()); } }); session.addEventListener(new AgendaEventListener() { public void matchCreated(MatchCreatedEvent event) { System.out.println("The rule " + event.getMatch().getRule().getName() + " can be fired in agenda"); } public void matchCancelled(MatchCancelledEvent event) { System.out.println("The rule " + event.getMatch().getRule().getName() + " cannot b in agenda"); } public void beforeMatchFired(BeforeMatchFiredEvent event) { System.out.println("The rule " + event.getMatch().getRule().getName() + " will be fired"); } public void afterMatchFired(AfterMatchFiredEvent event) { System.out.println("The rule " + event.getMatch().getRule().getName() + " has be fired"); } public void agendaGroupPopped(AgendaGroupPoppedEvent event) { } public void agendaGroupPushed(AgendaGroupPushedEvent event) { } public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) { } public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) { } public void beforeRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event) { } public void afterRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event) { } }); return session; } }
[ "piyushutreja@gmail.com" ]
piyushutreja@gmail.com
5bc83f36b25c516ea82fd37bb598abda54bfc8d3
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/tinker/loader/TinkerDexOptimizer.java
3ecb577e8ff11ac6b1c0b92bf3b0ed6407f5d78c
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,244
java
package com.tencent.tinker.loader; import android.os.Build.VERSION; import com.tencent.tinker.loader.shareutil.ShareFileLockHelper; import com.tencent.tinker.loader.shareutil.SharePatchFileUtil; import dalvik.system.DexFile; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.concurrent.Executor; import java.util.concurrent.Executors; public final class TinkerDexOptimizer { /* renamed from: com.tencent.tinker.loader.TinkerDexOptimizer$1 */ static class C59591 implements Comparator<File> { C59591() { } public final /* synthetic */ int compare(Object obj, Object obj2) { long length = ((File) obj).length() - ((File) obj2).length(); if (length > 0) { return 1; } if (length == 0) { return 0; } return -1; } } static class OptimizeWorker { private static String ACC = null; private final boolean ABR; private final File ACD; private final File ACE; private final ResultCallback ACF; OptimizeWorker(File file, File file2, boolean z, String str, ResultCallback resultCallback) { this.ACD = file; this.ACE = file2; this.ABR = z; this.ACF = resultCallback; ACC = str; } /* JADX WARNING: Unknown top exception splitter block from list: {B:38:0x0131=Splitter:B:38:0x0131, B:48:0x015b=Splitter:B:48:0x015b} */ /* JADX WARNING: No exception handlers in catch block: Catch:{ } */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final boolean dSk() { try { if (SharePatchFileUtil.m9370ap(this.ACD) || this.ACF == null) { if (this.ACF != null) { this.ACF.mo12659ai(this.ACD); } String k = SharePatchFileUtil.m9387k(this.ACD, this.ACE); if (this.ABR) { String absolutePath = this.ACD.getAbsolutePath(); File file = new File(k); if (!file.exists()) { file.getParentFile().mkdirs(); } File file2 = new File(file.getParentFile(), "interpret.lock"); ShareFileLockHelper shareFileLockHelper = null; try { shareFileLockHelper = ShareFileLockHelper.m9351ao(file2); ArrayList arrayList = new ArrayList(); arrayList.add("dex2oat"); if (VERSION.SDK_INT >= 24) { arrayList.add("--runtime-arg"); arrayList.add("-classpath"); arrayList.add("--runtime-arg"); arrayList.add("&"); } arrayList.add("--dex-file=".concat(String.valueOf(absolutePath))); arrayList.add("--oat-file=".concat(String.valueOf(k))); arrayList.add("--instruction-set=" + ACC); if (VERSION.SDK_INT > 25) { arrayList.add("--compiler-filter=quicken"); } else { arrayList.add("--compiler-filter=interpret-only"); } ProcessBuilder processBuilder = new ProcessBuilder(arrayList); processBuilder.redirectErrorStream(true); Process start = processBuilder.start(); StreamConsumer.m9313L(start.getInputStream()); StreamConsumer.m9313L(start.getErrorStream()); int waitFor = start.waitFor(); if (waitFor != 0) { throw new IOException("dex2oat works unsuccessfully, exit code: ".concat(String.valueOf(waitFor))); } try { shareFileLockHelper.close(); } catch (IOException e) { } } catch (InterruptedException e2) { throw new IOException("dex2oat is interrupted, msg: " + e2.getMessage(), e2); } catch (Throwable th) { if (shareFileLockHelper != null) { try { shareFileLockHelper.close(); } catch (IOException e3) { } } } } else { DexFile.loadDex(this.ACD.getAbsolutePath(), k, 0); } if (this.ACF != null) { this.ACF.mo12661i(this.ACD, new File(k)); } return true; } this.ACF.mo12660b(this.ACD, new IOException("dex file " + this.ACD.getAbsolutePath() + " is not exist!")); return false; } catch (Throwable th2) { new StringBuilder("Failed to optimize dex: ").append(this.ACD.getAbsolutePath()); if (this.ACF != null) { this.ACF.mo12660b(this.ACD, th2); return false; } } } } public interface ResultCallback { /* renamed from: ai */ void mo12659ai(File file); /* renamed from: b */ void mo12660b(File file, Throwable th); /* renamed from: i */ void mo12661i(File file, File file2); } static class StreamConsumer { static final Executor ACG = Executors.newSingleThreadExecutor(); private StreamConsumer() { } /* renamed from: L */ static void m9313L(final InputStream inputStream) { ACG.execute(new Runnable() { public final void run() { if (inputStream != null) { do { try { } catch (IOException e) { try { inputStream.close(); return; } catch (Exception e2) { return; } } catch (Throwable th) { try { inputStream.close(); } catch (Exception e3) { } throw th; } } while (inputStream.read(new byte[256]) > 0); try { inputStream.close(); } catch (Exception e4) { } } } }); } } /* renamed from: a */ public static boolean m9314a(Collection<File> collection, File file, ResultCallback resultCallback) { return m9315a(collection, file, false, null, resultCallback); } /* renamed from: a */ public static boolean m9315a(Collection<File> collection, File file, boolean z, String str, ResultCallback resultCallback) { ArrayList arrayList = new ArrayList(collection); Collections.sort(arrayList, new C59591()); Collections.reverse(arrayList); Iterator it = arrayList.iterator(); while (it.hasNext()) { if (!new OptimizeWorker((File) it.next(), file, z, str, resultCallback).dSk()) { return false; } } return true; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
39c1f03b8e7e22d194c5407710784e2e9ec32cae
541c1301cab132067d2dbeae93a96ce5abad2f2b
/Testing Harness/Testing_Harness/src/main/java/com/bbn/map/TestingHarness/analysis/outputs/BoxPlotEntry.java
8b8a4924c069d1b57ed367d41cb894c61dcd04a8
[ "BSD-2-Clause" ]
permissive
map-dcomp/map-hifi
87dbb0d920667547575cfb3c4721dec5e678ec03
7d10d9b5a5c05a7eabd5099959cfc2ec5ef7831c
refs/heads/main
2023-04-20T00:17:15.100646
2021-05-11T21:22:12
2021-05-12T12:38:59
300,638,798
1
0
null
null
null
null
UTF-8
Java
false
false
4,824
java
/*BBN_LICENSE_START -- DO NOT MODIFY BETWEEN LICENSE_{START,END} Lines Copyright (c) <2017,2018,2019,2020,2021>, <Raytheon BBN Technologies> To be applied to the DCOMP/MAP Public Source Code Release dated 2018-04-19, with the exception of the dcop implementation identified below (see notes). Dispersed Computing (DCOMP) Mission-oriented Adaptive Placement of Task and Data (MAP) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BBN_LICENSE_END*/ /* Copyright (c) <2017>, <Raytheon BBN Technologies> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.bbn.map.TestingHarness.analysis.outputs; import java.util.Map; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; /** * Min/Max box plot data * */ final public class BoxPlotEntry { String name = null; double min; double max; double r25; double r50; double r75; public BoxPlotEntry(String name, double min, double r25, double r50, double r75, double max) { this.name = name; this.min = min; this.max = max; this.r25 = r25; this.r50 = r50; this.r75 = r75; } public static BoxPlotEntry getBoxPlot(Map<String, DescriptiveStatistics> dataSet, String keyColumn, String boxPlotName) throws Exception { DescriptiveStatistics ds = dataSet.get(keyColumn); if (ds != null) { return new BoxPlotEntry(boxPlotName, ds.getMin(), ds.getPercentile(25.0D), ds.getPercentile(50.0D), ds.getPercentile(75.0D), ds.getMax()); } return null; } public String toRow() { StringBuffer sb = new StringBuffer (""); sb.append(getMin() + "\t"); sb.append(get25() + "\t"); sb.append(get50() + "\t"); sb.append(get75() + "\t"); sb.append(getMax()); return sb.toString(); } @Override public String toString() { StringBuffer sb = new StringBuffer (""); sb.append(name + System.lineSeparator()); sb.append("min\tfirst\tmedian\tthrid\tmax" + System.lineSeparator()); sb.append(getMin() + "\t"); sb.append(get25() + "\t"); sb.append(get50() + "\t"); sb.append(get75() + "\t"); sb.append(getMax() + System.lineSeparator()); return sb.toString(); } public double getMin() { return min; } public double getMax() { return max; } public double get25() { return r25; } public double get50() { return r50; } public double get75() { return r75; } public String getName() { return name; } }
[ "jon.schewe@raytheon.com" ]
jon.schewe@raytheon.com
31310208bd2cf87ec636e551662415dde1d030c9
b9cc7cb49f202f48e9a59a3d842ad554da91cf46
/app/src/main/java/com/lescoccinellesmali/postit/helper/TableData.java
7c31d3437551c62f3f2662cabd3882948f8a6aeb
[]
no_license
fdiallo/GoMobile
c452157f4d8ed544ea206ad73caff3870b694039
ba681c3bdd8e7b8a7a50488f4615314f38decf93
refs/heads/master
2020-07-31T05:14:10.739078
2019-09-25T02:07:49
2019-09-25T02:07:49
210,494,139
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package com.lescoccinellesmali.postit.helper; import android.provider.BaseColumns; public class TableData { public TableData(){ } public static abstract class TableInfo implements BaseColumns{ public static final String USER_NAME = "user_name"; public static final String USER_PASS = "user_pass"; public static final String DATABASE_NAME = "Post_db"; public static final String USER_TABLE_NAME = "user_table"; public static final String POST_TABLE_NAME = "post_table"; public static final String POST_TITLE = "post_title"; public static final String POST_AUTHOR = "post_author"; public static final String POST_DATE = "post_date"; public static final String POST_LOCATION = "post_location"; public static final String POST_DESCRIPTION = "post_description"; public static final String POST_TYPE = "post_type"; public static final String POST_EVENT = "post_event"; } }
[ "fallaye@Consultants-MacBook-Pro.local" ]
fallaye@Consultants-MacBook-Pro.local
69b27db5ed6d1a0eac877d4c133daf93a3ee8c84
d6138989f05b178c9a2300f60955697c80529fbd
/kotlin_module/app/src/androidTest/java/com/bosh/kotlin_module/ExampleInstrumentedTest.java
4821bfc273791514ef708b1796e9e4565d06dfa7
[ "Apache-2.0" ]
permissive
chinabosh/androiddemo
f82d7e84bb39ed17ce2e93d0ce4218e89ae347fb
e314891d2ee30507837e0992a9fcb631b6589b28
refs/heads/master
2022-06-22T10:00:16.637592
2022-06-14T08:50:47
2022-06-14T08:50:47
139,726,747
2
0
null
null
null
null
UTF-8
Java
false
false
714
java
package com.bosh.kotlin_module; import android.content.Context; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.bosh.kotlin_module", appContext.getPackageName()); } }
[ "810916259@qq.com" ]
810916259@qq.com
32890af946c15ab670b3bbf73fa32f0ed6b646d5
caad5d1faa3f88a265778374f1b085d215b63bf4
/src/test/java/coypu/driverTests/When_finding_an_element_by_css.java
8acb53c419fd2e216a51d5109cbfe615c69b60f0
[ "MIT" ]
permissive
vivekdahal57/coypu-jvm
ba2c37495a00d25466e497a1d3e17501f3b72088
aed5e8c392bde24e664fc89972f2fb6d4c8375e8
refs/heads/master
2021-01-15T16:28:46.509198
2012-05-04T16:52:29
2012-05-04T16:52:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,417
java
package coypu.driverTests; import coypu.MissingHtmlException; import org.junit.Test; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; public class When_finding_an_element_by_css extends DriverSpecs { @Test public void finds_present_examples() { String shouldFind = "#inspectingContent p.css-test span"; assertThat(driver().findCss(shouldFind, root()).getText(), is(equalTo("This"))); shouldFind = "ul#cssTest li:nth-child(3)"; assertThat(driver().findCss(shouldFind, root()).getText(), is(equalTo("Me! Pick me!"))); } @Test public void does_not_find_missing_examples() { String shouldNotFind = "#inspectingContent p.css-missing-test"; try { driver().findCss(shouldNotFind, root()); fail("Expected not to find something at: " + shouldNotFind); } catch(MissingHtmlException ex) { } } @Test public void only_finds_visible_elements() { String shouldNotFind = "#inspectingContent p.css-test img.invisible"; try { driver().findCss(shouldNotFind,root()); fail("Expected not to find something at: " + shouldNotFind); } catch(MissingHtmlException ex) { } } }
[ "adrian.longley@gmail.com" ]
adrian.longley@gmail.com
9463869a2b2efea464dc98db242e381a30a412d0
3e883ec4befb2650c5cd077c300c887fb09dc1da
/src/main/java/me/vmorozov/traffic/simulation/LongDistanceWay.java
d1d80eb804d917b8927add9e26a048504de2c9d2
[]
no_license
VladimirMorozov/AgentOriented
aee6e27a1b3c10f75760cfd4c7856bedf1a62d7f
df938e487f4d27cc4405efc6ee910973d7c7422e
refs/heads/master
2016-09-06T14:39:06.963327
2015-05-05T15:16:48
2015-05-05T15:16:48
30,837,467
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package me.vmorozov.traffic.simulation; import java.util.HashMap; import java.util.Map; public class LongDistanceWay extends Way { private int timeToTraverse = 10; private Map<Car, Integer> carsMovingThroughStartTime = new HashMap<Car, Integer>(); public LongDistanceWay(Waypoint to) { super(to); } @Override public void registerCarWaiting(Car car) { carsMovingThroughStartTime.put(car, Simulation.getTime()); } @Override public boolean tryMoveThroughBy(Car car) { if (carsMovingThroughStartTime.get(car) + timeToTraverse < Simulation.getTime()) { return true; } return false; } }
[ "bobamrz@gmail.com" ]
bobamrz@gmail.com
91e3b571c2a8da2b2eb7ace850c1d361f0f04d78
5a7e8e0ae7af99075d239b86f0821b13207cfce4
/app/src/main/java/com/trang/ez_mobile/util/Language.java
1ff00c1d39923e9dbad5d1a959c852d468e1cc62
[]
no_license
mocmoc05/EzMobile10
b3bd4387be9ad501d6a9b47967aea585c514aef7
70470cd49d8ba8f50af26b3c22c307c8dca8a3ee
refs/heads/master
2020-04-01T13:33:39.065663
2018-10-16T10:39:49
2018-10-16T10:39:49
153,257,310
0
1
null
null
null
null
UTF-8
Java
false
false
79,571
java
package com.trang.ez_mobile.util; import java.util.HashMap; public class Language { public static HashMap<String, String> hashMap = new HashMap<>(); public Language(int check) { switch (check) { case 1: putdataLangueViet(); break; case 2: putdataLangueAnh(); break; } } public void putdataLangueViet() { hashMap = new HashMap<>(); hashMap.put("Limit balance", "Hạn mức còn lại :"); hashMap.put("Aggregate buying power", "Sức mua tổng hợp :"); hashMap.put("Choose category", "Bạn chưa chọn danh mục!"); hashMap.put("Choose your category", "Chọn danh mục"); hashMap.put("Quantity should be more than 100","số lượng phải lớn hơn 100"); hashMap.put("Cancel", "Hủy bỏ"); hashMap.put("Network connection Error", "Mất kết nối tới Wifi"); hashMap.put("Quantity should be more than 0 and must be lesser than 100", "Số lượng phải lớn hơn 0 và nhỏ hơn 100"); hashMap.put("Quantity should be more than 10 and must be a multiple of 10", "Số lượng phải lớn hơn 10 và phải là bội số của 10 "); hashMap.put("Quantity should be more than 100 and must be a multiple of 100", "Số lượng phải lớn hơn 100 và phải là bội số của 100 "); hashMap.put("Margin Account Detail", "Chi Tiết Tài Khoản Ký Quỹ"); hashMap.put("Securities Symbol", "Mã CK"); hashMap.put("Cancel Order Successful", "Hủy Lệnh Thành Công"); hashMap.put("Session Logout", "Mất Session"); hashMap.put("Available", "KL có sẵn"); hashMap.put("Pending for Settlement", "KL chờ về"); hashMap.put("Pending for Corporate Actions", "KL quyền chờ về"); hashMap.put("MarketData Price", "Giá TT"); hashMap.put("Rate (Right)", "TLSM (Quyền)"); hashMap.put("Securities-leveraged buying power", "Sức mua bấy từ CK"); hashMap.put("Cash", "Tiền mặt"); hashMap.put("Cash on hold", "Tiền treo mua"); hashMap.put("Cash pending payment", "Tiền bán chờ về"); hashMap.put("Cash in transit", "Tiền đang chuyển"); hashMap.put("Basic buying power", "Sức mua cơ sở :"); hashMap.put("Total credit limit", "Tổng hạn mức"); hashMap.put("Outstanding debt", "Dư nợ"); hashMap.put("Accumulated interest", "Lãi vay kq lũy kế"); hashMap.put("Current R", "R hiện tại"); hashMap.put("Amount Called", "ST cần bổ sung"); hashMap.put("Rxl", "Mức XL"); hashMap.put("Account Details", "Chi tiết tài khoản"); hashMap.put("Securities", "Chi tiết CK"); hashMap.put("Cashbuy:", "Giá trị lệnh mua:"); hashMap.put("Available Stock", "Số dư Chứng Khoán"); hashMap.put("The amount of the amount of a balance", "Số tiền gửi không được lớn hơn số dư"); hashMap.put("Please input name", "Vui lòng nhập tên tài khoản!"); hashMap.put("Special characters", "Nội dung là không có dấu và ký tự đặc biệt"); hashMap.put("Special characters name", "Tên tài khoản là không có dấu và ký tự đặc biệt"); hashMap.put("Sức mua CK còn lại:", "Sức mua CK còn lại:"); hashMap.put("Not response", "Lỗi không xác định"); hashMap.put("Pending Order", "Lệnh Chờ Khớp"); hashMap.put("Today's Orders", "Lệnh Trong Ngày"); hashMap.put("Other Money:", "Tiền khác:"); hashMap.put("Updated to:", "Cập nhật đến :"); hashMap.put("Please update your app !", "Xin mời cập nhật phiên bản mới !"); hashMap.put("Current version is out of date. Please upgrade to new version!", "Phiên bản ứng dụng đang dùng đã cũ. Quý khách vui lòng cập nhật phiên bản mới!"); hashMap.put("Delete Watchlist", "Xóa danh mục"); hashMap.put("MarketData is opened", "Thị Trường Mở Cửa"); hashMap.put("Skip", "Bỏ qua"); hashMap.put("The quantity each split order must be bigger than 1000", "Khối lượng tối thiểu là 1000"); hashMap.put("was setted as default Watchlist", "đã được đặt thành Danh mục Mặc định"); hashMap.put("News", "Tin Tức"); hashMap.put("Sellable", "Có thể bán"); hashMap.put("CASH", "Thường"); hashMap.put("MARGIN", "Ký quỹ"); hashMap.put("January", "Tháng 1"); hashMap.put("February", "Tháng 2"); hashMap.put("March", "Tháng 3"); hashMap.put("April", "Tháng 4"); hashMap.put("May", "Tháng 5"); hashMap.put("June", "Tháng 6"); hashMap.put("July", "Tháng 7"); hashMap.put("August", "Tháng 8"); hashMap.put("September", "Tháng 9"); hashMap.put("October", "Tháng 10"); hashMap.put("November", "Tháng 11"); hashMap.put("December", "Tháng 12"); hashMap.put("tháng 1", "Tháng 1"); hashMap.put("tháng 2", "Tháng 2"); hashMap.put("tháng 3", "Tháng 3"); hashMap.put("tháng 4", "Tháng 4"); hashMap.put("tháng 5", "Tháng 5"); hashMap.put("tháng 6", "Tháng 6"); hashMap.put("tháng 7", "Tháng 7"); hashMap.put("tháng 8", "Tháng 8"); hashMap.put("tháng 9", "Tháng 9"); hashMap.put("tháng 10", "Tháng 10"); hashMap.put("tháng 11", "Tháng 11"); hashMap.put("tháng 12", "Tháng 12"); hashMap.put("Price, Quantity unchanged", "Giá, KL chưa thay đổi"); hashMap.put("Add WatchList Name", "thêm danh mục mới"); hashMap.put("The Cash Receive must be less than", "Số tiền vay không lớn hơn"); hashMap.put("Switch account", "Đăng nhập tài khoản khác"); hashMap.put("Normal order quantity should be less than 500.000 (HOSE stock). You should split order.", "Khối lượng Báo giá phải nhỏ hơn 500.000 đối với sàn HOSE. Bạn phải tách lệnh."); hashMap.put("+/-", "+/-"); hashMap.put("P.B3", "G.M3"); hashMap.put("Q.B3", "KL.M3"); hashMap.put("P.B2", "G.M2"); hashMap.put("Q.B2", "KL.M2"); hashMap.put("P.B1", "G.M1"); hashMap.put("Q.B1", "KL.M1"); hashMap.put("P.S1", "G.B1"); hashMap.put("Q.S1", "KL.B1"); hashMap.put("P.S2", "G.B2"); hashMap.put("Q.S2", "KL.B2"); hashMap.put("P.S3", "G.B3"); hashMap.put("Q.S3", "KL.B3"); hashMap.put("newshomee", "tintiengviet"); hashMap.put("There is no information of indice", "Chưa có thông tin chỉ số"); hashMap.put("eventshomee", "sukienhometiengviet"); hashMap.put("Sell Oddlot History", "Lịch sử bán CK lô lẻ"); hashMap.put("Extendable", "Có thể gia hạn"); hashMap.put("Date", "Ngày"); hashMap.put("Repay", "Trả nợ"); hashMap.put("Renew", "Gia hạn"); hashMap.put("Please input Amount", "Chưa nhập Số tiền Chuyển khoản"); hashMap.put("Search", "Tìm kiếm mã chứng khoán"); hashMap.put("Select Template", "Chọn Biểu mẫu"); hashMap.put("Order History", "Lịch sử đặt lệnh"); hashMap.put("Intraday Trading Result", "Kết quả khớp lệnh"); hashMap.put("Match Price", "Giá Khớp"); hashMap.put("Total Vol", "Tổng KL"); hashMap.put("Quantity should be less than 999.999", "Số lượng nên nhỏ hơn 999.999"); hashMap.put("Qty", "SL"); hashMap.put("Most Active", "GD Nhiều"); hashMap.put("New Contract Date:", "Ngày Hợp đồng Mới:"); hashMap.put("Please enter Receiver Name", "Chưa nhập Tên Người nhận"); hashMap.put("Floor", "Sàn"); hashMap.put("Cancel Order", "Hủy lệnh"); hashMap.put("Modify Order", "Sửa lệnh"); hashMap.put("Back", "Quay Lại"); hashMap.put("Bene.'s Account not exist", "Tài khoản Người nhận không tồn tại"); hashMap.put("Transfer History", "Lịch sử chuyển tiền"); hashMap.put("Contract", "Hợp đồng"); hashMap.put("Please select Bank", "Chưa chọn Ngân hàng"); hashMap.put("New Expriry Date:", "Ngày hết hạn mới:"); hashMap.put("Expriry Date:", "Ngày hết hạn:"); hashMap.put("Content", "Nội dung"); hashMap.put("Held for buying orders:", "Đang treo:"); hashMap.put("Please input Account", "Chưa nhập Tài khoản Người nhận"); hashMap.put("SELL", "Bán"); hashMap.put("BUY", "Mua"); hashMap.put("P/L", "Lãi/Lỗ"); hashMap.put("Can not modify oddlot order to normal order", "Không thể sửa lệnh lô chẵn thành lô lẻ"); hashMap.put("Can not modify normal order to oddlot order", "Không thể sửa lệnh lô lẻ thành lô chẵn"); hashMap.put("Margin Amount", "Ký Quỹ"); hashMap.put("Select Account To Transfer", "Chọn Tài khoản Người nhận"); hashMap.put("Quantity", "Số Lượng"); hashMap.put("Transfer Description", "Nội dung Chuyển tiền"); hashMap.put("Confirm Buy", "Xác nhận Mua"); hashMap.put("Please select Date To", "Chưa chọn Ngày kết thúc"); hashMap.put("Ref", "TC"); hashMap.put("Stock", "Chứng khoán"); hashMap.put("Please enter Transfer Description", "Chưa nhập Nội dung Chuyển tiền"); hashMap.put("Normal Stock", "Chứng khoán Thường"); hashMap.put("Term:", "Lệnh"); hashMap.put("Buy", "Mua"); hashMap.put("Pay Amount:", "Thanh toán:"); hashMap.put("Real Estate News", "Bất động sản"); hashMap.put("New Charge Rate:", "Tỉ lệ Phí Mới:"); hashMap.put("Breaking time", "Nghỉ trưa"); hashMap.put("Cancel Transfer Successfully", "Đã huỷ Giao dịch Chuyển tiền"); hashMap.put("Favorites", "Yêu Thích"); hashMap.put("Select Branch", "Chọn Chi nhánh"); hashMap.put("Advance Amount:", "Ứng trước:"); hashMap.put("FPTS News", "Tin tức FPTS"); hashMap.put("Quantity must be lesser than 20.000", "Số lượng giao dịch không được lớn hơn 20.000"); hashMap.put("Get Quotes", "Mã Chứng Khoán"); hashMap.put("Account:", "Tài khoản:"); hashMap.put("Please select Province", "Chưa chọn Tỉnh thành"); hashMap.put("Financial Figures", "Chỉ Số & Chỉ Tiêu Tài Chính"); hashMap.put("Cash Balance:", "Số dư Tiền"); hashMap.put("Available Cash:", "Số dư Tiền"); hashMap.put("Economy News", "Kinh tế vĩ mô"); hashMap.put("WatchList Name", "Tên Danh Mục"); hashMap.put("Price", "Giá"); hashMap.put("New Expire Date:", "Ngày Hết hạn Mới:"); hashMap.put("Setting", "Thiết Lập"); hashMap.put("Home", "Trang Chủ"); hashMap.put("Remain Room:", "Khối lượng Còn lại:"); hashMap.put("Quantity each Order:", "Khối lượng mỗi Lệnh:"); hashMap.put("Finance Overview", "Tổng Quan Tài Chính"); hashMap.put("Trading Password", "Mật khẩu Giao dịch"); hashMap.put("Please Select Account To Transfer", "Chưa chọn Tài khoản Người nhận"); hashMap.put("Money Transfer", "Chuyển Tiền"); hashMap.put("Margin Account Details", "Báo Cáo Ký Quỹ"); hashMap.put("Open", "Mở"); hashMap.put("Close", "Đóng"); hashMap.put("Margin:", "Ký Quỹ"); hashMap.put("Finance & Banking News", "Tài chính - Ngân hàng"); hashMap.put("WatchList must have at least one company", "Danh mục phải có ít nhất 1 mã"); hashMap.put("Overview", "Tổng Quan"); hashMap.put("Cur. Mor Amount:", "Tổng Mor:"); hashMap.put("Current Room:", "Khối lượng Hiện tại:"); hashMap.put("Forei.Sell", "NN Bán"); hashMap.put("Commodity News", "Thị trường hoàng hoá"); hashMap.put("Val", "GT"); hashMap.put("Symbol:", "Mã CK :"); hashMap.put("Symbol Search", "Mã CK"); hashMap.put("Not enough stock balance", "Số lượng không đủ để cầm cố"); hashMap.put("Symbol", "Mã CK"); hashMap.put("Contract No", "Số hợp đồng"); hashMap.put("Please enter Price", "Chưa nhập Giá"); hashMap.put("Please enter Pay Amount", "Chưa nhập Số tiền Thanh toán"); hashMap.put("cannot buy Margin", "không thể mua Ký Quỹ"); hashMap.put("Available Balance:", "Số dư hiện tại:"); hashMap.put("No. of days:", "Số ngày tính lãi:"); hashMap.put("Pay Amount:", "Số tiền trả"); hashMap.put("Rate (%/day):", "Lãi suất (%/ngày):"); hashMap.put("Interest:", "Lãi vay:"); hashMap.put("Fee:", "Phí tạm tính:"); hashMap.put("Fee", "Phí"); hashMap.put("Please select Branch", "Chưa chọn Chi nhánh"); hashMap.put("Remember Account", "Ghi Nhớ Tài Khoản"); hashMap.put("World News", "Chỉ số thế giới"); hashMap.put("Price must be a multiple of", "Giá phải là bội số của "); hashMap.put("Price must be a multiple of 100", "Giá phải là bội số của 100"); hashMap.put("Price must be a multiple of 10", "Giá phải là bội số của 10"); hashMap.put("Price must be a multiple of 1", "Giá phải là bội số của 1"); hashMap.put("Floor Price", "Giá Sàn"); hashMap.put("Cash & Stock", "Tiền & Chứng Khoán"); hashMap.put("Please select Date From", "Chưa chọn Ngày bắt đầu"); hashMap.put("Contract:", "Hợp đồng:"); hashMap.put("Branch:", "Chi nhánh:"); hashMap.put("Sell Price", "Giá Bán"); hashMap.put("New Price:", "Giá mới"); hashMap.put("Cash:", "Tiền mặt"); hashMap.put("New Interest Rate (%/day):", "Lãi suất mới (%/ngày):"); hashMap.put("Stock balance is not enough", "Tài khoản không đủ chứng khoán"); hashMap.put("Buy Price", "Giá "); hashMap.put("MarketData News", "Thị trường Chứng khoán"); hashMap.put("Account", "Tài khoản"); hashMap.put("Matching:", "Khớp:"); hashMap.put("Confirm Sell", "Xác nhận Bán"); hashMap.put("Quantity should be more than 0", "Số lượng phải lớn hơn 0"); hashMap.put("Quantity should be more than 10", "Số lượng phải lớn hơn 10"); hashMap.put("Quantity should be more than 999", "Số lượng phải lớn hơn 999"); hashMap.put("Chart", "Biểu Đồ"); hashMap.put("Charge Rate:", "Tỉ lệ Phí:"); hashMap.put("Putthrough:", "Thoả Thuận:"); hashMap.put("Ratios (%):", "Tỉ lệ Sở hữu (%):"); hashMap.put("Features", "Tính Năng"); hashMap.put("Pay amount must be smaller than current Mar/Mor amount", "Tổng thanh toán phải nhỏ hơn Tổng Ký Quỹ"); hashMap.put("Modify Order Successful", "Sửa lệnh Thành công"); hashMap.put("Vol:", "KL:"); hashMap.put("bil", "tỷ"); hashMap.put("Sell Quantity", "KL Bán"); hashMap.put("Sell", "Bán"); hashMap.put("World Indexes", "Chỉ Số Thế Giới"); hashMap.put("Mortgage", "Cầm cố"); hashMap.put("Symbol", "Mã CK"); hashMap.put("Price should be less than 999.999.999", "Giá nên nhỏ hơn 999.999"); hashMap.put("Financial Ratios", "Chỉ Tiêu"); hashMap.put("Margin Stock", "Chứng khoán Ký Quỹ"); hashMap.put("Low", "Thấp"); hashMap.put("Exit", "Thoát"); hashMap.put("Place Orders", "Đặt Lệnh"); hashMap.put("Available Stock:", "Số dư CK"); hashMap.put("Payment", "Trả nợ"); hashMap.put("Stock Balance", "Chứng Khoán"); hashMap.put("Please enter Receiver Account", "Chưa nhập Tài khoản Người nhận"); hashMap.put("Expire Date:", "Ngày Hết hạn:"); hashMap.put("Bank:", "Ngân hàng:"); hashMap.put("From Date", "Từ ngày"); hashMap.put("Total:", "Tổng:"); hashMap.put("Pending Buy Orders:", "Đang treo:"); hashMap.put("Change", "Thay Đổi"); hashMap.put("Margin", "Ký Quỹ"); hashMap.put("Date Count:", "Số ngày:"); hashMap.put("Asset Report", "Báo Cáo Tài Sản"); hashMap.put("Quantity must be a multiple of 10", "Số lượng phải là bội số của 10"); hashMap.put("Select Bank", "Chọn Ngân hàng"); hashMap.put("Login", "Đăng nhập"); hashMap.put("Sell Oddlot", "Bán Lô Lẻ"); hashMap.put("BANK", "NGÂN HÀNG"); hashMap.put("Amount:", "Số tiền"); hashMap.put("Account:", "Tài khoản"); hashMap.put("Name:", "Tên"); hashMap.put("Bank:", "Ngân hàng"); hashMap.put("Province:", "Tỉnh thành"); hashMap.put("Branch:", "Chi nhánh"); hashMap.put("Estimated Fee:", "Phí tạm tính"); hashMap.put("Select Template", "Chọn Biểu mẫu"); hashMap.put("Select Bank", "Chọn Ngân hàng"); hashMap.put("Select Province", "Chọn Tỉnh thành"); hashMap.put("Select Branch", "Chọn Chi nhánh"); hashMap.put("Transfer Description", "Nội dung Chuyển tiền"); hashMap.put("Amount", "Số Tiền"); hashMap.put("is not in the Margin stock list", "không có trong danh mục ký quỹ"); hashMap.put("Detail", "Chi tiết"); hashMap.put("Request has been executed successfully!", "Giao dịch Thành công!"); hashMap.put("MarketData is opening", "Thị trường Mở cửa"); hashMap.put("Provisional Fee:", "Phí Tạm thu:"); hashMap.put("Mor Amount:", "Tổng Mor:"); hashMap.put("Company News", "Tin Tức Công Ty"); hashMap.put("Foreign Ownership", "Thông Tin Nước Ngoài"); hashMap.put("Forei.Buy", "NN Mua"); hashMap.put("Volume", "Khối Lượng"); hashMap.put("Name", "Tên"); hashMap.put("Value", "Giá Trị"); hashMap.put("Total Room:", "Khối lượng Được mua:"); hashMap.put("Please input WatchList Name", "Tên Danh Mục"); hashMap.put("Order List", "Danh sách lệnh đặt"); hashMap.put("Please enter Symbol", "Chưa nhập Mã CK"); hashMap.put("Modify Order", "Sửa Lệnh"); hashMap.put("Cancel/Modify Order", "Hủy/Sửa lệnh"); hashMap.put("Headlines", "Tin Tức"); hashMap.put("Symbol is already in Quotes", "Mã đã có trong danh mục"); hashMap.put("Cur. Mar Amount:", "Tổng Mar:"); hashMap.put("Open Qty", "SL Mở cửa"); hashMap.put("Input invalid number", "Nhập sai Số"); hashMap.put("Last", "Giá"); hashMap.put("Last ", "Giá Khớp"); hashMap.put("Pending Qty", "Đang treo"); hashMap.put("Top Losers", "Giảm Mạnh"); hashMap.put("Province", "Tỉnh thành"); hashMap.put("Putthrough", "Thoả thuận"); hashMap.put("MarketData Overview", "Tổng Quan Thị Trường"); hashMap.put("Charge Amount:", "Tổng Phí:"); hashMap.put("Select Province", "Chọn Tỉnh thành"); hashMap.put("To Date", "Đến ngày"); hashMap.put("Password:", "Mật khẩu"); hashMap.put("Dashboard", "Trang Chủ"); hashMap.put("Please enter Quantity", "Chưa nhập Số lượng"); hashMap.put("Cash Total:", "Tổng giá trị"); hashMap.put("Your trading password is incorrect", "Sai Mật khẩu Giao dịch"); hashMap.put("Mar Amount:", "Tổng Mar:"); hashMap.put("Value:", "GT:"); hashMap.put("Price:", "Giá :"); hashMap.put("Quantity:", "Số lượng"); hashMap.put("Please enter your account", "Chưa nhập Tài khoản"); hashMap.put("Logged out", "Đã đăng xuất"); hashMap.put("Up/Down stocks", "Số mã Tăng/Giảm"); hashMap.put("The quantity should be lesser than 999.999", "Số lượng nên nhỏ hơn 999.999"); hashMap.put("Events", "Lịch Sự Kiện"); hashMap.put("Exchange:", "Sàn GD"); hashMap.put("Ceil", "Trần"); hashMap.put("Quantity must be a multiple of 100", "Số lượng phải là bội số của 100"); hashMap.put("Delete", "Xoá"); hashMap.put("Select Template", "Chọn Biểu mẫu"); hashMap.put("Top Gainers", "Tăng Mạnh"); hashMap.put("Please select Bank", "Chưa chọn Ngân hàng"); hashMap.put("Mkt.Price", "Giá TT"); hashMap.put("Watch List", "Bảng Giá"); hashMap.put("Cash balance is not enough", "Tài khoản không đủ tiền"); hashMap.put("High", "Cao"); hashMap.put("Confirm", "Xác nhận"); hashMap.put("The price must be a multiple of", "Giá phải là bội số của"); hashMap.put("Match", "KL Khớp"); hashMap.put("Please enter Cash To Transfer", "Chưa nhập Số tiền Chuyển khoản"); hashMap.put("Cancel Order", "Huỷ Lệnh"); hashMap.put("Vol", "KL"); hashMap.put("Pending", "Chờ"); hashMap.put("Cash Balance", "Tiền"); hashMap.put("Add Watch List", "Thêm Danh Mục"); hashMap.put("Cash Receive:", "Số tiền vay :"); hashMap.put("Foreign Sell:", "NN Bán:"); hashMap.put("Password", "Mật khẩu"); hashMap.put("The quantity must be lesser than", "Số lượng phải nhỏ hơn"); hashMap.put("Price must be between", "Giá phải nằm trong khoảng"); hashMap.put("Stock is not enough to mortgage", "Số lượng không đủ để cầm cố"); hashMap.put("Side:", "Mua Bán"); hashMap.put("Price should be more than 0", "Giá phải lớn hơn 0"); hashMap.put("MarketData was closed", "Thị trường Đóng cửa"); hashMap.put("Indices", "Chỉ Số"); hashMap.put("Indexes", "Chỉ Số"); hashMap.put("Buy Quantity", "KL Mua"); hashMap.put("Pay Date:", "Hạn Thanh toán:"); hashMap.put("Ezmargin Sell", "Bán Ký Quỹ"); hashMap.put("Rate:", "Tỉ Lệ :"); hashMap.put("Rate", "Tỉ lệ"); hashMap.put("Avg.Price", "Giá TB"); hashMap.put("New Qty:", "KL mới"); hashMap.put("Change Qty:", "KL thay đổi"); hashMap.put("Ref Price", "Giá TC"); hashMap.put("Foreign Buy:", "NN Mua:"); hashMap.put("Total", "Tổng"); hashMap.put("Available Qty", "SL Hiện tại"); hashMap.put("Quantity must be less than 500.000", "Số lượng giao dịch không quá 500.000"); hashMap.put("Total Payment:", "Tổng:"); hashMap.put("Please enter your password", "Chưa nhập Mật khẩu"); hashMap.put("Login with other account", "Đăng nhập tài khoản khác"); hashMap.put("Symbol does not exist", "Mã CK không tồn tại"); hashMap.put("Restrict Stock", "Chứng khoán Hạn chế"); hashMap.put("Contract Date:", "Ngày Hợp đồng:"); hashMap.put("Contract Date", "Ngày Hợp đồng"); hashMap.put("Advance Report", "Lịch Sử Ứng Trước"); hashMap.put("Receiver Account does not exsit", "Tài khoản Người nhận không tồn tại"); hashMap.put("Member Area", "Thành Viên"); hashMap.put("Member", "Thành Viên"); hashMap.put("Extend", "Gia hạn"); hashMap.put("Cash", "Tiền mặt"); hashMap.put("Exit", "Thoát"); // hashMap.put("Mortgage Order", "Hợp đồng cầm cố"); hashMap.put("Please enter Trading Password", "Chưa nhập Mật khẩu Giao dịch"); hashMap.put("Ceil Price", "Giá Trần"); hashMap.put("Renew", "Gia hạn"); hashMap.put("Language", "Ngôn Ngữ"); hashMap.put("Type:", "Loại GD"); hashMap.put("Cash Being Transferred:", "Đang chuyển:"); hashMap.put("Logout", "Đăng xuất"); hashMap.put("Key FS Items", "Chỉ Số"); hashMap.put("Amount:", "Số tiền"); hashMap.put("Foreign-owned Ratio (%):", "Tỉ lệ Sở hữu (%):"); hashMap.put("Order Type:", "Loại lệnh :"); hashMap.put("Buy/Sell", "Mua bán"); hashMap.put("Time", "Thời Gian"); hashMap.put("Order Type", "Loại lệnh"); hashMap.put("Status", "Tình trạng"); hashMap.put("Remaining Loan Amt:", "Dư nợ ký quỹ còn lại:"); hashMap.put("Product Type", "Loại GD"); hashMap.put("Exchange", "Sàn"); hashMap.put("Order No.", "SHL"); hashMap.put("Account", "Tài khoản"); hashMap.put("Remain Qty", "KL Còn Lại"); hashMap.put("Please input Description", "Chưa nhập Nội dung Chuyển tiền"); hashMap.put("Doanh thu thuần", "Doanh thu thuần"); hashMap.put("Lợi nhuận gộp", "Lợi nhuận gộp"); hashMap.put("LN thuần từ HĐKD", "LN thuần từ HĐKD"); hashMap.put("Lợi nhuận trước thuế", "Lợi nhuận trước thuế"); hashMap.put("Lợi nhuận sau thuế", "Lợi nhuận sau thuế"); hashMap.put("Tài sản ngắn hạn", "Tài sản ngắn hạn"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Nợ ngắn hạn", "Nợ ngắn hạn"); hashMap.put("Nợ dài hạn", "Nợ dài hạn"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Vốn đầu tư CSH", "Vốn đầu tư CSH"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Please select Province", "Chưa chọn Tỉnh thành"); hashMap.put("Please select Branch", "Chưa chọn Chi nhánh"); hashMap.put("Lending Ratio:", "Tỷ lệ vay hiện tại (%):"); hashMap.put("New Warning Rate:", "Tỷ lệ cảnh báo mới:"); hashMap.put("New Margin Call Rate:", "Tỷ lệ xử lý mới (%):"); hashMap.put("Tăng trưởng doanh thu", "Tăng trưởng doanh thu"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Tăng trưởng lợi nhuận thuần"); hashMap.put("Tăng trưởng tổng tài sản", "Tăng trưởng tổng tài sản"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Chỉ tiêu đầu tư tự doanh", "Chỉ tiêu đầu tư tự doanh"); hashMap.put("Khả năng thanh toán hiện hành", "Khả năng thanh toán hiện hành"); hashMap.put("Nợ thanh toán GDCK/nguồn vốn", "Nợ thanh toán GDCK/nguồn vốn"); hashMap.put("Khả năng thanh toán nhanh", "Khả năng thanh toán nhanh"); hashMap.put("Trích dự phòng giảm giá CK", "Trích dự phòng giảm giá CK"); hashMap.put("Tổng nợ/Vốn CSH", "Tổng nợ/Vốn CSH"); hashMap.put("Đòn bẩy (Tổng TS/Vốn CSH)", "Đòn bẩy (Tổng TS/Vốn CSH)"); hashMap.put("Tỷ lệ chi phí HĐKD CK", "Tỷ lệ chi phí HĐKD CK"); hashMap.put("Success!", "Giao dịch Thành công!"); hashMap.put("Incorrect Trading Password", "Sai Mật khẩu Giao dịch"); hashMap.put("Account Name", "Tên người nhận"); hashMap.put("Remaining credit line", "Hạn mức còn lại"); hashMap.put("Loan amount:", "Số tiền vay"); hashMap.put("Payment Amt. should be less than Remaining Loan Amt.", "Số tiền thanh toán không được vượt Dư nợ"); hashMap.put("Please input payment amt.", "Chưa nhập Số tiền Thanh toán"); hashMap.put("Quantity must be less than", "Số lượng phải nhỏ hơn"); hashMap.put("Pending Settlement", "Tiền bán chờ TT"); hashMap.put("Cash & Stock", "Tiền & Chứng Khoán"); hashMap.put("Margin Loans", "Dư Nợ Ký Quỹ"); hashMap.put("Total:", "Tổng:"); hashMap.put("Restrict Stock", "Chứng khoán Hạn chế"); hashMap.put("Open Qty", "SL Mở cửa"); hashMap.put("Selling Qty", "Đang treo"); hashMap.put("Available Qty", "SL Hiện tại"); hashMap.put("Watchlist", "Bảng Giá"); /* Stock Detail */ hashMap.put("Giá trị vốn hóa thị trường", "Giá trị vốn hóa thị trường"); hashMap.put("KLNY hiện tại", "KLNY hiện tại"); hashMap.put("KLĐLH hiện tại", "KLĐLH hiện tại"); hashMap.put("KLGD bq 30 ngày", "KLGD bq 30 ngày"); hashMap.put("Giá cao nhất 52 tuần", "Giá cao nhất 52 tuần"); hashMap.put("Giá thấp nhất 52 tuần", "Giá thấp nhất 52 tuần"); hashMap.put("Tỷ lệ sở hữu nước ngoài", "Tỷ lệ sở hữu nước ngoài"); hashMap.put("EPS*", "EPS*"); hashMap.put("P/E*", "P/E*"); hashMap.put("EPS điều chỉnh*", "EPS điều chỉnh*"); hashMap.put("EPS(FPTS)**", "EPS(FPTS)**"); hashMap.put("P/E(FPTS)**", "P/E(FPTS)**"); hashMap.put("Doanh thu thuần", "Doanh thu thuần"); hashMap.put("Lợi nhuận gộp", "Lợi nhuận gộp"); hashMap.put("LN thuần từ HĐKD", "LN thuần từ HĐKD"); hashMap.put("Lợi nhuận trước thuế", "Lợi nhuận trước thuế"); hashMap.put("Lợi nhuận sau thuế", "Lợi nhuận sau thuế"); hashMap.put("Tài sản ngắn hạn", "Tài sản ngắn hạn"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Nợ ngắn hạn", "Nợ ngắn hạn"); hashMap.put("Nợ dài hạn", "Nợ dài hạn"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Vốn đầu tư CSH", "Vốn đầu tư CSH"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Thu nhập lãi thuần", "Thu nhập lãi thuần"); hashMap.put("Thu nhập HĐKD thuần", "Thu nhập HĐKD thuần"); hashMap.put("Thu nhập HĐKD trước dự phòng", "Thu nhập HĐKD trước dự phòng"); hashMap.put("Lợi nhuận thuần", "Lợi nhuận thuần"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Cho vay khách hàng", "Cho vay khách hàng"); hashMap.put("Tiền gửi khách hàng", "Tiền gửi khách hàng"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Doanh thu thuần", "Doanh thu thuần"); hashMap.put("Lợi nhuận gộp", "Lợi nhuận gộp"); hashMap.put("Lợi nhuận từ HĐKD", "Lợi nhuận từ HĐKD"); hashMap.put("Lợi nhuận trước thuế", "Lợi nhuận trước thuế"); hashMap.put("Lợi nhuận sau thuế", "Lợi nhuận sau thuế"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Tài sản ngắn hạn", "Tài sản ngắn hạn"); hashMap.put("Nợ phải trả", "Nợ phải trả"); hashMap.put("Nợ ngắn hạn", "Nợ ngắn hạn"); hashMap.put("Nợ dài hạn", "Nợ dài hạn"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Vốn đầu tư CSH", "Vốn đầu tư CSH"); hashMap.put("Cập nhật đến quý 1/2015", "Cập nhật đến quý 1/2015"); hashMap.put("Doanh thu", "Doanh thu"); hashMap.put("Lợi nhuận thuần", "Lợi nhuận thuần"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Tăng trưởng doanh thu", "Tăng trưởng doanh thu"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Tăng trưởng lợi nhuận thuần"); hashMap.put("Tăng trưởng Tổng tài sản", "Tăng trưởng Tổng tài sản"); hashMap.put("ROE (Lợi nhuận trên vốn chủ sở hữu)", "ROE (Lợi nhuận trên vốn chủ sở hữu)"); hashMap.put("ROA", "ROA"); hashMap.put("Khả năng thanh toán hiện hành", "Khả năng thanh toán hiện hành"); hashMap.put("Khả năng thanh toán nhanh", "Khả năng thanh toán nhanh"); hashMap.put("Tổng nợ/Vốn chủ sở hữu", "Tổng nợ/Vốn chủ sở hữu"); hashMap.put("Tổng nợ/Tổng tài sản", "Tổng nợ/Tổng tài sản"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); // hashMap.put("Tiền Khác", "Tiền Khác"); hashMap.put("Tăng trưởng tín dụng", "Tăng trưởng tín dụng"); hashMap.put("Tăng trưởng tổng tài sản", "Tăng trưởng tổng tài sản"); hashMap.put("Tăng trưởng huy động vốn", "Tăng trưởng huy động vốn"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Thu nhập lãi cận biên", "Thu nhập lãi cận biên"); hashMap.put("Tỷ lệ an toàn vốn tối thiểu", "Tỷ lệ an toàn vốn tối thiểu"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Tăng trưởng doanh thu", "Tăng trưởng doanh thu"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Tăng trưởng lợi nhuận thuần"); hashMap.put("Tăng trưởng tổng tài sản", "Tăng trưởng tổng tài sản"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Chỉ tiêu đầu tư tự doanh", "Chỉ tiêu đầu tư tự doanh"); hashMap.put("Khả năng thanh toán hiện hành", "Khả năng thanh toán hiện hành"); hashMap.put("Nợ thanh toán GDCK/nguồn vốn", "Nợ thanh toán GDCK/nguồn vốn"); hashMap.put("Khả năng thanh toán nhanh", "Khả năng thanh toán nhanh"); hashMap.put("Trích dự phòng giảm giá CK", "Trích dự phòng giảm giá CK"); hashMap.put("Tổng nợ/Vốn CSH", "Tổng nợ/Vốn CSH"); hashMap.put("Đòn bẩy (Tổng TS/Vốn CSH)", "Đòn bẩy (Tổng TS/Vốn CSH)"); hashMap.put("Tỷ lệ chi phí HĐKD CK", "Tỷ lệ chi phí HĐKD CK"); hashMap.put("Tổng nợ/Tổng tài sản", "Tổng nợ/Tổng tài sản"); hashMap.put("Cập nhật đến quý 1/2015", "Cập nhật đến quý 1/2015"); hashMap.put("Tổng DT phí BH/nguồn vốn", "Tổng DT phí BH/nguồn vốn"); hashMap.put("DT phí BH thuần/nguồn vốn", "DT phí BH thuần/nguồn vốn"); hashMap.put("Trợ vốn/nguồn vốn", "Trợ vốn/nguồn vốn"); hashMap.put("Tỷ lệ bồi thường", "Tỷ lệ bồi thường"); hashMap.put("Tỷ lệ chi phí HDKD", "Tỷ lệ chi phí HDKD"); hashMap.put("Tỷ lệ kết hợp", "Tỷ lệ kết hợp"); hashMap.put("Tỷ suất lợi nhuận đầu tư", "Tỷ suất lợi nhuận đầu tư"); hashMap.put("Công nợ/tài sản thanh khoản", "Công nợ/tài sản thanh khoản"); hashMap.put("Nợ phí/nguồn vốn", "Nợ phí/nguồn vốn"); hashMap.put("Dự phòng bồi thường/phí BH", "Dự phòng bồi thường/phí BH"); hashMap.put("Cập nhật đến quý 2/2015", "Cập nhật đến quý 2/2015"); hashMap.put("Split order", "Tách lệnh"); hashMap.put("Mrk.", "Giá"); hashMap.put("B1", "M1"); hashMap.put("B2", "M2"); hashMap.put("B3", "M3"); hashMap.put("S1", "B1"); hashMap.put("S2", "B2"); hashMap.put("S3", "B3"); hashMap.put("Contract List", "Danh sách Hợp Đồng"); hashMap.put("Mortgage Order", "Đặt lệnh Cầm cố"); /// --- Update tu dien viet 23/2 ---/// /// -- Doanh Nghiep thuong (Viet) ---/// hashMap.put("Doanh thu bán hàng & dịch vụ", "Doanh thu bán hàng & dịch vụ"); hashMap.put("Lợi nhuận gộp bán hàng & dịch vụ", "Lợi nhuận gộp bán hàng & dịch vụ"); hashMap.put("Lợi nhuận thuần từ HĐKD", "Lợi nhuận thuần từ HĐKD"); hashMap.put("Lợi nhuận (lỗ) kế toán trước thuế", "Lợi nhuận (lỗ) kế toán trước thuế"); hashMap.put("Lợi nhuận (lỗ) sau thuế TNDN", "Lợi nhuận (lỗ) sau thuế TNDN"); hashMap.put("Tài sản ngắn hạn", "Tài sản ngắn hạn"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Nợ ngắn hạn", "Nợ ngắn hạn"); hashMap.put("Nợ dài hạn", "Nợ dài hạn"); hashMap.put("Vốn CSH", "Vốn CSH"); hashMap.put("Vốn đầu tư của CSH", "Vốn đầu tư của CSH"); hashMap.put("Cập nhật đến quý 4/2016", "Cập nhật đến quý 4/2016"); /// --- Ngan Hang Viet --- /// hashMap.put("Thu nhập lãi và thu nhập tương tự", "Thu nhập lãi và thu nhập tương tự"); hashMap.put("Lãi/Lỗ thuần từ HĐDV", "Lãi/Lỗ thuần từ HĐDV"); hashMap.put("LNT HĐKD trước CPDP RR Tín dụng", "LNT HĐKD trước CPDP RR Tín dụng"); hashMap.put("Lợi nhuận sau thuế", "Lợi nhuận sau thuế"); hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Cho vay khách hàng", "Cho vay khách hàng"); hashMap.put("Tiền gửi khách hàng", "Tiền gửi khách hàng"); hashMap.put("Tổng vốn CSH", "Tổng vốn CSH"); ///--- Cong ty chung khoan Viet --/// hashMap.put("Doanh thu hoạt động", "Doanh thu hoạt động"); hashMap.put("Chi phí hoạt động", "Chi phí hoạt động"); hashMap.put("Kết quả hoạt động", "Kết quả hoạt động"); hashMap.put("Lợi nhuận kế toán trước thuế", "Lợi nhuận kế toán trước thuế"); hashMap.put("Lợi nhuận kế toán sau thuế", "Lợi nhuận kế toán sau thuế"); hashMap.put("Tổng cộng tài sản", "Tổng cộng tài sản"); hashMap.put("Tài sản ngắn hạn", "Tài sản ngắn hạn"); hashMap.put("Nợ phải trả", "Nợ phải trả"); hashMap.put("Nợ phải trả ngắn hạn", "Nợ phải trả ngắn hạn"); hashMap.put("Nợ phải trả dài hạn", "Nợ phải trả dài hạn"); hashMap.put("Vốn đầu tư CSH", "Vốn đầu tư CSH"); hashMap.put("Vốn góp của CSH", "Vốn góp của CSH"); /// --- Bao hiem viet ---/// hashMap.put("Doanh thu thuần hoạt động kinh doanh bảo hiểm", "Doanh thu thuần HĐKD Bảo hiểm"); hashMap.put("Lợi nhuận sau thuế TNDN", "Lợi nhuận sau thuế TNDN"); hashMap.put("Tổng cộng tài sản", "Tổng cộng tài sản"); hashMap.put("Vốn CSH", "Vốn CSH"); /// --- Chung chi quy Viet ---/// hashMap.put("Tổng tài sản", "Tổng tài sản"); hashMap.put("Đầu tư chứng khoán", "Đầu tư chứng khoán"); hashMap.put("Nguồn vốn CSH", "Nguồn vốn CSH"); hashMap.put("Thu nhập từ HĐ đầu tư đã thực hiện", "Thu nhập từ HĐ đầu tư đã thực hiện"); hashMap.put("KQHĐ ròng đã thực hiện trong kỳ", "KQHĐ ròng đã thực hiện trong kỳ"); hashMap.put("Lợi nhuận trong năm", "Lợi nhuận trong năm"); } public void putdataLangueAnh() { hashMap = new HashMap<>(); hashMap.put("Limit balance", "Limit balance :"); hashMap.put("Aggregate buying power", "Aggregate buying power :"); hashMap.put("Choose your category", "Choose your category"); hashMap.put("Choose category", "Choose your category please!"); hashMap.put("Quantity should be more than 100","Quantity should be more than 100"); hashMap.put("Cancel", "Cancel"); hashMap.put("Network connection Error", "Network connection Error"); hashMap.put("Quantity should be more than 0 and must be lesser than 100", "Quantity should be more than 0 and must be lesser than 100"); hashMap.put("Quantity should be more than 10 and must be a multiple of 10", "Quantity should be more than 10 and must be a multiple of 10"); hashMap.put("Quantity should be more than 100 and must be a multiple of 100", "Quantity should be more than 100 and must be a multiple of 100"); hashMap.put("Margin Account Detail","Margin Account Detail"); hashMap.put("Session Logout", "Session Logout"); hashMap.put("Cancel Order Successful", "Cancel Order Successful"); hashMap.put("Margin Account Details", "Margin Account Details"); hashMap.put("Securities", "Securities"); hashMap.put("Securities Symbol", "Securities Symbol"); hashMap.put("Available", "Available"); hashMap.put("Pending for Settlement", "Pending for Settlement"); hashMap.put("Pending for Corporate Actions", "Pending for Corporate Actions"); hashMap.put("MarketData Price", "MarketData Price"); hashMap.put("Rate (Right)", "Rate (Right)"); hashMap.put("Securities-leveraged buying power", "Securities-leveraged buying power"); hashMap.put("Account Details", "Account Details"); hashMap.put("Cash", "Cash"); hashMap.put("Cash on hold", "Cash on hold"); hashMap.put("Cash pending payment", "Cash pending payment"); hashMap.put("Cash in transit", "Cash in transit"); hashMap.put("Basic buying power", "Basic buying power :"); hashMap.put("Total credit limit", "Total credit limit"); hashMap.put("Outstanding debt", "Outstanding debt"); hashMap.put("Accumulated interest", "Accumulated interest"); hashMap.put("Current R", "Current R"); hashMap.put("Amount Called", "Amount Called"); hashMap.put("Rxl", "Rxl"); hashMap.put("Cashbuy:", "Order value:"); hashMap.put("The amount of the amount of a balance", "The amount of the amount of a balance"); hashMap.put("Special characters name", "Name account can not have some Special characters!"); hashMap.put("Please input name", "Please input name account!"); hashMap.put("Special characters", "Your content can not have some Special characters!"); hashMap.put("Updated to:", "Updated to:"); hashMap.put("Not response", "Have an unknown error"); hashMap.put("Sức mua CK còn lại:", "Buying Power from stocks:"); hashMap.put("Other Money:", "Other Money:"); hashMap.put("Pending Order", "Pending Order"); hashMap.put("Today's Orders", "Today's Orders"); hashMap.put("Please update your app !", "Please update your app !"); hashMap.put("Current version is out of date. Please upgrade to new version!", "Current version is out of date. Please upgrade to new version!"); hashMap.put("Delete Watchlist", "Delete Watchlist"); hashMap.put("MarketData is opened", "MarketData is opened"); hashMap.put("The quantity each split order must be bigger than 1000", "The quantity each split order must be bigger than 1000"); hashMap.put("Skip", "Skip"); hashMap.put("Symbol Search", "Symbol Search"); hashMap.put("Quantity should be more than 999", "Quantity should be more than 999"); hashMap.put("News", "News"); hashMap.put("CASH", "CASH"); hashMap.put("MARGIN", "MARGIN"); hashMap.put("P/L", "P/L"); hashMap.put("The Cash Receive must be less than", "The Cash Receive must be less than"); hashMap.put("Normal order quantity should be less than 500.000 (HOSE stock). You should split order.", "Normal order quantity should be less than 500.000 (HOSE stock). You should split order."); hashMap.put("Contract List", "Contract List"); hashMap.put("Mortgage Order", "Mortgage Order"); hashMap.put("Add WatchList Name", "Add WatchList Name"); hashMap.put("Please input Account", "Please input Account"); hashMap.put("January", "January"); hashMap.put("February", "February"); hashMap.put("March", "March"); hashMap.put("April", "April"); hashMap.put("May", "May"); hashMap.put("June", "June"); hashMap.put("July", "July"); hashMap.put("August", "August"); hashMap.put("September", "September"); hashMap.put("October", "October"); hashMap.put("November", "November"); hashMap.put("December", "December"); hashMap.put("tháng 1", "January"); hashMap.put("tháng 2", "February"); hashMap.put("tháng 3", "March"); hashMap.put("tháng 4", "April"); hashMap.put("tháng 5", "May"); hashMap.put("tháng 6", "June"); hashMap.put("tháng 7", "July"); hashMap.put("tháng 8", "August"); hashMap.put("tháng 9", "September"); hashMap.put("tháng 10", "October"); hashMap.put("tháng 11", "November"); hashMap.put("tháng 12", "December"); hashMap.put("tháng 12", "December"); //url hashMap.put("+/-", "+/-"); hashMap.put("P.B3", "P.B3"); hashMap.put("Q.B3", "Q.B3"); hashMap.put("P.B2", "P.B2"); hashMap.put("Q.B2", "Q.B2"); hashMap.put("P.B1", "P.B1"); hashMap.put("Q.B1", "Q.B1"); hashMap.put("P.S1", "P.S1"); hashMap.put("Q.S1", "Q.S1"); hashMap.put("P.S2", "P.S2"); hashMap.put("Q.S2", "Q.S2"); hashMap.put("P.S3", "P.S3"); hashMap.put("Q.S3", "Q.S3"); hashMap.put("Switch account", "Switch account"); hashMap.put("There is no information of indice", "There is no information of indice"); hashMap.put("was setted as default Watchlist", "was setted as default Watchlist"); hashMap.put("newshomee", "newshomee"); hashMap.put("eventshomee", "eventshomee"); hashMap.put("Incorrect Trading Password", "Incorrect Trading Password"); hashMap.put("Ezmargin Sell", "Ezmargin Sell"); hashMap.put("Order History", "Order History"); hashMap.put("Content", "Content"); hashMap.put("Amount", "Amount"); hashMap.put("Renew", "Renew"); hashMap.put("Time", "Time"); hashMap.put("Rate", "Rate"); hashMap.put("Order Type", "Order Type"); hashMap.put("Status", "Status"); hashMap.put("Product Type", "Product Type"); hashMap.put("Exchange", "Exchange"); hashMap.put("Order No.", "Order No."); hashMap.put("Buy/Sell", "Buy/Sell"); hashMap.put("Remain Qty", "Remain Qty"); hashMap.put("New Warning Rate:", "New Warning Rate:"); hashMap.put("New Margin Call Rate:", "New Margin Call Rate(%):"); hashMap.put("No. of days:", "No. of days:"); hashMap.put("Order List", "Order List"); hashMap.put("Select Template", "Select Template"); hashMap.put("Bene.'s Account not exist", "Bene.'s Account not exist"); hashMap.put("Split order", "Split order"); hashMap.put("Please select Branch", "Please select Branch"); hashMap.put("Match Price", "Match Price"); hashMap.put("Price must be a multiple of", "Price must be a multiple of"); hashMap.put("Contract No", "Contract No"); hashMap.put("Home", "Home"); hashMap.put("Favorites", "Favorites"); hashMap.put("Features", "Features"); hashMap.put("Member Area", "Member Area"); hashMap.put("Setting", "Setting"); hashMap.put("Total Vol", "Total Vol"); hashMap.put("Dashboard", "Dashboard"); hashMap.put("Pay Amount:", "Pay Amount:"); hashMap.put("Rate (%/day):", "Rate (%/day):"); hashMap.put("Member", "Member"); hashMap.put("Interest:", "Interest:"); hashMap.put("Watchlist", "Watchlist"); hashMap.put("Fee:", "Fee:"); hashMap.put("Fee", "Fee"); hashMap.put("Events", "Events"); hashMap.put("MarketData Overview", "MarketData Overview"); hashMap.put("Headlines", "Headlines"); hashMap.put("Watch List", "Watch List"); hashMap.put("World Indexes", "World Indexes"); hashMap.put("Order Type:", "Order Type:"); hashMap.put("Please input Amount", "Please input Amount"); hashMap.put("Please input Description", "Please input Description"); hashMap.put("Place Orders", "Place Orders"); hashMap.put("Money Transfer", "Money Transfer"); hashMap.put("Sell Oddlot", "Sell Oddlot"); hashMap.put("Advance Report", "Advance Report"); hashMap.put("Margin", "Margin"); hashMap.put("Asset Report", "Asset Report"); hashMap.put("Language", "Language"); hashMap.put("Remember Account", "Remember Account"); ; hashMap.put("Indices", "Indices"); hashMap.put("Last", "Last"); hashMap.put("Last ", "Last "); hashMap.put("Change", "Change"); hashMap.put("Volume", "Volume"); hashMap.put("Value", "Value"); hashMap.put("Symbol", "Symbol"); hashMap.put("MarketData is opening", "MarketData is opening"); hashMap.put("MarketData was closed", "MarketData was closed"); hashMap.put("Breaking time", "Breaking time"); hashMap.put("Quantity should be less than 999.999", "Quantity should be less than 999.999"); hashMap.put("is not in the Margin stock list", "is not in the Margin stock list"); hashMap.put("Account", "Account"); hashMap.put("Indexes", "Indexes"); hashMap.put("bil", "bil"); hashMap.put("Detail", "Detail"); hashMap.put("Chart", "Chart"); hashMap.put("Top Gainers", "Top Gainers"); hashMap.put("Top Losers", "Top Losers"); hashMap.put("Most Active", "Most Active"); hashMap.put("Search", "Search"); hashMap.put("Vol", "Vol"); hashMap.put("Val", "Val"); hashMap.put("Qty", "Qty"); hashMap.put("Up/Down stocks", "Up/Down stocks"); hashMap.put("Putthrough", "Putthrough"); hashMap.put("Open", "Open"); hashMap.put("Close", "Close"); hashMap.put("High", "High"); hashMap.put("Low", "Low"); hashMap.put("Forei.Buy", "Forei.Buy"); hashMap.put("Held for buying orders:", "Held for buying orders:"); hashMap.put("Other Money:", "Other Money:"); hashMap.put("Forei.Sell", "Forei.Sell"); hashMap.put("Get Quotes", "Get Quotes"); hashMap.put("Ceil Price", "Ceil Price"); hashMap.put("Floor Price", "Floor Price"); hashMap.put("Ref Price", "Ref Price"); hashMap.put("Buy Price ", "Buy Price"); hashMap.put("Buy Quantity", "Buy Quantity"); hashMap.put("Sell Price", "Sell Price"); hashMap.put("Sell Quantity", "Sell Quantity"); hashMap.put("Match", "Match"); hashMap.put("MarketData News", "MarketData News"); hashMap.put("Finance & Banking News", "Finance & Banking News"); hashMap.put("Real Estate News", "Real Estate News"); hashMap.put("Commodity News", "Commodity News"); hashMap.put("Economy News", "Economy News"); hashMap.put("World News", "World News"); hashMap.put("FPTS News", "FPTS News"); hashMap.put("Please enter your account", "Please enter your account"); hashMap.put("Please enter your password", "Please enter your password"); hashMap.put("WatchList must have at least one company", "WatchList must have at least one company"); hashMap.put("Login", "Login"); hashMap.put("Logout", "Logout"); hashMap.put("Logged out", "Logged out"); hashMap.put("Exit", "Exit"); hashMap.put("Login with other account", "Login with other account"); hashMap.put("Account", "Account"); hashMap.put("Password", "Password"); hashMap.put("Intraday Trading Result", "Intraday Trading Result"); hashMap.put("Buy", "Buy"); hashMap.put("Sell", "Sell"); hashMap.put("Normal Stock", "Normal Stock"); hashMap.put("Margin Stock", "Margin Stock"); hashMap.put("Sell", "Sell"); hashMap.put("Cash", "Cash"); hashMap.put("Margin", "Margin"); hashMap.put("Available Cash:", "Available Cash"); hashMap.put("Available Stock:", "Available Stock"); hashMap.put("Available Stock", "Available Stock"); hashMap.put("New Interest Rate (%/day):", "New Interest Rate (%/day):"); hashMap.put("Rate:", "Rate:"); hashMap.put("Cash:", "Cash"); hashMap.put("Ký Quỹ:", "Ký Quỹ"); hashMap.put("Symbol:", "Symbol:"); hashMap.put("Symbol", "Symbol"); hashMap.put("Exchange:", "Exchange"); hashMap.put("Renew", "Renew"); hashMap.put("Side:", "Side"); hashMap.put("Type:", "Type"); hashMap.put("Quantity:", "Quantity"); hashMap.put("Term:", "Term"); hashMap.put("Price:", "Price :"); hashMap.put("Extendable", "Extendable"); hashMap.put("Password:", "Password:"); hashMap.put("Quantity", "Quantity"); hashMap.put("Price", "Price"); hashMap.put("Expriry Date:", "Expriry Date:"); hashMap.put("Trading Password", "Trading Password"); hashMap.put("Confirm Buy", "Confirm Buy"); hashMap.put("Confirm Sell", "Confirm Sell"); hashMap.put("Quantity must be a multiple of 100", "Quantity must be a multiple of 100"); hashMap.put("Price must be a multiple of 100", "Price must be a multiple of 100"); hashMap.put("Price must be a multiple of 10", "Price must be a multiple of 10"); hashMap.put("Price must be a multiple of 1", "Price must be a multiple of 1"); hashMap.put("The price must be a multiple of", "The price must be a multiple of"); hashMap.put("Price must be between", "Price must be between"); hashMap.put("Quantity must be less than 500.000", "Quantity must be less than 500.000"); hashMap.put("Quantity must be a multiple of 10", "Quantity must be a multiple of 10"); hashMap.put("Symbol does not exist", "Symbol does not exist"); hashMap.put("The quantity should be lesser than 999.999", "The quantity should be lesser than 999.999"); hashMap.put("Quantity should be more than 0", "Quantity should be more than 0"); hashMap.put("Price should be less than 999.999.999", "Price should be less than 999.999.999"); hashMap.put("Price should be more than 0", "The price should be more than 0"); hashMap.put("Please enter Symbol", "Please enter Symbol"); hashMap.put("Please enter Quantity", "Please enter Quantity"); hashMap.put("Please enter Price", "Please enter Price"); hashMap.put("Please enter Trading Password", "Please enter Trading Password"); hashMap.put("Your trading password is incorrect", "Your trading password is incorrect"); hashMap.put("Cash balance is not enough", "Cash balance is not enough"); hashMap.put("Stock balance is not enough", "Stock balance is not enough"); hashMap.put("cannot buy Margin", "cannot buy Margin"); hashMap.put("Amount:", "Amount"); hashMap.put("New Expriry Date:", "New Expriry Date:"); hashMap.put("Account:", "Account:"); hashMap.put("Name:", "Name:"); hashMap.put("Bank:", "Bank:"); hashMap.put("Province:", "Province:"); hashMap.put("Branch:", "Branch:"); hashMap.put("Fee:", "Fee:"); hashMap.put("Select Template", "Select Template"); hashMap.put("Select Bank", "Select Bank"); hashMap.put("Select Province", "Select Province"); hashMap.put("Select Branch", "Select Branch"); hashMap.put("Transfer Description", "Transfer Description"); hashMap.put("Confirm", "Confirm"); hashMap.put("Transfer History", "Transfer History"); hashMap.put("Mortgage", "Mortgage"); hashMap.put("Payment", "Payment"); hashMap.put("Extend", "Extend"); hashMap.put("Exit", "Exit"); hashMap.put("Cash Total:", "Cash Total"); hashMap.put("Cash Receive:", "Cash Receive:"); hashMap.put("Contract:", "Contract:"); hashMap.put("Contract", "Contract"); hashMap.put("From Date", "From Date"); hashMap.put("To Date", "To Date"); hashMap.put("Detail", "Detail"); hashMap.put("Cancel/Modify Order", "Cancel/Modify Order"); hashMap.put("Pay Date:", "Pay Date:"); hashMap.put("Contract Date:", "Contract Date:"); hashMap.put("Contract Date", "Contract Date"); hashMap.put("Date Count:", "Date Count:"); hashMap.put("Cur. Mar Amount:", "Cur. Mar Amount:"); hashMap.put("Cur. Mor Amount:", "Cur. Mor Amount:"); hashMap.put("Pay Amount:", "Pay Amount"); hashMap.put("Charge Rate:", "Charge Rate:"); hashMap.put("Charge Amount:", "Charge Amount:"); hashMap.put("Total Payment:", "Total Payment:"); hashMap.put("Total", "Total"); hashMap.put("New Qty:", "New Qty:"); hashMap.put("New Price:", "New Price:"); hashMap.put("Change Qty:", "Change Qty:"); hashMap.put("Asset Report", "Asset Report"); hashMap.put("Stock Balance", "Stock Balance"); hashMap.put("Cash Balance", "Cash Balance"); hashMap.put("Stock", "Stock"); hashMap.put("Cash & Stock", "Cash & Stock"); hashMap.put("Margin Amount", "Margin Amount"); hashMap.put("Total:", "Total:"); hashMap.put("BANK", "BANK"); hashMap.put("Amount:", "Amount"); hashMap.put("Account:", "Account:"); hashMap.put("Name:", "Name:"); hashMap.put("Bank:", "Bank:"); hashMap.put("Province:", "Province:"); hashMap.put("Account Name", "Account Name"); hashMap.put("Branch:", "Branch:"); hashMap.put("Estimated Fee:", "Estimated Fee"); hashMap.put("Select Template", "Select Template"); hashMap.put("Select Bank", "Select Bank"); hashMap.put("Select Province", "Select Province"); hashMap.put("Select Branch", "Select Branch"); hashMap.put("Transfer Description", "Transfer Description"); hashMap.put("Date", "Date"); hashMap.put("Avg.Price", "Avg.Price"); hashMap.put("Mkt.Price", "Mkt.Price"); hashMap.put("Pending", "Pending"); hashMap.put("Repay", "Repay"); hashMap.put("Restrict Stock", "Restrict Stock"); hashMap.put("Open Qty", "Open Qty"); hashMap.put("Pending Qty", "Pending Qty"); hashMap.put("Available Qty", "Available Qty"); hashMap.put("Sellable", "Sellable"); hashMap.put("Cash Balance:", "Cash Balance"); hashMap.put("Available Cash:", "Available Cash"); hashMap.put("Advance Amount:", "Advance Amount:"); hashMap.put("Cash Being Transferred:", "Cash Being Transferred:"); hashMap.put("Pending Buy Orders:", "Pending Buy Orders:"); hashMap.put("Provisional Fee:", "Provisional Fee:"); hashMap.put("Available Balance:", "Available Balance:"); hashMap.put("Sell Oddlot History", "Sell Oddlot History"); hashMap.put("Expire Date:", "Expire Date:"); hashMap.put("New Contract Date:", "New Contract Date:"); hashMap.put("New Expire Date:", "New Expire Date:"); hashMap.put("Mar Amount:", "Mar Amount:"); hashMap.put("Mor Amount:", "Mor Amount:"); hashMap.put("New Charge Rate:", "New Charge Rate:"); hashMap.put("The quantity must be lesser than", "The quantity must be lesser than"); hashMap.put("Please enter Cash To Transfer", "Please enter Cash To Transfer"); hashMap.put("Please enter Receiver Account", "Please enter Receiver Account"); hashMap.put("Please enter Receiver Name", "Please enter Receiver Name"); hashMap.put("Please enter Transfer Description", "Please enter Transfer Description"); hashMap.put("Please select Bank", "Please select Bank"); hashMap.put("Please select Province", "Please select Province"); hashMap.put("Please select Branch", "Please select Branch"); hashMap.put("Input invalid number", "Input invalid number"); hashMap.put("Receiver Account does not exsit", "Receiver Account does not exsit"); hashMap.put("Select Account To Transfer", "Select Account To Transfer"); hashMap.put("Please Select Account To Transfer", "Please Select Account To Transfer"); hashMap.put("Please select Date From", "Please select Date From"); hashMap.put("Please select Date To", "Please select Date To"); hashMap.put("Price, Quantity unchanged", "Price, Quantity unchanged"); hashMap.put("Cancel Transfer Successfully", "Cancel Transfer Successfully"); hashMap.put("Cancel Order", "Cancel Order"); hashMap.put("Modify Order", "Modify Order"); hashMap.put("Add Watch List", "Add Watch List"); hashMap.put("Delete", "Delete"); hashMap.put("Back", "Back"); hashMap.put("Quantity each Order:", "Quantity each Order:"); hashMap.put("Not enough stock balance", "Not enough stock balance"); hashMap.put("Pay amount must be smaller than current Mar/Mor amount", "Pay amount must be smaller than current Mar/Mor amount"); hashMap.put("Please enter Pay Amount", "Please enter Pay Amount"); hashMap.put("Overview", "Overview"); hashMap.put("Foreign Ownership", "Foreign Ownership"); hashMap.put("Company News", "Company News"); hashMap.put("Finance Overview", "Finance Overview"); hashMap.put("Financial Figures", "Financial Figures"); hashMap.put("Chart", "Chart"); hashMap.put("Key FS Items", "Key FS Items"); hashMap.put("Financial Ratios", "Financial Ratios"); hashMap.put("Foreign-owned Ratio (%):", "Foreign-owned Ratio (%):"); hashMap.put("Please select Bank", "Please select Bank"); hashMap.put("Please select Province", "Please select Province"); hashMap.put("Remaining Loan Amt:", "Remaining Loan Amt:"); hashMap.put("Last", "Last"); hashMap.put("Change", "Change"); hashMap.put("Volume", "Volume"); hashMap.put("Ceil", "Ceil"); hashMap.put("Ref", "Ref"); hashMap.put("Floor", "Floor"); hashMap.put("High", "High"); hashMap.put("Low", "Low"); hashMap.put("Foreign Buy:", "Foreign Buy:"); hashMap.put("Foreign Sell:", "Foreign Sell:"); hashMap.put("Matching:", "Matching:"); hashMap.put("Putthrough:", "Putthrough:"); hashMap.put("Vol:", "Vol:"); hashMap.put("Value:", "Value:"); hashMap.put("Total Room:", "Total Room:"); hashMap.put("Current Room:", "Current Room:"); hashMap.put("Remain Room:", "Remain Room:"); hashMap.put("Ratios (%):", "Ratios (%):"); hashMap.put("Modify Order Successful", "Modify Order Successful"); hashMap.put("WatchList Name", "WatchList Name"); hashMap.put("Please input WatchList Name", "Please input WatchList Name"); hashMap.put("Symbol is already in Quotes", "Symbol is already in Quotes"); hashMap.put("Request has been executed successfully!", "Request has been executed successfully!"); hashMap.put("Stock is not enough to mortgage", "Stock is not enough to mortgage"); hashMap.put("Lending Ratio:", "Lending Ratio (%):"); hashMap.put("Success!", "Success!"); hashMap.put("Doanh thu thuần", "Revenue"); hashMap.put("Lợi nhuận gộp", "Gross profit/ (loss)"); hashMap.put("LN thuần từ HĐKD", "Net operating profit/ (Loss)"); hashMap.put("Lợi nhuận trước thuế", "Net accounting profit/ (loss) before tax"); hashMap.put("Lợi nhuận sau thuế", "Profit/ (loss) after tax"); hashMap.put("Tài sản ngắn hạn", "Current assets"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Nợ ngắn hạn", "Current liabilities"); hashMap.put("Nợ dài hạn", "Non-current liabilities"); hashMap.put("Vốn CSH", "Owner's equity"); hashMap.put("Vốn đầu tư CSH", "Contributed capital"); hashMap.put("Cập nhật đến quý 2/2015", "Updated to 2/2015"); hashMap.put("Tăng trưởng doanh thu", "Revenue growth"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Net profit growth"); hashMap.put("Tăng trưởng tổng tài sản", "Total assets growth"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Chỉ tiêu đầu tư tự doanh", "Proprietary Performance"); hashMap.put("Khả năng thanh toán hiện hành", "Current ratio"); hashMap.put("Nợ thanh toán GDCK/nguồn vốn", "Receivables from investors/owner's equity"); hashMap.put("Khả năng thanh toán nhanh", "Quick ratio"); hashMap.put("Trích dự phòng giảm giá CK", "Provision for diminution in the value of securities to equity ratio"); hashMap.put("Tổng nợ/Vốn CSH", "Total liabilities/Owner's equity"); hashMap.put("Đòn bẩy (Tổng TS/Vốn CSH)", "Leverage ratio (Total assets/sharedholds' equity)"); hashMap.put("Tỷ lệ chi phí HĐKD CK", "Operating expenses/Net operating revenue"); hashMap.put("Remaining credit line", "Remaining credit line"); hashMap.put("Loan amount:", "Loan amount"); hashMap.put("Payment Amt. should be less than Remaining Loan Amt.", "Payment Amt. should be less than Remaining Loan Amt."); hashMap.put("Please input payment amt.", "Please input payment amt."); hashMap.put("Quantity must be less than", "Quantity must be less than"); hashMap.put("Pending Settlement", "Pending Settlement"); hashMap.put("Cash & Stock", "Cash & Stock"); hashMap.put("Margin Loans", "Margin Loans"); hashMap.put("Total:", "Total:"); hashMap.put("Restrict Stock", "Restrict Stock"); hashMap.put("Open Qty", "Open Qty"); hashMap.put("Selling Qty", "Selling Qty"); hashMap.put("Available Qty", "Available Qty"); /* Stock Detail */ hashMap.put("Giá trị vốn hóa thị trường", "MarketData Capitalisation"); hashMap.put("KLNY hiện tại", "Current Listing Shares"); hashMap.put("KLĐLH hiện tại", "Current Outstanding Shares"); hashMap.put("KLGD bq 30 ngày", "30 days average vol."); hashMap.put("Giá cao nhất 52 tuần", "52 Weeks High"); hashMap.put("Giá thấp nhất 52 tuần", "52 Weeks Low"); hashMap.put("Tỷ lệ sở hữu nước ngoài", "Foreign Ownership"); hashMap.put("EPS*", "EPS*"); hashMap.put("P/E*", "P/E*"); hashMap.put("EPS điều chỉnh*", "Adjusted EPS*"); hashMap.put("EPS(FPTS)**", "EPS(FPTS)**"); hashMap.put("P/E(FPTS)**", "P/E(FPTS)**"); hashMap.put("Doanh thu thuần", "Revenue"); hashMap.put("Lợi nhuận gộp", "Gross profit/ (loss)"); hashMap.put("LN thuần từ HĐKD", "Net operating profit/ (Loss)"); hashMap.put("Lợi nhuận trước thuế", "Net accounting profit/ (loss) before tax"); hashMap.put("Lợi nhuận sau thuế", "Profit/ (loss) after tax"); hashMap.put("Tài sản ngắn hạn", "Current assets"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Nợ ngắn hạn", "Current liabilities"); hashMap.put("Nợ dài hạn", "Non-current liabilities"); hashMap.put("Vốn CSH", "Owner's equity"); hashMap.put("Vốn đầu tư CSH", "Contributed capital"); hashMap.put("Cập nhật đến quý 2/2015", "Updated to 2/2015"); hashMap.put("Thu nhập lãi thuần", "Net interest and similar income"); hashMap.put("Thu nhập HĐKD thuần", "Net gain/(loss) from fees, commissions"); hashMap.put("Thu nhập HĐKD trước dự phòng", "Net operating profit before provision"); hashMap.put("Lợi nhuận thuần", "Profit/ (loss) after tax"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Cho vay khách hàng", "Loans to customers"); hashMap.put("Tiền gửi khách hàng", "Deposits from customers"); hashMap.put("Vốn CSH", "Owner's equity"); hashMap.put("Cập nhật đến quý 4/2015", "Updated to 4/2015"); // hashMap.put("Tiền Khác", "Other Money:"); hashMap.put("Doanh thu thuần", "Net operating revenue"); hashMap.put("Lợi nhuận gộp", "Gross operating profit"); hashMap.put("Lợi nhuận từ HĐKD", "Net operating profit/ (Loss)"); hashMap.put("Lợi nhuận trước thuế", "Net accounting profit/ (loss) before tax"); hashMap.put("Lợi nhuận sau thuế", "Profit/ (loss) after tax"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Tài sản ngắn hạn", "Current assets"); hashMap.put("Nợ phải trả", "Liabilities"); hashMap.put("Nợ ngắn hạn", "Current liabilities"); hashMap.put("Nợ dài hạn", "Non-current liabilities"); hashMap.put("Vốn CSH", "Owner's equity"); hashMap.put("Vốn đầu tư CSH", "Contributed capital"); hashMap.put("Cập nhật đến quý 1/2015", "Updated to 1/2015"); hashMap.put("Doanh thu", "Revenue"); hashMap.put("Lợi nhuận thuần", "Profit/ (loss) after tax"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Vốn CSH", "Owner's equity"); hashMap.put("Cập nhật đến quý 4/2015", "Updated to 4/2015"); hashMap.put("Tăng trưởng doanh thu", "Revenue growth"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Net profit growth"); hashMap.put("Tăng trưởng Tổng tài sản", "Total assets growth"); hashMap.put("ROE (Lợi nhuận trên vốn chủ sở hữu)", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Khả năng thanh toán hiện hành", "Current ratio"); hashMap.put("Khả năng thanh toán nhanh", "Quick ratio"); hashMap.put("Tổng nợ/Vốn chủ sở hữu", "Total liabilities/Owner's equity"); hashMap.put("Tổng nợ/Tổng tài sản", "Total liabilities/Total assets"); hashMap.put("Cập nhật đến quý 2/2015", "Updated to 2/2015"); hashMap.put("Tăng trưởng tín dụng", "Credit Growth"); hashMap.put("Tăng trưởng tổng tài sản", "Total assets growth"); hashMap.put("Tăng trưởng huy động vốn", "Mobilized Growth"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Thu nhập lãi cận biên", "Net Interest Margin"); hashMap.put("Tỷ lệ an toàn vốn tối thiểu", "Capital Adequacy Ratio"); hashMap.put("Cập nhật đến quý 2/2015", "Updated to 2/2015"); hashMap.put("Tăng trưởng doanh thu", "Revenue growth"); hashMap.put("Tăng trưởng lợi nhuận thuần", "Net profit growth"); hashMap.put("Tăng trưởng tổng tài sản", "Total assets growth"); hashMap.put("ROE", "ROE"); hashMap.put("ROA", "ROA"); hashMap.put("Chỉ tiêu đầu tư tự doanh", "Proprietary Performance"); hashMap.put("Khả năng thanh toán hiện hành", "Current ratio"); hashMap.put("Nợ thanh toán GDCK/nguồn vốn", "Receivables from investors/owner's equity"); hashMap.put("Khả năng thanh toán nhanh", "Quick ratio"); hashMap.put("Trích dự phòng giảm giá CK", "Provision for diminution in the value of securities to equity ratio"); hashMap.put("Tổng nợ/Vốn CSH", "Total liabilities/Owner's equity"); hashMap.put("Đòn bẩy (Tổng TS/Vốn CSH)", "Leverage ratio (Total assets/sharedholds' equity)"); hashMap.put("Tỷ lệ chi phí HĐKD CK", "Operating expenses/Net operating revenue"); hashMap.put("Tổng nợ/Tổng tài sản", "Total liabilities/Total assets"); hashMap.put("Cập nhật đến quý 1/2015", "Updated to 1/2015"); hashMap.put("Tổng DT phí BH/nguồn vốn", "Gross premium/ Equity and funds"); hashMap.put("DT phí BH thuần/nguồn vốn", "Net premium/ Equity and funds"); hashMap.put("Trợ vốn/nguồn vốn", "Subsidy ratio"); hashMap.put("Tỷ lệ bồi thường", "Claim ratio"); hashMap.put("Tỷ lệ chi phí HDKD", "Insurance expense ratio"); hashMap.put("Tỷ lệ kết hợp", "Combination ratio"); hashMap.put("Tỷ suất lợi nhuận đầu tư", "Profit from investment ratio"); hashMap.put("Công nợ/tài sản thanh khoản", "Liability/ Liquid assets"); hashMap.put("Nợ phí/nguồn vốn", "Free receivables"); hashMap.put("Dự phòng bồi thường/phí BH", "Reserve/ Net premium"); hashMap.put("Cập nhật đến quý 2/2015", "Updated to 2/2015"); hashMap.put("Mrk.", "Mrk."); hashMap.put("B1", "B1"); hashMap.put("B2", "B2"); hashMap.put("B3", "B3"); hashMap.put("S1", "S1"); hashMap.put("S2", "S2"); hashMap.put("S3", "S3"); hashMap.put("SELL", "SELL"); hashMap.put("BUY", "BUY"); /// --- Update tu dien Anh 23/2 ---/// /// --- Doanh nghiep thuong Anh --- /// hashMap.put("Doanh thu bán hàng & dịch vụ", "Revenue"); hashMap.put("Lợi nhuận gộp bán hàng & dịch vụ", "Gross profit/ (loss)"); hashMap.put("Lợi nhuận thuần từ HĐKD", "Net operating profit/ (loss)"); hashMap.put("Lợi nhuận (lỗ) kế toán trước thuế", "Net accounting profit/ (loss) before tax"); hashMap.put("Lợi nhuận (lỗ) sau thuế TNDN", "Profit/ (loss) after tax"); hashMap.put("Tài sản ngắn hạn", "Profit/ (loss) after tax"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Nợ ngắn hạn", "Current liabilities"); hashMap.put("Nợ dài hạn", "Non-current liabilities"); hashMap.put("Vốn CSH", "Owners' equity"); hashMap.put("Vốn đầu tư của CSH", "Contributed capital"); hashMap.put("Cập nhật đến quý 4/2016", "Updated to 4/2016"); /// --- Ngan hang Anh ---/// hashMap.put("Thu nhập lãi và thu nhập tương tự", "Interest income and similar income"); hashMap.put("Lãi/Lỗ thuần từ HĐDV", "Net gain/(loss) from fees, commissions"); hashMap.put("LNT HĐKD trước CPDP RR Tín dụng", "Net operating profit before PCL"); hashMap.put("Lợi nhuận sau thuế", "Net profit after tax"); hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Cho vay khách hàng", "Loans to customers"); hashMap.put("Tiền gửi khách hàng", "Deposits from customers"); hashMap.put("Tổng vốn CSH", "Total owners' equity"); /// --- Cong ty chung khoan Anh ---/// hashMap.put("Doanh thu hoạt động", "Total operating revenue"); hashMap.put("Chi phí hoạt động", "Total operating expense"); hashMap.put("Kết quả hoạt động", "Net profit from operating activities"); hashMap.put("Lợi nhuận kế toán trước thuế", "Profit before tax"); hashMap.put("Lợi nhuận kế toán sau thuế", "Profit after tax"); hashMap.put("Tổng cộng tài sản", "Total assets"); hashMap.put("Tài sản ngắn hạn", "Current assets"); hashMap.put("Nợ phải trả", "Liabilities"); hashMap.put("Nợ phải trả ngắn hạn", "Current liabilities"); hashMap.put("Nợ phải trả dài hạn", "Non-current liabilities"); hashMap.put("Vốn đầu tư CSH", "Shareholder's equity"); hashMap.put("Vốn góp của CSH", "Charter capital"); /// --- bao hiem Anh ---/// hashMap.put("Doanh thu thuần hoạt động kinh doanh bảo hiểm", "Total operating revenue"); hashMap.put("Lợi nhuận sau thuế TNDN", "Profit after tax"); hashMap.put("Tổng cộng tài sản", "Total assets"); hashMap.put("Vốn CSH", "Owners' equity"); /// --- Chung chi quy Anh ---/// hashMap.put("Tổng tài sản", "Total assets"); hashMap.put("Đầu tư chứng khoán", "Investments in securities"); hashMap.put("Nguồn vốn CSH", "Owners' equity"); hashMap.put("Thu nhập từ HĐ đầu tư đã thực hiện", "Profit from investing activities"); hashMap.put("KQHĐ ròng đã thực hiện trong kỳ", "Net realised profit for the year"); hashMap.put("Lợi nhuận trong năm", "Net (loss)/ profit for the year"); } }
[ "hoanvv.tb@gmail.com" ]
hoanvv.tb@gmail.com
7eb5897f3077151428d99064389d354d91b717e0
35e30a6ac5b6cfdc70afc6f16385787de14bfab5
/CLASES/Encapsulamiento/src/encapsulamiento/Encapsulamiento.java
39c631bcf0768f2d1aa185eed17c8c86d0c7d2f8
[]
no_license
davidduque29/JavaProjects
73c9380481f03d48b95150555afcb7118533487c
c9f3a1140db6e2c6818842726753b0ea493d8165
refs/heads/master
2021-06-07T09:31:49.900341
2021-05-01T17:27:18
2021-05-01T17:27:18
146,804,095
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package encapsulamiento; /** * * @author ivandavid */ public class Encapsulamiento { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "ivduque@hotmail.com" ]
ivduque@hotmail.com
ef4f65c2560f72ba9800c97f01b8c13b0ab41824
63405be9a9047666a02583a839cf1ae258e66742
/fest-swing/src/testBackUp/org/fest/swing/fixture/JTabbedPaneFixture_JPopupMenuInvoker_Test.java
f8a40c81362757d51681f3e49da56127e9165e45
[ "Apache-2.0" ]
permissive
CyberReveal/fest-swing-1.x
7884201dde080a6702435c0f753e32f004fea0f8
670fac718df72486b6177ce5d406421b3290a7f8
refs/heads/master
2020-12-24T16:35:44.180425
2017-02-17T15:15:43
2017-02-17T15:15:43
8,160,798
0
0
null
null
null
null
UTF-8
Java
false
false
1,709
java
/* * Created on Nov 18, 2009 * * 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. * * Copyright @2009-2013 the original author or authors. */ package org.fest.swing.fixture; import static org.fest.swing.test.builder.JTabbedPanes.tabbedPane; import javax.swing.JTabbedPane; import org.fest.swing.driver.JTabbedPaneDriver; import org.junit.BeforeClass; /** * Tests for methods in {@link JTabbedPaneFixture} that are inherited from {@link JPopupMenuInvokerFixture}. * * @author Yvonne Wang * @author Alex Ruiz */ public class JTabbedPaneFixture_JPopupMenuInvoker_Test extends JPopupMenuInvokerFixture_TestCase<JTabbedPane> { private static JTabbedPane target; private JTabbedPaneDriver driver; private JTabbedPaneFixture fixture; @BeforeClass public static void setUpTarget() { target = tabbedPane().createNew(); } @Override void onSetUp() { driver = createMock(JTabbedPaneDriver.class); fixture = new JTabbedPaneFixture(robot(), target); fixture.driver(driver); } @Override JTabbedPaneDriver driver() { return driver; } @Override JTabbedPane target() { return target; } @Override JTabbedPaneFixture fixture() { return fixture; } }
[ "colin.goodheart-smithe@ISVGREPC0000714.Imp.net" ]
colin.goodheart-smithe@ISVGREPC0000714.Imp.net
933be0da561fb19a04903ecd1afe65c5926ea563
1c8bca2e8234e0b6e8a70db91b1d4749d13783f2
/Android/PP/22_RenderToTexture/app/src/main/java/com/rtr/rendertotexture/GLESView.java
84a9e62745f64ee893516da22098101aa82722b3
[]
no_license
jayshreegandhi/RTR
206e6e307dc9d3bfef85492b2f0efdcb7e429881
88d49f1e1f2b6ad58e29b5aaf279ffdfe7f53201
refs/heads/master
2023-01-05T01:47:18.935907
2020-11-09T06:36:20
2020-11-09T06:36:20
311,237,656
0
0
null
null
null
null
UTF-8
Java
false
false
20,106
java
package com.rtr.rendertotexture; //by user import android.content.Context; import android.view.Gravity; import android.graphics.Color; import android.view.MotionEvent; import android.view.GestureDetector; import android.view.GestureDetector.OnGestureListener; import android.view.GestureDetector.OnDoubleTapListener; //for opengl import android.opengl.GLSurfaceView; import android.opengl.GLES32; import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.egl.EGLConfig; //opengl buffers import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; //matrix math import android.opengl.Matrix; //texture import android.graphics.BitmapFactory; import android.graphics.Bitmap; import android.opengl.GLUtils; public class GLESView extends GLSurfaceView implements GLSurfaceView.Renderer, OnGestureListener, OnDoubleTapListener { private final Context context; private GestureDetector gestureDetector; private int shaderProgramObject; private int vertexShaderObject; private int fragmentShaderObject; private int[] vao_cube = new int[1]; private int[] vbo_position_cube = new int[1]; private int[] vbo_texture_cube = new int[1]; private int[] texture_stone = new int[1]; private int mvpUniform; private int samplerUniform; private float[] perspectiveProjectionMatrix = new float[16]; private float angleCube; //frame buffer private int[] fbo = new int[1]; private int[] rbo = new int[1]; private int[] cube_texture = new int[1]; private int[] cube_depth = new int[1]; private int gWidth; private int gHeight; public GLESView(Context drawingContext) { super(drawingContext); context = drawingContext; setEGLContextClientVersion(3); setRenderer(this); setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); gestureDetector = new GestureDetector(drawingContext, this, null, false); gestureDetector.setOnDoubleTapListener(this); } // Renderer's method @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { String version = gl.glGetString(GL10.GL_VERSION); String glslVersion = gl.glGetString(GLES32.GL_SHADING_LANGUAGE_VERSION); // String vendor = gl.glGetString(GLES32.vendor); // String renderer = gl.glGetString(GLES32.renderer); System.out.println("RTR: " + version); System.out.println("RTR: " + glslVersion); // System.out.println("RTR: " + vendor); // System.out.println("RTR: " + renderer); initialize(); } @Override public void onSurfaceChanged(GL10 unused, int width, int height) { gWidth = width; gHeight = height; resize(width, height); } @Override public void onDrawFrame(GL10 unused) { update(); display(); } // our callbacks/ custom methods private void initialize() { // vertex shader vertexShaderObject = GLES32.glCreateShader(GLES32.GL_VERTEX_SHADER); final String vertexShaderSourceCode = String.format("#version 320 es" + "\n" + "in vec4 vPosition;" + "in vec2 vTexCoord;" + "uniform mat4 u_mvp_matrix;" + "out vec2 out_texcoord;" + "void main(void)" + "{" + "gl_Position = u_mvp_matrix * vPosition;" + "out_texcoord = vTexCoord;" + "}"); GLES32.glShaderSource(vertexShaderObject, vertexShaderSourceCode); GLES32.glCompileShader(vertexShaderObject); // compilation error checking int[] iShaderCompileStatus = new int[1]; int[] iInfoLogLength = new int[1]; String szInfoLog = null; GLES32.glGetShaderiv(vertexShaderObject, GLES32.GL_COMPILE_STATUS, iShaderCompileStatus, 0); if (iShaderCompileStatus[0] == GLES32.GL_FALSE) { GLES32.glGetShaderiv(vertexShaderObject, GLES32.GL_INFO_LOG_LENGTH, iInfoLogLength, 0); if (iInfoLogLength[0] > 0) { szInfoLog = GLES32.glGetShaderInfoLog(vertexShaderObject); System.out.println("RTR: Vertex Shader Compilation log: " + szInfoLog); uninitialize(); System.exit(0); } } // fragment shader fragmentShaderObject = GLES32.glCreateShader(GLES32.GL_FRAGMENT_SHADER); final String fragmentShaderSourceCode = String.format("#version 320 es" + "\n" + "precision highp float;" + "in vec2 out_texcoord;" + "uniform sampler2D u_sampler;" + "out vec4 fragColor;" + "void main(void)" + "{" + " fragColor = texture(u_sampler, out_texcoord);" + "}"); GLES32.glShaderSource(fragmentShaderObject, fragmentShaderSourceCode); GLES32.glCompileShader(fragmentShaderObject); // compilation error checking iShaderCompileStatus[0] = 0; iInfoLogLength[0] = 0; szInfoLog = null; GLES32.glGetShaderiv(fragmentShaderObject, GLES32.GL_COMPILE_STATUS, iShaderCompileStatus, 0); if (iShaderCompileStatus[0] == GLES32.GL_FALSE) { GLES32.glGetShaderiv(fragmentShaderObject, GLES32.GL_INFO_LOG_LENGTH, iInfoLogLength, 0); if (iInfoLogLength[0] > 0) { szInfoLog = GLES32.glGetShaderInfoLog(fragmentShaderObject); System.out.println("RTR: Fragment Shader Compilation log: " + szInfoLog); uninitialize(); System.exit(0); } } // Shader program shaderProgramObject = GLES32.glCreateProgram(); GLES32.glAttachShader(shaderProgramObject, vertexShaderObject); GLES32.glAttachShader(shaderProgramObject, fragmentShaderObject); // prelinking binding to attributes GLES32.glBindAttribLocation(shaderProgramObject, GLESMacros.AMC_ATTRIBUTE_POSITION, "vPosition"); GLES32.glBindAttribLocation(shaderProgramObject, GLESMacros.AMC_ATTRIBUTE_TEXCOORD0, "vTexCoord"); GLES32.glLinkProgram(shaderProgramObject); // compilation error checking int[] iShaderLinkStatus = new int[1]; iInfoLogLength[0] = 0; szInfoLog = null; GLES32.glGetProgramiv(shaderProgramObject, GLES32.GL_LINK_STATUS, iShaderLinkStatus, 0); if (iShaderLinkStatus[0] == GLES32.GL_FALSE) { GLES32.glGetProgramiv(shaderProgramObject, GLES32.GL_INFO_LOG_LENGTH, iInfoLogLength, 0); if (iInfoLogLength[0] > 0) { szInfoLog = GLES32.glGetShaderInfoLog(shaderProgramObject); System.out.println("RTR: Shader linking log: " + szInfoLog); uninitialize(); System.exit(0); } } // get uniform location mvpUniform = GLES32.glGetUniformLocation(shaderProgramObject, "u_mvp_matrix"); final float cubeVertices[] = new float[] { 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f }; final float cubeTexcoord[] = new float[] { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }; // create vao and bind vao // rectangle GLES32.glGenVertexArrays(1, vao_cube, 0); GLES32.glBindVertexArray(vao_cube[0]); // position GLES32.glGenBuffers(1, vbo_position_cube, 0); GLES32.glBindBuffer(GLES32.GL_ARRAY_BUFFER, vbo_position_cube[0]); ByteBuffer byteBufferPositionCube = ByteBuffer.allocateDirect(cubeVertices.length * 4); byteBufferPositionCube.order(ByteOrder.nativeOrder()); FloatBuffer positionBufferCube = byteBufferPositionCube.asFloatBuffer(); positionBufferCube.put(cubeVertices); positionBufferCube.position(0); GLES32.glBufferData(GLES32.GL_ARRAY_BUFFER, cubeVertices.length * 4, positionBufferCube, GLES32.GL_STATIC_DRAW); GLES32.glVertexAttribPointer(GLESMacros.AMC_ATTRIBUTE_POSITION, 3, GLES32.GL_FLOAT, false, 0, 0); GLES32.glEnableVertexAttribArray(GLESMacros.AMC_ATTRIBUTE_POSITION); GLES32.glBindBuffer(GLES32.GL_ARRAY_BUFFER, 0); // texture GLES32.glGenBuffers(1, vbo_texture_cube, 0); GLES32.glBindBuffer(GLES32.GL_ARRAY_BUFFER, vbo_texture_cube[0]); ByteBuffer byteBufferTextureCube = ByteBuffer.allocateDirect(cubeTexcoord.length * 4); byteBufferTextureCube.order(ByteOrder.nativeOrder()); FloatBuffer textureBufferCube = byteBufferTextureCube.asFloatBuffer(); textureBufferCube.put(cubeTexcoord); textureBufferCube.position(0); GLES32.glBufferData(GLES32.GL_ARRAY_BUFFER, cubeTexcoord.length * 4, textureBufferCube, GLES32.GL_STATIC_DRAW); GLES32.glVertexAttribPointer(GLESMacros.AMC_ATTRIBUTE_TEXCOORD0, 2, GLES32.GL_FLOAT, false, 0, 0); GLES32.glEnableVertexAttribArray(GLESMacros.AMC_ATTRIBUTE_TEXCOORD0); GLES32.glBindBuffer(GLES32.GL_ARRAY_BUFFER, 0); GLES32.glBindVertexArray(0); texture_stone[0] = loadTexture(R.raw.stone); //frame buffer GLES32.glGenFramebuffers(1, fbo, 0); GLES32.glBindFramebuffer(GLES32.GL_FRAMEBUFFER, fbo[0]); GLES32.glGenTextures(1, cube_texture, 0); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, cube_texture[0]); GLES32.glTexStorage2D(GLES32.GL_TEXTURE_2D, 9, GLES32.GL_RGBA8, 1536, 1536); GLES32.glTexParameteri(GLES32.GL_TEXTURE_2D, GLES32.GL_TEXTURE_MIN_FILTER, GLES32.GL_LINEAR); GLES32.glTexParameteri(GLES32.GL_TEXTURE_2D, GLES32.GL_TEXTURE_MAG_FILTER, GLES32.GL_LINEAR); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, 0); GLES32.glGenTextures(1, cube_depth, 0); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, cube_depth[0]); GLES32.glTexStorage2D(GLES32.GL_TEXTURE_2D, 9, GLES32.GL_DEPTH_COMPONENT32F, 1536, 1536); GLES32.glFramebufferTexture(GLES32.GL_FRAMEBUFFER, GLES32.GL_COLOR_ATTACHMENT0, cube_texture[0], 0); GLES32.glFramebufferTexture(GLES32.GL_FRAMEBUFFER, GLES32.GL_DEPTH_ATTACHMENT, cube_depth[0], 0); int[] drawBuffers = new int[] { GLES32.GL_COLOR_ATTACHMENT0 }; GLES32.glDrawBuffers(1, drawBuffers, 0); GLES32.glBindFramebuffer(GLES32.GL_FRAMEBUFFER, 0); GLES32.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); GLES32.glDisable(GLES32.GL_CULL_FACE); GLES32.glEnable(GLES32.GL_DEPTH_TEST); GLES32.glDepthFunc(GLES32.GL_LEQUAL); Matrix.setIdentityM(perspectiveProjectionMatrix, 0); } private int loadTexture(int imageFileResourceID) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inScaled = false; Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), imageFileResourceID, options); int[] texture = new int[1]; GLES32.glGenTextures(1, texture, 0); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, texture[0]); GLES32.glPixelStorei(GLES32.GL_UNPACK_ALIGNMENT, 4); GLES32.glTexParameteri(GLES32.GL_TEXTURE_2D, GLES32.GL_TEXTURE_MAG_FILTER, GLES32.GL_LINEAR); GLES32.glTexParameteri(GLES32.GL_TEXTURE_2D, GLES32.GL_TEXTURE_MIN_FILTER, GLES32.GL_LINEAR_MIPMAP_LINEAR); GLUtils.texImage2D(GLES32.GL_TEXTURE_2D, 0, bitmap, 0); GLES32.glGenerateMipmap(GLES32.GL_TEXTURE_2D); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, 0); return (texture[0]); } private void resize(int width, int height) { if (height < 0) { height = 1; } GLES32.glViewport(0, 0, width, height); Matrix.perspectiveM(perspectiveProjectionMatrix, 0, 45.0f, width / height, 0.1f, 100.0f); } private void display() { float[] gray = new float[] {0.25f, 0.25f, 0.25f, 1.0f }; float one_depth = 1.0f; GLES32.glBindFramebuffer(GLES32.GL_FRAMEBUFFER, fbo[0]); GLES32.glClearBufferfv(GLES32.GL_COLOR, 0, gray, 0); GLES32.glClearBufferfi(GLES32.GL_DEPTH_STENCIL, 0, one_depth, 0); //GLES32.glClear(GLES32.GL_COLOR_BUFFER_BIT | GLES32.GL_DEPTH_BUFFER_BIT); GLES32.glViewport(0, 0, 1536, 1536); GLES32.glUseProgram(shaderProgramObject); float[] modelViewMatrix = new float[16]; float[] modelViewProjectionMatrix = new float[16]; float[] rotationMatrix = new float[16]; // cube // identity Matrix.setIdentityM(modelViewMatrix, 0); Matrix.setIdentityM(modelViewProjectionMatrix, 0); Matrix.setIdentityM(rotationMatrix, 0); // tranformation Matrix.translateM(modelViewMatrix, 0, 0.0f, 0.0f, -5.0f); Matrix.scaleM(modelViewMatrix, 0, 0.75f, 0.75f, 0.75f); Matrix.setRotateM(rotationMatrix, 0, angleCube, 1.0f, 0.0f, 0.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.setRotateM(rotationMatrix, 0, angleCube, 0.0f, 1.0f, 0.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.setRotateM(rotationMatrix, 0, angleCube, 0.0f, 0.0f, 1.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.multiplyMM(modelViewProjectionMatrix, 0, perspectiveProjectionMatrix, 0, modelViewMatrix, 0); GLES32.glUniformMatrix4fv(mvpUniform, 1, false, modelViewProjectionMatrix, 0); GLES32.glActiveTexture(GLES32.GL_TEXTURE0); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, texture_stone[0]); GLES32.glUniform1i(samplerUniform, 0); GLES32.glBindVertexArray(vao_cube[0]); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 0, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 4, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 8, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 12, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 16, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 20, 4); GLES32.glBindVertexArray(0); GLES32.glUseProgram(0); GLES32.glBindFramebuffer(GLES32.GL_FRAMEBUFFER, 0); GLES32.glViewport(0, 0, gWidth, gHeight); GLES32.glClear(GLES32.GL_COLOR_BUFFER_BIT | GLES32.GL_DEPTH_BUFFER_BIT); GLES32.glUseProgram(shaderProgramObject); // identity Matrix.setIdentityM(modelViewMatrix, 0); Matrix.setIdentityM(modelViewProjectionMatrix, 0); Matrix.setIdentityM(rotationMatrix, 0); // tranformation Matrix.translateM(modelViewMatrix, 0, 0.0f, 0.0f, -5.0f); Matrix.scaleM(modelViewMatrix, 0, 0.75f, 0.75f, 0.75f); Matrix.setRotateM(rotationMatrix, 0, angleCube, 1.0f, 0.0f, 0.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.setRotateM(rotationMatrix, 0, angleCube, 0.0f, 1.0f, 0.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.setRotateM(rotationMatrix, 0, angleCube, 0.0f, 0.0f, 1.0f); Matrix.multiplyMM(modelViewMatrix, 0, modelViewMatrix, 0, rotationMatrix, 0); Matrix.multiplyMM(modelViewProjectionMatrix, 0, perspectiveProjectionMatrix, 0, modelViewMatrix, 0); GLES32.glUniformMatrix4fv(mvpUniform, 1, false, modelViewProjectionMatrix, 0); GLES32.glActiveTexture(GLES32.GL_TEXTURE0); GLES32.glBindTexture(GLES32.GL_TEXTURE_2D, cube_texture[0]); GLES32.glUniform1i(samplerUniform, 0); GLES32.glBindVertexArray(vao_cube[0]); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 0, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 4, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 8, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 12, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 16, 4); GLES32.glDrawArrays(GLES32.GL_TRIANGLE_FAN, 20, 4); GLES32.glBindVertexArray(0); GLES32.glUseProgram(0); requestRender(); } private void update() { angleCube = angleCube - 1.0f; if (angleCube <= -360.0f) { angleCube = 0.0f; } } private void uninitialize() { if (fbo[0] != 0) { GLES32.glDeleteBuffers(1, fbo, 0); fbo[0] = 0; } if (cube_depth[0] != 0) { GLES32.glDeleteTextures(1, cube_depth, 0); cube_depth[0] = 0; } if (cube_texture[0] != 0) { GLES32.glDeleteTextures(1, cube_texture, 0); cube_texture[0] = 0; } if (texture_stone[0] != 0) { GLES32.glDeleteTextures(1, texture_stone, 0); texture_stone[0] = 0; } if (vbo_texture_cube[0] != 0) { GLES32.glDeleteBuffers(1, vbo_texture_cube, 0); vbo_texture_cube[0] = 0; } if (vbo_position_cube[0] != 0) { GLES32.glDeleteBuffers(1, vbo_position_cube, 0); vbo_position_cube[0] = 0; } if (vao_cube[0] != 0) { GLES32.glDeleteVertexArrays(1, vao_cube, 0); vao_cube[0] = 0; } if (shaderProgramObject != 0) { int[] shaderCount = new int[1]; int shaderNumber; GLES32.glUseProgram(shaderProgramObject); // ask the program how many shaders are attached to you? GLES32.glGetProgramiv(shaderProgramObject, GLES32.GL_ATTACHED_SHADERS, shaderCount, 0); int[] shaders = new int[shaderCount[0]]; if (shaders[0] != 0) { // get shaders GLES32.glGetAttachedShaders(shaderProgramObject, shaderCount[0], shaderCount, 0, shaders, 0); for (shaderNumber = 0; shaderNumber < shaderCount[0]; shaderNumber++) { // detach GLES32.glDetachShader(shaderProgramObject, shaders[shaderNumber]); // delete GLES32.glDeleteShader(shaders[shaderNumber]); // explicit 0 shaders[shaderNumber] = 0; } } GLES32.glDeleteProgram(shaderProgramObject); shaderProgramObject = 0; GLES32.glUseProgram(0); } } @Override public boolean onTouchEvent(MotionEvent event) { int eventaction = event.getAction(); if (!gestureDetector.onTouchEvent(event)) { super.onTouchEvent(event); } return (true); } @Override public boolean onDoubleTap(MotionEvent e) { return (true); } @Override public boolean onDoubleTapEvent(MotionEvent e) { return (true); } @Override public boolean onSingleTapConfirmed(MotionEvent e) { return (true); } @Override public boolean onDown(MotionEvent e) { return (true); } @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return (true); } @Override public void onLongPress(MotionEvent e) { } @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { uninitialize(); System.exit(0); return (true); } @Override public void onShowPress(MotionEvent e) { } @Override public boolean onSingleTapUp(MotionEvent e) { return (true); } }
[ "jayshreeggandhi@gmail.com" ]
jayshreeggandhi@gmail.com
40d0d130ef133c624b9c7a695ec4742d9b84693a
21e092f59107e5cceaca12442bc2e90835473c8b
/eorder/src/main/java/com/basoft/eorder/interfaces/command/TranslateCommandHandler.java
b531b369476989bc79ada53e2174a28df6792d5a
[]
no_license
kim50012/smart-menu-endpoint
55095ac22dd1af0851c04837190b7b6652d884a0
d45246f341f315f8810429b3a4ec1d80cb894d7f
refs/heads/master
2023-06-17T02:52:01.135480
2021-07-15T15:05:19
2021-07-15T15:05:19
381,788,497
0
0
null
null
null
null
UTF-8
Java
false
false
780
java
package com.basoft.eorder.interfaces.command; import com.basoft.eorder.application.framework.CommandHandler; import com.basoft.eorder.util.TranslateUtil; /** * @Author:DongXifu * @Description: * @Date Created in 2:40 下午 2019/11/19 **/ @CommandHandler.AutoCommandHandler("TranslateCommandHandler") public class TranslateCommandHandler { /** * 翻译(汉译韩或者韩译汉) * * @param translate * @return */ @CommandHandler.AutoCommandHandler(SaveTranslate.TRANS_CMT) public SaveTranslate translate(SaveTranslate translate) { try { translate.setResult(TranslateUtil.translateTest(translate.getContent())); } catch (Exception e) { e.getMessage(); } return translate; } }
[ "kim50012@naver.com" ]
kim50012@naver.com
51029930bcb6f0c00877ddc403733911056b87fc
4cb1a247c961cac7cb30a63aeb72367804541c20
/app/src/main/java/com/example/android/popularmovies2/service/Trailer.java
7247eba170c994ae6a605674703afff37242dd44
[]
no_license
dilipagheda/PopularMovies2
593e3dafd7d9f56150ee258f13a0bebe05791043
f51f94c18d2b9b4ce8da1e462b8c97a10498d403
refs/heads/master
2020-03-27T22:50:11.082405
2019-01-18T11:50:11
2019-01-18T11:50:11
147,265,449
0
1
null
null
null
null
UTF-8
Java
false
false
1,774
java
package com.example.android.popularmovies2.service; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Trailer { @SerializedName("id") @Expose private String id; @SerializedName("iso_639_1") @Expose private String iso6391; @SerializedName("iso_3166_1") @Expose private String iso31661; @SerializedName("key") @Expose private String key; @SerializedName("name") @Expose private String name; @SerializedName("site") @Expose private String site; @SerializedName("size") @Expose private Integer size; @SerializedName("type") @Expose private String type; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getIso6391() { return iso6391; } public void setIso6391(String iso6391) { this.iso6391 = iso6391; } public String getIso31661() { return iso31661; } public void setIso31661(String iso31661) { this.iso31661 = iso31661; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSite() { return site; } public void setSite(String site) { this.site = site; } public Integer getSize() { return size; } public void setSize(Integer size) { this.size = size; } public String getType() { return type; } public void setType(String type) { this.type = type; } }
[ "dilip_agheda@yahoo.com" ]
dilip_agheda@yahoo.com
35943a4083674f33b6aff55d5b9b55cec47ef230
3616684705e4cd60cd7295476b342f7c8bbaba24
/consul/consul-provider/src/main/java/me/ilcb/ConsulProviderApplication.java
36aac13e98d1ba12333cfba0a4093f185649e3ed
[]
no_license
ilcb/spring-cloud
035bdde8f6c4924d0bf0c74b7caf495dee42fff1
19546c52bf35e53e2e9099a9f9e263015e5e3511
refs/heads/master
2023-03-25T04:08:28.242664
2023-03-24T03:39:10
2023-03-24T03:39:10
98,175,349
0
0
null
null
null
null
UTF-8
Java
false
false
421
java
package me.ilcb; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @EnableDiscoveryClient @SpringBootApplication public class ConsulProviderApplication { public static void main(String[] args) { SpringApplication.run(ConsulProviderApplication.class, args); } }
[ "ilcbba@126.com" ]
ilcbba@126.com
b8cbf31024e0fcbadb7acbf7b05ba09e6cada5c1
73721ffe3892ae261ad69ce86fe58caaf1e4fa36
/original-source/src/main/java/chapter_06/database/Extractor.java
9cc299f5e32df0d3f952422d79ffd93e6b147e44
[]
no_license
sojeongw/real-world-software-development
f0e86318ad4235ac9cf851156c8b42033026a474
145fe9419513a8a25034cb150469a4a7db922ab7
refs/heads/main
2023-05-01T06:04:28.181196
2021-05-12T04:52:06
2021-05-12T04:52:06
299,034,811
0
0
null
null
null
null
UTF-8
Java
false
false
190
java
package chapter_06.database; import java.sql.PreparedStatement; import java.sql.SQLException; public interface Extractor<R> { R run(PreparedStatement statement) throws SQLException; }
[ "sojeongw.official@gmail.com" ]
sojeongw.official@gmail.com
d7b979b298e9f15e72c82a0726201de68e086724
41cdfca86d493b84917a6293234bb742674fdff7
/mylibrary/src/main/java/cn/darkal/networkdiagnosis/Activity/ChangeFilterActivity.java
7132bd78fdfc3295c4dd49d422638f099246fdb8
[]
no_license
caochongsheng/httpwebdebug
6954b0c5e490ff4e259d0b1a70449de44e07e485
bed6771453130985771ca0e5f36ab79481ac01e4
refs/heads/master
2021-05-14T04:10:41.167523
2018-01-08T06:37:58
2018-01-08T06:37:58
116,636,361
4
0
null
null
null
null
UTF-8
Java
false
false
5,094
java
package cn.darkal.networkdiagnosis.Activity; import android.content.DialogInterface; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.ActionBar; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.widget.EditText; import android.widget.ListView; import android.widget.RelativeLayout; import java.util.List; import cn.darkal.networkdiagnosis.Adapter.ContentFilterAdapter; import cn.darkal.networkdiagnosis.Bean.ResponseFilterRule; import cn.darkal.networkdiagnosis.R; import cn.darkal.networkdiagnosis.SysApplication; import cn.darkal.networkdiagnosis.Utils.SharedPreferenceUtils; public class ChangeFilterActivity extends AppCompatActivity { public RelativeLayout relativeLayout; public ListView listView; public FloatingActionButton floatingActionButton; ContentFilterAdapter contentFilterAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_change_filter); relativeLayout = (RelativeLayout) findViewById(R.id.activity_change_filter); listView = (ListView) findViewById(R.id.lv_filter); floatingActionButton = (FloatingActionButton) findViewById(R.id.fab_add); setupActionBar(); List<ResponseFilterRule> ruleList = ((SysApplication)getApplication()).ruleList; contentFilterAdapter = new ContentFilterAdapter(this,ruleList); listView.setAdapter(contentFilterAdapter); floatingActionButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showDialog(null); } }); } /** * Set up the {@link android.app.ActionBar}, if the API is available. */ private void setupActionBar() { setTitle("返回包注入"); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { // Show the Up button in the action bar. actionBar.setDisplayHomeAsUpEnabled(true); } } public void showDialog(final ResponseFilterRule responseFilterRule){ AlertDialog.Builder builder = new AlertDialog.Builder(ChangeFilterActivity.this); View textEntryView = LayoutInflater.from(ChangeFilterActivity.this).inflate(R.layout.alert_resp_filter, null); final EditText urlEditText = (EditText) textEntryView.findViewById(R.id.et_origin_url); final EditText regexEditText = (EditText) textEntryView.findViewById(R.id.et_regex); final EditText contentEditText = (EditText) textEntryView.findViewById(R.id.et_replace_result); if(responseFilterRule!=null){ urlEditText.setText(responseFilterRule.getUrl()); regexEditText.setText(responseFilterRule.getReplaceRegex()); contentEditText.setText(responseFilterRule.getReplaceContent()); builder.setTitle("修改注入项"); }else{ builder.setTitle("新增注入项"); } builder.setCancelable(true); builder.setView(textEntryView); builder.setPositiveButton("确认", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if(responseFilterRule!=null){ responseFilterRule.setUrl(urlEditText.getText().toString()); responseFilterRule.setReplaceRegex(regexEditText.getText().toString()); responseFilterRule.setReplaceContent(contentEditText.getText().toString()); }else { if(urlEditText.getText().length()>0 && regexEditText.getText().length()>0 && contentEditText.getText().length()>0) { ResponseFilterRule responseFilterRule = new ResponseFilterRule(); responseFilterRule.setUrl(urlEditText.getText().toString()); responseFilterRule.setReplaceRegex(regexEditText.getText().toString()); responseFilterRule.setReplaceContent(contentEditText.getText().toString()); ((SysApplication) getApplication()).ruleList.add(responseFilterRule); } } contentFilterAdapter.notifyDataSetChanged(); } }); builder.setNegativeButton("取消",null); builder.show(); } @Override protected void onStop() { SharedPreferenceUtils.save(getApplicationContext(), "response_filter",((SysApplication) getApplication()).ruleList); super.onStop(); } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish(); return true; } return super.onOptionsItemSelected(item); } }
[ "shengcc@huizuche.com" ]
shengcc@huizuche.com
8bbf3889827d7c2feb1b17ad16dd04b6f9c9aa4f
123f314717abe5463c9a945bd73f2e7fc04b8056
/src/test/java/com/xxniu/app/adapter/AdapterTest.java
fa5847df73d0eec9352f8e30141cf479149aea5e
[]
no_license
wingfirefly/FactoryDemo
e57b99061d378ab37f9e617ca52c610ecd5f447d
3a1eedc250fd8815e4414c8c6e92ffb31b270f57
refs/heads/master
2020-04-27T16:18:29.010163
2019-03-21T12:56:36
2019-03-21T12:56:36
174,480,387
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.xxniu.app.adapter; public class AdapterTest { public static void main(String[] args) { AC220 ac220 = new AC220(); DC5 dc5 = new PowerAdapter(ac220); dc5.outputDC5(); } }
[ "niuxinxing@huaxiafinance.com" ]
niuxinxing@huaxiafinance.com
bf7b25b73221a28fb39c8d9e26a4eabaa3e96292
70cdb764d2d213e7dc5a4dccbd8c3e5fd95360db
/src/cn/ssh/util/UploadUtil.java
b24d254072dd61e31d4ff8b489a68950cfa5e8d4
[]
no_license
shenjie0213/hia
a8eef337ea543f18a73e662901390fd00b3804cf
0ef125c3cd5756bf74625b8765b071ac04f25fab
refs/heads/master
2020-05-17T08:52:26.700968
2015-07-26T02:30:20
2015-07-26T02:30:20
39,710,726
0
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package cn.ssh.util; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import org.apache.struts2.ServletActionContext; public class UploadUtil { private static final int BUFFER_SIZE = 16 * 1024; public static void upload(String loadFileFileName, String path, File loadFile) { // TODO Auto-generated method stub File imageFile = new File(path+File.separator+loadFileFileName); copy(loadFile, imageFile); } private static void copy(File src, File dst) { // TODO Auto-generated method stub try { InputStream in = null; OutputStream out = null; try { in = new BufferedInputStream(new FileInputStream(src), BUFFER_SIZE); out = new BufferedOutputStream(new FileOutputStream(dst), BUFFER_SIZE); byte[] buffer = new byte[BUFFER_SIZE]; while (in.read(buffer) > 0) { out.write(buffer); } } finally { if (null != in) { in.close(); } if (null != out) { out.close(); } } } catch (Exception e) { e.printStackTrace(); } } }
[ "910137292@qq.com" ]
910137292@qq.com
bed9a9c80fc4358a877310971af52665b23a1005
b1db817178387c10b6b44804c90e16eb93c019aa
/tdd-assignments/src/test/java/com/yash/tdd_assignments/primefactor/PrimeFactorTest.java
d15bcaaf086bdc5da6ad794107f87748acd78a62
[]
no_license
KazimKSyed/TDD-Assignment
caf2118846750610e51adcb6c8bb892fb8c10ecb
51c49b07ec0c043896b11cedd67b407827270a80
refs/heads/master
2021-07-14T09:20:57.300427
2019-10-23T06:02:52
2019-10-23T06:02:52
215,488,664
0
0
null
2020-10-13T16:45:37
2019-10-16T07:48:25
Java
UTF-8
Java
false
false
2,031
java
package com.yash.tdd_assignments.primefactor; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.List; import org.junit.Test; public class PrimeFactorTest { /* * Divide the number n by 1 remainder=0 pass. Divide the number n by n remainder=0 pass. Divide the number n by 2 remainder!=0 pass. Divide the number n by up to n-1 and if remainder not equal zero, then it is a prime number * * */ // @Test // public void getPrimeFactors_GivenNumberDivideBy1_ShouldReturnRemainder0() { // PrimeFactor p=new PrimeFactor(); // int i=p.getPrimeFactors(10); // assertEquals(0, i); // } // // @Test // public void getPrimeFactors_GivenNumberDivideByItself_ShouldReturnRemainder0() { // PrimeFactor p=new PrimeFactor(); // int i=p.getPrimeFactors(20); // assertEquals(0, i); // } // // @Test // public void getPrimeFactors_GivenNumberDivide2_ShouldNotReturnRemainder0() { // PrimeFactor p=new PrimeFactor(); // int i=p.getPrimeFactors(20); // int j=0; // assertEquals(j>0, i); // } @Test public void getPrimeFactors_Given10_ShouldReturn2and5() { PrimeFactor p=new PrimeFactor(); List<Integer> list=p.getPrimeFactors(12); List< Integer> list1= Arrays.asList(2,2,3); assertEquals(list1, list); } @Test public void getPrimeFactors_Given10_ShouldReturn5and2() { PrimeFactor p=new PrimeFactor(); List<Integer> list=p.getPrimeFactors(12); List< Integer> list1= Arrays.asList(3,2,2); assertEquals(list1, list); } @Test public void getPrimeFactors_Given10_ShouldReturn2and5q() { PrimeFactor p=new PrimeFactor(); boolean result=p.getPrimeFactors1(12); List< Integer> list1= Arrays.asList(2,2,3); assertEquals(true, result); } @Test public void getPrimeFactors_Given10_ShouldReturn5and2q() { PrimeFactor p=new PrimeFactor(); boolean result=p.getPrimeFactors1(12); List< Integer> list1= Arrays.asList(3,2,2); assertEquals(true,result); } }
[ "syedkazim56@gmail.com" ]
syedkazim56@gmail.com
257ce1d70a2dfeffdb6544f4959b49b6a135970a
98f6af9c6259b6cf053e398fb53eb9c97e5e1e43
/src/main/java/root/services/impl/OrderServiceImpl.java
33a370461b6fa5510d44ac5e73408e92ac692d30
[]
no_license
MichalPrusaczyk/24.11.2020-weblogin
995929292b0c2e3df15be4f51a22bca2a2e5432a
57e34effb183b702361b5a91bc6a375dd211f8e1
refs/heads/master
2023-02-11T02:33:22.858205
2021-01-04T14:37:13
2021-01-04T14:37:13
315,746,194
1
0
null
null
null
null
UTF-8
Java
false
false
2,425
java
package root.services.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import root.dao.IProductDAO; import root.dao.IOrderDAO; import root.model.Product; import root.model.Order; import root.model.OrderPosition; import root.services.IOrderService; import root.session.SessionObject; import javax.annotation.Resource; import java.util.List; @Service public class OrderServiceImpl implements IOrderService { @Resource SessionObject sessionObject; @Autowired IProductDAO productDAO; @Autowired IOrderDAO orderDAO; @Override public void confirmOrder() { //Pobieramy koszyk List<Product> orderedProducts = this.sessionObject.getBasket(); for(Product productFromBasket : orderedProducts) { Product productFromDB = this.productDAO.getProductById(productFromBasket.getId()); if(productFromDB.getLength() < productFromBasket.getLength()) { return; } } //tworzymy zamowienie Order order = new Order(); //dodajemy usera do zamowienia order.setUser(this.sessionObject.getUser()); //wyliczamy kwote zamowienia double bill = 0; for(Product product : orderedProducts) { bill = bill + product.getPrice() * product.getLength(); } order.setPrice(bill); //ustawiamy status zamowienia order.setStatus(Order.Status.ORDERED); //tworzymy pozycje zamowienia na podstawie koszyka for(Product product : orderedProducts) { OrderPosition orderPosition = new OrderPosition(); orderPosition.setLength(product.getLength()); orderPosition.setOrder(order); orderPosition.setProduct(product); order.getPositions().add(orderPosition); } this.orderDAO.persistOrder(order); for(Product product : orderedProducts) { Product productFromDB = this.productDAO.getProductById(product.getId()); productFromDB.setLength(productFromDB.getLength() - product.getLength()); this.productDAO.updateProduct(productFromDB); } this.sessionObject.getBasket().clear(); } @Override public List<Order> getOrdersForCurrentUser() { return this.orderDAO.getOrdersByUser(this.sessionObject.getUser().getId()); } }
[ "michal@prusaczyk.eu" ]
michal@prusaczyk.eu
a855dda56c0d860ea6419e63252413748f67de77
b320cf092cd7ecd3035368ef35f4d55ec28460a0
/nguyenkimnghia/tuan 3/shape/src/RectangleTest.java
562eba0a5dbdc74c47923f300a1ec3689a01a7d3
[]
no_license
ChauLe2010/C0919G1_WBD_NHL
410176241212433eb6f5c788ff93d2b796474628
391c1900037f2e29aa7c39167288e1de1ccb8663
refs/heads/master
2020-09-04T20:58:06.205373
2019-11-18T12:22:20
2019-11-18T12:22:20
219,890,394
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
public class RectangleTest { public static void main(String[] args) { Rectangle rectangle = new Rectangle(); System.out.println(rectangle); rectangle = new Rectangle(5.0,10.0); System.out.println(rectangle); rectangle = new Rectangle(5.0,10.0,"orange",false); System.out.println(rectangle); } }
[ "nguyenkimnghia456@gmail.com" ]
nguyenkimnghia456@gmail.com
58a74549f169e556438a211415e20c38b0093734
92e9e906716b5dba37c446589ec0a7303d9fef37
/src/main/java/nl/ordina/bag/etl/mail/handler/HttpClient.java
6085e39ec6f2147dd605aa9cbb3814122712050f
[ "Apache-2.0" ]
permissive
eluinstra/bag-etl-mail
2a6bc6fd1df37523a4268a51a5d0e17de98fa121
e5503e7d6acac99350c1f360e810960cda23e27f
refs/heads/master
2020-05-20T16:52:00.331771
2015-10-10T13:04:01
2015-10-10T13:04:01
13,405,666
0
0
null
null
null
null
UTF-8
Java
false
false
3,169
java
/** * Copyright 2013 Ordina * * 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 nl.ordina.bag.etl.mail.handler; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.net.ssl.HttpsURLConnection; import org.apache.commons.io.IOUtils; public class HttpClient { private SSLFactoryManager sslFactoryManager = new SSLFactoryManager(); private Pattern filePattern; public HttpClient() throws NoSuchAlgorithmException, KeyManagementException { filePattern = Pattern.compile("^attachment;\\s*filename=\"(.*)\"$"); } public File downloadFile(String uri) throws IOException { HttpURLConnection connection = null; try { connection = getConnection(uri); connection.connect(); return handleResponse(connection); } finally { if (connection != null) connection.disconnect(); } } private HttpURLConnection getConnection(String uri) throws IOException { URL url = new URL(uri); HttpURLConnection result = (HttpURLConnection)url.openConnection(); if (result instanceof HttpsURLConnection) { ((HttpsURLConnection)result).setSSLSocketFactory(sslFactoryManager.getSslSocketFactory()); ((HttpsURLConnection)result).setHostnameVerifier(sslFactoryManager.getHostnameVerifier()); } result.setRequestMethod("GET"); result.setDoOutput(true); return result; } private File handleResponse(HttpURLConnection connection) throws IOException { if (connection.getResponseCode() == 200) { String filename = getFilename(connection); return writeToFile(filename,connection.getInputStream()); } else throw new IOException ("Could not read file from " + connection.getURL().toString() + ". Received response code " + connection.getResponseCode()); } private String getFilename(HttpURLConnection connection) { String s = connection.getHeaderField("Content-Disposition"); Matcher matcher = filePattern.matcher(s); return matcher.find() ? matcher.group(1) : UUID.randomUUID().toString(); } private File writeToFile(String filename, InputStream inputStream) throws IOException { File result = File.createTempFile(filename,null); result.deleteOnExit(); try (FileOutputStream out = new FileOutputStream(result)) { IOUtils.copy(inputStream,out); } return result; } }
[ "edwin.luinstra@clockwork.nl" ]
edwin.luinstra@clockwork.nl
c69e21c7f6699201cb7c1b924c3267a6bd639bd8
539f67e73612c15ba7ea69127923924dbab6d203
/translateTest/java/src/main/java/com/project/convertedCode/globalNamespace/classes/Google_About.java
9d265824b9601c6a35b292cf4fd560347dcff15a
[]
no_license
RuntimeConverter/runtimeconverter-examples
6a70ba657847c72f77f2b1aca46e83b1867ba8b2
8dab34c5cc334bd7fcb9140009d21da38736e064
refs/heads/master
2021-07-20T06:33:18.303421
2017-10-29T16:39:01
2017-10-29T16:39:01
108,751,760
0
0
null
null
null
null
UTF-8
Java
false
false
27,771
java
package com.project.convertedCode.globalNamespace.classes; import com.runtimeconverter.runtime.passByReference.PassByReferenceArgs; import com.project.convertedCode.globalNamespace.classes.Google_Model; import com.runtimeconverter.runtime.includes.RuntimeFileContextInterface; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.ZVal; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) google-api-php-client/src/contrib/Google_DriveService.php */ public class Google_About extends Google_Model implements RuntimeFileContextInterface { public Object kind = null; public Object __featuresType = "Google_AboutFeatures"; public Object __featuresDataType = "array"; public Object features = null; public Object quotaBytesUsed = null; public Object permissionId = null; public Object __maxUploadSizesType = "Google_AboutMaxUploadSizes"; public Object __maxUploadSizesDataType = "array"; public Object maxUploadSizes = null; public Object name = null; public Object remainingChangeIds = null; public Object __additionalRoleInfoType = "Google_AboutAdditionalRoleInfo"; public Object __additionalRoleInfoDataType = "array"; public Object additionalRoleInfo = null; public Object etag = null; public Object __importFormatsType = "Google_AboutImportFormats"; public Object __importFormatsDataType = "array"; public Object importFormats = null; public Object quotaBytesTotal = null; public Object rootFolderId = null; public Object largestChangeId = null; public Object quotaBytesUsedInTrash = null; public Object __exportFormatsType = "Google_AboutExportFormats"; public Object __exportFormatsDataType = "array"; public Object exportFormats = null; public Object domainSharingPolicy = null; public Object selfLink = null; public Object isCurrentAppInstalled = null; public Google_About(RuntimeEnv env, Object... args) { super(env, args); this.__construct(env, args); } @Override public Object converterRuntimeCallExtended( RuntimeEnv env, String method, Class caller, PassByReferenceArgs passByReferenceArgs, Object... args) { switch (method) { case "setKind": return this.setKind(env, args); case "getKind": return this.getKind(env, args); case "setFeatures": return this.setFeatures(env, args); case "getFeatures": return this.getFeatures(env, args); case "setQuotaBytesUsed": return this.setQuotaBytesUsed(env, args); case "getQuotaBytesUsed": return this.getQuotaBytesUsed(env, args); case "setPermissionId": return this.setPermissionId(env, args); case "getPermissionId": return this.getPermissionId(env, args); case "setMaxUploadSizes": return this.setMaxUploadSizes(env, args); case "getMaxUploadSizes": return this.getMaxUploadSizes(env, args); case "setName": return this.setName(env, args); case "getName": return this.getName(env, args); case "setRemainingChangeIds": return this.setRemainingChangeIds(env, args); case "getRemainingChangeIds": return this.getRemainingChangeIds(env, args); case "setAdditionalRoleInfo": return this.setAdditionalRoleInfo(env, args); case "getAdditionalRoleInfo": return this.getAdditionalRoleInfo(env, args); case "setEtag": return this.setEtag(env, args); case "getEtag": return this.getEtag(env, args); case "setImportFormats": return this.setImportFormats(env, args); case "getImportFormats": return this.getImportFormats(env, args); case "setQuotaBytesTotal": return this.setQuotaBytesTotal(env, args); case "getQuotaBytesTotal": return this.getQuotaBytesTotal(env, args); case "setRootFolderId": return this.setRootFolderId(env, args); case "getRootFolderId": return this.getRootFolderId(env, args); case "setLargestChangeId": return this.setLargestChangeId(env, args); case "getLargestChangeId": return this.getLargestChangeId(env, args); case "setQuotaBytesUsedInTrash": return this.setQuotaBytesUsedInTrash(env, args); case "getQuotaBytesUsedInTrash": return this.getQuotaBytesUsedInTrash(env, args); case "setExportFormats": return this.setExportFormats(env, args); case "getExportFormats": return this.getExportFormats(env, args); case "setDomainSharingPolicy": return this.setDomainSharingPolicy(env, args); case "getDomainSharingPolicy": return this.getDomainSharingPolicy(env, args); case "setSelfLink": return this.setSelfLink(env, args); case "getSelfLink": return this.getSelfLink(env, args); case "setIsCurrentAppInstalled": return this.setIsCurrentAppInstalled(env, args); case "getIsCurrentAppInstalled": return this.getIsCurrentAppInstalled(env, args); } return super.converterRuntimeCallExtended(env, method, caller, passByReferenceArgs, args); } @Override public Object __get(Object key, Class caller) { key = ZVal.toString(key); switch ((String) key) { case "kind": return this.kind; case "__featuresType": if (Google_About.class.isAssignableFrom(caller)) { return this.__featuresType; } return this.__phpMagicMethod__isset(key); case "__featuresDataType": if (Google_About.class.isAssignableFrom(caller)) { return this.__featuresDataType; } return this.__phpMagicMethod__isset(key); case "features": return this.features; case "quotaBytesUsed": return this.quotaBytesUsed; case "permissionId": return this.permissionId; case "__maxUploadSizesType": if (Google_About.class.isAssignableFrom(caller)) { return this.__maxUploadSizesType; } return this.__phpMagicMethod__isset(key); case "__maxUploadSizesDataType": if (Google_About.class.isAssignableFrom(caller)) { return this.__maxUploadSizesDataType; } return this.__phpMagicMethod__isset(key); case "maxUploadSizes": return this.maxUploadSizes; case "name": return this.name; case "remainingChangeIds": return this.remainingChangeIds; case "__additionalRoleInfoType": if (Google_About.class.isAssignableFrom(caller)) { return this.__additionalRoleInfoType; } return this.__phpMagicMethod__isset(key); case "__additionalRoleInfoDataType": if (Google_About.class.isAssignableFrom(caller)) { return this.__additionalRoleInfoDataType; } return this.__phpMagicMethod__isset(key); case "additionalRoleInfo": return this.additionalRoleInfo; case "etag": return this.etag; case "__importFormatsType": if (Google_About.class.isAssignableFrom(caller)) { return this.__importFormatsType; } return this.__phpMagicMethod__isset(key); case "__importFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { return this.__importFormatsDataType; } return this.__phpMagicMethod__isset(key); case "importFormats": return this.importFormats; case "quotaBytesTotal": return this.quotaBytesTotal; case "rootFolderId": return this.rootFolderId; case "largestChangeId": return this.largestChangeId; case "quotaBytesUsedInTrash": return this.quotaBytesUsedInTrash; case "__exportFormatsType": if (Google_About.class.isAssignableFrom(caller)) { return this.__exportFormatsType; } return this.__phpMagicMethod__isset(key); case "__exportFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { return this.__exportFormatsDataType; } return this.__phpMagicMethod__isset(key); case "exportFormats": return this.exportFormats; case "domainSharingPolicy": return this.domainSharingPolicy; case "selfLink": return this.selfLink; case "isCurrentAppInstalled": return this.isCurrentAppInstalled; } return super.__get(key, caller); } @Override public boolean __isset(Object key, Class caller) { key = ZVal.toString(key); switch ((String) key) { case "kind": return ZVal.isNull(this.kind); case "__featuresType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__featuresType); } break; case "__featuresDataType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__featuresDataType); } break; case "features": return ZVal.isNull(this.features); case "quotaBytesUsed": return ZVal.isNull(this.quotaBytesUsed); case "permissionId": return ZVal.isNull(this.permissionId); case "__maxUploadSizesType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__maxUploadSizesType); } break; case "__maxUploadSizesDataType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__maxUploadSizesDataType); } break; case "maxUploadSizes": return ZVal.isNull(this.maxUploadSizes); case "name": return ZVal.isNull(this.name); case "remainingChangeIds": return ZVal.isNull(this.remainingChangeIds); case "__additionalRoleInfoType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__additionalRoleInfoType); } break; case "__additionalRoleInfoDataType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__additionalRoleInfoDataType); } break; case "additionalRoleInfo": return ZVal.isNull(this.additionalRoleInfo); case "etag": return ZVal.isNull(this.etag); case "__importFormatsType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__importFormatsType); } break; case "__importFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__importFormatsDataType); } break; case "importFormats": return ZVal.isNull(this.importFormats); case "quotaBytesTotal": return ZVal.isNull(this.quotaBytesTotal); case "rootFolderId": return ZVal.isNull(this.rootFolderId); case "largestChangeId": return ZVal.isNull(this.largestChangeId); case "quotaBytesUsedInTrash": return ZVal.isNull(this.quotaBytesUsedInTrash); case "__exportFormatsType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__exportFormatsType); } break; case "__exportFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { return ZVal.isNull(this.__exportFormatsDataType); } break; case "exportFormats": return ZVal.isNull(this.exportFormats); case "domainSharingPolicy": return ZVal.isNull(this.domainSharingPolicy); case "selfLink": return ZVal.isNull(this.selfLink); case "isCurrentAppInstalled": return ZVal.isNull(this.isCurrentAppInstalled); } return super.__isset(key, caller); } @Override public void __set(Object key, Object value, Class caller) { key = ZVal.toString(key); switch ((String) key) { case "kind": this.kind = value; break; case "__featuresType": if (Google_About.class.isAssignableFrom(caller)) { this.__featuresType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "__featuresDataType": if (Google_About.class.isAssignableFrom(caller)) { this.__featuresDataType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "features": this.features = value; break; case "quotaBytesUsed": this.quotaBytesUsed = value; break; case "permissionId": this.permissionId = value; break; case "__maxUploadSizesType": if (Google_About.class.isAssignableFrom(caller)) { this.__maxUploadSizesType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "__maxUploadSizesDataType": if (Google_About.class.isAssignableFrom(caller)) { this.__maxUploadSizesDataType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "maxUploadSizes": this.maxUploadSizes = value; break; case "name": this.name = value; break; case "remainingChangeIds": this.remainingChangeIds = value; break; case "__additionalRoleInfoType": if (Google_About.class.isAssignableFrom(caller)) { this.__additionalRoleInfoType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "__additionalRoleInfoDataType": if (Google_About.class.isAssignableFrom(caller)) { this.__additionalRoleInfoDataType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "additionalRoleInfo": this.additionalRoleInfo = value; break; case "etag": this.etag = value; break; case "__importFormatsType": if (Google_About.class.isAssignableFrom(caller)) { this.__importFormatsType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "__importFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { this.__importFormatsDataType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "importFormats": this.importFormats = value; break; case "quotaBytesTotal": this.quotaBytesTotal = value; break; case "rootFolderId": this.rootFolderId = value; break; case "largestChangeId": this.largestChangeId = value; break; case "quotaBytesUsedInTrash": this.quotaBytesUsedInTrash = value; break; case "__exportFormatsType": if (Google_About.class.isAssignableFrom(caller)) { this.__exportFormatsType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "__exportFormatsDataType": if (Google_About.class.isAssignableFrom(caller)) { this.__exportFormatsDataType = value; break; } this.__phpMagicMethod__set_internal(key, value); return; case "exportFormats": this.exportFormats = value; break; case "domainSharingPolicy": this.domainSharingPolicy = value; break; case "selfLink": this.selfLink = value; break; case "isCurrentAppInstalled": this.isCurrentAppInstalled = value; break; } super.__set(key, value, caller); } public Object setKind(RuntimeEnv env, Object... args) { Object kind = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "kind", kind); return null; } public Object getKind(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "kind")); } public Object setFeatures(RuntimeEnv env, Object... args) { Object features = ZVal.assignParameter(args, 0, null); env.callMethod( this, "assertIsArray", Google_About.class, features, "Google_AboutFeatures", "setFeatures"); ZVal.setProperty(this, Google_About.class, "features", features); return null; } public Object getFeatures(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "features")); } public Object setQuotaBytesUsed(RuntimeEnv env, Object... args) { Object quotaBytesUsed = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "quotaBytesUsed", quotaBytesUsed); return null; } public Object getQuotaBytesUsed(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "quotaBytesUsed")); } public Object setPermissionId(RuntimeEnv env, Object... args) { Object permissionId = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "permissionId", permissionId); return null; } public Object getPermissionId(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "permissionId")); } public Object setMaxUploadSizes(RuntimeEnv env, Object... args) { Object maxUploadSizes = ZVal.assignParameter(args, 0, null); env.callMethod( this, "assertIsArray", Google_About.class, maxUploadSizes, "Google_AboutMaxUploadSizes", "setMaxUploadSizes"); ZVal.setProperty(this, Google_About.class, "maxUploadSizes", maxUploadSizes); return null; } public Object getMaxUploadSizes(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "maxUploadSizes")); } public Object setName(RuntimeEnv env, Object... args) { Object name = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "name", name); return null; } public Object getName(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "name")); } public Object setRemainingChangeIds(RuntimeEnv env, Object... args) { Object remainingChangeIds = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "remainingChangeIds", remainingChangeIds); return null; } public Object getRemainingChangeIds(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "remainingChangeIds")); } public Object setAdditionalRoleInfo(RuntimeEnv env, Object... args) { Object additionalRoleInfo = ZVal.assignParameter(args, 0, null); env.callMethod( this, "assertIsArray", Google_About.class, additionalRoleInfo, "Google_AboutAdditionalRoleInfo", "setAdditionalRoleInfo"); ZVal.setProperty(this, Google_About.class, "additionalRoleInfo", additionalRoleInfo); return null; } public Object getAdditionalRoleInfo(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "additionalRoleInfo")); } public Object setEtag(RuntimeEnv env, Object... args) { Object etag = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "etag", etag); return null; } public Object getEtag(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "etag")); } public Object setImportFormats(RuntimeEnv env, Object... args) { Object importFormats = ZVal.assignParameter(args, 0, null); env.callMethod( this, "assertIsArray", Google_About.class, importFormats, "Google_AboutImportFormats", "setImportFormats"); ZVal.setProperty(this, Google_About.class, "importFormats", importFormats); return null; } public Object getImportFormats(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "importFormats")); } public Object setQuotaBytesTotal(RuntimeEnv env, Object... args) { Object quotaBytesTotal = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "quotaBytesTotal", quotaBytesTotal); return null; } public Object getQuotaBytesTotal(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "quotaBytesTotal")); } public Object setRootFolderId(RuntimeEnv env, Object... args) { Object rootFolderId = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "rootFolderId", rootFolderId); return null; } public Object getRootFolderId(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "rootFolderId")); } public Object setLargestChangeId(RuntimeEnv env, Object... args) { Object largestChangeId = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "largestChangeId", largestChangeId); return null; } public Object getLargestChangeId(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "largestChangeId")); } public Object setQuotaBytesUsedInTrash(RuntimeEnv env, Object... args) { Object quotaBytesUsedInTrash = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "quotaBytesUsedInTrash", quotaBytesUsedInTrash); return null; } public Object getQuotaBytesUsedInTrash(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "quotaBytesUsedInTrash")); } public Object setExportFormats(RuntimeEnv env, Object... args) { Object exportFormats = ZVal.assignParameter(args, 0, null); env.callMethod( this, "assertIsArray", Google_About.class, exportFormats, "Google_AboutExportFormats", "setExportFormats"); ZVal.setProperty(this, Google_About.class, "exportFormats", exportFormats); return null; } public Object getExportFormats(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "exportFormats")); } public Object setDomainSharingPolicy(RuntimeEnv env, Object... args) { Object domainSharingPolicy = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "domainSharingPolicy", domainSharingPolicy); return null; } public Object getDomainSharingPolicy(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "domainSharingPolicy")); } public Object setSelfLink(RuntimeEnv env, Object... args) { Object selfLink = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "selfLink", selfLink); return null; } public Object getSelfLink(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "selfLink")); } public Object setIsCurrentAppInstalled(RuntimeEnv env, Object... args) { Object isCurrentAppInstalled = ZVal.assignParameter(args, 0, null); ZVal.setProperty(this, Google_About.class, "isCurrentAppInstalled", isCurrentAppInstalled); return null; } public Object getIsCurrentAppInstalled(RuntimeEnv env, Object... args) { return ZVal.assign(ZVal.getProperty(this, Google_About.class, "isCurrentAppInstalled")); } public String ___getRuntimeFilename() { return ""; } public String ___getRuntimeDirname() { return ""; } public String ___getRuntimeNamespace() { return ""; } }
[ "support@runtimeconverter.com" ]
support@runtimeconverter.com
6889311e3610bcaaf90c6cfc02477d519a0897b6
d192e46d30facea126f9c982d7ad924be4d23bff
/aparapi-lambda/test/codegen/src/java/com/amd/aparapi/test/ObjectArrayCommonSuper.java
f3075547d7fc0b68b0073a15490a0715a0d16acc
[ "BSD-3-Clause" ]
permissive
yhchien/Aparapi_vector_instruction
9633c262c5ea69a0e7d568b1c5d16dd807ef2389
e04032f05862f5911f4d460654b02e3394550540
refs/heads/master
2016-08-08T19:33:04.691820
2015-05-26T06:45:36
2015-05-26T06:45:36
36,277,068
0
0
null
null
null
null
UTF-8
Java
false
false
1,150
java
package com.amd.aparapi.test; import com.amd.aparapi.Kernel; public class ObjectArrayCommonSuper extends Kernel{ final static int size = 16; static class DummyParent{ int intField; public DummyParent(){ intField = -3; } public int getIntField(){ return intField; } } ; final static class DummyBrother extends DummyParent{ int brosInt; public int getBrosInt(){ return brosInt; } } ; final static class DummySister extends DummyParent{ int sisInt; public int getSisInt(){ return sisInt; } } ; DummyBrother db[] = new DummyBrother[size]; DummySister ds[] = new DummySister[size]; public ObjectArrayCommonSuper(){ db[0] = new DummyBrother(); ds[0] = new DummySister(); } public void run(){ int myId = getGlobalId(); db[myId].intField = db[myId].getIntField() + db[myId].getBrosInt(); ds[myId].intField = ds[myId].getIntField() + ds[myId].getSisInt(); } } /**{Throws{ClassParseException}Throws}**/
[ "brian780223@gmail.com" ]
brian780223@gmail.com
a3382a884dcd975020ab87b167772e27e5d8698a
65a88b809ca790672d2c1226f5da30d755c6614b
/src/Abstract_Factory/FemaleFactory.java
d6cdbdcdec21140efbbec0fa7e75805eb8ec71ff
[]
no_license
yinHengCQ/Patterns
2fc1ccaf1aa1dc30727a26f4d3ed58b814df6579
5e881c0bab1ba35d8e116e5716fd4b994deddc8f
refs/heads/master
2021-07-17T11:59:05.139106
2017-10-25T14:49:13
2017-10-25T14:49:13
105,031,809
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
package Abstract_Factory; public class FemaleFactory implements HumanFactory { @Override public Human createYellowHuman() { // TODO Auto-generated method stub return new FemaleYellowHuman(); } @Override public Human createBlackHuman() { // TODO Auto-generated method stub return null; } @Override public Human createWhiteHuman() { // TODO Auto-generated method stub return null; } }
[ "Administrator@S63H9DFDCZP5YDZ" ]
Administrator@S63H9DFDCZP5YDZ
6b9b2e8e17d97336bdc210aad8b8dacc87984c43
832e2c54446377a8b18660e6bb4d6c8cea31698c
/app/src/main/java/com/hugh/basis/activities/FragmentActivity.java
edfeb61f386ed40c1acc4c96a2c9b6097b355e62
[]
no_license
summerwang1/AndroidBasis
f679f9c81ecd607da5b177c01dc70b0c82a67f83
aeeaaed0b36a3a12a6a08cb24e48a5cebbde7010
refs/heads/master
2022-04-08T10:54:16.815788
2019-12-23T09:40:35
2019-12-23T09:40:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,293
java
package com.hugh.basis.activities; import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.Window; import com.hugh.basis.R; import com.hugh.basis.fragments.ContentFragment; import com.hugh.basis.fragments.NameContentFragment; import com.hugh.basis.fragments.NameFragment; /** * Created by chenyw on 2019/5/24. */ public class FragmentActivity extends AppCompatActivity implements NameFragment.showPro { private NameContentFragment cf; private NameFragment nf; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fragment); cf = (NameContentFragment)getSupportFragmentManager().findFragmentById( R.id.content_fg); nf = (NameFragment) getSupportFragmentManager().findFragmentById(R.id.name_fg); } @Override public void showProByName(String name) { cf.showPro(name); } public void onClick(View v) { switch (v.getId()) { case R.id.clear_data: nf.clearData(); break; default: break; } } }
[ "chenyw@tuya.com" ]
chenyw@tuya.com
9b393eb955c10a78657de497454e4237e740d579
0f109da36c9fac2b1f5e3bfa0e0f75e9287b29fe
/gangnam/src/com/example/gamgnam/introActivity.java
2f51754f445a7bff03fb6f105af7981fbb62cbce
[]
no_license
PARKOKJAE/teststore
47dcd4506e39d6c25f82a4f69028de00c7584b4d
ad96571e54608231a0c9ee796cf0ac3fa9b63df9
refs/heads/master
2021-01-19T07:18:46.448477
2013-12-09T02:43:38
2013-12-09T03:33:21
null
0
0
null
null
null
null
UHC
Java
false
false
1,349
java
package com.example.gamgnam; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.KeyEvent; import android.view.Window; import android.widget.Toast; public class introActivity extends Activity { Handler h; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); //타이틀바 없이 하기 위함 setContentView(R.layout.intro); h = new Handler(); h.postDelayed(irun, 2000); // 약 4초간 인트로 화면 } Runnable irun= new Runnable() { @Override public void run() { // TODO Auto-generated method stub Intent i = new Intent(introActivity.this,MainActivity.class); startActivity(i); overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); finish(); //fade in으로 시작하여 fade out 으로 인트로 화면이 꺼지게 애니메이션 추가 } }; //인트로화면 중간에 뒤로가기 버튼을 눌러서 꺼졌을 시 4초 후 메인페이지가 뜨는 것을 방지 public void onBackPressed(){ super.onBackPressed(); h.removeCallbacks(irun); } }
[ "723@723-PC" ]
723@723-PC
288fcd8b4e41ee71e8d68ac2cab28059ef0d92d6
2a41e4bfd46910c5322b37305a2f07beb55a4a12
/app/src/main/java/com/hyd/animationart/PathPaintActivity.java
fa139cc1c6684319d75b53667ffdccbf62d2c61f
[ "MIT" ]
permissive
hydcoder/AndroidAnimation
397a55134ce81a7775d57c38b5cdca7d1aa8a54d
ec688f1df80534b0ad86aa4ec7b713c56d31d1db
refs/heads/master
2021-03-07T11:00:56.249095
2020-03-10T10:04:15
2020-03-10T10:04:15
246,261,011
1
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.hyd.animationart; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class PathPaintActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_path_paint); } }
[ "hyd_coder@163.com" ]
hyd_coder@163.com
2766fec6f46d796b6753cf67761fbac627346e6f
0835c1c1751eb6bdda75d1faf47adc794c4bf2b2
/src/main/java/com/ticket/model/Customer.java
5bc95dd6066bab5fcba0f6e8a73eec0ee6176fe7
[]
no_license
gitamech14/Tickets
db4e49033f94845ea8c4105bca3b386debe130b4
583964fe1637bbae394e95f27d0ae2948c480c01
refs/heads/master
2021-07-08T17:15:43.505691
2017-10-06T21:17:34
2017-10-06T21:17:34
106,049,872
0
0
null
null
null
null
UTF-8
Java
false
false
1,813
java
package com.ticket.model; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name ="CUSTOMER") public class Customer implements Serializable { private static final long serialVersionUID = -2087752945780504575L; private Long id; private String email; private String firstName; private String lastName; private Set<SeatHold> seatHolds = new HashSet<>(); public Customer() {} public Customer(String email) { this.email = email; } @Id @Column(name="ID") @SequenceGenerator(name="customer_seq", sequenceName="CUSTOMER_SEQ") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="customer_seq") public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name="EMAIL", nullable=false) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Column(name="FIRST_NAME") public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } @Column(name="LAST_NAME") public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @OneToMany(cascade={CascadeType.ALL}, mappedBy="customer", fetch=FetchType.LAZY) public Set<SeatHold> getSeatHolds() { return seatHolds; } public void setSeatHolds(Set<SeatHold> seatHolds) { this.seatHolds = seatHolds; } }
[ "sriram@Srirams-MBP.fios-router.home" ]
sriram@Srirams-MBP.fios-router.home
70a60aab69cb928fe1ec6788a4667f4be4b53937
e59a114c1795f2ff298ff1c21ed20d6740361208
/src/java/br/com/ConexaoBanco/Entidades/Usuario.java
09d7f90856246e34254f8d8d8d43f5f2723c7f45
[]
no_license
RodolfoMSousa/WebServiceTCC
6270f09a57c121d2b90a7a6d0ec9e8365c99ee12
c5fa01894574fbb36dd557434fc35c090d651a47
refs/heads/master
2020-03-18T10:32:00.931706
2018-06-07T21:31:04
2018-06-07T21:31:04
134,617,938
0
0
null
null
null
null
UTF-8
Java
false
false
2,697
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.com.ConexaoBanco.Entidades; /** * * @author Rodolfo */ public class Usuario { protected int userId; protected String nome, sobrenome; protected int cpf, dataNascimento, ativo,dataCadastro; public Usuario(){ } public Usuario(int usuarioId, String nome,String sobrenome, int cpf, int dataNascimento, int ativo, int dataCadastro){ setUserId(usuarioId); setNome(nome); setSobrenome(sobrenome); setCpf(cpf); setDataNascimento(dataNascimento); setAtivo(ativo); setDataCadastro(dataCadastro); } /** * @return the nome */ public String getNome() { return nome; } /** * @param nome the nome to set */ public void setNome(String nome) { this.nome = nome; } /** * @return the sobrenome */ public String getSobrenome() { return sobrenome; } /** * @param sobrenome the sobrenome to set */ public void setSobrenome(String sobrenome) { this.sobrenome = sobrenome; } /** * @return the cpf */ public int getCpf() { return cpf; } /** * @param cpf the cpf to set */ public void setCpf(int cpf) { this.cpf = cpf; } /** * @return the dataNascimento */ public int getDataNascimento() { return dataNascimento; } /** * @param dataNascimento the dataNascimento to set */ public void setDataNascimento(int dataNascimento) { this.dataNascimento = dataNascimento; } /** * @return the ativo */ public int getAtivo() { return ativo; } /** * @param ativo the ativo to set */ public void setAtivo(int ativo) { this.ativo = ativo; } /** * @return the dataCadastro */ public int getDataCadastro() { return dataCadastro; } /** * @param dataCadastro the dataCadastro to set */ public void setDataCadastro(int dataCadastro) { this.dataCadastro = dataCadastro; } /** * @return the usuarioId */ public int getUserId() { return userId; } /** * @param usuarioId the usuarioId to set */ public void setUserId(int usuarioId) { this.userId = usuarioId; } }
[ "rodolfoms77@hotmail.com" ]
rodolfoms77@hotmail.com
ce0bbcc50b8e31dde1c51436a6b5f19a1c030ea1
c179123a475b769a6fc27206d574a054414df807
/Calculator/src/calculator/Divide.java
528a6cfbd6bf476337c333f89c15648fad7999a2
[]
no_license
pm48/Calculator
26a0890d1a6e530d9e46698b285a0743d2d6f0a0
9be68a7995c87ef490eae5b110e5613fe71f005b
refs/heads/master
2020-04-05T23:48:40.968012
2015-07-20T04:06:08
2015-07-20T04:06:08
38,948,010
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package calculator; /** * * @author Prerna Manaktala */ class Divide extends AbstractBinaryOperation { @Override protected double executeBinary(double paramValue1, double paramValue2) { if(paramValue2!=0) { return paramValue1/paramValue2; } else throw new ArithmeticException("division by 0"); } }
[ "prerna@datatorrent.com" ]
prerna@datatorrent.com
8d9872f97022598e51a67d99814cacaf674765aa
d2c72afa70fbfa004d8ed47183db6882f4cfafab
/src/main/java/com/realdimension/Med3d/dao/ProductOrderDAO.java
1e2539c51bdfec3ae85f63cf7500a081806c8934
[]
no_license
tayduivn/PrintingServicePlatform
51b5023fcad489d8bd95331dff22f68a943852f2
3262aab2337358c57950c0d7bbd034f889312ca7
refs/heads/master
2023-02-20T08:42:08.458813
2019-07-03T06:44:23
2019-07-03T06:44:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.realdimension.Med3d.dao; import java.util.HashMap; import java.util.List; import com.realdimension.Med3d.VO.OrderVO; public interface ProductOrderDAO { public void Order(OrderVO vo) throws Exception; public List<OrderVO> OrderList(String requester_id) throws Exception; public OrderVO FindOrder(String order_id) throws Exception; public List<OrderVO> AllOrderList() throws Exception; public void OrderMakeStart(HashMap map) throws Exception; public void OrderMakingCancel(String order_id) throws Exception; public void OrderMakingDelete(String order_id) throws Exception; public void MakingDone(String order_id) throws Exception; public void DeliveryStart(String order_id) throws Exception; }
[ "jaebul2006@naver.com" ]
jaebul2006@naver.com
6a84045231c1f0fccd2aaa63eaa5e310e63136c2
2efe3dc5b624721c6df32fccccbdc861dc26497a
/app/src/main/java/com/eshop/model/ProductImages.java
3b49a9691bba27fb8703201dee98decc596160fc
[]
no_license
mohanrajrajamani/eshop
3abf4650a606131bc0fabf5ffb9a9f219a673adf
bc5a6d9a72cf491c1240dd5054d464e049c433f0
refs/heads/master
2021-08-19T19:57:30.511216
2017-11-27T09:18:10
2017-11-27T09:18:10
112,174,327
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.eshop.model; /** * Created by Admin on 07-11-2017. */ public class ProductImages { public String getProduct_id() { return product_id; } public void setProduct_id(String product_id) { this.product_id = product_id; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } private String product_id; private String image; }
[ "android" ]
android
83d80c0d98e451e8ae88d18ea325ee58c0614d64
33c6dc24672642959f4ffdef30554b489ebfb166
/Model/Model.java
b49b414eb7d3aa4cfdbcbc8ff997385760756cbe
[]
no_license
FrankSmith22/JavaPong
c7625cae008e9592cf18f9e3220de30321d1c2e7
1eab35d3f66f917bf4daa95d11fcd4518320998f
refs/heads/master
2021-05-27T05:33:03.334345
2020-05-30T02:48:16
2020-05-30T02:48:16
254,224,499
1
0
null
null
null
null
UTF-8
Java
false
false
1,695
java
package Model; /*************************************** * Filename: Model.java * Short description: This class ... * @author Frank Smith, Honghao Wei, Luthfi Mohammed, Hunter Jones * @version 4/30/2020 ***************************************/ import java.util.Random; public class Model { private Score score; private LeftPaddleData leftPaddleData; private RightPaddleData rightPaddleData; private BallData ballData; public Model(){ score = new Score(); leftPaddleData = new LeftPaddleData(); // Calling empty constructor inits with some default values rightPaddleData = new RightPaddleData(); // Prefer to call using getHeight of FieldPanel ballData = new BallData(495, 275, randomXDir(), randomYDir(), 25, 25); } private int randomXDir(){ Random random = new Random(); int xDir = random.nextInt(7); if(xDir == 0 || xDir == 1 || xDir == 2 || xDir == 3){ randomXDir(); } else if(System.currentTimeMillis() % 2 == 0){ xDir = -xDir; } return xDir; } private int randomYDir(){ Random random = new Random(); int yDir = random.nextInt(7); if(yDir == 0 || yDir == 1 || yDir == 2){ randomYDir(); } else if(System.currentTimeMillis() % 2 == 0){ yDir = -yDir; } return yDir; } public Score getScore(){ return score; } public LeftPaddleData getLeftPaddle() { return leftPaddleData; } public RightPaddleData getRightPaddle() { return rightPaddleData; } public BallData getBall() { return ballData; } }
[ "fasvi6@gmail.com" ]
fasvi6@gmail.com
1fe3e185982ca9f012b087487b744737890c479e
b3b8aa17118ca531c575c0edad30ee9175cd0f34
/src/ch06/exam06/pack2/C.java
54fed4c7bd7b996651d9b6ca9619c6d7f0c5faeb
[]
no_license
jeeyani/JavaStudy
a37d678ff597be7bbecfff9564d05682d50c6134
65769ce16f519ed06a7b5dc256e33e091b0d766d
refs/heads/master
2023-02-15T10:34:58.023017
2021-01-15T09:03:03
2021-01-15T09:03:03
313,551,103
0
0
null
null
null
null
UTF-8
Java
false
false
284
java
package ch06.exam06.pack2; import ch06.exam06.pack1.*; public class C { //A a; // A클래스는 default제한자 이기 때문에 다른 패키지에서는 접근 불가능 B b; // B클래스는 public제한자이기 때문에 다른 패키지에서도 접근이 가능!! }
[ "74583344+jeeyani@users.noreply.github.com" ]
74583344+jeeyani@users.noreply.github.com
fbf2bd2d955848bafa08f94281aa71e3e3f0585b
5e2463d2d6ab5ff1e892c27e19eeed5c3d0502a5
/app/src/main/java/com/icetea09/demomaterialdesigncard/adapter/CardAdapter.java
bb6e80349f6a56e6fb2816fc9c920fe93fc53a23
[]
no_license
trinhlbk1991/DemoCardViewRecyclerView
6d4a5262645c914efd7c08a6befcbba83b0afcb5
16d488df2a043196e03a8bd8fbe32c0aa92f7d29
refs/heads/master
2020-12-24T16:31:50.147077
2016-05-14T10:41:08
2016-05-14T10:41:08
28,174,671
43
33
null
null
null
null
UTF-8
Java
false
false
2,390
java
package com.icetea09.demomaterialdesigncard.adapter; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.icetea09.demomaterialdesigncard.R; import com.icetea09.demomaterialdesigncard.entity.Movie; import java.util.ArrayList; import java.util.List; public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHolder> implements View.OnClickListener { private List<Movie> mItems; private Listener mListener; public CardAdapter(List<Movie> items, Listener listener) { if (items == null) { items = new ArrayList<>(); } mItems = items; mListener = listener; } @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()) .inflate(R.layout.recycler_view_card_item, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(ViewHolder viewHolder, int i) { Movie movie = mItems.get(i); viewHolder.tvMovie.setText(movie.name); viewHolder.imgThumbnail.setImageBitmap(movie.imageBitmap); if (mListener != null) { viewHolder.cardView.setOnClickListener(this); viewHolder.cardView.setTag(movie); } } @Override public int getItemCount() { return mItems.size(); } class ViewHolder extends RecyclerView.ViewHolder { public ImageView imgThumbnail; public TextView tvMovie; public CardView cardView; public ViewHolder(View itemView) { super(itemView); imgThumbnail = (ImageView) itemView.findViewById(R.id.img_thumbnail); tvMovie = (TextView) itemView.findViewById(R.id.tv_movie); cardView = (CardView) itemView.findViewById(R.id.card_view); } } @Override public void onClick(View v) { if (v instanceof CardView) { Movie movie = (Movie) v.getTag(); mListener.onItemClicked(movie); } } public List<Movie> getItems() { return mItems; } public interface Listener { void onItemClicked(Movie movie); } }
[ "phong.nguyen+trinh.le@eastagile.com" ]
phong.nguyen+trinh.le@eastagile.com
a1417bb1fed802236603b800f07aed8da3ced926
6c5ef5b4de384dcbfd271aa881eb31eb97c54c53
/main/webapp/src/main/java/com/kee/model/tables/pojos/Addresslibrary.java
13d460e27be04e84cd165a703feb6401bb1f9bba
[]
no_license
jinhang/KeeWebFrame
59805a213d857d12f7f90ab82dafce810ca27d5b
1e6a8206129a8a3204106ab864434db8299876a3
refs/heads/master
2021-01-10T09:11:13.127871
2016-02-03T04:15:32
2016-02-03T04:15:32
50,921,938
2
0
null
null
null
null
UTF-8
Java
false
false
3,812
java
/** * This class is generated by jOOQ */ package com.kee.model.tables.pojos; import java.io.Serializable; import javax.annotation.Generated; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) @Entity @Table(name = "addresslibrary", schema = "ewp") public class Addresslibrary implements Serializable { private static final long serialVersionUID = 448154028; private String addresslibraryid; private String provincial; private String city; private String district; private String address; private String userid; private Integer type; private String name; private String tel; private Integer isdel; private Integer isdefault; public Addresslibrary() {} public Addresslibrary(Addresslibrary value) { this.addresslibraryid = value.addresslibraryid; this.provincial = value.provincial; this.city = value.city; this.district = value.district; this.address = value.address; this.userid = value.userid; this.type = value.type; this.name = value.name; this.tel = value.tel; this.isdel = value.isdel; this.isdefault = value.isdefault; } public Addresslibrary( String addresslibraryid, String provincial, String city, String district, String address, String userid, Integer type, String name, String tel, Integer isdel, Integer isdefault ) { this.addresslibraryid = addresslibraryid; this.provincial = provincial; this.city = city; this.district = district; this.address = address; this.userid = userid; this.type = type; this.name = name; this.tel = tel; this.isdel = isdel; this.isdefault = isdefault; } @Id @Column(name = "addresslibraryid", unique = true, nullable = false, length = 32) public String getAddresslibraryid() { return this.addresslibraryid; } public void setAddresslibraryid(String addresslibraryid) { this.addresslibraryid = addresslibraryid; } @Column(name = "provincial", length = 32) public String getProvincial() { return this.provincial; } public void setProvincial(String provincial) { this.provincial = provincial; } @Column(name = "city", length = 32) public String getCity() { return this.city; } public void setCity(String city) { this.city = city; } @Column(name = "district", length = 32) public String getDistrict() { return this.district; } public void setDistrict(String district) { this.district = district; } @Column(name = "address", length = 256) public String getAddress() { return this.address; } public void setAddress(String address) { this.address = address; } @Column(name = "userid", length = 32) public String getUserid() { return this.userid; } public void setUserid(String userid) { this.userid = userid; } @Column(name = "type", precision = 10) public Integer getType() { return this.type; } public void setType(Integer type) { this.type = type; } @Column(name = "name", length = 32) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "tel", length = 64) public String getTel() { return this.tel; } public void setTel(String tel) { this.tel = tel; } @Column(name = "isdel", precision = 10) public Integer getIsdel() { return this.isdel; } public void setIsdel(Integer isdel) { this.isdel = isdel; } @Column(name = "isdefault", precision = 10) public Integer getIsdefault() { return this.isdefault; } public void setIsdefault(Integer isdefault) { this.isdefault = isdefault; } }
[ "18009267974@163.com" ]
18009267974@163.com
e50537f36bf84f593f3720360da1237b89dea2c1
2d3bde994c72d52183e9e2c80c4e8c9109267abe
/BuilderPattern/src/example/Client.java
6b38dec4e380c13c60d87c6e7271b9b1469f2d07
[]
no_license
wangchengming666/DesignPattern
1e96b16173302b7ec3ffce34a9bd4cc29dbe803f
3cf5701b5b52d2c6ed545123d10dc41002ac9a2e
refs/heads/master
2022-02-27T22:32:31.067185
2019-11-01T01:05:13
2019-11-01T01:05:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
package example; public class Client { public static void main(String[] srgs) { Director director = new Director(); Builder builder = new ConcreteBuilder(); director.Construct(builder); Computer computer = builder.GetComputer(); computer.Show(); } }
[ "634749869@qq.com" ]
634749869@qq.com
8adf457dbb247be4431f072c2d81113656bfd0cc
804cc60e09e78fa0d478aff6ab499acfe407bd98
/src/test/java/PageObjectTest.java
b823d6bef02d7c0309c7f97fd6fd2a020be8c80f
[]
no_license
AndrejsKolesnikovs/AirCompany
b578959457801aa3c3af3323eae73f57e89a0079
bcb3e7ead4d2e5042d9e99745b8e9001dc5cfd3f
refs/heads/master
2021-12-14T22:54:09.125467
2019-11-10T09:27:34
2019-11-10T09:27:34
219,301,639
0
0
null
2021-12-14T21:35:40
2019-11-03T13:01:08
Java
UTF-8
Java
false
false
797
java
import org.junit.jupiter.api.Test; import pages.*; public class PageObjectTest { private BaseFunc baseFunc = new BaseFunc(); public PageObjectTest() throws InterruptedException { } @Test public void poTest() { baseFunc.goToUrl("http://qaguru.lv:8089/tickets/"); HomePage homePage = new HomePage(baseFunc); homePage.selectFromAirport("RIX"); homePage.selectToAirport("MEL"); homePage.clickGoGoBtn(); RegDataPage regDataPage = new RegDataPage(baseFunc); regDataPage.clickBookBtn(); PlanePlacePage planePlacePage = new PlanePlacePage(baseFunc); planePlacePage.clickBookBtn(); /*RegSuccessPage regSuccessPage = new RegSuccessPage(baseFunc); regSuccessPage.equals();*/ } }
[ "andrejs.kolesnikovs.lv@gmail.com" ]
andrejs.kolesnikovs.lv@gmail.com
5b2b01298fc97ab0c7c5abf4d9323ff2586a9838
3efc0ba5c7543dda1ef5a1660ffaf0da598db131
/src/main/java/com/laskdjlaskdj12/twitch/twitch_chatbot_backend/Domain/DTO/UserInfoDTO.java
4c0b921ee0ee415286034af2bbee5f94d643e23b
[]
no_license
laskdjlaskdj12/viewerMatcherServer
0ba48a6805f055ca9dfd811df8c3d862bbcafe3c
b53221befd16e6b4e15333a0cfbe34ee0caf117e
refs/heads/master
2020-04-26T09:23:13.657955
2019-04-20T08:10:20
2019-04-20T08:10:20
173,453,672
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.laskdjlaskdj12.twitch.twitch_chatbot_backend.Domain.DTO; import lombok.Data; import javax.validation.constraints.NotNull; @Data public class UserInfoDTO { @NotNull private Long id; @NotNull private String name; }
[ "laskdjlaskdj12@gmail.com" ]
laskdjlaskdj12@gmail.com
265b86c5cc25f6af49b7ff1e5c29b7bc2f89c217
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/a431dfe358478db74f1ac7ab5bc9c433882e8223/before/ArgumentsValuesValidationInfo.java
78e172f52d9e107648aa92ad1f8cd71f408b44d7
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,497
java
/* * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.jetbrains.python.commandInterface.commandsWithArgs; import com.intellij.util.containers.hash.HashMap; import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.Map; /** * Information about {@link com.jetbrains.python.commandInterface.commandsWithArgs.Argument arguments} values validation * * @author Ilya.Kazakevich */ public final class ArgumentsValuesValidationInfo { /** * Validation with out of any error */ @NotNull static final ArgumentsValuesValidationInfo NO_ERROR = new ArgumentsValuesValidationInfo(Collections.<Integer, ArgumentValueError>emptyMap(), false); private final Map<Integer, ArgumentValueError> myPositionOfErrorArguments = new HashMap<Integer, ArgumentValueError>(); private final boolean myNotEnoughArguments; /** * @param positionOfErrorArguments map of [argument_position, its_value_error] * @param notEnoughArguments true if not enough arguments values provided (i.e. some required arg missed) */ ArgumentsValuesValidationInfo(@NotNull final Map<Integer, ArgumentValueError> positionOfErrorArguments, final boolean notEnoughArguments) { myPositionOfErrorArguments.putAll(positionOfErrorArguments); myNotEnoughArguments = notEnoughArguments; } /** * @return map of [argument_position, its_value_error] */ @NotNull Map<Integer, ArgumentValueError> getPositionOfErrorArguments() { return Collections.unmodifiableMap(myPositionOfErrorArguments); } /** * @return if not enough argument values provided (i.e. some required arg missed) */ boolean isNotEnoughArguments() { return myNotEnoughArguments; } /** * Type of argument value error. */ enum ArgumentValueError { /** * This argument is redundant */ EXCESS, /** * Argument has bad value */ BAD_VALUE } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
07f64b2ce77ecf061f1fcf25a393478ffaa4888a
7fc5a91d023f323db607cbd5dcf618c089561553
/src/main/java/pages/MainPage.java
e72bad45f0a481acf6cbf41b9aca9cbf93a48849
[]
no_license
Owenkvist/Esprow
5bc1432414eac48031c87ae6c29ddaaddc8f467c
05db49eb1efdefe562f92fe3f3df9387daf30756
refs/heads/main
2023-06-08T23:09:20.720990
2021-06-24T05:51:52
2021-06-24T05:51:52
379,582,772
0
0
null
null
null
null
UTF-8
Java
false
false
11,831
java
package pages; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; public class MainPage { WebDriver driver; Actions action; public MainPage(WebDriver driver) { this.driver = driver; } By sigInFieldButton = By.xpath("//a[@href='/auth/sign-in']"); By authEmail = By.xpath("//input[@name='email']"); By authPassword = By.xpath("//input[@name='password']"); By sigInButton = By.xpath("//button[text()='Sign In']"); By menuButton = By.xpath("//span[@class='sc-fzXfPg cysWNI']"); By subscriptionButton = By.xpath("//a[text()='Subscription']"); By addExchangeButton = By.xpath("//button[text()='Add Exchange']"); By protocolTypeButton = By.xpath("//div[@class='sc-LzLtn ioQLZb subscription-add-exchange-dialog-protocol-type']"); By fix42 = By.xpath("//div[text()='FIX 4.2']"); By fix43 = By.xpath("//div[text()='FIX 4.3']"); By fix44 = By.xpath("//div[text()='FIX 4.4']"); By fix50 = By.xpath("//div[text()='FIX 5.0']"); By fix50SP1 = By.xpath("//div[text()='FIX 5.0 SP1']"); By fix50SP2 = By.xpath("//div[text()='FIX 5.0 SP2']"); By numberOfSessionsButton = By.xpath("(//div[@class='sc-AykKC izHnre subscription-add-exchange-dialog-sessions']//div[@class='sc-LzLwq WefCk'])[2]"); By minusNumberOfSessionsButton = By.xpath("//div[@class='sc-AykKC izHnre subscription-add-exchange-dialog-sessions']//div[@class='sc-LzLwq WefCk']"); By addButton = By.xpath("//button[text()='Add']"); By typeHeader = By.xpath("//span[text()='Type:']/following::p[1]"); By plusButton = By.xpath("(//div[@class='sc-LzLwq WefCk'])[2]"); By payButton = By.xpath("//button[@class='sc-AykKE guaEXt subscription-confirm-button']"); By proceedToCheckoutButton = By.xpath("//span[@class='cb-button__text']"); By agreeToTermsOfService = By.xpath("//input[@id='tos_agreed']"); By paySubscribeButton = By.xpath("//span[@class='cb-button__text']"); By afterPayHeader = By.xpath("//a[text()='Go to exchanges']"); By firstSubscription = By.xpath("//label[@class='sc-LzLrk idGNXe']/input"); By deleteButton = By.xpath("//div[@class='sc-AykKC fzTngT subscription-restore-delete-buttons']//*[name()='svg']"); By confirmButton = By.xpath("//button[text()='Confirm']"); By anotherConfirmButton = By.xpath("//div[@class='sc-AykKC kUOSAq']/button[text()='Confirm']"); By deleteHeader = By.xpath("//h2[text()='Session Expired']"); By cancelButton = By.xpath("//button[text()='Cancel']"); By subscriptionHeader = By.xpath("//h1[text()='Subscription']"); By protocolSum = By.xpath("(//div[@class='sc-AykKC izHnre']/span)[2]"); By sessionsSum = By.xpath("(//div[@class='sc-AykKC izHnre']/span)[4]"); By totalSum = By.xpath("(//span[@class='sc-fzXfRa cIeZEc'])[2]"); public MainPage clickOnSigInFieldButton() { driver.findElement(sigInFieldButton).click(); return this; } public MainPage typeEmail(String email) { driver.findElement(authEmail).sendKeys(email); return this; } public MainPage typePassword(String password) { driver.findElement(authPassword).sendKeys(password); return this; } public MainPage clickOnSigInButton() { driver.findElement(sigInButton).click(); return this; } public MainPage sigIn(String email, String password) { this.clickOnSigInFieldButton(); this.typeEmail(email); this.typePassword(password); this.clickOnSigInButton(); return new MainPage(driver); } public MainPage clickOnMenuButton() { driver.findElement(menuButton).click(); return this; } public MainPage clickOnSubscriptionButton() { ((JavascriptExecutor) driver).executeScript( "arguments[0].click();", driver.findElement(subscriptionButton)); return this; } public MainPage clickOnAddExchangeButton() { ((JavascriptExecutor) driver).executeScript( "arguments[0].click();", driver.findElement(addExchangeButton)); return this; } public MainPage clickOnProtocolTypeButton() { driver.findElement(protocolTypeButton).click(); return this; } public MainPage clickOnFix42() { driver.findElement(fix42).click(); return this; } public MainPage clickOnFix43() { driver.findElement(fix43).click(); return this; } public MainPage clickOnFix44() { driver.findElement(fix44).click(); return this; } public MainPage clickOnFix50() { driver.findElement(fix50).click(); return this; } public MainPage clickOnFix50SP1() { driver.findElement(fix50SP1).click(); return this; } public MainPage clickOnFix50SP2() { driver.findElement(fix50SP2).click(); return this; } public MainPage clickOnNumberOfSessionsButton() { driver.findElement(numberOfSessionsButton).click(); return this; } public MainPage clickOnMinusNumberOfSessionsButton() { driver.findElement(minusNumberOfSessionsButton).click(); return this; } public MainPage clickOnAddButton() { driver.findElement(addButton).click(); return this; } public MainPage addFix42() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix42(); this.clickOnNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public MainPage addFix43() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix43(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public MainPage addFix44() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix44(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public MainPage addFix50() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix50(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnMinusNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public MainPage addFix50SP1() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix50SP1(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnMinusNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public MainPage addFix50SP2() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix50SP2(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnMinusNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnNumberOfSessionsButton(); this.clickOnMinusNumberOfSessionsButton(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } this.clickOnAddButton(); return new MainPage(driver); } public String getTypeHeader() { return driver.findElement(typeHeader).getText(); } public MainPage clickOnPlusButton() { driver.findElement(plusButton).click(); return this; } public MainPage clickOnPayButton() { driver.findElement(payButton).click(); return this; } public MainPage clickOnProceedToCheckoutButton() { driver.findElement(proceedToCheckoutButton).click(); return this; } public MainPage clickOnAgreeToTermsOfService() { driver.findElement(agreeToTermsOfService).click(); return this; } public MainPage clickOnPaySubscribeButton() { driver.findElement(paySubscribeButton).click(); return this; } public String getAfterPayHeader() { return driver.findElement(afterPayHeader).getText(); } public MainPage highlightFirstSubscription() { action = new Actions(driver); WebElement we = driver.findElement(firstSubscription); action.moveToElement(we).click().build().perform(); return this; } public MainPage clickOnConfirmButton() { driver.findElement(confirmButton).click(); return this; } public MainPage clickOnAnotherConfirmButton() { driver.findElement(anotherConfirmButton).click(); return this; } public MainPage clickOnCancelButton() { driver.findElement(cancelButton).click(); return this; } public MainPage clickOnDeleteButton() { action = new Actions(driver); WebElement we2 = driver.findElement(deleteButton); action.moveToElement(we2).click().build().perform(); this.clickOnConfirmButton(); this.clickOnAnotherConfirmButton(); return this; } public String getDeleteHeader() { return driver.findElement(deleteHeader).getText(); } public MainPage getCancel() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnCancelButton(); return new MainPage(driver); } public String getSubscriptionHeader() { return driver.findElement(subscriptionHeader).getText(); } public String getProtocolSum() { return driver.findElement(protocolSum).getText(); } public String getSessionsSum() { return driver.findElement(sessionsSum).getText(); } public String getTotalSum() { return driver.findElement(totalSum).getText(); } public MainPage totalCost() { this.clickOnMenuButton(); this.clickOnSubscriptionButton(); this.clickOnAddExchangeButton(); this.clickOnProtocolTypeButton(); this.clickOnFix42(); this.clickOnProtocolTypeButton(); return new MainPage(driver); } }
[ "ran.owen@rambler.ru" ]
ran.owen@rambler.ru
ee55064141c07afa54f88b9f12a08be05d7b0293
295e2afe5bad5336f81e9423d17fcfa1ea606285
/jfinaldemo/src/main/java/com/znima/entity/Novel.java
1156cadd95a77d7523fd89d28cdb45463d6dfd12
[]
no_license
long655113/jfinaldemo
45e467b2a7296a9323f674fb24c8d0cdcb4577e7
d8372d37afa5cef653820e12280ed07914d3c052
refs/heads/master
2022-09-19T16:35:23.380740
2019-07-08T16:01:36
2019-07-08T16:01:36
123,157,206
0
0
null
2022-09-01T22:17:17
2018-02-27T16:32:53
Java
UTF-8
Java
false
false
4,423
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.znima.entity; import com.jfinal.plugin.activerecord.Model; import com.jfinal.plugin.activerecord.Page; import com.znima.ModelUtil; import java.util.Date; import java.util.List; import java.util.Map; /** * * @author Administrator */ public class Novel extends Model<Novel> { private Integer id; private String novelName; private String desc; private String author; private String image; private Date createTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNovelName() { return novelName; } public void setNovelName(String novelName) { this.novelName = novelName; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public static final Novel dao = new Novel(); public Novel toBean() { Novel item = this; item.id = item.get("id"); item.novelName = item.get("novelName"); item.desc = item.get("desc"); item.author = item.get("author"); item.image = item.get("image"); item.createTime = item.get("createTime"); return item; } public List<Novel> getNovels() { List<Novel> novels = Novel.dao.find("SELECT id,novelName,`desc`,author,image,createTime FROM `novel` "); for (Novel item : novels) { item.toBean(); } return novels; } /** * 查询章节列表,不带章节内容 * @return */ public List<NovelItem> getNovelItems() { List<NovelItem> list = NovelItem.dao.find("SELECT id,url,title, createTime, file_length FROM `novelItem` WHERE novelId=" + get("id") + " order by id"); for (NovelItem item : list) { item.toBean(); } return list; } /** * 查询章节列表,不带章节内容 * @param page * @param sortType * @return */ public Page<NovelItem> getNovelItemsPage(Integer page, String sortType) { if (page == null) { page = 1; } return NovelItem.dao.paginate(page, 100, "SELECT id,url,title, createTime ", "FROM `novelItem` WHERE novelId=" + get("id") + " order by id " + sortType); } /** * 查询章节列表,包含章节内容 * @return */ public List<NovelItem> getNovelItemsWithContent() { List<NovelItem> list = NovelItem.dao.find("SELECT id,url,title, contentFile, createTime FROM `novelItem` WHERE novelId=" + get("id") + " order by id"); for (NovelItem item : list) { item.toBean(); } return list; } public NovelItem getLastestItem() { NovelItem item = NovelItem.dao.findFirst("SELECT id,url,title, contentFile, createTime FROM `novelItem` WHERE novelId=" + get("id") + " order by id desc limit 0,1"); return item; } public List<Map<String, Object>> getUndownloadNovelItems() { List<NovelItem> list = NovelItem.dao.find("SELECT id,url,title,createTime FROM `novelItem` WHERE contentFile is null and novelId=" + get("id") + " order by id"); for (NovelItem item : list) { item.toBean(); } return ModelUtil.modelToMap(list); } public boolean deleteByNovelId(Integer novelId) { boolean result = Novel.dao.deleteById(novelId); return result; } @Override public String toString() { return "Novel{" + "id=" + id + ", novelName=" + novelName + ", desc=" + desc + ", author=" + author + ", image=" + image + ", createTime=" + createTime + '}'; } }
[ "857073226@qq.com" ]
857073226@qq.com
22ca712a9ab99deb50df7fe3c3544c87f36887da
db6f2458ed4df2041b9884cb568f3817e14b34fe
/sorting/src/sortingalgos/others/Sort01.java
1c288d46d44ad84663d3bc27b56c46abf7625e73
[]
no_license
vaibhav050690/preparation
25eb1fe2d3b6e590e13517659b7df8af56e5925c
f076c1382cf0bc6ede4999642143d6c4637bed5a
refs/heads/master
2020-03-25T18:48:09.838775
2019-05-28T16:47:02
2019-05-28T16:47:02
144,049,111
1
1
null
null
null
null
UTF-8
Java
false
false
1,700
java
package sortingalgos.others; /* You are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array. Traverse array only once. Input array = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0] Output array = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] Method 1 (Count 0s or 1s) 1) Count the number of 0s. Let count be C. 2) Once we have count, we can put C 0s at the beginning and 1s at the remaining n – C positions in array. The method 1 traverses the array two times. Method 2 does the same in a single pass. Method 2 (Use two indexes to traverse) Maintain two indexes. Initialize first index left as 0 and second index right as n-1. Do following while left < right a) Keep incrementing index left while there are 0s at it b) Keep decrementing index right while there are 1s at it c) If left < right then exchange arr[left] and arr[right] */ public class Sort01 { public static void sort(int[] arr){ int n = arr.length; int low = 0; int high = n-1; while (low < high){ while (arr[low] == 0){ low++; } while (arr[high] == 1){ high--; } if(low < high){ int temp = arr[low]; arr[low] = arr[high]; arr[high] = temp; } } } static void printArray(int arr[], int arr_size) { int i; for (i = 0; i < arr_size; i++) System.out.print(arr[i]+" "); System.out.println(""); } public static void main(String[] args) { int arr[] = new int[]{0, 1, 0, 1, 1, 1}; sort(arr); printArray(arr,arr.length); } }
[ "vaibhav.mishra@redbus.in" ]
vaibhav.mishra@redbus.in
4e7d44ed6a97c2ee5f853e1d6b4cbdda18cdc7bc
323ca94c8945e8198275f1ef627328174ddd6b83
/src/main/java/org/filmticketorderingsystem/generator/OrderVerifiCodeGenerator.java
8d85f89fdefc321b6d0ccb31b9b997fe9bc39872
[ "Apache-2.0" ]
permissive
vtfate/FilmTicketOrderingSystem
8acf48283906ec4ca2d471e592bdca556fa99fa5
5d19c39917cb94173ca408a47075defd77bcc5c7
refs/heads/master
2022-12-20T16:49:22.721921
2020-09-15T08:59:25
2020-09-15T08:59:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,844
java
package org.filmticketorderingsystem.generator; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; /** * Created by ���� on 2016/5/12. * 订单验证码生成器,=年月日+秒数(5位,一天够用)+3位流水号 */ public class OrderVerifiCodeGenerator { private static OrderVerifiCodeGenerator generator = new OrderVerifiCodeGenerator(); //自认为同一时刻不会超过1000张订单数 private static final int MAX_SERIAL_NUMBER = 1000; private static final int MAX_SEC = 99999; //大于1000的话,可以利用5位数的最大值99999-一天的最大秒数86400的空间 //记录当前在 最大值99999-一天的最大秒数86400的空间 借到的开始值 private int now_borrow = MAX_SEC_OF_DAY; //一天总秒数 private static final int MAX_SEC_OF_DAY = 24 * 60 * 60;//86400 //记录每个时刻的流水号 private Map<Integer, Integer> sec2SerialNumber = new HashMap<Integer, Integer>(); private SimpleDateFormat dateFormator = new SimpleDateFormat("yyyyMMdd"); private DecimalFormat secFormator = new DecimalFormat("00000"); private DecimalFormat serialNumFormator = new DecimalFormat("000"); private OrderVerifiCodeGenerator() { for(int i = 0; i < MAX_SEC; i++){ sec2SerialNumber.put(i, 0); } } public static OrderVerifiCodeGenerator getGenerator(){ if(generator != null){ synchronized (generator){ if(generator != null){ return generator; } else{ generator = new OrderVerifiCodeGenerator(); } } } return null; } public String generate(Date now){ String nowStr = dateFormator.format(now); Calendar calendar = new GregorianCalendar(); calendar.setTime(now);//转换现在的时间 int sec = calendar.get(Calendar.SECOND); int minute = calendar.get(Calendar.MINUTE); int hour = calendar.get(Calendar.HOUR_OF_DAY); //把当前时刻转换成一天中的秒数形式 int secOfDay = getSecondOfDay(hour, minute, sec); String secOfDayStr = secFormator.format(secOfDay); int serialNumber = -1; synchronized (sec2SerialNumber){ if(sec2SerialNumber.get(secOfDay) >= MAX_SERIAL_NUMBER){ //大于1000的话,可以利用5位数的最大值99999-一天的最大秒数86400的空间 //取一天中秒数的最大值来开始尝试借空间 int borrow = this.now_borrow; if(sec2SerialNumber.get(borrow) >= MAX_SERIAL_NUMBER){ borrow ++; } //记录该借的空间位置值,以便于不用老是重新开始 this.now_borrow = borrow; serialNumber = sec2SerialNumber.get(borrow); sec2SerialNumber.put(borrow, serialNumber + 1); } else{ serialNumber = sec2SerialNumber.get(secOfDay); sec2SerialNumber.put(secOfDay, serialNumber + 1); } } if(serialNumber != -1){ String serialNumberStr = serialNumFormator.format(serialNumber); return nowStr + secOfDayStr + serialNumberStr; } return null; } public boolean clear(){ boolean flag = false; this.now_borrow = MAX_SEC_OF_DAY; synchronized (sec2SerialNumber){ for(int i = 0; i < MAX_SEC; i++){ sec2SerialNumber.put(i, 0); } flag = true; } return flag; } private Integer getSecondOfDay(int hour, int minute, int second){ return hour*60*60 + minute * 60 + second; } }
[ "18814127639@163.com" ]
18814127639@163.com
33ce6811aa70402044159fade5604eb65f278363
a454eb47350c0846c87546aacdd8a8db539d7ec7
/ccs-batch/src/main/java/com/sunline/ccs/batch/cc6000/P6012PointsPosting.java
0ba204e1601a45abecd4414783cfeee729042d3e
[]
no_license
soldiers1989/guomei-code
a4cf353501419a620c0ff2b9d1f7009168a9ae5c
ebb85e52012c58708d3b19ee967944afae10ad87
refs/heads/master
2020-03-27T19:34:29.293383
2016-06-18T06:52:16
2016-06-18T06:53:43
146,998,057
0
1
null
2018-09-01T12:52:12
2018-09-01T12:52:12
null
UTF-8
Java
false
false
4,368
java
package com.sunline.ccs.batch.cc6000; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.item.ItemProcessor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.sunline.ppy.dictionary.enums.DbCrInd; import com.sunline.ppy.dictionary.enums.Indicator; import com.sunline.ppy.dictionary.enums.PostTxnType; import com.sunline.ppy.dictionary.enums.PostingFlag; import com.sunline.ppy.dictionary.report.ccs.TxnPointsRptItem; import com.sunline.pcm.service.sdk.UnifiedParameterFacility; import com.sunline.ccs.batch.cc6000.common.LogicalModuleExecutor; import com.sunline.ccs.facility.BlockCodeUtils; import com.sunline.ccs.infrastructure.shared.model.CcsPostingTmp; import com.sunline.ccs.param.def.MccCtrl; import com.sunline.ccs.param.def.TxnCd; import com.sunline.ccs.param.def.enums.LogicMod; /** * @see 类名:P6012PointsPosting * @see 描述: 交易积分入账 * 范围:需要累计积分的交易(TXN_CODE【交易码参数表】;MCC_CTL【MCC参数控制表】;BLOCK_CD【锁定码参数表】) * * @see 创建日期: 2015-6-24上午10:05:43 * @author ChengChun * * @see 修改记录: * @see [编号:日期_设计来源],[修改人:***],[方法名:***] */ @Component public class P6012PointsPosting implements ItemProcessor<S6000AcctInfo, S6000AcctInfo> { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private UnifiedParameterFacility parameterFacility; @Autowired private BlockCodeUtils blockCodeUtils; @Autowired private LogicalModuleExecutor logicalModuleExecutor; @Override public S6000AcctInfo process(S6000AcctInfo item) throws Exception { if (logger.isDebugEnabled()) { logger.debug("交易积分入账:Org["+item.getAccount().getOrg() +"],AcctType["+item.getAccount().getAcctType() +"],AcctNo["+item.getAccount().getAcctNbr() +"],TxnPost.size["+item.getTxnPosts().size() +"]"); } // 有锁定码指示不做积分的帐户,则所有交易不去积分 if (!blockCodeUtils.getMergedPointEarnInd(item.getAccount().getBlockCode())) return item; for (CcsPostingTmp txnPost : item.getTxnPosts()) { // 交易码参数 TxnCd txnCd = parameterFacility.loadParameter(txnPost.getTxnCode(), TxnCd.class); // 金融交易累计积分 if(txnPost.getPostTxnType()==PostTxnType.M // 锁定码指示判断累计积分 && blockCodeUtils.getMergedPointEarnInd(txnPost.getCardBlockCode()) // 成功入账交易累计积分 && txnPost.getPostingFlag() == PostingFlag.F00 // 交易码参数设定判断累计积分 && txnCd.bonusPntInd == Indicator.Y){ // MCC参数设定判断累计积分. 若MCC不存在, 默认累计积分 MccCtrl mcc = parameterFacility.retrieveParameterObject(txnPost.getMcc()+"|CUP", MccCtrl.class); if (mcc != null && !mcc.bonusPntInd) continue; // 积分入账(61:积分增加; 62:积分减少; 63:积分兑换) if (DbCrInd.D == txnCd.logicMod.getDbCrInd()) { // 积分交易入账:61:积分增加;62:积分减少;63:积分兑换 logicalModuleExecutor.executeLogicalModule(LogicMod.L61, item, txnPost, null); } else if (DbCrInd.C == txnCd.logicMod.getDbCrInd()) { // 积分交易入账:61:积分增加;62:积分减少;63:积分兑换 logicalModuleExecutor.executeLogicalModule(LogicMod.L62, item, txnPost, null); } // 增加内部生成积分交易报表 this.generateTxnPoints(item, txnPost); } } return item; } /** * 内部生成积分交易报表 * @param item * @param txnPost * @param point 交易积分 */ public void generateTxnPoints(S6000AcctInfo item, CcsPostingTmp txnPost) { TxnPointsRptItem txnPoints = new TxnPointsRptItem(); txnPoints.org = item.getAccount().getOrg(); txnPoints.acctNo = item.getAccount().getAcctNbr(); txnPoints.acctType = item.getAccount().getAcctType(); txnPoints.cardNo = txnPost.getCardNbr(); txnPoints.txnDate = txnPost.getTxnDate(); txnPoints.txnTime = txnPost.getTxnTime(); txnPoints.txnCode = txnPost.getTxnCode(); txnPoints.glPostAmt = txnPost.getPostAmt(); txnPoints.refNbr = txnPost.getRefNbr(); txnPoints.point = txnPost.getPoints(); item.getTxnPointss().add(txnPoints); } }
[ "yuemk@sunline" ]
yuemk@sunline
26bc9915f7ff569df73d426325eea2e6abf9c937
7cee2d4f78b8b2b6bfe5520a735d061df292c6fd
/src/main/java/hello/hellospring/repository/MemoryMemberRepository.java
aad89ad9ea021c41878f9aaacc289e981cb08fcf
[]
no_license
Ohyaelim/hello-spring
2d7b14290055ce3406f5d3b47dc6329a6ccce75e
4a9d375e95082477e03b78450dc649330a0071f5
refs/heads/main
2023-02-14T00:24:50.183918
2021-01-15T12:49:29
2021-01-15T12:49:29
327,955,885
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package hello.hellospring.repository; import hello.hellospring.domain.Member; import org.springframework.stereotype.Repository; import java.util.*; public class MemoryMemberRepository implements MemberRepository{ private static Map<Long, Member> store = new HashMap<>(); private static Long sequence = 0L; @Override public Member save(Member member) { member.setId(++sequence); store.put(member.getId(), member); return null; } @Override public Optional<Member> findById(Long id) { return Optional.ofNullable(store.get(id)); } @Override public Optional<Member> findByName(String name) { return store.values().stream() .filter(member -> member.getName().equals(name)) .findAny(); } @Override public List<Member> findAll() { return new ArrayList<>(store.values()); } public void clearStore(){ store.clear(); } }
[ "npr05080@gmail.com" ]
npr05080@gmail.com
cd0a0a4121ad72c2c92aeaf004e8a066d1f90136
4e0bcadf7eddbc2efa75ad31ee29f64b6ccd93ea
/src/com/util/ResultInfo.java
2fc7f480d478758f7c75ad7d3772a43ddbef81f4
[]
no_license
jaychouuu/Ysl
6554adb8ae6a5778f486be09a2b6f3a7e3e751a6
0606a199f35b8d8b23fcedd53f2332155b43ebaf
refs/heads/master
2020-08-09T21:04:41.860816
2019-10-10T12:53:11
2019-10-10T12:53:11
214,174,251
1
0
null
null
null
null
UTF-8
Java
false
false
508
java
package com.util; import java.io.Serializable; public class ResultInfo implements Serializable { private boolean flag; private String message; private Object data; public Object getData() { return data; } public void setData(Object data) { this.data = data; } public boolean isFlag() { return flag; } public void setFlag(boolean flag) { this.flag = flag; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "aiv61@qq.com" ]
aiv61@qq.com
4f2d827ca47325d45de4aa4bf0b444932240f4dd
d157ef50d6cb02bd9ca00bfaadb5865d1fc5b76d
/appengine/src/main/java/org/retrostore/resources/CachingImageService.java
b868c6830705e9c75293d8407c5183ab588f14c8
[ "Apache-2.0" ]
permissive
jeffv03/retrostore
d93c6ab2e31cbe48c3d58928df4948f9c1dc38cc
27af41dfe0a5e0f7e28db24700bdcf7c5d975e1a
refs/heads/master
2021-07-09T09:30:54.321911
2017-10-07T06:18:11
2017-10-07T06:18:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,247
java
/* * Copyright 2017, Sascha Häberling * * 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.retrostore.resources; import com.google.common.base.Optional; import java.util.HashMap; import java.util.Locale; import java.util.Map; /** * Image service caching layer around an actual image service. */ public class CachingImageService implements ImageServiceWrapper { private final ImageServiceWrapper mImageService; private final MemcacheWrapper mMemcacheService; private final Map<String, String> mMemoryCache; public CachingImageService(ImageServiceWrapper imageService, MemcacheWrapper memcacheService) { mImageService = imageService; mMemcacheService = memcacheService; mMemoryCache = new HashMap<>(); } @Override public Optional<String> getServingUrl(String blobKey, int imageSize) { String key = key(blobKey, imageSize); if (mMemoryCache.containsKey(key)) { return Optional.of(mMemoryCache.get(key)); } Optional<String> urlOpt = mMemcacheService.getString(key); if (urlOpt.isPresent()) { mMemoryCache.put(key, urlOpt.get()); return urlOpt; } // It's not in any cache. Optional<String> servingUrl = mImageService.getServingUrl(blobKey, imageSize); if (!servingUrl.isPresent()) { return Optional.absent(); } mMemcacheService.put(key, servingUrl.get()); mMemoryCache.put(key, servingUrl.get()); return servingUrl; } @Override public Optional<String> getServingUrl(String blobKey) { return getServingUrl(blobKey, DEFAULT_SCREENSHOT_SIZE); } private static String key(String blobKey, int imageSize) { return String.format(Locale.US, "screenshot_url_%s-%d", blobKey, imageSize); } }
[ "mail@sascha-haeberling.com" ]
mail@sascha-haeberling.com
2715c617340c67e1aae1cc44fc76641bc405b100
dd66f580d332e4fbfc69f9c828c5dab7ddaa8d63
/demos/substance-demo/src/main/java/org/pushingpixels/demo/substance/main/check/svg/filetypes/ext_adn.java
4502d4645c268c659442fcacca606f514216dcf0
[ "BSD-3-Clause" ]
permissive
spslinger/radiance
44f06d939afc3e27c0d4997b2fd89a27aff39fdf
7cf51ee22014df1368c04f5f9f6ecbea93695231
refs/heads/master
2020-03-31T18:00:48.170702
2018-10-11T12:49:29
2018-10-11T12:49:29
152,442,895
0
0
BSD-3-Clause
2018-10-11T12:49:31
2018-10-10T15:04:46
Java
UTF-8
Java
false
false
20,609
java
package org.pushingpixels.demo.substance.main.check.svg.filetypes; import java.awt.*; import java.awt.geom.*; import javax.swing.plaf.UIResource; import org.pushingpixels.neon.icon.IsHiDpiAware; import org.pushingpixels.neon.icon.ResizableIcon; import org.pushingpixels.neon.icon.NeonIcon; import org.pushingpixels.neon.icon.NeonIconUIResource; /** * This class has been automatically generated using <a * href="https://github.com/kirill-grouchnikov/radiance">Photon SVG transcoder</a>. */ public class ext_adn implements ResizableIcon, IsHiDpiAware { @SuppressWarnings("unused") private void innerPaint(Graphics2D g) { Shape shape = null; Paint paint = null; Stroke stroke = null; float origAlpha = 1.0f; Composite origComposite = g.getComposite(); if (origComposite instanceof AlphaComposite) { AlphaComposite origAlphaComposite = (AlphaComposite)origComposite; if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) { origAlpha = origAlphaComposite.getAlpha(); } } AffineTransform defaultTransform_ = g.getTransform(); // g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0 = g.getTransform(); g.transform(new AffineTransform(0.009999999776482582f, 0.0f, 0.0f, 0.009999999776482582f, 0.13999999687075615f, -0.0f)); // _0 g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0 paint = new LinearGradientPaint(new Point2D.Double(36.0, 101.0), new Point2D.Double(36.0, 3.003999948501587), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(45.1, 1.0); ((GeneralPath)shape).lineTo(72.3, 27.7); ((GeneralPath)shape).lineTo(72.3, 99.0); ((GeneralPath)shape).lineTo(-0.2, 99.0); ((GeneralPath)shape).lineTo(-0.2, 1.0); ((GeneralPath)shape).lineTo(45.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_1 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_1 paint = new Color(0, 0, 0, 0); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(45.1, 1.0); ((GeneralPath)shape).lineTo(72.3, 27.7); ((GeneralPath)shape).lineTo(72.3, 99.0); ((GeneralPath)shape).lineTo(-0.2, 99.0); ((GeneralPath)shape).lineTo(-0.2, 1.0); ((GeneralPath)shape).lineTo(45.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(160, 53, 55, 255); stroke = new BasicStroke(2.0f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(45.1, 1.0); ((GeneralPath)shape).lineTo(72.3, 27.7); ((GeneralPath)shape).lineTo(72.3, 99.0); ((GeneralPath)shape).lineTo(-0.2, 99.0); ((GeneralPath)shape).lineTo(-0.2, 1.0); ((GeneralPath)shape).lineTo(45.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_1); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_2 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_2 paint = new Color(255, 255, 255, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(26.1, 91.1); ((GeneralPath)shape).lineTo(21.7, 91.1); ((GeneralPath)shape).lineTo(19.900002, 86.6); ((GeneralPath)shape).lineTo(11.800001, 86.6); ((GeneralPath)shape).lineTo(10.100001, 91.1); ((GeneralPath)shape).lineTo(5.8, 91.1); ((GeneralPath)shape).lineTo(13.700001, 71.3); ((GeneralPath)shape).lineTo(18.0, 71.3); ((GeneralPath)shape).lineTo(26.1, 91.100006); ((GeneralPath)shape).closePath(); ((GeneralPath)shape).moveTo(18.6, 83.2); ((GeneralPath)shape).lineTo(15.8, 75.799995); ((GeneralPath)shape).lineTo(13.1, 83.2); ((GeneralPath)shape).lineTo(18.6, 83.2); ((GeneralPath)shape).closePath(); ((GeneralPath)shape).moveTo(28.2, 71.2); ((GeneralPath)shape).lineTo(35.600002, 71.2); ((GeneralPath)shape).curveTo(37.300003, 71.2, 38.600002, 71.299995, 39.4, 71.6); ((GeneralPath)shape).curveTo(40.600002, 71.9, 41.600002, 72.6, 42.4, 73.4); ((GeneralPath)shape).curveTo(43.2, 74.200005, 43.9, 75.3, 44.300003, 76.6); ((GeneralPath)shape).curveTo(44.700005, 77.9, 45.000004, 79.4, 45.000004, 81.299995); ((GeneralPath)shape).curveTo(45.000004, 82.899994, 44.800003, 84.299995, 44.400005, 85.49999); ((GeneralPath)shape).curveTo(43.900005, 86.899994, 43.200005, 88.09999, 42.200005, 88.99999); ((GeneralPath)shape).curveTo(41.500004, 89.69999, 40.500004, 90.19999, 39.300003, 90.59999); ((GeneralPath)shape).curveTo(38.4, 90.899994, 37.200005, 90.99999, 35.700005, 90.99999); ((GeneralPath)shape).lineTo(28.0, 90.99999); ((GeneralPath)shape).lineTo(28.0, 71.2); ((GeneralPath)shape).closePath(); ((GeneralPath)shape).moveTo(32.3, 74.6); ((GeneralPath)shape).lineTo(32.3, 87.7); ((GeneralPath)shape).lineTo(35.3, 87.7); ((GeneralPath)shape).curveTo(36.399998, 87.7, 37.3, 87.6, 37.8, 87.5); ((GeneralPath)shape).curveTo(38.5, 87.3, 39.0, 87.1, 39.399998, 86.7); ((GeneralPath)shape).curveTo(39.799995, 86.299995, 40.199997, 85.7, 40.499996, 84.799995); ((GeneralPath)shape).curveTo(40.799995, 83.899994, 40.899998, 82.7, 40.899998, 81.2); ((GeneralPath)shape).curveTo(40.899998, 79.7, 40.8, 78.5, 40.499996, 77.7); ((GeneralPath)shape).curveTo(40.199993, 76.899994, 39.799995, 76.2, 39.299995, 75.799995); ((GeneralPath)shape).curveTo(38.799995, 75.299995, 38.199997, 74.99999, 37.399994, 74.899994); ((GeneralPath)shape).curveTo(36.799995, 74.799995, 35.699993, 74.7, 34.099995, 74.7); ((GeneralPath)shape).lineTo(32.299995, 74.7); ((GeneralPath)shape).closePath(); ((GeneralPath)shape).moveTo(48.6, 91.1); ((GeneralPath)shape).lineTo(48.6, 71.2); ((GeneralPath)shape).lineTo(52.6, 71.2); ((GeneralPath)shape).lineTo(60.899998, 84.399994); ((GeneralPath)shape).lineTo(60.899998, 71.2); ((GeneralPath)shape).lineTo(64.7, 71.2); ((GeneralPath)shape).lineTo(64.7, 91.0); ((GeneralPath)shape).lineTo(60.6, 91.0); ((GeneralPath)shape).lineTo(52.5, 78.1); ((GeneralPath)shape).lineTo(52.5, 91.0); ((GeneralPath)shape).lineTo(48.6, 91.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_2); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_3 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_3 paint = new Color(242, 242, 242, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(54.0, 48.1); ((GeneralPath)shape).curveTo(54.0, 50.6, 45.9, 52.6, 36.0, 52.6); ((GeneralPath)shape).curveTo(26.099998, 52.6, 18.0, 50.6, 18.0, 48.1); ((GeneralPath)shape).curveTo(18.0, 45.6, 26.1, 43.6, 36.0, 43.6); ((GeneralPath)shape).curveTo(45.9, 43.6, 54.0, 45.6, 54.0, 48.1); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_3); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_4 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_4 paint = new LinearGradientPaint(new Point2D.Double(28.972000122070312, 47.22200012207031), new Point2D.Double(43.02799987792969, 61.27799987792969), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(49.5, 47.8); ((GeneralPath)shape).curveTo(49.5, 50.0, 43.5, 51.7, 36.0, 51.7); ((GeneralPath)shape).curveTo(28.5, 51.7, 22.5, 50.0, 22.5, 47.8); ((GeneralPath)shape).curveTo(22.5, 45.6, 28.5, 43.899998, 36.0, 43.899998); ((GeneralPath)shape).curveTo(43.5, 43.899998, 49.5, 45.6, 49.5, 47.8); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_4); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_5 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_5 paint = new LinearGradientPaint(new Point2D.Double(18.0, 45.900001525878906), new Point2D.Double(54.0, 45.900001525878906), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(18.0, 48.3); ((GeneralPath)shape).lineTo(18.0, 59.5); ((GeneralPath)shape).curveTo(18.0, 59.5, 22.5, 64.0, 36.0, 64.0); ((GeneralPath)shape).curveTo(49.5, 64.0, 54.0, 59.5, 54.0, 59.5); ((GeneralPath)shape).lineTo(54.0, 48.3); ((GeneralPath)shape).curveTo(54.0, 48.3, 51.8, 52.2, 36.0, 52.5); ((GeneralPath)shape).curveTo(20.2, 52.8, 18.0, 48.3, 18.0, 48.3); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_5); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_6 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_6 paint = new Color(242, 242, 242, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(54.0, 32.3); ((GeneralPath)shape).curveTo(54.0, 34.8, 45.9, 36.8, 36.0, 36.8); ((GeneralPath)shape).curveTo(26.099998, 36.8, 18.0, 34.8, 18.0, 32.3); ((GeneralPath)shape).curveTo(18.0, 29.8, 26.1, 27.8, 36.0, 27.8); ((GeneralPath)shape).curveTo(45.9, 27.8, 54.0, 29.8, 54.0, 32.3); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_6); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_7 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_7 paint = new LinearGradientPaint(new Point2D.Double(28.95400047302246, 63.00400161743164), new Point2D.Double(43.0099983215332, 77.05999755859375), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(49.5, 31.9); ((GeneralPath)shape).curveTo(49.5, 34.1, 43.5, 35.8, 36.0, 35.8); ((GeneralPath)shape).curveTo(28.5, 35.8, 22.5, 34.1, 22.5, 31.9); ((GeneralPath)shape).curveTo(22.5, 29.7, 28.5, 28.0, 36.0, 28.0); ((GeneralPath)shape).curveTo(43.5, 28.1, 49.5, 29.8, 49.5, 31.9); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_7); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_8 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_8 paint = new LinearGradientPaint(new Point2D.Double(18.0, 61.599998474121094), new Point2D.Double(54.0, 61.599998474121094), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(18.0, 32.6); ((GeneralPath)shape).lineTo(18.0, 43.8); ((GeneralPath)shape).curveTo(18.0, 43.8, 22.5, 48.3, 36.0, 48.3); ((GeneralPath)shape).curveTo(49.5, 48.3, 54.0, 43.8, 54.0, 43.8); ((GeneralPath)shape).lineTo(54.0, 32.6); ((GeneralPath)shape).curveTo(54.0, 32.6, 51.8, 36.5, 36.0, 36.8); ((GeneralPath)shape).curveTo(20.2, 37.1, 18.0, 32.6, 18.0, 32.6); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_8); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_9 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_9 paint = new Color(255, 255, 255, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(54.0, 16.6); ((GeneralPath)shape).curveTo(54.0, 19.1, 45.9, 21.1, 36.0, 21.1); ((GeneralPath)shape).curveTo(26.099998, 21.1, 18.0, 19.1, 18.0, 16.6); ((GeneralPath)shape).curveTo(18.0, 14.1, 26.1, 12.1, 36.0, 12.1); ((GeneralPath)shape).curveTo(45.9, 12.1, 54.0, 14.1, 54.0, 16.6); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_9); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_10 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_10 paint = new LinearGradientPaint(new Point2D.Double(28.972000122070312, 78.72200012207031), new Point2D.Double(43.02799987792969, 92.77799987792969), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(49.5, 16.3); ((GeneralPath)shape).curveTo(49.5, 18.5, 43.5, 20.199999, 36.0, 20.199999); ((GeneralPath)shape).curveTo(28.5, 20.199999, 22.5, 18.499998, 22.5, 16.3); ((GeneralPath)shape).curveTo(22.5, 14.1, 28.5, 12.4, 36.0, 12.4); ((GeneralPath)shape).curveTo(43.5, 12.4, 49.5, 14.099999, 49.5, 16.3); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_10); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_11 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_11 paint = new LinearGradientPaint(new Point2D.Double(18.0, 77.4000015258789), new Point2D.Double(54.0, 77.4000015258789), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(18.0, 16.8); ((GeneralPath)shape).lineTo(18.0, 28.0); ((GeneralPath)shape).curveTo(18.0, 28.0, 22.5, 32.5, 36.0, 32.5); ((GeneralPath)shape).curveTo(49.5, 32.5, 54.0, 28.0, 54.0, 28.0); ((GeneralPath)shape).lineTo(54.0, 16.8); ((GeneralPath)shape).curveTo(54.0, 16.8, 51.8, 20.699999, 36.0, 21.0); ((GeneralPath)shape).curveTo(20.2, 21.3, 18.0, 16.8, 18.0, 16.8); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_11); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_12 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_12 paint = new LinearGradientPaint(new Point2D.Double(45.178001403808594, 74.15899658203125), new Point2D.Double(58.77199935913086, 87.75299835205078), new float[] {0.0f,0.637f,1.0f}, new Color[] {new Color(255, 254, 238, 255),new Color(207, 159, 160, 255),new Color(160, 53, 55, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 102.0f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(45.1, 1.0); ((GeneralPath)shape).lineTo(72.3, 27.7); ((GeneralPath)shape).lineTo(45.1, 27.7); ((GeneralPath)shape).lineTo(45.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_12); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_13 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_13 paint = new Color(0, 0, 0, 0); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(44.1, 1.0); ((GeneralPath)shape).lineTo(71.3, 27.7); ((GeneralPath)shape).lineTo(44.1, 27.7); ((GeneralPath)shape).lineTo(44.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(160, 53, 55, 255); stroke = new BasicStroke(2.0f,0,2,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(44.1, 1.0); ((GeneralPath)shape).lineTo(71.3, 27.7); ((GeneralPath)shape).lineTo(44.1, 27.7); ((GeneralPath)shape).lineTo(44.1, 1.0); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_13); g.setTransform(defaultTransform__0); g.setTransform(defaultTransform_); } /** * Returns the X of the bounding box of the original SVG image. * * @return The X of the bounding box of the original SVG image. */ public static double getOrigX() { return 0.12799999117851257; } /** * Returns the Y of the bounding box of the original SVG image. * * @return The Y of the bounding box of the original SVG image. */ public static double getOrigY() { return 0.0; } /** * Returns the width of the bounding box of the original SVG image. * * @return The width of the bounding box of the original SVG image. */ public static double getOrigWidth() { return 0.7450000047683716; } /** * Returns the height of the bounding box of the original SVG image. * * @return The height of the bounding box of the original SVG image. */ public static double getOrigHeight() { return 1.0; } /** The current width of this resizable icon. */ private int width; /** The current height of this resizable icon. */ private int height; /** * Creates a new transcoded SVG image. It is recommended to use the * {@link #of(int, int)} method to obtain a pre-configured instance. */ public ext_adn() { this.width = (int) getOrigWidth(); this.height = (int) getOrigHeight(); } @Override public int getIconHeight() { return height; } @Override public int getIconWidth() { return width; } @Override public void setDimension(Dimension newDimension) { this.width = newDimension.width; this.height = newDimension.height; } @Override public boolean isHiDpiAware() { return true; } @Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2d = (Graphics2D) g.create(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.translate(x, y); double coef1 = (double) this.width / getOrigWidth(); double coef2 = (double) this.height / getOrigHeight(); double coef = Math.min(coef1, coef2); g2d.clipRect(0, 0, this.width, this.height); g2d.scale(coef, coef); g2d.translate(-getOrigX(), -getOrigY()); if (coef1 != coef2) { if (coef1 < coef2) { int extraDy = (int) ((getOrigWidth() - getOrigHeight()) / 2.0); g2d.translate(0, extraDy); } else { int extraDx = (int) ((getOrigHeight() - getOrigWidth()) / 2.0); g2d.translate(extraDx, 0); } } Graphics2D g2ForInner = (Graphics2D) g2d.create(); innerPaint(g2ForInner); g2ForInner.dispose(); g2d.dispose(); } /** * Returns an instance of this icon with specified dimensions. */ public static NeonIcon of(int width, int height) { ext_adn base = new ext_adn(); base.width = width; base.height = height; return new NeonIcon(base); } /** * Returns a {@link UIResource} instance of this icon with specified dimensions. */ public static NeonIconUIResource uiResourceOf(int width, int height) { ext_adn base = new ext_adn(); base.width = width; base.height = height; return new NeonIconUIResource(base); } }
[ "kirill.grouchnikov@gmail.com" ]
kirill.grouchnikov@gmail.com
ff934c16e2004d11d9ea81170c3d9b14f37ba7e2
a38288304a324f8ff54ef1d33b41e207e9d73919
/src/main/java/ru/vallball/school01/config/ApplicationConfiguration.java
695d6f48044804c122ee264589670e94181319a3
[]
no_license
vall-ball/school01
e96dce5379eee066682b51ae10b7261f48309806
143c69e22eed077335688f15adea741dcd1a776d
refs/heads/master
2023-08-18T12:16:22.750571
2023-08-01T01:33:33
2023-08-01T01:33:33
219,927,893
0
0
null
2023-08-01T01:33:34
2019-11-06T06:31:33
Java
UTF-8
Java
false
false
510
java
package ru.vallball.school01.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; @Configuration @EnableWebMvc @ComponentScan(basePackages = "ru.vallball.school01") public class ApplicationConfiguration { private static final Logger logger = LoggerFactory.getLogger(ApplicationConfiguration.class); }
[ "vall-ball@yandex.ru" ]
vall-ball@yandex.ru
2079dde06ce4b13ec0f8e2c21db79b3775172e01
b7480175d6936def0062fcd7dd8dfd60506796be
/com/clubobsidian/obsidianengine/event/EventPriority.java
6998fcb7c7f4ebc7b7245665ec1d788339dc1551
[ "MIT", "Apache-2.0" ]
permissive
virustotalop/ObsidianEngine
d5fcafe7644f0f5d9377d12d560f167af0d1c59f
97ee169f53a1df9e43bd7b4d718e26a1cc4261f9
refs/heads/master
2021-01-11T10:11:30.739911
2016-10-31T10:28:46
2016-10-31T10:28:46
72,425,407
0
0
null
2016-10-31T10:18:00
2016-10-31T10:18:00
null
UTF-8
Java
false
false
293
java
package com.clubobsidian.obsidianengine.event; public enum EventPriority { LOWEST(0), LOW(1), NORMAL(2), HIGH(3), HIGHEST(4), MONITOR(5); private int priority = 0; EventPriority(int priority) { this.priority = priority; } public int getPriority() { return this.priority; } }
[ "virustotalop@gmail.com" ]
virustotalop@gmail.com
f5871276fd9f89d8528bacf99a39ba3b9045ba12
072e17037cf5ea27f793968038daade1dff36a12
/ewallet-account-ms/src/main/java/com/capg/ewallet/errors/InvalidAmountException.java
a85b8a5684ca30125853068a32a4686c4f965a02
[]
no_license
sai1708/capg-bvrit-online-e-wallet
1caad0c715c60ba8a9b15aad34ec5fc121bfec2f
c2d3c30774425efa58f91c10390a132d9ae78938
refs/heads/master
2022-12-26T23:46:22.408768
2020-10-08T13:35:04
2020-10-08T13:35:04
286,470,257
1
0
null
null
null
null
UTF-8
Java
false
false
253
java
package com.capg.ewallet.errors; public class InvalidAmountException extends Exception { /** * */ private static final long serialVersionUID = -6270971342792467425L; public InvalidAmountException(String message) { super(message); } }
[ "MONAGARI SAI@LAPTOP-ME982STI" ]
MONAGARI SAI@LAPTOP-ME982STI
f6316474ed7f2d66abe8bd7f9d8ad7657d6f0235
2add9dc7beb8faa1072c50b69b58b6b5343e5424
/transcoder/src/main/java/com/alibaba/intl/livevideotranscoder/exceptions/NoAvailableTranscodingSourceException.java
5991d5a587b9cb69959f5a3d9720521b90530571
[ "Apache-2.0" ]
permissive
webrtcsfu/apsara-video-live-demo
c6799e4e55e988f33d3fa8313d6e3925bb887268
b519685bf046d73df6e4f6ac3358e19eaaad03db
refs/heads/master
2020-06-11T15:00:04.421414
2019-03-11T07:56:54
2019-03-11T07:56:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
package com.alibaba.intl.livevideotranscoder.exceptions; /** * Exception thrown when there is no available port for RTP data or when the IP address cannot be found. * * @author Alibaba Cloud */ public class NoAvailableTranscodingSourceException extends Exception { public NoAvailableTranscodingSourceException(String message) { super(message); } public NoAvailableTranscodingSourceException(String message, Throwable cause) { super(message, cause); } }
[ "marc.plouhinec@alibaba-inc.com" ]
marc.plouhinec@alibaba-inc.com
05c423423f94bdb4accb4bfb90faf84b3ae5397a
ffe8e07783151705026f0cb9dc991a3526803f9e
/src/main/java/com/imooc/o2o/entity/WechatAuth.java
e752419986e65dd2d67df45ec807bb7271ae2eb9
[]
no_license
hjxstart/o2o
9681ad0954603a2f95bcb07737244e9ac65c8bec
75a0cdbd64663467828a70722a56bfbced9fff76
refs/heads/main
2023-06-08T18:53:59.816861
2021-06-26T15:38:00
2021-06-26T15:38:00
380,504,100
1
0
null
2021-06-26T15:46:08
2021-06-26T13:07:39
Java
UTF-8
Java
false
false
768
java
package com.imooc.o2o.entity; import java.util.Date; public class WechatAuth { private Long wechatAuthId; private String openId; private Date createTime; // 与实体类关联 private PersonInfo personInfo; public Long getWechatAuthId() { return wechatAuthId; } public void setWechatAuthId(Long wechatAuthId) { this.wechatAuthId = wechatAuthId; } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public PersonInfo getPersonInfo() { return personInfo; } public void setPersonInfo(PersonInfo personInfo) { this.personInfo = personInfo; } }
[ "1726283687@qq.com" ]
1726283687@qq.com
af58aa21c928094b3437e906852c973c27f43ab7
58b1fb9090c4938a7eb6b8cbd1aed88794a78a50
/org.afplib.afptext/src-gen/org/afplib/afpText/impl/PTXImpl.java
c09c41e8269cbffe708f7ede1a8c3a3aa878aff0
[ "Apache-2.0" ]
permissive
yan74/afptext
7750310189759d7ede7393e0bbdd726e3b81914a
2d0a89be3d3dd1de981e522c2c6791d789894475
refs/heads/master
2020-07-28T09:04:05.789849
2019-09-22T09:36:22
2019-09-22T09:36:22
209,372,642
0
0
null
null
null
null
UTF-8
Java
false
false
3,537
java
/** * generated by Xtext 2.19.0 */ package org.afplib.afpText.impl; import java.util.Collection; import org.afplib.afpText.AfpTextPackage; import org.afplib.afpText.PTX; import org.afplib.afpText.triplet; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>PTX</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.afplib.afpText.impl.PTXImpl#getTriplets <em>Triplets</em>}</li> * </ul> * * @generated */ public class PTXImpl extends structuredFieldImpl implements PTX { /** * The cached value of the '{@link #getTriplets() <em>Triplets</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getTriplets() * @generated * @ordered */ protected EList<triplet> triplets; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PTXImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return AfpTextPackage.eINSTANCE.getPTX(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<triplet> getTriplets() { if (triplets == null) { triplets = new EObjectContainmentEList<triplet>(triplet.class, this, AfpTextPackage.PTX__TRIPLETS); } return triplets; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case AfpTextPackage.PTX__TRIPLETS: return ((InternalEList<?>)getTriplets()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfpTextPackage.PTX__TRIPLETS: return getTriplets(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfpTextPackage.PTX__TRIPLETS: getTriplets().clear(); getTriplets().addAll((Collection<? extends triplet>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AfpTextPackage.PTX__TRIPLETS: getTriplets().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AfpTextPackage.PTX__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super.eIsSet(featureID); } } //PTXImpl
[ "yan@hcsystems.de" ]
yan@hcsystems.de
5a4e671aa6a8e9743210d6f1ebbe402856922316
f618fd23b59cbb9f4b0751f7094d3771eb4c6baa
/src/main/java/org/cx/game/utils/WithConnectCommand.java
3d2d44a87cf66c0780a308c85cceb8bdf98cada3
[ "MIT" ]
permissive
228525125/game-shared
b590be4287093a0184463c8d3003aa226a0db98c
99d427c8eeb68735bd354c6acace350204b2fb68
refs/heads/master
2022-11-09T13:15:28.405289
2022-10-06T02:28:40
2022-10-06T02:28:40
238,866,788
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package org.cx.game.utils; import javax.validation.constraints.NotNull; import lombok.Data; @Data public class WithConnectCommand extends Command { //@NotNull private Connect connect; }
[ "228525125@users.noreply.github.com" ]
228525125@users.noreply.github.com
1c812fbc708fa9da9fbd4de991b2a99be60cb857
11ac0ee10f57987bdd35e91cea90924b4afd7f95
/src/sample/Validation/ImplValidation.java
181d433aad2e9c09d18983bef489711646f7ab78
[]
no_license
bavenka/ConverterMoney
c1eb726e6ea6596f1d085c953c147eda78c22b85
e5ed65d07f13e0b072920e15b18ff94ca370afda
refs/heads/master
2021-01-15T08:09:21.302100
2017-11-19T13:46:44
2017-11-19T13:46:44
56,830,493
0
0
null
null
null
null
UTF-8
Java
false
false
3,302
java
package sample.Validation; import javafx.event.EventHandler; import javafx.scene.control.TextField; import javafx.scene.input.KeyEvent; import sample.Utils.DialogManager; /** * Created by Павел on 01.05.2016. */ public class ImplValidation { public static void validPercent(TextField textField){ textField.focusedProperty().addListener((arg0, oldValue, newValue) -> { if (!newValue) { if (!textField.getText().matches("[1-9]{1,2}\\.[0-9]")) { textField.setText(""); } } }); } public static void validName(TextField textField){ textField.focusedProperty().addListener((arg0, oldValue, newValue) -> { if (!newValue) { if (!textField.getText().matches("[ \\-а-яА-Я()1-9]+")) { textField.setText(""); } } }); } public static void validTime(TextField textField){ textField.addEventFilter(KeyEvent.KEY_TYPED, new EventHandler<KeyEvent>() { @Override public void handle(KeyEvent event) { if (!event.getCharacter().matches("\\d|\b")) { DialogManager.showErrorDialog("Ошибка","Поле предусмотрено только для ввода цифр!"); event.consume(); } else if(textField.getText().length()>=2){ DialogManager.showErrorDialog("Ошибка","Значение времени не должно превышать двух знаков!"); event.consume(); } } }); } public static void validSum(TextField textField){ textField.addEventFilter(KeyEvent.KEY_TYPED, new EventHandler<KeyEvent>() { @Override public void handle(KeyEvent event) { if (!event.getCharacter().matches("\\d|\b")) { DialogManager.showErrorDialog("Ошибка","Поле предусмотрено только для ввода цифр!"); event.consume(); } else if(textField.getText().length()>=18){ DialogManager.showErrorDialog("Ошибка","Значение суммы не должно превышать восемнадцати знаков!"); event.consume(); } } }); } public static void validMinSum(TextField textField){ textField.addEventFilter(KeyEvent.KEY_TYPED, new EventHandler<KeyEvent>() { @Override public void handle(KeyEvent event) { if (!event.getCharacter().matches("\\d|\b")) { DialogManager.showErrorDialog("Ошибка","Поле предусмотрено только для ввода цифр!"); event.consume(); } else if(textField.getText().length()>=7){ DialogManager.showErrorDialog("Ошибка","Значение минимальной суммы не должно превышать семи знаков!"); event.consume(); } } }); } }
[ "bavenka@gmail.com" ]
bavenka@gmail.com
0edb31141b1d301eeab7732b9cce76ddf69f3b8b
792e4e499a6795be1a89ed3af64621845210776d
/jumbo-commons/src/main/java/org/jumbo/commons/nio/services/NetworkAcceptor.java
551ab7163ef99805ff5aaaefefb47f031c328c2b
[]
no_license
LeorFinacre/Jumbo
ae5901901e87d970de31d05c259c6f7ba42f7f2c
22ef5ba3086d188ca6ed9b70d47ec36edf297f69
refs/heads/master
2021-01-15T13:20:03.984375
2014-09-13T23:20:16
2014-09-13T23:20:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
954
java
package org.jumbo.commons.nio.services; import org.apache.mina.core.service.IoAcceptor; import org.apache.mina.transport.socket.nio.NioSocketAcceptor; import org.jumbo.api.network.NetworkService; import java.io.IOException; import java.net.InetSocketAddress; /** * Created by Return on 02/09/2014. */ public abstract class NetworkAcceptor extends NetworkService { protected final IoAcceptor acceptor; public NetworkAcceptor() { super(new NioSocketAcceptor()); this.acceptor = (IoAcceptor) service; } @Override public boolean start(String ip, int port) throws IOException { configure(); acceptor.bind(new InetSocketAddress(ip, port)); return acceptor.isActive(); } @Override public void stop() { acceptor.getManagedSessions().values().stream().filter(session -> !session.isClosing()).forEach(session -> session.close(false)); acceptor.dispose(false); } }
[ "skryn01@gmail.com" ]
skryn01@gmail.com