blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
fa790016c6206e8e1c2592843ea54100a533cdab
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_71a931e4cf57dfb24cb50d836e30b708ced7f9fe/NewWinner/11_71a931e4cf57dfb24cb50d836e30b708ced7f9fe_NewWinner_t.java
87c3e28fa2d325865bc796e58923e3923b6c1515
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,703
java
package com.Grateds.Reversi.GUI; import com.Grateds.Reversi.User; import com.Grateds.Reversi.CONTROLLER.Controller; /** * * @author Abuzaid */ public class NewWinner extends javax.swing.JFrame { /** * */ private static final long serialVersionUID = 1L; /** * Creates new form UserInterface */ private Controller controller; public NewWinner(Controller c) { controller = c; initComponents(); this.setLocationRelativeTo(getOwner()); this.setResizable(false); this.setVisible(true); this.setDefaultCloseOperation(HIDE_ON_CLOSE); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("NEW WINNER"); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel2.setText("Name"); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel3.setText("Score"); jTextField2.setEditable(false); jTextField2.setText(controller.get_totalScore()+""); jButton1.setText("Submit"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(17, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(47, 47, 47) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButton1) .addGap(130, 130, 130)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(0, 18, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed controller.stop(); boolean terminate = false; while(!jTextField1.getText().equals("") && !terminate){ User u = new User(); String score = jTextField2.getText(); u.create(jTextField1.getText(), Integer.parseInt(score)); terminate = true; this.setVisible(false); } controller.resume(); }//GEN-LAST:event_jComboBox1ActionPerformed /** * @param args the command line arguments */ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JTextField jTextField1; private javax.swing.JTextField jTextField2; // End of variables declaration//GEN-END:variables }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7f351759721dbc4ba9a26cc9d6a9e49a1cc3890f
cdeee1295065d0ba965dd0c502973e9c3aa60618
/gameserver/data/scripts/ai/ZakenDaytime83.java
1e1be341ec3139974e9d7c6bffea344227b8cec3
[]
no_license
forzec/l-server
526b1957f289a4223942d3746143769c981a5508
0f39edf60a14095b269b4a87c1b1ac01c2eb45d8
refs/heads/master
2021-01-10T11:39:14.088518
2016-03-19T18:28:04
2016-03-19T18:28:04
54,065,298
5
0
null
null
null
null
UTF-8
Java
false
false
1,319
java
package ai; import org.mmocore.gameserver.ai.CtrlEvent; import org.mmocore.gameserver.ai.Fighter; import org.mmocore.gameserver.model.Creature; import org.mmocore.gameserver.model.entity.Reflection; import org.mmocore.gameserver.model.instances.NpcInstance; import instances.ZakenDay83; /** * Daytime Zaken. * - иногда призывает 4х мобов id: 29184 * * @author pchayka */ public class ZakenDaytime83 extends Fighter { private long _spawnTimer = 0L; private static final long _spawnReuse = 60000L; private static final int _summonId = 29184; private NpcInstance actor = getActor(); Reflection r = actor.getReflection(); public ZakenDaytime83(NpcInstance actor) { super(actor); } @Override protected void thinkAttack() { if(actor.getCurrentHpPercents() < 70 && _spawnTimer + _spawnReuse < System.currentTimeMillis()) { for(int i = 0; i < 4; i++) { NpcInstance add = r.addSpawnWithoutRespawn(_summonId, actor.getLoc(), 250); add.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, getAttackTarget(), 2000); } _spawnTimer = System.currentTimeMillis(); } super.thinkAttack(); } @Override protected void onEvtDead(Creature killer) { ((ZakenDay83) r).notifyZakenDeath(actor); r.setReenterTime(System.currentTimeMillis()); super.onEvtDead(killer); } }
[ "dmitry@0xffff" ]
dmitry@0xffff
bf6792662672fad410c43313a964bcb66f19ea38
e1450a329c75a55cf6ccd0ce2d2f3517b3ee51c5
/src/main/java/home/javarush/javaCore/task13/task1308/Solution.java
9682cd08b0a5e5829b939faa064df08d227fc398
[]
no_license
nikolaydmukha/netology-java-base-java-core
afcf0dd190f4c912c5feb2ca8897bc17c09a9ec1
eea55c27bbbab3b317c3ca5b0719b78db7d27375
refs/heads/master
2023-03-18T13:33:24.659489
2021-03-25T17:31:52
2021-03-25T17:31:52
326,259,412
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package home.javarush.javaCore.task13.task1308; /* Эй, ты там живой? */ public class Solution { public static void main(String[] args) throws Exception { } public interface Person { boolean isAlive(); } public interface Presentable extends Person{ } }
[ "dmukha@mail.ru" ]
dmukha@mail.ru
7446dbb5c6b1eb81b285aed1e6835b153e56f826
e1450a329c75a55cf6ccd0ce2d2f3517b3ee51c5
/src/main/java/home/javarush/javaCore/task12/task1228/Solution.java
96fb4c4c65a0a6cb247ad1158a95b9283a4ed43f
[]
no_license
nikolaydmukha/netology-java-base-java-core
afcf0dd190f4c912c5feb2ca8897bc17c09a9ec1
eea55c27bbbab3b317c3ca5b0719b78db7d27375
refs/heads/master
2023-03-18T13:33:24.659489
2021-03-25T17:31:52
2021-03-25T17:31:52
326,259,412
0
0
null
null
null
null
UTF-8
Java
false
false
732
java
package home.javarush.javaCore.task12.task1228; /* Интерфейсы к классу Human */ public class Solution { public static void main(String[] args) { Human human = new Human(); System.out.println(human); } public static interface Worker { public void workLazy(); } public static interface Businessman { public void workHard(); } public static interface Secretary { public void workLazy(); } public static interface Miner { public void workVeryHard(); } public static class Human implements Worker, Secretary, Businessman{ public void workHard() { } public void workLazy() { } } }
[ "dmukha@mail.ru" ]
dmukha@mail.ru
db514262a384ded966ce770bc2daf0a795eb0774
f4dfe52bd506f1508637f23f1d9822c659891c12
/PROFILING/CPUProfiling/src/main/java/com/lowagie/examples/objects/tables/DefaultCell.java
1320f6ef842f01c266295c4786687d0e332803a9
[]
no_license
siddhantaws/LowLatency
5b27b99b8fbe3a98029ca42f636b49d870a0b3bb
f245916fed8bfe5a038dc21098d813bf5accdb1e
refs/heads/master
2021-06-25T19:55:07.994337
2019-09-19T15:39:15
2019-09-19T15:39:15
152,133,438
0
0
null
2020-10-13T16:09:28
2018-10-08T19:17:54
Java
UTF-8
Java
false
false
2,330
java
/* * $Id: DefaultCell.java,v 1.3 2005/05/09 11:52:47 blowagie Exp $ * $Name: $ * * This code is part of the 'iText Tutorial'. * You can find the complete tutorial at the following address: * http://itextdocs.lowagie.com/tutorial/ * * This code 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. * * itext-questions@lists.sourceforge.net */ package com.lowagie.examples.objects.tables; import java.awt.Color; import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Paragraph; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfWriter; /** * A very simple PdfPTable example using getDefaultCell(). */ public class DefaultCell { /** * Demonstrates the use of getDefaultCell(). * * @param args * no arguments needed */ public static void main(String[] args) { System.out.println("DefaultCell"); // step 1: creation of a document-object Document document = new Document(); try { // step 2: // we create a writer that listens to the document // and directs a PDF-stream to a file PdfWriter.getInstance(document, new FileOutputStream("DefaultCell.pdf")); // step 3: we open the document document.open(); PdfPTable table = new PdfPTable(3); PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3")); cell.setColspan(3); table.addCell(cell); table.addCell("1.1"); table.addCell("2.1"); table.addCell("3.1"); table.getDefaultCell().setGrayFill(0.8f); table.addCell("1.2"); table.addCell("2.2"); table.addCell("3.2"); table.getDefaultCell().setGrayFill(0f); table.getDefaultCell().setBorderColor(new Color(255, 0, 0)); table.addCell("cell test1"); table.getDefaultCell().setColspan(2); table.getDefaultCell().setBackgroundColor(new Color(0xC0, 0xC0, 0xC0)); table.addCell("cell test2"); document.add(table); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } // step 5: we close the document document.close(); } }
[ "siddhantaws@gmail.com" ]
siddhantaws@gmail.com
7629c0f2976a64367115b054179570383e7d33ec
8a27c18ec9774c6dcbfdfce4e0bd5461b0594b08
/src/org/opensha/refFaultParamDb/gui/addEdit/deformationModel/DeformationModelTableModel.java
0774e2552d8f5f83334fa54a716ac863a134597d
[ "Apache-2.0" ]
permissive
GNS-Science/opensha-core
81b96bca74254082fc83e8f7cebf67c24312d722
75143f6dd0b1d268471bfa55be8c7bd6ef559d73
refs/heads/master
2023-05-03T16:56:52.342902
2021-05-12T01:48:08
2021-05-12T01:48:08
364,415,943
0
0
Apache-2.0
2021-05-10T03:07:31
2021-05-04T23:51:04
Java
UTF-8
Java
false
false
3,606
java
/** * */ package org.opensha.refFaultParamDb.gui.addEdit.deformationModel; import java.util.ArrayList; import java.util.HashMap; import javax.swing.table.DefaultTableModel; import org.opensha.refFaultParamDb.dao.db.DB_AccessAPI; import org.opensha.refFaultParamDb.dao.db.DB_ConnectionPool; import org.opensha.refFaultParamDb.dao.db.DeformationModelDB_DAO; import org.opensha.refFaultParamDb.dao.db.FaultSectionVer2_DB_DAO; import org.opensha.refFaultParamDb.vo.EstimateInstances; import org.opensha.refFaultParamDb.vo.FaultSectionSummary; /** * * Deformation model table model * @author vipingupta * */ public class DeformationModelTableModel extends DefaultTableModel { /** * */ private static final long serialVersionUID = 1L; private final static String []columnNames = { "Section Name", "Slip Rate", "Aseismic Slip Factor"}; private int deformationModelId; private ArrayList<Integer> faultSectionsInModel; private HashMap<Integer, String> faultSectionsSummaryMap = new HashMap<Integer, String>(); private FaultSectionVer2_DB_DAO faultSectionDB_DAO; private DeformationModelDB_DAO deformationModelDAO; private ArrayList<FaultSectionSummary> faultSectionSummries; public DeformationModelTableModel(DB_AccessAPI dbConnection) { faultSectionDB_DAO = new FaultSectionVer2_DB_DAO(dbConnection); deformationModelDAO = new DeformationModelDB_DAO(dbConnection); faultSectionSummries = faultSectionDB_DAO.getAllFaultSectionsSummary(); for(int i=0; i<faultSectionSummries.size(); ++i) { FaultSectionSummary faultSectionSummary = (FaultSectionSummary)faultSectionSummries.get(i); faultSectionsSummaryMap.put(new Integer(faultSectionSummary.getSectionId()), faultSectionSummary.getSectionName()); } } public void setDeformationModel(int deformationModelId, ArrayList faultSectionIdList) { this.deformationModelId = deformationModelId; faultSectionsInModel = new ArrayList(); for(int i=0; i<faultSectionSummries.size(); ++i) { FaultSectionSummary faultSectionSummary = (FaultSectionSummary)faultSectionSummries.get(i); if(faultSectionIdList.contains(new Integer(faultSectionSummary.getSectionId()))) faultSectionsInModel.add(new Integer(faultSectionSummary.getSectionId())); } } public int getdeformationModelId() { return deformationModelId; } public int getColumnCount() { return columnNames.length; } public Class getColumnClass(int col) { if(col==0) return String.class; else return EstimateInstances.class; } public int getRowCount() { int numRows = 0; if(faultSectionsInModel!=null) numRows = faultSectionsInModel.size(); return numRows; } public String getColumnName(int col) { return columnNames[col]; } public int getFaultSectionId(int row) { return ((Integer)faultSectionsInModel.get(row)).intValue(); } public Object getValueAt(int row, int col) { int faultSectionId= ((Integer)faultSectionsInModel.get(row)).intValue(); return faultSectionsSummaryMap.get(new Integer(faultSectionId)); } public Object getValueForSlipAndAseismicFactor(int row, int col) { int faultSectionId= ((Integer)faultSectionsInModel.get(row)).intValue(); if(col==2) { //aseismic slip factor return deformationModelDAO.getAseismicSlipEstimate(deformationModelId, faultSectionId); } else if(col==1) { // slip rate return deformationModelDAO.getSlipRateEstimate(deformationModelId, faultSectionId); } return faultSectionsInModel.get(row); } /* * Don't need to implement this method unless your table's * editable. */ public boolean isCellEditable(int row, int col) { return false; } }
[ "kmilner@usc.edu" ]
kmilner@usc.edu
f57f00c4712b38766c44bbf4c4e5eae380e34ae9
97cda285663a8bbf751b39321b695d97b6f69474
/Wicket/src/wicket/util/diff/RevisionVisitor.java
175c2c5cafe98fbc76c6cf1232f7a6a00a6eae8e
[]
no_license
clustercompare/clustercompare-data
838c4de68645340546dd5e50b375dcf877591b3e
163d05bdc5f4a03da8155ffb1f922a9421733589
refs/heads/master
2020-12-25T23:10:16.331657
2015-12-11T10:37:43
2015-12-11T10:37:43
39,699,972
0
0
null
null
null
null
UTF-8
Java
false
false
3,257
java
/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowledgement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package wicket.util.diff; /** * Definition of a Visitor interface for {@link Revision Revisions} See "Design * Patterns" by the Gang of Four */ public interface RevisionVisitor { /** * @param revision */ public void visit(Revision revision); /** * @param delta */ public void visit(DeleteDelta delta); /** * @param delta */ public void visit(ChangeDelta delta); /** * @param delta */ public void visit(AddDelta delta); }
[ "mail@jan-melcher.de" ]
mail@jan-melcher.de
705e7ff038c2bbf52bc41c37bb02e164dd4479a4
60f47552491c36429b09fdc8909ff04553503049
/src/com/denghj/jdk_8/stream/stream基本操作/TestStreamApi01.java
783b592f8ba8b3c7657bdf96ea834751c2ac31cc
[]
no_license
denghuaijun/java_se
f5ad737e25b0191fdb358acb166146838e7c63c4
f52cac0506a268328282c922ba5eea8cf1250f6a
refs/heads/master
2023-06-19T01:45:52.152802
2021-07-15T07:24:21
2021-07-15T07:24:21
327,215,887
0
0
null
null
null
null
UTF-8
Java
false
false
1,421
java
package com.denghj.jdk_8.stream.stream基本操作; import com.denghj.jdk_8.lambda.基本语法.Employee; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Stream; /** * 一、Stream 三大操作步骤: * 1. 创建stream * 2.中间操作:即流水线操作 将数据源(集合、数组)的数据经过一系列的中间操作 * 3.终止操作:获取stream流所持有的结果 */ public class TestStreamApi01 { //1、测试 创建stream对象 共四种方式 @Test public void createStream(){ //方式1、通过Collection中的stream()方法创建 List<Employee> employeeList = new ArrayList<>(); //employeeList.parallelStream()创建并行流,默认为串行流 Stream<Employee> stream = employeeList.stream(); //方式2、通过Stream api中的静态方法of() Stream<String> stringStream = Stream.of("a", "b", "c"); stringStream.forEach(System.out::println); //方式3、通过Arrays中的静态方法stream()获取数组流 Stream<Employee> employeeStream = Arrays.stream(new Employee[10]); //方式4、创建无限流 //无限流1:无限迭代 Stream<Integer> iterate = Stream.iterate(0, x -> x + 2); //无线流2:产生数据 Stream<Double> generate = Stream.generate(Math::random); } }
[ "dhjtobenumber1@163.com" ]
dhjtobenumber1@163.com
90ee1f5a24f3a1dbb2feb23c2b4faa1464390f23
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_eb14df3d6c01dcbb873e0428b89e358889a39165/TabRenderer/3_eb14df3d6c01dcbb873e0428b89e358889a39165_TabRenderer_t.java
7c4ef9238bab910be4ce74ced9b740b10eef1648
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,862
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.helix.mobile.component.tab; import java.io.IOException; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import org.primefaces.renderkit.CoreRenderer; /** * This rendering is invoked by each page, which checks to see if it in a tab bar and, * if so, renders the tab bar. * * @author shallem */ public class TabRenderer extends CoreRenderer { @Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { Tab tab = (Tab)component; Boolean isActive = (Boolean)tab.getAttributes().get("active"); ResponseWriter writer = context.getResponseWriter(); writer.startElement("li", component); writer.startElement("a", component); writer.writeAttribute("href", "#" + tab.getPage(), null); writer.writeAttribute("style", "height: 48px", null); //writer.writeAttribute("data-icon", "custom", null); if (!tab.isCustomIcon()) { writer.writeAttribute("data-icon", tab.getIcon(), null); } String styleClass = "ui-icon-" + tab.getIcon(); if (isActive) { writer.writeAttribute("class", styleClass + " ui-btn-active", null); } else { writer.writeAttribute("class", styleClass, null); } if (tab.getName() != null) { //writer.write(tab.getName()); } } @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.endElement("a"); writer.endElement("li"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b8c7523a0b38f1a83d830e3d43fcf39ff184edd2
0b20c4a616e17b76fe3c9a048e68b417e35dfaac
/Android/Seed/framework/src/main/java/com/min/framework/ConfigConstants.java
aa0e8cd2d6c2463d6e0fc6ba53b75c9f6788b95e
[]
no_license
minyangcheng/WorkStation
d39fffd3879adeac46d7b1cc1aeb5f56dd16c8dd
efcf62e7295ed8d76ba9de101076d987311dce88
refs/heads/master
2021-01-01T06:10:04.870682
2018-12-06T06:06:35
2018-12-06T06:06:35
97,376,308
1
0
null
null
null
null
UTF-8
Java
false
false
458
java
package com.min.framework; /** * Created by minyangcheng on 2016/10/8. */ public class ConfigConstants { public static final String HTTP_LOG="HttpLog"; public static final int PAGE_SIZE=15; public static String API_SERVER_URL; public static String SOURCE; public static String APP_SECRET; public static boolean DEBUG; public static String VERSION_NAME; public static String SDK_INT; public static String FLAVOR; }
[ "332485508@qq.com" ]
332485508@qq.com
1c27cd18946cbc2afe1b0d93bd90e105528e89b9
efb97250b130a55948d3c450fdcd0ec69fec920e
/modbus/src/main/java/com/berrontech/huali/modbus/ip/xa/XaMessageResponse.java
58975e630ea8efe9c73284a224ca11d5a03f9a1c
[]
no_license
levent8421/AlarmCenter
6f24f35bae57dbe179988453fd1b59c7b0d69925
a10921980423ce4741bd16c9747705a2505efdb0
refs/heads/master
2022-12-02T04:44:24.199019
2020-08-13T10:33:52
2020-08-13T10:33:52
286,463,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,285
java
/* * ============================================================================ * GNU General Public License * ============================================================================ * * Copyright (C) 2006-2011 Serotonin Software Technologies Inc. http://serotoninsoftware.com * @author Matthew Lohbihler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.berrontech.huali.modbus.ip.xa; import com.berrontech.huali.modbus.base.ModbusUtils; import com.berrontech.huali.modbus.exception.ModbusTransportException; import com.berrontech.huali.modbus.ip.IpMessageResponse; import com.berrontech.huali.modbus.msg.ModbusResponse; import com.berrontech.huali.modbus.sero.util.queue.ByteQueue; public class XaMessageResponse extends XaMessage implements IpMessageResponse { static XaMessageResponse createXaMessageResponse(ByteQueue queue) throws ModbusTransportException { // Remove the XA header int transactionId = ModbusUtils.popShort(queue); int protocolId = ModbusUtils.popShort(queue); if (protocolId != ModbusUtils.IP_PROTOCOL_ID) throw new ModbusTransportException("Unsupported IP protocol id: " + protocolId); ModbusUtils.popShort(queue); // Length, which we don't care about. // Create the modbus response. ModbusResponse response = ModbusResponse.createModbusResponse(queue); return new XaMessageResponse(response, transactionId); } public XaMessageResponse(ModbusResponse modbusResponse, int transactionId) { super(modbusResponse, transactionId); } public ModbusResponse getModbusResponse() { return (ModbusResponse) modbusMessage; } }
[ "levent8421@outlook.com" ]
levent8421@outlook.com
b60e331d27fff6e98b878678a9d7478251167fbf
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/google--error-prone/74b237d6c07be0108be1743d4b1d2ad83f7e37a1/after/HardCodedSdCardPath.java
8200b6a673412687127abfb2df46f69bf08d1f20
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,085
java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns.android; import static com.google.errorprone.BugPattern.Category.ANDROID; import static com.google.errorprone.BugPattern.SeverityLevel.WARNING; import static com.sun.source.tree.Tree.Kind.STRING_LITERAL; import com.google.common.collect.ImmutableMap; import com.google.errorprone.BugPattern; import com.google.errorprone.BugPattern.ProvidesFix; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker; import com.google.errorprone.bugpatterns.BugChecker.LiteralTreeMatcher; import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Description; import com.google.errorprone.util.ASTHelpers; import com.sun.source.tree.LiteralTree; import java.util.Map; /** * TODO(avenet): Restrict this check to Android code once the capability is available in Error * Prone. See b/27967984. * * @author avenet@google.com (Arnaud J. Venet) */ @BugPattern( name = "HardCodedSdCardPath", altNames = {"SdCardPath"}, summary = "Hardcoded reference to /sdcard", category = ANDROID, severity = WARNING, providesFix = ProvidesFix.REQUIRES_HUMAN_ATTENTION ) public class HardCodedSdCardPath extends BugChecker implements LiteralTreeMatcher { // The proper ways of retrieving the "/sdcard" and "/data/data" directories. static final String SDCARD = "Environment.getExternalStorageDirectory().getPath()"; static final String DATA = "Context.getFilesDir().getPath()"; // Maps each platform-dependent way of accessing "/sdcard" or "/data/data" to its // portable equivalent. static final ImmutableMap<String, String> PATH_TABLE = new ImmutableMap.Builder<String, String>() .put("/sdcard", SDCARD) .put("/mnt/sdcard", SDCARD) .put("/system/media/sdcard", SDCARD) .put("file://sdcard", SDCARD) .put("file:///sdcard", SDCARD) .put("/data/data", DATA) .put("/data/user", DATA) .build(); @Override public Description matchLiteral(LiteralTree tree, VisitorState state) { if (tree.getKind() != STRING_LITERAL) { return Description.NO_MATCH; } // Hard-coded paths may come handy when writing tests. Therefore, we suppress the check // for code located under 'javatests'. if (ASTHelpers.isJUnitTestCode(state)) { return Description.NO_MATCH; } String literal = (String) tree.getValue(); if (literal == null) { return Description.NO_MATCH; } for (Map.Entry<String, String> entry : PATH_TABLE.entrySet()) { String hardCodedPath = entry.getKey(); if (!literal.startsWith(hardCodedPath)) { continue; } String correctPath = entry.getValue(); String remainderPath = literal.substring(hardCodedPath.length()); // Replace the hard-coded fragment of the path with a portable expression. SuggestedFix.Builder suggestedFix = SuggestedFix.builder(); if (remainderPath.isEmpty()) { suggestedFix.replace(tree, correctPath); } else { suggestedFix.replace(tree, correctPath + " + \"" + remainderPath + "\""); } // Add the corresponding import statements. if (correctPath.equals(SDCARD)) { suggestedFix.addImport("android.os.Environment"); } else { suggestedFix.addImport("android.content.Context"); } return describeMatch(tree, suggestedFix.build()); } return Description.NO_MATCH; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
0e83b0af69e57b7042a698b35e99d99af87cc08b
5858d0e30915568ebddfcac41f6a308a1fd38233
/smarthome-web_lqh/src/main/java/com/biencloud/smarthome/web/wsclient/stub/GetPropertyCompanyInfoResponse.java
57c9ee38f00e179f610ad1eb74a9153158de809e
[]
no_license
CocoaK/java-project-source
303ad9a75ebf499d4ee95048160cd0a573d9f5ec
609f43b9009fedf124c2feef09e10e0d47c2b4b4
refs/heads/master
2020-03-19T07:34:11.395784
2018-06-05T05:52:30
2018-06-05T05:52:30
136,125,854
0
1
null
null
null
null
UTF-8
Java
false
false
1,603
java
package com.biencloud.smarthome.web.wsclient.stub; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for getPropertyCompanyInfoResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="getPropertyCompanyInfoResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://service.cxfservice.smarthome.biencloud.com/}propertyCompanyInfo" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getPropertyCompanyInfoResponse", propOrder = { "_return" }) public class GetPropertyCompanyInfoResponse { @XmlElement(name = "return") protected PropertyCompanyInfo _return; /** * Gets the value of the return property. * * @return * possible object is * {@link PropertyCompanyInfo } * */ public PropertyCompanyInfo getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link PropertyCompanyInfo } * */ public void setReturn(PropertyCompanyInfo value) { this._return = value; } }
[ "kyq001@gmail.com" ]
kyq001@gmail.com
1f1304c2f3c3a724f594b298998cc07e1282bb77
e2a97f336e545c89dbba886889416ee99c3d89a0
/PJ_0306/src/QnAservice/ListQnaAction.java
0363c65aa48fcb6e8b2f7e4112a1ea8b450f4fab
[]
no_license
jongtix/JSP_jongtix
f580d82beaa3a53c9876961af45389527d3832af
ef5aac22eefa6611bdce6647fba645e55d626192
refs/heads/master
2021-05-06T00:38:00.250849
2018-03-18T07:06:06
2018-03-18T07:06:06
114,311,296
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
package QnAservice; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import QnAdao.QnaBoardDao; import QnAdao.SubBoardDao; import QnAdto.Board; import QnAdto.SubBoard; import controller.CommandProcess; import util.Paging; import util.PageBean; public class ListQnaAction implements CommandProcess { @Override public String requestPro(HttpServletRequest request, HttpServletResponse response) throws Throwable { QnaBoardDao dao = QnaBoardDao.getInstance(); int total = dao.getQnaTotal(); Paging pg = new Paging(); PageBean pb = pg.getPaging(request, total); List<Board> list = dao.selectQnaList(pb.getStartRow(), pb.getEndRow()); request.setAttribute("total", total); request.setAttribute("list", list); request.setAttribute("pb", pb); return "QnAboard/listQna.jsp"; } }
[ "jong1145@naver.com" ]
jong1145@naver.com
0634902a7414b19c3f17b7a6871b724ce933fdab
61f42894a09ad6f97259c81b7edb1419af5cb5bd
/src/com/ystech/aqtp/core/listener/ApplicationListener.java
0a9e1cd0c556871be1a998160cd596968408c186
[]
no_license
shusanzhan/aqtp
59390ce1eaa9d00983c6d40173d8fe1b2b778a35
09f3389e9c8adbd1ca08a74cac39435683e00975
refs/heads/master
2021-01-22T04:41:26.469854
2014-01-04T15:57:27
2014-01-04T15:57:27
10,737,204
1
0
null
null
null
null
UTF-8
Java
false
false
1,518
java
/** * */ package com.ystech.aqtp.core.listener; import javax.annotation.Resource; import javax.servlet.Filter; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; import org.apache.struts2.ServletActionContext; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import com.ystech.aqtp.model.Access; import com.ystech.aqtp.service.AccessManageImpl; /** * @author shusanzhan * @date 2013-11-28 */ public class ApplicationListener implements HttpSessionListener{ @Override public void sessionCreated(HttpSessionEvent arg0) { ApplicationContext applicationContext = (ApplicationContext) ServletActionContext .getServletContext() .getAttribute( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); //获取spring的环境信息 AccessManageImpl accessManageImpl =(AccessManageImpl)applicationContext.getBean("accessManageImpl"); Access access = accessManageImpl.get(1); int count; count = access.getAccess(); ++count; access.setAccess(count); accessManageImpl.save(access); arg0.getSession().setAttribute("count", count); } @Override public void sessionDestroyed(HttpSessionEvent arg0) { } }
[ "shusanzhan@163.com" ]
shusanzhan@163.com
8bb6d5037a2682c305d5609116077c45d88cdb20
0907c886f81331111e4e116ff0c274f47be71805
/sources/com/google/android/gms/internal/location/zzbb.java
e2e692b938c1e6bf687acc168c456dda4697349b
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
1,104
java
package com.google.android.gms.internal.location; import android.app.PendingIntent; import android.util.Log; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.internal.BaseImplementation; import com.google.android.gms.location.LocationStatusCodes; final class zzbb extends zzan { private BaseImplementation.ResultHolder<Status> zzdf; public zzbb(BaseImplementation.ResultHolder<Status> resultHolder) { this.zzdf = resultHolder; } private final void zze(int i) { if (this.zzdf == null) { Log.wtf("LocationClientImpl", "onRemoveGeofencesResult called multiple times"); return; } this.zzdf.setResult(LocationStatusCodes.zzd(LocationStatusCodes.zzc(i))); this.zzdf = null; } public final void zza(int i, PendingIntent pendingIntent) { zze(i); } public final void zza(int i, String[] strArr) { Log.wtf("LocationClientImpl", "Unexpected call to onAddGeofencesResult"); } public final void zzb(int i, String[] strArr) { zze(i); } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
7c8de44a05f1b4af9da6bf93cb27f28bd404a569
ed865190ed878874174df0493b4268fccb636a29
/PuridiomRequestForQuotes/src/com/tsa/puridiom/rfq/tasks/RfqSetStatusToBidsReceived.java
900639128e54389df07a9d80d6dd193b7ecdcdc6
[]
no_license
zach-hu/srr_java8
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
9b6096ba76e54da3fe7eba70989978edb5a33d8e
refs/heads/master
2021-01-10T00:57:42.107554
2015-11-06T14:12:56
2015-11-06T14:12:56
45,641,885
0
0
null
null
null
null
UTF-8
Java
false
false
1,014
java
package com.tsa.puridiom.rfq.tasks; import com.tsa.puridiom.common.documents.DocumentStatus; import com.tsa.puridiom.entity.RfqHeader; import com.tsa.puridiom.entity.RfqLine; import com.tsa.puridiom.property.PropertiesManager; import com.tsagate.foundation.processengine.Task; import java.util.List; import java.util.Map; public class RfqSetStatusToBidsReceived extends Task { public Object executeTask(Object object) throws Exception { Map incomingRequest = (Map)object; String userId = (String) incomingRequest.get("userId") ; PropertiesManager propertiesManager = PropertiesManager.getInstance((String)incomingRequest.get("organizationId")) ; RfqHeader rfh = (RfqHeader)incomingRequest.get("rfqHeader") ; List rfqLineList = (List) incomingRequest.get("rfqLineList") ; rfh.setStatus(DocumentStatus.RFQ_PURCHASING); for (int i=0; i < rfqLineList.size(); i++) { RfqLine rfl = (RfqLine) rfqLineList.get(i); rfl.setStatus(DocumentStatus.RFQ_PURCHASING) ; } return null ; } }
[ "brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466" ]
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
04a5933e7002011d26df33aa7dd3a8840c7abdc1
bfe4cc4bb945ab7040652495fbf1e397ae1b72f7
/compute/src/main/java/org/jclouds/compute/predicates/NodeTerminated.java
ce3aee4317ddf55fc22aaae99eab8ba371ab998a
[ "Apache-2.0" ]
permissive
dllllb/jclouds
348d8bebb347a95aa4c1325590c299be69804c7d
fec28774da709e2189ba563fc3e845741acea497
refs/heads/master
2020-12-25T11:42:31.362453
2011-07-30T22:32:07
2011-07-30T22:32:07
1,571,863
2
0
null
null
null
null
UTF-8
Java
false
false
2,047
java
/** * * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ==================================================================== */ package org.jclouds.compute.predicates; import static com.google.common.base.Preconditions.checkNotNull; import javax.annotation.Resource; import javax.inject.Singleton; import org.jclouds.compute.ComputeService; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeState; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; import com.google.inject.Inject; /** * * Tests to see if a node is deleted * * @author Adrian Cole */ @Singleton public class NodeTerminated implements Predicate<NodeMetadata> { private final ComputeService client; @Resource protected Logger logger = Logger.NULL; @Inject public NodeTerminated(ComputeService client) { this.client = client; } public boolean apply(NodeMetadata node) { logger.trace("looking for state on node %s", checkNotNull(node, "node")); node = refresh(node); if (node == null) return true; logger.trace("%s: looking for node state %s: currently: %s", node.getId(), NodeState.TERMINATED, node.getState()); return node.getState() == NodeState.TERMINATED; } private NodeMetadata refresh(NodeMetadata node) { return client.getNodeMetadata(node.getId()); } }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
d7e5858ad5d705e647ac5604909b8870fa9d40f4
e537bbcecd379a3e97a0c81a7e23edac788a1371
/src/main/java/com/jenkov/db/impl/mapping/method/CharacterStream.java
b2658334efd090f60b4f83f1ac18df0ab7044f44
[ "Apache-2.0" ]
permissive
jjenkov/butterfly-persistence
92670d41d48fe0f129c2ce2ea246b8aa7ff4cf18
c644d102b32e433119f6ac7871ac18bdc9d69948
refs/heads/master
2022-02-21T06:11:43.732748
2022-02-04T16:35:17
2022-02-04T16:35:17
54,051,360
23
16
Apache-2.0
2022-02-04T16:35:18
2016-03-16T17:08:46
Java
UTF-8
Java
false
false
1,044
java
package com.jenkov.db.impl.mapping.method; import java.io.Reader; /** * @author Jakob Jenkov, Jenkov Development */ public class CharacterStream { protected Reader reader = null; protected int length = 0; public CharacterStream(Reader reader) { this.reader = reader; } public CharacterStream(Reader reader, int length) { this.reader = reader; this.length = length; } public Reader getReader() { return reader; } public void setReader(Reader reader) { this.reader = reader; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public boolean equals(Object obj) { if(obj == null) return false; if(!(obj instanceof CharacterStream)) return false; CharacterStream otherStream = (CharacterStream) obj; if(getLength() != otherStream.getLength()) return false; return getReader().equals(otherStream.getReader()); } }
[ "jakob@jenkov.com" ]
jakob@jenkov.com
f4d65a43e44bf3f0949f5498fea7c48164d5bae0
c1bbb030862c00bd8f4cce851bca9919a3486da8
/androidWidget/src/com/kerkr/edu/recycleView/VerticalDividerItemDecoration.java
d3cadcc8a96c4c277d1e2f2c7e16d6f730fc0526
[]
no_license
caocf/androidBaseLib
19c8a2032d527b92e66fd7a3da55d0694854d282
4ec7398f113cf2bd3d2ace9032d825b6c3165cd9
refs/heads/master
2020-02-26T17:12:54.865258
2015-07-17T09:35:05
2015-07-17T09:35:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,929
java
package com.kerkr.edu.recycleView; import android.content.Context; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.annotation.DimenRes; import android.support.v4.view.ViewCompat; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by yqritc on 2015/01/15. */ public class VerticalDividerItemDecoration extends FlexibleDividerDecoration { private MarginProvider mMarginProvider; protected VerticalDividerItemDecoration(Builder builder) { super(builder); mMarginProvider = builder.mMarginProvider; } @Override protected Rect getDividerBound(int position, RecyclerView parent, View child) { Rect bounds = new Rect(0, 0, 0, 0); int transitionX = (int) ViewCompat.getTranslationX(child); int transitionY = (int) ViewCompat.getTranslationY(child); RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams(); bounds.top = parent.getPaddingTop() + mMarginProvider.dividerTopMargin(position, parent) + transitionY; bounds.bottom = parent.getHeight() - parent.getPaddingBottom() - mMarginProvider.dividerBottomMargin(position, parent) + transitionY; int dividerSize = getDividerSize(position, parent); if (mDividerType == DividerType.DRAWABLE) { bounds.left = child.getRight() + params.leftMargin + transitionX; bounds.right = bounds.left + dividerSize; } else { bounds.left = child.getRight() + params.leftMargin + dividerSize / 2 + transitionX; bounds.right = bounds.left; } return bounds; } @Override protected void setItemOffsets(Rect outRect, int position, RecyclerView parent) { outRect.set(0, 0, getDividerSize(position, parent), 0); } private int getDividerSize(int position, RecyclerView parent) { if (mPaintProvider != null) { return (int) mPaintProvider.dividerPaint(position, parent).getStrokeWidth(); } else if (mSizeProvider != null) { return mSizeProvider.dividerSize(position, parent); } else if (mDrawableProvider != null) { Drawable drawable = mDrawableProvider.drawableProvider(position, parent); return drawable.getIntrinsicWidth(); } throw new RuntimeException("failed to get size"); } /** * Interface for controlling divider margin */ public interface MarginProvider { /** * Returns top margin of divider. * * @param position Divider position * @param parent RecyclerView * @return top margin */ int dividerTopMargin(int position, RecyclerView parent); /** * Returns bottom margin of divider. * * @param position Divider position * @param parent RecyclerView * @return bottom margin */ int dividerBottomMargin(int position, RecyclerView parent); } public static class Builder extends FlexibleDividerDecoration.Builder<Builder> { private MarginProvider mMarginProvider = new MarginProvider() { @Override public int dividerTopMargin(int position, RecyclerView parent) { return 0; } @Override public int dividerBottomMargin(int position, RecyclerView parent) { return 0; } }; public Builder(Context context) { super(context); } public Builder margin(final int topMargin, final int bottomMargin) { return marginProvider(new MarginProvider() { @Override public int dividerTopMargin(int position, RecyclerView parent) { return topMargin; } @Override public int dividerBottomMargin(int position, RecyclerView parent) { return bottomMargin; } }); } public Builder margin(int verticalMargin) { return margin(verticalMargin, verticalMargin); } public Builder marginResId(@DimenRes int topMarginId, @DimenRes int bottomMarginId) { return margin(mResources.getDimensionPixelSize(topMarginId), mResources.getDimensionPixelSize(bottomMarginId)); } public Builder marginResId(@DimenRes int verticalMarginId) { return marginResId(verticalMarginId, verticalMarginId); } public Builder marginProvider(MarginProvider provider) { mMarginProvider = provider; return this; } public VerticalDividerItemDecoration build() { checkBuilderParams(); return new VerticalDividerItemDecoration(this); } } }
[ "ytjojo@163.com" ]
ytjojo@163.com
e0f6ff2e6115589278326ce02ff63fc5417b4484
13f8de23ea9ad4ee9e91d215c62eaf5ffeb09239
/src/main/java/com/demo/alg/c27多线程算法/矩阵/TestDemo.java
5f8fcb7880c936276e2eb8338a97a56e76d33064
[]
no_license
yhb2010/alg_demo
b0b50d17c0321fd935dbdef90c6964661ebc97ec
0c0aa27939a4f4f57c5f139b7d0e4a2794688206
refs/heads/master
2020-04-09T22:08:19.853052
2018-12-08T07:08:31
2018-12-08T07:08:31
160,620,930
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
package com.demo.alg.c27多线程算法.矩阵; import java.util.concurrent.CountDownLatch; public class TestDemo { static int[][] a = new int[][]{{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}; static int[][] b = new int[][]{{1, 3, 5, 7}, {2, 4, 6, 8}, {11, 13, 15, 17}, {12, 14, 16, 18}}; static int[][] result = new int[a.length][b[0].length]; // 存放矩阵相乘结果 public static void main(String args[]) { CountDownLatch cdl = new CountDownLatch(a.length); OperateMatrix om = new OperateMatrix(a, b, result); // 实例化OperateMatrix对象 // 根据第一个矩阵的行数,启动对应数量的线程 for (int i = 0; i < a.length; i++) { new ThreadOperate(om, i, "计算第一个矩阵的第" + (i) + "行*第二个矩阵的所有列", cdl).start(); } try { cdl.await(); } catch (InterruptedException e) { e.printStackTrace(); } display(om.getResult()); // 打印结果 } public static void display(int[][] c) { for (int i = 0; i < c.length; i++) { for (int j = 0; j < c[i].length; j++) { System.out.print(c[i][j] + " "); } System.out.println(); } } }
[ "youtong82@163.com" ]
youtong82@163.com
8f016e661b20ef09a695de9f2c608223e0cf9cdf
c5a67e2aeabbde81c93a329ae2e9c7ccc3631246
/src/main/java/com/vnw/data/jooq/tables/pojos/TbltrackEmployerSignin.java
5e06c70ac070f27904a20b1829496016ab0ea1b3
[]
no_license
phuonghuynh/dtools
319d773d01c32093fd17d128948ef89c81f3f4bf
883d15ef19da259396a7bc16ac9df590e8add015
refs/heads/master
2016-09-14T03:46:53.463230
2016-05-25T04:04:32
2016-05-25T04:04:32
59,534,869
1
0
null
null
null
null
UTF-8
Java
false
false
2,229
java
/** * This class is generated by jOOQ */ package com.vnw.data.jooq.tables.pojos; import java.io.Serializable; import java.sql.Timestamp; import javax.annotation.Generated; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TbltrackEmployerSignin implements Serializable { private static final long serialVersionUID = 1218469016; private Integer trackid; private String ipaddress; private Integer userid; private Timestamp createdate; public TbltrackEmployerSignin() {} public TbltrackEmployerSignin(TbltrackEmployerSignin value) { this.trackid = value.trackid; this.ipaddress = value.ipaddress; this.userid = value.userid; this.createdate = value.createdate; } public TbltrackEmployerSignin( Integer trackid, String ipaddress, Integer userid, Timestamp createdate ) { this.trackid = trackid; this.ipaddress = ipaddress; this.userid = userid; this.createdate = createdate; } public Integer getTrackid() { return this.trackid; } public void setTrackid(Integer trackid) { this.trackid = trackid; } public String getIpaddress() { return this.ipaddress; } public void setIpaddress(String ipaddress) { this.ipaddress = ipaddress; } public Integer getUserid() { return this.userid; } public void setUserid(Integer userid) { this.userid = userid; } public Timestamp getCreatedate() { return this.createdate; } public void setCreatedate(Timestamp createdate) { this.createdate = createdate; } @Override public String toString() { StringBuilder sb = new StringBuilder("TbltrackEmployerSignin ("); sb.append(trackid); sb.append(", ").append(ipaddress); sb.append(", ").append(userid); sb.append(", ").append(createdate); sb.append(")"); return sb.toString(); } }
[ "phuonghqh@gmail.com" ]
phuonghqh@gmail.com
cde71c75f49fe1adea195bac5185703cb82571ec
9f6884be098fc8ea0623f738eb5fcae121074ddd
/app/src/main/java/com/example/administrator/newcityselect/citypicker/util/ScreenUtil.java
1b82ee39bdc0f072df12351b862a7b05d9c33593
[]
no_license
wuqiuyun/citySelect
5dc08f74b61f3d2e907d1118e7217b8f0f479bd0
1092ebffb96e076e18e00563ea54609a2da60723
refs/heads/master
2021-05-24T10:32:34.217062
2020-04-06T14:27:46
2020-04-06T14:27:46
253,521,085
0
0
null
null
null
null
UTF-8
Java
false
false
3,099
java
package com.example.administrator.newcityselect.citypicker.util; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.provider.Settings; import android.util.DisplayMetrics; import android.view.Display; import android.view.WindowManager; /** * @Author: Bro0cL * @Date: 2018/12/4 11:35 * @Discription: */ public class ScreenUtil { private static int getInternalDimensionSize(Context context, String key) { int result = 0; try { int resourceId = context.getResources().getIdentifier(key, "dimen", "android"); if (resourceId > 0) { result = Math.round(context.getResources().getDimensionPixelSize(resourceId) * Resources.getSystem().getDisplayMetrics().density / context.getResources().getDisplayMetrics().density); } } catch (Resources.NotFoundException ignored) { return 0; } return result; } public static int getStatusBarHeight(Context context) { return getInternalDimensionSize(context, "status_bar_height"); } public static int getNavigationBarHeight(Context context) { boolean mInPortrait = context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT; int result = 0; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { if (hasNavBar((Activity) context)) { String key; if (mInPortrait) { key = "navigation_bar_height"; } else { key = "navigation_bar_height_landscape"; } return getInternalDimensionSize(context, key); } } return result; } private static boolean hasNavBar(Activity activity) { //判断小米手机是否开启了全面屏,开启了,直接返回false if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { if (Settings.Global.getInt(activity.getContentResolver(), "force_fsg_nav_bar", 0) != 0) { return false; } } //其他手机根据屏幕真实高度与显示高度是否相同来判断 WindowManager windowManager = activity.getWindowManager(); Display d = windowManager.getDefaultDisplay(); DisplayMetrics realDisplayMetrics = new DisplayMetrics(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { d.getRealMetrics(realDisplayMetrics); } int realHeight = realDisplayMetrics.heightPixels; int realWidth = realDisplayMetrics.widthPixels; DisplayMetrics displayMetrics = new DisplayMetrics(); d.getMetrics(displayMetrics); int displayHeight = displayMetrics.heightPixels; int displayWidth = displayMetrics.widthPixels; return (realWidth - displayWidth) > 0 || (realHeight - displayHeight) > 0; } }
[ "wuqiuyun_9629@163.com" ]
wuqiuyun_9629@163.com
fae700630af5c5fca7e3ddc545d5206509a35f45
3b33d6e3c2067446ecb2475f68de74328a6ea66a
/DeveloperStudioWorkspace/quick-daan-project-workspace/modules/crowd-funding-database/crowd-funding-database-api/src/main/java/com/crowd/funding/database/service/DonorRegistrationServiceWrapper.java
362fc0e514bdd1490ef020d1d1c7fc8120fa7291
[]
no_license
Sumit9727/QuickDaan_LifeRay1
bbeced3e386f732be861073106848b4237e967ba
96320146033f182ab32f13a54bdc7a2306986b53
refs/heads/master
2020-09-18T11:21:16.519127
2019-11-26T09:04:17
2019-11-26T09:04:17
224,142,985
0
0
null
null
null
null
UTF-8
Java
false
false
1,724
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.crowd.funding.database.service; import aQute.bnd.annotation.ProviderType; import com.liferay.portal.kernel.service.ServiceWrapper; /** * Provides a wrapper for {@link DonorRegistrationService}. * * @author Brian Wing Shun Chan * @see DonorRegistrationService * @generated */ @ProviderType public class DonorRegistrationServiceWrapper implements DonorRegistrationService, ServiceWrapper<DonorRegistrationService> { public DonorRegistrationServiceWrapper( DonorRegistrationService donorRegistrationService) { _donorRegistrationService = donorRegistrationService; } /** * Returns the OSGi service identifier. * * @return the OSGi service identifier */ @Override public String getOSGiServiceIdentifier() { return _donorRegistrationService.getOSGiServiceIdentifier(); } @Override public DonorRegistrationService getWrappedService() { return _donorRegistrationService; } @Override public void setWrappedService( DonorRegistrationService donorRegistrationService) { _donorRegistrationService = donorRegistrationService; } private DonorRegistrationService _donorRegistrationService; }
[ "rohit@prakat.in" ]
rohit@prakat.in
574a628a8b050d0379f4e643d4b345b1b8188472
389e2751dc19c8e6213ae566e6fbd70fff820de9
/tropicraft/1.6.2/src/packages/CoroUtil/util/CoroUtilNBT.java
89a42b2a4c3374e2cd25ecee127df58c0c3edbd8
[]
no_license
Cojomax99/Tropicraft-Archive
9bbb47da5e00bf45ed1397fea1db9d45b546294c
130497ac9cd146af3a6f6c800474e382c909b710
refs/heads/master
2021-01-13T02:24:11.791169
2014-11-06T16:54:06
2014-11-06T16:54:06
26,279,814
0
2
null
null
null
null
UTF-8
Java
false
false
2,413
java
package CoroUtil.util; import java.util.Collection; import java.util.Iterator; import java.util.Map; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChunkCoordinates; import CoroUtil.OldUtil; public class CoroUtilNBT { public static NBTTagCompound copyOntoNBT(NBTTagCompound nbtSource, NBTTagCompound nbtDest) { NBTTagCompound newNBT = (NBTTagCompound) nbtDest.copy(); //do magic try { Collection dataCl = nbtSource.getTags(); Iterator it = dataCl.iterator(); while (it.hasNext()) { NBTBase data = (NBTBase)it.next(); newNBT.setTag(data.getName(), data); } } catch (Exception ex) { ex.printStackTrace(); } return newNBT; } /*private static NBTTagCompound copyOntoNBTTagCompound nbtSource, NBTTagCompound nbtDest) { NBTTagCompound }*/ //this should probably be recursive /*private static NBTTagCompound copyOntoRecursive(NBTTagCompound nbtSource, NBTTagCompound nbttagcompound) { try { Collection dataCl = nbtSource.getTags(); Iterator it = dataCl.iterator(); while (it.hasNext()) { NBTBase data = (NBTBase)it.next(); if (data instanceof NBTTagCompound) { NBTTagCompound resultCopy = copyOntoRecursive((NBTTagCompound)data, nbttagcompound); } String entryName = data.getName(); } //nbttagcompound = new NBTTagCompound(this.getName()); Map tagMap = (Map)c_CoroAIUtil.getPrivateValueSRGMCP(NBTTagCompound.class, nbtSource, "tagMap", "tagMap"); Iterator iterator = tagMap.entrySet().iterator(); while (iterator.hasNext()) { String s = (String)iterator.next(); nbttagcompound.setTag(s, ((NBTBase)tagMap.get(s)).copy()); } } catch (Exception ex) { ex.printStackTrace(); } return nbttagcompound; }*/ public static void writeCoords(String name, ChunkCoordinates coords, NBTTagCompound nbt) { nbt.setInteger(name + "X", coords.posX); nbt.setInteger(name + "Y", coords.posY); nbt.setInteger(name + "Z", coords.posZ); } public static ChunkCoordinates readCoords(String name, NBTTagCompound nbt) { if (nbt.hasKey(name + "X")) { return new ChunkCoordinates(nbt.getInteger(name + "X"), nbt.getInteger(name + "Y"), nbt.getInteger(name + "Z")); } else { return null; } } }
[ "cojomax99@gmail.com" ]
cojomax99@gmail.com
8173677f39ccd29502adb4bbdf817a035110832a
792c024f4917fcaeccd7a4dfacf4f3e30fbaeab9
/src/ua/artcode/week6/ex/TestUncheckedEx.java
e171f0432d3f54b223ab8cd918ffcff657f851cb
[]
no_license
presly808/ACO4
96db9134c3826bf2147c25927e698e81fa4c504b
0cd4500c9dafac056ad1026ad112ac198ec8cc9e
refs/heads/master
2021-01-02T09:19:46.728536
2015-04-04T11:56:19
2015-04-04T11:56:19
30,460,700
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package ua.artcode.week6.ex; import java.util.Arrays; /** * Created by serhii on 21.03.15. */ public class TestUncheckedEx { public static void main(String[] args) { int a = 8; int b = 10; int res = b / a; System.out.println("res = " + res); } }
[ "presly808@gmail.com" ]
presly808@gmail.com
f13b3df1fab6e7d8967d085519e8a53cd72c75f7
f572e0ede050be232751940439b83a05f98273c0
/src/main/java/br/com/vagas/service/mapper/CursoMapper.java
e5e5e5d00be56312c9436507f98e1ff3d36cf9ab
[]
no_license
adailtonlima/portal-vagas-bt
8c4ba96115de6c387828a0be4f6fb98b341639cc
1c2389881366f2ecc7f885e1c9b058497379636e
refs/heads/main
2023-05-08T17:32:02.077641
2021-06-01T11:32:26
2021-06-01T11:32:26
372,805,501
0
0
null
2021-06-01T11:32:27
2021-06-01T11:28:34
Java
UTF-8
Java
false
false
455
java
package br.com.vagas.service.mapper; import br.com.vagas.domain.*; import br.com.vagas.service.dto.CursoDTO; import org.mapstruct.*; /** * Mapper for the entity {@link Curso} and its DTO {@link CursoDTO}. */ @Mapper(componentModel = "spring", uses = { PessoaMapper.class }) public interface CursoMapper extends EntityMapper<CursoDTO, Curso> { @Mapping(target = "pessoa", source = "pessoa", qualifiedByName = "nome") CursoDTO toDto(Curso s); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
2cca43f24792b57eb3937d9e45576ae102c82710
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/MarketBackend/src/com/newco/marketplace/business/businessImpl/so/pdf/TermsConditionsPDFTemplateImpl.java
d8734d3d3eed9054ca3cc1caab4fcf94a11b8308
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,713
java
package com.newco.marketplace.business.businessImpl.so.pdf; import java.io.StringReader; import org.apache.log4j.Logger; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Element; import com.lowagie.text.Image; import com.lowagie.text.List; import com.lowagie.text.PageSize; import com.lowagie.text.Phrase; import com.lowagie.text.html.simpleparser.StyleSheet; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfWriter; import com.newco.marketplace.util.constants.SOPDFConstants; import com.newco.marketplace.utils.ServiceLiveStringUtils; public class TermsConditionsPDFTemplateImpl implements PDFTemplate{ private Logger logger = Logger.getLogger(TermsConditionsPDFTemplateImpl.class); private Image logoImage; private String termsCond; public void execute(PdfWriter pdfWriter, Document document) throws DocumentException { float pageWidth = PageSize.LETTER.getWidth(); float[] termsConditionsTableWidths = { 180, 180, 180 }; PdfPTable termsConditionsTable = new PdfPTable(termsConditionsTableWidths); termsConditionsTable.setSplitLate(false); PdfPCell cell = null; termsConditionsTable.getDefaultCell().setBorder(0); termsConditionsTable.setHorizontalAlignment(Element.ALIGN_CENTER); termsConditionsTable.setTotalWidth(pageWidth - 72); termsConditionsTable.setLockedWidth(true); //adding terms and conditions PdfPTable tableTermsCond = this.addTermsAndConditionsTable(); cell = new PdfPCell(tableTermsCond); cell.setColspan(3); cell.setMinimumHeight(300); termsConditionsTable.addCell(cell); // Empty Rows SOPDFUtils.addEmptyRow(3, 0, -1, termsConditionsTable); SOPDFUtils.addEmptyRow(3, 0, -1, termsConditionsTable); document.newPage(); document.add(termsConditionsTable); } /** * Method for adding terms and conditions to table * @param so * @return */ @SuppressWarnings("unchecked") private PdfPTable addTermsAndConditionsTable() { float[] tableTermsCondWidth = { 550 }; PdfPTable tableTermsCond = new PdfPTable(tableTermsCondWidth); tableTermsCond.getDefaultCell().setBorder(1); tableTermsCond.setHorizontalAlignment(Element.ALIGN_LEFT); PdfPCell cellTermsCond = null; StringReader strTermsCond = new StringReader(termsCond); StyleSheet style = new StyleSheet(); cellTermsCond = new PdfPCell(new Phrase(SOPDFConstants.BUYER_TERMS_COND, SOPDFConstants.FONT_HEADER)); cellTermsCond.setBorder(0); cellTermsCond.setHorizontalAlignment(Element.ALIGN_LEFT); tableTermsCond.addCell(cellTermsCond); //SL-20728 List termsAndConditions = null; String terms = termsCond; try { //replace html character entities terms = SOPDFUtils.getHtmlContent(terms); //Convert the html content to rich text termsAndConditions = SOPDFUtils.getRichText(terms, SOPDFConstants.FONT_LABEL_SMALL, null, SOPDFConstants.SPACE); } catch (Exception e) { logger.error("Error while converting rich text for " + SOPDFConstants.BUYER_TERMS_COND + e); termsAndConditions = null; } if(null != termsAndConditions && !termsAndConditions.isEmpty()){ cellTermsCond = new PdfPCell(); cellTermsCond.addElement(termsAndConditions); cellTermsCond.setBorder(0); tableTermsCond.addCell(cellTermsCond); } else{ terms = termsCond; //Remove the html tags terms = ServiceLiveStringUtils.removeHTML(terms); cellTermsCond = new PdfPCell(new Phrase(terms, SOPDFConstants.FONT_LABEL_SMALL)); cellTermsCond.setBorder(0); tableTermsCond.addCell(cellTermsCond); /*java.util.List<Paragraph> parasList = null; try { parasList = (java.util.List<Paragraph>)HTMLWorker.parseToList(strTermsCond, style); } catch (IOException ioEx) { logger.error("Unexpected IO Error while converting terms conditions HTML into list of iText Paragraphs", ioEx); } if (parasList != null) { for(Paragraph para : parasList) { cellTermsCond = new PdfPCell(new Phrase(para.getContent(), SOPDFConstants.FONT_LABEL_SMALL)); cellTermsCond.setBorder(0); tableTermsCond.addCell(cellTermsCond); } }*/ } cellTermsCond = new PdfPCell(new Phrase(" ")); cellTermsCond.setBorder(0); tableTermsCond.addCell(cellTermsCond); return tableTermsCond; } public Image getLogoImage() { return logoImage; } public void setLogoImage(Image logoImage) { this.logoImage = logoImage; } public String getTermsCond() { return termsCond; } public void setTermsCond(String termsCond) { this.termsCond = termsCond; } }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
c0ff1bcb5ed32c38d9e7a9775d3dd382fe0f1f87
5b2bc6e368a5357d009db3e1ded1967869c62900
/src/main/java/com/luckydog/mapper/WyCleanPlanMapper.java
bd8db18cff04b968d33cbf82f08bac35accf470d
[]
no_license
wzy1142552920/family_service_platform
0d68e1b0f884e970ec55505970f53340a3082409
5a68167215072baa1314faa6853f3b7d526c811f
refs/heads/master
2023-02-05T04:14:51.623473
2020-11-22T15:50:47
2020-11-22T15:50:47
315,075,371
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package com.luckydog.mapper; import com.luckydog.bean.WyCleanPlan; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * 清洁安排 Mapper 接口 * </p> * * @author luckydog * @since 2020-07-14 */ public interface WyCleanPlanMapper extends BaseMapper<WyCleanPlan> { }
[ "wzy1142552920@outlook.com" ]
wzy1142552920@outlook.com
a79f13481948e637c44c03242d329e5101924975
410c3edff13b40190e3ef38aa60a42a4efc4ad67
/base/src/main/java/io/vproxy/base/util/ringbuffer/ProxyOutputRingBuffer.java
9b5b9979c33d703d13f00fa3e1d739936f116971
[ "MIT" ]
permissive
wkgcass/vproxy
f3d783531688676932f60f3df57e89ddabf3f720
6c891d43d6b9f2d2980a7d4feee124b054fbfdb5
refs/heads/dev
2023-08-09T04:03:10.839390
2023-07-31T08:28:56
2023-08-04T12:04:11
166,255,932
129
53
MIT
2022-09-15T08:35:53
2019-01-17T16:14:58
Java
UTF-8
Java
false
false
5,254
java
package io.vproxy.base.util.ringbuffer; import io.vproxy.base.util.Logger; import io.vproxy.base.util.RingBuffer; import io.vproxy.base.util.RingBufferETHandler; import io.vproxy.vfd.ReadableByteStream; import io.vproxy.vfd.WritableByteStream; import java.io.IOException; public class ProxyOutputRingBuffer extends AbstractRingBuffer { private class DefaultBufferETHandler implements RingBufferETHandler { @Override public void readableET() { triggerReadable(); } @Override public void writableET() { // dose not care, because this buffer is only used as output buffer } } private class ProxiedETHandler implements RingBufferETHandler { @Override public void readableET() { if (isProxy) { triggerReadable(); } } @Override public void writableET() { // does not care, because this buffer is only used as output buffer } } public interface ProxyDoneCallback { void proxyDone(); } private final ProxiedETHandler proxiedETHandler = new ProxiedETHandler(); private boolean isProxy = false; // true = write data from attached, false = write data from private final SimpleRingBuffer defaultBuffer; private final int cap; private RingBuffer proxied; private int proxyLen; private ProxyDoneCallback proxyDoneCallback; private ProxyOutputRingBuffer(SimpleRingBuffer defaultBuffer) { this.defaultBuffer = defaultBuffer; this.cap = defaultBuffer.capacity(); defaultBuffer.addHandler(new DefaultBufferETHandler()); } public static ProxyOutputRingBuffer allocateDirect(int cap) { return new ProxyOutputRingBuffer(SimpleRingBuffer.allocateDirect(cap)); } public void proxy(RingBuffer proxied, int proxyLen, ProxyDoneCallback cb) { if (this.proxied != null) throw new IllegalStateException("has a proxied buffer, with proxyLen = " + proxyLen); assert Logger.lowLevelDebug("get a buffer to proxy, data length is " + proxyLen); this.proxied = proxied; this.proxyLen = proxyLen; this.proxyDoneCallback = cb; this.proxied.addHandler(proxiedETHandler); if (defaultBuffer.used() == 0) { assert Logger.lowLevelDebug("the defaultBuffer is empty now, switch to proxy mode"); isProxy = true; triggerReadable(); } else { assert Logger.lowLevelDebug("still have data in the defaultBuffer"); } } public void newDataFromProxiedBuffer() { if (proxied == null) throw new IllegalStateException("no buffer to proxy but alarmed with 'new data from proxied buffer'"); if (isProxy) { triggerReadable(); } } @Override public int storeBytesFrom(ReadableByteStream channel) throws IOException { if (proxied != null) throw new IllegalStateException("has a proxied buffer, with proxyLen = " + proxyLen); return defaultBuffer.storeBytesFrom(channel); } @Override public int writeTo(WritableByteStream channel, int maxBytesToWrite) throws IOException { if (isProxy) { int toWrite = Math.min(maxBytesToWrite, proxyLen); int wrote = proxied.writeTo(channel, toWrite); proxyLen -= wrote; if (proxyLen == 0) { isProxy = false; proxied.removeHandler(proxiedETHandler); proxied = null; ProxyDoneCallback cb = proxyDoneCallback; proxyDoneCallback = null; assert Logger.lowLevelDebug("proxy end, calling proxy done callback"); cb.proxyDone(); } return wrote; } else { int wrote = defaultBuffer.writeTo(channel, maxBytesToWrite); if (wrote == maxBytesToWrite) return wrote; if (proxied == null) return wrote; assert Logger.lowLevelDebug("wrote all data from defaultBuffer, switch to proxy mode"); isProxy = true; return wrote + writeTo(channel, maxBytesToWrite - wrote); } } @Override public int free() { return cap - used(); } @Override public int used() { int proxyPart = 0; if (proxied != null) { int ret = cap; if (ret > proxyLen) ret = proxyLen; int foo = proxied.used(); if (ret > foo) ret = foo; return ret; // the minimum of cap, proxyLen, and proxied.used() } if (isProxy) { return proxyPart; } else { return Math.min(cap, defaultBuffer.used() + proxyPart); } } @Override public int capacity() { return cap; } @Override public void clean() { if (proxied != null) { proxied.removeHandler(proxiedETHandler); proxied = null; proxyLen = 0; proxyDoneCallback = null; } defaultBuffer.clean(); } @Override public void clear() { defaultBuffer.clear(); } }
[ "wkgcass@hotmail.com" ]
wkgcass@hotmail.com
8f3e120e0a9bdc81f19051104aba6c053a0b7879
cfc894ac317799b5bb997dff83465c056b740167
/app/src/main/java/com/bryanrady/ui/view/paint/filter/ColorMatrixFilterOther.java
b912746d121539f9866b65e8e08e4cfab500916a
[]
no_license
bryanrady/UI
b3f919deeec7719bcce251898c91fb3440032ebf
edd8fb1c0069cfc7fc23a6f1421cd4a87dae87c4
refs/heads/master
2021-06-28T12:59:07.065515
2020-09-13T08:10:28
2020-09-13T08:10:28
139,309,123
0
0
null
null
null
null
UTF-8
Java
false
false
3,429
java
package com.bryanrady.ui.view.paint.filter; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.Paint; import android.graphics.RectF; import android.view.MotionEvent; import android.view.View; import com.bryanrady.ui.R; /** * 颜色矩阵的一些其他效果 * Created by wqb on 2018/6/26. */ public class ColorMatrixFilterOther extends View { private Paint mPaint; private Bitmap mBitmap; private int progress1; private int progress2; public ColorMatrixFilterOther(Context context) { super(context); setLayerType(LAYER_TYPE_SOFTWARE,null); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mBitmap = BitmapFactory.decodeResource(getResources(),R.drawable.xyjy2); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); RectF rectF = new RectF(100,100,mBitmap.getWidth(),mBitmap.getHeight()); canvas.drawBitmap(mBitmap, null , rectF , mPaint); //1.设置矩阵缩放 setScale RectF rectF1 = new RectF(100+mBitmap.getWidth(),100,mBitmap.getWidth()*2,mBitmap.getHeight()); ColorMatrix colorMatrix = new ColorMatrix(); //图片变亮了 colorMatrix.setScale(1.2f,1.2f,1.2f,1); mPaint.setColorFilter(new ColorMatrixColorFilter(colorMatrix)); canvas.drawBitmap(mBitmap, null , rectF1 , mPaint); mPaint.setColorFilter(null); // 2.设置饱和度 setSaturation 图片能变深沉 RectF rectF2 = new RectF(100,mBitmap.getHeight()+100,mBitmap.getWidth(),mBitmap.getHeight()*2); ColorMatrix colorMatrix2 = new ColorMatrix(); colorMatrix2.setSaturation(progress1); mPaint.setColorFilter(new ColorMatrixColorFilter(colorMatrix2)); canvas.drawBitmap(mBitmap,null,rectF2,mPaint); mPaint.setColorFilter(null); //3.设置旋转 setRotate 颜色变换 RectF rectF3 = new RectF(100+mBitmap.getWidth(),mBitmap.getHeight()+100,mBitmap.getWidth()*2,mBitmap.getHeight()*2); ColorMatrix colorMatrix3 = new ColorMatrix(); //aixs-- 0 红色轴,1,绿色,2,蓝色 // degrees -- 旋转的角度 colorMatrix3.setRotate(0,progress2); mPaint.setColorFilter(new ColorMatrixColorFilter(colorMatrix3)); canvas.drawBitmap(mBitmap,null, rectF3, mPaint); mPaint.setColorFilter(null); //4.两个矩阵组合 setConcat RectF rectF4 = new RectF(100,mBitmap.getHeight()*2+100,mBitmap.getWidth(),mBitmap.getHeight()*3); ColorMatrix colorMatrix4 = new ColorMatrix(); colorMatrix4.setConcat(colorMatrix2,colorMatrix3); mPaint.setColorFilter(new ColorMatrixColorFilter(colorMatrix4)); canvas.drawBitmap(mBitmap,null, rectF4, mPaint); } @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()){ case MotionEvent.ACTION_DOWN: //progress1 += 1f; progress1 += 20f; progress2 = 0xff0000; invalidate(); break; case MotionEvent.ACTION_UP: progress2 = 0x000000; invalidate(); break; } return true; } }
[ "bryanrady@163.com" ]
bryanrady@163.com
0e1f50fbac8711f66d6fa42c3bcf66832311f44d
53e1530d418dcda795cd140db4d736a65695f37b
/IdeaProjects/src/part2/chapter29/StreamDemo.java
0715cbe60279fcca61ebf1b5285298eb6bbfcf0f
[]
no_license
Zed180881/Zed_repo
a03bac736e3c61c0bea61b2f81624c4bc604870b
6e9499e7ec3cfa9dc11f9d7a92221522c56b5f61
refs/heads/master
2020-04-05T18:57:47.596468
2016-11-02T07:51:30
2016-11-02T07:51:30
52,864,144
0
0
null
null
null
null
UTF-8
Java
false
false
1,508
java
package part2.chapter29; import java.util.ArrayList; import java.util.Optional; import java.util.stream.Stream; class StreamDemo { public static void main(String[] args) { ArrayList<Integer> myList = new ArrayList<>(); myList.add(7); myList.add(18); myList.add(10); myList.add(24); myList.add(17); myList.add(5); System.out.println("Source list: " + myList); Stream<Integer> myStream = myList.stream(); Optional<Integer> minVal = myStream.min(Integer::compare); if (minVal.isPresent()) System.out.println("Min value: " + minVal.get()); myStream = myList.stream(); Optional<Integer> maxVal = myStream.max(Integer::compare); if (maxVal.isPresent()) System.out.println("Max value: " + maxVal.get()); Stream<Integer> sortedStream = myList.stream().sorted(); System.out.print("Sorted Stream: "); sortedStream.forEach(n -> System.out.print(n + " ")); System.out.println(); Stream<Integer> oddVals = myList.stream().sorted().filter(n -> (n % 2) == 1); System.out.print("Odd values: "); oddVals.forEach(n -> System.out.print(n + " ")); System.out.println(); oddVals = myList.stream().sorted().filter(n -> (n % 2) == 1).filter(n -> (n > 5)); System.out.print("Odd values greater than 5: "); oddVals.forEach(n -> System.out.print(n + " ")); System.out.println(); } }
[ "zed180881@gmail.com" ]
zed180881@gmail.com
e24594186a76cde8e54fb9f2e96117e6f0b02f83
13d0d6e5b5d4471952d4a7a1c7a4900d5323953c
/taglib/feilong-taglib-display/src/test/java/com/feilong/taglib/display/pager/BasePagerTest.java
a8ff1a4b79f0d65adfe740c291d0d9bc28af361f
[]
no_license
qq122343779/feilong-platform
3c55867391620eb1283ca95c2aa30ea1bc156b1c
5824b20445747ecd6e730c5a11c120d4e9f9838a
refs/heads/master
2021-01-18T11:50:57.837512
2014-12-03T06:55:59
2014-12-03T06:55:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,859
java
/* * Copyright (C) 2008 feilong (venusdrogon@163.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.feilong.taglib.display.pager; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.feilong.commons.core.enumeration.CharsetType; import com.feilong.taglib.display.pager.command.PagerConstants; import com.feilong.taglib.display.pager.command.PagerParams; /** * The Class BasePagerTest. * * @author <a href="mailto:venusdrogon@163.com">feilong</a> * @version 1.0.7 2014年5月24日 下午11:50:17 * @since 1.0.7 */ public abstract class BasePagerTest{ /** The Constant log. */ @SuppressWarnings("unused") private static final Logger log = LoggerFactory.getLogger(BasePagerTest.class); // Locale.ENGLISH; /** The locale. */ private Locale locale = Locale.SIMPLIFIED_CHINESE; /** The debug is not parse vm. */ boolean debugIsNotParseVM = false; /** * Gets the pager params. * * @return the pager params */ protected PagerParams getPagerParams(){ int count = 1024; int currentPageNo = -1; int pageSize = 10; int maxIndexPages = 8; String skin = PagerConstants.DEFAULT_SKIN; // String pageUrl = "http://localhost:8888/pager.htm?a=b&b=c&d=a&name=jinxin"; String pageUrl = "http://item.blanja.com/items/search?oneNav=1190&priceTo=&twoNav=101706&priceFrom=100&pageNo=1&keyWords=Samsung"; // String pageUrl = "http://localhost:8888/pager.htm"; // pageUrl = // "http://www.underarmour.cn/cmens-bottoms-pant/t-b-f-a-c-s-fLoose-p-g-e-i-o.htm?'\"--></style></script><script>netsparker(0x0000E1)</script>="; String pageParamName = "pageNo"; String vmPath = PagerConstants.DEFAULT_TEMPLATE_IN_CLASSPATH; // log.debug("==================================================="); PagerParams pagerParams = new PagerParams(count, pageUrl); pagerParams.setCurrentPageNo(currentPageNo); pagerParams.setPageSize(pageSize); pagerParams.setMaxIndexPages(maxIndexPages); pagerParams.setSkin(skin); pagerParams.setPageParamName(pageParamName); pagerParams.setVmPath(vmPath); pagerParams.setCharsetType(CharsetType.UTF8); pagerParams.setDebugIsNotParseVM(debugIsNotParseVM); pagerParams.setLocale(locale); return pagerParams; } }
[ "venusdrogon@163.com" ]
venusdrogon@163.com
1f67c2ab85f2349b902e142f5e3df40dfd23c77f
877b6d945bf0f5a174004d02b9534d905e74af92
/ArStation/src/main/java/com/funoble/myarstation/socket/protocol/MBNotifyPlayAnimationTwo.java
3fd3b1ebfdb3b7c8fa146f912127259d00be5913
[]
no_license
Hengle/arstation
47906e828c2a39f638bd7599e6c999f49524061c
e5550072cfd381372770eba457002e1ea4c8b564
refs/heads/master
2020-07-17T06:58:06.861077
2017-07-26T12:56:22
2017-07-26T12:56:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,314
java
/******************************************************************************* * Copyright (C) Inc.All Rights Reserved. * FileName: MBReqDing.java * Description: * History: * 版本号 作者 日期 简要介绍相关操作 * 1.0 cole 2012-5-24 上午11:05:42 *******************************************************************************/ package com.funoble.myarstation.socket.protocol; import java.nio.ByteBuffer; public class MBNotifyPlayAnimationTwo implements MsgPara { //pak名称|起始位置类型(0---位置 1---坐标)|位置【X坐标】|0【Y坐标】 //|结束位置类型(0---位置 1---坐标)|位置【X坐标】|0【Y坐标】|开始动画ID|开始动画动作|结束动画ID|结束动画动作 public String szAnimDes; // /** * construct */ public MBNotifyPlayAnimationTwo() { szAnimDes = ""; } /* * @see com.funoble.lyingdice.socket.protocol.MsgPara#Encode(byte[], short) */ @Override public int Encode(byte[] aOutBuffer, short aOutLength) { if(aOutBuffer == null || aOutLength <= 0) { return -1; } ByteBuffer Temp = ByteBuffer.wrap(aOutBuffer); int shLength = 2; shLength += aOutLength; Temp.position(shLength); Temp.putShort((short) szAnimDes.getBytes().length); if(szAnimDes.length() > 0) { Temp.put(szAnimDes.getBytes()); } shLength = Temp.position(); shLength -= aOutLength; Temp.putShort(aOutLength, (short) shLength); return Temp.position(); } /* * @see com.funoble.lyingdice.socket.protocol.MsgPara#Decode(byte[], short) */ @Override public int Decode(byte[] aInBuffer, short aInLength) { if(aInBuffer == null || aInLength <= 0) { return -1; } ByteBuffer Temp = ByteBuffer.allocate(aInBuffer.length + 2); Temp.put(aInBuffer); Temp.position(aInLength); int shLength = 0; shLength = Temp.getShort(); if(shLength > aInBuffer.length - aInLength) { return -1; } int len = Temp.getShort(); if(len > 0 ) { byte[] data = new byte[len]; Temp.get(data); szAnimDes = new String(data); data = null; } return Temp.position(); } /* * @see java.lang.Object#toString() */ @Override public String toString() { return "MBNotifyPlayAnimationTwo [szAnimDes=" + szAnimDes + "]"; } }
[ "wmzh0003@qq.com" ]
wmzh0003@qq.com
68db334b235a2dfa5ebdeb39fdbcbe73e59f6539
fae82924cc0ad05790567385b736008362964beb
/14-security-spring/exercise/blog-application-extend/src/main/java/com/example/blogapplicationextend/model/bean/AppRole.java
fa513eb488b374c940808d3903c395496945de61
[]
no_license
hauhp94/C0321G1_HuynhPhuocHau_Module4
4167b6ab0b28fe7387f79018eca2d37c79e87dcc
d636275a934876ea578dad8e7537e10be01f489a
refs/heads/master
2023-07-03T21:52:13.330991
2021-08-12T17:25:20
2021-08-12T17:25:20
385,274,194
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package com.example.blogapplicationextend.model.bean; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; @Entity @Getter @Setter @NoArgsConstructor @Table(name = "App_Role", // uniqueConstraints = { // @UniqueConstraint(name = "APP_ROLE_UK", columnNames = "Role_Name") }) public class AppRole { @Id @GeneratedValue @Column(name = "Role_Id", nullable = false) private Long roleId; @Column(name = "Role_Name", length = 30, nullable = false) private String roleName; }
[ "hauhpdn2015@gmail.com" ]
hauhpdn2015@gmail.com
f049a09f5c4f8b34b515dfb460872323ba30aec6
07496eea8b4ab50ca4c8eb6fe00320bfebca6a80
/src/ua/artcode/week2/day2/_03CreateAndFillArrayBackwards.java
719229e6fc6a9839bb13b5a74778737a92cb9290
[]
no_license
presly808/ACB17
d2308a41d2701dee7d6df94ce32e397f414ce40e
79f9a20e85dfb0966391156ef185ccda48a398fd
refs/heads/master
2021-01-20T20:15:48.104992
2016-07-11T07:20:23
2016-07-11T07:20:23
62,028,607
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package ua.artcode.week2.day2; import ua.artcode.utils.ArrayUtils; /** * Created by gorobec on 03.07.16. */ public class _03CreateAndFillArrayBackwards { public static void main(String[] args) { // create and fill array 15 -> 0 int size = 16; int[] arr = ArrayUtils.createAndFillArrayBackward(size); /*new int[size]; for (int i = 0; i < arr.length; i++) { arr[i] = size - i - 1; }*/ /*size--; for (int i = 0; i < arr.length; i++, size--) { arr[i] = size; }*/ /*for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " "); } System.out.println();*/ ArrayUtils.printArray(arr); } }
[ "yevhenijvorobiei@gmail.com" ]
yevhenijvorobiei@gmail.com
4217319cf00f3e52199f79dff47b953d321f9e77
9a9f93532adb7a26307270a0f6876e24658117cd
/app/src/main/java/com/video/newqu/view/widget/ClickAnimationmageView.java
95c4fab4c93f35654e4b2f96c88e595b9aaa4e60
[]
no_license
jinkailong888/Video
fda7c0606eff676ca6672000c620fd8832af43d6
4513c2de0380b09896d9f2d5a5ff1c16f80854ec
refs/heads/master
2020-04-24T08:55:37.866468
2018-04-28T09:20:59
2018-04-28T09:20:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,424
java
package com.video.newqu.view.widget; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; import android.widget.ImageView; /** * TinyHung@outlook.com * 2017/9/13 16:36 * 点击有动画效果的ImageView */ public class ClickAnimationmageView extends ImageView { private static String TAG = "EffectsButton"; private boolean clickable = true; private ScaleAnimation upAnimation = createUpAnim(); private OnClickListener mOnClickListener; private boolean shouldAbortAnim; private int preX; private int preY; private int[] locationOnScreen; private Animation.AnimationListener animationListener = new Animation.AnimationListener() { public void onAnimationEnd(Animation paramAnonymousAnimation) { //setSelected(!isSelected()); clearAnimation(); //Log.d(TAG, "onAnimationEnd: "); if (mOnClickListener != null) { mOnClickListener.onClickView(ClickAnimationmageView.this); } } public void onAnimationRepeat(Animation paramAnonymousAnimation) {} public void onAnimationStart(Animation paramAnonymousAnimation) {} }; public ClickAnimationmageView(Context paramContext) { this(paramContext, null); } public ClickAnimationmageView(Context paramContext, AttributeSet paramAttributeSet) { this(paramContext, paramAttributeSet, 0); } public ClickAnimationmageView(Context paramContext, AttributeSet paramAttributeSet, int paramInt) { super(paramContext, paramAttributeSet, paramInt); upAnimation.setAnimationListener(this.animationListener); locationOnScreen = new int[2]; } private ScaleAnimation createUpAnim() { ScaleAnimation localScaleAnimation = new ScaleAnimation(1.2F, 1.0F, 1.2F, 1.0F, 1, 0.5F, 1, 0.5F); localScaleAnimation.setDuration(50L); localScaleAnimation.setFillEnabled(true); localScaleAnimation.setFillEnabled(false); localScaleAnimation.setFillAfter(true); return localScaleAnimation; } private ScaleAnimation createDownAnim() { ScaleAnimation localScaleAnimation = new ScaleAnimation(1.0F, 1.2F, 1.0F, 1.2F, 1, 0.5F, 1, 0.5F); localScaleAnimation.setDuration(50L); localScaleAnimation.setFillEnabled(true); localScaleAnimation.setFillBefore(false); localScaleAnimation.setFillAfter(true); return localScaleAnimation; } public boolean onTouchEvent(MotionEvent motionEvent) { super.onTouchEvent(motionEvent); if (!this.clickable) { return false; } if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { clearAnimation(); startAnimation(createDownAnim()); this.shouldAbortAnim = false; getLocationOnScreen(this.locationOnScreen); preX = (this.locationOnScreen[0] + getWidth() / 2); preY = (this.locationOnScreen[1] + getHeight() / 2); } if (motionEvent.getAction() == MotionEvent.ACTION_UP) { clearAnimation(); if (!this.shouldAbortAnim) { startAnimation(this.upAnimation); } this.shouldAbortAnim = false; } else if (motionEvent.getAction() == MotionEvent.ACTION_CANCEL) { clearAnimation(); startAnimation(createUpAnim()); this.shouldAbortAnim = false; } else if ((motionEvent.getAction() == MotionEvent.ACTION_MOVE) && (!this.shouldAbortAnim) && (!checkPos(motionEvent.getRawX(), motionEvent.getRawY()))) { this.shouldAbortAnim = true; clearAnimation(); startAnimation(createUpAnim()); } return true; } boolean checkPos(float rawX, float rawY) { rawX = Math.abs(rawX - this.preX); rawY = Math.abs(rawY - this.preY); return (rawX <= getWidth() / 2) && (rawY <= getHeight() / 2); } public void setClickable(boolean clickable) { this.clickable = clickable; } public void setOnClickListener(OnClickListener parama) { this.mOnClickListener = parama; } public interface OnClickListener { void onClickView(ClickAnimationmageView view); } }
[ "584312311@qq.com" ]
584312311@qq.com
5fc7a195d4581f960ee9e71320a308b5111a3fea
57caa5c517ae23a0ac8a62e2d8dfde771660dd4b
/app/src/androidTest/java/cn/com/tianyudg/coordinatorlayoutdemo/ExampleInstrumentedTest.java
581b5dbd1ba31566858feb3672a37d938f4f04e8
[]
no_license
zhizhongbiao/CoordinatorLayoutDemo
18c9f286a5bec6c33ccd7f1ba4ebc203c0204fc8
3d15ed49da62d6aeb1f318794fdd838528eaa7aa
refs/heads/master
2021-05-10T15:21:55.958469
2018-01-23T03:00:43
2018-01-23T03:00:43
118,549,423
0
0
null
null
null
null
UTF-8
Java
false
false
778
java
package cn.com.tianyudg.coordinatorlayoutdemo; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("cn.com.tianyudg.coordinatorlayoutdemo", appContext.getPackageName()); } }
[ "zhizhongbiao163@163.com" ]
zhizhongbiao163@163.com
d541cc0a0faed61c640e5c63992ec2c4e87c9509
eca4a253fe0eba19f60d28363b10c433c57ab7a1
/server/openjacob.engine/java/de/tif/jacob/core/model/Searchconstraint.java
ac611eae51ca577841a4a85635ca05b147fcfe5c
[]
no_license
freegroup/Open-jACOB
632f20575092516f449591bf6f251772f599e5fc
84f0a6af83876bd21c453132ca6f98a46609f1f4
refs/heads/master
2021-01-10T11:08:03.604819
2015-05-25T10:25:49
2015-05-25T10:25:49
36,183,560
0
0
null
null
null
null
UTF-8
Java
false
false
3,182
java
/************************************************************************** * Project : jacob.admin * Date : Mon Nov 16 16:19:57 EET 2009 * * THIS IS A GENERATED FILE - DO NOT CHANGE! * *************************************************************************/ package de.tif.jacob.core.model; import de.tif.jacob.core.Context; import de.tif.jacob.core.data.IDataAccessor; import de.tif.jacob.core.data.IDataTableRecord; import de.tif.jacob.core.data.IDataTransaction; /** * * * Condition: <b></b> * DB table: <b>searchconstraint</b> * **/ public final class Searchconstraint { private Searchconstraint(){} // the name of the table alias public final static String NAME = "searchconstraint"; // All field names of the table alias "searchconstraint" /** * <br> * <br> * required: <b>true</b><br> * type: <b>LONG</b><br> **/ public final static String pkey = "pkey"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TEXT</b><br> **/ public final static String applicationname = "applicationname"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TEXT</b><br> **/ public final static String applicationversion = "applicationversion"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>LONGTEXT</b><br> **/ public final static String definition = "definition"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TEXT</b><br> **/ public final static String ownerid = "ownerid"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TEXT</b><br> **/ public final static String name = "name"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TIMESTAMP</b><br> **/ public final static String created = "created"; /** * <br> * <br> * required: <b>false</b><br> * type: <b>TIMESTAMP</b><br> **/ public final static String lastusage = "lastUsage"; /** * Create a new Record within the current DataAccessor of the Context with a new transaction **/ public static IDataTableRecord newRecord(Context context) throws Exception { return newRecord(context,context.getDataAccessor().newTransaction()); } /** * Create a new Record within the current DataAccessor of the Context and the handsover * transaction. **/ public static IDataTableRecord newRecord(Context context, IDataTransaction trans) throws Exception { return newRecord(context.getDataAccessor(),trans); } /** * Create a new Record within the hands over DataAccessor and a new transaction. **/ public static IDataTableRecord newRecord(IDataAccessor acc) throws Exception { return acc.getTable(NAME).newRecord(acc.newTransaction()); } /** * Create a new Record within the hands over DataAccessor and transaction. **/ public static IDataTableRecord newRecord(IDataAccessor acc, IDataTransaction trans) throws Exception { return acc.getTable(NAME).newRecord(trans); } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
278a754498ef81733523ab4639052b829d0ff9a1
b5153be915d94d1232a4fdebf1464b50809c361a
/src/main/java/com/amazonaws/services/ec2/model/DescribeAddressesRequest.java
e038f3bb018e9eff308f34a4321bf6907214e9ac
[ "Apache-2.0" ]
permissive
KonishchevDmitry/aws-sdk-for-java
c68f0ee7751f624eeae24224056db73e0a00a093
6f8b2f9a3cd659946db523275ba1dd55b90c6238
refs/heads/master
2021-01-18T05:24:52.275578
2010-05-31T06:20:22
2010-05-31T06:20:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,297
java
/* * Copyright 2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.ec2.model; import com.amazonaws.AmazonWebServiceRequest; /** * <p> * A request to describe a user's available Elasitc IPs. * </p> */ public class DescribeAddressesRequest extends AmazonWebServiceRequest { /** * The optional list of Elastic IP addresses to describe. */ private java.util.List<String> publicIps; /** * The optional list of Elastic IP addresses to describe. * * @return The optional list of Elastic IP addresses to describe. */ public java.util.List<String> getPublicIps() { if (publicIps == null) { publicIps = new java.util.ArrayList<String>(); } return publicIps; } /** * The optional list of Elastic IP addresses to describe. * * @param publicIps The optional list of Elastic IP addresses to describe. */ public void setPublicIps(java.util.Collection<String> publicIps) { java.util.List<String> publicIpsCopy = new java.util.ArrayList<String>(); if (publicIps != null) { publicIpsCopy.addAll(publicIps); } this.publicIps = publicIpsCopy; } /** * The optional list of Elastic IP addresses to describe. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param publicIps The optional list of Elastic IP addresses to describe. * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeAddressesRequest withPublicIps(String... publicIps) { for (String value : publicIps) { getPublicIps().add(value); } return this; } /** * The optional list of Elastic IP addresses to describe. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param publicIps The optional list of Elastic IP addresses to describe. * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeAddressesRequest withPublicIps(java.util.Collection<String> publicIps) { java.util.List<String> publicIpsCopy = new java.util.ArrayList<String>(); if (publicIps != null) { publicIpsCopy.addAll(publicIps); } this.publicIps = publicIpsCopy; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("PublicIps: " + publicIps + ", "); sb.append("}"); return sb.toString(); } }
[ "aws-dr-tools@amazon.com" ]
aws-dr-tools@amazon.com
3ed96d249d628347f8c4a19be2f2f3dbe33990f4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_7576f88566a7ac2836a63027a42a57986142ad38/Activator/3_7576f88566a7ac2836a63027a42a57986142ad38_Activator_t.java
f46c331db4f3d5be13a421706081e26d2a8a6539
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,528
java
/******************************************************************************* * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tm.internal.tcf.cdt.ui; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.swt.widgets.Shell; import org.eclipse.tm.tcf.protocol.Protocol; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.eclipse.tm.tcf.cdt.ui"; private static Activator plugin; private static TCFBreakpointStatusListener bp_status_listener; public void start(BundleContext context) throws Exception { super.start(context); plugin = this; EvaluationContextManager.startup(); Protocol.invokeLater(new Runnable() { public void run() { if (bp_status_listener == null) bp_status_listener = new TCFBreakpointStatusListener(); } }); } public void stop(BundleContext context) throws Exception { Protocol.invokeAndWait(new Runnable() { public void run() { if (bp_status_listener != null) { bp_status_listener.dispose(); bp_status_listener = null; } } }); plugin = null; super.stop(context); } public static Activator getDefault() { return plugin; } public static void log(IStatus status) { getDefault().getLog().log(status); } public static void log(Throwable e) { log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, e.getMessage(), e)); } public static IWorkbenchWindow getActiveWorkbenchWindow() { return getDefault().getWorkbench().getActiveWorkbenchWindow(); } public static IWorkbenchPage getActivePage() { IWorkbenchWindow w = getActiveWorkbenchWindow(); if (w != null) return w.getActivePage(); return null; } public static Shell getActiveWorkbenchShell() { IWorkbenchWindow window = getActiveWorkbenchWindow(); if (window != null) return window.getShell(); return null; } public static void errorDialog(String message, IStatus status) { log(status); Shell shell = getActiveWorkbenchShell(); if (shell == null) return; ErrorDialog.openError(shell, "Error", message, status); } public static void errorDialog(String message, Throwable t) { log(t); Shell shell = getActiveWorkbenchShell(); if (shell == null) return; IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, 1, t.getMessage(), null); ErrorDialog.openError(shell, "Error", message, status); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5216130e19b9b45f301d535768e803175eebf121
420cb9e2c7d42b7613ace92eeef4daad29d1afdd
/src/main/java/com/example/spring/boot/rest/service/DmServiceImpl.java
47fe99bfe87ed65ebe6c131d9dd1f1096208d2c2
[]
no_license
nandpoot23/SpringBootAspectWebService
4403551ea6727f336cc4bb3ff592f320f39bb265
7c82a895f25516e530e49a5ac71fb8d02ab26241
refs/heads/master
2021-01-15T19:04:59.841842
2017-08-09T12:41:51
2017-08-09T12:41:51
99,682,430
0
0
null
null
null
null
UTF-8
Java
false
false
1,536
java
package com.example.spring.boot.rest.service; import java.util.List; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.example.spring.boot.rest.handler.SelectAllDmCustomerHandler; import com.example.spring.boot.rest.handler.SingleSelectDmCustomerHandler; import com.example.spring.boot.rest.types.EmpAddress; import com.example.spring.boot.rest.types.EmpConfigIdentifier; import com.example.spring.boot.rest.types.EmpDetails; /** * @author mlahariya * @version 1.0, Dec 2016 */ @Component("DmServiceImpl") public class DmServiceImpl implements DmServiceInterface { private static org.slf4j.Logger LOG = LoggerFactory.getLogger(DmServiceImpl.class); @Autowired private SingleSelectDmCustomerHandler singleSelectDmCustomerHandler; @Autowired private SelectAllDmCustomerHandler selectAllDmCustomerHandler; @Override public EmpDetails queryEmpConfigs(EmpConfigIdentifier id) { if (id != null) { LOG.debug("MyServiceImpl::queryEmpConfigs id : " + id.getId()); } return singleSelectDmCustomerHandler.queryEmpConfigs(id); } @Override public List<EmpDetails> selectAllEmpAllData(EmpAddress empAddr) { if (empAddr.getAddress() != null) { LOG.debug("MyServiceImpl::selectAllEmpAllData address of your sector : " + empAddr.getAddress()); } return selectAllDmCustomerHandler.selectAllEmpAllData(empAddr); } }
[ "mlahariya@xavient.com" ]
mlahariya@xavient.com
1df11bdd73e1eacdd611e9d73fbec79f6487c2d0
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Mms/src/main/java/com/google/common/util/concurrent/Striped$SmallLazyStriped.java
47b94c93f50c19e9eb5151eca26c889fb2c8fa9e
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package com.google.common.util.concurrent; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.Striped.PowerOfTwoStriped; @VisibleForTesting class Striped$SmallLazyStriped<L> extends PowerOfTwoStriped<L> { }
[ "liming@droi.com" ]
liming@droi.com
5c14140ae0903592d310446ca90b922bec5edecb
a55b85b6dd6a4ebf856b3fd80c9a424da2cd12bd
/ors/src/main/java/org/marketcetera/ors/history/ReportPersistenceException.java
37e354f01c08de2a15e0a27669e1cc961bed3abe
[]
no_license
jeffreymu/marketcetera-2.2.0-16652
a384a42b2e404bcc6140119dd2c6d297d466596c
81cdd34979492f839233552432f80b3606d0349f
refs/heads/master
2021-12-02T11:18:01.399940
2013-08-09T14:36:21
2013-08-09T14:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
844
java
package org.marketcetera.ors.history; import org.marketcetera.util.misc.ClassVersion; import org.marketcetera.util.except.I18NException; import org.marketcetera.util.log.I18NBoundMessage; /* $License$ */ /** * ReportPersistenceException * * @author anshul@marketcetera.com * @version $Id: ReportPersistenceException.java 16154 2012-07-14 16:34:05Z colin $ * @since 1.0.0 */ @ClassVersion("$Id: ReportPersistenceException.java 16154 2012-07-14 16:34:05Z colin $") public class ReportPersistenceException extends I18NException { /** * Create an instance. * * @param cause the underlying cause. * @param message the error message. */ public ReportPersistenceException(Throwable cause, I18NBoundMessage message) { super(cause, message); } private static final long serialVersionUID = 1L; }
[ "vladimir_petrovich@yahoo.com" ]
vladimir_petrovich@yahoo.com
af14d2d5a5b9490ae12a022348d88d518df5c75b
b7ac80392339ad44466578f40b1ea1b03d81acae
/outstagram-login/src/main/java/com/project/outstagram/OutstagramLoginServerApplication.java
79371da691810bde66abbc93827eaa5a2c4d4093
[]
no_license
DaeAkin/outstagram
660d00bb88d843aa510d93b47acaa3174ba94275
4422283e11c4dd3250505227ff72453d1a0391b2
refs/heads/master
2020-09-25T12:04:14.234990
2020-07-07T13:02:14
2020-07-07T13:02:14
226,001,513
2
1
null
null
null
null
UTF-8
Java
false
false
2,857
java
package com.project.outstagram; import brave.sampler.Sampler; import com.project.outstagram.global.utils.UserContextInterceptor; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoRestTemplateFactory; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.stream.annotation.EnableBinding; import org.springframework.cloud.stream.annotation.StreamListener; import org.springframework.cloud.stream.messaging.Sink; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.security.oauth2.client.OAuth2RestTemplate; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; import org.springframework.web.client.RestTemplate; import java.util.Collections; import java.util.List; @SpringBootApplication @EnableJpaAuditing @EnableJpaRepositories @RefreshScope @EnableEurekaClient @EnableCircuitBreaker @EnableResourceServer //kafka https://yfkwon.tistory.com/26 @EnableBinding(Sink.class) public class OutstagramLoginServerApplication { public static void main(String[] args) { SpringApplication.run(OutstagramLoginServerApplication.class, args); } @StreamListener(Sink.INPUT) /** 메소드이름이 handle로 시작해야 작동함 */ public void handle(String s) { System.out.println("왜 안와!!"); System.out.println("카프카에서 보낸 메세지 : " + s); } @Bean public Sampler defaultSampler() { // return new AlwaysSampler(); return Sampler.ALWAYS_SAMPLE; } //TODO WebFlux로 교체 예정 // @LoadBalanced // @Bean // public RestTemplate getRestTemplate() { // return new RestTemplate(); // } @Bean public OAuth2RestTemplate restTemplate(UserInfoRestTemplateFactory factory) { return factory.getUserInfoRestTemplate(); } @Primary @Bean public RestTemplate getCustomRestTemplate() { RestTemplate template = new RestTemplate(); List interceptors = template.getInterceptors(); if (interceptors == null) { template.setInterceptors(Collections.singletonList(new UserContextInterceptor())); } else { interceptors.add(new UserContextInterceptor()); template.setInterceptors(interceptors); } return template; } }
[ "mindonghyeon890@gmail.com" ]
mindonghyeon890@gmail.com
0463c2f97780811fc3159559c0fc0aca77bf7e90
c0b37a664fde6a57ae61c4af635e6dea28d7905e
/Helpful dev stuff/AeriesMobilePortal_v1.2.0_apkpure.com_source_from_JADX/com/google/android/gms/internal/clearcut/zzaz.java
33039a5eb9d4369df82711b49124d070b6578e9f
[]
no_license
joshkmartinez/Grades
a21ce8ede1371b9a7af11c4011e965f603c43291
53760e47f808780d06c4fbc2f74028a2db8e2942
refs/heads/master
2023-01-30T13:23:07.129566
2020-12-07T18:20:46
2020-12-07T18:20:46
131,549,535
0
0
null
null
null
null
UTF-8
Java
false
false
5,510
java
package com.google.android.gms.internal.clearcut; import java.util.Arrays; import java.util.Collection; import java.util.RandomAccess; final class zzaz extends zzav<Boolean> implements zzcn<Boolean>, RandomAccess { private static final zzaz zzfg; private int size; private boolean[] zzfh; static { zzav com_google_android_gms_internal_clearcut_zzaz = new zzaz(); zzfg = com_google_android_gms_internal_clearcut_zzaz; com_google_android_gms_internal_clearcut_zzaz.zzv(); } zzaz() { this(new boolean[10], 0); } private zzaz(boolean[] zArr, int i) { this.zzfh = zArr; this.size = i; } private final void zza(int i, boolean z) { zzw(); if (i < 0 || i > this.size) { throw new IndexOutOfBoundsException(zzh(i)); } if (this.size < this.zzfh.length) { System.arraycopy(this.zzfh, i, this.zzfh, i + 1, this.size - i); } else { Object obj = new boolean[(((this.size * 3) / 2) + 1)]; System.arraycopy(this.zzfh, 0, obj, 0, i); System.arraycopy(this.zzfh, i, obj, i + 1, this.size - i); this.zzfh = obj; } this.zzfh[i] = z; this.size++; this.modCount++; } private final void zzg(int i) { if (i < 0 || i >= this.size) { throw new IndexOutOfBoundsException(zzh(i)); } } private final String zzh(int i) { int i2 = this.size; StringBuilder stringBuilder = new StringBuilder(35); stringBuilder.append("Index:"); stringBuilder.append(i); stringBuilder.append(", Size:"); stringBuilder.append(i2); return stringBuilder.toString(); } public final /* synthetic */ void add(int i, Object obj) { zza(i, ((Boolean) obj).booleanValue()); } public final boolean addAll(Collection<? extends Boolean> collection) { zzw(); zzci.checkNotNull(collection); if (!(collection instanceof zzaz)) { return super.addAll(collection); } zzaz com_google_android_gms_internal_clearcut_zzaz = (zzaz) collection; if (com_google_android_gms_internal_clearcut_zzaz.size == 0) { return false; } if (Integer.MAX_VALUE - this.size >= com_google_android_gms_internal_clearcut_zzaz.size) { int i = this.size + com_google_android_gms_internal_clearcut_zzaz.size; if (i > this.zzfh.length) { this.zzfh = Arrays.copyOf(this.zzfh, i); } System.arraycopy(com_google_android_gms_internal_clearcut_zzaz.zzfh, 0, this.zzfh, this.size, com_google_android_gms_internal_clearcut_zzaz.size); this.size = i; this.modCount++; return true; } throw new OutOfMemoryError(); } public final void addBoolean(boolean z) { zza(this.size, z); } public final boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof zzaz)) { return super.equals(obj); } zzaz com_google_android_gms_internal_clearcut_zzaz = (zzaz) obj; if (this.size != com_google_android_gms_internal_clearcut_zzaz.size) { return false; } boolean[] zArr = com_google_android_gms_internal_clearcut_zzaz.zzfh; for (int i = 0; i < this.size; i++) { if (this.zzfh[i] != zArr[i]) { return false; } } return true; } public final /* synthetic */ Object get(int i) { zzg(i); return Boolean.valueOf(this.zzfh[i]); } public final int hashCode() { int i = 1; for (int i2 = 0; i2 < this.size; i2++) { i = (i * 31) + zzci.zzc(this.zzfh[i2]); } return i; } public final /* synthetic */ Object remove(int i) { zzw(); zzg(i); boolean z = this.zzfh[i]; if (i < this.size - 1) { System.arraycopy(this.zzfh, i + 1, this.zzfh, i, this.size - i); } this.size--; this.modCount++; return Boolean.valueOf(z); } public final boolean remove(Object obj) { zzw(); for (int i = 0; i < this.size; i++) { if (obj.equals(Boolean.valueOf(this.zzfh[i]))) { System.arraycopy(this.zzfh, i + 1, this.zzfh, i, this.size - i); this.size--; this.modCount++; return true; } } return false; } protected final void removeRange(int i, int i2) { zzw(); if (i2 >= i) { System.arraycopy(this.zzfh, i2, this.zzfh, i, this.size - i2); this.size -= i2 - i; this.modCount++; return; } throw new IndexOutOfBoundsException("toIndex < fromIndex"); } public final /* synthetic */ Object set(int i, Object obj) { boolean booleanValue = ((Boolean) obj).booleanValue(); zzw(); zzg(i); boolean z = this.zzfh[i]; this.zzfh[i] = booleanValue; return Boolean.valueOf(z); } public final int size() { return this.size; } public final /* synthetic */ zzcn zzi(int i) { if (i >= this.size) { return new zzaz(Arrays.copyOf(this.zzfh, i), this.size); } throw new IllegalArgumentException(); } }
[ "joshkmartinez@gmail.com" ]
joshkmartinez@gmail.com
b3bba8fc7824c21c44920d5dd55b0bd23a8cbdac
cf8870973bf6d1c818df1fabd81efa3949fc0999
/src/main/java/br/com/centralerrors/user/service/impl/UserService.java
585efac05543aee4f312b1586d025600ca332e1a
[]
no_license
marcelosoliveira/projeto-central-erros
d9428b778f213887ba2919bd63c89f520a8110fe
69ddf33dd0c447052574104f8bd6217c23623cda
refs/heads/master
2023-06-05T07:56:16.862942
2021-06-25T20:19:26
2021-06-25T20:19:26
354,385,555
0
0
null
null
null
null
UTF-8
Java
false
false
1,830
java
package br.com.centralerrors.user.service.impl; import br.com.centralerrors.user.repository.UserRepository; import br.com.centralerrors.user.service.interfaces.UserServiceInterface; import br.com.centralerrors.user.model.User; import lombok.AllArgsConstructor; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service @AllArgsConstructor public class UserService implements UserDetailsService, UserServiceInterface { private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException { User user = Optional.ofNullable(this.userRepository.findByUserName(userName)) .orElseThrow(() -> new UsernameNotFoundException("Usuario inexistente ou senha invalida")); List<GrantedAuthority> authorityListAdmin = AuthorityUtils.createAuthorityList( "ROLE_USER", "ROLE_ADMIN"); List<GrantedAuthority> authorityListUser = AuthorityUtils.createAuthorityList( "ROLE_USER"); return new org.springframework.security.core.userdetails.User( user.getUserName(), user.getPassword(), user.getIsAdmin() ? authorityListAdmin : authorityListUser); } @Override public String passwordCrypto(String password) { return new BCryptPasswordEncoder().encode(password); } }
[ "msbobsk8@gmail.com" ]
msbobsk8@gmail.com
210041fffd520e78573e5a5699f9e344a515a885
f4ad7a1ccda2633c5cbdf30768e07220bc5a1523
/SpringBoot/springboot-08-shrio/shiro-springboot/src/main/java/com/komorebi/service/UserService.java
ae8a37254767c27663070c8e9c2945c314a79dbc
[]
no_license
judelawlee/JavaWeb
ff967be69c98d560b30ec7c2be7bed86c6a6c2d8
9f7eb06aeb0a4c6cd4cb9a0902ef9c46c501ee47
refs/heads/master
2023-05-14T13:37:47.136035
2021-06-02T00:31:52
2021-06-02T00:31:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
142
java
package com.komorebi.service; import com.komorebi.pojo.User; public interface UserService { public User queryUserByName(String name); }
[ "240553516@qq.com" ]
240553516@qq.com
8ee0a1a8ccfd4e274590d72ce889392d099cd039
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/radian/tcmis/server7/client/swa/servlets/SWAScannerUpload.java
0207f21f1ed5f86ad7a2682df7ee44f2ea387dc7
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
1,178
java
package radian.tcmis.server7.client.swa.servlets; /** * Title: Your Product Name * Description: Your description * Copyright: Copyright (c) 1998 * Company: Your Company * @author Your Name * @version */ import radian.tcmis.server7.share.helpers.*; import radian.tcmis.server7.share.servlets.*; import radian.tcmis.server7.client.swa.dbObjs.*; import radian.tcmis.server7.client.swa.helpers.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class SWAScannerUpload extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SWATcmISDBModel db = null; try { //db = new SWATcmISDBModel(); db = new SWATcmISDBModel("SWA",(String)request.getHeader("logon-version")); ScannerUpload obj = new ScannerUpload((ServerResourceBundle) new SWAServerResourceBundle(),db); obj.doPost(request,response); } catch (Exception e){ e.printStackTrace(); } finally { db.close(); } } }
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
cc66b3302b73a13ed52323245169436d94766481
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ss/sls/extn/dm/SS_SLS_EXTN_4830_LDM.java
b723c3171bf5df49718b4934acd05b8531f96791
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,999
java
/*************************************************************************************************** * 파일명 : .java * 기능 : * 작성일자 : * 작성자 : 심정보 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.ss.sls.extn.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.ss.sls.extn.ds.*; import chosun.ciis.ss.sls.extn.rec.*; /** * */ public class SS_SLS_EXTN_4830_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String bocd; public String valmm; public SS_SLS_EXTN_4830_LDM(){} public SS_SLS_EXTN_4830_LDM(String bocd, String valmm){ this.bocd = bocd; this.valmm = valmm; } public void setBocd(String bocd){ this.bocd = bocd; } public void setValmm(String valmm){ this.valmm = valmm; } public String getBocd(){ return this.bocd; } public String getValmm(){ return this.valmm; } public String getSQL(){ return "{ call CRMSAL_COM.SP_SS_SLS_EXTN_4830_L(? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ SS_SLS_EXTN_4830_LDM dm = (SS_SLS_EXTN_4830_LDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.bocd); cstmt.setString(4, dm.valmm); cstmt.registerOutParameter(5, OracleTypes.CURSOR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.ss.sls.extn.ds.SS_SLS_EXTN_4830_LDataSet(); } public void print(){ System.out.println("SQL = " + this.getSQL()); System.out.println("bocd = [" + getBocd() + "]"); System.out.println("valmm = [" + getValmm() + "]"); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String bocd = req.getParameter("bocd"); if( bocd == null){ System.out.println(this.toString+" : bocd is null" ); }else{ System.out.println(this.toString+" : bocd is "+bocd ); } String valmm = req.getParameter("valmm"); if( valmm == null){ System.out.println(this.toString+" : valmm is null" ); }else{ System.out.println(this.toString+" : valmm is "+valmm ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String bocd = Util.checkString(req.getParameter("bocd")); String valmm = Util.checkString(req.getParameter("valmm")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String bocd = Util.Uni2Ksc(Util.checkString(req.getParameter("bocd"))); String valmm = Util.Uni2Ksc(Util.checkString(req.getParameter("valmm"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setBocd(bocd); dm.setValmm(valmm); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Thu May 26 14:55:06 KST 2016 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
1368e63b7f01526c5c423e28c169d1db11cc26f0
9e4b875853b5e71bb9c3d2346b6d7b5607d6a337
/app/src/main/java/com/mofanstore/base/BaseFragment.java
548ed8b20c60cff34e6f12ca2e8c2022c8c12e7b
[]
no_license
RenVeCf/mofanstore
18dcbce28c8b75445e965432f40148cc60d8902b
b69fec648451494c79e5eaed64875e8852cf9842
refs/heads/master
2020-08-03T13:18:42.860680
2019-09-30T03:10:55
2019-09-30T03:10:55
211,765,406
0
0
null
null
null
null
UTF-8
Java
false
false
2,287
java
package com.mofanstore.base; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; import com.mofanstore.R; import butterknife.ButterKnife; public abstract class BaseFragment extends Fragment { /***封装toast对象**/ private static Toast toast; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(intiLayout(),null); ButterKnife.inject(this, view); return view; } /** * 绑定布局 * @return */ protected abstract int intiLayout(); @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initView(); } /** * 初始化组件 */ protected abstract void initView(); @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); initData(); } /** * 设置数据等逻辑代码 */ protected abstract void initData(); /** * 显示长toast * @param msg */ public void toastLong(String msg){ View layout = LayoutInflater.from(getActivity()).inflate(R.layout.activity_toast, null); TextView nam_tos = (TextView) layout.findViewById(R.id.nam_tos); nam_tos.setText(msg); if (toast == null) { //context.getApplicationContext()取代context也是为了防止内存泄露 toast = new Toast(this.getActivity()); toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); toast.setDuration(Toast.LENGTH_SHORT); toast.setView(layout); toast.show(); } else { toast.setView(layout); toast.show(); } } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.reset(this); } }
[ "942685687@qq.com" ]
942685687@qq.com
04161f1645644865ad6cfac95ccb99d92a7c5431
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/p298d/p299a/p300a/p301a/p303y0/p391i/p398z/C7277h.java
933f52b9f2e1cf607b6bfc61563101587d6e2f46
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
2,151
java
package p298d.p299a.p300a.p301a.p303y0.p391i.p398z; import java.util.Collection; import java.util.Set; import p298d.p299a.p300a.p301a.p303y0.p304b.C6207k0; import p298d.p299a.p300a.p301a.p303y0.p304b.C6232q0; import p298d.p299a.p300a.p301a.p303y0.p312c.p313a.C6257b; import p298d.p299a.p300a.p301a.p303y0.p331f.C6717d; import p298d.p334t.C6800r; import p298d.p344x.p345b.C6862l; import p298d.p344x.p346c.C6888i; import p298d.p344x.p346c.C6890k; /* renamed from: d.a.a.a.y0.i.z.h */ public interface C7277h extends C7282j { /* renamed from: a */ public static final C7278a f14517a = C7278a.f14518a; /* renamed from: d.a.a.a.y0.i.z.h$a */ public static final class C7278a { /* renamed from: a */ public static final /* synthetic */ C7278a f14518a = new C7278a(); /* renamed from: b */ public static final C6862l<C6717d, Boolean> f14519b = C7279a.f14520g; /* renamed from: d.a.a.a.y0.i.z.h$a$a */ public static final class C7279a extends C6890k implements C6862l<C6717d, Boolean> { /* renamed from: g */ public static final C7279a f14520g = new C7279a(); public C7279a() { super(1); } public Object invoke(Object obj) { C6888i.m12438e((C6717d) obj, "it"); return Boolean.TRUE; } } } /* renamed from: d.a.a.a.y0.i.z.h$b */ public static final class C7280b extends C7281i { /* renamed from: b */ public static final C7280b f14521b = new C7280b(); public Set<C6717d> getClassifierNames() { return C6800r.f13715g; } public Set<C6717d> getFunctionNames() { return C6800r.f13715g; } public Set<C6717d> getVariableNames() { return C6800r.f13715g; } } Set<C6717d> getClassifierNames(); Collection<? extends C6232q0> getContributedFunctions(C6717d dVar, C6257b bVar); Collection<? extends C6207k0> getContributedVariables(C6717d dVar, C6257b bVar); Set<C6717d> getFunctionNames(); Set<C6717d> getVariableNames(); }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
629a5b246d4ba25703dc4dd44f472e9f6fcc4f73
2a662cfdf91e0cded6b9d272cbcea8a2d4377d4c
/Matrix Client/src/main/java/com/jagex/Exception_Sub2.java
00d81e3199cdf040a38b7f40bd4e21f16dab3fbe
[]
no_license
primnoprotogen/718_RS_Build
38293df71eb08d0cc64bce5e19cc64b46172463a
84ddd7138d8ea7dede51814e62868696932ec303
refs/heads/master
2023-04-04T04:21:25.263022
2021-04-20T22:17:11
2021-04-20T22:17:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.jagex;/* Exception_Sub2 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ public class Exception_Sub2 extends Exception { public Exception_Sub2(String string) { super(string); } public static int method274(byte i) { try { return Class118.anInt1401 * 332512427; } catch (RuntimeException runtimeexception) { throw Class346.method4175(runtimeexception, new StringBuilder() .append("aet.s(").append(')').toString()); } } }
[ "jesseguerrero1991@gmail.com" ]
jesseguerrero1991@gmail.com
f8cdda10990e9bd4de5835071e902d72a55d5f5f
d00ea6603e9bc0486098411d54d1652807278059
/r3-activity/src/com/jfixby/r3/ui/red/activity/raster/RedTileInfo.java
00c3cd9725774dec8a016c6d74f9efa69e103967
[ "Apache-2.0" ]
permissive
JFixby/R3Red
792e56bde7bd1b9c2715626eda18afd004b431cb
5924b89b28c69bc695e601524402afcda9023fb6
refs/heads/master
2020-12-02T22:21:00.190273
2017-07-21T11:12:41
2017-07-21T11:12:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,111
java
package com.jfixby.r3.ui.red.activity.raster; import com.jfixby.r3.api.activity.raster.Raster; import com.jfixby.scarabei.api.floatn.Float2; import com.jfixby.scarabei.api.geometry.Geometry; import com.jfixby.scarabei.api.geometry.Rectangle; import com.jfixby.scarabei.api.math.Angle; import com.jfixby.scarabei.api.math.FloatMath; public class RedTileInfo { public Raster raster; public double top_left_x; public double top_left_y; public double bottom_right_x; public double bottom_right_y; final Float2 tmpA = Geometry.newFloat2(); final Float2 tmpB = Geometry.newFloat2(); final Float2 tmpC = Geometry.newFloat2(); final Float2 tmpD = Geometry.newFloat2(); @Override public String toString () { return "RedTileInfo [top_left_x=" + top_left_x + ", top_left_y=" + top_left_y + ", bottom_left_x=" + bottom_right_x + ", bottom_left_y=" + bottom_right_y + ", raster=" + raster + "]"; } final RedTileInfo tile = this; // boolean need_update = !false; final void update (final Rectangle shape, final Angle angle) { // if (!need_update) { // return; // } final Raster raster = tile.raster; final Rectangle tile_shape = raster.shape(); this.tmpA.setXY(tile.top_left_x, tile.top_left_y); this.tmpB.setXY(tile.bottom_right_x, tile.top_left_y); this.tmpC.setXY(tile.bottom_right_x, tile.bottom_right_y); this.tmpD.setXY(tile.top_left_x, tile.bottom_right_y); shape.toAbsolute(this.tmpA); shape.toAbsolute(this.tmpB); // shape.toAbsolute(tmpC); shape.toAbsolute(this.tmpD); final double distance_AB = FloatMath.component().distance(this.tmpA.getX(), this.tmpA.getY(), this.tmpB.getX(), this.tmpB.getY()); final double distance_AD = FloatMath.component().distance(this.tmpA.getX(), this.tmpA.getY(), this.tmpD.getX(), this.tmpD.getY()); tile_shape.setOriginRelative(0, 0); // tile_shape.setOriginRelative(0, 0); // tile_shape.getPosition().getX(); tile_shape.setWidth(distance_AB); tile_shape.setHeight(distance_AD); tile_shape.setPosition(tmpA); tile_shape.setRotation(angle); } }
[ "github@jfixby.com" ]
github@jfixby.com
7be4e410ce8c5f26d5d103486b7cbe5572dd995f
ad8bee4ff8566e02a6956d57d02997f69861b6e6
/src/main/java/com/example/demo/service/AreaService.java
e507c69f1f553dc9aa3e5b112ce307753f1ca7b9
[]
no_license
1303110335/spring-demo2
530ff580f1a04eae816acb51378563582d00f216
b5c84f03050c8cc932ee05c4dfc71bcd307d4bba
refs/heads/master
2020-03-14T22:45:09.061379
2018-05-02T09:25:57
2018-05-02T09:25:57
131,828,107
0
0
null
null
null
null
UTF-8
Java
false
false
282
java
package com.example.demo.service; import java.util.List; import com.example.demo.entity.Area; public interface AreaService { List<Area> getAreaList(); Area getAreaById(int areaId); boolean addArea(Area area); boolean modifyArea(Area area); boolean deleteArea(int areaId); }
[ "1303110335@qq.com" ]
1303110335@qq.com
8810baf7d57e5e76162bdbecf24e095c40945561
c6417ed9b83e7008b20c892d20884b1edb2bab0b
/src/main/java/com/ninjasparrow/app/repository/AuthorityRepository.java
224de8fe5d37561c1cb8d099d57572ca963be0dd
[]
no_license
prayatna-jain/ninjasparrow
7808f6b5bf340bcbc08339150f77ca0ddd948250
38e62d68c66b115f3493ac008addc519dff00677
refs/heads/main
2023-05-14T06:46:48.346004
2021-06-13T13:40:18
2021-06-13T13:40:18
376,509,606
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package com.ninjasparrow.app.repository; import com.ninjasparrow.app.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8bd4f0cdd0407e341f0ab192e3e9f13d902cb686
0dc7b5884df384709a2704a8bd7995058f039a4b
/tesuto-drools-services/tesuto-drools-common/src/main/java/org/ccctc/common/droolscommon/model/EngineDTO.java
64963fb677ae73400d90ab128764c56f43d66e3d
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0" ]
permissive
apereo-tesuto/tesuto
b1672fc2ebbd4b5d4647ee15e3e4285c8e3dc0be
90ed26311b1baa15cd90d67bb55e7d4c613bdc53
refs/heads/master
2021-10-08T01:02:49.098929
2021-09-24T21:22:52
2021-09-24T21:22:52
218,090,150
4
3
Apache-2.0
2021-09-24T21:22:53
2019-10-28T16:08:04
null
UTF-8
Java
false
false
4,554
java
/******************************************************************************* * Copyright © 2019 by California Community Colleges Chancellor's Office * * 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.ccctc.common.droolscommon.model; import java.util.Date; import java.util.HashSet; import java.util.Set; import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.annotation.JsonFormat; public class EngineDTO { private String artifactId; private Set<String> categories; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm a z") private Date created; private String dataSource; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm a z") private Date edited; private Set<String> events; private String groupId; private String name; private String status; private String version; public void adjustValuesForStorage() { name = StringUtils.isBlank(name) ? null : name; dataSource = StringUtils.isBlank(dataSource) ? null : dataSource; groupId = StringUtils.isBlank(groupId) ? null : groupId; artifactId = StringUtils.isBlank(artifactId) ? null : artifactId; version = StringUtils.isBlank(version) ? null : version; status = StringUtils.isBlank(status) ? null : status; } public void adjustValuesForUI() { name = name == null ? "" : name; dataSource = dataSource == null ? "" : dataSource; groupId = groupId == null ? "" : groupId; artifactId = artifactId == null ? "" : artifactId; version = version == null ? "" : version; status = status == null ? "" : status; categories = categories == null ?new HashSet<String>() : categories; events = events == null ?new HashSet<String>() : events; } public String getArtifactId() { return artifactId; } public Set<String> getCategories() { return categories; } public Date getCreated() { return this.created; } public String getDataSource() { return dataSource; } public Date getEdited() { return this.edited; } public Set<String> getEvents() { return events; } public String getGroupId() { return groupId; } public String getName() { return name; } public String getStatus() { return status; } public String getVersion() { return version; } public EngineDTO setArtifactId(String artifactId) { this.artifactId = artifactId; return this; } public void setCategories(Set<String> categories) { this.categories = categories; } public void setCreated(Date created) { this.created = created; } public EngineDTO setDataSource(String dataSource) { this.dataSource = dataSource; return this; } public void setEdited(Date edited) { this.edited = edited; } public void setEvents(Set<String> events) { this.events = events; } public EngineDTO setGroupId(String groupId) { this.groupId = groupId; return this; } public EngineDTO setName(String name) { this.name = name; return this; } public void setStatus(String status) { this.status = status; } public EngineDTO setVersion(String version) { this.version = version; return this; } public String toString() { StringBuffer buf = new StringBuffer(); buf.append("name:[" + name + "]") .append(", dataSource:[" + dataSource + "]") .append(", groupId:[" + groupId + "]") .append(", artifactId:[" + artifactId + "]") .append(", version:[" + version + "]") .append(", status:[" + status + "]"); return buf.toString(); } }
[ "jstanley@unicon.net" ]
jstanley@unicon.net
0035ff673ce7c3015d12fa834e41d141e05662c7
34481cb8ebcd076eff9dfc7b51c5d9b58275cef4
/src/main/java/org/bian/dto/BQProductionExchangeInputModel.java
c3ce8895be29f85e7a242dd27f0d1962174fdf4f
[ "Apache-2.0" ]
permissive
bianapis/sd-product-deployment-v2
9aed0dd5e630b5d86130dc71d092e4c64ca67c24
a63b36a5ac11bf5b1be6ba2e5c5cae9c58a79e14
refs/heads/master
2020-07-22T20:04:05.814302
2019-09-12T10:46:59
2019-09-12T10:46:59
207,312,562
0
0
null
null
null
null
UTF-8
Java
false
false
3,106
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.bian.dto.CRProductOrServiceDeploymentProjectExchangeInputModelProductOrServiceDeploymentProjectExchangeActionRequest; import javax.validation.Valid; /** * BQProductionExchangeInputModel */ public class BQProductionExchangeInputModel { private String productOrServiceDeploymentProjectInstanceReference = null; private String productionInstanceReference = null; private Object productionExchangeActionTaskRecord = null; private CRProductOrServiceDeploymentProjectExchangeInputModelProductOrServiceDeploymentProjectExchangeActionRequest productionExchangeActionRequest = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the parent Product Or Service Deployment Project instance * @return productOrServiceDeploymentProjectInstanceReference **/ public String getProductOrServiceDeploymentProjectInstanceReference() { return productOrServiceDeploymentProjectInstanceReference; } public void setProductOrServiceDeploymentProjectInstanceReference(String productOrServiceDeploymentProjectInstanceReference) { this.productOrServiceDeploymentProjectInstanceReference = productOrServiceDeploymentProjectInstanceReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the Production instance * @return productionInstanceReference **/ public String getProductionInstanceReference() { return productionInstanceReference; } public void setProductionInstanceReference(String productionInstanceReference) { this.productionInstanceReference = productionInstanceReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The exchange service call consolidated processing record * @return productionExchangeActionTaskRecord **/ public Object getProductionExchangeActionTaskRecord() { return productionExchangeActionTaskRecord; } public void setProductionExchangeActionTaskRecord(Object productionExchangeActionTaskRecord) { this.productionExchangeActionTaskRecord = productionExchangeActionTaskRecord; } /** * Get productionExchangeActionRequest * @return productionExchangeActionRequest **/ public CRProductOrServiceDeploymentProjectExchangeInputModelProductOrServiceDeploymentProjectExchangeActionRequest getProductionExchangeActionRequest() { return productionExchangeActionRequest; } public void setProductionExchangeActionRequest(CRProductOrServiceDeploymentProjectExchangeInputModelProductOrServiceDeploymentProjectExchangeActionRequest productionExchangeActionRequest) { this.productionExchangeActionRequest = productionExchangeActionRequest; } }
[ "team1@bian.org" ]
team1@bian.org
4b26ba45eabe4a823457dca7eb76091e3c27c3a8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_a7d9c7c39a69c160d336e5377e969ed8b379474c/DetectorJDialog/20_a7d9c7c39a69c160d336e5377e969ed8b379474c_DetectorJDialog_s.java
da503d455fb3ac072cad7812242d6659366e24a2
[]
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
4,140
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * DetectorJDialog.java * * Created on Feb 14, 2011, 9:48:28 AM */ package org.micromanager.conf; import java.lang.reflect.InvocationTargetException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.SwingUtilities; /** * * @author karlhoover */ public class DetectorJDialog extends javax.swing.JDialog { public boolean CancelRequest(){ return cancelRequest_; } public void ProgressText(final String t){ detectionTextPane_.setText(t); } public String ProgressText(){ return detectionTextPane_.getText(); } private boolean cancelRequest_; /** Creates new form DetectorJDialog */ public DetectorJDialog(java.awt.Dialog parent, boolean modal) { super(parent, modal); initComponents(); cancelRequest_ = false; } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { cancelButton_ = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); detectionTextPane_ = new javax.swing.JTextPane(); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { formComponentShown(evt); } }); cancelButton_.setText("Cancel"); cancelButton_.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButton_ActionPerformed(evt); } }); jScrollPane2.setViewportView(detectionTextPane_); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(cancelButton_) .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(17, 17, 17) .add(cancelButton_) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void cancelButton_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButton_ActionPerformed System.out.print("cancelButton_ActionPerformed"); cancelRequest_ = true; }//GEN-LAST:event_cancelButton_ActionPerformed private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown cancelRequest_ = false; }//GEN-LAST:event_formComponentShown // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cancelButton_; private javax.swing.JTextPane detectionTextPane_; private javax.swing.JScrollPane jScrollPane2; // End of variables declaration//GEN-END:variables }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c1561c61ecfa548572e19e32ef16eec95625e725
df6d22421164340a3c29bb5bce015c9cefbda4f3
/src/hyFlow/edu/vt/rt/hyflow/benchmark/tm/bst2/$HY$_Proxy_Node.java
5211430d0e7be1346f5920de680419146b6c3e85
[]
no_license
junwhan/open_nesting
07926e351634eadc4115c138728df470c096aee9
65df45f7d878b6fbb83e2b8437616f83a45452a4
refs/heads/master
2020-04-21T00:59:02.286663
2014-01-02T02:47:32
2014-01-02T02:47:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,343
java
package edu.vt.rt.hyflow.benchmark.tm.bst2; import java.rmi.RMISecurityManager; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.UnicastRemoteObject; import aleph.comm.Address; import aleph.dir.DirectoryManager; import edu.vt.rt.hyflow.HyFlow; import edu.vt.rt.hyflow.core.dir.control.ControlFlowDirectory; import edu.vt.rt.hyflow.core.tm.control.ControlContext; import edu.vt.rt.hyflow.util.io.Logger; import edu.vt.rt.hyflow.util.network.Network; public class $HY$_Proxy_Node implements $HY$_INode{ private static final long serialVersionUID = 1L; DirectoryManager locator; public $HY$_Proxy_Node() throws RemoteException{ Logger.debug("Creating PROXY"); ((ControlFlowDirectory)HyFlow.getLocator()).addProxy(this); // Install Secrutiy Manager if (System.getSecurityManager() == null) System.setSecurityManager ( new RMISecurityManager() ); // Create objects registery int port = Network.getInstance().getPort()+1000; Registry registry = null; try { Logger.debug("Reg: " + port); registry = LocateRegistry.createRegistry(port); } catch (RemoteException e) { e.printStackTrace(); } // Remove old registered object try { UnicastRemoteObject.unexportObject(this, true); } catch (Exception e) { Logger.error("RMI unexporting"); } $HY$_INode stub = ($HY$_INode) UnicastRemoteObject.exportObject(this, 0); // Bind the remote object's stub in the registry registry.rebind(Node.class.getName(), stub); Logger.debug("RMI stub inited"); locator = HyFlow.getLocator(); } @Override public void setRightChild(Object id, ControlContext context, String rightId){ Address caller = ((ControlContext)context).getLastExecuter(); Network.linkDelay(true, caller); ControlContext.getNeighbors(context.getContextId()).add(caller); ((Node)locator.open(context, id, "w")).setRightChild(rightId, context); } @Override public String getRightChild(Object id, ControlContext context){ Address caller = ((ControlContext)context).getLastExecuter(); Network.linkDelay(true, caller); ControlContext.getNeighbors(context.getContextId()).add(caller); return ((Node)locator.open(context, id, "r")).getRightChild(context); } @Override public void setLeftChild(Object id, ControlContext context, String leftId){ Address caller = ((ControlContext)context).getLastExecuter(); Network.linkDelay(true, caller); ControlContext.getNeighbors(context.getContextId()).add(caller); ((Node)locator.open(context, id, "w")).setLeftChild(leftId, context); } @Override public String getLeftChild(Object id, ControlContext context){ Address caller = ((ControlContext)context).getLastExecuter(); Network.linkDelay(true, caller); ControlContext.getNeighbors(context.getContextId()).add(caller); return ((Node)locator.open(context, id, "r")).getLeftChild(context); } @Override public Integer getValue(Object id, ControlContext context){ Address caller = ((ControlContext)context).getLastExecuter(); Network.linkDelay(true, caller); ControlContext.getNeighbors(context.getContextId()).add(caller); return ((Node)locator.open(context, id, "r")).getValue(context); } }
[ "jkim@gojkim" ]
jkim@gojkim
9959a81042bf111dd24c85626a2f5de7ae77b6aa
02e02d55532d6295b0110e3acdfc31b933d1099d
/ep-bva/src/main/java/training360/epbva/EpBvaApplication.java
6fe2c0103b8ee48e88d0deb57232b18a92a9d090
[]
no_license
Training360/almira
5c73a3adb06552dce6623a37cbd1c84c9d36239c
b3a52ac5b7b2023835b3b77fa57ab3c0a7548a7f
refs/heads/master
2022-12-03T17:42:46.860169
2020-10-08T08:48:44
2020-10-08T08:48:44
110,721,995
1
0
null
2022-11-16T08:56:04
2017-11-14T17:23:32
Rich Text Format
UTF-8
Java
false
false
2,928
java
package training360.epbva; import org.apache.cxf.Bus; import org.apache.cxf.jaxws.EndpointImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import training360.epbva.api.credit.CreditAssessmentEndpoint; import training360.epbva.api.triangle.TriangleEndpoint; import javax.xml.ws.Endpoint; import java.util.ArrayList; import java.util.List; @SpringBootApplication @RestController @RequestMapping("/api/") public class EpBvaApplication { public static void main(String[] args) { SpringApplication.run(EpBvaApplication.class, args); } @Autowired private Bus bus; @RequestMapping("/triangle") public TriangleAnswer triangle(@RequestBody Triangle triangle) { TriangleDecision triangleDecision = new TriangleDecision(); List<String> errors = triangleDecision.validate(triangle.getA(), triangle.getB(), triangle.getC()); if (!errors.isEmpty()) { return TriangleAnswer.error(errors); } else { return TriangleAnswer.typeOf(triangleDecision.calculateType(triangle.getA(), triangle.getB(), triangle.getC())); } } @RequestMapping("/credit-assessment") public CreditAssessmentAnswer creditAssessment(@RequestBody CreditAssessmentRequest creditAssessmentRequest) { CreditAssessment creditAssessment = new CreditAssessment(); List<String> errors = new ArrayList<>(); creditAssessment.isNumber(creditAssessmentRequest.getMortgage(), "jelzáloghitel összege", errors); creditAssessment.isNumber(creditAssessmentRequest.getValueOfTheProperty(), "ingatlan értéke", errors); if (!errors.isEmpty()) { return CreditAssessmentAnswer.error(errors); } int mortgage = Integer.parseInt(creditAssessmentRequest.getMortgage()); int valueOfProperty = Integer.parseInt(creditAssessmentRequest.getValueOfTheProperty()); creditAssessment.validate(mortgage, valueOfProperty, errors); if (!errors.isEmpty()) { return CreditAssessmentAnswer.error(errors); } return CreditAssessmentAnswer.workflowTypeOf(creditAssessment.calculateWorkflowType(mortgage, valueOfProperty)); } @Bean public Endpoint triangleEndpointEndpoint(TriangleEndpoint triangleEndpoint) { EndpointImpl endpoint = new EndpointImpl(bus, triangleEndpoint); endpoint.publish("/triangle"); return endpoint; } @Bean public Endpoint creditAssessmentEndpointEndpoint(CreditAssessmentEndpoint creditAssessmentEndpoint) { EndpointImpl endpoint = new EndpointImpl(bus, creditAssessmentEndpoint); endpoint.publish("/credit-assessment"); return endpoint; } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
042098b812ed75ac0d25d5ed4add05e85c9e15ee
db2c49a189e13554e73713ed2a69ca887a2ad9f0
/org.orbit.component.runtime/src/org/orbit/component/runtime/tier4/missioncontrol/service/MissionControlService.java
6e2c3990031ada25de0c93cf46d2e277658a0e84
[]
no_license
EngineerBarsik/dev
fa501b6ff58e0b6b263d54d6e85c6d69a323f612
81715414de121e1d7cead7d4066d626b095816d6
refs/heads/master
2023-02-11T01:20:29.217287
2021-01-08T01:14:21
2021-01-08T01:14:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
985
java
package org.orbit.component.runtime.tier4.missioncontrol.service; import java.util.List; import org.orbit.component.runtime.model.missioncontrol.Mission; import org.origin.common.jdbc.ConnectionProvider; import org.origin.common.rest.server.ServerException; import org.origin.common.service.AccessTokenProvider; import org.origin.common.service.IWebService; /** * * @author <a href="mailto:yangyang4j@gmail.com">Yang Yang</a> * */ public interface MissionControlService extends IWebService, ConnectionProvider, AccessTokenProvider { List<Mission> getMissions(String typeId) throws ServerException; Mission getMission(String typeId, String name) throws ServerException; Mission createMission(String typeId, String name) throws ServerException; boolean startMission(String typeId, String name) throws ServerException; boolean stopMission(String typeId, String name) throws ServerException; boolean deleteMission(String typeId, String name) throws ServerException; }
[ "yangyang4cs@gmail.com" ]
yangyang4cs@gmail.com
cdcd9d4f11dce3c48e46b66dad5d629f3f0d9eda
440728e853fb55f6c3b947dc811a1417c986fec2
/Game/src/test/java/com/bbz/sanguo/net/GameServerTest.java
9701e17341dc4540574ba9ded61d1ddc8b1b9537
[]
no_license
babizhu/MachineSanGuo
fcfba60d1c9676edc2f6805fae8ca436e918219a
e9801fdabc37e1d3c21c609b1fe4028bb8361b4f
refs/heads/master
2016-09-06T04:10:44.302097
2014-12-31T10:18:03
2014-12-31T10:18:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,341
java
package com.bbz.sanguo.net; import com.bbz.sanguo.lanch.ServerCfg; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import org.junit.Test; public class GameServerTest{ @Test public void testDispatcherChange() throws Exception{ EventLoopGroup worker = new NioEventLoopGroup(); Bootstrap bootstrap = new Bootstrap(); try { bootstrap.group( worker ); bootstrap.channel( NioSocketChannel.class ); // bootstrap.channel( OioSocketChannel.class ); bootstrap.handler( new GameClientInitializer() ); Channel channel = bootstrap.connect( "localhost", ServerCfg.PORT ).sync().channel(); GameClientHandler handler = channel.pipeline().get( GameClientHandler.class ); for( int i = 0; i < 1; i++ ) { handler.missionShow(); handler.login( "bbz", "pass" ); handler.missionShow(); handler.login( "bbz", "pass" ); } } catch( Exception e ) { e.printStackTrace(); } finally { Thread.sleep( 1000000 ); worker.shutdownGracefully(); } } }
[ "liu_kun@msn.com" ]
liu_kun@msn.com
432a39cc744b1269879ce9d12159736bbae79ae4
8a4ad9f611b1067b3358fedb7b5b678d08a69502
/GraphTheory/tests/FloydWarshallSolverTest.java
acc371351f6d6e8a1e65536266189377125b8a79
[ "MIT" ]
permissive
mohdanishh/Algorithms
7686defb3e52589fa968492375c839dd1decdb66
f9ce60de1dcfdde41b39f411c5c2aa04ae0128ff
refs/heads/master
2021-04-26T23:20:39.146968
2018-03-02T05:12:30
2018-03-02T05:12:30
123,976,241
0
1
MIT
2018-03-05T20:42:46
2018-03-05T20:42:46
null
UTF-8
Java
false
false
6,852
java
import static com.google.common.truth.Truth.assertThat; import java.util.*; import org.junit.Before; import org.junit.Test; public class FloydWarshallSolverTest { static final double INF = Double.POSITIVE_INFINITY; static final double NEG_INF = Double.NEGATIVE_INFINITY; static double[][] matrix1, matrix2, matrix3; @Before public void setup() { matrix1 = new double[][] { { 0, INF, INF, INF, INF}, { 1, 0, 7, INF, INF}, {INF, 3, 0, INF, INF}, { 13, INF, 4, 0, INF}, {INF, INF, 3, 0, 0} }; matrix2 = new double[][] { { 0, 3, 1, 8, INF}, { 2, 0, 9, 4, INF}, {INF, INF, 0, INF, -2}, {INF, INF, 1, 0, INF}, {INF, INF, INF, 0, 0} }; matrix3 = new double[][] { { 0, 6, INF, 25, 3}, { 1, 0, 6, 1, 3}, { INF, 1, 0, 2, 3}, { 4, 4, 4, 0, INF}, { 4, 3, 5, INF, 0} }; } private static double[][] createMatrix(int n) { double[][] m = new double[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { m[i][j] = Double.POSITIVE_INFINITY; m[i][i] = 0; } } return m; } private static void addRandomEdges(double[][] matrix, int count, boolean allowNegativeEdges) { int n = matrix.length; while(count-- > 0) { int i = (int)(Math.random() * n); int j = (int)(Math.random() * n); if (i == j) continue; int v = (int)(Math.random() * 100); // Allow negative edges but only very rarely since even one // negative edge can start an avalanche of negative cycles. if (allowNegativeEdges) v = (Math.random() > 0.005) ? v : -v; matrix[i][j] = v; } } @Test public void testDirectedGraph() { FloydWarshallSolver solver = new FloydWarshallSolver(matrix1); double[][] soln = solver.getApspMatrix(); assertThat(soln[0][0]).isEqualTo(0.0); assertThat(soln[1][0]).isEqualTo(1.0); assertThat(soln[1][1]).isEqualTo(0.0); assertThat(soln[1][2]).isEqualTo(7.0); assertThat(soln[2][0]).isEqualTo(4.0); assertThat(soln[2][1]).isEqualTo(3.0); assertThat(soln[2][2]).isEqualTo(0.0); assertThat(soln[3][0]).isEqualTo(8.0); assertThat(soln[3][1]).isEqualTo(7.0); assertThat(soln[3][2]).isEqualTo(4.0); assertThat(soln[3][3]).isEqualTo(0.0); assertThat(soln[4][0]).isEqualTo(7.0); assertThat(soln[4][1]).isEqualTo(6.0); assertThat(soln[4][2]).isEqualTo(3.0); assertThat(soln[4][3]).isEqualTo(0.0); assertThat(soln[4][4]).isEqualTo(0.0); } @Test public void testNegativeCycleGraph() { FloydWarshallSolver solver = new FloydWarshallSolver(matrix2); double[][] soln = solver.getApspMatrix(); assertThat(soln[0][0]).isEqualTo(0.0); assertThat(soln[0][1]).isEqualTo(3.0); assertThat(soln[0][2]).isEqualTo(NEG_INF); assertThat(soln[0][3]).isEqualTo(NEG_INF); assertThat(soln[0][4]).isEqualTo(NEG_INF); assertThat(soln[1][0]).isEqualTo(2.0); assertThat(soln[1][1]).isEqualTo(0.0); assertThat(soln[1][2]).isEqualTo(NEG_INF); assertThat(soln[1][3]).isEqualTo(NEG_INF); assertThat(soln[1][4]).isEqualTo(NEG_INF); assertThat(soln[2][2]).isEqualTo(NEG_INF); assertThat(soln[2][3]).isEqualTo(NEG_INF); assertThat(soln[2][4]).isEqualTo(NEG_INF); assertThat(soln[3][2]).isEqualTo(NEG_INF); assertThat(soln[3][3]).isEqualTo(NEG_INF); assertThat(soln[3][4]).isEqualTo(NEG_INF); assertThat(soln[4][2]).isEqualTo(NEG_INF); assertThat(soln[4][3]).isEqualTo(NEG_INF); assertThat(soln[4][4]).isEqualTo(NEG_INF); } @Test public void testApspAgainstBellmanFord_nonNegativeEdgeWeights() { final int TRAILS = 10; for (int n = 2; n <= 25; n++) { for (int trail = 1; trail <= TRAILS; trail++) { double[][] m = createMatrix(n); int numRandomEdges = Math.max(1, (int)(Math.random()*n*n)); addRandomEdges(m, numRandomEdges, false); double[][] fw = new FloydWarshallSolver(m).getApspMatrix(); for (int s = 0; s < n; s++) { double[] bf = new BellmanFordAdjacencyMatrix(s, m).getShortestPaths(); assertThat(bf).isEqualTo(fw[s]); } } } } @Test public void testApspAgainstBellmanFord_withNegativeEdgeWeights() { final int TRAILS = 10; for (int n = 2; n <= 25; n++) { for (int trail = 1; trail <= TRAILS; trail++) { double[][] m = createMatrix(n); int numRandomEdges = Math.max(1, (int)(Math.random()*n*n)); addRandomEdges(m, numRandomEdges, true); double[][] fw = new FloydWarshallSolver(m).getApspMatrix(); for (int s = 0; s < n; s++) { double[] bf = new BellmanFordAdjacencyMatrix(s, m).getShortestPaths(); assertThat(bf).isEqualTo(fw[s]); } } } } // Tests for a mismatch in how both algorithms detect the existence of // a negative cycle on the shortest path from s -> e. @Test public void testPathReconstructionBellmanFord_nonNegativeEdgeWeights() { final int TRAILS = 50; for (int n = 2; n <= 25; n++) { for (int trail = 1; trail <= TRAILS; trail++) { double[][] m = createMatrix(n); int numRandomEdges = Math.max(1, (int)(Math.random()*n*n)); addRandomEdges(m, numRandomEdges, true); FloydWarshallSolver fwSolver = new FloydWarshallSolver(m); fwSolver.solve(); for (int s = 0; s < n; s++) { BellmanFordAdjacencyMatrix bfSolver = new BellmanFordAdjacencyMatrix(s, m); for (int e = 0; e < n; e++) { // Make sure that if 'fwp' returns null that 'bfp' also returns null or // that if 'fwp' is not null that 'bfp' is also not null. List<Integer> fwp = fwSolver.reconstructShortestPath(s, e); List<Integer> bfp = bfSolver.reconstructShortestPath(e); if ((fwp == null) ^ (bfp == null)) { org.junit.Assert.fail("Mismatch."); } } } } } } @Test public void testSimpleNegativeCycleDetection() { int n = 3, s = 0, e = 2; double[][] m = createMatrix(n); m[0][1] = 100; m[0][2] = 5; m[1][2] = 0; m[1][1] = -1; // negative self loop. FloydWarshallSolver fw = new FloydWarshallSolver(m); List<Integer> fwPath = fw.reconstructShortestPath(s, e); assertThat(fwPath).isNull(); } @Test public void testNegativeCyclePropagation() { int n = 100, s = 0, e = n-1; double[][] m = createMatrix(n); for(int i = 1; i < n; i++) m[i-1][i] = 10; m[1][0] = -11; FloydWarshallSolver fw = new FloydWarshallSolver(m); List<Integer> fwPath = fw.reconstructShortestPath(s, e); assertThat(fwPath).isNull(); } }
[ "fisetwill@gmail.com" ]
fisetwill@gmail.com
317aadfa4b1e5c82e30cd8b35c66239f3173afcb
5cefafafa516d374fd600caa54956a1de7e4ce7d
/oasis/web/OasisTags/src/java/dti/oasis/ows/util/impl/FilterViewElementDependencyImpl.java
c9cb2ef5a1b27ea4cb00c7e3f4069e11acf06e42
[]
no_license
TrellixVulnTeam/demo_L223
18c641c1d842c5c6a47e949595b5f507daa4aa55
87c9ece01ebdd918343ff0c119e9c462ad069a81
refs/heads/master
2023-03-16T00:32:08.023444
2019-04-08T15:46:48
2019-04-08T15:46:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,153
java
package dti.oasis.ows.util.impl; import dti.oasis.ows.util.FilterViewElement; import dti.oasis.ows.util.FilterViewElementDependency; import dti.oasis.util.LogUtils; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; /** * <p>(C) 2003 Delphi Technology, inc. (dti)</p> * Date: 4/19/2017 * * @author kshen */ /* * * Revision Date Revised By Description * --------------------------------------------------- * * --------------------------------------------------- */ public class FilterViewElementDependencyImpl implements FilterViewElementDependency { private final Logger l = LogUtils.getLogger(getClass()); public FilterViewElementDependencyImpl(String category) { m_category = category; m_elementDependencyMap = new HashMap<FilterViewElement, Set<FilterViewElement>>(); } @Override public Set<FilterViewElement> getDependencyElements(String filterType, String elementName) { if (l.isLoggable(Level.FINER)) { l.entering(getClass().getName(), "getDependencyElements", new Object[]{filterType, elementName}); } FilterViewElement filterViewElement = new FilterViewElement(filterType, elementName); Set<FilterViewElement> filterViewElements = m_elementDependencyMap.get(filterViewElement); if (l.isLoggable(Level.FINER)) { l.exiting(getClass().getName(), "getDependencyElements", filterViewElements); } return filterViewElements; } @Override public String getCategory() { return m_category; } public void setCategory(String category) { m_category = category; } public Map<FilterViewElement, Set<FilterViewElement>> getElementDependencyMap() { return m_elementDependencyMap; } public void setElementDependencyMap(Map<FilterViewElement, Set<FilterViewElement>> elementDependencyMap) { m_elementDependencyMap = elementDependencyMap; } private String m_category; private Map<FilterViewElement, Set<FilterViewElement>> m_elementDependencyMap; }
[ "athidevwork@gmail.com" ]
athidevwork@gmail.com
a241b380144bf7872c253d3d18383c8a486b7124
ee2a51f827fd337e6dbb9b018f62cacd8e6399da
/Ch_2_5_Applications/Practise_2_5_01.java
c1ff5da590f615830767853830946d9c741955b5
[]
no_license
pengzhetech/Algorithms
97eab98283575fdef46ad06549dcb29993bea132
c379ff6de3a10dfb1818e84a9ea2516876958288
refs/heads/master
2022-08-16T18:04:59.992353
2022-07-21T16:17:42
2022-07-21T16:17:42
261,119,609
0
0
null
2020-05-04T08:31:22
2020-05-04T08:31:21
null
UTF-8
Java
false
false
293
java
package Ch_2_5_Applications; public class Practise_2_5_01 { public static void main(String[] args) { /* * 如果内存地址相等,那么这两个字符串肯定相等,因此无需比较 * 这样避免了多余的比较操作 * */ } }
[ "yangxiaohei321123@163.com" ]
yangxiaohei321123@163.com
82364d4c58b98cb4d488f20044d1a64b29593676
ab6c0bc74dff2b522618ae4192b63ca879f3d07a
/utp-trade-ht/utp-sdk/utp-sdk-precard/src/main/java/cn/kingnet/utp/sdk/precard/dto/DownloadIndustryReconcileFileReqDTO.java
db0a454b0116bd16e802625053682ac9d70454de
[]
no_license
exyangbang/learngit
9669cb329c9686db96bd250a6ceceaf44f02e945
12c92df41a6b778a9db132c37dd136bedfd5b56f
refs/heads/master
2023-02-16T20:49:57.437363
2021-01-16T07:45:17
2021-01-16T07:45:17
330,107,905
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package cn.kingnet.utp.sdk.precard.dto; import cn.kingnet.utp.sdk.core.dto.BaseRequestDTO; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; /** * @Description * @Author WJH * @Date 2018年11月07日 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class DownloadIndustryReconcileFileReqDTO extends BaseRequestDTO { /** * 源文件清算日期对账日期 */ private String settleDate; }
[ "945288603@qq.com" ]
945288603@qq.com
fd87343d4077b50718dc65bf96fb2b448e9b123d
bc7370cfb5ccc61072444d1dde0701abb7640cb2
/lhitf/src/private/nc/bs/lhitf/bgtask/AutoTransBankAccBgTaskPlugin.java
ef98516f6e23f63438e60bdd5c5a607c48bbdce5
[]
no_license
guowj1/lhprj
a4cf6f715d864a17dcef656cee02965c223777f2
70b5e6fabddeaf1db026591d817f0eab91704b58
refs/heads/master
2021-01-01T19:53:53.324175
2017-09-25T09:14:17
2017-09-25T09:14:17
98,713,984
0
0
null
null
null
null
UTF-8
Java
false
false
1,456
java
package nc.bs.lhitf.bgtask; import nc.bs.lhitf.bgtask.pub.PostDataImp; import nc.bs.pub.pa.PreAlertObject; import nc.bs.pub.taskcenter.BgWorkingContext; import nc.bs.pub.taskcenter.IBackgroundWorkPlugin; import nc.md.persist.framework.IMDPersistenceQueryService; import nc.md.persist.framework.MDPersistenceService; import nc.vo.bd.bankaccount.BankAccbasVO; import nc.vo.pub.BusinessException; public class AutoTransBankAccBgTaskPlugin implements IBackgroundWorkPlugin { private IMDPersistenceQueryService mdQueryService; @Override public PreAlertObject executeTask(BgWorkingContext arg0) throws BusinessException { BankAccbasVO[] vos = null; vos = (BankAccbasVO[]) getMdQueryService().queryBillOfVOByCond( // BankAccbasVO.class, " (def2='~' or def2 is null or def2<ts) and def1='1001A6100000000000XU' ", BankAccbasVO.class, " (def2='~' or def2 is null) and def1='1001A6100000000000XU' ", false).toArray(new BankAccbasVO[0]); if (vos == null || vos.length < 1) { return null; } try { PostDataImp postServ = new PostDataImp(); postServ.sendDataByStr(vos, "bankaccbas"); } catch (Exception e) { throw new BusinessException(e.getMessage()); } return null; } private IMDPersistenceQueryService getMdQueryService() { if (mdQueryService == null) mdQueryService = MDPersistenceService .lookupPersistenceQueryService(); return mdQueryService; } }
[ "guowenjialy@163.com" ]
guowenjialy@163.com
30e7fc97ccff4c60faca9d14c33cafc6f5854256
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController154.java
5d282cb13029bb642daf783a9b915265e10e20a3
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
368
java
package syncregions; public class TemperatureController154 { public int execute(int temperature154, int targetTemperature154) { //sync _bfpnFUbFEeqXnfGWlV2154, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
9a08da59ecd3dce77ea409f541b73d1058878345
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Moves/Spike_Cannon.java
d6073c2c5480ebdd5db1d6b69c2de0a43d2020b6
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package PTUCharacterCreator.Moves; import PTUCharacterCreator.Move; public class Spike_Cannon extends Move { { name = "Spike Cannon"; effect = "--"; damageBase = 3; mDamageBase = 3; AC = 4; frequency = "EOT"; range = "6, 1 Target, Five Strike"; type = "Normal"; category = "Physical"; } public Spike_Cannon(){} }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
c85701054bf552566ff6b75b9e94b0789e45e041
a1e49f5edd122b211bace752b5fb1bd5c970696b
/projects/org.springframework.beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java
7c979316666fbfbe276f7e9e63422bc13926702b
[ "Apache-2.0" ]
permissive
savster97/springframework-3.0.5
4f86467e2456e5e0652de9f846f0eaefc3214cfa
34cffc70e25233ed97e2ddd24265ea20f5f88957
refs/heads/master
2020-04-26T08:48:34.978350
2019-01-22T14:45:38
2019-01-22T14:45:38
173,434,995
0
0
Apache-2.0
2019-03-02T10:37:13
2019-03-02T10:37:12
null
UTF-8
Java
false
false
7,613
java
/* * Copyright 2002-2009 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.beans.factory.xml; import junit.framework.Assert; import junit.framework.TestCase; import test.beans.TestBean; import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.io.ClassPathResource; /** * @author Rob Harrop * @author Juergen Hoeller */ public class AutowireWithExclusionTests extends TestCase { public void testByTypeAutowireWithAutoSelfExclusion() throws Exception { CountingFactory.reset(); XmlBeanFactory beanFactory = getBeanFactory("autowire-with-exclusion.xml"); beanFactory.preInstantiateSingletons(); TestBean rob = (TestBean) beanFactory.getBean("rob"); TestBean sally = (TestBean) beanFactory.getBean("sally"); assertEquals(sally, rob.getSpouse()); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithExclusion() throws Exception { CountingFactory.reset(); XmlBeanFactory beanFactory = getBeanFactory("autowire-with-exclusion.xml"); beanFactory.preInstantiateSingletons(); TestBean rob = (TestBean) beanFactory.getBean("rob"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithExclusionInParentFactory() throws Exception { CountingFactory.reset(); XmlBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class, RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithPrimaryInParentFactory() throws Exception { CountingFactory.reset(); XmlBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class, RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithPrimaryOverridingParentFactory() throws Exception { CountingFactory.reset(); XmlBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class, RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithPrimaryInParentAndChild() throws Exception { CountingFactory.reset(); XmlBeanFactory parent = getBeanFactory("autowire-with-exclusion.xml"); parent.getBeanDefinition("props1").setPrimary(true); parent.preInstantiateSingletons(); DefaultListableBeanFactory child = new DefaultListableBeanFactory(parent); RootBeanDefinition robDef = new RootBeanDefinition(TestBean.class, RootBeanDefinition.AUTOWIRE_BY_TYPE); robDef.getPropertyValues().add("spouse", new RuntimeBeanReference("sally")); child.registerBeanDefinition("rob2", robDef); RootBeanDefinition propsDef = new RootBeanDefinition(PropertiesFactoryBean.class); propsDef.getPropertyValues().add("properties", "name=props3"); propsDef.setPrimary(true); child.registerBeanDefinition("props3", propsDef); TestBean rob = (TestBean) child.getBean("rob2"); assertEquals("props3", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithInclusion() throws Exception { CountingFactory.reset(); XmlBeanFactory beanFactory = getBeanFactory("autowire-with-inclusion.xml"); beanFactory.preInstantiateSingletons(); TestBean rob = (TestBean) beanFactory.getBean("rob"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testByTypeAutowireWithSelectiveInclusion() throws Exception { CountingFactory.reset(); XmlBeanFactory beanFactory = getBeanFactory("autowire-with-selective-inclusion.xml"); beanFactory.preInstantiateSingletons(); TestBean rob = (TestBean) beanFactory.getBean("rob"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); Assert.assertEquals(1, CountingFactory.getFactoryBeanInstanceCount()); } public void testConstructorAutowireWithAutoSelfExclusion() throws Exception { XmlBeanFactory beanFactory = getBeanFactory("autowire-constructor-with-exclusion.xml"); TestBean rob = (TestBean) beanFactory.getBean("rob"); TestBean sally = (TestBean) beanFactory.getBean("sally"); assertEquals(sally, rob.getSpouse()); TestBean rob2 = (TestBean) beanFactory.getBean("rob"); assertEquals(rob, rob2); assertNotSame(rob, rob2); assertEquals(rob.getSpouse(), rob2.getSpouse()); assertNotSame(rob.getSpouse(), rob2.getSpouse()); } public void testConstructorAutowireWithExclusion() throws Exception { XmlBeanFactory beanFactory = getBeanFactory("autowire-constructor-with-exclusion.xml"); TestBean rob = (TestBean) beanFactory.getBean("rob"); assertEquals("props1", rob.getSomeProperties().getProperty("name")); } private XmlBeanFactory getBeanFactory(String configPath) { return new XmlBeanFactory(new ClassPathResource(configPath, getClass())); } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
04e5fec2162b07e460ac27f81b59e6c3fade69ba
fcd28e246e059e5305ee89931ce7d81edddf8057
/camera/java/camera/logevent_notReadyToTakeImageDataReaderHelper.java
8509bad1f79f815d9fcf26138f200670e6ae84d9
[]
no_license
lsst-ts/ts_sal_runtime
56e396cb42f1204595f9bcdb3a2538007c0befc6
ae918e6f2b73f2ed7a8201bf3a79aca8fb5b36ef
refs/heads/main
2021-12-21T02:40:37.628618
2017-09-14T18:06:48
2017-09-14T18:06:49
145,469,981
0
0
null
null
null
null
UTF-8
Java
false
false
991
java
package camera; import org.opensplice.dds.dcps.Utilities; public final class logevent_notReadyToTakeImageDataReaderHelper { public static camera.logevent_notReadyToTakeImageDataReader narrow(java.lang.Object obj) { if (obj == null) { return null; } else if (obj instanceof camera.logevent_notReadyToTakeImageDataReader) { return (camera.logevent_notReadyToTakeImageDataReader)obj; } else { throw Utilities.createException(Utilities.EXCEPTION_TYPE_BAD_PARAM, null); } } public static camera.logevent_notReadyToTakeImageDataReader unchecked_narrow(java.lang.Object obj) { if (obj == null) { return null; } else if (obj instanceof camera.logevent_notReadyToTakeImageDataReader) { return (camera.logevent_notReadyToTakeImageDataReader)obj; } else { throw Utilities.createException(Utilities.EXCEPTION_TYPE_BAD_PARAM, null); } } }
[ "DMills@lsst.org" ]
DMills@lsst.org
6e9a7dcd96e33cb235c1e055cfac3cefb9209142
173b64b558857daba1f5f11b6f779aaeb1638e71
/src/main/java/ru/butakov/survey/domain/User.java
9af016a97398272c49df9b35c18cb56b757967df
[]
no_license
mello1984/survey
e9aaad582d05908c4f5c4790a1f5cbe5dcf46caf
25f8c30a36cd05761661380769af5300b83684a4
refs/heads/master
2023-06-19T05:46:59.017689
2021-07-07T09:32:56
2021-07-07T09:32:56
378,266,460
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package ru.butakov.survey.domain; import lombok.*; import lombok.experimental.FieldDefaults; @Data @NoArgsConstructor @AllArgsConstructor @Builder @FieldDefaults(level = AccessLevel.PRIVATE) public class User { String username; }
[ "abutakov84@gmail.com" ]
abutakov84@gmail.com
fb84fed979c900a0f518d5e798b4611a7ccee1d9
a157f0f34ed886bfc9f25454814ef164062f7498
/nodecore-ucp/src/main/java/nodecore/api/ucp/commands/server/MiningSubscribe.java
e631b0b05077dd0ef2b047998ea1497c0f22c3b0
[ "MIT" ]
permissive
xagau/nodecore
d49ea1e6f4835d2fad39d547dfa119cd98240b3c
282f03b4296e71432b183bdfb38d066bc0f575e0
refs/heads/master
2022-12-11T08:28:23.312115
2020-02-24T19:30:18
2020-02-24T19:30:18
257,342,239
0
0
NOASSERTION
2020-04-20T16:35:11
2020-04-20T16:35:10
null
UTF-8
Java
false
false
2,937
java
// VeriBlock NodeCore // Copyright 2017-2019 Xenios SEZC // All rights reserved. // https://www.veriblock.org // Distributed under the MIT software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. package nodecore.api.ucp.commands.server; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import nodecore.api.ucp.arguments.UCPArgument; import nodecore.api.ucp.arguments.UCPArgumentFrequencyMS; import nodecore.api.ucp.arguments.UCPArgumentRequestID; import nodecore.api.ucp.commands.UCPCommand; import nodecore.api.ucp.commands.UCPServerCommand; import org.veriblock.core.types.Pair; import java.util.ArrayList; public class MiningSubscribe extends UCPServerCommand { private final UCPCommand.Command command = Command.MINING_SUBSCRIBE; // Not static for serialization purposes // Required private final UCPArgumentRequestID request_id; private final UCPArgumentFrequencyMS update_frequency_ms; public MiningSubscribe(UCPArgument ... arguments) { ArrayList<Pair<String, UCPArgument.UCPType>> pattern = command.getPattern(); if (arguments.length != pattern.size()) { throw new IllegalArgumentException(getClass().getCanonicalName() + "'s constructor cannot be called without exactly " + pattern.size() + " UCPArguments!"); } for (int i = 0; i < pattern.size(); i++) { if (arguments[i].getType() != pattern.get(i).getSecond()) { throw new IllegalArgumentException(getClass().getCanonicalName() + "'s constructor cannot be called with a argument at index " + i + " which is a " + arguments[i].getType() + " instead of a " + pattern.get(i).getSecond() + "!"); } } this.request_id = (UCPArgumentRequestID)arguments[0]; this.update_frequency_ms = (UCPArgumentFrequencyMS)arguments[1]; } public MiningSubscribe(int request_id, int update_frequency_ms) { this.request_id = new UCPArgumentRequestID(request_id); this.update_frequency_ms = new UCPArgumentFrequencyMS(update_frequency_ms); } public static MiningSubscribe reconstitute(String commandLine) { if (commandLine == null) { throw new IllegalArgumentException(new Exception().getStackTrace()[0].getClassName() + "'s reconstitute cannot be called with a null commandLine!"); } GsonBuilder deserializer = new GsonBuilder(); deserializer.registerTypeAdapter(MiningSubscribe.class, new MiningSubscribeDeserializer()); return deserializer.create().fromJson(commandLine, MiningSubscribe.class); } public int getRequestId() { return request_id.getData(); } public int getUpdateFrequencyMS() { return update_frequency_ms.getData(); } public String compileCommand() { return new Gson().toJson(this); } }
[ "JoshuaRack@gmail.com" ]
JoshuaRack@gmail.com
cf171dafeacfbc637330e91536fbe387705e4707
472d7820a5f5d9d5ab2ec150eab0c9bdeb2008c7
/Aries/Sodi/dis/disEnumerations/EntityAppearancePlatformPowerPlantStatusField_1.java
871663be0230ac7180c48936a7eae299f0690670
[]
no_license
slacker247/GPDA
1ad5ebe0bea4528d9a3472d3c34580648ffb670e
fa9006d0877a691f1ddffe88799c844a3e8a669a
refs/heads/master
2022-10-08T07:39:09.786313
2020-06-10T22:22:58
2020-06-10T22:22:58
105,063,261
2
0
null
null
null
null
UTF-8
Java
false
false
4,372
java
/* File: EntityAppearancePlatformPowerPlantStatusField.java CVS Info: $Id$ Compiler: jdk 1.2.2 */ package disEnumerations; import mil.navy.nps.dis.*; import mil.navy.nps.util.*; /** * Entity Appearance Platform Power-Plant Status Field -- Describes the power-plant status of a platform *@version 1.1 *@author Ronan Fauglas *@author <a href="mailto:brutzman@nps.navy.mil?subject=dis-java-vrml: disEnumerations.EntityAppearancePlatformPowerPlantStatusField feedback ">Don Brutzman</a> * *<dt><b>References:</b> *<dd> DIS Data Dictionary: <A href="../../../../../../mil/navy/nps/disEnumerations/JdbeHtmlFiles/pdu/49.htm">Entity Appearance Platform Power-Plant Status Field</A> (local) * <A href="http://SISO.sc.ist.ucf.edu/dis/dis-dd/pdu/49.htm">Entity Appearance Platform Power-Plant Status Field</A> (SISO) *<dd> JDBE:<a href="http://208.145.129.4/jdbe/proj/dis_cd/dis-dd/">DIS Data Dictionary Version 1.0a (DIS-DD)</A> *<dd> Perl script (converting html enumerations to java enumerations) * <A href="../../../../../../mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl"><i>convertJdbeDisEnumerationsToJava.pl</i></A> (local) or * <A href="http://web.3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl"> * <i>http://web.3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl</i></A> *<dd> "Named Constants," <i>The Java Programming Language</i>, Gosling & Arnold. * *<dt><b>Explanation:</b> *<dd>This file has been automatically generated from a local copy of the * <A href="../../../../../../mil/navy/nps/disEnumerations/JdbeHtmlFiles/dis-dd.html">DIS Data Dictionary</A> at * <A href="http://SISO.sc.ist.ucf.edu/dis/dis-dd/">http://SISO.sc.ist.ucf.edu/dis/dis-dd/</A> * html source file by * <A href="../../../../../../mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl">convertJdbeDisEnumerationsToJava.pl</a> (local) or * <A href="http://www.web3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl">http://www.web3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/convertJdbeDisEnumerationsToJava.pl</a>. * <P> * This is effectively a C-style enumeration. Java doesn't do enumerations * like C, so you have to wrap a class around it. It's a bit more typing, * but pretty simple-minded. * Note that the variables are declared public. The default for access * is package-wide, but these variables might need to be accessed from * outside the package. Since all the variables are final (i.e. constant), nobody can * change anything anyway, so this is no biggie.<p> * To use these enumerations in your Java code, import the package first: * <b><PRE>import mil.navy.nps.disEnumerations.*;</PRE></b> * You access this via something like <b><code>EntityAppearancePlatformPowerPlantStatusField.POWERPLANTON</code></b>, i.e. combine * the class name, a period, and a class variable (enumeration) name.<P> * *<dt><b>History:</b> *<dd> 21jan98 /Ronan Fauglas /New *<dd> 30mar99 /Don Brutzman /Revised Javadoc, many more enumeration classes * *<dt><b>Location:</b> *<dd><a href="../../../../../../mil/navy/nps/disEnumerations/EntityAppearancePlatformPowerPlantStatusField.java"><i>EntityAppearancePlatformPowerPlantStatusField.java</i></A> (local) *<dd><a href="http://www.web3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/EntityAppearancePlatformPowerPlantStatusField.java"> * <i>http://www.web3D.org/WorkingGroups/vrtp/mil/navy/nps/disEnumerations/EntityAppearancePlatformPowerPlantStatusField.java</i></a> * */ public class EntityAppearancePlatformPowerPlantStatusField_1 extends Object { /** *(0) Power Plant Off */ public static final short POWERPLANTOFF = 0; /** *(1) Power Plant On */ public static final short POWERPLANTON = 1; /** * Returns a string containing the enumeration name which corresponds to an enumeration value, * as in <b><code>EntityAppearancePlatformPowerPlantStatusField.toString (0)</code></b> returns the string "<b><code>POWERPLANTOFF</code></b>" */ public static String toString(int idNumber) { switch (idNumber) { case 0: return "Power Plant Off"; case 1: return "Power Plant On"; default : return ""; } }//end of toString }//End of class
[ "jeffmac710@gmail.com" ]
jeffmac710@gmail.com
6537d0b6179b9d4882bf4da8feae3658fb36a1c7
e3dc5dd135b3f1a2be1130e97292eea14bb904e7
/src/JavaOOP/Lesson2/encapsulation/_1_without_encapsulation/Person.java
ae9f92df6fa14781c32ba426587a856e75e9b8cd
[]
no_license
AnatoliyDeveloper/JavaProg
51fd1d626d2e0879542905ffa88c548cdef48308
daa7e335471451f9b55a99de79cb29f13c01f4c0
refs/heads/master
2020-07-30T20:28:11.918200
2016-11-19T11:01:49
2016-11-19T11:01:57
73,621,142
0
0
null
null
null
null
UTF-8
Java
false
false
169
java
package ua.kiev.prog.javaoop.encapsulation._1_without_encapsulation; /** * @author Bohdan Vanchuhov */ public class Person { String name; // field int age; }
[ "sheroryaru@gmail.com" ]
sheroryaru@gmail.com
2db2df83f43921498b83dc395de39e60803a686f
8f4788ac46f7628509478a3dc7099058ae70d07a
/org-netbeans-api-visualfx/src/test/java/test/lod/LevelOfDetailsTest.java
8f33fe15594d42c5cde42bd97bfed407d061fc7f
[]
no_license
theanuradha/visual-library-fx
8cc29d066f06ad4073b5db91b98bca46587c7683
03b40eca1d7e3d57eeda3dc7a59cc2e936d4a942
refs/heads/master
2021-06-24T05:42:44.100965
2020-10-30T11:01:41
2020-10-30T11:01:41
90,547,495
12
1
null
2020-10-30T11:01:42
2017-05-07T16:50:24
Java
UTF-8
Java
false
false
3,637
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 http://www.netbeans.org/cddl.html * or http://www.netbeans.org/cddl.txt. * * When distributing Covered Code, include this CDDL Header Notice in each file * and include the License file at http://www.netbeans.org/cddl.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]" * * The Original Software is NetBeans. The Initial Developer of the Original * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun * Microsystems, Inc. All Rights Reserved. */ package test.lod; import java.awt.Color; import org.netbeans.api.visual.action.ActionFactory; import org.netbeans.api.visual.action.TwoStateHoverProvider; import org.netbeans.api.visual.action.WidgetAction; import org.netbeans.api.visual.border.BorderFactory; import org.netbeans.api.visual.layout.LayoutFactory; import org.netbeans.api.visual.widget.LabelWidget; import org.netbeans.api.visual.widget.LevelOfDetailsWidget; import org.netbeans.api.visual.widget.Scene; import org.netbeans.api.visual.widget.Widget; import test.SceneSupport; /** * @author David Kaspar */ public class LevelOfDetailsTest { public static void main(String[] args) { Scene scene = new Scene(); scene.setZoomFactor(0.2); scene.setLayout(LayoutFactory.createVerticalFlowLayout(LayoutFactory.SerialAlignment.LEFT_TOP, 0)); scene.getActions().addAction(ActionFactory.createZoomAction(1.1, false)); scene.getActions().addAction(ActionFactory.createPanAction()); WidgetAction hover = ActionFactory.createHoverAction(new TwoStateHoverProvider() { public void setHovering(Widget widget) { widget.setOpaque(true); widget.setBackground(Color.GREEN); } public void unsetHovering(Widget widget) { widget.setOpaque(false); widget.setBackground(Color.WHITE); } }); scene.getActions().addAction(hover); scene.addChild(createLabel(scene, "Use mouse-wheel for zooming, use middle button for panning.", 72)); scene.addChild(createLabel(scene, "For more details zoom into the rectangle below.", 72)); Widget root = new LevelOfDetailsWidget(scene, 0.21, 0.3, Double.MAX_VALUE, Double.MAX_VALUE); root.setBorder(BorderFactory.createLineBorder(10)); root.setLayout(LayoutFactory.createVerticalFlowLayout(LayoutFactory.SerialAlignment.JUSTIFY, 4)); scene.addChild(root); for (int a = 0; a < 10; a++) { root.addChild(createLabel(scene, "Row: " + a, 36)); Widget row = new LevelOfDetailsWidget(scene, 0.3, 0.5, Double.MAX_VALUE, Double.MAX_VALUE); row.setBorder(BorderFactory.createLineBorder(4)); row.setLayout(LayoutFactory.createHorizontalFlowLayout(LayoutFactory.SerialAlignment.JUSTIFY, 4)); row.getActions().addAction(hover); root.addChild(row); for (int b = 0; b < 20; b++) { Widget item = new LevelOfDetailsWidget(scene, 0.5, 1.0, Double.MAX_VALUE, Double.MAX_VALUE); item.setBorder(BorderFactory.createLineBorder(2)); item.addChild(createLabel(scene, "Item-" + a + "," + b, 18)); item.getActions().addAction(hover); row.addChild(item); } } SceneSupport.show(scene); } private static Widget createLabel(Scene scene, String text, int size) { LabelWidget label = new LabelWidget(scene, text); label.setFont(scene.getDefaultFont().deriveFont((float) size)); return label; } }
[ "theanuradha@gmail.com" ]
theanuradha@gmail.com
132ec1d733a45fb9b9c38b7246264875b19c9bec
88b3628394c545c30e00c23402a4c05449d73cf2
/javaConcurrentInPractice/src/main/java/net/jcip/examples/_11_performanceAndScalability/WorkerThread.java
cf03075d8c4033753e6941a812a4c3493fadc5a7
[]
no_license
cyhbyw/ProjectA
42d61d1696978606592a9ec4e9fb17988fe6c2cd
688c62460e5b828618fbe9b346d1f2cba5f1b4b8
refs/heads/master
2022-07-26T13:07:27.971783
2021-03-26T02:09:09
2021-03-26T02:09:09
119,479,548
1
2
null
2022-06-29T17:02:51
2018-01-30T03:54:37
Java
UTF-8
Java
false
false
668
java
package net.jcip.examples._11_performanceAndScalability; import java.util.concurrent.BlockingQueue; /** * WorkerThread * <p/> * Serialized access to a task queue * * @author Brian Goetz and Tim Peierls */ public class WorkerThread extends Thread { private final BlockingQueue<Runnable> queue; public WorkerThread(BlockingQueue<Runnable> queue) { this.queue = queue; } public void run() { while (true) { try { Runnable task = queue.take(); task.run(); } catch (InterruptedException e) { break; /* Allow thread to exit */ } } } }
[ "swust2009cyh@qq.com" ]
swust2009cyh@qq.com
93a3b4fb89198ad592bbd7e72bd05455e7ec1c97
a422de59c29d077c512d66b538ff17d179cc077a
/hsxt/hsxt-access/hsxt-access-web/hsxt-access-web-mcs/src/main/java/com/gy/hsxt/access/web/mcs/services/systemmanage/OperatorService.java
89ac208352c8b1297afe1ffa8bc7ca033be062d4
[]
no_license
liveqmock/hsxt
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
refs/heads/master
2020-03-28T14:09:31.939168
2018-09-12T10:20:46
2018-09-12T10:20:46
148,461,898
0
0
null
2018-09-12T10:19:11
2018-09-12T10:19:10
null
UTF-8
Java
false
false
2,315
java
/* * Copyright (c) 2015-2018 SHENZHEN GUIYI SCIENCE AND TECHNOLOGY DEVELOP CO., LTD. All rights reserved. * * 注意:本内容仅限于深圳市归一科技研发有限公司内部传阅,禁止外泄以及用于其他的商业目的 */ package com.gy.hsxt.access.web.mcs.services.systemmanage; import java.util.List; import java.util.Map; import com.gy.hsxt.access.web.bean.MCSBase; import com.gy.hsxt.access.web.common.service.IBaseService; import com.gy.hsxt.common.exception.HsException; import com.gy.hsxt.tm.bean.Group; import com.gy.hsxt.uc.as.bean.operator.AsOperator; /** * * 操作员管理服务 * @Package: com.gy.hsxt.access.web.mcs.services.systemmanage * @ClassName: OperatorService * @Description: TODO * * @author: zhangcy * @date: 2016-1-9 下午12:12:30 * @version V1.0 */ @SuppressWarnings("rawtypes") public interface OperatorService extends IBaseService{ /** * 添加操作员 * @param oper * @param adminCustId * @throws HsException */ public String addOper(AsOperator oper, String adminCustId ,List<Long> groupIds) throws HsException; /** * 查询操作员 * @param operCustId * @return * @throws HsException */ public AsOperator searchOperByCustId (String operCustId) throws HsException; /** * 查询企业操作员列表 * @param entCustId * @return * @throws HsException */ public List<AsOperator> listOperByEntCustId(String entCustId) throws HsException; /** * 修改企业操作员信息 * @param oper * @param adminCustId * @throws HsException */ public void updateOper (AsOperator oper, String adminCustId,List<Long> groupIds) throws HsException; /** * 删除操作员 * @param operCustId * @param adminCustId * @throws HsException */ public void deleteOper (String operCustId, String adminCustId) throws HsException; /** * 获取操作员详情 * @param mcsBase * @return */ public Map<String, Object> getOperatorDetail(MCSBase mcsBase); /** * 查询所有工单分组及分组下的所有操作员 * @param entCustId * @return */ public List<Group> findTaskGroupInfo(String entCustId); }
[ "864201042@qq.com" ]
864201042@qq.com
ecab7695f4d7ea697db90556f7160a2017ac2553
4a35eb46507eb8207f634e6dad23762d0aec94df
/project/MapExplore/jMetal-jmetal-5.1/jmetal-exec/src/main/java/org/uma/jmetal/runner/multiobjective/SMPSOMeasuresRunner.java
7611f0bea43e935fd82426d4ed2063346dbf74c1
[]
no_license
fairanswers/fss16joe
8800ad81c60ab06f90b9643bf601c6c2c9a51107
f5dde87038ec5404a6bb2d9a538b2ceef571ac9d
refs/heads/master
2020-05-22T06:44:32.138162
2016-12-07T19:46:54
2016-12-07T19:46:54
65,820,114
2
1
null
null
null
null
UTF-8
Java
false
false
6,638
java
// NSGAIIRunner.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // // Copyright (c) 2014 Antonio J. Nebro // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package org.uma.jmetal.runner.multiobjective; import org.uma.jmetal.algorithm.Algorithm; import org.uma.jmetal.algorithm.multiobjective.nsgaii.NSGAIIBuilder; import org.uma.jmetal.algorithm.multiobjective.nsgaii.NSGAIIMeasures; import org.uma.jmetal.algorithm.multiobjective.smpso.SMPSOBuilder; import org.uma.jmetal.algorithm.multiobjective.smpso.SMPSOMeasures; import org.uma.jmetal.measure.MeasureListener; import org.uma.jmetal.measure.MeasureManager; import org.uma.jmetal.measure.impl.BasicMeasure; import org.uma.jmetal.measure.impl.CountingMeasure; import org.uma.jmetal.measure.impl.DurationMeasure; import org.uma.jmetal.operator.CrossoverOperator; import org.uma.jmetal.operator.MutationOperator; import org.uma.jmetal.operator.SelectionOperator; import org.uma.jmetal.operator.impl.crossover.SBXCrossover; import org.uma.jmetal.operator.impl.mutation.PolynomialMutation; import org.uma.jmetal.operator.impl.selection.BinaryTournamentSelection; import org.uma.jmetal.problem.DoubleProblem; import org.uma.jmetal.problem.Problem; import org.uma.jmetal.runner.AbstractAlgorithmRunner; import org.uma.jmetal.solution.DoubleSolution; import org.uma.jmetal.util.AlgorithmRunner; import org.uma.jmetal.util.JMetalException; import org.uma.jmetal.util.JMetalLogger; import org.uma.jmetal.util.ProblemUtils; import org.uma.jmetal.util.archive.BoundedArchive; import org.uma.jmetal.util.archive.impl.CrowdingDistanceArchive; import org.uma.jmetal.util.comparator.RankingAndCrowdingDistanceComparator; import org.uma.jmetal.util.evaluator.impl.SequentialSolutionListEvaluator; import org.uma.jmetal.util.pseudorandom.impl.MersenneTwisterGenerator; import java.io.FileNotFoundException; import java.util.List; import java.util.concurrent.TimeUnit; /** * Class to configure and run the NSGA-II algorithm (variant with measures) */ public class SMPSOMeasuresRunner extends AbstractAlgorithmRunner { /** * @param args Command line arguments. * @throws SecurityException * Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront] */ public static void main(String[] args) throws JMetalException, InterruptedException, FileNotFoundException { DoubleProblem problem; Algorithm<List<DoubleSolution>> algorithm; MutationOperator<DoubleSolution> mutation; String referenceParetoFront = "" ; String problemName ; if (args.length == 1) { problemName = args[0]; } else if (args.length == 2) { problemName = args[0] ; referenceParetoFront = args[1] ; } else { problemName = "org.uma.jmetal.problem.multiobjective.zdt.ZDT4"; referenceParetoFront = "jmetal-problem/src/test/resources/pareto_fronts/ZDT4.pf" ; } problem = (DoubleProblem) ProblemUtils.<DoubleSolution> loadProblem(problemName); BoundedArchive<DoubleSolution> archive = new CrowdingDistanceArchive<DoubleSolution>(100) ; double mutationProbability = 1.0 / problem.getNumberOfVariables() ; double mutationDistributionIndex = 20.0 ; mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex) ; int maxIterations = 250 ; int swarmSize = 100 ; algorithm = new SMPSOBuilder(problem, archive) .setMutation(mutation) .setMaxIterations(maxIterations) .setSwarmSize(swarmSize) .setRandomGenerator(new MersenneTwisterGenerator()) .setSolutionListEvaluator(new SequentialSolutionListEvaluator<DoubleSolution>()) .setVariant(SMPSOBuilder.SMPSOVariant.Measures) .build(); /* Measure management */ MeasureManager measureManager = ((SMPSOMeasures)algorithm).getMeasureManager() ; CountingMeasure currentIteration = (CountingMeasure) measureManager.<Long>getPullMeasure("currentIteration"); DurationMeasure currentComputingTime = (DurationMeasure) measureManager.<Long>getPullMeasure("currentExecutionTime"); BasicMeasure<List<DoubleSolution>> solutionListMeasure = (BasicMeasure<List<DoubleSolution>>) measureManager.<List<DoubleSolution>> getPushMeasure("currentPopulation"); CountingMeasure iteration2 = (CountingMeasure) measureManager.<Long>getPushMeasure("currentIteration"); solutionListMeasure.register(new Listener()); iteration2.register(new Listener2()); /* End of measure management */ Thread algorithmThread = new Thread(algorithm) ; algorithmThread.start(); /* Using the measures */ int i = 0 ; while(currentIteration.get() < maxIterations) { TimeUnit.SECONDS.sleep(5); System.out.println("Iteration (" + i + ") : " + currentIteration.get()) ; System.out.println("Computing time (" + i + ") : " + currentComputingTime.get()) ; i++ ; } algorithmThread.join(); List<DoubleSolution> population = algorithm.getResult() ; long computingTime = currentComputingTime.get() ; JMetalLogger.logger.info("Total execution time: " + computingTime + "ms"); printFinalSolutionSet(population); if (!referenceParetoFront.equals("")) { printQualityIndicators(population, referenceParetoFront) ; } } private static class Listener implements MeasureListener<List<DoubleSolution>> { private int counter = 0 ; @Override synchronized public void measureGenerated(List<DoubleSolution> solutions) { if ((counter % 1 == 0)) { System.out.println("PUSH MEASURE. Counter = " + counter+ " First solution: " + solutions.get(0)) ; } counter ++ ; } } private static class Listener2 implements MeasureListener<Long> { @Override synchronized public void measureGenerated(Long value) { if ((value % 50 == 0)) { System.out.println("PUSH MEASURE. Iteration: " + value) ; } } } }
[ "joe@bodkinconsulting.com" ]
joe@bodkinconsulting.com
be0eb6507ef433716791f58cbe119876f7872ad8
40619e3443cee989d262011b16d0103058218806
/heavycenter/src/main/java/com/siweisoft/heavycenter/module/acct/role/RoleFrag.java
4f949775134462faa4079df49a538c82fb21f959
[]
no_license
summerviwox/ZX
227b75a2178bdfef9b97786af4f0fc7db7822591
fe5bbe8b11f90ac0b154324eef3542ea84784df0
refs/heads/master
2020-12-05T10:17:45.665391
2020-01-06T10:57:40
2020-01-06T10:57:40
232,078,243
0
1
null
null
null
null
UTF-8
Java
false
false
3,535
java
package com.siweisoft.heavycenter.module.acct.role; //by summer on 2017-12-18. import android.os.Bundle; import android.view.View; import com.android.lib.network.news.UINetAdapter; import com.android.lib.util.IntentUtil; import com.android.lib.util.ToastUtil; import com.android.lib.util.fragment.two.FragManager2; import com.siweisoft.heavycenter.R; import com.siweisoft.heavycenter.base.AppFrag; import com.siweisoft.heavycenter.data.locd.LocalValue; import com.siweisoft.heavycenter.data.netd.acct.login.LoginResBean; import com.siweisoft.heavycenter.data.netd.user.usertype.UserTypeReqBean; import com.siweisoft.heavycenter.data.netd.user.usertype.UserTypeResBean; import com.siweisoft.heavycenter.module.acct.acct.AcctAct; import com.siweisoft.heavycenter.module.main.main.MainAct; import butterknife.OnClick; public class RoleFrag extends AppFrag<RoleUIOpe,RoleDAOpe>{ public static String 直接登录 = "直接登录"; public static RoleFrag getInstance(boolean login){ RoleFrag roleFrag = new RoleFrag(); roleFrag.setArguments(new Bundle()); roleFrag.getArguments().putBoolean(直接登录,login); return roleFrag; } @OnClick({R.id.tv_notdriver,R.id.tv_driver}) public void onClick(final View vv){ super.onClick(vv); getUI().showTip(R.id.tv_driver==vv.getId(),new View.OnClickListener() { @Override public void onClick(final View v) { switch (v.getId()){ case R.id.tv_sure: getDE().login(LocalValue.get登录参数(), new UINetAdapter<LoginResBean>(RoleFrag.this,UINetAdapter.Loading) { @Override public void onSuccess(LoginResBean o) { getUI().getUserTypeReqBean().setId(o.getUserId()); getUI().getUserTypeReqBean().setUserType((R.id.tv_driver==vv.getId())?UserTypeReqBean.驾驶员 :UserTypeReqBean.非驾驶员); LocalValue.save登录返回信息(o); getDE().setUserType(getUI().getUserTypeReqBean(), new UINetAdapter<UserTypeResBean>(RoleFrag.this,UINetAdapter.Loading) { @Override public void onSuccess(UserTypeResBean o) { ToastUtil.getInstance().showShort(getContext(),"设置用户角色成功"); if(getArguments().getBoolean(直接登录,false)){ LoginResBean resBean = LocalValue.get登录返回信息(); resBean.setUserType((R.id.tv_driver==vv.getId())?UserTypeReqBean.驾驶员 :UserTypeReqBean.非驾驶员); LocalValue.save登录返回信息(resBean); IntentUtil.startActivityWithFinish(getBaseUIAct(), MainAct.class,null); }else{ getBaseUIAct().onBackPressed(); } } }); } }); break; } FragManager2.getInstance().setFinishAnim(R.anim.fade_in,R.anim.fade_out).finish(getBaseUIAct(), AcctAct.账号,true); } }); } }
[ "summernecro@gmail.com" ]
summernecro@gmail.com
32e852ebb9af0c12b6873c00b98f99b2689ae7f1
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
/Hotgram/com/google/firebase/iid/k.java
6105ef1761a79a10d52a6b8bfcfad1c6be56e87b
[]
no_license
danielperez9430/Third-party-Telegram-Apps-Spy
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
refs/heads/master
2020-04-11T23:26:06.025903
2018-12-18T10:07:20
2018-12-18T10:07:20
162,166,647
0
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.google.firebase.iid; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.util.Log; final class k { private final Messenger a; private final zzk b; k(IBinder arg4) { super(); String v0 = arg4.getInterfaceDescriptor(); zzk v2 = null; if("android.os.IMessenger".equals(v0)) { this.a = new Messenger(arg4); this.b = v2; return; } if("com.google.android.gms.iid.IMessengerCompat".equals(v0)) { this.b = new zzk(arg4); this.a = ((Messenger)v2); return; } String v4 = "Invalid interface descriptor: "; v0 = String.valueOf(v0); v4 = v0.length() != 0 ? v4.concat(v0) : new String(v4); Log.w("MessengerIpcClient", v4); throw new RemoteException(); } final void a(Message arg2) { if(this.a != null) { this.a.send(arg2); return; } if(this.b != null) { this.b.a(arg2); return; } throw new IllegalStateException("Both messengers are null"); } }
[ "dpefe@hotmail.es" ]
dpefe@hotmail.es
e39d53a2ada1ea00882042c0ee1f69d7c1d6f87d
059bcece1a759624e6894b2533cb6b5a6a250321
/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/service/CustomerService.java
9a1c54b5da3df05f7ecb22bb74969fb7c57a4295
[ "Apache-2.0" ]
permissive
koalaanntree/spring-boot-data-geode
7364e3a698048b84988bf434d3b7b0dbd6035abf
2a4f0b0f4e2fb7e33ae4f34bee19b5b223d0df83
refs/heads/master
2020-05-18T00:31:30.379791
2019-04-24T19:13:59
2019-04-24T19:13:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,561
java
/* * Copyright 2019 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 * * https://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.geode.boot.autoconfigure.repository.service; import static org.springframework.data.gemfire.util.RuntimeExceptionFactory.newIllegalArgumentException; import static org.springframework.data.gemfire.util.RuntimeExceptionFactory.newIllegalStateException; import java.util.Optional; import java.util.concurrent.atomic.AtomicLong; import org.springframework.geode.boot.autoconfigure.repository.model.Customer; import org.springframework.geode.boot.autoconfigure.repository.repo.CustomerRepository; import org.springframework.stereotype.Service; /** * The {@link CustomerService} class is an application service for managing {@link Customer Customers}. * * @author John Blum * @see org.springframework.geode.boot.autoconfigure.repository.model.Customer * @see org.springframework.geode.boot.autoconfigure.repository.repo.CustomerRepository * @see org.springframework.stereotype.Service * @since 1.0.0 */ @Service public class CustomerService { private final CustomerRepository customerRepository; private final AtomicLong identifierSequence = new AtomicLong(0L); public CustomerService(CustomerRepository customerRepository) { this.customerRepository = customerRepository; } public CustomerRepository getCustomerRepository() { return Optional.ofNullable(this.customerRepository) .orElseThrow(() -> newIllegalStateException("CustomerRepository was not properly configured")); } public Optional<Customer> findBy(String name) { return Optional.ofNullable(getCustomerRepository().findByName(name)); } protected Long nextId() { return identifierSequence.incrementAndGet(); } public Customer save(Customer customer) { return Optional.ofNullable(customer) .map(it -> { if (customer.isNew()) { customer.identifiedBy(nextId()); } return getCustomerRepository().save(customer); }) .orElseThrow(() -> newIllegalArgumentException("Customer is required")); } }
[ "jblum@pivotal.io" ]
jblum@pivotal.io
1ae4b38612d0e9e93a66e2ea0b5ca2a1b8f30790
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_447/Testnull_44655.java
8a30479573e0a715ac20d5f36ca6a239703508b4
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_447; import static org.junit.Assert.*; public class Testnull_44655 { private final Productionnull_44655 production = new Productionnull_44655("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
287afe256ee1118d19446768458bb1ad9ccb25bc
ac68b309495d823bf081d168c4a013095c76b1fd
/HubbleBackend/src/com/hubble/hubblebackend/postgressql/model/ReleaseGroupSecondaryType.java
e86e828d8f8da494d04b369d12e5f66a38fb90d1
[]
no_license
hmehrotra/hubble
f6d726b8a9d7deed94f67893c3c44c2763be88c3
3762613ed351d3fd4b31c369c3f10b33c06edf70
refs/heads/master
2016-08-04T14:16:38.080270
2015-09-21T00:22:10
2015-09-21T00:22:10
12,354,502
0
0
null
2015-08-30T00:45:27
2013-08-25T05:18:10
HTML
UTF-8
Java
false
false
1,425
java
package com.hubble.hubblebackend.postgressql.model; // Generated Sep 7, 2015 5:12:35 PM by Hibernate Tools 3.4.0.CR1 /** * ReleaseGroupSecondaryType generated by hbm2java */ public class ReleaseGroupSecondaryType implements java.io.Serializable { private int id; private String name; private Integer parent; private int childOrder; private String description; public ReleaseGroupSecondaryType() { } public ReleaseGroupSecondaryType(int id, String name, int childOrder) { this.id = id; this.name = name; this.childOrder = childOrder; } public ReleaseGroupSecondaryType(int id, String name, Integer parent, int childOrder, String description) { this.id = id; this.name = name; this.parent = parent; this.childOrder = childOrder; this.description = description; } public int getId() { return this.id; } public void setId(int id) { this.id = id; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Integer getParent() { return this.parent; } public void setParent(Integer parent) { this.parent = parent; } public int getChildOrder() { return this.childOrder; } public void setChildOrder(int childOrder) { this.childOrder = childOrder; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } }
[ "hmehrotra@apple.com" ]
hmehrotra@apple.com
26f92f8cad0682607fe166c2d310615ce9113593
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/65/org/apache/commons/math/FunctionEvaluationException_FunctionEvaluationException_58.java
649be9d5b6ea46d81b5332b52704e50a8976f9fe
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
683
java
org apach common math except thrown error occur evalu function maintain code argument code properti hold input caus function evalu fail version revis date function evalu except functionevaluationexcept math except mathexcept construct except indic argument caus function evalu fail param argument fail function argument function evalu except functionevaluationexcept argument local format localizedformat evalu fail arrai real vector arrayrealvector argument argument argument clone
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
6634ba8b35808e6680157115ad01dbbf0469da7e
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/p313im/sdk/common/C31077d.java
5a19a040702a61f7d5d4ffe34106cb0ce80c4a36
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,920
java
package com.p280ss.android.ugc.aweme.p313im.sdk.common; import android.arch.lifecycle.C0043i; import android.arch.lifecycle.C0053p; import com.p280ss.android.ugc.aweme.arch.widgets.base.C23084b; import java.util.List; import kotlin.jvm.internal.C7571f; import kotlin.jvm.internal.C7573i; /* renamed from: com.ss.android.ugc.aweme.im.sdk.common.d */ public final class C31077d<T> extends C23084b<Integer> { /* renamed from: g */ public static final C31078a f81561g = new C31078a(null); /* renamed from: b */ public boolean f81562b; /* renamed from: c */ public boolean f81563c; /* renamed from: d */ public boolean f81564d; /* renamed from: e */ public Throwable f81565e; /* renamed from: f */ public final C23084b<List<T>> f81566f; /* renamed from: com.ss.android.ugc.aweme.im.sdk.common.d$a */ public static final class C31078a { private C31078a() { } public /* synthetic */ C31078a(C7571f fVar) { this(); } } /* renamed from: com.ss.android.ugc.aweme.im.sdk.common.d$b */ static final class C31079b<T> implements C0053p<Integer> { /* renamed from: a */ final /* synthetic */ C31077d f81567a; /* renamed from: b */ final /* synthetic */ C31071b f81568b; C31079b(C31077d dVar, C31071b bVar) { this.f81567a = dVar; this.f81568b = bVar; } /* access modifiers changed from: private */ /* renamed from: a */ public void onChanged(Integer num) { if (num != null && num.intValue() == 1) { this.f81568b.mo81560a(); } else if (num != null && num.intValue() == 3) { this.f81568b.mo81562a((List) this.f81567a.f81566f.getValue(), this.f81567a.f81562b); } else { if (num != null && num.intValue() == 2) { this.f81568b.mo81561a(this.f81567a.f81565e); } } } } /* renamed from: a */ public final void mo81564a(Throwable th) { this.f81565e = th; mo81565a(false); setValue(Integer.valueOf(2)); } /* renamed from: b */ public final void mo81566b(boolean z) { this.f81564d = true; mo81565a(false); setValue(Integer.valueOf(3)); } public C31077d(C23084b<List<T>> bVar) { C7573i.m23587b(bVar, "data"); this.f81566f = bVar; setValue(Integer.valueOf(0)); } /* renamed from: a */ public final void mo81565a(boolean z) { this.f81563c = z; if (z) { setValue(Integer.valueOf(1)); } } /* renamed from: a */ public final void mo81563a(C0043i iVar, C31071b<T> bVar) { C7573i.m23587b(iVar, "lifecycleOwner"); C7573i.m23587b(bVar, "listListener"); observe(iVar, new C31079b(this, bVar)); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
213b3f57190fbada1d8bbb577c698a1ba0c540ba
ad4beedef0d5a58fea01a96cb91c6b9c5bd76c79
/src/main/java/com/ch/system/web/paging/OpenAdvertisementOverviewPaging.java
4b815b2259861387b4e6260d0bd3ce0105a36e8b
[]
no_license
kunkun39/HB_YL
afaed8edffd1c13e89817931611d0fc0455d3cf3
aa8519d06d6cf35185dc3d70fcf396b98d3fe7a7
refs/heads/master
2020-12-24T13:17:26.733263
2015-03-30T05:12:15
2015-03-30T05:12:15
32,303,780
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.ch.system.web.paging; import com.ch.system.service.AdvertisementService; import com.ch.system.web.facade.dto.OpenAdvertisementDTO; import java.util.List; /** * User: Jack Wang * Date: 15-3-17 * Time: 下午2:26 */ public class OpenAdvertisementOverviewPaging extends AbstractPaging<OpenAdvertisementDTO> { private AdvertisementService advertisementService; public OpenAdvertisementOverviewPaging(AdvertisementService advertisementService) { this.advertisementService = advertisementService; } public List<OpenAdvertisementDTO> getItems() { return advertisementService.obtainOpenAdvertisements(getStartPosition(), getPageSize()); } public long getTotalItemSize() { if (totalItemSize >= 0) { return totalItemSize; } totalItemSize = advertisementService.obtainOpenAdvertisementSize(); return totalItemSize; } public String getParameterValues() { return ""; } }
[ "34445282@qq.com" ]
34445282@qq.com
f1527db8eb3203c3bdfc0bc544dc45ff89571a97
134357cb7c008d7cf21079a01dc968f035c52a73
/app/src/main/java/com/example/map/mylocation/dialog/InputNumberDiaolg.java
35b3a79e4918b843cf399544d6408dc9305f1cc2
[]
no_license
zsh9/Lab
ffe090a9d67558a51167cef4db1da269cc9e3fbb
b71a73922919d9b2073a7928334d03912127edf5
refs/heads/master
2023-03-29T05:16:02.607589
2021-03-23T05:50:21
2021-03-23T05:50:21
350,593,934
0
0
null
null
null
null
UTF-8
Java
false
false
2,977
java
package com.example.map.mylocation.dialog; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import android.widget.EditText; import androidx.annotation.NonNull; import com.blankj.utilcode.util.StringUtils; import com.example.map.mylocation.R; import com.example.map.mylocation.utils.DensityUtil; import com.example.map.mylocation.utils.Event; import com.example.map.mylocation.utils.EventBusUtil; /** * 输入内容 * Created by wuxiaodong on 2019/7/29. */ public class InputNumberDiaolg extends Dialog { private Context mContext; private EditText editText; private Button sure, cancle; String number; int from = 0; public InputNumberDiaolg(@NonNull Context context, int themeResId) { super(context, R.style.dialog_vip); this.mContext = context; } public InputNumberDiaolg(@NonNull Context context, int themeResId, int type) { super(context, R.style.dialog_vip); this.mContext = context; this.from = type; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); init(); } private void init() { LayoutInflater inflater = LayoutInflater.from(mContext); View view = inflater.inflate(R.layout.dialog_input_number, null); setContentView(view); editText = view.findViewById(R.id.edt_number); sure = view.findViewById(R.id.sure_btn); cancle = view.findViewById(R.id.cancle_btn); number = editText.getText().toString().trim(); cancle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); sure.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (!StringUtils.isEmpty(editText.getText().toString().trim())) { EventBusUtil.sendEvent(new Event(from, editText.getText().toString().trim())); } else { } dismiss(); } }); Window dialogWindow = getWindow(); dialogWindow.setGravity(Gravity.CENTER); // 此处可以设置dialog显示的位置为居中 WindowManager.LayoutParams lp = dialogWindow.getAttributes(); DisplayMetrics d = mContext.getResources().getDisplayMetrics(); // 获取屏幕宽、高用 lp.width = d.widthPixels;// 高度设置为屏幕的0.8 lp.height = DensityUtil.dip2px(mContext, 200);// 高度设置为屏幕的0.8 // lp.height = d.heightPixels; setCanceledOnTouchOutside(true); dialogWindow.setAttributes(lp); } }
[ "xxx" ]
xxx
57eedb690e205aafb0b7280333fe27e287985940
1f109cdafee21aac5668e94926b0e2299e2379a3
/Awesome/app/src/main/java/com/dismas/imaya/newpipe/DownloadDialog.java
735287e37ab53f331420a881d9875bd9ff0833b2
[]
no_license
ImayaDismas/awesome
91dcfe3395e62368d49cd3411a50405dd456a68d
7e357cacd999dbfbdaa50e701a49cefc37666d4b
refs/heads/master
2021-01-17T20:02:20.575650
2016-04-12T20:51:33
2016-04-12T20:51:33
54,651,427
0
0
null
null
null
null
UTF-8
Java
false
false
7,424
java
package com.dismas.imaya.newpipe; import android.Manifest; import android.app.Dialog; import android.app.DownloadManager; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.app.DialogFragment; import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import android.util.Log; import android.widget.Toast; import java.io.File; import java.util.ArrayList; import java.util.List; /** * Created by imaya on 3/25/16. */ public class DownloadDialog extends DialogFragment { private static final String TAG = DialogFragment.class.getName(); public static final String TITLE = "name"; public static final String FILE_SUFFIX_AUDIO = "file_suffix_audio"; public static final String FILE_SUFFIX_VIDEO = "file_suffix_video"; public static final String AUDIO_URL = "audio_url"; public static final String VIDEO_URL = "video_url"; private Bundle arguments; @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { arguments = getArguments(); super.onCreateDialog(savedInstanceState); if(ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(R.string.download_dialog_title); // If no audio stream available if(arguments.getString(AUDIO_URL) == null) { builder.setItems(R.array.download_options_no_audio, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Context context = getActivity(); String title = arguments.getString(TITLE); switch (which) { case 0: // Video download(arguments.getString(VIDEO_URL), title, arguments.getString(FILE_SUFFIX_VIDEO), context); break; default: Log.d(TAG, "lolz"); } } }); // If no video stream available } else if(arguments.getString(VIDEO_URL) == null) { builder.setItems(R.array.download_options_no_video, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Context context = getActivity(); String title = arguments.getString(TITLE); switch (which) { case 0: // Audio download(arguments.getString(AUDIO_URL), title, arguments.getString(FILE_SUFFIX_AUDIO), context); break; default: Log.d(TAG, "lolz"); } } }); //if both streams ar available } else { builder.setItems(R.array.download_options, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Context context = getActivity(); String title = arguments.getString(TITLE); switch (which) { case 0: // Video download(arguments.getString(VIDEO_URL), title, arguments.getString(FILE_SUFFIX_VIDEO), context); break; case 1: download(arguments.getString(AUDIO_URL), title, arguments.getString(FILE_SUFFIX_AUDIO), context); break; default: Log.d(TAG, "lolz"); } } }); } return builder.create(); } /** * #143 #44 #42 #22: make shure that the filename does not contain illegal chars. * This should fix some of the "cannot download" problems. * */ private String createFileName(String fName) { // from http://eng-przemelek.blogspot.de/2009/07/how-to-create-valid-file-name.html List<String> forbiddenCharsPatterns = new ArrayList<>(); forbiddenCharsPatterns.add("[:]+"); // Mac OS, but it looks that also Windows XP forbiddenCharsPatterns.add("[\\*\"/\\\\\\[\\]\\:\\;\\|\\=\\,]+"); // Windows forbiddenCharsPatterns.add("[^\\w\\d\\.]+"); // last chance... only latin letters and digits String nameToTest = fName; for (String pattern : forbiddenCharsPatterns) { nameToTest = nameToTest.replaceAll(pattern, "_"); } return nameToTest; } private void download(String url, String title, String fileSuffix, Context context) { File downloadDir = NewPipeSettings.getDownloadFolder(); if(!downloadDir.exists()) { //attempt to create directory boolean mkdir = downloadDir.mkdirs(); if(!mkdir && !downloadDir.isDirectory()) { String message = context.getString(R.string.err_dir_create,downloadDir.toString()); Log.e(TAG, message); Toast.makeText(context, message, Toast.LENGTH_LONG).show(); return; } String message = context.getString(R.string.info_dir_created,downloadDir.toString()); Log.e(TAG, message); Toast.makeText(context,message , Toast.LENGTH_LONG).show(); } File saveFilePath = new File(downloadDir,createFileName(title) + fileSuffix); long id = 0; if (App.isUsingTor()) { // if using Tor, do not use DownloadManager because the proxy cannot be set FileDownloader.downloadFile(getContext(), url, saveFilePath, title); } else { DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); DownloadManager.Request request = new DownloadManager.Request( Uri.parse(url)); request.setDestinationUri(Uri.fromFile(saveFilePath)); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); request.setTitle(title); request.setDescription("'" + url + "' => '" + saveFilePath + "'"); request.allowScanningByMediaScanner(); try { id = dm.enqueue(request); } catch (Exception e) { e.printStackTrace(); } } Log.i(TAG,"Started downloading '" + url + "' => '" + saveFilePath + "' #" + id); } }
[ "imayadismas@gmail.com" ]
imayadismas@gmail.com
0e8ad0275d43736eca15b0610711c0981e860d17
bd3296a9ed115058bd18086878a2db1e6630b6f0
/src/main/java/bf/onea/domain/PersistentAuditEvent.java
c8715f0a7e3d2b54be13dff1491e5d42a2a3a14c
[]
no_license
Kadsuke/sidotapp
7e5df866ed917607759c4427fe4f153ea6024e8e
ded26aaad10085c50efcd97c34ba6c1a0e2ab7c3
refs/heads/main
2023-01-31T20:49:16.371591
2020-12-14T09:02:39
2020-12-14T09:02:39
316,159,926
0
0
null
2020-12-14T09:02:41
2020-11-26T07:56:10
TypeScript
UTF-8
Java
false
false
2,607
java
package bf.onea.domain; import java.io.Serializable; import java.time.Instant; import java.util.HashMap; import java.util.Map; import javax.persistence.*; import javax.validation.constraints.NotNull; /** * Persist AuditEvent managed by the Spring Boot actuator. * * @see org.springframework.boot.actuate.audit.AuditEvent */ @Entity @Table(name = "jhi_persistent_audit_event") public class PersistentAuditEvent implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") @Column(name = "event_id") private Long id; @NotNull @Column(nullable = false) private String principal; @Column(name = "event_date") private Instant auditEventDate; @Column(name = "event_type") private String auditEventType; @ElementCollection @MapKeyColumn(name = "name") @Column(name = "value") @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns = @JoinColumn(name = "event_id")) private Map<String, String> data = new HashMap<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getPrincipal() { return principal; } public void setPrincipal(String principal) { this.principal = principal; } public Instant getAuditEventDate() { return auditEventDate; } public void setAuditEventDate(Instant auditEventDate) { this.auditEventDate = auditEventDate; } public String getAuditEventType() { return auditEventType; } public void setAuditEventType(String auditEventType) { this.auditEventType = auditEventType; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PersistentAuditEvent)) { return false; } return id != null && id.equals(((PersistentAuditEvent) o).id); } @Override public int hashCode() { return 31; } // prettier-ignore @Override public String toString() { return "PersistentAuditEvent{" + "principal='" + principal + '\'' + ", auditEventDate=" + auditEventDate + ", auditEventType='" + auditEventType + '\'' + '}'; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
fdb1c70b6e34cff9668bec6243f5a01d41ba5c44
71da7e88d6f9a326fd06f62e7ea5ff5a222d7793
/app/src/main/java/co/id/shope/fragments/CartPembayaranFragment.java
e53571fa6fa4f8ed588f9a9d49c0cbb4f897b007
[]
no_license
kyky04/aplikasimandiri-client
86094978d596862508ceb9ee13163b2e4fe80d58
627f8f30d68dbb43be712de7d8f7eb42e2ae99ee
refs/heads/master
2020-04-14T01:05:46.555312
2018-12-30T01:00:39
2018-12-30T01:00:39
163,551,932
0
0
null
null
null
null
UTF-8
Java
false
false
4,953
java
package co.id.shope.fragments; import android.app.ProgressDialog; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.CardView; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.androidnetworking.AndroidNetworking; import com.androidnetworking.error.ANError; import com.androidnetworking.interfaces.ParsedRequestListener; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; import co.id.shope.R; import co.id.shope.activities.CheckOutActivity; import co.id.shope.adapters.BankAdapter; import co.id.shope.adapters.ShippingAdapter; import co.id.shope.data.Contans; import co.id.shope.models.BankResponse; import co.id.shope.models.DataItemBank; import co.id.shope.utils.CommonUtil; import co.id.shope.views.SliderIndicator; /** * A simple {@link Fragment} subclass. * Activities that contain this fragment must implement the * {@link OnFragmentInteractionListener} interface * to handle interaction events. */ public class CartPembayaranFragment extends Fragment { private static final String TAG = "CartShippingFragment"; @BindView(R.id.recycler_pembayaran) RecyclerView recyclerPembayaran; @BindView(R.id.card) CardView card; Unbinder unbinder; ProgressDialog progressDialog; ShippingAdapter shippingAdapter; BankAdapter adapter; int id_bank = 0; String nama_bank, norek,atas_nama =""; private OnFragmentInteractionListener mListener; private SliderIndicator mIndicator; public CartPembayaranFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pembayaran, container, false); unbinder = ButterKnife.bind(this, view); recyclerPembayaran.setLayoutManager(new LinearLayoutManager(getActivity())); adapter = new BankAdapter(getActivity()); recyclerPembayaran.setAdapter(adapter); loadAlamat(); adapter.setOnItemClickListener(new BankAdapter.OnItemClickListener() { @Override public void onClick(DataItemBank bank) { Log.d(TAG, "onClick: " + bank.getId()); id_bank = bank.getId(); atas_nama = bank.getAtasNama(); norek = bank.getNoRekening(); nama_bank = bank.getNamaBank(); } }); return view; } @Override public void onDestroyView() { super.onDestroyView(); unbinder.unbind(); } public interface OnFragmentInteractionListener { void onFragmentInteraction(); } void loadAlamat() { openDialog(); AndroidNetworking.get(Contans.BANK) .build() .getAsObject(BankResponse.class, new ParsedRequestListener() { @Override public void onResponse(Object response) { closerDialog(); if (response instanceof BankResponse) { adapter.swap(((BankResponse) response).getData()); } } @Override public void onError(ANError anError) { closerDialog(); } }); } void openDialog() { progressDialog = new ProgressDialog(getActivity()); progressDialog.setMessage("Loading . . ."); progressDialog.setCancelable(false); progressDialog.show(); } void closerDialog() { progressDialog.dismiss(); } void openFragment(Fragment fragment) { FragmentManager manager = getFragmentManager(); FragmentTransaction transaction = manager.beginTransaction(); transaction.add(android.R.id.content, fragment).addToBackStack(null).commit(); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); } public boolean getIdbank() { if (id_bank != 0) { Log.d(TAG, "getIdbank: "+atas_nama); ((CheckOutActivity) getActivity()).setBank(id_bank); ((CheckOutActivity) getActivity()).getReview().setAtas_nama(atas_nama); ((CheckOutActivity) getActivity()).getReview().setRekening(nama_bank); ((CheckOutActivity) getActivity()).getReview().setNo_rek(norek); return true; } else { CommonUtil.showToast(getActivity(), "Anda Belum memilih bank !"); return false; } } }
[ "rizki@pragmainf.co.id" ]
rizki@pragmainf.co.id
4c7c4b45f3284fb7c7310beb26fd726b7495fd0d
0ae7317e280a12a918a394cf5487840a1d1485ad
/src/main/java/com/goat/jdk/learn/chapter005/F021/item03/NaiveMerchant.java
9e943076a96b35e66183012d7a2fbe94f2443ca6
[]
no_license
yangfancoming/goatjdk
81dd83058e133114cbe829be07186f730f9939a8
098ad4c495d3f45fdc1718f650306db4968d1667
refs/heads/master
2022-06-26T03:50:22.515609
2021-10-29T08:26:37
2021-10-29T08:26:37
204,645,318
0
0
null
2022-06-17T02:37:10
2019-08-27T07:26:14
Java
UTF-8
Java
false
false
557
java
package com.goat.jdk.learn.chapter005.F021.item03; /** * Created by Administrator on 2019/12/5. * * @ Description: TODO * @ author 山羊来了 * @ date 2019/12/5---14:17 */ public class NaiveMerchant extends Merchant { @Override public Double actionPrice(double price) { return 0.9 * price; } public static void main(String[] args) { Merchant merchant = new NaiveMerchant(); // price 必须定义成 Number 类型 Number price = merchant.actionPrice(40); System.out.println(price); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
897e8129cb456f446b2a6a33ecc93140d76585de
a5bcbc7ed5f50cde2ccb862aa3450a0aa6cfbde8
/01-algorithm/src/main/java/org/sprintdragon/algorithm/lc/Title198.java
50254a92ad32be35cb1996626040d3b25813aed7
[]
no_license
psiitoy/accumulate
f733b35929864658e8eeb342792521afaf2f1aac
1059cf22d1b2d3cc7919e185ae94d380e045bf8f
refs/heads/master
2022-05-04T05:35:14.261835
2022-04-09T12:26:21
2022-04-09T12:26:21
100,947,657
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
package org.sprintdragon.algorithm.lc; public class Title198 { /** * 这个是我自创的,还是官方的正向解法比较简单 * * @param nums * @return */ public int rob(int[] nums) { int len = nums.length; int[] dp = new int[len]; dp[len - 1] = nums[len - 1]; if (len == 1) { return dp[len - 1]; } dp[len - 2] = Math.max(nums[len - 2], nums[len - 1]); if (len == 2) { return dp[len - 2]; } dp[len - 3] = Math.max(nums[len - 3] + nums[len - 1], nums[len - 2]); if (len == 3) { return dp[len - 3]; } for (int i = len - 4; i >= 0; i--) { int res1 = nums[i] + dp[i + 2]; int res2 = nums[i + 1] + dp[i + 3]; dp[i] = Math.max(res1, res2); } return dp[0]; } public int robDg(int[] nums) { return process(nums, 0); } public int process(int[] nums, int index) { if (index >= nums.length) { return 0; } if (index == nums.length - 1) { return nums[index]; } if (index == nums.length - 2) { return Math.max(nums[index], nums[index + 1]); } if (index == nums.length - 3) { return Math.max(nums[index] + nums[index + 2], nums[index + 1]); } int res1 = nums[index] + process(nums, index + 2); int res2 = nums[index + 1] + process(nums, index + 3); return Math.max(res1, res2); } }
[ "psiitoy@126.com" ]
psiitoy@126.com
ca00288ca561dcaf6a121ff9a9f99bf8be292174
09960b68707da3891f45ac2eda90e177a742b28d
/web/ahnew/src/main/java/com/szty/aihao/service/aihaobusiness37_service.java
c026fba7cd0f8644932ab2059135e4cedd550d5b
[]
no_license
jiangyiman/szty
a72434d586f836f8a9039b3a5a293f614a1e4b99
9087733b2b88b6ac0e0cd7d13652f02b42cdb848
refs/heads/master
2021-05-30T22:03:01.114487
2016-03-25T06:25:18
2016-03-25T06:25:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,003
java
/* *@=================================================================== *@项目说明 *@作者:宋春林 *@版本信息:@Copy Right 2011-2015 *@文件: iDataAihaobusiness37.java *@项目名称:JAVA项目管理 *@创建时间:2015/10/15 *@=================================================================== */ package com.szty.aihao.service; import com.szty.aihao.dao.aihaobusiness37_Dao; import com.szty.aihao.core.aihaobusiness37_core; import com.szty.aihao.factory.classFactory; import java.util.Dictionary; import java.util.List; /** *@文件说明 *@AIHAOBUSINESS37逻辑层接口 *@作者:宋春林 */ public class aihaobusiness37_service { public aihaobusiness37_core _dal=classFactory.getaihaobusiness37(); /** * 向数据库中插入一条新记录。 * @param AIHAOBUSINESS37实体 * @return 新插入记录的编号 */ public int insert_aihaobusiness37 (aihaobusiness37_Dao _AIHAOBUSINESS37Model ) throws Exception{ return _dal.insert_aihaobusiness37( _AIHAOBUSINESS37Model); } /** * 向数据库中插入一条新记录。 * @param AIHAOBUSINESS37prrameter * @return 新插入记录的编号 */ public int insert_aihaobusiness37(Object[] _para) throws Exception{ return _dal.insert_aihaobusiness37( _para); } /** * 向数据库中插入一条新记录。 * @param AIHAOBUSINESS37实体 * @return 影响的行数 */ public int update_aihaobusiness37(aihaobusiness37_Dao _AIHAOBUSINESS37Model) throws Exception{ return _dal.update_aihaobusiness37( _AIHAOBUSINESS37Model); } /** * 删除数据表AIHAOBUSINESS37中的一条记录 * @param AIHAOBUSINESS37实体 * @return 新插入记录的编号 */ public int delete_aihaobusiness37(int Sname) throws Exception{ return _dal.delete_aihaobusiness37( Sname); } /** * 得到 aihaobusiness37 数据实体 * @param Sname">Sname * @return<aihaobusiness37 数据实体 * @throws Exception */ public aihaobusiness37_Dao get_aihaobusiness37Dao(int Sname) throws Exception{ return _dal.get_aihaobusiness37Dao( Sname); } /** * 根据AIHAOBUSINESS37返回的查询DataRow创建一个AIHAOBUSINESS37Entity对象 * @param AIHAOBUSINESS37 row * @returnAIHAOBUSINESS37List对象 * @throws Exception */ public List<aihaobusiness37_Dao> get_aihaobusiness37_All() throws Exception{ return _dal.get_aihaobusiness37_All(); } /** * 根据AIHAOBUSINESS37返回的查询DataRow创建一个AIHAOBUSINESS37Entity对象 * @param AIHAOBUSINESS37 row * @returnAIHAOBUSINESS37List对象 * @throws Exception */ public List<aihaobusiness37_Dao> get_aihaobusiness37_All(String strWhere) throws Exception{ return _dal.get_aihaobusiness37_All(strWhere); } /* 根据SCLTEST返回 分页数据 * * @param SCLTEST * row * @returnSCLTESTList对象 * @throws Exception */ public List<aihaobusiness37_Dao> get_aihaobusiness37_Page(int pageSize, int pageIndex,String strWhere) throws Exception { return _dal.get_aihaobusiness37_Page(pageSize,pageIndex,strWhere); } /** * 根据AIHAOBUSINESS37返回的查询DataRow创建一个AIHAOBUSINESS37Entity对象 * @param AIHAOBUSINESS37 row * @returnAIHAOBUSINESS37Dictionary对象 * @throws Exception */ public Dictionary<Integer, aihaobusiness37_Dao> get_aihaobusiness37_Dictionary(String strWhere) throws Exception{ return _dal.get_aihaobusiness37_Dictionary(strWhere); } /** * 更新AIHAOBUSINESS37字段加一 * @param FieldName * @param sid */ public int create_aihaobusiness37_UpdateIncreate(String FieldName,int sid) throws Exception{ return _dal.create_aihaobusiness37_UpdateIncreate( FieldName, sid); } /** * 更新AIHAOBUSINESS37Int型字段 * @param FieldName * @param Num * @param sid */ public int create_aihaobusiness37_UpdateInteger(String FieldName,int Num,int sid) throws Exception{ return _dal.create_aihaobusiness37_UpdateInteger( FieldName, Num, sid); } /** * 更新AIHAOBUSINESS37IString型字段 * @param FieldName * @param Value * @param sid */ public int createaihaobusiness37_UpdateString(String FieldName,String Value,int sid) throws Exception{ return _dal.create_aihaobusiness37_UpdateString( FieldName, Value, sid); } }
[ "279941737@qq.com" ]
279941737@qq.com
41bf57fcb94b29eed20974193cc664fa62a8b585
a36d40485f92f78b75b5528ad6372fe6a2c00f28
/app/src/main/java/com/example/nikkoekasaputra/simplenewsapps/activity/DetailNewsActivity.java
7e68d045217e717021d7d5e6493766641ba4a27a
[]
no_license
NikkoES/SimpleNewsApps
616982b30c6bb035541489f58d025c7d3a470b69
73b4ea02dc841929a7834cdecc8a0694a6ac23a5
refs/heads/master
2021-04-03T06:44:52.147978
2018-03-29T08:24:57
2018-03-29T08:24:57
124,904,677
0
1
null
null
null
null
UTF-8
Java
false
false
3,583
java
package com.example.nikkoekasaputra.simplenewsapps.activity; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.example.nikkoekasaputra.simplenewsapps.R; public class DetailNewsActivity extends AppCompatActivity { String imgNews, titleNews, contentNews, dateNews, authorNews, sourceNews; ImageView ivImgNews; TextView tvTitleNews, tvContentNews, tvDateNews, tvAuthorNews, tvSourceNews; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail_news); // Setting Toolbar getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle("Detail News"); bindView(); imgNews = getIntent().getStringExtra("imgNews"); titleNews = getIntent().getStringExtra("titleNews"); contentNews = getIntent().getStringExtra("contentNews"); dateNews = getIntent().getStringExtra("dateNews"); authorNews = getIntent().getStringExtra("authorNews"); sourceNews = getIntent().getStringExtra("sourceNews"); Glide.with(getApplicationContext()) .load(imgNews) .placeholder(R.drawable.no_image_icon) .into(ivImgNews); tvTitleNews.setText(titleNews); tvContentNews.setText(contentNews); tvDateNews.setText(dateNews); tvSourceNews.setText("view more"); tvAuthorNews.setText(authorNews); tvSourceNews.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(sourceNews))); } }); } public void bindView(){ ivImgNews = (ImageView) findViewById(R.id.img_news); tvTitleNews = (TextView) findViewById(R.id.title_news); tvContentNews = (TextView) findViewById(R.id.content_news); tvAuthorNews = (TextView) findViewById(R.id.author_news); tvDateNews = (TextView) findViewById(R.id.date_news); tvSourceNews = (TextView) findViewById(R.id.source_news); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.action_menu, menu); return super.onCreateOptionsMenu(menu); } @Override public void onBackPressed() { super.onBackPressed(); overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case android.R.id.home : { finish(); overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right); break; } case R.id.share : { Intent i = new Intent(android.content.Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(android.content.Intent.EXTRA_TEXT, titleNews+"\n\n"+contentNews+"\n\n"+sourceNews); startActivity(Intent.createChooser(i, "Share this Article ?")); break; } } return super.onOptionsItemSelected(item); } }
[ "nikkoeka04@gmail.com" ]
nikkoeka04@gmail.com
2b29de801ff6bb5b2a6331ec5d9a2108017de5f5
0f5b39c105ba2e702557f92f6ae81b26ba435d4f
/src/main/java/org/apache/tomcat/util/collections/ConcurrentCache.java
9e7531f528c5949be1496480682a42b63ffcb9be
[ "Apache-2.0" ]
permissive
frpascua/Tomcat-7
31d26447722856f5127cb001bfb49e603d606109
e51fcf57d338eb8d74e638c5a384acd594009b89
refs/heads/master
2023-04-01T23:21:35.882186
2017-02-19T08:33:16
2017-02-19T08:33:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
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.tomcat.util.collections; import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; public final class ConcurrentCache<K, V> { private final int size; private final Map<K, V> eden; private final Map<K, V> longterm; public ConcurrentCache(int size) { this.size = size; this.eden = new ConcurrentHashMap<K, V>(size); this.longterm = new WeakHashMap<K, V>(size); } public V get(K k) { V v = this.eden.get(k); if (v == null) { synchronized (longterm) { v = this.longterm.get(k); } if (v != null) { this.eden.put(k, v); } } return v; } public void put(K k, V v) { if (this.eden.size() >= size) { synchronized (longterm) { this.longterm.putAll(this.eden); } this.eden.clear(); } this.eden.put(k, v); } }
[ "britrock@163.com" ]
britrock@163.com
f6b7c17655bb53dfba0b54dc7ba3404433256c14
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/batik-1.7/sources/org/apache/batik/css/parser/DefaultConditionFactory.java
3d77a8bdf746fe32bab35f93d6677c0bc095822f
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,453
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false parser PACKAGE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false CombinatorCondition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false Condition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false ConditionFactory UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false ContentCondition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false LangCondition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false NegativeCondition UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false sac UNKNOWN_IDENTIFIER false PositionalCondition UNKNOWN_IDENTIFIER false DefaultConditionFactory TYPE_IDENTIFIER true ConditionFactory UNKNOWN_IDENTIFIER false ConditionFactory UNKNOWN_IDENTIFIER false INSTANCE UNKNOWN_IDENTIFIER true DefaultConditionFactory TYPE_IDENTIFIER false DefaultConditionFactory METHOD_IDENTIFIER false CombinatorCondition UNKNOWN_IDENTIFIER false createAndCondition UNKNOWN_IDENTIFIER true Condition UNKNOWN_IDENTIFIER false first UNKNOWN_IDENTIFIER true Condition UNKNOWN_IDENTIFIER false second UNKNOWN_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultAndCondition TYPE_IDENTIFIER false first UNKNOWN_IDENTIFIER false second UNKNOWN_IDENTIFIER false CombinatorCondition UNKNOWN_IDENTIFIER false createOrCondition UNKNOWN_IDENTIFIER true Condition UNKNOWN_IDENTIFIER false first UNKNOWN_IDENTIFIER true Condition UNKNOWN_IDENTIFIER false second UNKNOWN_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false NegativeCondition UNKNOWN_IDENTIFIER false createNegativeCondition UNKNOWN_IDENTIFIER true Condition UNKNOWN_IDENTIFIER false condition UNKNOWN_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false PositionalCondition UNKNOWN_IDENTIFIER false createPositionalCondition UNKNOWN_IDENTIFIER true position VARIABLE_IDENTIFIER true typeNode VARIABLE_IDENTIFIER true type VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createAttributeCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER true specified VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultAttributeCondition TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER false specified VARIABLE_IDENTIFIER false value VARIABLE_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createIdCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultIdCondition TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER false LangCondition UNKNOWN_IDENTIFIER false createLangCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false lang VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultLangCondition TYPE_IDENTIFIER false lang VARIABLE_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createOneOfAttributeCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false nsURI VARIABLE_IDENTIFIER true specified VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultOneOfAttributeCondition TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER false nsURI VARIABLE_IDENTIFIER false specified VARIABLE_IDENTIFIER false value VARIABLE_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createBeginHyphenAttributeCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER true specified VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultBeginHyphenAttributeCondition TYPE_IDENTIFIER false localName VARIABLE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER false specified VARIABLE_IDENTIFIER false value VARIABLE_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createClassCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultClassCondition TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER false value VARIABLE_IDENTIFIER false AttributeCondition UNKNOWN_IDENTIFIER false createPseudoClassCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER true String TYPE_IDENTIFIER false value VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false DefaultPseudoClassCondition TYPE_IDENTIFIER false namespaceURI VARIABLE_IDENTIFIER false value VARIABLE_IDENTIFIER false Condition UNKNOWN_IDENTIFIER false createOnlyChildCondition UNKNOWN_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false Condition UNKNOWN_IDENTIFIER false createOnlyTypeCondition UNKNOWN_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false ContentCondition UNKNOWN_IDENTIFIER false createContentCondition UNKNOWN_IDENTIFIER true String TYPE_IDENTIFIER false data VARIABLE_IDENTIFIER true CSSException UNKNOWN_IDENTIFIER false CSSException UNKNOWN_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
abdf0adad32d84d16c869a6c5565725a3781889d
056ff5f928aec62606f95a6f90c2865dc126bddc
/javashop/shop-core/src/main/java/com/enation/app/shop/component/payment/plugin/alipay/sdk34/api/response/AlipayMarketingVoucherAuthSendResponse.java
855b965ff0551e67480f4c6760a82a371166815e
[]
no_license
luobintianya/javashop
7846c7f1037652dbfdd57e24ae2c38237feb1104
ac15b14e8f6511afba93af60e8878ff44e380621
refs/heads/master
2022-11-17T11:12:39.060690
2019-09-04T08:57:58
2019-09-04T08:57:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
package com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.response; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.AlipayResponse; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.internal.mapping.ApiField; /** * ALIPAY API: alipay.marketing.voucher.auth.send response. * * @author auto create * @since 1.0, 2017-03-28 22:18:44 */ public class AlipayMarketingVoucherAuthSendResponse extends AlipayResponse { private static final long serialVersionUID = 6727728893381958254L; /** * 券ID */ @ApiField("voucher_id") private String voucherId; public void setVoucherId(String voucherId) { this.voucherId = voucherId; } public String getVoucherId( ) { return this.voucherId; } }
[ "sylow@javashop.cn" ]
sylow@javashop.cn
c01241f9366abd38cb5ede9c5ebd0738a2e76f1c
568a75e1cbdbe73af9177312e8519c419f215a94
/Day16/代码/2/src/main/java/activity/MainActivity.java
e0814f829c98dae050c077671fdbaf9dff75e4c3
[]
no_license
daadt/HomeWork
e272e1d4ef7ac41ef7d8272164be3e40bb8fa5ef
883017ccd098093ae094ac11c70aafd82ef99a62
refs/heads/master
2022-11-11T17:54:27.657848
2020-06-27T14:42:40
2020-06-27T14:42:40
268,200,642
0
0
null
null
null
null
UTF-8
Java
false
false
2,957
java
package activity; import android.widget.Toast; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import com.example.douts.R; import java.util.ArrayList; import base.BaseActivity; import base.CommPagerAdapter; import bean.MainPageChangeEvent; import bean.PauseVideoEvent; import butterknife.BindView; import fragment.MainFragment; import fragment.PersonalHomeFragment; import utils.RxBus; /** * create by libo * create on 2020/5/19 * description 主页面 */ public class MainActivity extends BaseActivity { @BindView(R.id.viewpager) ViewPager viewPager; private CommPagerAdapter pagerAdapter; private ArrayList<Fragment> fragments = new ArrayList<>(); public static int curMainPage; private MainFragment mainFragment = new MainFragment(); private PersonalHomeFragment personalHomeFragment = new PersonalHomeFragment(); /** 上次点击返回键时间 */ private long lastTime; /** 连续按返回键退出时间 */ private final int EXIT_TIME = 2000; @Override protected int setLayoutId() { return R.layout.activity_main; } @Override protected void init() { fragments.add(mainFragment); fragments.add(personalHomeFragment); pagerAdapter = new CommPagerAdapter(getSupportFragmentManager(), fragments, new String[]{"",""}); viewPager.setAdapter(pagerAdapter); //点击头像切换页面 RxBus.getDefault().toObservable(MainPageChangeEvent.class) .subscribe((Action1<MainPageChangeEvent>) event -> { if (viewPager != null) { viewPager.setCurrentItem(event.getPage()); } }); viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { curMainPage = position; if (position == 0) { RxBus.getDefault().post(new PauseVideoEvent(true)); } else if (position == 1){ RxBus.getDefault().post(new PauseVideoEvent(false)); } } @Override public void onPageScrollStateChanged(int state) { } }); } @Override public void onBackPressed() { //双击返回退出App if (System.currentTimeMillis() - lastTime > EXIT_TIME) { if (viewPager.getCurrentItem() == 1) { viewPager.setCurrentItem(0); }else{ Toast.makeText(getApplicationContext(), "再按一次退出", Toast.LENGTH_SHORT).show(); lastTime = System.currentTimeMillis(); } } else { super.onBackPressed(); } } }
[ "floveandroid@sina.com" ]
floveandroid@sina.com