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
c4a31efa6520a10dd9c0d65638d0d414caa6c6a0
bd8c6625df26b53bf8a9d6007a9a0d86cb4a5d5c
/app/src/main/java/com/nimgade/pk/tutorial101/MainActivity.java
2a8298b4b61f474b1ca42daace4e86558a666036
[]
no_license
pankajnimgade/Tutorial101
7f43688a2813dbfe92d77c07c8db13361a5099d6
42859174024b2ade32f3b5ab157e265cc48cf5d6
refs/heads/master
2021-01-01T03:45:38.855697
2016-06-03T14:48:17
2016-06-03T14:48:17
58,360,021
0
0
null
null
null
null
UTF-8
Java
false
false
3,478
java
package com.nimgade.pk.tutorial101; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; import data.binding.list.activities.DataBindingListActivity; import example101.list.activities.Example101Activity; import realm.list.activities.RealmListActivity; import recycler.view.list.activities.RecyclerViewListActivity; import support.my.classes.MyListItem; public class MainActivity extends AppCompatActivity { private ListView listView; private ArrayList<MyListItem> myListItems; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); initializeUI(); } private void initializeUI() { listView = (ListView) findViewById(R.id.MainActivity_listView); myListItems = new ArrayList<>(); myListItems.add(new MyListItem("RecyclerView List", RecyclerViewListActivity.class)); myListItems.add(new MyListItem("Data Binding List", DataBindingListActivity.class)); myListItems.add(new MyListItem("Realm List", RealmListActivity.class)); myListItems.add(new MyListItem("Example 101", Example101Activity.class)); ArrayAdapter<MyListItem> adapter = new ArrayAdapter<MyListItem>(getApplicationContext(), R.layout.simple_list_item_1, myListItems); listView.setAdapter(adapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { MyListItem myListItem = (MyListItem) listView.getItemAtPosition(position); Intent my_Intent = new Intent(getApplicationContext(), myListItem.getActivity_Class()); startActivity(my_Intent); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "pankaj.nimgade@gmail.com" ]
pankaj.nimgade@gmail.com
d237a1e70fe7210ee207593c319af72c70415c6a
b37fe83e195e222fabdc7b0ccfc5333e4e1a1e04
/src/test/java/pages/smartbear_pages/SmartBearOrderPage.java
381011ae60a2b71d9907c24d6c5ed3740720c839
[]
no_license
ZhazgulOmurbekova/chicagoCucumberJUnitFrame
1fa43b00920aded1adcc828f4c1be4b28e020dad
b0c474ed2f4f35f09466de0f06d8f4959a3075cf
refs/heads/master
2022-11-18T17:33:45.160752
2020-03-21T19:13:47
2020-03-21T19:13:47
245,902,314
0
0
null
2022-11-15T23:35:16
2020-03-08T23:04:43
Java
UTF-8
Java
false
false
1,547
java
package pages.smartbear_pages; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import utilities.Driver; public class SmartBearOrderPage { public SmartBearOrderPage(){ PageFactory.initElements(Driver.getDriver(),this); } @FindBy(id = "ctl00_MainContent_fmwOrder_ddlProduct") public WebElement productDropdown; @FindBy(id = "ctl00_MainContent_fmwOrder_txtQuantity") public WebElement quantity; @FindBy(id = "ctl00_MainContent_fmwOrder_txtName") public WebElement customerName; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox2") public WebElement street; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox3") public WebElement city; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox4") public WebElement state; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox5") public WebElement zip; @FindBy(id = "ctl00_MainContent_fmwOrder_cardList_0") public WebElement visaCardType; @FindBy(id = "ctl00_MainContent_fmwOrder_cardList_1") public WebElement masterCardType; @FindBy(id = "ctl00_MainContent_fmwOrder_cardList_2") public WebElement americanExpressCardType; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox6") public WebElement creditCardNumberInput; @FindBy(id = "ctl00_MainContent_fmwOrder_TextBox1") public WebElement expirationDateInput; @FindBy(id = "ctl00_MainContent_fmwOrder_InsertButton") public WebElement processButton; }
[ "kjazggul@gmail.com" ]
kjazggul@gmail.com
83ef9455f85bd6bd3cd85e5ee36c345814809b62
3819429b9346936c1e3be72729a3bd3f93f8b0ce
/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java
27808806874f33ec1b0c4ece18b618981708ff66
[]
no_license
thysmichels/spring-data-elasticsearch-1
f194ab12f7a4f335e2a1c26c2c434ae5c67e54f9
fe25ef25b4565e1de2a471ac2a8606517f5545da
refs/heads/master
2020-12-25T16:02:30.457132
2013-01-28T17:14:25
2013-01-28T17:14:25
12,767,804
0
1
null
null
null
null
UTF-8
Java
false
false
3,033
java
/* * Copyright 2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.elasticsearch.repository.cdi; import org.springframework.data.elasticsearch.core.ElasticsearchOperations; import org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport; import javax.enterprise.event.Observes; import javax.enterprise.inject.UnsatisfiedResolutionException; import javax.enterprise.inject.spi.AfterBeanDiscovery; import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.ProcessBean; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class ElasticsearchRepositoryExtension extends CdiRepositoryExtensionSupport { private final Map<String, Bean<ElasticsearchOperations>> elasticsearchOperationsMap = new HashMap<String, Bean<ElasticsearchOperations>>(); @SuppressWarnings("unchecked") <T> void processBean(@Observes ProcessBean<T> processBean) { Bean<T> bean = processBean.getBean(); for (Type type : bean.getTypes()) { if (type instanceof Class<?> && ElasticsearchOperations.class.isAssignableFrom((Class<?>) type)) { elasticsearchOperationsMap.put(bean.getQualifiers().toString(), ((Bean<ElasticsearchOperations>) bean)); } } } void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) { for (Entry<Class<?>, Set<Annotation>> entry : getRepositoryTypes()) { Class<?> repositoryType = entry.getKey(); Set<Annotation> qualifiers = entry.getValue(); Bean<?> repositoryBean = createRepositoryBean(repositoryType, qualifiers, beanManager); afterBeanDiscovery.addBean(repositoryBean); } } private <T> Bean<T> createRepositoryBean(Class<T> repositoryType, Set<Annotation> qualifiers, BeanManager beanManager) { Bean<ElasticsearchOperations> elasticsearchOperationsBean = this.elasticsearchOperationsMap.get(qualifiers.toString()); if (elasticsearchOperationsBean == null) { throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.", ElasticsearchOperations.class.getName(), qualifiers)); } return new ElasticsearchRepositoryBean<T>(elasticsearchOperationsBean, qualifiers, repositoryType, beanManager); } }
[ "rizwan.idrees@biomedcentral.com" ]
rizwan.idrees@biomedcentral.com
e54552cf55a472f0135ebd53e1e132a2accfedeb
02a50c055704db20f9a2e9ff190d9c1938509ab9
/src/com/somnath/leetcode/binary/tree/BinaryTreeFromPostorderInorder.java
7b57a3c4a1ce78b0f458181e8cd8367413b6e171
[]
no_license
somnath1102/soms
4729d1e41c56781640329260696bea904c1e286f
d3b115af632ac5748c124802072d36d6d9c9a495
refs/heads/master
2020-03-19T00:04:18.383184
2019-05-21T10:42:46
2019-05-21T10:42:46
135,450,860
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package com.somnath.leetcode.binary.tree; import java.util.Arrays; /** * The idea behind this is in the leetcde discussion. Basically preorder will * print the root first. So in inorder array we can find the root by looking for * the inorder element which occurs first in preorder array. Once we get the * root , left and subtree lie on wither side of the inorder array - as it * traverses Left Root Right. Using recursion we solve it * * This can be more memory friendly if we use indexes instead of array copy * * @author mukherj9 * */ public class BinaryTreeFromPostorderInorder { public static TreeNode buildTree(int[] inorder, int[] postorder) { if (inorder == null || inorder.length == 0) return null; // find what occurs last in post among inorder int rootIdxInorder = -1; for (int i = postorder.length - 1; i >= 0 && rootIdxInorder == -1; i--) { for (int j = 0; j < inorder.length; j++) { if (postorder[i] == inorder[j]) { rootIdxInorder = j; break; } } } TreeNode root = new TreeNode(inorder[rootIdxInorder]); root.left = buildTree(Arrays.copyOfRange(inorder, 0, rootIdxInorder), postorder); root.right = buildTree(Arrays.copyOfRange(inorder, rootIdxInorder + 1, inorder.length), postorder); return root; } public static void main(String[] args) { Preorder.preorderTraversal(buildTree(new int[] { 9, 3, 15, 20, 7 }, new int[] { 9, 15, 7, 20, 3 })); System.out.println(); Postorder.postorderTraversal(buildTree(new int[] { 9, 3, 15, 20, 7 }, new int[] { 9, 15, 7, 20, 3 })); System.out.println(); Inorder.inorderTraversal(buildTree(new int[] { 9, 3, 15, 20, 7 }, new int[] { 9, 15, 7, 20, 3 })); } }
[ "somnath.smukherjee@gmail.com" ]
somnath.smukherjee@gmail.com
c49f2e85eb472f47676b993c85cfb1c5b8e255c9
744a7fa2449031f38575019a109560f08561d8e6
/build/generated/src/org/apache/jsp/view_005finvoice_jsp.java
0d1d4f6d52d6cd3625131c8cc7a1263a6ade4e4e
[]
no_license
PhamDuong98/SimpleSellingWeb
18e5b00d76cc58546fa4ed1a69090bf346dd669c
5b16101d35540087e0294fd7d775562fc6017666
refs/heads/master
2020-05-18T17:52:15.581433
2019-05-02T12:30:31
2019-05-02T12:30:31
184,569,397
0
0
null
null
null
null
UTF-8
Java
false
false
11,992
java
package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import model.Invoice; import java.util.ArrayList; import dao.DaoInvoice; import model.Admin; public final class view_005finvoice_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"); out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"); out.write(" <head>\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"); out.write(" <title>Panelo - Free Admin Template</title>\n"); out.write(" <link href=\"style1.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"); out.write(" <link href='http://fonts.googleapis.com/css?family=Belgrano' rel='stylesheet' type='text/css'>\n"); out.write(" <!-- jQuery file -->\n"); out.write(" <script src=\"js/jquery.min1.js\"></script>\n"); out.write(" <script src=\"js/jquery.tabify.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n"); out.write(" \n"); out.write(" <script src=\"js/jquery.tabify.js\" type=\"text/javascript\"></script>\n"); out.write(" \n"); out.write(" <script type=\"text/javascript\">\n"); out.write(" var $ = jQuery.noConflict();\n"); out.write(" $(function () {\n"); out.write(" $('#tabsmenu').tabify();\n"); out.write(" $(\".toggle_container\").hide();\n"); out.write(" $(\".trigger\").click(function () {\n"); out.write(" $(this).toggleClass(\"active\").next().slideToggle(\"slow\");\n"); out.write(" return false;\n"); out.write(" });\n"); out.write(" });\n"); out.write(" </script>\n"); out.write(" </head>\n"); out.write(" <body>\n"); out.write(" "); Admin admin = null; if (session.getAttribute("admin") != null) { admin = (Admin) session.getAttribute("admin"); } DaoInvoice dao = new DaoInvoice(); ArrayList<Invoice> list = dao.getListInvoice(); out.write("\n"); out.write(" <div id=\"panelwrap\">\n"); out.write("\n"); out.write(" <div class=\"header\">\n"); out.write(" \n"); out.write(" <div class=\"title\"><a href=\"#\">Adminstrator</a></div>\n"); out.write(" \n"); out.write(" "); if(admin != null) { out.write("\n"); out.write(" \n"); out.write(" <div class=\"header_right\">Welcome "); out.print( admin.getUsername() ); out.write(", <a href=\"logout_admin.jsp\" class=\"logout\">Logout</a> </div>\n"); out.write(" \n"); out.write(" "); } out.write("\n"); out.write(" \n"); out.write(" <div class=\"menu\">\n"); out.write(" <ul>\n"); out.write(" <li><a href=\"#\" class=\"selected\">Home</a></li>\n"); out.write(" <li><a href=\"#\">Admin settings</a></li>\n"); out.write(" <li><a href=\"#\">Help</a></li>\n"); out.write(" </ul>\n"); out.write(" </div>\n"); out.write("\n"); out.write(" <div class=\"center_content\"> \n"); out.write("\n"); out.write(" <div id=\"right_wrap\">\n"); out.write(" <div id=\"right_content\"> \n"); out.write(" <h2>Tables section</h2> \n"); out.write("\n"); out.write("\n"); out.write(" <table id=\"rounded-corner\">\n"); out.write(" <thead>\n"); out.write(" <tr>\n"); out.write(" \n"); out.write(" <th>No</th>\n"); out.write(" <th>Hid</th>\n"); out.write(" <th>Cid</th>\n"); out.write(" <th>Date</th>\n"); out.write(" <th>Rcname</th>\n"); out.write(" <th>Raddress</th> \n"); out.write(" <th>Rphone</th>\n"); out.write(" <th>Total</th>\n"); out.write(" <th>Status</th>\n"); out.write(" <th>Edit</th>\n"); out.write(" </tr>\n"); out.write(" </thead>\n"); out.write(" \n"); out.write(" <!-- table footer -->\n"); out.write(" <tfoot>\n"); out.write(" <tr>\n"); out.write(" \n"); out.write(" </tr>\n"); out.write(" </tfoot>\n"); out.write(" <!-- end footer -->\n"); out.write(" \n"); out.write(" "); int i=1; for(Invoice in: list) { out.write("\n"); out.write(" <tbody>\n"); out.write(" <tr class=\"odd\">\n"); out.write(" <td> "); out.print( i++ ); out.write("</td>\n"); out.write(" <td id=\"hid\">"); out.print( in.getHid() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getCid() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getDate() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getRcName() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getRcAddress() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getrPhone() ); out.write("</td>\n"); out.write(" <td>"); out.print( in.getTotal() ); out.write("</td>\n"); out.write(" "); if (in.getStatus() == 1) { out.write("\n"); out.write(" <td>Ordered<td>\n"); out.write(" "); } else if (in.getStatus() == 2) { out.write("\n"); out.write(" <td>Processing<td>\n"); out.write(" "); } else if (in.getStatus() == 3) { out.write("\n"); out.write(" <td>Done<td>\n"); out.write(" "); } else if (in.getStatus() == 0) { out.write("\n"); out.write(" <td>Rejected<td>\n"); out.write(" "); } out.write("\n"); out.write(" <td><a href=\"UpdateInvoice?hid= "); out.print( in.getHid() ); out.write("\"><img src=\"images/edit.png\" alt=\"\" title=\"\" border=\"0\" /></a></td>\n"); out.write(" </tr>\n"); out.write("\n"); out.write(" </tbody>\n"); out.write(" "); } out.write("\n"); out.write(" </table>\n"); out.write(" </div>\n"); out.write(" \n"); out.write(" </div><!-- end of right content-->\n"); out.write("\n"); out.write("\n"); out.write(" <div class=\"sidebar\" id=\"sidebar\">\n"); out.write(" <h2>Browse categories</h2>\n"); out.write("\n"); out.write(" <ul>\n"); out.write(" <li><a href=\"index_admin.jsp\" class=\"selected\">Home</a></li>\n"); out.write(" <li><a href=\"view_category.jsp\">Category</a></li>\n"); out.write(" <li><a href=\"view_product.jsp\">Product</a></li>\n"); out.write(" <li><a href=\"view_invoice.jsp\">Invoice</a></li>\n"); out.write(" <li><a href=\"view_customer.jsp\">Customer</a></li>\n"); out.write(" </ul> \n"); out.write(" \n"); out.write("\n"); out.write(" </div> \n"); out.write("\n"); out.write("\n"); out.write(" <div class=\"clear\"></div>\n"); out.write(" </div> <!--end of center_content-->\n"); out.write("\n"); out.write(" <div class=\"footer\">\n"); out.write(" Panelo - Free Admin Template by <a href=\"htpp://csstemplatesmarket.com\" target=\"_blank\">CSSTemplatesMarket</a>\n"); out.write(" </div>\n"); out.write("\n"); out.write(" </div>\n"); out.write("\n"); out.write("\n"); out.write(" </body>\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "duongpmse05785@fpt.edu.vn" ]
duongpmse05785@fpt.edu.vn
3a7bd3f569abe9a41dff0addaeefa5ec8a8e5b13
a80e2454b28592e12b2c68cc66047fd267b4ed50
/Base/src/com/base/config/ConfigKey.java
ee939471590c3002c76ccc655cac20adb68724d8
[]
no_license
xsharh/GameServer_Java
e649e3eeab3d3d1fa24f0d4b63995e9135b5c5f6
d4ac655ec72129cb7ce5d7b174afa8f81a96ba5e
refs/heads/master
2023-05-10T06:55:42.270693
2021-06-07T10:33:55
2021-06-07T10:33:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,952
java
/** * All rights reserved. This material is confidential and proprietary to HITALK team. */ package com.base.config; import java.util.HashSet; /** * <pre> * Config的Key * </pre> * * @author reison * @time 2019年7月27日 */ public class ConfigKey { // ---------------------各个进程启动配置----------------------// public final static String GAME_SERVER = "game_server";// 游戏服ip public final static String GAME_PORT = "game_port";// 游戏服ip public final static String ROOM_SERVER = "room_server";// 房间服ip public final static String ROOM_PORT = "room_port";// 房间服端口 public final static String GATE_PORT = "gate_port";// gate端口 public final static String HTTP_PORT = "http_port"; // ---------------------mysql配置--------------------------------------------// public final static String MYSQL_CONF = "mysql"; public final static String HOST = "host"; public final static String PORT = "port"; public final static String PASS = "pass"; public final static String USER = "user"; public final static String DB_DATA = "db_data"; public final static String DB_LOG = "db_log"; // ---------------------redis配置--------------------------------------------// public final static String REDIS_PASS = "redis"; // ---------------------其他配置(暂时用不上)--------------------------------------------// public final static String WEB_SERVER = "web_server"; public final static String SERVER_ID = "server_id";// 本游戏服的唯一Id public final static String CROSS_IP = "crossip";// 本机器所属跨服的机器IP public final static String CRO_SERVER_IDX = "crosvridx";// 连接crossip机器的第几个跨服进程 public final static String GRP_CONF = "grpconf";// 活动分组配置的可以 public static int tver;// 登录服当前版本号 public final static HashSet<String> groupSet = new HashSet<>(); }
[ "tijay830@163.com" ]
tijay830@163.com
83bcf3ba9a019acbe8f4b8b0b1bfa35a6c9ef0cf
f5c189beb5dfaea3afc8f7e19fa75b9b18038d82
/src/main/java/com/github/hokutomc/lib/function/HT_Consumer.java
46a2be4600b8d5ffdf34f1022a878112054cdb97
[]
no_license
hokutoMc/hokutoLib
bbd317d5dab3fa459731955eefdba026f138639f
830204b23158611ed67ba6771ee37cc87af4b1f2
refs/heads/master
2020-04-01T09:57:42.956428
2015-07-23T06:23:17
2015-07-23T06:23:17
27,328,984
0
0
null
null
null
null
UTF-8
Java
false
false
142
java
package com.github.hokutomc.lib.function; /** * Created by user on 2015/02/17. */ public interface HT_Consumer<T> { void apply(T t); }
[ "youshouldseealcor@gmail.com" ]
youshouldseealcor@gmail.com
5890c936e32f2d05b58d745c617c2305e99aa6e6
1d0f087825a3e3462d477414691e66620c4170f6
/tutorials/examples/Chinese/javame_midp/JavaMEGISEngineTutorial/src/com/pstreets/gisengine/demo/midp/drawing/MIDPGraphicsFactory.java
7c4868207c7163023386e3c85ecce3bf95157264
[]
no_license
guidebee/guidebeemaptutorial
4778a8e611fdceeb5f278fd65ebbf320ee5c86de
8f5900bd47fbd3b171f5c3cca131efd154b11ada
refs/heads/master
2021-01-19T21:48:20.574997
2014-07-25T11:38:45
2014-07-25T11:38:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,121
java
//------------------------------------------------------------------------------ // COPYRIGHT 2009 GUIDEBEE // ALL RIGHTS RESERVED. // GUIDEBEE CONFIDENTIAL PROPRIETARY ///////////////////////////////////// REVISIONS //////////////////////////////// // Date Name Tracking # Description // --------- ------------------- ---------- -------------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////////// //--------------------------------- PACKAGE ------------------------------------ package com.pstreets.gisengine.demo.midp.drawing; //--------------------------------- IMPORTS ------------------------------------ import com.mapdigit.gis.drawing.AbstractGraphicsFactory; import com.mapdigit.gis.drawing.IFont; import com.mapdigit.gis.drawing.IImage; import java.io.IOException; import javax.microedition.lcdui.Font; //[------------------------------ MAIN CLASS ----------------------------------] //--------------------------------- REVISIONS ---------------------------------- // Date Name Tracking # Description // -------- ------------------- ------------- -------------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////////// /** * MIDP implementation of the AbstractGraphicsFactory class. * <hr><b>&copy; Copyright 2009 Guidebee, Inc. All Rights Reserved.</b> * @version 1.00, 06/11/09 * @author Guidebee Pty Ltd. */ public class MIDPGraphicsFactory extends AbstractGraphicsFactory{ //////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * get the graphics factory instance. * @return */ public static MIDPGraphicsFactory getInstance(){ return INSTANCE; } //////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * create image. * @param width * @param height * @return */ public IImage createImage(int width, int height) { return MIDPImage.createImage(width,height); } //////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * create image. * @param rgb * @param width * @param height * @return */ public IImage createImage(int[] rgb, int width, int height) { return MIDPImage.createImage(rgb,width,height); } //////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * create image. * @param bytes * @param offset * @param len * @return */ public IImage createImage(byte[] bytes, int offset, int len) { return MIDPImage.createImage(bytes,offset,len); } private final static MIDPGraphicsFactory INSTANCE=new MIDPGraphicsFactory(); //////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 06NOV2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * private construct. */ private MIDPGraphicsFactory(){ } }
[ "james.shen@guidebee.com" ]
james.shen@guidebee.com
216d36ee718e7fec43565a0c7c2ed512619d0357
13977b676d527c1f59f5a8b50ed785d1a59aa36b
/src/main/java/ua/pp/lazin/javajet/validation/AbstractValidator.java
c1fea044462298d96d18afc32192955dd0698f83
[]
no_license
ruslanlazin/JavaJet
3cc6c9d7daab21e7acf2afcffcbf58b60334b0a7
a11bb77e8824c446c2ee5ca0eeb74dd5df7bade6
refs/heads/master
2021-01-12T08:40:29.966053
2017-01-25T15:47:52
2017-01-25T15:47:52
76,661,017
0
0
null
null
null
null
UTF-8
Java
false
false
1,372
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ua.pp.lazin.javajet.validation; /** * A validator for application-specific objects. * * @param <T> the type parameter * @see Validator * @see Errors * @author Ruslan Lazin */ public abstract class AbstractValidator<T> implements Validator<T>{ /** * The Next validator. */ protected Validator<T> nextValidator; public abstract Errors validate(T target, Errors errors); public Errors doNext(T target, Errors errors) { if (nextValidator != null) { return nextValidator.validate(target, errors); } return errors; } public Validator<T> setNextValidator(Validator<T> nextValidator) { this.nextValidator = nextValidator; return nextValidator; } }
[ "ruslanlazin@gmail.com" ]
ruslanlazin@gmail.com
d2a87ef31f123c1dc44521097651b6deb8f7c469
894489ef89c0b4c1d3a015be6bac589d81d70e60
/MongoPicSlide/src/RollingText.java
eae04fd91d5aa8aee0faeafec54a63af819f4d26
[]
no_license
materone/MongoPicViewer
e77f14499d0460c73a53825d200bddd08bc2dada
b6d6f93f7755b910a699d3a0a22855cd0dda8a42
refs/heads/master
2021-01-23T07:59:38.408421
2013-10-19T16:36:30
2013-10-19T16:36:30
null
0
0
null
null
null
null
GB18030
Java
false
false
3,173
java
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; public class RollingText { protected Shell shell; private Text txtTest; protected Canvas canvas; int x = 0; /** * Launch the application. * @param args */ public static void main(String[] args) { try { RollingText window = new RollingText(); window.open(); } catch (Exception e) { e.printStackTrace(); } } /** * Open the window. */ public void open() { Display display = Display.getDefault(); createContents(); shell.open(); shell.layout(); Rectangle rect = display.getClientArea(); shell.setLocation((rect.width - shell.getBounds().width) / 2, (rect.height - shell.getBounds().height) / 2); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } /** * Create contents of the window. */ protected void createContents() { shell = new Shell(); shell.setSize(450, 300); shell.setText("SWT Application"); canvas = new Canvas(shell, SWT.NONE); canvas.setBounds(10, 39, 430, 64); canvas.addPaintListener(new PaintListener() { @Override public void paintControl(PaintEvent e) { // TODO Auto-generated method stub Image img = (Image)canvas.getData("double-buffer-image"); if(img == null|| img.getBounds().width != canvas.getSize().x || img.getBounds().height != canvas.getSize().y) { img = new Image(shell.getDisplay(), canvas.getSize().x, canvas.getSize().y); canvas.setData("double-buffer-image", img); } GC gc = new GC(img); gc.setBackground(e.gc.getBackground()); gc.setForeground(e.gc.getForeground()); gc.fillRectangle(img.getBounds()); gc.setFont(new Font(shell.getDisplay(), "Arial", 26, SWT.BOLD)); gc.drawString("英文兔子 VS 中文土豪", x++, 10); if(x==canvas.getSize().x) x= 0; e.gc.drawImage(img, 0, 0); gc.dispose(); shell.getDisplay().timerExec(25, new Runnable() { @Override public void run() { canvas.redraw(); } }); } }); txtTest = new Text(shell, SWT.BORDER); txtTest.setText("Test \u571F\u8C6A"); txtTest.setBounds(10, 121, 333, 19); Button btnNewButton = new Button(shell, SWT.NONE); btnNewButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { shell.getDisplay().timerExec(20, new Runnable() { @Override public void run() { // TODO Auto-generated method stub canvas.redraw(); } }); } }); btnNewButton.setBounds(346, 117, 94, 28); btnNewButton.setText("SCroll"); } protected Canvas getCanvas() { return canvas; } }
[ "tony@192.168.1.104" ]
tony@192.168.1.104
ff77c3fe3d65f4e761098b414e2824f0802ea01b
b5202d05c195de4d550cfb87f37139f3f575f66b
/annotation-demo/src/main/java/com/annotation/base/example/UseAnnotationApple.java
8487f1fa88834453f50c94dad813437a99f9518e
[]
no_license
xiao0803/javaSE
22ee639e4ed9676747bae1048076ee01642454c1
3bac780db0fd9396fb6c4eee8d993e8ffec045c4
refs/heads/master
2022-06-28T22:02:36.461127
2021-12-19T13:52:50
2021-12-19T13:52:50
153,114,986
0
0
null
2022-06-21T01:47:52
2018-10-15T13:10:22
Java
UTF-8
Java
false
false
981
java
package com.annotation.base.example; import com.annotation.base.example.AnnotationFruitColor.Color; /** * 注解使用 */ public class UseAnnotationApple { @AnnotationFruitName("Apple") private String appleName; @AnnotationFruitColor(fruitColor = Color.RED) private String appleColor; @AnnotationFruitProvider(id = 1, name = "陕西红富士集团", address = "陕西省西安市延安路89号红富士大厦") private String appleProvider; public void setAppleColor(String appleColor) { this.appleColor = appleColor; } public String getAppleColor() { return appleColor; } public void setAppleName(String appleName) { this.appleName = appleName; } public String getAppleName() { return appleName; } public void setAppleProvider(String appleProvider) { this.appleProvider = appleProvider; } public String getAppleProvider() { return appleProvider; } public void displayName() { System.out.println("水果的名字是:苹果"); } }
[ "786876081@qq.com" ]
786876081@qq.com
c49564e468983bdedea95c6515f13565caf5d292
3a7110ed96562c0a4639f6445476a5c2ea908f2d
/d3/src/reference/ReferenceExample.java
acf7c8bf9b966749ed5c22ac5d35329f0a33f7e2
[]
no_license
frumx/basic_java
48c7ebfa5d5b58390245833b90f961100e45d304
e49bc05f9ebf24a0104beb97f5c43c796347b42c
refs/heads/master
2022-12-23T02:16:02.399722
2017-03-25T00:14:25
2017-03-25T00:14:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package reference; import d3.Person; public class ReferenceExample { public static void main(String[] args) { Person firstPerson = new Person("Adam", "Kowalski"); Person nextPerson = new Person("Jozef", "Mlynarczyk"); int a=10; int b=20; a=b; b=84; System.out.println("Wartosc a to: "+a+" Wartosc b to: "+b); firstPerson=nextPerson; nextPerson.setName("POP"); nextPerson.setSurname("Pyton"); System.out.println("Wartosc a to: "+firstPerson+" Wartosc b to: "+nextPerson); } }
[ "brotherfromlangley@gmail.com" ]
brotherfromlangley@gmail.com
aaf6df5a2e8379065da7e67cb7bfc277bc9176d8
21801340681a6b5ca7bad4460c369523a3323eb7
/chapter6-3/src/test/java/com/springboot/Chapter63ApplicationTests.java
9e4c84d16106739a07bb756c30bf291fdf85658a
[]
no_license
mygps0916/springboot_book
8c94637449378804b3c4ed207bdec45c77e56216
51d3aaa77441dc57aef3378ffc995b04f02af6ed
refs/heads/master
2023-08-27T21:14:18.408360
2021-11-05T04:03:33
2021-11-05T04:03:33
424,822,488
0
0
null
null
null
null
UTF-8
Java
false
false
359
java
package com.springboot; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class Chapter63ApplicationTests { @Test public void contextLoads() { } }
[ "mygps0916@163.com" ]
mygps0916@163.com
4682d2c185af8b241c8c8b6ee0b4b0ef04c05530
0f6ef488942f16c255bf2595b2b334f948f48524
/src/com/ptit/dao/CarDAO.java
ffba46f8b7dff41afb6231a8aee0ab2f28fc918d
[]
no_license
nvduong97/CarGara
f61c381cde1605003764f4e021d2467c9a781524
9fcef18df76a04a262a3acf50e8982bf8f4b320a
refs/heads/master
2021-05-19T06:38:40.519396
2020-03-31T10:35:05
2020-03-31T10:35:05
251,569,387
1
1
null
null
null
null
UTF-8
Java
false
false
3,738
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.ptit.dao; import com.ptit.connect.DatabaseConnect; import com.ptit.model.Car; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author DUONGNV */ public class CarDAO { public List<Car> getAllCar() { List<Car> cars = null; String sql = "SELECT * FROM Car"; Connection connect = null; try { connect = DatabaseConnect.getInstance().getConnection(); Statement stmt = connect.createStatement(); cars = new ArrayList<Car>(); ResultSet rs = stmt.executeQuery(sql); Car car = null; while (rs.next()) { car = new Car(); car.setCarID(rs.getInt(1)); car.setLicense(rs.getString(2)); car.setModel(rs.getString(3)); car.setMaker(rs.getString(4)); car.setNote(rs.getString(5)); car.setCustomerID(rs.getInt(6)); cars.add(car); } } catch (SQLException e) { e.printStackTrace(); } return cars; } public int insearCar(Car car) { Connection connect = null; int row = 0; try { connect = DatabaseConnect.getInstance().getConnection(); String sql = "INSERT INTO Car VALUES(?,?,?,?,?)"; PreparedStatement prepar = connect.prepareStatement(sql); prepar.setString(1, car.getLicense()); prepar.setString(2, car.getModel()); prepar.setString(3, car.getMaker()); prepar.setString(4, car.getNote()); prepar.setInt(5, car.getCustomerID()); row = prepar.executeUpdate(); if (row == 1) { Statement stmt = connect.createStatement(); ResultSet rs = stmt.executeQuery("SELECT @@IDENTITY"); while (rs.next()) { row = rs.getInt(1); } } } catch (SQLException ex) { Logger.getLogger(CarDAO.class.getName()).log(Level.SEVERE, null, ex); } finally { if (connect != null) { try { connect.close(); } catch (SQLException ex) { Logger.getLogger(CarDAO.class.getName()).log(Level.SEVERE, null, ex); } } } return row; } public List<Car> selectCar(int key) { List<Car> cars = null; String sql = "SELECT * FROM Car WHERE customerID = '" + key + "'"; Connection connect = null; try { connect = DatabaseConnect.getInstance().getConnection(); Statement stmt = connect.createStatement(); cars = new ArrayList<Car>(); ResultSet rs = stmt.executeQuery(sql); Car car = null; while (rs.next()) { car = new Car(); car.setCarID(rs.getInt(1)); car.setLicense(rs.getString(2)); car.setModel(rs.getString(3)); car.setMaker(rs.getString(4)); car.setNote(rs.getString(5)); car.setCustomerID(rs.getInt(6)); cars.add(car); } } catch (SQLException e) { e.printStackTrace(); } return cars; } }
[ "duong97ptit@gmail.com" ]
duong97ptit@gmail.com
930aad4361644a8bc9a46b1bdec379d0e289b8b8
886ff5ccedebd6e49681ef9a466865715ec931bc
/src/main/java/sobol/metaheuristics/spea2/Spea2Fitness.java
ba830210ec3f9c73bc12d586072f357a0bdfa804
[]
no_license
RafasTavares/VisualNRP
1b24f545c9c2dcc4d4667bcb076cbb493863c69c
b58de341ad2ff8947fb49291f7fcee54ee5fd721
refs/heads/master
2021-05-01T16:04:41.778244
2015-04-20T13:48:21
2015-04-20T13:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,146
java
/** * Spea2Fitness.java * * @author Juanjo Durillo * @version 1.0 * */ package sobol.metaheuristics.spea2; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import sobol.base.comparator.DominanceComparator; import sobol.base.solution.Solution; import sobol.base.solution.SolutionSet; import sobol.metaheuristics.nsgaII.Distance; /** * This class implements some facilities for calculating the Spea2Fitness */ public class Spea2Fitness { /** * Stores the distance between solutions */ private double[][] distance = null; /** * Stores the solutionSet to assign the fitness */ private SolutionSet solutionSet_ = null; /** * stores a <code>Distance</code> object */ private static final Distance distance_ = new Distance(); /** * stores a <code>Comparator</code> for distance between nodes checking */ private static final Comparator<DistanceNode> distanceNodeComparator = new DistanceNodeComparator(); /** * stores a <code>Comparator</code> for dominance checking */ private static final Comparator<Solution> dominance_ = new DominanceComparator(); /** * Constructor. Creates a new instance of Spea2Fitness for a given * <code>SolutionSet</code>. * * @param solutionSet The <code>SolutionSet</code> */ public Spea2Fitness(SolutionSet solutionSet) { distance = distance_.distanceMatrix(solutionSet); solutionSet_ = solutionSet; for (int i = 0; i < solutionSet_.size(); i++) { solutionSet_.get(i).setLocation(i); } // for } // Spea2Fitness /** * Assigns fitness for all the solutions. */ public void fitnessAssign() { double[] strength = new double[solutionSet_.size()]; double[] rawFitness = new double[solutionSet_.size()]; double kDistance; // Calculate the strength value // strength(i) = |{j | j <- SolutionSet and i dominate j}| for (int i = 0; i < solutionSet_.size(); i++) { for (int j = 0; j < solutionSet_.size(); j++) { if (dominance_.compare(solutionSet_.get(i), solutionSet_.get(j)) == -1) { strength[i] += 1.0; } // if } // for } // for // Calculate the raw fitness // rawFitness(i) = |{sum strenght(j) | j <- SolutionSet and j dominate // i}| for (int i = 0; i < solutionSet_.size(); i++) { for (int j = 0; j < solutionSet_.size(); j++) { if (dominance_.compare(solutionSet_.get(i), solutionSet_.get(j)) == 1) { rawFitness[i] += strength[j]; } // if } // for } // for // Add the distance to the k-th individual. In the reference paper of // SPEA2, // k = sqrt(population.size()), but a value of k = 1 recommended. See // http://www.tik.ee.ethz.ch/pisa/selectors/spea2/spea2_documentation.txt int k = 1; for (int i = 0; i < distance.length; i++) { Arrays.sort(distance[i]); kDistance = 1.0 / (distance[i][k] + 2.0); // Calcule de D(i) // distance // population.get(i).setFitness(rawFitness[i]); solutionSet_.get(i).setFitness(rawFitness[i] + kDistance); } // for } // fitnessAsign /** * Gets 'size' elements from a population of more than 'size' elements using * for this de enviromentalSelection truncation * * @param size The number of elements to get. */ public SolutionSet environmentalSelection(int size) { if (solutionSet_.size() < size) { size = solutionSet_.size(); } // Create a new auxiliar population for no alter the original population SolutionSet aux = new SolutionSet(solutionSet_.size()); int i = 0; while (i < solutionSet_.size()) { if (solutionSet_.get(i).getFitness() < 1.0) { aux.add(solutionSet_.get(i)); solutionSet_.remove(i); } else { i++; } // if } // while if (aux.size() < size) { Comparator<Solution> comparator = new FitnessComparator(); solutionSet_.sort(comparator); int remain = size - aux.size(); for (i = 0; i < remain; i++) { aux.add(solutionSet_.get(i)); } return aux; } else if (aux.size() == size) { return aux; } double[][] distance = distance_.distanceMatrix(aux); List<List<DistanceNode>> distanceList = new LinkedList<List<DistanceNode>>(); for (int pos = 0; pos < aux.size(); pos++) { aux.get(pos).setLocation(pos); List<DistanceNode> distanceNodeList = new ArrayList<DistanceNode>(); for (int ref = 0; ref < aux.size(); ref++) { if (pos != ref) { distanceNodeList.add(new DistanceNode(distance[pos][ref], ref)); } // if } // for distanceList.add(distanceNodeList); } // for for (int q = 0; q < distanceList.size(); q++) { Collections.sort(distanceList.get(q), distanceNodeComparator); } // for while (aux.size() > size) { double minDistance = Double.MAX_VALUE; int toRemove = 0; i = 0; Iterator<List<DistanceNode>> iterator = distanceList.iterator(); while (iterator.hasNext()) { List<DistanceNode> dn = iterator.next(); if (dn.get(0).getDistance() < minDistance) { toRemove = i; minDistance = dn.get(0).getDistance(); // i y toRemove have the same distance to the first solution } else if (dn.get(0).getDistance() == minDistance) { int k = 0; while ((dn.get(k).getDistance() == distanceList.get(toRemove).get(k).getDistance()) && k < (distanceList.get(i).size() - 1)) { k++; } if (dn.get(k).getDistance() < distanceList.get(toRemove).get(k).getDistance()) { toRemove = i; } // if } // if i++; } // while int tmp = aux.get(toRemove).getLocation(); aux.remove(toRemove); distanceList.remove(toRemove); Iterator<List<DistanceNode>> externIterator = distanceList.iterator(); while (externIterator.hasNext()) { Iterator<DistanceNode> interIterator = externIterator.next().iterator(); while (interIterator.hasNext()) { if (interIterator.next().getReference() == tmp) { interIterator.remove(); continue; } // if } // while } // while } // while return aux; } // environmentalSelection } // Spea2Fitness
[ "richardfuch@gmail.com" ]
richardfuch@gmail.com
d42df3d58afecb41d68b2841507b2fb0940d45e9
0b06b66aa55fa95c032c169a4d6377e4f02773db
/app/src/androidTest/java/com/santiago/retrofitjava/ExampleInstrumentedTest.java
5769f41c64a24b11343f8cb4230d6f966195adaf
[]
no_license
SantiRCruz/retrofitJava
68e49fcd5e14c39f750bb6983eea09847b0cb49d
65eaa7c3b1103d8faf917abf72c05008f4621760
refs/heads/main
2023-08-02T00:32:06.757880
2021-09-23T16:10:22
2021-09-23T16:10:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
764
java
package com.santiago.retrofitjava; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.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.getInstrumentation().getTargetContext(); assertEquals("com.santiago.retrofitjava", appContext.getPackageName()); } }
[ "davidsantiagocruz02@gmail.com" ]
davidsantiagocruz02@gmail.com
e8b756f9127bbfd8d82a78833f4398e3ec511c66
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_4c5ea47b6457f718e73688b4096be13ab6ae025f/FMSigProvider/5_4c5ea47b6457f718e73688b4096be13ab6ae025f_FMSigProvider_s.java
38915d3971ac4ca4a25cb3ae80bf021ebfe95f2b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
11,672
java
/* The contents of this file are subject to the terms * of the Common Development and Distribution License * (the License). You may not use this file except in * compliance with the License. * * You can obtain a copy of the License at * https://opensso.dev.java.net/public/CDDLv1.0.html or * opensso/legal/CDDLv1.0.txt * See the License for the specific language governing * permission and limitations under the License. * * When distributing Covered Code, include this CDDL * Header Notice in each file and include the License file * at opensso/legal/CDDLv1.0.txt. * If applicable, add the following below the CDDL Header, * with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * $Id: FMSigProvider.java,v 1.1 2006-10-30 23:16:55 qcheng Exp $ * * Copyright 2006 Sun Microsystems Inc. All Rights Reserved */ package com.sun.identity.saml2.xmlsig; import java.io.IOException; import java.security.PrivateKey; import java.security.cert.X509Certificate; import javax.xml.transform.TransformerException; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.Element; import com.sun.org.apache.xpath.internal.XPathAPI; import com.sun.org.apache.xml.internal.security.utils.IdResolver; import com.sun.org.apache.xml.internal.security.utils.Constants; import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer; import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; import com.sun.org.apache.xml.internal.security.signature.XMLSignature; import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException; import com.sun.org.apache.xml.internal.security.keys.KeyInfo; import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException; import com.sun.org.apache.xml.internal.security.transforms.Transforms; import com.sun.org.apache.xml.internal.security.transforms.TransformationException; import com.sun.identity.shared.configuration.SystemPropertiesManager; import com.sun.identity.shared.xml.XMLUtils; import com.sun.identity.saml.common.SAMLUtils; import com.sun.identity.saml2.common.SAML2SDKUtils; import com.sun.identity.saml2.common.SAML2Exception; import com.sun.identity.saml2.common.SAML2Constants; /** * <code>FMSigProvider</code> is an class for signing * and verifying XML documents, it implements <code>SigProvider</code> */ public final class FMSigProvider implements SigProvider { private static String c14nMethod = null; private static String transformAlg = null; private static String sigAlg = null; // flag to check if the partner's signing cert included in // the XML doc is the same as the one in its meta data private static boolean checkCert = true; static { com.sun.org.apache.xml.internal.security.Init.init(); c14nMethod = SystemPropertiesManager.get( SAML2Constants.CANONICALIZATION_METHOD, Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); transformAlg = SystemPropertiesManager.get( SAML2Constants.TRANSFORM_ALGORITHM, Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS); sigAlg = SystemPropertiesManager.get( SAML2Constants.XMLSIG_ALGORITHM); String valCert = SystemPropertiesManager.get( "com.sun.identity.saml.checkcert", "on"); if (valCert != null && valCert.trim().equalsIgnoreCase("off")) { checkCert = false; } } /** * Default Constructor */ public FMSigProvider() { } /** * Sign the xml document node whose identifying attribute value * is as supplied, using enveloped signatures and use exclusive xml * canonicalization. The resulting signature is inserted after the * first child node (normally Issuer element for SAML2) of the node * to be signed. * @param xmlString String representing an XML document to be signed * @param idValue id attribute value of the root node to be signed * @param privateKey Signing key * @param cert Certificate which contain the public key correlated to * the signing key; It if is not null, then the signature * will include the certificate; Otherwise, the signature * will not include any certificate * @return Element representing the signature element * @throws SAML2Exception if the document could not be signed */ public Element sign( String xmlString, String idValue, PrivateKey privateKey, X509Certificate cert ) throws SAML2Exception { String classMethod = "FMSigProvider.sign: "; if (xmlString == null || xmlString.length() == 0 || idValue == null || idValue.length() == 0 || privateKey == null) { SAML2SDKUtils.debug.error( classMethod + "Either input xml string or id value or "+ "private key is null."); throw new SAML2Exception( SAML2SDKUtils.bundle.getString("nullInput")); } Document doc = XMLUtils.toDOMDocument(xmlString, SAML2SDKUtils.debug); if (doc == null) { throw new SAML2Exception( SAML2SDKUtils.bundle.getString( "errorObtainingElement") ); } Element root = doc.getDocumentElement(); XMLSignature sig = null; try { Constants.setSignatureSpecNSprefix(""); } catch (XMLSecurityException xse1) { throw new SAML2Exception(xse1); } IdResolver.registerElementById(root, idValue); try { if (sigAlg == null) { if (privateKey.getAlgorithm().equalsIgnoreCase( SAML2Constants.DSA)) { sigAlg = XMLSignature.ALGO_ID_SIGNATURE_DSA; } else { if (privateKey.getAlgorithm().equalsIgnoreCase( SAML2Constants.RSA)) { sigAlg = XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1; } } } sig = new XMLSignature( doc, "", sigAlg, c14nMethod); } catch (XMLSecurityException xse2) { throw new SAML2Exception(xse2); } Node firstChild = root.getFirstChild(); while (firstChild != null && (firstChild.getLocalName() == null || !firstChild.getLocalName().equals("Issuer"))) { firstChild = firstChild.getNextSibling(); } Node nextSibling = null; if (firstChild != null) { nextSibling = firstChild.getNextSibling(); } if (nextSibling == null) { root.appendChild(sig.getElement()); } else { root.insertBefore(sig.getElement(), nextSibling); } sig.getSignedInfo().addResourceResolver( new com.sun.identity.saml.xmlsig.OfflineResolver()); Transforms transforms = new Transforms(doc); try { transforms.addTransform( Transforms.TRANSFORM_ENVELOPED_SIGNATURE); } catch (TransformationException te1) { throw new SAML2Exception(te1); } try { transforms.addTransform(transformAlg); } catch (TransformationException te2) { throw new SAML2Exception(te2); } String ref = "#" + idValue; try { sig.addDocument( ref, transforms, Constants.ALGO_ID_DIGEST_SHA1); } catch (XMLSignatureException sige1) { throw new SAML2Exception(sige1); } if (cert != null) { try { sig.addKeyInfo(cert); } catch (XMLSecurityException xse3) { throw new SAML2Exception(xse3); } } try { sig.sign(privateKey); } catch (XMLSignatureException sige2) { throw new SAML2Exception(sige2); } if (SAML2SDKUtils.debug.messageEnabled()) { SAML2SDKUtils.debug.message( classMethod + "Signing is successful."); } return sig.getElement(); } /** * Verify the signature of the xml document * @param xmlString String representing an signed XML document * @param idValue id attribute value of the node whose signature * is to be verified * @param senderCert Certificate containing the public key * which may be used for signature verification; * This certificate may also may be used to check * against the certificate included in the signature * @return true if the xml signature is verified, false otherwise * @throws SAML2Exception if problem occurs during verification */ public boolean verify( String xmlString, String idValue, X509Certificate senderCert ) throws SAML2Exception { String classMethod = "FMSigProvider.verify: "; if (xmlString == null || xmlString.length() == 0 || idValue == null || idValue.length() == 0) { SAML2SDKUtils.debug.error( classMethod + "Either input xmlString or idValue is null."); throw new SAML2Exception( SAML2SDKUtils.bundle.getString("nullInput")); } Document doc = XMLUtils.toDOMDocument(xmlString, SAML2SDKUtils.debug); if (doc == null) { throw new SAML2Exception( SAML2SDKUtils.bundle.getString( "errorObtainingElement") ); } Element nscontext = com.sun.org.apache.xml.internal.security.utils.XMLUtils. createDSctx(doc,"ds",Constants.SignatureSpecNS); Element sigElement = null; try { sigElement = (Element) XPathAPI.selectSingleNode( doc, "//ds:Signature[1]", nscontext); } catch (TransformerException te) { throw new SAML2Exception(te); } IdResolver.registerElementById( doc.getDocumentElement(), idValue); XMLSignature signature = null; try { signature = new XMLSignature((Element)sigElement, ""); } catch (XMLSignatureException sige) { throw new SAML2Exception(sige); } catch (XMLSecurityException xse) { throw new SAML2Exception(xse); } signature.addResourceResolver( new com.sun.identity.saml.xmlsig. OfflineResolver()); KeyInfo ki = signature.getKeyInfo(); X509Certificate certToUse = null; if (ki != null && ki.containsX509Data()) { try { certToUse = ki.getX509Certificate(); } catch (KeyResolverException kre) { SAML2SDKUtils.debug.error( classMethod + "Could not obtain a certificate "+ "from inside the document." ); certToUse = null; } if (certToUse != null && checkCert) { if (!certToUse.equals(senderCert)) { SAML2SDKUtils.debug.error( classMethod + "The cert contained in the document "+ "is NOT the same as the one being " + "passed in."); throw new SAML2Exception( SAML2SDKUtils.bundle.getString( "invalidCertificate")); } if (SAML2SDKUtils.debug.messageEnabled()) { SAML2SDKUtils.debug.message( classMethod + "The cert contained in the document "+ "is the same as the one being "+ "passed in."); } } } if (certToUse == null) { certToUse = senderCert; } boolean result = true; try { result = signature.checkSignatureValue(certToUse); } catch (XMLSignatureException xse) { throw new SAML2Exception(xse); } if (!result) { SAML2SDKUtils.debug.error( classMethod + "Signature verification failed."); return false; } if (SAML2SDKUtils.debug.messageEnabled()) { SAML2SDKUtils.debug.message( classMethod + "Signature verification successful."); } return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
46c4cf480f4ec055ad5df8b50e219e7c891831e3
921b73fb6a0964210b9f513b9aa08b4d1c2cf7d7
/src/main/java/iterator/basic/Iterator.java
7f8860e3e8fd6ee566a66f902004cbc4cea3d60a
[]
no_license
X4TKC/PatronesDeDiseno
d781ff5b4c7459f01dfe484cdc18e7a9ec89d75b
0ccbadc36ae5355707193766cec3e71dac5830b3
refs/heads/master
2020-08-10T03:14:55.449201
2019-11-15T12:26:14
2019-11-15T12:26:14
214,243,199
1
1
null
null
null
null
UTF-8
Java
false
false
111
java
package iterator.basic; public interface Iterator { public Object next(); public boolean hasNext(); }
[ "tovilaskevin@gmail.com" ]
tovilaskevin@gmail.com
da8b4e152619741a5e99b854ab95189e7b66e3b1
3776cad76c9c361a6fd1dcc02a2827d51d8ae88a
/Spring-Boot-Test/src/main/java/com/example/test/service/UserService.java
3bb01eb74bd512f379d3cf1fa23adfe374d24af1
[]
no_license
WeiRuiCoding/SpringBootLearning
dab337580b06058fffe964a18f10ea210a70eebf
9df90391b107f5d68f5ae7e7e8b9c33e3b790829
refs/heads/master
2022-12-30T12:08:21.301005
2020-10-17T12:32:23
2020-10-17T12:32:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.example.test.service; import com.example.test.bean.User; /** * Created by dengzhiming on 2019/4/29 */ public interface UserService { int add(User user); int update(User user); int deleteById(String id); User queryUserById(String id); }
[ "36990141+JavaCodeMing@users.noreply.github.com" ]
36990141+JavaCodeMing@users.noreply.github.com
786558c279378d80577a103e37abdcec0d9c9fe9
f0495820cf0fd0754183e9f692021db06c24721f
/eat-grape/src/com/eatle/service/merchant/impl/SchoolRestaurantServiceImpl.java
88e8fcb1daa731851317c9a291587adaf9a91b2c
[ "Apache-2.0" ]
permissive
tonyhuang419/eat-grape
7711dfe7be8b0692639bde74fa606997b992b742
36fde768d313e700222dae9926c867396c63b0f5
refs/heads/master
2021-01-18T17:25:29.982685
2013-07-29T02:34:53
2013-07-29T02:34:53
37,664,547
0
0
null
null
null
null
UTF-8
Java
false
false
3,553
java
package com.eatle.service.merchant.impl; import com.eatle.persistent.mapper.SchoolRestaurantMapper; import com.eatle.persistent.pojo.foundation.place.School; import com.eatle.persistent.pojo.merchant.SchoolRestaurant; import com.eatle.persistent.pojo.merchant.SchoolRestaurantCriteria.Criteria; import com.eatle.persistent.pojo.merchant.SchoolRestaurantCriteria; import com.eatle.service.foundation.place.IDistrictService; import com.eatle.service.merchant.ISchoolRestaurantService; import com.eatle.utils.Pagination; import com.eatle.utils.StringUtil; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; @Service("schoolRestaurantService") public class SchoolRestaurantServiceImpl implements ISchoolRestaurantService { @Resource private SchoolRestaurantMapper schoolRestaurantMapper; @Resource private IDistrictService districtService; @Override public int add(SchoolRestaurant entity) { return schoolRestaurantMapper.insert(entity); } @Override public int delete(SchoolRestaurant entity) { return schoolRestaurantMapper.deleteByPrimaryKey(entity.getId()); } @Override public int deleteBySelective(SchoolRestaurant entity) { return schoolRestaurantMapper.deleteBySelective(entity); } @Override public int update(SchoolRestaurant entity) { return schoolRestaurantMapper.updateByPrimaryKeySelective(entity); } @Override public Pagination findPagination(Map<String, Object> queryMap, int currentPage, int pageSize) { SchoolRestaurantCriteria schoolRestaurantCriteria = new SchoolRestaurantCriteria(); Criteria criteria = schoolRestaurantCriteria.createCriteria(); // 设置搜索条件参数 if (queryMap != null) { if (queryMap.containsKey("restaurantId")) { criteria.andRestaurantIdEqualTo((Long) queryMap.get("restaurantId")); } } // 设置分页参数 schoolRestaurantCriteria.setPageSize(pageSize); schoolRestaurantCriteria.setStartIndex((currentPage - 1) * pageSize); List<SchoolRestaurant> items = schoolRestaurantMapper.selectByCriteria(schoolRestaurantCriteria); int totalCount = (int) schoolRestaurantMapper.selectCountByCriteria(schoolRestaurantCriteria); return new Pagination(pageSize, currentPage, totalCount, items); } @Override public SchoolRestaurant findById(long id) { return schoolRestaurantMapper.selectByPrimaryKey(id); } @Override public List<SchoolRestaurant> findAll() { return schoolRestaurantMapper.selectByCriteria(null); } @Override public List<SchoolRestaurant> findByCriteria(SchoolRestaurantCriteria criteria) { return schoolRestaurantMapper.selectByCriteria(criteria); } @Override public Pagination getSendSchoolsByRestaurantId( Map<String, Object> queryMap, int currentPage, int pageSize) { int totalCount = (int) schoolRestaurantMapper.selectSendSchoolsCountByRestaurantId(queryMap); queryMap.put("startIndex", (currentPage - 1) * pageSize); queryMap.put("pageSize", pageSize); List<School> items = schoolRestaurantMapper.selectSendSchoolsByRestaurantId(queryMap); // 设置所属区域的全名 for(School s : items) { StringBuffer districtName = new StringBuffer(); districtService.findAllFatherById(s.getDistrictId(), districtName); s.setDistrictName(StringUtil.reverseStrAsSplitStr(districtName.toString(), ";")); } return new Pagination(pageSize, currentPage, totalCount, items); } }
[ "tsq19900909@gmail.com" ]
tsq19900909@gmail.com
6d4771cd846be9812e46f2614214df4cb7723b5f
388cdfd3e3892cacba9db958a9cd7da955edc5c5
/221801432/src/WordCount.java
c2df54507582dfcc8a6f2e4771833f0aea3075a5
[]
no_license
kofyou/PersonalProject-Java
1010de1a6a1e8d5260fc9cc42137f0c9c7fac8d1
e0059ca7b863d78f1d458dc34dec050e66fe98ab
refs/heads/main
2023-03-31T18:50:05.129592
2021-03-21T23:33:17
2021-03-21T23:33:17
340,817,342
0
75
null
2021-03-14T11:01:28
2021-02-21T04:32:31
Java
UTF-8
Java
false
false
798
java
import java.io.*; import java.util.ArrayList; import java.util.Scanner; class MyWords { private final String content; private int frequency; public String getContent() { return content; } public int getFrequency() { return frequency; } public void increaseFrequency() { frequency++; } public MyWords(String str) { content = str; frequency = 1; } } public class WordCount { public static void main(String[] args) { ArrayList<MyWords> myWordsArrayList; String[] str = {args[0], args[1]}; Lib.countCharacters(str[0], str[1]); myWordsArrayList = Lib.countWords(str[0], str[1]); Lib.countLines(str[0], str[1]); Lib.countFrequency(str[1], myWordsArrayList); } }
[ "1139545714@qq.com" ]
1139545714@qq.com
af021145ebd5b0662b9dff2d86ca1985fdf7371d
7e3e88f04f8db8e0322308a2e0bc8dd7b61bc9b9
/src/test/java/br/com/dominio/domain/PhoneTest.java
8e38083ee7a01d1a126d4d86f85566c709608c2a
[]
no_license
robsonlira/jhipster-person-app
548ae8dadff91c371c52ff2a452cefa0553e6417
bc6a0ddee0db0a77e9d4e83d85ca44617143493d
refs/heads/main
2023-06-14T07:37:40.793000
2021-07-11T15:43:36
2021-07-11T15:43:36
384,723,110
0
0
null
2021-07-11T15:43:37
2021-07-10T14:55:42
Java
UTF-8
Java
false
false
630
java
package br.com.dominio.domain; import static org.assertj.core.api.Assertions.assertThat; import br.com.dominio.web.rest.TestUtil; import org.junit.jupiter.api.Test; class PhoneTest { @Test void equalsVerifier() throws Exception { TestUtil.equalsVerifier(Phone.class); Phone phone1 = new Phone(); phone1.setId(1L); Phone phone2 = new Phone(); phone2.setId(phone1.getId()); assertThat(phone1).isEqualTo(phone2); phone2.setId(2L); assertThat(phone1).isNotEqualTo(phone2); phone1.setId(null); assertThat(phone1).isNotEqualTo(phone2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e1c6d9162859fc778d39c589aad158ea38667c59
be32841a6c6648a99fc31d170dd0b79cc465f3e4
/src/jp/co/dol/controller/ment/emp/DelController.java
a7d4e02d881e474b4bba520171049a51cbd1c243
[]
no_license
mtozaki/dsp_failure_mgr
b8af3cac91772b5c8931ea0ef7a3e9c04d6d16f2
b113cf907483f43c359f280866043927c0a7060a
refs/heads/master
2021-01-17T11:39:48.757389
2012-02-12T10:21:16
2012-02-12T10:21:16
3,407,006
0
1
null
null
null
null
SHIFT_JIS
Java
false
false
887
java
package jp.co.dol.controller.ment.emp; import jp.co.dol.controller.BaseController; import jp.co.dol.service.contents.EmpService; import org.slim3.controller.Navigation; import com.google.appengine.api.datastore.Key; public class DelController extends BaseController { @Override public Navigation run() throws Exception { try { // 指定されたkeyから記事を取得 Key key = asKey("key"); EmpService empService = new EmpService(); empService.deleteEmp(key); sessionScope("err", "削除しました。"); return forward("/ment/emp"); } catch (Exception e) { // keyが不正な場合 sessionScope("err", e.getMessage()); return forward("/ment/emp"); } } }
[ "mamiko.tozaki@gmail.com" ]
mamiko.tozaki@gmail.com
3b5d751462ed25e01086ad9368676d18f187a401
321e14942a31c6d1d2d8acefe0597ea1aaee1426
/terminal-admin/src/main/java/com/jyt/terminal/util/hwocr/item/VatInvoiceItem.java
b04fc873e4502b29caf4e373a4d77b98872794ee
[]
no_license
free-work-team/digital-currency
2471aa3080f0c1ed2c05e29b0693964a504f870f
dc01b2f8c51699d3de776100c1e47ae0108b8ebd
refs/heads/master
2023-04-30T11:11:17.101053
2021-05-19T22:59:59
2021-05-19T22:59:59
325,917,185
0
5
null
null
null
null
UTF-8
Java
false
false
5,299
java
package com.jyt.terminal.util.hwocr.item; import java.util.ArrayList; import java.util.List; public class VatInvoiceItem { private String type; private String serial_number; private String attribution; private String code; private String check_code; private String machine_number; private String print_number; private String number; private String issue_date; private String encryption_block; private String buyer_name; private String buyer_id; private String buyer_address; private String buyer_bank; private String seller_name; private String seller_id; private String seller_address; private String seller_bank; private String subtotal_amount; private String subtotal_tax; private String total; private String total_in_words; private String remarks; private String receiver; private String reviewer; private String issuer; private List<String> supervision_seal; private List<String> seller_seal; private List<VatInvoiceListItem> item_list; public VatInvoiceItem() { this.supervision_seal = new ArrayList<>(); this.seller_seal = new ArrayList<>(); this.item_list = new ArrayList<>(); } public void setType(String type) { this.type = type; } public String getType() { return type; } public void setSerial_number(String serial_number) { this.serial_number = serial_number; } public String getSerial_number() { return serial_number; } public String getAttribution() { return attribution; } public void setAttribution(String attribution) { this.attribution = attribution; } public void setCode(String code) { this.code = code; } public String getCode() { return code; } public void setCheck_code(String check_code) { this.check_code = check_code; } public String getCheck_code() { return check_code; } public void setMachine_number(String machine_number) { this.machine_number = machine_number; } public String getMachine_number() { return machine_number; } public void setPrint_number(String print_number) { this.print_number = print_number; } public String getPrint_number() { return print_number; } public void setNumber(String number) { this.number = number; } public String getNumber() { return number; } public void setIssue_date(String issue_date) { this.issue_date = issue_date; } public String getIssue_date() { return issue_date; } public String getEncryption_block() { return encryption_block; } public void setEncryption_block(String encryption_block) { this.encryption_block = encryption_block; } public void setBuyer_address(String buyer_address) { this.buyer_address = buyer_address; } public String getBuyer_address() { return buyer_address; } public void setBuyer_name(String buyer_name) { this.buyer_name = buyer_name; } public String getBuyer_name() { return buyer_name; } public String getBuyer_id() { return buyer_id; } public void setBuyer_id(String buyer_id) { this.buyer_id = buyer_id; } public String getBuyer_bank() { return buyer_bank; } public void setBuyer_bank(String buyer_bank) { this.buyer_bank = buyer_bank; } public String getSeller_name() { return seller_name; } public void setSeller_name(String seller_name) { this.seller_name = seller_name; } public String getSeller_id() { return seller_id; } public void setSeller_id(String seller_id) { this.seller_id = seller_id; } public String getSeller_address() { return seller_address; } public void setSeller_address(String seller_address) { this.seller_address = seller_address; } public String getSeller_bank() { return seller_bank; } public void setSeller_bank(String seller_bank) { this.seller_bank = seller_bank; } public String getSubtotal_amount() { return subtotal_amount; } public void setSubtotal_amount(String subtotal_amount) { this.subtotal_amount = subtotal_amount; } public String getSubtotal_tax() { return subtotal_tax; } public void setSubtotal_tax(String subtotal_tax) { this.subtotal_tax = subtotal_tax; } public String getTotal() { return total; } public void setTotal(String total) { this.total = total; } public void setTotal_in_words(String total_in_words) { this.total_in_words = total_in_words; } public String getTotal_in_words() { return total_in_words; } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } public String getReceiver() { return receiver; } public void setReceiver(String receiver) { this.receiver = receiver; } public void setReviewer(String reviewer) { this.reviewer = reviewer; } public String getReviewer() { return reviewer; } public void setIssuer(String issuer) { this.issuer = issuer; } public String getIssuer() { return issuer; } public List<String> getSupervision_seal() { return supervision_seal; } public void setSupervision_seal(List<String> supervision_seal) { this.supervision_seal = supervision_seal; } public void setSeller_seal(List<String> seller_seal) { this.seller_seal = seller_seal; } public List<String> getSeller_seal() { return seller_seal; } public List<VatInvoiceListItem> getItem_list() { return item_list; } public void setItem_list(List<VatInvoiceListItem> item_list) { this.item_list = item_list; } }
[ "331943150@qq.com" ]
331943150@qq.com
e603439721fed94e9b3ac3d56fbd05fce0dd4033
89514e46030db3eb49f5d79c544d3fe6edb5795f
/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/TableResultResponse.java
aa1093ad84352cd22132395299286953c0f6353c
[ "Apache-2.0" ]
permissive
spartajet/ace-security
f65a4309430737e25ba8bfb3ec515458161e3695
f7aa6bd120ba3aae1a884e6a1fd33f263ef0fe6e
refs/heads/master
2022-05-24T10:05:41.334098
2022-04-05T01:29:11
2022-04-05T01:29:11
122,838,947
0
0
Apache-2.0
2022-04-05T01:29:14
2018-02-25T13:33:04
Java
UTF-8
Java
false
false
875
java
package com.github.wxiaoqi.security.common.msg; import java.util.List; /** * ${DESCRIPTION} * * @author wanghaobin * @create 2017-06-14 22:40 */ public class TableResultResponse<T> extends BaseResponse { long total; List<T> rows; public TableResultResponse(long total, List<T> rows) { this.total = total; this.rows = rows; } public TableResultResponse() { } TableResultResponse<T> total(int total){ this.total = total; return this; } TableResultResponse<T> total(List<T> rows){ this.rows = rows; return this; } public long getTotal() { return total; } public void setTotal(long total) { this.total = total; } public List<T> getRows() { return rows; } public void setRows(List<T> rows) { this.rows = rows; } }
[ "spartajet.guo@gmail.com" ]
spartajet.guo@gmail.com
2e4ba9192fda05ff03770f490cafc5c0ded0580e
b80cf70f0eefc7770749f579bfb32d8cfac47957
/src/view/Main.java
0b3eee35db383c8c975eb802071c814fa9898b4a
[]
no_license
vbm12390/Ipconfig_Ping
773c30a2aba6c12aea16c6eaccccc1b340dbc39a
815b8b274b625849e4e002d97ee2b1f1d3becb7e
refs/heads/master
2023-07-04T19:50:38.771390
2021-08-24T02:43:50
2021-08-24T02:43:50
399,313,212
0
0
null
null
null
null
ISO-8859-1
Java
false
false
697
java
package view; import controller.RedesController; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { RedesController network = new RedesController(); int opc = 0; while (opc!=3) { opc = Integer.parseInt(JOptionPane.showInputDialog("1 - Obter informacões de sua interface de rede \n2- Testar Conexão de Internet \n3 - Finalizar Programa ")); switch (opc) { case 1: network.interfaces(opc); break; case 2: network.interfaces(opc); break; case 3: JOptionPane.showMessageDialog(null, "Programa Finalizado");; break; default: JOptionPane.showMessageDialog(null, "Opção Invalida"); } } } }
[ "vinicius@DESKTOP-BKMT8RP" ]
vinicius@DESKTOP-BKMT8RP
ccccf9affc656afd2d476071f0c9d9f7991bfaff
4ea88590786e9e5d83029b1d6361f85469b81fda
/app/src/main/java/com/jy/jiandao/auth/register/SetPsdFragment.java
278306035ccaa43208d5bf41f54b999806ffd07e
[]
no_license
kkkeep/JianDao
2cfd79891f06fd5f093a4513e28b0e8957e17faa
3004fc93b40e6456a85221acf316d02db0258fe4
refs/heads/master
2020-11-28T04:34:13.012057
2020-03-25T03:24:18
2020-03-25T03:24:18
229,703,416
1
0
null
null
null
null
UTF-8
Java
false
false
6,710
java
package com.jy.jiandao.auth.register; import android.graphics.Color; import android.os.Bundle; import android.text.Editable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.TextPaint; import android.text.TextUtils; import android.text.TextWatcher; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; import com.jy.jiandao.AppConstant; import com.jy.jiandao.R; import com.jy.jiandao.auth.BaseAuthFragment; import com.jy.jiandao.auth.login.PasswordLoginFragment; import com.jy.jiandao.auth.login.VerificationLoginFragment; import com.jy.jiandao.data.entity.User; import com.mr.k.libmvp.Utils.Logger; import com.mr.k.libmvp.manager.MvpFragmentManager; import com.mr.k.libmvp.widget.EditCleanButton; import com.mr.k.libmvp.widget.EditTogglePasswordButton; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /* * created by Cherry on 2019-12-30 **/ public class SetPsdFragment extends BaseAuthFragment<RegisterContract.IRegisterSetPresenter> implements View.OnClickListener, RegisterContract.IRegisterSetView { private static final String TAG = "SetPsdFragment"; private EditTogglePasswordButton mTogglePasswordButton; private EditTogglePasswordButton mToggleConfirmPasswordButton; private EditCleanButton mEditPasswordCleanButton; private EditCleanButton mEditConfirmPasswordCleanButton; private EditText mEdtPassword; private EditText mEdtConfirmPassword; private Button mBtnRegister; private TextView mTvUserAgreement; @Override public int getLayoutId() { return R.layout.fragment_set_password; } @Override protected void initView(@NotNull View view, @Nullable Bundle savedInstanceState) { super.initView(view, savedInstanceState); mTogglePasswordButton = bindView(R.id.auth_register_set_iv_toggle_psd); mToggleConfirmPasswordButton = bindView(R.id.auth_register_set_iv_toggle_confirm_psd); mEdtPassword = bindView(R.id.auth_register_set_edt_password); mEdtConfirmPassword = bindView(R.id.auth_register_set_edt_confirm_password); mEditPasswordCleanButton = bindView(R.id.auth_register_set_iv_clean_psd); mEditConfirmPasswordCleanButton = bindView(R.id.auth_register_set_iv_clean_confirm_psd); mBtnRegister = bindView(R.id.auth_register_set_btn_register,this); bindView(R.id.auth_register_set_tv_verification_code_login,this); bindView(R.id.auth_register_set_tv_password_login,this); mTvUserAgreement = bindView(R.id.auth_register_set_tv_user_agreement ); mTogglePasswordButton.bindEditText(mEdtPassword); mEditPasswordCleanButton.bindEditText(mEdtPassword); mToggleConfirmPasswordButton.bindEditText(mEdtConfirmPassword); mEditConfirmPasswordCleanButton.bindEditText(mEdtConfirmPassword); mEdtConfirmPassword.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { mBtnRegister.setEnabled(!TextUtils.isEmpty(mEdtConfirmPassword.getText().toString().trim())); } }); setUserAgreement(); } private void setUserAgreement(){ String content = getString(R.string.text_auth_register_set_user_agreement); SpannableStringBuilder stringBuilder = new SpannableStringBuilder(content); stringBuilder.setSpan(new ClickableSpan(){ @Override public void onClick(@NonNull View widget) { showToast("用户协议"); } @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setColor(Color.RED);// 设置可点击文字的颜色 ds.setUnderlineText(false);// 取消下划线 } }, 9, 13, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); stringBuilder.setSpan(new ClickableSpan(){ @Override public void onClick(@NonNull View widget) { showToast("隐私声明"); } @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); ds.setColor(Color.RED);// 设置可点击文字的颜色 ds.setUnderlineText(false); // 取消下划线 } }, 14, 18, Spanned.SPAN_INCLUSIVE_INCLUSIVE); mTvUserAgreement.setText(stringBuilder); // 不设置这个,将不可点击 mTvUserAgreement.setMovementMethod(LinkMovementMethod.getInstance()); } @Override public RegisterContract.IRegisterSetPresenter createPresenter() { return new RegisterSetPresenter(); } @Override public void onClick(View v) { RegisterFragment fragment = null; switch (v.getId()){ case R.id.auth_register_set_btn_register:{ // todo 需要判断两次密码是否一致 Bundle bundle = getArguments(); String phoneNum = null; if(bundle != null){ phoneNum = bundle.getString(AppConstant.BundleKey.PHONE_NUMBER); } if(TextUtils.isEmpty(phoneNum)){ throw new NullPointerException("跳转到设置页面需要传入手机号"); } mPresenter.register(phoneNum , mEdtPassword.getText().toString().trim(),mEdtConfirmPassword.getText().toString().trim()); break; } case R.id.auth_register_set_tv_verification_code_login:{ MvpFragmentManager.addOrShowFragment(getFragmentManager(), VerificationLoginFragment.class,this,android.R.id.content); break; } case R.id.auth_register_set_tv_password_login:{ MvpFragmentManager.addOrShowFragment(getFragmentManager(), PasswordLoginFragment.class,this,android.R.id.content); break; } } } @Override public void onRegisterResult(User user, String msg) { if(user != null){ Logger.d("%s user = %s",TAG,user); }else{ Logger.d("%s error = %s",msg); } } }
[ "taofujob@gmail.com" ]
taofujob@gmail.com
0b0d125d08370ec11ea071d85da82b0a748cc5d3
1ebdb2bd67252804da26ac6f960032a48a05a29a
/src/main/java/ru/job4j/search/PhoneDictionary.java
017d09cb1a63137c6d5d151a6bd9fea452a36254
[]
no_license
KristinaValushka/job4j_tracker
820563e5f77cccb1853c2ba510713b8776d140e4
993bfc24429c6ecc71ccf4e491d548e7744bb7d0
refs/heads/master
2022-12-13T19:21:04.563303
2020-09-03T16:28:19
2020-09-03T16:28:19
281,263,485
0
0
null
2020-07-21T01:21:44
2020-07-21T01:21:43
null
UTF-8
Java
false
false
737
java
package ru.job4j.search; import java.util.ArrayList; public class PhoneDictionary { private ArrayList<Person> persons = new ArrayList<Person>(); public void add(Person person) { this.persons.add(person); } public ArrayList<Person> find(String key) { ArrayList<Person> result = new ArrayList<>(); for (int i = 0; i < persons.size(); i++) { if (persons.get(i).getName().contains(key) || persons.get(i).getSurname().contains(key) || persons.get(i).getPhone().contains(key) || persons.get(i).getAddress().contains(key)) { result.add(persons.get(i)); } } return result; } }
[ "krystsinavalushka@yahoo.com" ]
krystsinavalushka@yahoo.com
c212847cd59b87777dc067e93caa8014c4863d27
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_bdace4c21d4a18a99c4f30f10c67d78f5a319e97/AbstractExternalizeManager/7_bdace4c21d4a18a99c4f30f10c67d78f5a319e97_AbstractExternalizeManager_s.java
3e12632fe7e3daa387c2dc53db67158148510f97
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
17,523
java
/* * Copyright 2000,2005 wingS development team. * * This file is part of wingS (http://wingsframework.org). * * wingS is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * Please see COPYING for the complete licence. */ package org.wings.externalizer; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wings.io.Device; import org.wings.util.StringUtil; import org.wings.resource.ResourceNotFoundException; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.*; /** * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a> */ public abstract class AbstractExternalizeManager { protected final static Log LOG = LogFactory.getLog(AbstractExternalizeManager.class); /** * The identifier generated, if the {@link ExternalizeManager} did not find * an apropriate {@link Externalizer}. */ public static final String NOT_FOUND_IDENTIFIER = "0"; /*--------------------------------------------------------------- * The externalized ID is just a counter start starts with zero. This * happens with each start of the server, and thus generates the same * ID if we restart the application (especially, if we are in the * development phase). Since we externalize the resource with a long * caching timeout, the browser might not refetch a resource externalized * in a fresh instance of the web-application, since the browser has cached * it already. * Thus, we need a unique prefix for each externalized resource, that * changes with each start of the server. * These static variables create a new ID every UNIQUE_TIMESLICE, which * means, that, if we use a 2-character prefix, can offer the browser * the timeframe of FINAL_EXPIRES for this resource to be cached (since * after that time, we have an roll-over of the ID's). *----------------------------------------------------------------*/ /** * in seconds */ public final int UNIQUE_TIMESLICE = 20; /** * in seconds; Computed from UNIQUE_TIMESLICE; do not change. */ public final long FINAL_EXPIRES = (StringUtil.MAX_RADIX * StringUtil.MAX_RADIX - 1) * UNIQUE_TIMESLICE; /** * Prefix for the externalized ID; long. Computed, do not change. */ protected final long PREFIX_TIMESLICE = ((System.currentTimeMillis() / 1000) % FINAL_EXPIRES) / UNIQUE_TIMESLICE; // Flags /** * for an externalized object with the final flag on the expired date * header is set to a big value. If the final flag is off, the browser * or proxy does not cache the object. */ public static final int FINAL = 8; /** * for an externalized object with the request flag on, the externalized * object is removed from the {@link ExternalizeManager} after one request * of the object. */ public static final int REQUEST = 1; /** * for an externalized object with the session flag on, the externalized * object only available to requests within the session which created the * object. The object is not accessible anymore after the session is * destroyed (it is garbage collected after the session is garbage * collected) */ public static final int SESSION = 2; /** * for an externalized object with the gobal flag on, the externalized * object is available to all requests. Also it is never garbage collected * and available for the lifecycle of the servlet container. */ public static final int GLOBAL = 4; /** * To generate the identifier for a externalized object. */ private long counter = 0; /** * To search for an already externalized object. This performs way better * than search in the value set of the * identifier-{@link ExternalizedResource} map. */ protected final Map<ExternalizedResource,String> reverseExternalized; /** * To support Session local externalizing, the {@link ExternalizeManager} * needs to encode the session identifier of the servlet container in the * URL of the externalized object. This is set in the constructor * and should work (I hope so) with all servlet containers. */ protected String sessionEncoding = ""; /** * String prefixed to every created externlizer identifier via {@link #createIdentifier()} */ private String prefix; private static final String FOO = "http://foo/foo"; public AbstractExternalizeManager() { if (LOG.isDebugEnabled()) { LOG.debug("Externalizer scope using prefix" + prefix + "expires in " + FINAL_EXPIRES + " seconds "); } reverseExternalized = Collections.synchronizedMap(new HashMap<ExternalizedResource, String>()); setPrefix(StringUtil.toShortestAlphaNumericString(PREFIX_TIMESLICE, 2)); } public void setResponse(HttpServletResponse response) { if (response != null) { sessionEncoding = response.encodeURL(FOO).substring(FOO.length()); } } protected final synchronized long getNextIdentifier() { return ++counter; } /** * String prefixed to every created externlizer identifier via {@link #createIdentifier()} */ public String getPrefix() { return prefix; } /** * String prefixed to every created externlizer identifier via {@link #createIdentifier()} */ public void setPrefix(final String prefix) { if (LOG.isDebugEnabled()) LOG.debug("Externalizer prefix changed from "+this.prefix + " to "+prefix); this.prefix = prefix; } protected final String createIdentifier() { return getPrefix() + StringUtil.toShortestAlphaNumericString(getNextIdentifier()); } /** * store the {@link ExternalizedResource} in a map. * The {@link ExternalizedResource} should later on accessible by the * identifier {@link #getExternalizedResource}, {@link #removeExternalizedResource} */ protected abstract void storeExternalizedResource(String identifier, ExternalizedResource extInfo); /** * get the {@link ExternalizedResource} by identifier. * * @return null, if not found!! */ public abstract ExternalizedResource getExternalizedResource(String identifier); /** * removes the {@link ExternalizedResource} by identifier. */ public abstract void removeExternalizedResource(String identifier); /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. The object is externalized in the * {@link #SESSION} scope. * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer) { return externalize(obj, externalizer, SESSION); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. If the given headers are !=null the * headers overwrite the headers from the {@link Externalizer}. * The object is externalized in the * {@link #SESSION} scope. * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, Collection headers) { return externalize(obj, externalizer, headers, SESSION); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. Valid flags are (this may change, look * also in the static variable section) * <ul> * <li>{@link #FINAL}</li> * <li>{@link #REQUEST}</li> * <li>{@link #SESSION}</li> * <li>{@link #GLOBAL}</li> * </ul> * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, int flags) { if (obj == null || externalizer == null) throw new IllegalStateException("no externalizer"); return externalize(obj, externalizer, null, null, flags); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. If the given headers are !=null the * headers overwrite the headers from the {@link Externalizer}. * Valid flags are (this may change, look * also in the static variable section) * <ul> * <li>{@link #FINAL}</li> * <li>{@link #REQUEST}</li> * <li>{@link #SESSION}</li> * <li>{@link #GLOBAL}</li> * </ul> * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, Collection headers, int flags) { if (obj == null || externalizer == null) throw new IllegalStateException("no externalizer"); return externalize(obj, externalizer, null, headers, flags); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. * If the mimeType!=null, mimeType overwrites the mimeType of the * {@link Externalizer}. * The object is externalized in the * {@link #SESSION} scope. * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, String mimeType) { return externalize(obj, externalizer, mimeType, null, SESSION); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. * If the mimeType!=null, mimeType overwrites the mimeType of the * {@link Externalizer}. * If the given headers are !=null the * headers overwrite the headers from the {@link Externalizer}. * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers) { return externalize(obj, externalizer, mimeType, headers, SESSION); } /** * externalizes (make a java object available for a browser) an object with * the given {@link Externalizer}. * If the mimeType!=null, mimeType overwrites the mimeType of the * {@link Externalizer}. * If the given headers are !=null the * headers overwrite the headers from the {@link Externalizer}. * Valid flags are (this may change, look * also in the static variable section) * <ul> * <li>{@link #FINAL}</li> * <li>{@link #REQUEST}</li> * <li>{@link #SESSION}</li> * <li>{@link #GLOBAL}</li> * </ul> * * @return a URL for accessing the object relative to the base URL. */ public String externalize(Object obj, Externalizer externalizer, String mimeType, Collection headers, int flags) { if (externalizer == null) { throw new IllegalStateException("no externalizer"); } ExternalizedResource extInfo = new ExternalizedResource(obj, externalizer, mimeType, headers, flags); extInfo.setId(externalizer.getId(obj)); if ((flags & GLOBAL) > 0) { // session encoding is not necessary here return SystemExternalizeManager.getSharedInstance().externalize(extInfo); } else { return externalize(extInfo); } } /** * externalizes (make a java object available for a browser) the object in * extInfo. * * @return a URL for accessing the externalized object relative to the base URL. */ public String externalize(ExternalizedResource extInfo) { String identifier = (String) reverseExternalized.get(extInfo); if (identifier == null) { identifier = extInfo.getId(); if (identifier != null) identifier = "-" + identifier; else identifier = createIdentifier(); String extension = extInfo.getExtension(); if (extension != null) identifier += ("." + extension); extInfo.setId(identifier); storeExternalizedResource(identifier, extInfo); reverseExternalized.put(extInfo, identifier); } return identifier + sessionEncoding; } /** * externalizes (make a java object available for a browser) the object in * extInfo. * * @return a URL for accessing the externalized object relative to the base URL. */ public String getId(String url) { if (url == null || url.length() == 0) { return url; } String result; if (url.charAt(0) == '-') { result = url; } else { result = url.substring(0, url.length() - sessionEncoding.length()); } return result; } /** * delivers a externalized object identfied with the given identifier to a * client. * It sends an error (404), if the identifier is not registered. */ public void deliver(String identifier, HttpServletResponse response, Device out) throws IOException { ExternalizedResource extInfo = getExternalizedResource(identifier); if (extInfo == null) { LOG.warn("identifier " + identifier + " not found"); response.sendError(HttpServletResponse.SC_NOT_FOUND); return; } deliver(extInfo, response, out); } public void deliver(ExternalizedResource extInfo, HttpServletResponse response, Device out) throws IOException { /* FIXME: re-implement. if ( extInfo.deliverOnce() ) { removeExternalizedResource(identifier); } */ if (extInfo.getMimeType() != null) { response.setContentType(extInfo.getMimeType()); } // FIXME find out, if this is correct: if the content length // is not size preserving (like a gzip-device), then we must not // send the content size we know.. if (out.isSizePreserving()) { int resourceLen = extInfo .getExternalizer().getLength(extInfo.getObject()); if (resourceLen > 0) { LOG.debug(extInfo.getMimeType() + ": " + resourceLen); response.setContentLength(resourceLen); } } Collection headers = extInfo.getHeaders(); if (headers != null) { for (Object header : headers) { Map.Entry entry = (Map.Entry) header; if (entry.getValue() instanceof String) { response.addHeader((String) entry.getKey(), (String) entry.getValue()); } else if (entry.getValue() instanceof Date) { response.addDateHeader((String) entry.getKey(), ((Date) entry.getValue()).getTime()); } else if (entry.getValue() instanceof Integer) { response.addIntHeader((String) entry.getKey(), ((Integer) entry.getValue()).intValue()); } // end of if () } } if (!response.containsHeader("Expires")) { /* * This would be the correct way to do it; alas, that means, that * for static resources, after a day or so, no caching could take * place, since the last modification was at the first time, the * resource was externalized (since it doesn't change). * .. have to think about it. */ //response.setDateHeader("Expires", // (1000*FINAL_EXPIRES) // + extInfo.getLastModified()); // .. so do this for now, which is the best approximation of what // we want. response.setDateHeader("Expires", System.currentTimeMillis() + (1000 * FINAL_EXPIRES)); } try { extInfo.getExternalizer().write(extInfo.getObject(), out); } catch (ResourceNotFoundException e) { LOG.debug("Unable to deliver resource due to: " + e.getMessage()+". Sending 404!"); response.reset(); response.sendError(404, e.getMessage()); } out.flush(); } public void clear() { reverseExternalized.clear(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0456ba2853c8cff51d9d5f9bf4deafe564f43b24
0916bcdb00bfef0626840ccc15cf355f38b6589f
/src/age/mpg/de/peanut/databases/kegg/jaxb/Relation.java
19cc314d7811ad0c767795766a731b3999ac2b4f
[]
no_license
FalkoHof/PEANuT
dbfc4bdb6706b24fefc66dc756cca6299ffd0751
90d03d8377ee0a48c67a6bd5e7bd59e84030c651
refs/heads/master
2020-08-30T06:41:18.414381
2019-10-29T15:05:09
2019-10-29T15:05:09
218,293,879
0
0
null
null
null
null
UTF-8
Java
false
false
3,504
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.02.25 at 05:07:26 PM CET // package age.mpg.de.peanut.databases.kegg.jaxb; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "subtype" }) @XmlRootElement(name = "relation") public class Relation { @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String entry1; @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String entry2; @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String type; protected List<Subtype> subtype; /** * Gets the value of the entry1 property. * * @return * possible object is * {@link String } * */ public String getEntry1() { return entry1; } /** * Sets the value of the entry1 property. * * @param value * allowed object is * {@link String } * */ public void setEntry1(String value) { this.entry1 = value; } /** * Gets the value of the entry2 property. * * @return * possible object is * {@link String } * */ public String getEntry2() { return entry2; } /** * Sets the value of the entry2 property. * * @param value * allowed object is * {@link String } * */ public void setEntry2(String value) { this.entry2 = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link String } * */ public String getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link String } * */ public void setType(String value) { this.type = value; } /** * Gets the value of the subtype property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the subtype property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubtype().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Subtype } * * */ public List<Subtype> getSubtype() { if (subtype == null) { subtype = new ArrayList<Subtype>(); } return this.subtype; } }
[ "falkohofmann@gmail.com" ]
falkohofmann@gmail.com
4f26f0762b2dc363b69094f28a2c76a8e8f8e549
d5a7627cedac0624572ec04f41b434ac29d7a8b3
/src/test/java/org/magenta/testing/domain/company/PhoneNumberGenerator.java
41c3780094445a160d70d061a9c34dfd05ecc279
[ "MIT" ]
permissive
letrait/magenta
5bda99622ddff264c0aa27ddbb2736fc9747a09b
de1cf334e85dff8e5884002903b6cee2a4ec59f9
refs/heads/master
2021-01-18T23:08:23.052907
2018-10-15T14:29:22
2018-10-15T14:29:22
23,602,798
3
1
MIT
2018-01-03T23:14:24
2014-09-03T01:57:50
Java
UTF-8
Java
false
false
410
java
package org.magenta.testing.domain.company; import org.magenta.random.FluentRandom; import com.google.common.base.Supplier; public class PhoneNumberGenerator implements Supplier<PhoneNumber>{ @Override public PhoneNumber get() { PhoneNumber phoneNumber = new PhoneNumber(); phoneNumber.setPhoneNumber(FluentRandom.strings().generateFromExample("555-528-7878")); return phoneNumber; } }
[ "ngagnon@expedia.com" ]
ngagnon@expedia.com
354c5163557ac7776b9f6f8101a4788c2494e8bc
5601806af485b323dd039a079f50bac6c9d6f54e
/ozgertu project/src/AiBANK/server/Server.java
c43b5f547bc9d6c83784c7ae00216f2867eaca16
[]
no_license
AiBankProject/refreshMyDepbar
a99520f452e85a6884857c63f1192dab54c65140
f84c14482d70df391defd1b243eee8a9142fd6bb
refs/heads/master
2022-07-31T22:27:24.853237
2020-05-23T05:37:55
2020-05-23T05:37:55
266,270,421
0
0
null
null
null
null
UTF-8
Java
false
false
6,464
java
package AiBANK.server; import AiBANK.dataB.Deposit; import AiBANK.dataB.User; import AiBANK.dataB.Transfer; import java.net.ServerSocket; import java.net.Socket; import java.sql.*; import java.util.ArrayList; import java.util.Date; public class Server { public static Connection connection; public static void main(String[] args) { try { Class.forName("com.mysql.cj.jdbc.Driver"); connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/db?useUnicode=true&serverTimezone=UTC","root", ""); ServerSocket ss = new ServerSocket(1400); while(true){ Socket s = ss.accept(); ServerThread st = new ServerThread(s); st.start(); } } catch (Exception e) { e.printStackTrace(); } } public static boolean registerUser(User user){ int rows = 0; try{ PreparedStatement statement = connection.prepareStatement("INSERT INTO users (id, login, password, name, role,numberCard,cvc,balance) VALUES (null, ?, ?, ?, ?,?,?,?)"); statement.setString(1, user.getLogin()); statement.setString(2, user.getPassword()); statement.setString(3, user.getName()); statement.setString(4, "USER"); statement.setInt(5,user.getNumberCard()); statement.setInt(6,user.getCvc()); statement.setInt(7,0); rows = statement.executeUpdate(); statement.close(); } catch(Exception e){e.printStackTrace();} if(rows == 1) return true; return false; } public static User loginUser(User user){ User authUser = null; try{ PreparedStatement statement = connection.prepareStatement("SELECT * FROM users WHERE login = ? AND password = ?"); statement.setString(1, user.getLogin()); statement.setString(2, user.getPassword()); ResultSet result = statement.executeQuery(); if(result.next()){ authUser = new User( result.getLong("id"), result.getString("login"), result.getString("password"), result.getString("name"), result.getString("role"), result.getInt("numberCard"), result.getInt("cvc"), result.getInt("balance") ); } statement.close(); } catch(Exception e){e.printStackTrace();} return authUser; } public static ArrayList<Transfer> getAllUserTransfers(int un){ ArrayList<Transfer> userbooks=new ArrayList<>(); try { PreparedStatement statement=connection.prepareStatement("SELECT * FROM transfer WHERE who=?"); statement.setInt(1, un); ResultSet resultSet=statement.executeQuery(); while(resultSet.next()){ int towhom=resultSet.getInt("towhom"); int howmany=resultSet.getInt("howmany"); Date date=resultSet.getTimestamp("date"); userbooks.add(new Transfer(towhom, howmany, date)); } statement.close(); } catch (SQLException e) { e.printStackTrace(); } return userbooks; } public static boolean totransfer(Transfer transfer){ int rows=0; try{ PreparedStatement statement = connection.prepareStatement("INSERT INTO transfer (who, towhom, howmany, date) VALUES (?, ?, ?, NOW())"); statement.setInt(1, transfer.getWho()); statement.setInt(2, transfer.getTowhom()); statement.setInt(3, transfer.getHowmany()); statement.executeUpdate(); statement.close(); statement = connection.prepareStatement("UPDATE users SET balance=balance-? WHERE numberCard=?"); statement.setInt(1,transfer.getHowmany()); statement.setInt(2, transfer.getWho()); statement.executeUpdate(); statement.close(); statement = connection.prepareStatement("UPDATE users SET balance=balance+? WHERE numberCard=?"); statement.setInt(1,transfer.getHowmany()); statement.setInt(2, transfer.getTowhom()); statement.executeUpdate(); statement.close(); } catch(Exception e){e.printStackTrace();} if(rows == 0) return true; return false; } public static boolean todeposit(Deposit deposit){ int rows=0; try{ PreparedStatement statement = connection.prepareStatement("INSERT INTO deposit (who,sum,percent,month,date) VALUES (?, ?, ?,?, NOW())"); statement.setString(1, deposit.getWho()); statement.setInt(2, deposit.getSum()); statement.setInt(3, deposit.getPercent()); statement.setInt(4, deposit.getMonth()); statement.executeUpdate(); statement.close(); // statement = connection.prepareStatement("UPDATE users SET balance=balance-? WHERE numberCard=?"); // statement.setInt(1,transfer.getHowmany()); // statement.setInt(2, transfer.getWho()); // // statement.executeUpdate(); // statement.close(); // // statement = connection.prepareStatement("UPDATE users SET balance=balance+? WHERE numberCard=?"); // statement.setInt(1,transfer.getHowmany()); // statement.setInt(2, transfer.getTowhom()); // // statement.executeUpdate(); // statement.close(); } catch(Exception e){e.printStackTrace();} if(rows == 0) return true; return false; } public static int getAfterBal(int un){ int b= 0; try { PreparedStatement statement=connection.prepareStatement("SELECT * FROM users WHERE numberCard=?"); statement.setInt(1, un); ResultSet resultSet=statement.executeQuery(); while(resultSet.next()){ int bal=resultSet.getInt("balance"); b=bal; } statement.close(); } catch (SQLException e) { e.printStackTrace(); } return b ; } }
[ "abdyhaniajdar@gmail.com" ]
abdyhaniajdar@gmail.com
a963e091072e86c3b30297bcf382a656463f84a6
da2ccd077b65104383f8ab6825700085208a48c2
/TexasHoldem/src/main/java/Model/Suit.java
c2061dc0eb5eedd63a5dd15726a6c7be111d7b3f
[]
no_license
vdhorvath/vdhorvath
5aa9837519a80a6814e86aff923a12c4bd36db1d
3fe9465fde9525a8fb935c8739034b6f5a9b9918
refs/heads/master
2022-12-23T11:41:24.643484
2020-09-21T15:53:54
2020-09-21T15:53:54
260,778,496
1
1
null
null
null
null
UTF-8
Java
false
false
71
java
package Model; public enum Suit { Clubs, Diamonds, Hearts, Spades }
[ "horvath.v@husky.neu.edu" ]
horvath.v@husky.neu.edu
f8f643baaf6cf8871c7d3463242c092a1d0449ce
97ed76f32897dcef4b0f9ec68a5fa4f1cae26928
/src/test/java/com/spring/henallux/phD_Garden/PhDGardenApplicationTests.java
061eaeadf6c8184aca522b4fa64c53499525bf0c
[]
no_license
Daniellyson/PhD_Garden
2f494346d76bab0bd9544b5f63cefd6434c5750f
259725b202618b43cbfc44193c6b84febef56ec9
refs/heads/master
2021-07-12T03:13:35.493244
2020-09-27T16:33:30
2020-09-27T16:33:30
213,422,900
0
0
null
2020-10-14T00:33:45
2019-10-07T15:41:55
Java
UTF-8
Java
false
false
350
java
package com.spring.henallux.phD_Garden; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class PhDGardenApplicationTests { @Test public void contextLoads() { } }
[ "etu32290@henallux.be" ]
etu32290@henallux.be
e39013dc91c689f721a4e74eea9b9a363c70b9a6
18df36bf4e2dba7dab0e5e499f4306a76c43e630
/src/main/java/com/yahoo/exceptions/BadQueryException.java
99d9ce160b0256deb921d7b4ec646fd9e3dc640a
[]
no_license
cjcharles777/Yahoo-Fantasy-Football-API-Library
704fe6fabdbe68083623b1a6009f7c393f4cd633
9fb449166e422a72d8fb9936c2e1cfd639840c56
refs/heads/master
2021-01-23T13:29:49.456296
2016-10-07T03:44:58
2016-10-07T03:44:58
24,695,091
5
4
null
2016-02-23T22:00:54
2014-10-01T20:55:02
Java
UTF-8
Java
false
false
125
java
package com.yahoo.exceptions; /** * Created by cedric on 10/8/14. */ public class BadQueryException extends Exception { }
[ "cjcharles777@gmail.com" ]
cjcharles777@gmail.com
0d7b734d9ea2566780d82b6d5eedcb37ec089451
c4b515badb677d073d44023624ed9a3cae12a7f9
/com.kita.first/src/com/kita/first/practice/Practice18.java
9d72c60aa0bad06eaa70e051861a6e2399333a55
[]
no_license
Juyeong728/JAVA1_koreait
fbf9422017349ec35c36856bc43106da7154bb57
7a42f50b9f1080ea20be956131b54eccf8c859f6
refs/heads/master
2023-02-28T01:36:13.703069
2021-02-03T06:45:10
2021-02-03T06:45:10
325,193,231
0
0
null
null
null
null
UTF-8
Java
false
false
359
java
package com.kita.first.practice; public class Practice18 { public static void main(String[] args) { int dan = 4; for(int i=1; i<=9; i++) { System.out.printf("%d * %d = %d\n", dan, i, dan*i); } System.out.println(); int i=1; while(i<=9) { System.out.printf("%d * %d = %d\n", dan, i, dan*i); i++; } } }
[ "j8025y@naver.com" ]
j8025y@naver.com
dd523cd2a77bf1194c5c99310e27418a40988c8f
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
/cards/src/main/java/org/rnd/jmagic/cards/VensersJournal.java
53f0de838886d4ab89ba844f5d002e9f61e5f0b4
[]
no_license
NorthFury/jmagic
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
efe53d9d02716cc215456e2794a43011759322d9
refs/heads/master
2020-05-28T11:04:50.631220
2014-06-17T09:48:44
2014-06-17T09:48:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Venser's Journal") @Types({Type.ARTIFACT}) @ManaCost("5") @Printings({@Printings.Printed(ex = Expansion.SCARS_OF_MIRRODIN, r = Rarity.RARE)}) @ColorIdentity({}) public final class VensersJournal extends Card { public static final class SpellbookAbility extends StaticAbility { public SpellbookAbility(GameState state) { super(state, "You have no maximum hand size."); ContinuousEffect.Part part = new ContinuousEffect.Part(ContinuousEffectType.SET_MAX_HAND_SIZE); part.parameters.put(ContinuousEffectType.Parameter.PLAYER, ControllerOf.instance(This.instance())); part.parameters.put(ContinuousEffectType.Parameter.RESTRICTION, Empty.instance()); this.addEffectPart(part); } } public static final class VensersJournalAbility1 extends EventTriggeredAbility { public VensersJournalAbility1(GameState state) { super(state, "At the beginning of your upkeep, you gain 1 life for each card in your hand."); this.addPattern(atTheBeginningOfYourUpkeep()); this.addEffect(gainLife(You.instance(), Count.instance(InZone.instance(HandOf.instance(You.instance()))), "You gain 1 life for each card in your hand.")); } } public VensersJournal(GameState state) { super(state); // You have no maximum hand size. this.addAbility(new SpellbookAbility(state)); // At the beginning of your upkeep, you gain 1 life for each card in // your hand. this.addAbility(new VensersJournalAbility1(state)); } }
[ "robyter@gmail" ]
robyter@gmail
a473b65634a23e1566153ef59db3e184807a73c5
28b2631d4477dcb248fcca3afbc52c9fb2c6ece2
/app/src/main/java/com/androchunk/customiconspinner/CustomAdapter.java
70516951fec060a2c43c33356acdc75c554c811e
[]
no_license
Androchunk/CustomIconSpinner
cd76266df5329e7f679982ecec00f444ff355f24
59bac60ae0833ae34ccd3d98803da452d2a4364b
refs/heads/master
2020-04-20T09:47:34.615146
2019-02-01T23:39:38
2019-02-01T23:39:38
168,774,122
2
1
null
null
null
null
UTF-8
Java
false
false
1,950
java
package com.androchunk.customiconspinner; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; public class CustomAdapter extends ArrayAdapter<CustomItem> { public CustomAdapter(@NonNull Context context, ArrayList<CustomItem> customList) { super(context, 0, customList); } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(getContext()).inflate(R.layout.custom_spinner_layout, parent, false); } CustomItem item = getItem(position); ImageView spinnerIV = convertView.findViewById(R.id.ivSpinnerLayout); TextView spinnerTV = convertView.findViewById(R.id.tvSpinnerLayout); if (item != null) { spinnerIV.setImageResource(item.getSpinnerItemImage()); spinnerTV.setText(item.getSpinnerItemName()); } return convertView; } @Override public View getDropDownView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(getContext()).inflate(R.layout.custom_dropdown_layout, parent, false); } CustomItem item = getItem(position); ImageView dropDownIV = convertView.findViewById(R.id.ivDropDownLayout); TextView dropDownTV = convertView.findViewById(R.id.tvDropDownLayout); if (item != null) { dropDownIV.setImageResource(item.getSpinnerItemImage()); dropDownTV.setText(item.getSpinnerItemName()); } return convertView; } }
[ "mahavirsinhrathod60@gmail.com" ]
mahavirsinhrathod60@gmail.com
57672d01d11358783548b3d9575c6329112972d8
16bfe4d91fa6d8c7cd1dce4db0d409e9c3ddc2af
/raj/arrays/FindLargesParisSumInUnsortedArray.java
725e4e2be9a3b3bb72cd2627d8504384cf4146f2
[]
no_license
passionatecoderraj/dsa
84eb03b524efeb81012c91491fc3dce9aa65aa7a
b8a9654fed1183e464915fb4b8481ae10fe266d6
refs/heads/master
2020-05-21T12:24:38.812925
2020-01-21T04:29:58
2020-01-21T04:29:58
48,559,484
8
6
null
null
null
null
UTF-8
Java
false
false
970
java
/** * */ package com.raj.arrays; /** * @author Raj * */ /* * Given an unsorted of distinct integers, find the largest pair sum in it. */ public class FindLargesParisSumInUnsortedArray { /** * @param args */ public static void main(String[] args) { FindLargesParisSumInUnsortedArray obj = new FindLargesParisSumInUnsortedArray(); int a[] = { 12, 34, 10, 6, 40 }; int n = a.length, result = -1; // Time : O(n), Space : O(1) result = obj.findLargestPairSumInArray(a, n); System.out.println(result); } public int findLargestPairSumInArray(int[] a, int n) { if (n <= 2) return -1; int firstmax, secondmax; secondmax = Integer.MIN_VALUE; firstmax = a[0]; for (int i = 1; i < n; i++) { if (a[i] > firstmax) { secondmax = firstmax; firstmax = a[i]; } else if (a[i] > secondmax) { secondmax = a[i]; } } System.out.println("1st=" + firstmax + ",2nd=" + secondmax); return firstmax + secondmax; } }
[ "passionatecoderraj@gmail.com" ]
passionatecoderraj@gmail.com
a98dfd434d91198d9f2607e1b189f03da5819cf4
d1fd0c4703f46b854103d442e14569dc7b2a8b68
/libraries/FFMpeg/src/main/java/com/nativelibs4java/ffmpeg/avcodec/RcOverride.java
e0e3a4798e039fbe42e87c5311a3770be7251318
[]
no_license
jonhare/nativelibs4java
ba239d2dee11156d6e6cc57c28b41b8c6d8100e1
07565be828ad8bb7d8dad9051616f16d40a9d16a
refs/heads/master
2020-12-25T17:45:59.682097
2020-10-17T14:14:52
2020-10-17T14:14:52
5,001,967
1
3
null
null
null
null
UTF-8
Java
false
false
2,166
java
package com.nativelibs4java.ffmpeg.avcodec; import org.bridj.Pointer; import org.bridj.StructObject; import org.bridj.ann.Field; import org.bridj.ann.Library; /** * <i>native declaration : libavcodec/avcodec.h</i><br> * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br> * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br> * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> . */ @Library("avcodec") public class RcOverride extends StructObject { public RcOverride() { super(); } public RcOverride(Pointer pointer) { super(pointer); } @Field(0) public int start_frame() { return this.io.getIntField(this, 0); } @Field(0) public RcOverride start_frame(int start_frame) { this.io.setIntField(this, 0, start_frame); return this; } public final int start_frame_$eq(int start_frame) { start_frame(start_frame); return start_frame; } @Field(1) public int end_frame() { return this.io.getIntField(this, 1); } @Field(1) public RcOverride end_frame(int end_frame) { this.io.setIntField(this, 1, end_frame); return this; } public final int end_frame_$eq(int end_frame) { end_frame(end_frame); return end_frame; } /// If this is 0 then quality_factor will be used instead. @Field(2) public int qscale() { return this.io.getIntField(this, 2); } /// If this is 0 then quality_factor will be used instead. @Field(2) public RcOverride qscale(int qscale) { this.io.setIntField(this, 2, qscale); return this; } public final int qscale_$eq(int qscale) { qscale(qscale); return qscale; } @Field(3) public float quality_factor() { return this.io.getFloatField(this, 3); } @Field(3) public RcOverride quality_factor(float quality_factor) { this.io.setFloatField(this, 3, quality_factor); return this; } public final float quality_factor_$eq(float quality_factor) { quality_factor(quality_factor); return quality_factor; } }
[ "olivier.chafik@gmail.com" ]
olivier.chafik@gmail.com
335e92f8130a31775ea6a14b2858d0342eacf34e
0d1bf82e9186eb9af756b524258f26642878af3e
/src/main/java/com/info/model/Invoice.java
bbdf4515a19db4b82bf13a11f8d01b8ef7bd810c
[]
no_license
ilefabd/HelloWorld
1105e03c3dbb5578df751d78f22d6a6e4b211443
b7cd071c412429ecde1b1370e4f46e167f21bb5e
refs/heads/master
2018-07-19T15:55:38.291211
2018-06-01T23:45:09
2018-06-01T23:45:09
120,005,954
0
0
null
null
null
null
UTF-8
Java
false
false
2,939
java
package com.info.model; import java.io.Serializable; import java.util.Date; 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.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Table(name = "invoice") public class Invoice { @Id @GeneratedValue(strategy = GenerationType.TABLE) private Long invoiceNumber; @Column(name = "status") private String status ; @Column(name = "total_amount") private double total_amount ; @Column(name="issue_date") private Date issue_date ; @Column(name="detail") private String detail; @Column(name="Organisation") private String Organisation ; @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="user_Invoice") private User user; public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } public String getOrganisation() { return Organisation; } public void setOrganisation(String organisation) { Organisation = organisation; } public void setInvoiceNumber(Long invoiceNumber) { this.invoiceNumber = invoiceNumber; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public double getTotal_amount() { return total_amount; } public void setTotal_amount(double total_amount) { this.total_amount = total_amount; } public Date getIssue_date() { return issue_date; } public void setIssue_date(Date issue_date) { this.issue_date = issue_date; } public Long getInvoiceNumber() { return invoiceNumber; } public void setInvoiceNumber(long invoiceNumber) { this.invoiceNumber = invoiceNumber; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Invoice() { super(); } public Invoice(String status, double total_amount, Date issue_date, String detail, String organisation, User user) { super(); this.status = status; this.total_amount = total_amount; this.issue_date = issue_date; this.detail = detail; Organisation = organisation; this.user = user; } public Invoice(Long invoiceNumber, String organisation, Date issue_date ,String status, double total_amount) { super(); this.invoiceNumber = invoiceNumber; this.Organisation = organisation; this.issue_date = issue_date; this.status = status; this.total_amount = total_amount; } public Invoice(String status, double total_amount) { super(); this.status = status; this.total_amount = total_amount; } @Override public String toString() { return "Invoice [invoice_number=" + invoiceNumber + ", status=" + status + ", total_amount=" + total_amount + ", issue_date=" + issue_date + "]"; } }
[ "ilef.abd@gmail.com" ]
ilef.abd@gmail.com
04fbaf55e707390f636a2771e6e80270edf09aca
8859a7777b80bf0015e7079149daf7f6bfe5315c
/src/main/java/WordCount.java
f0c0e6f15572452d50e8c51704445bf6be25b736
[]
no_license
Tip0k/lohika
841f77f3f53c0a0997165e5886afb0144591d79b
f9368c9b8df9c4211339e140900e02ad8e4a47f3
refs/heads/master
2021-01-19T15:05:19.081079
2017-08-21T11:01:33
2017-08-21T11:01:33
100,943,318
0
0
null
null
null
null
UTF-8
Java
false
false
2,137
java
//package main.java; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; public class WordCount { public static final String REGEX = "[a-zA-Z]+"; public static void main(String[] args) throws IOException { int countOfPrintLines = Integer.MAX_VALUE; if (args.length < 1) { System.out.println("Incorrect input!"); return; } else if (args.length > 1) { countOfPrintLines = Integer.parseInt(args[1]); } WordCount wordCount = new WordCount(); wordCount.sortAndPrint(wordCount.getCountedMap(new File(args[0])), countOfPrintLines); } public List<String> getWordsByRegEx(String input, String regex) { List<String> words = new ArrayList<>(); Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(input); while (matcher.find()) { String word = matcher.group(0); words.add(word); } return words; } public Map<String, Integer> getCountedMap(File file) throws IOException { Map<String, Integer> map = new HashMap<>();// Files.lines(file.toPath()).collect(Collectors.toMap()) Files.lines(file.toPath()).forEach((line) -> { for (String word : getWordsByRegEx(line, REGEX)) { if (map.containsKey(word)) { map.put(word, map.get(word) + 1); } else { map.put(word, 1); } } }); return map; } public void sortAndPrint(Map<String, Integer> map, int count) { List<Map.Entry<String, Integer>> sortedList = map.entrySet().stream().sorted((e1, e2) -> { if (e1.getValue().intValue() < e2.getValue().intValue()) { return 1; } else if (e1.getValue().intValue() > e2.getValue().intValue()) { return -1; } else { return e1.getKey().compareTo(e2.getKey()); } }).collect(Collectors.toList()); if(count > sortedList.size()) count = sortedList.size(); for (int i = 0; i < count; i++) { System.out.println(sortedList.get(i).getKey() + "=" + sortedList.get(i).getValue()); } } }
[ "a.tymofiev@gmail.com" ]
a.tymofiev@gmail.com
625381b8e2ea2fdc5d42d92ba2d640ae5ed2ba21
dc2a76a3feedbe90aa709e6134a41d3e11b18758
/IC14/src/KeepingTrack/MyCustomFrame.java
c79f751f214c9ffb1eb2dc0ff7dff61d6b43b925
[]
no_license
mqazi5-occ/CS272
1b08a7003a06ef3c3ee366e79329a21891649f94
d3f670bac12c0115ee5fc7efaa2d462d24113f7b
refs/heads/master
2020-08-01T07:39:52.750617
2019-12-04T20:01:52
2019-12-04T20:01:52
204,551,367
0
0
null
null
null
null
UTF-8
Java
false
false
3,051
java
package KeepingTrack; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JComponent; import java.awt.Color; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.Dimension; public class MyCustomFrame extends JFrame { private JButton button1, button2; private JLabel countL, trendL; private JPanel panel; private JComponent component; private JTextField countT, trendT; private static final int FRAME_WIDTH = 500; private static final int FRAME_HEIGHT = 500; private static final int COMPONENT_WIDTH = 400; private static final int COMPONENT_HEIGHT = 400; private static int count = 0; // Constructor public MyCustomFrame() { createComponents(); setSize(FRAME_WIDTH, FRAME_HEIGHT); } private void createComponents() { // Create the GUI components // Create the buttons button1 = new JButton("Up"); button2 = new JButton("Down"); // Connect the listeners (event handlers) to the buttons button1.addActionListener(new Increment()); button2.addActionListener(new Decrement()); // Create the label countL = new JLabel("Count: "); trendL = new JLabel("Trend: "); countT = new JTextField(10); trendT = new JTextField(10); trendT.setText("Flat"); // Create the component (which we will use draw things) component = new MyCustomComponent(); component.setPreferredSize(new Dimension(COMPONENT_WIDTH, COMPONENT_HEIGHT)); // Create the panel and add the GUI components to the panel panel = new JPanel(); panel.add(countL); panel.add(countT); panel.add(trendL); panel.add(trendT); panel.add(button1); panel.add(button2); //panel.setBackground(Color.RED); panel.add(component); // Add the panel to the frame this.add(panel); } // Event handlers class Increment implements ActionListener { public void actionPerformed(ActionEvent event) { count++; countT.setText("" + count); trendT.setText("Rising"); Graphics g = component.getGraphics(); g.setColor(Color.blue); g.fillOval(100, 100, component.getWidth()/2, component.getHeight()/2); } } class Decrement implements ActionListener { public void actionPerformed(ActionEvent event) { count--; countT.setText("" + count); trendT.setText("Falling"); Graphics g = component.getGraphics(); g.setColor(Color.red); g.fillOval(100, 100, component.getWidth()/2, component.getHeight()/2); } } }
[ "Usman@DESKTOP-VNK4MV0" ]
Usman@DESKTOP-VNK4MV0
2501d1cd4da37852de9cbc9b7f8a3ef880c52fe5
dcba5e18b1f5525852ce9e889172398fb077a6fd
/app/src/main/java/org/linphone/assistant/RemoteProvisioningActivity.java
cfc104955b700043875655db08789dcd73280cc2
[ "Apache-2.0" ]
permissive
BraveJa/linphone-android
c7924a8b9f3afcf146ca90ca8a3b20a88508b514
4d6b681429ccc2a1c8bae0c7d73475317090aa71
refs/heads/master
2020-04-22T21:22:04.561459
2019-02-14T10:58:48
2019-02-14T10:58:48
170,671,696
2
1
null
null
null
null
UTF-8
Java
false
false
6,463
java
package org.linphone.assistant; /* RemoteProvisioningActivity.java Copyright (C) 2017 Belledonne Communications, Grenoble, France This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import org.linphone.LinphoneLauncherActivity; import org.linphone.LinphoneManager; import org.linphone.LinphonePreferences; import org.linphone.LinphoneService; import org.linphone.R; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.RemoteProvisioningState; import org.linphone.core.LinphoneCoreListenerBase; import org.linphone.mediastream.Log; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.widget.ProgressBar; import android.widget.Toast; public class RemoteProvisioningActivity extends Activity { private Handler mHandler = new Handler(); private String configUriParam = null; private ProgressBar spinner; private LinphoneCoreListenerBase mListener; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.remote_provisioning); spinner = (ProgressBar) findViewById(R.id.spinner); mListener = new LinphoneCoreListenerBase(){ @Override public void configuringStatus(LinphoneCore lc, final RemoteProvisioningState state, String message) { if (spinner != null) spinner.setVisibility(View.GONE); if (state == RemoteProvisioningState.ConfiguringSuccessful) { goToLinphoneActivity(); } else if (state == RemoteProvisioningState.ConfiguringFailed) { Toast.makeText(RemoteProvisioningActivity.this, R.string.remote_provisioning_failure, Toast.LENGTH_LONG).show(); } } }; } @Override protected void onResume() { super.onResume(); LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); if (lc != null) { lc.addListener(mListener); } LinphonePreferences.instance().setContext(this); checkIntentForConfigUri(getIntent()); } @Override protected void onPause() { LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); if (lc != null) { lc.removeListener(mListener); } super.onPause(); } @Override protected void onDestroy() { super.onDestroy(); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); checkIntentForConfigUri(intent); } private void checkIntentForConfigUri(final Intent intent) { new Thread(new Runnable() { @Override public void run() { Uri openUri = intent.getData(); if (openUri != null) { // We expect something like linphone-config://http://linphone.org/config.xml configUriParam = openUri.getEncodedSchemeSpecificPart().substring(2); // Removes the linphone-config:// try { configUriParam = URLDecoder.decode(configUriParam, "UTF-8"); } catch (UnsupportedEncodingException e) { Log.e(e); } Log.d("Using config uri: " + configUriParam); } if (configUriParam == null) { if (!LinphonePreferences.instance().isFirstRemoteProvisioning()) { mHandler.post(new Runnable() { @Override public void run() { goToLinphoneActivity(); } }); } else if (!getResources().getBoolean(R.bool.forbid_app_usage_until_remote_provisioning_completed)) { // Show this view for a few seconds then go to the dialer mHandler.postDelayed(new Runnable() { @Override public void run() { goToLinphoneActivity(); } }, 1500); } // else we do nothing if there is no config uri parameter and if user not allowed to leave this screen } else { if (getResources().getBoolean(R.bool.display_confirmation_popup_after_first_configuration) && !LinphonePreferences.instance().isFirstRemoteProvisioning()) { mHandler.post(new Runnable() { @Override public void run() { displayDialogConfirmation(); } }); } else { mHandler.post(new Runnable() { @Override public void run() { setRemoteProvisioningAddressAndRestart(configUriParam); } }); } } } }).start(); } private void displayDialogConfirmation() { new AlertDialog.Builder(RemoteProvisioningActivity.this) .setTitle(getString(R.string.remote_provisioning_again_title)) .setMessage(getString(R.string.remote_provisioning_again_message)) .setPositiveButton(R.string.accept, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { setRemoteProvisioningAddressAndRestart(configUriParam); } }) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { goToLinphoneActivity(); } }) .show(); } private void setRemoteProvisioningAddressAndRestart(final String configUri) { if (spinner != null) spinner.setVisibility(View.VISIBLE); LinphonePreferences.instance().setContext(this); // Needed, else the next call will crash LinphonePreferences.instance().setRemoteProvisioningUrl(configUri); mHandler.postDelayed(new Runnable() { @Override public void run() { LinphoneManager.getInstance().restartLinphoneCore(); } }, 1000); } private void goToLinphoneActivity() { if (LinphoneService.isReady()) { LinphoneService.instance().setActivityToLaunchOnIncomingReceived("org.linphone.LinphoneLauncherActivity"); //finish(); // To prevent the user to come back to this page using back button startActivity(new Intent().setClass(this, LinphoneLauncherActivity.class)); } else { finish(); } } }
[ "u6666666u@163.com" ]
u6666666u@163.com
09cf01a67159e5a6af134a64f83b534d12b51e80
e8ee01c0f6baf20249347b023a1a8784de4e984f
/src/Praktikum6/src/percobaan4/ClassA.java
bf8e4f857d71d185e7dfe72dfbe6700ddb04e389
[]
no_license
titaw1/Praktikum-PBO-2020
5cdd6431e7381296d849774efef2560836ba467d
5bf1fd3e1f39d5d7626b632490ea0606501d537a
refs/heads/master
2023-02-08T13:01:59.150180
2020-12-29T13:00:43
2020-12-29T13:00:43
293,171,854
0
0
null
null
null
null
UTF-8
Java
false
false
333
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 percobaan4; /** * * @author tita */ public class ClassA { ClassA(){ System.out.println("konstruktor A dijalankan"); } }
[ "wijayantitita094@gmail.com" ]
wijayantitita094@gmail.com
7f41e4d41f3f589f9cda110e1bc90e2fc4a59a8b
8c6a96e981f7217664479204300aaaec7f9e7ff7
/src/greedy/problem/MultiplyOrAddSample.java
1a1f3e6c3ea1672328e6f3f781b4dd66aba01813
[]
no_license
jhhj424/java-for-coding-test
e1a9330b5e455407b30f37fb38504dfcd85b3cb9
ef7b8f6374260e67c3486764629df36dee2846b7
refs/heads/master
2023-02-17T04:27:02.166791
2021-01-12T15:03:11
2021-01-12T15:03:58
285,593,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
java
package greedy.problem; import java.util.Scanner; /* 그리디 문제 02 : 곱하기 혹은 더하기 샘플 코드 문제설명 각 자리가 숫자(0부터 9)로만 이루어진 문자열 S가 주어졌을 때, 왼쪽부터 오른쪽으로 하나씩 모든 숫자를 확인하며 숫자 사이에 'X'혹은 '+' 연산자를 넣어 결과적으로 만들어질 수 있는 가장 큰 수를 구하는 프로그램을 작성하세요. 단, +보다 X를 먼저 계산하는 일반적인 방식과는 달리, 모든 연산은 왼쪽에서부터 순서대로 이루어진다고 가정합니다. 예를 들어 02984라는 문자열이 주어지면, 만들어질 수 있는 가장 큰 수는 ((( 0 + 2 ) x 9) x 8) x 4) = 576입니다. 입력 조건 첫째 줄에 여러 개의 숫자로 구성된 하나의 문자열 S가 주어집니다. (1 <= S의 길이 <= 20) 출력 조건 첫째 줄에 만들어질 수 있는 가장 큰 수를 출력합니다. */ public class MultiplyOrAddSample { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); // 첫 번째 문자를 숫자로 변경한 값을 대입 long result = str.charAt(0) - '0'; for (int i = 1; i < str.length(); i++) { // 두 수 중에서 하나라도 '0' 혹은 '1'인 경우, 곱하기보다는 더하기 수행 int num = str.charAt(i) - '0'; if (num <= 1 || result <= 1) { result += num; } else { result *= num; } } System.out.println(result); } }
[ "jhhj424@naver.com" ]
jhhj424@naver.com
cb0b9c69f5dcde55de4682f6a778c4165a2e4c28
4ab7a948fa473e7a598ad8d707963ece12b5ea1c
/android/app/src/main/java/com/example/wechat_flutter/MainActivity.java
ac0d2030adc5fa2885ce99bb77709dc8d2d7cd73
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
fluttercandies/wechat_flutter
c2ed8da27ce9332cdbeb1689bd8f0214ff6e746d
f63adecf15347c217f3358f1b18c6dbfc7f9a145
refs/heads/master
2023-06-08T01:24:36.884287
2023-05-24T07:25:21
2023-05-24T07:25:21
221,955,320
2,497
557
Apache-2.0
2022-04-22T04:25:02
2019-11-15T15:50:50
Dart
UTF-8
Java
false
false
145
java
package com.example.wechat_flutter; import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { }
[ "zonggeu@gmail.com" ]
zonggeu@gmail.com
b75d092c822fed41f36284b87404e27cd11f7d11
911687589476041833e9de13f07a54c96932ece1
/app/src/main/java/com/projectbengkelin/MainActivity.java
38464d84b94b75bf341431f2b9465aae5ad4b969
[]
no_license
jerichosiahaya/bengkelin
05199b14bf3f150309e0858aed11dccbfa4048c5
9831ca0dc7fdb4bc640c65b197dca793d8fb4d88
refs/heads/master
2022-09-25T06:16:04.458063
2020-06-02T05:24:28
2020-06-02T05:24:28
268,705,663
2
0
null
2020-06-02T05:23:23
2020-06-02T05:04:39
Java
UTF-8
Java
false
false
6,494
java
package com.projectbengkelin; /** * Jericho Siahaya * Sabtu, 2 Mei 2020 * 20.45 * * LOGIN ACTIVITY * CHANGELOG * -- Store string nama dan email dalam SQLite yang digunakan sebagai Session **/ import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import com.android.volley.AuthFailureError; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; public class MainActivity extends AppCompatActivity { private EditText Edtemail, Edtpassword; private Button btnLogin, btnRegister; private ProgressBar loading; private static String URL_LOGIN = "https://bengkelinteam.000webhostapp.com/api/login.php/"; private Session session; private SQLite dbsqlite; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); loading = findViewById(R.id.loading); Edtemail = findViewById(R.id.email); Edtpassword = findViewById(R.id.password); btnLogin = findViewById(R.id.btnLogin); btnRegister = findViewById(R.id.btnRegister); // declare sqlite dbsqlite = new SQLite(getApplicationContext()); // declare session session = new Session(getApplicationContext()); // cek apakah user sudah pernah login if (session.isLoggedIn()) { // User is already logged in. Take to ActivityUser // Jika User telah login maka akan diarahkan ke ActivityUser Intent intent = new Intent(MainActivity.this, HomeActivity.class); startActivity(intent); } // tombol login btnLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final String email = Edtemail.getText().toString().trim(); final String pass = Edtpassword.getText().toString().trim(); final ProgressDialog progressDialog = new ProgressDialog(MainActivity.this); progressDialog.setMessage("Logging in..."); progressDialog.show(); StringRequest stringRequest=new StringRequest(Request.Method.POST, URL_LOGIN, new Response.Listener<String>() { @Override public void onResponse(String response) { try { JSONObject jsonObject = new JSONObject(response); // Toast.makeText(MainActivity.this, "Setelah Response", Toast.LENGTH_LONG).show(); int success = jsonObject.getInt("success"); // Toast.makeText(MainActivity.this, "Setelah GetString", Toast.LENGTH_LONG).show(); JSONArray jsonArray = jsonObject.getJSONArray("login"); // Toast.makeText(MainActivity.this, "Setelah GetArray", Toast.LENGTH_LONG).show(); if (success == 1) { // user successfully logged in // Create login session - membuat session session.setLogin(true); //Toast.makeText(MainActivity.this, "Setelah IF", Toast.LENGTH_LONG).show(); for (int i = 0; i < jsonArray.length(); i++) { JSONObject object = jsonArray.getJSONObject(i); String namaOBJ = object.getString("nama").trim(); String emailOBJ = object.getString("email").trim(); // menambahkan string nama dan email yang diambil dari db host // ditambahkan ke lokal db lewat parameter dbsqlite.addUser(emailOBJ, namaOBJ); Intent intent = new Intent (MainActivity.this, HomeActivity.class); startActivity(intent); finish(); loading.setVisibility(View.GONE); btnLogin.setVisibility(View.VISIBLE); } } else { Toast.makeText(MainActivity.this, "Gagal login", Toast.LENGTH_LONG).show(); } } catch (JSONException e) { e.printStackTrace(); loading.setVisibility(View.GONE); btnLogin.setVisibility(View.VISIBLE); Toast.makeText(MainActivity.this, "Error " + e.toString(), Toast.LENGTH_LONG).show(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { } }){ @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String,String>params=new HashMap<String, String>(); params.put("email",email); params.put("password",pass); return params; } }; RequestQueue requestQueue= Volley.newRequestQueue(getApplicationContext()); requestQueue.add(stringRequest); } }); // tombol register btnRegister.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { openRegisterActivity(); } }); } public void openRegisterActivity(){ Intent intent = new Intent(this, Register.class); startActivity(intent); } }
[ "jericho.siahaya@gmail.com" ]
jericho.siahaya@gmail.com
81ad2c2f6f0d42bd301bfa887a68a1a192bf9dd2
11f37c2af971187824419ed3cb751a252f6d8a19
/HACKERRANK/PowerOfBigNumbers/Solution.java
eb9e30e979ccc56c355e27802da1dd0f77e3b696
[]
no_license
devos50/programmingchallenges
c1fd97062bf85d0999d91cbf51b30a56b628972e
004e64337b1c140023f520aef15781640e108842
refs/heads/master
2020-06-07T07:30:10.246738
2015-01-19T18:29:10
2015-01-19T18:29:10
29,485,114
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
import java.math.BigInteger; import java.util.Scanner; public class Solution { public void solve(Scanner sc) { String a = sc.next(); String b = sc.next(); BigInteger aBig = new BigInteger(a); BigInteger bBig = new BigInteger(b); System.out.println(aBig.modPow(bBig, new BigInteger("1000000007"))); } public static void main(String args[]) { /* Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i = 0; i < t; i++) new Solution().solve(sc); */ for(int i = 0; i < 10; i++) { // test StringBuilder sb = new StringBuilder(); for(int j = 0; j < 100000; j++) sb.append("1"); String str = sb.toString(); BigInteger bi = new BigInteger(str); for(int j = 0; j < 100000; j++) bi.divide(new BigInteger("2")); System.out.println("HERE"); } } }
[ "mdmartijndevos@gmail.com" ]
mdmartijndevos@gmail.com
4c1681cf9aa504a572c066a4a0acf526297dda9e
70605d4581d3d68b68937b36c0dffbb2febe284d
/src/com/example/retrievevideo/personalEventActivity.java
31e793185eab2e3f1d15b469e5d75b0e9d509816
[]
no_license
ksharp555/android
044552c30b059e9bea3ff80ea7095d417226ef1a
5532f05793fac1717006cd428dc6186e41ec89c2
refs/heads/master
2020-05-27T22:11:12.814157
2017-07-26T03:42:59
2017-07-26T03:42:59
81,030,624
0
0
null
null
null
null
UTF-8
Java
false
false
4,265
java
package com.example.retrievevideo; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import com.yzi.util.PHP_getAD; import com.yzi.util.phpGetEvent; import GetLocation.GPSTracker; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; public class personalEventActivity extends Activity{ String[] itemname; String[] imagePath; String[] description; String[] adid; ListView list; String query; String[] longi; String[] lat; private Activity context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_manageevent); context = this; new retrieveDataTask().execute(); } class retrieveDataTask extends AsyncTask<Void, Void, JSONArray>{ @Override protected void onPreExecute() { // TODO Auto-generated method stub super.onPreExecute(); // Utils.showProgressDialog(GroupChattingActivity.this, // "Getting..."); } public retrieveDataTask() { } @Override protected JSONArray doInBackground(Void... params) { phpGetEvent php =new phpGetEvent("7"); JSONArray dataGroup; dataGroup = php.getdata(); return dataGroup; } protected void onPostExecute(JSONArray dataGroup) { try{ if(dataGroup == null){ finish(); }else{ itemname=new String[dataGroup.length()]; description=new String[dataGroup.length()]; imagePath=new String[dataGroup.length()]; longi = new String[dataGroup.length()]; lat = new String[dataGroup.length()]; adid = new String[dataGroup.length()]; for(int i=0; i<dataGroup.length();i++){ JSONObject jObject= dataGroup.getJSONObject(i); Log.i("jsonobject", dataGroup.getJSONObject(i).toString()); if(jObject!=null){ String title=jObject.getString("title"); Log.i("jsonobject", title); itemname[i]=title; description[i]=jObject.getString("description"); imagePath[i]=jObject.getString("picpath"); adid[i] = jObject.getString("advertisementid"); Log.i("adid-------------", jObject.getString("advertisementid")); Log.i("adid-------------", adid[i]); Log.i("position-------------", jObject.getString("location")); String lAndl[] =jObject.getString("location").split(","); lat[i] = lAndl[0].substring(1); longi[i] = lAndl[1].substring(0,lAndl[1].length()-1); Log.i("position-------------", lat[i]+" **** "+longi[i]); } } } ad_customlist adapter=new ad_customlist(context, itemname, imagePath, description); list=(ListView)findViewById(R.id.listEvent); list.setAdapter(adapter); list.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // TODO Auto-generated method stub String Slecteditem= itemname[+position]; Toast.makeText(getApplicationContext(), Slecteditem, Toast.LENGTH_SHORT).show(); LinearLayout ll = (LinearLayout) view; TextView tv = (TextView) ll.findViewById(R.id.item); String product ="This is the "+ tv.getText().toString()+ " details and it will be improved by retrieving details " + "from database and picture will be showed below"; Intent i = new Intent(getApplicationContext(), listItemDetailsActivity.class); i.putExtra("product", Slecteditem); i.putExtra("details", description[+position]); i.putExtra("lat", lat[+position]); i.putExtra("longi", longi[+position]); i.putExtra("adid", adid[+position]); startActivity(i); } }); }catch(JSONException e){ e.printStackTrace(); Log.e("internet error", "no connection"); Toast.makeText(getApplicationContext(), "no connection", Toast.LENGTH_SHORT).show(); }catch(Exception e){ e.printStackTrace(); } } } }
[ "jiahechang01@gmail.com" ]
jiahechang01@gmail.com
1893e85f781791d85fa4ffeba0107679b1f90555
757e3f8131d295dbecef760c6efcc30d07253f19
/Application/build/generated/source/r/debug/android/support/transition/R.java
a8099f9401b95fefeab501b53bb43e4102e710da
[ "Apache-2.0" ]
permissive
savanipoojan78/Test_App
e37b703089d9762565d628f546c10d909cdfb74c
912db8a19cf88e98287e1e852712fb83c9d15e00
refs/heads/master
2020-03-25T07:46:57.220021
2018-08-05T04:10:40
2018-08-05T04:11:48
143,581,855
0
0
null
null
null
null
UTF-8
Java
false
false
8,589
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.transition; public final class R { public static final class attr { public static final int font = 0x7f0400a3; public static final int fontProviderAuthority = 0x7f0400a5; public static final int fontProviderCerts = 0x7f0400a6; public static final int fontProviderFetchStrategy = 0x7f0400a7; public static final int fontProviderFetchTimeout = 0x7f0400a8; public static final int fontProviderPackage = 0x7f0400a9; public static final int fontProviderQuery = 0x7f0400aa; public static final int fontStyle = 0x7f0400ab; public static final int fontWeight = 0x7f0400ac; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f050000; } public static final class color { public static final int notification_action_color_filter = 0x7f060057; public static final int notification_icon_bg_color = 0x7f060058; public static final int ripple_material_light = 0x7f060063; public static final int secondary_text_default_material_light = 0x7f060065; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 0x7f07004b; public static final int compat_button_inset_vertical_material = 0x7f07004c; public static final int compat_button_padding_horizontal_material = 0x7f07004d; public static final int compat_button_padding_vertical_material = 0x7f07004e; public static final int compat_control_corner_material = 0x7f07004f; public static final int notification_action_icon_size = 0x7f070090; public static final int notification_action_text_size = 0x7f070091; public static final int notification_big_circle_margin = 0x7f070092; public static final int notification_content_margin_start = 0x7f070093; public static final int notification_large_icon_height = 0x7f070094; public static final int notification_large_icon_width = 0x7f070095; public static final int notification_main_column_padding_top = 0x7f070096; public static final int notification_media_narrow_margin = 0x7f070097; public static final int notification_right_icon_size = 0x7f070098; public static final int notification_right_side_padding_top = 0x7f070099; public static final int notification_small_icon_background_padding = 0x7f07009a; public static final int notification_small_icon_size_as_large = 0x7f07009b; public static final int notification_subtext_size = 0x7f07009c; public static final int notification_top_pad = 0x7f07009d; public static final int notification_top_pad_large_text = 0x7f07009e; } public static final class drawable { public static final int notification_action_background = 0x7f080081; public static final int notification_bg = 0x7f080082; public static final int notification_bg_low = 0x7f080083; public static final int notification_bg_low_normal = 0x7f080084; public static final int notification_bg_low_pressed = 0x7f080085; public static final int notification_bg_normal = 0x7f080086; public static final int notification_bg_normal_pressed = 0x7f080087; public static final int notification_icon_background = 0x7f080088; public static final int notification_template_icon_bg = 0x7f080089; public static final int notification_template_icon_low_bg = 0x7f08008a; public static final int notification_tile_bg = 0x7f08008b; public static final int notify_panel_notification_icon_bg = 0x7f08008c; } public static final class id { public static final int action_container = 0x7f09000f; public static final int action_divider = 0x7f090011; public static final int action_image = 0x7f090012; public static final int action_text = 0x7f090018; public static final int actions = 0x7f090019; public static final int async = 0x7f090022; public static final int blocking = 0x7f090026; public static final int chronometer = 0x7f090030; public static final int forever = 0x7f090053; public static final int ghost_view = 0x7f090054; public static final int icon = 0x7f090059; public static final int icon_group = 0x7f09005a; public static final int info = 0x7f09005f; public static final int italic = 0x7f090061; public static final int line1 = 0x7f090066; public static final int line3 = 0x7f090067; public static final int normal = 0x7f090078; public static final int notification_background = 0x7f090079; public static final int notification_main_column = 0x7f09007a; public static final int notification_main_column_container = 0x7f09007b; public static final int parent_matrix = 0x7f090081; public static final int right_icon = 0x7f09008a; public static final int right_side = 0x7f09008b; public static final int save_image_matrix = 0x7f09008d; public static final int save_non_transition_alpha = 0x7f09008e; public static final int save_scale_type = 0x7f09008f; public static final int tag_transition_group = 0x7f0900b6; public static final int text = 0x7f0900b8; public static final int text2 = 0x7f0900b9; public static final int time = 0x7f0900c0; public static final int title = 0x7f0900c1; public static final int transition_current_scene = 0x7f0900c7; public static final int transition_layout_save = 0x7f0900c8; public static final int transition_position = 0x7f0900c9; public static final int transition_scene_layoutid_cache = 0x7f0900ca; public static final int transition_transform = 0x7f0900cb; } public static final class integer { public static final int status_bar_notification_info_maxnum = 0x7f0a000b; } public static final class layout { public static final int notification_action = 0x7f0b0035; public static final int notification_action_tombstone = 0x7f0b0036; public static final int notification_template_custom_big = 0x7f0b003d; public static final int notification_template_icon_group = 0x7f0b003e; public static final int notification_template_part_chronometer = 0x7f0b0042; public static final int notification_template_part_time = 0x7f0b0043; } public static final class string { public static final int status_bar_notification_info_overflow = 0x7f0f0043; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f1000ee; public static final int TextAppearance_Compat_Notification_Info = 0x7f1000ef; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f1000f1; public static final int TextAppearance_Compat_Notification_Time = 0x7f1000f4; public static final int TextAppearance_Compat_Notification_Title = 0x7f1000f6; public static final int Widget_Compat_NotificationActionContainer = 0x7f10016f; public static final int Widget_Compat_NotificationActionText = 0x7f100170; } public static final class styleable { public static final int[] FontFamily = { 0x7f0400a5, 0x7f0400a6, 0x7f0400a7, 0x7f0400a8, 0x7f0400a9, 0x7f0400aa }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x01010532, 0x01010533, 0x0101053f, 0x7f0400a3, 0x7f0400ab, 0x7f0400ac }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_font = 3; public static final int FontFamilyFont_fontStyle = 4; public static final int FontFamilyFont_fontWeight = 5; } }
[ "savanipoojan78@gmail.com" ]
savanipoojan78@gmail.com
ee6afa8a7229078dd7b77f5c8a81e3060cba8c5a
d925f7568fb216d41a75624d86fc917f6b275d2a
/raite/app/src/main/java/com/adtv/raite/Main.java
e26541ba56fe3df5a66b1a14286a98d463401110
[]
no_license
Angel07084759/gplay
07640a8b82bb03ce8cc33f71e91fd49e1c42affe
8a9a4d8ad6bced32831155b03a527d0413615768
refs/heads/master
2020-04-12T00:22:04.455017
2019-12-11T08:01:47
2019-12-11T08:01:47
162,191,793
0
0
null
null
null
null
UTF-8
Java
false
false
4,870
java
package com.adtv.raite; import android.Manifest.permission; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Address; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.telephony.TelephonyManager; import android.util.Log; import android.view.View; import java.util.List; public class Main extends AppCompatActivity { static final String[] PERMISSIONS = {permission.ACCESS_FINE_LOCATION, permission.READ_PHONE_STATE }; public static String phoneNumber = null; public static User user; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); for (String permit : PERMISSIONS) { if (ActivityCompat.checkSelfPermission(this, permit) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, PERMISSIONS, 1); return; } } if ((phoneNumber = getPhoneNumber()) == null) { return; } Log.d("DEB", "Main.onCreate.phoneNumber: " + phoneNumber); new LocationTask(this, new LocationTask.LocationTaskResponse() { @Override public void onProcessFinish(List<Address> addresses) { Log.d("DEB", "Main.onCreate.LocationTask.LocationTask.result: " + addresses); if (addresses != null && addresses.size() > 0) { String latitude = addresses.get(0).getLatitude() + ""; String longitude = addresses.get(0).getLongitude() + ""; new PHPConnect(new PHPConnect.PHPResponse() { @Override public void onProcessFinish(String result) { Log.d("DEB", "Main.onCreate.LocationTask.PHPConnect.result: " + result); if (result != null) { String[] split = result.split(User.DELIMITER); user = new User(split); if (split[User.Field.fname.ordinal()].equals("0")) { startActivity(new Intent(Main.this, Register.class)); finish(); } else if (split[User.Field.driver.ordinal()].equals("1")) { startActivity(new Intent(Main.this, Driver.class)); finish(); } else { startActivity(new Intent(Main.this, Passenger.class)); finish(); } } } }).execute(User.LOGIN, User.Field.phone.name(), phoneNumber, User.Field.ltime.name(), timestamp(), User.Field.latitude.name(), latitude, User.Field.longitude.name(), longitude); } } }).runTask(); } public static String timestamp() { return Long.toString(System.currentTimeMillis()) ; } /** Returns null if READ_PHONE_STATE permission is NOT granted*/ private String getPhoneNumber() { if (ActivityCompat.checkSelfPermission(this, permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{permission.READ_PHONE_STATE}, 1); return null; } return ((TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number(); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { boolean isPermissionGranted = true; for (int grant : grantResults) { if (grant != PackageManager.PERMISSION_GRANTED) { isPermissionGranted = false; } } if (isPermissionGranted) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); recreate(); } } public void openMap(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps"))) ; finish(); } }
[ "angeltapia07084759@gmail.com" ]
angeltapia07084759@gmail.com
a75edcfc227faab2d0403cac24f69c64fcd2efdc
2045d4691c06ca82cf20e1053299e36c8ca10808
/src/main/java/com/challenge/annotation/Subtrair.java
fa7c3f46019dec94c7fd3b2449e820bdf11e5c0d
[]
no_license
MariaMuniz/java_8
65846367daf1bc07b2ee610aab0a5388efe9b0a4
5d6abc69cf7b3c52c2cd6cabc501fd128ecdd78b
refs/heads/master
2022-06-17T21:10:57.373538
2020-05-10T13:15:31
2020-05-10T13:15:31
262,790,565
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.challenge.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.math.BigDecimal; @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface Subtrair { String value = ""; }
[ "cidamuniz2011@yahoo.com.br" ]
cidamuniz2011@yahoo.com.br
0cdc30d6496b2028051570a9e66d28125fbe386f
52f36b5824796cccf2dcff52efab9d3cc907bd73
/JDBC_02_Grade/src/com/biz/grade/persistence/StudentDTO.java
42b2c1d8e4c1deebb8078f0b8ed805d747ea93c2
[]
no_license
jewon513/Biz_JDBC
d4c36cd90c720476684f2def27a8289171d081d7
a7dd8f30f479122d140eeb7e0c01aad1fa47369e
refs/heads/master
2020-08-14T21:35:26.916777
2019-10-31T07:35:04
2019-10-31T07:35:04
215,235,505
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
package com.biz.grade.persistence; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @Getter @Setter @AllArgsConstructor @NoArgsConstructor @ToString @Builder public class StudentDTO { private String st_num;// varchar2(5 byte) private String st_name;// nvarchar2(50 char) private String st_tel;// varchar2(20 byte) private String st_addr;// nvarchar2(125 char) private int st_grade;// number(1,0) private String st_dept;// varchar2(5 byte) }
[ "jewon513@gmail.com" ]
jewon513@gmail.com
ffa6baa6f5fc82a55898d528d9010aad0822eacd
6ab041c7a802115f06ed004e32298f07be05928a
/src/it/unisa/di/categorizer/ffca/lib/Lattice.java
109bb79fb03bcc399f3e3d8945543ad82ff08c7a
[]
no_license
cdemaio/FuzzyFCA
e80152a06eee0c635931ecbb51384d3c5f4cc9fc
410cae5c874314aac17de2e70f63541855a21976
refs/heads/master
2021-01-15T07:57:09.631543
2015-07-24T12:32:10
2015-07-24T12:32:10
39,632,393
4
3
null
2015-07-24T12:41:09
2015-07-24T12:41:09
null
UTF-8
Java
false
false
7,041
java
package it.unisa.di.categorizer.ffca.lib; import java.util.Collection; import java.util.Iterator; /** * Representation of a concept lattice. * <p> * A <code>Lattice</code> object represents the concept lattice * of a given context. Since a context is typically represented * by a <code>Relation</code> object, the classes implementing * the <code>Lattice</code> interface should provide a constructor with * a single argument of type <code>Relation</code>, which creates * a lattice for that relation. Depending on the concrete * implementation, changing a relation after it has been passed * to such a constructor might lead to wrong computations by * the <code>Lattice</code> object. See the documentation of * the classes implementing this interface for details. * <p> * The interface <code>Lattice</code> defines the most important * methods for formal concept analysis. In particular, it provides * methods <code>conceptIterator</code> and <code>EdgeIterator</code> * that return iterators which iterate over all concepts and over all * pairs of neighboring concepts in the lattice, respectively. * In addition, the methods <code>upperNeighbors</code> and * <code>lowerNeighbors</code> can be used to traverse the concept * lattice manually. * * @author Daniel N. Goetzmann * @version 1.0 */ public interface Lattice { /** * Returns the least upper bound of the concepts contained in * the collection <code>concepts</code>. * @param concepts the concepts whose least upper bound shall be computed. * @return the least upper bound of the concepts contained in <code>concepts</code>. */ public Concept join (Collection<Concept> concepts); /** * Returns the greatest lower bound of the concepts contained in * the collection <code>concepts</code>. * @param concepts the concepts whose greatest lower bound shall be computed. * @return the greatest lower bound of the concepts contained in <code>concepts</code>. */ public Concept meet (Collection<Concept> concepts); /** * Returns the least concept that contains all objects contained in <code>objects</code>. * <p> * Returns the concept that contains the common attributes of the * objects contained in <code>objects</code> and their common objects, * but no other objects or attributes. * <p> * More formally, returns the concept (<code>object</code>'', <code>object</code>'). * @param objects the set of objects from which the concept shall be computed. * @return the concept computed from <code>objects</code>. */ public Concept conceptFromObjects (Collection<Comparable> objects) throws IllegalArgumentException; /** * Returns the greatest concept that contains all attributes contained in <code>attributes</code>. * <p> * Returns the concept that contains the common objects of the * attributes contained in <code>attributes</code> and their common attributes, * but no other objects or attributes. * <p> * More formally, returns the concept (<code>attributes</code>', <code>attributes</code>''). * @param attributes the set of attributes from which the concept shall be computed. * @return the concept computed from <code>attributes</code>. */ public Concept conceptFromAttributes (Collection<Comparable> attributes) throws IllegalArgumentException; /** * Returns the <i>top</i> concept, i.e.&nbsp;the concept that contains * all objects. * @return the <i>top</i> concept. */ public Concept top (); /** * Returns the <i>bottom</i> concept, i.e.&nbsp;the concept that contains * all attributes. * @return the <i>bottom</i> concept. */ public Concept bottom (); /** * Returns an iterator over the lower neighbors of <code>concept</code>. * <p> * There are no guarantees concerning the order in which the lower * neighbors are returned. The exact order may depend on the * implementation of this method and on the implementation of the * class of the underlying relation and on other factors. * @param concept the concept whose lower neighbors shall be computed. * @return an iterator over the lower neighbors of <code>concept</code>. */ public Iterator<Concept> lowerNeighbors (Concept concept); /** * Returns an iterator over the upper neighbors of <code>concept</code>. * <p> * There are no guarantees concerning the order in which the upper * neighbors are returned. The exact order may depend on the * implementation of this method and on the implementation of the * class of the underlying relation and on other factors. * @param concept the concept whose upper neighbors shall be computed. * @return an iterator over the upper neighbors of <code>concept</code>. */ public Iterator<Concept> upperNeighbors (Concept concept); /** * Returns an iterator over all concepts of this lattice. * <p> * The concepts will be returned in the order specified by the * <code>trav</code> argument. * @see Traversal * @param trav the desired traversal. * @return an iterator over all concepts of this lattice. */ public Iterator<Concept> conceptIterator(Traversal trav); /** * Returns an iterator over all edges of this lattice. * More formally, returns an iterator over all pairs of concepts, * that are neighbors of each other. * <p> * The order in which the edges (pairs of upper and lower neighbors) * are returned depends on the <code>trav</code> argument. * <p> * A top-down-breadth-first traversal guarantees that all edges having * the same upper neighbor will be returned consecutively. However, * there are no guarantees concerning the order in which the edges * having the same upper neighbor are returned. * Similarly, a bottom-up-breadth-first traversal guarantees that * all edges having the same lower neighbor will be returned consecutively * but there are no guarantees concerning the order in which the edges * having the same lower neighbor are returned. * @param trav the desired traversal. * @return an iterator over all edges of this lattice. */ public Iterator<Edge> edgeIterator(Traversal trav); /** * Returns an iterator over pairs of neighboring concepts that are * similar to each other. How similar they have to be in order * to be returned by this iterator is specified by * the three arguments <code>supp</code>, <code>conf</code> and * <code>diff</code>. * @param supp the minimal support, i.e.&nbsp;the minimal number of objects contained * in the lower neighbor. * @param conf the minimal confidence, i.e.&nbsp;the minimal fraction l/u, where * l is the number of objects in the lower neighbor and u is the * number of objects in the upper neighbor. Must be a value between * 0 and 1. * @param diff the maximal difference between the number of attributes * in the lower neighbor and the number of attributes in the upper * neighbor. * @return an iterator over pairs of similar neighboring concepts. */ public Iterator<Edge> violationIterator(int supp, float conf, int diff); }
[ "gfenza@unisa.it" ]
gfenza@unisa.it
068aad48946abc3daf34a61f2a2ac945d3fc306e
7ff2c8ce35ae0ce423a03353c0225e5e5b708f7a
/trunk/myfacebookapp/src/org/myfacebookapp/AlbumServlet.java
2da640111687e07a95189b2336d4ac99ec17cf8b
[]
no_license
BGCX067/facebook-diashow-svn-to-git
62cea27b8ad478bf249538b661218fa69e61cf3e
faf04469e0ef397ce3a16ad3b59409bf805e11e3
refs/heads/master
2016-09-01T08:53:53.264763
2015-12-28T14:37:02
2015-12-28T14:37:02
48,872,690
0
0
null
null
null
null
UTF-8
Java
false
false
4,649
java
package org.myfacebookapp; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.JSONArray; import org.json.JSONObject; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.facebook.api.FacebookException; import com.facebook.api.FacebookRestClient; import datastructure.Functions; import datastructure.Names; /** * Servlet implementation class AlbumServlet */ public class AlbumServlet extends AbstractFacebookServlet implements javax.servlet.Servlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public AlbumServlet() { super(); // TODO Auto-generated constructor stub } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); FacebookRestClient facebook = getAuthenticatedFacebookClient(request, response); if (facebook != null) { String friendIdString = request .getParameter(Names.CLICKED_FRIEND_ID); long friendId = Long.parseLong(friendIdString); // List<Album> albums = Album.getAlbums(facebook, friendId); // // JSONArray jsonAlbums = new // JSONArray(convertToJSONObjectList(albums)); String queryForAlbums = "SELECT aid, name, cover_pid, size FROM album WHERE owner = " + friendId; try { long time = System.currentTimeMillis(); Document albumsDoc = facebook.fql_query(queryForAlbums); String queryForPics = "SELECT pid, src_small FROM photo WHERE pid in (SELECT cover_pid FROM album WHERE owner = " + friendId + ") ORDER BY pid ASC"; Document picsDoc = facebook.fql_query(queryForPics); String jsonAlbumsString = convertToJSON(albumsDoc, picsDoc); System.out.println("Albumloadtime: " + (System.currentTimeMillis() - time) / 1000 + "s"); System.out.println(jsonAlbumsString); response.getOutputStream().write(jsonAlbumsString.getBytes()); } catch (FacebookException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } private static String convertToJSON(Document albumDoc, Document picDoc) { NodeList nodes = albumDoc.getElementsByTagName("album"); String result = "["; for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); result += processNode(n, picDoc); if (i == nodes.getLength() - 1) result += "}"; else result += "},"; } result += "]"; return result; } private static String processNode(Node n, Document picDoc) { String result = "{"; Node aidNode = n.getFirstChild(); Node nameNode = aidNode.getNextSibling(); Node cover_pidNode = nameNode.getNextSibling(); Node sizeNode = cover_pidNode.getNextSibling(); String aidText = "\"" + aidNode.getNodeName() + "\":" + "\"" +aidNode.getFirstChild().getNodeValue() + "\""; String nameText = "\"" + nameNode.getNodeName() + "\":\"" + nameNode.getFirstChild().getNodeValue() + "\""; String cover_pidText = transformPicIDToURLInJSON(cover_pidNode, picDoc); String sizeText = "\"" + sizeNode.getNodeName() + "\":" + sizeNode.getFirstChild().getNodeValue(); result += aidText + "," + nameText + "," + cover_pidText + "," + sizeText; return result; } private static String transformPicIDToURLInJSON(Node cover_pidNode, Document picDoc) { String picID = cover_pidNode.getFirstChild().getNodeValue(); NodeList nodes = picDoc.getElementsByTagName("photo"); for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); Node pidNode = n.getFirstChild(); String currentPicID = pidNode.getFirstChild().getNodeValue(); if (currentPicID.equals(picID)) { Node picNode = pidNode.getNextSibling(); String result = ""; if (picNode.getFirstChild() != null) { result = "\"" + picNode.getNodeName() + "\":\"" + picNode.getFirstChild().getNodeValue() + "\""; } else { result = "\"" + picNode.getNodeName() + "\":\"" + "Images/unknown.jpg" + "\""; } return result; } } return null; } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
[ "you@example.com" ]
you@example.com
6e82448b9b5a98e1baf1ca35300708e97941fd6a
d4f93c48d7290da339425a69cf674e3ae6b4459c
/src/test/java/com/qa/hubspot/tests/HomePageTest.java
14de3d5ceec6e5db0bbe2541a06c76d54a5aec5e
[]
no_license
aathiravinodini/POM-framework-2019
666e41562e7aa268e12fba429d737e0b8136f20d
102123e927636a8ac6561d2f43497fd8bf934c77
refs/heads/master
2023-08-08T21:54:41.722109
2019-09-06T11:37:34
2019-09-06T11:37:34
206,620,600
0
0
null
2023-07-22T15:26:56
2019-09-05T17:28:27
HTML
UTF-8
Java
false
false
1,667
java
package com.qa.hubspot.tests; import java.util.Properties; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.qa.hubspot.Util.Constants; import com.qa.hubspot.base.Basepage; import com.qa.hubspot.pages.HomePage; import com.qa.hubspot.pages.LoginPage; public class HomePageTest { Basepage basepage; WebDriver driver; LoginPage loginpage; Properties prop; HomePage homepage; @BeforeMethod public void setUp(){ basepage = new Basepage(); prop = basepage.initialize_properties(); driver = basepage.initialize_driver(prop); loginpage = new LoginPage(driver); homepage = loginpage.doLogin(prop.getProperty("username"), prop.getProperty("password")); } @Test(priority=1) public void verifyHomePageTitleTest(){ String title = homepage.getHomePageTitle(); System.out.println("home page title is: "+title); Assert.assertEquals(title,Constants.HOME_PAGE_TITLE); } @Test(priority=2) public void verifyHomePageHeaderTest(){ String header = homepage.getHomePageHeader(); System.out.println("the home page header is:"+header); Assert.assertEquals(header, Constants.HOME_PAGE_HEADER); } @Test(priority=3) public void verifyLoggedInUserAccountTest(){ String accountName = homepage.getLoggedInAccountName(); System.out.println("loggedin account name is: "+accountName); Assert.assertTrue(homepage.verifyLoggedInAccountName()); Assert.assertEquals(accountName,prop.getProperty("accountname")); } @AfterMethod public void tearDown(){ driver.quit(); } }
[ "aathiravinodini@gmail.com" ]
aathiravinodini@gmail.com
6df4cdd37c2c839ed2db456b19a4048fef7a8d51
e6a3f2c74adecf9eb0a91b2221ca31b80bbe343a
/SP1/1a/DifferenceCheck.java
2bc19e1d4b4e7b1bd26993335bcdf74a53731db3
[]
no_license
kunal12899/Algorithm_assignment
c95bd7bec2eaa013ef4b960342113158bc21c102
1d9369f9bc95f66f9cf1ef2b007378c7eb84c3fc
refs/heads/master
2021-01-19T04:46:09.034069
2016-06-20T05:46:07
2016-06-20T05:46:07
61,518,451
0
1
null
null
null
null
UTF-8
Java
false
false
3,667
java
import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * * @author kunal krishna */ public class DifferenceCheck { public static<T extends Comparable<? super T>> void difference(List<T> l1, List<T> l2, List<T> outList) { Iterator it1 = l1.iterator(); Iterator it2 = l2.iterator(); Object bigNum = Integer.MAX_VALUE; T element1 = (T) it1.next(); T element2 = (T) it2.next(); while (it1.hasNext() || it2.hasNext()) { if (element1.compareTo(element2)==0) { while(element1.compareTo(element2)==0) { if (it1.hasNext()) { element1 = (T) it1.next(); } else { element1 = (T) bigNum; break; } if (it2.hasNext()) { element2 = (T) it2.next(); } else { element2 = (T) bigNum; break; } } } else if (element1.compareTo(element2) > 0) { while(element1.compareTo(element2) > 0) { // outList.add((T) element2); if (it2.hasNext()) { element2 = (T) it2.next(); } else { element2 = (T) bigNum; break; } } } else if(element1.compareTo(element2) < 0) { while(element1.compareTo(element2) < 0) { // System.out.println("Here ele1<ele2"); outList.add((T) element1); // System.out.println("Outlist element1 = "+element1); if (it1.hasNext()) { element1 = (T) it1.next(); } else { element1 = (T) bigNum; break; } } } }// End of while loop } public static void main(String[] args) { List l1 = new ArrayList(); List l2 = new ArrayList(); List l3 = new ArrayList(); for(int i=0;i<1000000;i++) l1.add(i); for(int i=0;i<100;i=i+2) l2.add(i); long startTime = 0; long endTime = 0; long totalTime = 0; startTime = System.currentTimeMillis(); difference(l1, l2, l3); endTime = System.currentTimeMillis(); totalTime = endTime - startTime; System.out.println("Time="+totalTime); System.out.println("Size of l3=" + l3.size()); } }
[ "kunal12899@gmail.com" ]
kunal12899@gmail.com
6e06ba2328c5d8be287e23cc4003644c10b57562
ec20558d895bc5ee6c54a2ffd856e7e13f5ab06f
/java/example2/src/main/subpackage/Car.java
6b71df13e48e1921da7a77b442c8442aeef092a0
[]
no_license
cwadrupldijjit/language-overviews
bf4f7ec20ddbc85c4a3eada5f2f91863b608156b
e3736c161b1a2837982e38ad998256c1949a83f0
refs/heads/master
2021-06-27T14:18:28.714153
2020-10-13T16:51:25
2020-10-13T16:51:25
154,224,492
0
0
null
2020-10-13T16:51:26
2018-10-22T22:15:44
C#
UTF-8
Java
false
false
420
java
package subpackage; public class Car { private int honkCount; // constructor public Car() { honkCount = 0; } public String honk() { honkCount++; return "You honked " + honkCount + " times"; } public String honkMultipleTimes(int num) { honkCount += num; return "You honked up to " + num + " more times bringing your total to " + honkCount; } }
[ "sskeen@sskeendevelopment.com" ]
sskeen@sskeendevelopment.com
f1db51624cd3f14795777a648abfbc42cc04a5c3
b5fbc5c882b6ac0949b409e6cb7722eca678079d
/SecondaryDirectory/src/com/example/directory/BaseOfAdapter.java
2be6347430ffc54a636bd256a00e75a8af389169
[]
no_license
liwenzhi/csdnDemo
18f62f49889d5d0636f3e53b9eb068ac83aaff4a
de5278729c21edd5e75a2ca2049d2218d11b42a9
refs/heads/master
2021-01-20T13:04:31.088967
2017-05-16T12:48:43
2017-05-16T12:48:43
90,446,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,584
java
package com.example.directory; import android.content.Context; import android.widget.BaseAdapter; import java.util.ArrayList; import java.util.List; /** * 简单封装了BaseAdapter的适配器类 * * 这是一个简化BaseAdapter适配器的工具类 * 这是使用的是定义一个泛型T,使用时传入什么数据,T就是什么数据 * 实际设计中除了getVIew方法外,其他的方法基本是差不多的 * 所以继承这个工具类后只要重写getView方法,就可以使用BaseAdapter了 * */ public abstract class BaseOfAdapter<T> extends BaseAdapter { //定义集合数据 List<T> list = new ArrayList<T>(); //上下文 Context context; //传入的是一个集合的数据的情况 public BaseOfAdapter(Context context, List<T> list) { this.context = context; this.list = list; } //传入的是一个数组数据的情况 //其实数组也是要转换为集合的数据,因为适配器只接受集合的数据 public BaseOfAdapter(Context context, T[] list) { this.context = context; for (T t : list) { this.list.add(t); } } //返回数据的总数 @Override public int getCount() { return list == null ? 0 : list.size(); } //返回集合中某个游标值的对象 @Override public T getItem(int position) { return list == null ? null : list.get(position); } //返回选中的条目的游标值 @Override public long getItemId(int position) { return position; } }
[ "170426029@qq.com" ]
170426029@qq.com
9e5e3abd6b3f05da5be73991019b96e25c4f40a9
402572a9fd73b0bded10754519439bbcaac1c220
/java/l2f/gameserver/model/entity/olympiad/OlympiadGameTask.java
b110f105204ae4ee2322ae9aa8f9c480585bc02f
[ "MIT" ]
permissive
juninhorosa/L2MYTHRAS_FIXED
9e385979725378eb4d8b177393e16da8b1a97992
0cd8a44ca30946c3bc42672ae85187fbce1de313
refs/heads/main
2023-01-13T18:29:36.906415
2020-11-07T19:39:49
2020-11-07T19:39:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,246
java
package l2f.gameserver.model.entity.olympiad; import java.util.concurrent.ScheduledFuture; import l2f.commons.threading.RunnableImpl; import l2f.gameserver.Config; import l2f.gameserver.ThreadPoolManager; import l2f.gameserver.network.serverpackets.SystemMessage; import l2f.gameserver.network.serverpackets.components.SystemMsg; import l2f.gameserver.utils.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class OlympiadGameTask extends RunnableImpl { private static final Logger _log = LoggerFactory.getLogger(OlympiadGameTask.class); private final OlympiadGame _game; private final BattleStatus _status; private final int _count; private final long _time; private boolean _shoutGameStart = true; private boolean _terminated = false; public boolean isTerminated() { return _terminated; } /** * Set this to false to disable the annoying Olympiad Manager NPC Shout to all players that the match has begun. * @param value */ public void setShoutGameStart(boolean value) { _shoutGameStart = value; } public BattleStatus getStatus() { return _status; } public int getCount() { return _count; } public OlympiadGame getGame() { return _game; } public long getTime() { return _count; } public ScheduledFuture<?> shedule() { return ThreadPoolManager.getInstance().schedule(this, _time); } public OlympiadGameTask(OlympiadGame game, BattleStatus status, int count, long time) { _game = game; _status = status; _count = count; _time = time; } @Override public void runImpl() { if (_game == null || _terminated) return; OlympiadGameTask task = null; int gameId = _game.getId(); try { if (!Olympiad.inCompPeriod()) return; // Прерываем игру, если один из игроков не онлайн, и игра еще не прервана if (!_game.checkPlayersOnline() && _status != BattleStatus.ValidateWinner && _status != BattleStatus.Ending) { Log.add("Player is offline for game " + gameId + ", status: " + _status, "olympiad"); _game.endGame(1, true); return; } switch (_status) { case Begining: { task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, Config.ALT_OLY_WAIT_TIME, 100); break; } case Begin_Countdown: { _game.broadcastPacket(new SystemMessage(SystemMsg.YOU_WILL_BE_MOVED_TO_THE_OLYMPIAD_STADIUM_IN_S1_SECONDS).addNumber(_count), true, false); switch (_count) { case 120: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 60, 60000); break; case 60: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 30, 30000); break; case 30: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 15, 15000); break; case 15: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 5, 10000); break; case 5: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 4, 1000); break; case 4: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 3, 1000); break; case 3: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 2, 1000); break; case 2: task = new OlympiadGameTask(_game, BattleStatus.Begin_Countdown, 1, 1000); break; case 1: task = new OlympiadGameTask(_game, BattleStatus.PortPlayers, 0, 1000); break; } break; } case PortPlayers: { _game.portPlayersToArena(); if (_shoutGameStart) _game.managerShout(); task = new OlympiadGameTask(_game, BattleStatus.Started, 60, 1000); break; } case Started: { _game.preparePlayers(); _game.addBuffers(); _game.broadcastPacket(new SystemMessage(SystemMsg.THE_MATCH_WILL_START_IN_S1_SECONDS).addNumber(_count), true, true); task = new OlympiadGameTask(_game, BattleStatus.Heal, 55, 5000); break; } case Heal: { _game.heal(); task = new OlympiadGameTask(_game, BattleStatus.CountDown, 50, 5000); break; } case CountDown: { _game.broadcastPacket(new SystemMessage(SystemMsg.THE_MATCH_WILL_START_IN_S1_SECONDS).addNumber(_count), true, true); switch (_count) { case 50: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 40, 10000); break; case 40: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 30, 10000); break; case 30: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 20, 10000); break; case 20: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 10, 10000); break; case 10: _game.openDoors(); task = new OlympiadGameTask(_game, BattleStatus.CountDown, 5, 5000); break; case 5: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 4, 1000); break; case 4: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 3, 1000); break; case 3: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 2, 1000); break; case 2: task = new OlympiadGameTask(_game, BattleStatus.CountDown, 1, 1000); break; case 1: task = new OlympiadGameTask(_game, BattleStatus.StartComp, 0, 1000); break; } break; } case StartComp: { _game.deleteBuffers(); _game.startComp(); _game.broadcastPacket(SystemMsg.THE_MATCH_HAS_STARTED, true, true); _game.broadcastInfo(null, null, false); task = new OlympiadGameTask(_game, BattleStatus.InComp, 120, 180000); // 300 total break; } case InComp: { if (_game.getState() == 0) // game finished return; _game.broadcastPacket(new SystemMessage(SystemMsg.THE_GAME_WILL_END_IN_S1_SECONDS_).addNumber(_count), true, true); switch (_count) { case 120: task = new OlympiadGameTask(_game, BattleStatus.InComp, 60, 60000); break; case 60: task = new OlympiadGameTask(_game, BattleStatus.InComp, 30, 30000); break; case 30: task = new OlympiadGameTask(_game, BattleStatus.InComp, 10, 20000); break; case 10: task = new OlympiadGameTask(_game, BattleStatus.InComp, 5, 5000); break; case 5: task = new OlympiadGameTask(_game, BattleStatus.ValidateWinner, 0, 5000); break; } break; } case ValidateWinner: { try { _game.validateWinner(_count > 0); } catch(Exception e) { _log.error("Error on Olympiad Validate Winner", e); } task = new OlympiadGameTask(_game, BattleStatus.PortBack, Config.ALT_OLY_PORT_BACK_TIME, 100); break; } case PortBack: { _game.broadcastPacket(new SystemMessage(SystemMsg.YOU_WILL_BE_MOVED_BACK_TO_TOWN_IN_S1_SECONDS).addNumber(_count), true, false); switch (_count) { case 20: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 10, 10000); break; case 10: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 5, 5000); break; case 5: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 4, 1000); break; case 4: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 3, 1000); break; case 3: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 2, 1000); break; case 2: task = new OlympiadGameTask(_game, BattleStatus.PortBack, 1, 1000); break; case 1: task = new OlympiadGameTask(_game, BattleStatus.Ending, 0, 1000); break; } break; } case Ending: { _game.collapse(); _terminated = true; if (Olympiad._manager != null) Olympiad._manager.freeOlympiadInstance(_game.getId()); return; } } if (task == null) { Log.add("task == null for game " + gameId, "olympiad"); Thread.dumpStack(); _game.endGame(1, true); return; } _game.sheduleTask(task); } catch(Exception e) { _log.error("Error on Olympiad Game Task", e); _game.endGame(1, true); } } }
[ "libera.libera@gmail.com" ]
libera.libera@gmail.com
04122ab675e7c2df8fbcaacb91048f7050fa3b2e
d9516906cabdc5177225e2666a95d9d14ba4acbe
/hybris/bin/custom/SolrSession/SolrSessioncore/testsrc/com/solrsession/core/integration/CheckoutWithExternalTaxesIntegrationTest.java
a5eab1e3a221afdc0bf100c847b6b2ee6041c1b5
[]
no_license
LoharNamrata/SolrSession
266f5e75358b625cd04847db53e2be695b5679f7
92956116476a948f490d4fad22a4d95587b68f55
refs/heads/master
2020-06-21T04:49:56.311660
2019-09-02T14:43:27
2019-09-02T14:43:27
197,348,139
0
0
null
2020-04-30T08:58:39
2019-07-17T08:28:12
Java
UTF-8
Java
false
false
7,521
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package com.solrsession.core.integration; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.commerceservices.externaltax.CalculateExternalTaxesStrategy; import de.hybris.platform.commerceservices.externaltax.DecideExternalTaxesStrategy; import de.hybris.platform.commerceservices.externaltax.impl.DefaultExternalTaxesService; import de.hybris.platform.commerceservices.order.impl.DefaultCommerceCheckoutService; import de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter; import de.hybris.platform.core.Registry; import de.hybris.platform.core.enums.CreditCardType; import de.hybris.platform.core.model.order.CartModel; import de.hybris.platform.core.model.order.payment.CreditCardPaymentInfoModel; import de.hybris.platform.core.model.user.AddressModel; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.order.DeliveryModeService; import de.hybris.platform.order.InvalidCartException; import de.hybris.platform.servicelayer.ServicelayerTransactionalTest; import de.hybris.platform.servicelayer.i18n.CommonI18NService; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.servicelayer.user.UserService; import de.hybris.platform.site.BaseSiteService; import de.hybris.platform.store.BaseStoreModel; import de.hybris.platform.store.services.BaseStoreService; import com.solrsession.core.externaltax.impl.AcceleratorDetermineExternalTaxStrategy; import com.solrsession.core.externaltax.mock.MockCalculateExternalTaxesStrategy; import java.util.Collection; import javax.annotation.Resource; import org.hamcrest.Matchers; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; /** * Integration test with an mock external tax service. * */ @IntegrationTest public class CheckoutWithExternalTaxesIntegrationTest extends ServicelayerTransactionalTest { private static final String TEST_BASESITE_UID = "testSite"; private static final String TEST_BASESTORE_UID = "testStore"; @Resource private DefaultCommerceCheckoutService defaultCommerceCheckoutService; @Resource private BaseSiteService baseSiteService; @Resource private BaseStoreService baseStoreService; @Resource private UserService userService; @Resource private ModelService modelService; @Resource private CommonI18NService commonI18NService; @Resource private DeliveryModeService deliveryModeService; @Resource private DefaultExternalTaxesService defaultExternalTaxesService; @Resource private DecideExternalTaxesStrategy decideExternalTaxesStrategy; @Resource private CalculateExternalTaxesStrategy calculateExternalTaxesStrategy; @BeforeClass public static void beforeClass() { Registry.setCurrentTenantByID("junit"); } @Before public void setUp() throws Exception { importCsv("/test/testCheckoutExternalTaxes.csv", "utf-8"); baseSiteService.setCurrentBaseSite(baseSiteService.getBaseSiteForUID(TEST_BASESITE_UID), false); defaultExternalTaxesService.setDecideExternalTaxesStrategy(new AcceleratorDetermineExternalTaxStrategy()); defaultExternalTaxesService.setCalculateExternalTaxesStrategy(new MockCalculateExternalTaxesStrategy()); } @After public void tearDown() throws Exception { defaultExternalTaxesService.setDecideExternalTaxesStrategy(decideExternalTaxesStrategy); defaultExternalTaxesService.setCalculateExternalTaxesStrategy(calculateExternalTaxesStrategy); } @Test public void testCheckoutNetStore() throws InvalidCartException { //final CatalogVersionModel catalogVersionModel = catalogVersionService.getCatalogVersion("testCatalog", "Online"); //final ProductModel productModel = productService.getProductForCode(catalogVersionModel, "HW1210-3423"); //final UnitModel unitModel = unitService.getUnitForCode("pieces"); final UserModel ahertz = userService.getUserForUID("ahertz"); final Collection<CartModel> cartModels = ahertz.getCarts(); final BaseStoreModel store = baseStoreService.getBaseStoreForUid(TEST_BASESTORE_UID); store.setNet(true); modelService.save(store); Assert.assertEquals(cartModels.size(), 1); final CartModel cart = cartModels.iterator().next(); Assert.assertEquals(Boolean.FALSE, cart.getCalculated()); Assert.assertTrue(cart.getDeliveryAddress() == null); Assert.assertEquals(Double.valueOf(0), cart.getTotalTax()); Assert.assertEquals(Double.valueOf(0), cart.getTotalPrice()); //set delivery address on cart final AddressModel addressModel = new AddressModel(); addressModel.setBillingAddress(Boolean.FALSE); addressModel.setCountry(commonI18NService.getCountry("US")); addressModel.setStreetname("streetName"); addressModel.setStreetnumber("streetNumber"); addressModel.setPostalcode("postalCode"); addressModel.setTown("town"); addressModel.setFirstname("firstName"); addressModel.setLastname("lastName"); addressModel.setOwner(ahertz); modelService.save(addressModel); final CommerceCheckoutParameter parameter1 = new CommerceCheckoutParameter(); parameter1.setCart(cart); parameter1.setAddress(addressModel); parameter1.setIsDeliveryAddress(true); defaultCommerceCheckoutService.setDeliveryAddress(parameter1); Assert.assertEquals(Boolean.TRUE, cart.getCalculated()); Assert.assertEquals(addressModel, cart.getDeliveryAddress()); Assert.assertEquals(Double.valueOf(0), cart.getTotalTax()); Assert.assertThat(cart.getTotalPrice(), Matchers.greaterThan(Double.valueOf(0))); Double previousPrice = cart.getTotalPrice(); //set delivery mode final CommerceCheckoutParameter parameter2 = new CommerceCheckoutParameter(); parameter2.setDeliveryMode(deliveryModeService.getDeliveryModeForCode("premium-gross")); parameter2.setCart(cart); defaultCommerceCheckoutService.setDeliveryMode(parameter2); Assert.assertEquals(Boolean.TRUE, cart.getCalculated()); Assert.assertEquals(addressModel, cart.getDeliveryAddress()); Assert.assertThat(cart.getTotalTax(), Matchers.not(Matchers.equalTo(Double.valueOf(0)))); Assert.assertNotSame(cart.getTotalPrice(), Matchers.not(Matchers.equalTo(previousPrice))); previousPrice = cart.getTotalPrice(); //set payment method final CommerceCheckoutParameter parameter3 = new CommerceCheckoutParameter(); final CreditCardPaymentInfoModel paymentInfo = new CreditCardPaymentInfoModel(); paymentInfo.setBillingAddress(addressModel); paymentInfo.setCode("1234"); paymentInfo.setOwner(ahertz); paymentInfo.setSubscriptionId("1234"); paymentInfo.setType(CreditCardType.VISA); paymentInfo.setValidToMonth("01"); paymentInfo.setValidToYear("18"); paymentInfo.setSubscriptionValidated(true); paymentInfo.setCcOwner("owner"); paymentInfo.setNumber("4111111111111111"); paymentInfo.setUser(ahertz); parameter3.setPaymentInfo(paymentInfo); parameter3.setCart(cart); defaultCommerceCheckoutService.setPaymentInfo(parameter3); Assert.assertEquals(Boolean.TRUE, cart.getCalculated()); Assert.assertEquals(addressModel, cart.getDeliveryAddress()); Assert.assertThat(cart.getTotalTax(), Matchers.not(Matchers.equalTo(Double.valueOf(0)))); Assert.assertEquals(previousPrice, cart.getTotalPrice()); previousPrice = cart.getTotalPrice(); //place order final CommerceCheckoutParameter parameter4 = new CommerceCheckoutParameter(); parameter4.setCart(cart); defaultCommerceCheckoutService.placeOrder(parameter4); } }
[ "namratalohar@pragiti.com" ]
namratalohar@pragiti.com
879fa7117b23805e6491645d34558f32fa5bc98a
74355b99d4d0680414765f6dac03487352ed89e3
/maven/vsadga-data/src/main/java/pl/com/vsadga/dto/alert/TradeAlertDto.java
bacac28bbd43ca1487ebca1e2b580d4d95505e51
[]
no_license
dagaw23/vsadga-app
9c78636f932ad149c1cc5607f116d937891dc8b8
fb5164889ba6c6fd2c646ce700aadcd5a5d3fb04
refs/heads/master
2020-04-16T02:16:37.537780
2017-05-29T21:20:13
2017-05-29T21:20:13
48,888,458
0
0
null
null
null
null
UTF-8
Java
false
false
6,122
java
package pl.com.vsadga.dto.alert; import java.io.Serializable; import java.util.Date; import pl.com.vsadga.data.alert.AlertType; public class TradeAlertDto implements Serializable { /** * */ private static final long serialVersionUID = -2418735029950852907L; /** * komunikat alertu */ private String alertMessage; /** * data wystąpienia alertu */ private Date alertTime; /** * typ alertu */ private AlertType alertType; /** * status bara: * <ul> * <li>zakończony: E, * <li>tymczasowy: T. * </ul> */ private String barStatus; /** * czas bara */ private String barTime; /** * ID rekordu */ private Integer id; private String symbolName; private String timeFrameDesc; /** * */ public TradeAlertDto() { super(); } /** * @param id * @param alertTime * @param alertType * @param barTime * @param alertMessage * @param barStatus * @param symbolName * @param timeFrameDesc */ public TradeAlertDto(Integer id, Date alertTime, AlertType alertType, String barTime, String alertMessage, String barStatus, String symbolName, String timeFrameDesc) { super(); this.id = id; this.alertTime = alertTime; this.alertType = alertType; this.barTime = barTime; this.alertMessage = alertMessage; this.barStatus = barStatus; this.symbolName = symbolName; this.timeFrameDesc = timeFrameDesc; } /* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; TradeAlertDto other = (TradeAlertDto) obj; if (alertMessage == null) { if (other.alertMessage != null) return false; } else if (!alertMessage.equals(other.alertMessage)) return false; if (alertTime == null) { if (other.alertTime != null) return false; } else if (!alertTime.equals(other.alertTime)) return false; if (alertType != other.alertType) return false; if (barStatus == null) { if (other.barStatus != null) return false; } else if (!barStatus.equals(other.barStatus)) return false; if (barTime == null) { if (other.barTime != null) return false; } else if (!barTime.equals(other.barTime)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (symbolName == null) { if (other.symbolName != null) return false; } else if (!symbolName.equals(other.symbolName)) return false; if (timeFrameDesc == null) { if (other.timeFrameDesc != null) return false; } else if (!timeFrameDesc.equals(other.timeFrameDesc)) return false; return true; } /** * @return the alertMessage */ public String getAlertMessage() { return alertMessage; } /** * @return the alertTime */ public Date getAlertTime() { return alertTime; } /** * @return the alertType */ public AlertType getAlertType() { return alertType; } /** * @return the barStatus */ public String getBarStatus() { return barStatus; } /** * @return the barTime */ public String getBarTime() { return barTime; } /** * @return the id */ public Integer getId() { return id; } /** * @return the symbolName */ public String getSymbolName() { return symbolName; } /** * @return the timeFrameDesc */ public String getTimeFrameDesc() { return timeFrameDesc; } /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((alertMessage == null) ? 0 : alertMessage.hashCode()); result = prime * result + ((alertTime == null) ? 0 : alertTime.hashCode()); result = prime * result + ((alertType == null) ? 0 : alertType.hashCode()); result = prime * result + ((barStatus == null) ? 0 : barStatus.hashCode()); result = prime * result + ((barTime == null) ? 0 : barTime.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((symbolName == null) ? 0 : symbolName.hashCode()); result = prime * result + ((timeFrameDesc == null) ? 0 : timeFrameDesc.hashCode()); return result; } /** * @param alertMessage * the alertMessage to set */ public void setAlertMessage(String alertMessage) { this.alertMessage = alertMessage; } /** * @param alertTime * the alertTime to set */ public void setAlertTime(Date alertTime) { this.alertTime = alertTime; } /** * @param alertType * the alertType to set */ public void setAlertType(AlertType alertType) { this.alertType = alertType; } /** * @param barStatus * the barStatus to set */ public void setBarStatus(String barStatus) { this.barStatus = barStatus; } /** * @param barTime * the barTime to set */ public void setBarTime(String barTime) { this.barTime = barTime; } /** * @param id * the id to set */ public void setId(Integer id) { this.id = id; } /** * @param symbolName * the symbolName to set */ public void setSymbolName(String symbolName) { this.symbolName = symbolName; } /** * @param timeFrameDesc * the timeFrameDesc to set */ public void setTimeFrameDesc(String timeFrameDesc) { this.timeFrameDesc = timeFrameDesc; } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ @Override public String toString() { return "TradeAlertDto [alertTime=" + alertTime + ", alertType=" + alertType + ", barTime=" + barTime + ", symbolName=" + symbolName + ", timeFrameDesc=" + timeFrameDesc + ", alertMessage=" + alertMessage + ", id=" + id + ", barStatus=" + barStatus + "]"; } }
[ "darek_dg@interia.pl" ]
darek_dg@interia.pl
2822328ed65831e363d548525eddf6da7fd30bea
d598b9a3573f317b1a4a9099909cef1becc4e047
/demo05/src/main/java/com/atguigu/demo05/component/LoginHandlerInterceptor.java
9d8c0790d1be1130f9acdf6ce46b5e678e4dc0db
[]
no_license
hongnet/JAVA
f8c152ddf65285f1ac5a832c299b99cca778ec8f
38bb3910f50d7091ea39215dd2978ca22a9fee3f
refs/heads/master
2021-07-05T22:33:08.264940
2020-10-13T10:14:09
2020-10-13T10:14:09
192,913,470
0
0
null
null
null
null
UTF-8
Java
false
false
1,198
java
package com.atguigu.demo05.component; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; //拦截器 public class LoginHandlerInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { Object user=request.getSession().getAttribute("LoginUser"); if(user == null){ request.setAttribute("msg","没有权限,请先登录"); request.getRequestDispatcher("/index.html").forward(request,response); return false; }else { return true; } } @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { } }
[ "44320879+hongnet@users.noreply.github.com" ]
44320879+hongnet@users.noreply.github.com
31f32502190123ef5e6f1b2e93c631552596ca81
1a1cef5f723ce412c7599eea68605e423e5603fc
/Java_middle_class/src/java_set.java
177e333af5d84e6f0c2b7163092e5d84544eef72
[]
no_license
dahun428/login
def23e63c8c10b0b19631efd6d873adb40982759
2f3f591a3fc546e41efc8ee015b8cea3821e66c6
refs/heads/master
2020-12-06T03:15:55.229116
2020-01-19T22:00:21
2020-01-19T22:00:21
232,322,630
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class java_set { public static void main(String[] args) { Set<String> set1 = new HashSet<>(); boolean flag1 = set1.add("kang"); boolean flag2 = set1.add("kim"); boolean flag3 = set1.add("kang"); System.out.println(set1.size()); System.out.println(flag1); System.out.println(flag2); System.out.println(flag3); Iterator<String> iter = set1.iterator(); while(iter.hasNext()) { String str = iter.next(); System.out.println(str); } } }
[ "rubcustomer@gmail.com" ]
rubcustomer@gmail.com
d525ac68176850b739b8a1d03f9d50d46f9993ac
a363c46e7cbb080db2b3a69a70ebf912195e25c7
/ls-modules/ls-monitor/src/main/java/cn/lonsun/monitor/task/internal/dao/impl/MonitorHrefUseableDynamicDaoImpl.java
d917e70515e1fa073aae379e05ae221a1a23f1a7
[]
no_license
pologood/excms
601646dd7ea4f58f8423da007413978192090f8d
e1c03f574d0ecbf0200aaffa7facf93841bab02c
refs/heads/master
2020-05-14T20:07:22.979151
2018-10-06T10:51:37
2018-10-06T10:51:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,529
java
package cn.lonsun.monitor.task.internal.dao.impl; import cn.lonsun.core.base.dao.impl.MockDao; import cn.lonsun.core.util.Pagination; import cn.lonsun.monitor.task.internal.dao.IMonitorHrefUseableDynamicDao; import cn.lonsun.monitor.task.internal.entity.MonitorHrefUseableDynamicEO; import cn.lonsun.monitor.task.internal.entity.vo.HrefUseableQueryVO; import org.apache.commons.lang.time.DateFormatUtils; import org.springframework.stereotype.Repository; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * @author gu.fei * @version 2017-09-28 9:23 */ @Repository public class MonitorHrefUseableDynamicDaoImpl extends MockDao<MonitorHrefUseableDynamicEO> implements IMonitorHrefUseableDynamicDao { @Override public Pagination getPage(HrefUseableQueryVO vo) { Calendar calendar = Calendar.getInstance(); //得到日历 calendar.setTime(new Date());//把当前时间赋给日历 calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天 Date frontDate = calendar.getTime(); Map<String,Object> map = new HashMap<String, Object>(); StringBuilder hql = new StringBuilder("from MonitorHrefUseableDynamicEO"); hql.append(" where taskId=:taskId"); hql.append(" and monitorDate < :monitorDate"); hql.append(" and monitorDate >= :frontDate"); hql.append(" order by monitorDate desc"); map.put("taskId",vo.getTaskId()); map.put("monitorDate",vo.getDate()); map.put("frontDate",frontDate); return this.getPagination(vo.getPageIndex(),vo.getPageSize(),hql.toString(),map); } @Override public Long getHrefUseableDynamicCout(Long taskId, Date date) { Calendar calendar = Calendar.getInstance(); //得到日历 calendar.setTime(new Date());//把当前时间赋给日历 calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天 Date frontDate = calendar.getTime(); System.out.println(DateFormatUtils.format(frontDate,"yyyy-MM-dd")); Map<String,Object> map = new HashMap<String, Object>(); StringBuilder hql = new StringBuilder("from MonitorHrefUseableDynamicEO"); hql.append(" where taskId=:taskId"); hql.append(" and monitorDate < :monitorDate"); hql.append(" and monitorDate >= :frontDate"); map.put("taskId",taskId); map.put("monitorDate",date); map.put("frontDate",frontDate); return this.getCount(hql.toString(),map); } }
[ "2885129077@qq.com" ]
2885129077@qq.com
4309a36fe3966a37fac7743b49d1a871c403f6d2
137b087ef2383b8bc7148496ca985002fa615321
/src/main/java/org/dpi/creditsPeriod/CreditsPeriodService.java
110d696e85069d09936ec4a75bc443d02dcebc9b
[]
no_license
moradaniel/humanResources
7b898c17b6fb6cc90bfc7c241c288dd53364ddfd
f39ed276d6d7b91b0bed5b7a8497650c68d9dd7b
refs/heads/master
2023-07-07T22:50:22.158010
2023-07-03T10:46:17
2023-07-03T10:46:17
11,310,851
0
0
null
2022-12-16T06:30:21
2013-07-10T12:04:35
HTML
UTF-8
Java
false
false
1,045
java
package org.dpi.creditsPeriod; import java.util.Date; import java.util.List; import org.springframework.context.ApplicationContextAware; import biz.janux.calendar.DateRange; /** * Used to create, save, retrieve, update and delete CreditsPeriod objects from * persistent storage * */ public interface CreditsPeriodService extends ApplicationContextAware { public List<CreditsPeriod> findAll(); public CreditsPeriod findById(Long id); /** * DateRange that represents the period of time representing a CreditsPeriod * @param year * @return */ public DateRange getDateRangeForYear(int year); public boolean isDateWithinEjercicioAnual(Date date, int year); public List<CreditsPeriod> find(CreditsPeriodQueryFilter creditsPeriodQueryFilter); public void delete(CreditsPeriod employment); public void save(final CreditsPeriod employment); public void saveOrUpdate(final CreditsPeriod employment); public CreditsPeriodDao getCreditsPeriodDao(); public CreditsPeriod getCurrentCreditsPeriod(); }
[ "moradaniel@gmail.com" ]
moradaniel@gmail.com
4f40a4cec3ae65b171491beafe9c39d6f21103a0
d744201c7d53e62a527bb169ba7c8a90a451c093
/api/src/main/java/io/github/lxgaming/virtualinventory/api/inventory/ButtonType.java
6d7be1ed27dada420eccd5fd3c1db0c0d8cc5526
[ "Apache-2.0" ]
permissive
LXGaming/VirtualInventory
1d2a507b7f8cbb1f9ea96e70422d2b9e90eca88c
dc8be1baae65317580634afdd179e76e298e4bad
refs/heads/master
2023-09-01T06:12:12.485546
2023-08-05T11:15:14
2023-08-05T11:15:14
190,357,114
0
0
null
null
null
null
UTF-8
Java
false
false
2,129
java
/* * Copyright 2019 Alex Thomson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.github.lxgaming.virtualinventory.api.inventory; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import org.spongepowered.api.CatalogType; import org.spongepowered.api.util.annotation.CatalogedBy; import org.spongepowered.api.util.annotation.NonnullByDefault; import java.util.Objects; @NonnullByDefault @CatalogedBy(ButtonTypes.class) public class ButtonType implements CatalogType { private final String id; private final String name; ButtonType(String id, String name) { this.id = Preconditions.checkNotNull(id); this.name = Preconditions.checkNotNull(name); } @Override public String getId() { return this.id; } @Override public String getName() { return this.name; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("id", this.id) .add("name", this.name) .toString(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } ButtonType buttonType = (ButtonType) obj; return Objects.equals(this.id, buttonType.id) && Objects.equals(this.name, buttonType.name); } @Override public int hashCode() { return Objects.hash(this.id, this.name); } }
[ "LXGaming@users.noreply.github.com" ]
LXGaming@users.noreply.github.com
5ca3ef10763b59a694f9fd66b684b30143028144
4d18d42b7e4fd3838961ae4c9cf76c9779a6fd7a
/src/Adapter/Bird.java
d457f079631c4285bb1119e1325e930926fa2af0
[ "MIT" ]
permissive
mrunalghorpade11/Design_Patterns
e6ff456f31e916768e4ee3b6fea232c99ac33428
5b16f6e832224edf8cafd6a8a27b18fbb261cd04
refs/heads/master
2023-02-09T15:58:39.439895
2021-01-06T15:28:27
2021-01-06T15:28:27
275,677,753
0
0
null
null
null
null
UTF-8
Java
false
false
74
java
package Adapter; public interface Bird { public String getSound(); }
[ "mrunal.ghorpade123@gmail.com" ]
mrunal.ghorpade123@gmail.com
3da390cae97eb199a6d3c6389d2e9c3aabd7b724
07bd89d994da04a94c84db8997a67ae118af7830
/软工三大作业 众包网站/summerCS_Phase_III/src/main/java/com/example/summer/dao/ProjectRankDao.java
f188d6b093da405317de41aba24bd4c41830fe10
[]
no_license
pilibb0712/myHomework
61e48163972b0ca0c42c736636c46b07492c40da
5d013e35ee930f730418cad0a9af4cc3bf9ba0a2
refs/heads/master
2023-08-24T09:41:17.561232
2019-11-30T05:18:26
2019-11-30T05:18:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.example.summer.dao; import com.example.summer.domain.ProjectRankPO; import java.util.ArrayList; public interface ProjectRankDao { boolean save(ProjectRankPO projectRank); boolean update(ProjectRankPO projectRank); ProjectRankPO queryProjectRankByProjectId(String projectId); ArrayList<String> getAllProjectIds(); }
[ "1292155474@qq.com" ]
1292155474@qq.com
346a42b9dd014dfa73293426c2c87633c7c6dfc6
2b1d1a9e4376c5347cd86745e341320c38bfc58b
/src/main/java/us/cargosphere/automation/pages/ratemesh/RsnCompanyInbondPage.java
32181b798c324198e947b3d8ca1e93a4fee720fb
[]
no_license
krishnaveni1001/kvautomation
47d16eae16cdbca108c73bf1c6dd8040383cd049
8859c72528a87bae2345bff2757fec54c2d21a7c
refs/heads/master
2023-02-21T15:52:47.610388
2021-01-27T01:05:06
2021-01-27T01:05:06
333,199,979
0
0
null
null
null
null
UTF-8
Java
false
false
886
java
package us.cargosphere.automation.pages.ratemesh; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; import us.cargosphere.automation.pages.BasePage; import us.cargosphere.automation.pages.navigation.NavigationMenuBar; public class RsnCompanyInbondPage extends BasePage{ private NavigationMenuBar naviMenuBar; public NavigationMenuBar getNaviMenuBar() { return naviMenuBar; } public RsnCompanyInbondPage(WebDriver webDriver) { super(webDriver); PageFactory.initElements(webDriver, this); // Check that we are on the correct page. if (!webDriver.getCurrentUrl().contains("requestInd=I")) { throw new IllegalStateException("This is not inbond connections page. Currently on: " + webDriver.getCurrentUrl()); } naviMenuBar = new NavigationMenuBar(webDriver); } }
[ "krishnaveni.valluru@cargosphere.com" ]
krishnaveni.valluru@cargosphere.com
09d7728cf923a2542b55896f33607274cb441c18
6faa3624d7cc3ba1d36288f181cadf478616cc01
/src/main/java/com/example/test/es/ProjDoc.java
3f4093d775cc2b21c0ae289b55c6e6fdcbadc0fe
[]
no_license
herozhi0821/Test
3387e27e812efec502f8d90fecbe101039610e51
84300d89ca41b7bee8ec5a098abc6090f42b7ff4
refs/heads/master
2023-06-13T00:57:35.871897
2021-07-06T08:30:18
2021-07-06T08:30:18
383,392,011
0
0
null
null
null
null
UTF-8
Java
false
false
2,764
java
package com.example.test.es; import com.fasterxml.jackson.annotation.JsonFormat; import java.io.Serializable; import java.util.Date; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType; @Document(indexName = "projdoc") public class ProjDoc implements Serializable{ /** * */ private static final long serialVersionUID = -5855518849808155423L; @Id @Field(type= FieldType.Text) private String id; @Field(type= FieldType.Text) private String filename; @Field(type= FieldType.Text) private String projectname; @Field(type= FieldType.Text) private String projectmember; @Field(type= FieldType.Text) private String allContent; @Field(type= FieldType.Text) private String researchOne; @Field(type= FieldType.Date,pattern = "yyyy-MM-dd HH:mm:ss.SSS") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") private Date createTime; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } public String getProjectname() { return projectname; } public void setProjectname(String projectname) { this.projectname = projectname; } public String getProjectmember() { return projectmember; } public void setProjectmember(String projectmember) { this.projectmember = projectmember; } public String getAllContent() { return allContent; } public void setAllContent(String allContent) { this.allContent = allContent; } public String getResearchOne() { return researchOne; } public void setResearchOne(String researchOne) { this.researchOne = researchOne; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public ProjDoc() { super(); // TODO Auto-generated constructor stub } public ProjDoc(String id, String filename, String projectname, String projectmember, String allContent, String researchOne, Date createTime) { super(); this.id = id; this.filename = filename; this.projectname = projectname; this.projectmember = projectmember; this.allContent = allContent; this.researchOne = researchOne; this.createTime = createTime; } @Override public String toString() { return "ProjDoc [id=" + id + ", filename=" + filename + ", projectname=" + projectname + ", projectmember=" + projectmember + ", allContent=" + allContent + ", researchOne=" + researchOne + ", createTime=" + createTime + "]"; } }
[ "herozhi0821@163.com" ]
herozhi0821@163.com
ea742871c152d34616c6358135247890a008d7a8
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat$AccessibilityNodeInfoStubImpl.java
b14bc43145c141f820e4e9bd046c7023db9393c3
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
14,746
java
// // Decompiled by Procyon v0.5.30 // package android.support.v4.view.accessibility; import android.os.Bundle; import android.graphics.Rect; import java.util.Collections; import java.util.List; import android.view.View; class AccessibilityNodeInfoCompat$AccessibilityNodeInfoStubImpl implements AccessibilityNodeInfoCompat$AccessibilityNodeInfoImpl { @Override public void addAction(final Object o, final int n) { } @Override public void addAction(final Object o, final Object o2) { } @Override public void addChild(final Object o, final View view) { } @Override public void addChild(final Object o, final View view, final int n) { } @Override public boolean canOpenPopup(final Object o) { return false; } @Override public List<Object> findAccessibilityNodeInfosByText(final Object o, final String s) { return Collections.emptyList(); } @Override public List<Object> findAccessibilityNodeInfosByViewId(final Object o, final String s) { return Collections.emptyList(); } @Override public Object findFocus(final Object o, final int n) { return null; } @Override public Object focusSearch(final Object o, final int n) { return null; } @Override public int getAccessibilityActionId(final Object o) { return 0; } @Override public CharSequence getAccessibilityActionLabel(final Object o) { return null; } @Override public Object getActionContextClick() { return null; } @Override public List<Object> getActionList(final Object o) { return null; } @Override public Object getActionScrollDown() { return null; } @Override public Object getActionScrollLeft() { return null; } @Override public Object getActionScrollRight() { return null; } @Override public Object getActionScrollToPosition() { return null; } @Override public Object getActionScrollUp() { return null; } @Override public Object getActionSetProgress() { return null; } @Override public Object getActionShowOnScreen() { return null; } @Override public int getActions(final Object o) { return 0; } @Override public void getBoundsInParent(final Object o, final Rect rect) { } @Override public void getBoundsInScreen(final Object o, final Rect rect) { } @Override public Object getChild(final Object o, final int n) { return null; } @Override public int getChildCount(final Object o) { return 0; } @Override public CharSequence getClassName(final Object o) { return null; } @Override public Object getCollectionInfo(final Object o) { return null; } @Override public int getCollectionInfoColumnCount(final Object o) { return 0; } @Override public int getCollectionInfoRowCount(final Object o) { return 0; } @Override public int getCollectionInfoSelectionMode(final Object o) { return 0; } @Override public int getCollectionItemColumnIndex(final Object o) { return 0; } @Override public int getCollectionItemColumnSpan(final Object o) { return 0; } @Override public Object getCollectionItemInfo(final Object o) { return null; } @Override public int getCollectionItemRowIndex(final Object o) { return 0; } @Override public int getCollectionItemRowSpan(final Object o) { return 0; } @Override public CharSequence getContentDescription(final Object o) { return null; } @Override public int getDrawingOrder(final Object o) { return 0; } @Override public CharSequence getError(final Object o) { return null; } @Override public Bundle getExtras(final Object o) { return new Bundle(); } @Override public int getInputType(final Object o) { return 0; } @Override public Object getLabelFor(final Object o) { return null; } @Override public Object getLabeledBy(final Object o) { return null; } @Override public int getLiveRegion(final Object o) { return 0; } @Override public int getMaxTextLength(final Object o) { return -1; } @Override public int getMovementGranularities(final Object o) { return 0; } @Override public CharSequence getPackageName(final Object o) { return null; } @Override public Object getParent(final Object o) { return null; } @Override public Object getRangeInfo(final Object o) { return null; } @Override public CharSequence getRoleDescription(final Object o) { return null; } @Override public CharSequence getText(final Object o) { return null; } @Override public int getTextSelectionEnd(final Object o) { return -1; } @Override public int getTextSelectionStart(final Object o) { return -1; } @Override public Object getTraversalAfter(final Object o) { return null; } @Override public Object getTraversalBefore(final Object o) { return null; } @Override public String getViewIdResourceName(final Object o) { return null; } @Override public Object getWindow(final Object o) { return null; } @Override public int getWindowId(final Object o) { return 0; } @Override public boolean isAccessibilityFocused(final Object o) { return false; } @Override public boolean isCheckable(final Object o) { return false; } @Override public boolean isChecked(final Object o) { return false; } @Override public boolean isClickable(final Object o) { return false; } @Override public boolean isCollectionInfoHierarchical(final Object o) { return false; } @Override public boolean isCollectionItemHeading(final Object o) { return false; } @Override public boolean isCollectionItemSelected(final Object o) { return false; } @Override public boolean isContentInvalid(final Object o) { return false; } @Override public boolean isContextClickable(final Object o) { return false; } @Override public boolean isDismissable(final Object o) { return false; } @Override public boolean isEditable(final Object o) { return false; } @Override public boolean isEnabled(final Object o) { return false; } @Override public boolean isFocusable(final Object o) { return false; } @Override public boolean isFocused(final Object o) { return false; } @Override public boolean isImportantForAccessibility(final Object o) { return true; } @Override public boolean isLongClickable(final Object o) { return false; } @Override public boolean isMultiLine(final Object o) { return false; } @Override public boolean isPassword(final Object o) { return false; } @Override public boolean isScrollable(final Object o) { return false; } @Override public boolean isSelected(final Object o) { return false; } @Override public boolean isVisibleToUser(final Object o) { return false; } @Override public Object newAccessibilityAction(final int n, final CharSequence charSequence) { return null; } @Override public Object obtain() { return null; } @Override public Object obtain(final View view) { return null; } @Override public Object obtain(final View view, final int n) { return null; } @Override public Object obtain(final Object o) { return null; } @Override public Object obtainCollectionInfo(final int n, final int n2, final boolean b) { return null; } @Override public Object obtainCollectionInfo(final int n, final int n2, final boolean b, final int n3) { return null; } @Override public Object obtainCollectionItemInfo(final int n, final int n2, final int n3, final int n4, final boolean b) { return null; } @Override public Object obtainCollectionItemInfo(final int n, final int n2, final int n3, final int n4, final boolean b, final boolean b2) { return null; } @Override public Object obtainRangeInfo(final int n, final float n2, final float n3, final float n4) { return null; } @Override public boolean performAction(final Object o, final int n) { return false; } @Override public boolean performAction(final Object o, final int n, final Bundle bundle) { return false; } @Override public void recycle(final Object o) { } @Override public boolean refresh(final Object o) { return false; } @Override public boolean removeAction(final Object o, final Object o2) { return false; } @Override public boolean removeChild(final Object o, final View view) { return false; } @Override public boolean removeChild(final Object o, final View view, final int n) { return false; } @Override public void setAccessibilityFocused(final Object o, final boolean b) { } @Override public void setBoundsInParent(final Object o, final Rect rect) { } @Override public void setBoundsInScreen(final Object o, final Rect rect) { } @Override public void setCanOpenPopup(final Object o, final boolean b) { } @Override public void setCheckable(final Object o, final boolean b) { } @Override public void setChecked(final Object o, final boolean b) { } @Override public void setClassName(final Object o, final CharSequence charSequence) { } @Override public void setClickable(final Object o, final boolean b) { } @Override public void setCollectionInfo(final Object o, final Object o2) { } @Override public void setCollectionItemInfo(final Object o, final Object o2) { } @Override public void setContentDescription(final Object o, final CharSequence charSequence) { } @Override public void setContentInvalid(final Object o, final boolean b) { } @Override public void setContextClickable(final Object o, final boolean b) { } @Override public void setDismissable(final Object o, final boolean b) { } @Override public void setDrawingOrder(final Object o, final int n) { } @Override public void setEditable(final Object o, final boolean b) { } @Override public void setEnabled(final Object o, final boolean b) { } @Override public void setError(final Object o, final CharSequence charSequence) { } @Override public void setFocusable(final Object o, final boolean b) { } @Override public void setFocused(final Object o, final boolean b) { } @Override public void setImportantForAccessibility(final Object o, final boolean b) { } @Override public void setInputType(final Object o, final int n) { } @Override public void setLabelFor(final Object o, final View view) { } @Override public void setLabelFor(final Object o, final View view, final int n) { } @Override public void setLabeledBy(final Object o, final View view) { } @Override public void setLabeledBy(final Object o, final View view, final int n) { } @Override public void setLiveRegion(final Object o, final int n) { } @Override public void setLongClickable(final Object o, final boolean b) { } @Override public void setMaxTextLength(final Object o, final int n) { } @Override public void setMovementGranularities(final Object o, final int n) { } @Override public void setMultiLine(final Object o, final boolean b) { } @Override public void setPackageName(final Object o, final CharSequence charSequence) { } @Override public void setParent(final Object o, final View view) { } @Override public void setParent(final Object o, final View view, final int n) { } @Override public void setPassword(final Object o, final boolean b) { } @Override public void setRangeInfo(final Object o, final Object o2) { } @Override public void setRoleDescription(final Object o, final CharSequence charSequence) { } @Override public void setScrollable(final Object o, final boolean b) { } @Override public void setSelected(final Object o, final boolean b) { } @Override public void setSource(final Object o, final View view) { } @Override public void setSource(final Object o, final View view, final int n) { } @Override public void setText(final Object o, final CharSequence charSequence) { } @Override public void setTextSelection(final Object o, final int n, final int n2) { } @Override public void setTraversalAfter(final Object o, final View view) { } @Override public void setTraversalAfter(final Object o, final View view, final int n) { } @Override public void setTraversalBefore(final Object o, final View view) { } @Override public void setTraversalBefore(final Object o, final View view, final int n) { } @Override public void setViewIdResourceName(final Object o, final String s) { } @Override public void setVisibleToUser(final Object o, final boolean b) { } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co
49966d9c3b78ead6c19a480e732c824a94a697cf
4c202d1527fa2a2893fa934176e1d7d013b4478c
/src/View/HitJFrame.java
01014fb2fd24a2287e323ca11f0c59a4c5133b2d
[]
no_license
fanzwd/HitMouseJ
ba6fb6f31a86a3fac828daca6e0d22fd2a487062
167766823c099954fe9c3dadcf777ca912f9c9fe
refs/heads/master
2021-01-08T04:01:50.472193
2020-02-20T14:32:21
2020-02-20T14:32:21
241,906,301
0
0
null
null
null
null
UTF-8
Java
false
false
1,934
java
package View; import java.awt.BorderLayout; import java.awt.Window; import java.awt.event.KeyListener; import java.awt.event.WindowListener; import javax.swing.JFrame; import controller.ActionLis; import controller.GameController; import controller.KeyLis; import controller.MouseLis; import controller.WindowLis; public class HitJFrame extends JFrame { private MyJPanel j1; private LoginPanel l1; private RightJPanel j2 = new RightJPanel(); private MyJMenuBar m1 = new MyJMenuBar(); private ActionLis actionLis = new ActionLis(); private WindowLis windowlis = new WindowLis(); private MouseLis mouseLis = new MouseLis(); private KeyLis keyLis; public HitJFrame(GameController gameController) { j1 = new MyJPanel(gameController); l1 = new LoginPanel(gameController); // setSize(300, 200); //宽300,高200的窗口 setResizable(false); //设置窗口不可改变大小 setTitle("欢迎来到打地鼠"); //标题 // setDefaultCloseOperation(DISPOSE_ON_CLOSE); //点击关闭,退出程序 setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); add(j1,BorderLayout.WEST); add(j2); setJMenuBar(m1); actionLis = new ActionLis(); //监听的有参构造 windowlis = new WindowLis(); mouseLis = new MouseLis(); keyLis = new KeyLis(); m1.getLogItem().addActionListener(actionLis); //注册监听,挂载监听器 m1.getRegItem().addActionListener(actionLis); this.addKeyListener(keyLis); this.addMouseListener(mouseLis); this.addWindowListener(windowlis); //监听窗口 this.setFocusable(true);//设置可以获取焦点 this.requestFocusInWindow();//获取焦点 l1.getLogButton().addActionListener(actionLis); //注册按钮监听,挂载监听器 setResizable(false); //不可改变大小 pack(); setLocationRelativeTo(null); //居中 // setVisible(true); //可视 } }
[ "weida.zhang@chukong-inc.com" ]
weida.zhang@chukong-inc.com
8e397e55fb7945cef8973493901dbbd927b95816
8150354dcda0b1389595cf09eb725078b0035784
/src/main/java/com/jiazhuo/blockgamesquare/controller/WithdrawMoneyController.java
7dc42f38bb547890cc8c319255b8907a3e12ebe3
[]
no_license
wuyiqun1988/blockgamesquare
64c767daf4457ea13c1c0471bf803c650e3a69fc
a826a28021e5c9c3669d9df77f1a466632e2a95f
refs/heads/master
2020-04-15T03:56:21.710452
2019-01-16T09:56:34
2019-01-16T09:56:34
164,366,187
0
1
null
null
null
null
UTF-8
Java
false
false
8,263
java
package com.jiazhuo.blockgamesquare.controller; import com.jiazhuo.blockgamesquare.domain.WithdrawMoney; import com.jiazhuo.blockgamesquare.qo.PageResult; import com.jiazhuo.blockgamesquare.qo.WithdrawMoneyQueryObject; import com.jiazhuo.blockgamesquare.service.IWithdrawMoneyService; import com.jiazhuo.blockgamesquare.util.DateUtil; import com.jiazhuo.blockgamesquare.util.RequiredPermission; import com.jiazhuo.blockgamesquare.vo.JSONResultVo; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; @Controller public class WithdrawMoneyController { @Autowired private IWithdrawMoneyService withdrawMoneyService; /** * 提现申请列表 * @param qo * @return */ @RequestMapping(value = "/mgrsite/withdrawMoney/apply", method = RequestMethod.GET) @ResponseBody public JSONResultVo withdrawMoneyApplyPage(@ModelAttribute("qo") WithdrawMoneyQueryObject qo){ JSONResultVo vo = new JSONResultVo(); PageResult result = withdrawMoneyService.withdrawMoneyApplyPage(qo); vo.setResult(result); return vo; } /** * 提现审核成功列表 * @param qo * @return */ @RequestMapping(value = "/mgrsite/withdrawMoney/pass", method = RequestMethod.GET) @ResponseBody public JSONResultVo withdrawMoneyPassPage(@ModelAttribute("qo") WithdrawMoneyQueryObject qo){ JSONResultVo vo = new JSONResultVo(); PageResult result = withdrawMoneyService.withdrawMoneyPassPage(qo); vo.setResult(result); return vo; } /** * 提现审核失败列表 * @param qo * @return */ @RequestMapping(value = "/mgrsite/withdrawMoney/fail", method = RequestMethod.GET) @ResponseBody public JSONResultVo withdrawMoneyFailPage(@ModelAttribute("qo") WithdrawMoneyQueryObject qo){ JSONResultVo vo = new JSONResultVo(); PageResult result = withdrawMoneyService.withdrawMoneyFailPage(qo); vo.setResult(result); return vo; } /** * excel导出提现审核通过列表 * @param response * @throws IOException */ @RequestMapping(value = "/mgrsite/withdrawMoney/pass/exportData", method = RequestMethod.GET) @RequiredPermission("excel导出提现审核通过列表") public void exportWithdrawMoneyPassData(HttpServletResponse response) throws IOException { //设置想下载的响应头信息 response.addHeader("Content-disposition", "attachment;filename=withdrawMoneyPassInfo.xls"); //查询需要的用户信息 List<WithdrawMoney> withdrawMoneyList = withdrawMoneyService.exportWithdrawMoneyPassData(); //创建一个excel工作表 HSSFWorkbook workbook = new HSSFWorkbook(); //创建一个工作页签sheet HSSFSheet sheet = workbook.createSheet(); HSSFRow hander = sheet.createRow(0); //创建单元格信息 hander.createCell(0).setCellValue("申请时间"); hander.createCell(1).setCellValue("用户名"); hander.createCell(2).setCellValue("手机号"); hander.createCell(3).setCellValue("数量"); hander.createCell(4).setCellValue("货币类型"); hander.createCell(5).setCellValue("审核人"); hander.createCell(6).setCellValue("审核时间"); hander.createCell(7).setCellValue("审核备注"); for (int i = 0; i < withdrawMoneyList.size(); i++){ WithdrawMoney withdrawMoney = withdrawMoneyList.get(i); HSSFRow currentRow = sheet.createRow(i + 1); //创建单元格信息 String createdTime = DateUtil.dateToStrLong(withdrawMoney.getCreatedTime()); //转化成string currentRow.createCell(0).setCellValue(createdTime); currentRow.createCell(1).setCellValue(withdrawMoney.getNickName()); currentRow.createCell(2).setCellValue(withdrawMoney.getPhoneNumber()); currentRow.createCell(3).setCellValue(withdrawMoney.getAmount()); switch (withdrawMoney.getTokenType()){ case 1: currentRow.createCell(4).setCellValue("ETH"); break; case 2: currentRow.createCell(4).setCellValue("EOS"); break; case 3: currentRow.createCell(4).setCellValue("BGS"); break; } currentRow.createCell(5).setCellValue(withdrawMoney.getAuditor()); String auditTime = DateUtil.dateToStrLong(withdrawMoney.getAuditTime()); //转化成string currentRow.createCell(6).setCellValue(auditTime); currentRow.createCell(7).setCellValue(withdrawMoney.getRemark()); } workbook.write(response.getOutputStream()); //关闭流操作 workbook.close(); } /** * excel导出提现审核失败列表 * @param response * @throws IOException */ @RequestMapping(value = "/mgrsite/withdrawMoney/fail/exportData", method = RequestMethod.GET) @RequiredPermission("excel导出提现审核失败列表") public void exportWithdrawMoneyFailData(HttpServletResponse response) throws IOException { //设置想下载的响应头信息 response.addHeader("Content-disposition", "attachment;filename=withdrawMoneyFailInfo.xls"); //查询需要的用户信息 List<WithdrawMoney> withdrawMoneyList = withdrawMoneyService.exportWithdrawMoneyFailData(); //创建一个excel工作表 HSSFWorkbook workbook = new HSSFWorkbook(); //创建一个工作页签sheet HSSFSheet sheet = workbook.createSheet(); HSSFRow hander = sheet.createRow(0); //创建单元格信息 hander.createCell(0).setCellValue("申请时间"); hander.createCell(1).setCellValue("用户名"); hander.createCell(2).setCellValue("手机号"); hander.createCell(3).setCellValue("数量"); hander.createCell(4).setCellValue("货币类型"); hander.createCell(5).setCellValue("审核人"); hander.createCell(6).setCellValue("审核时间"); hander.createCell(7).setCellValue("审核备注"); for (int i = 0; i < withdrawMoneyList.size(); i++){ WithdrawMoney withdrawMoney = withdrawMoneyList.get(i); HSSFRow currentRow = sheet.createRow(i + 1); //创建单元格信息 String createdTime = DateUtil.dateToStrLong(withdrawMoney.getCreatedTime()); //转化成string currentRow.createCell(0).setCellValue(createdTime); currentRow.createCell(1).setCellValue(withdrawMoney.getNickName()); currentRow.createCell(2).setCellValue(withdrawMoney.getPhoneNumber()); currentRow.createCell(3).setCellValue(withdrawMoney.getAmount()); switch (withdrawMoney.getTokenType()){ case 1: currentRow.createCell(4).setCellValue("ETH"); break; case 2: currentRow.createCell(4).setCellValue("EOS"); break; case 3: currentRow.createCell(4).setCellValue("BGS"); break; } currentRow.createCell(5).setCellValue(withdrawMoney.getAuditor()); String auditTime = DateUtil.dateToStrLong(withdrawMoney.getAuditTime()); //转化成string currentRow.createCell(6).setCellValue(auditTime); currentRow.createCell(7).setCellValue(withdrawMoney.getRemark()); } workbook.write(response.getOutputStream()); //关闭流操作 workbook.close(); } }
[ "wuyiqun_java@163.com" ]
wuyiqun_java@163.com
171ccae6e2073d4ee2fce860e679dfaaf852c7f9
bf6596e3847b3207923b3030c142ef183a59228b
/FxLib/src/com/dspit/fx/nav/TestNode.java
be88c7e38f7f1e188d2c1121e74c603b456b3022
[]
no_license
DSpit/FxLibrary
bc304eb49c0fdc78b68efca27e9ddbd8897fb99a
3a4ebebc86aab7ea42ecd46cc0531bea826596e9
refs/heads/master
2021-01-01T18:37:47.292257
2015-01-04T00:56:05
2015-01-04T00:56:05
27,079,660
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
package com.dspit.fx.nav; import javafx.scene.control.Label; import javafx.scene.layout.StackPane; import com.dspit.nav.Navigatable.NavNode; /** * A testing node which allows for different colors to be displayed * with a test label. * * @author David Boivin (Spit) */ public class TestNode extends StackPane implements NavNode { private String mTitle; private String mIcon = "com/dspit/fx/nav/resources/Temp_Icon.png"; public TestNode(String title, String c){ super(); mTitle = title; Label l = new Label("This is a test frame"); this.setStyle("-fx-background-color:" + c + ";"); this.getChildren().add(l); } @Override public String getTitle() { return mTitle; } @Override public String getIcon() { return mIcon; } @Override public void setTitle(String title) { mTitle = title; } @Override public void setIcon(String iconImage) { mIcon = iconImage; } }
[ "db2_hockey@hotmial.com" ]
db2_hockey@hotmial.com
ed740e758e51fd042d212d780fe3f64ee770113e
a0e5858528a288b97aa32fb0f2170d6ed9226885
/emp-nangang/micro/src/main/java/com/taiji/MicroEmpNangangApplication.java
fb00e0682c128c4be55a4434f53e4b1c9813d9bc
[]
no_license
rauldoblem/nangang
f0a0f0c816c7de915c352cc467b2e6716c87a310
e48cadeaf5245c42b7e9a21f28903f4f4e8b6996
refs/heads/master
2020-08-11T04:01:12.891437
2019-06-25T13:42:57
2019-06-25T13:42:57
214,486,888
0
0
null
2019-10-11T16:51:17
2019-10-11T16:51:17
null
UTF-8
Java
false
false
667
java
package com.taiji; import org.springframework.boot.SpringApplication; import org.springframework.cloud.client.SpringCloudApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; @EnableDiscoveryClient @SpringCloudApplication @EnableJpaAuditing @EnableGlobalMethodSecurity(prePostEnabled = true) public class MicroEmpNangangApplication { public static void main(String[] args){ SpringApplication.run(MicroEmpNangangApplication.class,args); } }
[ "18151950796@163.com" ]
18151950796@163.com
645e3665961862484315cc8eca88d8c997b355e1
3b0d0619f15230dba33a4be9c04d2117b22c729a
/LibMagestore/src/main/java/com/magestore/app/pos/model/catalog/PosProductOptionConfigOption.java
7a8f794b3702e8f7cbc781effbf13d5e2fbc5f8a
[]
no_license
miketrueplus/MagestorePOSAndroid
87e291336bb0ace6c32548de16c36d27c618c003
e1751d31ff3c397987d476cde83f593c3c80053c
refs/heads/master
2021-01-13T04:20:14.607652
2017-09-18T04:03:15
2017-09-18T04:03:15
77,466,913
1
4
null
null
null
null
UTF-8
Java
false
false
503
java
package com.magestore.app.pos.model.catalog; import com.magestore.app.pos.model.PosAbstractModel; import java.util.Map; /** * Created by folio on 3/3/2017. */ public class PosProductOptionConfigOption extends PosAbstractModel { public String optionId; public String optionLabel; public Map<String, String> optionValues; @Override public String getID() { return optionId; } @Override public String getDisplayContent() { return optionLabel; } }
[ "mike@trueplus.vn" ]
mike@trueplus.vn
752367a8a912f6d95136bbdd361f913fed96dc14
82a8f35c86c274cb23279314db60ab687d33a691
/app/src/main/java/com/duokan/reader/domain/cloud/C0890y.java
9ea5666140ceb99cf39dc0fdc5864b6621d127f4
[]
no_license
QMSCount/DReader
42363f6187b907dedde81ab3b9991523cbf2786d
c1537eed7091e32a5e2e52c79360606f622684bc
refs/heads/master
2021-09-14T22:16:45.495176
2018-05-20T14:57:15
2018-05-20T14:57:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,262
java
package com.duokan.reader.domain.cloud; /* renamed from: com.duokan.reader.domain.cloud.y */ class C0890y implements al { /* renamed from: a */ final /* synthetic */ C0889x f4211a; C0890y(C0889x c0889x) { this.f4211a = c0889x; } /* renamed from: a */ public void mo1112a(DkCloudReadingInfo dkCloudReadingInfo, DkCloudReadingInfo dkCloudReadingInfo2, String str) { this.f4211a.f4209d.mo1112a(dkCloudReadingInfo, dkCloudReadingInfo2, str); } /* renamed from: a */ public void mo1113a(DkCloudReadingInfo dkCloudReadingInfo, String str, String str2) { this.f4211a.f4209d.mo1115b(dkCloudReadingInfo, str, str2); } /* renamed from: b */ public void mo1114b(DkCloudReadingInfo dkCloudReadingInfo, DkCloudReadingInfo dkCloudReadingInfo2, String str) { this.f4211a.f4210e.m4997a(dkCloudReadingInfo2); DkUserReadingNotesManager.m5136a().m5154a(dkCloudReadingInfo2.getCloudId(), this.f4211a.f4207b); this.f4211a.f4209d.mo1114b(dkCloudReadingInfo, dkCloudReadingInfo2, str); } /* renamed from: b */ public void mo1115b(DkCloudReadingInfo dkCloudReadingInfo, String str, String str2) { this.f4211a.f4209d.mo1115b(dkCloudReadingInfo, str, str2); } }
[ "lixiaohong@p2peye.com" ]
lixiaohong@p2peye.com
f919621da6ede682d0d08708b6d32695b62c5e12
4a7a790fb419e0a31a65688528a694f0625fd96d
/src/main/java/ru/kpfu/classwork/Lesson_12/Line.java
70827a485169e68a5dd8c32295b25cd7928b3b32
[]
no_license
mykfu/java_1_course_in
973ca681a91fee46d0c703a96079c7502aae748c
fa417d22faec50f40ade63d34f8ec37e7cbf7ddc
refs/heads/master
2023-02-01T19:37:56.666490
2020-12-22T16:34:53
2020-12-22T16:34:53
295,705,481
0
1
null
null
null
null
UTF-8
Java
false
false
663
java
package ru.kpfu.classwork.Lesson_12; public class Line { private Point begin; private Point end; public Line(int x1, int y1, int x2, int y2) { this(new Point(x1, y1), new Point(x2, y2)); } public Line(Point begin, Point end) { this.begin = begin; this.end = end; } public Point getBegin() { return begin; } public Point getEnd() { return end; } public int getBeginX() { return begin.getX(); } @Override public String toString() { return "Line{" + "begin=" + begin + ", end=" + end + '}'; } }
[ "shajdaro@kpfu.ru" ]
shajdaro@kpfu.ru
26944bdc8e30cebecf705811c7497454f9f50718
821ed0666d39420d2da9362d090d67915d469cc5
/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java
1e0e66cc1720ffbb7780fe57f478694ca1cd237a
[ "Apache-2.0" ]
permissive
LenkayHuang/Onos-PNC-for-PCEP
03b67dcdd280565169f2543029279750da0c6540
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
refs/heads/master
2021-01-01T05:19:31.547809
2016-04-12T07:25:13
2016-04-12T07:25:13
56,041,394
1
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
package org.onosproject.net.topology; import static org.onosproject.net.Link.State.ACTIVE; import static org.onosproject.net.Link.Type.INDIRECT; /** * Link weight for measuring link cost as hop count with indirect links * being as expensive as traversing the entire graph to assume the worst. */ public class HopCountLinkWeight implements LinkWeight { private final int indirectLinkCost; /** * Creates a new hop-count weight. */ public HopCountLinkWeight() { this.indirectLinkCost = Short.MAX_VALUE; } /** * Creates a new hop-count weight with the specified cost of indirect links. * * @param indirectLinkCost indirect link cost */ public HopCountLinkWeight(int indirectLinkCost) { this.indirectLinkCost = indirectLinkCost; } @Override public double weight(TopologyEdge edge) { // To force preference to use direct paths first, make indirect // links as expensive as the linear vertex traversal. return edge.link().state() == ACTIVE ? (edge.link().type() == INDIRECT ? indirectLinkCost : 1) : -1; } }
[ "826080529@qq.com" ]
826080529@qq.com
d16b8cccf01ef4f6f861b4f6f0de7e47f439987d
2828d39f5beea3d056caa28d80f2390ce6c5a377
/app/src/main/java/com/zacharee1/sswidgets/weather/WeatherListener.java
61c5fbd9caf49499b634e76f19fb73aa8bf53568
[]
no_license
zacharee/SSWidgets
85eb95244da53fa02aab1687fa32ec87a2290386
d716fc9c770df30b86b8f9fad3c2d97db5e1961e
refs/heads/master
2021-01-16T18:46:27.047594
2017-09-06T21:03:25
2017-09-06T21:03:25
100,111,687
8
5
null
null
null
null
UTF-8
Java
false
false
178
java
package com.zacharee1.sswidgets.weather; public interface WeatherListener { void onWeatherInfoFound(WeatherInfo info); void onWeatherConnectionFailed(String message); }
[ "zachary@techyteen.tk" ]
zachary@techyteen.tk
bcd5f7d51bcd573500c54517846873098485e712
03d2584b09036c869ab11e22312714b2dda69393
/school-friend-service-webapp/src/main/java/com/nju/edu/cn/software/domain/UserInfo.java
40d4026bb70d02a58f146bb52ebc723ed98c9733
[]
no_license
CunDeveloper/AlumniGroupService
c8c9d9b09b2dd42e075d79de6910df906eef3817
55d71f26561ff1a301d415d8642593de0cac7040
refs/heads/master
2021-01-17T17:41:59.942967
2016-05-28T07:44:33
2016-05-28T07:44:33
59,883,131
0
0
null
null
null
null
UTF-8
Java
false
false
483
java
package com.nju.edu.cn.software.domain; import java.util.List; public class UserInfo { private Author authorInfo; private List<UserDegreeInfo> degreeInfos; public Author getAuthorInfo() { return authorInfo; } public void setAuthorInfo(Author authorInfo) { this.authorInfo = authorInfo; } public List<UserDegreeInfo> getDegreeInfos() { return degreeInfos; } public void setDegreeInfos(List<UserDegreeInfo> degreeInfos) { this.degreeInfos = degreeInfos; } }
[ "15261893862@163.com" ]
15261893862@163.com
417d584537a8df139038549d91dcaadf9780b723
943553971aa0c9983a03668aadcba675be572f3a
/app/src/androidTest/java/com/example/piyus/coverflow/ExampleInstrumentedTest.java
fce2430b23d856a96a5b3f4c4ff941bed2cdf37c
[]
no_license
piyushsharma6715/CoverFlow
6e110737db83e65f3bf0c54c1d9666dbdbf68638
87e6ae5412905f2c773a12ae1b376b20a0c21f07
refs/heads/master
2020-03-18T03:05:25.391732
2018-05-21T05:34:45
2018-05-21T05:34:45
133,990,779
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.example.piyus.coverflow; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.piyus.coverflow", appContext.getPackageName()); } }
[ "piyushsharma6715@gmail.com" ]
piyushsharma6715@gmail.com
6190bc50fa2b0562e4554b66bc1c367d6d34e96b
e87c3f1d5d6196d753c5ddf6499e4a7846db71c1
/src/main/java/io/github/matek2305/pt/dev/KeyDataLoader.java
8add6673e0d44450d401a8aa3ca4ac2f3ebaa9d2
[]
no_license
gitter-badger/pt-app
5cd4fe42561b246f0ab08033b87a649aa9f3cd2f
7812361a12fe8bf475abbd90ec41f5cb4922f9b8
refs/heads/develop
2021-01-18T16:32:57.190365
2016-02-21T20:39:59
2016-02-21T20:39:59
53,158,725
0
0
null
2016-03-04T19:00:24
2016-03-04T19:00:24
null
UTF-8
Java
false
false
320
java
package io.github.matek2305.pt.dev; import com.github.matek2305.dataloader.DataLoader; import io.github.matek2305.pt.domain.entity.BaseEntity; /** * @author Mateusz Urbański <matek2305@gmail.com> */ interface KeyDataLoader<T extends BaseEntity, K extends Enum<K>> extends DataLoader { T getDevEntity(K key); }
[ "matek2305@gmail.com" ]
matek2305@gmail.com
a70aec079b0e49e198ccd0ffa8ad43ba57caa945
9fe800087ef8cc6e5b17fa00f944993b12696639
/contrib/rasterizertask/sources/org/apache/tools/ant/taskdefs/optional/RasterizerTaskSVGConverterController.java
0b15e5a40a53b7e32de4c5f6d0e7a229f70d1c56
[ "Apache-2.0" ]
permissive
balabit-deps/balabit-os-7-batik
14b80a316321cbd2bc29b79a1754cc4099ce10a2
652608f9d210de2d918d6fb2146b84c0cc771842
refs/heads/master
2023-08-09T03:24:18.809678
2023-05-22T20:34:34
2023-05-27T08:21:21
158,242,898
0
0
Apache-2.0
2023-07-20T04:18:04
2018-11-19T15:03:51
Java
UTF-8
Java
false
false
3,877
java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.tools.ant.taskdefs.optional; // -- Batik classes ---------------------------------------------------------- import org.apache.batik.transcoder.Transcoder; import org.apache.batik.apps.rasterizer.SVGConverterController; import org.apache.batik.apps.rasterizer.SVGConverterSource; // -- Ant classes ------------------------------------------------------------ import org.apache.tools.ant.Task; // -- Java SDK classes ------------------------------------------------------- import java.io.File; import java.util.Map; import java.util.List; /** * Implements simple controller for the <code>SVGConverter</code> operation. * * <p>This is almost the same as the * {@link org.apache.batik.apps.rasterizer.DefaultSVGConverterController DefaultSVGConverterController} * except this produces error message when the conversion fails.</p> * * <p>See {@link SVGConverterController} for the method documentation.</p> * * @see SVGConverterController SVGConverterController * @see org.apache.batik.apps.rasterizer.DefaultSVGConverterController DefaultSVGConverterController * * @author <a href="mailto:ruini@iki.fi">Henri Ruini</a> * @version $Id: RasterizerTaskSVGConverterController.java 1733420 2016-03-03 07:41:59Z gadams $ */ public class RasterizerTaskSVGConverterController implements SVGConverterController { // -- Variables ---------------------------------------------------------- /** Ant task that is used to log messages. */ protected Task executingTask = null; // -- Constructors ------------------------------------------------------- /** * Don't allow public usage. */ protected RasterizerTaskSVGConverterController() { } /** * Sets the given Ant task to receive log messages. * * @param task Ant task. The value can be <code>null</code> when log messages won't be written. */ public RasterizerTaskSVGConverterController(Task task) { executingTask = task; } // -- Public interface --------------------------------------------------- public boolean proceedWithComputedTask(Transcoder transcoder, Map hints, List sources, List dest){ return true; } public boolean proceedWithSourceTranscoding(SVGConverterSource source, File dest) { return true; } public boolean proceedOnSourceTranscodingFailure(SVGConverterSource source, File dest, String errorCode){ if(executingTask != null) { executingTask.log("Unable to rasterize image '" + source.getName() + "' to '" + dest.getAbsolutePath() + "': " + errorCode); } return true; } public void onSourceTranscodingSuccess(SVGConverterSource source, File dest){ } }
[ "testbot@balabit.com" ]
testbot@balabit.com
1a19fdb3387310360bb0ef587959dc022a4d0c51
83b82c13e57c4b368062181572df9ec2a07c376d
/appareldiving/data-retriever/src/main/java/com/appareldiving/dataretriever/exception/NoDataSentException.java
0603525a5a75f3d4d214274a93feda9564aad9f6
[]
no_license
kwistep/appareldiving
fe227a9232433ed0cf063789ccc41650b2706fac
0ce93afc264ea82dd6a5efa45108ba6abba6bdbe
refs/heads/master
2021-07-12T06:01:24.854414
2021-04-08T01:08:01
2021-04-08T01:08:01
242,582,187
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package com.appareldiving.dataretriever.exception; import org.springframework.http.HttpStatus; public class NoDataSentException { private int statusCode; private String message; public NoDataSentException() { this.message = "No data has been sent."; this.statusCode = HttpStatus.BAD_REQUEST.value(); } public int getStatusCode() { return statusCode; } public void setStatusCode(int statusCode) { this.statusCode = statusCode; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "ur.anton.danilov@gmail.com" ]
ur.anton.danilov@gmail.com
4a8df5d59b830dedfa5e45272e0dd917fac00abf
7cc7af26fca92e3fdc264483a9e17f242b56b879
/kodilla-exception/src/main/java/com/kodilla/exception/test/FlightFinderExecutor.java
ce87998dd2b2af1fa3eab985eba0c2080592ab46
[]
no_license
greglski/grzegorz-leczkowski-kodilla-java
68c17fc6c2255b60e1a0c9315f0665745b0fc8b4
52dbe9056ffebad29cbed883f9b95ef45da42e0f
refs/heads/master
2021-01-20T06:44:20.600457
2018-02-06T13:40:06
2018-02-06T13:40:06
101,512,350
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package com.kodilla.exception.test; public class FlightFinderExecutor { public static void main(String[] args) { FlightFinder flightFinder = new FlightFinder(); try { flightFinder.findFlight(new Flight("Warsaw", "Nice")); } catch (RouteNotFoundException e) { System.out.println("We don't recognize your destination airport"); } System.out.println("And we are still running."); System.out.println(); try { flightFinder.findFlight(new Flight("Warsaw", "Nic")); } catch (RouteNotFoundException e) { System.out.println("We don't recognize your destination airport"); } System.out.println("And we are still running."); System.out.println(); try { flightFinder.findFlight(new Flight("Warsaw", "Rome")); } catch (RouteNotFoundException e) { System.out.println("We don't recognize your destination airport"); } System.out.println("And we are still running."); } }
[ "grzegorz.leczkowski@gmail.com" ]
grzegorz.leczkowski@gmail.com
5db52766eca0d6430e7bca358ae60a984263e36e
60c870de72c99709dd4b26a465f0c6477da8e246
/src/main/java/org/multiplex/domain/ScreeningRepository.java
cd1d2da3de28a6713e518194436ffa9ef9399f08
[]
no_license
krystiankaluzny/cinema-ticket-booking-app
73fe05b1fb8d3a9ab86ffa48c0034a1f36f60410
cc4ea7e9b409c1f7a9b1afcc5b3daf1e895f937c
refs/heads/master
2020-09-22T11:42:15.841020
2019-12-22T22:37:15
2019-12-22T22:37:15
225,179,171
0
0
null
2019-12-22T22:37:16
2019-12-01T14:57:40
null
UTF-8
Java
false
false
395
java
package org.multiplex.domain; import org.springframework.data.repository.Repository; import java.time.OffsetDateTime; import java.util.List; interface ScreeningRepository extends Repository<Screening, Integer> { Screening save(Screening screening); Screening findById(int screeningId); List<Screening> findByStartScreeningTimeBetween(OffsetDateTime from, OffsetDateTime to); }
[ "k.kaluzny141@gmail.com" ]
k.kaluzny141@gmail.com
b15a433834626348f6b1c2ceb8e6797d1a05c1ae
2bce0dcbd51a1f46275987f9df3975631450c33e
/group_01/FullQuadratic.java
e0cd8dbeb823ac9e76946889630553ad92178027
[ "MIT" ]
permissive
tris-sondon/mini-progs-java
e8fbc5825c2338157969e37b4fd213e5e80435c9
8460f6194f84f0a931fc84a75a3bbc8e78292280
refs/heads/master
2020-06-01T01:32:57.871788
2014-06-30T22:03:11
2014-06-30T22:03:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
public class FullQuadratic { public static void main (String [] args) { double a = Double.parseDouble(args[0]); double b = Double.parseDouble(args[1]); double c = Double.parseDouble(args[2]); double d = b*b - 4*a*c; if (d < 0) { System.out.println("This equation has no real roots"); } else { System.out.println("Roots of the equation:"); System.out.println("x1 = " + ((-b + Math.sqrt(d)) / (2 * a))); System.out.println("x1 = " + ((-b - Math.sqrt(d)) / (2 * a))); } } }
[ "tristana.sondon@gmail.com" ]
tristana.sondon@gmail.com
01dcd4fc9b99079807c0c70d4eda027f13c4958c
11c721abff1c38dbfcdc050dc11e9e62d7ed3662
/surefire-integration-tests/src/test/resources/unicode-testnames/src/test/java/junit/twoTestCases/EscapeTest.java
69ea6e1883b621635f2e264623472465b6afd0a3
[ "Apache-2.0" ]
permissive
DaGeRe/maven-surefire
4106549e59d8bd154ce0872726cc73a7585e8edb
45de58b12413df54d3dc7cd313f117930964504e
refs/heads/master
2022-03-09T15:41:34.644027
2017-10-11T15:29:09
2017-10-11T22:46:54
106,571,653
1
2
null
2017-10-11T15:20:17
2017-10-11T15:20:17
null
UTF-8
Java
false
false
2,136
java
package junit.twoTestCases; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import junit.extensions.TestSetup; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class EscapeTest extends TestCase { private boolean setUpCalled = false; private static boolean tearDownCalled = false; public EscapeTest( String name ) { super( name ); } public static Test suite() { TestSuite suite = new TestSuite(); Test test = new EscapeTest( "testSetUp" ); suite.addTest( test ); return new TestSetup( suite ) { protected void setUp() { //oneTimeSetUp(); } protected void tearDown() { oneTimeTearDown(); } }; } protected void setUp() { setUpCalled = true; tearDownCalled = false; System.out.println( "Called setUp" ); } protected void tearDown() { setUpCalled = false; tearDownCalled = true; System.out.println( "Called tearDown" ); } public void testSetUp() { assertTrue( "setUp was not called", setUpCalled ); } public static void oneTimeTearDown() { assertTrue( "tearDown was not called", tearDownCalled ); } }
[ "krosenvold@apache.org" ]
krosenvold@apache.org
f403406f850f9a492fd715e0e12df4ba9986f2b0
c20bc33b027cc1e1c8913d2675b88f84e1ca15bb
/src/com/fishinwater/situp/dao/base/IDayDao.java
f229193f4286678b0dae5cb085522ca79098524a
[ "MIT" ]
permissive
hornhuang/SitUpWebServer
8e8c4b16abe4442c90a1179c1f5e73c3342e1309
62ff1cfd74826a5b93c4260f45f1aebfcf39def6
refs/heads/master
2022-03-29T18:20:47.495966
2020-01-07T10:07:44
2020-01-07T10:07:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
154
java
package com.fishinwater.situp.dao.base; import com.fishinwater.situp.beans.DayBean; public interface IDayDao { DayBean getDayById(String day_id); }
[ "814484626@qq.com" ]
814484626@qq.com
73b8a872493484a8949a56d77d737bcaf405c798
dd17d429daf7bb9c1f66fd48a03269df5e535447
/bit/algorithm/dp/LC77MinDistance.java
e1dc6d1d0cbde9d21a300dbcef7303f2918aae95
[]
no_license
wangzilong2019/Algorithm
6e1b3f549c13ae171fa79f5899169e320cbbdcb1
43af25ae1c167e7ebe1d1be461eca57b52e93ab6
refs/heads/master
2022-12-01T19:17:21.206767
2022-11-23T13:33:19
2022-11-23T13:33:19
233,599,797
1
0
null
null
null
null
UTF-8
Java
false
false
2,085
java
package bit.algorithm.dp; import java.lang.management.ManagementFactory; public class LC77MinDistance { /** * 给定两个单词word1和word2,请计算将word1转换为word2至少需要多少步操作。 * 你可以对一个单词执行以下3种操作: * a)在单词中插入一个字符 * b)删除单词中的一个字符 * c)替换单词中的一个字符 */ /** * 动态规划: * 俩个字符串右侧由三种对齐方式 * 第一种 * x1, x2, xn * x1, x2 * 第二种 * x1, x2 * x1, x2, xn * 第一种和第二种只需要删除一个字符,再加上之后的操作次次数即可 * 第三种 * x1, x2 * x1, x2 * 此时第三种由俩种可能,最后一个字符相同或是不同,此时只需要判断俩个字符相同还hi不同,然后再加上之后的即可 * @param word1 string字符串 * @param word2 string字符串 * @return int整型 */ public int minDistance (String word1, String word2) { // write code here //记录俩个字符串的长度 int row = word1.length(); int col = word2.length(); //初始化数组 int[][] d = new int[row+1][col+1]; for (int j = 0; j <= col; j++ ) { d[0][j] = j; } for (int i = 0; i <= row; i++) { d[i][0] = i; } //动态规划求解 int diff; for (int i = 1; i <= row; i++) { for (int j = 1; j <= col; j++) { //判断当前字符是否相同 if (word1.charAt(i-1) == word2.charAt(j-1)) { diff = 0; } else { diff = 1; } //先取俩者最小值 int temp = Math.min(d[i-1][j] + 1, d[i][j-1] + 1); //之后取三者最小值 d[i][j] = Math.min(temp, d[i-1][j-1] + diff); } } return d[row][col]; } }
[ "1428075063@qq.com" ]
1428075063@qq.com
7f569cbb4eed2c3d23d37ccd551123e893b4325c
cf7ee4603d595a8759c844fefa95d4663c4289f8
/app/src/main/java/com/motiondetect/detector/data/bluetooth/BtManager.java
b66fafee82f53143b646bc6536ae6cdb858f76a1
[]
no_license
JxSun/MotionDetect
729372073f36ee91d0fdb2d3aa38e90575dcbc88
932aec8705108ca942d44b0ecf1a108daa7112c0
refs/heads/master
2021-01-12T15:51:18.276282
2016-10-25T16:39:24
2016-10-25T16:39:24
71,892,440
0
0
null
null
null
null
UTF-8
Java
false
false
9,631
java
package com.motiondetect.detector.data.bluetooth; import android.app.Activity; import android.app.Application; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.content.Context; import android.util.Log; import com.motiondetect.detector.MotionDetectApplication; import com.motiondetect.detector.model.BtDeviceModel; import com.motiondetect.detector.contract.MotionDetectAppContract; import com.motiondetect.detector.util.BtUtil; import com.motiondetect.detector.view.ContextWrapper; import com.github.ivbaranov.rxbluetooth.Action; import com.github.ivbaranov.rxbluetooth.RxBluetooth; import java.util.HashMap; import java.util.Map; import java.util.UUID; import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.schedulers.Schedulers; public class BtManager { private static final String TAG = BtManager.class.getSimpleName(); public static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); private Application mApplication; private Subscription mDeviceSubscription; private Subscription mDiscoveryStartSubscription; private Subscription mDiscoveryFinishSubscription; private Subscription mStateSubscription; private Subscription mConnectSubscription; private OnBluetoothEventListener mOnEventListener; private RxBluetooth mRxBluetooth; private Map<BtDeviceModel, BluetoothDevice> mDeviceMap; private boolean mNeedRetriggerDiscovery = false; private boolean mIsReleased = false; public BtManager(MotionDetectAppContract app) { mApplication = (MotionDetectApplication) app; mRxBluetooth = new RxBluetooth(mApplication); mDeviceMap = new HashMap<>(); initializeSubscriptions(); } private void initializeSubscriptions() { mDeviceSubscription = createDeviceSubscription(); mDiscoveryStartSubscription = createDiscoveryStartSubscription(); mDiscoveryFinishSubscription = createDiscoveryFinishSubscription(); mStateSubscription = createStateSubscription(); } public void setOnBluetoothEventListener(OnBluetoothEventListener listener) { mOnEventListener = listener; } public void enableBluetoothIfNeeded(ContextWrapper wrapper, int requestCode) { Context context = wrapper.getContext(); if (!mRxBluetooth.isBluetoothAvailable() && context instanceof Activity) { mRxBluetooth.enableBluetooth((Activity) context, requestCode); } } private BtDeviceModel addBtDevice(BluetoothDevice device) { BtDeviceModel model = BtUtil.convertBluetoothDeviceToBtDeviceModel(device); if (model != null && !mDeviceMap.containsKey(model)) { Log.d(TAG, "addBtDevice() - add: " + model.toString()); mDeviceMap.put(model, device); } return model; } public boolean isExist(BtDeviceModel model) { return mDeviceMap.containsKey(model); } public BluetoothDevice getBtDevice(BtDeviceModel model) { return mDeviceMap.get(model); } private void clearBtDevices() { mDeviceMap.clear(); } public boolean isDiscovering() { return mRxBluetooth.isDiscovering(); } public void startDiscovery() { Log.v(TAG, "startDiscovery() - start scanning bluetooth devices"); if (mRxBluetooth.isDiscovering()) { mRxBluetooth.cancelDiscovery(); mNeedRetriggerDiscovery = true; } else { mRxBluetooth.startDiscovery(); } } public void cancelDiscovery() { if (mRxBluetooth.isDiscovering()) { mRxBluetooth.cancelDiscovery(); } } public void reset() { Log.v(TAG, "reset()"); mIsReleased = false; initializeSubscriptions(); } public void release() { Log.v(TAG, "release() - release bluetooth resources"); mIsReleased = true; cancelDiscovery(); unsubscribeAll(); mOnEventListener = null; } private Subscription createDeviceSubscription() { return mRxBluetooth.observeDevices() .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.computation()) .subscribe(new Action1<BluetoothDevice>() { @Override public void call(BluetoothDevice device) { if (device == null || device.getName() == null) { return; } addBtDevice(device); mOnEventListener.onDetectDevice(BtUtil.convertBluetoothDeviceToBtDeviceModel(device)); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Log.e(TAG, "getDeviceSubscription() - " + throwable.getMessage()); } }); } private Subscription createDiscoveryStartSubscription() { return mRxBluetooth.observeDiscovery() .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.computation()) .filter(Action.isEqualTo(BluetoothAdapter.ACTION_DISCOVERY_STARTED)) .subscribe(new Action1<String>() { @Override public void call(String s) { mOnEventListener.onDiscoveryStart(); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Log.e(TAG, "getDiscoveryStartSubscription() - " + throwable.getMessage()); } }); } private Subscription createDiscoveryFinishSubscription() { return mRxBluetooth.observeDiscovery() .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.computation()) .filter(Action.isEqualTo(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) .subscribe(new Action1<String>() { @Override public void call(String s) { if (mNeedRetriggerDiscovery) { mRxBluetooth.startDiscovery(); mNeedRetriggerDiscovery = false; } else { mOnEventListener.onDiscoveryEnd(); } } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Log.e(TAG, "getDiscoveryFinishSubscription() - " + throwable.getMessage()); } }); } private Subscription createStateSubscription() { return mRxBluetooth.observeBluetoothState() .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.computation()) .filter(Action.isEqualTo( BluetoothAdapter.STATE_ON, BluetoothAdapter.STATE_OFF, BluetoothAdapter.STATE_TURNING_OFF, BluetoothAdapter.STATE_TURNING_ON)) .subscribe(new Action1<Integer>() { @Override public void call(Integer state) { if (state == BluetoothAdapter.STATE_TURNING_OFF || state == BluetoothAdapter.STATE_OFF) { clearBtDevices(); } mOnEventListener.onStateChange(state); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Log.e(TAG, "getStateSubscription() - " + throwable.getMessage()); } }); } public void connect(BtDeviceModel target) { mConnectSubscription = mRxBluetooth.observeConnectDevice(getBtDevice(target), MY_UUID) .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribe(new Action1<BluetoothSocket>() { @Override public void call(BluetoothSocket socket) { mOnEventListener.onConnect(socket); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Log.e(TAG, "connect() - " + throwable.getMessage()); } }); } public void unsubscribeAll() { unsubscribe(mDeviceSubscription); unsubscribe(mDiscoveryStartSubscription); unsubscribe(mDiscoveryFinishSubscription); unsubscribe(mConnectSubscription); unsubscribe(mStateSubscription); } public void unsubscribe(Subscription subscription) { if (subscription != null && !subscription.isUnsubscribed()) { subscription.unsubscribe(); } } public boolean isReleased() { return mIsReleased; } public interface OnBluetoothEventListener { void onDetectDevice(BtDeviceModel device); void onDiscoveryStart(); void onDiscoveryEnd(); void onConnect(BluetoothSocket socket); void onStateChange(int state); } }
[ "joshuasun74@gmail.com" ]
joshuasun74@gmail.com
8b01f2b9a30bcd7438fbc85cfa9732522eb9b278
fceb9b0fae53d4ca24690e05c3fe80c30c0bae0d
/src/main/java/com/diogofernando/pagamento/data/vo/VendaVO.java
3c3706c16782c580a098426bf7f82bc32fd70268
[]
no_license
ferhmdiogo/pagamento
f9d7f70ca26ffe42adee6e805af1c893703db152
dc0b39f9087a8209562224c9dde87ad2d3f246ac
refs/heads/master
2023-02-26T03:33:41.734242
2021-02-04T15:23:55
2021-02-04T15:23:55
335,994,786
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
package com.diogofernando.pagamento.data.vo; import java.io.Serializable; import java.util.Date; import java.util.List; import org.modelmapper.ModelMapper; import org.springframework.hateoas.RepresentationModel; import com.diogofernando.pagamento.entity.Venda; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @JsonPropertyOrder({"id","data","produtos","valorTotal"}) @Getter @Setter @ToString @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = false) public class VendaVO extends RepresentationModel<VendaVO> implements Serializable { private static final long serialVersionUID = -7020943821499411472L; @JsonProperty("id") private Long id; @JsonProperty("data") private Date data; @JsonProperty("produtos") private List<ProdutoVendaVO> produtos; @JsonProperty("valorTotal") private Double valorTotal; public static VendaVO create(Venda venda) { return new ModelMapper().map(venda, VendaVO.class); } }
[ "ferhmdiogo@gmail.com" ]
ferhmdiogo@gmail.com
2b06b9900a9618da0d16bd2e9b0a75b3539d1d8a
6c22b057a54e164807f142833aee6b32d7e46123
/src/test/java/HlhTest.java
f2cdef1cd276f384bce52ccf2c9c878d7bc2fb70
[]
no_license
Mrli-r/keyTest
1b5c042651b3f2fb86f9953e554bed9cf797660e
9ed425d8eb779877f39daf1d99cce1faf72007a7
refs/heads/master
2023-02-21T21:07:53.031041
2021-01-26T03:04:14
2021-01-26T03:04:14
322,476,339
0
0
null
2021-01-26T03:03:18
2020-12-18T03:19:22
Java
UTF-8
Java
false
false
112
java
public class HlhTest { public static void main(String[] args) { System.out.println("word"); } }
[ "lizhe34187@hundsun.com" ]
lizhe34187@hundsun.com
7bd448948031d4bd398020f8f64a48939fd64722
2888c31a1ff027689cc37d1476e8e967a628ae1c
/src/ca/germuth/acm_pacnw_2013/test/Main.java
8eacbbc3bea3117f6c87dd1861af2ba5303e41cf
[]
no_license
germuth/UVA-Problem-Solutions
a6ffaf233b27c666215682ff525d8f81d6b7be7b
4360f22b30ae1d6771c4be9c17eafd78b771d5b8
refs/heads/master
2020-05-18T21:32:26.857335
2015-02-08T01:30:47
2015-02-08T01:30:47
23,647,309
0
0
null
null
null
null
UTF-8
Java
false
false
5,704
java
package ca.germuth.acm_pacnw_2013.test; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.Scanner; /** * Electric Car Rally * ACM ICPC SouthEast USA Regionals 2013 * Problem D Division 2 * */ class Main { static HashMap<Integer, ArrayList<Edge>> edges; public static void main(String[] args) { Scanner s = new Scanner(System.in); while (s.hasNext()) { int n = s.nextInt(); int e = s.nextInt(); if (n == 0) { break; } Node[] graph = new Node[n]; for (int i = 0; i < graph.length; i++) { graph[i] = new Node(i, new ArrayList<Edge>()); } for (int i = 0; i < e; i++) { int from = s.nextInt(); int to = s.nextInt(); while (true) { int start = s.nextInt(); int end = s.nextInt(); int dis = s.nextInt(); Edge edge = new Edge(from, to, start, end, dis); if (dis <= 240) { graph[from].edges.add(edge); graph[to].edges .add(new Edge(to, from, start, end, dis)); } if (end == 1439) { break; } } } // input has been taken in // find shortest path from 0 to n-1 System.out.println(shortestPath(graph, 0, n - 1) - 720); } s.close(); } public static int shortestPath(Node[] graph, int start, int end) { ArrayList<State> trials = new ArrayList<State>(); ArrayList<Integer> chargeTimes = new ArrayList<Integer>(); State[] minDistance = new State[graph.length]; State[] maxBattery = new State[graph.length]; Arrays.fill(minDistance, new State(Integer.MAX_VALUE, 0)); Arrays.fill(maxBattery, new State(Integer.MAX_VALUE, 0)); minDistance[start] = new State(720, 240); // noon maxBattery[start] = new State(720, 240); LinkedList<Integer> openList = new LinkedList<Integer>(); openList.add(start); while (!openList.isEmpty()) { int node = openList.pop(); if (node == end) { continue; } //must be done twice, once for solution with best time, one with best battery //unless they are the same trials.clear(); if(minDistance[node].equals(maxBattery[node])){ trials.add(minDistance[node]); }else{ if(minDistance[node].time != Integer.MAX_VALUE){ trials.add(minDistance[node]); } if(maxBattery[node].time != Integer.MAX_VALUE){ trials.add(maxBattery[node]); } } for(int b = 0; b < trials.size(); b++){ int currentTime = trials.get(b).time; int currentBatt = trials.get(b).battery; // this could be made faster by calculating these values for each // edge first, // and then only adding the fastest one for (int i = 0; i < graph[node].edges.size(); i++) { Edge e = graph[node].edges.get(i); // determine charge time // how much we need to charge to traverse this edge, and get // there with 0 int chargeTime = Math.max(0, e.distance - currentBatt) * 2; //this may be done twice //if charge time is odd, then we wasted last minute trying to get higher battery //since battery increases only every 2nd minute //in some cases, it may be worth it to delay moving down edge, and charge extra //minute to get that higher batter //the first iteration is normal case //second iteration is only done if 1st iteration chargeTime was odd for(int ch = 0; ch < 2; ch++){ //if 2nd iteration if (ch == 1) { if (chargeTime % 2 == 0) { continue; } else { // try waiting one extra minute chargeTime++; } } int timeAfterCharging = currentTime + chargeTime; //adjust time to within 0 - 1439 //and test when we can next take this edge int adjustedTime = timeAfterCharging; while (adjustedTime >= 1440) { adjustedTime -= 1440; } // determine wait time int waitTime = 0; if (e.endTime < adjustedTime) { // must wait until edge is open tomorrow waitTime = 1440 - (adjustedTime - e.startTime); } else { // edge can be done today waitTime = Math.max(0, e.startTime - adjustedTime); } int timeAfterChargeAndWait = timeAfterCharging + waitTime; // might as well charge extra, as long as we are waiting chargeTime += waitTime; // determine new battery charge int newBatteryCharge = currentBatt + chargeTime / 2; if (newBatteryCharge > 240) { newBatteryCharge = 240; } //traverse the edge newBatteryCharge -= e.distance; int totalTime = timeAfterChargeAndWait + e.distance; // if we got there faster if(totalTime < minDistance[e.to].time){ minDistance[e.to] = new State(totalTime, newBatteryCharge); openList.add(e.to); } //or with more battery else if (maxBattery[e.to].battery < newBatteryCharge) { maxBattery[e.to] = new State(totalTime, newBatteryCharge); openList.add(e.to); } } chargeTimes.clear(); } } } return minDistance[end].time; } } class Node { int val; ArrayList<Edge> edges; public Node(int v, ArrayList<Edge> e) { val = v; edges = e; } } class Edge { int from; int to; int startTime; int endTime; int distance; public Edge(int f, int t, int s, int e, int d) { from = f; to = t; startTime = s; endTime = e; distance = d; } } class State { int battery; int time; public State(int t, int b){ this.battery = b; this.time = t; } @Override public boolean equals(Object obj) { State o = (State)obj; if(battery == o.battery){ if(time == o.time){ return true; } } return false; } }
[ "germuth@unbc.ca" ]
germuth@unbc.ca
bc2b175d014e0acdc0c048d9401b4a73865d0487
bf1b21180d39763f9f09c802964fa68a24f3ca99
/src/com/servlets/intro/package-info.java
60e8ea0e94330874211975417b11b01e23fc3188
[]
no_license
rzuniga64/javaee
90c379aa6cbe3cd0bb41b118fb269ddfb5cfa12e
ed394f75e7bff1cd216a3120c717100ed98b476d
refs/heads/master
2021-01-21T10:19:27.431162
2017-03-27T00:53:08
2017-03-27T00:53:08
83,401,620
0
0
null
null
null
null
UTF-8
Java
false
false
68
java
/** * Created by Owner on 3/2/2017. */ package com.servlets.intro;
[ "rzuniga64@gmail.com" ]
rzuniga64@gmail.com
b7c4ae587b3e90321f9124cc6313403ec83fab23
0075851b374cc6e54a356b05de45335764b7b924
/services/src/test/java/com/epam/training/pas/OperationServiceTest.java
bd3e2e5a343a54d92d6e1d35254b9f89b79f251a
[]
no_license
Drazzilblol/exchanger
52e133e5e18f15506d2483ffe9440918af9c4889
5991456f57a9943346e5801d75cb8b8606385afa
refs/heads/master
2021-01-10T17:07:41.636483
2015-11-30T12:26:03
2015-11-30T12:26:03
46,323,361
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package com.epam.training.pas; import com.epam.training.pas.models.Operation; import com.epam.training.pas.services.OperationService; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import java.sql.Timestamp; /** * Created by Drazz on 29.11.2015. */ public class OperationServiceTest extends AbstractSpringTest { @Autowired private OperationService operationService; @Test public void crudOperationTest() { Long generatedOperationId; Operation o1 = new Operation(); o1.setAccountFromId(2l); o1.setAccountToId(3l); o1.setCurrencyFromId(1l); o1.setCurrencyToId(3l); o1.setCurrencyBuy(100.0); o1.setCurrencySell(15.3); o1.setDate(new Timestamp((System.currentTimeMillis() / 1000) * 1000)); generatedOperationId = operationService.save(o1); o1.setId(generatedOperationId); Operation o2 = operationService.getOperationById(generatedOperationId); System.out.println(o1); System.out.println(o2); Assert.assertEquals(o2, o1); o1.setAccountFromId(8l); o1.setAccountToId(9l); o1.setCurrencyFromId(2l); o1.setCurrencyToId(4l); o1.setCurrencyBuy(150.0); o1.setCurrencySell(155.3); operationService.update(o1); o2 = operationService.getOperationById(generatedOperationId); Assert.assertEquals(o2, o1); Assert.assertEquals(operationService.delete(generatedOperationId), 1); } }
[ "paskalj10@gmail.com" ]
paskalj10@gmail.com
222c283ce769c4194cf50498f0d1dbcf48c61982
4487de9f9f04462caecee994a3846e5e2605475a
/src/main/java/atos/magie/servlet/OperationsServlet.java
50d9e788b70b677f7ad8f7d2447affdb8f30ad1f
[]
no_license
assali/MagieSpring
6932344734e0a1c5c30d27cfee7da3fbb99db2cc
0312ea13fb90655fcf8a17fdbec05bb288fcd275
refs/heads/master
2020-03-25T02:33:46.625209
2018-08-02T13:09:58
2018-08-02T13:09:58
143,295,967
0
0
null
null
null
null
UTF-8
Java
false
false
1,870
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 atos.magie.servlet; import atos.magie.entity.Joueur; import atos.magie.service.JoueurService; import atos.magie.service.PartieService; import atos.magie.spring.AutowireServlet; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import java.util.Objects; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; /** * * @author Administrateur */ @WebServlet(name = "OperationsServlet", urlPatterns = {"/operations"}) public class OperationsServlet extends AutowireServlet { @Autowired JoueurService serviceJ; @Autowired PartieService serviceP; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String pseudo = req.getSession().getAttribute("joueur").toString(); Long partieId = Long.parseLong(req.getSession().getAttribute("partie").toString()); //Joueur qui a la main Joueur joueurALaMAin = serviceJ.joueurQuiALaMain(partieId); Joueur joueurActuel = serviceJ.rechercheJoueurParPseudo(pseudo); if (Objects.equals(joueurALaMAin.getId(), joueurActuel.getId())) { req.setAttribute("valid", "yes"); } List<String> sorts = serviceP.possibleSortsCollection(joueurActuel.getId()); req.setAttribute("sorts", sorts); req.getRequestDispatcher("operations.jsp").include(req, resp); } }
[ "Administrateur@GSVK.formation.local" ]
Administrateur@GSVK.formation.local