blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
b232296b9664dc09c48b946d01ee000733eb135e
2aad35c8b1da4d198fedbc2215781faa3b94ad2d
/app/src/main/java/br/com/compilando/mymarket/SplashActivity.java
52a1baee2fe3d82913796fb1262f7be74dd2043f
[]
no_license
JoseVieiraCF/MyMarket
8a18de03a1100aedea9a36db57a5a658ed6bdb46
835169c4506ac0d89c699c0998f9011eb8bf1613
refs/heads/master
2020-06-16T22:05:25.209847
2019-07-11T20:04:26
2019-07-11T20:04:26
195,717,087
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package br.com.compilando.mymarket; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class SplashActivity extends AppCompatActivity { Button btn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); btn = findViewById(R.id.btnCall); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(SplashActivity.this,MainActivity.class); startActivity(i); } }); } }
[ "josecarlos8161@gmail.com" ]
josecarlos8161@gmail.com
650b35b53256428e8bd0a35b97ec95a6403b5278
a98e2bf2bebedfa8a6e240d15cf8fc8b0debdb73
/Lab3/A3-MinTree/src/gen/lang/ast/Opt.java
473dd3ce5595a6333c265f7c2887cfe73252c2f4
[]
no_license
miquelpuigmena/CompilerSimpliCInJava
9b0e2a93de0b02345d4832c81013984cfe7b494a
674b622e0d225a9ad2222e3362ae90aed850ed2e
refs/heads/master
2020-07-24T02:23:26.719621
2019-10-22T11:00:51
2019-10-22T11:00:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,228
java
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ package lang.ast; import java.io.PrintStream; /** * @ast node * @astdecl Opt : ASTNode; * @production Opt : {@link ASTNode}; */ public class Opt<T extends ASTNode> extends ASTNode<T> implements Cloneable { /** * @declaredat ASTNode:1 */ public Opt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @declaredat ASTNode:10 */ public void init$Children() { } /** * @declaredat ASTNode:12 */ public Opt(T opt) { setChild(opt, 0); } /** @apilevel internal * @declaredat ASTNode:16 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal * @declaredat ASTNode:20 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal * @declaredat ASTNode:24 */ public Opt<T> clone() throws CloneNotSupportedException { Opt node = (Opt) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:29 */ public Opt<T> copy() { try { Opt node = (Opt) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); } return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead * @declaredat ASTNode:48 */ @Deprecated public Opt<T> fullCopy() { return treeCopyNoTransform(); } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @declaredat ASTNode:58 */ public Opt<T> treeCopyNoTransform() { Opt tree = (Opt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if (child != null) { child = child.treeCopyNoTransform(); tree.setChild(child, i); } } } return tree; } /** * Create a deep copy of the AST subtree at this node. * The subtree of this node is traversed to trigger rewrites before copy. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @declaredat ASTNode:78 */ public Opt<T> treeCopy() { Opt tree = (Opt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); if (child != null) { child = child.treeCopy(); tree.setChild(child, i); } } } return tree; } /** @apilevel internal * @declaredat ASTNode:92 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node); } }
[ "miquelpuigmena@gmail.com" ]
miquelpuigmena@gmail.com
b66dd0c830e8a0a1b89cb1bb6bd7dadc1ac64ea7
924b82ccc05ec2c9d3b68e128ce9df1aaef9ea2c
/Myshopping/src/main/java/com/fjt/repository/impl/OrderItemRepoImpl.java
506693a705015ecae247ed1b985a9e9350b74a47
[]
no_license
AronHub/myProject
2de33f8c4825239daadaf1e1dcbda88e85e2837d
96cde235cf02cd5ff573a092fc29ea57dd8d582e
refs/heads/master
2022-12-21T13:34:55.570758
2019-09-18T07:57:48
2019-09-18T07:57:48
195,384,180
0
0
null
2022-12-16T02:41:53
2019-07-05T09:45:47
Java
UTF-8
Java
false
false
148
java
package com.fjt.repository.impl; import com.fjt.repository.custom.OrderItemCustom; public class OrderItemRepoImpl implements OrderItemCustom{ }
[ "416926039@qq.com" ]
416926039@qq.com
d02f1403b0b92be77550bdc90cebc4664ebeb474
8616be0c3c20420395481e7080441ebb5c78d8bf
/Project1/src/com/yedam/interfaces/EmpServiceImpl.java
47135403a42d1d0ae8e3c06a15d900a3d2dc5d1b
[]
no_license
gaexpa004432/firstjava
34344ac1d865090a1de1ee961e621c0ab5829a71
fc5a794e332781c20e1fbe7a4d508bb2e267e397
refs/heads/master
2022-11-25T10:34:41.653619
2020-07-17T00:07:59
2020-07-17T00:07:59
261,940,834
0
0
null
null
null
null
UTF-8
Java
false
false
489
java
package com.yedam.interfaces; public class EmpServiceImpl implements EmpService{ EmpDAO dao = new EmpDAO(); @Override public void createEmp(Employee emp) { dao.insertEmp(emp); } @Override public void getEmpList() { for(Employee emp : dao.getEmpList()) { if (null != emp) { System.out.println(emp.toString()); }} } @Override public void changeEmp(Employee emp) { dao.updateEmp(emp); } @Override public void removeEmp(int empid) { dao.deleteEmp(empid); } }
[ "admin@YD03-18" ]
admin@YD03-18
ce7a1d54965fba768053a14ca7b5b9de3d97b482
3c4d1604e615e8c4d208ddc4bd0af246fcc34c64
/app/src/main/java/e/jesus/sharedpreference/MainActivity.java
ef411ac2ee48e579d5e3d2f2b53aa500039f8194
[]
no_license
JesusJaimeCano/SharedPreferences
12ca552d219df65d4c4b83ec28a20d1bdf4b0bfc
fbb038cb29a6994eb03495ecfb4a85ba49123581
refs/heads/master
2021-09-02T03:32:51.739168
2017-12-30T00:12:56
2017-12-30T00:12:56
115,762,806
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package e.jesus.sharedpreference; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class MainActivity extends AppCompatActivity { MyPreferences preferences; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); preferences = new MyPreferences(this); if (!preferences.isFirstTime()){ Intent i = new Intent(this, Actividad2.class); i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivity(i); finish(); } } public void guardarUsuario(View v){ EditText usuario = findViewById(R.id.usuarioET); preferences.setUserName(usuario.getText().toString()); Intent i = new Intent(this, Actividad2.class); i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivity(i); finish(); } }
[ "32400980+JesusJaimeCano@users.noreply.github.com" ]
32400980+JesusJaimeCano@users.noreply.github.com
3de600b390e61f705929a70911a2c2ffb897222d
a13e706ad9824f8d4c5d2af0e8b508b3f70ffb63
/Team Knuth Submission File/Team Knuth Code/src/config/Keys.java
a22b5eb429afe856ba607c794122e4e0ac48a13d
[]
no_license
MatthewRandle/vultureservices
41ed1d7beedee888540a48d1c40a717fa36cefb9
2ed1cd4d16921171c17c2c92eacfb8891b755fe8
refs/heads/master
2020-05-20T06:14:50.032134
2019-05-16T08:10:29
2019-05-16T08:10:29
185,423,985
0
0
null
null
null
null
UTF-8
Java
false
false
238
java
package config; public class Keys { public static String databaseURL = "jdbc:mysql://remotemysql.com:3306/TiqtIjwWJq"; public static String databaseUser = "TiqtIjwWJq"; public static String databasePassword = "KqQQznF1IA"; }
[ "42222293+Ryanp1998@users.noreply.github.com" ]
42222293+Ryanp1998@users.noreply.github.com
11c65506bc286ca937aa0a3b889ab1aa578633c9
ced11fd402c75ef685e72ac88910ce2b69daa2ff
/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/ProgressPanel.java
b877663351cc02d3fded6c67c27d425267fff9b7
[]
no_license
COLTRAM/cling
eeedde664de2995c56cdb1b4e0452ee3628d72f6
02a30774315a6f26da4a916c4ef88ce18f7d86df
refs/heads/master
2021-01-14T14:29:04.853829
2014-04-02T16:16:39
2014-04-02T16:16:39
18,370,971
2
1
null
null
null
null
UTF-8
Java
false
false
3,183
java
/* * Copyright (C) 2013 4th Line GmbH, Switzerland * * The contents of this file are subject to the terms of either the GNU * Lesser General Public License Version 2 or later ("LGPL") or the * Common Development and Distribution License Version 1 or later * ("CDDL") (collectively, the "License"). You may not use this file * except in compliance with the License. See LICENSE.txt for more * information. * * 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. */ package org.fourthline.cling.workbench.plugins.avtransport.impl; import org.fourthline.cling.support.model.PositionInfo; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.event.ChangeListener; import java.awt.Dimension; /** * @author Christian Bauer */ public class ProgressPanel extends JPanel { final private JSlider positionSlider = new JSlider(0, 100, 0); final private JLabel positionLabel = new JLabel(); private PositionInfo positionInfo; public ProgressPanel() { super(); setBorder(BorderFactory.createTitledBorder("Position")); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); positionLabel.setText("00:00:00/00:00:00"); positionLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); positionSlider.setEnabled(false); positionSlider.setPreferredSize(new Dimension(200, 24)); add(positionSlider); add(positionLabel); } public JSlider getPositionSlider() { return positionSlider; } public void setProgress(PositionInfo positionInfo) { if (positionInfo == null) { positionLabel.setText("00:00:00/00:00:00"); setPositionSliderWithoutNotification(0); } else { if (positionInfo.getTrackDurationSeconds() > 0) { positionLabel.setText(positionInfo.getRelTime() + "/" + positionInfo.getTrackDuration()); setPositionSliderWithoutNotification(positionInfo.getElapsedPercent()); positionSlider.setEnabled(true); } else { positionLabel.setText(positionInfo.getRelTime()); positionSlider.setEnabled(false); } } this.positionInfo = positionInfo; } // Internal re-positioning, should not fire a Seek UPnP action, so we remove // the listener before and add it back afterwards protected void setPositionSliderWithoutNotification(int value) { if (value == positionSlider.getValue()) return; ChangeListener[] listeners = positionSlider.getChangeListeners(); for (ChangeListener listener : listeners) { positionSlider.removeChangeListener(listener); } positionSlider.setValue(value); for (ChangeListener listener : listeners) { positionSlider.addChangeListener(listener); } } public PositionInfo getPositionInfo() { return positionInfo; } }
[ "cb@4thline.com" ]
cb@4thline.com
0f4ee898272e508e8a6102e833d6803387022465
49cf058f67c9083746ba144ba88825a8d474fb70
/src/test/java/com/abouerp/zsc/library/utils/IpResolutionUtilTest.java
7935fa9a98dbe8da4d58045cc2d43235fc8d0a5e
[]
no_license
Abouerp/web-library
d33b6092aa7f8a28516da5c435b240554a767035
a30aa6002b9dec61260939710ba94d9fad83bd76
refs/heads/master
2023-04-20T20:48:29.232886
2021-03-15T03:47:35
2021-03-15T03:47:35
327,958,328
12
0
null
null
null
null
UTF-8
Java
false
false
559
java
package com.abouerp.zsc.library.utils; import com.abouerp.zsc.library.dto.IpResolutionDTO; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; /** * @author Abouerp */ @SpringBootTest @RunWith(SpringRunner.class) public class IpResolutionUtilTest { @Test public void test1() { IpResolutionDTO ipResolutionDTO = IpResolutionUtils.resolution("113.100.28.123"); System.out.println(ipResolutionDTO); } }
[ "1057240821@qq.com" ]
1057240821@qq.com
048fa8cce316673a57935f6efb24c2040208e1ea
fa6da1c8225d1425757dcb45a13f739090c79c6a
/app/src/androidTest/java/com/example/abunaim/myapplication/ApplicationTest.java
8c41c077a509bc339b9e083f07f8f8f8b3cc5eaa
[]
no_license
ShaimaAbuNaim/Calcualtor_assignment2
f8fc957103e7f1bef8b8114bbe3617ed6e4f0a0f
a52c92996b4396c17bfc0ec497451aa6a4ddd5e2
refs/heads/master
2020-04-06T03:56:36.148107
2015-03-29T05:43:14
2015-03-29T05:43:14
33,049,546
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package com.example.abunaim.myapplication; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "shaima.abunaim@gmail.com" ]
shaima.abunaim@gmail.com
a25c09ff353d3b45c5563eac5b77d1b6a5cf3bce
c3e5df121cc2430f228305abfbfb987384be4bea
/notepadv3/app/src/androidTest/java/es/unizar/eina/notepadv3/unitarias/Notepadv3Test.java
5f42636dd1abf8a8d37e0b3f18c8c7a195cc64c2
[]
no_license
javiermixture17/unizar-vv-notas
30aa8ea3cb94331bbc5075cb43f5e652f3d7fbbb
36cb3bfbd72e774423c5ecf7fb63f746e4afeaaf
refs/heads/master
2020-04-28T09:55:18.841407
2019-06-18T15:50:05
2019-06-18T15:50:05
175,184,824
0
0
null
null
null
null
UTF-8
Java
false
false
2,154
java
package es.unizar.eina.notepadv3.unitarias; import android.database.Cursor; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import java.util.Date; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.rule.ActivityTestRule; import es.unizar.eina.notepadv3.Notepadv3; import es.unizar.eina.notepadv3.NotesDbAdapter; import static org.junit.Assert.*; @RunWith(AndroidJUnit4.class) public class Notepadv3Test { @Rule public ActivityTestRule<Notepadv3> activityRule = new ActivityTestRule<>(Notepadv3.class); Notepadv3 mNotepad; long idNuevaNota; @Before public void setUp() { mNotepad = activityRule.getActivity(); } @After public void tearDown(){ mNotepad.getAdapter().deleteNote(idNuevaNota); } @Test() public void test_P1(){ int numeroNotas = mNotepad.getAdapter().fetchAllNotes().getCount(); idNuevaNota = mNotepad.getAdapter().createNote("Prueba", "", -1, new Date(), new Date()); Cursor notasTrasInsercion = mNotepad.getAdapter().fetchAllNotes(); assertEquals(numeroNotas + 1, notasTrasInsercion.getCount()); } @Test() public void test_P2(){ //Commit a Pedro String titulo = "test2"; String cuerpo = "abc"; int categoriaId = -1; Date fecha = new Date(); idNuevaNota = mNotepad.getAdapter().createNote(titulo, cuerpo, categoriaId, fecha, fecha); Cursor salida = mNotepad.getAdapter().fetchNote(idNuevaNota); assertEquals(titulo, salida.getString(salida.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE))); assertEquals(cuerpo, salida.getString(salida.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY))); assertEquals(categoriaId, salida.getInt(salida.getColumnIndexOrThrow(NotesDbAdapter.KEY_CATEGORY))); assertEquals(fecha.getTime(), salida.getLong(salida.getColumnIndexOrThrow(NotesDbAdapter.KEY_ACTIVATION_DATE))); assertEquals(fecha.getTime(), salida.getLong(salida.getColumnIndexOrThrow(NotesDbAdapter.KEY_EXPIRATION_DATE))); } }
[ "pedromalo@live.com" ]
pedromalo@live.com
87e831ad0db4a12a222ade5358bf2c0e01f2fe41
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_083f4834cb91ea35ca08e3b58b70ae2bee0b7faa/UtteranceActionProposer/2_083f4834cb91ea35ca08e3b58b70ae2bee0b7faa_UtteranceActionProposer_s.java
bebe83b61907478e34c908dae3c898ef6c7ab925
[]
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
31,845
java
/** * Copyright (C) 2009 University of Twente. All rights reserved. * Use is subject to license terms -- see license.txt. */ package eu.semaine.components.dialogue.actionproposers; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import javax.jms.JMSException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import eu.semaine.components.Component; import eu.semaine.components.dialogue.datastructures.AgentUtterance; import eu.semaine.components.dialogue.datastructures.DialogueAct; import eu.semaine.components.dialogue.datastructures.EmotionEvent; import eu.semaine.datatypes.stateinfo.AgentStateInfo; import eu.semaine.datatypes.stateinfo.DialogStateInfo; import eu.semaine.datatypes.stateinfo.UserStateInfo; import eu.semaine.datatypes.xml.BML; import eu.semaine.datatypes.xml.FML; import eu.semaine.datatypes.xml.SSML; import eu.semaine.datatypes.xml.SemaineML; import eu.semaine.exceptions.MessageFormatException; import eu.semaine.jms.message.SEMAINEAgentStateMessage; import eu.semaine.jms.message.SEMAINEMessage; import eu.semaine.jms.message.SEMAINEUserStateMessage; import eu.semaine.jms.message.SEMAINEXMLMessage; import eu.semaine.jms.receiver.AgentStateReceiver; import eu.semaine.jms.receiver.UserStateReceiver; import eu.semaine.jms.receiver.XMLReceiver; import eu.semaine.jms.sender.FMLSender; import eu.semaine.jms.sender.StateSender; import eu.semaine.jms.sender.XMLSender; import eu.semaine.util.XMLTool; /** * The UtteranceActionProposer determines what to say based on the current context. * TODO: uitbreiden, precieze werking beschrijven in details * * Input * AgentStateReceiver('emaine.data.state.agent') --> take/release turn messages * UserStateReceiver('semaine.data.state.user.behaviour') --> user speaking state and detected emotions * XMLReceiver('semaine.data.state.context') --> For context information such as user present and the current character * * Output * FMLSender('semaine.data.action.candidate.function') --> utterances to the output modules * DialogStateSender('semaine.data.state.dialog') --> dialog state (speaker & listener) * XMLSender('semaine.data.state.context') --> For context information such as user present and the current character * * @author MaatM * */ public class UtteranceActionProposer extends Component { /* Agent states */ public final static int WAITING = 0; // Waiting for the other person to start speaking public final static int LISTENING = 1; // Listening to the speech of the user public final static int SPEAKING = 2; // The agent is speaking /* The four characters */ public final static int POPPY = 1; public final static int PRUDENCE = 2; public final static int SPIKE = 3; public final static int OBADIAH = 4; private HashMap<Integer,String> charNames = new HashMap<Integer,String>(); private HashMap<String,Integer> charNumbers = new HashMap<String,Integer>(); private HashMap<Integer,Boolean> charHistory = new HashMap<Integer,Boolean>(); /* The current character */ private int currChar = 1; private boolean systemStarted = false; /* Change character states */ public final static int NEUTRAL = 0; public final static int CHANGE_ASKED = 1; public final static int CHAR_SUGGESTED = 2; public final static int CHAR_ASKED = 3; public int charChangeState = 0; public int suggestedChar = 0; /* Character startup states */ public final static int INTRODUCED = 1; public final static int HOW_ARE_YOU_ASKED = 2; public int charStartupState = 0; /* Thresholds */ public final static float HIGH_AROUSAL = 0.8f; public final static float LOW_AROUSAL = 0.1f; public final static long SMALL_UTTERANCE = 3000; public final static int UTTERANCE_LOOKBACK = 4; /* Data locations */ public final static String sentenceDataPath = "/eu/semaine/components/dialog/data/sentences.xml"; /* Senders and Receivers */ private AgentStateReceiver agentStateReceiver; private XMLReceiver userStateReceiver; private XMLReceiver contextReceiver; private FMLSender fmlSender; private StateSender dialogStateSender; private XMLSender contextSender; /* The current state of the agent */ public int agentSpeakingState = 1; // 0, 1, or 2 private long agentSpeakingStateTime = 0; /* Turn state of speaker */ private int userSpeakingState = 1; // 1 or 2 private long userSpeakingStateTime = 0; /* List of detected emotion events (generated by the EmotionInterpreter) */ private ArrayList<EmotionEvent> detectedEmotions = new ArrayList<EmotionEvent>(); private int emotionIndex = 0; /* List of all detected Dialogue Acts (generated by the UtteranceInterpreter) */ private ArrayList<DialogueAct> detectedDActs = new ArrayList<DialogueAct>(); private int dActIndex = 0; /* All agent utterances grouped by utterance-type */ private HashMap<Integer,HashMap<String,ArrayList<String>>> allUtterances = new HashMap<Integer,HashMap<String,ArrayList<String>>>(); private ArrayList<AgentUtterance> utteranceHistory = new ArrayList<AgentUtterance>(); private int subjectIndex = 0; /* The current user */ private boolean isUserPresent = false; private static final String PRESENT = "present"; private static final String ABSENT = "absent"; /* Random generator */ private Random rand = new Random(); /** * Constructor of UtteranceActionProposer * Initializes the senders and receivers, randomly determines the first character and * initializes some data * @throws JMSException */ public UtteranceActionProposer() throws JMSException { super( "UtteranceActionProposer" ); /* Initialize receivers */ agentStateReceiver = new AgentStateReceiver( "semaine.data.state.agent" ); receivers.add( agentStateReceiver ); userStateReceiver = new XMLReceiver("semaine.data.state.user.behaviour"); receivers.add(userStateReceiver); contextReceiver = new XMLReceiver("semaine.data.state.context"); receivers.add( contextReceiver ); /* Initialize senders */ fmlSender = new FMLSender("semaine.data.action.candidate.function", getName()); senders.add(fmlSender); dialogStateSender = new StateSender("semaine.data.state.dialog", "DialogState", getName()); senders.add(dialogStateSender); contextSender = new XMLSender("semaine.data.state.context", "SemaineML", getName()); senders.add(contextSender); /* Determine the first character */ currChar = rand.nextInt(4)+1; /* Initialize some data */ initData(); } /** * Initializes the utterances of the characters, the character names, and the character history */ public void initData() { /* Reads the utterances of all the characters */ SentenceReader sentenceReader = new SentenceReader( sentenceDataPath ); if( sentenceReader.readData() ) { allUtterances = sentenceReader.getAllUtterances(); } else { // TODO: Log error } /* Set the character name to number conversion maps */ charNames.put( POPPY, "Poppy" ); charNames.put( PRUDENCE, "Prudence" ); charNames.put( SPIKE, "Spike" ); charNames.put( OBADIAH, "Obadiah" ); charNumbers.put("poppy", POPPY); charNumbers.put("prudence", PRUDENCE); charNumbers.put("spike", SPIKE); charNumbers.put("obadiah", OBADIAH); /* resets the chat history of the characters (this determines if the characters have spoken * with these characters before in this conversation */ charHistory.put( POPPY, false ); charHistory.put( PRUDENCE, false ); charHistory.put( SPIKE, false ); charHistory.put( OBADIAH, false ); } /** * Checks if the system has started. If it hasn't it will start it by making the first * character introduce itself. */ public void act() throws JMSException { // if( !systemStarted && isUserPresent ) { // /* Update agent speaking state */ // agentSpeakingState = SPEAKING; // // charStartupState = INTRODUCED; // sendNewCharacter( currChar ); // // charHistory.put(currChar, true); // sendUtterance( pickUtterances("intro_new") ); // // systemStarted = true; // // /* TEMPORARILY called until the end of the agent utterance is received from the output module */ // processUtteranceEnd(); // } } /** * Sets context variables if updates are received. * If it receives the message that the agent should start talking it will determine what to say * and output this. */ public void react( SEMAINEMessage m ) throws JMSException { /* Processes User state updates */ if( m instanceof SEMAINEUserStateMessage ) { SEMAINEUserStateMessage um = ((SEMAINEUserStateMessage)m); /* Updates user speaking state (speaking or silent) */ setUserSpeakingState( um ); /* Updates detected emotions (valence, arousal, interest) */ addDetectedEmotions( um ); } /* Processes XML updates */ if( m instanceof SEMAINEXMLMessage ) { SEMAINEXMLMessage xm = ((SEMAINEXMLMessage)m); /* Updated analyzed Dialogue Acts history */ addDetectedDActs( xm ); /* Updates the current character and the user */ updateCharacterAndUser( xm ); } /* If the TurnTakingInterpreter decides that the agent should speak, determine what to say */ if( agentShouldSpeak( m ) ) { /* Update agent speaking state */ agentSpeakingState = SPEAKING; AgentUtterance utterance = null; /* Check if the character change process should be started or continued */ utterance = manageCharChange(); if( utterance == null ) { /* Check if the character start process should be started or continued */ utterance = manageAgentStart(); if( utterance == null ) { /* Get an utterance to say */ utterance = getResponse(); } } /* Distribute the chosen utterance */ sendUtterance( utterance ); /* TEMPORARILY called until the end of the agent utterance is received from the output module */ processUtteranceEnd(); } } public void updateCharacterAndUser( SEMAINEXMLMessage xm ) throws JMSException { Document doc = xm.getDocument(); Element root = doc.getDocumentElement(); if (!root.getTagName().equals(SemaineML.E_CONTEXT)) { return; } if (!root.getNamespaceURI().equals(SemaineML.namespaceURI)) { throw new MessageFormatException("Unexpected document element namespace: expected '"+SemaineML.namespaceURI+"', found '"+root.getNamespaceURI()+"'"); } boolean newUser = false; List<Element> users = XMLTool.getChildrenByTagNameNS(root, SemaineML.E_USER, SemaineML.namespaceURI); for( Element user : users ) { String status = user.getAttribute( SemaineML.A_STATUS ); if( status.equals(PRESENT) && !isUserPresent ) { newUser = true; userAppeared(); } else if( status.equals(ABSENT) && isUserPresent ) { userDisappeared(); } } List<Element> characters = XMLTool.getChildrenByTagNameNS(root, SemaineML.E_CHARACTER, SemaineML.namespaceURI); for( Element characterElem : characters ) { if( systemStarted ) { String charName = characterElem.getAttribute(SemaineML.A_NAME); charStartupState = INTRODUCED; /* Update agent speaking state */ agentSpeakingState = SPEAKING; currChar = charNumbers.get( charName.toLowerCase() ); if( charHistory.get(currChar) ) { sendUtterance( pickUtterances("intro_old") ); } else { charHistory.put(currChar, true); sendUtterance( pickUtterances("intro_new") ); } /* TEMPORARILY called until the end of the agent utterance is received from the output module */ processUtteranceEnd(); } } if( newUser && charStartupState != INTRODUCED ) { charStartupState = INTRODUCED; /* Update agent speaking state */ agentSpeakingState = SPEAKING; if( charHistory.get(currChar) ) { sendUtterance( pickUtterances("intro_old") ); } else { charHistory.put(currChar, true); sendUtterance( pickUtterances("intro_new") ); } /* TEMPORARILY called until the end of the agent utterance is received from the output module */ processUtteranceEnd(); } } /** * Called when a user is detected in the screen. * TODO: Not yet called, if it is called I should also remove this section from act() * @throws JMSException */ public void userAppeared() throws JMSException { isUserPresent = true; systemStarted = true; } /** * Called when the user disappears from the screen * TODO: Not yet called, goodbye-sentences should also be added to sentences.xml * @throws JMSException */ public void userDisappeared() throws JMSException { charStartupState = NEUTRAL; isUserPresent = false; /* Update agent speaking state */ agentSpeakingState = SPEAKING; sendUtterance( pickUtterances("goodbye") ); /* resets the chat history of the characters (this determines if the characters have spoken * with these characters before in this conversation */ charHistory.put( POPPY, false ); charHistory.put( PRUDENCE, false ); charHistory.put( SPIKE, false ); charHistory.put( OBADIAH, false ); systemStarted = false; } /** * Manages the character change process. * If the user is in this process it will determine what the next step is and return * an AgentUtterance to speak. * If the user is not in the character change process it will return null * @throws JMSException */ public AgentUtterance manageCharChange() throws JMSException { /* Make a list of all analyzed Dialogue Acts since the last time the agent talked */ ArrayList<DialogueAct> recentDActs = new ArrayList<DialogueAct>( detectedDActs.subList(dActIndex, detectedDActs.size()) ); if( charChangeState == NEUTRAL ) { /* Determine if the user wants to change the character */ boolean wantChange = false; String targetCharacter = null; for( DialogueAct act : recentDActs ) { if( act.isChangeSpeaker() ) { // User wants to change the speaker wantChange = true; } if( act.getTargetCharacter() != null ) { targetCharacter = act.getTargetCharacter(); } } /* If the use wants to change the system has to determine the next character */ if( wantChange ) { if( targetCharacter != null ) { /* If the user already mentioned a new character then take this */ currChar = charNumbers.get(targetCharacter.toLowerCase()); charStartupState = INTRODUCED; sendNewCharacter( currChar ); charChangeState = NEUTRAL; if( charHistory.get(currChar) ) { return pickUtterances("intro_old"); } else { charHistory.put(currChar, true); return pickUtterances("intro_new"); } } else { /* If the user did not mention a character then either ask for it or propose one */ if( rand.nextBoolean() ) { // Ask for the character charChangeState = CHAR_ASKED; return pickUtterances("ask_next_character"); } else { // Suggest a character charChangeState = CHAR_SUGGESTED; suggestedChar = rand.nextInt(4)+1; while( suggestedChar == currChar ) { suggestedChar = rand.nextInt(4)+1; } return new AgentUtterance( "change_character", "Do you want to talk to " + charNames.get(suggestedChar) + "?" ); } } } } else if( charChangeState == CHAR_ASKED ) { /* If the system just asked for the next character it will have to determine if a suggestion was made */ String targetCharacter = null; for( DialogueAct act : recentDActs ) { if( act.getTargetCharacter() != null ) { targetCharacter = act.getTargetCharacter(); } } if( targetCharacter != null ) { /* If the user chose a character then take this one */ currChar = charNumbers.get(targetCharacter.toLowerCase()); sendNewCharacter( currChar ); charStartupState = INTRODUCED; charChangeState = NEUTRAL; if( charHistory.get(currChar) ) { return pickUtterances("intro_old"); } else { charHistory.put(currChar, true); return pickUtterances("intro_new"); } } else { /* If the user did not choose a character then try to repair it */ return pickUtterances("repair_ask_next_character"); } } else if( charChangeState == CHAR_SUGGESTED ) { /* If the system just suggested a character than it will have to determine if the user * agreed or disagreed with this suggestion */ boolean agree = false; boolean disagree = false; for( DialogueAct act : recentDActs ) { if( act.isAgree() ) { agree = true; } if( act.isDisagree() ) { disagree = true; } } if( !agree && !disagree ) { /* If the user did not give any sign try to repair it */ return pickUtterances("repair_suggest_next_character"); } else if( agree ) { /* If the user agreed to the suggestion then use it */ currChar = suggestedChar; charStartupState = INTRODUCED; sendNewCharacter( currChar ); charChangeState = NEUTRAL; if( charHistory.get(currChar) ) { return pickUtterances("intro_old"); } else { charHistory.put(currChar, true); return pickUtterances("intro_new"); } } else if( disagree ) { /* If the user disagreed to the suggestion then ask for the next character */ charChangeState = CHAR_ASKED; return pickUtterances("ask_next_character"); } } return null; } /** * Manages the agent startup process * If the user is in this process it will determine what the next step in the process is * and return an AgentUtterance to speak. * If the user is not in this process it will return null. */ public AgentUtterance manageAgentStart( ) { if( charStartupState == INTRODUCED ) { /* If the system just introduced himself then ask how the user feels today */ charStartupState = HOW_ARE_YOU_ASKED; return pickUtterances("intro_how_are_you"); } else if( charStartupState == HOW_ARE_YOU_ASKED ) { /* If the system just asked how the user feels it will ask the user to tell it more */ charStartupState = NEUTRAL; return pickUtterances("intro_tell_me_more"); } return null; } /** * Reads the messages from the TurnTakingInterpreter and decides if the agent should * start speaking or not. * @param m - the received message * @return - true if the user should speak, false it if shouldn't */ public boolean agentShouldSpeak( SEMAINEMessage m ) { /* Check if the system has started, if not return false */ if( !systemStarted ) { return false; } if( m instanceof SEMAINEAgentStateMessage ) { SEMAINEAgentStateMessage am = (SEMAINEAgentStateMessage)m; AgentStateInfo agentInfo = am.getState(); Map<String,String> agentInfoMap = agentInfo.getInfo(); String intention = agentInfoMap.get("intention"); if( intention != null && intention.equals("speaking") ) { if( agentSpeakingState == SPEAKING ) { return false; } else { return true; } } else { return false; } } return false; } /** * Determines what to say based on the context * Currently, the context means: detected arousal, length of the user utterance, * and the history of agent utterances. * @return the AgentUtterance to speak next */ public AgentUtterance getResponse() { /* Determine high and low arousal indicators and user utterance length */ int high_intensity_arousal = 0; int low_intensity_arousal = 0; long user_utterance_length = meta.getTime() - agentSpeakingStateTime; for( int i=emotionIndex; i< detectedEmotions.size(); i++ ) { EmotionEvent ee = detectedEmotions.get(i); if( ee.getType() == EmotionEvent.AROUSAL ) { if( ee.getIntensity() > HIGH_AROUSAL ) { high_intensity_arousal++; } else if( ee.getIntensity() < LOW_AROUSAL ) { low_intensity_arousal++; } } } /* Determine the number of 'tell me more' utterances in this subject */ int tellMeMoreCounter = 0; for( int i=subjectIndex; i<utteranceHistory.size(); i++ ) { AgentUtterance utterance = utteranceHistory.get(i); if( utterance.getType().equals("tell_me_more") ) { tellMeMoreCounter++; } } if( high_intensity_arousal-low_intensity_arousal > 0 || (high_intensity_arousal > 0 && low_intensity_arousal == high_intensity_arousal) ) { /* If there are high arousal indicators and there are more than low arousal indicators * respond with a 'high arousal utterance' */ AgentUtterance uttr = pickUtterances( "high_arousal" ) ; if( uttr != null ) { return uttr; } } else if( low_intensity_arousal-high_intensity_arousal > 0 ) { /* If there are low arousal indicators and there are more than high arousal indicators * respond with a 'low arousal utterance' */ AgentUtterance uttr = pickUtterances( "low_arousal" ) ; if( uttr != null ) { return uttr; } } if( tellMeMoreCounter >= 2 ) { /* If the number of 'tell me more' utterances is greater than 2 * change the subject or change the character */ if( rand.nextBoolean() ) { subjectIndex = utteranceHistory.size()-1; return pickUtterances("change_subject"); } else { if( rand.nextBoolean() ) { // Ask for the character charChangeState = CHAR_ASKED; return pickUtterances("ask_next_character"); } else { // Suggest a character charChangeState = CHAR_SUGGESTED; suggestedChar = rand.nextInt(4)+1; while( suggestedChar == currChar ) { suggestedChar = rand.nextInt(4)+1; } return new AgentUtterance( "change_character", "Do you want to talk to " + charNames.get(suggestedChar) + "?" ); } } } else if( agentSpeakingState == LISTENING ) { /* If the user utterance is smaller than a predefined threshold * respond with a 'tell me more utterance' */ if( user_utterance_length < SMALL_UTTERANCE ) { AgentUtterance uttr = pickUtterances( "tell_me_more" ) ; if( uttr != null ) { return uttr; } } } else { /* If no utterance can be determind pick one of the random utterances */ AgentUtterance uttr = pickUtterances( "random" ) ; if( uttr != null ) { return uttr; } } return null; } /** * Based on the given type of sentence this method tries to find an utterance of that type * that hasn't been said for the last x agent utterances. * @param type - the type of the utterance * @return - the AgentUtterance which includes the utterance type and the utterance itself */ public AgentUtterance pickUtterances( String type ) { /* Get all utterances of the given type that haven't been used for the last x utterances */ HashMap<String,ArrayList<String>> utterancesChar = allUtterances.get(currChar); ArrayList<String> utterancesType = utteranceCopy( utterancesChar.get(type) ); for( int i=utteranceHistory.size()-1; i>=0; i-- ) { AgentUtterance uttr = utteranceHistory.get(i); if( utterancesType.contains( uttr.getUtterance() ) ) { utterancesType.remove(uttr.getUtterance()); } } if( utterancesType.size() == 0 ) { /* If the list is empty do something else */ if( !type.equals("ask_next_character") && !type.equals("repair_ask_next_character") && !type.equals("suggest_next_character")&& !type.equals("repair_suggest_next_character") ) { charChangeState = CHAR_ASKED; return pickUtterances("ask_next_character"); } else { charChangeState = NEUTRAL; subjectIndex = utteranceHistory.size()-1; return pickUtterances("change_subject"); } } else { /* If the list isn't empty randomly pick an utterance from the list */ return new AgentUtterance( type, utterancesType.get(rand.nextInt(utterancesType.size())) ); } } /** * Called when the output module messages that the utterance is finished. * Will put the agent state on listening again and send this state around. * TODO: This method isn't called yet! * @throws JMSException */ public void processUtteranceEnd() throws JMSException { agentSpeakingState = LISTENING; agentSpeakingStateTime = meta.getTime(); sendListening(); } /** * Sends the given utterance to the output modules. * * @param utterance * @throws JMSException */ public void sendUtterance( AgentUtterance utterance ) throws JMSException { /* Send utterance to Greta */ String response = utterance.getUtterance(); String id = "s1"; Document doc = XMLTool.newDocument("fml-apml", null, FML.version); Element root = doc.getDocumentElement(); Element bml = XMLTool.appendChildElement(root, BML.E_BML, BML.namespaceURI); bml.setAttribute(BML.A_ID, "bml1"); Element fml = XMLTool.appendChildElement(root, FML.E_FML, FML.namespaceURI); fml.setAttribute(FML.A_ID, "fml1"); Element speech = XMLTool.appendChildElement(bml, BML.E_SPEECH); speech.setAttribute(BML.A_ID, id); speech.setAttribute(BML.E_TEXT, response); speech.setAttribute(BML.E_LANGUAGE, "en-GB"); //speech.setTextContent(response); int counter=1; for( String word : response.split(" ") ) { Element mark = XMLTool.appendChildElement(speech, SSML.E_MARK, SSML.namespaceURI); mark.setAttribute(SSML.A_NAME, id+":tm"+counter); Node text = doc.createTextNode(word); speech.appendChild(text); counter++; } Element mark = XMLTool.appendChildElement(speech, SSML.E_MARK); mark.setAttribute(SSML.A_NAME, id+":tm"+counter); fmlSender.sendXML(doc, meta.getTime()); /* Send the speaking-state around */ sendSpeaking(); /* Set indices */ emotionIndex = detectedEmotions.size(); dActIndex = detectedDActs.size(); /* Add the utterance to the history */ utterance.setTime( meta.getTime() ); utteranceHistory.add( utterance ); } /** * Sends around that the agent is speaking * @throws JMSException */ public void sendSpeaking() throws JMSException { Map<String,String> dialogInfo = new HashMap<String,String>(); dialogInfo.put("speaker", "agent"); dialogInfo.put("listener", "user"); DialogStateInfo dsi = new DialogStateInfo(dialogInfo, null); dialogStateSender.sendStateInfo(dsi, meta.getTime()); } /** * Sends around that the agent is silent * @throws JMSException */ public void sendListening() throws JMSException { Map<String,String> dialogInfo = new HashMap<String,String>(); dialogInfo.put("speaker", "user"); dialogInfo.put("listener", "agent"); DialogStateInfo dsi = new DialogStateInfo(dialogInfo, null); dialogStateSender.sendStateInfo(dsi, meta.getTime()); } /** * Sends around that the system has changed to a new character * @param character the new character * @throws JMSException */ public void sendNewCharacter( int character ) throws JMSException { Document semaineML = XMLTool.newDocument(SemaineML.E_CONTEXT, SemaineML.namespaceURI, SemaineML.version); Element rootNode = semaineML.getDocumentElement(); Element characterElem = XMLTool.appendChildElement(rootNode, SemaineML.E_CHARACTER); characterElem.setAttribute(SemaineML.A_NAME, charNames.get(character)); contextSender.sendXML(semaineML, meta.getTime()); } /** * Reads the received Message and tries to filter out the detected user speaking state. * @param m - the received message */ public void setUserSpeakingState( SEMAINEUserStateMessage m ) { UserStateInfo userInfo = m.getState(); Map<String,String> userInfoMap = userInfo.getInfo(); if( userInfoMap.get("behaviour").equals("speaking") ) { if( userSpeakingState != SPEAKING ) { userSpeakingState = SPEAKING; userSpeakingStateTime = meta.getTime(); } } else if( userInfoMap.get("behaviour").equals("silence") ) { if( userSpeakingState != LISTENING ) { userSpeakingState = LISTENING; userSpeakingStateTime = meta.getTime(); } } } /** * Reads the received Message and tries to filter out the detected Emotion Events. * @param m */ public void addDetectedEmotions( SEMAINEUserStateMessage m ) { UserStateInfo userInfo = m.getState(); Map<String,String> dialogInfoMap = userInfo.getInfo(); if( dialogInfoMap.get("behaviour").equals("valence") ) { float intensity = Float.parseFloat( dialogInfoMap.get("behaviour intensity") ); EmotionEvent ee = new EmotionEvent( meta.getTime(), 0, EmotionEvent.VALENCE, intensity ); detectedEmotions.add( ee ); } else if( dialogInfoMap.get("behaviour").equals("arousal") ) { float intensity = Float.parseFloat( dialogInfoMap.get("behaviour intensity") ); EmotionEvent ee = new EmotionEvent( meta.getTime(), 0, EmotionEvent.AROUSAL, intensity ); detectedEmotions.add( ee ); } else if( dialogInfoMap.get("behaviour").equals("interest") ) { float intensity = Float.parseFloat( dialogInfoMap.get("behaviour intensity") ); EmotionEvent ee = new EmotionEvent( meta.getTime(), 0, EmotionEvent.INTEREST, intensity ); detectedEmotions.add( ee ); } } /** * Reads the received Message and tries to filter out the detected Dialogue Acts. * @param m * @throws JMSException */ public void addDetectedDActs( SEMAINEXMLMessage m ) throws JMSException { Element text = XMLTool.getChildElementByTagNameNS(m.getDocument().getDocumentElement(), SemaineML.E_TEXT, SemaineML.namespaceURI); if( text != null ) { String utterance = text.getTextContent(); DialogueAct act = new DialogueAct(utterance); if( act != null ) { List<Element> features = XMLTool.getChildrenByTagNameNS(text, SemaineML.E_FEATURE, SemaineML.namespaceURI); for( Element feature : features ) { String f = feature.getAttribute( "name" ); if( f.equals("positive") ) act.setPositive(true); if( f.equals("negative") ) act.setNegative(true); if( f.equals("agree") ) act.setAgree(true); if( f.equals("disagree") ) act.setDisagree(true); if( f.equals("about other people") ) act.setAboutOtherPeople(true); if( f.equals("about other character") ) act.setAboutOtherCharacter(true); if( f.equals("about current character") ) act.setAboutCurrentCharacter(true); if( f.equals("about own feelings") ) act.setAboutOwnFeelings(true); if( f.equals("pragmatic") ) act.setPragmatic(true); if( f.equals("about self") ) act.setTalkAboutSelf(true); if( f.equals("future") ) act.setFuture(true); if( f.equals("past") ) act.setPast(true); if( f.equals("event") ) act.setEvent(true); if( f.equals("action") ) act.setAction(true); if( f.equals("laugh") ) act.setLaugh(true); if( f.equals("change speaker") ) act.setChangeSpeaker(true); if( f.equals("target character") ) act.setTargetCharacter( feature.getAttribute("target") ); } detectedDActs.add(act); } } } /** * Makes a deepcopy of the given ArrayList * @param utterances - the list to copy * @return */ public ArrayList<String> utteranceCopy( ArrayList<String> utterances ) { if( utterances == null ) { return new ArrayList<String>(); } ArrayList<String> newUtterances = new ArrayList<String>(); for( String str : utterances ) { newUtterances.add( ""+str ); } return newUtterances; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
60a9cd19c41b85921640d3983f2572fd71062da6
642c84a3999ce0ccbfbde5cfe4b5ccc615eda8ec
/app/src/main/java/com/example/nadeche/nadechestuder_pset2/Story.java
63779e7294e5780f8632497d8c6220a4379ccee1
[]
no_license
nadeche/NadecheStuder-pset2
ecb52f9650bc910230c85eabff9ba02658cb91a7
03fd12f0671914ebad7847f42522d8012f0b5614
refs/heads/master
2016-09-13T19:08:19.483849
2016-04-24T20:24:42
2016-04-24T20:24:42
56,992,164
0
0
null
null
null
null
UTF-8
Java
false
false
3,967
java
/* * Story.java * Madlibs * * Created by Hella Haanstra on April 15, 2016 * * Based on: CS 193A, Marty Stepp * * This class represents a Mad Libs story that comes from a text file. * You can construct it and pass an input stream or Scanner to read the story text. * After constructing it, you can ask it for each placeholder by calling * getNextPlaceholder, then filling in that placeholder by calling fillInPlaceholder. * To see how many placeholders are left, use the methods * getPlaceholderRemainingCount and isFilledIn. * You can get the story's text by calling its toString method. * A Story is Serializable, so it can be packed into an Intent as "extra" data. */ package com.example.nadeche.nadechestuder_pset2; import android.util.Log; import java.io.*; import java.util.*; public class Story implements Serializable { private String text; // text of the story private List<String> placeholders; // list of placeholders to fill in private int filledIn; // number of placeholders that have been filled in private boolean htmlMode; // set to true to surround placeholders with <b></b> tags { // instance initializer; runs before any constructor text = ""; placeholders = new ArrayList<String>(); filledIn = 0; htmlMode = false; clear(); } /** constructs a new Story reading its text from the given input stream */ public Story(InputStream stream) { read(stream); } /** resets the story back to an empty initial state */ public void clear() { text = ""; placeholders.clear(); filledIn = 0; } /** replaces the next unfilled placeholder with the given word */ public void fillInPlaceholder(String word) { if (!isFilledIn()) { text = text.replace("<" + filledIn + ">", word); filledIn++; } } /** returns the next placeholder such as "adjective", * or empty string if story is completely filled in already */ public String getNextPlaceholder() { if (isFilledIn()) { return ""; } else { return placeholders.get(filledIn); } } /** returns total number of placeholders in the story */ public int getPlaceholderCount() { return placeholders.size(); } /** returns how many placeholders still need to be filled in */ public int getPlaceholderRemainingCount() { return placeholders.size() - filledIn; } /** returns true if all placeholders have been filled in */ public boolean isFilledIn() { return filledIn >= placeholders.size(); } /** reads initial story text from the given input stream */ public void read(InputStream stream) { read(new Scanner(stream)); } /** reads initial story text from the given Scanner */ private void read(Scanner input) { while (input.hasNext()) { String word = input.next(); if (word.startsWith("<") && word.endsWith(">")) { // a placeholder; replace with e.g. "<0>" so I can find/replace it easily later // (make them bold so that they stand out!) if (htmlMode) { text += " <b><" + placeholders.size() + "></b>"; } else { text += " <" + placeholders.size() + ">"; } // "<plural-noun>" becomes "plural noun" String placeholder = word.substring(1, word.length() - 1).replace("-", " "); placeholders.add(placeholder); } else { // a regular word; just concatenate if (!text.isEmpty()) { text += " "; } text += word; } } } /** returns story text */ public String toString() { return text; } }
[ "nadeche.studer@gmail.com" ]
nadeche.studer@gmail.com
aabde4e15c114821e0737050ade7f5cbfaad6c0a
d4393460316fb92930b7a0c61fe9424783f18396
/app/src/main/java/com/firststep/beautytips/utils/Constant.java
8097ad78909c4099bebcbb34ad698168730fa60c
[]
no_license
CSClubThirdGeneration/Beauty-Tips
6c1300affade2b1e3f78e2a5be615949fc546370
ec4941f66748bf8cffd19cff90a333b11498ac1f
refs/heads/master
2021-01-01T17:29:01.670787
2017-08-03T19:27:27
2017-08-03T19:27:27
98,081,113
1
1
null
null
null
null
UTF-8
Java
false
false
179
java
package com.firststep.beautytips.utils; /** * Created by Zwe Mun Htun on 7/31/2017. */ public class Constant { public static final String IS_UNI_FORCE = "isUniForced"; }
[ "zwewitt@gmail.com" ]
zwewitt@gmail.com
8404c516967450ec4e580660522f712d21590c21
d9eeea35528ca705a039b2de243283a2482d953b
/Retos en clase/RetoClase24/SistemaColegio/src/vista/MatricularEstudianteFrame.java
68bd5d235e86935be09bbc93e79359174b9300ba
[]
no_license
kbenedetti9/Mision-TIC-Java
832687015fcf6282483e0a2ad80a637557bb66d7
410644f72bc6fc2d3adf64fd2fd9ec1969f86433
refs/heads/master
2023-02-10T08:47:18.920181
2020-12-29T22:31:39
2020-12-29T22:31:39
310,419,515
0
0
null
null
null
null
UTF-8
Java
false
false
17,056
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package vista; import java.util.ArrayList; import javax.swing.DefaultListModel; import modelo.Curso; import modelo.Estudiante; import static modelo.Estudiante.matricularEstudiante; /** * * @author Karen Benedetti M */ public class MatricularEstudianteFrame extends javax.swing.JFrame { ArrayList<Curso> listaCursos = new ArrayList<>(); ArrayList<Estudiante> listaEstudiantes = new ArrayList<>(); ArrayList<Estudiante> listaEstudiantesSeleccionados = new ArrayList<>(); /** * Creates new form MatricularEstudianteFrame */ public MatricularEstudianteFrame() { initComponents(); setLocationRelativeTo(null); llenarListaCursos(); llenarListaEstudiantes(); } /** * 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() { jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); btnMatricular = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); lstEstudiantesSeleccionados = new javax.swing.JList<>(); jScrollPane1 = new javax.swing.JScrollPane(); lstCursos = new javax.swing.JList<>(); jLabel1 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); lstEstudiantes = new javax.swing.JList<>(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); getContentPane().setLayout(null); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel2.setFont(new java.awt.Font("Verdana", 0, 18)); // NOI18N btnMatricular.setBackground(new java.awt.Color(43, 137, 184)); btnMatricular.setFont(new java.awt.Font("Verdana", 0, 16)); // NOI18N btnMatricular.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Guardar.png"))); // NOI18N btnMatricular.setText("Matricular"); btnMatricular.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnMatricularActionPerformed(evt); } }); jPanel3.setBackground(new java.awt.Color(43, 137, 184)); jLabel5.setFont(new java.awt.Font("Nirmala UI", 1, 36)); // NOI18N jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Colegio.png"))); // NOI18N jLabel5.setText("Matricular estudainte"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel5) .addContainerGap(257, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap(25, Short.MAX_VALUE) .addComponent(jLabel5) .addGap(24, 24, 24)) ); lstEstudiantesSeleccionados.setBorder(javax.swing.BorderFactory.createTitledBorder("Estudiantes a matricular")); lstEstudiantesSeleccionados.setFont(new java.awt.Font("Verdana", 0, 16)); // NOI18N lstEstudiantesSeleccionados.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lstEstudiantesSeleccionadosMouseClicked(evt); } }); jScrollPane3.setViewportView(lstEstudiantesSeleccionados); lstCursos.setFont(new java.awt.Font("Verdana", 0, 16)); // NOI18N lstCursos.setModel(new javax.swing.AbstractListModel<String>() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public String getElementAt(int i) { return strings[i]; } }); lstCursos.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lstCursosMouseClicked(evt); } }); jScrollPane1.setViewportView(lstCursos); jLabel1.setFont(new java.awt.Font("Verdana", 0, 16)); // NOI18N jLabel1.setText("Selecciona el curso para asignar estudiantes:"); jLabel6.setFont(new java.awt.Font("Verdana", 0, 18)); // NOI18N jLabel6.setText("CURSO SELECCIONADO:"); lstEstudiantes.setBorder(javax.swing.BorderFactory.createTitledBorder("Estudiantes")); lstEstudiantes.setFont(new java.awt.Font("Verdana", 0, 16)); // NOI18N lstEstudiantes.setModel(new javax.swing.AbstractListModel<String>() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public String getElementAt(int i) { return strings[i]; } }); lstEstudiantes.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lstEstudiantesMouseClicked(evt); } }); jScrollPane2.setViewportView(lstEstudiantes); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(48, 48, 48) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() .addGap(61, 61, 61) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(63, 63, 63) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(219, 219, 219) .addComponent(btnMatricular, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(40, 40, 40) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32) .addComponent(btnMatricular) .addContainerGap(55, Short.MAX_VALUE)) ); getContentPane().add(jPanel1); jPanel1.setBounds(0, -10, 600, 610); setBounds(0, 0, 622, 656); }// </editor-fold>//GEN-END:initComponents private void btnMatricularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMatricularActionPerformed for (Estudiante estudianteRecorrido : listaEstudiantesSeleccionados) { matricularEstudiante(estudianteRecorrido.getId(), Long.parseLong(jLabel2.getText())); } }//GEN-LAST:event_btnMatricularActionPerformed private void lstCursosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lstCursosMouseClicked Curso cursoAEditar = new Curso(); String num = lstCursos.getSelectedValue().split(":")[0]; long numCurso = Long.parseLong(num); for (Curso cursoRecorrido : listaCursos) { if (cursoRecorrido.getId() == numCurso) { cursoAEditar = cursoRecorrido; } } jLabel2.setText(String.valueOf(cursoAEditar.getId())); }//GEN-LAST:event_lstCursosMouseClicked private void lstEstudiantesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lstEstudiantesMouseClicked Estudiante estudianteSeleccionado = new Estudiante(); String num = lstEstudiantes.getSelectedValue().split(":")[0]; long numEstudiante = Long.parseLong(num); for (Estudiante estudianteRecorrido : listaEstudiantes) { if (estudianteRecorrido.getId() == numEstudiante) { estudianteSeleccionado = estudianteRecorrido; } } llenarListaEstudiantesSeleccionados(estudianteSeleccionado); }//GEN-LAST:event_lstEstudiantesMouseClicked private void lstEstudiantesSeleccionadosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lstEstudiantesSeleccionadosMouseClicked Estudiante estudianteSeleccionado = new Estudiante(); String num = lstEstudiantesSeleccionados.getSelectedValue().split(":")[0]; long numEstudiante = Long.parseLong(num); for (Estudiante estudianteRecorrido : listaEstudiantesSeleccionados) { if (estudianteRecorrido.getId() == numEstudiante) { estudianteSeleccionado = estudianteRecorrido; } } listaEstudiantesSeleccionados.remove(estudianteSeleccionado); llenarListaEstudiantesSeleccionados(); }//GEN-LAST:event_lstEstudiantesSeleccionadosMouseClicked public void llenarListaCursos() { Curso curso = new Curso(); listaCursos = curso.leer(); DefaultListModel modeloLista = new DefaultListModel(); for (Curso cursoRecorrido : listaCursos) { modeloLista.addElement(cursoRecorrido.getId() + ": " + cursoRecorrido.getNombre()); } lstCursos.setModel(modeloLista); } public void llenarListaEstudiantes() { Estudiante estudiante = new Estudiante(); listaEstudiantes = estudiante.leer(); DefaultListModel modeloLista = new DefaultListModel(); for (Estudiante estudianteRecorrido : listaEstudiantes) { modeloLista.addElement(estudianteRecorrido.getId() + ": " + estudianteRecorrido.getNombre()); } lstEstudiantes.setModel(modeloLista); } public void llenarListaEstudiantesSeleccionados(Estudiante estudiante) { if (listaEstudiantesSeleccionados.contains(estudiante)) { } else { listaEstudiantesSeleccionados.add(estudiante); DefaultListModel modeloLista = new DefaultListModel(); for (Estudiante estudianteRecorrido : listaEstudiantesSeleccionados) { modeloLista.addElement(estudianteRecorrido.getId() + ": " + estudianteRecorrido.getNombre()); } lstEstudiantesSeleccionados.setModel(modeloLista); } } public void llenarListaEstudiantesSeleccionados() { DefaultListModel modeloLista = new DefaultListModel(); for (Estudiante estudianteRecorrido : listaEstudiantesSeleccionados) { modeloLista.addElement(estudianteRecorrido.getId() + ": " + estudianteRecorrido.getNombre()); } lstEstudiantesSeleccionados.setModel(modeloLista); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(MatricularEstudianteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(MatricularEstudianteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(MatricularEstudianteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(MatricularEstudianteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new MatricularEstudianteFrame().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnMatricular; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JList<String> lstCursos; private javax.swing.JList<String> lstEstudiantes; private javax.swing.JList<String> lstEstudiantesSeleccionados; // End of variables declaration//GEN-END:variables }
[ "kbenedetti9@gmail.com" ]
kbenedetti9@gmail.com
a13b0a145c892b85cef4f4fb45eb7b322cbf3106
f2674933ab7ca084dfd6d5a3fcd1309152e2a56f
/src/main/java/com/yzhh/backstage/api/dto/resume/EducationalBackgroundDTO.java
2c7e68a8ebc40c90f67700bf7f88e496d2c5adc0
[]
no_license
Zhongwt/yizhihenhao
f890f03e04f66ba23e6a9e849640f0eea2aa4046
fae23e4ac91670b5e389612119e5742859150311
refs/heads/master
2020-03-21T18:01:45.635072
2018-10-29T08:08:52
2018-10-29T08:08:52
138,868,284
0
0
null
null
null
null
UTF-8
Java
false
false
2,344
java
package com.yzhh.backstage.api.dto.resume; import javax.validation.constraints.NotNull; import io.swagger.annotations.ApiModelProperty; public class EducationalBackgroundDTO { private Long id; @NotNull @ApiModelProperty(value = "开始时间") private String startTime; @NotNull @ApiModelProperty(value = "结束时间") private String endTime; @NotNull @ApiModelProperty(value = "学历") private String education; @NotNull @ApiModelProperty(value = "学校") private String school; @NotNull @ApiModelProperty(value = "城市") private String city; @NotNull @ApiModelProperty(value = "专业") private String major; @ApiModelProperty(value = "专业类别") private String majorType; @ApiModelProperty(value = "专业课程") private String majorCourses; @ApiModelProperty(value = "专业排名") private String ranking; @ApiModelProperty(value = "荣誉") private String honor; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getSchool() { return school; } public String getEducation() { return education; } public void setEducation(String education) { this.education = education; } public void setSchool(String school) { this.school = school; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getMajor() { return major; } public void setMajor(String major) { this.major = major; } public String getMajorType() { return majorType; } public void setMajorType(String majorType) { this.majorType = majorType; } public String getMajorCourses() { return majorCourses; } public void setMajorCourses(String majorCourses) { this.majorCourses = majorCourses; } public String getRanking() { return ranking; } public void setRanking(String ranking) { this.ranking = ranking; } public String getHonor() { return honor; } public void setHonor(String honor) { this.honor = honor; } }
[ "245473357@qq.com" ]
245473357@qq.com
b1ba27145ae403632698976baf00d59cb053eab5
f81737aea98075e18b7f84065a18f3ea5353900f
/src/main/java/com/bludworth/ninjagold/controllers/NinjaGoldController.java
e09e42a240c50f3e4e9bf982bc19b998f7dfdbe8
[]
no_license
Nathan-B21/java-ninja-gold
4ebcf75a68d497254ca57bd8a21fef7818a301b9
53f5d25dd581c0ff03738245808c220475829fde
refs/heads/main
2023-04-06T07:49:09.966405
2021-04-13T00:33:56
2021-04-13T00:33:56
357,377,724
0
0
null
null
null
null
UTF-8
Java
false
false
3,383
java
package com.bludworth.ninjagold.controllers; import java.util.Date; import java.util.ArrayList; import java.util.Random; import java.sql.Timestamp; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @Controller public class NinjaGoldController { public ArrayList<String> activities = new ArrayList<String>(); Random rand = new Random(); @RequestMapping("/") public String select(Model model, HttpSession session) { Integer totalGold = (Integer) session.getAttribute("totalGold"); // String [] activities = (String []) session.getAttribute("activities"); if(totalGold == null) { session.setAttribute("totalGold", 0); } model.addAttribute("activities", activities); model.addAttribute("time", new Date()); // if(activities == null) { // session.setAttribute("activities",0); // } return "index.jsp"; } @RequestMapping(value = "/process_money", method=RequestMethod.POST) public String process(@RequestParam(value = "location_form")String location, HttpSession session) { Integer totalGold = (Integer)session.getAttribute("totalGold"); // String activities = (String)session.getAttribute("activities"); Date date = new Date(); long time = date.getTime(); Timestamp ts = new Timestamp(time); System.out.println(totalGold); if(location.equals("farm")) { int amountChosen = rand.nextInt(10); totalGold += amountChosen; session.setAttribute("totalGold", totalGold); // session.setAttribute("activities", "You went to the farm"); activities.add("You went to the farm and gained " + " " + amountChosen + " gold" + " created at: " + ts); return "redirect:/"; } else if(location.equals("cave")) { // int [] possibleGold = {5,6,7,8,9,10}; int amountChosen = rand.nextInt(10 -5 + 1) + 5; totalGold += amountChosen; session.setAttribute("totalGold", totalGold); activities.add("You went to the caves and gained " + " " + amountChosen + " gold" + " created at: " + ts); // System.out.println(totalGold); // session.setAttribute("activities").append("You went to the caves"); // session.setAttribute("activities", "You went to the cave"); return "redirect:/"; } else if(location.equals("house")) { // int [] possibleGold = {2,3,4,5}; int amountChosen = rand.nextInt(5 - 2 + 1) + 5; totalGold += amountChosen; session.setAttribute("totalGold", totalGold); activities.add("You went to the house and gained" + " " + amountChosen + " gold" + " created at: " + ts); // session.setAttribute("activities", "You went to the house"); return "redirect:/"; } else if(location.equals("casino")) { int amountChosen = (rand.nextInt(50)-50); totalGold += amountChosen; session.setAttribute("totalGold", totalGold); activities.add("You went to the casino and lost" + " " + amountChosen + " gold" + " created at: " + ts); // session.setAttribute("activities", "You went to the casino"); return "redirect:/"; } return "redirect:/"; } @RequestMapping("/destory") public String reset(HttpSession session) { session.invalidate(); activities = new ArrayList<String>(); return "redirect:/"; } }
[ "nathanbludworth@gmail.com" ]
nathanbludworth@gmail.com
a6a1eeb4f95d7b7c87f8e2a3f8081dcd61935874
f18fcb7d3d6c993b72eb61db1f580af1aa2fd917
/JavaStuday/src/cn/basedemo/PackageDemo.java
b87c447fc80c6067e61fe4fcbbd81945b94378bf
[]
no_license
LLLRS/JavaStudy
1cbc5e5ddbb682000655c76cf8f34b28d3625d8d
375a48d0bde1f804c7923b639e278d98db357e38
refs/heads/master
2021-09-20T13:57:23.667233
2018-08-10T08:22:31
2018-08-10T08:22:31
106,909,150
1
0
null
null
null
null
WINDOWS-1252
Java
false
false
304
java
package cn.basedemo;//°üÃû¡£ÀàÃû import cn.basedemo.packa.PackageADemo; public class PackageDemo { public static void main(String[] args) { PackageADemo t = new PackageADemo(); t.show(); //PackB.PackageBDemo d = new PackB.PackageBDemo(); //d.method(); } }
[ "15311257617@163.com" ]
15311257617@163.com
adc9311dc94f3fd69e6da34add43795495b5a9e4
5f3a5fa3ee442c7bd9761d08b956b9a29a76d318
/app/src/main/java/com/example/quickstart/report.java
e5b791f9e47a237760f003617a3fa167e6db0e67
[]
no_license
varun9597/SheetsAPI
7ed81dbc83ba838f17625aeb0f877797006c9641
0b365a22ab98f87c69896eb24013da3546aa55e6
refs/heads/master
2021-01-19T20:27:46.273234
2017-04-19T19:21:07
2017-04-19T19:21:07
88,508,645
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
package com.example.quickstart; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class report extends AppCompatActivity { TextView attendance; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_report); attendance = (TextView) findViewById(R.id.textView); String value = attend.myclass(); attendance.setText(value); } } class attend extends MainActivity { static String myclass() { String value = att.get(index); return value; } }
[ "panditpautrav@gmail.com" ]
panditpautrav@gmail.com
27f441c1dc87a5c6010555fc53067992f9ca4ef3
8d66a92ebe3a1d32b02fff454d2b0f66691308da
/src/esaude/model/EsusCadastroIndividualDoencarespiratoria.java
657193a2f9402e19faf2045d1b96d79dcd9b7dbe
[]
no_license
horaciobarros/GeradorESus
28ca0ca83f72c024572da24fca199facc0ac1caa
2ad21f7c8162381b4d44d3e6ad3ccfe11a41e4af
refs/heads/master
2021-01-23T14:03:40.329277
2016-10-26T00:33:10
2016-10-26T00:33:10
36,838,719
0
0
null
null
null
null
UTF-8
Java
false
false
2,609
java
package esaude.model; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import java.io.*; import java.util.*; @Entity @Table(name="esus_cadastro_individual_doencarespiratoria") public class EsusCadastroIndividualDoencarespiratoria implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private Long id; @ManyToOne @JoinColumn(name = "id_cadastro_individual") private EsusCadastroIndividual esusCadastroIndividual; @ManyToOne @JoinColumn(name = "id_doencarespiratoria") private EsusDoencarespiratoria esusDoencarespiratoria; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public EsusCadastroIndividual getEsusCadastroIndividual() { return esusCadastroIndividual; } public void setEsusCadastroIndividual(EsusCadastroIndividual esusCadastroIndividual) { this.esusCadastroIndividual = esusCadastroIndividual; } public EsusDoencarespiratoria getEsusDoencarespiratoria() { return esusDoencarespiratoria; } public void setEsusDoencarespiratoria(EsusDoencarespiratoria esusDoencarespiratoria) { this.esusDoencarespiratoria = esusDoencarespiratoria; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((esusCadastroIndividual == null) ? 0 : esusCadastroIndividual.hashCode()); result = prime * result + ((esusDoencarespiratoria == null) ? 0 : esusDoencarespiratoria.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return true; if (getClass() != obj.getClass()) return false; EsusCadastroIndividualDoencarespiratoria other = (EsusCadastroIndividualDoencarespiratoria) obj; if (id == null) { if (other.id != null) return false; } if (esusCadastroIndividual == null) { if (other.esusCadastroIndividual != null) return false; } if (esusDoencarespiratoria == null) { if (other.esusDoencarespiratoria != null) return false; } return true; } }
[ "Horacio@192.168.25.3" ]
Horacio@192.168.25.3
e8be6aefdf12b368c270b87270c5a7b115157160
2f6f8b1d93e1787a9c6b598f13e3fecc0e9797ce
/Array/Easy/035-Search-Insert-Position/src/Solution0352.java
6bf87b67dd88178bb6dcda6b6c89367b8400f576
[]
no_license
YaboSun/Play-with-LeetCode
4143ca1a2808a6af94df6cca3c4e263a70fa9a60
c9277708c3a627016d5de9afde8a2a8b335c5348
refs/heads/master
2020-03-18T23:59:45.145290
2018-10-15T13:51:37
2018-10-15T13:51:37
135,445,545
1
0
null
null
null
null
UTF-8
Java
false
false
460
java
import java.util.Arrays; public class Solution0352 { public static int searchInsert(int[] nums, int target) { int index = Arrays.binarySearch(nums, target); if (index < 0) { index = index * (-1) - 1; } return index; } public static void main(String[] args) { int[] testArray = {2, 3, 5, 7}; int targetValue = 5; System.out.println(searchInsert(testArray, targetValue)); } }
[ "yabosun@163.com" ]
yabosun@163.com
1a1d6e52ff0563183e2303d1304fe623a57c9c30
64a9624c726eda649644b3f8b225ef934f997b96
/src/main/java/org/zalando/intellij/swagger/completion/field/model/common/ArrayField.java
bf8eed20d4e9bb58faa1607cf1f35cf0ccca3ced
[ "MIT" ]
permissive
WouldYouKindly/intellij-swagger
bb77e1c4dec91520407289a0d0753e599712e0a2
3ef9039330de169e439862f2b590d07679583231
refs/heads/master
2021-09-09T19:28:45.670690
2018-03-17T12:57:38
2018-03-17T12:57:38
125,818,971
0
0
MIT
2018-03-19T07:35:33
2018-03-19T07:35:33
null
UTF-8
Java
false
false
1,415
java
package org.zalando.intellij.swagger.completion.field.model.common; import org.apache.commons.lang.StringUtils; import static org.zalando.intellij.swagger.file.FileConstants.CARET; public class ArrayField extends Field { public ArrayField(final String name) { super(name, false); } @Override public String getJsonPlaceholderSuffix(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); final String nextLineIndentationPadding = StringUtils.repeat(" ", indentation + 2); return ": [\n" + nextLineIndentationPadding + CARET + "\n" + indentationPadding + "]"; } @Override public String getYamlPlaceholderSuffix(final int indentation) { final String nextLineIndentationPadding = StringUtils.repeat(" ", indentation + 2); return ":\n" + nextLineIndentationPadding + "- " + CARET; } @Override public String getCompleteJson(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); return indentationPadding + "\"" + getName() + "\"" + getJsonPlaceholderSuffix(indentation); } @Override public String getCompleteYaml(final int indentation) { final String indentationPadding = StringUtils.repeat(" ", indentation); return indentationPadding + getName() + getYamlPlaceholderSuffix(indentation); } }
[ "sebastian.h.monte@gmail.com" ]
sebastian.h.monte@gmail.com
095caad6fd25fb44518f3cf35303ae55bfc4e9a8
7d68a34e09e2ab22fbe0efe43ff6b3ccf44cf8a3
/NTHB41 Final upto june14/HBProj51-Filters/src/main/java/com/nt/dao/AccountInfoDAO.java
cb96cb4391f0e63cf4fc436637cf0a6fccf77e99
[]
no_license
ALLISWELL-REPO/Natraj
293a9d65eb1de585fbf3d9b4f233a2c5ace1c6f6
cab1ce5c12df97e59b5cac0f53bf77c99012951a
refs/heads/master
2022-12-02T01:08:41.704483
2019-10-01T19:30:40
2019-10-01T19:30:40
212,178,682
0
0
null
2022-11-24T07:12:43
2019-10-01T19:09:51
Java
UTF-8
Java
false
false
108
java
package com.nt.dao; public interface AccountInfoDAO { public void getAllAccountDetailsAndBalnaceSum(); }
[ "alliswellrepo@gmail.com" ]
alliswellrepo@gmail.com
076b98e7363a6e24d228de7bc1d5197b4b77f6e5
08474e85f65b78a1506a98ff4e03db82cd542cc8
/src/main/java/com/example/demo/cache/Cache1.java
6ac9a087257cde96b600570212a98ebd9c8a9ae0
[]
no_license
qq921124136/juzhipi
8f3c762d2c1631fde2eda45c3d7b7e015b4a6688
82d10052ee98ff38087ee77245dba17c406c1433
refs/heads/master
2023-06-16T21:25:52.455328
2021-07-13T00:32:22
2021-07-13T00:32:22
385,271,974
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package com.example.demo.cache; import org.springframework.stereotype.Component; @Component("Cache1") public class Cache1 implements Cacheca{ @Override public void haha() { System.out.println("haha1()"); } }
[ "92112@LAPTOP-LPHG6PEV" ]
92112@LAPTOP-LPHG6PEV
31d77d19892f62dd5e00576161760b3afabaea27
d7322b91966b99a3e3efa2c47c72fb50072f6e95
/src/main/java/lwjgui/scene/control/TextInputControl.java
bd8776b44987a8a04e1176e93a26154e6cf61ac1
[ "MIT" ]
permissive
bumfo/LWJGUI
3a22f711f6853a3cedfca393f66182ab53ada34f
9d9075198cf8186edbcb0e6603895efdd73cf9f4
refs/heads/master
2020-11-25T08:32:42.748364
2019-12-17T09:10:29
2019-12-17T09:10:29
228,575,603
1
0
MIT
2019-12-17T09:02:25
2019-12-17T09:02:24
null
UTF-8
Java
false
false
42,904
java
package lwjgui.scene.control; import java.awt.font.TextHitInfo; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.lwjgl.glfw.GLFW; import org.lwjgl.nanovg.NVGGlyphPosition; import org.lwjgl.nanovg.NVGPaint; import org.lwjgl.nanovg.NanoVG; import lwjgui.LWJGUI; import lwjgui.LWJGUIUtil; import lwjgui.collections.ObservableList; import lwjgui.collections.StateStack; import lwjgui.event.Event; import lwjgui.event.EventHandler; import lwjgui.event.EventHelper; import lwjgui.event.KeyEvent; import lwjgui.event.TypeEvent; import lwjgui.font.Font; import lwjgui.font.FontMetaData; import lwjgui.font.FontStyle; import lwjgui.geometry.Insets; import lwjgui.geometry.Pos; import lwjgui.paint.Color; import lwjgui.scene.Context; import lwjgui.scene.Cursor; import lwjgui.scene.Node; import lwjgui.scene.layout.Pane; import lwjgui.style.Background; import lwjgui.style.BackgroundSolid; import lwjgui.style.BorderStyle; import lwjgui.style.BoxShadow; import lwjgui.style.StyleBackground; import lwjgui.style.StyleBorder; import lwjgui.style.StyleBoxShadow; import lwjgui.theme.Theme; /** * This class acts as the core controller for text input classes. */ public abstract class TextInputControl extends Control implements StyleBorder,StyleBackground,StyleBoxShadow { ArrayList<String> lines; ArrayList<ArrayList<GlyphData>> glyphData; ArrayList<String> linesDraw; private String source; int caretPosition; protected boolean editing = false; protected boolean editable = true; private Background background; private Color borderColor; private float[] borderRadii; private float borderWidth; private BorderStyle borderStyle; private ObservableList<BoxShadow> boxShadows = new ObservableList<>(); private boolean wordWrap; int selectionStartPosition; int selectionEndPosition; protected TextInputScrollPane internalScrollPane; protected TextInputContentRenderer internalRenderingPane; private StateStack<TextState> undoStack; private boolean forceSaveState; private EventHandler<Event> onSelectEvent; private EventHandler<Event> onDeselectEvent; private EventHandler<Event> onTextChange; private String prompt = null; private TextParser textParser; private static final int MAX_LINES = Integer.MAX_VALUE; /* * Visual customization */ protected int fontSize = 16; protected Font font = Font.SANS; protected Color fontFill = Theme.current().getText(); protected FontStyle style = FontStyle.REGULAR; private boolean selectionOutlineEnabled = true; Color caretFill = Theme.current().getText(); boolean caretFading = false; private Color selectionFill = Theme.current().getSelection(); private Color selectionPassiveFill = Theme.current().getSelectionPassive(); Color selectionAltFill = Theme.current().getSelectionAlt(); private Color controlOutlineFill = Theme.current().getControlOutline(); private Color promptFill = Theme.current().getText().alpha(0.4f); protected TextInputControlShortcuts shortcuts; public TextInputControl() { this.setBorderStyle(BorderStyle.SOLID); this.setBorderRadii(3); this.setBackground(new BackgroundSolid(Theme.current().getBackground())); /* * Input setup */ this.internalRenderingPane = new TextInputContentRenderer(this); undoStack = new StateStack<TextState>(); setText(""); saveState(); this.flag_clip = true; setOnTextInputInternal( new EventHandler<TypeEvent>() { @Override public void handle(TypeEvent event) { if (!editing) return; if ( forceSaveState ) { saveState(); forceSaveState = false; } deleteSelection(); insertText(caretPosition, event.getCharacterString()); setCaretPosition(caretPosition+1); deselect(); // If you press space then Save history if (event.character == ' ') { saveState(); } } }); shortcuts = new TextInputControlShortcuts(); setOnKeyPressedAndRepeatInternal( event -> { shortcuts.process(this, event); }); /* * Scroll Pane setup */ internalScrollPane = new TextInputControl.TextInputScrollPane(); internalScrollPane.setContent(internalRenderingPane); children.add(internalScrollPane); } protected void saveState() { undoStack.Push(new TextState(getText(),caretPosition)); } public void setWordWrap(boolean wrap) { wordWrap = wrap; } public boolean isWordWrap() { return this.wordWrap; } public void clear() { saveState(); setText(""); deselect(); } public void deselect() { this.selectionStartPosition = caretPosition; this.selectionEndPosition = caretPosition; } public void setPrompt(String string) { this.prompt = string; } public void setText(String text) { int oldCaret = caretPosition; if ( lines == null ) { this.lines = new ArrayList<String>(); this.linesDraw = new ArrayList<String>(); this.glyphData = new ArrayList<ArrayList<GlyphData>>(); } else { this.lines.clear(); this.linesDraw.clear(); this.glyphData.clear(); } this.caretPosition = 0; String trail = "[!$*]T!R@A#I$L%I^N&G[!$*]"; // Naive fix to allow trailing blank lines to still be parsed text = text.replace("\r", ""); this.source = text; String temp = text + trail; // Add tail String[] split = temp.split("\n"); for (int i = 0; i < split.length; i++) { String tt = split[i]; tt = tt.replace(trail, ""); // Remove tail if ( i < split.length -1 ) { tt += "\n"; } addRow(tt); } setCaretPosition(oldCaret); // Fire on text change event if ( onTextChange != null ) { EventHelper.fireEvent(onTextChange, new Event()); } } private void addRow(String originalText) { String drawLine = originalText; if ( cached_context != null ) { ArrayList<GlyphData> glyphEntry = new ArrayList<GlyphData>(); bindFont(); org.lwjgl.nanovg.NVGGlyphPosition.Buffer positions; if (drawLine.length() > 0) { positions = NVGGlyphPosition.malloc(drawLine.length()); } else { positions = NVGGlyphPosition.malloc(1); } // Create glyph data for each character in the line NanoVG.nvgTextGlyphPositions(cached_context.getNVG(), 0, 0, drawLine, positions); int j = 0; while (j < drawLine.length()) { GlyphData currentGlyph = fixGlyph(positions.get(), drawLine.substring(j, j+1)); glyphEntry.add(currentGlyph); j++; } positions.free(); // Add blank glyph to end of line GlyphData last = glyphEntry.size()== 0 ? new GlyphData(0,0,"") : glyphEntry.get(glyphEntry.size()-1); glyphEntry.add(new GlyphData( last.x()+last.width, 1, "" )); // Hack to fix spacing of special characters for (int i = 0; i < glyphEntry.size()-1; i++) { GlyphData currentGlyph = glyphEntry.get(i); if ( currentGlyph.SPECIAL ) { GlyphData t = glyphEntry.get(i+1); float tOff = t.x()-currentGlyph.x(); float newOff = currentGlyph.width()-tOff; for (int k = i+1; k < glyphEntry.size(); k++) { GlyphData fixGlyph = glyphEntry.get(k); fixGlyph.x += newOff; } } } // Word Wrap not yet properly implemented properly. Will be rewritten. int vWid = (int) (this.internalScrollPane.getViewport().getWidth() - 20); int maxWidth = (int) (wordWrap?vWid:Integer.MAX_VALUE); int index = 0; while ( index < originalText.length() ) { GlyphData entry = glyphEntry.get(index); if ( entry.x()+entry.width() >= maxWidth ) { addRow(originalText.substring(0, index-1)); addRow(originalText.substring(index-1,originalText.length())); return; } index++; } glyphData.add(glyphEntry); } // Get decorated line if ( this.textParser != null ) drawLine = textParser.parseText(drawLine); // Add line normally lines.add(originalText); linesDraw.add(drawLine); while ( lines.size() > MAX_LINES ) { lines.remove(0); linesDraw.remove(0); glyphData.remove(0); } } public void appendText(String text) { saveState(); insertText(getLength(), text); internalScrollPane.scrollToBottom(); } public void insertText(int index, String text) { String before = getText(0, index); String after = getText(index, getLength()); setText(before + text + after); deselect(); } protected boolean deleteSelection() { IndexRange selection = getSelection(); if ( selection.getLength() > 0 ) { deleteText(selection); caretPosition = selection.getStart(); selectionStartPosition = caretPosition; selectionEndPosition = caretPosition; return true; } return false; } public void deleteText(IndexRange range) { range.normalize(); String before = getText(0, range.getStart()); String after = getText(range.getEnd(), getLength()); saveState(); setText(before+after); deselect(); } public void deleteText(int start, int end) { deleteText(new IndexRange(start, end)); } public void deletePreviousCharacter() { if (!deleteSelection()) { this.saveState(); int old = caretPosition; deleteText(caretPosition-1, caretPosition); this.setCaretPosition(old-1); } } public void deleteNextCharacter() { if (!deleteSelection()) { this.saveState(); deleteText(caretPosition, caretPosition+1); } } public void setFont(Font font) { this.font = font; } public void setFontFill(Color fontFill) { this.fontFill = fontFill; } public void setFontSize( int size ) { this.fontSize = size; } public void setFontStyle(FontStyle style) { this.style = style; } public Color getSelectionFill() { return selectionFill; } public void setSelectionFill(Color selectionFill) { this.selectionFill = selectionFill; } public Color getSelectionPassiveFill() { return selectionPassiveFill; } public void setSelectionPassiveFill(Color selectionPassiveFill) { this.selectionPassiveFill = selectionPassiveFill; } public Color getSelectionAltFill() { return selectionAltFill; } public void setSelectionAltFill(Color selectionAltFill) { this.selectionAltFill = selectionAltFill; } public Color getControlOutlineFill() { return controlOutlineFill; } public void setControlOutlineFill(Color controlOutlineFill) { this.controlOutlineFill = controlOutlineFill; } public void setOnSelected( EventHandler<Event> event ) { this.onSelectEvent = event; } public void setOnDeselected( EventHandler<Event> event ) { this.onDeselectEvent = event; } public void setOnTextChange( EventHandler<Event> event ) { this.onTextChange = event; } public void undo() { if ( this.undoStack.isCurrent() ) { this.saveState(); this.undoStack.Rewind(); // Extra undo, since we just secretly saved. SHHHH } TextState state = this.undoStack.Rewind(); if ( state == null ) return; setText(state.text); deselect(); this.setCaretPosition(state.caretPosition); forceSaveState = true; } public void redo() { TextState state = this.undoStack.Forward(); if ( state == null ) return; //this.undoStack.Rewind(); // Go back one more, since setting text will overwrite setText(state.text); deselect(); this.setCaretPosition(state.caretPosition); } public void copy() { String text = getSelectedText(); LWJGUI.runLater(() -> { GLFW.glfwSetClipboardString(cached_context.getWindowHandle(), text); }); } public void cut() { saveState(); copy(); deleteSelection(); } public void paste() { saveState(); deleteSelection(); LWJGUI.runLater(()-> { String str = GLFW.glfwGetClipboardString(cached_context.getWindowHandle()); insertText(caretPosition, str); caretPosition += str.length(); }); } public void home() { caretPosition = this.getCaretFromRowLine(getRowFromCaret(caretPosition), 0); } public void end() { int line = getRowFromCaret(caretPosition); String str = lines.get(line); caretPosition = this.getCaretFromRowLine(line, str.length()); if ( str.length() > 0 && str.charAt(str.length()-1) == '\n' ) caretPosition--; } public void tab() { deleteSelection(); insertText(caretPosition,"\t"); setCaretPosition(caretPosition+1); saveState(); } public void selectAll() { selectionStartPosition = 0; selectionEndPosition = getLength(); caretPosition = selectionEndPosition; } public void backward() { caretPosition--; if ( caretPosition < 0 ) { caretPosition = 0; } } public void forward() { caretPosition++; int offset = getIndexFromCaret(caretPosition); if ( offset == -1 ) { caretPosition--; } } public int getCaretPosition() { return this.caretPosition; } public void setCaretPosition(int pos) { this.renderCaret = (float) (Math.PI*(3/2f)); this.caretPosition = pos; if ( this.caretPosition < 0 ) this.caretPosition = 0; if ( this.caretPosition > getLength() ) this.caretPosition = getLength(); } public Color getCaretFill() { return caretFill; } public void setCaretFill(Color caretFill) { this.caretFill = caretFill; } public boolean isCaretFading() { return caretFading; } /** * If set to true, the caret will fade in and out instead of blink in and out. * * @param caretFading */ public void setCaretFading(boolean caretFading) { this.caretFading = caretFading; } public String getSelectedText() { return getText(getSelection()); } private String getText(IndexRange selection) { selection.normalize(); if ( selection.getLength() == 0 ) return ""; return source.substring( Math.max(0, selection.getStart()), Math.min(selection.getEnd(),source.length()) ); /* int startLine = getRowFromCaret(selection.getStart()); int endLine = getRowFromCaret(selection.getEnd()); int t = startLine; String text = ""; int a = getIndexFromCaret(selection.getStart()); int b = getIndexFromCaret(selection.getEnd()); while ( t <= endLine ) { String curLine = lines.get(t); if ( t == startLine && t != endLine ) { text += curLine.substring(a); } else if ( t != startLine && t == endLine ) { text += curLine.substring(0, b); } else if ( t == startLine && t == endLine ) { text += curLine.substring(a, b); } else { text += curLine; } t++; } return text;*/ } public String getText() { /*String text = ""; for (int i = 0; i < lines.size(); i++) { text += lines.get(i); if ( i < lines.size()-1 ) { //text += "\n"; } } return text;*/ return source; } public String getText(int start, int end) { return getText(new IndexRange(start,end)); } /** * @return the total number of lines in this text area. */ public int getNumLines() { return this.lines.size(); } public IndexRange getSelection() { return new IndexRange(selectionStartPosition, selectionEndPosition); } /** * Returns the amount of characters in this text area. * @return */ public int getLength() { /*int len = 0; for (int i = 0; i < lines.size(); i++) { len += lines.get(i).length(); } return len;*/ return source.length(); } /** * Returns the caret offset at the specific line the caret position is on. * @param pos * @return */ protected int getIndexFromCaret(int pos) { int line = getRowFromCaret(pos); int a = 0; for (int i = 0; i < line; i++) { a += lines.get(i).length(); } return pos-a; } /** * Returns the row that this caret position is on. * @param caret * @return */ protected int getRowFromCaret(int caret) { int line = -1; int a = 0; while ( a <= caret && line < lines.size()-1 ) { line++; String t = lines.get(line); a += t.length(); } return line; } /** * Returns the text of the line at the specified caret position. * @param caretPosition * @return */ public String getLine(int caretPosition) { return lines.get(this.getRowFromCaret(caretPosition)); } public void setTextParser(TextParser parser) { this.textParser = parser; } public void setEditable(boolean editable) { this.editable = editable; } public boolean isEditing() { return this.editing; } @Override protected void position(Node parent) { super.position(parent); } @Override protected void resize() { this.setAlignment(Pos.TOP_LEFT); internalScrollPane.setPrefSize(getWidth()-1, getHeight()-1); int width = getMaxTextWidth(); this.internalRenderingPane.setMinSize(width, lines.size()*fontSize); super.resize(); /*int prefX = (int) (this.preferredColumnCount*(fontSize*(2/3f))); int prefY = (int) ((this.preferredRowCount*fontSize)+this.internal.getPadding().getHeight()+1); prefX = (int) Math.min(prefX, this.getMaxPotentialWidth()); prefY = (int) Math.min(prefY, this.getMaxPotentialHeight()); this.setPrefSize(prefX, prefY);*/ //TODO: Move htis into an actual input callback if ( this.isDescendentSelected() && editable && !this.isDisabled() ) { if ( !editing && onSelectEvent != null ) { EventHelper.fireEvent(onSelectEvent, new Event()); } editing = true; } else { if ( editing ) { if ( onDeselectEvent != null ) { EventHelper.fireEvent(onDeselectEvent, new Event()); } this.deselect(); } this.editing = false; } if ( caretPosition < 0 ) caretPosition = 0; } private int getMaxTextWidth() { int width = 0; for (int i = 0; i < linesDraw.size(); i++) { String str = linesDraw.get(i); int len = 0; if ( glyphData.size() > 0 ) { for (int j = 0; j < str.length(); j++) { GlyphData d = glyphData.get(i).get(j); len += d.width(); } } /*float[] bounds = new float[4]; NanoVG.nvgFontSize(cached_context.getNVG(), fontSize); NanoVG.nvgFontFace(cached_context.getNVG(), font.getFont(style)); NanoVG.nvgTextAlign(cached_context.getNVG(),NanoVG.NVG_ALIGN_LEFT|NanoVG.NVG_ALIGN_TOP); NanoVG.nvgTextBounds(cached_context.getNVG(), 0, 0, str, bounds); int len = (int) (bounds[2]-bounds[0]);*/ if ( len > width ) { width = len; } } return width; } protected void bindFont() { if ( cached_context == null ) return; long vg = cached_context.getNVG(); NanoVG.nvgFontSize(vg, fontSize); NanoVG.nvgFontFace(vg, font.getFont(style)); NanoVG.nvgTextAlign(vg,NanoVG.NVG_ALIGN_LEFT|NanoVG.NVG_ALIGN_TOP); } protected void bindFont(FontMetaData data) { if ( cached_context == null ) return; double fs = data.getSize()==null?fontSize:data.getSize().doubleValue(); Font f = data.getFont()==null?font:data.getFont(); FontStyle fst = data.getStyle()==null?style:data.getStyle(); long vg = cached_context.getNVG(); NanoVG.nvgFontSize(vg, (float)fs); NanoVG.nvgFontFace(vg, f.getFont(fst)); NanoVG.nvgTextAlign(vg,NanoVG.NVG_ALIGN_LEFT|NanoVG.NVG_ALIGN_TOP); } protected GlyphData fixGlyph(NVGGlyphPosition glyph, String originalCharacter) { if ( originalCharacter.equals("\t") ) return new GlyphData( glyph.x(), 32, originalCharacter, true ); if ( originalCharacter.equals("\r") ) { new GlyphData( glyph.x(), 0, originalCharacter ); } return new GlyphData( glyph.x(), glyph.maxx()-glyph.x(), originalCharacter ); } protected int getCaretFromRowLine(int row, int index) { int c = 0; for (int i = 0; i < row; i++) { c += lines.get(i).length(); } c += index; return c; } int getPixelOffsetFromCaret( int caret ) { int row = getRowFromCaret( caret ); int offset = getIndexFromCaret( caret ); int temp = 0; for (int i = 0; i < offset; i++) { GlyphData g = glyphData.get(row).get(i); temp += g.width(); } return temp; } int getCaretFromPixelOffset( int row, int pixelX ) { String line = linesDraw.get(row); if ( line.length() == 0 ) return getCaretFromRowLine(row,0); // Find first character clicked in row int index = 0; ArrayList<GlyphData> glyphLine = glyphData.get(row); for (int i = 0; i < glyphLine.size(); i++) { GlyphData dat = glyphLine.get(i); if ( dat.character().equals("\n")) break; if ( dat.x()+dat.width/2-3 > pixelX ) break; index++; } // Limit if ( index > line.length() ) index = line.length(); if ( index < 0 ) index = 0; // Return caret position return getCaretFromRowLine(row,index); } int getCaretAtMouse() { double mx = cached_context.getMouseX()-internalScrollPane.getContent().getX(); double my = cached_context.getMouseY()-internalScrollPane.getContent().getY(); // Find row clicked int row = (int) (my / (float)fontSize); if ( row > lines.size()-1 ) row = lines.size()-1; if ( row < 0 ) row = 0; return getCaretFromPixelOffset(row, (int) mx); } public boolean isSelectionOutlineEnabled() { return selectionOutlineEnabled; } public void setSelectionOutlineEnabled(boolean selectionOutlineEnabled) { this.selectionOutlineEnabled = selectionOutlineEnabled; } public TextInputScrollPane getInternalScrollPane() { return internalScrollPane; } /** * Set the background color of this node. * <br> * If set to null, then no background will draw. * @param color */ public void setBackground(Background color) { this.background = color; } /** * Get the current background color of this node. * @return */ public Background getBackground() { return this.background; } @Override public void setBorderStyle(BorderStyle style) { this.borderStyle = style; } @Override public BorderStyle getBorderStyle() { return this.borderStyle; } @Override public float[] getBorderRadii() { return borderRadii; } @Override public void setBorderRadii(float radius) { this.setBorderRadii(radius, radius, radius, radius); } @Override public void setBorderRadii(float cornerTopLeft, float cornerTopRight, float cornerBottomRight, float cornerBottomLeft) { this.borderRadii = new float[] {cornerTopLeft, cornerTopRight, cornerBottomRight, cornerBottomLeft}; } @Override public void setBorderColor(Color color) { this.borderColor = color; } @Override public Color getBorderColor() { return this.borderColor; } @Override public void setBorderWidth(float width) { this.borderWidth = width; } @Override public float getBorderWidth() { return this.borderWidth; } @Override public ObservableList<BoxShadow> getBoxShadowList() { return this.boxShadows; } public void setHighlighting(int startIndex, int endIndex, FontMetaData metaData) { highlighting.add(new TextHighlighter( startIndex, endIndex, metaData) ); } public void resetHighlighting() { highlighting.clear(); } private ArrayList<TextHighlighter> highlighting = new ArrayList<TextHighlighter>(); protected TextHighlighter getHighlighting( int position ) { for (int i = 0; i < highlighting.size(); i++) { TextHighlighter t = highlighting.get(i); if ( t.contains(position) ) return t; } return null; } static class TextHighlighter { private int startIndex; private int endIndex; private FontMetaData metaData; public TextHighlighter(int startIndex, int endIndex, FontMetaData metaData) { this.startIndex = startIndex; this.endIndex = endIndex; this.metaData = metaData; } public boolean contains(int position) { return position >= startIndex && position <= endIndex; } public FontMetaData getMetaData() { return this.metaData; } } @Override public void render(Context context) { long vg = context.getNVG(); float x = (int)(getX()+this.getInnerBounds().getX()); float y = (int)(getY()+this.getInnerBounds().getY()); float w = (int)this.getInnerBounds().getWidth(); float h = (int)this.getInnerBounds().getHeight(); float rNW = this.getBorderRadii()[0]; float rNE = this.getBorderRadii()[1]; float rSE = this.getBorderRadii()[2]; float rSW = this.getBorderRadii()[3]; this.clip(context,8); // SETUP OUTLINE this.setBorderStyle(BorderStyle.SOLID); this.setBorderWidth(1); Color outlineColor = (this.isDescendentSelected()&&!this.isDisabled())? selectionFill : controlOutlineFill; this.setBorderColor(outlineColor); // SETUP SELECTION GRAPHIC this.getBoxShadowList().clear(); this.getBoxShadowList().add(new BoxShadow( 0, 2, 8, -3, Theme.current().getShadow(), true )); if (isDescendentSelected() && !this.isDisabled()) { Color sel = Theme.current().getSelection(); if ( isDisabled() ) sel = Theme.current().getSelectionPassive(); this.getBoxShadowList().add(new BoxShadow(0, 0, 3, 1, sel)); this.getBoxShadowList().add(new BoxShadow(0, 0, 1.5f, 2, sel.alpha(0.2f), true)); } // Draw drop shadows for (int i = 0; i < getBoxShadowList().size(); i++) { BoxShadow shadow = getBoxShadowList().get(i); if ( shadow.isInset() ) continue; LWJGUIUtil.drawBoxShadow(context, shadow, this.getBorderRadii(), (int) getX(), (int) getY(), (int)getWidth(), (int)getHeight()); } // Draw border if ( this.getBorderStyle() != BorderStyle.NONE && this.getBorderWidth() > 0 && this.getBorderColor() != null ) { float xx = (int) this.getX(); float yy = (int) this.getY(); float bw = this.getBorderWidth(); float ww = (float) this.getWidth() + bw*2; float hh = (float) this.getHeight() + bw*2; NanoVG.nvgBeginPath(context.getNVG()); NanoVG.nvgFillColor(context.getNVG(), getBorderColor().getNVG()); float b1 = Math.max((getBorderRadii()[0]-1) + bw*2, 0); float b2 = Math.max((getBorderRadii()[1]-1) + bw*2, 0); float b3 = Math.max((getBorderRadii()[2]-1) + bw*2, 0); float b4 = Math.max((getBorderRadii()[3]-1) + bw*2, 0); NanoVG.nvgRoundedRectVarying(context.getNVG(), xx-bw, yy-bw, ww, hh, b1, b2, b3, b4); if ( this.getBackground() == null ) { NanoVG.nvgPathWinding(context.getNVG(), NanoVG.NVG_CW); NanoVG.nvgRoundedRectVarying(context.getNVG(), xx, yy, ww-bw*2, hh-bw*2, getBorderRadii()[0], getBorderRadii()[1], getBorderRadii()[2], getBorderRadii()[3]); NanoVG.nvgPathWinding(context.getNVG(), NanoVG.NVG_CCW); } NanoVG.nvgFill(context.getNVG()); NanoVG.nnvgClosePath(context.getNVG()); } // Draw background if ( getBackground() != null ) { double boundsX = getX(); double boundsY = getY(); double boundsW = getWidth(); double boundsH = getHeight(); getBackground().render(context, boundsX, boundsY, boundsW, boundsH, getBorderRadii()); } // Draw inset shadows for (int i = 0; i < getBoxShadowList().size(); i++) { BoxShadow shadow = getBoxShadowList().get(i); if ( !shadow.isInset() ) continue; LWJGUIUtil.drawBoxShadow(context, shadow, this.getBorderRadii(), (int) getX(), (int) getY(), (int)getWidth(), (int)getHeight()); } // Draw sub nodes //this.internalScrollPane.render(context); this.internalScrollPane.setBackground(null); this.internalScrollPane.setBorderStyle(BorderStyle.NONE); super.render(context); // Draw Prompt if ( getLength() == 0 && prompt != null && prompt.length() > 0 ) { int xx = (int) this.internalRenderingPane.getX(); int yy = (int) this.internalRenderingPane.getY(); // Setup font NanoVG.nvgFontSize(vg, fontSize); NanoVG.nvgFontFace(vg, Font.SANS.getFont(FontStyle.REGULAR)); NanoVG.nvgTextAlign(vg,NanoVG.NVG_ALIGN_LEFT|NanoVG.NVG_ALIGN_TOP); // Draw NanoVG.nvgBeginPath(vg); NanoVG.nvgFontBlur(vg,0); NanoVG.nvgFillColor(vg, promptFill.getNVG()); NanoVG.nvgText(vg, xx, yy, prompt); } // Dropshadow /*if (!this.isDisabled()) { NVGPaint bg = NanoVG.nvgLinearGradient(vg, x, y-5, x, y+4, Theme.current().getShadow().getNVG(), Color.TRANSPARENT.getNVG(), NVGPaint.create()); NanoVG.nvgBeginPath(vg); NanoVG.nvgRoundedRectVarying(vg, x, y, w, h, rNW, rNE, rSE, rSW); NanoVG.nvgFillPaint(vg, bg); NanoVG.nvgFill(vg); }*/ /*if (isDescendentSelected() && isSelectionOutlineEnabled() && !this.isDisabled()) { NanoVG.nvgTranslate(context.getNVG(), x, y); Color sel = context.isFocused() ? selectionFill : selectionPassiveFill; Color col = new Color(sel.getRed(), sel.getGreen(), sel.getBlue(), 64); NanoVG.nvgBeginPath(vg); float inset = 1.33f; w += 1; h += 1; NanoVG.nvgRoundedRectVarying(vg, inset, inset, w-inset*2-1,h-inset*2-1, (float) rNW-inset, (float) rNE-inset, (float) rSE-inset, (float) rSW-inset); NanoVG.nvgStrokeColor(vg, col.getNVG()); NanoVG.nvgStrokeWidth(vg, inset*1.25f); NanoVG.nvgStroke(vg); NanoVG.nvgClosePath(vg); NanoVG.nvgTranslate(context.getNVG(), -x, -y); }*/ } class TextState { protected String text; protected int caretPosition; public TextState(String text, int pos) { this.text = text; this.caretPosition = pos; } @Override public String toString() { return caretPosition+":"+text; } } class GlyphData { // This class could be avoided if NanoVG author wouldn't ignore me. float width; float x; private String c; boolean SPECIAL; public GlyphData( float x, float width, String car ) { this.c = car; this.x = x; this.width = width; } public GlyphData( float x, float width, String car, boolean special ) { this( x, width, car ); this.SPECIAL = special; } public String character() { return c; } public float x() { return x; } public float width() { return width; } } abstract class TextParser { public abstract String parseText(String input); } float renderCaret = 0; long lastClickTime = 0; long lastLastClickTime = 0; int DOUBLE_CLICK_SPEED = 225; // Time between clicks, in milliseconds. int TRIPLE_CLICK_SPEED = 650; // Time between all clicks, in milliseconds. class TextInputScrollPane extends ScrollPane { public TextInputScrollPane() { setFillToParentHeight(true); setFillToParentWidth(true); setVbarPolicy(ScrollBarPolicy.NEVER); setHbarPolicy(ScrollBarPolicy.NEVER); setPadding(new Insets(3,4,4,3)); this.flag_clip = false; // Enter getViewport().setOnMouseEntered(event -> { getScene().setCursor(Cursor.IBEAM); }); // Leave getViewport().setOnMouseExited(event -> { getScene().setCursor(Cursor.NORMAL); }); // Clicked getViewport().setOnMousePressed(event -> { if (cached_context == null) { return; } long clickTime = System.currentTimeMillis(); if ( event.getButton() == GLFW.GLFW_MOUSE_BUTTON_LEFT && clickTime - lastClickTime > DOUBLE_CLICK_SPEED ) { LWJGUI.runLater(()-> { cached_context.setSelected(getViewport()); }); //Sets caret position at mouse setCaretPosition(getCaretAtMouse()); selectionEndPosition = caretPosition; int state = GLFW.glfwGetKey(cached_context.getWindowHandle(), GLFW.GLFW_KEY_LEFT_SHIFT); if ( state != GLFW.GLFW_PRESS ) { selectionStartPosition = caretPosition; } } else if ( event.getButton() == GLFW.GLFW_MOUSE_BUTTON_LEFT && clickTime - lastClickTime <= DOUBLE_CLICK_SPEED ) { if (clickTime - lastLastClickTime <= TRIPLE_CLICK_SPEED && lastLastClickTime != 0) { // Triple clicked. String line = lines.get(getRowFromCaret(caretPosition)); int rowStart = getCaretFromRowLine(getRowFromCaret(caretPosition), 0); int lineLength = line.length(); if (line.charAt(lineLength-1) == '\n' || line.charAt(lineLength-1) == '\r') { lineLength--; } int rowEnd = rowStart + lineLength; selectionStartPosition = rowStart; selectionEndPosition = rowEnd; lastLastClickTime = 0; } else { lastLastClickTime = lastClickTime; // Double clicked. setCaretPosition(getCaretAtMouse()); selectionEndPosition = caretPosition; String line = lines.get(getRowFromCaret(caretPosition)); int caretIndex = getIndexFromCaret(caretPosition); Pattern pattern = Pattern.compile("\\w+|\\d+"); Matcher matcher = pattern.matcher(line); while (matcher.find()) { if (matcher.start() <= caretIndex && matcher.end() >= caretIndex) { selectionStartPosition = caretPosition - (caretIndex - matcher.start()); selectionEndPosition = caretPosition + (matcher.end() - caretIndex); break; } } } setCaretPosition(selectionEndPosition); } else if ( event.getButton() == GLFW.GLFW_MOUSE_BUTTON_RIGHT ) { if ( TextInputControl.this.getContextMenu() != null ) { TextInputControl.this.getContextMenu().show(this.getScene(), event.getMouseX(), event.getMouseY()); } } lastClickTime = clickTime; }); // Drag mouse getViewport().setOnMouseDragged(event -> { caretPosition = getCaretAtMouse(); selectionEndPosition = caretPosition; lastClickTime = 0; lastLastClickTime = 0; }); } public void scrollToBottom() { setVvalue(1.0); } protected Pane getViewport() { return internalScrollCanvas; } } /** * Handles rendering the interal context (e.g. text) of TextInputControl. */ class TextInputContentRenderer extends Pane { private TextInputControl textInputControl; private Color caretFillCopy = null; public TextInputContentRenderer(TextInputControl textInputControl) { this.textInputControl = textInputControl; this.setMouseTransparent(true); this.setBackgroundLegacy(null); this.setAlignment(Pos.TOP_LEFT); this.flag_clip = true; } public String getElementType() { return "textcontentpane"; } private long lastTime; @Override public void render(Context context) { if (textInputControl.glyphData.size() == 0) { textInputControl.setText(textInputControl.getText()); } this.clip(context, -1); this.textInputControl.renderCaret += lastTime-System.currentTimeMillis(); lastTime = System.currentTimeMillis(); // Render selection IndexRange range = this.textInputControl.getSelection(); range.normalize(); int len = range.getLength(); int startLine = this.textInputControl.getRowFromCaret(range.getStart()); int endLine = this.textInputControl.getRowFromCaret(range.getEnd()); int a = this.textInputControl.getIndexFromCaret(range.getStart()); int b = this.textInputControl.getIndexFromCaret(range.getEnd()); if ( len > 0 ) { for (int i = startLine; i <= endLine; i++) { String l = this.textInputControl.lines.get(i); int left = a; int right = b; if ( i != endLine ) right = l.length()-1; if ( i != startLine ) left = 0; int xx = (int)(this.textInputControl.glyphData.get(i).get(left).x()); int yy = (int)(this.textInputControl.fontSize*i); int height = this.textInputControl.fontSize; int width = (int) (this.textInputControl.glyphData.get(i).get(right).x()-xx); LWJGUIUtil.fillRect(context, getX() + xx, getY() + yy, width, height, this.textInputControl.selectionAltFill); } } // Draw text for (int i = 0; i < this.textInputControl.linesDraw.size(); i++) { int mx = (int)getX(); int my = (int)getY() + (this.textInputControl.fontSize*i); // Quick bounds check if ( my < this.textInputControl.internalScrollPane.getY()-(this.textInputControl.fontSize*i)) continue; if ( my > this.textInputControl.internalScrollPane.getY()+this.textInputControl.internalScrollPane.getHeight()) continue; long vg = context.getNVG(); String text = this.textInputControl.linesDraw.get(i); // Setup font this.textInputControl.bindFont(); // Inefficient Draw. Thanks NanoVG refusing to implement \t if ( this.textInputControl.glyphData.size() > 0 ) { ArrayList<GlyphData> dat = this.textInputControl.glyphData.get(i); if ( dat.size() > 0 ) { float x = 0; for (int j = 0; j < text.length(); j++) { boolean draw = true; String c = text.substring(j, j+1); // Manual fix for drawing boxes of special characters of certain fonts // NanoVG author ALSO refuses to fix this. Cheers. if ( c.length() == 1 ) { if ( c.charAt(0) < 32 ) draw = false; } GlyphData g = dat.get(j); // Get current x offset x = g.x(); if ( draw ) { final int currentPosition = textInputControl.getCaretFromRowLine(i, j); TextHighlighter highlight = textInputControl.getHighlighting(currentPosition); Color color = textInputControl.fontFill; if ( highlight == null ) { textInputControl.bindFont(); } else { textInputControl.bindFont(highlight.getMetaData()); if ( highlight.getMetaData().getColor() != null ) { color = highlight.getMetaData().getColor(); } } NanoVG.nvgBeginPath(vg); NanoVG.nvgFontBlur(vg,0); NanoVG.nvgFillColor(vg, color.getNVG()); NanoVG.nvgText(vg, mx+x, my, c); } //x += g.width(); } } } } // Draw caret if ( this.textInputControl.editing ) { int line = this.textInputControl.getRowFromCaret(this.textInputControl.caretPosition); int index = this.textInputControl.getIndexFromCaret(this.textInputControl.caretPosition); int cx = (int) (getX()-1); int cy = (int) (getY() + (line * this.textInputControl.fontSize)); if ( this.textInputControl.glyphData.size() > 0 ) { // Check if caret goes past the line boolean addWid = false; while ( index >= this.textInputControl.glyphData.get(line).size() ) { index--; addWid = true; } // Get current x offset float offsetX = this.textInputControl.glyphData.get(line).get(index).x(); if ( addWid ) { offsetX += this.textInputControl.glyphData.get(line).get(index).width(); } if (this.textInputControl.caretFading) { if (caretFillCopy == null) { caretFillCopy = this.textInputControl.caretFill.copy(); } else if (!caretFillCopy.rgbMatches(this.textInputControl.caretFill)){ caretFillCopy.set(this.textInputControl.caretFill); } float alpha = 1.0f-(float) (Math.sin(this.textInputControl.renderCaret * 0.004f)*0.5+0.5); LWJGUIUtil.fillRect(context, cx+offsetX, cy, 2, this.textInputControl.fontSize, caretFillCopy.alpha(alpha)); } else if ( Math.sin(this.textInputControl.renderCaret*1/150f) < 0 ) { LWJGUIUtil.fillRect(context, cx+offsetX, cy, 2, this.textInputControl.fontSize, this.textInputControl.caretFill); } } } super.render(context); } } /** * Handles the special key shortcuts of TextInputControl (e.g. CTRL-V to paste) */ public class TextInputControlShortcuts { public void process(TextInputControl tic, KeyEvent event) { // Return if consumed if (event.isConsumed()) return; // Select All if (event.key == GLFW.GLFW_KEY_A && event.isCtrlDown && tic.isDescendentSelected()) { tic.selectAll(); event.consume(); } // Copy if (event.key == GLFW.GLFW_KEY_C && event.isCtrlDown && tic.isDescendentSelected() ) { tic.copy(); event.consume(); } // Home if (event.key == GLFW.GLFW_KEY_HOME ) { if (event.isCtrlDown) { tic.caretPosition = 0; } else { tic.home(); } if (!event.isShiftDown) { tic.deselect(); } else { tic.selectionEndPosition = tic.caretPosition; } event.consume(); } // End if (event.key == GLFW.GLFW_KEY_END ) { if (event.isCtrlDown) { tic.caretPosition = tic.getLength(); } else { tic.end(); } if (!event.isShiftDown) { tic.deselect(); } else { tic.selectionEndPosition = tic.caretPosition; } event.consume(); } // Left if (event.key == GLFW.GLFW_KEY_LEFT ) { if (!event.isShiftDown && tic.getSelection().getLength() > 0) { tic.deselect(); } else { tic.setCaretPosition(tic.caretPosition-1); if (event.isShiftDown) { tic.selectionEndPosition = tic.caretPosition; } else { tic.selectionStartPosition = tic.caretPosition; tic.selectionEndPosition = tic.caretPosition; } } event.consume(); } // Right if (event.key == GLFW.GLFW_KEY_RIGHT ) { if (!event.isShiftDown && tic.getSelection().getLength()>0 ) { tic.deselect(); } else { tic.setCaretPosition(tic.caretPosition+1); if (event.isShiftDown) { tic.selectionEndPosition = tic.caretPosition; } else { tic.selectionStartPosition = tic.caretPosition; tic.selectionEndPosition = tic.caretPosition; } } event.consume(); } // Up if (event.key == GLFW.GLFW_KEY_UP ) { if (!event.isShiftDown && tic.getSelection().getLength()>0 ) { tic.deselect(); } int nextRow = tic.getRowFromCaret(tic.caretPosition)-1; if ( nextRow < 0 ) { tic.setCaretPosition(0); } else { int pixelX = (int) tic.getPixelOffsetFromCaret(tic.caretPosition); int index = tic.getCaretFromPixelOffset(nextRow, pixelX); tic.setCaretPosition(index); } if (event.isShiftDown) { tic.selectionEndPosition = tic.caretPosition; } else { tic.selectionStartPosition = tic.caretPosition; tic.selectionEndPosition = tic.caretPosition; } event.consume(); } // Down if (event.key == GLFW.GLFW_KEY_DOWN ) { if (!event.isShiftDown && tic.getSelection().getLength() > 0) { tic.deselect(); } int nextRow = tic.getRowFromCaret(tic.caretPosition)+1; if ( nextRow >= tic.lines.size() ) { tic.setCaretPosition(tic.getLength()); } else { int pixelX = (int) tic.getPixelOffsetFromCaret(tic.caretPosition); int index = tic.getCaretFromPixelOffset(nextRow, pixelX); tic.setCaretPosition(index); } if (event.isShiftDown) { tic.selectionEndPosition = tic.caretPosition; } else { tic.selectionStartPosition = tic.caretPosition; tic.selectionEndPosition = tic.caretPosition; } event.consume(); } // These require us to be editing... if (tic.editing) { // Backspace if (event.key == GLFW.GLFW_KEY_BACKSPACE) { tic.deletePreviousCharacter(); event.consume(); } // Delete if (event.key == GLFW.GLFW_KEY_DELETE ) { tic.deleteNextCharacter(); event.consume(); } // Paste if (event.key == GLFW.GLFW_KEY_V && event.isCtrlDown ) { tic.paste(); event.consume(); } // Cut if (event.key == GLFW.GLFW_KEY_X && event.isCtrlDown ) { tic.cut(); event.consume(); } // Undo/Redo if (event.key == GLFW.GLFW_KEY_Z && event.isCtrlDown ) { if (event.isShiftDown) { tic.redo(); } else { tic.undo(); } event.consume(); } // Normal Redo if ( event.key == GLFW.GLFW_KEY_Y && event.isCtrlDown ) { tic.redo(); event.consume(); } } } } }
[ "bumfo@users.noreply.github.com" ]
bumfo@users.noreply.github.com
06d5d5738a562d2f7d446d0bc09f75bfecc3d8ba
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/com/twitter/app/lists/i.java
bbdf92b87c85892b73b99eb42a13668ee4789d42
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
244
java
package com.twitter.app.lists; abstract interface i { public abstract void a(long paramLong, String paramString); } /* Location: * Qualified Name: com.twitter.app.lists.i * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
5e466264fa787faec5abe35aa8cbfdef6474e16d
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/rum/v20210622/models/DescribeScoresResponse.java
d44d7924771709d25495d89884846aa907f2a84f
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
3,197
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.tencentcloudapi.rum.v20210622.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeScoresResponse extends AbstractModel{ /** * 数组 */ @SerializedName("ScoreSet") @Expose private ScoreInfo [] ScoreSet; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 数组 * @return ScoreSet 数组 */ public ScoreInfo [] getScoreSet() { return this.ScoreSet; } /** * Set 数组 * @param ScoreSet 数组 */ public void setScoreSet(ScoreInfo [] ScoreSet) { this.ScoreSet = ScoreSet; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public DescribeScoresResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public DescribeScoresResponse(DescribeScoresResponse source) { if (source.ScoreSet != null) { this.ScoreSet = new ScoreInfo[source.ScoreSet.length]; for (int i = 0; i < source.ScoreSet.length; i++) { this.ScoreSet[i] = new ScoreInfo(source.ScoreSet[i]); } } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamArrayObj(map, prefix + "ScoreSet.", this.ScoreSet); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
8faedd61883a9efa0cf537b40650e9a0585ac512
84bce56a5557e6230b3f221c0fb5eb420084871b
/scripts/atlasProcessingOrders/bnWalletInstantPurchaseWTokenization/TC02_ebookKids.java
8b1bfd91b2211328da14df9ee3284c3f3825e50f
[]
no_license
zafor99/serviceatlas
8e42c9e5a161e34e188cd09af9ab39103f79318d
922ffdd223d1d8b206efb63e0a1a42083fe1bd9c
refs/heads/master
2022-11-29T17:23:47.411796
2019-07-28T19:57:47
2019-07-28T19:57:47
94,845,828
0
0
null
2022-11-24T07:02:22
2017-06-20T03:28:52
Java
UTF-8
Java
false
false
6,179
java
package scripts.atlasProcessingOrders.bnWalletInstantPurchaseWTokenization; import resources.scripts.atlasProcessingOrders.bnWalletInstantPurchaseWTokenization.TC02_ebookKidsHelper; import com.rational.test.ft.*; import com.rational.test.ft.object.interfaces.*; import com.rational.test.ft.object.interfaces.SAP.*; import com.rational.test.ft.object.interfaces.WPF.*; import com.rational.test.ft.object.interfaces.dojo.*; import com.rational.test.ft.object.interfaces.siebel.*; import com.rational.test.ft.object.interfaces.flex.*; import com.rational.test.ft.object.interfaces.generichtmlsubdomain.*; import com.rational.test.ft.script.*; import com.rational.test.ft.value.*; import com.rational.test.ft.vp.*; import com.ibm.rational.test.ft.object.interfaces.sapwebportal.*; import framework.AtlasScriptExecution; /** * Description : Functional Test Script * @author zsadeque */ public class TC02_ebookKids extends TC02_ebookKidsHelper { /** * Script Name : <b>TC01_NookApp</b> * Generated : <b>Feb 21, 2014 4:07:41 PM</b> * Description : Functional Test Script * Original Host : WinNT Version 6.1 Build 7601 (S) * * @since 2014/02/21 * @author zsadeque * @throws ClassNotFoundException */ public void testMain(Object[] args) throws ClassNotFoundException { String orderNumber,customerID,timeStamp,ean = null; ean = "9780375987960"; //eBook Kids if(AtlasScriptExecution.getScriptRun()) { instantPurchase().submitIPOrder("VI", "4313081835209051", ean,true); instantPurchase().verifyInstantPurchase("IPStatus"); customerID = instantPurchase().getCustomerID(); orderNumber=instantPurchase().getOrderNumber(); timeStamp = instantPurchase().getOrderTimeStamp(); if(orderNumber.length()>2){ writeBNOrdersWTokenizationToExcel("TC02_ebookKids", timeStamp, orderNumber, ean,customerID); } else{ logError("Order Number is not generated"); } } if (AtlasScriptExecution.getDBValidation()){ orderNumber = getOrderNumberFromBNOrdersWTokenizationExcel("TC02_ebookKids"); customerID = getOrderNumberFromBNOrdersWTokenizationExcel("TC02_ebookKids"); if(orderNumber.length()>2){ //Verify Order is inserted into OSDB dbService().OrderStatusDB().verifyOrderExistInOrderHeaderTable("OSDB_OrdExtInOrderHeaderTable", orderNumber); dbService().OrderStatusDB().verifyOrderExistInOrderItemTable("OSDB_OrdExtInOrderItemTable", orderNumber); dbService().OrderStatusDB().verifyOrderExistInOrderShipmentTableTable("OSDB_OrdExtInOrderShipmentTableTable", orderNumber); //Data Validation for OSDB dbService().OrderStatusDB().verifyOrderInOrderHeaderTable(orderNumber, "OSDB_OrderHeaderTable"); dbService().OrderStatusDB().verifyOrderInOrderItemTable(orderNumber, "OSDB_ItemTable"); dbService().OrderStatusDB().verifyOrderInOrderShipmentTable(orderNumber, "OSDB_OrderShipmentTable"); //Verify Order is inserted into DWDB dbService().datawareHouseDB().verifyOrderExistInOrderHeaderTable("DwDB_OrdExtInOrderHeader", orderNumber); dbService().datawareHouseDB().verifyOrderExistInOrderDetailTable("DwDB_OrdExtInOrderDetail", orderNumber); dbService().datawareHouseDB().verifyOrderExistInOrderDetailActivityTable("DwDB_OrdExtInOrderDetailActivity", orderNumber); dbService().datawareHouseDB().verifyCustomerExist("DwDB_CustomerExtInCustomerTable", customerID); dbService().datawareHouseDB().verifyOrderExistInOrderCCNumberTable("DwDB_CustomerExtInOrderCCNumber", orderNumber); //Data Validation for DWDB dbService().datawareHouseDB().verifyOrderInOrderHeaderTable(orderNumber, "DWDB_OrderHeaderTable"); dbService().datawareHouseDB().verifyOrderInOrderDetailTable(orderNumber, "DWDB_OrderDetailTable"); dbService().datawareHouseDB().verifyOrderInOrderDetailActivityTable(orderNumber, "DWDB_OrderDetailActivityTable"); dbService().datawareHouseDB().verifyDetailsInCustomerTable(customerID, "DWDB_CustomerTable"); dbService().datawareHouseDB().verifyOrderInOrderCCNumberTable(orderNumber, "DWDB_OrderCCNumberTable"); //Verify Order is inserted into BN Inc DB dbService().BNIncDB().verifyOrderExistInOrderHeaderTable("BNIncDB_OrdExtInOrderHeader", orderNumber); dbService().BNIncDB().verifyOrderExistInOrderDetailTable("BNIncDB_OrdExtInOrderDetail", orderNumber); dbService().BNIncDB().verifyOrderExistInOrderDetailActivityTable("BNIncDB_OrdExtInOrderDetailActivity", orderNumber); dbService().BNIncDB().verifyCustomerExist("BNIncDB_CustomerExtInCustomerTable", customerID); dbService().BNIncDB().verifyOrderExistInOrderCCNumberTable("BNIncDB_CustomerExtInOrderCCNumber", orderNumber); //Data Validation for BN Inc DB dbService().BNIncDB().verifyOrderInOrderHeaderTable(orderNumber, "BNIncDB_OrderHeaderTable"); dbService().BNIncDB().verifyOrderInOrderDetailTable(orderNumber, "BNIncDB_OrderDetailTable"); dbService().BNIncDB().verifyOrderInOrderDetailActivityTable(orderNumber, "BNIncDB_OrderDetailActivityTable"); dbService().BNIncDB().verifyOrderInOrderCCNumberActivityTable(orderNumber, "BNIncDB_OrderCCNumberTable"); dbService().BNIncDB().verifyDetailsInCustomerTable(customerID, "BNIncDB_CustomerTable"); //Verify Order is inserted into Sales Rank DB and Source by Atlas User ID dbService().salesRankDB().verifyOrderExistInOrderHeaderTable("SalesRankDB_OrderExistInOrderHeader", orderNumber); dbService().salesRankDB().verifyOrderExistInOrderDetailTable("SalesRankDB_OrderExistInOrderDetail", orderNumber); dbService().salesRankDB().verifyOrderSourceIsAtlas("AtlasSourced", orderNumber); //Data Validation for Sales Rank DB dbService().salesRankDB().verifyOrderInOrderHeaderTable(orderNumber, "SalesRankDB_OrderHeaderTable"); dbService().salesRankDB().verifyOrderInOrderDetailTable(orderNumber, "SalesRankDB_OrderDetailTable"); //Validate Order Exist in Digital Locker digitalLocker(customerID).verifyLockerItem("DigitalLocker"); //Validate no Error in Activity Momonitor for this order activityMonitor().verifyActivityMonitorForError(ean, "NoError"); } else{ logError("Order Number is not generated"); } } } }
[ "zafor99@gmail.com" ]
zafor99@gmail.com
c1fa70a89d8810a9355386ee0539bf71d2f5c50f
bf4a5509bbedeca549d97f884b36001138518a38
/UI/CustomComponent/entry/src/main/java/ohos/samples/customcomponent/utils/Util.java
337cc23ec0f0eac30ca78799de05a8dbcf73eb2d
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
xiongmaozairanshao/app_samples
abe282fb27e46babaf49e6fa474b103e60826690
f105afea3df27beca6d3088295ce45a5013e58aa
refs/heads/master
2023-06-22T22:18:47.017329
2021-07-19T01:37:24
2021-07-19T01:37:24
388,351,466
1
0
null
null
null
null
UTF-8
Java
false
false
3,786
java
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * 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 ohos.samples.customcomponent.utils; import ohos.app.Context; import ohos.global.resource.NotExistException; import ohos.global.resource.Resource; import ohos.global.resource.ResourceManager; import ohos.hiviewdfx.HiLog; import ohos.hiviewdfx.HiLogLabel; import ohos.media.image.ImageSource; import ohos.media.image.PixelMap; import ohos.media.image.common.PixelFormat; import ohos.media.image.common.Rect; import ohos.media.image.common.Size; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Optional; /** * Util Tools * * @since 2021-05-08 */ public class Util { private static final HiLogLabel TAG = new HiLogLabel(3, 0xD001100, "Utils"); private Util() { } private static byte[] readResource(Resource resource) { final int bufferSize = 1024; final int ioEnd = -1; byte[] byteArray; byte[] buffer = new byte[bufferSize]; try (ByteArrayOutputStream output = new ByteArrayOutputStream()) { while (true) { int readLen = resource.read(buffer, 0, bufferSize); if (readLen == ioEnd) { HiLog.error(TAG, "readResource finish"); byteArray = output.toByteArray(); break; } output.write(buffer, 0, readLen); } } catch (IOException e) { HiLog.debug(TAG, "readResource failed" + e.getLocalizedMessage()); return new byte[0]; } return byteArray; } /** * Creates is {@code PixelMap} object based on the image resource ID. * This method only loads local image resources. If the image file does not exist or the loading fails, * {@code null} is returned. * * @param resouceId Indicates the image resource ID. * @param slice Indicates the Context. * @return Returns the image. */ public static Optional<PixelMap> createPixelMapByResId(int resouceId, Context slice) { ResourceManager manager = slice.getResourceManager(); if (manager == null) { return Optional.empty(); } try { try (Resource resource = manager.getResource(resouceId)) { if (resource == null) { return Optional.empty(); } ImageSource.SourceOptions srcOpts = new ImageSource.SourceOptions(); srcOpts.formatHint = "image/png"; ImageSource imageSource = ImageSource.create(readResource(resource), srcOpts); if (imageSource == null) { return Optional.empty(); } ImageSource.DecodingOptions decodingOptions = new ImageSource.DecodingOptions(); decodingOptions.desiredSize = new Size(0, 0); decodingOptions.desiredRegion = new Rect(0, 0, 0, 0); decodingOptions.desiredPixelFormat = PixelFormat.ARGB_8888; return Optional.of(imageSource.createPixelmap(decodingOptions)); } } catch (IOException | NotExistException e) { return Optional.empty(); } } }
[ "gaohui34@huawei.com" ]
gaohui34@huawei.com
4d672fc6d323a55c3ecb7ca501d4d40f167cd739
e361cdaa8fd6fbbc56547d969eb81229aae69f14
/cloudalibaba-provider-payment9002/src/main/java/com/sherlock/springcloud/alibaba/PaymentMain9002.java
37c16b9418d2328730ccdb93654aedc02b12ace4
[]
no_license
43984463/springcloud
61711de419557a1bac60489604b6558015b8713d
b21717b836794c703f7e3d024cb123669cf54218
refs/heads/master
2021-03-07T16:53:07.345204
2020-03-22T07:23:32
2020-03-22T07:23:32
245,988,481
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package com.sherlock.springcloud.alibaba; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @auther Sherlock * @date 2020/3/13 23:29 * @Description: */ @SpringBootApplication @EnableDiscoveryClient public class PaymentMain9002 { public static void main(String[] args) { SpringApplication.run(PaymentMain9002.class, args); } }
[ "+XSxs100206@" ]
+XSxs100206@
79af8e81cf20a291cde8fd3461c283622020f01a
0b9ea4672de638479ef8a7b992c571f0b925fdff
/src/main/java/search-in-rotated-sorted-array-ii/Solution.java
c8727edae12e8b1525ce23c329a268877f0671fc
[]
no_license
VictorKostyukov/coding-interview-solutions
195fa5572b0d34369919557dad3236b435c04d3a
57a65e3588175d5af511722c354ed4b142ceff2c
refs/heads/master
2020-04-01T09:08:00.270927
2018-06-24T18:54:57
2018-06-24T18:54:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,060
java
public class Solution { /** * param A : an integer ratated sorted array and duplicates are allowed * param target : an integer to be search * return : a boolean */ public boolean search(int[] A, int target) { if (A.length == 0) return false; int low = 0, high = A.length - 1; while (low < high) { int mid = (low + high) / 2; if (A[mid] == target) { return true; } if (A[low] < A[mid]) { if (A[low] <= target && target <= A[mid]) { high = mid - 1; } else { low = mid + 1; } } else if (A[mid] < A[low]) { if (A[mid] <= target && target <= A[high]) { low = mid + 1; } else { high = mid - 1; } } else { low++; } } return A[low] == target ? true : false; } }
[ "hivetrix@yahoo.com" ]
hivetrix@yahoo.com
8c66d511df58b19dca6e71e443deddfd7549ed68
5fcb3a69d582495774cde794ce3d2777b22a9312
/src/com/feytuo/chat/Constant.java
9163913f99aa7374d31364cb23a41040af53cc53
[]
no_license
hellocountryman/helloxiangxiang
247d58e877e945c04658f62e2cc628c4d26fadd6
7fc01735cce421df55ca1741f16d663e3748ad63
refs/heads/master
2020-05-17T22:24:34.956307
2014-12-24T05:18:25
2014-12-24T05:18:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
/** * Copyright (C) 2013-2014 EaseMob Technologies. 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.feytuo.chat; /** * 常量类 * @author feytuo * */ public class Constant { public static final String NEW_FRIENDS_USERNAME = "item_new_friends"; public static final String GROUP_USERNAME = "item_groups"; public static final String MESSAGE_ATTR_IS_VOICE_CALL = "is_voice_call"; }
[ "hand@hand-PC1" ]
hand@hand-PC1
033ae22931dc21f7a7514de2411d0dddb4e115b0
327f005fc3903a4a4110aa242e4dfc2cd3bd6b2c
/QRAProject/src/com/qra/project/CreateBlankQRServlet.java
757c8afc05053fca0e10c4ce511a2ff0097975dd
[]
no_license
ridetheflatline/qradroid
a265e51d2155374ece621838f9202ca3e9ca0e16
778ab633775dcbf0632ec37f637b8a6ae0eea627
refs/heads/master
2020-12-24T17:17:52.293944
2013-12-05T16:53:34
2013-12-05T16:53:34
38,907,191
1
0
null
null
null
null
UTF-8
Java
false
false
4,086
java
package com.qra.project; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jasypt.util.password.BasicPasswordEncryptor; /*** * This servlet creates empty user accounts, signs them up for the conference, and prints QR ID cards for them. * The user can login using their username as username and password and change all the other info about themself. * @author Joel Friberg * */ public class CreateBlankQRServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { if(CookieSessionCheck.check(req, resp)!=null){ PersistenceManager pm = PMF.get().getPersistenceManager(); int blankNum = 0; String confID = req.getParameter("conf_id"); String fullName = null; String userID = null; Conference tempConf=null; ArrayList<QRData> qrData = new ArrayList<QRData>(); tempConf=pm.getObjectById(Conference.class, confID); String username = req.getParameter("username"); if(req.getParameter("blanknum")!="") blankNum=Integer.parseInt(req.getParameter("blanknum")); if(blankNum>0){ //create users, sign them up for the conference, and print id cards for(int i=0; i<blankNum; i++){ //check if user already exists username=tempConf.getConf_name()+" Attendee "+(i+1); Query q = pm.newQuery(User.class, "username == '" + username + "'"); List<User> results = (List<User>) q.execute(); if((results.size() == 0)){ //if user does not exist, create new user object and store in the datastore BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor(); String encryptedPassword = passwordEncryptor.encryptPassword(username); User u = new User(null, null, null, null, username, encryptedPassword, null, null); try{ pm.makePersistent(u); } finally{} //retrieve new user ID Query q2 = pm.newQuery(User.class, "username == '" + username + "'"); List<User> uResults = (List<User>) q2.execute(); while(!(uResults.size()>0)){ uResults = (List<User>) q2.execute(); } userID=uResults.get(0).getID(); //register user for the conference ConferenceAttendee ca = new ConferenceAttendee(confID, userID); try{ pm.makePersistent(ca); } finally{} //Create QR data to be displayed SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/YYYY"); String dates=sdf.format(tempConf.getStartTime())+"-"+sdf.format(tempConf.getEndTime()); fullName="____________________"; qrData.add(new QRData(tempConf.getConf_name(),fullName,userID,confID,dates,username)); } else{//if the user does exist, increment loop counter so higher # users will be created blankNum++; } } //send data to jsp file for ID generation req.setAttribute("qrarray", qrData); String url = "/createmyqr.jsp"; RequestDispatcher dispatcher=getServletContext().getRequestDispatcher(url); try { dispatcher.forward(req, resp); } catch (ServletException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else{ resp.setContentType("text/HTML"); resp.setHeader("Refresh", "5; URL=/createqr"); resp.getWriter().print("You did not enter a valid number of blank IDs to create"); resp.getWriter().print("<br>You will return to My Conferences in 5 seconds.<br>"); resp.getWriter().print("If you are not redirect, please click on the following link.<br>"); resp.getWriter().print("<br> <a href=\"createqr\">Return to My Conferences</a>"); } } } }
[ "qrattendanceproject@46f55a48-31d8-6c2b-38d9-c1b5235c93de" ]
qrattendanceproject@46f55a48-31d8-6c2b-38d9-c1b5235c93de
98bf25423950bee352455e8dec9e2abe296273e7
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/airbnb/android/lib/viewcomponents/viewmodels/LargeTitleRowEpoxyModel_.java
a20b1f890d47b5829d0da83cd0850dea8368e6da
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
10,091
java
package com.airbnb.android.lib.viewcomponents.viewmodels; import com.airbnb.android.lib.C0880R; import com.airbnb.epoxy.EpoxyModel.SpanSizeOverrideCallback; import com.airbnb.epoxy.EpoxyViewHolder; import com.airbnb.epoxy.GeneratedModel; import com.airbnb.epoxy.OnModelBoundListener; import com.airbnb.epoxy.OnModelUnboundListener; import com.airbnb.p027n2.components.BigNumberRow; import com.airbnb.p027n2.epoxy.NumCarouselItemsShown; import com.airbnb.p027n2.epoxy.NumItemsInGridRow; public class LargeTitleRowEpoxyModel_ extends LargeTitleRowEpoxyModel implements GeneratedModel<BigNumberRow> { private OnModelBoundListener<LargeTitleRowEpoxyModel_, BigNumberRow> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<LargeTitleRowEpoxyModel_, BigNumberRow> onModelUnboundListener_epoxyGeneratedModel; public void handlePreBind(EpoxyViewHolder holder, BigNumberRow object, int position) { } public void handlePostBind(BigNumberRow object, int position) { if (this.onModelBoundListener_epoxyGeneratedModel != null) { this.onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } } public LargeTitleRowEpoxyModel_ onBind(OnModelBoundListener<LargeTitleRowEpoxyModel_, BigNumberRow> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } public void unbind(BigNumberRow object) { super.unbind(object); if (this.onModelUnboundListener_epoxyGeneratedModel != null) { this.onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } public LargeTitleRowEpoxyModel_ onUnbind(OnModelUnboundListener<LargeTitleRowEpoxyModel_, BigNumberRow> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } public LargeTitleRowEpoxyModel_ title(CharSequence title) { onMutation(); this.title = title; return this; } public CharSequence title() { return this.title; } public LargeTitleRowEpoxyModel_ primarySubtitle(CharSequence primarySubtitle) { onMutation(); this.primarySubtitle = primarySubtitle; return this; } public CharSequence primarySubtitle() { return this.primarySubtitle; } public LargeTitleRowEpoxyModel_ secondarySubtitle(CharSequence secondarySubtitle) { onMutation(); this.secondarySubtitle = secondarySubtitle; return this; } public CharSequence secondarySubtitle() { return this.secondarySubtitle; } public LargeTitleRowEpoxyModel_ titleRes(int titleRes) { onMutation(); this.titleRes = titleRes; return this; } public int titleRes() { return this.titleRes; } public LargeTitleRowEpoxyModel_ primarySubtitleRes(int primarySubtitleRes) { onMutation(); this.primarySubtitleRes = primarySubtitleRes; return this; } public int primarySubtitleRes() { return this.primarySubtitleRes; } public LargeTitleRowEpoxyModel_ secondarySubtitleRes(int secondarySubtitleRes) { onMutation(); this.secondarySubtitleRes = secondarySubtitleRes; return this; } public int secondarySubtitleRes() { return this.secondarySubtitleRes; } public LargeTitleRowEpoxyModel_ numCarouselItemsShown(NumCarouselItemsShown numCarouselItemsShown) { onMutation(); this.numCarouselItemsShown = numCarouselItemsShown; super.numCarouselItemsShown(numCarouselItemsShown); return this; } public LargeTitleRowEpoxyModel_ showDivider(boolean showDivider) { super.showDivider(showDivider); return this; } public LargeTitleRowEpoxyModel_ numItemsInGridRow(NumItemsInGridRow numItemsInGridRow) { super.numItemsInGridRow(numItemsInGridRow); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6143id(long id) { super.mo11716id(id); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6148id(Number... ids) { super.mo11721id(ids); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6144id(long id1, long id2) { super.mo11717id(id1, id2); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6145id(CharSequence key) { super.mo11718id(key); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6147id(CharSequence key, CharSequence... otherKeys) { super.mo11720id(key, otherKeys); return this; } /* renamed from: id */ public LargeTitleRowEpoxyModel_ m6146id(CharSequence key, long id) { super.mo11719id(key, id); return this; } public LargeTitleRowEpoxyModel_ layout(int arg0) { super.layout(arg0); return this; } public LargeTitleRowEpoxyModel_ spanSizeOverride(SpanSizeOverrideCallback arg0) { super.spanSizeOverride(arg0); return this; } public LargeTitleRowEpoxyModel_ show() { super.show(); return this; } public LargeTitleRowEpoxyModel_ show(boolean show) { super.show(show); return this; } public LargeTitleRowEpoxyModel_ hide() { super.hide(); return this; } /* access modifiers changed from: protected */ public int getDefaultLayout() { return C0880R.layout.view_holder_large_title_row; } public LargeTitleRowEpoxyModel_ reset() { this.onModelBoundListener_epoxyGeneratedModel = null; this.onModelUnboundListener_epoxyGeneratedModel = null; this.title = null; this.primarySubtitle = null; this.secondarySubtitle = null; this.titleRes = 0; this.primarySubtitleRes = 0; this.secondarySubtitleRes = 0; this.showDivider = null; this.numCarouselItemsShown = null; super.reset(); return this; } public boolean equals(Object o) { boolean z; if (o == this) { return true; } if (!(o instanceof LargeTitleRowEpoxyModel_) || !super.equals(o)) { return false; } LargeTitleRowEpoxyModel_ that = (LargeTitleRowEpoxyModel_) o; if ((this.onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null)) { return false; } if (this.onModelUnboundListener_epoxyGeneratedModel == null) { z = true; } else { z = false; } if (z != (that.onModelUnboundListener_epoxyGeneratedModel == null)) { return false; } if (this.title != null) { if (!this.title.equals(that.title)) { return false; } } else if (that.title != null) { return false; } if (this.primarySubtitle != null) { if (!this.primarySubtitle.equals(that.primarySubtitle)) { return false; } } else if (that.primarySubtitle != null) { return false; } if (this.secondarySubtitle != null) { if (!this.secondarySubtitle.equals(that.secondarySubtitle)) { return false; } } else if (that.secondarySubtitle != null) { return false; } if (this.titleRes != that.titleRes || this.primarySubtitleRes != that.primarySubtitleRes || this.secondarySubtitleRes != that.secondarySubtitleRes) { return false; } if (this.showDivider != null) { if (!this.showDivider.equals(that.showDivider)) { return false; } } else if (that.showDivider != null) { return false; } if (this.numCarouselItemsShown != null) { if (!this.numCarouselItemsShown.equals(that.numCarouselItemsShown)) { return false; } } else if (that.numCarouselItemsShown != null) { return false; } return true; } public int hashCode() { int i; int i2; int i3; int i4; int i5 = 1; int i6 = 0; int hashCode = ((super.hashCode() * 31) + (this.onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0)) * 31; if (this.onModelUnboundListener_epoxyGeneratedModel == null) { i5 = 0; } int i7 = (hashCode + i5) * 31; if (this.title != null) { i = this.title.hashCode(); } else { i = 0; } int i8 = (i7 + i) * 31; if (this.primarySubtitle != null) { i2 = this.primarySubtitle.hashCode(); } else { i2 = 0; } int i9 = (i8 + i2) * 31; if (this.secondarySubtitle != null) { i3 = this.secondarySubtitle.hashCode(); } else { i3 = 0; } int i10 = (((((((i9 + i3) * 31) + this.titleRes) * 31) + this.primarySubtitleRes) * 31) + this.secondarySubtitleRes) * 31; if (this.showDivider != null) { i4 = this.showDivider.hashCode(); } else { i4 = 0; } int i11 = (i10 + i4) * 31; if (this.numCarouselItemsShown != null) { i6 = this.numCarouselItemsShown.hashCode(); } return i11 + i6; } public String toString() { return "LargeTitleRowEpoxyModel_{title=" + this.title + ", primarySubtitle=" + this.primarySubtitle + ", secondarySubtitle=" + this.secondarySubtitle + ", titleRes=" + this.titleRes + ", primarySubtitleRes=" + this.primarySubtitleRes + ", secondarySubtitleRes=" + this.secondarySubtitleRes + ", showDivider=" + this.showDivider + ", numCarouselItemsShown=" + this.numCarouselItemsShown + "}" + super.toString(); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
9c7b5d48733b227e1248bc5a48ac8fb367b64ad6
6c773f210243d1b9d621b927e66487a490c1003c
/Hotel/src/com/hotel/dao/QuartoDAO.java
3ae2a807a8dd0be48a5c7d816c0f0563168e90e4
[]
no_license
danielcorreaa/workspace-geral
6974817e5dda0dce1df8308d213020d9971b4d9c
486eb8860308d97bfd4fea7abf6fd14e7f91f902
refs/heads/master
2021-01-20T02:41:53.079778
2017-08-24T19:49:26
2017-08-24T19:49:26
101,331,170
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package com.hotel.dao; import java.util.List; import com.hotel.modelo.Quarto; public class QuartoDAO extends GenericDAO<Quarto>{ public QuartoDAO() { super(); } public List<Quarto> povoarBanco(){ HotelDAO dao = new HotelDAO(); for(int i = 101; i < 161; i++){ Quarto q = new Quarto(); q.setNumero(i); q.setStatus(false); q.setHotel(q.selecionarHotel(dao.povoarBanco(), "Hotel JAVA")); lista.add(q); } return lista; } }
[ "daniel.cor@outlook.com" ]
daniel.cor@outlook.com
a64fe235d14add6c9bcc1b11fe31c9ca01fb33c3
26b7f30c6640b8017a06786e4a2414ad8a4d71dd
/src/number_of_direct_superinterfaces/i64872.java
bbc6121e36ddc1469a2d9c6f32cdc17db6e322a8
[]
no_license
vincentclee/jvm-limits
b72a2f2dcc18caa458f1e77924221d585f23316b
2fd1c26d1f7984ea8163bc103ad14b6d72282281
refs/heads/master
2020-05-18T11:18:41.711400
2014-09-14T04:25:18
2014-09-14T04:25:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
69
java
package number_of_direct_superinterfaces; public interface i64872 {}
[ "vincentlee.dolbydigital@yahoo.com" ]
vincentlee.dolbydigital@yahoo.com
e34f89bbbec1981dffab0504204bb1575f984cde
765d5cb95aca11d5a0ac649ed276f1a2ec37a279
/Android/MVVMProject/app/src/main/java/vn/baonq/mvvmproject/data/remote/ApiHelper.java
513a193f3ac1340e367338a86bb191411b2a8f26
[]
no_license
hungnd2126/Capstone
f389cdb1d41e0f284c6dc1b364592700aa1c5ba1
e36a262c0bfb921e2fe2901fccac4c3919806c27
refs/heads/master
2020-03-27T21:55:00.878793
2018-09-03T10:06:30
2018-09-03T10:06:30
147,186,511
2
0
null
null
null
null
UTF-8
Java
false
false
5,446
java
package vn.baonq.mvvmproject.data.remote; import java.util.List; import io.reactivex.Single; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.CheckoutViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.CrawlViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.HistoryViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.Notification; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.OfferViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.PostViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.ReviewViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.TimelineViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.Rating; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.TripViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.UserProfileViewModel; import vn.baonq.mvvmproject.data.model.api.ApiViewModel.WalletViewModel; import vn.baonq.mvvmproject.data.model.api.DialogViewModel; import vn.baonq.mvvmproject.data.model.api.reponse.BaseResponse; import vn.baonq.mvvmproject.data.model.api.reponse.CreateTripResponse; import vn.baonq.mvvmproject.data.model.api.reponse.GetListOfferOnPostResponse; import vn.baonq.mvvmproject.data.model.api.reponse.GetTripByUserResponse; import vn.baonq.mvvmproject.data.model.api.reponse.LoginResponse; import vn.baonq.mvvmproject.data.model.api.reponse.RequestedVMResponse; import vn.baonq.mvvmproject.data.model.api.reponse.UpdateInformationRespone; import vn.baonq.mvvmproject.data.model.api.request.CreatePostRequest; import vn.baonq.mvvmproject.data.model.api.request.CreateTripRequest; import vn.baonq.mvvmproject.data.model.api.request.GetListOfferOnPostRequest; import vn.baonq.mvvmproject.data.model.api.request.LoginRequest; import vn.baonq.mvvmproject.data.model.api.request.RequestedVMRequest; import vn.baonq.mvvmproject.data.model.api.request.UpdateInformationRequest; import vn.baonq.mvvmproject.data.model.api.request.UpdateCreditRequest; import vn.baonq.mvvmproject.data.model.api.reponse.UpdateCreditResponse; import vn.baonq.mvvmproject.data.model.api.request.UpdatePhoneRequest; import vn.baonq.mvvmproject.data.model.api.reponse.UpdatePhoneResponse; import vn.baonq.mvvmproject.data.model.api.request.UpdateAccountRequest; import vn.baonq.mvvmproject.data.model.api.reponse.UpdateAccountResponse; public interface ApiHelper { ApiHeader getApiHeader(); Single<LoginResponse> doLoginFormApiCall(LoginRequest.LoginFormRequest request); Single<LoginResponse> doLoginFbApiCall(LoginRequest.ServerLoginRequest request); Single<LoginResponse> doLogoutApiCall(); Single<List<PostViewModel>> getAllPost(); Single<List<PostViewModel>> getPostByTrip(int TripId); Single<List<PostViewModel>> doGetOfferByTrip(int tripId, int type); Single<UpdateInformationRespone> doUpdateInfomationApiCall(UpdateInformationRequest request); Single<UpdateAccountResponse> doUpdateAccountApiCall(UpdateAccountRequest request); Single<UpdateCreditResponse> doUpdateCreditApiCall(UpdateCreditRequest request); Single<UpdatePhoneResponse> doUpdatePhoneApiCall(UpdatePhoneRequest request); Single<CreateTripResponse> doCreateTripApiCall(CreateTripRequest request); Single<RequestedVMResponse> doGetPostByUser(RequestedVMRequest request); Single<GetTripByUserResponse> doGetTripByUser(int postId); Single<GetListOfferOnPostResponse> doGetListOfferOnPost(GetListOfferOnPostRequest request); Single<GetListOfferOnPostResponse.OfferResponse> doGetOfferOnPost(int OfferId); Single<OfferViewModel> makeOffer(OfferViewModel offerViewModel); Single<OfferViewModel> updateOffer(OfferViewModel offerViewModel); Single<BaseResponse> doCreatePost(PostViewModel request); Single<BaseResponse> doUpdatePost(PostViewModel request); Single<CheckoutViewModel> doCheckOut(GetListOfferOnPostResponse.OfferResponse offerResponse); Single<CheckoutViewModel> doCompletePost(PostViewModel vm); Single<GetListOfferOnPostResponse.OfferResponse> createOrder(GetListOfferOnPostResponse.OfferResponse offerResponse); Single<PostViewModel> getPostDetail(int postId); Single<List<DialogViewModel>> findUser(String Username); Single<String> uploadImage(String image); Single<List<TimelineViewModel>> getTimeline(int orderId); Single<String> doCreateRatingApi(Rating rating); Single<TimelineViewModel> updateTimeline(int orderId, int status, String description, double longitude, double latitude); Single<String> deletePostApiCall(int id); Single<List<TripViewModel>> getSuggestTrip(); Single<List<PostViewModel>> getPostByTrip(int ToCityId, int FromCityId); Single<List<PostViewModel>> getOfferOfBuyer(int tripId); Single<String> createOfferOfBuyer(int postId, int tripId); Single<WalletViewModel> doNapTien(double value); Single<WalletViewModel> doRutTien(double value); Single<CrawlViewModel> crawlData(String url); Single<String> deleteOfferApi(int postId); Single<List<HistoryViewModel>> getHistory(); Single<List<Notification>> getNotification(); Single<UserProfileViewModel> getUserProfile(String userId); Single<List<ReviewViewModel>> getRating(String userId); Single<DialogViewModel> getUser(String userId); Single<String> getMoney(); Single<String> checkRating(int orderId); }
[ "hungnd2126@gmail.com" ]
hungnd2126@gmail.com
da2cd504d43f452204d054f75ef036b5941c94d5
b5d2c20e29a9063f8c72135bd5173afffe8f5579
/jaudiotagger/src/main/java/jaudiotagger/org/jaudiotagger/tag/id3/ID3v1TagField.java
c65b120306bb324e20f2b29a76fc5966bcf4c1d6
[]
no_license
Daniel199438/myMusicPlayer
7d712501a0a272b35a4c60ec41afa425ce73effa
2f406d086f59326168a9074c50df01c5b501eeb8
refs/heads/master
2021-04-28T20:38:08.154362
2018-02-18T08:03:40
2018-02-18T08:03:40
121,930,263
0
0
null
null
null
null
UTF-8
Java
false
false
5,928
java
package jaudiotagger.org.jaudiotagger.tag.id3; import jaudiotagger.org.jaudiotagger.audio.generic.Utils; import jaudiotagger.org.jaudiotagger.tag.TagField; import jaudiotagger.org.jaudiotagger.tag.TagTextField; import java.io.UnsupportedEncodingException; /** * This class encapsulates the name and content of a tag entry in id3 fields * <br> * * @author @author Raphael Slinckx (KiKiDonK) * @author Christian Laireiter (liree) */ public class ID3v1TagField implements TagTextField { /** * If <code>true</code>, the id of the current encapsulated tag field is * specified as a common field. <br> * Example is "ARTIST" which should be interpreted by any application as the * artist of the media content. <br> * Will be set during construction with {@link #checkCommon()}. */ private boolean common; /** * Stores the content of the tag field. <br> */ private String content; /** * Stores the id (name) of the tag field. <br> */ private String id; /** * Creates an instance. * * @param raw Raw byte data of the tagfield. * @throws UnsupportedEncodingException If the data doesn't conform "UTF-8" specification. */ public ID3v1TagField(byte[] raw) throws UnsupportedEncodingException { String field = new String(raw, "ISO-8859-1"); int i = field.indexOf("="); if (i == -1) { //Beware that ogg ID, must be capitalized and contain no space.. this.id = "ERRONEOUS"; this.content = field; } else { this.id = field.substring(0, i).toUpperCase(); if (field.length() > i) { this.content = field.substring(i + 1); } else { //We have "XXXXXX=" with nothing after the "=" this.content = ""; } } checkCommon(); } /** * Creates an instance. * * @param fieldId ID (name) of the field. * @param fieldContent Content of the field. */ public ID3v1TagField(String fieldId, String fieldContent) { this.id = fieldId.toUpperCase(); this.content = fieldContent; checkCommon(); } /** * This method examines the ID of the current field and modifies * {@link #common}in order to reflect if the tag id is a commonly used one. * <br> */ private void checkCommon() { this.common = id.equals(ID3v1FieldKey.TITLE.name()) || id.equals(ID3v1FieldKey.ALBUM.name()) || id.equals(ID3v1FieldKey.ARTIST.name()) || id.equals(ID3v1FieldKey.GENRE.name()) || id.equals(ID3v1FieldKey.YEAR.name()) || id.equals(ID3v1FieldKey.COMMENT.name()) || id.equals(ID3v1FieldKey.TRACK.name()); } /** * This method will copy all bytes of <code>src</code> to <code>dst</code> * at the specified location. * * @param src bytes to copy. * @param dst where to copy to. * @param dstOffset at which position of <code>dst</code> the data should be * copied. */ protected void copy(byte[] src, byte[] dst, int dstOffset) { // for (int i = 0; i < src.length; i++) // dst[i + dstOffset] = src[i]; /* * Heared that this method is optimized and does its job very near of * the system. */ System.arraycopy(src, 0, dst, dstOffset, src.length); } /** * @see TagField#copyContent(TagField) */ public void copyContent(TagField field) { if (field instanceof TagTextField) { this.content = ((TagTextField) field).getContent(); } } /** * @see TagTextField#getContent() */ public String getContent() { return content; } /** * @see TagTextField#getEncoding() */ public String getEncoding() { return "ISO-8859-1"; } /** * @see TagField#getId() */ public String getId() { return this.id; } /** * @see TagField#getRawContent() */ public byte[] getRawContent() throws UnsupportedEncodingException { byte[] size = new byte[4]; byte[] idBytes = this.id.getBytes("ISO-8859-1"); byte[] contentBytes = Utils.getDefaultBytes(this.content, "ISO-8859-1"); byte[] b = new byte[4 + idBytes.length + 1 + contentBytes.length]; int length = idBytes.length + 1 + contentBytes.length; size[3] = (byte) ((length & 0xFF000000) >> 24); size[2] = (byte) ((length & 0x00FF0000) >> 16); size[1] = (byte) ((length & 0x0000FF00) >> 8); size[0] = (byte) (length & 0x000000FF); int offset = 0; copy(size, b, offset); offset += 4; copy(idBytes, b, offset); offset += idBytes.length; b[offset] = (byte) 0x3D; offset++;// "=" copy(contentBytes, b, offset); return b; } /** * @see TagField#isBinary() */ public boolean isBinary() { return false; } /** * @see TagField#isBinary(boolean) */ public void isBinary(boolean b) { //Do nothing, always false } /** * @see TagField#isCommon() */ public boolean isCommon() { return common; } /** * @see TagField#isEmpty() */ public boolean isEmpty() { return this.content.equals(""); } /** * @see TagTextField#setContent(String) */ public void setContent(String s) { this.content = s; } /** * @see TagTextField#setEncoding(String) */ public void setEncoding(String s) { //Do nothing, encoding is always ISO-8859-1 for this tag } public String toString() { return getContent(); } }
[ "daniel.schneider@cirrantic.com" ]
daniel.schneider@cirrantic.com
638538ec73461e280b79b3a83be4c7461c4df025
728d2eefd30f56fb4d92f6505503863a0eb48078
/src/main/java/com/zhiyou/zc/service/ProjectService.java
8ac6f572ade807494256ac2e94101dce58838ee8
[]
no_license
jiandanYK/crowdfunding
5142d628c9886ccd75ee3a2fa1138dbe98dfe1f2
455bd894e316eaf26515675b009d9bffe7604953
refs/heads/master
2020-03-28T12:07:19.342698
2018-09-11T06:30:01
2018-09-11T06:30:01
148,270,860
0
0
null
null
null
null
GB18030
Java
false
false
1,150
java
package com.zhiyou.zc.service; import java.util.List; import java.util.Map; import com.zhiyou.zc.entity.Project; public interface ProjectService { int deleteByPrimaryKey(Integer pId); int insert(Project record); int insertSelective(Project record); Project selectByPrimaryKey(Integer pId); int updateByPrimaryKeySelective(Project record); int updateByPrimaryKey(Project record); List<Project> getSelectPage(Integer pageIndex, String pName,String pUsername,String pState,String cName); int getPage( String pName,String pUsername,String pState,String cName); List<Project> getProByName(String uName); List<Project> getProByState1(String name); int getMaxId(); List<Project> getProAll(); double getNowMoney(); int getProCount(); List<Project> getNewPro(); List<Project> getProByState(); List<Project> getSelectPage1(Integer pageIndex,String pState,String cName); int getPage1( String pState,String cName); //教育助学的项目 List<Project> getStuPro(); }
[ "15560107856@163.com" ]
15560107856@163.com
1a54ac9938944670ea3d7bc15027d8c4922b53b3
b4bfaf17a5aa546784fb45dade93598a08f4d5f1
/app/src/main/java/com/trailbuddy/trailbuddy/trail/data/TrailDetails.java
bdfe68542db65c09a00b68e79c73ecc67e407d39
[]
no_license
hogtreks/TrailBuddy_AndroidHikingApp
31917dd126183524f36150d0e2aa52fef487e9f9
fcc8ee6b6769518bc3bb2adf255e1917146083c6
refs/heads/master
2022-02-04T03:45:07.827208
2019-03-04T21:50:28
2019-03-04T21:50:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package com.trailbuddy.trailbuddy.trail.data; import com.trailbuddy.trailbuddy.reviews.data.Review; import java.io.Serializable; import java.util.ArrayList; public class TrailDetails implements Serializable { public ArrayList<Review> reviews; public ArrayList<String> photos; }
[ "gpise@mail.sfsu.edu" ]
gpise@mail.sfsu.edu
7febca90eef9ca01d3fb2ef086ef774462b94839
07ca13ca2ac3d5d12c4acafd67f752cd5e1d187e
/app/src/main/java/com/inz/z/view/adapter/example/RollViewPagerAdapter.java
8f22fe729fd3ec65c0f5e2ef6d09890d5b2e6ed3
[ "Apache-2.0" ]
permissive
Memory-Z/Z_inz
13430dca2e3e648c16a86d85fc71cbd24d5f0b3c
feff01057cf308fcbf9f1ebf880b9a114badf970
refs/heads/master
2021-06-04T10:26:02.982347
2020-01-18T02:20:39
2020-01-18T02:20:39
141,771,340
2
0
null
null
null
null
UTF-8
Java
false
false
2,893
java
package com.inz.z.view.adapter.example; import androidx.annotation.NonNull; import androidx.viewpager.widget.PagerAdapter; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.inz.z.view.widget.RollViewPager; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author Zhenglj * @version 1.0.0 * Create by inz in 2019/1/27 15:26. */ public class RollViewPagerAdapter extends PagerAdapter { private List<Map<String, Object>> mapList; private RollViewPager rollViewPager; private RollViewItemListener rollViewItemListener; public interface RollViewItemListener { void onItemClick(View view); } public RollViewPagerAdapter(RollViewPager rollViewPager) { this.rollViewPager = rollViewPager; this.mapList = new ArrayList<>(); } public RollViewPagerAdapter(List<Map<String, Object>> mapList, RollViewPager rollViewPager) { this.mapList = mapList; this.rollViewPager = rollViewPager; } @Override public int getCount() { return mapList == null ? 0 : mapList.size(); } @Override public boolean isViewFromObject(@NonNull View view, @NonNull Object o) { return o == view; } @NonNull @Override public Object instantiateItem(@NonNull ViewGroup container, int position) { Map<String, Object> map = mapList.get(position); ImageView imageView = (ImageView) map.get("imageView"); if (imageView != null) { container.removeView(imageView); imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (rollViewItemListener != null) { rollViewItemListener.onItemClick(v); } } }); container.addView(imageView); return imageView; } return super.instantiateItem(container, position); } @Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { container.removeView((View) object); } public void addImageView(Map<String, Object> map) { this.mapList.add(map); notifyDataSetChanged(); rollViewPager.updateDotView(getCount()); } public void removeImageView(Map<String, Object> map) { this.mapList.remove(map); notifyDataSetChanged(); rollViewPager.updateDotView(getCount()); } public void replaceAll(List<Map<String, Object>> mapList) { this.mapList = mapList; notifyDataSetChanged(); rollViewPager.updateDotView(getCount()); } public void setRollViewItemListener(RollViewItemListener rollViewItemListener) { this.rollViewItemListener = rollViewItemListener; } }
[ "1165469346@qq.com" ]
1165469346@qq.com
c5f6c4a07b5e7c10197b87055e39cda19f0404ea
a5f009bda24e7d2ded45706605652685b0dd41b7
/interviewAbout/interview-crm/crm-entity/src/main/java/com/iw/crm/entity/ChanceRecord.java
ed447be4f669d24702540ac9281e28ced79b80ee
[]
no_license
HoufaLv/interview
7e94be1ca852efedd49bb7d72d0b4574c9e66453
9b80e0e281c4ad311434b80ea906ff19cc5e0427
refs/heads/master
2020-03-17T14:52:42.700802
2018-06-06T09:09:54
2018-06-06T09:09:54
133,689,228
1
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
package com.iw.crm.entity; import java.io.Serializable; import java.util.Date; /** * @author */ public class ChanceRecord implements Serializable { private Integer id; /** * 销售机会ID */ private Integer saleId; /** * 创建时间 */ private Date createTime; /** * 跟进内容 */ private String content; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getSaleId() { return saleId; } public void setSaleId(Integer saleId) { this.saleId = saleId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
[ "houfaLv@outlook.com" ]
houfaLv@outlook.com
8f5661f699c2cb8bf8a28cae951b5d24593e6d21
d8c6afa5aad69a5f3e8a07052f0708191e0e411c
/src/main/java/org/ahren/android/run/configuration/gdb/AndroidGDBDebugProcess.java
3f1ddef121693c84fd9ace0461b56d36b09ccaf7
[ "Apache-2.0" ]
permissive
1670295969/AndroidNativeDebug
dc4814c5a5eca1e5e55ab2c8ea133775190a66c3
a500a9b5c23bdc7c00de49dac008585befb8ac1e
refs/heads/master
2023-08-27T22:59:21.733986
2021-11-14T13:05:29
2021-11-14T13:05:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,738
java
/* * Copyright 2019 Ahren Li(www.lili.kim) AndroidNativeDebug * 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.ahren.android.run.configuration.gdb; import com.intellij.execution.configurations.GeneralCommandLine; import com.jetbrains.cidr.ArchitectureType; import com.jetbrains.cidr.execution.TrivialRunParameters; import org.ahren.android.debug.AndroidDebugParameters; import com.intellij.execution.ExecutionException; import com.intellij.execution.filters.TextConsoleBuilder; import com.intellij.xdebugger.XDebugSession; import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; import com.jetbrains.cidr.execution.debugger.backend.DebuggerDriver; import com.jetbrains.cidr.execution.debugger.backend.DebuggerDriverConfiguration; import com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver; import com.jetbrains.cidr.execution.debugger.remote.CidrRemoteGDBDebugProcessKt; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; public class AndroidGDBDebugProcess extends CidrDebugProcess { private AndroidDebugParameters mParameters; AndroidGDBDebugProcess(DebuggerDriverConfiguration configuration, @NotNull AndroidDebugParameters parameters, @NotNull XDebugSession session, @NotNull TextConsoleBuilder consoleBuilder) throws ExecutionException { super(new TrivialRunParameters(configuration, new GeneralCommandLine(), ArchitectureType.MIPS), session, consoleBuilder); mParameters = parameters; } @NotNull @Override protected DebuggerDriver.Inferior doLoadTarget(@NotNull DebuggerDriver debuggerDriver) throws ExecutionException { Intrinsics.checkNotNullParameter(debuggerDriver, "driver"); GDBDriver driver = (GDBDriver) debuggerDriver; DebuggerDriver.Inferior inferior = driver.loadForRemote(mParameters.getRemote(), null, null, new ArrayList<>()); Intrinsics.checkExpressionValueIsNotNull(inferior, "(driver as GDBDriver).lo\u2026ters.driverPathMapping())"); return inferior; } @Override public boolean isDetachDefault() { return true; } }
[ "6323113li" ]
6323113li
8f220c88409b39f90000b79e3a3bb76cfedf6011
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_8e877ffeb0d0dc55a308efe8d1727337fd72af2d/MethodInvocationAndReturnTest/9_8e877ffeb0d0dc55a308efe8d1727337fd72af2d_MethodInvocationAndReturnTest_s.java
a91d653c80d711d49f4a6887a263bc64a2555789
[]
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,061
java
/* * Copyright (C) 2007 Pekka Enberg * * This file is released under the GPL version 2 with the following * clarification and special exception: * * Linking this library statically or dynamically with other modules is * making a combined work based on this library. Thus, the terms and * conditions of the GNU General Public License cover the whole * combination. * * As a special exception, the copyright holders of this library give you * permission to link this library with independent modules to produce an * executable, regardless of the license terms of these independent * modules, and to copy and distribute the resulting executable under terms * of your choice, provided that you also meet, for each linked independent * module, the terms and conditions of the license of that module. An * independent module is a module which is not derived from or based on * this library. If you modify this library, you may extend this exception * to your version of the library, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from your * version. * * Please refer to the file LICENSE for details. */ package jvm; /** * @author Pekka Enberg */ public class MethodInvocationAndReturnTest extends TestCase { public static void testReturnFromInvokeVirtualReinstatesTheFrameOfTheInvoker() { Dispatcher dispatcher = new Dispatcher(); assertEquals(dispatcher, dispatcher.self); InvocationTarget target = new InvocationTarget(); assertEquals(target, target.self); dispatcher.dispatch(target); assertEquals(dispatcher, dispatcher.self); assertEquals(target, target.self); } public static class Dispatcher { public Object self; public Dispatcher() { this.self = this; } public void dispatch(InvocationTarget target) { target.invoke(); } } public static class InvocationTarget { public Object self; public InvocationTarget() { this.self = this; } public void invoke() { } } public static void testInvokeVirtualInvokesSuperClassMethodIfMethodIsNotOverridden() { SuperClass c = new NonOverridingSubClass(); assertEquals(0, c.value()); } public static void testInvokeVirtualInvokesSubClassMethodIfMethodIsOverridden() { SuperClass c = new OverridingSubClass(); assertEquals(1, c.value()); } public static class NonOverridingSubClass extends SuperClass { } public static class OverridingSubClass extends SuperClass { public int value() { return 1; } } public static class SuperClass { public int value() { return 0; } } public static void testRecursiveInvocation() { assertEquals(3, recursive(2)); } public static int recursive(int n) { if (n == 0) return n; return n + recursive(n - 1); } public static void testInvokestaticLongReturnValue() { assertEquals(Long.MIN_VALUE, f(Long.MIN_VALUE)); assertEquals(Long.MAX_VALUE, f(Long.MAX_VALUE)); } public static long f(long x) { return x; } public static void testInvokevirtualLongReturnValue() { F f = new F(); assertEquals(Long.MIN_VALUE, f.f(Long.MIN_VALUE)); assertEquals(Long.MAX_VALUE, f.f(Long.MAX_VALUE)); } public static class F { public long f(long x) { return x; } } public static void main(String[] args) { testReturnFromInvokeVirtualReinstatesTheFrameOfTheInvoker(); testInvokeVirtualInvokesSuperClassMethodIfMethodIsNotOverridden(); testRecursiveInvocation(); testInvokestaticLongReturnValue(); testInvokevirtualLongReturnValue(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c29dd35e82e0157cded2b285a372e65db2435fec
69f437327222aac0409395feefa8340c5f715ee3
/PAcketCap/gen/com/example/packetcap/R.java
23bdced52751fe543bbeb6e1bee9f85e5f51250b
[]
no_license
MShahzadS/AndroidProjects
4795836d52f343ca4ae2234a3df38c93b2060287
4c8c6552c9ea5e0214011ab4af68400ace522e7f
refs/heads/master
2016-09-05T12:57:55.911276
2015-02-09T21:28:24
2015-02-09T21:28:24
30,555,116
0
0
null
null
null
null
UTF-8
Java
false
false
2,665
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.packetcap; public final class R { public static final class attr { } public static final class dimen { /** Default screen margins, per the Android Design guidelines. Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. */ public static final int activity_horizontal_margin=0x7f040000; public static final int activity_vertical_margin=0x7f040001; } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int action_settings=0x7f080002; public static final int button1=0x7f080000; public static final int textView1=0x7f080001; } public static final class layout { public static final int activity_main=0x7f030000; } public static final class menu { public static final int main=0x7f070000; } public static final class string { public static final int action_settings=0x7f050001; public static final int app_name=0x7f050000; public static final int hello_world=0x7f050002; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f060000; /** Application theme. */ public static final int AppTheme=0x7f060001; public static final int MyActionBar=0x7f060002; public static final int Theme_MyAppTheme_ActionBar_TitleTextStyle=0x7f060003; } }
[ "shahzadshameer1@gmail.com" ]
shahzadshameer1@gmail.com
36e5a7ecd5842ec0f2f8bd15ad63e50dcfd84ac9
71f5619cca3daf66734a2f4a6b3ca8b1f4ea1b65
/src/tictactoe/GamePanel.java
67a1767df34d7c1c32b7fb738ec884bc7e979da0
[]
no_license
matruim/portfolio
abdddc6d09a2c748e6c12a410691492c8bf42df3
2e6e64a3af41cab44a5f52940e65ff76059ae803
refs/heads/master
2023-08-31T09:41:09.450017
2023-08-21T15:55:49
2023-08-21T15:55:49
236,804,369
0
0
null
null
null
null
UTF-8
Java
false
false
858
java
package tictactoe; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JPanel; @SuppressWarnings("serial") public class GamePanel extends JPanel { JButton[][] buttons = new JButton[3][3]; Integer turn; Integer count; public GamePanel() { setLayout(new GridLayout(3, 3)); turn = 1; count = 0; GameListener listener = new GameListener(this); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { buttons[i][j] = new JButton(); buttons[i][j].putClientProperty("INDEX", new Integer[] { i, j }); buttons[i][j].putClientProperty("OWNER", null); buttons[i][j].addActionListener(listener); add(buttons[i][j]); } } public Integer getTurn(){return turn;} public Integer getCount() {return count;} public JButton[][] getButtons(){return buttons;} }
[ "jared_danell@yahoo.com" ]
jared_danell@yahoo.com
e121045eaaa4434f4a0d090f4fc8479e8c85e53a
7b4dc34c668f4c8a9052820deb45aa121fca59d9
/graduate_design_plugin/src/buaa/sei/xyb/analyse/code/AMAPParser.java
644446ae89ed385c4602a74ed87fcbbfe5c48095
[]
no_license
xuyebing/xyb-graduate-design-plugin
8593818c35fec95c2aa7da75195be1274346c64a
dacfbc4748d5ec9742ad08d43a6729b7bd6d269c
refs/heads/master
2021-01-10T21:11:49.976910
2012-11-27T06:14:13
2012-11-27T06:14:13
null
0
0
null
null
null
null
GB18030
Java
false
false
23,560
java
package buaa.sei.xyb.analyse.code; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.HashMap; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.jdt.core.IField; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import buaa.sei.xyb.analyse.code.util.CodeParseConstant; import buaa.sei.xyb.analyse.code.util.LongFormUtils; import buaa.sei.xyb.analyse.code.util.SourceProcessor; import buaa.sei.xyb.common.Constant; import buaa.sei.xyb.dictionary.CommonAbbreviation; import buaa.sei.xyb.dictionary.LongformAnalysis; /** * 提取缩写词的关键类,实现了论文中提到的主要算法 * * @author lai * */ public class AMAPParser { private static Log log = LogFactory.getLog(AMAPParser.class); // The file to store the result of the abbreviation expansions. private String fname; private PrintStream emit = null; private FileOutputStream output = null; private HashMap<String,Boolean> nonDictWords; protected static final int maxLength = 10; // no longer an abbrev! protected static final int minLength = 1; // leave single letters for later private HashMap<String,Integer> matches; // keep track of all matches per at/sf private SourceProcessor sp; public AMAPParser(SourceProcessor sp) { this.sp = sp; } /** * 目前只对方法体的缩写词进行扩展,不对方法注释里的缩写词进行扩展 * */ protected String getAbbrExpandBody() { StringBuffer body = new StringBuffer(); // get abbreviation candidates from the method body for(String sf : sp.getMethodBodyCleanNoStop().split("\\s+")) { if(LongFormUtils.isJavaWord(sf)) continue; if(!Constant.doExpansion || LongFormUtils.isDictionaryWord(sf)) body.append(sf + " "); else if (sf.length() <= maxLength && sf.length() >= minLength) { body.append(findLongForm(sf) + " "); } } return body.toString(); // printMissed(sp.getMethodName()); } /** * find the most possible long form of the short form * @param sf the short form * @return the most possible long form */ private String findLongForm(String sf) { String lf = sf; if(sf.length() == 1) lf = findPrefixes(sf); else lf = getOne(sf, sf.toCharArray()); if((lf == null) || (lf.equals(sf))) lf = checkCommonAbbr(sf); return lf; } /** * Get the first possible expansion been found. * The order is acronyms, prefixes, dropped letters, combination multi-word and other contraction. * @param sf: short form * @param sfSplit: the split form of the short form * @return if found, return the first possible expansion, otherwise, return null. */ private String getOne(String sf, char[] sfSplit) { String lf = null; // Check for acronyms of types, methodIDs, method name, and comments // Check for methodID, method name, leading and internal comment acronyms if ((lf = checkAcronyms(sf, sfSplit)) == null) if ((lf = findPrefixes(sf)) == null) if ((lf = checkDroppedLetters(sf, sfSplit)) == null) if ((lf = checkCombinationWord(sf, sfSplit)) == null) lf = checkOtherContraction(sf, sp.getMethodName()); return lf; } /** * 检查是否常用缩写词。常用缩写词存放在dict\\commom.abbrev文件中 * @param sf short form * @return 如果是常用缩写词则返回其扩展词,负责返回缩写词本身 */ private String checkCommonAbbr(String sf) { String lf = sf; CommonAbbreviation ca = LongFormUtils.getCommonAbbreviation(sf); if (ca != null) { lf = ca.getLongform(); } return lf; } /* * print the missed abbreviation */ private void printMissed(String methodName) { // print missed for (String sf : nonDictWords.keySet()) if (!nonDictWords.get(sf)) printAbbr(sf, CodeParseConstant.LF_MISSED, CodeParseConstant.AT_OTHER, 0, LongformAnalysis.LFL_MISSED, methodName); } /** * check if the short form is other contraction. * @param sf short form * @param mname method name * @return true if the sf is other contraction, false otherwise. */ private String checkOtherContraction(String sf, String mname) { String match = null; if (LongFormUtils.isContraction(sf)) { // printAbbr(sf, sf, CodeParseConstant.AT_OTHER, 0, CodeParseConstant.LFL_CONTRACTION, mname); match = sf; } return match; } /** * Prefix short forms are formed by dropping the latter part of a long form, * retaining only the few beginning letters. * Examples include 'attr'(attribute), 'obj'(objcet); * * The prefix pattern is thus the short form followed by the regular expression * "[a-z]+": "sf[a-z]+". * * @param sf short forms * @return if matches the short form, return the long form. Otherwise return null. */ private String findPrefixes(String sf) { matches = new HashMap<String,Integer>(); String lf = null; String pattern = ""; pattern = " (" + sf+"[a-zA-Z]*" + ") "; lf = createSWPatterns(sf, pattern, CodeParseConstant.AT_PREFIX); /*if(sf.endsWith("s")) { pattern = " (" + sf.replaceAll("s$", "[a-zA-Z]*s") + ") "; match|= matchPattern2MethodCommentStmt(sf, pattern, CodeParseConstant.AT_PREFIX_PL, sp); } */ return lf; } /** * Dropped letter shout forms can have any letters but the first letter removed * from the long term. Examples include 'evt'(event), 'msg'(message). * * The dropped letter pattern is constructed by inserting the expression "[a-z]" * after every letter in the short form. * Let sf=c0,c1,...,cn, where n is the length of the short form. * Then the dropped letter pattern is c0[a-z]*c1[a-z]*...cn[a-z]*. * * Need to make sure length of abbr's checked, otherwise could try to expand * pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp * this with wildcard in between! */ private String checkDroppedLetters(String sf, char[] sfSplit) { matches = new HashMap<String,Integer>(); // Dropped letters are weird with vowels /* if it has a vowel OTHER than a leading vowel, * only expand if > 3 long * Basically, if it has two vowels and it's less than 4 long, * don't expand (cvv, vcv, vvc, ccv) */ // TODO: what about eg ig? DL match?? if (sf.matches("[a-z][^aeiou]+") || sf.length() > 3) { String pattern = " ("; for (char c:sfSplit) { pattern = pattern + c + "[a-z]*"; } pattern = pattern +") "; //System.out.println(pattern); return createSWPatterns(sf, pattern, CodeParseConstant.AT_DROPPED); } return null; } /** * Combination multi-word may combine single-word abbreviations, acronyms * or dictionary words. Examples include 'doctype'(document type), 'println'(print line). * * The pattern to search for combination word long forms is constructed by * appending the expression “[a–z]*?[ ]*?” to every letter of the short form. * Let sf = c0, c1, ..., cn, where n is the length of the short form. * Then the combination word pattern is c0[a–z]*?[ ]*?c1[a–z]*?[ ]*?...[a–z]*?[ ]*?cn. * The pattern is constructed such that only letters occurring in the short form can begin a word. * This keeps the pattern from expanding short forms like ‘ada’ with ‘adding machine’. * We use a less greedy wild card to favor shorter long forms with fewer spaces, * such as ‘period defined’ for ‘pdef’, rather than ‘period defined first’. * * @param sf: short form * @param sfSplit: the splits of the shot form * @return true if find, otherwise false. */ private String checkCombinationWord(String sf, char[] sfSplit) { matches = new HashMap<String,Integer>(); // only check multi words > 3 if ( sf.length() > 3) { String pattern = ""; //add each letter to string with regex in between for (int i = 0; i < sfSplit.length; i++) { // don't be greedy, we want shortest matches possible? if (i == sfSplit.length - 1) pattern = pattern + sfSplit[i] + "[a-z]*?"; else pattern = pattern + sfSplit[i] + "[a-z]*?[ ]*?"; } pattern = pattern +")"; /*if (sf.matches("println")) System.out.println(pattern);*/ return createMWPatterns(sf, pattern, CodeParseConstant.AT_MULTI); } return null; } /** * Acronyms consist of the first letters of the words in the long form. * A common naming scheme is to use the type's abbreviation. * Examples include 'sb'(StringBuffer). * * The regular expression pattern used to search for acronym * long forms is simply constructed by inserting the expression * “[a–z]+[ ]+” after every letter in the short form. Let * sf = c0, c1, ..., cn, where n is the length of the short form. * Then the acronym pattern is c0[a–z]+[ ]+c1[a–z]+[ ]+...[a–z]+[ ]+cn. * As with prefixes, the letter ‘x’ is a special case. * When forming the acronym pattern, any occurrence of ‘x’in the * short form is replaced with the expression “e?x.”This enables * our technique to find long forms for acronyms such as ‘xml’ (extensible markup language). * * @param sf short form * @param sfSplit the splits of the short form * @return true if find, otherwise false. */ protected String checkAcronyms(String sf, char[] sfSplit) { matches = new HashMap<String,Integer>(); String pattern = ""; //add each letter to string with regex in between for (int i = 0; i < sfSplit.length; i++) { if (sfSplit[i] == 'x') // add optional e (just for acronyms?) pattern = pattern + "e?" + sfSplit[i] + "[a-z]+"; else pattern = pattern + sfSplit[i] + "[a-z]+"; if (i == sfSplit.length - 1) pattern = pattern + ")"; else pattern = pattern + "\\s+"; } return createMWPatterns(sf, pattern, CodeParseConstant.AT_ACRONYM); } /** * For prefixes and dropped letters. * * @param sf: short forms * @param patternStr: regular expression to match long form * @param at: abbreviation type * @return null if cannot expand the short form, otherwise return the long form */ private String createSWPatterns(String sf, String patternStr, int at) { String match = null; /* Don't match 2+ vowels with optional leading consonant * with SW -- save for MW (c?vv+) * For dropped vowels only, don't match vv+c either * (vv+c could be a legitimate prefix, such as auction) */ if (! (sf.matches("[a-z]?[aeiou][aeiou]+") /*|| (at == CodeParseConstant.AT_DROPPED && sf.matches("[aeiou][aeiou]+[a-z]"))*/ ) ) { Pattern p = Pattern.compile(patternStr); // First, search the JavaDoc comments for "@param sf pattern". Pattern pattern = Pattern.compile(sf + "\\s*--[^\\.]*" + patternStr); match = findSWAbbr(sf, pattern, sp.getJavaDocComments(), CodeParseConstant.LFL_JAVADOC, at, sp.getMethodName()); if (match != null) return match; // Match statement for sf and lf if sf < 10 // (otherwise too expensive for long string literals with gibberish) // Secondly, search the TypeNames and corresponding declared variable names for "pattern sf" pattern = Pattern.compile(patternStr + "[^\\.=]*==\\s*" + sf + "[\\s\\.]"); match = findSWAbbr(sf, pattern, sp.getTypesSeparated(), CodeParseConstant.LFL_TYPE, at, sp.getMethodName()); if (match != null) return match; // Thirdly, search MethodName for "pattern" match = findSWAbbr(sf, p, sp.getMethodNameCleanNoStop(), CodeParseConstant.LFL_METHOD_NAME, at, sp.getMethodName()); if (match != null) return match; // Remove leading and trailing space first patternStr = patternStr.replaceAll("^\\s+", "").replaceAll("\\s+$", ""); // Fourthly, search Statements for "sf pattern" and "pattern sf" // NOTE: This pattern assumes sf left of lf Pattern stp = Pattern.compile("[\\.\\s]" + sf + " " + "[^\\.]*--" + patternStr + "--"); match = findSWAbbr(sf, stp, sp.getStatementsMarkedDictionary(), CodeParseConstant.LFL_STMT, at, sp.getMethodName()); if (match != null) return match; boolean last = false; if (sf.length() == 2) last = true; // NOTE: This pattern assumes sf right of lf stp = Pattern.compile( "--" + patternStr + "--[^\\.]*" + " " + sf + "[\\.\\s]"); match = findSWAbbr(sf, stp, sp.getStatementsMarkedDictionary(), CodeParseConstant.LFL_STMT, at, sp.getMethodName(), last); if (match != null) return match; // Match string literals /*match |= findSWAbbr(sf, p, sp.getStringLiteralsDictionary(), CodeParseConstant.LFL_STRING, at, sp.getMethodName());*/ // !sf.matches("[a-z]?[aeiou][aeiou]+") // matches legit prefixes too -- jsut skip for DL // length 2 seems to be finicky... if (sf.length() != 2) { // Search method words for "pattern" match = findSWAbbr(sf, p, sp.getMethodDictionary(), CodeParseConstant.LFL_METHOD, at, sp.getMethodName()); if (match != null) return match; if ((sf.length() == 1) || (at == CodeParseConstant.AT_DROPPED)) last = true; match = findSWAbbr(sf, p, sp.getCommentDictionary(), CodeParseConstant.LFL_COMMENT, at, sp.getMethodName(), last); if (match != null) return match; // Don't check beyond local context for single letters if (sf.length() > 1 && at == CodeParseConstant.AT_PREFIX) match = findSWAbbr(sf, p, sp.getClassCommentDictionary(), CodeParseConstant.LFL_CCOMMENT, at, sp.getMethodName(), true); } } return match; } /** * Create muti-word patterns. * * @param sf * @param pattern * @param at_level * @return */ private String createMWPatterns(String sf, String pattern, int at_level) { String match = null; String startp = "[\\s\\.]("; String endp = "[\\s\\.]"; // used for everybody but type String endType = "\\s+[^\\.=]*==\\s*" + sf + endp; // 1. search the JavaDoc comments for "@param sf pattern" match = findMWAbbr(sf, sf + "\\s*--[^\\.]*" + startp + pattern + endp, sp.getJavaDocComments(), at_level, CodeParseConstant.LFL_JAVADOC, sp.getMethodName()); if (match != null) return match; // 2. search Type name and corresponding declared variale names for "pattern sf" match = findMWAbbr(sf, startp + pattern + endType, sp.getTypesSeparated(), at_level, CodeParseConstant.LFL_TYPE, sp.getMethodName()); if (match != null) return match; // 3. search Method name better than body for "pattern" match = findMWAbbr(sf, startp + pattern + endp, sp.getMethodNameCleanNoStop(), at_level, CodeParseConstant.LFL_METHOD_NAME, sp.getMethodName()); if (match != null) return match; // Statements require presence of sf -- will only match first // Can't do MW stmt because won't halt /*match |= findMWAbbr(sf, "[\\s\\.]" + sf + " [^\\.]* (" + pattern + endp, sp.getStatementsClean(), at_level, CodeParseConstant.LFL_STMT, sp.getMethodName()); if (one && match) return match; match |= findMWAbbr(sf, startp + pattern + " [^\\.]* " + sf + "[\\s\\.]", sp.getStatementsClean(), at_level, CodeParseConstant.LFL_STMT, sp.getMethodName()); if (one && match) return match;*/ // 4. search all identifiers in the method for "pattern" including type names match = findMWAbbr(sf, startp + pattern + endp, sp.getMethodIDsCleanNoStop(), at_level, CodeParseConstant.LFL_METHOD_ID, sp.getMethodName()); if (match != null) return match; // 5. search string literals for "pattern" // (At this point we have searched all the possible phrases in the method body) match = findMWAbbr(sf, startp + pattern + endp, sp.getStringLiteralsCleanNoStop(), at_level, CodeParseConstant.LFL_STRING, sp.getMethodName()); if (match != null) return match; // leading comment split on camel case /*match |= findMWAbbr(sf, pattern + endp, sp.getLeadingCommentsCleanSplit(), at_level, CodeParseConstant.LFL_LCOMMENT, sp.getMethodName()); if (match) return match; // internal comment split on camel case match |= findMWAbbr(sf, pattern + endp, sp.getInternalCommentsCleanSplit(), at_level, CodeParseConstant.LFL_ICOMMENT, sp.getMethodName());*/ boolean last = false; if (at_level == CodeParseConstant.AT_MULTI) last = true; match = findMWAbbr(sf, startp + pattern + endp, sp.getCommentsCleanSplit(), at_level, CodeParseConstant.LFL_COMMENT, sp.getMethodName(), last); if (match != null) return match; if (at_level == CodeParseConstant.AT_ACRONYM) match = findMWAbbr(sf, startp + pattern + endp, sp.getClassCommentsCleanSplit(), at_level, CodeParseConstant.LFL_CCOMMENT, sp.getMethodName(), true); return match; } /** * find muti-word abbreviation. Default is not last. * * @param sf * @param pattern * @param toSearch * @param at_level * @param lfl * @param mname * @return */ private String findMWAbbr(String sf, String pattern, String toSearch, int at_level, String lfl, String mname) { return findMWAbbr(sf, pattern, toSearch, at_level, lfl, mname, false); } /** * For acronyms and multiword abbrevia. * */ private String findMWAbbr(String sf, String pattern, String toSearch, int at_level, String lfl, String mname, boolean last) { String lf = null; Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(toSearch); //HashMap<String,Integer> matches = new HashMap<String,Integer>(); while (m.find()) { lf = m.group(1).replaceAll("\\s+", " ").replaceAll("\\s+$", ""); if (LongFormUtils.isDictionaryString(lf) && lf.contains(" ")) { if (matches.containsKey(lf)) matches.put(lf, matches.get(lf)+1); else matches.put(lf, 1); lf = lf; } } // TODO increase freq depending on length? 2 letters match 1? // o/w match 0? // if (lf != null) // printMatches(sf, lfl, at_level, mname, matches, last); return lf; } /** * Find the single-word abbreviations * Default is not last * * @param sf shot forms * @param p pattern * @param toSearch the content to be searched * @param lfl location where the longform found * @param at abbreviation type * @param mname method name * @see #findSWAbbr(String, Pattern, String, String, int, String, boolean) */ private String findSWAbbr(String sf, Pattern p, String toSearch, String lfl, int at, String mname) { return findSWAbbr(sf, p, toSearch, lfl, at, mname, false); } /** * Find the single-word abbreviations * @param sf shot forms * @param p pattern * @param toSearch the content to be searched * @param lfl location where the longform found * @param at abbreviation type * @param mname method name * @param last if continue search or not */ private String findSWAbbr(String sf, Pattern p, String toSearch, String lfl, int at, String mname, boolean last) { String lf = null; Matcher m = p.matcher(toSearch); //HashMap<String,Integer> matches = new HashMap<String,Integer>(); while (m.find()) { lf = m.group(1); if (LongFormUtils.isDictionaryExpansion(lf)) { if (matches.containsKey(lf)) matches.put(lf, matches.get(lf)+1); else matches.put(lf, 1); } } // if (lf != null) // printMatches(sf, lfl, at, mname, matches, last); return lf; } private boolean printMatches(String sf, String lfl, int at, String mname, HashMap<String, Integer> matches, boolean last) { // if there's at least one match ... if (!matches.isEmpty()) { if (matches.keySet().size() == 1) { for (String lf : matches.keySet()) { printAbbr(sf, lf, at, matches.get(lf), lfl, mname); return true; // only print one no matter what! } } // otherwise, try stems! Vector<String> vs = new Vector<String>(matches.keySet()); for (int i = 0; i < vs.size(); i++) { for (int j = i + 1; j < vs.size(); j++) { // if they're stems if (LongFormUtils.isStem(vs.get(i),vs.get(j))) { // go with the shorter one and increment by freq int shorter = i; int longer = j; if (vs.get(i).length() > vs.get(j).length()) { shorter = j; longer = i; } // add longer's frequency to shorter matches.put( vs.get(shorter), matches.get(vs.get(shorter)) + matches.get(vs.get(longer)) ); // and set longer to 0 (effectively removing) matches.put( vs.get(longer), 0 ); } } } // Return max String smax = ""; int count = 0; int imax = 0; HashMap<String, Integer> vmax = new HashMap<String, Integer>(); for (String lf : matches.keySet()) { if (matches.get(lf) > imax) { smax = lf; imax = matches.get(lf); count = 1; vmax = new HashMap<String, Integer>(); vmax.put(lf, imax); } else if (matches.get(lf) == imax) { count++; vmax.put(lf, imax); } } // If 2 have same count, try another level until we win if (count == 1) { printAbbr(sf, smax, at, imax, lfl, mname); return true; } else { // count > 1 // if this is the last chance on this AT if (last) { //System.out.println("Deciding "+ sf + " " + at + " " + lfl + " " + mname); // let freq decide printAbbr(sf, vmax.toString().replaceAll(", ", ":"), at, 0, lfl, mname); return true; // this stops PR going to DL and MW } //System.out.println("... "+ sf + " " + at + " " + lfl + " " + mname); // o/w, keep going up levels, voting on lfs // until last level return false; } } return false; } protected void visit(IField field) { // TODO Auto-generated method stub } /** * Init the FileOutputStream and the PrintStream * @throws IOException */ public void getFW() throws IOException { try { output = new FileOutputStream(fname); } catch (FileNotFoundException e) { e.printStackTrace(); } emit = new PrintStream(output); } /** * Close the Steam * */ public void closeFW() { emit.flush(); emit.close(); try { if (output != null) { output.flush(); output.close(); } } catch (IOException e) { e.printStackTrace(); } } /** * Output the result * @param abbr: the short form * @param lf: the long form * @param at_level: abbreviation type level * @param freq: the frequence of the abbreviation * @param lfl_level: location where the longform found * @param document: location where the abbreviation is */ private void printAbbr(String abbr, String lf, int at_level, int freq, String lfl_level, String document) { nonDictWords.put(abbr, true); emit.println(abbr+"," + lf + "," + CodeParseConstant.getAcronymType(at_level) + "," + freq + "," + lfl_level + ","+document); /*if (abbr.matches(lf)) System.out.println(abbr+" "+lf+" ("+CodeParseConstant.getAcronymType(at_level) + ", " + lfl_level +") in "+document);*/ } }
[ "yebingxu@gmail.com" ]
yebingxu@gmail.com
6a02c6c5410e7326012839ccfd88dec4a8b467f0
220d62b3c467145f8a8dc81be842364fdc480ba3
/src/main/java/com/example/demo/util/Constants.java
07d4961a8bf166543ffdbff8bb5d7e88dc905f40
[]
no_license
codermaxzhou/spring-reddit-clone
2d564fb6a8152dd7b919d162898150e71dc7577e
bad37132e02bce173791a90305e846d67ff335cb
refs/heads/master
2022-11-08T02:02:54.299956
2020-06-24T02:54:55
2020-06-24T02:54:55
273,303,251
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package com.example.demo.util; import lombok.experimental.UtilityClass; @UtilityClass public class Constants { public static final String ACTIVATE_EMAIL = "http://localhost:8080/api/auth/accountVerification/"; }
[ "6313700+yihaozhou@users.noreply.github.com" ]
6313700+yihaozhou@users.noreply.github.com
60a978d9f03d5fe4a9af8128a3f0be214b90f6ef
266885047b9553fe5220fc4cc9880871ae2e7bba
/util/jar/Pack200.java
cb753bfc9f5efab8ed2781fa3821405f71a343f8
[]
no_license
yuya008/java_src_study
c9586aaf75614e0ea6145d59948d641fc9bd917c
68121f6c9f867fa7cfff7ddddb164fdc7afcd5b4
refs/heads/master
2016-09-06T19:02:53.097936
2015-04-12T17:48:09
2015-04-12T17:48:09
33,782,512
1
1
null
null
null
null
UTF-8
Java
false
false
4,369
java
package java.util.jar; import java.util.SortedMap; import java.io.InputStream; import java.io.OutputStream; import java.io.File; import java.io.IOException; import java.beans.PropertyChangeListener; public abstract class Pack200 { private Pack200() {} //prevent instantiation public synchronized static Packer newPacker() { return (Packer) newInstance(PACK_PROVIDER); } public static Unpacker newUnpacker() { return (Unpacker) newInstance(UNPACK_PROVIDER); } public interface Packer { String SEGMENT_LIMIT = "pack.segment.limit"; String KEEP_FILE_ORDER = "pack.keep.file.order"; String EFFORT = "pack.effort"; String DEFLATE_HINT = "pack.deflate.hint"; String MODIFICATION_TIME = "pack.modification.time"; String PASS_FILE_PFX = "pack.pass.file."; String UNKNOWN_ATTRIBUTE = "pack.unknown.attribute"; String CLASS_ATTRIBUTE_PFX = "pack.class.attribute."; String FIELD_ATTRIBUTE_PFX = "pack.field.attribute."; String METHOD_ATTRIBUTE_PFX = "pack.method.attribute."; String CODE_ATTRIBUTE_PFX = "pack.code.attribute."; String PROGRESS = "pack.progress"; String KEEP = "keep"; String PASS = "pass"; String STRIP = "strip"; String ERROR = "error"; String TRUE = "true"; String FALSE = "false"; String LATEST = "latest"; SortedMap<String,String> properties(); void pack(JarFile in, OutputStream out) throws IOException ; void pack(JarInputStream in, OutputStream out) throws IOException ; @Deprecated default void addPropertyChangeListener(PropertyChangeListener listener) { } @Deprecated default void removePropertyChangeListener(PropertyChangeListener listener) { } } public interface Unpacker { String KEEP = "keep"; String TRUE = "true"; String FALSE = "false"; String DEFLATE_HINT = "unpack.deflate.hint"; String PROGRESS = "unpack.progress"; SortedMap<String,String> properties(); void unpack(InputStream in, JarOutputStream out) throws IOException; void unpack(File in, JarOutputStream out) throws IOException; @Deprecated default void addPropertyChangeListener(PropertyChangeListener listener) { } @Deprecated default void removePropertyChangeListener(PropertyChangeListener listener) { } } private static final String PACK_PROVIDER = "java.util.jar.Pack200.Packer"; private static final String UNPACK_PROVIDER = "java.util.jar.Pack200.Unpacker"; private static Class<?> packerImpl; private static Class<?> unpackerImpl; private synchronized static Object newInstance(String prop) { String implName = "(unknown)"; try { Class<?> impl = (PACK_PROVIDER.equals(prop))? packerImpl: unpackerImpl; if (impl == null) { implName = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction(prop,"")); if (implName != null && !implName.equals("")) impl = Class.forName(implName); else if (PACK_PROVIDER.equals(prop)) impl = com.sun.java.util.jar.pack.PackerImpl.class; else impl = com.sun.java.util.jar.pack.UnpackerImpl.class; } return impl.newInstance(); } catch (ClassNotFoundException e) { throw new Error("Class not found: " + implName + ":\ncheck property " + prop + " in your properties file.", e); } catch (InstantiationException e) { throw new Error("Could not instantiate: " + implName + ":\ncheck property " + prop + " in your properties file.", e); } catch (IllegalAccessException e) { throw new Error("Cannot access class: " + implName + ":\ncheck property " + prop + " in your properties file.", e); } } }
[ "yuya008@outlook.com" ]
yuya008@outlook.com
3614c995e3014f99d13f85a7089a91e8b0324f23
9ff02be7823e5b403556a94d51e580adb296f5d9
/webflux-test/src/main/java/com/lcm/test/webfluxtest/WebfluxTestApplication.java
82e9877b698b83baba5585b8ec28aa6ad9ca9fa2
[]
no_license
lcmvs/spring-web-flux-test
d11b98d4790b0df32d02d440bfb77dee931119d8
f054b278cde12bd3453aa5b59d8caf14ed9c9771
refs/heads/master
2022-11-10T13:53:13.013383
2020-07-03T09:40:36
2020-07-03T09:40:36
276,863,475
1
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.lcm.test.webfluxtest; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class WebfluxTestApplication { public static void main(String[] args) { SpringApplication.run(WebfluxTestApplication.class, args); } }
[ "1264221821@qq.com" ]
1264221821@qq.com
dede80f4a42c86c286c0829a93e820147ed0451d
41d993287f46cae4e142ab08da156a997656196d
/SysBank/src/br/com/wfsistemas/sysbank/excecao/UsuarioLoginExistenteException.java
87a5e790bb365612b1ec10a71af3ed7473fa0aa5
[]
no_license
walissonfarias/SysBank
78b26003030c62311c3e16850001db3af879e585
e846135583a194544508c686ea0be58924b67ebb
refs/heads/master
2021-06-01T12:34:33.287156
2016-07-16T11:24:02
2016-07-16T11:24:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
421
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.com.wfsistemas.sysbank.excecao; /** * * @author wff */ public class UsuarioLoginExistenteException extends BancoException{ public UsuarioLoginExistenteException(String mensagem){ super(mensagem); } }
[ "walisson@server.com" ]
walisson@server.com
e10e32fb9b9a01da291ac803c542091e66e62c56
e9e1809461a0f9b063fbf682a062af63aec193c2
/app/src/main/java/com/example/reganthomas/projectapp/CalcScreen.java
1864c2133478be37adcee99a81d81fe1590d5d63
[]
no_license
AtroxLtd/Test
52ee3e93455215c3eda8c6c7e7379246aa44c194
1146c209609f0ded45f993127c21b66da06fa190
refs/heads/master
2021-01-20T09:29:48.782685
2017-08-28T03:12:51
2017-08-28T03:12:51
101,599,097
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package com.example.reganthomas.projectapp; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; public class CalcScreen extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_calc_screen); } public void Back (View view){ Intent a = new Intent(this, MainActivity.class); startActivity(a); } public void Calc1 (View view){ Intent b = new Intent(this, Calc1Screen.class); startActivity(b); } public void Calc2 (View view){ Intent b = new Intent(this, Calc1Screen.class); startActivity(b); } public void Calc3 (View view){ Intent b = new Intent(this, Calc1Screen.class); startActivity(b); } public void Calc4 (View view){ Intent b = new Intent(this, Calc1Screen.class); startActivity(b); } public void Calc5 (View view){ Intent b = new Intent(this, Calc1Screen.class); startActivity(b); } }
[ "bweake@hotmail.com" ]
bweake@hotmail.com
a61e4f896453c6e7c4c7970db440371594d4ae6c
91f0d73625beda43373f3d4b9dc0664f75aecd99
/SS2Engine/src/com/wicpar/sinking_simulator/engine/glfw/GLFWObject.java
9582dc5b725d410a3616670cfe30a1659e79ba1c
[]
no_license
Wicpar/KeeLoq
1d3c44f5ba1d8bdc7a400d980832f54ceb086808
2644ce5ff7a23239f4f52a99228974cea5564c9c
refs/heads/master
2021-01-20T16:58:25.684973
2017-04-25T15:51:54
2017-04-25T15:51:54
82,844,108
6
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.wicpar.sinking_simulator.engine.glfw; import com.wicpar.sinking_simulator.engine.memory.ADestructible; /** * Created by Frederic on 03/12/2016. */ public abstract class GLFWObject extends ADestructible { protected final GLFW glfw; public GLFWObject(final GLFW instance) { if (instance == null) throw new RuntimeException("valid GLFW instance needed"); glfw = instance; } public GLFW getGlfw() { return glfw; } }
[ "frederic.artus.nieto@gmail.com" ]
frederic.artus.nieto@gmail.com
fd5bdf754b9db5c3a5263be178182e7099a6a924
be588f9903b4491dd1b52ad8c9e872f3f91e274a
/authserver/src/main/java/com/ddastudio/auth/config/BeanConfig.java
8c9f0c20625328afa8fa0f51a941160d15316411
[]
no_license
messi1913/fishing-wang
36ac9cd65eb855420512a407cd4f9fde185802c3
30f195c40fa0f350f23e73293ba6f45bc4ea4c03
refs/heads/master
2020-07-04T02:52:03.552506
2019-08-15T03:47:51
2019-08-15T03:47:51
202,130,104
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package com.ddastudio.auth.config; import org.modelmapper.Conditions; import org.modelmapper.ModelMapper; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.crypto.factory.PasswordEncoderFactories; import org.springframework.security.crypto.password.PasswordEncoder; @Configuration public class BeanConfig { @Bean public ModelMapper modelMapper() { ModelMapper modelMapper = new ModelMapper(); modelMapper.getConfiguration().setPropertyCondition(Conditions.isNotNull()); return modelMapper; } @Bean public PasswordEncoder passwordEncoder(){ return PasswordEncoderFactories.createDelegatingPasswordEncoder(); } }
[ "messi1913@gmail.com" ]
messi1913@gmail.com
15812baf6c2b430374efd993b36eff7484ef6c12
4d0d56f53e4fade971dea6376350a4194ad6cb0e
/src/bean/ResultBean.java
fb42c570c792d8f4ea7e6ecbf6620e323db87a59
[]
no_license
megacann/SocialE-Learning
2bcfd60bcb00d856f053de5c4a7f82d599619218
b815961f716141112aeefb4179a41de38a7af0ee
refs/heads/main
2023-05-05T06:13:26.583857
2021-05-23T08:27:47
2021-05-23T08:27:47
369,868,511
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package bean; public class ResultBean { int resultID; float score; String answer; public String getAnswer() { return answer; } public void setAnswer(String answer) { this.answer = answer; } public int getResultID() { return resultID; } public void setResultID(int resultID) { this.resultID = resultID; } public float getScore() { return score; } public void setScore(float score) { this.score = score; } }
[ "megacandrad@gmail.com" ]
megacandrad@gmail.com
0c89eb4d152d92b909b99a26b54aa51e6feeb7f0
88fa5202233b149f24aa1640125fcbd7d8c2e9a5
/src/main/java/arithmetic/BinarySearchTree/LinkedListSet.java
f724be516abbb835ec8377b0438cd013c4f83087
[]
no_license
never123450/the-data-structure
03c89c12a0e12d52d43dd2e83a0ea90a1fbe33dd
3ca52debe2e00c1e66dbd0dde29b1a9942f471e7
refs/heads/master
2020-04-17T00:04:31.576460
2019-01-24T14:11:55
2019-01-24T14:11:55
166,036,311
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package arithmetic.BinarySearchTree; import arithmetic.LinkedList.LinkedList; public class LinkedListSet<E> implements Set<E> { private LinkedList<E> list; public LinkedListSet() { list = new LinkedList<>(); } @Override public void add(E e) { if (!list.contains(e)) { list.addFirst(e); } } @Override public void remove(E e) { list.removeElement(e); } @Override public boolean contains(E e) { return list.contains(e); } @Override public int getSize() { return list.getSize(); } @Override public boolean isEmpty() { return list.isEmpty(); } }
[ "845619585@qq.com" ]
845619585@qq.com
d9b6500b57750383d594cd36b0943159495b2447
4525822f703ff4c4eda76859a4c9a05e62f75515
/16/16-6/synchronized/DepositThread.java
e39279882f979ffb85332690741f80a9342bde50
[]
no_license
zhdying/CrazyJava
4bc2ef9a480313836026bf908e82c1447c7fc9e9
a08261769568de131a291c2efe2cb4142e6e023e
refs/heads/master
2020-12-24T21:22:50.514801
2016-04-15T03:11:23
2016-04-15T03:11:23
56,286,246
0
0
null
null
null
null
GB18030
Java
false
false
731
java
/** * Description: * <br/>Copyright (C), 2008-2010, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class DepositThread extends Thread { //模拟用户账户 private Account account; //当前取钱线程所希望存款的钱数 private double depositAmount; public DepositThread(String name , Account account , double depositAmount) { super(name); this.account = account; this.depositAmount = depositAmount; } //重复100次执行存款操作 public void run() { for (int i = 0 ; i < 100 ; i++ ) { account.deposit(depositAmount); } } }
[ "cnhnzhangdi@gmail.com" ]
cnhnzhangdi@gmail.com
d73250240a7bb76bfb1632be810eebc43d2e94eb
4e6110e8cd29089815fe335584fafb5df2b82058
/Struts2/src/model/StuLoginPermissModel.java
610c432bfa70debdafb6005c189f286882e32259
[]
no_license
yaogege/git_repository
8bd8f4b24a1ccaf7de01bd873238d6123097d8f2
5bdcbe4fe7fda3d0794619ef0a96d3b4f3094d9b
refs/heads/master
2021-07-18T17:50:17.594416
2020-04-29T02:55:26
2020-04-29T02:55:26
133,127,570
0
0
null
null
null
null
UTF-8
Java
false
false
155
java
package model; public class StuLoginPermissModel { private int stuID; private String username; private String password; private String permission; }
[ "767320509@qq.com" ]
767320509@qq.com
41674ec44c731724b5e543822b6c368da57c3350
c8d3a01e9c811a9da075d01cb40803655cc09222
/src/main/java/crud/service/UserService.java
79b10e6f74b981636749a959d06b829ec49eb3b3
[]
no_license
AlexPimGit/springcrud3
eb9e221b3c0760b790d72cbcf8c6a7772f5c5b25
05efb3b16fe079530267c1c6396bba8997a6aaac
refs/heads/master
2022-12-22T06:39:40.113469
2020-02-20T16:58:46
2020-02-20T16:58:46
240,251,308
0
0
null
2022-12-15T23:26:48
2020-02-13T12:07:37
Java
UTF-8
Java
false
false
259
java
package crud.service; import crud.model.User; import java.util.List; public interface UserService { void addUser(User user); void updateUser(User user); void removeUser(Long id); User getUserById(Long id); List<User> listUser(); }
[ "shurik__@tut.by" ]
shurik__@tut.by
901704ef69c290733f7c719eccac79ed955d779a
c9bdee1084c85786b1b20b8d503b0af468284419
/cs3220_lab6/src/dao/DAO.java
ad0b79c5e211eb5f4252437c65dba77521938278
[]
no_license
csula-students/cs-3220-summer-2017-hitagak
81ad5959922611c55b65f04455e4e21ad86dcb71
b84d0f1d4908a21e4ab776a41e0d5c287d46dcba
refs/heads/master
2021-01-23T14:59:52.589138
2017-08-12T07:57:31
2017-08-12T07:57:31
93,266,245
0
0
null
2017-08-12T07:57:32
2017-06-03T18:19:04
Java
UTF-8
Java
false
false
604
java
package dao; import java.util.List; import java.util.Optional; /** * DAO (Data Access Object) is common abstraction layer between business model * to database * * Common operations in this layer is to parse result set into business model * and vice versa */ public interface DAO<T> { // List a list of objects public List<T> list(); // return single object given its id public Optional<T> get(int id); // add item obj into database public void add(T obj); // update item public void update(T obj); // delete item given id public void delete(int id); }
[ "hitagak@calstatela.edu" ]
hitagak@calstatela.edu
9c389582f71960282ed535cad80ec5523054fe79
79bdb304316cba76c0be112d78a1dc594c0c4a01
/WiFiModel/src/main/java/com/znt/wificonnector/WifiConnectionReceiver.java
3626e0dd8acfb5c55e8d3cb234da06f80ff980de
[]
no_license
HotterYu/DianYinBox
0e075b0b7f0bf78553ff699d72180edbe8a1542f
1eadff3c8187ba5e796794b0d44d81d5f87efe7e
refs/heads/master
2020-05-15T15:31:26.715247
2019-06-19T03:13:16
2019-06-19T03:13:16
174,515,846
0
1
null
null
null
null
UTF-8
Java
false
false
3,641
java
/* * Created by Jose Flavio on 10/18/17 12:49 PM. * Copyright (c) 2017 JoseFlavio. * All rights reserved. */ package com.znt.wificonnector; import android.annotation.SuppressLint; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.wifi.SupplicantState; import android.net.wifi.WifiManager; import android.util.Log; /** * WifiConnectionReceiver * * @author Jose Flavio - jflavio90@gmail.com * @since 18/10/17 */ class WifiConnectionReceiver extends BroadcastReceiver { private WifiConnector wifiConnector; public WifiConnectionReceiver(WifiConnector wifiConnector) { this.wifiConnector = wifiConnector; } @SuppressLint("NewApi") @Override public void onReceive(Context c, Intent intent) { if (wifiConnector.getConnectionResultListener() == null) return; String action = intent.getAction(); if (WifiManager.SUPPLICANT_STATE_CHANGED_ACTION.equals(action)) { SupplicantState state = intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE); wifiLog("Connection state: " + state); wifiConnector.getConnectionResultListener().onStateChange(state); switch (state) { case COMPLETED: wifiLog("Connection to Wifi was successfully completed...\n" + "Connected to BSSID: " + wifiConnector.getWifiManager().getConnectionInfo().getBSSID() + " And SSID: " + wifiConnector.getWifiManager().getConnectionInfo().getSSID()); if (wifiConnector.getWifiManager().getConnectionInfo().getBSSID() != null) { wifiConnector.setCurrentWifiSSID(wifiConnector.getWifiManager().getConnectionInfo().getSSID()); wifiConnector.setCurrentWifiBSSID(wifiConnector.getWifiManager().getConnectionInfo().getBSSID()); wifiConnector.getConnectionResultListener().successfulConnect(wifiConnector.getCurrentWifiSSID()); wifiConnector.unregisterWifiConnectionListener(); } // if BSSID is null, may be is still triying to get information about the access point break; case DISCONNECTED: int supl_error = intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR, -1); wifiLog("Disconnected... Supplicant error: " + supl_error); // only remove broadcast listener if error was ERROR_AUTHENTICATING if (supl_error == WifiManager.ERROR_AUTHENTICATING) { wifiLog("Authentication error..."); if (wifiConnector.deleteWifiConf()) { wifiConnector.getConnectionResultListener().errorConnect(WifiConnector.AUTHENTICATION_ERROR); } else { wifiConnector.getConnectionResultListener().errorConnect(WifiConnector.UNKOWN_ERROR); } wifiConnector.unregisterWifiConnectionListener(); } break; case AUTHENTICATING: wifiLog("Authenticating..."); break; } } } private void wifiLog(String text) { if (wifiConnector.isLogOrNot()) Log.d(WifiConnector.TAG, "ConnectionReceiver: " + text); } }
[ "yuyan@zhunit.com" ]
yuyan@zhunit.com
d4926f18231986debf74ccfe4349f25551652b81
fc7fbac56265d090e372ff8efec6e072b84809bb
/common/src/main/java/tcp/common/Service.java
fd53a7767c369d6cab80bcb263a3acb825980760
[]
no_license
pici0154/lab3-amalia-darius-ingrid-ionut
0fd9b88b5d02929c6dc7fa322c5f83bdb437c368
6e868b0a4422c40d9c92413bd74b5049f3dbfcb4
refs/heads/master
2023-02-11T10:13:50.796497
2021-01-09T15:47:48
2021-01-09T15:48:00
328,188,770
0
0
null
null
null
null
UTF-8
Java
false
false
116
java
package tcp.common; public interface Service { String SERVER_HOST = "localhost"; int SERVER_PORT = 1234; }
[ "ionutpop26@yahoo.com" ]
ionutpop26@yahoo.com
635b81854b8758756876ea05de52237496ce229f
d492dac2b9d2f21f84872dd3142d1a87f43ce141
/src/main/java/me/netty/discard/DiscardServer.java
4b811b994746ddecadf4673d7e750ad8c6b68453
[]
no_license
ohMaxy/git_demo
505719535943d3c0105eab4836af669d99b8d0f2
6017cb04daabdc82a012afef76b107ce7767bc6a
refs/heads/master
2020-05-31T19:06:34.330674
2015-08-04T11:15:17
2015-08-04T11:15:17
40,180,503
0
0
null
null
null
null
UTF-8
Java
false
false
2,300
java
package me.netty.discard; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; /** * 丢弃任何进入的数据 */ public class DiscardServer { private int port; public DiscardServer(int port) { this.port = port; } public void run() throws Exception { EventLoopGroup bossGroup = new NioEventLoopGroup(); // (1) EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap(); // (2) System.out.println("Before group..."); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) // (3) .childHandler(new ChannelInitializer<SocketChannel>() { // (4) @Override public void initChannel(SocketChannel ch) throws Exception { System.out.println("initChannel..."); ch.pipeline().addLast(new DiscardServerHandler()); } }) .option(ChannelOption.SO_BACKLOG, 128) // (5) .childOption(ChannelOption.SO_KEEPALIVE, true); // (6) System.out.println("After group..."); // 绑定端口,开始接收进来的连接 ChannelFuture f = b.bind(port).sync(); // (7) // 等待服务器 socket 关闭 。 // 在这个例子中,这不会发生,但你可以优雅地关闭你的服务器。 f.channel().closeFuture().sync(); System.out.println("run over!"); } finally { workerGroup.shutdownGracefully(); bossGroup.shutdownGracefully(); } } public static void main(String[] args) throws Exception { int port; if (args.length > 0) { port = Integer.parseInt(args[0]); } else { port = 8080; } new DiscardServer(port).run(); } }
[ "404408395@qq.com" ]
404408395@qq.com
eb122bf8bcdc7e25a3b4f95ee125cdceef06bff8
14b0a92fb8b2da559d303fa453e3a8538b8abc9a
/mahindragto-epc_frm/src/main/java/com/mahindra/epcfrm/serviceimpl/CityMasterServiceImpl.java
6bd04bc8747627612e1092fd24a75f1367a1a3c5
[]
no_license
GargeeAP/EPC-FRM
8726ac394bf0e6719222ec3bc73c97038081dd08
3381fdcdd1f7e166ce99ac45c07ffa23df077d7e
refs/heads/main
2023-05-14T09:10:17.138544
2021-06-07T11:22:16
2021-06-07T11:22:16
374,620,693
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
package com.mahindra.epcfrm.serviceimpl; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.mahindra.epcfrm.dto.CityRequestDto; import com.mahindra.epcfrm.dto.MasterResponseDto; import com.mahindra.epcfrm.entity.CityMasterEntity; import com.mahindra.epcfrm.repository.CityMasterRepo; import com.mahindra.epcfrm.service.CityMasterService; @Service public class CityMasterServiceImpl implements CityMasterService { Logger log = LoggerFactory.getLogger(CityMasterServiceImpl.class); @Autowired CityMasterRepo cityMasterRepo; @Override public MasterResponseDto getAllCities() { log.info("inside getAllCites service"); log.debug("inside getAllCites service"); MasterResponseDto citiesResp = new MasterResponseDto(); List<CityMasterEntity> citiesList = cityMasterRepo.findAll(); if (citiesList.isEmpty()) { citiesResp.setStatusCode(1); citiesResp.setMessage("Cities not available"); citiesResp.setData(null); } else { citiesResp.setStatusCode(0); citiesResp.setMessage("success"); citiesResp.setData(citiesList); } return citiesResp; } @Override public MasterResponseDto getCitiesByStateCode(CityRequestDto reqDto) { log.info("inside getCitiesByStateCode service"); log.debug("inside getCitiesByStateCode service"); MasterResponseDto citiesResp = new MasterResponseDto(); List<CityMasterEntity> citiesList = cityMasterRepo.findByStateCode(reqDto.getStateCode()); if (citiesList.isEmpty()) { citiesResp.setStatusCode(1); citiesResp.setMessage("Cities not available"); citiesResp.setData(null); } else { citiesResp.setStatusCode(0); citiesResp.setMessage("success"); citiesResp.setData(citiesList); } return citiesResp; } }
[ "gargee.patil21@gmail.com" ]
gargee.patil21@gmail.com
2ac489cf8fc58556413b85f380f9519fed15f42f
59b01f7b18d53e94f16ac0b6902b03df32030581
/src/main/java/com/lsy/test/redis/service/TuserService.java
4fe411133c9bad8509fb47c8da3c1147942faa19
[]
no_license
KingOfPine/redis
07605f7a2d410b6d3394d842b208e71d3e11ec5c
fcd0162b266f47835038c782ff1fb357fd3898ba
refs/heads/master
2021-04-26T22:15:46.936836
2018-03-06T09:50:45
2018-03-06T09:50:45
124,056,376
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package com.lsy.test.redis.service; import com.lsy.test.redis.model.Tuser; import java.util.List; /** * Created by liangsongying on 2017/10/26. */ public interface TuserService { List<Tuser> getAll(); boolean add(Tuser tuser); boolean delete(List<Integer> ids); Tuser doLogin(String userName, String password); }
[ "lingsongying@qq.com" ]
lingsongying@qq.com
11159ecc147d63a7854039a7e4519cbb17f769e3
2bf46163a5c5e2735fcbc870fda9b4a9b4c7b0e2
/src/main/java/com/jpbo/PBOProductHeader.java
049a5f5fcaf6d1d5003c14dcddd9087fc1d10cd5
[]
no_license
klmunday/JPBO
f83c220dcd02f2d108cea80e111e59835f421054
8bd9e1680527b0bfe7aac81dfca5178b13475e12
refs/heads/master
2020-04-30T19:49:04.538490
2019-08-31T21:14:02
2019-08-31T21:14:02
177,049,543
0
0
null
null
null
null
UTF-8
Java
false
false
2,121
java
package com.jpbo; import java.io.ByteArrayOutputStream; import java.io.IOException; public class PBOProductHeader extends PBOHeader { private PBOStrings strings; public PBOProductHeader(String path, PackingMethod packingMethod, long originalSize, int reserved, int timestamp, long dataSize, PBOStrings strings) { super(path, packingMethod, originalSize, reserved, timestamp, dataSize, 0, 0); this.strings = strings; } // TODO: make custom exception public static PBOProductHeader read(PBOInputStream pboReader) throws Exception { String headerName = pboReader.readString(); PackingMethod packingMethod = pboReader.readPackingMethod(); if (!packingMethod.equals(PackingMethod.PRODUCT)) throw new Exception("PBO product entry is invalid, PBO possibly corrupt or not supported."); long originalSize = pboReader.readIntLE(); int reserved = pboReader.readIntLE(); int timestamp = pboReader.readIntLE(); long dataSize = pboReader.readIntLE(); PBOStrings pboStrings = new PBOStrings(); for (String str = pboReader.readString(); !str.isEmpty(); str = pboReader.readString()) pboStrings.add(str); return new PBOProductHeader(headerName, packingMethod, originalSize, reserved, timestamp, dataSize, pboStrings); } @Override public String toString() { return "ProductEntry(" + this.path + ")" + "\n\tMethod: " + this.packingMethod + "\n\tReserved: " + this.reserved + "\n\tTimestamp: " + this.timestamp + "\n"; } @Override public byte[] toBytes() throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); output.write(super.toBytes()); output.write(this.strings.toBytes()); return output.toByteArray(); } @Override public int length() throws IOException { return super.length() + this.strings.toBytes().length; } public PBOStrings getStrings() { return this.strings; } }
[ "klmunday@users.noreply.github.com" ]
klmunday@users.noreply.github.com
74b060c465a461d9b1afd9787f0a6621b468995a
f2d085998273b0da3e91a6a18ec036e125e1c443
/app/src/main/java/io/pello/android/intentssample/AnotherActivity.java
67968ebdd92793b5151d56c6bf1819c28e19427f
[]
no_license
pxai/android-intentssample
d1fe99581d807751394bc86c7abc0e41cfb19e6a
aae3f7f97bb443b515087bbd183ca3cec92db578
refs/heads/master
2021-01-12T12:59:46.085728
2016-09-21T23:35:57
2016-09-21T23:35:57
68,866,369
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package io.pello.android.intentssample; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; /** * AnotherActivity shows how to get extra parameters from intent * @author Pello Xabier Altadill Izura * @greetz Mr. Remírez */ public class AnotherActivity extends Activity { private TextView textView1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.another_activity); textView1 = (TextView) findViewById(R.id.intentParameter); if (null != savedInstanceState) Log.d("PELLODEBUG","Bundle contents: " + savedInstanceState.toString()); Log.d("PELLODEBUG","Passed parameter through intent: " + getIntent().getStringExtra("extraValue")); textView1.setText( getIntent().getStringExtra("extraValue")); } }
[ "pello_altadill@cuatrovientos.org" ]
pello_altadill@cuatrovientos.org
f9404e799255af69eb23e09b12f513922fd4b635
a9ffa13eab4677cfba160ded15afd71d73f876c1
/src/main/java/command/CommandOff.java
dc5c8c484eb918f37e3823010aee32761317a951
[]
no_license
jx199132/Design_Patterns
8661f7ab46ec326b98a7176bba231c495b2ab29b
b2b89811de8db875a45fc0a4006a9d6a289a9ad0
refs/heads/master
2020-06-30T09:52:17.404172
2019-09-24T00:25:48
2019-09-24T00:25:48
200,795,112
2
0
null
null
null
null
UTF-8
Java
false
false
188
java
package command; //关机命令 public class CommandOff implements Command { private Tv tv; public CommandOff(Tv tv) { this.tv = tv; } public void execute() { tv.turnOff(); } }
[ "q348002671@qq.com" ]
q348002671@qq.com
e86457c5a7f31001e72e9ddae537723cfc034cbd
7d697f6237ef0052ec5dd9d87ccdaceee5ba2a3d
/arunx/src/main/java/com/arunx/model/Friend.java
a1289fe512937c98fd7a07239321c1dee7c6fac8
[]
no_license
arunras/arunx
0e8ddac921fc13f93a1572746347497704884985
09a288279e7e29f96262825ff7ec77880e518ff4
refs/heads/master
2020-04-08T00:25:04.116263
2018-11-24T04:54:54
2018-11-24T04:54:54
158,851,293
0
0
null
null
null
null
UTF-8
Java
false
false
1,996
java
package com.arunx.model; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @Entity public class Friend { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int id; @JsonProperty("first-name") @NotBlank private String firstName; @JsonProperty("last-name") @NotEmpty private String lastName; private int age; @JsonIgnore private boolean married; public Friend() {} public Friend(@NotBlank String firstName, @NotEmpty String lastName) { super(); this.firstName = firstName; this.lastName = lastName; } public Friend(@NotBlank String firstName, @NotEmpty String lastName, int age, boolean married, List<Address> addresses) { super(); this.firstName = firstName; this.lastName = lastName; this.age = age; this.married = married; this.addresses = addresses; } @OneToMany(cascade = CascadeType.ALL) private List<Address> addresses; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public boolean isMarried() { return married; } public void setMarried(boolean married) { this.married = married; } public List<Address> getAddresses() { return addresses; } public void setAddresses(List<Address> addresses) { this.addresses = addresses; } }
[ "prith000@citymail.cuny.edu" ]
prith000@citymail.cuny.edu
78911eaee34830325f65c45e7bf5ddededbc4ce8
2ecf404cab963a32e19fbeaa3897f5645131cc1b
/src/main/java/com/hospital/service/WaitingQueueService.java
7b1976e409e367ec039beb12059d46cef36da563
[]
no_license
ibtehalamro/Hospital-backEnd-Spring
bb8069b19405035512ac9da9b29af0cca3109aac
5ed7afa4796c87e60f24d949fa3962459f71c703
refs/heads/master
2023-03-10T10:17:52.941752
2021-02-20T00:21:04
2021-02-20T00:21:04
287,823,029
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package com.hospital.service; import com.hospital.domain.WaitingQueue; import com.hospital.repository.WaitingQueueRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; @Service public class WaitingQueueService { @Autowired private ClinicService clinicService; @Autowired private WaitingQueueRepository waitingQueueRepository; public WaitingQueue createWaitingQueue(WaitingQueue waitingQueue) { return waitingQueueRepository.save(waitingQueue); } public WaitingQueue getWaitingQueueById(Long id) { return waitingQueueRepository.findById(id).get(); } public Iterable getWaitingQueuesList() { return waitingQueueRepository.findAll(Sort.by(Sort.Direction.ASC, "clinic", "localTime")); } public void deleteWaitingQueueByID(Long id) { waitingQueueRepository.deleteById(id); } //get the number of patients in the waiting queue public long getWaitingQueueCount(){ return waitingQueueRepository.count(); } }
[ "ibtehalamro11@gmail.com" ]
ibtehalamro11@gmail.com
c61f283cfb0af70f0b64d2878f0bf7ced830117f
1b4440d7bb415a315e5f5cf86ca0699f21dd2fcf
/app/src/main/java/com/example/anomia/MainActivity.java
738995c44d251d094074c6c77865b3591a8975e6
[]
no_license
jennatauro/Anomia
5b3e55bd5a34ac0170baecdc2014aa3254a1d34d
b936bfc2d5557597ddf8f3274e23180c04ff12bf
refs/heads/master
2020-12-08T22:40:18.059388
2020-01-11T16:18:25
2020-01-11T16:18:25
233,114,955
0
0
null
null
null
null
UTF-8
Java
false
false
6,401
java
package com.example.anomia; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Random; public class MainActivity extends AppCompatActivity { private static final String GAME_INFO = "Game_Info"; private static final String PLAYERS = "Players"; private static final String GAME_IS_ACTIVE = "isActive"; private static final String CARD_DECK = "Card_Deck"; private DatabaseReference mDatabaseReference; private DatabaseReference mCurrentGameReference; private FirebaseAuth mAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mDatabaseReference = FirebaseDatabase.getInstance().getReference(); mAuth = FirebaseAuth.getInstance(); Button startGameButton = findViewById(R.id.start_game_button); startGameButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Create a new game in Firebase AnomiaGame anomiaGame = new AnomiaGame(); EditText nameEditText = findViewById(R.id.name_edit_text); mDatabaseReference.child(anomiaGame.mHash).child(GAME_INFO).setValue(anomiaGame); signInNewPlayer(anomiaGame.mHash, nameEditText.getText().toString()); TextView gameHashText = findViewById(R.id.game_hash_text_view); gameHashText.setText(anomiaGame.mHash); gameHashText.setVisibility(View.VISIBLE); } }); Button joinGameButton = findViewById(R.id.join_game_button); joinGameButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Join game in Firebase EditText nameEditText = findViewById(R.id.name_edit_text); EditText gameHashText = findViewById(R.id.game_hash_edit_text); signInNewPlayer(gameHashText.getText().toString(), nameEditText.getText().toString()); } }); Button beginGameButton = findViewById(R.id.begin_game_shuffle_deck); beginGameButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mCurrentGameReference != null) { // Create the deck of cards List<String> cardStrings = Arrays.asList(getApplication().getResources().getStringArray(R.array.card_strings)); List<Card> cards = new ArrayList<>(); for (int i = 0; i < cardStrings.size(); i++) { Card card = new Card(cardStrings.get(i), CardSymbol.values()[i % 4]); cards.add(card); } Collections.shuffle(cards); for (int i = 0; i < cards.size(); i++) { Card card = cards.get(i); mCurrentGameReference.child(CARD_DECK).child(i + "_" + card.mText + "_" + card.mCardSymbol).setValue(card); } mCurrentGameReference.child(GAME_INFO).child(GAME_IS_ACTIVE).setValue(true); } } }); } private void signInNewPlayer(final String gameHash, final String name) { mAuth.signInAnonymously() .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Sign in success, update UI with the signed-in user's information FirebaseUser user = mAuth.getCurrentUser(); Player player = new Player(user.getUid(), name); mDatabaseReference.child(gameHash).child(PLAYERS).child(player.mUid).setValue(player); // Listen to when the game becomes active mCurrentGameReference = mDatabaseReference.child(gameHash); mCurrentGameReference.child(GAME_INFO).child(GAME_IS_ACTIVE).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { // The game is started if ((boolean)dataSnapshot.getValue()) { // Navigate to Game Activity Intent intent = new Intent(getApplication(), GameActivity.class); intent.putExtra("gamehash", gameHash); intent.putExtra("userid", mAuth.getCurrentUser().getUid()); startActivity(intent); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { // TODO } }); } else { // TODO } } }); } }
[ "jennatauro@Jennas-MacBook-Pro.local" ]
jennatauro@Jennas-MacBook-Pro.local
051571bb9fd327654e7b4eec57d0dadfcf6e6b96
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_4_983/12.java
7483562d34e762ac74f3d673c0f38cc315c38779
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
380
java
private ClassLoader findClassloader() { // work-around set context loader for windows-service started jvms (QUARTZ-748) if (Thread.currentThread().getContextClassLoader() == null && getClass().getClassLoader() != null) { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); } return Thread.currentThread().getContextClassLoader(); }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
64aa4218a1b32c0d526500dbe3fb3301f2b456c4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/51/org/apache/commons/math/dfp/DfpField_newDfp_342.java
dd2d25724586ce0e74f1f7a015d9feea7048cddb
[]
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
900
java
org apach common math dfp field decim float point instanc version dfp field dfpfield field dfp creat instanc param convert instanc link dfp dfp dfp newdfp dfp
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
743a1d0df0befbd5b4f3d4f871df42a07d96580b
4f5d7d4610e9cac24ff3227dc9a38691e85ef9fe
/app/src/main/java/com/game/libs/algo/LookUp.java
e010894f816acf7a4bc11579b4afa1913b7f2bc3
[]
no_license
jancychr/BeatMeGo
69eb18606e6e20f4afaa8531fa01283dee4fb867
8192b277afc539b05ab7016faef98792391fb65f
refs/heads/master
2022-05-18T18:39:23.731883
2020-01-08T04:41:06
2020-01-08T04:41:06
109,226,043
0
0
null
null
null
null
UTF-8
Java
false
false
43,974
java
package com.game.libs.algo; import java.lang.reflect.Field; public class LookUp { public int _28Y6R = 0; public int _35RY = 2; public int _35R1Y = 0; public int _35R2Y = 3; public int _35R3Y = 3; public int _35R4Y = 4; public int _35R5Y = 1; public int _35YR = 1; public int _29Y6R = 1; public int _36RY = 1; public int _36R1Y = 1; public int _36R2Y = 3; public int _36R3Y = 4; public int _36R4Y = 2; public int _35Y1R = 0; public int _36YR = 1; public int _30Y6R = 2; public int _37RY = 3; public int _37R1Y = 4; public int _37R2Y = 4; public int _37R3Y = 3; public int _35Y2R = 3; public int _36Y1R = 3; public int _37YR = 2; public int _31Y6R = 3; public int _38RY = 4; public int _38R1Y = 3; public int _38R2Y = 2; public int _35Y3R = 3; public int _36Y2R = 2; public int _37Y1R = 2; public int _38YR = 3; public int _32Y6R = 4; public int _39RY = 5; public int _39R1Y = 6; public int _35Y4R = 4; public int _36Y3R = 2; public int _37Y2R = 3; public int _38Y1R = 4; public int _39YR = 5; public int _33Y6R = 5; public int _40RY = 5; public int _35Y5R = 1; public int _36Y4R = 2; public int _37Y3R = 3; public int _38Y2R = 3; public int _39Y1R = 5; public int _40YR = 4; public int _34Y6R = 6; public int _21R6Y6R = 2; public int _28Y6RR = 1; public int _28Y6R1R = 2; public int _28Y6R2R = 3; public int _28Y6R3R = 3; public int _28Y6R4R = 2; public int _28Y6R5R = 2; public int _28R6RY = 1; public int _29R5RY = 1; public int _35RYR = 1; public int _35RY1R = 1; public int _35RY2R = 3; public int _35RY3R = 2; public int _35RY4R = 0; public int _28R6R1Y = 2; public int _35RRY = 1; public int _30R4R1Y = 2; public int _35R1YR = 3; public int _35R1Y1R = 4; public int _35R1Y2R = 1; public int _35R1Y3R = 0; public int _28R6R2Y = 1; public int _35RR1Y = 1; public int _35R1RY = 2; public int _31R3R2Y = 3; public int _35R2YR = 4; public int _35R2Y1R = 3; public int _35R2Y2R = 3; public int _28R6R3Y = 3; public int _35RR2Y = 1; public int _35R1R1Y = 2; public int _35R2RY = 3; public int _32R2R3Y = 4; public int _35R3YR = 5; public int _35R3Y1R = 4; public int _28R6R4Y = 4; public int _35RR3Y = 1; public int _35R1R2Y = 2; public int _35R2R1Y = 3; public int _35R3RY = 5; public int _33R1R4Y = 5; public int _35R4YR = 4; public int _28R6R5Y = 0; public int _35RR4Y = 1; public int _35R1R3Y = 2; public int _35R2R2Y = 3; public int _35R3R1Y = 5; public int _35R4RY = 4; public int _34RR5Y = 6; public int _28R6YR = 1; public int _29R5YR = 1; public int _35YRR = 1; public int _35YR1R = 2; public int _35YR2R = 4; public int _35YR3R = 0; public int _35YR4R = 2; public int _29Y5RR = 2; public int _22R6Y6R = 3; public int _29Y6RR = 2; public int _29Y6R1R = 3; public int _29Y6R2R = 3; public int _29Y6R3R = 1; public int _29Y6R4R = 2; public int _29R6RY = 1; public int _30R5RY = 2; public int _36RYR = 3; public int _36RY1R = 2; public int _36RY2R = 3; public int _36RY3R = 1; public int _29R6R1Y = 3; public int _36RRY = 2; public int _31R4R1Y = 3; public int _36R1YR = 3; public int _36R1Y1R = 3; public int _36R1Y2R = 3; public int _29R6R2Y = 2; public int _36RR1Y = 2; public int _36R1RY = 3; public int _32R3R2Y = 1; public int _36R2YR = 2; public int _36R2Y1R = 4; public int _29R6R3Y = 2; public int _36RR2Y = 2; public int _36R1R1Y = 3; public int _36R2RY = 4; public int _33R2R3Y = 5; public int _36R3YR = 4; public int _29R6R4Y = 2; public int _36RR3Y = 2; public int _36R1R2Y = 3; public int _36R2R1Y = 4; public int _36R3RY = 4; public int _34R1R4Y = 2; public int _28R6Y1R = 2; public int _30R4Y1R = 3; public int _35Y1RR = 3; public int _35Y1R1R = 3; public int _35Y1R2R = 2; public int _35Y1R3R = 0; public int _29R6YR = 2; public int _30R5YR = 2; public int _36YRR = 2; public int _36YR1R = 3; public int _36YR2R = 2; public int _36YR3R = 1; public int _30Y4R1R = 2; public int _30Y5RR = 1; public int _23R6Y6R = 2; public int _30Y6RR = 3; public int _30Y6R1R = 3; public int _30Y6R2R = 1; public int _30Y6R3R = 3; public int _30R6RY = 2; public int _31R5RY = 3; public int _37RYR = 3; public int _37RY1R = 3; public int _37RY2R = 2; public int _30R6R1Y = 2; public int _37RRY = 3; public int _32R4R1Y = 4; public int _37R1YR = 2; public int _37R1Y1R = 2; public int _30R6R2Y = 3; public int _37RR1Y = 3; public int _37R1RY = 3; public int _33R3R2Y = 2; public int _37R2YR = 3; public int _30R6R3Y = 3; public int _37RR2Y = 3; public int _37R1R1Y = 3; public int _37R2RY = 2; public int _34R2R3Y = 3; public int _28R6Y2R = 1; public int _31R3Y2R = 2; public int _35Y2RR = 3; public int _35Y2R1R = 3; public int _35Y2R2R = 3; public int _29R6Y1R = 3; public int _31R4Y1R = 3; public int _36Y1RR = 3; public int _36Y1R1R = 3; public int _36Y1R2R = 3; public int _30R6YR = 3; public int _31R5YR = 3; public int _37YRR = 3; public int _37YR1R = 3; public int _37YR2R = 3; public int _31Y3R2R = 4; public int _31Y4R1R = 2; public int _31Y5RR = 2; public int _24R6Y6R = 3; public int _31Y6RR = 4; public int _31Y6R1R = 4; public int _31Y6R2R = 2; public int _31R6RY = 3; public int _32R5RY = 3; public int _38RYR = 3; public int _38RY1R = 3; public int _31R6R1Y = 3; public int _38RRY = 4; public int _33R4R1Y = 3; public int _38R1YR = 4; public int _31R6R2Y = 2; public int _38RR1Y = 3; public int _38R1RY = 4; public int _34R3R2Y = 5; public int _28R6Y3R = 3; public int _32R2Y3R = 3; public int _35Y3RR = 4; public int _35Y3R1R = 4; public int _29R6Y2R = 4; public int _32R3Y2R = 3; public int _36Y2RR = 4; public int _36Y2R1R = 4; public int _30R6Y1R = 2; public int _32R4Y1R = 4; public int _37Y1RR = 4; public int _37Y1R1R = 4; public int _31R6YR = 3; public int _32R5YR = 4; public int _38YRR = 4; public int _38YR1R = 4; public int _32Y2R3R = 3; public int _32Y3R2R = 4; public int _32Y4R1R = 3; public int _32Y5RR = 3; public int _25R6Y6R = 4; public int _32Y6RR = 5; public int _32Y6R1R = 2; public int _32R6RY = 4; public int _33R5RY = 4; public int _39RYR = 5; public int _32R6R1Y = 3; public int _39RRY = 5; public int _34R4R1Y = 4; public int _28R6Y4R = 4; public int _33R1Y4R = 4; public int _35Y4RR = 5; public int _29R6Y3R = 1; public int _33R2Y3R = 4; public int _36Y3RR = 5; public int _30R6Y2R = 5; public int _33R3Y2R = 4; public int _37Y2RR = 5; public int _31R6Y1R = 3; public int _33R4Y1R = 3; public int _38Y1RR = 5; public int _32R6YR = 4; public int _33R5YR = 5; public int _39YRR = 5; public int _33Y1R4R = 4; public int _33Y2R3R = 4; public int _33Y3R2R = 3; public int _33Y4R1R = 3; public int _33Y5RR = 4; public int _26R6Y6R = 3; public int _33Y6RR = 4; public int _33R6RY = 5; public int _34R5RY = 5; public int _28R6Y5R = 0; public int _34RY5R = 5; public int _29R6Y4R = 1; public int _34R1Y4R = 2; public int _30R6Y3R = 2; public int _34R2Y3R = 3; public int _31R6Y2R = 3; public int _34R3Y2R = 5; public int _32R6Y1R = 4; public int _34R4Y1R = 4; public int _33R6YR = 5; public int _34R5YR = 5; public int _34YR5R = 4; public int _34Y1R4R = 4; public int _34Y2R3R = 3; public int _34Y3R2R = 3; public int _34Y4R1R = 4; public int _34Y5RR = 5; public int _27R6Y6R = 4; public int _14Y6R6Y6R = 3; public int _21R6Y6RY = 1; public int _21R6Y6R1Y = 2; public int _21R6Y6R2Y = 2; public int _21R6Y6R3Y = 1; public int _21R6Y6R4Y = 1; public int _21R6Y6R5Y = 2; public int _21Y6Y6RR = 1; public int _28YY5RR = 0; public int _28Y6RRY = 1; public int _28Y6RR1Y = 3; public int _28Y6RR2Y = 1; public int _28Y6RR3Y = 0; public int _28Y6RR4Y = 1; public int _21Y6Y6R1R = 2; public int _28Y6RYR = 1; public int _28Y1Y4R1R = 2; public int _28Y6R1RY = 2; public int _28Y6R1R1Y = 2; public int _28Y6R1R2Y = 2; public int _28Y6R1R3Y = 2; public int _21Y6Y6R2R = 3; public int _28Y6RY1R = 1; public int _28Y6R1YR = 2; public int _28Y2Y3R2R = 3; public int _28Y6R2RY = 4; public int _28Y6R2R1Y = 3; public int _28Y6R2R2Y = 3; public int _21Y6Y6R3R = 3; public int _28Y6RY2R = 1; public int _28Y6R1Y1R = 2; public int _28Y6R2YR = 3; public int _28Y3Y2R3R = 4; public int _28Y6R3RY = 5; public int _28Y6R3R1Y = 4; public int _21Y6Y6R4R = 0; public int _28Y6RY3R = 1; public int _28Y6R1Y2R = 2; public int _28Y6R2Y1R = 4; public int _28Y6R3YR = 5; public int _28Y4Y1R4R = 5; public int _28Y6R4RY = 4; public int _21Y6Y6R5R = 0; public int _28Y6RY4R = 1; public int _28Y6R1Y3R = 2; public int _28Y6R2Y2R = 1; public int _28Y6R3Y1R = 5; public int _28Y6R4YR = 4; public int _28Y5YR5R = 0; public int _21Y6R6RY = 1; public int _28RY5RY = 2; public int _28R6RYY = 1; public int _28R6RY1Y = 2; public int _28R6RY2Y = 1; public int _28R6RY3Y = 2; public int _28R6RY4Y = 1; public int _28YR5RY = 2; public int _22Y6R5RY = 3; public int _29R5RYY = 2; public int _29R5RY1Y = 3; public int _29R5RY2Y = 1; public int _29R5RY3Y = 1; public int _29R5RY4Y = 2; public int _29Y5RYR = 2; public int _30Y4RYR = 1; public int _35RYRY = 2; public int _35RYR1Y = 2; public int _35RYR2Y = 1; public int _35RYR3Y = 1; public int _29Y5RY1R = 3; public int _35RYYR = 1; public int _31Y3RY1R = 3; public int _35RY1RY = 3; public int _35RY1R1Y = 3; public int _35RY1R2Y = 1; public int _29Y5RY2R = 1; public int _35RYY1R = 2; public int _35RY1YR = 3; public int _32Y2RY2R = 1; public int _35RY2RY = 2; public int _35RY2R1Y = 1; public int _29Y5RY3R = 1; public int _35RYY2R = 1; public int _35RY1Y1R = 3; public int _35RY2YR = 4; public int _33Y1RY3R = 6; public int _35RY3RY = 2; public int _29Y5RY4R = 1; public int _35RYY3R = 1; public int _35RY1Y2R = 2; public int _35RY2Y1R = 5; public int _35RY3YR = 0; public int _34YRY4R = 2; public int _21Y6R6R1Y = 2; public int _28R1Y4R1Y = 3; public int _28R6R1YY = 3; public int _28R6R1Y1Y = 3; public int _28R6R1Y2Y = 2; public int _28R6R1Y3Y = 2; public int _29Y5RRY = 2; public int _30Y4RRY = 1; public int _35RRYY = 2; public int _35RRY1Y = 3; public int _35RRY2Y = 2; public int _35RRY3Y = 2; public int _28Y1R4R1Y = 2; public int _30R4RYY = 1; public int _23Y6R4R1Y = 2; public int _30R4R1YY = 3; public int _30R4R1Y1Y = 3; public int _30R4R1Y2Y = 0; public int _30R4R1Y3Y = 3; public int _30Y4R1YR = 2; public int _31Y3R1YR = 3; public int _35R1YRY = 3; public int _35R1YR1Y = 3; public int _35R1YR2Y = 2; public int _30Y4R1Y1R = 2; public int _35R1YYR = 3; public int _32Y2R1Y1R = 4; public int _35R1Y1RY = 2; public int _35R1Y1R1Y = 2; public int _30Y4R1Y2R = 3; public int _35R1YY1R = 3; public int _35R1Y1YR = 3; public int _33Y1R1Y2R = 0; public int _35R1Y2RY = 0; public int _30Y4R1Y3R = 3; public int _35R1YY2R = 3; public int _35R1Y1Y1R = 3; public int _35R1Y2YR = 0; public int _34YR1Y3R = 0; public int _21Y6R6R2Y = 2; public int _28R2Y3R2Y = 2; public int _28R6R2YY = 3; public int _28R6R2Y1Y = 3; public int _28R6R2Y2Y = 3; public int _29Y5RR1Y = 1; public int _31Y3RR1Y = 3; public int _35RR1YY = 3; public int _35RR1Y1Y = 3; public int _35RR1Y2Y = 2; public int _30Y4R1RY = 2; public int _31Y3R1RY = 3; public int _35R1RYY = 3; public int _35R1RY1Y = 3; public int _35R1RY2Y = 3; public int _28Y2R3R2Y = 2; public int _31R3RY1Y = 1; public int _31R3R1YY = 2; public int _24Y6R3R2Y = 3; public int _31R3R2YY = 2; public int _31R3R2Y1Y = 1; public int _31R3R2Y2Y = 2; public int _31Y3R2YR = 3; public int _32Y2R2YR = 3; public int _35R2YRY = 3; public int _35R2YR1Y = 3; public int _31Y3R2Y1R = 3; public int _35R2YYR = 4; public int _33Y1R2Y1R = 3; public int _35R2Y1RY = 4; public int _31Y3R2Y2R = 2; public int _35R2YY1R = 3; public int _35R2Y1YR = 4; public int _34YR2Y2R = 0; public int _21Y6R6R3Y = 1; public int _28R3Y2R3Y = 3; public int _28R6R3YY = 4; public int _28R6R3Y1Y = 4; public int _29Y5RR2Y = 4; public int _32Y2RR2Y = 0; public int _35RR2YY = 4; public int _35RR2Y1Y = 4; public int _30Y4R1R1Y = 2; public int _32Y2R1R1Y = 2; public int _35R1R1YY = 4; public int _35R1R1Y1Y = 4; public int _31Y3R2RY = 3; public int _32Y2R2RY = 4; public int _35R2RYY = 4; public int _35R2RY1Y = 4; public int _28Y3R2R3Y = 3; public int _32R2RY2Y = 2; public int _32R2R1Y1Y = 3; public int _32R2R2YY = 3; public int _25Y6R2R3Y = 0; public int _32R2R3YY = 5; public int _32R2R3Y1Y = 2; public int _32Y2R3YR = 4; public int _33Y1R3YR = 4; public int _35R3YRY = 5; public int _32Y2R3Y1R = 3; public int _35R3YYR = 5; public int _34YR3Y1R = 4; public int _21Y6R6R4Y = 2; public int _28R4Y1R4Y = 4; public int _28R6R4YY = 5; public int _29Y5RR3Y = 1; public int _33Y1RR3Y = 4; public int _35RR3YY = 5; public int _30Y4R1R2Y = 2; public int _33Y1R1R2Y = 2; public int _35R1R2YY = 5; public int _31Y3R2R1Y = 3; public int _33Y1R2R1Y = 3; public int _35R2R1YY = 5; public int _32Y2R3RY = 4; public int _33Y1R3RY = 5; public int _35R3RYY = 5; public int _28Y4R1R4Y = 4; public int _33R1RY3Y = 5; public int _33R1R1Y2Y = 2; public int _33R1R2Y1Y = 3; public int _33R1R3YY = 4; public int _26Y6R1R4Y = 1; public int _33R1R4YY = 4; public int _33Y1R4YR = 5; public int _34YR4YR = 5; public int _21Y6R6R5Y = 2; public int _28R5YR5Y = 1; public int _29Y5RR4Y = 1; public int _34YRR4Y = 0; public int _30Y4R1R3Y = 2; public int _34YR1R3Y = 0; public int _31Y3R2R2Y = 3; public int _34YR2R2Y = 5; public int _32Y2R3R1Y = 4; public int _34YR3R1Y = 4; public int _33Y1R4RY = 5; public int _34YR4RY = 5; public int _28Y5RR5Y = 4; public int _34RRY4Y = 2; public int _34RR1Y3Y = 0; public int _34RR2Y2Y = 3; public int _34RR3Y1Y = 4; public int _34RR4YY = 5; public int _27Y6RR5Y = 4; public int _21Y6R6YR = 2; public int _28RY5YR = 1; public int _28R6YRY = 2; public int _28R6YR1Y = 2; public int _28R6YR2Y = 0; public int _28R6YR3Y = 2; public int _28R6YR4Y = 2; public int _28YR5YR = 2; public int _22Y6R5YR = 1; public int _29R5YRY = 3; public int _29R5YR1Y = 3; public int _29R5YR2Y = 2; public int _29R5YR3Y = 2; public int _29R5YR4Y = 2; public int _28Y6YRR = 1; public int _29Y5YRR = 1; public int _30Y4YRR = 2; public int _35YRRY = 3; public int _35YRR1Y = 3; public int _35YRR2Y = 1; public int _35YRR3Y = 1; public int _28Y6YR1R = 0; public int _29Y5YR1R = 1; public int _35YRYR = 2; public int _31Y3YR1R = 3; public int _35YR1RY = 2; public int _35YR1R1Y = 3; public int _35YR1R2Y = 1; public int _28Y6YR2R = 1; public int _29Y5YR2R = 1; public int _35YRY1R = 2; public int _35YR1YR = 3; public int _32Y2YR2R = 4; public int _35YR2RY = 4; public int _35YR2R1Y = 4; public int _28Y6YR3R = 1; public int _29Y5YR3R = 1; public int _35YRY2R = 2; public int _35YR1Y1R = 3; public int _35YR2YR = 4; public int _33Y1YR3R = 5; public int _35YR3RY = 1; public int _28Y6YR4R = 1; public int _29Y5YR4R = 1; public int _35YRY3R = 1; public int _35YR1Y2R = 1; public int _35YR2Y1R = 5; public int _35YR3YR = 4; public int _34YYR4R = 2; public int _22Y6Y5RR = 1; public int _22R6Y5YR = 0; public int _15Y6R6Y6R = 4; public int _22R6Y6RY = 2; public int _22R6Y6R1Y = 3; public int _22R6Y6R2Y = 3; public int _22R6Y6R3Y = 2; public int _22R6Y6R4Y = 2; public int _22Y6Y6RR = 2; public int _29YY5RR = 1; public int _29Y6RRY = 2; public int _29Y6RR1Y = 2; public int _29Y6RR2Y = 1; public int _29Y6RR3Y = 1; public int _22Y6Y6R1R = 3; public int _29Y6RYR = 2; public int _29Y1Y4R1R = 3; public int _29Y6R1RY = 3; public int _29Y6R1R1Y = 3; public int _29Y6R1R2Y = 1; public int _22Y6Y6R2R = 1; public int _29Y6RY1R = 2; public int _29Y6R1YR = 3; public int _29Y2Y3R2R = 4; public int _29Y6R2RY = 4; public int _29Y6R2R1Y = 4; public int _22Y6Y6R3R = 1; public int _29Y6RY2R = 2; public int _29Y6R1Y1R = 3; public int _29Y6R2YR = 4; public int _29Y3Y2R3R = 3; public int _29Y6R3RY = 1; public int _22Y6Y6R4R = 1; public int _29Y6RY3R = 2; public int _29Y6R1Y2R = 3; public int _29Y6R2Y1R = 6; public int _29Y6R3YR = 0; public int _29Y4Y1R4R = 1; public int _22Y6R6RY = 2; public int _29RY5RY = 0; public int _29R6RYY = 2; public int _29R6RY1Y = 3; public int _29R6RY2Y = 2; public int _29R6RY3Y = 2; public int _30R4YRY = 2; public int _29YR5RY = 1; public int _23Y6R5RY = 1; public int _30R5RYY = 3; public int _30R5RY1Y = 3; public int _30R5RY2Y = 4; public int _30R5RY3Y = 3; public int _30Y5RYR = 3; public int _31Y4RYR = 2; public int _36RYRY = 3; public int _36RYR1Y = 3; public int _36RYR2Y = 2; public int _30Y5RY1R = 4; public int _36RYYR = 2; public int _32Y3RY1R = 2; public int _36RY1RY = 2; public int _36RY1R1Y = 2; public int _30Y5RY2R = 2; public int _36RYY1R = 2; public int _36RY1YR = 3; public int _33Y2RY2R = 2; public int _36RY2RY = 2; public int _30Y5RY3R = 2; public int _36RYY2R = 2; public int _36RY1Y1R = 3; public int _36RY2YR = 2; public int _34Y1RY3R = 1; public int _22Y6R6R1Y = 3; public int _29R1Y4R1Y = 3; public int _29R6R1YY = 3; public int _29R6R1Y1Y = 3; public int _29R6R1Y2Y = 3; public int _30Y5RRY = 3; public int _31Y4RRY = 2; public int _36RRYY = 3; public int _36RRY1Y = 2; public int _36RRY2Y = 2; public int _31R3YR1Y = 3; public int _29Y1R4R1Y = 1; public int _31R4RYY = 2; public int _24Y6R4R1Y = 3; public int _31R4R1YY = 4; public int _31R4R1Y1Y = 0; public int _31R4R1Y2Y = 2; public int _31Y4R1YR = 3; public int _32Y3R1YR = 3; public int _36R1YRY = 3; public int _36R1YR1Y = 3; public int _31Y4R1Y1R = 3; public int _36R1YYR = 4; public int _33Y2R1Y1R = 3; public int _36R1Y1RY = 3; public int _31Y4R1Y2R = 3; public int _36R1YY1R = 3; public int _36R1Y1YR = 3; public int _34Y1R1Y2R = 1; public int _22Y6R6R2Y = 3; public int _29R2Y3R2Y = 3; public int _29R6R2YY = 4; public int _29R6R2Y1Y = 4; public int _30Y5RR1Y = 2; public int _32Y3RR1Y = 2; public int _36RR1YY = 4; public int _36RR1Y1Y = 4; public int _31Y4R1RY = 3; public int _32Y3R1RY = 4; public int _36R1RYY = 4; public int _36R1RY1Y = 4; public int _32R2YR2Y = 3; public int _29Y2R3R2Y = 3; public int _32R3RY1Y = 2; public int _32R3R1YY = 3; public int _25Y6R3R2Y = 2; public int _32R3R2YY = 5; public int _32R3R2Y1Y = 2; public int _32Y3R2YR = 4; public int _33Y2R2YR = 4; public int _36R2YRY = 4; public int _32Y3R2Y1R = 3; public int _36R2YYR = 5; public int _34Y1R2Y1R = 4; public int _22Y6R6R3Y = 0; public int _29R3Y2R3Y = 2; public int _29R6R3YY = 2; public int _30Y5RR2Y = 2; public int _33Y2RR2Y = 2; public int _36RR2YY = 1; public int _31Y4R1R1Y = 3; public int _33Y2R1R1Y = 1; public int _36R1R1YY = 5; public int _32Y3R2RY = 4; public int _33Y2R2RY = 5; public int _36R2RYY = 5; public int _33R1YR3Y = 3; public int _29Y3R2R3Y = 3; public int _33R2RY2Y = 2; public int _33R2R1Y1Y = 3; public int _33R2R2YY = 4; public int _26Y6R2R3Y = 1; public int _33R2R3YY = 4; public int _33Y2R3YR = 5; public int _34Y1R3YR = 5; public int _22Y6R6R4Y = 1; public int _29R4Y1R4Y = 2; public int _30Y5RR3Y = 2; public int _34Y1RR3Y = 1; public int _31Y4R1R2Y = 3; public int _34Y1R1R2Y = 1; public int _32Y3R2R1Y = 4; public int _34Y1R2R1Y = 4; public int _33Y2R3RY = 5; public int _34Y1R3RY = 5; public int _34RYR4Y = 6; public int _29Y4R1R4Y = 1; public int _34R1RY3Y = 1; public int _34R1R1Y2Y = 3; public int _34R1R2Y1Y = 4; public int _34R1R3YY = 5; public int _27Y6R1R4Y = 2; public int _21Y6R6Y1R = 2; public int _28R6YYR = 1; public int _28R1Y4Y1R = 2; public int _28R6Y1RY = 2; public int _28R6Y1R1Y = 2; public int _28R6Y1R2Y = 2; public int _28R6Y1R3Y = 2; public int _28Y1R4Y1R = 0; public int _30R4YYR = 1; public int _23Y6R4Y1R = 2; public int _30R4Y1RY = 3; public int _30R4Y1R1Y = 4; public int _30R4Y1R2Y = 4; public int _30R4Y1R3Y = 3; public int _28Y6Y1RR = 2; public int _35YYRR = 2; public int _30Y4Y1RR = 2; public int _31Y3Y1RR = 3; public int _35Y1RRY = 3; public int _35Y1RR1Y = 3; public int _35Y1RR2Y = 2; public int _28Y6Y1R1R = 2; public int _35YYR1R = 1; public int _30Y4Y1R1R = 2; public int _35Y1RYR = 3; public int _32Y2Y1R1R = 4; public int _35Y1R1RY = 2; public int _35Y1R1R1Y = 2; public int _28Y6Y1R2R = 2; public int _35YYR2R = 1; public int _30Y4Y1R2R = 2; public int _35Y1RY1R = 3; public int _35Y1R1YR = 4; public int _33Y1Y1R2R = 2; public int _35Y1R2RY = 2; public int _28Y6Y1R3R = 2; public int _35YYR3R = 1; public int _30Y4Y1R3R = 2; public int _35Y1RY2R = 3; public int _35Y1R1Y1R = 4; public int _35Y1R2YR = 5; public int _34YY1R3R = 2; public int _29R5YYR = 2; public int _22Y6R6YR = 3; public int _29RY5YR = 2; public int _29R6YRY = 2; public int _29R6YR1Y = 2; public int _29R6YR2Y = 3; public int _29R6YR3Y = 0; public int _29YR5YR = 3; public int _23Y6R5YR = 1; public int _30R5YRY = 3; public int _30R5YR1Y = 1; public int _30R5YR2Y = 3; public int _30R5YR3Y = 3; public int _29Y6YRR = 2; public int _30Y5YRR = 1; public int _31Y4YRR = 2; public int _36YRRY = 4; public int _36YRR1Y = 4; public int _36YRR2Y = 2; public int _29Y6YR1R = 4; public int _30Y5YR1R = 2; public int _36YRYR = 2; public int _32Y3YR1R = 4; public int _36YR1RY = 3; public int _36YR1R1Y = 2; public int _29Y6YR2R = 1; public int _30Y5YR2R = 2; public int _36YRY1R = 3; public int _36YR1YR = 4; public int _33Y2YR2R = 2; public int _36YR2RY = 2; public int _29Y6YR3R = 1; public int _30Y5YR3R = 2; public int _36YRY2R = 3; public int _36YR1Y1R = 2; public int _36YR2YR = 4; public int _34Y1YR3R = 1; public int _23Y6Y4R1R = 2; public int _23Y6Y5RR = 2; public int _23R6Y4Y1R = 0; public int _23R6Y5YR = 1; public int _16Y6R6Y6R = 0; public int _23R6Y6RY = 3; public int _23R6Y6R1Y = 4; public int _23R6Y6R2Y = 4; public int _23R6Y6R3Y = 2; public int _23Y6Y6RR = 2; public int _30YY5RR = 2; public int _30Y6RRY = 3; public int _30Y6RR1Y = 3; public int _30Y6RR2Y = 2; public int _23Y6Y6R1R = 2; public int _30Y6RYR = 3; public int _30Y1Y4R1R = 2; public int _30Y6R1RY = 2; public int _30Y6R1R1Y = 2; public int _23Y6Y6R2R = 2; public int _30Y6RY1R = 3; public int _30Y6R1YR = 4; public int _30Y2Y3R2R = 2; public int _30Y6R2RY = 2; public int _23Y6Y6R3R = 2; public int _30Y6RY2R = 3; public int _30Y6R1Y1R = 2; public int _30Y6R2YR = 5; public int _30Y3Y2R3R = 2; public int _23Y6R6RY = 1; public int _30RY5RY = 1; public int _30R6RYY = 3; public int _30R6RY1Y = 1; public int _30R6RY2Y = 1; public int _31R3Y1RY = 3; public int _31R4YRY = 3; public int _30YR5RY = 2; public int _24Y6R5RY = 3; public int _31R5RYY = 4; public int _31R5RY1Y = 4; public int _31R5RY2Y = 1; public int _31Y5RYR = 2; public int _32Y4RYR = 3; public int _37RYRY = 4; public int _37RYR1Y = 3; public int _31Y5RY1R = 3; public int _37RYYR = 3; public int _33Y3RY1R = 3; public int _37RY1RY = 3; public int _31Y5RY2R = 3; public int _37RYY1R = 3; public int _37RY1YR = 3; public int _34Y2RY2R = 3; public int _23Y6R6R1Y = 2; public int _30R1Y4R1Y = 4; public int _30R6R1YY = 4; public int _30R6R1Y1Y = 4; public int _31Y5RRY = 4; public int _32Y4RRY = 3; public int _37RRYY = 4; public int _37RRY1Y = 3; public int _32R2Y1R1Y = 3; public int _32R3YR1Y = 4; public int _30Y1R4R1Y = 2; public int _32R4RYY = 3; public int _25Y6R4R1Y = 4; public int _32R4R1YY = 5; public int _32R4R1Y1Y = 2; public int _32Y4R1YR = 2; public int _33Y3R1YR = 4; public int _37R1YRY = 4; public int _32Y4R1Y1R = 4; public int _37R1YYR = 4; public int _34Y2R1Y1R = 4; public int _23Y6R6R2Y = 4; public int _30R2Y3R2Y = 4; public int _30R6R2YY = 5; public int _31Y5RR1Y = 3; public int _33Y3RR1Y = 3; public int _37RR1YY = 5; public int _32Y4R1RY = 4; public int _33Y3R1RY = 2; public int _37R1RYY = 5; public int _33R1Y1R2Y = 3; public int _33R2YR2Y = 3; public int _30Y2R3R2Y = 5; public int _33R3RY1Y = 3; public int _33R3R1YY = 4; public int _26Y6R3R2Y = 3; public int _33R3R2YY = 4; public int _33Y3R2YR = 5; public int _34Y2R2YR = 5; public int _23Y6R6R3Y = 2; public int _30R3Y2R3Y = 3; public int _31Y5RR2Y = 3; public int _34Y2RR2Y = 2; public int _32Y4R1R1Y = 4; public int _34Y2R1R1Y = 4; public int _33Y3R2RY = 5; public int _34Y2R2RY = 5; public int _34RY1R3Y = 2; public int _34R1YR3Y = 2; public int _30Y3R2R3Y = 2; public int _34R2RY2Y = 3; public int _34R2R1Y1Y = 4; public int _34R2R2YY = 5; public int _27Y6R2R3Y = 3; public int _21Y6R6Y2R = 2; public int _28R6YY1R = 2; public int _28R6Y1YR = 2; public int _28R2Y3Y2R = 3; public int _28R6Y2RY = 4; public int _28R6Y2R1Y = 3; public int _28R6Y2R2Y = 2; public int _28Y2R3Y2R = 4; public int _31R3YY1R = 1; public int _31R3Y1YR = 2; public int _24Y6R3Y2R = 3; public int _31R3Y2RY = 2; public int _31R3Y2R1Y = 5; public int _31R3Y2R2Y = 2; public int _28Y6Y2RR = 3; public int _35YY1RR = 1; public int _35Y1YRR = 3; public int _31Y3Y2RR = 3; public int _32Y2Y2RR = 4; public int _35Y2RRY = 4; public int _35Y2RR1Y = 3; public int _28Y6Y2R1R = 3; public int _35YY1R1R = 1; public int _35Y1YR1R = 2; public int _31Y3Y2R1R = 3; public int _35Y2RYR = 4; public int _33Y1Y2R1R = 5; public int _35Y2R1RY = 3; public int _28Y6Y2R2R = 1; public int _35YY1R2R = 1; public int _35Y1YR2R = 2; public int _31Y3Y2R2R = 3; public int _35Y2RY1R = 4; public int _35Y2R1YR = 5; public int _34YY2R2R = 3; public int _29R5YY1R = 2; public int _22Y6R6Y1R = 3; public int _29R6YYR = 2; public int _29R1Y4Y1R = 3; public int _29R6Y1RY = 3; public int _29R6Y1R1Y = 3; public int _29R6Y1R2Y = 3; public int _29Y1R4Y1R = 1; public int _31R4YYR = 2; public int _24Y6R4Y1R = 3; public int _31R4Y1RY = 4; public int _31R4Y1R1Y = 2; public int _31R4Y1R2Y = 1; public int _29Y6Y1RR = 3; public int _36YYRR = 2; public int _31Y4Y1RR = 3; public int _32Y3Y1RR = 3; public int _36Y1RRY = 2; public int _36Y1RR1Y = 3; public int _29Y6Y1R1R = 3; public int _36YYR1R = 2; public int _31Y4Y1R1R = 3; public int _36Y1RYR = 3; public int _33Y2Y1R1R = 3; public int _36Y1R1RY = 3; public int _29Y6Y1R2R = 3; public int _36YYR2R = 2; public int _31Y4Y1R2R = 3; public int _36Y1RY1R = 3; public int _36Y1R1YR = 3; public int _34Y1Y1R2R = 1; public int _30R4Y1YR = 1; public int _30R5YYR = 1; public int _23Y6R6YR = 4; public int _30RY5YR = 3; public int _30R6YRY = 3; public int _30R6YR1Y = 3; public int _30R6YR2Y = 4; public int _30YR5YR = 2; public int _24Y6R5YR = 4; public int _31R5YRY = 2; public int _31R5YR1Y = 2; public int _31R5YR2Y = 4; public int _30Y6YRR = 3; public int _31Y5YRR = 2; public int _32Y4YRR = 3; public int _37YRRY = 2; public int _37YRR1Y = 3; public int _30Y6YR1R = 2; public int _31Y5YR1R = 3; public int _37YRYR = 3; public int _33Y3YR1R = 3; public int _37YR1RY = 4; public int _30Y6YR2R = 2; public int _31Y5YR2R = 3; public int _37YRY1R = 3; public int _37YR1YR = 3; public int _34Y2YR2R = 2; public int _24Y6Y3R2R = 3; public int _24Y6Y4R1R = 3; public int _24Y6Y5RR = 3; public int _24R6Y3Y2R = 3; public int _24R6Y4Y1R = 1; public int _24R6Y5YR = 2; public int _17Y6R6Y6R = 3; public int _24R6Y6RY = 4; public int _24R6Y6R1Y = 5; public int _24R6Y6R2Y = 3; public int _24Y6Y6RR = 3; public int _31YY5RR = 4; public int _31Y6RRY = 4; public int _31Y6RR1Y = 3; public int _24Y6Y6R1R = 3; public int _31Y6RYR = 4; public int _31Y1Y4R1R = 3; public int _31Y6R1RY = 3; public int _24Y6Y6R2R = 3; public int _31Y6RY1R = 3; public int _31Y6R1YR = 3; public int _31Y2Y3R2R = 3; public int _24Y6R6RY = 2; public int _31RY5RY = 2; public int _31R6RYY = 4; public int _31R6RY1Y = 4; public int _32R2Y2RY = 2; public int _32R3Y1RY = 3; public int _32R4YRY = 3; public int _31YR5RY = 3; public int _25Y6R5RY = 2; public int _32R5RYY = 5; public int _32R5RY1Y = 5; public int _32Y5RYR = 3; public int _33Y4RYR = 4; public int _38RYRY = 4; public int _32Y5RY1R = 4; public int _38RYYR = 4; public int _34Y3RY1R = 4; public int _24Y6R6R1Y = 3; public int _31R1Y4R1Y = 5; public int _31R6R1YY = 5; public int _32Y5RRY = 5; public int _33Y4RRY = 4; public int _38RRYY = 4; public int _33R1Y2R1Y = 3; public int _33R2Y1R1Y = 3; public int _33R3YR1Y = 3; public int _31Y1R4R1Y = 3; public int _33R4RYY = 4; public int _26Y6R4R1Y = 3; public int _33R4R1YY = 4; public int _33Y4R1YR = 3; public int _34Y3R1YR = 5; public int _24Y6R6R2Y = 3; public int _31R2Y3R2Y = 2; public int _32Y5RR1Y = 4; public int _34Y3RR1Y = 4; public int _33Y4R1RY = 5; public int _34Y3R1RY = 5; public int _34RY2R2Y = 4; public int _34R1Y1R2Y = 3; public int _34R2YR2Y = 2; public int _31Y2R3R2Y = 3; public int _34R3RY1Y = 4; public int _34R3R1YY = 4; public int _27Y6R3R2Y = 4; public int _21Y6R6Y3R = 3; public int _28R6YY2R = 1; public int _28R6Y1Y1R = 2; public int _28R6Y2YR = 3; public int _28R3Y2Y3R = 4; public int _28R6Y3RY = 4; public int _28R6Y3R1Y = 4; public int _28Y3R2Y3R = 3; public int _32R2YY2R = 1; public int _32R2Y1Y1R = 2; public int _32R2Y2YR = 5; public int _25Y6R2Y3R = 4; public int _32R2Y3RY = 3; public int _32R2Y3R1Y = 3; public int _28Y6Y3RR = 4; public int _35YY2RR = 4; public int _35Y1Y1RR = 2; public int _35Y2YRR = 4; public int _32Y2Y3RR = 4; public int _33Y1Y3RR = 5; public int _35Y3RRY = 5; public int _28Y6Y3R1R = 4; public int _35YY2R1R = 1; public int _35Y1Y1R1R = 2; public int _35Y2YR1R = 3; public int _32Y2Y3R1R = 4; public int _35Y3RYR = 5; public int _34YY3R1R = 4; public int _29R5YY2R = 2; public int _22Y6R6Y2R = 3; public int _29R6YY1R = 2; public int _29R6Y1YR = 3; public int _29R2Y3Y2R = 1; public int _29R6Y2RY = 2; public int _29R6Y2R1Y = 3; public int _29Y2R3Y2R = 2; public int _32R3YY1R = 2; public int _32R3Y1YR = 5; public int _25Y6R3Y2R = 2; public int _32R3Y2RY = 3; public int _32R3Y2R1Y = 2; public int _29Y6Y2RR = 4; public int _36YY1RR = 2; public int _36Y1YRR = 4; public int _32Y3Y2RR = 4; public int _33Y2Y2RR = 5; public int _36Y2RRY = 5; public int _29Y6Y2R1R = 4; public int _36YY1R1R = 2; public int _36Y1YR1R = 3; public int _32Y3Y2R1R = 4; public int _36Y2RYR = 5; public int _34Y1Y2R1R = 4; public int _30R4Y1Y1R = 4; public int _30R5YY1R = 1; public int _23Y6R6Y1R = 2; public int _30R6YYR = 3; public int _30R1Y4Y1R = 4; public int _30R6Y1RY = 2; public int _30R6Y1R1Y = 3; public int _30Y1R4Y1R = 2; public int _32R4YYR = 3; public int _25Y6R4Y1R = 4; public int _32R4Y1RY = 5; public int _32R4Y1R1Y = 2; public int _30Y6Y1RR = 2; public int _37YYRR = 3; public int _32Y4Y1RR = 4; public int _33Y3Y1RR = 4; public int _37Y1RRY = 3; public int _30Y6Y1R1R = 2; public int _37YYR1R = 3; public int _32Y4Y1R1R = 4; public int _37Y1RYR = 4; public int _34Y2Y1R1R = 4; public int _31R3Y2YR = 3; public int _31R4Y1YR = 2; public int _31R5YYR = 2; public int _24Y6R6YR = 3; public int _31RY5YR = 4; public int _31R6YRY = 3; public int _31R6YR1Y = 2; public int _31YR5YR = 3; public int _25Y6R5YR = 5; public int _32R5YRY = 3; public int _32R5YR1Y = 3; public int _31Y6YRR = 4; public int _32Y5YRR = 3; public int _33Y4YRR = 4; public int _38YRRY = 3; public int _31Y6YR1R = 3; public int _32Y5YR1R = 4; public int _38YRYR = 4; public int _34Y3YR1R = 4; public int _25Y6Y2R3R = 4; public int _25Y6Y3R2R = 4; public int _25Y6Y4R1R = 4; public int _25Y6Y5RR = 4; public int _25R6Y2Y3R = 4; public int _25R6Y3Y2R = 2; public int _25R6Y4Y1R = 2; public int _25R6Y5YR = 3; public int _18Y6R6Y6R = 6; public int _25R6Y6RY = 5; public int _25R6Y6R1Y = 6; public int _25Y6Y6RR = 4; public int _32YY5RR = 5; public int _32Y6RRY = 4; public int _25Y6Y6R1R = 4; public int _32Y6RYR = 5; public int _32Y1Y4R1R = 4; public int _25Y6R6RY = 5; public int _32RY5RY = 3; public int _32R6RYY = 5; public int _33R1Y3RY = 5; public int _33R2Y2RY = 2; public int _33R3Y1RY = 4; public int _33R4YRY = 4; public int _32YR5RY = 4; public int _26Y6R5RY = 3; public int _33R5RYY = 4; public int _33Y5RYR = 4; public int _34Y4RYR = 5; public int _25Y6R6R1Y = 4; public int _32R1Y4R1Y = 6; public int _33Y5RRY = 5; public int _34Y4RRY = 5; public int _34RY3R1Y = 4; public int _34R1Y2R1Y = 4; public int _34R2Y1R1Y = 4; public int _34R3YR1Y = 4; public int _32Y1R4R1Y = 4; public int _34R4RYY = 5; public int _27Y6R4R1Y = 4; public int _21Y6R6Y4R = 4; public int _28R6YY3R = 1; public int _28R6Y1Y2R = 2; public int _28R6Y2Y1R = 3; public int _28R6Y3YR = 5; public int _28R4Y1Y4R = 5; public int _28R6Y4RY = 0; public int _28Y4R1Y4R = 4; public int _33R1YY3R = 1; public int _33R1Y1Y2R = 2; public int _33R1Y2Y1R = 3; public int _33R1Y3YR = 4; public int _26Y6R1Y4R = 5; public int _33R1Y4RY = 4; public int _28Y6Y4RR = 5; public int _35YY3RR = 1; public int _35Y1Y2RR = 2; public int _35Y2Y1RR = 4; public int _35Y3YRR = 4; public int _33Y1Y4RR = 5; public int _34YY4RR = 5; public int _29R5YY3R = 2; public int _22Y6R6Y3R = 5; public int _29R6YY2R = 2; public int _29R6Y1Y1R = 3; public int _29R6Y2YR = 4; public int _29R3Y2Y3R = 3; public int _29R6Y3RY = 3; public int _29Y3R2Y3R = 4; public int _33R2YY2R = 2; public int _33R2Y1Y1R = 3; public int _33R2Y2YR = 4; public int _26Y6R2Y3R = 6; public int _33R2Y3RY = 4; public int _29Y6Y3RR = 2; public int _36YY2RR = 2; public int _36Y1Y1RR = 3; public int _36Y2YRR = 4; public int _33Y2Y3RR = 5; public int _34Y1Y3RR = 5; public int _30R4Y1Y2R = 4; public int _30R5YY2R = 1; public int _23Y6R6Y2R = 4; public int _30R6YY1R = 3; public int _30R6Y1YR = 4; public int _30R2Y3Y2R = 3; public int _30R6Y2RY = 3; public int _30Y2R3Y2R = 3; public int _33R3YY1R = 3; public int _33R3Y1YR = 3; public int _26Y6R3Y2R = 3; public int _33R3Y2RY = 3; public int _30Y6Y2RR = 5; public int _37YY1RR = 3; public int _37Y1YRR = 3; public int _33Y3Y2RR = 2; public int _34Y2Y2RR = 2; public int _31R3Y2Y1R = 4; public int _31R4Y1Y1R = 4; public int _31R5YY1R = 2; public int _24Y6R6Y1R = 3; public int _31R6YYR = 4; public int _31R1Y4Y1R = 3; public int _31R6Y1RY = 3; public int _31Y1R4Y1R = 3; public int _33R4YYR = 4; public int _26Y6R4Y1R = 3; public int _33R4Y1RY = 3; public int _31Y6Y1RR = 3; public int _38YYRR = 4; public int _33Y4Y1RR = 5; public int _34Y3Y1RR = 3; public int _32R2Y3YR = 3; public int _32R3Y2YR = 2; public int _32R4Y1YR = 3; public int _32R5YYR = 3; public int _25Y6R6YR = 5; public int _32RY5YR = 5; public int _32R6YRY = 4; public int _32YR5YR = 4; public int _26Y6R5YR = 4; public int _33R5YRY = 3; public int _32Y6YRR = 5; public int _33Y5YRR = 4; public int _34Y4YRR = 5; public int _26Y6Y1R4R = 5; public int _26Y6Y2R3R = 5; public int _26Y6Y3R2R = 5; public int _26Y6Y4R1R = 3; public int _26Y6Y5RR = 4; public int _26R6Y1Y4R = 4; public int _26R6Y2Y3R = 4; public int _26R6Y3Y2R = 3; public int _26R6Y4Y1R = 3; public int _26R6Y5YR = 4; public int _19Y6R6Y6R = 2; public int _26R6Y6RY = 6; public int _26Y6Y6RR = 5; public int _33YY5RR = 6; public int _26Y6R6RY = 5; public int _33RY5RY = 4; public int _34RY4RY = 4; public int _34R1Y3RY = 4; public int _34R2Y2RY = 4; public int _34R3Y1RY = 4; public int _34R4YRY = 4; public int _33YR5RY = 5; public int _27Y6R5RY = 4; public int _21Y6R6Y5R = 2; public int _28R6YY4R = 1; public int _28R6Y1Y3R = 2; public int _28R6Y2Y2R = 3; public int _28R6Y3Y1R = 5; public int _28R6Y4YR = 4; public int _28R5YY5R = 2; public int _28Y5RY5R = 5; public int _34RYY4R = 1; public int _34RY1Y3R = 2; public int _34RY2Y2R = 3; public int _34RY3Y1R = 4; public int _34RY4YR = 5; public int _27Y6RY5R = 4; public int _29R5YY4R = 2; public int _22Y6R6Y4R = 5; public int _29R6YY3R = 2; public int _29R6Y1Y2R = 3; public int _29R6Y2Y1R = 4; public int _29R6Y3YR = 1; public int _29R4Y1Y4R = 2; public int _29Y4R1Y4R = 2; public int _34R1YY3R = 2; public int _34R1Y1Y2R = 3; public int _34R1Y2Y1R = 4; public int _34R1Y3YR = 4; public int _27Y6R1Y4R = 4; public int _30R4Y1Y3R = 2; public int _30R5YY3R = 1; public int _23Y6R6Y3R = 6; public int _30R6YY2R = 3; public int _30R6Y1Y1R = 3; public int _30R6Y2YR = 4; public int _30R3Y2Y3R = 3; public int _30Y3R2Y3R = 3; public int _34R2YY2R = 3; public int _34R2Y1Y1R = 3; public int _34R2Y2YR = 2; public int _27Y6R2Y3R = 5; public int _31R3Y2Y2R = 4; public int _31R4Y1Y2R = 4; public int _31R5YY2R = 4; public int _24Y6R6Y2R = 3; public int _31R6YY1R = 4; public int _31R6Y1YR = 5; public int _31R2Y3Y2R = 4; public int _31Y2R3Y2R = 2; public int _34R3YY1R = 3; public int _34R3Y1YR = 4; public int _27Y6R3Y2R = 4; public int _32R2Y3Y1R = 3; public int _32R3Y2Y1R = 4; public int _32R4Y1Y1R = 3; public int _32R5YY1R = 3; public int _25Y6R6Y1R = 4; public int _32R6YYR = 5; public int _32R1Y4Y1R = 4; public int _32Y1R4Y1R = 3; public int _34R4YYR = 5; public int _27Y6R4Y1R = 4; public int _33R1Y4YR = 4; public int _33R2Y3YR = 4; public int _33R3Y2YR = 2; public int _33R4Y1YR = 3; public int _33R5YYR = 4; public int _26Y6R6YR = 3; public int _33RY5YR = 4; public int _33YR5YR = 4; public int _27Y6R5YR = 5; public int _27Y6YR5R = 6; public int _27Y6Y1R4R = 6; public int _27Y6Y2R3R = 3; public int _27Y6Y3R2R = 3; public int _27Y6Y4R1R = 4; public int _27Y6Y5RR = 5; public static int lookUp(String paramString) { if (paramString.equals("42")) { return 3; } if (paramString.equals("35R")) { return 3; } if (paramString.equals("36R")) { return 3; } if (paramString.equals("37R")) { return 3; } if (paramString.equals("38R")) { return 2; } if (paramString.equals("39R")) { return 3; } if (paramString.equals("40R")) { return 3; } if (paramString.equals("41R")) { return 3; } Class localClass = LookUp.class; try { Field localField = localClass.getField("_" + paramString); return localField.getInt(new LookUp()); } catch (Exception localException) {} return -1; } }
[ "jancychristy@jancys-MacBook-Air.local" ]
jancychristy@jancys-MacBook-Air.local
0a31b00c39148bc7277db1d29daf214ff1b40e73
3615448f4081f94b64e71f6e2ff1a9718dd28542
/spring-boot-Group2Assessment/src/main/java/com/group2/greatlearning/entity/ProductCategory.java
339ef830abd6f250b4106901c9a055f2045fcc72
[]
no_license
Developers-HCL/HCL-FSD-Group2
38cf59fb2e7f8b30cd55b09c5ed65c6ed5c1f816
0005d705717a9fa1da9a1e01b43b88c8f2576dbb
refs/heads/main
2023-04-11T18:05:59.144629
2021-05-18T13:51:09
2021-05-18T13:51:09
366,110,552
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.group2.greatlearning.entity; import javax.persistence.*; import java.util.Set; @Entity @Table(name="product_category") public class ProductCategory { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private Long id; @Column(name="category_name") private String categoryName; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCategoryName() { return categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; } public Set<Product> getProducts() { return products; } public void setProducts(Set<Product> products) { this.products = products; } @OneToMany(cascade = CascadeType.ALL, mappedBy = "category") private Set<Product> products; }
[ "mvnnaveen98@gmail.com" ]
mvnnaveen98@gmail.com
62bda9d6f94ae7a5628ff6b50df2aeec4f4fcb65
178ef1239b7b188501395c4d3db3f0266b740289
/android/os/MessageProto.java
290c38a1ffad8a13f3e5ae48263fb36812dd0655
[]
no_license
kailashrs/5z_framework
b295e53d20de0b6d2e020ee5685eceeae8c0a7df
1b7f76b1f06cfb6fb95d4dd41082a003d7005e5d
refs/heads/master
2020-04-26T12:31:27.296125
2019-03-03T08:58:23
2019-03-03T08:58:23
173,552,503
1
0
null
null
null
null
UTF-8
Java
false
false
495
java
package android.os; public final class MessageProto { public static final long ARG1 = 1120986464260L; public static final long ARG2 = 1120986464261L; public static final long BARRIER = 1120986464264L; public static final long CALLBACK = 1138166333442L; public static final long OBJ = 1138166333446L; public static final long TARGET = 1138166333447L; public static final long WHAT = 1120986464259L; public static final long WHEN = 1112396529665L; public MessageProto() {} }
[ "kailash.sudhakar@gmail.com" ]
kailash.sudhakar@gmail.com
575e45ddf0e57fb93e25ebb3f2a02878ec0ce0c7
9dc05d84b06df93fcf49123ddcd474770133a200
/app/src/main/java/org/shpstartup/android/yocount/StartActivity.java
318644b9ea1952a09a69e31bc3ff7bc1c39ecb4a
[]
no_license
opg7371/MyProject2
e1032d8def9372670ed5a98c7eeb132fa14b30e4
1469791ef64f5b8c506356d286398c89e83df743
refs/heads/master
2021-01-12T17:17:03.220680
2016-10-20T12:54:01
2016-10-20T12:54:01
71,538,480
0
0
null
2016-10-21T06:57:03
2016-10-21T06:57:03
null
UTF-8
Java
false
false
1,529
java
package org.shpstartup.android.yocount; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class StartActivity extends AppCompatActivity { SharedPreferences pref; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(org.shpstartup.android.yocount.R.layout.activity_start); // setContentView(R.layout.activity_setting); // Declare a new thread to do a preference check // Initialize SharedPreferences pref = getSharedPreferences("StartingScreen", MODE_PRIVATE); // Create a new boolean and preference and set it to true boolean isFirstStart = pref.getBoolean("firstStart", true); // If the activity has never started before... if (isFirstStart) { // Launch app intro Intent i = new Intent(StartActivity.this, WelcomeActivity.class); startActivity(i); finish(); // Make a new preferences editor SharedPreferences.Editor e = pref.edit(); // Edit preference to make it false because we don't want this to run again e.putBoolean("firstStart", false); // Apply changes e.commit(); }else{ Intent i = new Intent(StartActivity.this, MainActivity.class); startActivity(i); finish(); } } }
[ "harshgupta.04@gmail.com" ]
harshgupta.04@gmail.com
a00da7916adbcf982946121eb0a1fb124bbfa926
db38e5b6c39f144a0a363fc61a0ba8be04157c8c
/src/main/java/org/codelogger/utils/exceptions/HttpException.java
5216b08cde24d80dea0379b6b4ffae04dcaa4b5e
[ "Apache-2.0" ]
permissive
defei/codelogger-utils
40d0dfff85e7c6e696626058fad672aad9aae669
d906f5d217b783c7ae3e53442cd6fb87b20ecc0a
refs/heads/master
2020-06-04T00:34:23.090985
2016-08-31T15:58:25
2016-08-31T15:58:25
26,074,164
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package org.codelogger.utils.exceptions; public class HttpException extends RuntimeException { private static final long serialVersionUID = 8368845127235795357L; public HttpException(final String message) { super(message); } public HttpException(final Throwable cause) { super(cause); } public HttpException(final String message, final Throwable cause) { super(message, cause); } }
[ "deng.defei@integrasco.no" ]
deng.defei@integrasco.no
b30fa86ef23bc613fb6e294e235c4be33d986533
65645e3548abe00e8d238db8a6f0f4441a39207d
/src/main/java/code/interviews/singleton/SingletonLazyVolatile.java
cbb956a42878b7d2c520c555617c5fd97fef141a
[]
no_license
haroldcoding/code-interviews
1d941a0bf3a0966bc3d5575ec2e5f4fa944efcda
6def70e0db85008ad3293abe3c3a2a39f642ecf6
refs/heads/master
2020-12-02T16:21:09.735066
2017-08-09T11:33:05
2017-08-09T11:33:05
96,539,233
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package code.interviews.singleton; /** * 单例模式,懒汉式,利用关键字 volatile 解决双重检查锁线程不安全. * * @author haroldcoding * @create 2017/07/08/10:12 */ public class SingletonLazyVolatile { private static volatile SingletonLazyVolatile instance = null; private SingletonLazyVolatile() { } public static SingletonLazyVolatile getInstance() { if (null == instance) { synchronized (SingletonLazyVolatile.class) { if (null == instance) { instance = new SingletonLazyVolatile(); } } } return instance; } /** * 解决反序列化时获得新实例的问题. */ private Object readResolve() { return instance; } }
[ "contactiharold@gmail.com" ]
contactiharold@gmail.com
6b4c62782357a2e0034436190d4b5ec6b356de02
17a3c3e845bfe1d1bb8585c18e5f4687d0e534da
/meiqia-service/room-service/src/main/java/org/cl/meiqia/mapper/ContentMapper.java
1ccf9b7703ff1afa5407677bce58ac63675a21c8
[]
no_license
chenlei582748/meiqia
6906f264e1f5cb2fd3707d8b59bfdd95bdac70de
514efbb25eda3c75ab02ad61f5047d403b32d20e
refs/heads/master
2023-01-24T17:46:42.844422
2020-12-11T15:02:47
2020-12-11T15:02:47
320,603,737
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package org.cl.meiqia.mapper; import org.cl.meiqia.entity.Content; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * <p> * Mapper 接口 * </p> * * @author yiyu * @since 2020-12-09 */ @Mapper public interface ContentMapper extends BaseMapper<Content> { }
[ "1580690002@qq.com" ]
1580690002@qq.com
419a756ae3c531e0d68d4e22ce7261b342aac25f
6d5e181e5aa9dc2bd79e56c52dce8681f7a8bb5a
/app/src/main/java/com/developer/phimtatnhanh/setuptouch/gridviewstarapp/AppItem.java
bcab60cab46b3e796a6daa03c49437f3a400f1ec
[]
no_license
vuabocphet/iOS14-2020
25c768a6d5664f5bd0160896a9de054cf60e8821
47b5178513d9d2f936da33a19ef45a582509e43f
refs/heads/master
2023-01-04T13:13:20.915195
2020-11-04T13:33:57
2020-11-04T13:33:57
299,713,137
1
0
null
null
null
null
UTF-8
Java
false
false
851
java
package com.developer.phimtatnhanh.setuptouch.gridviewstarapp; import android.content.pm.ApplicationInfo; public class AppItem { public String name = ""; public String packname = ""; public ApplicationInfo applicationInfo = null; public TypeStar typeStar; public AppItem() { } public static AppItem init() { return new AppItem(); } public AppItem setName(String name) { this.name = name; return this; } public AppItem setPackname(String packname) { this.packname = packname; return this; } public AppItem setApplicationInfo(ApplicationInfo applicationInfo) { this.applicationInfo = applicationInfo; return this; } public AppItem setTypeStar(TypeStar typeStar) { this.typeStar = typeStar; return this; } }
[ "vuabocphet98@gmail.com" ]
vuabocphet98@gmail.com
379db29c99c526e8a8d7aabd85a40a209bb13535
1041eb85331a09e2ca6b19b293c235aaa90d0d47
/app/src/androidTest/java/com/example/barryallen/minted/ExampleInstrumentedTest.java
35c709d53c1e300040248d244432adc9ad74f432
[]
no_license
IslamSaeed90/Minted
d14cb8bf1623eff8a2496d6cfc1ca4c9deb3f23c
ac8e6007f88846308fcea0229a8bc2d9bbb5416f
refs/heads/master
2020-04-10T05:27:13.402010
2018-12-07T13:33:32
2018-12-07T13:33:32
160,827,854
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package com.example.barryallen.minted; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.barryallen.minted", appContext.getPackageName()); } }
[ "engeslam9470@gmail.com" ]
engeslam9470@gmail.com
55ed33413922b1f508d26236633f628491329613
9ccb8daad44996d14446d37d76f66cd5c251f99f
/zqzd/platform-zuoduan/src/main/java/com/platform/entity/ZdOpinionEntity.java
f3608958a1e6e7bb3d7bfad1666bf544efbf35fa
[ "Apache-2.0" ]
permissive
ypzer0/workSpace
8205689f6f50c62abb01cb79e58f0bf0be85f233
0a4dddc48e7e6fc94b085679ceee048860e9ec1b
refs/heads/master
2023-01-05T13:06:45.427109
2019-06-14T16:33:49
2019-06-14T16:33:49
186,972,634
1
0
null
2022-12-16T11:34:31
2019-05-16T07:12:49
TSQL
UTF-8
Java
false
false
2,819
java
package com.platform.entity; import java.io.Serializable; import java.util.Date; /** * 实体 * 表名 zd_opinion * * @author zy * @email zgyxszyd@163.com * @date 2019-05-30 13:13:21 */ public class ZdOpinionEntity implements Serializable { private static final long serialVersionUID = 1L; // private Integer id; //用户ID private Integer userId; //意见 private String opinion; //添加时间 private Date addTime; //是否删除 0-未删除,1-已删除 private Integer isDelete; //用户昵称 private String nickname; //用户名 private String username; //性别 private Integer gender; //年龄 private Integer age; //电话 private String mobile; @Override public String toString() { return "ZdOpinionEntity [id=" + id + ", userId=" + userId + ", opinion=" + opinion + ", addTime=" + addTime + ", isDelete=" + isDelete + ", nickname=" + nickname + ", username=" + username + ", gender=" + gender + ", age=" + age + ", mobile=" + mobile + "]"; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Integer getGender() { return gender; } public void setGender(Integer gender) { this.gender = gender; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } /** * 设置: */ public void setId(Integer id) { this.id = id; } /** * 获取: */ public Integer getId() { return id; } /** * 设置:用户ID */ public void setUserId(Integer userId) { this.userId = userId; } /** * 获取:用户ID */ public Integer getUserId() { return userId; } /** * 设置:意见 */ public void setOpinion(String opinion) { this.opinion = opinion; } /** * 获取:意见 */ public String getOpinion() { return opinion; } /** * 设置:添加时间 */ public void setAddTime(Date addTime) { this.addTime = addTime; } /** * 获取:添加时间 */ public Date getAddTime() { return addTime; } /** * 设置:是否删除 0-未删除,1-已删除 */ public void setIsDelete(Integer isDelete) { this.isDelete = isDelete; } /** * 获取:是否删除 0-未删除,1-已删除 */ public Integer getIsDelete() { return isDelete; } }
[ "1635324525@qq.com" ]
1635324525@qq.com
b52b20f07d01be16b3e9aae5fe3ce9be441e8abe
1baaa53016ac06a291d6ac9c7a4c6e4d4a87c51c
/zb-wechat/zb-wechat-rpc-api/src/main/java/pers/zb/wechat/rpc/api/wxapi/coupon/manage/model/BaseInfo.java
6ad1b7c86f49582425a2e4d73e64d15d619ad221
[]
no_license
tapate/-
7a4e0354a1c56afcb5d6f0c9f23059277e24e54a
e9e9d99911d8134794f3d55850a1e1000629389f
refs/heads/master
2020-04-23T13:31:31.807404
2017-08-11T07:39:54
2017-08-11T07:39:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,988
java
package pers.zb.wechat.rpc.api.wxapi.coupon.manage.model; import java.util.List; /** * 基本的卡券数据. */ public class BaseInfo { // card_id private String id; // 卡券的商户logo private String logo_url; // code 码展示类型 请参考常量类 CardConsts.CodeType private String code_type; // 商户名字 private String brand_name; // 券名 private String title; // 券颜色。色彩规范标注值对应的色值。如#3373bb private String color; // 使用提醒。(一句话描述,展示在首页) private String notice; // 客服电话 private String service_phone; // 使用说明。长文本描述,可以分行。 private String description; // 每人使用次数限制。 private Integer use_limit; // 每人最大领取次数。 private Integer get_limit; // 是否自定义code 码。 private String use_custom_code; // 是否指定用户领取。 private String bind_openid; // 领取卡券原生页面是否可分享,填写 true 或false,true 代表可分享。默认可分享。 private boolean can_share; // 卡券是否可转赠,填写true 或false,true 代表可转赠。默认可转赠。 private boolean can_give_friend; // 门店位置ID。 private List<Integer> location_id_list; // update-begin----author:scott-----date:20150825---for:礼券获取详细信息报错处理----- private List<String> js_oauth_uin_list; public List<String> getJs_oauth_uin_list() { return js_oauth_uin_list; } public void setJs_oauth_uin_list(List<String> js_oauth_uin_list) { this.js_oauth_uin_list = js_oauth_uin_list; } // update-end----author:scott-----date:20150825---for:礼券获取详细信息报错处理----- // 使用日期,有效期的信息。 private DateInfo date_info; // 商品信息。 private Sku sku; // 商户自定义cell 名称,与custom_url 字段共同使用,目前支持类型参考 常量类CardConsts.UrlNameType。 private String url_name_type; // 商户自定义cell 跳转外链的地址链 接,跳转页面内容需与自定义cell 名称保持一致。 private String custom_url; // 第三方来源名,例如同程旅游、格瓦拉。 private String source; // 卡券状态,请参考常量类 CardConsts.Status private String status; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLogo_url() { return logo_url; } public void setLogo_url(String logo_url) { this.logo_url = logo_url; } public String getCode_type() { return code_type; } public void setCode_type(String code_type) { this.code_type = code_type; } public String getBrand_name() { return brand_name; } public void setBrand_name(String brand_name) { this.brand_name = brand_name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getNotice() { return notice; } public void setNotice(String notice) { this.notice = notice; } public String getService_phone() { return service_phone; } public void setService_phone(String service_phone) { this.service_phone = service_phone; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getUse_limit() { return use_limit; } public void setUse_limit(Integer use_limit) { this.use_limit = use_limit; } public Integer getGet_limit() { return get_limit; } public void setGet_limit(Integer get_limit) { this.get_limit = get_limit; } public String getUse_custom_code() { return use_custom_code; } public void setUse_custom_code(String use_custom_code) { this.use_custom_code = use_custom_code; } public String getBind_openid() { return bind_openid; } public void setBind_openid(String bind_openid) { this.bind_openid = bind_openid; } public boolean isCan_share() { return can_share; } public void setCan_share(boolean can_share) { this.can_share = can_share; } public boolean isCan_give_friend() { return can_give_friend; } public void setCan_give_friend(boolean can_give_friend) { this.can_give_friend = can_give_friend; } public List<Integer> getLocation_id_list() { return location_id_list; } public void setLocation_id_list(List<Integer> location_id_list) { this.location_id_list = location_id_list; } public DateInfo getDate_info() { return date_info; } public void setDate_info(DateInfo date_info) { this.date_info = date_info; } public Sku getSku() { return sku; } public void setSku(Sku sku) { this.sku = sku; } public String getUrl_name_type() { return url_name_type; } public void setUrl_name_type(String url_name_type) { this.url_name_type = url_name_type; } public String getCustom_url() { return custom_url; } public void setCustom_url(String custom_url) { this.custom_url = custom_url; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
[ "842324724@qq.com" ]
842324724@qq.com
2097f8c75fd5e5f3731eba2d875025067ca383f6
07cdf2e625898185f704ca350881c75f078ffda8
/UniversityProtal/src/main/java/com/mycompany/universityprotal/model/Professors.java
45f09a376f67aca6a8b7e392c73ffb5968509f00
[ "MIT" ]
permissive
sharifulislamhridoy/AngularUniversityProtal
3bf61224cad09b18887394a3facbed4cc4a28d53
ff5db3968d4956eac408934110b2614fcc1f81cc
refs/heads/master
2022-11-30T15:37:29.899530
2020-08-12T15:21:53
2020-08-12T15:21:53
286,682,516
0
0
null
null
null
null
UTF-8
Java
false
false
3,462
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mycompany.universityprotal.model; import com.fasterxml.jackson.annotation.JsonFormat; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; /** * * @author shari */ @Entity public class Professors { @Id private int id; private String name; private String email; @JsonFormat(pattern = "yyyy-MM-dd") private Date joinDate; private String password; private String designation; private String department; private String gender; private String phone; @JsonFormat(pattern = "yyyy-MM-dd") private Date birthDate; private String address; private String imgUrl; private String education; public Professors() { } public Professors(int id, String name, String email, Date joinDate, String password, String designation, String department, String gender, String phone, Date birthDate, String address, String imgUrl, String education) { this.id = id; this.name = name; this.email = email; this.joinDate = joinDate; this.password = password; this.designation = designation; this.department = department; this.gender = gender; this.phone = phone; this.birthDate = birthDate; this.address = address; this.imgUrl = imgUrl; this.education = education; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Date getJoinDate() { return joinDate; } public void setJoinDate(Date joinDate) { this.joinDate = joinDate; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getDesignation() { return designation; } public void setDesignation(String designation) { this.designation = designation; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public Date getBirthDate() { return birthDate; } public void setBirthDate(Date birthDate) { this.birthDate = birthDate; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getImgUrl() { return imgUrl; } public void setImgUrl(String imgUrl) { this.imgUrl = imgUrl; } public String getEducation() { return education; } public void setEducation(String education) { this.education = education; } }
[ "58853961+sharifulislamhridoy@users.noreply.github.com" ]
58853961+sharifulislamhridoy@users.noreply.github.com
d521a9c0348c8c5b23498cfccd0b8337681265c7
2720a31de6ab2f5564a7070075ac6d45abee0730
/app/src/main/java/com/example/myapplication/MainActivity.java
b06f0e66a627a579067d23b6ace317fe04b735e9
[]
no_license
astroRobert/2acts
b01209c438d3ba6b20ff5bfc87bbb808fe57bf6a
7668720dc4bf30d46d7a36e82d0213cb3d5eda57
refs/heads/master
2020-05-07T21:10:38.881721
2019-04-11T22:34:57
2019-04-11T22:34:57
180,894,033
0
0
null
null
null
null
UTF-8
Java
false
false
1,591
java
package com.example.myapplication; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { int value1 = 20; int value2 = 12; private Button button2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView num1 = findViewById(R.id.num1); num1.setText(""+ value1); TextView num2 = findViewById(R.id.num2); num2.setText(""+value2); button2 = (Button) findViewById(R.id.button2); button2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { openActivity2(); } }); } public void openActivity2(){ Intent intent = new Intent(this, Activity2.class); startActivity(intent); } public void onSubmitClick (View view){ TextView Answer = findViewById(R.id.Answer); EditText Attempt = findViewById(R.id.Attempt); int userAnswer = Integer.parseInt(Attempt.getText().toString()); if (userAnswer == value1+value2){ Answer.setText("Correct"); } else{ Answer.setText("Wrong, correct answer is: "+ (value1+value2)); } } }
[ "emmanuel.owusu001@bluecrest.edu.gh" ]
emmanuel.owusu001@bluecrest.edu.gh
46a6cdc94d5220d00b28a1a2686123617986331a
0da084eebf004ab2c656b6216a87d6f9f830bfc3
/huahua_parent1608v/huahua_friend/src/main/java/com/huahua/friend/ApplicationConfig.java
19d59c97d4f3a33492ca95274678ad53453d2fda
[]
no_license
ccdalun/huahuacommunity
9d9ffe28ae85736d2bcba0a3cf37ef1ff7bfa307
9ade3f184a73c5b725949438506e2786fa8ef1c2
refs/heads/master
2020-05-20T22:57:48.209120
2019-05-10T02:27:24
2019-05-10T02:27:40
185,792,352
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
/** * Date: 2019/4/26 16:49 * <author> * 陈柏 */ package com.huahua.friend; import com.huahua.friend.fifter.JwtFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; @Configuration public class ApplicationConfig extends WebMvcConfigurationSupport { @Autowired private JwtFilter jwtFilter; @Override public void addInterceptors(InterceptorRegistry registry){ registry.addInterceptor(jwtFilter).addPathPatterns("/**").excludePathPatterns("/**/login"); } }
[ "1103525456@qq.com" ]
1103525456@qq.com
041e4b0e998e61363ebaafed4e94c890b354793c
eb5865718618d8e02dbed79113dd4d0ce0b62354
/app/src/main/java/com/evenless/tersicore/activities/SingleEmailActivity.java
fc68ca4106a58e00f8433589fccd2b2ac5205a82
[]
no_license
NoMore201/tersicore-client
64210cfc3b8c559e50852d4a7e5623d9c09cc7f8
550562de918fd6b86ab6c90116b855f211c62570
refs/heads/master
2021-09-05T10:23:44.257910
2018-01-26T11:04:50
2018-01-26T11:04:50
110,439,980
0
0
null
null
null
null
UTF-8
Java
false
false
4,907
java
package com.evenless.tersicore.activities; import android.content.Intent; import android.graphics.BitmapFactory; import android.os.PersistableBundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import com.evenless.tersicore.DataBackend; import com.evenless.tersicore.MyUsersListAdapter; import com.evenless.tersicore.PreferencesHandler; import com.evenless.tersicore.R; import com.evenless.tersicore.TaskHandler; import com.evenless.tersicore.model.Album; import com.evenless.tersicore.model.EmailType; import com.evenless.tersicore.model.Track; import com.evenless.tersicore.model.TrackSuggestion; import com.evenless.tersicore.model.User; import java.net.MalformedURLException; public class SingleEmailActivity extends AppCompatActivity { EmailType mail; Album suggestion; Track suggestionTrack; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_single_email); String mailid = getIntent().getStringExtra("EXTRA_EMAIL_ID"); mail = DataBackend.getMessage(mailid); if(mail==null) finish(); else { Toolbar toolbar = findViewById(R.id.toolbar2); toolbar.setTitle("View Email"); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); ImageView asd = findViewById(R.id.myimg); TextView text1 = findViewById(R.id.myname); TextView text2 = findViewById(R.id.subject); TextView text3 = findViewById(R.id.msg); final User sender = SearchActivity.getUser(mail.sender); byte [] ava = sender.getAvatar(); if(ava!=null && ava.length!=0) asd.setImageBitmap( MyUsersListAdapter.getRoundedShape(BitmapFactory.decodeByteArray(ava, 0, ava.length))); text1.setText(mail.sender); text2.setText(mail.object); text3.setText(mail.msg); ImageButton rep = findViewById(R.id.reply); ImageButton play = findViewById(R.id.playsong); play.setVisibility(View.GONE); rep.setOnClickListener(v -> { Intent asd1 = new Intent(v.getContext(), SendMail.class); asd1.putExtra("EXTRA_CONTACT_NAME", sender.id); startActivity(asd1); }); TextView sg = findViewById(R.id.songsend); if(mail.songuuid!=null){ suggestionTrack = DataBackend.getTrack(mail.songuuid); if(suggestionTrack!=null){ sg.setText("Track Suggested: " + suggestionTrack.toString()); play.setVisibility(View.VISIBLE); play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent pp = new Intent(v.getContext(), MainActivity.class); pp.putExtra("EXTRA_UUID", suggestionTrack.uuid); startActivity(pp); } }); } else { sg.setText("Suggested Track isn't in your database"); } } else if (mail.album!=null){ sg.setText("Album Suggested: " + mail.artist + " - " + mail.album); suggestion=new Album(mail.album, mail.artist); play.setVisibility(View.VISIBLE); play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent asd = new Intent(v.getContext(), SingleAlbumActivity.class); asd.putExtra("EXTRA_ARTIST", mail.artist); asd.putExtra("EXTRA_ALBUM", mail.album); v.getContext().startActivity(asd); } }); } } } @Override protected void onResume() { super.onResume(); if(!mail.isRead) { DataBackend.setMessageAsRead(mail); EmailType re = new EmailType(); re.id=mail.id; re.isRead=true; for (String ss : PreferencesHandler.getServer(this)) try { TaskHandler.sendMessage(ss, null, re); } catch (MalformedURLException e) { e.printStackTrace(); } } } }
[ "giusep502@gmail.com" ]
giusep502@gmail.com
f18e44162e804748ad334315f5852342383ccc56
3bcb57810c69405d4ea653e1095ccbecf4aea16d
/ConcecionarioAPO2/ConcecionarioCarros/src/mundo/Concecionario.java
794b711a60ae8c6f4f06ff2d2eac41231566639b
[]
no_license
dylan9538/ProjectsAPOIcesi
3eabe623701e056b8045a133467c3e852b18927b
194449f29525d3515b541974f0bbfde6f39b7311
refs/heads/master
2021-01-19T23:00:55.447010
2017-04-20T21:53:36
2017-04-20T21:53:36
88,909,302
0
0
null
null
null
null
ISO-8859-1
Java
false
false
17,605
java
package mundo; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.Random; import javax.swing.JOptionPane; public class Concecionario { public final static String UNO ="1"; public final static String DOS ="2"; public final static String TRES ="3"; public final static String CUATRO ="4"; private ArrayList <Cliente> clientes; private ArrayList <Empleado> empleados; private Sucursal primera; private Sucursal seleccionada; private ArrayList <Accesorios> accesorios; private ArrayList <ICarro> carrosAtributos; private ICarro primeroVender; private String rutaArchivo; public Concecionario(String ruta ) { rutaArchivo = ruta; clientes = new ArrayList<>(); empleados = new ArrayList<>(); accesorios = new ArrayList<>(); inicializarSucursales(); carrosAtributos = new ArrayList<>(); seleccionada = null; primeroVender = null; } private void inicializarSucursales( ) { primera = new Sucursal(UNO); primera.cambiarSiguiente(new Sucursal(DOS)); primera.darSiguiente().cambiarSiguiente(new Sucursal(TRES)); primera.darSiguiente().darSiguiente().cambiarSiguiente(new Sucursal(CUATRO)); } //-------------------------- public boolean registrarCliente(String nombre, String apellido, String numeroId, String direccion, String telefono, String celular, String ciudad, String pais, String correo ) { boolean registro = false; Cliente cliente = new Cliente(nombre, apellido, numeroId, direccion, telefono, celular, ciudad, pais, correo); if(!verificarCedulaPersona(numeroId)) { clientes.add(cliente); registro = true; } return registro; } public boolean registrarEmpleado(String nombre, String apellido, String numeroId, String direccion, String telefono, String celular, String ciudad, String pais, String correo,String numeroCuenta, String tipoContrato, String cargo) { boolean registro = false; Empleado empleado = new Empleado(nombre, apellido, numeroId, direccion, telefono, celular, ciudad, pais, correo, numeroCuenta, tipoContrato, cargo); if(!verificarCedulaPersona(numeroId)) { empleados.add(empleado); registro = true; } return registro; } //---------------------------- private boolean verificarCedulaPersona(String cedula) { boolean esta = false; Iterator iter = clientes.iterator(); while(iter.hasNext()) { Cliente cliente = (Cliente) iter.next(); if(cliente.getNumeroId().equals(cedula)) { esta = true; } } boolean esta1 = false; Iterator iterador = empleados.iterator(); while(iterador.hasNext()) { Empleado e = (Empleado) iterador.next(); if(e.getNumeroId().equals(cedula)) { esta1 = true; } } return (esta||esta1); } public void registrarAccesorio(String nombre,String descripcion, String codigo, String restricciones, int costo){ accesorios.add(new Accesorios(nombre,descripcion, codigo, restricciones, costo)); } public void realizarPedidoTradicional(String tipoCombustion, String tipoTraccion, String color, String transmision , String tipoTapiceria, boolean aireAcondicionado, int cilindraje) { String identificacion = generarCodigo(); int modeloAño = Calendar.YEAR; ICarro b = new CarroTradicional(identificacion, String.valueOf(modeloAño), tipoCombustion, tipoTraccion, color, transmision, tipoTapiceria, aireAcondicionado, cilindraje); carrosAtributos.add(b); ICarro a = new CarroTradicional(identificacion); primera.agregarPedido(a); } public void realizarPedidoLujo(String tipoCombustion, String tipoTraccion, String color, String transmision , String tipoTapiceria, boolean aireAcondicionado, int cilindraje, ArrayList accesorios, String cedulaCliente) { String identificacion = generarCodigo(); int modeloA = Calendar.YEAR; ICarro b = new CarroLujo(identificacion, String.valueOf(modeloA), tipoCombustion, tipoTraccion, color, transmision, tipoTapiceria, aireAcondicionado, cilindraje, accesorios); carrosAtributos.add(b); ICarro a = new CarroLujo(identificacion,cedulaCliente); primera.agregarPedido(a); } private String generarCodigo( ) { return "A" + (carrosAtributos.size()+1); } public boolean promover() { boolean hecho = false; if(seleccionada.darNombre().equals(UNO)) { if(primera.darListaCarros().size()>0) { ICarro carro = primera.darListaCarros().get(0); primera.darListaCarros().remove(0); primera.darSiguiente().agregarPedido(carro); hecho = true; } } else if(seleccionada.darNombre().equals(DOS)){ Sucursal segunda = primera.darSiguiente(); if(segunda.darListaCarros().size()>0) { ICarro carro = segunda.darListaCarros().get(0); if(carro instanceof CarroTradicional) { ICarro atributo = darCarroBuscado(carro.getIdentificacion()); carro.setCilindraje(atributo.getCilindraje()); carro.setAireAcondicionado(atributo.isAireAcondicionado()); carro.setTipoCombustion(atributo.getTipoCombustion()); carro.setTipoTraccion(atributo.getTipoTraccion()); carro.setTransmision(atributo.getTransmision()); segunda.darListaCarros().remove(0); segunda.darSiguiente().agregarPedido(carro); hecho = true; } //-.------------------------------ if(carro instanceof CarroLujo) { ICarro atributo = darCarroBuscado(carro.getIdentificacion()); carro.setCilindraje(atributo.getCilindraje()); carro.setAireAcondicionado(atributo.isAireAcondicionado()); carro.setTipoCombustion(atributo.getTipoCombustion()); carro.setTipoTraccion(atributo.getTipoTraccion()); carro.setTransmision(atributo.getTransmision()); CarroLujo carrito = (CarroLujo) carro; CarroLujo atributo2 = (CarroLujo) atributo; carrito.cambiarAccesorios(atributo2.darAccesorios()); segunda.darListaCarros().remove(0); segunda.darSiguiente().agregarPedido(carro); hecho = true; } } } else if(seleccionada.darNombre().equals(TRES)) { Sucursal tercera = primera.darSiguiente().darSiguiente(); if(tercera.darListaCarros().size()>0) { ICarro carro = tercera.darListaCarros().get(0); if(carro instanceof CarroTradicional) { ICarro atributo = darCarroBuscado(carro.getIdentificacion()); carro.setColor(atributo.getColor()); carro.setTipoTapiceria(atributo.getTipoTapiceria()); tercera.darListaCarros().remove(0); tercera.darSiguiente().agregarPedido(carro); hecho = true; } if(carro instanceof CarroLujo) { ICarro atributo = darCarroBuscado(carro.getIdentificacion()); carro.setColor(atributo.getColor()); carro.setTipoTapiceria(atributo.getTipoTapiceria()); tercera.darListaCarros().remove(0); tercera.darSiguiente().agregarPedido(carro); hecho = true; } } } else { Sucursal cuarta = primera.darSiguiente().darSiguiente().darSiguiente(); if(cuarta.darListaCarros().size()>0){ ICarro carro = cuarta.darListaCarros().get(0); if(carro instanceof CarroLujo){ CarroLujo lujo = (CarroLujo) carro; cuarta.darListaCarros().remove(0); eliminarCarro(carro.getIdentificacion()); Cliente cliente = darClienteBuscado(lujo.darCedula()); cliente.añadirCarro(lujo); hecho = true; } else{ cuarta.darListaCarros().remove(0); eliminarCarro(carro.getIdentificacion()); agregarListaCarrosParaVender(carro); hecho = true; } } } return hecho; } private Cliente darClienteBuscado(String cedula){ boolean encontro = false; Cliente cliente = null; for(int i = 0; i< clientes.size()&&!encontro;i++){ if(clientes.get(i).getNumeroId().equals(cedula)){ cliente = clientes.get(i); encontro = true; } } return cliente; } public void agregarListaCarrosParaVender(ICarro carro){ if(primeroVender == null){ primeroVender = carro; } else { ICarro actual = primeroVender; while(actual.darSiguiente()!= null) { actual = actual.darSiguiente(); } actual.cambiarSiguiente(carro); } } public String darListaCarrosListoVender( ) { String cadena = "Aun no hay carros listos para vender"; if(primeroVender!= null){ cadena = "La lista de carros listos para vender es: " + "\n"; ICarro a = primeroVender; while(a != null){ if(a instanceof CarroTradicional){ cadena += "Carro: " + a.getIdentificacion() + ";" + a.getTipoCombustion() + ";" + a.getCilindraje() + ";" + a.getTipoTraccion() + ";" + a.getTransmision() + ";" + a.isAireAcondicionado() + ";" + a.getColor() + ";" + a.getTipoTapiceria() + "\n"; a = a.darSiguiente(); } } } return cadena; } private void eliminarCarro(String codigo) { boolean encontro = false; int index = 0; for(int i = 0; i< carrosAtributos.size() && !encontro; i++) { if(codigo.equals(carrosAtributos.get(i).getIdentificacion())){ index = i; encontro = true; } } carrosAtributos.remove(index); } private ICarro darCarroBuscado(String codigo) { boolean encontro = false; ICarro buscado = null; for(int i = 0; i< carrosAtributos.size() && !encontro;i++) { if(codigo.equals(carrosAtributos.get(i).getIdentificacion())) { buscado = carrosAtributos.get(i); encontro = true; } } return buscado; } public String verListaCarros(){ String cadena = "No Hay Lista de carros"; if(seleccionada.darListaCarros().size()>0){ cadena = "La lista de carros es: " + "\n"; } for(int i=0; i< seleccionada.darListaCarros().size(); i++){ ICarro a = seleccionada.darListaCarros().get(i); if(seleccionada == primera.darSiguiente().darSiguiente()){ if(a instanceof CarroLujo){ CarroLujo b =(CarroLujo) a; String accesorios = ""; for(int j = 0; j< b.darAccesorios().size(); j++) { if(j>=1){ if(b.darAccesorios().get(j) instanceof Accesorios) { Accesorios c = (Accesorios) b.darAccesorios().get(j); accesorios += "-" + c.getNombre(); } else{ String d = (String) b.darAccesorios().get(j); accesorios += "-" + d; } } else{ if(b.darAccesorios().get(j) instanceof Accesorios) { Accesorios c = (Accesorios) b.darAccesorios().get(j); accesorios += c.getNombre(); } else{ String d = (String) b.darAccesorios().get(j); accesorios += d; } } } cadena += "Carro: " + a.getIdentificacion() + ";" + a.getTipoCombustion() + ";" + a.getCilindraje() + ";" + a.getTipoTraccion() + ";" + a.getTransmision() + ";" + a.isAireAcondicionado() + ";" + accesorios + "\n"; } else{ cadena += "Carro: " + a.getIdentificacion() + ";" + a.getTipoCombustion() + ";" + a.getCilindraje() + ";" + a.getTipoTraccion() + ";" + a.getTransmision() + ";" + a.isAireAcondicionado() + "\n"; } } else if(seleccionada == primera.darSiguiente().darSiguiente().darSiguiente()){ if(a instanceof CarroLujo){ CarroLujo b =(CarroLujo) a; String accesorios = ""; for(int j = 0; j< b.darAccesorios().size(); j++) { if(j>=1){ if(b.darAccesorios().get(j) instanceof Accesorios) { Accesorios c = (Accesorios) b.darAccesorios().get(j); accesorios += "-" + c.getNombre(); } else{ String d = (String) b.darAccesorios().get(j); accesorios += "-" + d; } } else{ if(b.darAccesorios().get(j) instanceof Accesorios) { Accesorios c = (Accesorios) b.darAccesorios().get(j); accesorios += c.getNombre(); } else{ String d = (String) b.darAccesorios().get(j); accesorios += d; } } } cadena += "Carro: " + a.getIdentificacion() + ";" + a.getTipoCombustion() + ";" + a.getCilindraje() + ";" + a.getTipoTraccion() + ";" + a.getTransmision() + ";" + a.isAireAcondicionado() + ";" + accesorios + ";" + a.getColor() + ";" + a.getTipoTapiceria() + "\n";; } else{ cadena += "Carro: " + a.getIdentificacion() + ";" + a.getTipoCombustion() + ";" + a.getCilindraje() + ";" + a.getTipoTraccion() + ";" + a.getTransmision() + ";" + a.isAireAcondicionado() + ";" + a.getColor() + ";" + a.getTipoTapiceria() + "\n"; } } else cadena += "Carro: " + a.getIdentificacion() + "\n"; } return cadena; } public String generarResultados( ) { String cadena = "No Hay Lista de carros"; if(seleccionada.darListaCarros().size()>0){ cadena = "Los resultados de la estacion son: " + "\n"; } for(int i=0; i< seleccionada.darListaCarros().size(); i++){ ICarro a = seleccionada.darListaCarros().get(i); if(seleccionada == primera) { cadena += "Se ha generado el esqueleto del carro: " + a.getIdentificacion() +"/n"; } else if(seleccionada == primera.darSiguiente()) { ICarro atributo = darCarroBuscado(a.getIdentificacion()); if(a instanceof CarroLujo){ CarroLujo b = (CarroLujo) atributo; String accesorios = ""; for(int j = 0; j< b.darAccesorios().size(); j++){ if(j>=1){ if(b.darAccesorios().get(j) instanceof Accesorios) { Accesorios c = (Accesorios) b.darAccesorios().get(j); accesorios += "-" + c.getNombre(); } else{ String d = (String) b.darAccesorios().get(j); accesorios += "-" + d; } } } cadena += "se ha proseguido a construir la carroceria interna del carro " + a.getIdentificacion() + " con los accesorios: " + accesorios + " pedidos por el Cliente"+"/n"; } else cadena += "El esqueleto ha llegado y se ha empezado a proseguir con los elementos de la carroceria interna pedida por produccion, Carro: " + a.getIdentificacion()+"/n"; } else if(seleccionada == primera.darSiguiente().darSiguiente()){ ICarro b = darCarroBuscado(a.getIdentificacion()); cadena += "El carro: " + a.getIdentificacion() + "solo falta ser pintado de " + b.getColor() + " Y terminar su tapiceria de " + b.getTipoTapiceria()+"/n"; } else{ if(a instanceof CarroLujo){ CarroLujo b = (CarroLujo) a; cadena += "El carro: " + a.getIdentificacion() + " Cumple con todos los requisitos y puede ser entregado al cliente con cedula " + b.darCedula()+"/n"; } else cadena += "El carro: " + a.getIdentificacion() + "Cumple con todos los requisitos y puede ser añadido a la lista de carros para vender"+"/n"; } } return cadena; } public void guardarResultados( ) { //TODO } public void cambiarSeleccionada(int numero ) { if(numero == 0) seleccionada = primera; else if(numero == 1) seleccionada = primera.darSiguiente(); else if(numero == 2) seleccionada = primera.darSiguiente().darSiguiente(); else seleccionada = primera.darSiguiente().darSiguiente().darSiguiente(); } //serialización //--------------------------------------------------------------------------------------- public void cargarInfo(){ File f = new File(rutaArchivo); if (f.exists()){ try { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); clientes = (ArrayList<Cliente>) ois.readObject(); empleados = (ArrayList<Empleado>) ois.readObject(); accesorios = (ArrayList<Accesorios>)ois.readObject(); carrosAtributos = (ArrayList<ICarro>)ois.readObject(); ois.close(); } catch (Exception e) { JOptionPane.showMessageDialog(null,this,e.getMessage(), 0); } } else{ clientes = new ArrayList<Cliente>(); empleados = new ArrayList<Empleado>(); accesorios = new ArrayList<Accesorios>(); carrosAtributos = new ArrayList<ICarro>(); } verificarInvariantes(); } public void salvarInfo () throws Exception{ try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(rutaArchivo)); oos.writeObject(clientes); oos.writeObject(empleados); oos.writeObject(accesorios); oos.writeObject(carrosAtributos); oos.close(); } catch (IOException e) { throw new Exception("No se pudo salvar el archivo" + e.getMessage()); } verificarInvariantes(); } //--------------------------------------------------------- public Sucursal darSeleccionada() { return seleccionada; } public Sucursal darPrimera() { return primera; } public ArrayList<Cliente> darClientes() { return clientes; } public ArrayList<Accesorios> darAccesorios() { return accesorios; } public void verificarInvariantes (){ assert clientes != null : ""; assert empleados != null: ""; assert accesorios != null : ""; assert carrosAtributos != null : ""; } }
[ "diland.t95@hotmail.com" ]
diland.t95@hotmail.com
8a2d2845d62d925b9b1c23961479e4bb2a2b2b6f
525d1ddee8e717e36d6406f0167fd8be250c9444
/app/src/main/java/com/example/user/finalprojectapp1/Model/UserModel.java
a73d45312f842418142fce70f1bdba03622033fa
[]
no_license
tuanct1997/Android_App_1
add83b97be76da085ab93a80286ffff323ec9fa5
de574f62c330a08937568aed5e6d232f41b85562
refs/heads/master
2020-03-30T20:38:03.808938
2018-10-04T16:26:37
2018-10-04T16:26:37
151,596,630
0
0
null
null
null
null
UTF-8
Java
false
false
1,579
java
package com.example.user.finalprojectapp1.Model; public class UserModel { private String username; private String password; private String email; private String phone_number; private String created_at; private String update_at; private HomeModel HomeModel; public UserModel() { } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhone_number() { return phone_number; } public void setPhone_number(String phone_number) { this.phone_number = phone_number; } public String getCreated_at() { return created_at; } public void setCreated_at(String created_at) { this.created_at = created_at; } public String getUpdate_at() { return update_at; } public void setUpdate_at(String update_at) { this.update_at = update_at; } public com.example.user.finalprojectapp1.Model.HomeModel getHomeModel() { return HomeModel; } public void setHomeModel(com.example.user.finalprojectapp1.Model.HomeModel homeModel) { HomeModel = homeModel; } }
[ "leleismine@gmail.com" ]
leleismine@gmail.com
aad2ff162c30caa686730ff828da6e8bf7e6c39b
6419dccf6e806f06902c69561d5def901d9d42e2
/ex2/EmbededSQL.java
c8c35ad1c4f65c46ce260049aa22e1e8dbfcc3e8
[]
no_license
isabella0428/SJTU-SE305
620c7ee31449b2d5145f5a8fdff85622e9482cdd
41e3726db027ae3c4fef7c6ad35fcd24ae51733d
refs/heads/master
2020-12-14T09:32:10.097351
2020-01-18T07:53:34
2020-01-18T07:53:34
234,700,165
1
0
null
null
null
null
UTF-8
Java
false
false
12,174
java
" " Author: Yi Lyu Email: isabella_aus_china@sjtu.edu.cn Date: 2019.12.08 """ import java.sql.*; import java.text.SimpleDateFormat; import java.util.Date; public class trigger { // Connect to database private static Statement stat, stat1; private static ResultSet rs; // For all select query private static ResultSet goodsResultSet; // Specfic for all goods id in cart /*** * Initializes connection and statement */ private trigger() { try { Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/ex2?useSSL=false", "ex2", "ichliebedich11@"); stat = conn.createStatement(); stat1 = conn.createStatement(); } catch (Exception e) { e.printStackTrace(); } } /*** * Execute query sql command */ private static void executeQueryCommand(String sqlCommand) { try { rs = stat.executeQuery(sqlCommand); } catch (Exception e) { e.printStackTrace(); } } /*** * Execute update and insert sql command */ private static void executeCommand(String sqlCommand) { try { stat.execute(sqlCommand); } catch (Exception e) { e.printStackTrace(); } } /*** * Insert User into mydb.User */ private static void insertUser(int UserId, String Name, String pwd, String Sex, String Address) { // Check if user password contains Capital Characters, Small Characters and Digits if (!(pwd.matches(".*[a-z].*") && pwd.matches(".*[A-Z].*") && pwd.matches(".*[0-9].*"))) { System.out.println("Password not valid!"); return; } // Insert user into `User` table String insertUserCommand = String.format("INSERT INTO mydb.User VALUES " + "(%d, \'%s\', \'%s\', \'%s\', \'%s\');", UserId, Name, pwd, Sex, Address); executeCommand(insertUserCommand); // Create a shopping cart to each user String insertCartCommand = String.format("INSERT INTO `mydb`.`Cart` VALUES " + "(%d, %d, %f);", UserId, UserId, 0f); executeCommand(insertCartCommand); } /*** * Insert Goods */ public static void insertGoods(int GoodsId, String GoodsName, float GoodsPrice, int GoodsStock) { // Make sure goods price is not negative if (GoodsPrice < 0) { System.out.println("Goods Price should be a non-negative real number"); return; } // Make sure goods stock is not negative if (GoodsStock < 0) { System.out.println("Goods Stock should be a non-negative integer"); return; } String insertGoods = String.format("INSERT INTO `mydb`.`Goods` VALUES " + "(%d, \'%s\', %f, %d)", GoodsId, GoodsName, GoodsPrice, GoodsStock); executeCommand(insertGoods); } /*** * Insert Cart Info */ public static void insertCartInfo(int CartInfoId, int CartId, int GoodsId, int GoodsNum) { float GoodsPrice, CartCost; GoodsPrice = 1; CartCost = 0; // Make sure that Goods Num is not negative if (GoodsNum < 0) { System.out.println("Goods Num should be a non-negative integer"); return; } // Make sure that Goods should exist in mydb.Goods String findGoods = String.format( "SELECT `mydb`.`Goods`.Goods_Price " + "from `mydb`.Goods where Goods.Goods_Id = %d;", GoodsId); executeQueryCommand(findGoods); try { if (!rs.next()) { System.out.println("Goods doesn't exist"); return; } // Read Goods Price GoodsPrice = rs.getFloat(1); rs.close(); } catch (Exception e) { e.printStackTrace(); } // Set time to now SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date nowDate = new Date(); String DateString = sdf.format(nowDate); // Insert Cart Info String insertCartInfo = String.format("INSERT INTO `mydb`.`Cart_Info` " + "(Cart_Info_Id, Cart_Id, Goods_Id, Goods_Num, Add_Time, Goods_Price)" + " VALUES(%d, %d, %d, %d, \'%s\', %f)", CartInfoId, CartId, GoodsId, GoodsNum, DateString, GoodsPrice); executeCommand(insertCartInfo); // Select cart amount String findOldCartAmount = String.format("SELECT `mydb`.`Cart`.Cart_Cost " + "from `mydb`.`Cart` where `mydb`.`Cart`.Cart_Id = %d;", CartId); executeQueryCommand(findOldCartAmount); // Read Cart Amount try { rs.next(); // Read Goods Price CartCost = rs.getFloat(1); } catch (Exception e) { e.printStackTrace(); } // new_cart_cost = old_cart_cost + goods_num * goods_price CartCost += GoodsNum * GoodsPrice; // Update cart amount String updateCart = String.format("UPDATE `mydb`.`Cart` SET Cart_Cost = %f " + "WHERE `mydb`.`Cart`.Cart_Id = %d;", CartCost, CartId); executeCommand(updateCart); } /*** * Insert Bill */ public static void insertBill(int BillId, int CartId, int UserId) { float bill_cost, goods_price = 0; int goods_stock = -1, goods_num = 0, goods_id; // Set time to now SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date nowDate = new Date(); String bill_time = sdf.format(nowDate); // Initializes bill cost to 0 bill_cost = 0; String findGoodsList = String.format("SELECT `mydb`.`Cart_Info`.Goods_Id FROM `mydb`.`Cart_Info` " + "WHERE `mydb`.`Cart_Info`.`Cart_Id` = %d", CartId); // Get all goods id in given cart // Here we cannot use the general rs since we need to read it during intervals and it may read other results // So it will be closed try { goodsResultSet = stat1.executeQuery(findGoodsList); } catch (Exception e) { e.printStackTrace(); } // Iterate each goods in Cart try { while(goodsResultSet.next()) { goods_id = goodsResultSet.getInt("Goods_Id"); // Read goods price String getGoodsPrice = String.format("SELECT `mydb`.`Goods`.`Goods_Price` from `mydb`.`Goods` " + "where `mydb`.`Goods`.Goods_Id = %d;", goods_id); executeQueryCommand(getGoodsPrice); // Read goods stock try { rs.next(); // Read goods stock goods_price = rs.getFloat("Goods_Price"); } catch (Exception e) { e.printStackTrace(); } // Check the number in stock String getGoodsStock = String.format("SELECT `mydb`.`Goods`.`Goods_Stock` from `mydb`.`Goods` " + "where `mydb`.`Goods`.Goods_Id = %d;", goods_id); executeQueryCommand(getGoodsStock); // Read goods stock try { rs.next(); // Read goods stock goods_stock = rs.getInt("Goods_Stock"); } catch (Exception e) { e.printStackTrace(); } // Check the number of goods required String getGoodsNum = String.format("SELECT `mydb`.`Cart_Info`.Goods_Num " + "from `mydb`.`Cart_Info` where `mydb`.`Cart_Info`.Goods_Id = %d and " + "`mydb`.`Cart_Info`.Cart_Id = %d", goods_id, CartId); executeQueryCommand(getGoodsNum); // Read goods num try { rs.next(); goods_num = rs.getInt("Goods_Num"); } catch (Exception e) { e.printStackTrace(); } // Skip the goods if we don't have enough goods in stock if (goods_num > goods_stock) continue; // Increase bill amount bill_cost += goods_price * goods_num; // Insert into Bill String insertBill = String.format("INSERT INTO `mydb`.`Bill` " + "(Bill_Id, Cart_Id, User_Id, Bill_Amount, Bill_Time)" + " VALUES(%d, %d, %d, %f, \'%s\')",BillId, CartId, UserId, bill_cost, bill_time); executeCommand(insertBill); // Insert Bill Info String insertBillInfo = String.format("INSERT INTO `mydb`.`Bill_Info` " + "(Bill_Id, Goods_Id, Goods_Price, Goods_Num)" + " VALUES(%d, %d, %f, %d);", BillId, goods_id, goods_price, goods_num); executeCommand(insertBillInfo); // Delete corresponding Cart Info String deleteCartInfo = String.format("DELETE FROM `mydb`.Cart_Info" + " WHERE `mydb`.`Cart_Info`.`Goods_Id` = %d " + " and `mydb`.`Cart_Info`.`Cart_Id` = %d;", goods_id, CartId); executeCommand(deleteCartInfo); // Decrease cart amount // Read Current Cart Amount String readCartAmount = String.format("SELECT `mydb`.Cart.Cart_Cost " + "From `mydb`.`Cart` WHERE `mydb`.`Cart`.Cart_Id = %d;", CartId); executeQueryCommand(readCartAmount); //Read current cart cost float current_cart_cost = 0.1f; try { rs.next(); current_cart_cost= rs.getFloat("Cart_Cost"); } catch (Exception e) { e.printStackTrace(); } String decreaseCartAmount = String.format("UPDATE `mydb`.`Cart` " + "SET `mydb`.`Cart`.`Cart_Cost` = %f - %f * %d " + "WHERE `mydb`.`Cart`.`Cart_Id` = %d;", current_cart_cost, goods_price, goods_num, CartId); executeCommand(decreaseCartAmount); String decreaseGoodsStock = String.format("UPDATE `mydb`.`Goods` " + "SET `mydb`.`Goods`.`Goods_Stock` = %d - %d " + "WHERE `mydb`.`Goods`.`Goods_Id` = %d;", goods_stock, goods_num, goods_id); executeCommand(decreaseGoodsStock); } } catch(Exception e) { e.printStackTrace(); } try { goodsResultSet.close(); } catch (Exception e) { e.printStackTrace(); } } public static void main(String ... args) { trigger temp = new trigger(); // Insert User legal trigger.insertUser(1, "Alice", "Alice11", "0", "Dongchuan 800"); trigger.insertUser(2, "Tom", "Tom22", "1", "Meichuan 300"); // Insert User illegal trigger.insertUser(3, "Tracy", "Tracy", "0", "Tongchuan 700"); trigger.insertUser(4, "Tim", "tim1", "1", "Heichuan 200"); trigger.insertUser(3, "TLinda", "LINDA1", "0", "Tianchuan 400"); // Insert Goods legal trigger.insertGoods(1, "Biscuit", 3.2f, 40); trigger.insertGoods(2, "Juice", 6.3f, 100); // Insert Goods illegal trigger.insertGoods(3, "Coca Cola", -2.3f, 50); trigger.insertGoods(4, "Jelly", 3.1f, -2); // Insert Cart Info legal trigger.insertCartInfo(5, 1, 1, 4); trigger.insertCartInfo(6, 2, 2, 20); trigger.insertCartInfo(7, 1, 2, 180); // Insert Cart Info illegal trigger.insertCartInfo(5, 2, 1, -3); trigger.insertCartInfo (6, 2, 5, 2); // Insert Bill legal trigger.insertBill(1, 1, 1); } }
[ "isabella_aus_china@163.com" ]
isabella_aus_china@163.com
e0dc22a552059fa12deeca32d80d6c197273e015
5b5e0eda3cf646df26cd8023efa58fac5b114c0f
/Assignment03/04/TestDessertShop.java
681c9b30ea401cd00d6a6d4a5787fc98bec83953
[]
no_license
ab1995/Java
72ff5af49470fb89a5a7f2b543eedd3afa9fb666
965414fd5dad16487f5e84fe7cda24c8b3a6da54
refs/heads/master
2021-01-15T09:19:33.268602
2017-08-18T11:46:08
2017-08-18T11:46:08
99,572,671
0
0
null
null
null
null
UTF-8
Java
false
false
6,240
java
import java.util.*; abstract class DessertItem{ abstract public double getCost(); } class Candy extends DessertItem{ private double candyCost; private double candyTax; public Candy(int cost, double tax){ this.candyCost=cost; this.candyTax=tax; } public double getCost(){ return this.candyCost+this.candyTax; } } class Cookie extends DessertItem{ private double cookieCost; private double cookieTax; public Cookie( double cost, double tax){ this.cookieCost=cost; this.cookieTax=tax; } public double getCost(){ return this.cookieCost+this.cookieTax; } } class IceCream extends DessertItem{ private double iceCreamCost; private double iceCreamTax; public IceCream( double cost, double tax){ this.iceCreamCost=cost; this.iceCreamTax=tax; } public double getCost(){ return this.iceCreamCost+this.iceCreamTax; } } class DessertShop{ private static ArrayList<DessertItem> candyList = new ArrayList<DessertItem>(); private static ArrayList<DessertItem> cookieList = new ArrayList<DessertItem>(); private static ArrayList<DessertItem> iceCreamList = new ArrayList<DessertItem>(); public int getSize(String item){ int quant=0; if(item=="candy") quant=this.candyList.size(); else if(item=="cookie") quant=this.cookieList.size(); else if(item=="iceCream") quant=this.iceCreamList.size(); return quant; } public void addItem(String item, int quant){ if(item=="candy"){ for(int iter=0;iter<quant;iter++){ this.candyList.add(new Candy(10,1)); } } else if(item=="cookie"){ for(int iter=0;iter<quant;iter++){ this.cookieList.add(new Candy(10,1)); } } else if(item=="iceCream"){ for(int iter=0;iter<quant;iter++){ this.iceCreamList.add(new Candy(10,1)); } } } public void removeItem(String item, int quant){ if(item=="candy"){ for(int iter=this.candyList.size()-1;iter>=quant;iter--){ this.candyList.remove(iter); } } else if(item=="cookie"){ for(int iter=this.cookieList.size()-1;iter>=quant;iter--){ this.cookieList.remove(iter); } } else if(item=="iceCream"){ for(int iter=this.iceCreamList.size()-1;iter>=quant;iter--){ this.iceCreamList.remove(iter); } } } public double getBill(String item, int quant){ double bill=0.0; if(item=="candy"){ bill=this.candyList.get(0).getCost()*quant; } else if(item=="cookie"){ bill=this.cookieList.get(0).getCost()*quant; } else if(item=="iceCream"){ bill=this.iceCreamList.get(0).getCost()*quant; } return bill; } } public class TestDessertShop{ public static void main(String[] args){ int choice=0; Scanner sc=new Scanner(System.in); DessertShop dessertShop=new DessertShop(); do{ System.out.println("\n 1) Customer\n 2) Owner\n 3) Exit\n\n Your Choice: "); choice=sc.nextInt(); int ch=0; switch(choice){ case 1: System.out.println("Customer"); do{ System.out.println("\n\n 1) Buy Candy\n 2) Buy Cookie\n 3) Buy IceCream\n 4) Exit\n\n Your Choice: "); ch=sc.nextInt(); int quant=0; switch(ch){ case 1: System.out.println("Enter quantity of Candy to order: "); quant=sc.nextInt(); if(quant>dessertShop.getSize("candy")) System.out.println("Order can't be placed. Available Candies: "+dessertShop.getSize("candy")); else if(quant==0 || quant<0) System.out.println("Please enter correct quantity"); else{ dessertShop.removeItem("candy", quant); System.out.println("Bill: "+dessertShop.getBill("candy", quant)); } break; case 2: System.out.println("Enter quantity of Cookie to order: "); quant=sc.nextInt(); if(quant>dessertShop.getSize("cookie")) System.out.println("Order can't be placed. Available Candies: "+dessertShop.getSize("cookie")); else if(quant==0 || quant<0) System.out.println("Please enter correct quantity"); else{ dessertShop.removeItem("cookie", quant); System.out.println("Bill: "+dessertShop.getBill("cookie", quant)); } break; case 3: System.out.println("Enter quantity of IceCream to order: "); quant=sc.nextInt(); if(quant>dessertShop.getSize("iceCream")) System.out.println("Order can't be placed. Available Candies: "+dessertShop.getSize("iceCream")); else if(quant==0 || quant<0) System.out.println("Please enter correct quantity"); else{ dessertShop.removeItem("iceCream", quant); System.out.println("Bill: "+dessertShop.getBill("iceCream", quant)); } break; case 4:break; default: System.out.println("Please Enter Correct Choice"); } }while(ch!=4); break; case 2: do{ System.out.println("\n\n 1) Add Candy\n 2) Add Cookie\n 3) Add IceCream\n 4) Exit\n\n Your Choice: "); ch=sc.nextInt(); int quant=0; switch(ch){ case 1: System.out.println("Enter quantity of Candy to add: "); quant=sc.nextInt(); dessertShop.addItem("candy", quant); System.out.println("\n Total Candies: "+dessertShop.getSize("candy")); break; case 2: System.out.println("Enter quantity of Cookie to add: "); quant=sc.nextInt(); dessertShop.addItem("cookie", quant); System.out.println("\n Total Cookies: "+dessertShop.getSize("cookie")); break; case 3: System.out.println("Enter quantity of IceCream to add: "); quant=sc.nextInt(); dessertShop.addItem("iceCream", quant); System.out.println("\n Total IceCereams: "+dessertShop.getSize("iceCream")); break; case 4:break; default: System.out.println("Please Enter Correct Choice"); } }while(ch!=4); break; case 3: break; default: System.out.println("Please Enter Correct Choice"); } }while(choice!=3); } }
[ "Dhus_g@India.XoriantCorp.com" ]
Dhus_g@India.XoriantCorp.com
650f4078169a7cb768856301147065b41511c503
bbf7c2764167b05f3d38f69dbfbd71d789246c5c
/codigos del curso/tema 2/Ejemplo_Hilos1.java
9d566f85f80fc5e1556c4a51665b220683644ab6
[]
no_license
lezkizofrenik/PCTR
c6a6c5c87ed70d0ab2f7370ea3781a00bc9ff614
525b42fad04b0e422e73bdb13d6d1836602a9499
refs/heads/master
2023-07-16T05:23:26.119282
2021-09-06T11:16:28
2021-09-06T11:16:28
320,035,519
0
0
null
null
null
null
UTF-8
Java
false
false
289
java
class Ejemplo_Hilos1 extends Thread { public Ejemplo_Hilos1(int Tope) //constructor { T = Tope; } public void run() //sobreescritura del metodo run { for (int i = 1; i <= T; i++) System.out.println(i); //aqui comportamiento del } //hilo deseado private int T; }
[ "dece279@gmail.com" ]
dece279@gmail.com
4501250060ed779eb1b8d5c33a5ffc3ca760da18
300ef54b29f9ebba15a559d407aca92e8d04c157
/src/Main.java
2f38d51d91e3104724bb55565785bdd9765a9598
[ "Apache-2.0" ]
permissive
arsengir/netology-synchronization
a07257ec073389c9da00bf30efa9bd534d5fa248
560d0f6069ca7fc13114ccced53b6e8eef0c7b89
refs/heads/main
2023-05-02T07:29:07.909849
2021-05-20T08:48:26
2021-05-20T08:48:26
368,159,484
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
public class Main { public static void main(String[] args) throws InterruptedException { final Carshow carshow = new Carshow(); ThreadGroup mainGroup = new ThreadGroup("main group"); Thread productionThread = new Thread(null, carshow::acceptCar, "Производитель Toyota"); productionThread.start(); new Thread(mainGroup, carshow::sellCar, "Покупатель 1").start(); new Thread(mainGroup, carshow::sellCar, "Покупатель 2").start(); new Thread(mainGroup, carshow::sellCar, "Покупатель 3").start(); productionThread.join(); mainGroup.interrupt(); } }
[ "amateurlib@yandex.ru" ]
amateurlib@yandex.ru
cf606b1a87657bf1d6c125e1fa92d7fe37c16061
6240a87133481874e293b36a93fdb64ca1f2106c
/taobao/src/com/taobao/api/response/ItemUpdateListingResponse.java
397c154f3ba3631b5485175a3237253b60caa38b
[]
no_license
mrzeng/comments-monitor
596ba8822d70f8debb630f40b548f62d0ad48bd4
1451ec9c14829c7dc29a2297a6f3d6c4e490dc13
refs/heads/master
2021-01-15T08:58:05.997787
2013-07-17T16:29:23
2013-07-17T16:29:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.domain.Item; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.item.update.listing response. * * @author auto create * @since 1.0, null */ public class ItemUpdateListingResponse extends TaobaoResponse { private static final long serialVersionUID = 4711135221549954989L; /** * 上架后返回的商品信息:返回的结果就是:num_iid和modified */ @ApiField("item") private Item item; public void setItem(Item item) { this.item = item; } public Item getItem( ) { return this.item; } }
[ "qujian@gionee.com" ]
qujian@gionee.com
6215971fbfb18519a90b8683b07700c9d28aef2a
034416becb36f4a9922053daf5f1175349a2843f
/mmall-oms/mmall-oms-api/src/main/java/com/xyl/mmall/oms/report/meta/OmsReceiptDaily.java
9a50c7e3b3972cbbb5ea47cf551018368e6048dc
[]
no_license
timgle/utilcode
40ee8d05e96ac324f452fccb412e07b4465e5345
a8c81c90ec1965d45589dd7be8d2c8b0991a6b6a
refs/heads/master
2021-05-09T22:39:11.417003
2016-03-20T14:30:52
2016-03-20T14:30:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,904
java
package com.xyl.mmall.oms.report.meta; import java.io.Serializable; import com.netease.print.daojar.meta.annotation.AnnonOfClass; import com.netease.print.daojar.meta.annotation.AnnonOfField; @AnnonOfClass(desc = "oms签收情况", tableName = "Mmall_Oms_Report_ReceiptDaily") public class OmsReceiptDaily implements Serializable { private static final long serialVersionUID = 1L; @AnnonOfField(desc = "自增主键", primary = true, autoAllocateId = true) private long id; @AnnonOfField(desc = "仓库编号") private long warehouseId; @AnnonOfField(desc = "妥投数") private int total; @AnnonOfField(desc = "时间范围") private int type; @AnnonOfField(desc = "未签收,即未妥投") private int no_receipt; @AnnonOfField(desc = "日期") private long date; @AnnonOfField(desc = "创建日期") private long createTime; @AnnonOfField(desc = "更新日期") private long updateTime; public long getId() { return id; } public void setId(long id) { this.id = id; } public long getWarehouseId() { return warehouseId; } public void setWarehouseId(long warehouseId) { this.warehouseId = warehouseId; } public int getTotal() { return total; } public void setTotal(int total) { this.total = total; } public int getType() { return type; } public void setType(int type) { this.type = type; } public int getNo_receipt() { return no_receipt; } public void setNo_receipt(int no_receipt) { this.no_receipt = no_receipt; } public long getDate() { return date; } public void setDate(long date) { this.date = date; } public long getCreateTime() { return createTime; } public void setCreateTime(long createTime) { this.createTime = createTime; } public long getUpdateTime() { return updateTime; } public void setUpdateTime(long updateTime) { this.updateTime = updateTime; } }
[ "jack_lhp@163.com" ]
jack_lhp@163.com
5609be73a26fbf62e4b4b575e92be247e75d42e0
77066f48e0043d39adb44a172392594dee2bc66a
/dig-manual/splittypie/testsplittypieAdaptiveSequence_6/main/ClassUnderTestApogen_ESTest_scaffolding.java
289034821b4c4b6ae051234578754ffe54d1724d
[]
no_license
sumleo/dig-data
dd982533aca49e8db5fd0a4be532c5bb56e2cd3f
36a79726a74044be8d2ad86160ded76d98aabb2e
refs/heads/master
2022-12-05T19:24:18.070437
2020-08-25T01:19:46
2020-08-25T01:19:46
286,430,012
0
0
null
null
null
null
UTF-8
Java
false
false
64,309
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Aug 15 02:19:49 GMT 2020 */ package main; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class ClassUnderTestApogen_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 1000000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "main.ClassUnderTestApogen"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = -1; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.OFF; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ClassUnderTestApogen_ESTest_scaffolding.class.getClassLoader() , "com.google.gson.internal.bind.TimeTypeAdapter$1", "org.openqa.selenium.interactions.CompositeAction", "com.google.common.collect.ImmutableMultimap$Itr", "org.apache.http.impl.HttpConnectionMetricsImpl", "org.openqa.selenium.WebElement", "com.google.common.collect.MultimapBuilder$ArrayListSupplier", "com.google.common.collect.Collections2", "com.google.common.collect.PeekingIterator", "org.apache.http.config.Registry", "org.openqa.selenium.remote.http.HttpResponse", "org.openqa.selenium.remote.Dialect", "org.openqa.selenium.internal.FindsById", "org.apache.http.impl.conn.SystemDefaultDnsResolver", "org.apache.http.conn.ConnectionRequest", "org.openqa.selenium.interactions.InvalidCoordinatesException", "com.google.common.collect.NullsLastOrdering", "com.google.common.collect.RegularImmutableMultiset", "com.google.common.collect.RegularImmutableMap", "org.apache.http.client.protocol.RequestAcceptEncoding", "org.openqa.selenium.support.ui.ExpectedConditions$10", "com.google.common.collect.RegularImmutableMultiset$ElementSet", "org.apache.http.pool.AbstractConnPool$1", "org.openqa.selenium.ImeNotAvailableException", "org.apache.http.pool.AbstractConnPool$2", "org.apache.http.conn.ssl.AllowAllHostnameVerifier", "org.apache.http.pool.AbstractConnPool$3", "com.google.gson.internal.Excluder", "org.apache.http.impl.client.InternalHttpClient$1", "com.google.common.base.CharMatcher$Invisible", "org.apache.http.client.CredentialsProvider", "com.google.common.collect.MultimapBuilder$SetMultimapBuilder", "com.google.common.base.Joiner", "org.openqa.selenium.support.ui.Sleeper", "org.openqa.selenium.SearchContext", "org.apache.http.config.RegistryBuilder", "org.openqa.selenium.logging.HandlerBasedLocalLogs", "org.openqa.selenium.WebDriver", "org.apache.http.io.HttpTransportMetrics", "org.openqa.selenium.support.ui.ExpectedConditions$20", "com.google.common.base.Strings", "com.google.common.collect.Lists$Partition", "org.apache.http.conn.ssl.AbstractVerifier", "com.google.common.collect.AbstractMapBasedMultimap", "org.apache.http.impl.execchain.RequestEntityProxy", "org.apache.http.message.BasicHttpResponse", "custom_classes.Currencies", "org.openqa.selenium.interactions.KeyInput$TypingInteraction", "org.apache.http.io.HttpMessageWriter", "org.apache.http.HttpClientConnection", "org.apache.http.conn.routing.HttpRouteDirector", "org.apache.http.protocol.HttpProcessor", "org.apache.http.impl.io.AbstractMessageParser", "org.apache.http.conn.routing.BasicRouteDirector", "com.google.gson.internal.ObjectConstructor", "org.openqa.selenium.remote.http.AbstractHttpCommandCodec", "org.apache.http.client.NonRepeatableRequestException", "com.google.common.collect.ImmutableEntry", "com.google.common.base.Joiner$1", "com.google.common.base.Joiner$2", "com.google.common.collect.ImmutableEnumMap", "com.google.gson.internal.bind.ObjectTypeAdapter", "com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter", "com.google.common.collect.AbstractMapBasedMultimap$KeySet$1", "org.apache.http.impl.client.DefaultRedirectStrategy", "com.google.gson.internal.LinkedTreeMap$1", "com.google.common.base.CharMatcher$BitSetMatcher", "com.google.common.base.CharMatcher$JavaUpperCase", "com.google.common.collect.Lists$AbstractListWrapper", "org.openqa.selenium.support.ui.SystemClock", "org.apache.http.pool.PoolEntryCallback", "com.google.common.collect.AbstractMapBasedMultiset", "com.google.common.base.CharMatcher$NamedFastMatcher", "org.openqa.selenium.net.Urls", "org.apache.http.pool.ConnFactory", "org.openqa.selenium.internal.FindsByLinkText", "com.google.gson.internal.bind.JsonTreeWriter$1", "po_apogen.NewEventPage", "com.google.common.base.CharMatcher$Is", "com.google.common.collect.Lists$2", "org.openqa.selenium.interactions.PointerInput$MouseButton", "org.openqa.selenium.logging.NeedsLocalLogs", "com.google.gson.internal.bind.TypeAdapters", "org.apache.http.impl.execchain.ClientExecChain", "com.google.common.collect.Lists$1", "org.openqa.selenium.remote.RemoteLogs", "org.apache.http.message.BasicStatusLine", "org.openqa.selenium.internal.FindsByClassName", "com.google.common.base.Supplier", "com.google.common.base.AbstractIterator$1", "com.google.common.collect.EmptyImmutableListMultimap", "com.google.gson.FieldNamingPolicy", "com.google.common.collect.ReverseOrdering", "po_utils.JavascriptActions", "org.openqa.selenium.HasCapabilities", "com.google.common.collect.FluentIterable$1", "org.openqa.selenium.By$ByPartialLinkText", "com.google.common.collect.FluentIterable$2", "org.openqa.selenium.By$ById", "org.openqa.selenium.NoAlertPresentException", "org.apache.http.impl.cookie.BasicPathHandler", "org.openqa.selenium.logging.LogEntries", "org.openqa.selenium.Dimension", "org.apache.http.impl.conn.DefaultHttpResponseParser", "org.apache.http.entity.AbstractHttpEntity", "com.google.common.collect.SortedMultisetBridge", "org.apache.http.conn.routing.RouteInfo$TunnelType", "org.apache.http.impl.conn.LoggingInputStream", "org.apache.http.client.UserTokenHandler", "com.google.common.collect.Maps$EntryTransformer", "com.google.common.collect.Ordering", "org.apache.http.impl.conn.SystemDefaultRoutePlanner$1", "org.openqa.selenium.logging.LocalLogs", "org.openqa.selenium.remote.http.HttpMethod", "com.google.common.base.CharMatcher$Digit", "org.apache.http.ConnectionClosedException", "org.apache.http.conn.ConnectionReleaseTrigger", "org.openqa.selenium.remote.RemoteExecuteMethod", "com.google.common.collect.Multimaps$CustomListMultimap", "com.google.common.collect.AllEqualOrdering", "org.apache.http.client.methods.HttpPost", "com.google.common.collect.Hashing", "org.apache.http.client.entity.DeflateInputStream", "com.google.common.collect.SortedMultiset", "com.google.common.base.CharMatcher$JavaDigit", "com.google.common.collect.AbstractMapBasedMultiset$1$1", "org.apache.http.io.SessionOutputBuffer", "com.google.common.collect.FluentIterable", "org.apache.http.cookie.CookieIdentityComparator", "org.apache.http.config.Lookup", "org.apache.http.HttpMessage", "org.apache.http.HeaderElementIterator", "com.google.common.base.CharMatcher$InRange", "com.google.common.base.CharMatcher$JavaLetter", "org.openqa.selenium.remote.http.HttpClient$Factory", "org.apache.http.impl.execchain.HttpResponseProxy", "com.google.common.collect.SortedMapDifference", "org.openqa.selenium.interactions.PointerInput$Origin", "com.google.common.collect.RegularImmutableSet", "org.openqa.selenium.NoSuchSessionException", "com.google.common.collect.ImmutableListMultimap", "org.openqa.selenium.remote.ScreenshotException", "org.openqa.selenium.ElementNotVisibleException", "org.apache.http.conn.util.PublicSuffixMatcher", "com.google.gson.TypeAdapterFactory", "org.apache.http.protocol.RequestTargetHost", "org.openqa.selenium.InvalidArgumentException", "com.google.common.base.CharMatcher$Any", "com.google.common.collect.ImmutableAsList", "org.apache.http.impl.cookie.AbstractCookieAttributeHandler", "org.apache.http.protocol.HttpRequestExecutor", "org.openqa.selenium.UnhandledAlertException", "com.google.common.collect.SingletonImmutableSet", "org.apache.http.entity.ByteArrayEntity", "com.google.common.collect.ImmutableMapEntrySet", "org.openqa.selenium.remote.http.HttpRequest", "com.google.common.collect.Multimaps", "org.apache.http.impl.auth.HttpAuthenticator", "org.apache.http.conn.util.PublicSuffixList", "org.apache.http.conn.ConnectTimeoutException", "com.google.common.collect.ImmutableMultiset", "com.google.common.collect.ImmutableMultimap$Keys", "com.google.common.collect.Multisets$AbstractEntry", "com.google.common.collect.AbstractMapBasedMultimap$AsMap$AsMapIterator", "com.google.gson.internal.Streams", "com.google.common.collect.AbstractIterator", "com.google.common.base.CharMatcher$And", "org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper", "org.apache.http.client.utils.URIUtils", "org.apache.http.ProtocolVersion", "org.apache.http.client.protocol.RequestExpectContinue", "com.google.common.collect.ImmutableMap$MapViewOfValuesAsSingletonSets", "org.openqa.selenium.remote.RemoteWebDriver$1", "org.openqa.selenium.By$ByClassName", "org.apache.http.conn.UnsupportedSchemeException", "org.apache.http.client.protocol.HttpClientContext", "po_utils.TestData", "po_utils.PageObjectLogging", "org.openqa.selenium.internal.Locatable", "org.openqa.selenium.interactions.internal.Coordinates", "org.apache.http.impl.client.ProxyAuthenticationStrategy", "com.google.common.collect.AbstractMultimap$Entries", "com.google.common.collect.AbstractMapBasedMultimap$WrappedList", "org.openqa.selenium.remote.http.HttpMessage", "org.openqa.selenium.Point", "org.openqa.selenium.remote.JsonException", "org.apache.http.impl.execchain.TunnelRefusedException", "org.openqa.selenium.logging.LocalLogs$1", "com.google.common.base.Converter", "com.google.common.base.CharMatcher$BreakingWhitespace", "org.apache.http.protocol.RequestUserAgent", "com.google.common.collect.Multiset$Entry", "org.apache.http.config.ConnectionConfig", "org.apache.http.cookie.CookieAttributeHandler", "org.apache.http.util.TextUtils", "org.apache.http.HttpResponseInterceptor", "org.apache.http.impl.client.HttpClientBuilder$2", "org.apache.http.config.MessageConstraints$Builder", "com.google.gson.internal.bind.SqlDateTypeAdapter$1", "com.google.common.base.CharMatcher$JavaLowerCase", "org.apache.http.NameValuePair", "com.google.common.collect.ImmutableList$Builder", "org.openqa.selenium.UnableToSetCookieException", "com.google.gson.internal.ConstructorConstructor", "com.google.common.collect.AbstractMultiset", "org.apache.http.message.BasicHeaderIterator", "org.openqa.selenium.NoSuchCookieException", "com.google.common.collect.Iterators", "com.google.common.collect.CompoundOrdering", "org.apache.http.impl.conn.LoggingOutputStream", "com.google.common.collect.ImmutableMultiset$1", "org.openqa.selenium.interactions.Interactive", "org.apache.http.ParseException", "org.openqa.selenium.Keys", "org.apache.http.client.protocol.ResponseProcessCookies", "org.apache.http.message.BasicRequestLine", "org.openqa.selenium.internal.FindsByXPath", "com.google.gson.FieldNamingPolicy$4", "org.apache.http.util.CharArrayBuffer", "com.google.gson.FieldNamingPolicy$3", "com.google.gson.FieldNamingPolicy$5", "com.google.gson.internal.JsonReaderInternalAccess", "org.openqa.selenium.interactions.Encodable", "org.apache.http.conn.util.DomainType", "com.google.common.collect.Iterators$MergingIterator", "com.google.common.collect.RegularImmutableMap$Values", "org.apache.http.HttpConnection", "com.google.gson.FieldNamingPolicy$2", "com.google.gson.FieldNamingPolicy$1", "org.openqa.selenium.remote.CommandInfo", "org.apache.http.message.HeaderValueParser", "com.google.common.collect.Lists$RandomAccessPartition", "com.google.common.collect.AbstractMapBasedMultimap$AsMap$AsMapEntries", "com.google.common.base.CharMatcher$ForPredicate", "org.openqa.selenium.remote.internal.ApacheHttpClient", "org.apache.http.client.protocol.RequestClientConnControl", "com.google.common.collect.Multimaps$TransformedEntriesMultimap", "main.ClassUnderTestApogen", "com.google.common.collect.ImmutableCollection$ArrayBasedBuilder", "org.apache.http.impl.cookie.RFC6265CookieSpecProvider$CompatibilityLevel", "com.google.common.collect.ImmutableMultimap$Values", "org.apache.http.impl.conn.DefaultManagedHttpClientConnection", "org.openqa.selenium.remote.RemoteKeyboard", "com.google.common.collect.ByFunctionOrdering", "com.google.common.collect.AbstractMapEntry", "com.google.common.collect.ImmutableMap$IteratorBasedImmutableMap", "org.openqa.selenium.JavascriptException", "com.google.common.collect.ImmutableListMultimap$Builder", "org.openqa.selenium.NoSuchFrameException", "com.google.common.collect.Maps$10", "org.apache.http.client.entity.InputStreamFactory", "com.google.common.collect.Maps$11", "org.apache.http.client.ClientProtocolException", "com.google.gson.stream.JsonReader$1", "org.apache.http.impl.cookie.BasicMaxAgeHandler", "org.apache.http.conn.routing.RouteTracker", "org.apache.http.params.AbstractHttpParams", "org.openqa.selenium.WebDriverException", "org.apache.http.message.BasicTokenIterator", "org.openqa.selenium.remote.ErrorHandler$UnknownServerException", "com.google.common.collect.Lists", "com.google.common.collect.UnmodifiableListIterator", "com.google.gson.internal.bind.TreeTypeAdapter", "org.apache.http.client.methods.AbstractExecutionAwareRequest", "custom_classes.Price", "org.openqa.selenium.remote.ProtocolHandshake", "com.google.gson.stream.JsonWriter", "com.google.gson.internal.bind.ArrayTypeAdapter$1", "org.apache.http.HttpConnectionMetrics", "com.google.common.collect.Maps$BiMapConverter", "org.apache.http.conn.ConnectionPoolTimeoutException", "org.apache.http.client.RedirectStrategy", "org.openqa.selenium.remote.internal.ApacheHttpClient$1", "org.apache.http.impl.client.BasicCookieStore", "org.apache.http.protocol.HttpContext", "org.openqa.selenium.remote.CommandExecutor", "org.apache.http.HttpResponse", "com.google.common.base.Preconditions", "org.apache.http.impl.client.HttpClientBuilder", "org.openqa.selenium.UnsupportedCommandException", "po_utils.DriverProvider", "com.google.common.base.CharMatcher$JavaIsoControl", "org.apache.http.message.HeaderGroup", "po_apogen.TransactionsPage", "org.openqa.selenium.interactions.Interaction", "org.apache.http.Header", "org.apache.http.conn.HttpHostConnectException", "org.apache.http.impl.conn.PoolingHttpClientConnectionManager", "org.apache.http.util.ByteArrayBuffer", "com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory", "com.google.common.collect.ImmutableSet", "com.google.common.collect.ImmutableMapEntry", "org.apache.http.cookie.CookieOrigin", "org.openqa.selenium.interactions.Mouse", "po_apogen.EditTransactionComponent", "com.google.gson.internal.bind.TypeAdapters$2", "com.google.gson.internal.bind.TypeAdapters$1", "com.google.common.collect.ImmutableMultimap$EntryCollection", "org.apache.http.protocol.BasicHttpContext", "org.apache.http.entity.BasicHttpEntity", "com.google.common.collect.Lists$StringAsImmutableList", "com.google.gson.internal.bind.TypeAdapters$8", "org.apache.http.conn.ssl.DefaultHostnameVerifier", "org.apache.http.client.CircularRedirectException", "com.google.gson.internal.bind.TypeAdapters$7", "com.google.common.collect.Maps$IteratorBasedAbstractMap", "com.google.common.base.CharMatcher$SingleWidth", "com.google.gson.internal.bind.TypeAdapters$9", "com.google.gson.internal.bind.TypeAdapters$4", "org.apache.http.impl.execchain.ConnectionHolder", "org.apache.commons.logging.impl.Jdk14Logger", "com.google.gson.internal.bind.TypeAdapters$3", "com.google.gson.internal.bind.TypeAdapters$6", "com.google.common.base.Splitter$Strategy", "com.google.gson.internal.bind.TypeAdapters$5", "org.apache.http.HttpVersion", "org.openqa.selenium.logging.LogEntry", "org.openqa.selenium.remote.ErrorCodes", "com.google.common.collect.Multimaps$Entries", "org.apache.http.impl.cookie.RFC2965CommentUrlAttributeHandler", "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1", "org.apache.http.message.BasicHeaderElementIterator", "po_apogen.ConfirmationPage", "org.openqa.selenium.internal.FindsByName", "org.openqa.selenium.NotFoundException", "org.apache.http.auth.AuthScheme", "com.google.gson.internal.Streams$AppendableWriter", "com.google.gson.JsonSyntaxException", "org.openqa.selenium.By", "org.apache.http.impl.io.HttpTransportMetricsImpl", "org.apache.http.impl.auth.DigestSchemeFactory", "org.openqa.selenium.WebDriver$TargetLocator", "org.openqa.selenium.support.ui.FluentWait", "com.google.common.collect.NaturalOrdering", "org.openqa.selenium.remote.ResponseCodec", "org.apache.http.impl.conn.LoggingManagedHttpClientConnection", "org.apache.http.impl.auth.HttpAuthenticator$1", "com.google.common.collect.ImmutableList$SubList", "com.google.common.collect.ListMultimap", "com.google.common.base.CharMatcher$Whitespace", "com.google.gson.TypeAdapter", "org.openqa.selenium.remote.ProtocolHandshake$Result", "org.apache.http.RequestLine", "org.apache.http.impl.io.SessionOutputBufferImpl", "com.google.gson.internal.bind.SqlDateTypeAdapter", "com.google.common.collect.Multimaps$TransformedEntriesListMultimap", "com.google.common.collect.Maps$KeySet", "org.apache.http.conn.ClientConnectionManager", "org.apache.http.cookie.CookieRestrictionViolationException", "org.apache.http.message.LineFormatter", "org.apache.http.cookie.CookieSpecProvider", "org.apache.http.pool.ConnPoolControl", "org.apache.http.HttpRequest", "org.openqa.selenium.StaleElementReferenceException", "com.google.common.base.CommonPattern", "org.apache.http.client.AuthenticationStrategy", "com.google.common.collect.MultimapBuilder$1", "com.google.common.collect.MultimapBuilder$2", "com.google.common.collect.ImmutableMultimap$1", "com.google.common.collect.MultimapBuilder$3", "com.google.common.collect.MultimapBuilder$4", "org.openqa.selenium.internal.FindsByTagName", "com.google.common.base.Present", "org.openqa.selenium.By$ByName", "org.apache.http.conn.routing.RouteInfo$LayerType", "com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter", "com.google.common.collect.ImmutableMultimap$2", "com.google.common.collect.ImmutableMapEntrySet$RegularEntrySet", "org.apache.http.message.BasicHeaderValueParser", "po_apogen.AddTransactionPage", "org.apache.http.io.SessionInputBuffer", "com.google.common.collect.Lists$TransformingSequentialList", "org.apache.http.protocol.HTTP", "org.openqa.selenium.internal.WrapsElement", "org.apache.http.TokenIterator", "org.apache.http.protocol.HttpCoreContext", "org.openqa.selenium.NoSuchElementException", "com.google.gson.stream.MalformedJsonException", "org.openqa.selenium.remote.http.AbstractHttpCommandCodec$CommandSpec", "com.google.gson.internal.bind.DateTypeAdapter$1", "org.apache.http.ProtocolException", "org.apache.http.NoHttpResponseException", "com.google.gson.internal.bind.DateTypeAdapter", "com.google.common.collect.AbstractMapBasedMultimap$KeySet", "com.google.common.collect.Lists$RandomAccessListWrapper", "org.apache.http.conn.ssl.StrictHostnameVerifier", "org.openqa.selenium.interactions.Keyboard", "org.apache.http.io.HttpMessageWriterFactory", "com.google.common.collect.ImmutableMultiset$EntrySet", "org.apache.http.conn.routing.HttpRoutePlanner", "com.google.common.base.Splitter", "com.google.common.collect.Maps$6", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$BoundField", "com.google.common.collect.Maps$7", "org.apache.http.params.HttpParamsNames", "com.google.common.collect.ComparatorOrdering", "com.google.common.collect.AbstractIndexedListIterator", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1", "org.apache.http.impl.cookie.IgnoreSpecProvider", "com.google.common.collect.CollectPreconditions", "org.apache.http.conn.util.PublicSuffixMatcherLoader", "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier", "po_apogen.IndexPage", "org.openqa.selenium.interactions.PointerInput", "com.google.common.collect.Maps$ViewCachingAbstractMap", "org.apache.http.auth.AuthenticationException", "org.apache.http.impl.cookie.NetscapeDraftSpecProvider", "org.apache.http.auth.AuthState", "org.apache.http.impl.client.DefaultClientConnectionReuseStrategy", "com.google.common.collect.ImmutableMap$1", "com.google.gson.internal.LazilyParsedNumber", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter", "org.apache.http.conn.routing.HttpRoute", "com.google.common.collect.Multimap", "com.google.gson.JsonElement", "org.apache.http.ssl.SSLInitializationException", "org.apache.http.impl.conn.CPoolEntry", "org.openqa.selenium.support.How", "org.apache.http.client.CookieStore", "com.google.common.base.Splitter$1$1", "org.apache.http.io.BufferInfo", "com.google.common.base.AbstractIterator$State", "org.apache.http.conn.socket.PlainConnectionSocketFactory", "org.apache.http.impl.io.IdentityOutputStream", "org.apache.http.client.HttpRequestRetryHandler", "org.openqa.selenium.remote.ErrorCodes$KnownError", "org.apache.http.impl.cookie.DefaultCookieSpecProvider$1", "org.apache.http.impl.client.InternalHttpClient", "org.apache.http.HeaderElement", "po_utils.PageComponent", "com.google.common.base.CharMatcher$Or", "org.apache.http.impl.io.SessionInputBufferImpl", "org.apache.http.impl.execchain.RetryExec", "com.google.common.base.AbstractIterator", "org.apache.http.conn.routing.RouteInfo", "org.apache.http.message.ParserCursor", "org.apache.http.io.HttpMessageParserFactory", "org.apache.http.impl.conn.DefaultHttpResponseParserFactory", "com.google.common.collect.MultimapBuilder", "org.apache.http.impl.execchain.RequestAbortedException", "com.google.common.base.JdkPattern", "com.google.gson.internal.bind.JsonTreeWriter", "com.google.gson.GsonBuilder", "org.openqa.selenium.logging.LogEntry$1", "org.openqa.selenium.chrome.ChromeOptions", "org.apache.http.impl.execchain.ProtocolExec", "po_utils.ConstantLocators", "org.apache.http.cookie.MalformedCookieException", "org.openqa.selenium.remote.UselessFileDetector", "com.google.common.collect.AbstractMapBasedMultiset$1", "com.google.gson.internal.bind.TimeTypeAdapter", "org.openqa.selenium.interactions.Sequence", "org.apache.http.MessageConstraintException", "com.google.common.collect.RegularImmutableBiMap", "org.apache.http.conn.HttpClientConnectionManager", "org.apache.http.HttpException", "org.openqa.selenium.remote.http.AbstractHttpResponseCodec", "com.google.gson.LongSerializationPolicy", "org.openqa.selenium.interactions.Pause", "com.google.common.base.CharMatcher$None", "com.google.common.collect.ImmutableSet$Indexed$1", "org.openqa.selenium.logging.profiler.ProfilerLogEntry", "org.apache.http.pool.RouteSpecificPool", "com.google.common.collect.Maps$TransformedEntriesMap", "org.apache.http.client.methods.Configurable", "com.google.common.collect.NullsFirstOrdering", "org.openqa.selenium.OutputType", "po_apogen.EditEventComponent", "com.google.gson.JsonParser", "org.openqa.selenium.remote.RemoteWebDriver$When", "com.google.common.collect.RegularImmutableMultiset$NonTerminalEntry", "org.apache.http.impl.io.ContentLengthInputStream", "org.apache.http.auth.Credentials", "com.google.gson.Gson$FutureTypeAdapter", "com.google.common.collect.Multisets$ImmutableEntry", "com.google.common.collect.Count", "org.apache.http.io.HttpMessageParser", "org.openqa.selenium.remote.FileDetector", "org.apache.http.impl.execchain.RedirectExec", "com.google.common.base.Absent", "com.google.gson.internal.$Gson$Preconditions", "org.openqa.selenium.remote.Dialect$1", "org.openqa.selenium.remote.Dialect$2", "org.apache.http.pool.ConnPool", "org.apache.http.auth.AuthProtocolState", "org.openqa.selenium.remote.BeanToJsonConverter", "com.google.gson.internal.ConstructorConstructor$3", "com.google.common.collect.Sets$ImprovedAbstractSet", "com.google.common.collect.ImmutableMapEntry$NonTerminalImmutableMapEntry", "com.google.gson.JsonNull", "org.apache.http.impl.client.AuthenticationStrategyImpl", "com.google.common.base.CharMatcher$1", "org.openqa.selenium.remote.SessionId", "com.google.gson.internal.ConstructorConstructor$8", "com.google.common.collect.ImmutableMapValues", "com.google.common.base.CharMatcher$FastMatcher", "com.google.gson.JsonObject", "org.openqa.selenium.remote.http.AbstractHttpCommandCodec$1", "com.google.gson.Gson$6", "com.google.gson.Gson$2", "com.google.common.collect.ImmutableCollection", "com.google.gson.Gson$3", "com.google.common.collect.Maps$IteratorBasedAbstractMap$1", "com.google.gson.Gson$4", "com.google.gson.Gson$5", "org.apache.http.config.MessageConstraints", "org.openqa.selenium.logging.LoggingHandler", "com.google.gson.Gson$1", "org.apache.http.conn.ConnectionKeepAliveStrategy", "org.apache.http.impl.conn.Wire", "org.openqa.selenium.remote.RemoteMouse", "com.google.common.collect.ImmutableCollection$Builder", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory", "com.google.gson.internal.LinkedTreeMap$EntrySet", "org.openqa.selenium.remote.HttpCommandExecutor", "org.apache.http.HttpEntity", "org.apache.http.client.methods.HttpRequestBase", "org.openqa.selenium.interactions.InputSource", "org.openqa.selenium.interactions.KeyInput", "org.apache.http.impl.conn.CPoolProxy", "org.openqa.selenium.remote.http.HttpClient", "com.google.gson.JsonIOException", "org.openqa.selenium.support.ui.Duration", "org.openqa.selenium.ScriptTimeoutException", "org.apache.http.conn.SchemePortResolver", "org.apache.http.impl.io.IdentityInputStream", "com.google.common.collect.Multiset", "org.apache.http.conn.DnsResolver", "org.openqa.selenium.support.ui.ExpectedCondition", "org.openqa.selenium.remote.JsonToBeanConverter", "org.apache.http.impl.client.TargetAuthenticationStrategy", "org.apache.http.impl.cookie.DefaultCookieSpec", "org.apache.http.params.CoreProtocolPNames", "org.apache.http.client.methods.HttpRequestWrapper$1", "custom_classes.Dates", "org.apache.http.FormattedHeader", "com.google.common.collect.ImmutableList", "com.google.gson.JsonPrimitive", "org.apache.http.auth.MalformedChallengeException", "org.apache.http.HttpEntityEnclosingRequest", "com.google.common.base.CharMatcher$Negated", "po_apogen.ConfirmDeletionPage", "org.openqa.selenium.remote.http.JsonHttpResponseCodec", "po_apogen.HomePage", "org.apache.http.HttpResponseFactory", "org.apache.http.impl.entity.LaxContentLengthStrategy", "org.apache.http.impl.io.ChunkedOutputStream", "org.openqa.selenium.Rectangle", "org.apache.http.ConnectionReuseStrategy", "org.apache.http.client.protocol.RequestDefaultHeaders", "com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl", "org.openqa.selenium.SessionNotCreatedException", "org.apache.http.conn.ManagedHttpClientConnection", "org.openqa.selenium.Platform$10", "org.openqa.selenium.Platform$11", "com.google.common.io.ByteStreams$1", "org.apache.http.util.LangUtils", "org.openqa.selenium.Platform$14", "org.openqa.selenium.Platform$15", "org.openqa.selenium.Platform$12", "org.openqa.selenium.Platform$13", "com.google.gson.internal.bind.TypeAdapters$23", "org.openqa.selenium.remote.http.JsonHttpCommandCodec", "com.google.gson.internal.bind.TypeAdapters$24", "com.google.gson.internal.bind.TypeAdapters$25", "org.apache.http.util.Asserts", "com.google.gson.internal.bind.TypeAdapters$26", "org.apache.http.StatusLine", "com.google.gson.internal.bind.TypeAdapters$20", "com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection", "com.google.gson.internal.bind.TypeAdapters$21", "com.google.gson.internal.bind.TypeAdapters$22", "org.openqa.selenium.remote.RemoteWebElement", "org.apache.http.cookie.SetCookie", "com.google.gson.internal.bind.TypeAdapters$27", "com.google.gson.FieldNamingStrategy", "com.google.gson.internal.bind.TypeAdapters$28", "org.apache.http.conn.HttpConnectionFactory", "com.google.gson.internal.bind.TypeAdapters$29", "com.google.common.base.Optional", "com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper", "org.openqa.selenium.Platform$16", "org.openqa.selenium.Platform$17", "org.apache.http.HttpRequestInterceptor", "org.apache.http.client.AuthCache", "com.google.common.base.CharMatcher$IsNot", "org.apache.http.pool.AbstractConnPool", "org.apache.http.HeaderIterator", "com.google.common.base.CharMatcher$NegatedFastMatcher", "org.apache.http.HttpInetConnection", "com.google.gson.internal.bind.TypeAdapters$34", "org.apache.http.entity.ContentType", "com.google.gson.internal.bind.TypeAdapters$35", "com.google.gson.internal.bind.TypeAdapters$36", "org.openqa.selenium.remote.DesiredCapabilities", "com.google.gson.internal.bind.TypeAdapters$30", "com.google.gson.internal.bind.TypeAdapters$32", "com.google.gson.internal.bind.TypeAdapters$33", "com.google.gson.JsonArray", "com.google.common.base.CharMatcher$IsEither", "com.google.common.collect.LexicographicalOrdering", "org.apache.http.impl.cookie.DefaultCookieSpecProvider", "org.openqa.selenium.internal.FindsByCssSelector", "com.google.common.collect.Multisets$5", "org.openqa.selenium.logging.Logs", "com.google.gson.internal.LinkedTreeMap$EntrySet$1", "com.google.common.collect.Iterables", "org.apache.http.impl.io.EmptyInputStream", "org.openqa.selenium.interactions.PointerInput$PointerPress", "com.google.common.collect.RegularImmutableAsList", "org.apache.http.client.RedirectException", "org.apache.http.client.methods.HttpUriRequest", "org.apache.http.client.methods.HttpRequestWrapper", "org.openqa.selenium.remote.ErrorHandler", "org.openqa.selenium.Platform$5", "org.apache.http.impl.cookie.BasicSecureHandler", "org.openqa.selenium.Platform$6", "org.openqa.selenium.Platform$3", "custom_classes.Id", "org.openqa.selenium.TakesScreenshot", "org.openqa.selenium.Platform$4", "org.openqa.selenium.remote.RemoteWebDriver$RemoteNavigation", "org.openqa.selenium.Platform$9", "org.apache.http.client.HttpClient", "org.openqa.selenium.Platform$7", "org.openqa.selenium.Platform$8", "com.google.gson.internal.LinkedTreeMap$Node", "org.apache.http.cookie.Cookie", "org.openqa.selenium.Platform$1", "org.apache.http.impl.auth.SPNegoSchemeFactory", "org.openqa.selenium.Platform$2", "po_utils.Range", "org.openqa.selenium.WebDriver$Navigation", "com.google.common.collect.ObjectArrays", "com.google.gson.internal.bind.TypeAdapters$12", "org.openqa.selenium.Platform", "com.google.gson.internal.bind.TypeAdapters$13", "com.google.gson.internal.bind.TypeAdapters$14", "com.google.gson.internal.bind.TypeAdapters$15", "com.google.common.collect.ImmutableList$1", "org.apache.http.impl.conn.CPool", "com.google.gson.internal.bind.TypeAdapters$10", "com.google.gson.internal.bind.TypeAdapters$11", "po_apogen.IndexComponent", "com.google.gson.internal.bind.TypeAdapters$16", "com.google.common.collect.SortedIterable", "com.google.gson.internal.bind.TypeAdapters$17", "com.google.gson.internal.bind.TypeAdapters$18", "org.openqa.selenium.By$ByXPath", "com.google.gson.internal.bind.TypeAdapters$19", "org.apache.http.util.VersionInfo", "org.apache.http.impl.cookie.RFC2109VersionHandler", "org.openqa.selenium.logging.StoringLocalLogs", "com.google.common.collect.UnmodifiableIterator", "com.google.common.collect.AbstractMapBasedMultimap$RandomAccessWrappedList", "org.apache.http.HttpHost", "org.openqa.selenium.remote.Command", "com.google.gson.TypeAdapter$1", "org.apache.http.message.BasicHeaderElement", "com.google.common.collect.MultimapBuilder$SortedSetMultimapBuilder", "com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection$WrappedIterator", "org.apache.http.impl.cookie.RFC2965DiscardAttributeHandler", "custom_classes.Transactions", "org.apache.http.impl.execchain.MainClientExec", "org.apache.http.protocol.HttpProcessorBuilder", "org.openqa.selenium.remote.ExecuteMethod", "org.openqa.selenium.interactions.Actions", "com.google.common.base.CharMatcher$RangesMatcher", "com.google.common.collect.SingletonImmutableList", "org.apache.http.message.LineParser", "com.google.common.base.Function", "com.google.common.collect.ImmutableMap", "org.apache.http.impl.io.AbstractMessageWriter", "org.apache.http.message.BufferedHeader", "org.openqa.selenium.remote.internal.HttpClientFactory", "com.google.common.io.ByteStreams$LimitedInputStream", "org.apache.http.conn.socket.LayeredConnectionSocketFactory", "com.google.common.collect.ExplicitOrdering", "org.apache.http.client.protocol.RequestAddCookies", "com.google.gson.internal.bind.ObjectTypeAdapter$1", "com.google.gson.JsonParseException", "org.apache.http.impl.conn.DefaultRoutePlanner", "org.apache.http.impl.auth.BasicSchemeFactory", "com.google.common.collect.SingletonImmutableBiMap", "com.google.common.collect.Multisets$EntrySet", "org.openqa.selenium.logging.profiler.EventType", "org.openqa.selenium.WebDriver$Options", "com.google.gson.internal.ConstructorConstructor$13", "org.apache.http.impl.client.CloseableHttpClient", "org.openqa.selenium.support.ui.ExpectedConditions$6", "com.google.common.collect.Maps", "com.google.common.primitives.Ints", "com.google.common.collect.SetMultimap", "org.openqa.selenium.logging.profiler.HttpProfilerLogEntry", "com.google.common.collect.TransformedIterator", "org.apache.http.impl.cookie.AbstractCookieSpec", "custom_classes.Participants", "org.apache.http.impl.client.CookieSpecRegistries", "com.google.common.base.Splitter$SplittingIterator", "po_apogen.NewEventComponent", "org.openqa.selenium.NoSuchWindowException", "org.openqa.selenium.remote.internal.WebElementToJsonConverter", "org.openqa.selenium.ImeActivationFailedException", "po_apogen.NewTransactionPage", "com.google.common.collect.ImmutableSet$Indexed", "po_apogen.TransactionsComponent", "po_apogen.HomeComponent", "com.google.common.net.MediaType$2", "org.openqa.selenium.logging.LoggingPreferences", "org.apache.http.config.SocketConfig$Builder", "com.google.common.collect.LinkedHashMultiset", "org.apache.http.impl.client.DefaultUserTokenHandler", "org.apache.http.impl.cookie.BasicDomainHandler", "org.openqa.selenium.support.FindBy", "org.openqa.selenium.InvalidElementStateException", "org.openqa.selenium.InvalidCookieDomainException", "com.google.common.base.CharMatcher$JavaLetterOrDigit", "org.openqa.selenium.ElementNotSelectableException", "org.apache.http.cookie.CookieSpec", "com.google.common.collect.Iterators$10", "com.google.common.collect.Iterators$12", "com.google.common.collect.Iterators$11", "com.google.gson.internal.bind.TypeAdapters$35$1", "com.google.common.base.Predicate", "po_utils.BasePageObject", "org.openqa.selenium.support.ui.WebDriverWait", "com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter", "com.google.common.collect.AbstractListMultimap", "org.apache.http.impl.cookie.BasicCommentHandler", "com.google.gson.internal.$Gson$Types", "org.openqa.selenium.interactions.Action", "org.openqa.selenium.remote.internal.JsonToWebElementConverter", "com.google.common.io.ByteArrayDataInput", "org.apache.http.impl.conn.SystemDefaultRoutePlanner", "org.apache.http.impl.BHttpConnectionBase", "com.google.common.collect.ImmutableMultimap", "org.apache.http.impl.cookie.RFC6265CookieSpecProvider", "com.google.common.base.Charsets", "org.openqa.selenium.remote.Response", "com.google.common.base.CharMatcher", "com.google.common.base.Joiner$MapJoiner", "org.apache.http.concurrent.FutureCallback", "org.apache.http.impl.io.ChunkedInputStream", "com.google.gson.stream.JsonToken", "com.google.common.collect.AbstractMultiset$EntrySet", "org.apache.http.params.HttpParams", "com.google.gson.LongSerializationPolicy$1", "com.google.gson.LongSerializationPolicy$2", "org.apache.http.impl.cookie.RFC2965VersionAttributeHandler", "org.apache.http.impl.io.DefaultHttpRequestWriterFactory", "org.apache.http.client.protocol.RequestAuthCache", "org.apache.http.impl.conn.DefaultSchemePortResolver", "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory", "org.apache.http.util.EntityUtils", "org.apache.http.impl.client.BasicCredentialsProvider", "org.openqa.selenium.JavascriptExecutor", "org.apache.http.conn.ssl.X509HostnameVerifier", "org.apache.http.protocol.ChainBuilder", "org.apache.http.impl.cookie.RFC2965PortAttributeHandler", "com.google.gson.Gson", "org.apache.http.impl.client.DefaultHttpRequestRetryHandler", "org.openqa.selenium.interactions.MoveTargetOutOfBoundsException", "org.openqa.selenium.logging.CompositeLocalLogs", "com.google.common.base.Objects", "org.apache.http.impl.auth.KerberosSchemeFactory", "org.openqa.selenium.interactions.HasInputDevices", "com.google.common.io.ByteArrayDataOutput", "com.google.common.collect.Iterators$6", "com.google.common.collect.BiMap", "com.google.common.collect.Iterators$7", "com.google.common.collect.SortedSetMultimap", "org.apache.http.conn.EofSensorInputStream", "org.apache.http.conn.util.PublicSuffixListParser", "org.apache.http.conn.EofSensorWatcher", "org.apache.http.pool.PoolEntryFuture", "org.apache.http.impl.DefaultConnectionReuseStrategy", "com.google.common.collect.Iterators$1", "com.google.common.collect.Iterators$2", "com.google.common.collect.Iterators$3", "po_utils.PageObject", "com.google.common.collect.Iterators$5", "com.google.common.collect.CollectCollectors", "com.google.gson.internal.Excluder$1", "com.google.common.base.ExtraObjectsMethodsForWeb", "org.apache.http.client.methods.HttpGet", "com.google.common.collect.RegularImmutableBiMap$Inverse", "com.google.common.collect.Maps$EntrySet", "com.google.common.collect.ImmutableMultimap$Builder", "org.apache.http.config.ConnectionConfig$Builder", "org.apache.http.client.protocol.ResponseContentEncoding$1", "org.apache.http.message.BasicListHeaderIterator", "org.openqa.selenium.remote.UnreachableBrowserException", "po_utils.Wait", "org.apache.http.client.protocol.ResponseContentEncoding$2", "com.google.common.collect.AbstractMultimap", "com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator", "org.apache.http.impl.io.DefaultHttpRequestWriter", "custom_classes.TripNames", "org.openqa.selenium.remote.CommandCodec", "com.google.gson.internal.bind.CollectionTypeAdapterFactory", "com.google.common.collect.ImmutableBiMapFauxverideShim", "org.apache.http.message.AbstractHttpMessage", "org.apache.http.cookie.CommonCookieAttributeHandler", "org.apache.http.ReasonPhraseCatalog", "com.google.common.base.CharMatcher$Ascii", "com.google.common.collect.ImmutableMap$Builder", "org.apache.http.entity.HttpEntityWrapper", "org.apache.http.message.BasicHeader", "org.apache.http.impl.entity.StrictContentLengthStrategy", "org.apache.http.impl.conn.ConnectionShutdownException", "org.apache.http.client.protocol.ResponseContentEncoding", "org.apache.http.message.BasicLineParser", "org.apache.http.auth.AuthSchemeProvider", "com.google.gson.reflect.TypeToken", "com.google.common.io.ByteStreams$FastByteArrayOutputStream", "org.apache.http.config.SocketConfig", "org.apache.http.client.config.RequestConfig", "org.openqa.selenium.interactions.PointerInput$Kind", "org.apache.http.impl.DefaultBHttpClientConnection", "com.google.common.collect.RegularImmutableList", "org.apache.http.impl.cookie.CookieSpecBase", "org.apache.http.impl.DefaultHttpResponseFactory", "org.apache.http.protocol.RequestContent", "org.apache.http.ssl.SSLContexts", "com.google.common.collect.Lists$TransformingRandomAccessList", "com.google.common.collect.RegularImmutableMap$KeySet", "org.apache.http.impl.conn.DefaultHttpClientConnectionOperator", "com.google.common.collect.ImmutableMapKeySet", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$4", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$3", "org.apache.http.client.utils.URIBuilder", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$2", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$1", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$6", "com.google.common.collect.Multisets", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys$5", "org.openqa.selenium.support.ui.Clock", "org.apache.http.conn.socket.ConnectionSocketFactory", "org.apache.http.conn.HttpClientConnectionOperator", "com.google.common.io.ByteStreams", "org.apache.http.impl.cookie.RFC2109DomainHandler", "org.apache.http.pool.PoolEntry", "com.google.common.collect.ImmutableSet$Builder", "org.openqa.selenium.logging.SessionLogs", "org.apache.http.message.BasicLineFormatter", "com.google.gson.stream.JsonReader", "org.openqa.selenium.interactions.PointerInput$Move", "po_apogen.NewTransactionComponent", "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory", "po_apogen.ConfirmationTransactionPage", "com.google.gson.internal.bind.MapTypeAdapterFactory", "org.apache.http.client.methods.AbortableHttpRequest", "com.google.common.collect.UsingToStringOrdering", "po_apogen.EditTransactionPage", "org.apache.http.auth.AuthSchemeFactory", "org.apache.http.protocol.ImmutableHttpProcessor", "com.google.common.collect.AbstractMapBasedMultimap$AsMap", "com.google.common.net.MediaType", "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$ConfigData", "org.apache.http.impl.cookie.RFC2965Spec", "org.openqa.selenium.remote.RemoteWebDriver", "org.openqa.selenium.ElementNotInteractableException", "org.apache.http.impl.cookie.RFC2109Spec", "org.apache.http.impl.auth.NTLMSchemeFactory", "org.openqa.selenium.support.ui.Sleeper$1", "com.google.common.collect.MapDifference", "com.google.gson.internal.bind.ArrayTypeAdapter", "com.google.common.base.CharMatcher$AnyOf", "org.apache.http.client.methods.HttpEntityEnclosingRequestBase", "org.apache.http.params.BasicHttpParams", "org.openqa.selenium.internal.HasIdentity", "com.google.common.collect.MultimapBuilder$ListMultimapBuilder", "org.apache.http.impl.cookie.BasicExpiresHandler", "org.apache.http.impl.execchain.ResponseEntityProxy", "com.google.gson.internal.bind.TypeAdapters$26$1", "org.apache.http.concurrent.Cancellable", "org.apache.http.impl.cookie.PublicSuffixDomainFilter", "org.apache.http.impl.io.ContentLengthOutputStream", "com.google.common.collect.ImmutableList$ReverseImmutableList", "org.apache.http.entity.ContentLengthStrategy", "po_utils.NotInTheRightPageObjectException", "org.apache.http.Consts", "org.apache.http.impl.cookie.DefaultCookieSpecProvider$CompatibilityLevel", "org.apache.http.conn.ssl.SSLConnectionSocketFactory", "org.apache.http.message.TokenParser", "org.openqa.selenium.support.ui.ExpectedConditions", "org.apache.http.util.Args", "org.apache.http.params.HttpProtocolParams", "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy", "org.openqa.selenium.Capabilities", "com.google.common.primitives.Ints$IntConverter", "org.openqa.selenium.remote.internal.ApacheHttpClient$Factory", "org.openqa.selenium.TimeoutException", "com.google.gson.internal.bind.JsonTreeReader", "org.apache.http.impl.EnglishReasonPhraseCatalog", "org.apache.http.client.config.RequestConfig$Builder", "po_utils.NotTheRightInputValuesException", "com.google.gson.internal.LinkedTreeMap", "org.apache.http.message.BasicNameValuePair", "org.openqa.selenium.support.ui.Wait", "com.google.common.collect.Iterables$6", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys", "org.openqa.selenium.By$ByLinkText", "com.google.common.collect.ImmutableMapEntry$NonTerminalImmutableBiMapEntry", "org.openqa.selenium.InvalidSelectorException", "com.google.common.collect.ImmutableBiMap", "org.apache.http.client.methods.HttpDelete", "po_utils.MyProperties", "org.apache.http.client.methods.CloseableHttpResponse", "com.google.common.base.Splitter$5", "org.openqa.selenium.By$ByTagName", "org.apache.http.impl.cookie.NetscapeDraftSpec", "com.google.common.base.Ascii", "org.openqa.selenium.By$ByCssSelector", "org.apache.http.client.methods.HttpExecutionAware", "com.google.common.net.MediaType$1", "com.google.common.base.Splitter$1", "org.openqa.selenium.interactions.IsInteraction", "po_apogen.EditEventPage", "org.openqa.selenium.internal.WrapsDriver", "org.apache.http.impl.cookie.RFC2965DomainAttributeHandler" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ClassUnderTestApogen_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.openqa.selenium.support.How", "po_utils.MyProperties", "org.openqa.selenium.remote.DesiredCapabilities", "org.openqa.selenium.Platform$1", "org.openqa.selenium.Platform$2", "org.openqa.selenium.Platform$3", "org.openqa.selenium.Platform$4", "org.openqa.selenium.Platform$5", "org.openqa.selenium.Platform$6", "org.openqa.selenium.Platform$7", "org.openqa.selenium.Platform$8", "org.openqa.selenium.Platform$9", "org.openqa.selenium.Platform$10", "org.openqa.selenium.Platform$11", "org.openqa.selenium.Platform$12", "org.openqa.selenium.Platform$13", "org.openqa.selenium.Platform$14", "org.openqa.selenium.Platform$15", "org.openqa.selenium.Platform$16", "org.openqa.selenium.Platform$17", "org.openqa.selenium.Platform", "org.openqa.selenium.chrome.ChromeOptions", "com.google.common.collect.Collections2", "com.google.common.collect.Maps", "com.google.common.collect.ImmutableCollection", "com.google.common.collect.ImmutableList", "com.google.common.collect.ObjectArrays", "com.google.common.collect.RegularImmutableList", "org.openqa.selenium.remote.RemoteWebDriver", "org.openqa.selenium.remote.HttpCommandExecutor", "com.google.common.collect.ImmutableMap", "com.google.common.collect.ImmutableBiMapFauxverideShim", "com.google.common.collect.ImmutableBiMap", "com.google.common.collect.RegularImmutableBiMap", "org.openqa.selenium.remote.internal.ApacheHttpClient$Factory", "org.openqa.selenium.remote.internal.HttpClientFactory", "org.apache.http.conn.socket.PlainConnectionSocketFactory", "org.apache.http.conn.ssl.AbstractVerifier", "org.apache.commons.logging.impl.Jdk14Logger", "org.apache.http.conn.ssl.AllowAllHostnameVerifier", "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier", "org.apache.http.conn.ssl.StrictHostnameVerifier", "org.apache.http.conn.ssl.SSLConnectionSocketFactory", "org.apache.http.conn.ssl.DefaultHostnameVerifier", "org.apache.http.conn.util.PublicSuffixMatcherLoader", "org.apache.http.Consts", "org.apache.http.conn.util.DomainType", "org.apache.http.impl.conn.DefaultHttpClientConnectionOperator", "org.apache.http.impl.conn.DefaultSchemePortResolver", "org.apache.http.impl.conn.SystemDefaultDnsResolver", "org.apache.http.impl.conn.CPool", "org.apache.http.message.BasicLineFormatter", "org.apache.http.impl.io.DefaultHttpRequestWriterFactory", "org.apache.http.ProtocolVersion", "org.apache.http.HttpVersion", "org.apache.http.message.BasicLineParser", "org.apache.http.impl.EnglishReasonPhraseCatalog", "org.apache.http.impl.DefaultHttpResponseFactory", "org.apache.http.impl.conn.DefaultHttpResponseParserFactory", "org.apache.http.impl.entity.LaxContentLengthStrategy", "org.apache.http.impl.entity.StrictContentLengthStrategy", "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory", "org.apache.http.config.SocketConfig", "org.apache.http.client.config.RequestConfig", "org.apache.http.protocol.HttpRequestExecutor", "org.apache.http.impl.DefaultConnectionReuseStrategy", "org.apache.http.impl.client.DefaultClientConnectionReuseStrategy", "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy", "org.apache.http.impl.client.AuthenticationStrategyImpl", "org.apache.http.impl.client.TargetAuthenticationStrategy", "org.apache.http.impl.client.ProxyAuthenticationStrategy", "org.apache.http.impl.client.DefaultUserTokenHandler", "org.apache.http.util.VersionInfo", "org.apache.http.client.protocol.RequestClientConnControl", "org.apache.http.client.protocol.ResponseContentEncoding", "org.apache.http.impl.client.DefaultHttpRequestRetryHandler", "org.apache.http.impl.client.DefaultRedirectStrategy", "org.apache.http.impl.cookie.DefaultCookieSpecProvider$CompatibilityLevel", "org.apache.http.impl.cookie.RFC6265CookieSpecProvider$CompatibilityLevel", "org.apache.http.impl.client.BasicCookieStore", "org.apache.http.cookie.CookieIdentityComparator", "org.openqa.selenium.logging.LocalLogs", "org.openqa.selenium.remote.internal.ApacheHttpClient", "org.apache.http.HttpHost", "org.openqa.selenium.remote.ErrorHandler", "com.google.common.collect.ImmutableSet", "com.google.common.collect.ImmutableCollection$Builder", "com.google.common.collect.Hashing", "com.google.common.collect.ImmutableSet$Indexed", "com.google.common.collect.RegularImmutableSet", "com.google.common.collect.ImmutableAsList", "com.google.common.collect.RegularImmutableAsList", "com.google.common.collect.Iterators", "org.openqa.selenium.remote.ErrorCodes", "org.openqa.selenium.logging.LoggingHandler", "org.openqa.selenium.logging.LoggingPreferences", "com.google.common.collect.SingletonImmutableSet", "org.openqa.selenium.remote.RemoteLogs", "com.google.common.collect.ImmutableEntry", "com.google.common.collect.ImmutableMapEntry", "com.google.common.collect.SingletonImmutableBiMap", "org.openqa.selenium.remote.RemoteWebDriver$When", "org.openqa.selenium.remote.RemoteWebDriver$1", "org.openqa.selenium.remote.ProtocolHandshake", "org.openqa.selenium.logging.LogEntry", "org.openqa.selenium.logging.profiler.EventType", "com.google.common.collect.RegularImmutableMap", "com.google.common.collect.ImmutableMapEntry$NonTerminalImmutableMapEntry", "com.google.gson.internal.$Gson$Types", "com.google.gson.Gson", "com.google.gson.internal.Excluder", "com.google.gson.FieldNamingPolicy$1", "com.google.gson.FieldNamingPolicy$2", "com.google.gson.FieldNamingPolicy$3", "com.google.gson.FieldNamingPolicy$4", "com.google.gson.FieldNamingPolicy$5", "com.google.gson.FieldNamingPolicy", "com.google.gson.LongSerializationPolicy$1", "com.google.gson.LongSerializationPolicy$2", "com.google.gson.LongSerializationPolicy", "com.google.gson.internal.bind.TypeAdapters$27", "com.google.gson.internal.bind.TypeAdapters", "com.google.gson.internal.bind.ObjectTypeAdapter", "com.google.gson.internal.bind.DateTypeAdapter", "com.google.gson.internal.bind.TimeTypeAdapter", "com.google.gson.internal.bind.SqlDateTypeAdapter", "com.google.gson.internal.bind.ArrayTypeAdapter", "com.google.gson.stream.JsonWriter", "com.google.common.collect.ImmutableMapEntrySet", "com.google.common.collect.ImmutableMapEntrySet$RegularEntrySet", "org.openqa.selenium.remote.BeanToJsonConverter", "com.google.gson.internal.LinkedTreeMap", "com.google.gson.JsonPrimitive", "com.google.common.primitives.Ints", "com.google.gson.internal.bind.JsonTreeWriter", "com.google.gson.JsonNull", "com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl", "com.google.common.base.Charsets", "org.openqa.selenium.remote.http.HttpMethod", "com.google.common.collect.AbstractMapBasedMultimap", "com.google.common.collect.AbstractListMultimap", "com.google.common.collect.Multimaps$CustomListMultimap", "com.google.common.base.Ascii", "com.google.common.collect.ImmutableMultimap", "com.google.common.collect.ImmutableListMultimap", "com.google.common.collect.MultimapBuilder", "com.google.common.collect.MultimapBuilder$MultimapBuilderWithKeys", "com.google.common.collect.MultimapBuilder$ArrayListSupplier", "com.google.common.collect.SingletonImmutableList", "com.google.common.base.CharMatcher$Whitespace", "com.google.common.base.CharMatcher$BreakingWhitespace", "com.google.common.base.CharMatcher$Ascii", "com.google.common.base.CharMatcher$Digit", "com.google.common.base.CharMatcher$JavaDigit", "com.google.common.base.CharMatcher$JavaLetter", "com.google.common.base.CharMatcher$JavaLetterOrDigit", "com.google.common.base.CharMatcher$JavaUpperCase", "com.google.common.base.CharMatcher$JavaLowerCase", "com.google.common.base.CharMatcher$JavaIsoControl", "com.google.common.base.CharMatcher$Invisible", "com.google.common.base.CharMatcher$SingleWidth", "com.google.common.base.CharMatcher$Any", "com.google.common.base.CharMatcher$None", "com.google.common.base.CharMatcher", "com.google.common.collect.EmptyImmutableListMultimap", "com.google.common.collect.ImmutableMultiset", "com.google.common.collect.AbstractMapBasedMultiset", "com.google.common.collect.LinkedHashMultiset", "com.google.common.collect.Ordering", "com.google.common.collect.Multisets", "com.google.common.collect.Count", "com.google.common.collect.RegularImmutableMultiset", "com.google.common.collect.Multisets$ImmutableEntry", "com.google.common.net.MediaType", "com.google.common.collect.ImmutableMultimap$EntryCollection", "org.openqa.selenium.remote.internal.ApacheHttpClient$1", "org.apache.http.client.methods.HttpPost", "org.apache.http.message.HeaderGroup", "org.apache.http.message.BasicHeader", "org.apache.http.entity.AbstractHttpEntity", "com.google.common.io.ByteStreams", "org.apache.http.params.BasicHttpParams", "org.apache.http.message.BasicRequestLine", "org.apache.http.protocol.HttpCoreContext", "org.apache.http.client.protocol.HttpClientContext", "org.apache.http.auth.AuthProtocolState", "org.apache.http.impl.conn.SystemDefaultRoutePlanner$1", "org.apache.http.conn.routing.RouteInfo$TunnelType", "org.apache.http.conn.routing.RouteInfo$LayerType", "org.apache.http.impl.cookie.RFC2109Spec", "org.apache.http.impl.cookie.NetscapeDraftSpec", "org.apache.http.util.LangUtils", "org.apache.http.config.ConnectionConfig", "org.apache.http.config.MessageConstraints", "org.apache.http.util.ByteArrayBuffer", "org.apache.http.impl.io.SessionOutputBufferImpl", "org.apache.http.impl.HttpConnectionMetricsImpl", "org.apache.http.util.CharArrayBuffer", "org.apache.http.impl.io.AbstractMessageParser", "org.apache.http.impl.auth.HttpAuthenticator$1", "org.apache.http.protocol.HTTP", "org.apache.http.message.BasicStatusLine", "org.apache.http.message.BufferedHeader", "org.apache.http.impl.io.ContentLengthInputStream", "org.apache.http.message.BasicTokenIterator", "org.apache.http.message.TokenParser", "org.apache.http.message.BasicHeaderValueParser", "org.apache.http.impl.io.EmptyInputStream", "org.openqa.selenium.remote.http.HttpResponse", "org.apache.http.message.BasicNameValuePair", "com.google.gson.internal.JsonReaderInternalAccess", "com.google.gson.stream.JsonReader", "com.google.gson.stream.JsonToken", "com.google.gson.internal.bind.TypeAdapters$36", "com.google.gson.internal.LazilyParsedNumber", "org.openqa.selenium.remote.Dialect$1", "org.openqa.selenium.remote.Dialect$2", "org.openqa.selenium.remote.Dialect", "org.openqa.selenium.remote.SessionId", "org.openqa.selenium.remote.http.AbstractHttpCommandCodec", "org.openqa.selenium.remote.http.JsonHttpCommandCodec", "com.google.common.base.AbstractIterator$State", "com.google.common.base.AbstractIterator$1", "org.openqa.selenium.remote.http.JsonHttpResponseCodec", "po_utils.BasePageObject", "org.openqa.selenium.support.ui.FluentWait", "org.openqa.selenium.support.ui.WebDriverWait", "org.openqa.selenium.support.ui.Sleeper", "org.openqa.selenium.interactions.Actions", "org.openqa.selenium.interactions.PointerInput$Kind", "po_utils.Wait", "org.openqa.selenium.By$ByXPath", "po_utils.ConstantLocators", "com.google.common.base.Optional", "com.google.common.base.Absent", "org.openqa.selenium.support.ui.ExpectedConditions", "po_utils.NotTheRightInputValuesException", "po_utils.NotInTheRightPageObjectException", "org.apache.http.client.methods.HttpDelete", "org.openqa.selenium.net.Urls", "org.openqa.selenium.WebDriverException", "org.openqa.selenium.NotFoundException", "org.openqa.selenium.NoSuchElementException", "org.openqa.selenium.TimeoutException", "po_utils.PageObjectLogging", "org.apache.http.client.methods.HttpGet" ); } }
[ "11610522@mail.sustech.edu.cn" ]
11610522@mail.sustech.edu.cn
5dda2eb9ac0f04a0098e4a8e7cdf08b7dd308e95
3d462a3a7cd444f1896994d8950409b71d7a86dd
/flink-taxi-stream-processor/src/main/java/com/amazonaws/flink/refarch/events/PunctuatedAssigner.java
d57f786d970ab19ab8733656ff7f456d3dabb6f1
[ "Apache-2.0" ]
permissive
aws-samples/flink-stream-processing-refarch
eb5f723c2b30156c2f21b14238e85e5d53e3a5c0
cd73ea7546a59d387c566c70c25b323e4b6db9e8
refs/heads/master
2022-09-03T00:52:35.606193
2022-08-10T19:56:08
2022-08-10T19:56:08
86,844,331
50
27
Apache-2.0
2022-07-15T21:08:44
2017-03-31T17:30:51
Java
UTF-8
Java
false
false
1,457
java
/* * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.flink.refarch.events; import com.amazonaws.flink.refarch.events.kinesis.Event; import com.amazonaws.flink.refarch.events.kinesis.WatermarkEvent; import org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks; import org.apache.flink.streaming.api.watermark.Watermark; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PunctuatedAssigner implements AssignerWithPunctuatedWatermarks<Event> { private static final Logger LOG = LoggerFactory.getLogger(PunctuatedAssigner.class); @Override public long extractTimestamp(Event element, long previousElementTimestamp) { return element.getTimestamp(); } @Override public Watermark checkAndGetNextWatermark(Event lastElement, long extractedTimestamp) { return lastElement instanceof WatermarkEvent ? new Watermark(extractedTimestamp) : null; } }
[ "shausma@amazon.de" ]
shausma@amazon.de
db09ddc7b65c9c1da43b876ecd2e0b4156976266
90373267eb2bf7adbecc66f8c946825e964bca7f
/Unit017/src/Ship.java
0d760e3b5a930077431b8077c4dda54e15d031f1
[]
no_license
hbg/beg_harris_apcsa-p3
e3dd1a6eb8276c5015954f7772bfb39216fee85d
18722ac3e60cdc23de5d7a25cf36a12a93ae598a
refs/heads/master
2020-04-19T20:15:02.527393
2019-05-02T19:52:30
2019-05-02T19:52:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
//(c) A+ Computer Science //www.apluscompsci.com //Name - import java.io.File; import java.net.URL; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import javax.imageio.ImageIO; public class Ship extends MovingThing { private int speed; private Image image; public Ship() { this(10,10,10,10,10); } public Ship(int x, int y) { //add code here super(x, y); } public Ship(int x, int y, int s) { //add code here super(x, y); speed=s; } public Ship(int x, int y, int w, int h, int s) { super(x, y, w, h); speed=s; try { URL url = getClass().getResource("/images/ship.jpg"); image = ImageIO.read(url); } catch(Exception e) { //feel free to do something here System.out.println(e); } } public void setSpeed(int s) { //add more code speed = s; } public int getSpeed() { return speed; } public void move(String direction) { //add code here switch (direction) { case "LEFT": super.setX(Math.max(this.getX() - this.getSpeed(), 0)); break; case "RIGHT": super.setX(Math.min(this.getX() + this.getSpeed(), 750)); break; case "UP": super.setY(Math.max(0, this.getY() - this.getSpeed())); break; case "DOWN": super.setY(Math.min(this.getY() + this.getSpeed(), 500)); break; } } public void draw( Graphics window ) { window.drawImage(image,getX(),getY(),getWidth(),getHeight(),null); } public String toString() { return super.toString() + getSpeed(); } }
[ "legostarwarsguy02@gmail.com" ]
legostarwarsguy02@gmail.com
1433e53e866d1fb8310ef0c73c85242de6f51a75
ca021ff2fb3d5abdaf7f65fbaab776e869ccd7a5
/src/ebay/UniqueBinarySearchTrees.java
c1e4f230e4636b37eb527a53ca2bdc1793bc14da
[]
no_license
teddywang1992/leetcode
56ab4c072c9f0f2db31a0721294b1619a12856cd
7d676f2e67a1a2ba073a5c11fc5f17e8c6b77e69
refs/heads/master
2021-01-22T18:07:23.152614
2018-11-24T22:46:09
2018-11-24T22:46:09
100,737,117
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package ebay; public class UniqueBinarySearchTrees { public int numTrees(int n) { if (n <= 1) return 1; int[] dp = new int[n + 1]; dp[0] = 1; dp[1] = 1; for (int i = 2; i < n + 1; i++) { for (int j = 0; j < i; j++) { dp[i] += dp[i - j - 1] * dp[j]; } } return dp[n]; } }
[ "443909723@qq.com" ]
443909723@qq.com
6e0658d339982fb5feedb5312a908d0a6d9b3e05
df8a07b62e8ab6aa8b463c5ecc8e576af46c1f7e
/BakerSMS/app/src/androidTest/java/com/bakerkims/bakersms/ApplicationTest.java
8fb3055f872a8123799f55c8ceea4fdccf216524
[]
no_license
junhyunss/FreeApps
0d975d6d93246d2a53704b7b587fbc5bca655d01
595fa7634099c281c460a0353728fa39dd8c9ef8
refs/heads/master
2021-01-21T13:53:16.359418
2016-06-01T13:35:55
2016-06-01T13:35:55
53,113,406
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package com.bakerkims.bakersms; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "hyun8510@jun-ui-MacBook-Air.local" ]
hyun8510@jun-ui-MacBook-Air.local