blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
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
689M
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
131 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
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
1ea721ac28203154890db3f292355e85a4c6c0e6
5c114f3bfea03977e9b8a37e70a87de8287e3242
/core/src/ru/geekbrains/stargame/screen/star/Star.java
eefa8a25b694eeeaeff3244cf392a8978efec99f
[]
no_license
AlievShamil/StarGame
fc8758d411fd139ff69f833584ccfd41d9506552
ca9860d4f40d1027812756c7db853a7e79c00727
refs/heads/master
2021-08-15T14:56:31.593706
2017-11-17T21:42:36
2017-11-17T21:42:36
109,017,011
0
0
null
null
null
null
UTF-8
Java
false
false
2,204
java
package ru.geekbrains.stargame.screen.star; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Vector2; import ru.geekbrains.engine.math.Rect; import ru.geekbrains.engine.math.Rnd; import ru.geekbrains.engine.sprite.Sprite; /** * Класс, описывающий поведение звезды */ public class Star extends Sprite { // вектор скорости protected final Vector2 v = new Vector2(); // границы игрового мира private Rect worldBounds; /** * Конструктор Star * @param region текстура с изображением звезды * @param vx скорость по оси x * @param vy скорость по оси y * @param height высота звезды */ public Star(TextureRegion region, float vx, float vy, float height) { super(region); v.set(vx, vy); setHeightProportion(height); } /** * Изменение размера экрана * @param worldBounds новые границы игрового мира */ @Override public void resize(Rect worldBounds) { this.worldBounds = worldBounds; float posX = Rnd.nextFloat(this.worldBounds.getLeft(), this.worldBounds.getRight()); float posY = Rnd.nextFloat(this.worldBounds.getBottom(), this.worldBounds.getTop()); pos.set(posX, posY); } /** * Обновление позиции звезды * @param deltaTime смещение */ @Override public void update(float deltaTime) { pos.mulAdd(v, deltaTime); checkAndHandleBounds(); } /** * Проверка границ экрана для того чтобы вернуть звезду в игровое поле */ protected void checkAndHandleBounds() { if (getRight() < worldBounds.getLeft()) setLeft(worldBounds.getRight()); if (getLeft() > worldBounds.getRight()) setRight(worldBounds.getLeft()); if (getTop() < worldBounds.getBottom()) setBottom(worldBounds.getTop()); if (getBottom() > worldBounds.getTop()) setTop(worldBounds.getBottom()); } }
[ "inhuh005@gmail.com" ]
inhuh005@gmail.com
0898d5a6ab2167b524028789cabfc125698763a9
ee7f4be517694eca61754c1a58d841818b51703c
/src/main/java/com/example/hello/controller/PostApiController.java
b832396c7ef0321882dd9e82adca99b4f80bcd8f
[]
no_license
ksyk1205/Hello
3ef87cad0a802fb6ceb63b573d596cd25856ea66
5674294574422b1ad1b20c6c96c2b61c165891ce
refs/heads/master
2023-07-18T05:30:36.602916
2021-09-03T12:56:03
2021-09-03T12:56:03
402,770,101
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
package com.example.hello.controller; import com.example.hello.dto.PostRequestDto; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; @RestController @RequestMapping("/api") public class PostApiController { @PostMapping("/post") public void post(@RequestBody Map<String, Object> requestData){ requestData.entrySet().forEach(stringObjectEntry -> { System.out.println("key : "+ stringObjectEntry.getKey()); System.out.println("value : "+ stringObjectEntry.getValue()); }); } @PostMapping("/post02") public void post(@RequestBody PostRequestDto requestData){ System.out.println(requestData); } }
[ "ksyk1205@naver.com" ]
ksyk1205@naver.com
533f462f50edec28bb8d03be4e70a15c63d34060
0cc6e6c16bf427ca9afba6b835d1eb406702e8c8
/Core/java/com/l2jserver/gameserver/instancemanager/FourSepulchersManager.java
800aaef9c1fa13b8c5fd968b0dc80d0ea83837e6
[]
no_license
Kryspo/blaion
a19087d1533d763d977d4dcc8235a2d1a61890b8
7e34627b01f30aacc290b87e1ad69e81b9e9cc33
refs/heads/master
2020-03-21T15:01:15.618199
2018-06-28T07:35:50
2018-06-28T07:35:50
138,689,668
1
0
null
null
null
null
UTF-8
Java
false
false
51,283
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.instancemanager; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Calendar; import java.util.List; import java.util.Set; import java.util.concurrent.ScheduledFuture; import java.util.logging.Level; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.datatables.DoorTable; import com.l2jserver.gameserver.datatables.NpcTable; import com.l2jserver.gameserver.datatables.SpawnTable; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.L2Spawn; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.actor.instance.L2SepulcherMonsterInstance; import com.l2jserver.gameserver.model.actor.instance.L2SepulcherNpcInstance; import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.templates.chars.L2NpcTemplate; import com.l2jserver.gameserver.util.Util; import com.l2jserver.util.Rnd; import gnu.trove.map.hash.TIntIntHashMap; import gnu.trove.map.hash.TIntObjectHashMap; import javolution.util.FastList; import javolution.util.FastMap; /** * @author sandman */ public class FourSepulchersManager { protected static final Logger _log = Logger.getLogger(FourSepulchersManager.class.getName()); private static final String QUEST_ID = "Q00620_FourGoblets"; private static final int ENTRANCE_PASS = 7075; private static final int USED_PASS = 7261; private static final int CHAPEL_KEY = 7260; private static final int ANTIQUE_BROOCH = 7262; protected boolean _firstTimeRun; protected boolean _inEntryTime = false; protected boolean _inWarmUpTime = false; protected boolean _inAttackTime = false; protected boolean _inCoolDownTime = false; protected ScheduledFuture<?> _changeCoolDownTimeTask = null; protected ScheduledFuture<?> _changeEntryTimeTask = null; protected ScheduledFuture<?> _changeWarmUpTimeTask = null; protected ScheduledFuture<?> _changeAttackTimeTask = null; protected ScheduledFuture<?> _onPartyAnnihilatedTask = null; private final int[][] _startHallSpawn = { { 181632, -85587, -7218 }, { 179963, -88978, -7218 }, { 173217, -86132, -7218 }, { 175608, -82296, -7218 } }; private final int[][][] _shadowSpawnLoc = { { { 25339, 191231, -85574, -7216, 33380 }, { 25349, 189534, -88969, -7216, 32768 }, { 25346, 173195, -76560, -7215, 49277 }, { 25342, 175591, -72744, -7215, 49317 } }, { { 25342, 191231, -85574, -7216, 33380 }, { 25339, 189534, -88969, -7216, 32768 }, { 25349, 173195, -76560, -7215, 49277 }, { 25346, 175591, -72744, -7215, 49317 } }, { { 25346, 191231, -85574, -7216, 33380 }, { 25342, 189534, -88969, -7216, 32768 }, { 25339, 173195, -76560, -7215, 49277 }, { 25349, 175591, -72744, -7215, 49317 } }, { { 25349, 191231, -85574, -7216, 33380 }, { 25346, 189534, -88969, -7216, 32768 }, { 25342, 173195, -76560, -7215, 49277 }, { 25339, 175591, -72744, -7215, 49317 } }, }; protected FastMap<Integer, Boolean> _archonSpawned = new FastMap<>(); protected FastMap<Integer, Boolean> _hallInUse = new FastMap<>(); protected FastMap<Integer, L2PcInstance> _challengers = new FastMap<>(); protected TIntObjectHashMap<int[]> _startHallSpawns = new TIntObjectHashMap<>(); protected TIntIntHashMap _hallGateKeepers = new TIntIntHashMap(); protected TIntIntHashMap _keyBoxNpc = new TIntIntHashMap(); protected TIntIntHashMap _victim = new TIntIntHashMap(); protected TIntObjectHashMap<L2Spawn> _executionerSpawns = new TIntObjectHashMap<>(); protected TIntObjectHashMap<L2Spawn> _keyBoxSpawns = new TIntObjectHashMap<>(); protected TIntObjectHashMap<L2Spawn> _mysteriousBoxSpawns = new TIntObjectHashMap<>(); protected TIntObjectHashMap<L2Spawn> _shadowSpawns = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2Spawn>> _dukeFinalMobs = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2SepulcherMonsterInstance>> _dukeMobs = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2Spawn>> _emperorsGraveNpcs = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2Spawn>> _magicalMonsters = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2Spawn>> _physicalMonsters = new TIntObjectHashMap<>(); protected TIntObjectHashMap<FastList<L2SepulcherMonsterInstance>> _viscountMobs = new TIntObjectHashMap<>(); protected FastList<L2Spawn> _physicalSpawns; protected FastList<L2Spawn> _magicalSpawns; protected FastList<L2Spawn> _managers; protected FastList<L2Spawn> _dukeFinalSpawns; protected FastList<L2Spawn> _emperorsGraveSpawns; protected FastList<L2Npc> _allMobs = new FastList<>(); protected long _attackTimeEnd = 0; protected long _coolDownTimeEnd = 0; protected long _entryTimeEnd = 0; protected long _warmUpTimeEnd = 0; protected byte _newCycleMin = 55; private FourSepulchersManager() { } public static final FourSepulchersManager getInstance() { return SingletonHolder._instance; } public void init() { if (_changeCoolDownTimeTask != null) { _changeCoolDownTimeTask.cancel(true); } if (_changeEntryTimeTask != null) { _changeEntryTimeTask.cancel(true); } if (_changeWarmUpTimeTask != null) { _changeWarmUpTimeTask.cancel(true); } if (_changeAttackTimeTask != null) { _changeAttackTimeTask.cancel(true); } _changeCoolDownTimeTask = null; _changeEntryTimeTask = null; _changeWarmUpTimeTask = null; _changeAttackTimeTask = null; _inEntryTime = false; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = false; _firstTimeRun = true; initFixedInfo(); loadMysteriousBox(); initKeyBoxSpawns(); loadPhysicalMonsters(); loadMagicalMonsters(); initLocationShadowSpawns(); initExecutionerSpawns(); loadDukeMonsters(); loadEmperorsGraveMonsters(); spawnManagers(); timeSelector(); } // phase select on server launch protected void timeSelector() { timeCalculator(); long currentTime = Calendar.getInstance().getTimeInMillis(); // if current time >= time of entry beginning and if current time < time // of entry beginning + time of entry end if ((currentTime >= _coolDownTimeEnd) && (currentTime < _entryTimeEnd)) // entry // time // check { clean(); _changeEntryTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeEntryTime(), 0); _log.info("FourSepulchersManager: Beginning in Entry time"); } else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup // time // check { clean(); _changeWarmUpTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeWarmUpTime(), 0); _log.info("FourSepulchersManager: Beginning in WarmUp time"); } else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack // time // check { clean(); _changeAttackTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeAttackTime(), 0); _log.info("FourSepulchersManager: Beginning in Attack time"); } else // else cooldown time and without cleanup because it's already // implemented { _changeCoolDownTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeCoolDownTime(), 0); _log.info("FourSepulchersManager: Beginning in Cooldown time"); } } // phase end times calculator protected void timeCalculator() { Calendar tmp = Calendar.getInstance(); if (tmp.get(Calendar.MINUTE) < _newCycleMin) { tmp.set(Calendar.HOUR, Calendar.getInstance().get(Calendar.HOUR) - 1); } tmp.set(Calendar.MINUTE, _newCycleMin); _coolDownTimeEnd = tmp.getTimeInMillis(); _entryTimeEnd = _coolDownTimeEnd + (Config.FS_TIME_ENTRY * 60000l); _warmUpTimeEnd = _entryTimeEnd + (Config.FS_TIME_WARMUP * 60000l); _attackTimeEnd = _warmUpTimeEnd + (Config.FS_TIME_ATTACK * 60000l); } public void clean() { for (int i = 31921; i < 31925; i++) { int[] Location = _startHallSpawns.get(i); GrandBossManager.getInstance().getZone(Location[0], Location[1], Location[2]).oustAllPlayers(); } deleteAllMobs(); closeAllDoors(); _hallInUse.clear(); _hallInUse.put(31921, false); _hallInUse.put(31922, false); _hallInUse.put(31923, false); _hallInUse.put(31924, false); if (_archonSpawned.size() != 0) { Set<Integer> npcIdSet = _archonSpawned.keySet(); for (int npcId : npcIdSet) { _archonSpawned.put(npcId, false); } } } protected void spawnManagers() { _managers = new FastList<>(); // L2Spawn spawnDat; int i = 31921; for (L2Spawn spawnDat; i <= 31924; i++) { if ((i < 31921) || (i > 31924)) { continue; } L2NpcTemplate template1 = NpcTable.getInstance().getTemplate(i); if (template1 == null) { continue; } try { spawnDat = new L2Spawn(template1); spawnDat.setAmount(1); spawnDat.setRespawnDelay(60); switch (i) { case 31921: // conquerors spawnDat.setXLocation(181061); spawnDat.setYLocation(-85595); spawnDat.setZLocation(-7200); spawnDat.setHeading(-32584); break; case 31922: // emperors spawnDat.setXLocation(179292); spawnDat.setYLocation(-88981); spawnDat.setZLocation(-7200); spawnDat.setHeading(-33272); break; case 31923: // sages spawnDat.setXLocation(173202); spawnDat.setYLocation(-87004); spawnDat.setZLocation(-7200); spawnDat.setHeading(-16248); break; case 31924: // judges spawnDat.setXLocation(175606); spawnDat.setYLocation(-82853); spawnDat.setZLocation(-7200); spawnDat.setHeading(-16248); break; } _managers.add(spawnDat); SpawnTable.getInstance().addNewSpawn(spawnDat, false); spawnDat.doSpawn(); spawnDat.startRespawn(); _log.info("FourSepulchersManager: spawned " + spawnDat.getTemplate().getName()); } catch (Exception e) { _log.log(Level.WARNING, "Error while spawning managers: " + e.getMessage(), e); } } } protected void initFixedInfo() { _startHallSpawns.put(31921, _startHallSpawn[0]); _startHallSpawns.put(31922, _startHallSpawn[1]); _startHallSpawns.put(31923, _startHallSpawn[2]); _startHallSpawns.put(31924, _startHallSpawn[3]); _hallInUse.put(31921, false); _hallInUse.put(31922, false); _hallInUse.put(31923, false); _hallInUse.put(31924, false); _hallGateKeepers.put(31925, 25150012); _hallGateKeepers.put(31926, 25150013); _hallGateKeepers.put(31927, 25150014); _hallGateKeepers.put(31928, 25150015); _hallGateKeepers.put(31929, 25150016); _hallGateKeepers.put(31930, 25150002); _hallGateKeepers.put(31931, 25150003); _hallGateKeepers.put(31932, 25150004); _hallGateKeepers.put(31933, 25150005); _hallGateKeepers.put(31934, 25150006); _hallGateKeepers.put(31935, 25150032); _hallGateKeepers.put(31936, 25150033); _hallGateKeepers.put(31937, 25150034); _hallGateKeepers.put(31938, 25150035); _hallGateKeepers.put(31939, 25150036); _hallGateKeepers.put(31940, 25150022); _hallGateKeepers.put(31941, 25150023); _hallGateKeepers.put(31942, 25150024); _hallGateKeepers.put(31943, 25150025); _hallGateKeepers.put(31944, 25150026); _keyBoxNpc.put(18120, 31455); _keyBoxNpc.put(18121, 31455); _keyBoxNpc.put(18122, 31455); _keyBoxNpc.put(18123, 31455); _keyBoxNpc.put(18124, 31456); _keyBoxNpc.put(18125, 31456); _keyBoxNpc.put(18126, 31456); _keyBoxNpc.put(18127, 31456); _keyBoxNpc.put(18128, 31457); _keyBoxNpc.put(18129, 31457); _keyBoxNpc.put(18130, 31457); _keyBoxNpc.put(18131, 31457); _keyBoxNpc.put(18149, 31458); _keyBoxNpc.put(18150, 31459); _keyBoxNpc.put(18151, 31459); _keyBoxNpc.put(18152, 31459); _keyBoxNpc.put(18153, 31459); _keyBoxNpc.put(18154, 31460); _keyBoxNpc.put(18155, 31460); _keyBoxNpc.put(18156, 31460); _keyBoxNpc.put(18157, 31460); _keyBoxNpc.put(18158, 31461); _keyBoxNpc.put(18159, 31461); _keyBoxNpc.put(18160, 31461); _keyBoxNpc.put(18161, 31461); _keyBoxNpc.put(18162, 31462); _keyBoxNpc.put(18163, 31462); _keyBoxNpc.put(18164, 31462); _keyBoxNpc.put(18165, 31462); _keyBoxNpc.put(18183, 31463); _keyBoxNpc.put(18184, 31464); _keyBoxNpc.put(18212, 31465); _keyBoxNpc.put(18213, 31465); _keyBoxNpc.put(18214, 31465); _keyBoxNpc.put(18215, 31465); _keyBoxNpc.put(18216, 31466); _keyBoxNpc.put(18217, 31466); _keyBoxNpc.put(18218, 31466); _keyBoxNpc.put(18219, 31466); _victim.put(18150, 18158); _victim.put(18151, 18159); _victim.put(18152, 18160); _victim.put(18153, 18161); _victim.put(18154, 18162); _victim.put(18155, 18163); _victim.put(18156, 18164); _victim.put(18157, 18165); } private void loadMysteriousBox() { Connection con = null; _mysteriousBoxSpawns.clear(); try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY id"); statement.setInt(1, 0); ResultSet rset = statement.executeQuery(); L2Spawn spawnDat; L2NpcTemplate template1; while (rset.next()) { template1 = NpcTable.getInstance().getTemplate(rset.getInt("npc_templateid")); if (template1 != null) { spawnDat = new L2Spawn(template1); spawnDat.setAmount(rset.getInt("count")); spawnDat.setXLocation(rset.getInt("locx")); spawnDat.setYLocation(rset.getInt("locy")); spawnDat.setZLocation(rset.getInt("locz")); spawnDat.setHeading(rset.getInt("heading")); spawnDat.setRespawnDelay(rset.getInt("respawn_delay")); SpawnTable.getInstance().addNewSpawn(spawnDat, false); int keyNpcId = rset.getInt("key_npc_id"); _mysteriousBoxSpawns.put(keyNpcId, spawnDat); } else { _log.warning("FourSepulchersManager.LoadMysteriousBox: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + "."); } } rset.close(); statement.close(); _log.info("FourSepulchersManager: loaded " + _mysteriousBoxSpawns.size() + " Mysterious-Box spawns."); } catch (Exception e) { // problem with initializing spawn, go to next one _log.log(Level.WARNING, "FourSepulchersManager.LoadMysteriousBox: Spawn could not be initialized: " + e.getMessage(), e); } finally { L2DatabaseFactory.close(con); } } private void initKeyBoxSpawns() { L2Spawn spawnDat; L2NpcTemplate template; for (int keyNpcId : _keyBoxNpc.keys()) { try { template = NpcTable.getInstance().getTemplate(_keyBoxNpc.get(keyNpcId)); if (template != null) { spawnDat = new L2Spawn(template); spawnDat.setAmount(1); spawnDat.setXLocation(0); spawnDat.setYLocation(0); spawnDat.setZLocation(0); spawnDat.setHeading(0); spawnDat.setRespawnDelay(3600); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _keyBoxSpawns.put(keyNpcId, spawnDat); } else { _log.warning("FourSepulchersManager.InitKeyBoxSpawns: Data missing in NPC table for ID: " + _keyBoxNpc.get(keyNpcId) + "."); } } catch (Exception e) { _log.log(Level.WARNING, "FourSepulchersManager.InitKeyBoxSpawns: Spawn could not be initialized: " + e.getMessage(), e); } } } private void loadPhysicalMonsters() { _physicalMonsters.clear(); int loaded = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"); statement1.setInt(1, 1); ResultSet rset1 = statement1.executeQuery(); PreparedStatement statement2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist Where key_npc_id = ? and spawntype = ? ORDER BY id"); while (rset1.next()) { int keyNpcId = rset1.getInt("key_npc_id"); statement2.setInt(1, keyNpcId); statement2.setInt(2, 1); ResultSet rset2 = statement2.executeQuery(); statement2.clearParameters(); L2Spawn spawnDat; L2NpcTemplate template1; _physicalSpawns = new FastList<>(); while (rset2.next()) { template1 = NpcTable.getInstance().getTemplate(rset2.getInt("npc_templateid")); if (template1 != null) { spawnDat = new L2Spawn(template1); spawnDat.setAmount(rset2.getInt("count")); spawnDat.setXLocation(rset2.getInt("locx")); spawnDat.setYLocation(rset2.getInt("locy")); spawnDat.setZLocation(rset2.getInt("locz")); spawnDat.setHeading(rset2.getInt("heading")); spawnDat.setRespawnDelay(rset2.getInt("respawn_delay")); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _physicalSpawns.add(spawnDat); loaded++; } else { _log.warning("FourSepulchersManager.LoadPhysicalMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + "."); } } rset2.close(); _physicalMonsters.put(keyNpcId, _physicalSpawns); } rset1.close(); statement1.close(); statement2.close(); _log.info("FourSepulchersManager: loaded " + loaded + " Physical type monsters spawns."); } catch (Exception e) { // problem with initializing spawn, go to next one _log.log(Level.WARNING, "FourSepulchersManager.LoadPhysicalMonsters: Spawn could not be initialized: " + e.getMessage(), e); } finally { L2DatabaseFactory.close(con); } } private void loadMagicalMonsters() { _magicalMonsters.clear(); int loaded = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"); statement1.setInt(1, 2); ResultSet rset1 = statement1.executeQuery(); PreparedStatement statement2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"); while (rset1.next()) { int keyNpcId = rset1.getInt("key_npc_id"); statement2.setInt(1, keyNpcId); statement2.setInt(2, 2); ResultSet rset2 = statement2.executeQuery(); statement2.clearParameters(); L2Spawn spawnDat; L2NpcTemplate template1; _magicalSpawns = new FastList<>(); while (rset2.next()) { template1 = NpcTable.getInstance().getTemplate(rset2.getInt("npc_templateid")); if (template1 != null) { spawnDat = new L2Spawn(template1); spawnDat.setAmount(rset2.getInt("count")); spawnDat.setXLocation(rset2.getInt("locx")); spawnDat.setYLocation(rset2.getInt("locy")); spawnDat.setZLocation(rset2.getInt("locz")); spawnDat.setHeading(rset2.getInt("heading")); spawnDat.setRespawnDelay(rset2.getInt("respawn_delay")); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _magicalSpawns.add(spawnDat); loaded++; } else { _log.warning("FourSepulchersManager.LoadMagicalMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + "."); } } rset2.close(); _magicalMonsters.put(keyNpcId, _magicalSpawns); } rset1.close(); statement1.close(); statement2.close(); _log.info("FourSepulchersManager: loaded " + loaded + " Magical type monsters spawns."); } catch (Exception e) { // problem with initializing spawn, go to next one _log.log(Level.WARNING, "FourSepulchersManager.LoadMagicalMonsters: Spawn could not be initialized: " + e.getMessage(), e); } finally { L2DatabaseFactory.close(con); } } private void loadDukeMonsters() { _dukeFinalMobs.clear(); _archonSpawned.clear(); int loaded = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"); statement1.setInt(1, 5); ResultSet rset1 = statement1.executeQuery(); PreparedStatement statement2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"); while (rset1.next()) { int keyNpcId = rset1.getInt("key_npc_id"); statement2.setInt(1, keyNpcId); statement2.setInt(2, 5); ResultSet rset2 = statement2.executeQuery(); statement2.clearParameters(); L2Spawn spawnDat; L2NpcTemplate template1; _dukeFinalSpawns = new FastList<>(); while (rset2.next()) { template1 = NpcTable.getInstance().getTemplate(rset2.getInt("npc_templateid")); if (template1 != null) { spawnDat = new L2Spawn(template1); spawnDat.setAmount(rset2.getInt("count")); spawnDat.setXLocation(rset2.getInt("locx")); spawnDat.setYLocation(rset2.getInt("locy")); spawnDat.setZLocation(rset2.getInt("locz")); spawnDat.setHeading(rset2.getInt("heading")); spawnDat.setRespawnDelay(rset2.getInt("respawn_delay")); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _dukeFinalSpawns.add(spawnDat); loaded++; } else { _log.warning("FourSepulchersManager.LoadDukeMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + "."); } } rset2.close(); _dukeFinalMobs.put(keyNpcId, _dukeFinalSpawns); _archonSpawned.put(keyNpcId, false); } rset1.close(); statement1.close(); statement2.close(); _log.info("FourSepulchersManager: loaded " + loaded + " Church of duke monsters spawns."); } catch (Exception e) { // problem with initializing spawn, go to next one _log.log(Level.WARNING, "FourSepulchersManager.LoadDukeMonsters: Spawn could not be initialized: " + e.getMessage(), e); } finally { L2DatabaseFactory.close(con); } } private void loadEmperorsGraveMonsters() { _emperorsGraveNpcs.clear(); int loaded = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"); statement1.setInt(1, 6); ResultSet rset1 = statement1.executeQuery(); PreparedStatement statement2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? and spawntype = ? ORDER BY id"); while (rset1.next()) { int keyNpcId = rset1.getInt("key_npc_id"); statement2.setInt(1, keyNpcId); statement2.setInt(2, 6); ResultSet rset2 = statement2.executeQuery(); statement2.clearParameters(); L2Spawn spawnDat; L2NpcTemplate template1; _emperorsGraveSpawns = new FastList<>(); while (rset2.next()) { template1 = NpcTable.getInstance().getTemplate(rset2.getInt("npc_templateid")); if (template1 != null) { spawnDat = new L2Spawn(template1); spawnDat.setAmount(rset2.getInt("count")); spawnDat.setXLocation(rset2.getInt("locx")); spawnDat.setYLocation(rset2.getInt("locy")); spawnDat.setZLocation(rset2.getInt("locz")); spawnDat.setHeading(rset2.getInt("heading")); spawnDat.setRespawnDelay(rset2.getInt("respawn_delay")); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _emperorsGraveSpawns.add(spawnDat); loaded++; } else { _log.warning("FourSepulchersManager.LoadEmperorsGraveMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + "."); } } rset2.close(); _emperorsGraveNpcs.put(keyNpcId, _emperorsGraveSpawns); } rset1.close(); statement1.close(); statement2.close(); _log.info("FourSepulchersManager: loaded " + loaded + " Emperor's grave NPC spawns."); } catch (Exception e) { // problem with initializing spawn, go to next one _log.log(Level.WARNING, "FourSepulchersManager.LoadEmperorsGraveMonsters: Spawn could not be initialized: " + e.getMessage(), e); } finally { L2DatabaseFactory.close(con); } } protected void initLocationShadowSpawns() { int locNo = Rnd.get(4); final int[] gateKeeper = { 31929, 31934, 31939, 31944 }; L2Spawn spawnDat; L2NpcTemplate template; _shadowSpawns.clear(); for (int i = 0; i <= 3; i++) { template = NpcTable.getInstance().getTemplate(_shadowSpawnLoc[locNo][i][0]); if (template != null) { try { spawnDat = new L2Spawn(template); spawnDat.setAmount(1); spawnDat.setXLocation(_shadowSpawnLoc[locNo][i][1]); spawnDat.setYLocation(_shadowSpawnLoc[locNo][i][2]); spawnDat.setZLocation(_shadowSpawnLoc[locNo][i][3]); spawnDat.setHeading(_shadowSpawnLoc[locNo][i][4]); SpawnTable.getInstance().addNewSpawn(spawnDat, false); int keyNpcId = gateKeeper[i]; _shadowSpawns.put(keyNpcId, spawnDat); } catch (Exception e) { _log.log(Level.SEVERE, "Error on InitLocationShadowSpawns", e); } } else { _log.warning("FourSepulchersManager.InitLocationShadowSpawns: Data missing in NPC table for ID: " + _shadowSpawnLoc[locNo][i][0] + "."); } } } protected void initExecutionerSpawns() { L2Spawn spawnDat; L2NpcTemplate template; for (int keyNpcId : _victim.keys()) { try { template = NpcTable.getInstance().getTemplate(_victim.get(keyNpcId)); if (template != null) { spawnDat = new L2Spawn(template); spawnDat.setAmount(1); spawnDat.setXLocation(0); spawnDat.setYLocation(0); spawnDat.setZLocation(0); spawnDat.setHeading(0); spawnDat.setRespawnDelay(3600); SpawnTable.getInstance().addNewSpawn(spawnDat, false); _executionerSpawns.put(keyNpcId, spawnDat); } else { _log.warning("FourSepulchersManager.InitExecutionerSpawns: Data missing in NPC table for ID: " + _victim.get(keyNpcId) + "."); } } catch (Exception e) { _log.log(Level.WARNING, "FourSepulchersManager.InitExecutionerSpawns: Spawn could not be initialized: " + e.getMessage(), e); } } } public boolean isEntryTime() { return _inEntryTime; } public boolean isAttackTime() { return _inAttackTime; } public synchronized void tryEntry(L2Npc npc, L2PcInstance player) { int npcId = npc.getNpcId(); switch (npcId) { // ID ok case 31921: case 31922: case 31923: case 31924: break; // ID not ok default: if (!player.isGM()) { _log.warning("Player " + player.getName() + "(" + player.getObjectId() + ") tried to cheat in four sepulchers."); Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " tried to enter four sepulchers with invalid npc id.", Config.DEFAULT_PUNISH); } return; } if (_hallInUse.get(npcId).booleanValue()) { showHtmlFile(player, npcId + "-FULL.htm", npc, null); return; } if (Config.FS_PARTY_MEMBER_COUNT > 1) { if (!player.isInParty() || (player.getParty().getMemberCount() < Config.FS_PARTY_MEMBER_COUNT)) { showHtmlFile(player, npcId + "-SP.htm", npc, null); return; } if (!player.getParty().isLeader(player)) { showHtmlFile(player, npcId + "-NL.htm", npc, null); return; } for (L2PcInstance mem : player.getParty().getPartyMembers()) { QuestState qs = mem.getQuestState(QUEST_ID); if ((qs == null) || (!qs.isStarted() && !qs.isCompleted())) { showHtmlFile(player, npcId + "-NS.htm", npc, mem); return; } if (mem.getInventory().getItemByItemId(ENTRANCE_PASS) == null) { showHtmlFile(player, npcId + "-SE.htm", npc, mem); return; } if (player.getWeightPenalty() >= 3) { mem.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT)); return; } } } else if ((Config.FS_PARTY_MEMBER_COUNT <= 1) && player.isInParty()) { if (!player.getParty().isLeader(player)) { showHtmlFile(player, npcId + "-NL.htm", npc, null); return; } for (L2PcInstance mem : player.getParty().getPartyMembers()) { QuestState qs = mem.getQuestState(QUEST_ID); if ((qs == null) || (!qs.isStarted() && !qs.isCompleted())) { showHtmlFile(player, npcId + "-NS.htm", npc, mem); return; } if (mem.getInventory().getItemByItemId(ENTRANCE_PASS) == null) { showHtmlFile(player, npcId + "-SE.htm", npc, mem); return; } if (player.getWeightPenalty() >= 3) { mem.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT)); return; } } } else { QuestState qs = player.getQuestState(QUEST_ID); if ((qs == null) || (!qs.isStarted() && !qs.isCompleted())) { showHtmlFile(player, npcId + "-NS.htm", npc, player); return; } if (player.getInventory().getItemByItemId(ENTRANCE_PASS) == null) { showHtmlFile(player, npcId + "-SE.htm", npc, player); return; } if (player.getWeightPenalty() >= 3) { player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT)); return; } } if (!isEntryTime()) { showHtmlFile(player, npcId + "-NE.htm", npc, null); return; } showHtmlFile(player, npcId + "-OK.htm", npc, null); entry(npcId, player); } private void entry(int npcId, L2PcInstance player) { int[] Location = _startHallSpawns.get(npcId); int driftx; int drifty; if (Config.FS_PARTY_MEMBER_COUNT > 1) { List<L2PcInstance> members = new FastList<>(); for (L2PcInstance mem : player.getParty().getPartyMembers()) { if (!mem.isDead() && Util.checkIfInRange(700, player, mem, true)) { members.add(mem); } } for (L2PcInstance mem : members) { GrandBossManager.getInstance().getZone(Location[0], Location[1], Location[2]).allowPlayerEntry(mem, 30); driftx = Rnd.get(-80, 80); drifty = Rnd.get(-80, 80); mem.teleToLocation(Location[0] + driftx, Location[1] + drifty, Location[2]); mem.destroyItemByItemId("Quest", ENTRANCE_PASS, 1, mem, true); if (mem.getInventory().getItemByItemId(ANTIQUE_BROOCH) == null) { mem.addItem("Quest", USED_PASS, 1, mem, true); } L2ItemInstance hallsKey = mem.getInventory().getItemByItemId(CHAPEL_KEY); if (hallsKey != null) { mem.destroyItemByItemId("Quest", CHAPEL_KEY, hallsKey.getCount(), mem, true); } } _challengers.remove(npcId); _challengers.put(npcId, player); _hallInUse.remove(npcId); _hallInUse.put(npcId, true); } if ((Config.FS_PARTY_MEMBER_COUNT <= 1) && player.isInParty()) { List<L2PcInstance> members = new FastList<>(); for (L2PcInstance mem : player.getParty().getPartyMembers()) { if (!mem.isDead() && Util.checkIfInRange(700, player, mem, true)) { members.add(mem); } } for (L2PcInstance mem : members) { GrandBossManager.getInstance().getZone(Location[0], Location[1], Location[2]).allowPlayerEntry(mem, 30); driftx = Rnd.get(-80, 80); drifty = Rnd.get(-80, 80); mem.teleToLocation(Location[0] + driftx, Location[1] + drifty, Location[2]); mem.destroyItemByItemId("Quest", ENTRANCE_PASS, 1, mem, true); if (mem.getInventory().getItemByItemId(ANTIQUE_BROOCH) == null) { mem.addItem("Quest", USED_PASS, 1, mem, true); } L2ItemInstance hallsKey = mem.getInventory().getItemByItemId(CHAPEL_KEY); if (hallsKey != null) { mem.destroyItemByItemId("Quest", CHAPEL_KEY, hallsKey.getCount(), mem, true); } } _challengers.remove(npcId); _challengers.put(npcId, player); _hallInUse.remove(npcId); _hallInUse.put(npcId, true); } else { GrandBossManager.getInstance().getZone(Location[0], Location[1], Location[2]).allowPlayerEntry(player, 30); driftx = Rnd.get(-80, 80); drifty = Rnd.get(-80, 80); player.teleToLocation(Location[0] + driftx, Location[1] + drifty, Location[2]); player.destroyItemByItemId("Quest", ENTRANCE_PASS, 1, player, true); if (player.getInventory().getItemByItemId(ANTIQUE_BROOCH) == null) { player.addItem("Quest", USED_PASS, 1, player, true); } L2ItemInstance hallsKey = player.getInventory().getItemByItemId(CHAPEL_KEY); if (hallsKey != null) { player.destroyItemByItemId("Quest", CHAPEL_KEY, hallsKey.getCount(), player, true); } _challengers.remove(npcId); _challengers.put(npcId, player); _hallInUse.remove(npcId); _hallInUse.put(npcId, true); } } public void spawnMysteriousBox(int npcId) { if (!isAttackTime()) { return; } L2Spawn spawnDat = _mysteriousBoxSpawns.get(npcId); if (spawnDat != null) { _allMobs.add(spawnDat.doSpawn()); spawnDat.stopRespawn(); } } public void spawnMonster(int npcId) { if (!isAttackTime()) { return; } FastList<L2Spawn> monsterList; FastList<L2SepulcherMonsterInstance> mobs = new FastList<>(); L2Spawn keyBoxMobSpawn; if (Rnd.get(2) == 0) { monsterList = _physicalMonsters.get(npcId); } else { monsterList = _magicalMonsters.get(npcId); } if (monsterList != null) { boolean spawnKeyBoxMob = false; boolean spawnedKeyBoxMob = false; for (L2Spawn spawnDat : monsterList) { if (spawnedKeyBoxMob) { spawnKeyBoxMob = false; } else { switch (npcId) { case 31469: case 31474: case 31479: case 31484: if (Rnd.get(48) == 0) { spawnKeyBoxMob = true; // _log.info("FourSepulchersManager.SpawnMonster: // Set to spawn Church of Viscount Key Mob."); } break; default: spawnKeyBoxMob = false; } } L2SepulcherMonsterInstance mob = null; if (spawnKeyBoxMob) { try { L2NpcTemplate template = NpcTable.getInstance().getTemplate(18149); if (template != null) { keyBoxMobSpawn = new L2Spawn(template); keyBoxMobSpawn.setAmount(1); keyBoxMobSpawn.setXLocation(spawnDat.getLocx()); keyBoxMobSpawn.setYLocation(spawnDat.getLocy()); keyBoxMobSpawn.setZLocation(spawnDat.getLocz()); keyBoxMobSpawn.setHeading(spawnDat.getHeading()); keyBoxMobSpawn.setRespawnDelay(3600); SpawnTable.getInstance().addNewSpawn(keyBoxMobSpawn, false); mob = (L2SepulcherMonsterInstance) keyBoxMobSpawn.doSpawn(); keyBoxMobSpawn.stopRespawn(); } else { _log.warning("FourSepulchersManager.SpawnMonster: Data missing in NPC table for ID: 18149"); } } catch (Exception e) { _log.log(Level.WARNING, "FourSepulchersManager.SpawnMonster: Spawn could not be initialized: " + e.getMessage(), e); } spawnedKeyBoxMob = true; } else { mob = (L2SepulcherMonsterInstance) spawnDat.doSpawn(); spawnDat.stopRespawn(); } if (mob != null) { mob.mysteriousBoxId = npcId; switch (npcId) { case 31469: case 31474: case 31479: case 31484: case 31472: case 31477: case 31482: case 31487: mobs.add(mob); } _allMobs.add(mob); } } switch (npcId) { case 31469: case 31474: case 31479: case 31484: _viscountMobs.put(npcId, mobs); break; case 31472: case 31477: case 31482: case 31487: _dukeMobs.put(npcId, mobs); break; } } } public synchronized boolean isViscountMobsAnnihilated(int npcId) { FastList<L2SepulcherMonsterInstance> mobs = _viscountMobs.get(npcId); if (mobs == null) { return true; } for (L2SepulcherMonsterInstance mob : mobs) { if (!mob.isDead()) { return false; } } return true; } public synchronized boolean isDukeMobsAnnihilated(int npcId) { FastList<L2SepulcherMonsterInstance> mobs = _dukeMobs.get(npcId); if (mobs == null) { return true; } for (L2SepulcherMonsterInstance mob : mobs) { if (!mob.isDead()) { return false; } } return true; } public void spawnKeyBox(L2Npc activeChar) { if (!isAttackTime()) { return; } L2Spawn spawnDat = _keyBoxSpawns.get(activeChar.getNpcId()); if (spawnDat != null) { spawnDat.setAmount(1); spawnDat.setXLocation(activeChar.getX()); spawnDat.setYLocation(activeChar.getY()); spawnDat.setZLocation(activeChar.getZ()); spawnDat.setHeading(activeChar.getHeading()); spawnDat.setRespawnDelay(3600); _allMobs.add(spawnDat.doSpawn()); spawnDat.stopRespawn(); } } public void spawnExecutionerOfHalisha(L2Npc activeChar) { if (!isAttackTime()) { return; } L2Spawn spawnDat = _executionerSpawns.get(activeChar.getNpcId()); if (spawnDat != null) { spawnDat.setAmount(1); spawnDat.setXLocation(activeChar.getX()); spawnDat.setYLocation(activeChar.getY()); spawnDat.setZLocation(activeChar.getZ()); spawnDat.setHeading(activeChar.getHeading()); spawnDat.setRespawnDelay(3600); _allMobs.add(spawnDat.doSpawn()); spawnDat.stopRespawn(); } } public void spawnArchonOfHalisha(int npcId) { if (!isAttackTime()) { return; } if (_archonSpawned.get(npcId)) { return; } FastList<L2Spawn> monsterList = _dukeFinalMobs.get(npcId); if (monsterList != null) { for (L2Spawn spawnDat : monsterList) { L2SepulcherMonsterInstance mob = (L2SepulcherMonsterInstance) spawnDat.doSpawn(); spawnDat.stopRespawn(); if (mob != null) { mob.mysteriousBoxId = npcId; _allMobs.add(mob); } } _archonSpawned.put(npcId, true); } } public void spawnEmperorsGraveNpc(int npcId) { if (!isAttackTime()) { return; } FastList<L2Spawn> monsterList = _emperorsGraveNpcs.get(npcId); if (monsterList != null) { for (L2Spawn spawnDat : monsterList) { _allMobs.add(spawnDat.doSpawn()); spawnDat.stopRespawn(); } } } protected void locationShadowSpawns() { int locNo = Rnd.get(4); // _log.info("FourSepulchersManager.LocationShadowSpawns: Location index // is " + locNo + "."); final int[] gateKeeper = { 31929, 31934, 31939, 31944 }; L2Spawn spawnDat; for (int i = 0; i <= 3; i++) { int keyNpcId = gateKeeper[i]; spawnDat = _shadowSpawns.get(keyNpcId); spawnDat.setXLocation(_shadowSpawnLoc[locNo][i][1]); spawnDat.setYLocation(_shadowSpawnLoc[locNo][i][2]); spawnDat.setZLocation(_shadowSpawnLoc[locNo][i][3]); spawnDat.setHeading(_shadowSpawnLoc[locNo][i][4]); _shadowSpawns.put(keyNpcId, spawnDat); } } public void spawnShadow(int npcId) { if (!isAttackTime()) { return; } L2Spawn spawnDat = _shadowSpawns.get(npcId); if (spawnDat != null) { L2SepulcherMonsterInstance mob = (L2SepulcherMonsterInstance) spawnDat.doSpawn(); spawnDat.stopRespawn(); if (mob != null) { mob.mysteriousBoxId = npcId; _allMobs.add(mob); } } } public void deleteAllMobs() { for (L2Npc mob : _allMobs) { if (mob == null) { continue; } try { if (mob.getSpawn() != null) { mob.getSpawn().stopRespawn(); } mob.deleteMe(); } catch (Exception e) { _log.log(Level.SEVERE, "FourSepulchersManager: Failed deleting mob.", e); } } _allMobs.clear(); } protected void closeAllDoors() { for (int doorId : _hallGateKeepers.values()) { try { L2DoorInstance door = DoorTable.getInstance().getDoor(doorId); if (door != null) { door.closeMe(); } else { _log.warning("FourSepulchersManager: Attempted to close undefined door. doorId: " + doorId); } } catch (Exception e) { _log.log(Level.SEVERE, "FourSepulchersManager: Failed closing door", e); } } } protected byte minuteSelect(byte min) { if (((double) min % 5) != 0)// if doesn't divides on 5 fully { // mad table for selecting proper minutes... // may be there is a better way to do this switch (min) { case 6: case 7: min = 5; break; case 8: case 9: case 11: case 12: min = 10; break; case 13: case 14: case 16: case 17: min = 15; break; case 18: case 19: case 21: case 22: min = 20; break; case 23: case 24: case 26: case 27: min = 25; break; case 28: case 29: case 31: case 32: min = 30; break; case 33: case 34: case 36: case 37: min = 35; break; case 38: case 39: case 41: case 42: min = 40; break; case 43: case 44: case 46: case 47: min = 45; break; case 48: case 49: case 51: case 52: min = 50; break; case 53: case 54: case 56: case 57: min = 55; break; } } return min; } public void managerSay(byte min) { // for attack phase, sending message every 5 minutes if (_inAttackTime) { if (min < 5) { return; // do not shout when < 5 minutes } min = minuteSelect(min); String msg = min + " minute(s) have passed."; // now this is a // proper message^^ if (min == 90) { msg = "Game over. The teleport will appear momentarily"; } for (L2Spawn temp : _managers) { if (temp == null) { _log.warning("FourSepulchersManager: managerSay(): manager is null"); continue; } if (!(temp.getLastSpawn() instanceof L2SepulcherNpcInstance)) { _log.warning("FourSepulchersManager: managerSay(): manager is not Sepulcher instance"); continue; } // hall not used right now, so its manager will not tell you // anything :) // if you don't need this - delete next two lines. if (!_hallInUse.get(temp.getNpcId()).booleanValue()) { continue; } ((L2SepulcherNpcInstance) temp.getLastSpawn()).sayInShout(msg); } } else if (_inEntryTime) { String msg1 = "You may now enter the Sepulcher"; String msg2 = "If you place your hand on the stone statue in front of each sepulcher," + " you will be able to enter"; for (L2Spawn temp : _managers) { if (temp == null) { _log.warning("FourSepulchersManager: Something goes wrong in managerSay()..."); continue; } if (!(temp.getLastSpawn() instanceof L2SepulcherNpcInstance)) { _log.warning("FourSepulchersManager: Something goes wrong in managerSay()..."); continue; } ((L2SepulcherNpcInstance) temp.getLastSpawn()).sayInShout(msg1); ((L2SepulcherNpcInstance) temp.getLastSpawn()).sayInShout(msg2); } } } protected class ManagerSay implements Runnable { @Override public void run() { if (_inAttackTime) { Calendar tmp = Calendar.getInstance(); tmp.setTimeInMillis(Calendar.getInstance().getTimeInMillis() - _warmUpTimeEnd); if ((tmp.get(Calendar.MINUTE) + 5) < Config.FS_TIME_ATTACK) { managerSay((byte) tmp.get(Calendar.MINUTE)); // byte // because // minute // cannot be // more than // 59 ThreadPoolManager.getInstance().scheduleGeneral(new ManagerSay(), 5 * 60000); } // attack time ending chat else if ((tmp.get(Calendar.MINUTE) + 5) >= Config.FS_TIME_ATTACK) { managerSay((byte) 90); // sending a unique id :D } } else if (_inEntryTime) { managerSay((byte) 0); } } } protected class ChangeEntryTime implements Runnable { @Override public void run() { // _log.info("FourSepulchersManager:In Entry Time"); _inEntryTime = true; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = false; long interval = 0; // if this is first launch - search time when entry time will be // ended: // counting difference between time when entry time ends and current // time // and then launching change time task if (_firstTimeRun) { interval = _entryTimeEnd - Calendar.getInstance().getTimeInMillis(); } else { interval = Config.FS_TIME_ENTRY * 60000l; // else use stupid // method } // launching saying process... ThreadPoolManager.getInstance().scheduleGeneral(new ManagerSay(), 0); _changeWarmUpTimeTask = ThreadPoolManager.getInstance().scheduleEffect(new ChangeWarmUpTime(), interval); if (_changeEntryTimeTask != null) { _changeEntryTimeTask.cancel(true); _changeEntryTimeTask = null; } } } protected class ChangeWarmUpTime implements Runnable { @Override public void run() { // _log.info("FourSepulchersManager:In Warm-Up Time"); _inEntryTime = true; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = false; long interval = 0; // searching time when warmup time will be ended: // counting difference between time when warmup time ends and // current time // and then launching change time task if (_firstTimeRun) { interval = _warmUpTimeEnd - Calendar.getInstance().getTimeInMillis(); } else { interval = Config.FS_TIME_WARMUP * 60000l; } _changeAttackTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeAttackTime(), interval); if (_changeWarmUpTimeTask != null) { _changeWarmUpTimeTask.cancel(true); _changeWarmUpTimeTask = null; } } } protected class ChangeAttackTime implements Runnable { @Override public void run() { // _log.info("FourSepulchersManager:In Attack Time"); _inEntryTime = false; _inWarmUpTime = false; _inAttackTime = true; _inCoolDownTime = false; locationShadowSpawns(); spawnMysteriousBox(31921); spawnMysteriousBox(31922); spawnMysteriousBox(31923); spawnMysteriousBox(31924); if (!_firstTimeRun) { _warmUpTimeEnd = Calendar.getInstance().getTimeInMillis(); } long interval = 0; // say task if (_firstTimeRun) { for (double min = Calendar.getInstance().get(Calendar.MINUTE); min < _newCycleMin; min++) { // looking for next shout time.... if ((min % 5) == 0)// check if min can be divided by 5 { _log.info(Calendar.getInstance().getTime() + " Atk announce scheduled to " + min + " minute of this hour."); Calendar inter = Calendar.getInstance(); inter.set(Calendar.MINUTE, (int) min); ThreadPoolManager.getInstance().scheduleGeneral(new ManagerSay(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis()); break; } } } else { ThreadPoolManager.getInstance().scheduleGeneral(new ManagerSay(), 5 * 60400); } // searching time when attack time will be ended: // counting difference between time when attack time ends and // current time // and then launching change time task if (_firstTimeRun) { interval = _attackTimeEnd - Calendar.getInstance().getTimeInMillis(); } else { interval = Config.FS_TIME_ATTACK * 60000l; } _changeCoolDownTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeCoolDownTime(), interval); if (_changeAttackTimeTask != null) { _changeAttackTimeTask.cancel(true); _changeAttackTimeTask = null; } } } protected class ChangeCoolDownTime implements Runnable { @Override public void run() { // _log.info("FourSepulchersManager:In Cool-Down Time"); _inEntryTime = false; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = true; clean(); Calendar time = Calendar.getInstance(); // one hour = 55th min to 55 min of next hour, so we check for this, // also check for first launch if ((Calendar.getInstance().get(Calendar.MINUTE) > _newCycleMin) && !_firstTimeRun) { time.set(Calendar.HOUR, Calendar.getInstance().get(Calendar.HOUR) + 1); } time.set(Calendar.MINUTE, _newCycleMin); _log.info("FourSepulchersManager: Entry time: " + time.getTime()); if (_firstTimeRun) { _firstTimeRun = false; // cooldown phase ends event hour, so it // will be not first run } long interval = time.getTimeInMillis() - Calendar.getInstance().getTimeInMillis(); _changeEntryTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeEntryTime(), interval); if (_changeCoolDownTimeTask != null) { _changeCoolDownTimeTask.cancel(true); _changeCoolDownTimeTask = null; } } } public TIntIntHashMap getHallGateKeepers() { return _hallGateKeepers; } public void showHtmlFile(L2PcInstance player, String file, L2Npc npc, L2PcInstance member) { NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/SepulcherNpc/" + file); if (member != null) { html.replace("%member%", member.getName()); } player.sendPacket(html); } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final FourSepulchersManager _instance = new FourSepulchersManager(); } }
[ "cristianleon48@gmail.com" ]
cristianleon48@gmail.com
a4e77dd40b995f82725a4402212ce49f5f4f9cd6
a0863053b51af10fdcdc53c8ec778cfa216c3b37
/src/test/java/pages/US/Review.java
843d7720026929779cba8b07b52dd03d0fd1f97b
[]
no_license
Demianenko/ABSign
1f421d9d1d0a21fcaeb8f83fa395251999dabf40
d3a918ffc497f96c767a51c51fa5c8ead11c3588
refs/heads/master
2021-05-04T08:36:42.946057
2016-11-16T09:48:26
2016-11-16T09:48:26
69,579,847
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
package pages.US; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import pages.Page; /** * Created by user on 22.09.2016. */ public class Review extends Page { public Review(WebDriver driver) { super(driver); } @FindBy(xpath = "//*[@name=\"yt4\"]") private WebElement buttonBuyNow; public ThankYou clickButtonBuyNow(){ waitElementForClick(buttonBuyNow).click(); return PageFactory.initElements(driver,ThankYou.class); } }
[ "erlond@narod.ru" ]
erlond@narod.ru
0d0f4cc2143dcf2f5a55185e62042c4932812044
f68f5f80cdeeea74f5c94bed7c7f2ca5be0ee2f5
/tests/src/test/java/Tets.java
ddf211d57ca4800708aad752077f014df7ae1c37
[]
no_license
Proftaak-Semester3/AlienWarsPrototype
f1dd83e9e83337e2c21d293bf0e821f4da5a50c8
49df291759bd2c16c8784b98464898515c8dd8ae
refs/heads/master
2020-08-23T00:27:36.622663
2019-10-21T11:31:28
2019-10-21T11:31:28
216,506,543
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
import org.junit.Test; import static junit.framework.TestCase.assertTrue; public class Tets { @Test public void Test1() { assertTrue(true); } @Test public void Test2() { assertTrue(false); } }
[ "d.schoenmakers@student.fontys.nl" ]
d.schoenmakers@student.fontys.nl
c46c9462103246e8c3b7e54d416f15234332d698
ed166738e5dec46078b90f7cca13a3c19a1fd04b
/minor/guice-OOM-error-reproduction/src/main/java/gen/A_Gen36.java
e8eb35b27b8b2037b5b45f9375c40bd5c43f878d
[]
no_license
michalradziwon/script
39efc1db45237b95288fe580357e81d6f9f84107
1fd5f191621d9da3daccb147d247d1323fb92429
refs/heads/master
2021-01-21T21:47:16.432732
2016-03-23T02:41:50
2016-03-23T02:41:50
22,663,317
2
0
null
null
null
null
UTF-8
Java
false
false
326
java
package gen; public class A_Gen36 { @com.google.inject.Inject public A_Gen36(A_Gen37 a_gen37){ System.out.println(this.getClass().getCanonicalName() + " created. " + a_gen37 ); } @com.google.inject.Inject public void injectInterfaceWithoutImpl(gen.InterfaceWithoutImpl i){} // should expolode :) }
[ "michal.radzi.won@gmail.com" ]
michal.radzi.won@gmail.com
14099fddac4d067e6b4bcdc09e79aeba8e436bd9
0c34e8f8fd6c74d754b5865fcdd64914643f373f
/CoreJAVA/CoreJavaUST/CoreJava/src/com/dev/employeeDetail/EmployeeDetail.java
ce6163746d086a4f8036aeae2b6615b5d94bf6a6
[]
no_license
abin0406-abin/USTGlobal-HTD-Generic-24thJul19-Abinash_Choudhury
caf24d5143994ad926486fcf04f6c2bf8370812f
4fe6eb1755b381f7ef5541fd3fb74c68fa2afe28
refs/heads/master
2023-01-11T13:25:32.508490
2019-09-28T15:57:29
2019-09-28T15:57:29
209,713,219
0
0
null
2023-01-07T09:57:10
2019-09-20T05:38:32
JavaScript
UTF-8
Java
false
false
653
java
package com.dev.employeeDetail; public class EmployeeDetail { private int id; private String name; private String email; private String password; 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 void setPassword(String password) { this.password = password; } @Override public String toString() { return "EmployeeDetail [id=" + id + ", name=" + name + ", email=" + email + "]"; } }
[ "achoudhury600@gmail.com" ]
achoudhury600@gmail.com
397044ed35a1c0321ebcd1e56b4ce4ec400583e9
9e4022c3e71ae2664c485afe4f8e80629c7dfa32
/app/src/main/java/com/example/diaryproject/RegisterActivity.java
bd6143ff35c7dde42d3c0fae934da2ffba482341
[]
no_license
ansunon/DiaryApp
51c93b27a03a7da256b130dd31453e1fd02eab80
9b462901e0c0552b129bc686a130470ea7f8d4be
refs/heads/master
2021-02-06T05:43:26.054261
2020-03-12T10:05:45
2020-03-12T10:05:45
243,883,284
0
0
null
null
null
null
UTF-8
Java
false
false
3,104
java
package com.example.diaryproject; 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.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; 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; // 회원가입하는 부분 public class RegisterActivity extends AppCompatActivity { private long time = 0; // 취소 버튼을 누를때 사용하는 변수 private FirebaseAuth mAuth; private EditText editTextEmail; private EditText editTextPassword; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_register); // Initialize Firebase Auth mAuth = FirebaseAuth.getInstance(); editTextEmail = findViewById(R.id.edittext_email); editTextPassword = findViewById(R.id.edittext_password); Button button1 = (Button) findViewById(R.id.registerButton); // 이거 다시 변경해야한다. button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { createUser(editTextEmail.getText().toString(), editTextPassword.getText().toString()); // 아이다와 비밀번호를 가져오는 부분 } }); } private void createUser(final String email, final String password) { // 회원가입이 끝난다. mAuth.createUserWithEmailAndPassword(email, password).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 Toast.makeText(RegisterActivity.this, "createUserWithEmail:success", Toast.LENGTH_LONG).show(); } else { // 회원가입 실패하는 부분 Toast.makeText(RegisterActivity.this, "createUserWithEmail:failure", Toast.LENGTH_LONG).show(); } } }); } @Override public void onBackPressed() { // 메인에서는 취소를 두번 누르면 로그인 화면으로 이동 if (System.currentTimeMillis() - time >= 2000) { time = System.currentTimeMillis(); Toast.makeText(getApplicationContext(), "뒤로 버튼을 한번 더 누르면 로그인 화면으로 이동합니다.", Toast.LENGTH_SHORT).show(); } else if (System.currentTimeMillis() - time < 2000) { Intent intent = new Intent(this, LoginActivity.class); startActivity(intent); finish(); } } }
[ "ansunon221@gmail.com" ]
ansunon221@gmail.com
0930da6487c79fa4ace83f1ebcf6d4a86b875699
2d7fbdbb5190facf75d4c66a60f91f94725c51c6
/SysModules/interface/server/main/com/ibs/core/module/interfaces/dao/impl/CnlMsgDaoImpl.java
7bcfe18cfdfdac8fdd096b97d2633a6d643e1774
[]
no_license
Spole0168/pay_ssh
fca63946d3740b755bd3007861fe94d294a3247b
815b64532a9abd6c68fd5aff865ee07545971b96
refs/heads/master
2021-08-16T14:49:41.639676
2017-11-20T02:19:09
2017-11-20T02:19:09
111,350,790
0
1
null
null
null
null
UTF-8
Java
false
false
3,111
java
/* * IBS Payment project * Copyright IBS 2016-2020 */ /***********************************************************/ package com.ibs.core.module.interfaces.dao.impl; import java.util.Collection; import java.util.List; import com.ibs.core.module.cnltrans.domain.CnlMsgHis; import com.ibs.core.module.interfaces.dao.ICnlMsgDao; import com.ibs.core.module.interfaces.domain.CnlMsg; import com.ibs.core.module.mdmbasedata.common.Constants; import com.ibs.portal.framework.server.dao.hibernate.BaseEntityDao; import com.ibs.portal.framework.server.metadata.IPage; import com.ibs.portal.framework.server.metadata.QueryPage; /* * @created by : sicon * @version : 1.0 * @comments : code generated based on database T_CNL_MSG * @modify : your comments goes here (author,date,reason). */ public class CnlMsgDaoImpl extends BaseEntityDao<CnlMsg> implements ICnlMsgDao { public IPage<CnlMsg> findCnlMsgByPage(QueryPage queryPage) { logger.info("entering action::CnlMsgDaoImpl.findCnlMsgByPage()..."); return super.findPageBy(queryPage); } public CnlMsg load(String id) { logger.info("entering action::CnlMsgDaoImpl.load()..."); return super.load(id); } public void saveOrUpdate(CnlMsg cnlMsg) { logger.info("entering action::CnlMsgDaoImpl.saveOrUpdate()..."); super.saveOrUpdate(cnlMsg); } public List<CnlMsg> findByMsgCode(String msgCode){ logger.info("entering action::CnlMsgDaoImpl.findByMsgCode()..."); String sql="from CnlMsg where msgCode= '"+msgCode+"'"; List<CnlMsg> list= find(sql); return list; } public CnlMsg findByMsgCodeCnlCnlCode(String msgCode,String cnlCnlCode){ logger.debug("enter findByMsgCodeCnlCnlCode()"); String sql="from CnlMsg where msgCode=? and cnlCnlCode=? and isValid=?"; List<CnlMsg> list=getHibernateTemplate().find(sql, new Object[]{msgCode,cnlCnlCode,Constants.IS_VALID_VALID}); if(null!=list&&list.size()>0){ return list.get(0); } return null; } @Override public CnlMsg saveCnlMsg(CnlMsg cnlMsg) { logger.debug("enter saveMsg()"); // TODO Auto-generated method stub String msgCode=(String) getHibernateTemplate().save(cnlMsg); System.out.println(msgCode); return load(msgCode); } @Override public List<CnlMsg> findCnlMsg() { String sql = "from CnlMsg where (sysdate-(TO_DATE(TO_CHAR( createTime ,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')))>=90"; List<CnlMsg> list = super.find(sql); return (list == null || list.isEmpty())?null:list; } @Override public void saveCnlMsgHis(Collection<CnlMsgHis> cnlMsgHisList) { // TODO Auto-generated method stub super.getHibernateTemplate().saveOrUpdateAll(cnlMsgHisList); } @Override public boolean deleteCnlMsg() { try { String sql = " delete from CnlMsg WHERE (sysdate-(TO_DATE(TO_CHAR( createTime ,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')))>=90"; int execute = super.execute(sql); if (execute > 0) { return true; } return false; } catch (Exception e) { e.printStackTrace(); return false; } } }
[ "Spole_168@qq.com" ]
Spole_168@qq.com
69fa3de6301c46bee6d290dcd4d835af6c5d02d4
12a131b7008c219eadde8fc671f5bc546d551e8c
/src/main/java/in/pritha/dto/UserDTO.java
87fb19e4f67cbb2d88c5d8a78841d87217f62a81
[]
no_license
csys-fresher-batch-2021/weddingplanner-spring-pritha
440bc4602d0571a527581f27aa79c6950b34ea62
bfe5888915fef7ae1052e8c28db58c8e3d932a0e
refs/heads/main
2023-06-13T23:48:31.586442
2021-07-06T10:24:51
2021-07-06T10:24:51
375,683,398
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
package in.pritha.dto; import java.time.LocalDate; import org.springframework.data.annotation.Id; import org.springframework.data.relational.core.mapping.Column; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor @org.springframework.data.relational.core.mapping.Table("users") public class UserDTO { public UserDTO(String userName, String createPassWord, Long mobileNumber, LocalDate localDate, String active, String role) { super(); this.userName = userName; this.passWord = createPassWord; this.mobileNumber = mobileNumber; this.userActiveStatus = active; this.role = role; this.dateRegistered = localDate; } public UserDTO(String username, long mobileNumber, String password) { this.userName = username; this.mobileNumber = mobileNumber; this.passWord = password; } public UserDTO(String username, int userId, long mobileNumber, String passWord, String role) { this.userId = userId; this.userName = username; this.mobileNumber = mobileNumber; this.passWord = passWord; this.role = role; } @Column(value = "username") private String userName; @Id private Integer userId; @Column(value = "role") private String role; @Column(value = "mobile_number") private Long mobileNumber; @Column(value = "password") private String passWord; @Column(value = "registered_date") private LocalDate dateRegistered; @Column(value = "user_status") private String userActiveStatus; }
[ "prit2660@global.chainsys.com" ]
prit2660@global.chainsys.com
29185b7debd4a6a3646407a15e6f63b2c8124705
ead3a04055b3bd4163c124f66d3604b23cabb31f
/app/src/main/java/com/example/avitansh/servicemycar/SplashScreen.java
ba42112379a155811bd1f04135806e1f6a22ea67
[]
no_license
Avitansh-Sharma/ServiceMyCar
3793f6ea22e540a9e374a96c6724d45d6b3d41e9
483335385386b60d5f402b2f1406a3dc4f32655e
refs/heads/master
2016-09-13T09:45:57.658212
2016-04-11T20:33:19
2016-04-11T20:33:19
56,005,597
0
0
null
null
null
null
UTF-8
Java
false
false
2,209
java
package com.example.avitansh.servicemycar; /** * Created by avitansh on 3/20/2016. */ import android.app.Activity; import android.content.Intent; import android.graphics.PixelFormat; import android.os.Bundle; import android.view.Window; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.LinearLayout; public class SplashScreen extends Activity { public void onAttachedToWindow() { super.onAttachedToWindow(); Window window = getWindow(); window.setFormat(PixelFormat.RGBA_8888); } /** Called when the activity is first created. */ Thread splashTread; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splashscreen); StartAnimations(); } private void StartAnimations() { Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha); anim.reset(); LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay); l.clearAnimation(); l.startAnimation(anim); anim = AnimationUtils.loadAnimation(this, R.anim.translate); anim.reset(); ImageView iv = (ImageView) findViewById(R.id.splash); iv.clearAnimation(); iv.startAnimation(anim); splashTread = new Thread() { @Override public void run() { try { int waited = 0; // Splash screen pause time while (waited < 3500) { sleep(100); waited += 100; } Intent intent = new Intent(SplashScreen.this, LogIn.class); intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivity(intent); SplashScreen.this.finish(); } catch (InterruptedException e) { // do nothing } finally { SplashScreen.this.finish(); } } }; splashTread.start(); } }
[ "avitanss@uci.edu" ]
avitanss@uci.edu
bae7008e5450bf759793cd7675b9ae4f80fb96bd
809792ede00f148c9a07da194452c637e0eaa03d
/limelight_importer/src/main/java/org/yeastrc/limelight/limelight_importer/utils/ProteinAnnotationNameTruncationUtil.java
debee19115d127cad71c929a6f0013ea8a19566d
[ "Apache-2.0" ]
permissive
yeastrc/limelight-core
80eb23d62c3b967db42b12a3e90cd1b2878ea793
bc609c814f67393b787f31c4d813e8fec9ec1b96
refs/heads/master
2023-08-31T20:37:29.180350
2023-08-21T21:21:48
2023-08-21T21:21:48
159,243,534
5
3
Apache-2.0
2023-03-03T01:30:00
2018-11-26T22:52:14
TypeScript
UTF-8
Java
false
false
1,460
java
/* * Original author: Daniel Jaschob <djaschob .at. uw.edu> * * Copyright 2018 University of Washington - Seattle, WA * * 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.yeastrc.limelight.limelight_importer.utils; import org.yeastrc.limelight.limelight_importer.constants.FASTA_DataTruncationConstants; /** * Truncate the name property in protein annotation to value in FASTA_DataTruncationConstants * */ public class ProteinAnnotationNameTruncationUtil { /** * Truncate header name, if needed * * @param headerName * @return */ public static String truncateProteinAnnotationName( String headerName ) { // Truncate header name, if needed if ( headerName != null ) { if ( headerName.length() > FASTA_DataTruncationConstants.HEADER_NAME_MAX_LENGTH ) { headerName = headerName.substring( 0, FASTA_DataTruncationConstants.HEADER_NAME_MAX_LENGTH ); } } return headerName; } }
[ "djaschob@uw.edu" ]
djaschob@uw.edu
6c898a08b81b9ffaf860f8da169df2009861a92b
95db483ef03710f3185404833c3f8b64f2a26f69
/src/georouting/traversalAlgorithms/Direction.java
48d46454962a3383cdec7dfa00a8df7fd3ce97bb
[]
no_license
tfox12/Geographic-Routing
183e4a92d681dde6cf976b4a9046a9629740dfc3
1e4e10e97e9010e5571ca8b613710f84e749a3bd
refs/heads/master
2016-08-04T11:29:59.270429
2013-07-05T01:01:32
2013-07-05T01:01:32
2,656,731
1
0
null
null
null
null
UTF-8
Java
false
false
220
java
package georouting.traversalAlgorithms; /** * Direction is used by the face routing varients to specify what direction * the algorithm is traversing the face */ public enum Direction { CLOCKWISE , COUNTERCLOCKWISE }
[ "tfox12@kent.edu" ]
tfox12@kent.edu
4b8418c8af5c32b95d8492020c447c7a842d3041
989c5063d3420a573f2cd167b4e62a4452e1d0ba
/HuabanBeautyViewer/src/main/java/edward/njust/hbv/ImageInfo.java
2a1fe517727dc8855ed0089d215b755ba38d6178
[]
no_license
XLjavaHome/HuabanBeautyViewer
33693fb79af8aee2508f89dde4517e270447a43b
3fa5d25deb455f9900259a0dfd2bea18b485243f
refs/heads/master
2020-06-27T06:59:43.754986
2015-09-15T07:21:04
2015-09-15T07:21:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
844
java
package edward.njust.hbv; /** * Created by 朱凌峰 on 6-11. */ public class ImageInfo { private int pinId; private String key; private float ratio; public ImageInfo(int pinId, String key, float ratio) { this.pinId = pinId; this.key = key; this.ratio = ratio; } public float getRatio() { return ratio; } public void setRatio(float ratio) { this.ratio = ratio; } public int getPinId() { return pinId; } public void setPinId(int pinId) { this.pinId = pinId; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } @Override public String toString() { String s = "PinId:" + pinId + " Key:" + key + " ratio:" + ratio; return s; } }
[ "546683442@qq.com" ]
546683442@qq.com
1695fffaa598baf432ea17ea183c639f0f268d28
cd290c7a2821289385539e4f9a2bf5cb4f43ddfe
/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/homework9/org/apache/jsp/index_jsp.java
a0fd01757354b365f340bdb41cc9985223a4df6d
[]
no_license
chenjian-520/dxc-project--
acda619712b92d4442b62538f3b46b8d423f270f
f4c721a4f57558e4654bf7e29e605bd1298eb6f2
refs/heads/master
2020-05-25T04:24:52.784577
2019-05-20T11:41:23
2019-05-20T11:41:23
187,624,920
2
0
null
null
null
null
UTF-8
Java
false
false
5,735
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/8.5.37 * Generated at: 2019-04-01 02:06:31 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import com.hp.servlet.ServletWork; public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent, org.apache.jasper.runtime.JspSourceImports { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private static final java.util.Set<java.lang.String> _jspx_imports_packages; private static final java.util.Set<java.lang.String> _jspx_imports_classes; static { _jspx_imports_packages = new java.util.HashSet<>(); _jspx_imports_packages.add("javax.servlet"); _jspx_imports_packages.add("javax.servlet.http"); _jspx_imports_packages.add("javax.servlet.jsp"); _jspx_imports_classes = new java.util.HashSet<>(); _jspx_imports_classes.add("com.hp.servlet.ServletWork"); } private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public java.util.Set<java.lang.String> getPackageImports() { return _jspx_imports_packages; } public java.util.Set<java.lang.String> getClassImports() { return _jspx_imports_classes; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final java.lang.String _jspx_method = request.getMethod(); if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD"); return; } final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=utf-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); out.write("<!DOCTYPE html>\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<meta charset=\"utf-8\">\r\n"); out.write("<title>登录页面</title>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("\t<div style=\"color:#00FF00;background-color:#000000 ;width: 500px ; text-align:center;margin-left: 20%;margin-top: 200px\">\r\n"); out.write("\t\t<form action=\""); out.print(request.getContextPath()); out.write("/ServletWork\" method=\"post\" id=\"form1\">\r\n"); out.write("\t\tusername :<br>\r\n"); out.write("\t\t<input type=\"text\" name=\"username\" id=\"username\" ><br>\r\n"); out.write("\t\tpassword :<br>\r\n"); out.write("\t\t<input type=\"password\" name=\"password\" id=\"password\" >\r\n"); out.write("\t\t<br><br>\r\n"); out.write("\t\t<input type=\"Submit\" value=\"Submit\">\r\n"); out.write("\t\t</form> \r\n"); out.write("\t</div>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "563732435@qq.com" ]
563732435@qq.com
b5b067f264ec03f067d0860854c4e82dac8920cb
d5dd78adb1cff39a90cb01566889585cb552d5a2
/src/main/java/com/rache/data/calls/Payload.java
93318185bbb48c11bda4f5ee471c6acabc548d4f
[]
no_license
rBockRuby/SpoofingServer
ac65f51e6962989fdddf58e106625099c495292c
27d58d8b247866b767270fef91a79a5cfa48e42a
refs/heads/master
2022-06-29T10:45:10.723629
2019-09-05T21:38:54
2019-09-05T21:38:54
205,918,754
0
0
null
2022-06-21T01:49:13
2019-09-02T18:57:55
Java
UTF-8
Java
false
false
2,274
java
package com.rache.data.calls; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) public class Payload { private String to; private String start_time; private String from; private String call_control_id; private String connection_id; private String call_leg_id; private String call_session_id; private String client_state; private String direction; private String state; private String digits; public String getTo() { return to; } public void setTo(String to) { this.to = to; } public String getStart_time() { return start_time; } public void setStart_time(String start_time) { this.start_time = start_time; } public String getFrom() { return from; } public void setFrom(String from) { this.from = from; } public String getCall_control_id() { return call_control_id; } public void setCall_control_id(String call_control_id) { this.call_control_id = call_control_id; } public String getConnection_id() { return connection_id; } public void setConnection_id(String connection_id) { this.connection_id = connection_id; } public String getCall_leg_id() { return call_leg_id; } public void setCall_leg_id(String call_leg_id) { this.call_leg_id = call_leg_id; } public String getCall_session_id() { return call_session_id; } public void setCall_session_id(String call_session_id) { this.call_session_id = call_session_id; } public String getClient_state() { return client_state; } public void setClient_state(String client_state) { this.client_state = client_state; } public String getDirection() { return direction; } public void setDirection(String direction) { this.direction = direction; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getDigits() { return digits; } public void setDigits(String digits) { this.digits = digits; } }
[ "rachel.bock@callruby.com" ]
rachel.bock@callruby.com
1ce25b984fdcb1ecc98b669da6057e13b83a3ec0
688809f520a9ccf0e226bd818075b1b9ee640e50
/src/Main.java
ce9c07cfe6e23004961921969535740b1e2e1c01
[]
no_license
peterkrpeterkr/SDC-Converter
413aa100b0a412a82924215d1ec767aaead2cc61
0edd753ca19e79f888202dc5d0a75be43b817c65
refs/heads/master
2021-01-11T13:52:33.630594
2017-06-15T12:22:36
2017-06-15T12:22:36
94,870,051
0
0
null
null
null
null
UTF-8
Java
false
false
54,719
java
import java.io.File; import java.io.IOException; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.jf.dexlib2.AccessFlags; import org.jf.dexlib2.DexFileFactory; import org.jf.dexlib2.Format; import org.jf.dexlib2.Opcode; import org.jf.dexlib2.Opcodes; import org.jf.dexlib2.ReferenceType; import org.jf.dexlib2.dexbacked.DexBackedDexFile; import org.jf.dexlib2.dexbacked.DexBackedTypedExceptionHandler; import org.jf.dexlib2.dexbacked.instruction.*; import org.jf.dexlib2.iface.Annotation; import org.jf.dexlib2.iface.ClassDef; import org.jf.dexlib2.iface.DexFile; import org.jf.dexlib2.iface.ExceptionHandler; import org.jf.dexlib2.iface.Field; import org.jf.dexlib2.iface.Method; import org.jf.dexlib2.iface.MethodImplementation; import org.jf.dexlib2.iface.MethodParameter; import org.jf.dexlib2.iface.TryBlock; import org.jf.dexlib2.iface.instruction.Instruction; import org.jf.dexlib2.iface.instruction.formats.*; import org.jf.dexlib2.iface.reference.Reference; import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction; import org.jf.dexlib2.immutable.ImmutableClassDef; import org.jf.dexlib2.immutable.ImmutableDexFile; import org.jf.dexlib2.immutable.ImmutableExceptionHandler; import org.jf.dexlib2.immutable.ImmutableMethod; import org.jf.dexlib2.immutable.ImmutableMethodImplementation; import org.jf.dexlib2.immutable.ImmutableMethodParameter; import org.jf.dexlib2.immutable.ImmutableTryBlock; import org.jf.dexlib2.immutable.instruction.*; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction10t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction10x; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction11n; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction11x; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction20t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction21c; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction21t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction22t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction30t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction31t; import org.jf.dexlib2.immutable.instruction.ImmutableInstruction35c; import org.jf.dexlib2.immutable.reference.ImmutableFieldReference; import org.jf.dexlib2.immutable.reference.ImmutableMethodReference; import org.jf.dexlib2.immutable.reference.ImmutableStringReference; import org.jf.dexlib2.immutable.reference.ImmutableTypeReference; import org.jf.dexlib2.rewriter.DexRewriter; import org.jf.dexlib2.rewriter.Rewriter; import org.jf.dexlib2.rewriter.RewriterModule; import org.jf.dexlib2.util.ReferenceUtil; public class Main { static List<Method> encodedBlocks = new LinkedList<Method>(); static int API = 21; //api level static Set<Field> privateFields = new HashSet<Field>(); static Set<Method> privateMethods = new HashSet<Method>(); static List<Instruction> SDCB = new LinkedList<Instruction>();; public static void main(String[] arguments) { File f = new File("assets/classes.dex"); try { DexFile d = DexFileFactory.loadDexFile(f, Opcodes.forApi(API)); List<ClassDef> classes = new LinkedList<ClassDef>(); for (ClassDef c : d.getClasses()) { if (c.getSuperclass().toString() == null || !c.getSuperclass().equals("Landroid/support/v7/app/AppCompatActivity;")) { //System.out.println(c.getSuperclass().toString()+": Not Application"); classes.add(c); } else { List<Method> dmethods = new LinkedList<Method>(); List<Method> vmethods = new LinkedList<Method>(); for(Method m : c.getDirectMethods()) { dmethods.add(adjustedMethod(c, m)); } for(Method m : c.getVirtualMethods()) { vmethods.add(adjustedMethod(c, m)); } classes.add(new ImmutableClassDef(c.getType(), c.getAccessFlags(), c.getSuperclass(), c.getInterfaces(), c.getSourceFile(), c.getAnnotations(), c.getStaticFields(), c.getInstanceFields(), dmethods, vmethods)); } } DexFileFactory.writeDexFile("out/Output.dex", new ImmutableDexFile(Opcodes.forApi(API), classes)); classes.clear(); classes.add(new ImmutableClassDef("LSDC/ImportClass;", 1, "Ljava/lang/Object;", null, "ImportClass.java", null, null, null, encodedBlocks, null)); DexFileFactory.writeDexFile("out/ImportClass.dex", new ImmutableDexFile(Opcodes.forApi(API), classes)); } catch (IOException e) { System.out.println("IOException"); } } static private LinkedList<codeBlock> getSDCBlocks(Method method) { LinkedList<codeBlock> result = new LinkedList<codeBlock>(); int instructionsize = 0; codeBlock current = null; String returnType = null; String[] registerClasses = new String[method.getImplementation().getRegisterCount()]; String[] constants = new String[method.getImplementation().getRegisterCount()]; List<tInstruction> jumps = getTInstructions(method); int indexPointer = 0; if ((8 & method.getAccessFlags()) == 0) { registerClasses[(method.getImplementation().getRegisterCount()-method.getParameters().size())-1] = method.getDefiningClass(); } for(int i = 0; i< method.getParameters().size(); i++) { registerClasses[(method.getImplementation().getRegisterCount()-method.getParameters().size())+i] = (String) method.getParameterTypes().get(i); } if(method.getName().equals("method")) { System.out.println(method.getDefiningClass() + " " + method.getName() + " " +method.getImplementation().getRegisterCount()+ " " + method.getParameters().size()); for(String s : registerClasses) { System.out.println(s); } } for (Instruction in : method.getImplementation().getInstructions()) { if(current != null) { if(current.end == indexPointer) { for(int i = 0; i < method.getImplementation().getRegisterCount(); i++) { current.endClasses[i] = registerClasses[i]; } result.add(current); current = null; } else { current.instructions.add(in); } } switch(in.getOpcode().format) { case Format10t : break; case Format10x : break; case Format11n : Instruction11n inst11n = (Instruction11n) in; registerClasses[inst11n.getRegisterA()] = getTypeFromName(Integer.class.getName()); if (current != null) { current.registersActive[inst11n.getRegisterA()] = true; } break; case Format11x : Instruction11x inst11x = (Instruction11x) in; if (in.getOpcode().equals(Opcode.MOVE_RESULT) || in.getOpcode().equals(Opcode.MOVE_RESULT_OBJECT)) { registerClasses[inst11x.getRegisterA()] = returnType; } else if (in.getOpcode().equals(Opcode.MOVE_RESULT_WIDE)) { registerClasses[inst11x.getRegisterA()] = returnType; registerClasses[inst11x.getRegisterA()+1] = returnType; } if (current != null) { current.registersActive[inst11x.getRegisterA()] = true; if (in.getOpcode().equals(Opcode.MOVE_RESULT_WIDE)) { current.registersActive[inst11x.getRegisterA()+1] = true; } } break; case Format12x : Instruction12x inst12x = (Instruction12x) in; if (in.getOpcode().equals(Opcode.MOVE) || in.getOpcode().equals(Opcode.MOVE_WIDE) || in.getOpcode().equals(Opcode.MOVE_OBJECT)) { registerClasses[inst12x.getRegisterA()] = registerClasses[inst12x.getRegisterB()]; //registerClasses[inst12x.getRegisterB()] = null; ##Does move leave source register in peace? probably. } else if(in.getOpcode().equals(Opcode.ARRAY_LENGTH) || in.getOpcode().equals(Opcode.NEG_INT) || in.getOpcode().equals(Opcode.NOT_INT) || in.getOpcode().equals(Opcode.LONG_TO_INT) || in.getOpcode().equals(Opcode.FLOAT_TO_INT) || in.getOpcode().equals(Opcode.ADD_INT_2ADDR) || in.getOpcode().equals(Opcode.SUB_INT_2ADDR) || in.getOpcode().equals(Opcode.MUL_INT_2ADDR) || in.getOpcode().equals(Opcode.REM_INT_2ADDR) || in.getOpcode().equals(Opcode.DIV_INT_2ADDR) || in.getOpcode().equals(Opcode.AND_INT_2ADDR) || in.getOpcode().equals(Opcode.OR_INT_2ADDR) || in.getOpcode().equals(Opcode.XOR_INT_2ADDR) || in.getOpcode().equals(Opcode.SHL_INT_2ADDR) || in.getOpcode().equals(Opcode.SHR_INT_2ADDR) || in.getOpcode().equals(Opcode.USHR_INT_2ADDR)) { registerClasses[inst12x.getRegisterA()] = "I"; } else if(in.getOpcode().equals(Opcode.NEG_LONG) || in.getOpcode().equals(Opcode.NOT_LONG) || in.getOpcode().equals(Opcode.INT_TO_LONG) || in.getOpcode().equals(Opcode.FLOAT_TO_LONG) || in.getOpcode().equals(Opcode.DOUBLE_TO_LONG) || in.getOpcode().equals(Opcode.ADD_LONG_2ADDR) || in.getOpcode().equals(Opcode.SUB_LONG_2ADDR) || in.getOpcode().equals(Opcode.MUL_LONG_2ADDR) || in.getOpcode().equals(Opcode.DIV_LONG_2ADDR) || in.getOpcode().equals(Opcode.REM_LONG_2ADDR) || in.getOpcode().equals(Opcode.AND_LONG_2ADDR) || in.getOpcode().equals(Opcode.OR_LONG_2ADDR) || in.getOpcode().equals(Opcode.XOR_LONG_2ADDR) || in.getOpcode().equals(Opcode.SHL_LONG_2ADDR) || in.getOpcode().equals(Opcode.SHR_LONG_2ADDR) || in.getOpcode().equals(Opcode.USHR_LONG_2ADDR)) { registerClasses[inst12x.getRegisterA()] = "J"; } else if(in.getOpcode().equals(Opcode.NEG_FLOAT) || in.getOpcode().equals(Opcode.INT_TO_FLOAT) || in.getOpcode().equals(Opcode.LONG_TO_FLOAT) || in.getOpcode().equals(Opcode.DOUBLE_TO_FLOAT) || in.getOpcode().equals(Opcode.ADD_FLOAT_2ADDR) || in.getOpcode().equals(Opcode.SUB_FLOAT_2ADDR) || in.getOpcode().equals(Opcode.MUL_FLOAT_2ADDR) || in.getOpcode().equals(Opcode.DIV_FLOAT_2ADDR) || in.getOpcode().equals(Opcode.REM_FLOAT_2ADDR)) { registerClasses[inst12x.getRegisterA()] = "F"; } else { registerClasses[inst12x.getRegisterA()] = "D"; } break; case Format20bc : Instruction20bc inst20bc = (Instruction20bc) in; //TODO: potentially handling reference? 20bc might be useless break; case Format20t : Instruction20t inst20t = (Instruction20t) in; break; case Format21c : Instruction21c inst21c = (Instruction21c) in; if(current != null) { current.registersActive[inst21c.getRegisterA()] = true; } if(in.getOpcode().equals(Opcode.CHECK_CAST) || in.getOpcode().equals(Opcode.CONST_CLASS) || in.getOpcode().equals(Opcode.NEW_INSTANCE)) { registerClasses[inst21c.getRegisterA()] = inst21c.getReference().toString(); }else if(in.getOpcode().equals(Opcode.CONST_STRING)) { registerClasses[inst21c.getRegisterA()] = getTypeFromName(String.class.getTypeName()); constants[inst21c.getRegisterA()] = inst21c.getReference().toString(); } else if(in.getOpcode().equals(Opcode.SGET) || in.getOpcode().equals(Opcode.SGET_WIDE) || in.getOpcode().equals(Opcode.SGET_OBJECT) || in.getOpcode().equals(Opcode.SGET_BOOLEAN) || in.getOpcode().equals(Opcode.SGET_BYTE) || in.getOpcode().equals(Opcode.SGET_CHAR) || in.getOpcode().equals(Opcode.SGET_SHORT)) { registerClasses[inst21c.getRegisterA()] = inst21c.getReference().toString().substring(inst21c.getReference().toString().lastIndexOf("->TYPE:")+7); } break; case Format21ih : Instruction21ih inst21ih = (Instruction21ih) in; //no 21ih opcodes? probably const/high16 registerClasses[inst21ih.getRegisterA()] = "I"; break; case Format21lh : Instruction21lh inst21lh = (Instruction21lh) in; registerClasses[inst21lh.getRegisterA()] = "D"; //Used Double instead of Int since it's a double-register value break; case Format21s : Instruction21s inst21s = (Instruction21s) in; if(in.getOpcode().equals(Opcode.CONST_16)) { registerClasses[inst21s.getRegisterA()] = "I"; } else { registerClasses[inst21s.getRegisterA()] = "D"; } break; case Format21t : Instruction21t inst21t = (Instruction21t) in; if (in.getOpcode().equals(Opcode.IF_NEZ)){ current = new codeBlock(indexPointer, indexPointer + inst21t.getCodeOffset(), "0", method.getImplementation().getRegisterCount()); for (int i = 0; i < method.getImplementation().getRegisterCount(); i++) { current.startClasses[i] = registerClasses[i]; } } break; case Format22b : Instruction22b inst22b = (Instruction22b) in; registerClasses[inst22b.getRegisterA()] = "I"; break; case Format22c : Instruction22c inst22c = (Instruction22c) in; if (in.getOpcode().equals(Opcode.INSTANCE_OF)) { registerClasses[inst22c.getRegisterA()] = "Z"; } else if(in.getOpcode().equals(Opcode.NEW_ARRAY)) { registerClasses[inst22c.getRegisterA()] = inst22c.getReference().toString(); } else if(in.getOpcode().equals(Opcode.IGET) || in.getOpcode().equals(Opcode.IGET_WIDE) || in.getOpcode().equals(Opcode.IGET_OBJECT) || in.getOpcode().equals(Opcode.IGET_BOOLEAN) || in.getOpcode().equals(Opcode.IGET_BYTE) || in.getOpcode().equals(Opcode.IGET_CHAR) || in.getOpcode().equals(Opcode.IGET_SHORT) ) { //TODO: Maybe quick/volatile get instructions? Might not occur... registerClasses[inst22c.getRegisterA()] = "L"+inst22c.getReference().toString().substring(inst22c.getReference().toString().lastIndexOf(":") +2); } break; case Format22cs : //No 22cs operations? break; case Format22s : Instruction22s inst22s = (Instruction22s) in; registerClasses[inst22s.getRegisterA()] = "I"; break; case Format22t : Instruction22t inst22t = (Instruction22t) in; if(in.getOpcode().equals(Opcode.IF_NE) && constants[inst22t.getRegisterB()] != null) { current = new codeBlock(indexPointer, indexPointer + inst22t.getCodeOffset(), constants[inst22t.getRegisterB()], method.getImplementation().getRegisterCount()); } else if(in.getOpcode().equals(Opcode.IF_NE) && constants[inst22t.getRegisterA()] != null) { current = new codeBlock(indexPointer, indexPointer + inst22t.getCodeOffset(), constants[inst22t.getRegisterA()], method.getImplementation().getRegisterCount()); } break; case Format22x : Instruction22x inst22x = (Instruction22x) in; registerClasses[inst22x.getRegisterA()] = registerClasses[inst22x.getRegisterB()]; constants[inst22x.getRegisterA()] = constants[inst22x.getRegisterB()]; break; case Format23x : indexPointer = indexPointer+ 2; Instruction23x inst23x = (Instruction23x) in; if(in.getOpcode().equals(Opcode.AGET) ||in.getOpcode().equals(Opcode.AGET_BOOLEAN) || in.getOpcode().equals(Opcode.AGET_BYTE) || in.getOpcode().equals(Opcode.AGET_CHAR) || in.getOpcode().equals(Opcode.AGET_OBJECT) || in.getOpcode().equals(Opcode.AGET_SHORT) || in.getOpcode().equals(Opcode.AGET_WIDE)) { registerClasses[inst23x.getRegisterA()] = registerClasses[inst23x.getRegisterB()].substring(1); } else if(in.getOpcode().equals(Opcode.ADD_LONG) || in.getOpcode().equals(Opcode.SUB_LONG) || in.getOpcode().equals(Opcode.MUL_LONG) || in.getOpcode().equals(Opcode.DIV_LONG) || in.getOpcode().equals(Opcode.REM_LONG) || in.getOpcode().equals(Opcode.AND_LONG) || in.getOpcode().equals(Opcode.OR_LONG) || in.getOpcode().equals(Opcode.XOR_LONG) || in.getOpcode().equals(Opcode.SHL_LONG) || in.getOpcode().equals(Opcode.SHR_LONG) || in.getOpcode().equals(Opcode.USHR_LONG)) { registerClasses[inst23x.getRegisterA()] = "J"; } else if(in.getOpcode().equals(Opcode.ADD_FLOAT) || in.getOpcode().equals(Opcode.SUB_FLOAT) || in.getOpcode().equals(Opcode.MUL_FLOAT) || in.getOpcode().equals(Opcode.DIV_FLOAT) || in.getOpcode().equals(Opcode.REM_FLOAT)) { registerClasses[inst23x.getRegisterA()] = "F"; } else if(in.getOpcode().equals(Opcode.ADD_DOUBLE) || in.getOpcode().equals(Opcode.SUB_DOUBLE) || in.getOpcode().equals(Opcode.MUL_DOUBLE) || in.getOpcode().equals(Opcode.DIV_DOUBLE) || in.getOpcode().equals(Opcode.REM_DOUBLE)) { registerClasses[inst23x.getRegisterA()] = "D"; } else { registerClasses[inst23x.getRegisterA()] = "I"; } break; case Format30t : Instruction30t inst30t = (Instruction30t) in; break; case Format31c : Instruction31c inst31c = (Instruction31c) in; registerClasses[inst31c.getRegisterA()] = getTypeFromName(String.class.getTypeName()); constants[inst31c.getRegisterA()] = inst31c.getReference().toString(); break; case Format31i : Instruction31i inst31i = (Instruction31i) in; if(in.getOpcode().equals(Opcode.CONST)) { registerClasses[inst31i.getRegisterA()] = "I"; constants[inst31i.getRegisterA()] = Integer.toString(inst31i.getNarrowLiteral()); } else { registerClasses[inst31i.getRegisterA()] = "J"; constants[inst31i.getRegisterA()] = Long.toString(inst31i.getWideLiteral()); } break; case Format31t : Instruction31t inst31t = (Instruction31t) in; break; case Format32x : Instruction32x inst32x = (Instruction32x) in; registerClasses[inst32x.getRegisterA()] = registerClasses[inst32x.getRegisterB()]; constants[inst32x.getRegisterA()] = constants[inst32x.getRegisterB()]; break; case Format35c : Instruction35c inst35c = (Instruction35c) in; if (in.getOpcode().equals(Opcode.FILLED_NEW_ARRAY)) { returnType = inst35c.getReference().toString(); } else { if (!inst35c.getReference().toString().substring(inst35c.getReference().toString().lastIndexOf(")") +1).equals("V") ) { returnType = inst35c.getReference().toString().substring(inst35c.getReference().toString().lastIndexOf(")") + 1); } } break; case Format35mi : System.out.println("35mi: "+in.getOpcode()+"Not handled, dangerous"); //No opcode with this format? break; case Format35ms : System.out.println("35ms: "+in.getOpcode()+"Not handled, dagnerous"); break; case Format3rc : Instruction3rc inst3rc = (Instruction3rc) in; if(in.getOpcode().equals(Opcode.FILLED_NEW_ARRAY_RANGE)) { returnType = inst3rc.getReference().toString(); } else if (!inst3rc.getReference().toString().substring(inst3rc.getReference().toString().lastIndexOf(")") +1).equals("V")) { returnType = inst3rc.getReference().toString().substring(inst3rc.getReference().toString().lastIndexOf(")") + 1); } break; case Format3rmi : System.out.println("3rmi :"+in.getOpcode()+ "Not handled, dangerous"); break; case Format3rms : System.out.println("3rms :"+in.getOpcode()+ "Not handled, dangerous"); break; case Format45cc : Instruction45cc inst45cc = (Instruction45cc) in; returnType = inst45cc.getReference2().toString().substring(inst45cc.getReference2().toString().lastIndexOf(")") +1); break; case Format4rcc : Instruction4rcc inst4rcc = (Instruction4rcc) in; returnType = inst4rcc.getReference2().toString().substring(inst4rcc.getReference2().toString().lastIndexOf(")") +1); break; case Format51l : Instruction51l inst51l = (Instruction51l) in; registerClasses[inst51l.getRegisterA()] = "D"; constants[inst51l.getRegisterA()] = Long.toString(inst51l.getWideLiteral()); break; default : } instructionsize = getInstructionSize(in); indexPointer = indexPointer + instructionsize; } return result; } public static class codeBlock { public boolean rejected = false; public int start; public int end; public String key; public boolean[] registersActive; public String[] startClasses; public String[] endClasses; List<Instruction> instructions; codeBlock(int s, int e, String k, int registerNumber) { this.start = s; this.end = e; this.key = k; this.registersActive = new boolean[registerNumber]; this.startClasses = new String[registerNumber]; this.endClasses = new String[registerNumber]; instructions = new LinkedList<Instruction>(); } public int paramsize () { int i = 0; for(String s : startClasses) { if (s != null) { i++; } } return i; } public int paraPrim () { int i = 0; for(String s : startClasses) { if (!(s.contains("L") || s.contains("["))) { i++; } } return i; } public int arrPrim () { int i = 0; for(String s : endClasses) { if (s != null) { if (!(s.contains("L") || s.contains("["))) { i++; } } } return i; } public int arrsize () { int i = 0; for(String s : endClasses) { if(s != null) { i++; } } return i; } public int blocksize () { return end - start - (23 + 8*paramsize() + 4*paraPrim() + 3*arrsize() + 4*arrPrim() + 2*(arrsize() - arrPrim())); } } public static class tInstruction { public int start; public int end; public boolean SDC; tInstruction (int s, int e, boolean sdc) { this.start = s; this.end = e; this.SDC = sdc; } } private static List<tInstruction> getTInstructions(Method m) { int index = 0; List<tInstruction> result = new LinkedList<tInstruction>(); //TODO: Annotations/try-catch-blocks for(Instruction in : m.getImplementation().getInstructions()) { switch (in.getOpcode().format) { case Format10t : Instruction10t inst10t = (Instruction10t) in; result.add(new tInstruction(index, index + inst10t.getCodeOffset(), false)); break; case Format20t : Instruction20t inst20t = (Instruction20t) in; result.add(new tInstruction(index, index + inst20t.getCodeOffset(), false)); break; case Format21t : Instruction21t inst21t = (Instruction21t) in; result.add(new tInstruction(index, index + inst21t.getCodeOffset(), in.getOpcode().equals(Opcode.IF_NEZ))); break; case Format22t : Instruction22t inst22t = (Instruction22t) in; result.add(new tInstruction(index, index + inst22t.getCodeOffset(), in.getOpcode().equals(Opcode.IF_NE))); break; case Format30t : Instruction30t inst30t = (Instruction30t) in; result.add(new tInstruction(index, index + inst30t.getCodeOffset(), false)); break; case Format31t : Instruction31t inst31t = (Instruction31t) in; result.add(new tInstruction(index, index + inst31t.getCodeOffset(), false)); break; default : } index = index + getInstructionSize(in); } return result; } private static String getTypeFromName(String name) { return "L" + name.replace(".", "/") + ";"; } private static int getInstructionSize(Instruction in) { switch (in.getOpcode().format) { case Format10t : return 1; case Format10x : return 1; case Format11n : return 1; case Format11x : return 1; case Format12x : return 1; case Format20bc : return 2; case Format20t : return 2; case Format21c : return 2; case Format21ih : return 2; case Format21lh : return 2; case Format21s : return 2; case Format21t : return 2; case Format22b : return 2; case Format22c : return 2; case Format22cs : return 2; case Format22s : return 2; case Format22t : return 2; case Format22x : return 2; case Format23x : return 2; case Format30t : return 3; case Format31c : return 3; case Format31i : return 3; case Format31t : return 3; case Format32x : return 3; case Format35c : return 3; case Format35mi : return 3; case Format35ms : return 3; case Format3rc : return 3; case Format3rmi : return 3; case Format3rms : return 3; case Format45cc : return 4; case Format4rcc : return 4; case Format51l : return 5; case ArrayPayload : ArrayPayload pld = (ArrayPayload) in; return (pld.getArrayElements().size() * pld.getElementWidth() +1)/2 +4; case PackedSwitchPayload : PackedSwitchPayload pspld = (PackedSwitchPayload) in; return (pspld.getSwitchElements().size()*2) + 4; case SparseSwitchPayload : SparseSwitchPayload sspld = (SparseSwitchPayload) in; return (sspld.getSwitchElements().size() *4) + 2; default : return 0; } } private static void writeCodeBlock(codeBlock codeblock, String name, Method method, ClassDef clazz) { List<Instruction> instructions = new LinkedList<Instruction>(); int[] newPosition = new int[codeblock.startClasses.length]; int arrayHandlingSize = 2; int i = 0; int j = 0; int p = 0; for(String param : codeblock.startClasses) { if(param == null) { newPosition[i] = j+arrayHandlingSize; j++; } else { newPosition[i] = arrayHandlingSize + codeblock.startClasses.length - codeblock.paramsize()+p; p++; } i++; } for(Instruction in : codeblock.instructions) { switch(in.getOpcode().format) { case Format11x : Instruction11x inst11x = (Instruction11x) in; instructions.add(new ImmutableInstruction11x(in.getOpcode(), newPosition[inst11x.getRegisterA()])); break; case Format11n : Instruction11n inst11n = (Instruction11n) in; instructions.add(new ImmutableInstruction11n(in.getOpcode(), newPosition[inst11n.getRegisterA()], inst11n.getNarrowLiteral())); break; case Format12x : Instruction12x inst12x = (Instruction12x) in; instructions.add(new ImmutableInstruction12x(in.getOpcode(), newPosition[inst12x.getRegisterA()], newPosition[inst12x.getRegisterB()])); break; case Format21c : Instruction21c inst21c = (Instruction21c) in; instructions.add(new ImmutableInstruction21c(in.getOpcode(), newPosition[inst21c.getRegisterA()], inst21c.getReference())); break; case Format21ih : Instruction21ih inst21h = (Instruction21ih) in; instructions.add(new ImmutableInstruction21ih(in.getOpcode(), newPosition[inst21h.getRegisterA()], inst21h.getNarrowLiteral())); break; case Format21lh : Instruction21lh inst21lh = (Instruction21lh) in; instructions.add(new ImmutableInstruction21lh(in.getOpcode(), newPosition[inst21lh.getRegisterA()], inst21lh.getWideLiteral())); break; case Format21s : Instruction21s inst21s = (Instruction21s) in; instructions.add(new ImmutableInstruction21s(in.getOpcode(), newPosition[inst21s.getRegisterA()], inst21s.getNarrowLiteral())); break; case Format21t : Instruction21t inst21t = (Instruction21t) in; instructions.add(new ImmutableInstruction21t(in.getOpcode(), newPosition[inst21t.getRegisterA()], inst21t.getCodeOffset())); break; case Format22b : Instruction22b inst22b = (Instruction22b) in; instructions.add(new ImmutableInstruction22b(in.getOpcode(), newPosition[inst22b.getRegisterA()], newPosition[inst22b.getRegisterB()], inst22b.getNarrowLiteral())); break; case Format22c : Instruction22c inst22c = (Instruction22c) in; instructions.add(new ImmutableInstruction22c(in.getOpcode(), newPosition[inst22c.getRegisterA()], newPosition[inst22c.getRegisterB()], inst22c.getReference())); break; case Format22cs : Instruction22cs inst22cs = (Instruction22cs) in; instructions.add(new ImmutableInstruction22cs(in.getOpcode(), newPosition[inst22cs.getRegisterA()], newPosition[inst22cs.getRegisterB()], inst22cs.getFieldOffset())); break; case Format22s : Instruction22s inst22s = (Instruction22s) in; instructions.add(new ImmutableInstruction22s(in.getOpcode(), newPosition[inst22s.getRegisterA()], newPosition[inst22s.getRegisterB()], inst22s.getNarrowLiteral())); break; case Format22t : Instruction22t inst22t = (Instruction22t) in; instructions.add(new ImmutableInstruction22t(in.getOpcode(), newPosition[inst22t.getRegisterA()], newPosition[inst22t.getRegisterB()], inst22t.getCodeOffset())); break; case Format22x : Instruction22x inst22x = (Instruction22x) in; instructions.add(new ImmutableInstruction22x(in.getOpcode(), newPosition[inst22x.getRegisterA()], newPosition[inst22x.getRegisterB()])); break; case Format23x : Instruction23x inst23x = (Instruction23x) in; instructions.add(new ImmutableInstruction23x(in.getOpcode(), newPosition[inst23x.getRegisterA()], newPosition[inst23x.getRegisterB()], newPosition[inst23x.getRegisterC()])); break; case Format31c : Instruction31c inst31c = (Instruction31c) in; instructions.add(new ImmutableInstruction31c(in.getOpcode(), newPosition[inst31c.getRegisterA()], inst31c.getReference())); break; case Format31i : Instruction31i inst31i = (Instruction31i) in; instructions.add(new ImmutableInstruction31i(in.getOpcode(), newPosition[inst31i.getRegisterA()], inst31i.getNarrowLiteral())); break; case Format31t : Instruction31t inst31t = (Instruction31t) in; instructions.add(new ImmutableInstruction31t(in.getOpcode(), newPosition[inst31t.getRegisterA()], inst31t.getCodeOffset())); break; case Format32x : Instruction32x inst32x = (Instruction32x) in; instructions.add(new ImmutableInstruction32x(in.getOpcode(), newPosition[inst32x.getRegisterA()], newPosition[inst32x.getRegisterB()])); break; case Format35c : Instruction35c inst35c = (Instruction35c) in; instructions.add(new ImmutableInstruction35c(in.getOpcode(), inst35c.getRegisterCount(), newPosition[inst35c.getRegisterC()], newPosition[inst35c.getRegisterD()], newPosition[inst35c.getRegisterE()], newPosition[inst35c.getRegisterF()], newPosition[inst35c.getRegisterG()], inst35c.getReference())); break; case Format35mi : Instruction35mi inst35mi = (Instruction35mi) in; instructions.add(new ImmutableInstruction35mi(in.getOpcode(), inst35mi.getRegisterCount(), newPosition[inst35mi.getRegisterC()], newPosition[inst35mi.getRegisterD()], newPosition[inst35mi.getRegisterE()], newPosition[inst35mi.getRegisterF()], newPosition[inst35mi.getRegisterG()], inst35mi.getInlineIndex())); break; case Format35ms : Instruction35ms inst35ms = (Instruction35ms) in; instructions.add(new ImmutableInstruction35ms(in.getOpcode(), inst35ms.getRegisterCount(), newPosition[inst35ms.getRegisterC()], newPosition[inst35ms.getRegisterD()], newPosition[inst35ms.getRegisterE()], newPosition[inst35ms.getRegisterF()], newPosition[inst35ms.getRegisterG()], inst35ms.getVtableIndex())); break; /*case Format45cc : Instruction45cc inst45cc = (Instruction45cc) in; instructions.add(new ImmutableInstruction45cc()); break;*/ //TODO: implement my own ImmutableInstruction class for 45cc case Format51l : Instruction51l inst51l = (Instruction51l) in; instructions.add(new ImmutableInstruction51l(in.getOpcode(), newPosition[inst51l.getRegisterA()], inst51l.getWideLiteral())); break; default : instructions.add(in); break; } } instructions.add(new ImmutableInstruction11n(Opcode.CONST_4, 0, codeblock.arrsize())); instructions.add(new ImmutableInstruction22c(Opcode.NEW_ARRAY, 0, 0, new ImmutableTypeReference("[Ljava/lang/Object;"))); i = 0; j = 0; for(String s : codeblock.endClasses) { if(s != null) { List<String> param = new LinkedList<String>(); switch (s) { case "I" : param.add("I"); instructions.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, newPosition[j], 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Integer;", "valueOf", param, "Ljava/lang/Integer;"))); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, newPosition[j])); break; case "J" : param.add("J"); instructions.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, newPosition[j], 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Long;", "valueOf", param, "Ljava/lang/Long;"))); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, newPosition[j])); break; case "Z" : param.add("Z"); instructions.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, newPosition[j], 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Boolean;", "valueOf", param, "Ljava/lang/Boolean;"))); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, newPosition[j])); break; case "F" : param.add("F"); instructions.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, newPosition[j], 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Float;", "valueOf", param, "Ljava/lang/Float;"))); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, newPosition[j])); break; case "D" : param.add("D"); instructions.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, newPosition[j], 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Double;", "valueOf", param, "Ljava/lang/Double;"))); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, newPosition[j])); break; default : break; } instructions.add(new ImmutableInstruction11n(Opcode.CONST_4, 1, i)); instructions.add(new ImmutableInstruction23x(Opcode.APUT_OBJECT, newPosition[j], 0, 1)); i++; } j++; } instructions.add(new ImmutableInstruction11x(Opcode.RETURN_OBJECT, 0)); List<MethodParameter> parameters = new LinkedList<MethodParameter>(); for (String parameter : codeblock.startClasses) { if (parameter != null) { parameters.add(new ImmutableMethodParameter(parameter, null, null)); } } if (parameters.isEmpty()) { parameters = null; } MethodImplementation impl = new ImmutableMethodImplementation(codeblock.endClasses.length+arrayHandlingSize, instructions, null, null); Method m = new ImmutableMethod("SDC/ImportClass", name, parameters, "[Ljava/lang/Object;", 9, null, impl); //implement tryblock handling encodedBlocks.add(m); } private static List<Instruction> replaceCodeBlock(codeBlock codeblock, String name, Method m, ClassDef c, List<Instruction> instructions) { List<Instruction> result = new LinkedList<Instruction>(); int indexPointer = 0; int codeblocksize = codeblock.blocksize(); for(Instruction in : instructions) { if(indexPointer<codeblock.start || indexPointer>=codeblock.end) { switch(in.getOpcode().format) { case Format10t : Instruction10t inst10t = (Instruction10t) in; if(indexPointer < codeblock.start && inst10t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction10t(in.getOpcode(), inst10t.getCodeOffset()-codeblocksize)); } else if(indexPointer > codeblock.end && inst10t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction10t(in.getOpcode(), inst10t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; case Format20t : Instruction20t inst20t = (Instruction20t) in; if(indexPointer < codeblock.start && inst20t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction20t(in.getOpcode(), inst20t.getCodeOffset()-codeblocksize)); } else if (indexPointer > codeblock.end && inst20t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction20t(in.getOpcode(), inst20t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; case Format21t : Instruction21t inst21t = (Instruction21t) in; if(indexPointer < codeblock.start && inst21t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction21t(in.getOpcode(), inst21t.getRegisterA(), inst21t.getCodeOffset()-codeblocksize)); } else if (indexPointer > codeblock.end && inst21t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction21t(in.getOpcode(), inst21t.getRegisterA(), inst21t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; case Format22t : Instruction22t inst22t = (Instruction22t) in; if(indexPointer < codeblock.start && inst22t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction22t(in.getOpcode(), inst22t.getRegisterA(), inst22t.getRegisterB(), inst22t.getCodeOffset()-codeblocksize)); } else if (indexPointer > codeblock.end && inst22t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction22t(in.getOpcode(), inst22t.getRegisterA(), inst22t.getRegisterB(), inst22t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; case Format30t : Instruction30t inst30t = (Instruction30t) in; if(indexPointer < codeblock.start && inst30t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction30t(in.getOpcode(), inst30t.getCodeOffset()-codeblocksize)); } else if (indexPointer > codeblock.end && inst30t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction30t(in.getOpcode(), inst30t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; case Format31t : Instruction31t inst31t = (Instruction31t) in; if(indexPointer < codeblock.start && inst31t.getCodeOffset()+indexPointer > codeblock.end) { result.add(new ImmutableInstruction31t(in.getOpcode(), inst31t.getRegisterA(), inst31t.getCodeOffset()-codeblocksize)); } else if (indexPointer > codeblock.end && inst31t.getCodeOffset()+indexPointer < codeblock.start) { result.add(new ImmutableInstruction31t(in.getOpcode(), inst31t.getRegisterA(), inst31t.getCodeOffset()+codeblocksize)); } else { result.add(in); } break; default : result.add(in); break; } } else if(indexPointer == codeblock.start){ if(in.getOpcode().equals(Opcode.IF_NEZ)) { Instruction21t inst21t = (Instruction21t) in; result.add(new ImmutableInstruction21t(Opcode.IF_NEZ, inst21t.getRegisterA(), inst21t.getCodeOffset() - (codeblocksize))); } else if (in.getOpcode().equals(Opcode.IF_NE)) { Instruction22t inst22t = (Instruction22t) in; result.add(new ImmutableInstruction22t(Opcode.IF_NE, inst22t.getRegisterA(), inst22t.getRegisterB(), inst22t.getCodeOffset() - (codeblocksize))); } //check cast? result.add(new ImmutableInstruction11n(Opcode.CONST_4, 2, codeblock.paramsize())); result.add(new ImmutableInstruction22c(Opcode.NEW_ARRAY, 2, 2, new ImmutableTypeReference("[Ljava/lang/Class;"))); int i = 0; //NO: 5 List<String> paraList = new LinkedList<String>(); for(String clazz : codeblock.startClasses) { if(clazz != null) { paraList.add(clazz); Reference ref; Opcode opc = Opcode.SGET_OBJECT; switch (clazz) { case "I" : ref = new ImmutableFieldReference("Ljava/lang/Integer;", "TYPE", "Ljava/lang/Class;"); break; case "Z" : ref = new ImmutableFieldReference("Ljava/lang/Boolean;", "TYPE", "Ljava/lang/Class;"); break; case "J" : ref = new ImmutableFieldReference("Ljava/lang/Long;", "TYPE", "Ljava/lang/Class;"); break; case "F" : ref = new ImmutableFieldReference("Ljava/lang/Float;", "TYPE", "Ljava/lang/Class;"); break; case "D" : ref = new ImmutableFieldReference("Ljava/lang/Double;", "TYPE", "Ljava/lang/Class;"); break; default : ref = new ImmutableTypeReference(clazz); opc = Opcode.CONST_CLASS; } result.add(new ImmutableInstruction11n(Opcode.CONST_4, 0, i)); result.add(new ImmutableInstruction21c(opc, 1, ref)); result.add(new ImmutableInstruction23x(Opcode.APUT_OBJECT, 1, 2, 0)); i++; //NO: 5 per startclass entry } } List<String> l = new LinkedList<String>(); l.add("Landroid/support/v7/app/AppCompatActivity;"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, m.getImplementation().getRegisterCount()+3-m.getParameters().size()-1, 0, 0, 0, 0, new ImmutableMethodReference("LSDC/FileLoader;", "loadClass", l, "Ljava/lang/Class;"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, 0)); result.add(new ImmutableInstruction21c(Opcode.CONST_STRING, 1, new ImmutableStringReference(name))); l.clear(); l.add("Ljava/lang/String;"); l.add("[Ljava/lang/Class;"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 3, 0, 1, 2, 0, 0, new ImmutableMethodReference("Ljava/lang/Class;", "getMethod", l, "Ljava/lang/reflect/Method;"))); //potentially false registercount? result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, 2)); result.add(new ImmutableInstruction11n(Opcode.CONST_4, 1, codeblock.paramsize())); result.add(new ImmutableInstruction22c(Opcode.NEW_ARRAY, 1, 1, new ImmutableTypeReference("[Ljava/lang/Object;"))); //NO: 13 i = 0; int j = 0; for(String clazz : codeblock.startClasses) { if(clazz != null) { result.add(new ImmutableInstruction11n(Opcode.CONST_4, 0, i)); List<String> param = new LinkedList<String>(); if (!(clazz.contains("L") || clazz.contains("["))) { switch(clazz) { case "I" : param.add("I"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Integer;", "valueOf", param, "Ljava/lang/Integer;"))); break; case "J" : param.add("J"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Long;", "valueOf", param, "Ljava/lang/Long;"))); break; case "Z" : param.add("Z"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Boolean;", "valueOf", param, "Ljava/lang/Boolean;"))); break; case "F" : param.add("F"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Float;", "valueOf", param, "Ljava/lang/Float;"))); break; case "D" : param.add("D"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_STATIC, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Double;", "valueOf", param, "Ljava/lang/Double;"))); break; } result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, 3+j)); } result.add(new ImmutableInstruction23x(Opcode.APUT_OBJECT, 3+j, 1, 0)); i++; //NO: 3 for each entry in startclasses, additional 4 for each primitive entry } j++; } result.add(new ImmutableInstruction11n(Opcode.CONST_4, 0, 0)); l.clear(); l.add("Ljava/lang/Object;"); l.add("[Ljava/lang/Object;"); result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 3, 2, 0, 1, 0, 0, new ImmutableMethodReference("Ljava/lang/reflect/Method;", "invoke", l, "[Ljava/lang/Object;"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_OBJECT, 2)); //NO: 5 i = 0; j = 0; for(String clazz : codeblock.endClasses) { if(clazz != null) { result.add(new ImmutableInstruction11n(Opcode.CONST_4, 0, i)); result.add(new ImmutableInstruction23x(Opcode.AGET_OBJECT, 3+j, 2, 0)); //NO: 3 for each entry in endclasses, additional 4 for primitives and 2 for objects if(!(clazz.contains("L") || clazz.contains("["))) { switch (clazz) { case "I" : result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Integer;", "intValue", null, "I"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT, 3+j)); break; case "Z" : result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Boolean;", "booleanValue", null, "Z"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT, 3+j)); break; case "J" : result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Long;", "longValue", null, "J"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_WIDE, 3+j)); break; case "F" : result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Float;", "floatValue", null, "F"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_WIDE, 3+j)); break; case "D" : result.add(new ImmutableInstruction35c(Opcode.INVOKE_VIRTUAL, 1, 3+j, 0, 0, 0, 0, new ImmutableMethodReference("Ljava/lang/Double;", "doubleValue", null, "D"))); result.add(new ImmutableInstruction11x(Opcode.MOVE_RESULT_WIDE, 3+j)); break; } } else { result.add(new ImmutableInstruction21c(Opcode.CHECK_CAST, 3+j, new ImmutableTypeReference(clazz))); } i++; } j++; } } indexPointer = indexPointer + getInstructionSize(in); } return result; } private static Method adjustedMethod(ClassDef c, Method m) { boolean codeblocks = false; if(m.getImplementation() != null) { int i = 0; List<Instruction> instructions = new LinkedList<Instruction>(); m.getImplementation().getInstructions().iterator().forEachRemaining(instructions::add); List<TryBlock> tryblocks = new LinkedList<TryBlock>(); m.getImplementation().getTryBlocks().iterator().forEachRemaining(tryblocks::add); LinkedList<codeBlock> list = getSDCBlocks(m); List<tInstruction> jumps = getTInstructions(m); Iterator<codeBlock> iter = list.descendingIterator(); while(iter.hasNext()) { codeBlock cb = iter.next(); if (cb.start > cb.end) { cb.rejected = true; } for(tInstruction t :jumps) { int s = Math.min(t.start, t.end); int e = Math.max(t.start, t.end); if(s < cb.start && cb.start < e && e < cb.end) { cb.rejected = true; } else if (cb.start < s && s < cb.end && cb.end < e) { cb.rejected = true; } } if(!cb.rejected) { if(codeblocks == false) { instructions = shiftRegisters(instructions, 3); codeblocks = true; } System.out.println("Accepted codeblock in "+m.getName()); writeCodeBlock(cb, m.getName()+ i, m, c); instructions = replaceCodeBlock(cb, m.getName()+i, m, c, instructions); List<TryBlock> tb = new LinkedList<TryBlock>(); for (TryBlock t : tryblocks) { List<ExceptionHandler> handlers = new LinkedList<ExceptionHandler>(); for (ExceptionHandler h : (List<ExceptionHandler>) t.getExceptionHandlers()) { if (h.getHandlerCodeAddress() > cb.end) { handlers.add(new ImmutableExceptionHandler(h.getExceptionType(), h.getHandlerCodeAddress()-cb.blocksize())); } else { handlers.add(h); } } if(t.getStartCodeAddress() > cb.start && t.getStartCodeAddress() < cb.end) { } else if (t.getStartCodeAddress() >= cb.end) { tb.add(new ImmutableTryBlock(t.getStartCodeAddress()-cb.blocksize(), t.getCodeUnitCount(), handlers)); } else if (t.getStartCodeAddress()< cb.start && t.getStartCodeAddress()+t.getCodeUnitCount() > cb.end){ tb.add(new ImmutableTryBlock(t.getStartCodeAddress(), t.getCodeUnitCount()-cb.blocksize(), handlers)); } else { tb.add(new ImmutableTryBlock(t.getStartCodeAddress(), t.getCodeUnitCount(), handlers)); } } System.out.println(cb.start + " " + cb.end + " " + cb.blocksize()) ; int msize = methodSize(m) - cb.blocksize(); int s = cb.end - cb.start - cb.blocksize(); List<ExceptionHandler> h = new LinkedList<ExceptionHandler>(); h.add(new ImmutableExceptionHandler("Ljava/lang/reflect/InvocationTargetException;", msize)); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_EXCEPTION, 0)); instructions.add(new ImmutableInstruction10t(Opcode.GOTO, -(msize + 1 - cb.start - s ))); h.add(new ImmutableExceptionHandler("Ljava/lang/IllegalAccessException;", msize + 2)); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_EXCEPTION, 0)); instructions.add(new ImmutableInstruction10t(Opcode.GOTO, -(msize + 3 - cb.start - s ))); h.add(new ImmutableExceptionHandler("Ljava/lang/NoSuchMethodException;", msize + 4)); instructions.add(new ImmutableInstruction11x(Opcode.MOVE_EXCEPTION, 0)); instructions.add(new ImmutableInstruction10t(Opcode.GOTO, -(msize + 5 - cb.start - s ))); tb.add(new ImmutableTryBlock(cb.start+2, s -2, h)); tryblocks = tb; } } if (codeblocks) { return new ImmutableMethod(m.getDefiningClass(), m.getName(), m.getParameters(), m.getReturnType(), m.getAccessFlags(), m.getAnnotations(), new ImmutableMethodImplementation(m.getImplementation().getRegisterCount()+3, instructions, (List<? extends TryBlock<? extends ExceptionHandler>>) tryblocks, null)); } else { return m; } } else { return m; } } private static int methodSize(Method m) { int i = 0; for (Instruction in : m.getImplementation().getInstructions()) { i = i + getInstructionSize(in); } return i; } private static List<Instruction> shiftRegisters(List<Instruction> l, int s) { List<Instruction> instructions = new LinkedList<Instruction>(); for(Instruction in : l) { switch(in.getOpcode().format) { case Format11x : Instruction11x inst11x = (Instruction11x) in; instructions.add(new ImmutableInstruction11x(in.getOpcode(), inst11x.getRegisterA() + s)); break; case Format11n : Instruction11n inst11n = (Instruction11n) in; instructions.add(new ImmutableInstruction11n(in.getOpcode(), inst11n.getRegisterA() + s, inst11n.getNarrowLiteral())); break; case Format12x : Instruction12x inst12x = (Instruction12x) in; instructions.add(new ImmutableInstruction12x(in.getOpcode(), inst12x.getRegisterA() + s, inst12x.getRegisterB() + s)); break; case Format21c : Instruction21c inst21c = (Instruction21c) in; instructions.add(new ImmutableInstruction21c(in.getOpcode(), inst21c.getRegisterA() + s, inst21c.getReference())); break; case Format21ih : Instruction21ih inst21h = (Instruction21ih) in; instructions.add(new ImmutableInstruction21ih(in.getOpcode(), inst21h.getRegisterA() + s, inst21h.getNarrowLiteral())); break; case Format21lh : Instruction21lh inst21lh = (Instruction21lh) in; instructions.add(new ImmutableInstruction21lh(in.getOpcode(), inst21lh.getRegisterA() + s, inst21lh.getWideLiteral())); break; case Format21s : Instruction21s inst21s = (Instruction21s) in; instructions.add(new ImmutableInstruction21s(in.getOpcode(), inst21s.getRegisterA() + s, inst21s.getNarrowLiteral())); break; case Format21t : Instruction21t inst21t = (Instruction21t) in; instructions.add(new ImmutableInstruction21t(in.getOpcode(), inst21t.getRegisterA() + s, inst21t.getCodeOffset())); break; case Format22b : Instruction22b inst22b = (Instruction22b) in; instructions.add(new ImmutableInstruction22b(in.getOpcode(), inst22b.getRegisterA() + s, inst22b.getRegisterB() + s, inst22b.getNarrowLiteral())); break; case Format22c : Instruction22c inst22c = (Instruction22c) in; instructions.add(new ImmutableInstruction22c(in.getOpcode(), inst22c.getRegisterA() + s, inst22c.getRegisterB() + s, inst22c.getReference())); break; case Format22cs : Instruction22cs inst22cs = (Instruction22cs) in; instructions.add(new ImmutableInstruction22cs(in.getOpcode(), inst22cs.getRegisterA() + s, inst22cs.getRegisterB() + s, inst22cs.getFieldOffset())); break; case Format22s : Instruction22s inst22s = (Instruction22s) in; instructions.add(new ImmutableInstruction22s(in.getOpcode(), inst22s.getRegisterA() + s, inst22s.getRegisterB() + s, inst22s.getNarrowLiteral())); break; case Format22t : Instruction22t inst22t = (Instruction22t) in; instructions.add(new ImmutableInstruction22t(in.getOpcode(), inst22t.getRegisterA() + s, inst22t.getRegisterB() + s, inst22t.getCodeOffset())); break; case Format22x : Instruction22x inst22x = (Instruction22x) in; instructions.add(new ImmutableInstruction22x(in.getOpcode(), inst22x.getRegisterA() + s, inst22x.getRegisterB() + s)); break; case Format23x : Instruction23x inst23x = (Instruction23x) in; instructions.add(new ImmutableInstruction23x(in.getOpcode(), inst23x.getRegisterA() + s, inst23x.getRegisterB() + s, inst23x.getRegisterC() + s)); break; case Format31c : Instruction31c inst31c = (Instruction31c) in; instructions.add(new ImmutableInstruction31c(in.getOpcode(), inst31c.getRegisterA() + s, inst31c.getReference())); break; case Format31i : Instruction31i inst31i = (Instruction31i) in; instructions.add(new ImmutableInstruction31i(in.getOpcode(), inst31i.getRegisterA() + s, inst31i.getNarrowLiteral())); break; case Format31t : Instruction31t inst31t = (Instruction31t) in; instructions.add(new ImmutableInstruction31t(in.getOpcode(), inst31t.getRegisterA() + s, inst31t.getCodeOffset())); break; case Format32x : Instruction32x inst32x = (Instruction32x) in; instructions.add(new ImmutableInstruction32x(in.getOpcode(), inst32x.getRegisterA(), inst32x.getRegisterB() + s)); break; case Format35c : Instruction35c inst35c = (Instruction35c) in; instructions.add(new ImmutableInstruction35c(in.getOpcode(), inst35c.getRegisterCount(), inst35c.getRegisterC() + s, inst35c.getRegisterD() + s, inst35c.getRegisterE() + s, inst35c.getRegisterF() + s, inst35c.getRegisterG() + s, inst35c.getReference())); break; case Format35mi : Instruction35mi inst35mi = (Instruction35mi) in; instructions.add(new ImmutableInstruction35mi(in.getOpcode(), inst35mi.getRegisterCount(), inst35mi.getRegisterC() + s, inst35mi.getRegisterD() + s, inst35mi.getRegisterE() + s, inst35mi.getRegisterF() + s, inst35mi.getRegisterG() + s, inst35mi.getInlineIndex())); break; case Format35ms : Instruction35ms inst35ms = (Instruction35ms) in; instructions.add(new ImmutableInstruction35ms(in.getOpcode(), inst35ms.getRegisterCount(), inst35ms.getRegisterC() + s, inst35ms.getRegisterD() + s, inst35ms.getRegisterE() + s, inst35ms.getRegisterF() + s, inst35ms.getRegisterG() + s, inst35ms.getVtableIndex())); break; /*case Format45cc : Instruction45cc inst45cc = (Instruction45cc) in; instructions.add(new ImmutableInstruction45cc()); break;*/ //TODO: implement my own ImmutableInstruction class for 45cc case Format51l : Instruction51l inst51l = (Instruction51l) in; instructions.add(new ImmutableInstruction51l(in.getOpcode(), inst51l.getRegisterA() + s, inst51l.getWideLiteral())); break; default : instructions.add(in); break; } } return instructions; } }
[ "peterkr@student.ethz.ch" ]
peterkr@student.ethz.ch
1b4e46eb0ba5efea6ecbfa86099ea650dbb1b58b
8c8bb067f4839fc242f9efc2db3fec83ea9a5b46
/app/src/main/java/TouchingTechnologies/salezone/GenerateQRCodeActivity.java
8487d54854ce527d0a7822d520e36fb99d21ca65
[]
no_license
TouchingTechnologies/SaleZoneC
8aa5ab006c6d115f85dbd52a591ceb60ff5bdfd0
336a77c707c983c08f06accbd4436e8c496f7b4e
refs/heads/master
2016-09-06T08:18:37.868896
2015-06-30T14:43:34
2015-06-30T14:43:34
38,309,913
0
0
null
null
null
null
UTF-8
Java
false
false
2,451
java
package TouchingTechnologies.salezone; import java.util.zip.Inflater; import com.google.zxing.BarcodeFormat; import com.google.zxing.WriterException; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Point; import android.os.Bundle; import android.util.Log; import android.view.Display; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.WindowManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; public class GenerateQRCodeActivity extends Activity { private String LOG_TAG = "GenerateQRCode"; String unqcode; @SuppressLint("NewApi") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.qrcode_main); Bundle extras = getIntent().getExtras(); if (extras!=null){ unqcode = extras.getString("code"); String qrInputText = unqcode; Log.v(LOG_TAG, qrInputText); //Find screen size WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); Point point = new Point(); display.getSize(point); int width = point.x; int height = point.y; int smallerDimension = width < height ? width : height; smallerDimension = smallerDimension * 3/4; //Encode with a QR Code image QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(qrInputText, null, Contents.Type.TEXT, BarcodeFormat.QR_CODE.toString(), smallerDimension); try { Bitmap bitmap = qrCodeEncoder.encodeAsBitmap(); ImageView myImage = (ImageView) findViewById(R.id.imageView1); myImage.setImageBitmap(bitmap); } catch (WriterException e) { e.printStackTrace(); } } } @Override public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub getMenuInflater().inflate(R.menu.qrcode, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { // TODO Auto-generated method stub switch (item.getItemId()) { case R.id.done_select: Intent done = new Intent(this,MainActivity.class); startActivity(done); finish(); break; default: break; } return super.onOptionsItemSelected(item); } }
[ "andrew@mcash.ug" ]
andrew@mcash.ug
616db38e362cd0c5860617c989c8d1a9219d9db5
21d74560660c027cc849df794bb5870da43d1415
/test_jpassport/src/main/java/jpassport/test/performance/PureJavaPerf.java
8c900034a904a4aa7ef016652eb9fe3116205753
[ "Apache-2.0" ]
permissive
dmclean652/JPassport
39026e3c7d9a9a1eac170cfd7c13fa85d47a32f3
c7aadc37ec29f498a8d3f7dcf69f7fb318537d71
refs/heads/main
2023-04-28T16:23:18.524404
2021-05-26T18:05:57
2021-05-26T18:05:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
/* Copyright (c) 2021 Duncan McLean, All Rights Reserved * * The contents of this file is dual-licensed under the * Apache License 2.0. * * You may obtain a copy of the Apache License at: * * http://www.apache.org/licenses/ * * A copy is also included in the downloadable source code. */ package jpassport.test.performance; import jpassport.test.structs.TestStruct; public class PureJavaPerf implements PerfTest{ @Override public double sumD(double d, double d2) { return d + d2; } @Override public double sumArrD(double[] d, int len) { double ret = 0; for (int n = 0; n < len; ++n) ret += d[n]; return ret; } @Override public int sumArrI(int[] d, int len) { int ret = 0; for (int n = 0; n < len; ++n) ret += d[n]; return ret; } @Override public float sumArrF(float[] d, int len) { float ret = 0; for (int n = 0; n < len; ++n) ret += d[n]; return ret; } public double passStruct(TestStruct simpleStruct) { return simpleStruct.s_int() + simpleStruct.s_long() + simpleStruct.s_float() + simpleStruct.s_double(); } }
[ "duncan.mclean@gmail.com" ]
duncan.mclean@gmail.com
9957e19d513f011a6c89a167670ef6035ffbb5f8
efdc6a70c5c1cadb95a93d1335e98c9610aca2f2
/SPP/src/tp34/SemaphoreImpl.java
5c55a8513f879fdcd37263d6867097441f87e9a8
[]
no_license
kousaila/SPP
cf04f236ca799c3d0083553a489c0fc4869dd6dd
c7f4ac2fdf3f5d62f3cd1dad026ae7afa5ecc9c2
refs/heads/master
2022-04-16T10:22:29.888338
2020-04-13T17:39:14
2020-04-13T17:39:14
239,753,174
1
0
null
null
null
null
UTF-8
Java
false
false
675
java
package tp34; public class SemaphoreImpl implements SemaphoreInterface { int counter; int waiting; public SemaphoreImpl() { this.counter = 0; this.waiting = 0; } @Override public synchronized void up() { this.counter++; if (counter <= 0) { notify(); if (waiting > 0) { waiting--; } } } @Override public synchronized void down() { this.counter--; if (counter < 0) { this.waiting++; try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } ; } } @Override public synchronized int releaseAll() { int temp =waiting; counter+=waiting; notifyAll(); waiting=0; return temp; } }
[ "kousaila.tidjet@etudiant.univ-rennes1.fr" ]
kousaila.tidjet@etudiant.univ-rennes1.fr
1066b6491856bf19fdf9ba6f279e870698ac6bc0
37fe7efb0f3f6e266da113a66a8114da3fac88f0
/Ver.1/1.00/source/JavaModel/web/SdtTBM43_STUDY_CDISC_ITEM.java
574806413a07e709f5a1533c1c75cc56570fe9f8
[ "Apache-2.0", "BSD-2-Clause" ]
permissive
epoc-software-open/SEDC
e07d62248e8c2ed020973edd251e79b140b9fb3d
6327165f63e448af1b0460f7071d62b5c12c9f09
refs/heads/master
2021-08-11T05:56:09.625380
2021-08-10T03:41:45
2021-08-10T03:41:45
96,168,280
2
1
BSD-2-Clause
2021-08-10T03:41:45
2017-07-04T02:42:21
Java
UTF-8
Java
false
false
125,568
java
import com.genexus.*; import com.genexus.xml.*; import com.genexus.search.*; import com.genexus.webpanels.*; public final class SdtTBM43_STUDY_CDISC_ITEM extends GxSilentTrnSdt implements Cloneable, java.io.Serializable { public SdtTBM43_STUDY_CDISC_ITEM( int remoteHandle ) { this( remoteHandle, new ModelContext(SdtTBM43_STUDY_CDISC_ITEM.class)); } public SdtTBM43_STUDY_CDISC_ITEM( int remoteHandle , ModelContext context ) { super( context, "SdtTBM43_STUDY_CDISC_ITEM"); initialize( remoteHandle) ; } public SdtTBM43_STUDY_CDISC_ITEM( int remoteHandle , StructSdtTBM43_STUDY_CDISC_ITEM struct ) { this(remoteHandle); setStruct(struct); } public void Load( long AV894TBM43_STUDY_ID , String AV895TBM43_DOM_CD , String AV896TBM43_DOM_VAR_NM ) { IGxSilentTrn obj ; obj = getTransaction() ; obj.LoadKey(new Object[] {new Long(AV894TBM43_STUDY_ID),AV895TBM43_DOM_CD,AV896TBM43_DOM_VAR_NM}); } public GxObjectCollection GetMessages( ) { short item = 1 ; GxObjectCollection msgs = new GxObjectCollection(SdtMessages_Message.class, "Messages.Message", "Genexus", remoteHandle) ; SdtMessages_Message m1 ; IGxSilentTrn trn = getTransaction() ; com.genexus.internet.MsgList msgList = trn.GetMessages() ; while ( item <= msgList.getItemCount() ) { m1 = new SdtMessages_Message(remoteHandle, context) ; m1.setgxTv_SdtMessages_Message_Id( msgList.getItemValue(item) ); m1.setgxTv_SdtMessages_Message_Description( msgList.getItemText(item) ); m1.setgxTv_SdtMessages_Message_Type( (byte)(msgList.getItemType(item)) ); msgs.add(m1, 0); item = (short)(item+1) ; } return msgs ; } public short readxml( com.genexus.xml.XMLReader oReader , String sName ) { short GXSoapError = 1 ; sTagName = oReader.getName() ; if ( oReader.getIsSimple() == 0 ) { GXSoapError = oReader.read() ; nOutParmCount = (short)(0) ; while ( ( ( GXutil.strcmp(oReader.getName(), sTagName) != 0 ) || ( oReader.getNodeType() == 1 ) ) && ( GXSoapError > 0 ) ) { readOk = (short)(0) ; if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_STUDY_ID") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id = GXutil.lval( oReader.getValue()) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DOM_CD") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DOM_VAR_NM") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VAR_DESC") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SDTM_FLG") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CDASH_FLG") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_INPUT_TYPE_DIV") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_REQUIRED_FLG") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SAS_FIELD_NM") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ODM_DATA_TYPE") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_NOTE") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ORDER") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order = (int)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VERSION") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DEL_FLG") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_DATETIME") ) { if ( ( GXutil.strcmp(oReader.getValue(), "0000-00-00T00:00:00") == 0 ) || ( oReader.existsAttribute("xsi:nil") == 1 ) ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime = GXutil.resetTime( GXutil.nullDate() ); } else { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime = localUtil.ymdhmsToT( (short)(GXutil.val( GXutil.substring( oReader.getValue(), 1, 4), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 6, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 9, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 12, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 15, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 18, 2), "."))) ; } if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_USER_ID") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_PROG_NM") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_DATETIME") ) { if ( ( GXutil.strcmp(oReader.getValue(), "0000-00-00T00:00:00") == 0 ) || ( oReader.existsAttribute("xsi:nil") == 1 ) ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime = GXutil.resetTime( GXutil.nullDate() ); } else { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime = localUtil.ymdhmsToT( (short)(GXutil.val( GXutil.substring( oReader.getValue(), 1, 4), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 6, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 9, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 12, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 15, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 18, 2), "."))) ; } if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_USER_ID") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_PROG_NM") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_CNT") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt = GXutil.lval( oReader.getValue()) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "Mode") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "Initialized") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized = (short)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_STUDY_ID_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z = GXutil.lval( oReader.getValue()) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DOM_CD_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DOM_VAR_NM_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VAR_DESC_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SDTM_FLG_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CDASH_FLG_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_INPUT_TYPE_DIV_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_REQUIRED_FLG_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SAS_FIELD_NM_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ODM_DATA_TYPE_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_NOTE_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ORDER_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z = (int)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VERSION_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DEL_FLG_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_DATETIME_Z") ) { if ( ( GXutil.strcmp(oReader.getValue(), "0000-00-00T00:00:00") == 0 ) || ( oReader.existsAttribute("xsi:nil") == 1 ) ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); } else { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z = localUtil.ymdhmsToT( (short)(GXutil.val( GXutil.substring( oReader.getValue(), 1, 4), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 6, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 9, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 12, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 15, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 18, 2), "."))) ; } if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_USER_ID_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_PROG_NM_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_DATETIME_Z") ) { if ( ( GXutil.strcmp(oReader.getValue(), "0000-00-00T00:00:00") == 0 ) || ( oReader.existsAttribute("xsi:nil") == 1 ) ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); } else { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z = localUtil.ymdhmsToT( (short)(GXutil.val( GXutil.substring( oReader.getValue(), 1, 4), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 6, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 9, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 12, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 15, 2), ".")), (byte)(GXutil.val( GXutil.substring( oReader.getValue(), 18, 2), "."))) ; } if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_USER_ID_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_PROG_NM_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z = oReader.getValue() ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_CNT_Z") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z = GXutil.lval( oReader.getValue()) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VAR_DESC_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SDTM_FLG_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CDASH_FLG_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_INPUT_TYPE_DIV_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_REQUIRED_FLG_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_SAS_FIELD_NM_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ODM_DATA_TYPE_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_NOTE_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_ORDER_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_VERSION_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_DEL_FLG_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_DATETIME_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_USER_ID_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_CRT_PROG_NM_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_DATETIME_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_USER_ID_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_PROG_NM_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } if ( GXutil.strcmp2( oReader.getLocalName(), "TBM43_UPD_CNT_N") ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N = (byte)(GXutil.lval( oReader.getValue())) ; if ( GXSoapError > 0 ) { readOk = (short)(1) ; } GXSoapError = oReader.read() ; } nOutParmCount = (short)(nOutParmCount+1) ; if ( readOk == 0 ) { context.globals.sSOAPErrMsg = context.globals.sSOAPErrMsg + "Error reading " + sTagName + GXutil.newLine( ) ; GXSoapError = (short)(nOutParmCount*-1) ; } } } return GXSoapError ; } public void writexml( com.genexus.xml.XMLWriter oWriter , String sName , String sNameSpace ) { if ( (GXutil.strcmp("", sName)==0) ) { sName = "TBM43_STUDY_CDISC_ITEM" ; } if ( (GXutil.strcmp("", sNameSpace)==0) ) { sNameSpace = "SmartEDC_SHIZUOKA" ; } oWriter.writeStartElement(sName); if ( GXutil.strcmp(GXutil.left( sNameSpace, 10), "[*:nosend]") != 0 ) { oWriter.writeAttribute("xmlns", sNameSpace); } else { sNameSpace = GXutil.right( sNameSpace, GXutil.len( sNameSpace)-10) ; } oWriter.writeElement("TBM43_STUDY_ID", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id, 10, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DOM_CD", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DOM_VAR_NM", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VAR_DESC", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SDTM_FLG", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CDASH_FLG", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_INPUT_TYPE_DIV", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_REQUIRED_FLG", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SAS_FIELD_NM", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ODM_DATA_TYPE", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_NOTE", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ORDER", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order, 5, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VERSION", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DEL_FLG", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } if ( GXutil.nullDate().equals(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime) ) { oWriter.writeStartElement("TBM43_CRT_DATETIME"); oWriter.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); oWriter.writeAttribute("xsi:nil", "true"); oWriter.writeEndElement(); } else { sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; oWriter.writeElement("TBM43_CRT_DATETIME", sDateCnv); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } } oWriter.writeElement("TBM43_CRT_USER_ID", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CRT_PROG_NM", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } if ( GXutil.nullDate().equals(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime) ) { oWriter.writeStartElement("TBM43_UPD_DATETIME"); oWriter.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); oWriter.writeAttribute("xsi:nil", "true"); oWriter.writeEndElement(); } else { sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; oWriter.writeElement("TBM43_UPD_DATETIME", sDateCnv); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } } oWriter.writeElement("TBM43_UPD_USER_ID", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_PROG_NM", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_CNT", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt, 10, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("Mode", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("Initialized", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized, 4, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_STUDY_ID_Z", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z, 10, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DOM_CD_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DOM_VAR_NM_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VAR_DESC_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SDTM_FLG_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CDASH_FLG_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_INPUT_TYPE_DIV_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_REQUIRED_FLG_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SAS_FIELD_NM_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ODM_DATA_TYPE_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_NOTE_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ORDER_Z", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z, 5, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VERSION_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DEL_FLG_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } if ( GXutil.nullDate().equals(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z) ) { oWriter.writeStartElement("TBM43_CRT_DATETIME_Z"); oWriter.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); oWriter.writeAttribute("xsi:nil", "true"); oWriter.writeEndElement(); } else { sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; oWriter.writeElement("TBM43_CRT_DATETIME_Z", sDateCnv); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } } oWriter.writeElement("TBM43_CRT_USER_ID_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CRT_PROG_NM_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } if ( GXutil.nullDate().equals(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z) ) { oWriter.writeStartElement("TBM43_UPD_DATETIME_Z"); oWriter.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); oWriter.writeAttribute("xsi:nil", "true"); oWriter.writeEndElement(); } else { sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; oWriter.writeElement("TBM43_UPD_DATETIME_Z", sDateCnv); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } } oWriter.writeElement("TBM43_UPD_USER_ID_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_PROG_NM_Z", GXutil.rtrim( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z)); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_CNT_Z", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z, 10, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VAR_DESC_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SDTM_FLG_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CDASH_FLG_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_INPUT_TYPE_DIV_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_REQUIRED_FLG_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_SAS_FIELD_NM_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ODM_DATA_TYPE_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_NOTE_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_ORDER_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_VERSION_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_DEL_FLG_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CRT_DATETIME_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CRT_USER_ID_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_CRT_PROG_NM_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_DATETIME_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_USER_ID_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_PROG_NM_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeElement("TBM43_UPD_CNT_N", GXutil.trim( GXutil.str( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N, 1, 0))); if ( GXutil.strcmp(sNameSpace, "SmartEDC_SHIZUOKA") != 0 ) { oWriter.writeAttribute("xmlns", "SmartEDC_SHIZUOKA"); } oWriter.writeEndElement(); } public void tojson( ) { AddObjectProperty("TBM43_STUDY_ID", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id); AddObjectProperty("TBM43_DOM_CD", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd); AddObjectProperty("TBM43_DOM_VAR_NM", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm); AddObjectProperty("TBM43_VAR_DESC", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc); AddObjectProperty("TBM43_SDTM_FLG", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg); AddObjectProperty("TBM43_CDASH_FLG", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg); AddObjectProperty("TBM43_INPUT_TYPE_DIV", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div); AddObjectProperty("TBM43_REQUIRED_FLG", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg); AddObjectProperty("TBM43_SAS_FIELD_NM", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm); AddObjectProperty("TBM43_ODM_DATA_TYPE", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type); AddObjectProperty("TBM43_NOTE", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note); AddObjectProperty("TBM43_ORDER", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order); AddObjectProperty("TBM43_VERSION", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version); AddObjectProperty("TBM43_DEL_FLG", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg); sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; AddObjectProperty("TBM43_CRT_DATETIME", sDateCnv); AddObjectProperty("TBM43_CRT_USER_ID", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id); AddObjectProperty("TBM43_CRT_PROG_NM", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm); sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; AddObjectProperty("TBM43_UPD_DATETIME", sDateCnv); AddObjectProperty("TBM43_UPD_USER_ID", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id); AddObjectProperty("TBM43_UPD_PROG_NM", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm); AddObjectProperty("TBM43_UPD_CNT", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt); AddObjectProperty("Mode", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode); AddObjectProperty("Initialized", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized); AddObjectProperty("TBM43_STUDY_ID_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z); AddObjectProperty("TBM43_DOM_CD_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z); AddObjectProperty("TBM43_DOM_VAR_NM_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z); AddObjectProperty("TBM43_VAR_DESC_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z); AddObjectProperty("TBM43_SDTM_FLG_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z); AddObjectProperty("TBM43_CDASH_FLG_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z); AddObjectProperty("TBM43_INPUT_TYPE_DIV_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z); AddObjectProperty("TBM43_REQUIRED_FLG_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z); AddObjectProperty("TBM43_SAS_FIELD_NM_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z); AddObjectProperty("TBM43_ODM_DATA_TYPE_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z); AddObjectProperty("TBM43_NOTE_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z); AddObjectProperty("TBM43_ORDER_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z); AddObjectProperty("TBM43_VERSION_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z); AddObjectProperty("TBM43_DEL_FLG_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z); sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; AddObjectProperty("TBM43_CRT_DATETIME_Z", sDateCnv); AddObjectProperty("TBM43_CRT_USER_ID_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z); AddObjectProperty("TBM43_CRT_PROG_NM_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z); sDateCnv = "" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.year( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "0000", 1, 4-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.month( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "-" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.day( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + "T" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.hour( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.minute( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; sDateCnv = sDateCnv + ":" ; sNumToPad = GXutil.trim( GXutil.str( GXutil.second( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z), 10, 0)) ; sDateCnv = sDateCnv + GXutil.substring( "00", 1, 2-GXutil.len( sNumToPad)) + sNumToPad ; AddObjectProperty("TBM43_UPD_DATETIME_Z", sDateCnv); AddObjectProperty("TBM43_UPD_USER_ID_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z); AddObjectProperty("TBM43_UPD_PROG_NM_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z); AddObjectProperty("TBM43_UPD_CNT_Z", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z); AddObjectProperty("TBM43_VAR_DESC_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N); AddObjectProperty("TBM43_SDTM_FLG_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N); AddObjectProperty("TBM43_CDASH_FLG_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N); AddObjectProperty("TBM43_INPUT_TYPE_DIV_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N); AddObjectProperty("TBM43_REQUIRED_FLG_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N); AddObjectProperty("TBM43_SAS_FIELD_NM_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N); AddObjectProperty("TBM43_ODM_DATA_TYPE_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N); AddObjectProperty("TBM43_NOTE_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N); AddObjectProperty("TBM43_ORDER_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N); AddObjectProperty("TBM43_VERSION_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N); AddObjectProperty("TBM43_DEL_FLG_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N); AddObjectProperty("TBM43_CRT_DATETIME_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N); AddObjectProperty("TBM43_CRT_USER_ID_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N); AddObjectProperty("TBM43_CRT_PROG_NM_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N); AddObjectProperty("TBM43_UPD_DATETIME_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N); AddObjectProperty("TBM43_UPD_USER_ID_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N); AddObjectProperty("TBM43_UPD_PROG_NM_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N); AddObjectProperty("TBM43_UPD_CNT_N", gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N); } public long getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id( long value ) { if ( gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id != value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = "INS" ; this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z_SetNull( ); } gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id = value ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd( String value ) { if ( GXutil.strcmp(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd, value) != 0 ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = "INS" ; this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z_SetNull( ); } gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd = value ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm( String value ) { if ( GXutil.strcmp(gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm, value) != 0 ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = "INS" ; this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z_SetNull( ); this.setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z_SetNull( ); } gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm = value ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_IsNull( ) { return false ; } public int getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order( int value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order = 0 ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_IsNull( ) { return false ; } public java.util.Date getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime( java.util.Date value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime = GXutil.resetTime( GXutil.nullDate() ); } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_IsNull( ) { return false ; } public java.util.Date getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime( java.util.Date value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime = GXutil.resetTime( GXutil.nullDate() ); } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_IsNull( ) { return false ; } public long getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt( long value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N = (byte)(0) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N = (byte)(1) ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt = 0 ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode_IsNull( ) { return false ; } public short getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized( short value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized = (short)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized_IsNull( ) { return false ; } public long getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z( long value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z = 0 ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z_IsNull( ) { return false ; } public int getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z( int value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z = 0 ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z_IsNull( ) { return false ; } public java.util.Date getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z( java.util.Date value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z_IsNull( ) { return false ; } public java.util.Date getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z( java.util.Date value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z_IsNull( ) { return false ; } public String getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z( String value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z = "" ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z_IsNull( ) { return false ; } public long getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z( long value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z = 0 ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N_IsNull( ) { return false ; } public byte getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N( ) { return gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N( byte value ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N = value ; } public void setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N_SetNull( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N = (byte)(0) ; } public boolean getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N_IsNull( ) { return false ; } public void initialize( int remoteHandle ) { initialize( ) ; tbm43_study_cdisc_item_bc obj ; obj = new tbm43_study_cdisc_item_bc( remoteHandle, context) ; obj.initialize(); obj.SetSDT(this, (byte)(1)); setTransaction( obj) ; obj.SetMode("INS"); } public void initialize( ) { gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime = GXutil.resetTime( GXutil.nullDate() ); gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime = GXutil.resetTime( GXutil.nullDate() ); gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z = GXutil.resetTime( GXutil.nullDate() ); gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z = "" ; gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z = "" ; sTagName = "" ; sDateCnv = "" ; sNumToPad = "" ; } public SdtTBM43_STUDY_CDISC_ITEM Clone( ) { SdtTBM43_STUDY_CDISC_ITEM sdt ; tbm43_study_cdisc_item_bc obj ; sdt = (SdtTBM43_STUDY_CDISC_ITEM)(clone()) ; obj = (tbm43_study_cdisc_item_bc)(sdt.getTransaction()) ; obj.SetSDT(sdt, (byte)(0)); return sdt ; } public void setStruct( StructSdtTBM43_STUDY_CDISC_ITEM struct ) { setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id(struct.getTbm43_study_id()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd(struct.getTbm43_dom_cd()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm(struct.getTbm43_dom_var_nm()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc(struct.getTbm43_var_desc()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg(struct.getTbm43_sdtm_flg()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg(struct.getTbm43_cdash_flg()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div(struct.getTbm43_input_type_div()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg(struct.getTbm43_required_flg()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm(struct.getTbm43_sas_field_nm()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type(struct.getTbm43_odm_data_type()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note(struct.getTbm43_note()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order(struct.getTbm43_order()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version(struct.getTbm43_version()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg(struct.getTbm43_del_flg()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime(struct.getTbm43_crt_datetime()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id(struct.getTbm43_crt_user_id()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm(struct.getTbm43_crt_prog_nm()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime(struct.getTbm43_upd_datetime()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id(struct.getTbm43_upd_user_id()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm(struct.getTbm43_upd_prog_nm()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt(struct.getTbm43_upd_cnt()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode(struct.getMode()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized(struct.getInitialized()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z(struct.getTbm43_study_id_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z(struct.getTbm43_dom_cd_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z(struct.getTbm43_dom_var_nm_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z(struct.getTbm43_var_desc_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z(struct.getTbm43_sdtm_flg_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z(struct.getTbm43_cdash_flg_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z(struct.getTbm43_input_type_div_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z(struct.getTbm43_required_flg_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z(struct.getTbm43_sas_field_nm_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z(struct.getTbm43_odm_data_type_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z(struct.getTbm43_note_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z(struct.getTbm43_order_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z(struct.getTbm43_version_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z(struct.getTbm43_del_flg_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z(struct.getTbm43_crt_datetime_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z(struct.getTbm43_crt_user_id_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z(struct.getTbm43_crt_prog_nm_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z(struct.getTbm43_upd_datetime_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z(struct.getTbm43_upd_user_id_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z(struct.getTbm43_upd_prog_nm_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z(struct.getTbm43_upd_cnt_Z()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N(struct.getTbm43_var_desc_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N(struct.getTbm43_sdtm_flg_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N(struct.getTbm43_cdash_flg_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N(struct.getTbm43_input_type_div_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N(struct.getTbm43_required_flg_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N(struct.getTbm43_sas_field_nm_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N(struct.getTbm43_odm_data_type_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N(struct.getTbm43_note_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N(struct.getTbm43_order_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N(struct.getTbm43_version_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N(struct.getTbm43_del_flg_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N(struct.getTbm43_crt_datetime_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N(struct.getTbm43_crt_user_id_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N(struct.getTbm43_crt_prog_nm_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N(struct.getTbm43_upd_datetime_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N(struct.getTbm43_upd_user_id_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N(struct.getTbm43_upd_prog_nm_N()); setgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N(struct.getTbm43_upd_cnt_N()); } public StructSdtTBM43_STUDY_CDISC_ITEM getStruct( ) { StructSdtTBM43_STUDY_CDISC_ITEM struct = new StructSdtTBM43_STUDY_CDISC_ITEM (); struct.setTbm43_study_id(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id()); struct.setTbm43_dom_cd(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd()); struct.setTbm43_dom_var_nm(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm()); struct.setTbm43_var_desc(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc()); struct.setTbm43_sdtm_flg(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg()); struct.setTbm43_cdash_flg(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg()); struct.setTbm43_input_type_div(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div()); struct.setTbm43_required_flg(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg()); struct.setTbm43_sas_field_nm(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm()); struct.setTbm43_odm_data_type(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type()); struct.setTbm43_note(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note()); struct.setTbm43_order(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order()); struct.setTbm43_version(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version()); struct.setTbm43_del_flg(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg()); struct.setTbm43_crt_datetime(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime()); struct.setTbm43_crt_user_id(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id()); struct.setTbm43_crt_prog_nm(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm()); struct.setTbm43_upd_datetime(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime()); struct.setTbm43_upd_user_id(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id()); struct.setTbm43_upd_prog_nm(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm()); struct.setTbm43_upd_cnt(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt()); struct.setMode(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode()); struct.setInitialized(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized()); struct.setTbm43_study_id_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z()); struct.setTbm43_dom_cd_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z()); struct.setTbm43_dom_var_nm_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z()); struct.setTbm43_var_desc_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z()); struct.setTbm43_sdtm_flg_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z()); struct.setTbm43_cdash_flg_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z()); struct.setTbm43_input_type_div_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z()); struct.setTbm43_required_flg_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z()); struct.setTbm43_sas_field_nm_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z()); struct.setTbm43_odm_data_type_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z()); struct.setTbm43_note_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z()); struct.setTbm43_order_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z()); struct.setTbm43_version_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z()); struct.setTbm43_del_flg_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z()); struct.setTbm43_crt_datetime_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z()); struct.setTbm43_crt_user_id_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z()); struct.setTbm43_crt_prog_nm_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z()); struct.setTbm43_upd_datetime_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z()); struct.setTbm43_upd_user_id_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z()); struct.setTbm43_upd_prog_nm_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z()); struct.setTbm43_upd_cnt_Z(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z()); struct.setTbm43_var_desc_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N()); struct.setTbm43_sdtm_flg_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N()); struct.setTbm43_cdash_flg_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N()); struct.setTbm43_input_type_div_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N()); struct.setTbm43_required_flg_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N()); struct.setTbm43_sas_field_nm_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N()); struct.setTbm43_odm_data_type_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N()); struct.setTbm43_note_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N()); struct.setTbm43_order_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N()); struct.setTbm43_version_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N()); struct.setTbm43_del_flg_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N()); struct.setTbm43_crt_datetime_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N()); struct.setTbm43_crt_user_id_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N()); struct.setTbm43_crt_prog_nm_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N()); struct.setTbm43_upd_datetime_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N()); struct.setTbm43_upd_user_id_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N()); struct.setTbm43_upd_prog_nm_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N()); struct.setTbm43_upd_cnt_N(getgxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N()); return struct ; } private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_N ; private byte gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_N ; private short gxTv_SdtTBM43_STUDY_CDISC_ITEM_Initialized ; private short readOk ; private short nOutParmCount ; private int gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order ; private int gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_order_Z ; private long gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id ; private long gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt ; private long gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_study_id_Z ; private long gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_cnt_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Mode ; private String sTagName ; private String sDateCnv ; private String sNumToPad ; private java.util.Date gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime ; private java.util.Date gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime ; private java.util.Date gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_datetime_Z ; private java.util.Date gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_datetime_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_cd_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_dom_var_nm_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_var_desc_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sdtm_flg_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_cdash_flg_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_input_type_div_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_required_flg_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_sas_field_nm_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_odm_data_type_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_note_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_version_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_del_flg_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_user_id_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_crt_prog_nm_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_user_id_Z ; private String gxTv_SdtTBM43_STUDY_CDISC_ITEM_Tbm43_upd_prog_nm_Z ; }
[ "t-shimotori@weing.co.jp" ]
t-shimotori@weing.co.jp
fe22b2efc0139bb9c2c5aca9fab552b531a1e38a
8e9c0eedcacf6ce93e0ef9a795285c0d17d6a181
/RecyclerViewImageViewExample/app/src/main/java/com/example/recyclerviewimageviewexample/MainActivity.java
1e2a5a115bd106210afd3ecedada5d3c12630bc1
[]
no_license
SubhaniSk7/Mobile_Computing
e006600b089e7a1b5857ce69b59eea4bf57433e0
89ddba6c016797c46d6217df38fe7c311367e3c8
refs/heads/master
2020-12-22T04:11:53.338237
2020-01-28T06:01:54
2020-01-28T06:01:54
236,666,501
0
0
null
null
null
null
UTF-8
Java
false
false
1,237
java
package com.example.recyclerviewimageviewexample; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.os.Bundle; public class MainActivity extends AppCompatActivity { private RecyclerView recyclerView; private RecyclerView.LayoutManager layoutManager; private RecyclerView.Adapter adapter; private int[] images = new int[32]; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); for (int i = 1; i < images.length; i++) { images[i - 1] = this.getResources().getIdentifier("p" + String.valueOf(i), "drawable", getPackageName()); } recyclerView = findViewById(R.id.recyclerview); // layoutManager = new LinearLayoutManager(this); layoutManager = new GridLayoutManager(this, 2); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(layoutManager); adapter = new RecyclerAdapter(images, this); recyclerView.setAdapter(adapter); } }
[ "subhanissm007@gmail.com" ]
subhanissm007@gmail.com
68bc8920e3421735404437b959949fa711423a10
bf28c51071a5802e85ab452916e910025e1acda7
/Loops/Div5And6.java
6f6279f3e94fe94a3a59cf06dcddd9bfe5502974
[]
no_license
Tonpha/Java-Course-Programs
235931154a0463c8d53372c8d4bff0e6df3c0f3d
39e7b4b9d6ab75877f8e2b61fe13958146a99e8e
refs/heads/master
2022-06-30T06:43:23.610158
2020-05-11T22:17:29
2020-05-11T22:17:29
263,158,950
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
public class Div5And6 { public static void main(String[] args) { // Program that prints all numbers that are divisible by 5 and 6 from 100 to 1000, ten per line int numInLine = 0; for (int i = 100; i <= 1000; i++) { // Check if the number is divisible by both 5 and 6 if (i % 5 == 0 & i % 6 == 0) { numInLine += 1; // Check if this is the tenth number of this line if (numInLine == 10) { // Print the number and end the line, also reset the count System.out.println(i + "\t"); numInLine = 0; } else { // Just print the number System.out.print(i + "\t"); } } } } }
[ "noreply@github.com" ]
Tonpha.noreply@github.com
bbb7e3b2ce0333d714c4a50cb492a0d62f4f4bb9
e06900d3d17dda04b734dd0d34f03198f475e182
/eventstorm-cqrs/src/test/java/eu/eventstorm/cqrs/impl/ReactiveLocalDatabaseEventStoreCommandHandlerConfiguration.java
a13cc414ef91f17f5c844064bfcdf5acf46fbee6
[ "Apache-2.0" ]
permissive
eventstorm-projects/eventstorm
d65168c4abe57459fa88222b91a23382ebf7cbfe
dca116f6eb386511e934572ce61d39a3b09d8387
refs/heads/master
2023-08-30T22:52:54.193613
2023-08-25T11:48:48
2023-08-25T11:48:48
208,010,054
0
3
Apache-2.0
2023-07-09T22:07:30
2019-09-12T09:11:43
Java
UTF-8
Java
false
false
2,697
java
package eu.eventstorm.cqrs.impl; import eu.eventstorm.cqrs.EventLoop; import eu.eventstorm.cqrs.event.EvolutionHandlers; import eu.eventstorm.cqrs.tracer.NoOpTracer; import eu.eventstorm.cqrs.tracer.Tracer; import eu.eventstorm.eventbus.EventBus; import eu.eventstorm.eventbus.NoEventBus; import eu.eventstorm.eventstore.EventStoreProperties; import eu.eventstorm.eventstore.db.LocalDatabaseEventStore; import eu.eventstorm.sql.Database; import eu.eventstorm.sql.Dialect; import eu.eventstorm.sql.TransactionManager; import eu.eventstorm.sql.impl.DatabaseBuilder; import eu.eventstorm.sql.impl.TransactionManagerConfiguration; import eu.eventstorm.sql.impl.TransactionManagerImpl; import eu.eventstorm.sql.tracer.TransactionTracers; import eu.eventstorm.sql.util.TransactionTemplate; import org.h2.jdbcx.JdbcConnectionPool; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import reactor.core.scheduler.Schedulers; import javax.sql.DataSource; @Configuration @ComponentScan class ReactiveLocalDatabaseEventStoreCommandHandlerConfiguration { @Bean LocalDatabaseEventStore localDatabaseEventStore(Database database) { return new LocalDatabaseEventStore(database, new EventStoreProperties(),null); } @Bean TransactionManager transactionManager(DataSource dataSource) { return new TransactionManagerImpl(dataSource, new TransactionManagerConfiguration(TransactionTracers.noOp())); } @Bean TransactionTemplate transactionTemplate(TransactionManager transactionManager) { return new TransactionTemplate(transactionManager); } @Bean Database database(TransactionManager transactionManager) { return DatabaseBuilder.from(Dialect.Name.H2) .withTransactionManager(transactionManager) .withModule(new eu.eventstorm.eventstore.db.Module("test", null)) .build(); } @Bean DataSource dataSource() { return JdbcConnectionPool.create("jdbc:h2:mem:cqrs-reactive-test;DATABASE_TO_UPPER=false;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'classpath:sql/V1.0.0__init-schema.sql'", "sa", ""); } @Bean EventBus eventBus() { return new NoEventBus(); } @Bean EventLoop eventLoop() { return EventLoops.single(Schedulers.newSingle("event-loop-junit"), Schedulers.newSingle("event-post-junit")); } @Bean Tracer tracer() { return NoOpTracer.INSTANCE; } @Bean EvolutionHandlers evolutionHandlers() { return EvolutionHandlers.newBuilder() .build(); } }
[ "jacques.militello@gmail.com" ]
jacques.militello@gmail.com
34a6b42084456af06ebc5dd5872d51bc06d2eb83
e44f9ef1fb59419cadc73e451b1137971dc5a60f
/MybatisDemo/src/main/java/trev0r/mybatis/Main.java
7d6f7983ad088c6d636c484bfefc515297ac0d89
[]
no_license
trev0rrrr/JavaDemo
bc324ce070c54c0118b015f6e57fb1a3783e9977
ff7f1f43394b2a661c48032976876712cb1582c2
refs/heads/master
2021-08-19T20:05:30.118182
2017-11-27T09:53:23
2017-11-27T09:53:23
111,049,640
0
0
null
null
null
null
UTF-8
Java
false
false
963
java
package trev0r.mybatis; import trev0r.mybatis.domain.Dto; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; public class Main { public static void main(String args[]){ String resource = "conf.xml"; InputStream is = Main.class.getClassLoader().getResourceAsStream(resource); SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(is); SqlSession session = sessionFactory.openSession(); String statement = "trev0r.mybatis.dao.dtoMapper.getDto";//映射sql的标识字符串 Dto dto = session.selectOne(statement, 1); System.out.println(dto); Dto dto2 = session.selectOne(statement, 9527); System.out.println(dto2); session.close(); } }
[ "trev0r@163.com" ]
trev0r@163.com
d42b0e1c829db375612806bc63ed7e65f2219ece
2f029164a8f79db17962a9cf7f1435a8267a315e
/src/main/java/com/mijia/orderList/service/MOrderListServiceImpl.java
a2c2c06df4e6395485c882463c8832794b5e2bb8
[]
no_license
usercore/mijxc
8cda399da80eb60806d8a24af7e342aafdaef5b4
b603fd4c2ede25de382de4d2ae5e3c96b71fb697
refs/heads/master
2020-12-24T08:03:54.930299
2016-11-15T10:00:23
2016-11-15T10:00:23
73,343,483
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package com.mijia.orderList.service; import com.mijia.orderList.domain.MOrderList; import com.mijia.util.db.BaseServiceImpl; import org.springframework.stereotype.Service; import com.mijia.orderList.dao.MOrderListMapper; import com.mijia.util.db.IBaseMapper; import org.springframework.beans.factory.annotation.Autowired; import com.mijia.util.exception.MijiaBusinessException; import java.util.List; /** * */ @Service("mOrderListService") public class MOrderListServiceImpl extends BaseServiceImpl<MOrderList> implements IMOrderListService{ @Autowired MOrderListMapper mOrderListMapper; @Override protected IBaseMapper<MOrderList> getBaseMapper() { return mOrderListMapper; } }
[ "usercore@163.com" ]
usercore@163.com
17567d5cce33c18fa1954fdf49cdd0a0c78e05d1
41fa31de51b8a2f5f24052df42594f5168697dcb
/ids/src/ids/RetractTimer.java
95a7028034369ebb0f44f7cad32a8b7dbb8e0cd4
[]
no_license
vivafion/ids-with-prolog
b342b15de9906ca449248fca2ccca17502abda6d
f8ca7ef1446a1934df7c2dc5dee127a3e1dca023
refs/heads/master
2020-06-04T05:35:18.361684
2011-07-14T10:24:03
2011-07-14T10:24:03
33,038,186
0
0
null
null
null
null
UTF-8
Java
false
false
904
java
package ids; import java.util.Timer; import java.util.TimerTask; public class RetractTimer { class Retract extends TimerTask { public void run() { analyzer.retractPackets(); } } private long delay = 0; private Analyzer analyzer; private Timer timer = new Timer(); public RetractTimer(int seconds,Analyzer analyzer) { this.analyzer = analyzer; timer.schedule(new Retract(), delay, seconds*1000); //timer.schedule(new Retract(), seconds*1000); System.out.println("ho schedulato"); /* System.out.println("Rectract packets"); toolkit = Toolkit.getDefaultToolkit(); timer = new Timer(); timer.schedule(new Retract(), seconds * 1000); */ } public Analyzer getAnalyzer() { return analyzer; } public void setAnalyzer(Analyzer analyzer) { this.analyzer = analyzer; } }
[ "imparato.andrea@gmail.com@f646e146-04d6-3cbc-4c79-2f6dd003eea2" ]
imparato.andrea@gmail.com@f646e146-04d6-3cbc-4c79-2f6dd003eea2
dc46c53209a5cb1d0dce773c6a927a7c871855a6
709bcfbb0ed9a002fa7a30dd5508179974c8a935
/src/main/java/TableGenerator.java
bdfd96225e9b6fb3eb2978f012861bc6674af87f
[]
no_license
loganga/BVA-Tool
6dc9772f9c960b0da343c9d5cc5911be4b193c1e
472e0e1022315073ca270419dfd239b649676ccd
refs/heads/master
2016-09-12T13:04:42.146395
2016-05-25T22:13:00
2016-05-25T22:13:00
59,700,374
0
0
null
null
null
null
UTF-8
Java
false
false
1,963
java
import javax.swing.*; import java.awt.*; import java.util.HashMap; import java.util.List; import java.util.Set; /** * Generates the table of results for the BVA Tool. */ public class TableGenerator { /** * Creates and displays a table based on the given HashMaps of input parameters * and their respective boundary values. * * @param boundaryValues The map of inputs to their boundary values. * @param boundaryValueTypes The map of inputs to their types. */ public void generateTable(HashMap<String, List<Object>> boundaryValues, HashMap<String, Class> boundaryValueTypes) { Set<String> inputs = boundaryValues.keySet(); int rowCount = 0; for (String s : inputs) { rowCount += boundaryValues.get(s).size(); } Object[] columns = inputs.toArray(); Object[][] rowData = new String[rowCount][inputs.size()]; // Fill rows with blank data for (int i = 0; i < rowData.length; i++) { for (int j = 0; j < rowData[i].length; j++) { rowData[i][j] = "-"; } } JTable table = new JTable(rowData, columns); int rowIndex = 0; for (int i = 0; i < columns.length; i++) { List<Object> results = boundaryValues.get(columns[i]); for (int j = 0; j < results.size(); j++) { Class type = boundaryValueTypes.get(columns[i]); table.setValueAt(type.cast(results.get(j)).toString(), rowIndex + j, i); } rowIndex += results.size(); } JScrollPane tableScrollPane = new JScrollPane(table); tableScrollPane.setPreferredSize(new Dimension(500, 300)); JFrame frame = new JFrame("BVA Tool"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(tableScrollPane); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } }
[ "loganga@rose-hulman.edu" ]
loganga@rose-hulman.edu
bf41eeb410a1e56029acf0d8bfc55a274acf99bc
c3bb354dee37fbd6b1534e0c5eb35f2ef6dc4b1b
/src/main/java/com/thymeleaf/learn/Thymeleaf/config/MyUserDetailService.java
43d4c56af576769aa0ebf9f578799b4d193bd8e8
[]
no_license
aRednaskel/thymeleaf
05d7bda7f8a90781cad2dfbf3c7a90b00843f027
03d55e15fca37ffbfc17fe954ec7461611103377
refs/heads/master
2022-11-06T20:30:03.980897
2020-06-30T20:38:15
2020-06-30T20:38:15
266,578,998
0
0
null
null
null
null
UTF-8
Java
false
false
904
java
package com.thymeleaf.learn.Thymeleaf.config; import com.thymeleaf.learn.Thymeleaf.domain.model.user.MyUserDetails; import com.thymeleaf.learn.Thymeleaf.domain.model.user.User; import com.thymeleaf.learn.Thymeleaf.domain.user.UserService; import lombok.RequiredArgsConstructor; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class MyUserDetailService implements UserDetailsService { private final UserService userService; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = userService.findByUsername(username); return new MyUserDetails(user); } }
[ "azulewski@gmail.com" ]
azulewski@gmail.com
36472241fd7dd3c7869dfbf76c7f1bea73fe13e7
ce4d433c9370ccb89bbe5b70e6c0825bc7b3fdf8
/geocoder-core/geocoder-cache/src/main/java/org/geosdi/geocoder/cache/model/Suggest.java
d58b310eabf351062ff024e9bcd4f92bdd640eda
[]
no_license
geosdi/geosdi-geocoder
ba6a2dc1d95c6823b721ef96552304dd14c3db9a
6acf52491d003bc7c4689c23e1805c7602f6fde4
refs/heads/master
2021-01-18T22:03:07.152011
2016-05-04T14:00:05
2016-05-04T14:00:05
25,913,232
1
0
null
null
null
null
UTF-8
Java
false
false
1,430
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 org.geosdi.geocoder.cache.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; import java.util.List; /** * @author Nazzareno Sileno - CNR IMAA geoSDI Group * @email nazzareno.sileno@geosdi.org */ @JsonIgnoreProperties(ignoreUnknown = true) public class Suggest implements Serializable { private static final long serialVersionUID = -6544365695106024398L; @JsonProperty("input") private List<String> input; public List<String> getInput() { return input; } public void setInput(List<String> input) { this.input = input; } public void addInput(String inputToAdd) { this.input.add(inputToAdd); } public String getInputArray() { StringBuilder result = new StringBuilder("{input:["); for (int i = 0; i < this.input.size();) { result.append(this.input.get(i)); if (++i != this.input.size()) { result.append(','); } } result.append("]}"); return result.toString(); } @Override public String toString() { return "Suggest{" + "input=" + input + '}'; } }
[ "ssileno@tiscali.it" ]
ssileno@tiscali.it
15442093ffc0b329303fc45836251fa541fc7b49
b63b81eda0d94b37b55ad113740e19d04bd0ab88
/Lab_3/ComplexNum.java
7a0160ed42c45fdd9654b003ee277da899553b6f
[]
no_license
ayushjain99/OOAD_Lab
b418ba6aa9a4b57dd96aa8597c5efa24f2bb5275
8c14d00297259b9337b6b7162b1ec318adb82563
refs/heads/master
2021-07-21T05:02:28.687622
2021-01-31T13:41:24
2021-01-31T13:41:24
239,296,264
0
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
public class ComplexNum{ // a + ib private double a; private double b; ComplexNum(){ a = 1.0; b = 1.0; } ComplexNum(double a, double b){ this.a = a; this.b = b; } public void add(ComplexNum c1,ComplexNum c2){ this.a = c1.a + c2.a; this.b = c1.b + c2.b; } public void subtract(ComplexNum c1,ComplexNum c2){ this.a = c1.a - c2.a; this.b = c1.b - c2.b; } public void display(){ if(b>=0){ System.out.print(a + " + " + b + "i"); }else{ System.out.print(a + " - " + (-b) + "i"); } } } class ComplexNumTest{ public static void main(String args[]){ ComplexNum c1 = new ComplexNum(5,3); ComplexNum c2 = new ComplexNum(-2,5); System.out.print("c1 = "); c1.display(); System.out.println(); System.out.print("c2 = "); c2.display(); System.out.println(); ComplexNum c3 = new ComplexNum(); c3.add(c1,c2); System.out.print("c1 + c2 = "); c3.display(); System.out.println(); ComplexNum c4 = new ComplexNum(); c4.subtract(c1,c2); System.out.print("c1 - c2 = "); c4.display(); System.out.println(); } }
[ "jainayush4you@gmail.com" ]
jainayush4you@gmail.com
1a9eabe71e840cedb964ce6cf1dcd965c023315a
ea21e79755a61d66e00d13361bd640e31390e872
/src/br/gustavo/general/DownloadInformacoesInfomoney.java
d9b8f3f1ece33db71399136b6b0e86c230f58c5b
[]
no_license
gbasilio/bolsautils
1dee5a5d0a6ddd8fd02c603231a94c7b9035bc74
e02c7e4cea6325272e6630f0bf3a7e9575b9347f
refs/heads/master
2021-09-10T10:43:40.315124
2018-03-24T14:46:19
2018-03-24T14:46:19
109,722,006
0
0
null
null
null
null
UTF-8
Java
false
false
5,559
java
package br.gustavo.general; import java.io.File; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.util.Random; /** * Esta classe é usada para baixar as planilhas do Infomoney com cotações históricas. * * Ela deve ser executada somente uma vez, ao fazer a primeira carga de dados históricos para formar a base de dados que será usada para os backtests. * * As configurações são feitas dentro do próprio método main. * * As planilhas baixadas por esta classe são importadas para a base de dados pela classe "br.gustavo.importers.DadosHistoricosInfomoneyImporter". * * O tratamento de erros desta classe é simplista mas suficiente para o problema. Os erros acontecem com pouca frequência e o processo é executado somente uma vez, então um tratamento manual dos casos de erro é totalmente viável. * * @author Gustavo Zago Basilio * */ public class DownloadInformacoesInfomoney { // Ibrx50 private static String[] ibrx50 = {"BISA3", "GOLL4", "RSID3", "ELPL4", "MMXM3", "GFSA3", "SUZB5", "MRFG3", "PDGR3", "MRVE3", "ALLL3", "BRKM5", "DASA3", "CSAN3", "FIBR3", "RENT3", "CYRE3", "CTIP3", "OIBR4", "OGXP3", "HYPE3", "USIM5", "HGTX3", "TIMP3", "GOAU4", "BRAP4", "LAME4", "CSNA3", "JBSS3", "NATU3", "LREN3", "CRUZ3", "CMIG4", "BRML3", "VIVT4", "SANB11", "CIEL3", "CCRO3", "GGBR4", "BBAS3", "BRFS3", "ITSA4", "BVMF3", "VALE3", "PETR3", "BBDC4", "AMBV4", "VALE5", "ITUB4"}; // SMLL private static String[] smll = {"MNDL3", "POSI3", "CCXC3", "LUPA3", "BICB4", "BEEF3", "LLIS3", "ABCB4", "LLXL3", "TCSA3", "OSXB3", "MGLU3", "BBRK3", "TERI3", "VAGR3", "BPNM4", "TGMA3", "SLCE3", "BISA3", "EQTL3", "BTOW3", "GOLL4", "JHSF3", "COCE5", "HBOR3", "RSID3", "LEVE3", "BRIN3", "QGEP3", "GRND3", "FLRY3", "STBP11", "CGAS5", "PMAM3", "ELPL4", "MMXM3", "MAGG3", "EZTC3", "RAPT4", "HRTP3", "AMAR3", "EVEN3", "ARZZ3", "LPSB3", "MYPK3", "GFSA3", "ALSC3", "SULA11", "IGTA3", "ALPA4", "SUZB5", "VLID3", "MRFG3", "LIGT3", "MILS3", "ESTC3", "OHLB3", "CSMG3", "ODPV3", "BRSR6", "ENBR3", "QUAL3", "PDGR3", "MRVE3", "POMO4", "DASA3", "AEDU3", "TOTS3", "KROT11"}; // ibrx100 private static String[] ibrx100 = { "ABEV3", "ALSC3", "ALUP11", "BBAS3", "BBDC3", "BBDC4", "BBSE3", "BEEF3", "BPAC11", "BRAP4", "BRFS3", "BRKM5", "BRML3", "BRPR3", "BRSR6", "BTOW3", "BVMF3", "CCRO3", "CESP6", "CIEL3", "CMIG4", "CPFE3", "CPLE6", "CSAN3", "CSMG3", "CSNA3", "CVCB3", "CYRE3", "DTEX3", "ECOR3", "EGIE3", "ELET3", "ELET6", "ELPL4", "EMBR3", "ENBR3", "ENGI11", "EQTL3", "ESTC3", "EZTC3", "FIBR3", "FLRY3", "GFSA3", "GGBR4", "GOAU4", "GOLL4", "GRND3", "HGTX3", "HYPE3", "IGTA3", "ITSA4", "ITUB4", "JBSS3", "KLBN11", "KROT3", "LAME3", "LAME4", "LIGT3", "LINX3", "LREN3", "MDIA3", "MGLU3", "MPLU3", "MRFG3", "MRVE3", "MULT3", "MYPK3", "NATU3", "ODPV3", "PCAR4", "PETR3", "PETR4", "POMO4", "PSSA3", "QUAL3", "RADL3", "RAIL3", "RAPT4", "RENT3", "SANB11", "SAPR4", "SBSP3", "SEER3", "SMLS3", "SMTO3", "SULA11", "SUZB5", "TAEE11", "TIET11", "TIMP3", "TOTS3", "TRPL4", "UGPA3", "USIM5", "VALE3", "VIVT4", "VLID3", "VVAR11", "WEGE3", "WIZS3" }; public static void main(String[] args) throws Exception{ // ** config inicio ** // lista de ativos que se quer baixar String[] cods = ibrx100; // pasta local onde se quer armazenar os arquivos baixados String localPath = "/tmp"; // ano inicial da serie que se quer baixar int anoInicio = 2000; // ano final da serie que se quer baixar int anoFim = 2018; // ** config fim ** for (int i = 0; i < cods.length; i++){ for (int j = anoInicio; j <= anoFim; j = j+5){ int anoInicioLote = j; int anoFimLote = (j + 4 <= anoFim) ? (j + 4) : anoFim; // URL de download String infoURL = "http://www.infomoney.com.br/Pages/Download/Download.aspx?dtIni=01/01/" + anoInicioLote + "&dtFinish=31/12/" + anoFimLote + "&Ativo=" + cods[i] + "&Semana=null&Per=null&type=2&Stock=" + cods[i] + "&StockType=1"; try{ // conexao URL url = new URL(infoURL); URLConnection con = url.openConnection(); con.setConnectTimeout(30000); con.setReadTimeout(30000); InputStream in = con.getInputStream(); // arquivo onde sera gravada a planilha File f = new File(localPath + "/infomoney_dl/" + anoInicioLote + "-" + anoFimLote + "/" + cods[i] + ".xls"); f.getParentFile().mkdirs(); java.io.FileOutputStream fos = new java.io.FileOutputStream(f); // download e gravacao no arquivo byte[] buffer = new byte[2048]; int bytesRead = in.read(buffer); while (bytesRead > 0){ fos.write(buffer, 0, bytesRead); bytesRead = in.read(buffer); } // tempinho para nao sobrecarregar servidor da infomoney - nao quero sacanear quem me ajuda! Thread.sleep(10000 + (new Random()).nextInt(15000)); System.out.println("Histórico para " + cods[i] + " anos " + anoInicioLote + " a " + anoFimLote + " baixado!"); } catch (Exception e){ System.out.println("**ERRO ** Erro ao baixar " + cods[i] + " anos " + anoInicioLote + " a " + anoFimLote + "!"); System.out.println("\n" + infoURL + "\n"); e.printStackTrace(); } } } } }
[ "gustavo.basilio@taxweb.com.br" ]
gustavo.basilio@taxweb.com.br
12b80e2e75522f98968d94db21823c1020277160
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/flink/2017/4/MiniCluster.java
03fbef5d443572abd61d67a5afa4cf4b4ec1aeaf
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
19,632
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.minicluster; import akka.actor.ActorSystem; import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.api.common.time.Time; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.UnmodifiableConfiguration; import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.client.JobExecutionException; import org.apache.flink.runtime.clusterframework.FlinkResourceManager; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.concurrent.Future; import org.apache.flink.runtime.heartbeat.HeartbeatServices; import org.apache.flink.runtime.highavailability.HighAvailabilityServices; import org.apache.flink.runtime.highavailability.HighAvailabilityServicesUtils; import org.apache.flink.runtime.jobgraph.JobGraph; import org.apache.flink.runtime.leaderelection.LeaderAddressAndId; import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService; import org.apache.flink.runtime.metrics.MetricRegistry; import org.apache.flink.runtime.metrics.MetricRegistryConfiguration; import org.apache.flink.runtime.resourcemanager.ResourceManagerGateway; import org.apache.flink.runtime.resourcemanager.ResourceManagerRunner; import org.apache.flink.runtime.rpc.RpcService; import org.apache.flink.runtime.rpc.akka.AkkaRpcService; import org.apache.flink.runtime.taskexecutor.TaskManagerRunner; import org.apache.flink.util.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.concurrent.GuardedBy; import java.util.UUID; import static org.apache.flink.util.ExceptionUtils.firstOrSuppressed; import static org.apache.flink.util.Preconditions.checkNotNull; import static org.apache.flink.util.Preconditions.checkState; public class MiniCluster { private static final Logger LOG = LoggerFactory.getLogger(MiniCluster.class); /** The lock to guard startup / shutdown / manipulation methods */ private final Object lock = new Object(); /** The configuration for this mini cluster */ private final MiniClusterConfiguration config; @GuardedBy("lock") private MetricRegistry metricRegistry; @GuardedBy("lock") private RpcService commonRpcService; @GuardedBy("lock") private RpcService[] jobManagerRpcServices; @GuardedBy("lock") private RpcService[] taskManagerRpcServices; @GuardedBy("lock") private RpcService[] resourceManagerRpcServices; @GuardedBy("lock") private HighAvailabilityServices haServices; @GuardedBy("lock") private HeartbeatServices heartbeatServices; @GuardedBy("lock") private ResourceManagerRunner[] resourceManagerRunners; @GuardedBy("lock") private TaskManagerRunner[] taskManagerRunners; @GuardedBy("lock") private MiniClusterJobDispatcher jobDispatcher; /** Flag marking the mini cluster as started/running */ @GuardedBy("lock") private boolean running; // ------------------------------------------------------------------------ /** * Creates a new mini cluster with the default configuration: * <ul> * <li>One JobManager</li> * <li>One TaskManager</li> * <li>One task slot in the TaskManager</li> * <li>All components share the same RPC subsystem (minimizes communication overhead)</li> * </ul> */ public MiniCluster() { this(new MiniClusterConfiguration()); } /** * Creates a new Flink mini cluster based on the given configuration. * * @param config The configuration for the mini cluster */ public MiniCluster(MiniClusterConfiguration config) { this.config = checkNotNull(config, "config may not be null"); } /** * Creates a mini cluster based on the given configuration. * * @deprecated Use {@link #MiniCluster(MiniClusterConfiguration)} instead. * @see #MiniCluster(MiniClusterConfiguration) */ @Deprecated public MiniCluster(Configuration config) { this(createConfig(config, true)); } /** * Creates a mini cluster based on the given configuration, starting one or more * RPC services, depending on the given flag. * * @deprecated Use {@link #MiniCluster(MiniClusterConfiguration)} instead. * @see #MiniCluster(MiniClusterConfiguration) */ @Deprecated public MiniCluster(Configuration config, boolean singleRpcService) { this(createConfig(config, singleRpcService)); } // ------------------------------------------------------------------------ // life cycle // ------------------------------------------------------------------------ /** * Checks if the mini cluster was started and is running. */ public boolean isRunning() { return running; } /** * Starts the mini cluster, based on the configured properties. * * @throws Exception This method passes on any exception that occurs during the startup of * the mini cluster. */ public void start() throws Exception { synchronized (lock) { checkState(!running, "FlinkMiniCluster is already running"); LOG.info("Starting Flink Mini Cluster"); LOG.debug("Using configuration {}", config); final Configuration configuration = new UnmodifiableConfiguration(config.generateConfiguration()); final Time rpcTimeout = config.getRpcTimeout(); final int numJobManagers = config.getNumJobManagers(); final int numTaskManagers = config.getNumTaskManagers(); final int numResourceManagers = config.getNumResourceManagers(); final boolean singleRpc = config.getUseSingleRpcSystem(); try { LOG.info("Starting Metrics Registry"); metricRegistry = createMetricRegistry(configuration); RpcService[] jobManagerRpcServices = new RpcService[numJobManagers]; RpcService[] taskManagerRpcServices = new RpcService[numTaskManagers]; RpcService[] resourceManagerRpcServices = new RpcService[numResourceManagers]; // bring up all the RPC services LOG.info("Starting RPC Service(s)"); // we always need the 'commonRpcService' for auxiliary calls commonRpcService = createRpcService(configuration, rpcTimeout, false, null); if (singleRpc) { // set that same RPC service for all JobManagers and TaskManagers for (int i = 0; i < numJobManagers; i++) { jobManagerRpcServices[i] = commonRpcService; } for (int i = 0; i < numTaskManagers; i++) { taskManagerRpcServices[i] = commonRpcService; } for (int i = 0; i < numResourceManagers; i++) { resourceManagerRpcServices[i] = commonRpcService; } this.resourceManagerRpcServices = null; this.jobManagerRpcServices = null; this.taskManagerRpcServices = null; } else { // start a new service per component, possibly with custom bind addresses final String jobManagerBindAddress = config.getJobManagerBindAddress(); final String taskManagerBindAddress = config.getTaskManagerBindAddress(); final String resourceManagerBindAddress = config.getResourceManagerBindAddress(); for (int i = 0; i < numJobManagers; i++) { jobManagerRpcServices[i] = createRpcService( configuration, rpcTimeout, true, jobManagerBindAddress); } for (int i = 0; i < numTaskManagers; i++) { taskManagerRpcServices[i] = createRpcService( configuration, rpcTimeout, true, taskManagerBindAddress); } for (int i = 0; i < numResourceManagers; i++) { resourceManagerRpcServices[i] = createRpcService( configuration, rpcTimeout, true, resourceManagerBindAddress); } this.jobManagerRpcServices = jobManagerRpcServices; this.taskManagerRpcServices = taskManagerRpcServices; this.resourceManagerRpcServices = resourceManagerRpcServices; } // create the high-availability services LOG.info("Starting high-availability services"); haServices = HighAvailabilityServicesUtils.createAvailableOrEmbeddedServices(configuration); heartbeatServices = HeartbeatServices.fromConfiguration(configuration); // bring up the ResourceManager(s) LOG.info("Starting {} ResourceManger(s)", numResourceManagers); resourceManagerRunners = startResourceManagers( configuration, haServices, heartbeatServices, metricRegistry, numResourceManagers, resourceManagerRpcServices); // bring up the TaskManager(s) for the mini cluster LOG.info("Starting {} TaskManger(s)", numTaskManagers); taskManagerRunners = startTaskManagers( configuration, haServices, metricRegistry, numTaskManagers, taskManagerRpcServices); // bring up the dispatcher that launches JobManagers when jobs submitted LOG.info("Starting job dispatcher(s) for {} JobManger(s)", numJobManagers); jobDispatcher = new MiniClusterJobDispatcher( configuration, haServices, heartbeatServices, metricRegistry, numJobManagers, jobManagerRpcServices); } catch (Exception e) { // cleanup everything try { shutdownInternally(); } catch (Exception ee) { e.addSuppressed(ee); } throw e; } // now officially mark this as running running = true; LOG.info("Flink Mini Cluster started successfully"); } } /** * Shuts down the mini cluster, failing all currently executing jobs. * The mini cluster can be started again by calling the {@link #start()} method again. * * <p>This method shuts down all started services and components, * even if an exception occurs in the process of shutting down some component. * * @throws Exception Thrown, if the shutdown did not complete cleanly. */ public void shutdown() throws Exception { synchronized (lock) { if (running) { LOG.info("Shutting down Flink Mini Cluster"); try { shutdownInternally(); } finally { running = false; } LOG.info("Flink Mini Cluster is shut down"); } } } @GuardedBy("lock") private void shutdownInternally() throws Exception { // this should always be called under the lock assert Thread.holdsLock(lock); // collect the first exception, but continue and add all successive // exceptions as suppressed Throwable exception = null; // cancel all jobs and shut down the job dispatcher if (jobDispatcher != null) { try { jobDispatcher.shutdown(); } catch (Exception e) { exception = e; } jobDispatcher = null; } if (resourceManagerRunners != null) { for (ResourceManagerRunner rm : resourceManagerRunners) { if (rm != null) { try { rm.shutDown(); } catch (Throwable t) { exception = firstOrSuppressed(t, exception); } } } resourceManagerRunners = null; } if (taskManagerRunners != null) { for (TaskManagerRunner tm : taskManagerRunners) { if (tm != null) { try { tm.shutDown(null); } catch (Throwable t) { exception = firstOrSuppressed(t, exception); } } } taskManagerRunners = null; } // shut down the RpcServices exception = shutDownRpc(commonRpcService, exception); exception = shutDownRpcs(jobManagerRpcServices, exception); exception = shutDownRpcs(taskManagerRpcServices, exception); exception = shutDownRpcs(resourceManagerRpcServices, exception); commonRpcService = null; jobManagerRpcServices = null; taskManagerRpcServices = null; resourceManagerRpcServices = null; // shut down high-availability services if (haServices != null) { try { haServices.closeAndCleanupAllData(); } catch (Exception e) { exception = firstOrSuppressed(e, exception); } haServices = null; } // metrics shutdown if (metricRegistry != null) { metricRegistry.shutdown(); metricRegistry = null; } // if anything went wrong, throw the first error with all the additional suppressed exceptions if (exception != null) { ExceptionUtils.rethrowException(exception, "Error while shutting down mini cluster"); } } public void waitUntilTaskManagerRegistrationsComplete() throws Exception { LeaderRetrievalService rmMasterListener = null; Future<LeaderAddressAndId> addressAndIdFuture; try { synchronized (lock) { checkState(running, "FlinkMiniCluster is not running"); OneTimeLeaderListenerFuture listenerFuture = new OneTimeLeaderListenerFuture(); rmMasterListener = haServices.getResourceManagerLeaderRetriever(); rmMasterListener.start(listenerFuture); addressAndIdFuture = listenerFuture.future(); } final LeaderAddressAndId addressAndId = addressAndIdFuture.get(); final ResourceManagerGateway resourceManager = commonRpcService.connect(addressAndId.leaderAddress(), ResourceManagerGateway.class).get(); final int numTaskManagersToWaitFor = taskManagerRunners.length; // poll and wait until enough TaskManagers are available while (true) { int numTaskManagersAvailable = resourceManager.getNumberOfRegisteredTaskManagers(addressAndId.leaderId()).get(); if (numTaskManagersAvailable >= numTaskManagersToWaitFor) { break; } Thread.sleep(2); } } finally { try { if (rmMasterListener != null) { rmMasterListener.stop(); } } catch (Exception e) { LOG.warn("Error shutting down leader listener for ResourceManager"); } } } // ------------------------------------------------------------------------ // running jobs // ------------------------------------------------------------------------ /** * This method executes a job in detached mode. The method returns immediately after the job * has been added to the * * @param job The Flink job to execute * * @throws JobExecutionException Thrown if anything went amiss during initial job launch, * or if the job terminally failed. */ public void runDetached(JobGraph job) throws JobExecutionException { checkNotNull(job, "job is null"); synchronized (lock) { checkState(running, "mini cluster is not running"); jobDispatcher.runDetached(job); } } /** * This method runs a job in blocking mode. The method returns only after the job * completed successfully, or after it failed terminally. * * @param job The Flink job to execute * @return The result of the job execution * * @throws JobExecutionException Thrown if anything went amiss during initial job launch, * or if the job terminally failed. */ public JobExecutionResult runJobBlocking(JobGraph job) throws JobExecutionException, InterruptedException { checkNotNull(job, "job is null"); MiniClusterJobDispatcher dispatcher; synchronized (lock) { checkState(running, "mini cluster is not running"); dispatcher = this.jobDispatcher; } return dispatcher.runJobBlocking(job); } // ------------------------------------------------------------------------ // factories - can be overridden by subclasses to alter behavior // ------------------------------------------------------------------------ /** * Factory method to create the metric registry for the mini cluster * * @param config The configuration of the mini cluster */ protected MetricRegistry createMetricRegistry(Configuration config) { return new MetricRegistry(MetricRegistryConfiguration.fromConfiguration(config)); } /** * Factory method to instantiate the RPC service. * * @param configuration * The configuration of the mini cluster * @param askTimeout * The default RPC timeout for asynchronous "ask" requests. * @param remoteEnabled * True, if the RPC service should be reachable from other (remote) RPC services. * @param bindAddress * The address to bind the RPC service to. Only relevant when "remoteEnabled" is true. * * @return The instantiated RPC service */ protected RpcService createRpcService( Configuration configuration, Time askTimeout, boolean remoteEnabled, String bindAddress) { ActorSystem actorSystem; if (remoteEnabled) { actorSystem = AkkaUtils.createActorSystem(configuration, bindAddress, 0); } else { actorSystem = AkkaUtils.createLocalActorSystem(configuration); } return new AkkaRpcService(actorSystem, askTimeout); } protected ResourceManagerRunner[] startResourceManagers( Configuration configuration, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, int numResourceManagers, RpcService[] resourceManagerRpcServices) throws Exception { final ResourceManagerRunner[] resourceManagerRunners = new ResourceManagerRunner[numResourceManagers]; for (int i = 0; i < numResourceManagers; i++) { resourceManagerRunners[i] = new ResourceManagerRunner( ResourceID.generate(), FlinkResourceManager.RESOURCE_MANAGER_NAME + '_' + i, configuration, resourceManagerRpcServices[i], haServices, heartbeatServices, metricRegistry); resourceManagerRunners[i].start(); } return resourceManagerRunners; } protected TaskManagerRunner[] startTaskManagers( Configuration configuration, HighAvailabilityServices haServices, MetricRegistry metricRegistry, int numTaskManagers, RpcService[] taskManagerRpcServices) throws Exception { final TaskManagerRunner[] taskManagerRunners = new TaskManagerRunner[numTaskManagers]; final boolean localCommunication = numTaskManagers == 1; for (int i = 0; i < numTaskManagers; i++) { taskManagerRunners[i] = new TaskManagerRunner( configuration, new ResourceID(UUID.randomUUID().toString()), taskManagerRpcServices[i], haServices, heartbeatServices, metricRegistry, localCommunication); taskManagerRunners[i].start(); } return taskManagerRunners; } // ------------------------------------------------------------------------ // miscellaneous utilities // ------------------------------------------------------------------------ private static Throwable shutDownRpc(RpcService rpcService, Throwable priorException) { if (rpcService != null) { try { rpcService.stopService(); } catch (Throwable t) { return firstOrSuppressed(t, priorException); } } return priorException; } private static Throwable shutDownRpcs(RpcService[] rpcServices, Throwable priorException) { if (rpcServices != null) { Throwable exception = priorException; for (RpcService service : rpcServices) { try { if (service != null) { service.stopService(); } } catch (Throwable t) { exception = firstOrSuppressed(t, exception); } } } return priorException; } private static MiniClusterConfiguration createConfig(Configuration cfg, boolean singleRpcService) { MiniClusterConfiguration config = cfg == null ? new MiniClusterConfiguration() : new MiniClusterConfiguration(cfg); if (singleRpcService) { config.setUseSingleRpcService(); } else { config.setUseRpcServicePerComponent(); } return config; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
3c46d4eeddf170a403a59dc7135da5a8715aedbd
e6bffedf84186ea220e95c7c5ce7236e198a9c96
/Lexer/src/ILanguage.java
ffb1ca0273fce481c568660c98fed935fdd19e61
[]
no_license
alexSatov/univer-java
0dd6de2e87b2b4caaf79497c87bd095abb9aaa88
701bd70fe297c3efa3a5c08ffae0ce70b8b91cf1
refs/heads/master
2020-03-27T08:01:59.931344
2018-08-26T20:39:36
2018-08-26T20:39:36
146,214,271
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
import java.util.ArrayList; import java.util.HashMap; interface ILanguage { String[] getKeyWords(); String[] getMathOperators(); String[] getLogicOperators(); String[] getBrackets(); String[] getVarTypes(); String[] getSpecSymbols(); String getVarInitBlock(HashMap<String, ArrayList<String>> variables); HashMap<String, ArrayList<String>> getAllVariables(ArrayList<Token> tokens); ArrayList<Token> getIfCondition(ArrayList<Token> tokens, int condIndex); ArrayList<Token> getWhileCondition(ArrayList<Token> tokens, int condIndex); String getIfBlock(ArrayList<Token> condition); String getWhileBlock(ArrayList<Token> condition); String getStartString(); String getExtraString(); String getEndString(); String[] getRange(ArrayList<Token> tokens, int forIndex); String getForBlock(String[] range); }
[ "aleksandr-satov@mail.ru" ]
aleksandr-satov@mail.ru
2c33a53ebc5624af2ff491b483f27a0fdedf4a0f
4bf9793e514bf07c7fb4195109bd42175b408825
/src/ca/bcit/comp2522/labs/lab06/NumberReader.java
0728d885f6a9ddf419d826d358d1a3fe99c29cda
[]
no_license
jackywzheng/2522_A01086998
652abdcb5db7a5112b0ff74a067e3173ff2b097f
1f2e2ab0ea46a96770f7d852fe0a345341171d75
refs/heads/master
2022-03-29T11:25:14.830885
2019-12-06T06:48:10
2019-12-06T06:48:10
209,463,635
0
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
package ca.bcit.comp2522.labs.lab06; /** * NumberReader. */ public class NumberReader { /** * InputReader to read input. */ private InputReader inputReader; /** * Zero-param constructor. */ public NumberReader() { inputReader = new InputReader(); } /** * Asks the user the enter an integer. * Adds it to a total and prints the total upon user entering 0. * Throws exception if not an integer. */ public void guessNumber() { int total = 0; while (true) { try { System.out.println("Enter an integer, 0 to stop: "); int input = inputReader.getNumber(); if (input == 0) { break; } total += input; } catch (NotAnIntegerException e) { System.out.println(e.getMessage()); } } System.out.println("The sum of numbers entered is: " + total); } /** * Drives the program. * @param args, a String */ public static void main(String[] args) { NumberReader numberReader = new NumberReader(); numberReader.guessNumber(); } }
[ "jackywzheng@gmail.com" ]
jackywzheng@gmail.com
88aee229736d7e047b5533ff54c117dda6520f7d
eb5a5cdc0ba9aedb8efb3539de1791812de0e32d
/kkozhuhovskiy/src/main/java/homeWork1/Admin.java
14722e28424fc5ef5dd4b66c88e35dd8ddff434d
[]
no_license
andriyanov-roman/base_1
5247a0523f171d193b35138a562d2bb64be99606
f10175c89399d317fa0a639382c4606d28f2c4b8
refs/heads/master
2020-12-24T15:41:21.923821
2015-10-27T12:30:17
2015-10-27T12:30:17
31,550,728
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package homeWork1; /** * Created by Kirill on 25.03.2015. */ public class Admin extends Employee{ public String getWorkingPlatform() { return workingPlatform; } public void setWorkingPlatform(String workingPlatform) { this.workingPlatform = workingPlatform; } private String workingPlatform; }
[ "k.kozhuhovskiy@gmail.com" ]
k.kozhuhovskiy@gmail.com
7c13de24bbbaa22629be9a1e4fe4bac115b953c5
bfb29acaef6dc22eff5cf0201a5d824cac51af73
/src/main/java/com/synerzip/model/BillingStatus.java
eeae100d19b5e6fc3c5fa2a61d0dfb75cb2c084f
[]
no_license
yogesh-patel/BU-Magmt-API
5046bf87ab4859ac1addf87100cf54ead910f3df
18ca8d596ed3e48395fa7b554081ce7c35c971f1
refs/heads/develop
2020-03-22T07:36:35.149606
2018-07-16T10:55:07
2018-07-16T10:55:07
139,711,508
0
0
null
2018-07-27T08:16:29
2018-07-04T11:13:44
Java
UTF-8
Java
false
false
2,084
java
package com.synerzip.model; import java.io.Serializable; import javax.persistence.CascadeType; 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; @Entity @Table(name = "billing_status") public class BillingStatus implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "emp_id", referencedColumnName = "emp_id") private Employee employee; @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "project_id", referencedColumnName = "project_id") private Project project; @Column(name = "billable_status") private String billableStatus; @Column(name = "billing") private String billing; @Column(name = "involvement") private float involvement; public long getId() { return id; } public Employee getEmployee() { return employee; } public void setEmployee(Employee employee) { this.employee = employee; } public Project getProject() { return project; } public void setProject(Project project) { this.project = project; } public String getBillable_status() { return billableStatus; } public void setBillable_status(String billable_status) { this.billableStatus = billable_status; } public String getBilling() { return billing; } public void setBilling(String billing) { this.billing = billing; } public float getInvolvement() { return involvement; } public void setInvolvement(float involvement) { this.involvement = involvement; } @Override public String toString() { return "BillingStatus [id=" + id + ", employee=" + employee + ", project=" + project + ", billable_status=" + billableStatus + ", billing=" + billing + ", involvement=" + involvement + "]"; } public BillingStatus() { super(); // TODO Auto-generated constructor stub } }
[ "amrutam@synerzipune.local" ]
amrutam@synerzipune.local
60d29830a60895c7151fa57ed639a2a790b705d3
cbb5c53eae76935e7d7f81f88188102c037553db
/src/interop/lithoprototype/model/LithologyDatabase.java
477b8b151cb7baaac2983a919d139fdaabfe5f93
[]
no_license
BDI-UFRGS/Interop-BDI
a275e3394fa87e90135cc9d9ea20944a61267db9
be79cf63130b47c6b08606b282770fda13f37747
refs/heads/master
2021-03-22T05:03:43.356498
2017-09-05T18:25:53
2017-09-05T18:25:53
88,090,948
0
0
null
null
null
null
UTF-8
Java
false
false
3,306
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 interop.lithoprototype.model; import interop.log.model.LogType; import java.util.ArrayList; import java.util.List; /** Classe que contém o conjunto de protótipos de litologias (LithologyPrototype). * @author Bruno Zanette * @author eduardo * */ public class LithologyDatabase { private List<LogType> logTypes; private List<LithologyPrototype> lithologyPrototypes; public LithologyDatabase(List<String> ltw) { logTypes = new ArrayList<>(); lithologyPrototypes = new ArrayList<>(); for(String log:ltw){ LogType lt = new LogType(); lt.setLogType(log); //lt.setLogDescription( TODO ); //lt.setLogMeasureUnit( TODO ); logTypes.add(lt); } } /** * * @return list of lithologies prototypes */ public List<LithologyPrototype> getLithologiesPrototypes(){ return getOnlyLithologiesWithMoreThan_X_Samples(10, lithologyPrototypes); } /* private int indexLogType(LogType logType) { for(int i=0; i<logTypes.size(); i++){ if( compareLogType(logTypes.get(i), logType)){ return i; } } return -1;//ERROR, SHOULD NEVER GET HERE } static private boolean compareLogType(LogType logType1, LogType logType2) { if(logType1 == logType2) return true; else if(logType1.getLogMnemonic().equals(logType2.getLogMnemonic())) return true; else return false; } */ /** * Add ( or create and add) a sample to a lithology prototype * @param lithology * @param OrganizedSample */ public void feedDatabase(int lithology, List<String> OrganizedSample) { boolean found = false; for(LithologyPrototype lp:lithologyPrototypes){ if(!found){ if(lp.getLithologyUID()==lithology){ lp.feedPrototype(OrganizedSample); found = true; } } } if(!found){ LithologyPrototype newLP = new LithologyPrototype(); newLP.setLithologyUID(lithology); newLP.feedPrototype(OrganizedSample); lithologyPrototypes.add(newLP); } } /* Aparentemente quando usamos protótipos de litologias com poucas amostras encontramos erros no cálculo do pdf então usando protótipos com pelo menos 10 amostras não foram encontrados erros, entretando não garanto que com outros arquivos esses erros podem ser encontrados. */ private List<LithologyPrototype> getOnlyLithologiesWithMoreThan_X_Samples(int x, List<LithologyPrototype> lithologyPrototypes) { List<LithologyPrototype> newList = new ArrayList<>(); for(LithologyPrototype lithologyPrototype:lithologyPrototypes){ if(lithologyPrototype.getNumberOfSamples()>x){ newList.add(lithologyPrototype); } } return newList; } }
[ "lucas_hagen@hotmail.com" ]
lucas_hagen@hotmail.com
52dd39fcf0a2f7989395ad4251fb94140abf6eaf
4d134ede9b413f233756de6b2c8c520ab1cb13be
/app/src/main/java/com/example/cityparcel/track/ScheduledPackageNode.java
f97f0689880dda9fea1b46f90636d08cdcfd746b
[]
no_license
ror3665/CityParcelProject
d394ea2497a378a8eba9381f989c3115dd21993d
8ecfbf250949faaff123d01bdeb4f59807edfbe4
refs/heads/master
2022-11-09T17:27:00.928072
2020-06-25T13:05:59
2020-06-25T13:05:59
268,427,662
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.example.cityparcel.track; public class ScheduledPackageNode { private int index; private String title; private String destination; private String price; public ScheduledPackageNode(String title, String destination, String price, int index) { this.title = title; this.destination = destination; this.price = price; this.index = index; } public int getIndex() {return index; } public String getTitle() { return title; } public String getDestination() { return destination; } public String getPrice() { return price; } }
[ "ror3665@naver.com" ]
ror3665@naver.com
b29fa715b1c8ffa661cb4f5d0ca12f66b3847707
ebca06cd87c1bbe55d9a498d54e62d5237d80e18
/common/src/test/java/org/apache/ivory/cleanup/LogCleanupServiceTest.java
7bc93539d224794658f67590ae2c38bbde4cf224
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sriksun/ivry-security
8c687352d7a5871095c40b9fce7006d94c46090e
f078e858df58e46d9e5c9eb6dc60f44b63f7fc61
refs/heads/master
2021-01-19T05:53:43.235219
2013-02-27T00:27:42
2013-02-27T00:27:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,386
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ivory.cleanup; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.ivory.IvoryException; import org.apache.ivory.entity.AbstractTestBase; import org.apache.ivory.entity.store.ConfigurationStore; import org.apache.ivory.entity.v0.EntityType; import org.apache.ivory.entity.v0.Frequency; import org.apache.ivory.entity.v0.process.Process; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class LogCleanupServiceTest extends AbstractTestBase { private FileSystem fs; private MiniDFSCluster targetDfsCluster; @AfterClass public void tearDown() { this.dfsCluster.shutdown(); this.targetDfsCluster.shutdown(); } @BeforeClass public void setup() throws Exception { conf.set("hadoop.log.dir", "/tmp"); this.dfsCluster = new MiniDFSCluster(conf, 1, true, null); fs = dfsCluster.getFileSystem(); storeEntity(EntityType.CLUSTER, "testCluster"); conf = new Configuration(); System.setProperty("test.build.data", "target/tdfs/data" + System.currentTimeMillis()); this.targetDfsCluster = new MiniDFSCluster(conf, 1, true, null); storeEntity(EntityType.CLUSTER, "backupCluster"); storeEntity(EntityType.FEED, "impressionFeed"); storeEntity(EntityType.FEED, "clicksFeed"); storeEntity(EntityType.FEED, "imp-click-join1"); storeEntity(EntityType.FEED, "imp-click-join2"); storeEntity(EntityType.PROCESS, "sample"); Process process = ConfigurationStore.get().get(EntityType.PROCESS, "sample"); Process otherProcess = (Process) process.clone(); otherProcess.setName("sample2"); otherProcess.setFrequency(new Frequency("days(1)")); ConfigurationStore.get().remove(EntityType.PROCESS, otherProcess.getName()); ConfigurationStore.get().publish(EntityType.PROCESS, otherProcess); } @Test public void testProcessLogs() throws IOException, IvoryException, InterruptedException { Path instanceLogPath = new Path( "/projects/ivory/staging/ivory/workflows/process/" + "sample" + "/logs/job-2010-01-01-01-00/000"); Path instanceLogPath1 = new Path( "/projects/ivory/staging/ivory/workflows/process/" + "sample" + "/logs/job-2010-01-01-01-00/001"); Path instanceLogPath2 = new Path( "/projects/ivory/staging/ivory/workflows/process/" + "sample" + "/logs/job-2010-01-01-02-00/001"); Path instanceLogPath3 = new Path( "/projects/ivory/staging/ivory/workflows/process/" + "sample2" + "/logs/job-2010-01-01-01-00/000"); Path instanceLogPath4 = new Path( "/projects/ivory/staging/ivory/workflows/process/" + "sample" + "/logs/latedata/2010-01-01-01-00"); fs.mkdirs(instanceLogPath); fs.mkdirs(instanceLogPath1); fs.mkdirs(instanceLogPath2); fs.mkdirs(instanceLogPath3); fs.mkdirs(instanceLogPath4); // fs.setTimes wont work on dirs fs.createNewFile(new Path(instanceLogPath, "oozie.log")); fs.createNewFile(new Path(instanceLogPath, "pigAction_SUCCEEDED.log")); Thread.sleep(61000); AbstractCleanupHandler processCleanupHandler = new ProcessCleanupHandler(); processCleanupHandler.cleanup(); Assert.assertFalse(fs.exists(instanceLogPath)); Assert.assertFalse(fs.exists(instanceLogPath1)); Assert.assertFalse(fs.exists(instanceLogPath2)); Assert.assertTrue(fs.exists(instanceLogPath3)); } @Test public void testFeedLogs() throws IOException, IvoryException, InterruptedException { Path instanceLogPath = new Path( "/projects/ivory/staging/ivory/workflows/feed/" + "impressionFeed" + "/logs/job-2010-01-01-01-00/testCluster/000"); Path instanceLogPath1 = new Path( "/projects/ivory/staging/ivory/workflows/feed/" + "impressionFeed2" + "/logs/job-2010-01-01-01-00/testCluster/000"); FileSystem tfs = targetDfsCluster.getFileSystem(); fs.mkdirs(instanceLogPath); fs.mkdirs(instanceLogPath1); tfs.mkdirs(instanceLogPath); tfs.mkdirs(instanceLogPath1); fs.createNewFile(new Path(instanceLogPath, "oozie.log")); tfs.createNewFile(new Path(instanceLogPath, "oozie.log")); Thread.sleep(61000); AbstractCleanupHandler feedCleanupHandler = new FeedCleanupHandler(); feedCleanupHandler.cleanup(); Assert.assertFalse(fs.exists(instanceLogPath)); Assert.assertFalse(tfs.exists(instanceLogPath)); Assert.assertTrue(fs.exists(instanceLogPath1)); Assert.assertTrue(tfs.exists(instanceLogPath1)); } }
[ "psychidris@gmail.com" ]
psychidris@gmail.com
7c07276e5c18de97376aafa9bdf2e906af86e78a
22eb5d2b2f5e9cd51dee0e62c1968ae3bccde944
/app/src/test/java/smktelkommalang/onboarding/ExampleUnitTest.java
2d1d3d7c527a4a296908e2ebf9425c4f2d818dda
[]
no_license
melanihariono/Lombok-Paradise
2e18d4013bd30b5df2b069270a628ab64c18aac9
231fef902b9247f720f26c05ac92f813c0f700e4
refs/heads/master
2021-01-20T02:01:39.704294
2017-04-26T21:08:52
2017-04-26T21:08:52
89,361,236
0
0
null
null
null
null
UTF-8
Java
false
false
415
java
package smktelkommalang.onboarding; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "melanihariono@gmail.com" ]
melanihariono@gmail.com
0d52b3eb0e72f5eccac14c68c3a4d096090273b1
0024943c2761dd97e27b5aab275af6fc05213c99
/PrambananSwing/src/org/prambananswing/swing/menu/JPMenuBar.java
9aa861705faf15eacbd3f14792cd155c9a3c65f7
[]
no_license
latiefalamin/Test
edf2dafc67ed60b15e939995ec20b79fac158719
cc57fb89dbe3b83b506a514fbfabe7478df12d51
refs/heads/master
2016-09-11T02:03:48.824207
2011-06-28T08:24:08
2011-06-28T08:24:08
1,964,886
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
/* * creator : Latief Al Amin * e-mail : al _amin_o4_032@yahoo.co.id * create : Oct 2, 2010 */ package org.prambananswing.swing.menu; import java.awt.Graphics; import javax.swing.JMenuBar; /** * * @author Latief Al Amin */ public class JPMenuBar extends JMenuBar{ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); } }
[ "al_amin_04_032@yahoo.co.id" ]
al_amin_04_032@yahoo.co.id
5834a4d6628fc10e9f85fe3a82ada879ce629b9e
8ab7cba4d4a1629a7051251eeea02a6fd40716cb
/Documents complementaires/Classes/Class Model/Coureur.java
97350438fbd9fd74510a3d66b472727636477364
[]
no_license
fdayet/Projet_LO52
718433bb9f9d9b1fdf7c70b96d47f3df0ebe1053
64dd70337fc8769f09e6acf452dc3b496590f82f
refs/heads/main
2023-02-08T05:02:25.029472
2021-01-03T12:49:58
2021-01-03T12:49:58
316,259,051
0
0
null
null
null
null
UTF-8
Java
false
false
208
java
/** * @author Mehdi Fracso * @version 1.0 * @created 26-Nov-2020 3:34:14 PM */ public class Coureur { private int id_coureur; private int niveau; private char nom_complet; public Coureur(){ } }
[ "mehdifracso@gmail.com" ]
mehdifracso@gmail.com
673a3486230708b1990ddf7501e08c99f0a02296
83e383724b919516d0bae74332b3665698feedad
/com/amassicci/markovbot/Poster.java
71257d5de646c9bf579121db4f3da5158f392992
[]
no_license
mindlessdrone/Markov2016
a9c7847a876e2f051db3fe603f11a68c617ffbd4
0a68d0aa2fa0d7b002429c64137989e1e4de7811
refs/heads/master
2016-09-14T20:31:57.839735
2016-05-10T13:28:25
2016-05-10T13:28:25
56,899,251
0
0
null
null
null
null
UTF-8
Java
false
false
2,532
java
package com.amassicci.markovbot; import twitter4j.*; import com.amassicci.markovbot.utils.*; /*********************************************** * Poster: Main posting thread, uses model to * generate text and sleeps to avoid rate limits * Author: Anthony Massicci * * fields * +static final String THREAD_NAME * -Twitter twitter * -Markov model * -boolean isRunning * * methods * +Poster(Twitter, Markov) * +void run() * +void shutdown() * ********************************************/ public class Poster implements Runnable { //thread name public static final String THREAD_NAME = "Poster"; // fields private Twitter twitter; private Markov model; private boolean isRunning; //constructor public Poster(Twitter twitter_, Markov model_) { twitter = twitter_; model = model_; isRunning = true; Message.display(Message.INFO_MSG, THREAD_NAME, "Hello from Poster!"); } // implemented fields //--------------------------------------------------- // run: Main Thread entry point, posts tweets and then // sleeps for one minute to avoid Twitter being angry // with us // -------------------------------------------------- public void run() { while (isRunning) { // generate text and post String msg = model.generate(); try { twitter.updateStatus(msg); } catch (TwitterException ex) { Message.display(Message.FATAL_MSG, THREAD_NAME, "There was an error posting to twitter."); isRunning = false; break; } Message.display(Message.INFO_MSG, THREAD_NAME, "Text generated and successfully posted to Twitter."); // take a nap for a bit to avoid rate limits Message.display(Message.INFO_MSG, THREAD_NAME, "Sleeping for 1m."); try { Thread.sleep(60000); } catch (InterruptedException ex) { Message.display(Message.WARN_MSG, THREAD_NAME, "Thread interrupted."); shutdown(); } } } //------------------------------------------------------------ // shutdown: called when the thread needs to be shutdown // cleans up and ends thread loop. // ----------------------------------------------------------- public void shutdown() { isRunning = false; Message.display(Message.INFO_MSG, THREAD_NAME, "Shutting down"); } }
[ "riaahacker456@gmail.com" ]
riaahacker456@gmail.com
50ed9639216af66fac07bfb91fbdfe55f64c0997
61c2d82fa50ea4ddaf05ef641c80daa01112d89f
/app/src/main/java/com/example/bhavya/myapplication/BaseFragment.java
badfe00a74b5c7f13adc4943be33fe3aef5a05fc
[]
no_license
IamBhavya/ScrapBook
1e6a3171352a5fe00a25ca8e8916d021c06d52c1
c50e41c417c3a3311e5c35628439a2211561f253
refs/heads/master
2021-01-10T17:56:57.289975
2015-11-04T00:57:09
2015-11-04T00:57:09
44,503,057
0
0
null
null
null
null
UTF-8
Java
false
false
1,184
java
package com.example.bhavya.myapplication; import android.app.Activity; import android.app.DialogFragment; import android.net.Uri; import android.os.Bundle; import android.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class BaseFragment extends DialogFragment { public static final String ARG_SECTION_NUMBER = "ARG_SECTION_NUMBER"; /** * Default empty constructor */ public BaseFragment(){ // } /** * This interface must be implemented by activities that contain this * mFragment to allow an interaction in this mFragment to be communicated * to the mActivity and potentially other fragments contained in that * mActivity. * <p> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { public void onFragmentInteraction(Uri uri); public void onFragmentInteraction(String id); public void onFragmentInteraction(int actionId); } }
[ "bhavarora17@gmail.com" ]
bhavarora17@gmail.com
eeb019423491a459d8b16b1fcc767646ea35cbac
7ffbbcd59fe2f97214dce9e8d7d955dfdd066966
/noark-core/src/main/java/xyz/noark/core/ioc/definition/field/ListFieldDefinition.java
b1738283d64f5e69c544f462b02757b11aeb9237
[ "LicenseRef-scancode-mulanpsl-1.0-en", "LicenseRef-scancode-unknown-license-reference", "MulanPSL-1.0" ]
permissive
stephenlam520/noark3
fcfda6c692c7d76bc70a1870dbfb0c8f9e71ff39
ac73971f8535ed44246b0a6536618de135a4a493
refs/heads/master
2023-01-07T02:03:33.391288
2020-11-10T06:00:52
2020-11-10T06:00:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
/* * Copyright © 2018 www.noark.xyz All Rights Reserved. * * 感谢您选择Noark框架,希望我们的努力能为您提供一个简单、易用、稳定的服务器端框架 ! * 除非符合Noark许可协议,否则不得使用该文件,您可以下载许可协议文件: * * http://www.noark.xyz/LICENSE * * 1.未经许可,任何公司及个人不得以任何方式或理由对本框架进行修改、使用和传播; * 2.禁止在本项目或任何子项目的基础上发展任何派生版本、修改版本或第三方版本; * 3.无论你对源代码做出任何修改和改进,版权都归Noark研发团队所有,我们保留所有权利; * 4.凡侵犯Noark版权等知识产权的,必依法追究其法律责任,特此郑重法律声明! */ package xyz.noark.core.ioc.definition.field; import xyz.noark.core.ioc.IocMaking; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.util.stream.Collectors; /** * List类型的注入. * <p> * 所有实现此接口或继承此类的都算. * * @author 小流氓[176543888@qq.com] * @since 3.0 */ public class ListFieldDefinition extends DefaultFieldDefinition { public ListFieldDefinition(Field field, boolean required) { super(field, (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0], required); } @Override protected Object extractInjectionObject(IocMaking making, Class<?> klass, Field field) { return making.findAllImpl(fieldClass).stream().sorted((b1, b2) -> b1.getOrder() - b2.getOrder()).map(b -> b.getSingle()).collect(Collectors.toList()); } }
[ "176543888@qq.com" ]
176543888@qq.com
b31cca7ff8e865899f2de69c70ba57b407476d2f
d2666e2408e5c8459ee1f3ee46de379c684332f2
/src/main/java/sjq/light/sqlparser/sqltype/DDLType.java
560cb66ad46f38003170a255115551ca634f16ce
[]
no_license
LaplaceDemon/light-sqlparser
816f8032f09001832da8777fae126afc1a7fa462
38aa46429efc5c0c2e038919d9a1b6c03262771e
refs/heads/master
2020-04-14T19:34:45.857869
2019-01-04T05:46:29
2019-01-04T05:46:29
164,063,173
0
0
null
null
null
null
UTF-8
Java
false
false
119
java
package sjq.light.sqlparser.sqltype; public enum DDLType implements DetailType { CreateTable,AlterTable,DropTable; }
[ "laplacedemon.sjq@gmail.com" ]
laplacedemon.sjq@gmail.com
37b7633981a309ece5a36e0a51c8b61dfac43007
ae2785435c76828c58a4fe1b0c39562245e3db9f
/src/test/java/com/breno/copsboot/user/web/UserRestControllerTest.java
5eff3465e1c733fc4bf3432a984f9316e545a1d5
[]
no_license
francbreno/CopsBoot
00150c2083678d5c228ba75f9492f960fcc339df
89ea9593735b23a9fddaa810cfc0d8684caa6e12
refs/heads/master
2020-05-16T00:32:28.410136
2019-05-01T19:32:27
2019-05-01T19:32:27
182,582,887
0
0
null
null
null
null
UTF-8
Java
false
false
4,493
java
package com.breno.copsboot.user.web; import static com.breno.copsboot.infrastructure.security.SecurityHelperForMockMvc.HEADER_AUTHORIZATION; import static com.breno.copsboot.infrastructure.security.SecurityHelperForMockMvc.bearer; import static com.breno.copsboot.infrastructure.security.SecurityHelperForMockMvc.obtainAccessToken; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.http.MediaType; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import com.breno.copsboot.infrastructure.SpringProfiles; import com.breno.copsboot.infrastructure.security.StubUserDetailsService; import com.breno.copsboot.infrastructure.security.config.AuthorizationServerConfiguration; import com.breno.copsboot.infrastructure.security.config.ResourceServerConfiguration; import com.breno.copsboot.infrastructure.security.config.SecurityConfiguration; import com.breno.copsboot.user.UserService; import com.breno.copsboot.user.Users; import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(SpringRunner.class) @WebMvcTest(UserRestController.class) @ActiveProfiles(SpringProfiles.TEST) public class UserRestControllerTest { @TestConfiguration @Import({ ResourceServerConfiguration.class, AuthorizationServerConfiguration.class }) static class TestConfig { @Bean public UserDetailsService userDetailsService() { return new StubUserDetailsService(); } // @Bean // public TokenStore tokenStore() { // return new InMemoryTokenStore(); // } @Bean public SecurityConfiguration securityConfiguration() { return new SecurityConfiguration(); } } // Test infrastructure will inject an instance @Autowired private ObjectMapper objectMapper; @Autowired private MockMvc mvc; @MockBean private UserService service; @Test public void givenNotAuthenticated_whenAskingMyDetail_forbidden() throws Exception { mvc.perform(get("/api/users/me")) .andExpect(status().isUnauthorized()); } @Test public void givenAuthenticatedAsOfficer_whenAskingMyDetails_details_returned() throws Exception { String accessToken = obtainAccessToken( mvc, Users.OFFICER_EMAIL, Users.OFFICER_PASSWORD); when(service.getUser(Users.officer().getId())).thenReturn(Optional.of(Users.officer())); mvc.perform(get("/api/users/me") .header(HEADER_AUTHORIZATION, bearer(accessToken))) .andExpect(status().isOk()) .andExpect(jsonPath("id").exists()) .andExpect(jsonPath("email").value(Users.OFFICER_EMAIL)) .andExpect(jsonPath("roles").isArray()) .andExpect(jsonPath("roles[0]").value("OFFICER")); } @Test public void testCreateOfficer() throws Exception { String email = "francbreno@test.com"; String password = "MyP@assWordi$"; CreateOfficerParameters parameters = new CreateOfficerParameters(); parameters.setEmail(email); parameters.setPassword(password); when(service.createOfficer(email, password)).thenReturn(Users.newOfficer(email, password)); mvc.perform(post("/api/users") .contentType(MediaType.APPLICATION_JSON_UTF8) // uses Jackson ObjectMapper to transform the parameters object into json data .content(objectMapper.writeValueAsString(parameters))) .andExpect(status().isCreated()) .andExpect(jsonPath("id").exists()) .andExpect(jsonPath("email").value(email)) .andExpect(jsonPath("roles").isArray()) .andExpect(jsonPath("roles[0]").value("OFFICER")); verify(service).createOfficer(email, password); } }
[ "francbreno@gmail.com" ]
francbreno@gmail.com
4dbe68b8f1079f42f1e354c0fa84c3a27c29be2a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_c87b22c707e135a0caa25661aa78b0dc9ce428d7/DynmapPlugin/27_c87b22c707e135a0caa25661aa78b0dc9ce428d7_DynmapPlugin_s.java
4166e4d000332acde2fda2a26dc65655278dff02
[]
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
41,692
java
package org.dynmap.spout; import java.io.File; import java.net.InetSocketAddress; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import org.dynmap.DynmapCommonAPI; import org.dynmap.DynmapCore; import org.dynmap.DynmapLocation; import org.dynmap.DynmapWorld; import org.dynmap.Log; import org.dynmap.DynmapChunk; import org.dynmap.common.BiomeMap; import org.dynmap.common.DynmapCommandSender; import org.dynmap.common.DynmapPlayer; import org.dynmap.common.DynmapServerInterface; import org.dynmap.common.DynmapListenerManager.EventType; import org.dynmap.markers.MarkerAPI; import org.dynmap.spout.permissions.PermissionProvider; import org.dynmap.utils.MapChunkCache; import org.spout.api.chat.ChatSection; import org.spout.api.chat.style.ChatStyle; import org.spout.api.command.Command; import org.spout.api.command.CommandSource; import org.spout.api.command.RawCommandExecutor; import org.spout.api.entity.Player; import org.spout.api.event.Event; import org.spout.api.event.EventExecutor; import org.spout.api.event.EventHandler; import org.spout.api.event.Listener; import org.spout.api.event.Order; import org.spout.api.event.block.BlockChangeEvent; import org.spout.api.event.chunk.ChunkPopulateEvent; import org.spout.api.event.chunk.ChunkUpdatedEvent; //import org.spout.api.event.chunk.ChunkLoadEvent; //import org.spout.api.event.chunk.ChunkPopulateEvent; //import org.spout.api.event.chunk.ChunkUnloadEvent; //import org.spout.api.event.chunk.ChunkUpdatedEvent; import org.spout.api.event.player.PlayerChatEvent; import org.spout.api.event.player.PlayerJoinEvent; import org.spout.api.event.player.PlayerLeaveEvent; import org.spout.api.exception.CommandException; import org.spout.api.geo.World; import org.spout.api.geo.cuboid.Block; import org.spout.api.geo.cuboid.Chunk; import org.spout.api.geo.discrete.Point; import org.spout.api.math.Vector3; import org.spout.api.plugin.CommonPlugin; import org.spout.api.plugin.PluginDescriptionFile; import org.spout.api.plugin.PluginManager; import org.spout.api.scheduler.TaskPriority; import org.spout.api.util.Named; import org.spout.api.Server; import org.spout.api.Spout; public class DynmapPlugin extends CommonPlugin implements DynmapCommonAPI { private final String prefix = "[Dynmap] "; private DynmapCore core; private PermissionProvider permissions; private String version; public SpoutEventProcessor sep; public Server server; //TODO public SnapshotCache sscache; public static DynmapPlugin plugin; public DynmapPlugin() { plugin = this; server = (Server) Spout.getEngine(); } /** * Server access abstraction class */ public class SpoutServer implements DynmapServerInterface { public void scheduleServerTask(final Runnable run, long delay) { Spout.getScheduler().scheduleSyncDelayedTask(DynmapPlugin.this, run, delay * 50, TaskPriority.NORMAL); } public DynmapPlayer[] getOnlinePlayers() { Player[] players = server.getOnlinePlayers(); DynmapPlayer[] dplay = new DynmapPlayer[players.length]; for(int i = 0; i < players.length; i++) { dplay[i] = new SpoutPlayer(players[i]); } return dplay; } public void reload() { PluginManager pluginManager = server.getPluginManager(); pluginManager.disablePlugin(DynmapPlugin.this); pluginManager.enablePlugin(DynmapPlugin.this); } public DynmapPlayer getPlayer(String name) { Player p = server.getPlayer(name, true); if(p != null) { return new SpoutPlayer(p); } return null; } public Set<String> getIPBans() { //TODO return getServer().getIPBans(); return Collections.emptySet(); } public <T> Future<T> callSyncMethod(final Callable<T> task) { final FutureTask<T> ft = new FutureTask<T>(task); final Object o = new Object(); synchronized(o) { server.getScheduler().scheduleSyncDelayedTask(DynmapPlugin.this, new Runnable() { public void run() { try { ft.run(); } finally { synchronized(o) { o.notify(); } } } }); try { o.wait(); } catch (InterruptedException ix) {} } return ft; } public String getServerName() { return server.getName(); } public boolean isPlayerBanned(String pid) { //TODO OfflinePlayer p = getServer().getOfflinePlayer(pid); //TODO if((p != null) && p.isBanned()) //TODO return true; return false; } public String stripChatColor(String s) { return ChatStyle.strip(s); } private Set<EventType> registered = new HashSet<EventType>(); public boolean requestEventNotification(EventType type) { if(registered.contains(type)) return true; switch(type) { case WORLD_LOAD: case WORLD_UNLOAD: /* Already called for normal world activation/deactivation */ break; case WORLD_SPAWN_CHANGE: //TODO sep.registerEvent(Type.SPAWN_CHANGE, new WorldListener() { //TODO @Override //TODO public void onSpawnChange(SpawnChangeEvent evt) { //TODO DynmapWorld w = new SpoutWorld(evt.getWorld()); //TODO core.listenerManager.processWorldEvent(EventType.WORLD_SPAWN_CHANGE, w); //TODO } //TODO }); break; case PLAYER_JOIN: case PLAYER_QUIT: /* Already handled */ break; case PLAYER_BED_LEAVE: //TODO sep.registerEvent(Type.PLAYER_BED_LEAVE, new PlayerListener() { //TODO @Override //TODO public void onPlayerBedLeave(PlayerBedLeaveEvent evt) { //TODO DynmapPlayer p = new BukkitPlayer(evt.getPlayer()); //TODO core.listenerManager.processPlayerEvent(EventType.PLAYER_BED_LEAVE, p); //TODO } //TODO }); break; case PLAYER_CHAT: Listener chatListener = new Listener() { @SuppressWarnings("unused") @EventHandler(order=Order.MONITOR) public void handleChatEvent(PlayerChatEvent event) { DynmapPlayer p = null; if(event.getPlayer() != null) p = new SpoutPlayer(event.getPlayer()); core.listenerManager.processChatEvent(EventType.PLAYER_CHAT, p, event.getMessage().getPlainString()); } }; server.getEventManager().registerEvents(chatListener, plugin); break; case BLOCK_BREAK: //TODO - doing this for all block changes, not just breaks sep.registerEvent(BlockChangeEvent.class, new EventExecutor() { public void execute(Event evt) { BlockChangeEvent bce = (BlockChangeEvent)evt; Block b = bce.getBlock(); Log.info("BlockChangeEvent:" + b.getPosition()); core.listenerManager.processBlockEvent(EventType.BLOCK_BREAK, b.getMaterial().getId(), b.getWorld().getName(), b.getX(), b.getY(), b.getZ()); } }); break; case SIGN_CHANGE: //TODO - no event yet //bep.registerEvent(Type.SIGN_CHANGE, new BlockListener() { // @Override // public void onSignChange(SignChangeEvent evt) { // Block b = evt.getBlock(); // Location l = b.getLocation(); // String[] lines = evt.getLines(); /* Note: changes to this change event - intentional */ // DynmapPlayer dp = null; // Player p = evt.getPlayer(); // if(p != null) dp = new BukkitPlayer(p); // core.listenerManager.processSignChangeEvent(EventType.SIGN_CHANGE, b.getType().getId(), // l.getWorld().getName(), l.getBlockX(), l.getBlockY(), l.getBlockZ(), lines, dp); // } //}); break; default: Log.severe("Unhandled event type: " + type); return false; } return true; } public boolean sendWebChatEvent(String source, String name, String msg) { DynmapWebChatEvent evt = new DynmapWebChatEvent(source, name, msg); server.getEventManager().callEvent(evt); return (evt.isCancelled() == false); } public void broadcastMessage(String msg) { server.broadcastMessage(msg); } public String[] getBiomeIDs() { BiomeMap[] b = BiomeMap.values(); String[] bname = new String[b.length]; for(int i = 0; i < bname.length; i++) bname[i] = b[i].toString(); return bname; } public double getCacheHitRate() { //TODO return sscache.getHitRate(); return 0.0; } public void resetCacheStats() { //TODO sscache.resetStats(); } public DynmapWorld getWorldByName(String wname) { World w = server.getWorld(wname); if(w != null) { return new SpoutWorld(w); } return null; } public DynmapPlayer getOfflinePlayer(String name) { Player p = server.getPlayer(name, true); if(p != null) { return new SpoutPlayer(p); } return null; } public Set<String> checkPlayerPermissions(String player, Set<String> perms) { Set<String> hasperms = null; Player p = server.getPlayer(player, true); if(p != null) { hasperms = new HashSet<String>(); for (String pp : perms) { if(p.hasPermission("dynmap." + pp)) perms.add(pp); } } return hasperms; } public boolean checkPlayerPermission(String player, String perm) { Player p = server.getPlayer(player, true); if(p != null) { return p.hasPermission("dynmap." + perm); } return false; } /** * Render processor helper - used by code running on render threads to request chunk snapshot cache from server/sync thread */ public MapChunkCache createMapChunkCache(DynmapWorld w, final List<DynmapChunk> chunks, boolean blockdata, boolean highesty, boolean biome, boolean rawbiome) { final MapChunkCache c = w.getChunkCache(chunks); if(w.visibility_limits != null) { for(MapChunkCache.VisibilityLimit limit: w.visibility_limits) { c.setVisibleRange(limit); } c.setHiddenFillStyle(w.hiddenchunkstyle); c.setAutoGenerateVisbileRanges(w.do_autogenerate); } if(w.hidden_limits != null) { for(MapChunkCache.VisibilityLimit limit: w.hidden_limits) { c.setHiddenRange(limit); } c.setHiddenFillStyle(w.hiddenchunkstyle); } if(c.setChunkDataTypes(blockdata, biome, highesty, rawbiome) == false) { Log.severe("Spout build does not support biome APIs"); } if(chunks.size() == 0) { /* No chunks to get? */ c.loadChunks(0); return c; } while(!c.isDoneLoading()) { synchronized(c) { Spout.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { public void run() { c.loadChunks(chunks.size()); synchronized(c) { c.notify(); } } }, TaskPriority.NORMAL); try { c.wait(); } catch (InterruptedException x) { return null; } } } return c; } @Override public int getMaxPlayers() { return Spout.getEngine().getMaxPlayers(); } @Override public int getCurrentPlayers() { return Spout.getEngine().getOnlinePlayers().length; } } /** * Player access abstraction class */ public class SpoutPlayer extends SpoutCommandSender implements DynmapPlayer { private Player player; public SpoutPlayer(Player p) { super(p); player = p; } public boolean isConnected() { return player.isOnline(); } public String getName() { return player.getName(); } public String getDisplayName() { return player.getDisplayName(); } public boolean isOnline() { return player.isOnline(); } public DynmapLocation getLocation() { Point p = player.getPosition(); return toLoc(p); } public String getWorld() { World w = player.getWorld(); if(w != null) { return w.getName(); } return null; } public InetSocketAddress getAddress() { return new InetSocketAddress(player.getAddress(), 0); } public boolean isSneaking() { //TODO return false; } public int getHealth() { //TODO - return e.getHealth(): return 0; } public int getArmorPoints() { //TODO return 0; } public DynmapLocation getBedSpawnLocation() { //TODO return null; } public long getLastLoginTime() { // TODO return 0; } public long getFirstLoginTime() { // TODO return 0; } } /* Handler for generic console command sender */ public class SpoutCommandSender implements DynmapCommandSender { private CommandSource sender; public SpoutCommandSender(CommandSource send) { sender = send; } public boolean hasPrivilege(String privid) { return permissions.has(sender, privid); } public void sendMessage(String msg) { sender.sendMessage(msg); } public boolean isConnected() { return true; } public boolean isOp() { //TODO return sender.isInGroup(group) return false; } } @Override public void onEnable() { PluginDescriptionFile pdfFile = this.getDescription(); version = pdfFile.getVersion(); /* Initialize event processor */ if(sep == null) sep = new SpoutEventProcessor(this); /* Set up player login/quit event handler */ registerPlayerLoginListener(); /* Set up permissions */ permissions = new PermissionProvider(); /* Use spout default */ /* Get and initialize data folder */ File dataDirectory = this.getDataFolder(); if(dataDirectory.exists() == false) dataDirectory.mkdirs(); /* Get MC version */ String mcver = server.getVersion(); /* Instantiate core */ if(core == null) core = new DynmapCore(); /* Inject dependencies */ core.setPluginVersion(version); core.setMinecraftVersion(mcver); core.setDataFolder(dataDirectory); core.setServer(new SpoutServer()); /* Enable core */ if(!core.enableCore()) { this.setEnabled(false); return; } //TODO sscache = new SnapshotCache(core.getSnapShotCacheSize()); server.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { public void run() { /* Initialized the currently loaded worlds */ for (World world : server.getWorlds()) { SpoutWorld w = new SpoutWorld(world); if(core.processWorldLoad(w)) /* Have core process load first - fire event listeners if good load after */ core.listenerManager.processWorldEvent(EventType.WORLD_LOAD, w); } } }, 100 * 50, TaskPriority.NORMAL); /* Register our update trigger events */ registerEvents(); Command cmd = server.getRootCommand().addSubCommand(new Named() { public String getName() { return "dynmap"; } }, "dynmap"); cmd.setRawExecutor(new RawCommandExecutor() { @Override public void execute(Command command, CommandSource sender, String name, List<ChatSection> args, int baseIndex, boolean fuzzyLookup) throws CommandException { DynmapCommandSender dsender; if(sender instanceof Player) { dsender = new SpoutPlayer((Player)sender); } else { dsender = new SpoutCommandSender(sender); } String[] cmdargs = new String[args.size()-1]; for(int i = 0; i < cmdargs.length; i++) { cmdargs[i] = args.get(i+1).getPlainString(); } if(!core.processCommand(dsender, args.get(0).getPlainString(), "dynmap", cmdargs)) throw new CommandException("Bad Command"); } }); } @Override public void onDisable() { /* Reset registered listeners */ sep.cleanup(); /* Disable core */ core.disableCore(); //TODO if(sscache != null) { //TODO sscache.cleanup(); //TODO sscache = null; //TODO } } public String getPrefix() { return prefix; } public final MarkerAPI getMarkerAPI() { return core.getMarkerAPI(); } public final boolean markerAPIInitialized() { return core.markerAPIInitialized(); } public final boolean sendBroadcastToWeb(String sender, String msg) { return core.sendBroadcastToWeb(sender, msg); } public final int triggerRenderOfVolume(String wid, int minx, int miny, int minz, int maxx, int maxy, int maxz) { return core.triggerRenderOfVolume(wid, minx, miny, minz, maxx, maxy, maxz); } public final int triggerRenderOfBlock(String wid, int x, int y, int z) { return core.triggerRenderOfBlock(wid, x, y, z); } public final void setPauseFullRadiusRenders(boolean dopause) { core.setPauseFullRadiusRenders(dopause); } public final boolean getPauseFullRadiusRenders() { return core.getPauseFullRadiusRenders(); } public final void setPauseUpdateRenders(boolean dopause) { core.setPauseUpdateRenders(dopause); } public final boolean getPauseUpdateRenders() { return core.getPauseUpdateRenders(); } public final void setPlayerVisiblity(String player, boolean is_visible) { core.setPlayerVisiblity(player, is_visible); } public final boolean getPlayerVisbility(String player) { return core.getPlayerVisbility(player); } public final void postPlayerMessageToWeb(String playerid, String playerdisplay, String message) { core.postPlayerMessageToWeb(playerid, playerdisplay, message); } public final void postPlayerJoinQuitToWeb(String playerid, String playerdisplay, boolean isjoin) { core.postPlayerJoinQuitToWeb(playerid, playerdisplay, isjoin); } public final String getDynmapCoreVersion() { return core.getDynmapCoreVersion(); } public final void setPlayerVisiblity(Player player, boolean is_visible) { core.setPlayerVisiblity(player.getName(), is_visible); } public final boolean getPlayerVisbility(Player player) { return core.getPlayerVisbility(player.getName()); } public final void postPlayerMessageToWeb(Player player, String message) { core.postPlayerMessageToWeb(player.getName(), player.getDisplayName(), message); } public void postPlayerJoinQuitToWeb(Player player, boolean isjoin) { core.postPlayerJoinQuitToWeb(player.getName(), player.getDisplayName(), isjoin); } public String getDynmapVersion() { return version; } private static DynmapLocation toLoc(Point p) { return new DynmapLocation(p.getWorld().getName(), p.getX(), p.getY(), p.getZ()); } private void registerPlayerLoginListener() { sep.registerEvent(PlayerJoinEvent.class, new EventExecutor() { public void execute(Event evt) { PlayerJoinEvent pje = (PlayerJoinEvent)evt; SpoutPlayer dp = new SpoutPlayer(pje.getPlayer()); core.listenerManager.processPlayerEvent(EventType.PLAYER_JOIN, dp); } }); sep.registerEvent(PlayerLeaveEvent.class, new EventExecutor() { public void execute(Event evt) { PlayerLeaveEvent pje = (PlayerLeaveEvent)evt; SpoutPlayer dp = new SpoutPlayer(pje.getPlayer()); core.listenerManager.processPlayerEvent(EventType.PLAYER_QUIT, dp); } }); } private boolean onblockchange; private boolean onplayerjoin; private void registerEvents() { // BlockListener blockTrigger = new BlockListener() { // @Override // public void onBlockPlace(BlockPlaceEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onplace) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockplace"); // } // } // // @Override // public void onBlockBreak(BlockBreakEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onbreak) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockbreak"); // } // } // // @Override // public void onLeavesDecay(LeavesDecayEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onleaves) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "leavesdecay"); // } // } // // @Override // public void onBlockBurn(BlockBurnEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onburn) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockburn"); // } // } // // @Override // public void onBlockForm(BlockFormEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockform) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockform"); // } // } // // @Override // public void onBlockFade(BlockFadeEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockfade) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockfade"); // } // } // // @Override // public void onBlockSpread(BlockSpreadEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockspread) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockspread"); // } // } // // @Override // public void onBlockFromTo(BlockFromToEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getToBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockfromto) // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockfromto"); // loc = event.getBlock().getLocation(); // wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockfromto) // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockfromto"); // } // // @Override // public void onBlockPhysics(BlockPhysicsEvent event) { // if(event.isCancelled()) // return; // Location loc = event.getBlock().getLocation(); // String wn = loc.getWorld().getName(); // sscache.invalidateSnapshot(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // if(onblockphysics) { // mapManager.touch(wn, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), "blockphysics"); // } // } // // @Override // public void onBlockPistonRetract(BlockPistonRetractEvent event) { // if(event.isCancelled()) // return; // Block b = event.getBlock(); // Location loc = b.getLocation(); // BlockFace dir; // try { /* Workaround Bukkit bug = http://leaky.bukkit.org/issues/1227 */ // dir = event.getDirection(); // } catch (ClassCastException ccx) { // dir = BlockFace.NORTH; // } // String wn = loc.getWorld().getName(); // int x = loc.getBlockX(), y = loc.getBlockY(), z = loc.getBlockZ(); // sscache.invalidateSnapshot(wn, x, y, z); // if(onpiston) // mapManager.touch(wn, x, y, z, "pistonretract"); // for(int i = 0; i < 2; i++) { // x += dir.getModX(); // y += dir.getModY(); // z += dir.getModZ(); // sscache.invalidateSnapshot(wn, x, y, z); // if(onpiston) // mapManager.touch(wn, x, y, z, "pistonretract"); // } // } // @Override // public void onBlockPistonExtend(BlockPistonExtendEvent event) { // if(event.isCancelled()) // return; // Block b = event.getBlock(); // Location loc = b.getLocation(); // BlockFace dir; // try { /* Workaround Bukkit bug = http://leaky.bukkit.org/issues/1227 */ // dir = event.getDirection(); // } catch (ClassCastException ccx) { // dir = BlockFace.NORTH; // } // String wn = loc.getWorld().getName(); // int x = loc.getBlockX(), y = loc.getBlockY(), z = loc.getBlockZ(); // sscache.invalidateSnapshot(wn, x, y, z); // if(onpiston) // mapManager.touch(wn, x, y, z, "pistonretract"); // for(int i = 0; i < 1+event.getLength(); i++) { // x += dir.getModX(); // y += dir.getModY(); // z += dir.getModZ(); // sscache.invalidateSnapshot(wn, x, y, z); // if(onpiston) // mapManager.touch(wn, x, y, z, "pistonretract"); // } // } // }; // // // To trigger rendering. // onplace = core.isTrigger("blockplaced"); // bep.registerEvent(Event.Type.BLOCK_PLACE, blockTrigger); // // onbreak = core.isTrigger("blockbreak"); // bep.registerEvent(Event.Type.BLOCK_BREAK, blockTrigger); // // if(core.isTrigger("snowform")) Log.info("The 'snowform' trigger has been deprecated due to Bukkit changes - use 'blockformed'"); // // onleaves = core.isTrigger("leavesdecay"); // bep.registerEvent(Event.Type.LEAVES_DECAY, blockTrigger); // // onburn = core.isTrigger("blockburn"); // bep.registerEvent(Event.Type.BLOCK_BURN, blockTrigger); // // onblockform = core.isTrigger("blockformed"); // bep.registerEvent(Event.Type.BLOCK_FORM, blockTrigger); // // onblockfade = core.isTrigger("blockfaded"); // bep.registerEvent(Event.Type.BLOCK_FADE, blockTrigger); // // onblockspread = core.isTrigger("blockspread"); // bep.registerEvent(Event.Type.BLOCK_SPREAD, blockTrigger); // // onblockfromto = core.isTrigger("blockfromto"); // bep.registerEvent(Event.Type.BLOCK_FROMTO, blockTrigger); // // onblockphysics = core.isTrigger("blockphysics"); // bep.registerEvent(Event.Type.BLOCK_PHYSICS, blockTrigger); // // onpiston = core.isTrigger("pistonmoved"); // bep.registerEvent(Event.Type.BLOCK_PISTON_EXTEND, blockTrigger); // bep.registerEvent(Event.Type.BLOCK_PISTON_RETRACT, blockTrigger); /* Register block change trigger */ Listener blockTrigger = new Listener() { @SuppressWarnings("unused") @EventHandler(order=Order.MONITOR) void handleBlockChange(BlockChangeEvent event) { if(event.isCancelled()) return; Point p = event.getBlock().getPosition(); core.mapManager.touch(p.getWorld().getName(), (int)p.getX(), (int)p.getY(), (int)p.getZ(), "blockchange"); } }; onblockchange = core.isTrigger("blockchange"); if(onblockchange) server.getEventManager().registerEvents(blockTrigger, plugin); /* Register player event trigger handlers */ Listener playerTrigger = new Listener() { @EventHandler void handlePlayerJoin(PlayerJoinEvent event) { if(onplayerjoin) { Point loc = event.getPlayer().getPosition(); core.mapManager.touch(loc.getWorld().getName(), (int)loc.getX(), (int)loc.getY(), (int)loc.getZ(), "playerjoin"); } core.listenerManager.processPlayerEvent(EventType.PLAYER_JOIN, new SpoutPlayer(event.getPlayer())); } @EventHandler void handlePlayerLeave(PlayerLeaveEvent event) { core.listenerManager.processPlayerEvent(EventType.PLAYER_QUIT, new SpoutPlayer(event.getPlayer())); } }; onplayerjoin = core.isTrigger("playerjoin"); server.getEventManager().registerEvents(playerTrigger, plugin); Listener chunkTrigger = new Listener() { @EventHandler void handleChunkPopulated(ChunkPopulateEvent evt) { Chunk c = evt.getChunk(); int cx = c.getX() << Chunk.BLOCKS.BITS; int cy = c.getY() << Chunk.BLOCKS.BITS; int cz = c.getZ() << Chunk.BLOCKS.BITS; core.mapManager.touchVolume(c.getWorld().getName(), cx, cy, cz, cx+15, cy+15, cz+15, "chunkpopulated"); } @EventHandler void handleChunkUpdated(ChunkUpdatedEvent evt) { Chunk c = evt.getChunk(); int cx = c.getX() << Chunk.BLOCKS.BITS; int cy = c.getY() << Chunk.BLOCKS.BITS; int cz = c.getZ() << Chunk.BLOCKS.BITS; int cnt = evt.getBlockUpdateCount(); if (cnt >= 0) { for (int i = 0; i < cnt; i++) { Vector3 v = evt.getBlockUpdate(i); core.mapManager.touch(c.getWorld().getName(), cx+(int)v.getX(), cy+(int)v.getY(), cz+(int)v.getZ(), "blockupdated"); } } else { core.mapManager.touchVolume(c.getWorld().getName(), cx, cy, cz, cx+15, cy+15, cz+15, "chunkupdated"); } } }; server.getEventManager().registerEvents(chunkTrigger, plugin); // if(onplayermove) // bep.registerEvent(Event.Type.PLAYER_MOVE, playerTrigger); // // /* Register entity event triggers */ // EntityListener entityTrigger = new EntityListener() { // @Override // public void onEntityExplode(EntityExplodeEvent event) { // Location loc = event.getLocation(); // String wname = loc.getWorld().getName(); // int minx, maxx, miny, maxy, minz, maxz; // minx = maxx = loc.getBlockX(); // miny = maxy = loc.getBlockY(); // minz = maxz = loc.getBlockZ(); // /* Calculate volume impacted by explosion */ // List<Block> blocks = event.blockList(); // for(Block b: blocks) { // Location l = b.getLocation(); // int x = l.getBlockX(); // if(x < minx) minx = x; // if(x > maxx) maxx = x; // int y = l.getBlockY(); // if(y < miny) miny = y; // if(y > maxy) maxy = y; // int z = l.getBlockZ(); // if(z < minz) minz = z; // if(z > maxz) maxz = z; // } // sscache.invalidateSnapshot(wname, minx, miny, minz, maxx, maxy, maxz); // if(onexplosion) { // mapManager.touchVolume(wname, minx, miny, minz, maxx, maxy, maxz, "entityexplode"); // } // } // }; // onexplosion = core.isTrigger("explosion"); // bep.registerEvent(Event.Type.ENTITY_EXPLODE, entityTrigger); // // // /* Register world event triggers */ // WorldListener worldTrigger = new WorldListener() { // @Override // public void onChunkLoad(ChunkLoadEvent event) { // if(DynmapCore.ignore_chunk_loads) // return; // Chunk c = event.getChunk(); // /* Touch extreme corners */ // int x = c.getX() << 4; // int z = c.getZ() << 4; // mapManager.touchVolume(event.getWorld().getName(), x, 0, z, x+15, 128, z+16, "chunkload"); // } // @Override // public void onChunkPopulate(ChunkPopulateEvent event) { // Chunk c = event.getChunk(); // /* Touch extreme corners */ // int x = c.getX() << 4; // int z = c.getZ() << 4; // mapManager.touchVolume(event.getWorld().getName(), x, 0, z, x+15, 128, z+16, "chunkpopulate"); // } // @Override // public void onWorldLoad(WorldLoadEvent event) { // core.updateConfigHashcode(); // SpoutWorld w = new SpoutWorld(event.getWorld()); // if(core.processWorldLoad(w)) /* Have core process load first - fire event listeners if good load after */ // core.listenerManager.processWorldEvent(EventType.WORLD_LOAD, w); // } // @Override // public void onWorldUnload(WorldUnloadEvent event) { // core.updateConfigHashcode(); // DynmapWorld w = core.getWorld(event.getWorld().getName()); // if(w != null) // core.listenerManager.processWorldEvent(EventType.WORLD_UNLOAD, w); // } // }; // // ongeneratechunk = core.isTrigger("chunkgenerated"); // if(ongeneratechunk) { // bep.registerEvent(Event.Type.CHUNK_POPULATED, worldTrigger); // } // onloadchunk = core.isTrigger("chunkloaded"); // if(onloadchunk) { // bep.registerEvent(Event.Type.CHUNK_LOAD, worldTrigger); // } // // // To link configuration to real loaded worlds. // bep.registerEvent(Event.Type.WORLD_LOAD, worldTrigger); // bep.registerEvent(Event.Type.WORLD_UNLOAD, worldTrigger); } public void assertPlayerInvisibility(String player, boolean is_invisible, String plugin_id) { core.assertPlayerInvisibility(player, is_invisible, plugin_id); } public void assertPlayerVisibility(String player, boolean is_visible, String plugin_id) { core.assertPlayerVisibility(player, is_visible, plugin_id); } public boolean setDisableChatToWebProcessing(boolean disable) { return core.setDisableChatToWebProcessing(disable); } @Override public boolean testIfPlayerVisibleToPlayer(String player, String player_to_see) { return core.testIfPlayerVisibleToPlayer(player, player_to_see); } @Override public boolean testIfPlayerInfoProtected() { return core.testIfPlayerInfoProtected(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5886650c07559c4f4816de0b1870ff93e6019c4d
48444f0c940a3340c64a2f65aff616ecdd686f7b
/refseq-proteincoding-gff/build/gen/org/intermine/model/bio/SyntenicRegionShadow.java
e7a8f1f53125ffc6028699989ca1fb7ec7c4a121
[]
no_license
theWizardsBaker/hymenoptera-bio-sources-test
7a7da1e75600bc6d46909b1b4bbfa4696f387805
cc6b4be131aa5194cd134ce7cf087551a14ea01d
refs/heads/master
2020-07-27T02:31:00.207624
2019-09-16T16:09:05
2019-09-16T16:09:05
208,837,517
0
0
null
null
null
null
UTF-8
Java
false
false
45,866
java
package org.intermine.model.bio; import org.intermine.objectstore.ObjectStore; import org.intermine.objectstore.intermine.NotXmlParser; import org.intermine.objectstore.intermine.NotXmlRenderer; import org.intermine.objectstore.proxy.ProxyCollection; import org.intermine.objectstore.proxy.ProxyReference; import org.intermine.model.StringConstructor; import org.intermine.metadata.TypeUtil; import org.intermine.util.DynamicUtil; import org.intermine.model.ShadowClass; public class SyntenicRegionShadow implements SyntenicRegion, ShadowClass { public static final Class<SyntenicRegion> shadowOf = SyntenicRegion.class; // Ref: org.intermine.model.bio.SyntenicRegion.syntenyBlock protected org.intermine.model.InterMineObject syntenyBlock; public org.intermine.model.bio.SyntenyBlock getSyntenyBlock() { if (syntenyBlock instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.SyntenyBlock) ((org.intermine.objectstore.proxy.ProxyReference) syntenyBlock).getObject()); }; return (org.intermine.model.bio.SyntenyBlock) syntenyBlock; } public void setSyntenyBlock(final org.intermine.model.bio.SyntenyBlock syntenyBlock) { this.syntenyBlock = syntenyBlock; } public void proxySyntenyBlock(final org.intermine.objectstore.proxy.ProxyReference syntenyBlock) { this.syntenyBlock = syntenyBlock; } public org.intermine.model.InterMineObject proxGetSyntenyBlock() { return syntenyBlock; } // Attr: org.intermine.model.bio.SequenceFeature.source protected java.lang.String source; public java.lang.String getSource() { return source; } public void setSource(final java.lang.String source) { this.source = source; } // Attr: org.intermine.model.bio.SequenceFeature.score protected java.lang.Double score; public java.lang.Double getScore() { return score; } public void setScore(final java.lang.Double score) { this.score = score; } // Attr: org.intermine.model.bio.SequenceFeature.scoreType protected java.lang.String scoreType; public java.lang.String getScoreType() { return scoreType; } public void setScoreType(final java.lang.String scoreType) { this.scoreType = scoreType; } // Attr: org.intermine.model.bio.SequenceFeature.status protected java.lang.String status; public java.lang.String getStatus() { return status; } public void setStatus(final java.lang.String status) { this.status = status; } // Attr: org.intermine.model.bio.SequenceFeature.length protected java.lang.Integer length; public java.lang.Integer getLength() { return length; } public void setLength(final java.lang.Integer length) { this.length = length; } // Ref: org.intermine.model.bio.SequenceFeature.sequenceOntologyTerm protected org.intermine.model.InterMineObject sequenceOntologyTerm; public org.intermine.model.bio.SOTerm getSequenceOntologyTerm() { if (sequenceOntologyTerm instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.SOTerm) ((org.intermine.objectstore.proxy.ProxyReference) sequenceOntologyTerm).getObject()); }; return (org.intermine.model.bio.SOTerm) sequenceOntologyTerm; } public void setSequenceOntologyTerm(final org.intermine.model.bio.SOTerm sequenceOntologyTerm) { this.sequenceOntologyTerm = sequenceOntologyTerm; } public void proxySequenceOntologyTerm(final org.intermine.objectstore.proxy.ProxyReference sequenceOntologyTerm) { this.sequenceOntologyTerm = sequenceOntologyTerm; } public org.intermine.model.InterMineObject proxGetSequenceOntologyTerm() { return sequenceOntologyTerm; } // Ref: org.intermine.model.bio.SequenceFeature.chromosomeLocation protected org.intermine.model.InterMineObject chromosomeLocation; public org.intermine.model.bio.Location getChromosomeLocation() { if (chromosomeLocation instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Location) ((org.intermine.objectstore.proxy.ProxyReference) chromosomeLocation).getObject()); }; return (org.intermine.model.bio.Location) chromosomeLocation; } public void setChromosomeLocation(final org.intermine.model.bio.Location chromosomeLocation) { this.chromosomeLocation = chromosomeLocation; } public void proxyChromosomeLocation(final org.intermine.objectstore.proxy.ProxyReference chromosomeLocation) { this.chromosomeLocation = chromosomeLocation; } public org.intermine.model.InterMineObject proxGetChromosomeLocation() { return chromosomeLocation; } // Ref: org.intermine.model.bio.SequenceFeature.sequence protected org.intermine.model.InterMineObject sequence; public org.intermine.model.bio.Sequence getSequence() { if (sequence instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Sequence) ((org.intermine.objectstore.proxy.ProxyReference) sequence).getObject()); }; return (org.intermine.model.bio.Sequence) sequence; } public void setSequence(final org.intermine.model.bio.Sequence sequence) { this.sequence = sequence; } public void proxySequence(final org.intermine.objectstore.proxy.ProxyReference sequence) { this.sequence = sequence; } public org.intermine.model.InterMineObject proxGetSequence() { return sequence; } // Ref: org.intermine.model.bio.SequenceFeature.chromosome protected org.intermine.model.InterMineObject chromosome; public org.intermine.model.bio.Chromosome getChromosome() { if (chromosome instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Chromosome) ((org.intermine.objectstore.proxy.ProxyReference) chromosome).getObject()); }; return (org.intermine.model.bio.Chromosome) chromosome; } public void setChromosome(final org.intermine.model.bio.Chromosome chromosome) { this.chromosome = chromosome; } public void proxyChromosome(final org.intermine.objectstore.proxy.ProxyReference chromosome) { this.chromosome = chromosome; } public org.intermine.model.InterMineObject proxGetChromosome() { return chromosome; } // Col: org.intermine.model.bio.SequenceFeature.overlappingFeatures protected java.util.Set<org.intermine.model.bio.SequenceFeature> overlappingFeatures = new java.util.HashSet<org.intermine.model.bio.SequenceFeature>(); public java.util.Set<org.intermine.model.bio.SequenceFeature> getOverlappingFeatures() { return overlappingFeatures; } public void setOverlappingFeatures(final java.util.Set<org.intermine.model.bio.SequenceFeature> overlappingFeatures) { this.overlappingFeatures = overlappingFeatures; } public void addOverlappingFeatures(final org.intermine.model.bio.SequenceFeature arg) { overlappingFeatures.add(arg); } // Col: org.intermine.model.bio.SequenceFeature.childFeatures protected java.util.Set<org.intermine.model.bio.SequenceFeature> childFeatures = new java.util.HashSet<org.intermine.model.bio.SequenceFeature>(); public java.util.Set<org.intermine.model.bio.SequenceFeature> getChildFeatures() { return childFeatures; } public void setChildFeatures(final java.util.Set<org.intermine.model.bio.SequenceFeature> childFeatures) { this.childFeatures = childFeatures; } public void addChildFeatures(final org.intermine.model.bio.SequenceFeature arg) { childFeatures.add(arg); } // Col: org.intermine.model.bio.SequenceFeature.dbCrossReferences protected java.util.Set<org.intermine.model.bio.xRef> dbCrossReferences = new java.util.HashSet<org.intermine.model.bio.xRef>(); public java.util.Set<org.intermine.model.bio.xRef> getDbCrossReferences() { return dbCrossReferences; } public void setDbCrossReferences(final java.util.Set<org.intermine.model.bio.xRef> dbCrossReferences) { this.dbCrossReferences = dbCrossReferences; } public void addDbCrossReferences(final org.intermine.model.bio.xRef arg) { dbCrossReferences.add(arg); } // Col: org.intermine.model.bio.SequenceFeature.aliases protected java.util.Set<org.intermine.model.bio.AliasName> aliases = new java.util.HashSet<org.intermine.model.bio.AliasName>(); public java.util.Set<org.intermine.model.bio.AliasName> getAliases() { return aliases; } public void setAliases(final java.util.Set<org.intermine.model.bio.AliasName> aliases) { this.aliases = aliases; } public void addAliases(final org.intermine.model.bio.AliasName arg) { aliases.add(arg); } // Attr: org.intermine.model.bio.BioEntity.symbol protected java.lang.String symbol; public java.lang.String getSymbol() { return symbol; } public void setSymbol(final java.lang.String symbol) { this.symbol = symbol; } // Attr: org.intermine.model.bio.BioEntity.name protected java.lang.String name; public java.lang.String getName() { return name; } public void setName(final java.lang.String name) { this.name = name; } // Attr: org.intermine.model.bio.BioEntity.secondaryIdentifier protected java.lang.String secondaryIdentifier; public java.lang.String getSecondaryIdentifier() { return secondaryIdentifier; } public void setSecondaryIdentifier(final java.lang.String secondaryIdentifier) { this.secondaryIdentifier = secondaryIdentifier; } // Ref: org.intermine.model.bio.BioEntity.organism protected org.intermine.model.InterMineObject organism; public org.intermine.model.bio.Organism getOrganism() { if (organism instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Organism) ((org.intermine.objectstore.proxy.ProxyReference) organism).getObject()); }; return (org.intermine.model.bio.Organism) organism; } public void setOrganism(final org.intermine.model.bio.Organism organism) { this.organism = organism; } public void proxyOrganism(final org.intermine.objectstore.proxy.ProxyReference organism) { this.organism = organism; } public org.intermine.model.InterMineObject proxGetOrganism() { return organism; } // Col: org.intermine.model.bio.BioEntity.locatedFeatures protected java.util.Set<org.intermine.model.bio.Location> locatedFeatures = new java.util.HashSet<org.intermine.model.bio.Location>(); public java.util.Set<org.intermine.model.bio.Location> getLocatedFeatures() { return locatedFeatures; } public void setLocatedFeatures(final java.util.Set<org.intermine.model.bio.Location> locatedFeatures) { this.locatedFeatures = locatedFeatures; } public void addLocatedFeatures(final org.intermine.model.bio.Location arg) { locatedFeatures.add(arg); } // Col: org.intermine.model.bio.BioEntity.locations protected java.util.Set<org.intermine.model.bio.Location> locations = new java.util.HashSet<org.intermine.model.bio.Location>(); public java.util.Set<org.intermine.model.bio.Location> getLocations() { return locations; } public void setLocations(final java.util.Set<org.intermine.model.bio.Location> locations) { this.locations = locations; } public void addLocations(final org.intermine.model.bio.Location arg) { locations.add(arg); } // Col: org.intermine.model.bio.BioEntity.synonyms protected java.util.Set<org.intermine.model.bio.Synonym> synonyms = new java.util.HashSet<org.intermine.model.bio.Synonym>(); public java.util.Set<org.intermine.model.bio.Synonym> getSynonyms() { return synonyms; } public void setSynonyms(final java.util.Set<org.intermine.model.bio.Synonym> synonyms) { this.synonyms = synonyms; } public void addSynonyms(final org.intermine.model.bio.Synonym arg) { synonyms.add(arg); } // Col: org.intermine.model.bio.BioEntity.dataSets protected java.util.Set<org.intermine.model.bio.DataSet> dataSets = new java.util.HashSet<org.intermine.model.bio.DataSet>(); public java.util.Set<org.intermine.model.bio.DataSet> getDataSets() { return dataSets; } public void setDataSets(final java.util.Set<org.intermine.model.bio.DataSet> dataSets) { this.dataSets = dataSets; } public void addDataSets(final org.intermine.model.bio.DataSet arg) { dataSets.add(arg); } // Col: org.intermine.model.bio.BioEntity.crossReferences protected java.util.Set<org.intermine.model.bio.CrossReference> crossReferences = new java.util.HashSet<org.intermine.model.bio.CrossReference>(); public java.util.Set<org.intermine.model.bio.CrossReference> getCrossReferences() { return crossReferences; } public void setCrossReferences(final java.util.Set<org.intermine.model.bio.CrossReference> crossReferences) { this.crossReferences = crossReferences; } public void addCrossReferences(final org.intermine.model.bio.CrossReference arg) { crossReferences.add(arg); } // Attr: org.intermine.model.bio.Annotatable.primaryIdentifier protected java.lang.String primaryIdentifier; public java.lang.String getPrimaryIdentifier() { return primaryIdentifier; } public void setPrimaryIdentifier(final java.lang.String primaryIdentifier) { this.primaryIdentifier = primaryIdentifier; } // Col: org.intermine.model.bio.Annotatable.ontologyAnnotations protected java.util.Set<org.intermine.model.bio.OntologyAnnotation> ontologyAnnotations = new java.util.HashSet<org.intermine.model.bio.OntologyAnnotation>(); public java.util.Set<org.intermine.model.bio.OntologyAnnotation> getOntologyAnnotations() { return ontologyAnnotations; } public void setOntologyAnnotations(final java.util.Set<org.intermine.model.bio.OntologyAnnotation> ontologyAnnotations) { this.ontologyAnnotations = ontologyAnnotations; } public void addOntologyAnnotations(final org.intermine.model.bio.OntologyAnnotation arg) { ontologyAnnotations.add(arg); } // Col: org.intermine.model.bio.Annotatable.publications protected java.util.Set<org.intermine.model.bio.Publication> publications = new java.util.HashSet<org.intermine.model.bio.Publication>(); public java.util.Set<org.intermine.model.bio.Publication> getPublications() { return publications; } public void setPublications(final java.util.Set<org.intermine.model.bio.Publication> publications) { this.publications = publications; } public void addPublications(final org.intermine.model.bio.Publication arg) { publications.add(arg); } // Attr: org.intermine.model.InterMineObject.id protected java.lang.Integer id; public java.lang.Integer getId() { return id; } public void setId(final java.lang.Integer id) { this.id = id; } @Override public boolean equals(Object o) { return (o instanceof SyntenicRegion && id != null) ? id.equals(((SyntenicRegion)o).getId()) : this == o; } @Override public int hashCode() { return (id != null) ? id.hashCode() : super.hashCode(); } @Override public String toString() { return "SyntenicRegion [chromosome=" + (chromosome == null ? "null" : (chromosome.getId() == null ? "no id" : chromosome.getId().toString())) + ", chromosomeLocation=" + (chromosomeLocation == null ? "null" : (chromosomeLocation.getId() == null ? "no id" : chromosomeLocation.getId().toString())) + ", id=" + id + ", length=" + length + ", name=" + (name == null ? "null" : "\"" + name + "\"") + ", organism=" + (organism == null ? "null" : (organism.getId() == null ? "no id" : organism.getId().toString())) + ", primaryIdentifier=" + (primaryIdentifier == null ? "null" : "\"" + primaryIdentifier + "\"") + ", score=" + score + ", scoreType=" + (scoreType == null ? "null" : "\"" + scoreType + "\"") + ", secondaryIdentifier=" + (secondaryIdentifier == null ? "null" : "\"" + secondaryIdentifier + "\"") + ", sequence=" + (sequence == null ? "null" : (sequence.getId() == null ? "no id" : sequence.getId().toString())) + ", sequenceOntologyTerm=" + (sequenceOntologyTerm == null ? "null" : (sequenceOntologyTerm.getId() == null ? "no id" : sequenceOntologyTerm.getId().toString())) + ", source=" + (source == null ? "null" : "\"" + source + "\"") + ", status=" + (status == null ? "null" : "\"" + status + "\"") + ", symbol=" + (symbol == null ? "null" : "\"" + symbol + "\"") + ", syntenyBlock=" + (syntenyBlock == null ? "null" : (syntenyBlock.getId() == null ? "no id" : syntenyBlock.getId().toString())) + "]"; } public Object getFieldValue(final String fieldName) throws IllegalAccessException { if ("syntenyBlock".equals(fieldName)) { if (syntenyBlock instanceof ProxyReference) { return ((ProxyReference) syntenyBlock).getObject(); } else { return syntenyBlock; } } if ("source".equals(fieldName)) { return source; } if ("score".equals(fieldName)) { return score; } if ("scoreType".equals(fieldName)) { return scoreType; } if ("status".equals(fieldName)) { return status; } if ("length".equals(fieldName)) { return length; } if ("sequenceOntologyTerm".equals(fieldName)) { if (sequenceOntologyTerm instanceof ProxyReference) { return ((ProxyReference) sequenceOntologyTerm).getObject(); } else { return sequenceOntologyTerm; } } if ("chromosomeLocation".equals(fieldName)) { if (chromosomeLocation instanceof ProxyReference) { return ((ProxyReference) chromosomeLocation).getObject(); } else { return chromosomeLocation; } } if ("sequence".equals(fieldName)) { if (sequence instanceof ProxyReference) { return ((ProxyReference) sequence).getObject(); } else { return sequence; } } if ("chromosome".equals(fieldName)) { if (chromosome instanceof ProxyReference) { return ((ProxyReference) chromosome).getObject(); } else { return chromosome; } } if ("overlappingFeatures".equals(fieldName)) { return overlappingFeatures; } if ("childFeatures".equals(fieldName)) { return childFeatures; } if ("dbCrossReferences".equals(fieldName)) { return dbCrossReferences; } if ("aliases".equals(fieldName)) { return aliases; } if ("symbol".equals(fieldName)) { return symbol; } if ("name".equals(fieldName)) { return name; } if ("secondaryIdentifier".equals(fieldName)) { return secondaryIdentifier; } if ("organism".equals(fieldName)) { if (organism instanceof ProxyReference) { return ((ProxyReference) organism).getObject(); } else { return organism; } } if ("locatedFeatures".equals(fieldName)) { return locatedFeatures; } if ("locations".equals(fieldName)) { return locations; } if ("synonyms".equals(fieldName)) { return synonyms; } if ("dataSets".equals(fieldName)) { return dataSets; } if ("crossReferences".equals(fieldName)) { return crossReferences; } if ("primaryIdentifier".equals(fieldName)) { return primaryIdentifier; } if ("ontologyAnnotations".equals(fieldName)) { return ontologyAnnotations; } if ("publications".equals(fieldName)) { return publications; } if ("id".equals(fieldName)) { return id; } if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { return TypeUtil.getFieldValue(this, fieldName); } throw new IllegalArgumentException("Unknown field " + fieldName); } public Object getFieldProxy(final String fieldName) throws IllegalAccessException { if ("syntenyBlock".equals(fieldName)) { return syntenyBlock; } if ("source".equals(fieldName)) { return source; } if ("score".equals(fieldName)) { return score; } if ("scoreType".equals(fieldName)) { return scoreType; } if ("status".equals(fieldName)) { return status; } if ("length".equals(fieldName)) { return length; } if ("sequenceOntologyTerm".equals(fieldName)) { return sequenceOntologyTerm; } if ("chromosomeLocation".equals(fieldName)) { return chromosomeLocation; } if ("sequence".equals(fieldName)) { return sequence; } if ("chromosome".equals(fieldName)) { return chromosome; } if ("overlappingFeatures".equals(fieldName)) { return overlappingFeatures; } if ("childFeatures".equals(fieldName)) { return childFeatures; } if ("dbCrossReferences".equals(fieldName)) { return dbCrossReferences; } if ("aliases".equals(fieldName)) { return aliases; } if ("symbol".equals(fieldName)) { return symbol; } if ("name".equals(fieldName)) { return name; } if ("secondaryIdentifier".equals(fieldName)) { return secondaryIdentifier; } if ("organism".equals(fieldName)) { return organism; } if ("locatedFeatures".equals(fieldName)) { return locatedFeatures; } if ("locations".equals(fieldName)) { return locations; } if ("synonyms".equals(fieldName)) { return synonyms; } if ("dataSets".equals(fieldName)) { return dataSets; } if ("crossReferences".equals(fieldName)) { return crossReferences; } if ("primaryIdentifier".equals(fieldName)) { return primaryIdentifier; } if ("ontologyAnnotations".equals(fieldName)) { return ontologyAnnotations; } if ("publications".equals(fieldName)) { return publications; } if ("id".equals(fieldName)) { return id; } if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { return TypeUtil.getFieldProxy(this, fieldName); } throw new IllegalArgumentException("Unknown field " + fieldName); } public void setFieldValue(final String fieldName, final Object value) { if ("syntenyBlock".equals(fieldName)) { syntenyBlock = (org.intermine.model.InterMineObject) value; } else if ("source".equals(fieldName)) { source = (java.lang.String) value; } else if ("score".equals(fieldName)) { score = (java.lang.Double) value; } else if ("scoreType".equals(fieldName)) { scoreType = (java.lang.String) value; } else if ("status".equals(fieldName)) { status = (java.lang.String) value; } else if ("length".equals(fieldName)) { length = (java.lang.Integer) value; } else if ("sequenceOntologyTerm".equals(fieldName)) { sequenceOntologyTerm = (org.intermine.model.InterMineObject) value; } else if ("chromosomeLocation".equals(fieldName)) { chromosomeLocation = (org.intermine.model.InterMineObject) value; } else if ("sequence".equals(fieldName)) { sequence = (org.intermine.model.InterMineObject) value; } else if ("chromosome".equals(fieldName)) { chromosome = (org.intermine.model.InterMineObject) value; } else if ("overlappingFeatures".equals(fieldName)) { overlappingFeatures = (java.util.Set) value; } else if ("childFeatures".equals(fieldName)) { childFeatures = (java.util.Set) value; } else if ("dbCrossReferences".equals(fieldName)) { dbCrossReferences = (java.util.Set) value; } else if ("aliases".equals(fieldName)) { aliases = (java.util.Set) value; } else if ("symbol".equals(fieldName)) { symbol = (java.lang.String) value; } else if ("name".equals(fieldName)) { name = (java.lang.String) value; } else if ("secondaryIdentifier".equals(fieldName)) { secondaryIdentifier = (java.lang.String) value; } else if ("organism".equals(fieldName)) { organism = (org.intermine.model.InterMineObject) value; } else if ("locatedFeatures".equals(fieldName)) { locatedFeatures = (java.util.Set) value; } else if ("locations".equals(fieldName)) { locations = (java.util.Set) value; } else if ("synonyms".equals(fieldName)) { synonyms = (java.util.Set) value; } else if ("dataSets".equals(fieldName)) { dataSets = (java.util.Set) value; } else if ("crossReferences".equals(fieldName)) { crossReferences = (java.util.Set) value; } else if ("primaryIdentifier".equals(fieldName)) { primaryIdentifier = (java.lang.String) value; } else if ("ontologyAnnotations".equals(fieldName)) { ontologyAnnotations = (java.util.Set) value; } else if ("publications".equals(fieldName)) { publications = (java.util.Set) value; } else if ("id".equals(fieldName)) { id = (java.lang.Integer) value; } else { if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { DynamicUtil.setFieldValue(this, fieldName, value); return; } throw new IllegalArgumentException("Unknown field " + fieldName); } } public Class<?> getFieldType(final String fieldName) { if ("syntenyBlock".equals(fieldName)) { return org.intermine.model.bio.SyntenyBlock.class; } if ("source".equals(fieldName)) { return java.lang.String.class; } if ("score".equals(fieldName)) { return java.lang.Double.class; } if ("scoreType".equals(fieldName)) { return java.lang.String.class; } if ("status".equals(fieldName)) { return java.lang.String.class; } if ("length".equals(fieldName)) { return java.lang.Integer.class; } if ("sequenceOntologyTerm".equals(fieldName)) { return org.intermine.model.bio.SOTerm.class; } if ("chromosomeLocation".equals(fieldName)) { return org.intermine.model.bio.Location.class; } if ("sequence".equals(fieldName)) { return org.intermine.model.bio.Sequence.class; } if ("chromosome".equals(fieldName)) { return org.intermine.model.bio.Chromosome.class; } if ("overlappingFeatures".equals(fieldName)) { return java.util.Set.class; } if ("childFeatures".equals(fieldName)) { return java.util.Set.class; } if ("dbCrossReferences".equals(fieldName)) { return java.util.Set.class; } if ("aliases".equals(fieldName)) { return java.util.Set.class; } if ("symbol".equals(fieldName)) { return java.lang.String.class; } if ("name".equals(fieldName)) { return java.lang.String.class; } if ("secondaryIdentifier".equals(fieldName)) { return java.lang.String.class; } if ("organism".equals(fieldName)) { return org.intermine.model.bio.Organism.class; } if ("locatedFeatures".equals(fieldName)) { return java.util.Set.class; } if ("locations".equals(fieldName)) { return java.util.Set.class; } if ("synonyms".equals(fieldName)) { return java.util.Set.class; } if ("dataSets".equals(fieldName)) { return java.util.Set.class; } if ("crossReferences".equals(fieldName)) { return java.util.Set.class; } if ("primaryIdentifier".equals(fieldName)) { return java.lang.String.class; } if ("ontologyAnnotations".equals(fieldName)) { return java.util.Set.class; } if ("publications".equals(fieldName)) { return java.util.Set.class; } if ("id".equals(fieldName)) { return java.lang.Integer.class; } if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { return TypeUtil.getFieldType(org.intermine.model.bio.SyntenicRegion.class, fieldName); } throw new IllegalArgumentException("Unknown field " + fieldName); } public StringConstructor getoBJECT() { if (!org.intermine.model.bio.SyntenicRegionShadow.class.equals(getClass())) { return NotXmlRenderer.render(this); } StringConstructor sb = new StringConstructor(); sb.append("$_^org.intermine.model.bio.SyntenicRegion"); if (syntenyBlock != null) { sb.append("$_^rsyntenyBlock$_^").append(syntenyBlock.getId()); } if (source != null) { sb.append("$_^asource$_^"); String string = source; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (score != null) { sb.append("$_^ascore$_^").append(score); } if (scoreType != null) { sb.append("$_^ascoreType$_^"); String string = scoreType; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (status != null) { sb.append("$_^astatus$_^"); String string = status; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (length != null) { sb.append("$_^alength$_^").append(length); } if (sequenceOntologyTerm != null) { sb.append("$_^rsequenceOntologyTerm$_^").append(sequenceOntologyTerm.getId()); } if (chromosomeLocation != null) { sb.append("$_^rchromosomeLocation$_^").append(chromosomeLocation.getId()); } if (sequence != null) { sb.append("$_^rsequence$_^").append(sequence.getId()); } if (chromosome != null) { sb.append("$_^rchromosome$_^").append(chromosome.getId()); } if (symbol != null) { sb.append("$_^asymbol$_^"); String string = symbol; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (name != null) { sb.append("$_^aname$_^"); String string = name; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (secondaryIdentifier != null) { sb.append("$_^asecondaryIdentifier$_^"); String string = secondaryIdentifier; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (organism != null) { sb.append("$_^rorganism$_^").append(organism.getId()); } if (primaryIdentifier != null) { sb.append("$_^aprimaryIdentifier$_^"); String string = primaryIdentifier; while (string != null) { int delimPosition = string.indexOf("$_^"); if (delimPosition == -1) { sb.append(string); string = null; } else { sb.append(string.substring(0, delimPosition + 3)); sb.append("d"); string = string.substring(delimPosition + 3); } } } if (id != null) { sb.append("$_^aid$_^").append(id); } return sb; } public void setoBJECT(String notXml, ObjectStore os) { setoBJECT(NotXmlParser.SPLITTER.split(notXml), os); } public void setoBJECT(final String[] notXml, final ObjectStore os) { if (!org.intermine.model.bio.SyntenicRegionShadow.class.equals(getClass())) { throw new IllegalStateException("Class " + getClass().getName() + " does not match code (org.intermine.model.bio.SyntenicRegion)"); } for (int i = 2; i < notXml.length;) { int startI = i; if ((i < notXml.length) &&"rsyntenyBlock".equals(notXml[i])) { i++; syntenyBlock = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.SyntenyBlock.class); i++; }; if ((i < notXml.length) && "asource".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } source = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "ascore".equals(notXml[i])) { i++; score = Double.valueOf(notXml[i]); i++; } if ((i < notXml.length) && "ascoreType".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } scoreType = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "astatus".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } status = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "alength".equals(notXml[i])) { i++; length = Integer.valueOf(notXml[i]); i++; } if ((i < notXml.length) &&"rsequenceOntologyTerm".equals(notXml[i])) { i++; sequenceOntologyTerm = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.SOTerm.class); i++; }; if ((i < notXml.length) &&"rchromosomeLocation".equals(notXml[i])) { i++; chromosomeLocation = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Location.class); i++; }; if ((i < notXml.length) &&"rsequence".equals(notXml[i])) { i++; sequence = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Sequence.class); i++; }; if ((i < notXml.length) &&"rchromosome".equals(notXml[i])) { i++; chromosome = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Chromosome.class); i++; }; if ((i < notXml.length) && "asymbol".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } symbol = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "aname".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } name = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "asecondaryIdentifier".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } secondaryIdentifier = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) &&"rorganism".equals(notXml[i])) { i++; organism = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Organism.class); i++; }; if ((i < notXml.length) && "aprimaryIdentifier".equals(notXml[i])) { i++; StringBuilder string = null; while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) { if (string == null) string = new StringBuilder(notXml[i]); i++; string.append("$_^").append(notXml[i].substring(1)); } primaryIdentifier = string == null ? notXml[i] : string.toString(); i++; } if ((i < notXml.length) && "aid".equals(notXml[i])) { i++; id = Integer.valueOf(notXml[i]); i++; } if (startI == i) { throw new IllegalArgumentException("Unknown field " + notXml[i]); } } overlappingFeatures = new ProxyCollection<org.intermine.model.bio.SequenceFeature>(os, this, "overlappingFeatures", org.intermine.model.bio.SequenceFeature.class); childFeatures = new ProxyCollection<org.intermine.model.bio.SequenceFeature>(os, this, "childFeatures", org.intermine.model.bio.SequenceFeature.class); dbCrossReferences = new ProxyCollection<org.intermine.model.bio.xRef>(os, this, "dbCrossReferences", org.intermine.model.bio.xRef.class); aliases = new ProxyCollection<org.intermine.model.bio.AliasName>(os, this, "aliases", org.intermine.model.bio.AliasName.class); locatedFeatures = new ProxyCollection<org.intermine.model.bio.Location>(os, this, "locatedFeatures", org.intermine.model.bio.Location.class); locations = new ProxyCollection<org.intermine.model.bio.Location>(os, this, "locations", org.intermine.model.bio.Location.class); synonyms = new ProxyCollection<org.intermine.model.bio.Synonym>(os, this, "synonyms", org.intermine.model.bio.Synonym.class); dataSets = new ProxyCollection<org.intermine.model.bio.DataSet>(os, this, "dataSets", org.intermine.model.bio.DataSet.class); crossReferences = new ProxyCollection<org.intermine.model.bio.CrossReference>(os, this, "crossReferences", org.intermine.model.bio.CrossReference.class); ontologyAnnotations = new ProxyCollection<org.intermine.model.bio.OntologyAnnotation>(os, this, "ontologyAnnotations", org.intermine.model.bio.OntologyAnnotation.class); publications = new ProxyCollection<org.intermine.model.bio.Publication>(os, this, "publications", org.intermine.model.bio.Publication.class); } public void addCollectionElement(final String fieldName, final org.intermine.model.InterMineObject element) { if ("overlappingFeatures".equals(fieldName)) { overlappingFeatures.add((org.intermine.model.bio.SequenceFeature) element); } else if ("childFeatures".equals(fieldName)) { childFeatures.add((org.intermine.model.bio.SequenceFeature) element); } else if ("dbCrossReferences".equals(fieldName)) { dbCrossReferences.add((org.intermine.model.bio.xRef) element); } else if ("aliases".equals(fieldName)) { aliases.add((org.intermine.model.bio.AliasName) element); } else if ("locatedFeatures".equals(fieldName)) { locatedFeatures.add((org.intermine.model.bio.Location) element); } else if ("locations".equals(fieldName)) { locations.add((org.intermine.model.bio.Location) element); } else if ("synonyms".equals(fieldName)) { synonyms.add((org.intermine.model.bio.Synonym) element); } else if ("dataSets".equals(fieldName)) { dataSets.add((org.intermine.model.bio.DataSet) element); } else if ("crossReferences".equals(fieldName)) { crossReferences.add((org.intermine.model.bio.CrossReference) element); } else if ("ontologyAnnotations".equals(fieldName)) { ontologyAnnotations.add((org.intermine.model.bio.OntologyAnnotation) element); } else if ("publications".equals(fieldName)) { publications.add((org.intermine.model.bio.Publication) element); } else { if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { TypeUtil.addCollectionElement(this, fieldName, element); return; } throw new IllegalArgumentException("Unknown collection " + fieldName); } } public Class<?> getElementType(final String fieldName) { if ("overlappingFeatures".equals(fieldName)) { return org.intermine.model.bio.SequenceFeature.class; } if ("childFeatures".equals(fieldName)) { return org.intermine.model.bio.SequenceFeature.class; } if ("dbCrossReferences".equals(fieldName)) { return org.intermine.model.bio.xRef.class; } if ("aliases".equals(fieldName)) { return org.intermine.model.bio.AliasName.class; } if ("locatedFeatures".equals(fieldName)) { return org.intermine.model.bio.Location.class; } if ("locations".equals(fieldName)) { return org.intermine.model.bio.Location.class; } if ("synonyms".equals(fieldName)) { return org.intermine.model.bio.Synonym.class; } if ("dataSets".equals(fieldName)) { return org.intermine.model.bio.DataSet.class; } if ("crossReferences".equals(fieldName)) { return org.intermine.model.bio.CrossReference.class; } if ("ontologyAnnotations".equals(fieldName)) { return org.intermine.model.bio.OntologyAnnotation.class; } if ("publications".equals(fieldName)) { return org.intermine.model.bio.Publication.class; } if (!org.intermine.model.bio.SyntenicRegion.class.equals(getClass())) { return TypeUtil.getElementType(org.intermine.model.bio.SyntenicRegion.class, fieldName); } throw new IllegalArgumentException("Unknown field " + fieldName); } }
[ "letourneaujj@umsystem.edu" ]
letourneaujj@umsystem.edu
f0210085c0d26ed8e4e14a185764620820948d46
0444a6536edf1013ccc08cb1717c82df56f8f9ee
/api/src/main/java/com/pghome/mq/Producer.java
aa98eb2423099c8bd01cd53a77e20a622c7c9993
[]
no_license
tianweishuo/pghome
e5075104b503b43ca939f46a1449483e79ccfec6
88af508d41e5e7919904758aea459982f80d33af
refs/heads/master
2020-04-11T10:26:50.640918
2018-12-29T09:30:22
2018-12-29T09:30:22
161,714,963
0
0
null
null
null
null
UTF-8
Java
false
false
927
java
package com.pghome.mq; import com.alibaba.rocketmq.client.exception.MQClientException; import com.alibaba.rocketmq.client.producer.DefaultMQProducer; /** * @Auther: tianws * @Date: 2018/12/14 15:45 * @Description: */ public class Producer { private static DefaultMQProducer producer = new DefaultMQProducer("ProducerGroupName"); private static int initialState = 0; private Producer() { } public static DefaultMQProducer getDefaultMQProducer(){ if(producer == null){ producer = new DefaultMQProducer("ProducerGroupName"); } if(initialState == 0){ producer.setNamesrvAddr("192.168.203.10:9876"); try { producer.start(); } catch (MQClientException e) { e.printStackTrace(); return null; } initialState = 1; } return producer; } }
[ "756039422@qq.com" ]
756039422@qq.com
92be18c26b53a7130c56c5554cb5112c33cdb17b
2d6e7a90c1b07d355d31340093fd6f613c90830d
/app/src/main/java/ir/sharif/rahpaapp/MapMVP/MapsModel.java
a1258ad2a4728105201c3a557a6e762f4af75223
[]
no_license
minahosseini/map
fb8797807a08751c81080645c70935036cae9058
0f34bc61cbe96c19c58771d732229174ffef5005
refs/heads/master
2020-03-22T00:01:35.684242
2018-06-30T05:36:11
2018-06-30T05:36:11
139,220,097
0
0
null
null
null
null
UTF-8
Java
false
false
1,818
java
package ir.sharif.rahpaapp.MapMVP; import android.content.Context; import android.location.Address; import android.location.Geocoder; import android.util.Log; import com.google.android.gms.maps.model.LatLng; import java.util.List; import java.util.Locale; /** * Created by hmd on 06/29/2018. */ public class MapsModel implements MapsContract.Model { private MapsContract.Presenter presenter; @Override public void attachPresenter(MapsContract.Presenter presenter) { this.presenter = presenter; } @Override public void defaultLocation() { //default location for shaif Uni presenter.setDefaultLocation(35.703639, 51.351588); } @Override public String getCompleteAddress(Context context, double lat, double lng) { String strAdd = ""; Geocoder geocoder = new Geocoder(context, new Locale("fa")); try { List<Address> addresses = geocoder.getFromLocation(lat, lng, 1); if (addresses != null) { Address returnedAddress = addresses.get(0); StringBuilder strReturnedAddress = new StringBuilder(""); for (int i = 0; i <= returnedAddress.getMaxAddressLineIndex(); i++) { strReturnedAddress.append(returnedAddress.getAddressLine(i)).append("\n"); } strAdd = strReturnedAddress.toString(); Log.w("Current loction address", strReturnedAddress.toString()); } else { Log.w("Current loction address", "No Address returned!"); } } catch (Exception e) { e.printStackTrace(); Log.w("Current loction address", "Canont get Address!"); } return strAdd; } }
[ "minahosseini908@gmail.com" ]
minahosseini908@gmail.com
3528f6df30301724276f4add145875c4f3a4883f
75b0d3d594ef2971f9b361f1bd4e5911c24e4971
/Algorithms/src/dymnamicProgrammig/Islands.java
d295cac426ebd5ce9e408bfd0a6fc908eb1e27ad
[]
no_license
nitsh79/thekadesi
c3b8ea38bf7c3f94f0a32c5b22fb82a75e1251ba
93a1d4a953b2eaa936b66943c6c927787f71901c
refs/heads/master
2021-01-19T07:46:50.187098
2017-04-09T14:43:47
2017-04-09T14:43:47
87,571,441
0
0
null
2017-04-07T17:40:03
2017-04-07T17:40:03
null
UTF-8
Java
false
false
2,750
java
package dymnamicProgrammig; //http://www.geeksforgeeks.org/find-number-of-islands/ import java.util.*; import java.lang.*; import java.io.*; class Islands { //No of rows and columns static final int ROW = 5, COL = 5; // A function to check if a given cell (row, col) can // be included in DFS boolean isSafe(int M[][], int row, int col, boolean visited[][]) { // row number is in range, column number is in range // and value is 1 and not yet visited return (row >= 0) && (row < ROW) && (col >= 0) && (col < COL) && (M[row][col]==1 && !visited[row][col]); } // A utility function to do DFS for a 2D boolean matrix. // It only considers the 8 neighbors as adjacent vertices void DFS(int M[][], int row, int col, boolean visited[][]) { // These arrays are used to get row and column numbers // of 8 neighbors of a given cell int rowNbr[] = new int[] {-1, -1, -1, 0, 0, 1, 1, 1}; int colNbr[] = new int[] {-1, 0, 1, -1, 1, -1, 0, 1}; // Mark this cell as visited visited[row][col] = true; // Recur for all connected neighbours for (int k = 0; k < 8; ++k) if (isSafe(M, row + rowNbr[k], col + colNbr[k], visited) ) DFS(M, row + rowNbr[k], col + colNbr[k], visited); } // The main function that returns count of islands in a given // boolean 2D matrix int countIslands(int M[][]) { // Make a bool array to mark visited cells. // Initially all cells are unvisited boolean visited[][] = new boolean[ROW][COL]; // Initialize count as 0 and travese through the all cells // of given matrix int count = 0; for (int i = 0; i < ROW; ++i) for (int j = 0; j < COL; ++j) if (M[i][j]==1 && !visited[i][j]) // If a cell with { // value 1 is not // visited yet, then new island found, Visit all // cells in this island and increment island count DFS(M, i, j, visited); ++count; } return count; } // Driver method public static void main (String[] args) throws java.lang.Exception { int M[][]= new int[][] {{1, 1, 0, 0, 0}, {0, 1, 0, 0, 1}, {1, 0, 0, 1, 1}, {0, 0, 0, 0, 0}, {1, 0, 1, 0, 1} }; Islands I = new Islands(); System.out.println("Number of islands is: "+ I.countIslands(M)); } }
[ "nandkumar90@gmail.com" ]
nandkumar90@gmail.com
380fa6cad860623bbef9a5f0c29cefde0dd74ada
abbf0de2df7d60d40a23049fb886c6c3e98ef8d0
/7_ava_Moderno/Java8/src/br/com/adenilson/ExercicioOrdenandoString.java
312f52680c13479a68b4950c7ac831f3f31688dd
[]
no_license
adenilson1/Java
1b2a8236b829bbbfd7feaa58755a7598b736879d
2a811a7195ec0af1a2d098171114be714af1b406
refs/heads/master
2023-05-07T06:33:03.698883
2021-06-02T12:12:12
2021-06-02T12:12:12
367,205,316
0
0
null
null
null
null
UTF-8
Java
false
false
1,208
java
package br.com.adenilson; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.function.Consumer; public class ExercicioOrdenandoString { public static void main(String[] args) { List<String> palavras = new ArrayList<String>(); palavras.add("Alura online"); palavras.add("Casa do Código"); palavras.add("Caelum"); Comparator<String> comparador = new ComparaPalavraPeloTamanho(); // vai compara as string pelo tamanho palavras.sort(comparador); System.out.println(palavras); Consumer<String> consome = new ImprimiNaLinha(); // vai imprimir a lista na ordem do tamanho palavras.forEach(consome); } } // criando uma classe consome de string, ou seja, vai imprimir class ImprimiNaLinha implements Consumer<String> { @Override public void accept(String s) { System.out.println(s); } } // criando a classe comprador class ComparaPalavraPeloTamanho implements Comparator<String> { @Override public int compare(String s1, String s2) { // cirando condicoes de comparacao pelo tamano da string if (s1.length() < s2.length()) return -1; if (s1.length() > s2.length()) return 1; return 0; } }
[ "adenilson99@hotmail.com" ]
adenilson99@hotmail.com
b09dc16b5d35259729f6fb968f96cf40b558c4bd
a896fa494191d13eaa22c675d7e87895d59cc150
/src/main/java/com/flexon/BackendAPI/UserAccountController.java
ff8ce1eb6a1c50c9fa64708fee8ba351702bcbce
[]
no_license
jeromez0/backend-api-spring-boot
b74ade87836eaaaf665a5eeadfc4a315c6cf4909
f45528cbae2a79e11c68611aceff7b0450f7f63a
refs/heads/main
2023-03-18T16:21:49.720334
2021-03-11T04:45:30
2021-03-11T04:45:30
346,501,849
0
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
package com.flexon.BackendAPI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import com.flexon.BackendAPI.models.Item; import com.flexon.BackendAPI.models.Order; import com.flexon.BackendAPI.services.CatalogDAO; import com.flexon.BackendAPI.services.OrderDAO; @RestController public class UserAccountController { @Autowired OrderDAO orderDAO = new OrderDAO(); CatalogDAO catalogDAO = new CatalogDAO(); @GetMapping(path = "/order/{orderID}") public Order getOrder(@PathVariable int orderID) { return orderDAO.getOrderID(orderID); } @RequestMapping(path = "/orderactions/acceptShipDate/{orderID}", method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) public void acceptShipDate(@PathVariable int orderID) { orderDAO.acceptShipDate(orderID); } @RequestMapping(path = "/orderactions/cancelOrder/{orderID}", method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) public void cancelOrder(@PathVariable int orderID) { orderDAO.cancelOrder(orderID); } @RequestMapping(path = "/orderactions/cancelItem/{orderID}/{ItemNumber}", method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) public void cancelItem(@PathVariable int orderID, @PathVariable int ItemNumber) { orderDAO.cancelItem(orderID, ItemNumber); } @GetMapping(path = "/catalog/sku/{skuId}") public Item getSKU(@PathVariable int skuId) { return catalogDAO.getSKU(skuId); } }
[ "jeromezhang1996@gmail.com" ]
jeromezhang1996@gmail.com
7c438d9f5d9132a519adb269184e90c5aa0b6b82
cfd399aefd17bd2fb9f48802078dd24b47c85b08
/app/src/main/java/com/ugcodes/musicplayer/MainActivity.java
c90d2922468163e99b52b062f1d20749c41e9821
[]
no_license
ug-dev/MusicPlayer
e5cc6309074219e5acd4a94a5c186cbb98ce27ce
a0e2ed2f368933e9f9cfbea11021123d63337fd8
refs/heads/master
2022-12-30T02:58:42.248526
2020-10-12T11:00:49
2020-10-12T11:00:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,606
java
package com.ugcodes.musicplayer; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.view.ViewTreeObserver; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.google.android.material.bottomnavigation.BottomNavigationView; import java.util.Objects; public class MainActivity extends AppCompatActivity implements View.OnClickListener { private TextView song_title, song_artist; private ImageView pauseButton, playButton, likeButton, likedButton; private ProgressBar progressBar; private RelativeLayout miniPlayerLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); song_title = findViewById(R.id.song_title); song_artist = findViewById(R.id.song_artist); playButton = findViewById(R.id.play_button); pauseButton = findViewById(R.id.pause_button); likeButton = findViewById(R.id.like_button); likedButton = findViewById(R.id.liked_button); miniPlayerLayout = findViewById(R.id.miniPlayer_layout); progressBar = findViewById(R.id.progressBar); progressBar.setProgress(30); playButton.setOnClickListener(this); pauseButton.setOnClickListener(this); likedButton.setOnClickListener(this); likeButton.setOnClickListener(this); // miniPlayerLayout.getViewTreeObserver() // .addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { // @Override // public void onGlobalLayout() { // Toast.makeText(MainActivity.this, ""+miniPlayerLayout.getHeight(), // Toast.LENGTH_SHORT).show(); // } // }); song_title.setSelected(true); song_artist.setSelected(true); final BottomNavigationView bottomNav = findViewById(R.id.bottom_navigation); bottomNav.setOnNavigationItemSelectedListener(navListener); miniPlayerLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(MainActivity.this, PlayerScreen.class)); } }); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, new FragmentHome()).commit(); } private BottomNavigationView.OnNavigationItemSelectedListener navListener = new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { Fragment selectedFragment = null; switch (item.getItemId()) { case R.id.nav_home: selectedFragment = new FragmentHome(); break; case R.id.nav_search: selectedFragment = new FragmentSearch(); break; case R.id.nav_stream: selectedFragment = new FragmentStream(); break; case R.id.nav_library: selectedFragment = new FragmentLibrary(); break; } getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, Objects.requireNonNull(selectedFragment)).commit(); return true; } }; @Override public void onClick(View view) { switch (view.getId()) { case R.id.play_button: toggleMiniPlayerButtons(playButton, pauseButton); break; case R.id.pause_button: toggleMiniPlayerButtons(pauseButton, playButton); break; case R.id.like_button: toggleMiniPlayerButtons(likeButton, likedButton); break; case R.id.liked_button: toggleMiniPlayerButtons(likedButton, likeButton); break; } } private void toggleMiniPlayerButtons(ImageView button1, ImageView button2) { button1.setVisibility(View.GONE); button2.setVisibility(View.VISIBLE); } }
[ "gadhavanaumang007@gmail.com" ]
gadhavanaumang007@gmail.com
979a1ee98ecfe92b32e2185a65b57680b3667a6a
0ada9ef9ccf859200133aeb5edc128c63c8501b9
/Week_01/id_142/LeetCode_83_142.java
c797311f9b78ed42a26c43ac071626dbcae8ae33
[]
no_license
yanlingli3799/algorithm
a0b24092fd84e3e2e2568b01c17a3473e44b1288
2471dc738669ad3d9383a6e45bfd176986d58c90
refs/heads/master
2020-05-09T23:47:32.423942
2019-05-12T12:50:53
2019-05-12T12:50:53
181,512,276
1
0
null
2019-04-29T02:26:00
2019-04-15T15:10:44
Java
UTF-8
Java
false
false
548
java
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ class Solution { public ListNode deleteDuplicates(ListNode head) { if (head == null) { return null; } ListNode ret = head; while (head.next != null) { if (head.val == head.next.val) { head.next = head.next.next; } else { head = head.next; } } return ret; } }
[ "51ajax.net@gmail.com" ]
51ajax.net@gmail.com
d8c40ae8af5ca675b0f91f253b4f62b5230f24bb
058582c06c3f326621283b14e8fead635f0114f1
/oauth2/src/main/java/com/qzj/dqq/validate/ValidateCodeController.java
42bfe7f66b39d4097c59def874690b30f6d9f410
[]
no_license
tandingbo/spring4all
afa37e35cf0ffe1eaf5f82c2ebb66770f62696e8
f2b948ea98db41e96d605ead2fb69939ef210116
refs/heads/master
2021-09-09T17:23:45.414373
2018-03-18T13:22:19
2018-03-18T13:22:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,514
java
package com.qzj.dqq.validate; import com.google.code.kaptcha.impl.DefaultKaptcha; import com.qzj.dqq.properties.SecurityConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; /** * Created on 2018/1/7 0007. * * @author zlf * @email i@merryyou.cn * @since 1.0 */ @RestController public class ValidateCodeController { @Autowired private DefaultKaptcha defaultKaptcha; /** * @param httpServletRequest * @param httpServletResponse * @throws Exception */ @GetMapping(SecurityConstants.DEFAULT_VALIDATE_CODE_URL_PREFIX) public void createCode(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { byte[] captchaChallengeAsJpeg = null; ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream(); try { // 生产验证码字符串并保存到session中 String createText = defaultKaptcha.createText(); httpServletRequest.getSession().setAttribute(SecurityConstants.DEFAULT_PARAMETER_NAME_CODE_IMAGE, createText); // 使用生产的验证码字符串返回一个BufferedImage对象并转为byte写入到byte数组中 BufferedImage challenge = defaultKaptcha.createImage(createText); ImageIO.write(challenge, "jpg", jpegOutputStream); } catch (IllegalArgumentException e) { httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND); return; } // 定义response输出类型为image/jpeg类型,使用response输出流输出图片的byte数组 captchaChallengeAsJpeg = jpegOutputStream.toByteArray(); httpServletResponse.setHeader("Cache-Control", "no-store"); httpServletResponse.setHeader("Pragma", "no-cache"); httpServletResponse.setDateHeader("Expires", 0); httpServletResponse.setContentType("image/jpeg"); ServletOutputStream responseOutputStream = httpServletResponse.getOutputStream(); responseOutputStream.write(captchaChallengeAsJpeg); responseOutputStream.flush(); responseOutputStream.close(); } }
[ "798078824@qq.com" ]
798078824@qq.com
4df3fefaa3af417fc28676867439717628174431
025ce61c2f1476604c1a24f92472684a3e6097bd
/src/Lab3/Example_Switch_case.java
9b79474696a5f322378c8bc6fe1d59e1a28ca341
[]
no_license
thawatchai3/CP_363211760009
4a7b3435d270da6785f3b1b8cd364086ff5c7621
b1639d1fee35eddcda44423be1dc1b1e629489ca
refs/heads/master
2023-01-03T23:16:02.461604
2020-10-27T10:44:06
2020-10-27T10:44:06
279,556,720
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package Lab3; import java.util.Scanner; public class Example_Switch_case { public static void main(String[] args) { //switch-case นิืยมใช้กับตัวแปลชนิด int หรือ char Scanner sc = new Scanner(System.in); System.out.println("What is your favorite food?: "); System.out.println("1.KFC"); System.out.println("2.Pizza"); System.out.println("3.MK"); System.out.println("Select(1-3):"); int s = sc.nextInt(); //test variable switch (s) { case 1: System.out.println("I love KFC too."); break; case 2: System.out.println("I getting fat because I ate pizza a lot."); break; case 3: System.out.println("It pretty expensive for me."); break; default: System.out.println("Please, select 1-3."); } System.out.println("Good bay"); }//mail }//class
[ "thawatchai.mu@rmutsvmail.com" ]
thawatchai.mu@rmutsvmail.com
0b8c1ee5777291bf1a3ceb227cdee739192892b3
be3b87149d3a992fe325ace617851f742f73a32b
/app/src/main/java/com/bawei/month1219/mvp/LeftContract.java
37bf2c44e4c0105ff5d47c20a693683f93779697
[]
no_license
qizhuangzhuang/Month1219
37eb8209b98e3403c63a0f7b970cb3eea33d3c0e
74e4ce76ce9502eed9f9b0c200e9bbd5360fa53c
refs/heads/master
2020-11-26T17:44:02.946839
2019-12-20T00:54:54
2019-12-20T00:54:54
229,163,327
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package com.bawei.month1219.mvp; import com.bawei.month1219.base.IBaseView; import com.bawei.month1219.bean.LeftResultBean; public interface LeftContract { interface LeftView extends IBaseView { void success(LeftResultBean leftResultBean); void fainal(String fainal); } interface LeftModel{ void show(DataCallBack dataCallBack); interface DataCallBack{ void success(LeftResultBean leftResultBean); void fainals(String fainal); } } interface LeftPresent{ void show(); } }
[ "749265594@qq.com" ]
749265594@qq.com
93e52d72e2231ed4722abc4f9cbb5c9f922f1f60
0760fb4901a75766921a205b55686d6d6f049b30
/java/runtime/src/main/java/io/ray/runtime/utils/parallelactor/ParallelActorExecutorImpl.java
22fb72183ce578545965bfd67f79e6a3a9f4deb9
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
ray-project/ray
a4bb6940b08b59a61ef0b8e755a52d8563a2f867
edba68c3e7cf255d1d6479329f305adb7fa4c3ed
refs/heads/master
2023-08-31T03:36:48.164405
2023-08-31T03:20:38
2023-08-31T03:20:38
71,932,349
29,482
5,669
Apache-2.0
2023-09-14T21:48:14
2016-10-25T19:38:30
Python
UTF-8
Java
false
false
1,663
java
package io.ray.runtime.utils.parallelactor; import com.google.common.base.Preconditions; import io.ray.api.Ray; import io.ray.runtime.AbstractRayRuntime; import io.ray.runtime.functionmanager.FunctionManager; import io.ray.runtime.functionmanager.JavaFunctionDescriptor; import io.ray.runtime.functionmanager.RayFunction; import java.lang.reflect.InvocationTargetException; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ParallelActorExecutorImpl { private static final Logger LOG = LoggerFactory.getLogger(ParallelActorExecutorImpl.class); private FunctionManager functionManager = null; private ConcurrentHashMap<Integer, Object> instances = new ConcurrentHashMap<>(); public ParallelActorExecutorImpl(int parallelism, JavaFunctionDescriptor javaFunctionDescriptor) throws InvocationTargetException, IllegalAccessException { functionManager = ((AbstractRayRuntime) Ray.internal()).getFunctionManager(); RayFunction init = functionManager.getFunction(javaFunctionDescriptor); Thread.currentThread().setContextClassLoader(init.classLoader); for (int i = 0; i < parallelism; ++i) { Object instance = init.getMethod().invoke(null); instances.put(i, instance); } } public Object execute(int instanceId, JavaFunctionDescriptor functionDescriptor, Object[] args) throws IllegalAccessException, InvocationTargetException { RayFunction func = functionManager.getFunction(functionDescriptor); Preconditions.checkState(instances.containsKey(instanceId)); return func.getMethod().invoke(instances.get(instanceId), args); } }
[ "noreply@github.com" ]
ray-project.noreply@github.com
614ad3c674420349cc90c218e5992c049dcfcd0e
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project476/src/main/java/org/gradle/test/performance/largejavamultiproject/project476/p2381/Production47624.java
dc4b5773da4df9687f5e9fbdcf1c84f0d344cc1f
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project476.p2381; public class Production47624 { private Production47621 property0; public Production47621 getProperty0() { return property0; } public void setProperty0(Production47621 value) { property0 = value; } private Production47622 property1; public Production47622 getProperty1() { return property1; } public void setProperty1(Production47622 value) { property1 = value; } private Production47623 property2; public Production47623 getProperty2() { return property2; } public void setProperty2(Production47623 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
8c1b6cc8a8559e547c5df0e4491c245fe501aebd
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/1915/Java8HolderTest.java
3fe6fbe9c6286b471774b39d09f852ae657647f4
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,290
java
/** * The MIT License * Copyright (c) 2014-2016 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.lazy.loading; import java.lang.reflect.Field; import java.util.function.Supplier; /** * Date: 12/19/15 - 12:27 PM * * @author Jeroen Meulemeester */ public class Java8HolderTest extends AbstractHolderTest { private final Java8Holder holder = new Java8Holder(); @Override Heavy getInternalHeavyValue() throws Exception { final Field holderField = Java8Holder.class.getDeclaredField("heavy"); holderField.setAccessible(true); final Supplier<Heavy> supplier = (Supplier<Heavy>) holderField.get(this.holder); final Class<? extends Supplier> supplierClass = supplier.getClass(); // This is a little fishy, but I don't know another way to test this: // The lazy holder is at first a lambda, but gets replaced with a new supplier after loading ... if (supplierClass.isLocalClass()) { final Field instanceField = supplierClass.getDeclaredField("heavyInstance"); instanceField.setAccessible(true); return (Heavy) instanceField.get(supplier); } else { return null; } } @Override Heavy getHeavy() throws Exception { return holder.getHeavy(); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
42916a2d01a7950f62dcae5303c2d5bee00bd63c
536de010c691a3b358071f5fb3986713acc56806
/Restaurant/app/src/main/java/offers/restaurant/dto/Restaurant.java
7fac99dd6ddc99cbb7f24f16ed1a8a1dad6e4383
[ "Apache-2.0" ]
permissive
adityakamath90/Restaurant
79a4818beb161861039774015e742264ee3a25d5
3aa27f4628700d678afa7d8fc924b2bfec1642ce
refs/heads/master
2016-08-12T08:00:02.123764
2016-02-08T07:49:35
2016-02-08T07:49:35
51,054,598
0
0
null
null
null
null
UTF-8
Java
false
false
865
java
package offers.restaurant.dto; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; public class Restaurant { @SerializedName("status") @Expose private Status status; @SerializedName("data") @Expose private List<RestaurantData> data = new ArrayList<RestaurantData>(); /** * @return The status */ public Status getStatus() { return status; } /** * @param status The status */ public void setStatus(Status status) { this.status = status; } /** * @return The data */ public List<RestaurantData> getData() { return data; } /** * @param data The data */ public void setData(List<RestaurantData> data) { this.data = data; } }
[ "diego.developers@robosftin.com" ]
diego.developers@robosftin.com
640376ca463815485b004f515daf5e301d512a01
4b2c8ae83740b7e7941f3d98fcf0e980d677e048
/spring-boot/SpringBootApplication1-5/src/test/java/com/nit/initilizer/SpringBootApplication15ApplicationTests.java
febf78638ee351b1630bec4f8fb764ade0936711
[]
no_license
srinath9553717840/java
cee80917f6c2f84d8a1da841f1527e8b788648b3
87106f905d08a0fb5233eab398fdaedac015d09b
refs/heads/master
2022-12-23T08:45:46.444352
2019-09-23T11:30:22
2019-09-23T11:30:22
210,151,402
0
0
null
2022-12-16T02:43:00
2019-09-22T13:24:26
JavaScript
UTF-8
Java
false
false
352
java
package com.nit.initilizer; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringBootApplication15ApplicationTests { @Test public void contextLoads() { } }
[ "madishettysrinath10@gmail.com" ]
madishettysrinath10@gmail.com
b8addb1f7d149a536d14105934b26e0f9ab05433
8e94e9b7c0f3efaa641432989b573515e2aaef8b
/src/main/java/com/xll/dt/dao/impl/SysMenuDaoImpl.java
af6ff9876f1c1d1f5d65d81a948505fd6af63140
[]
no_license
larissa0520/dt-ssh
b3d04e7d9124ac361445d79394ee508921d68ab3
400049cde42d651bd1d1952f0283087e2d8d8a62
refs/heads/master
2021-04-27T02:15:42.584697
2018-05-12T01:32:41
2018-05-12T01:32:41
122,691,717
0
1
null
null
null
null
UTF-8
Java
false
false
3,219
java
package com.xll.dt.dao.impl; import java.util.List; import org.hibernate.SessionFactory; import org.hibernate.query.NativeQuery; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Repository; import com.xll.dt.dao.SysMenuDao; import com.xll.dt.pojo.SysMenu; @Repository public class SysMenuDaoImpl extends BaseDAOImpl<SysMenu> implements SysMenuDao { @Autowired public void setSF(SessionFactory sf){ //HibernateDaoSupport 为dao注入sessionFactory super.setSessionFactory(sf); } @Value("SysMenu") public void setClassName(String className) { super.className = className; } @Value("menuId") public void setKeyName(String keyName) { super.keyName = keyName; } @Value("orderNum") public void setDefaultOrderColum(String defaultOrderColum) { super.defaultOrderColum = defaultOrderColum; } //type=0的菜单 @Override public List<SysMenu> getNotButtonList() { return find("from SysMenu where type = 0 order by orderNum asc "); } //获取user的权限 @Override public List<String> getUserPermsList(Long userId) { String sql = " SELECT m.perms" + " FROM sys_menu m" + " LEFT JOIN sys_role_menu rm" + " ON m.menu_id = rm.menu_id" + " LEFT JOIN sys_user_role ur" + " ON ur.role_id = rm.role_id" + " WHERE ur.user_id = :userId"; NativeQuery sqlQuery = currentSession().createNativeQuery(sql); sqlQuery.setParameter("userId", userId); return sqlQuery.list(); //return nativeFind(sql, new Object[] {userId}); } //所有的一级菜单 @Override public List<SysMenu> getTopMenuList() { return find("from SysMenu where parentMenu.menuId = null order by orderNum asc "); } //所有的一级菜单 @Override public List<SysMenu> findAllTop() { String sql = "select * from sys_menu where parent_id is null order by order_num"; NativeQuery<SysMenu> query = currentSession().createNativeQuery(sql, SysMenu.class); return query.list(); } //获取所有父菜单根据父菜单id @Override public List<SysMenu> findByParentId(Long parentId) { String sql = "select * from sys_menu where parent_id = :parentId order by order_num"; NativeQuery<SysMenu> query = currentSession().createNativeQuery(sql, SysMenu.class); query.setParameter("parentId", parentId); return query.list(); } //获取一级菜单根根据id @Override public List<SysMenu> findUserTop(List<Long> ids) { String sql = "select * from sys_menu where parent_id is null and menu_id in (:ids) order by order_num"; NativeQuery<SysMenu> query = currentSession().createNativeQuery(sql, SysMenu.class); query.setParameter("ids", ids); return query.list(); } //获得菜单根据父菜单id和菜单id @Override public List<SysMenu> findUserMenuByParentId(Long parentId, List<Long> ids) { String sql = "select * from sys_menu where parent_id = :parentId and menu_id in (:ids) order by order_num"; NativeQuery<SysMenu> query = currentSession().createNativeQuery(sql, SysMenu.class); query.setParameter("parentId", parentId); query.setParameter("ids", ids); return query.list(); } }
[ "larissa0520@163.com" ]
larissa0520@163.com
a2dd5298f2ef70d1914238ed429e0616513716f0
9ce32718faeb5b8b0382c8dbdb45f8d2cc1aecf4
/src/test/java/com/apudasgupta/security/MySpringSecurityJdbcApplicationTests.java
6855190e91b1e45fd56d0644d8591bffa484a440
[]
no_license
apudasgupta/spring-security-jpa
2a3520865e649c551dd2d00105a0398c2a341a8e
38b69659f7ede7dab189c169b19988868ff32d4c
refs/heads/master
2023-02-04T19:59:53.785903
2023-02-01T07:05:43
2023-02-01T07:05:43
294,769,476
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package com.apudasgupta.security; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class MySpringSecurityJdbcApplicationTests { @Test void contextLoads() { } }
[ "great.adgupta@gmail.com" ]
great.adgupta@gmail.com
4393a7b7b862f72de1a835b299cdb4559ce79aa5
fa2a20f81157d3ca6d46fe51c00535726127c88f
/janusclientapi/src/main/java/computician/janusclientapi/JanusAttachPluginTransaction.java
0a63b2ca3aab52dd6fb8faf3a3ee66718065f428
[ "MIT" ]
permissive
Bnei-Baruch/janus-gateway-android
c1e85a47ec9c75703d246731b3b9a97420766839
0376449679c3cf34752eceefeda7462327951519
refs/heads/master
2021-01-17T18:21:52.361746
2019-04-05T02:16:29
2019-04-05T02:16:29
47,121,267
3
1
null
2015-11-30T13:45:44
2015-11-30T13:45:44
null
UTF-8
Java
false
false
1,297
java
package computician.janusclientapi; import org.json.JSONException; import org.json.JSONObject; /** * Created by ben.trent on 6/25/2015. */ public class JanusAttachPluginTransaction implements ITransactionCallbacks { private final IJanusAttachPluginCallbacks callbacks; private final JanusSupportedPluginPackages plugin; private final IJanusPluginCallbacks pluginCallbacks; public JanusAttachPluginTransaction(IJanusAttachPluginCallbacks callbacks, JanusSupportedPluginPackages plugin, IJanusPluginCallbacks pluginCallbacks) { this.callbacks = callbacks; this.plugin = plugin; this.pluginCallbacks = pluginCallbacks; } public TransactionType getTransactionType() { return TransactionType.attach; } @Override public void reportSuccess(JSONObject obj) { try { JanusMessageType type = JanusMessageType.fromString(obj.getString("janus")); if (type != JanusMessageType.success) { callbacks.onCallbackError(obj.getJSONObject("error").getString("reason")); } else { callbacks.attachPluginSuccess(obj, plugin, pluginCallbacks); } } catch (JSONException ex) { callbacks.onCallbackError(ex.getMessage()); } } }
[ "ben.w.trent@gmail.com" ]
ben.w.trent@gmail.com
dafdfdd3c02d834981660b02dddecfc481e13f6d
3d2d589bb85572f0cb8ffff80642162f89c03a48
/Spring/Test1/src/com/AppConfig.java
b352a8afd4fb4ed5286c5f13c231ace9803e9c1c
[]
no_license
tracksdata/Fedility-Spring
475bfca596e4072065cacc9ba8394df61601f5c8
d7dbcb3026d18ea06aba5eaeeca6a7a29b9bdfcd
refs/heads/master
2021-06-24T14:47:16.861426
2017-05-07T09:25:03
2017-05-07T09:25:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
package com; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Scope; @Configuration @ComponentScan(value={"com"}) public class AppConfig { /* @Bean @Scope public Employee getEmployee() { return new Employee(); } @Bean(name = "c1") //@Primary public C1 getC1() { return new C1(); } @Bean(name = "c2") //@Primary public C2 getC2() { return new C2(); } @Bean public App getApp(){ return new App(); }*/ }
[ "praveen.somireddy@gmail.com" ]
praveen.somireddy@gmail.com
bcaf764f1cbb7f82aa73952752cf6745bf66ad0d
7b8c75a773a7250670a7c7869304393e61539119
/FileSystem/plusfun/MyLRU.java
bfa7f564e1f49bc65f799340d5bdd618170f04e3
[]
no_license
Nilianfei/simple-Windows-Resource-Managers
71fa84b372801c440c82b431b305b88973c10003
1373ca5d8b199329424c65ee08f41b908b45ca6f
refs/heads/master
2021-07-15T04:40:06.168142
2017-10-20T02:10:35
2017-10-20T02:10:35
107,620,120
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
package FileSystem.plusfun; import java.io.*; import java.util.LinkedList; /** * Created by windy on 2017/8/22. */ public class MyLRU { private final int MAX_SIZE = 20; private LinkedList<String> mPathList; private String fileName; public MyLRU(String fileName) throws IOException{ this.mPathList = new LinkedList<>(); this.fileName = fileName; File file = new File(fileName); if (file.exists()){ readExistPaths(file); } else { file.createNewFile(); } } public void add(String path){ if(mPathList.contains(path)){ mPathList.remove(path); } else if (mPathList.size() >= MAX_SIZE){ mPathList.removeLast(); } mPathList.addFirst(path); } public boolean writePath() throws IOException{ BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(new File(fileName))); for (String path : mPathList){ bufferedWriter.write(path); bufferedWriter.newLine(); } bufferedWriter.flush(); bufferedWriter.close(); return true; } private void readExistPaths(File file) throws IOException{ String path; BufferedReader bufferedReader = new BufferedReader(new FileReader(file)); while ((path = bufferedReader.readLine()) != null){ add(path); } bufferedReader.close(); } }
[ "1074523347@qq.com" ]
1074523347@qq.com
5aab6486d91df063118c4311bac5b5bb2d0469f3
ee2358557e031bf7c7981eaade76fb91faa1a706
/MyJob_Store/app/src/main/java/soexample/bigfly/com/myjob_store/utils/user_defined_view/UserPopwidow.java
1ca38e142ec10bd8536c15cd53e92e75c76072b7
[]
no_license
lv823063712/MyJobStore
afb48518e012d26f1bda7f16716ca3743314872e
c822466baf943573a6f62a68d9846ae2d441c607
refs/heads/master
2020-04-28T19:55:57.136165
2019-03-14T01:37:07
2019-03-14T01:37:07
175,527,126
0
0
null
null
null
null
UTF-8
Java
false
false
3,005
java
package soexample.bigfly.com.myjob_store.utils.user_defined_view; import android.animation.Animator; import android.animation.ValueAnimator; import android.view.animation.Interpolator; import android.view.animation.LinearInterpolator; /** * <p>文件描述:<p> * <p>作者:${吕飞}<p> * <p>创建时间:2019/2/22 13:46<p> * <p>更改时间:2019/2/22 13:46<p> * <p>版本号:1<p> */ public class UserPopwidow { private ValueAnimator valueAnimator; private UpdateListener updateListener; private EndListener endListener; private long duration; private float start; private float end; private Interpolator interpolator = new LinearInterpolator(); public UserPopwidow() { // 默认动画时常1s duration = 1000; start = 0.0f; end = 1.0f; // 匀速的插值器 interpolator = new LinearInterpolator(); } public void setDuration(int timeLength) { duration = timeLength; } public void setValueAnimator(float start, float end, long duration) { this.start = start; this.end = end; this.duration = duration; } public void setInterpolator(Interpolator interpolator) { this.interpolator = interpolator; } public void startAnimator() { if (valueAnimator != null) { valueAnimator = null; } valueAnimator = ValueAnimator.ofFloat(start, end); valueAnimator.setDuration(duration); valueAnimator.setInterpolator(interpolator); valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { if (updateListener == null) { return; } float cur = (float) valueAnimator.getAnimatedValue(); updateListener.progress(cur); } }); valueAnimator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animator) { } @Override public void onAnimationEnd(Animator animator) { if (endListener == null) { return; } endListener.endUpdate(animator); } @Override public void onAnimationCancel(Animator animator) { } @Override public void onAnimationRepeat(Animator animator) { } }); valueAnimator.start(); } public void addUpdateListener(UpdateListener updateListener) { this.updateListener = updateListener; } public void addEndListner(EndListener endListener) { this.endListener = endListener; } public interface EndListener { void endUpdate(Animator animator); } public interface UpdateListener { void progress(float progress); } }
[ "823063712@qq.com" ]
823063712@qq.com
bfca1ba26e53b1577eeafd26874e546a907abfff
ea8260b593ca885da1dffaa62765f7ba14bd129f
/src/main/java/org/ohnlp/typesystem/type/refsem/Procedure.java
a468aa738b012fd890daa8b2f26d244952b3919a
[]
no_license
Dennis-Valentine/MedXN
9547f5333b28272bea4a23b1b6645edd57a919ff
110c0d8a75921d60fb333d438efc8779b4fe8271
refs/heads/master
2023-03-13T08:05:04.467743
2021-03-04T15:35:08
2021-03-04T15:35:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,329
java
/******************************************************************************* * Copyright: (c) 2013 Mayo Foundation for Medical Education and * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the * triple-shield Mayo logo are trademarks and service marks of MFMER. * * Except as contained in the copyright notice above, or as used to identify * MFMER as the author of this software, the trade names, trademarks, service * marks, or product names of the copyright holder shall not be used in * advertising, promotion or otherwise in connection with this software without * prior written authorization of the copyright holder. * * 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. *******************************************************************************/ /* First created by JCasGen Mon Sep 30 15:04:17 CDT 2013 */ package org.ohnlp.typesystem.type.refsem; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.jcas.cas.TOP_Type; import org.ohnlp.typesystem.type.relation.TemporalRelation; import org.ohnlp.typesystem.type.relation.LocationOf; /** This is an Event from the UMLS semantic group of Procedures (except that Laboratory procedures are separate). Based on generic Clinical Element Models (CEMs) * Updated by JCasGen Mon Sep 30 15:04:17 CDT 2013 * XML source: /MedXN_1.0/descsrc/org/ohnlp/medxn/types/MedXNTypes.xml * @generated */ public class Procedure extends Event { /** @generated * @ordered */ @SuppressWarnings ("hiding") public final static int typeIndexID = JCasRegistry.register(Procedure.class); /** @generated * @ordered */ @SuppressWarnings ("hiding") public final static int type = typeIndexID; /** @generated */ @Override public int getTypeIndexID() {return typeIndexID;} /** Never called. Disable default constructor * @generated */ protected Procedure() {/* intentionally empty block */} /** Internal - constructor used by generator * @generated */ public Procedure(int addr, TOP_Type type) { super(addr, type); readObject(); } /** @generated */ public Procedure(JCas jcas) { super(jcas); readObject(); } /** <!-- begin-user-doc --> * Write your own initialization here * <!-- end-user-doc --> @generated modifiable */ private void readObject() {/*default - does nothing empty block */} //*--------------* //* Feature: bodyLaterality /** getter for bodyLaterality - gets * @generated */ public BodyLaterality getBodyLaterality() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodyLaterality == null) jcasType.jcas.throwFeatMissing("bodyLaterality", "org.ohnlp.typesystem.type.refsem.Procedure"); return (BodyLaterality)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodyLaterality)));} /** setter for bodyLaterality - sets * @generated */ public void setBodyLaterality(BodyLaterality v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodyLaterality == null) jcasType.jcas.throwFeatMissing("bodyLaterality", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodyLaterality, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: bodySide /** getter for bodySide - gets * @generated */ public BodySide getBodySide() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodySide == null) jcasType.jcas.throwFeatMissing("bodySide", "org.ohnlp.typesystem.type.refsem.Procedure"); return (BodySide)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodySide)));} /** setter for bodySide - sets * @generated */ public void setBodySide(BodySide v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodySide == null) jcasType.jcas.throwFeatMissing("bodySide", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodySide, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: bodyLocation /** getter for bodyLocation - gets * @generated */ public LocationOf getBodyLocation() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodyLocation == null) jcasType.jcas.throwFeatMissing("bodyLocation", "org.ohnlp.typesystem.type.refsem.Procedure"); return (LocationOf)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodyLocation)));} /** setter for bodyLocation - sets * @generated */ public void setBodyLocation(LocationOf v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_bodyLocation == null) jcasType.jcas.throwFeatMissing("bodyLocation", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_bodyLocation, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: procedureDevice /** getter for procedureDevice - gets * @generated */ public ProcedureDevice getProcedureDevice() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_procedureDevice == null) jcasType.jcas.throwFeatMissing("procedureDevice", "org.ohnlp.typesystem.type.refsem.Procedure"); return (ProcedureDevice)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_procedureDevice)));} /** setter for procedureDevice - sets * @generated */ public void setProcedureDevice(ProcedureDevice v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_procedureDevice == null) jcasType.jcas.throwFeatMissing("procedureDevice", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_procedureDevice, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: duration /** getter for duration - gets * @generated */ public TemporalRelation getDuration() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_duration == null) jcasType.jcas.throwFeatMissing("duration", "org.ohnlp.typesystem.type.refsem.Procedure"); return (TemporalRelation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_duration)));} /** setter for duration - sets * @generated */ public void setDuration(TemporalRelation v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_duration == null) jcasType.jcas.throwFeatMissing("duration", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_duration, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: endTime /** getter for endTime - gets * @generated */ public Time getEndTime() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_endTime == null) jcasType.jcas.throwFeatMissing("endTime", "org.ohnlp.typesystem.type.refsem.Procedure"); return (Time)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_endTime)));} /** setter for endTime - sets * @generated */ public void setEndTime(Time v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_endTime == null) jcasType.jcas.throwFeatMissing("endTime", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_endTime, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: method /** getter for method - gets * @generated */ public ProcedureMethod getMethod() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_method == null) jcasType.jcas.throwFeatMissing("method", "org.ohnlp.typesystem.type.refsem.Procedure"); return (ProcedureMethod)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_method)));} /** setter for method - sets * @generated */ public void setMethod(ProcedureMethod v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_method == null) jcasType.jcas.throwFeatMissing("method", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_method, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: startTime /** getter for startTime - gets * @generated */ public Time getStartTime() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_startTime == null) jcasType.jcas.throwFeatMissing("startTime", "org.ohnlp.typesystem.type.refsem.Procedure"); return (Time)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_startTime)));} /** setter for startTime - sets * @generated */ public void setStartTime(Time v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_startTime == null) jcasType.jcas.throwFeatMissing("startTime", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_startTime, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: relativeTemporalContext /** getter for relativeTemporalContext - gets * @generated */ public TemporalRelation getRelativeTemporalContext() { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_relativeTemporalContext == null) jcasType.jcas.throwFeatMissing("relativeTemporalContext", "org.ohnlp.typesystem.type.refsem.Procedure"); return (TemporalRelation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_relativeTemporalContext)));} /** setter for relativeTemporalContext - sets * @generated */ public void setRelativeTemporalContext(TemporalRelation v) { if (Procedure_Type.featOkTst && ((Procedure_Type)jcasType).casFeat_relativeTemporalContext == null) jcasType.jcas.throwFeatMissing("relativeTemporalContext", "org.ohnlp.typesystem.type.refsem.Procedure"); jcasType.ll_cas.ll_setRefValue(addr, ((Procedure_Type)jcasType).casFeatCode_relativeTemporalContext, jcasType.ll_cas.ll_getFSRef(v));} }
[ "james_masanz@86f73235-997c-406d-aa19-21ee2444f377" ]
james_masanz@86f73235-997c-406d-aa19-21ee2444f377
0315270bc037e05779d80eaf704d5226822719af
21cd9111f92cfa8b24a7ff4a136c33a89809cca7
/src/FIRe/Exceptions/ReturnException.java
53b321c13d43acc1e2bfeb406469c2dcae41a9d0
[]
no_license
dty717/FIReCompiler
b4390bde648b1f8241537195cdf20b3c142d7fd9
dced8700abf2d4cd54b8c9194fb98a5f47fb8601
refs/heads/master
2020-03-14T18:08:58.204830
2018-05-01T12:38:16
2018-05-01T12:38:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package FIRe.Exceptions; public class ReturnException extends Exception{ String errStr; public ReturnException(String errStr, int lineNum){ super("ERROR: " + errStr + " in line " + lineNum + "."); } }
[ "tuttanium@gmail.com" ]
tuttanium@gmail.com
a7e8285c9a7ed417d8e65d6cabfbea490a2152dc
d71594078a92fd87db526fb28400e88c0c84e289
/lab1/app1-app3-SensorTagGPS/src/com/example/sample/SensorTagData.java
c817c2d050971b6c5f9a7ae2c0d902af5ee884f0
[]
no_license
mlikk/BigDATA
ac20318e081ffbe896e2830d1ff85af5985fd0c5
0d2c3be1d3ded748129297e41a872fc296fc7500
refs/heads/master
2016-09-06T03:01:19.956131
2014-08-01T19:01:44
2014-08-01T19:01:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,017
java
package com.example.sample; import android.bluetooth.BluetoothGattCharacteristic; /** * Created by Prakash Reddy Vaka */ public class SensorTagData { public static double extractHumAmbientTemperature(BluetoothGattCharacteristic c) { int rawT = shortSignedAtOffset(c, 0); return -46.85 + 175.72/65536 *(double)rawT; } public static double extractHumidity(BluetoothGattCharacteristic c) { int a = shortUnsignedAtOffset(c, 2); // bits [1..0] are status bits and need to be cleared a = a - (a % 4); return ((-6f) + 125f * (a / 65535f)); } public static int[] extractCalibrationCoefficients(BluetoothGattCharacteristic c) { int[] coefficients = new int[8]; coefficients[0] = shortUnsignedAtOffset(c, 0); coefficients[1] = shortUnsignedAtOffset(c, 2); coefficients[2] = shortUnsignedAtOffset(c, 4); coefficients[3] = shortUnsignedAtOffset(c, 6); coefficients[4] = shortSignedAtOffset(c, 8); coefficients[5] = shortSignedAtOffset(c, 10); coefficients[6] = shortSignedAtOffset(c, 12); coefficients[7] = shortSignedAtOffset(c, 14); return coefficients; } public static double extractBarTemperature(BluetoothGattCharacteristic characteristic, final int[] c) { // c holds the calibration coefficients int t_r; // Temperature raw value from sensor double t_a; // Temperature actual value in unit centi degrees celsius t_r = shortSignedAtOffset(characteristic, 0); t_a = (100 * (c[0] * t_r / Math.pow(2,8) + c[1] * Math.pow(2,6))) / Math.pow(2,16); return t_a / 100; } public static double extractBarometer(BluetoothGattCharacteristic characteristic, final int[] c) { // c holds the calibration coefficients int t_r; // Temperature raw value from sensor int p_r; // Pressure raw value from sensor double S; // Interim value in calculation double O; // Interim value in calculation double p_a; // Pressure actual value in unit Pascal. t_r = shortSignedAtOffset(characteristic, 0); p_r = shortUnsignedAtOffset(characteristic, 2); S = c[2] + c[3] * t_r / Math.pow(2,17) + ((c[4] * t_r / Math.pow(2,15)) * t_r) / Math.pow(2,19); O = c[5] * Math.pow(2,14) + c[6] * t_r / Math.pow(2,3) + ((c[7] * t_r / Math.pow(2,15)) * t_r) / Math.pow(2,4); p_a = (S * p_r + O) / Math.pow(2,14); //Convert pascal to in. Hg double p_hg = p_a * 0.000296; return p_hg; } /** * Gyroscope, Magnetometer, Barometer, IR temperature * all store 16 bit two's complement values in the awkward format * LSB MSB, which cannot be directly parsed as getIntValue(FORMAT_SINT16, offset) * because the bytes are stored in the "wrong" direction. * * This function extracts these 16 bit two's complement values. * */ private static Integer shortSignedAtOffset(BluetoothGattCharacteristic c, int offset) { Integer lowerByte = c.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, offset); Integer upperByte = c.getIntValue(BluetoothGattCharacteristic.FORMAT_SINT8, offset + 1); // Note: interpret MSB as signed. return (upperByte << 8) + lowerByte; } private static Integer shortUnsignedAtOffset(BluetoothGattCharacteristic c, int offset) { Integer lowerByte = c.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, offset); Integer upperByte = c.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, offset + 1); // Note: interpret MSB as unsigned. return (upperByte << 8) + lowerByte; } public static Float[] extractAccelerometerReading(final BluetoothGattCharacteristic c, int offset){ /* * The accelerometer has the range [-2g, 2g] with unit (1/64)g. * * To convert from unit (1/64)g to unit g we divide by 64. * * (g = 9.81 m/s^2) * * The z value is multiplied with -1 to coincide * with how we have arbitrarily defined the positive y direction. * (illustrated by the apps accelerometer image) * */ Integer x = c.getIntValue(BluetoothGattCharacteristic.FORMAT_SINT8, offset); Integer y = c.getIntValue(BluetoothGattCharacteristic.FORMAT_SINT8, offset+1); Integer z = c.getIntValue(BluetoothGattCharacteristic.FORMAT_SINT8, offset+2) * -1; float scaledX = x / 64.0f; float scaledY = y / 64.0f; float scaledZ = z / 64.0f; Float[] data = {scaledX,scaledY,scaledZ} ; return data; } public static Float[] extractGyroscopeReading(final BluetoothGattCharacteristic c, int offset){ float y = shortSignedAtOffset(c, offset) * (500f / 65536f) * -1; float x = shortSignedAtOffset(c, offset+2) * (500f / 65536f); float z = shortSignedAtOffset(c, offset+4) * (500f / 65536f); Float[] data ={x,y,z}; return data; } }
[ "kalvakuri.m.k@gmail.com" ]
kalvakuri.m.k@gmail.com
29d0307a90fa287eea098af942535a94e319fec2
c25c58a402feaf950395c9bf4d7b6d372b1f2769
/beh/src/structural/Bridge/shape3/printer/MoviePrinter.java
e7b1cb070fa0e602938e064a7ecd3d1e3afa80cc
[]
no_license
tomek401273/design-patterns
6be6ea5a0596b40bfd13b279c5631c162e57fe6d
29bcff1f19fd5606abc62fa31366754f0d749cd1
refs/heads/master
2020-07-02T20:45:30.183669
2019-08-10T17:14:40
2019-08-10T17:14:40
201,660,246
0
0
null
null
null
null
UTF-8
Java
false
false
688
java
package structural.Bridge.shape3.printer; import structural.Bridge.shape3.model.Detail; import structural.Bridge.shape3.model.Movie; import java.util.ArrayList; import java.util.List; public class MoviePrinter extends Printer { private Movie movie; public MoviePrinter(Movie movie) { this.movie = movie; } @Override protected List<Detail> getDetails() { List<Detail> details = new ArrayList<>(); details.add(new Detail("Title", movie.getTitle())); details.add(new Detail("Year", movie.getYear())); details.add(new Detail("Runtime", movie.getRuntime())); return details; } @Override protected String getHeader() { return movie.getClassification(); } }
[ "tomek371240@gmail.com" ]
tomek371240@gmail.com
6be7dc5c04cdd231983345a2b21f445c3a8b1f04
3a6f6a9ef7ef002b5d8f94cf8477901599fb7c9a
/src/com/example/trendingtweets/DataFetch.java
17bc6b2c25297bc3e5e81e6efa7b52e7ce46fc9d
[]
no_license
lcenta/TwitterTrends
14036c965a0b88927434506c5241473d8e7ab0a9
908c74aca7472d023d02ca4a976b15039190c93f
refs/heads/master
2016-09-10T19:37:51.336167
2014-05-20T13:04:03
2014-05-20T13:04:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
65
java
package com.example.trendingtweets; public class DataFetch { }
[ "lanncenta@gmail.com" ]
lanncenta@gmail.com
e55a8b89e699e01d1b99a239e2cf3d0f887993b3
f567413ca65990c8e376723b6faf85f2a9e9939d
/src/main/java/com/zzia/wngn/design/command/Status.java
e3270db04fc67c6ce523f5d0fa1d91b6922e1f2f
[]
no_license
wngn123/wngn-test
c7c6daa33535f98aaf6acdad0ead2a92472eb882
ad4b639b14537464054585aa64dd50883d539412
refs/heads/master
2016-09-14T12:45:59.401186
2016-06-02T15:22:40
2016-06-02T15:22:40
59,181,575
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.zzia.wngn.design.command; /** * @author wanggang * @title * @date 2016/5/30 9:51 * @email wanggang@vfou.com * @descripe */ public enum Status { ON(1), OFF(1); private int status; Status(int status) { this.status = status; } public int getStatus() { return this.status; } }
[ "wngn123@163.com" ]
wngn123@163.com
faabe5ecda7fb672458f453a09a66983f5fec773
def95c33c947d72b9e98ff4bd4e284bca55587ee
/src/main/java/com/compomics/util/db/interfaces/Deleteable.java
e8ce04ff2679768ab4cc0b919c208f857aba3e96
[ "Apache-2.0" ]
permissive
tzaeschke/compomics-utilities
fb3c6af9a9c9c466a2f71ac81092483e0dd420b5
1fdb82e0b8e77902c1587c1621c764398eae8c03
refs/heads/master
2022-06-09T22:49:23.874262
2020-04-30T23:54:45
2020-04-30T23:54:45
261,005,852
0
0
null
2020-05-03T19:32:21
2020-05-03T19:32:21
null
UTF-8
Java
false
false
1,152
java
/* * Copyright (C) Lennart Martens * * Contact: lennart.martens AT UGent.be (' AT ' to be replaced with '@') */ /* * Created by IntelliJ IDEA. * User: Lennart * Date: 15-jul-02 * Time: 11:33:12 */ package com.compomics.util.db.interfaces; import org.apache.log4j.Logger; import java.sql.Connection; import java.sql.SQLException; /* * CVS information: * * $Revision: 1.3 $ * $Date: 2007/07/06 09:41:54 $ */ /** * This interface indicates that the implementing class can be deleted from permanent storage. * * @author Lennart Martens */ public interface Deleteable { /** * This method will physically delete the implemented object's data from the * persistent store. * * @param aConn The Connection on which to execute SQL statements. * It should be an open connection and the implementation * should refrain from closing it, so the caller can reuse it. * @return int with the number of rows affected. * @exception SQLException When the save fails (e.g.: PK not found). */ public int delete(Connection aConn) throws SQLException; }
[ "kennyhelsens@f644b618-123a-11df-8689-7786f20063ad" ]
kennyhelsens@f644b618-123a-11df-8689-7786f20063ad
47039047c4c4f70d593a2c8a9b9ba158d01ef957
fcfb2aa4dc71f1a9d360b984c14a709ffb9892a1
/bankApplication_rest_51830092/src/main/java/com/bankapp/web/controller/TransactionalRequest.java
5be5e182b36e0747ab49700e90a2cc2ccad84f76
[]
no_license
MadhumithaRamalingam/projects_made1-2_51830092
97531661e9b3ca2d8d40a15080fc1438946cd4b2
225b047ceda568466c97665e18b87a8cb3c5fa30
refs/heads/master
2020-09-21T12:00:29.492043
2019-11-29T05:30:42
2019-11-29T05:30:42
224,783,048
0
0
null
null
null
null
UTF-8
Java
false
false
659
java
package com.bankapp.web.controller; public class TransactionalRequest { private Long fromAccount; private Long toAccount; private double amount; public Long getFromAccount() { return fromAccount; } public void setFromAccount(Long fromAccount) { this.fromAccount = fromAccount; } public long getToAccount() { return toAccount; } public void setToAccount(Long toAccount) { this.toAccount = toAccount; } public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public TransactionalRequest() { super(); } }
[ "madhumitharamalingam@gmail.com" ]
madhumitharamalingam@gmail.com
cfc5fd9768f3cb10e71881825c9e566022e30c7d
349b3c409d13d3c45c381fbb5d34cae55a2d3a3f
/mapstest/app/src/main/java/com/example/pmccarthy/mapstest/SphericalUtil.java
d500a57494d3b5bfd34581fcb64eaf29c52879e4
[]
no_license
yahiaragab/OOPAssignment3
e3da8c5863e7ea6df1e2830975f0af8ef3b0a345
a3921030a47290625fae4f5e616bd1dac093d508
refs/heads/master
2021-01-21T12:58:56.321196
2016-04-20T10:48:56
2016-04-20T10:48:56
52,266,163
0
0
null
null
null
null
UTF-8
Java
false
false
9,798
java
package com.example.pmccarthy.mapstest; import com.google.android.gms.maps.model.LatLng; import java.util.List; import static java.lang.Math.*; import static com.example.pmccarthy.mapstest.MathUtil.*; public class SphericalUtil { private SphericalUtil() {} /** * Returns the heading from one LatLng to another LatLng. Headings are * expressed in degrees clockwise from North within the range [-180,180). * @return The heading in degrees clockwise from north. */ public static double computeHeading(LatLng from, LatLng to) { // http://williams.best.vwh.net/avform.htm#Crs double fromLat = toRadians(from.latitude); double fromLng = toRadians(from.longitude); double toLat = toRadians(to.latitude); double toLng = toRadians(to.longitude); double dLng = toLng - fromLng; double heading = atan2( sin(dLng) * cos(toLat), cos(fromLat) * sin(toLat) - sin(fromLat) * cos(toLat) * cos(dLng)); return wrap(toDegrees(heading), -180, 180); } /** * Returns the LatLng resulting from moving a distance from an origin * in the specified heading (expressed in degrees clockwise from north). * @param from The LatLng from which to start. * @param distance The distance to travel. * @param heading The heading in degrees clockwise from north. */ public static LatLng computeOffset(LatLng from, double distance, double heading) { distance /= EARTH_RADIUS; heading = toRadians(heading); // http://williams.best.vwh.net/avform.htm#LL double fromLat = toRadians(from.latitude); double fromLng = toRadians(from.longitude); double cosDistance = cos(distance); double sinDistance = sin(distance); double sinFromLat = sin(fromLat); double cosFromLat = cos(fromLat); double sinLat = cosDistance * sinFromLat + sinDistance * cosFromLat * cos(heading); double dLng = atan2( sinDistance * cosFromLat * sin(heading), cosDistance - sinFromLat * sinLat); return new LatLng(toDegrees(asin(sinLat)), toDegrees(fromLng + dLng)); } /** * Returns the location of origin when provided with a LatLng destination, * meters travelled and original heading. Headings are expressed in degrees * clockwise from North. This function returns null when no solution is * available. * @param to The destination LatLng. * @param distance The distance travelled, in meters. * @param heading The heading in degrees clockwise from north. */ public static LatLng computeOffsetOrigin(LatLng to, double distance, double heading) { heading = toRadians(heading); distance /= EARTH_RADIUS; // http://lists.maptools.org/pipermail/proj/2008-October/003939.html double n1 = cos(distance); double n2 = sin(distance) * cos(heading); double n3 = sin(distance) * sin(heading); double n4 = sin(toRadians(to.latitude)); // There are two solutions for b. b = n2 * n4 +/- sqrt(), one solution results // in the latitude outside the [-90, 90] range. We first try one solution and // back off to the other if we are outside that range. double n12 = n1 * n1; double discriminant = n2 * n2 * n12 + n12 * n12 - n12 * n4 * n4; if (discriminant < 0) { // No real solution which would make sense in LatLng-space. return null; } double b = n2 * n4 + sqrt(discriminant); b /= n1 * n1 + n2 * n2; double a = (n4 - n2 * b) / n1; double fromLatRadians = atan2(a, b); if (fromLatRadians < -PI / 2 || fromLatRadians > PI / 2) { b = n2 * n4 - sqrt(discriminant); b /= n1 * n1 + n2 * n2; fromLatRadians = atan2(a, b); } if (fromLatRadians < -PI / 2 || fromLatRadians > PI / 2) { // No solution which would make sense in LatLng-space. return null; } double fromLngRadians = toRadians(to.longitude) - atan2(n3, n1 * cos(fromLatRadians) - n2 * sin(fromLatRadians)); return new LatLng(toDegrees(fromLatRadians), toDegrees(fromLngRadians)); } /** * Returns the LatLng which lies the given fraction of the way between the * origin LatLng and the destination LatLng. * @param from The LatLng from which to start. * @param to The LatLng toward which to travel. * @param fraction A fraction of the distance to travel. * @return The interpolated LatLng. */ public static LatLng interpolate(LatLng from, LatLng to, double fraction) { // http://en.wikipedia.org/wiki/Slerp double fromLat = toRadians(from.latitude); double fromLng = toRadians(from.longitude); double toLat = toRadians(to.latitude); double toLng = toRadians(to.longitude); double cosFromLat = cos(fromLat); double cosToLat = cos(toLat); // Computes Spherical interpolation coefficients. double angle = computeAngleBetween(from, to); double sinAngle = sin(angle); if (sinAngle < 1E-6) { return from; } double a = sin((1 - fraction) * angle) / sinAngle; double b = sin(fraction * angle) / sinAngle; // Converts from polar to vector and interpolate. double x = a * cosFromLat * cos(fromLng) + b * cosToLat * cos(toLng); double y = a * cosFromLat * sin(fromLng) + b * cosToLat * sin(toLng); double z = a * sin(fromLat) + b * sin(toLat); // Converts interpolated vector back to polar. double lat = atan2(z, sqrt(x * x + y * y)); double lng = atan2(y, x); return new LatLng(toDegrees(lat), toDegrees(lng)); } /** * Returns distance on the unit sphere; the arguments are in radians. */ private static double distanceRadians(double lat1, double lng1, double lat2, double lng2) { return arcHav(havDistance(lat1, lat2, lng1 - lng2)); } /** * Returns the angle between two LatLngs, in radians. This is the same as the distance * on the unit sphere. */ static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); } /** * Returns the distance between two LatLngs, in meters. */ public static double computeDistanceBetween(LatLng from, LatLng to) { return computeAngleBetween(from, to) * EARTH_RADIUS; } /** * Returns the length of the given path, in meters, on Earth. */ public static double computeLength(List<LatLng> path) { if (path.size() < 2) { return 0; } double length = 0; LatLng prev = path.get(0); double prevLat = toRadians(prev.latitude); double prevLng = toRadians(prev.longitude); for (LatLng point : path) { double lat = toRadians(point.latitude); double lng = toRadians(point.longitude); length += distanceRadians(prevLat, prevLng, lat, lng); prevLat = lat; prevLng = lng; } return length * EARTH_RADIUS; } /** * Returns the area of a closed path on Earth. * @param path A closed path. * @return The path's area in square meters. */ public static double computeArea(List<LatLng> path) { return abs(computeSignedArea(path)); } /** * Returns the signed area of a closed path on Earth. The sign of the area may be used to * determine the orientation of the path. * "inside" is the surface that does not contain the South Pole. * @param path A closed path. * @return The loop's area in square meters. */ public static double computeSignedArea(List<LatLng> path) { return computeSignedArea(path, EARTH_RADIUS); } /** * Returns the signed area of a closed path on a sphere of given radius. * The computed area uses the same units as the radius squared. * Used by SphericalUtilTest. */ static double computeSignedArea(List<LatLng> path, double radius) { int size = path.size(); if (size < 3) { return 0; } double total = 0; LatLng prev = path.get(size - 1); double prevTanLat = tan((PI / 2 - toRadians(prev.latitude)) / 2); double prevLng = toRadians(prev.longitude); // For each edge, accumulate the signed area of the triangle formed by the North Pole // and that edge ("polar triangle"). for (LatLng point : path) { double tanLat = tan((PI / 2 - toRadians(point.latitude)) / 2); double lng = toRadians(point.longitude); total += polarTriangleArea(tanLat, lng, prevTanLat, prevLng); prevTanLat = tanLat; prevLng = lng; } return total * (radius * radius); } /** * Returns the signed area of a triangle which has North Pole as a vertex. * Formula derived from "Area of a spherical triangle given two edges and the included angle" * as per "Spherical Trigonometry" by Todhunter, page 71, section 103, point 2. * See http://books.google.com/books?id=3uBHAAAAIAAJ&pg=PA71 * The arguments named "tan" are tan((pi/2 - latitude)/2). */ private static double polarTriangleArea(double tan1, double lng1, double tan2, double lng2) { double deltaLng = lng1 - lng2; double t = tan1 * tan2; return 2 * atan2(t * sin(deltaLng), 1 + t * cos(deltaLng)); } }
[ "padraigmccarthy1996@gmail.com" ]
padraigmccarthy1996@gmail.com
31d079500497ec6b8420154ec1968f30a70e3db2
5f7b22f6d16af896dd9417df05cda5b85cb0b562
/project/Release/code/Backend/code-complexity-analyzer/src/test/java/com/neo/codecomplexityanalyzer/service/serviceImpl/JavaSyntaxCheckerTest.java
993bfea20725144d4055ac21711821986345fd5d
[]
no_license
AshharAhamed/Code-complexity-analyzer
7c271a2847455853879c00709b12f3dc2201a87e
cb506319d30345ed386027eebb144cead5c809df
refs/heads/master
2022-03-17T08:23:41.421515
2019-10-31T06:14:36
2019-10-31T06:14:36
199,687,844
1
0
null
null
null
null
UTF-8
Java
false
false
1,895
java
package com.neo.codecomplexityanalyzer.service.serviceImpl; import org.junit.Test; import java.util.List; public class JavaSyntaxCheckerTest { @Test public void test1() { JavaSyntaxChecker j1 = new JavaSyntaxChecker("C://Student//SPM//Code-complexity-analyzer//project//Release//code//Backend//code-complexity-analyzer//src//main//resources//sampleData//Condition.java"); List<String> errorList = j1.check(); if (!errorList.isEmpty()) System.out.println(errorList); else System.out.println("No Compile Errors"); } @Test public void test2() { JavaSyntaxChecker j1 = new JavaSyntaxChecker("C://Student//SPM//Code-complexity-analyzer//project//Release//code//Backend//code-complexity-analyzer//src//main//resources//sampleData//For.java"); List<String> errorList = j1.check(); if (!errorList.isEmpty()) System.out.println(errorList); else System.out.println("No Compile Errors"); } @Test public void test3() { JavaSyntaxChecker j1 = new JavaSyntaxChecker("C://Student//SPM//Code-complexity-analyzer//project//Release//code//Backend//code-complexity-analyzer//src//main//resources//sampleData//Switch.java"); List<String> errorList = j1.check(); if (!errorList.isEmpty()) System.out.println(errorList); else System.out.println("No Compile Errors"); } @Test public void test4() { JavaSyntaxChecker j1 = new JavaSyntaxChecker("C://Student//SPM//Code-complexity-analyzer//project//Release//code//Backend//code-complexity-analyzer//src//main//resources//sampleData//Catch.java"); List<String> errorList = j1.check(); if (!errorList.isEmpty()) System.out.println(errorList); else System.out.println("No Compile Errors"); } }
[ "33770377+sathiraguruge@users.noreply.github.com" ]
33770377+sathiraguruge@users.noreply.github.com
ffeb4b008968d2d59c1747127cb2ca86803ecbdf
0e6b9f9403cae53bb8e2f13d17868dd881be0816
/eil-project-dev/src/main/java/com/shencai/eil/grading/service/impl/TargetWeightGradeLineServiceImpl.java
ee7ec24f7ba9b7b231eacbf87422dc7a9ba8aeb9
[]
no_license
fujialong/eil-project
2f68c33e832a4ee9a3f367aaa6e9ed58ee77e042
01f7def3ef0c85f5c3187ad03a9b2da82c9aff09
refs/heads/master
2020-03-29T21:06:13.421701
2018-10-30T08:48:28
2018-10-30T08:48:28
148,478,029
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
package com.shencai.eil.grading.service.impl; import com.shencai.eil.grading.entity.TargetWeightGradeLine; import com.shencai.eil.grading.mapper.TargetWeightGradeLineMapper; import com.shencai.eil.grading.service.ITargetWeightGradeLineService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * @author zhoujx * @since 2018-09-20 */ @Service public class TargetWeightGradeLineServiceImpl extends ServiceImpl<TargetWeightGradeLineMapper, TargetWeightGradeLine> implements ITargetWeightGradeLineService { }
[ "fujl1991@sina.com" ]
fujl1991@sina.com
662f9d138d951ec765cfda725a7c644015b12fd5
66387216e4ec90591d8398b58c01a3b9670759f9
/MultiStateToggleButtonApp/src/com/example/multistatetogglebuttonapp/MainActivity.java
f97cd370da4597dee4cd084058918b3f6bfa89da
[]
no_license
yzp531/multistatetogglebutton
a4ba75001ff281955bbfdfb77bd55b23f050532a
e4c8f5b7c5ced7181f2664f5d057bdbec34d5b04
refs/heads/master
2021-01-14T14:33:23.266818
2014-09-01T00:17:10
2014-09-01T00:17:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,587
java
package com.example.multistatetogglebuttonapp; import org.honorato.multistatetogglebutton.MultiStateToggleButton; import org.honorato.multistatetogglebutton.ThreeStateToggleButton; import org.honorato.multistatetogglebutton.ToggleButton; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.Menu; public class MainActivity extends Activity { protected static final String TAG = "MainActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ThreeStateToggleButton button = (ThreeStateToggleButton) this.findViewById(R.id.mstb_main_id); button.setOnValueChangedListener(new ToggleButton.OnValueChangedListener() { @Override public void onValueChanged(int position) { Log.d(TAG, "Position: " + position); } }); MultiStateToggleButton button2 = (MultiStateToggleButton) this.findViewById(R.id.mstb_multi_id); // Position one is selected by default button2.setElements(R.array.dogs_array, 1); // Multiple elements can be selected simultaneously button2.enableMultipleChoice(true); // Set callback button2.setOnValueChangedListener(new ToggleButton.OnValueChangedListener() { @Override public void onValueChanged(int position) { Log.d(TAG, "Position: " + position); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
[ "jlhonora@ing.puc.cl" ]
jlhonora@ing.puc.cl
602ed200a95e2954bfc36179fb914092c2bc5dd1
f2b87857dfe9bf681457d877cdf32d0c68870fd2
/marketing/marketing-batch/src/main/java/com/talkingdata/marketing/batch/etl/entrancecrowd/EntranceCrowdFinish.java
af00a6dd97daf378ffe12e630cef5e1a8a264333
[]
no_license
Cicadaes/td
2ca439f7d3fa80c1409a6bcfad9c39ff22a00e2a
d81f4d9656eebe0cc6d071da14c091df27e9777a
refs/heads/master
2020-08-02T12:09:14.126214
2019-08-01T12:03:37
2019-08-01T12:03:37
211,346,735
0
2
null
2019-09-27T15:14:58
2019-09-27T15:14:53
null
UTF-8
Java
false
false
1,989
java
package com.talkingdata.marketing.batch.etl.entrancecrowd; import com.talkingdata.marketing.batch.config.ApplicationContextManager; import com.talkingdata.marketing.batch.dao.PipelineCrowdDao; import org.apache.commons.cli.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 标记计算人群状态 * * @author Created by ran.li on 2017/11/15. */ public class EntranceCrowdFinish { private static final Logger logger = LoggerFactory.getLogger(EntranceCrowdFinish.class); public static void main(String[] args) throws ParseException { logger.info("[标记计算人群状态]----开始执行"); Options options = new Options(); options.addOption("p", "pipelineId", false, "pipelineID"); options.addOption("c", "crowdRefId", false, "用户管家人群ID"); options.addOption("t", "calcType", false, "计算类型"); CommandLineParser parser = new PosixParser(); CommandLine commandLine = parser.parse(options, args); String pipelineId = commandLine.getOptionValue("pipelineId"); String crowdRefId = commandLine.getOptionValue("crowdRefId"); String calcType = commandLine.getOptionValue("calcType"); execute(pipelineId, crowdRefId, calcType); logger.info("[标记计算人群状态]----结束执行"); } private static void execute(String pipelineId, String crowdRefId, String calcType) { PipelineCrowdDao pipelineCrowdDao = ApplicationContextManager.getInstance().getBean("pipelineCrowdDao", PipelineCrowdDao.class); //更新执行状态 if(calcType.equals(PipelineCrowdDao.CALC_TYPE_PERIOD)) { pipelineCrowdDao.updatePipelineCrowdRelByCrowdId(pipelineId, crowdRefId, PipelineCrowdDao.WAIT_CALC_STATUS); }else if(calcType.equals(PipelineCrowdDao.CALC_TYPE_NEVER)){ pipelineCrowdDao.updatePipelineCrowdRelByCrowdId(pipelineId, crowdRefId, PipelineCrowdDao.COMPLETE_CALC_STATUS); } } }
[ "" ]
ab16780fdee6063285f9f034709254325082df4d
6b4129310b028b25871eb92c9b8d04413c741471
/Занятие 20/src/main/java/project/MailPage.java
5135ccccd8e695b527f86221201fdeea6e1615a0
[]
no_license
RomanLosev/PVT
1f8cae85c3dc22787aa7ff1c5c2e83dad2826e2b
e641140c08484916af7cd1eae68cfe77aa3de21e
refs/heads/master
2022-06-27T12:31:52.685685
2019-07-10T19:06:40
2019-07-10T19:06:40
171,257,840
0
0
null
null
null
null
UTF-8
Java
false
false
2,501
java
package project; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class MailPage { @FindBy(xpath = ".//input[@id=\"mailbox:login\"]") WebElement loginField; @FindBy(xpath = ".//input[@id=\"mailbox:password\"]") WebElement passwordField; @FindBy(xpath = ".//input[@class=\"o-control\"]") WebElement enterButton; @FindBy(xpath = "(.//span[@class=\"b-toolbar__btn__text b-toolbar__btn__text_pad\"])[1]") WebElement writeMailButton; @FindBy(xpath = ".//textarea[@tabindex=\"4\"]") WebElement adressMail; @FindBy(xpath = ".//span[@id=\"toolkit-155475240811541composeEditor_parent\"]") WebElement textMail; @FindBy(xpath = "(.//span[@class=\"b-toolbar__btn__text\"])[1]") WebElement sentMail; @FindBy(xpath = "(//*[contains(text(), \"Ваше\")])[1]") WebElement sentedMail; @FindBy(xpath = ".//iframe[@id=\"toolkit-155492255042142composeEditor_ifr\"]") WebElement frame; @FindBy(xpath = "(.//button[@class=\"btn btn_stylish btn_main confirm-ok\"])[2]") WebElement continueButton; private WebDriver driver; private WebDriverWait wait; public MailPage(WebDriver driver) { this.driver = driver; wait = new WebDriverWait(driver, 10); PageFactory.initElements(driver, this); } public void enterLoginAndPassword(String login, String password) { loginField.clear(); loginField.sendKeys(login); passwordField.clear(); passwordField.sendKeys(password); enterButton.click(); wait.until(ExpectedConditions.titleContains("Входящие")); } public void writeMail(String adress,String text) { writeMailButton.click(); adressMail.sendKeys(adress); // driver.switchTo().frame(frame); // continueButton.click(); // textMail.click(); // textMail.sendKeys(text); sentMail.click(); wait.until(ExpectedConditions.visibilityOfAllElements(continueButton)); continueButton.click(); wait.until(ExpectedConditions.visibilityOfAllElements(sentedMail)); } public boolean isSentedMailElementPresent() { return sentedMail.isDisplayed(); } }
[ "noreply@github.com" ]
RomanLosev.noreply@github.com
c6c655d4fc25d9984a59655b695d1386210ea9ba
41e88d1317cd221e1478466b8387ff9fcf99f123
/src/main/java/com/pruthvi/myservice/service/UserService.java
de52e25ae6b58d3b4ad382d54d7eee0005e0babc
[]
no_license
pruthvi-1012/myServiceApp
d6237e5baf9a6281787673cc0f1495975ac36add
c9428d60267bff15cca8a3ddcfc1afc2103f12eb
refs/heads/master
2020-03-08T12:51:56.094782
2018-04-05T00:13:53
2018-04-05T00:13:53
128,140,653
0
0
null
null
null
null
UTF-8
Java
false
false
12,058
java
package com.pruthvi.myservice.service; import com.pruthvi.myservice.config.CacheConfiguration; import com.pruthvi.myservice.domain.Authority; import com.pruthvi.myservice.domain.User; import com.pruthvi.myservice.repository.AuthorityRepository; import com.pruthvi.myservice.config.Constants; import com.pruthvi.myservice.repository.UserRepository; import com.pruthvi.myservice.repository.search.UserSearchRepository; import com.pruthvi.myservice.security.SecurityUtils; import com.pruthvi.myservice.service.dto.UserDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.CacheManager; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; /** * Service class for managing users. */ @Service @Transactional public class UserService { private final Logger log = LoggerFactory.getLogger(UserService.class); private final UserRepository userRepository; private final UserSearchRepository userSearchRepository; private final AuthorityRepository authorityRepository; private final CacheManager cacheManager; public UserService(UserRepository userRepository, UserSearchRepository userSearchRepository, AuthorityRepository authorityRepository, CacheManager cacheManager) { this.userRepository = userRepository; this.userSearchRepository = userSearchRepository; this.authorityRepository = authorityRepository; this.cacheManager = cacheManager; } /** * Update basic information (first name, last name, email, language) for the current user. * * @param firstName first name of user * @param lastName last name of user * @param email email id of user * @param langKey language key * @param imageUrl image URL of user */ public void updateUser(String firstName, String lastName, String email, String langKey, String imageUrl) { SecurityUtils.getCurrentUserLogin() .flatMap(userRepository::findOneByLogin) .ifPresent(user -> { user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); user.setLangKey(langKey); user.setImageUrl(imageUrl); userSearchRepository.save(user); cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).evict(user.getLogin()); cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).evict(user.getEmail()); log.debug("Changed Information for User: {}", user); }); } /** * Update all information for a specific user, and return the modified user. * * @param userDTO user to update * @return updated user */ public Optional<UserDTO> updateUser(UserDTO userDTO) { return Optional.of(userRepository .findOne(userDTO.getId())) .map(user -> { user.setLogin(userDTO.getLogin()); user.setFirstName(userDTO.getFirstName()); user.setLastName(userDTO.getLastName()); user.setEmail(userDTO.getEmail()); user.setImageUrl(userDTO.getImageUrl()); user.setActivated(userDTO.isActivated()); user.setLangKey(userDTO.getLangKey()); Set<Authority> managedAuthorities = user.getAuthorities(); managedAuthorities.clear(); userDTO.getAuthorities().stream() .map(authorityRepository::findOne) .forEach(managedAuthorities::add); userSearchRepository.save(user); cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).evict(user.getLogin()); cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).evict(user.getEmail()); log.debug("Changed Information for User: {}", user); return user; }) .map(UserDTO::new); } public void deleteUser(String login) { userRepository.findOneByLogin(login).ifPresent(user -> { userRepository.delete(user); userSearchRepository.delete(user); cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).evict(user.getLogin()); cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).evict(user.getEmail()); log.debug("Deleted User: {}", user); }); } @Transactional(readOnly = true) public Page<UserDTO> getAllManagedUsers(Pageable pageable) { return userRepository.findAllByLoginNot(pageable, Constants.ANONYMOUS_USER).map(UserDTO::new); } @Transactional(readOnly = true) public Optional<User> getUserWithAuthoritiesByLogin(String login) { return userRepository.findOneWithAuthoritiesByLogin(login); } @Transactional(readOnly = true) public Optional<User> getUserWithAuthorities(Long id) { return userRepository.findOneWithAuthoritiesById(id); } @Transactional(readOnly = true) public Optional<User> getUserWithAuthorities() { return SecurityUtils.getCurrentUserLogin().flatMap(userRepository::findOneWithAuthoritiesByLogin); } /** * @return a list of all the authorities */ public List<String> getAuthorities() { return authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()); } /** * Returns the user for a OAuth2 authentication. * Synchronizes the user in the local repository * * @param authentication OAuth2 authentication * @return the user from the authentication */ public UserDTO getUserFromAuthentication(OAuth2Authentication authentication) { Map<String, Object> details = (Map<String, Object>) authentication.getUserAuthentication().getDetails(); User user = getUser(details); Set<Authority> userAuthorities = extractAuthorities(authentication, details); user.setAuthorities(userAuthorities); // convert Authorities to GrantedAuthorities Set<GrantedAuthority> grantedAuthorities = userAuthorities.stream() .map(Authority::getName) .map(SimpleGrantedAuthority::new) .collect(Collectors.toSet()); UsernamePasswordAuthenticationToken token = getToken(details, user, grantedAuthorities); authentication = new OAuth2Authentication(authentication.getOAuth2Request(), token); SecurityContextHolder.getContext().setAuthentication(authentication); return new UserDTO(syncUserWithIdP(details, user)); } private User syncUserWithIdP(Map<String, Object> details, User user) { // save account in to sync users between IdP and JHipster's local database Optional<User> existingUser = userRepository.findOneByLogin(user.getLogin()); if (existingUser.isPresent()) { // if IdP sends last updated information, use it to determine if an update should happen if (details.get("updated_at") != null) { Instant dbModifiedDate = existingUser.get().getLastModifiedDate(); Instant idpModifiedDate = new Date(Long.valueOf((Integer) details.get("updated_at"))).toInstant(); if (idpModifiedDate.isAfter(dbModifiedDate)) { log.debug("Updating user '{}' in local database...", user.getLogin()); updateUser(user.getFirstName(), user.getLastName(), user.getEmail(), user.getLangKey(), user.getImageUrl()); } // no last updated info, blindly update } else { log.debug("Updating user '{}' in local database...", user.getLogin()); updateUser(user.getFirstName(), user.getLastName(), user.getEmail(), user.getLangKey(), user.getImageUrl()); } } else { log.debug("Saving user '{}' in local database...", user.getLogin()); userRepository.save(user); cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).evict(user.getLogin()); cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).evict(user.getEmail()); } return user; } private static UsernamePasswordAuthenticationToken getToken(Map<String, Object> details, User user, Set<GrantedAuthority> grantedAuthorities) { // create UserDetails so #{principal.username} works UserDetails userDetails = new org.springframework.security.core.userdetails.User(user.getLogin(), "N/A", grantedAuthorities); // update Spring Security Authorities to match groups claim from IdP UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken( userDetails, "N/A", grantedAuthorities); token.setDetails(details); return token; } private static Set<Authority> extractAuthorities(OAuth2Authentication authentication, Map<String, Object> details) { Set<Authority> userAuthorities; // get roles from details if (details.get("roles") != null) { userAuthorities = extractAuthorities((List<String>) details.get("roles")); // if roles don't exist, try groups } else if (details.get("groups") != null) { userAuthorities = extractAuthorities((List<String>) details.get("groups")); } else { userAuthorities = authoritiesFromStringStream( authentication.getAuthorities().stream() .map(GrantedAuthority::getAuthority) ); } return userAuthorities; } private static User getUser(Map<String, Object> details) { User user = new User(); user.setLogin((String) details.get("preferred_username")); if (details.get("given_name") != null) { user.setFirstName((String) details.get("given_name")); } if (details.get("family_name") != null) { user.setLastName((String) details.get("family_name")); } if (details.get("email_verified") != null) { user.setActivated((Boolean) details.get("email_verified")); } if (details.get("email") != null) { user.setEmail((String) details.get("email")); } if (details.get("langKey") != null) { user.setLangKey((String) details.get("langKey")); } else if (details.get("locale") != null) { String locale = (String) details.get("locale"); String langKey = locale.substring(0, locale.indexOf("-")); user.setLangKey(langKey); } if (details.get("picture") != null) { user.setImageUrl((String) details.get("picture")); } return user; } private static Set<Authority> extractAuthorities(List<String> values) { return authoritiesFromStringStream( values.stream().filter(role -> role.startsWith("ROLE_")) ); } private static Set<Authority> authoritiesFromStringStream(Stream<String> strings) { return strings .map(string -> { Authority auth = new Authority(); auth.setName(string); return auth; }).collect(Collectors.toSet()); } }
[ "pruthvi.raj1012@gmail.com" ]
pruthvi.raj1012@gmail.com
56a4bc531b07b823fd9c1f3d07d4a3af7f6cd147
5ed44f4d119f6a9d44326915e1d91ebef092ed32
/src/main/java/br/com/rafaelfaustini/minecraftrpg/config/GuiItemConfig.java
b364a8a46c71e785e1f4f1f97fe4688228388503
[]
no_license
Baruffi/minecraft-rpg
53891887965930acad55a10bab4dd513c16f3c59
d5f2208ea15ccae68f34ee33a957ec0b53567af1
refs/heads/master
2023-02-21T22:31:03.914381
2021-01-28T00:40:25
2021-01-28T00:40:25
330,801,287
2
0
null
2021-01-28T00:40:27
2021-01-18T22:24:57
Java
UTF-8
Java
false
false
885
java
package br.com.rafaelfaustini.minecraftrpg.config; import java.util.List; public class GuiItemConfig { private String key; private String displayName; private String material; private List<String> lore; public GuiItemConfig(String key) { this.key = key; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public String getMaterial() { return material; } public void setMaterial(String material) { this.material = material; } public List<String> getLore() { return lore; } public void setLore(List<String> lore) { this.lore = lore; } }
[ "42071700+Baruffi@users.noreply.github.com" ]
42071700+Baruffi@users.noreply.github.com
f8c447dd6cb7bcd37e67a926a671197224b0d0d4
5683ff94f1cb2697c0b9ff36b17974ad4c446cd0
/jpa-boot-01/src/main/java/com/mh/jpaboot01/model/Employee.java
aa767cb6baae9c856b29db5fd8e1019984db1b78
[]
no_license
smk86131/JPA
1a2d1db7d2c14bdbfafc54291b36a1535cb1bb1b
2bb2dbfb0232423674dac9ac24c45d9020e27391
refs/heads/main
2023-08-06T14:31:42.060675
2021-09-10T08:34:20
2021-09-10T08:34:20
405,011,402
0
0
null
null
null
null
UTF-8
Java
false
false
1,598
java
package com.mh.jpaboot01.model; import java.util.Objects; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; private String role; Employee() {} Employee(String name, String role) { this.name = name; this.role = role; } public Long getId() { return this.id; } public String getName() { return this.name; } public String getRole() { return this.role; } public void setId(Long id) { this.id = id; } public void setName(String name) { this.name = name; } public void setRole(String role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Employee)) return false; Employee employee = (Employee) o; return Objects.equals(this.id, employee.id) && Objects.equals(this.name, employee.name) && Objects.equals(this.role, employee.role); } @Override public int hashCode() { return Objects.hash(this.id, this.name, this.role); } @Override public String toString() { return "Employee{" + "id=" + this.id + ", name='" + this.name + '\'' + ", role='" + this.role + '\'' + '}'; } }
[ "noreply@github.com" ]
smk86131.noreply@github.com
84d143f94b31b4667137f75aa3133426625c04ff
4a80d5e1171f5f7d2fe34e0ffe72bd4ab02d6cc6
/app/src/main/java/com/manridy/iband/view/model/StepFragment.java
1bb14d055be08d9bc6acf78c59d6a760687a0234
[]
no_license
Catfeeds/iband
68b596f6a2fe5c73ad7f6ab53afa5fac3009753a
49224b6fcb3af9134b70b042df5947d94f3a08a3
refs/heads/master
2021-01-15T13:29:42.426791
2017-07-03T10:31:56
2017-07-03T10:31:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,859
java
package com.manridy.iband.view.model; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.github.mikephil.charting.charts.BarChart; import com.github.mikephil.charting.components.XAxis; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.data.BarData; import com.github.mikephil.charting.data.BarDataSet; import com.github.mikephil.charting.data.BarEntry; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.highlight.Highlight; import com.github.mikephil.charting.listener.OnChartValueSelectedListener; import com.google.gson.Gson; import com.manridy.applib.utils.CheckUtil; import com.manridy.applib.utils.SPUtil; import com.manridy.applib.utils.TimeUtil; import com.manridy.iband.IbandApplication; import com.manridy.iband.IbandDB; import com.manridy.iband.R; import com.manridy.iband.SyncData; import com.manridy.iband.bean.StepModel; import com.manridy.iband.common.AppGlobal; import com.manridy.iband.common.EventGlobal; import com.manridy.iband.common.EventMessage; import com.manridy.iband.ui.CircularView; import com.manridy.iband.ui.items.DataItems; import com.manridy.iband.view.TrainActivity; import com.manridy.iband.view.base.BaseEventFragment; import com.manridy.iband.view.history.StepHistoryActivity; import com.manridy.sdk.callback.BleNotifyListener; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import static com.manridy.applib.base.BaseActivity.isFastDoubleClick; /** * 计步 * Created by jarLiao on 2016/10/24. */ public class StepFragment extends BaseEventFragment { @BindView(R.id.cv_step) CircularView cvStep; @BindView(R.id.di_data1) DataItems diData1; @BindView(R.id.di_data2) DataItems diData2; @BindView(R.id.di_data3) DataItems diData3; @BindView(R.id.bc_step) BarChart bcStep; StepModel curStep; List<StepModel> curSectionSteps; Map<Integer,StepModel> curMap = new HashMap<>(); SimpleDateFormat hourFormat; int unit; @Override public View initView(LayoutInflater inflater, @Nullable ViewGroup container) { root = inflater.inflate(R.layout.fragment_step, container, false); ButterKnife.bind(this,root); return root; } @Override protected void initVariables() { hourFormat = new SimpleDateFormat("HH"); unit = (int) SPUtil.get(mContext, AppGlobal.DATA_SETTING_UNIT,0); initChartView(bcStep); initChartAxis(bcStep); } @Override protected void initListener() { IbandApplication.getIntance().service.watch.setSportNotifyListener(new BleNotifyListener() { @Override public void onNotify(Object o) { curStep = new Gson().fromJson(o.toString(),StepModel.class); SyncData.saveCurStep(curStep); EventBus.getDefault().post(new EventMessage(EventGlobal.REFRESH_VIEW_STEP)); } }); } @Override public void initData(Bundle savedInstanceState) { EventBus.getDefault().post(new EventMessage(EventGlobal.DATA_LOAD_STEP)); } @OnClick({ R.id.iv_menu,R.id.iv_history}) public void onClick(View view) { if (isFastDoubleClick()) return; switch (view.getId()) { case R.id.iv_history: startActivity(StepHistoryActivity.class); break; case R.id.iv_menu: startActivity(TrainActivity.class); break; } } @Subscribe(threadMode = ThreadMode.MAIN) public void onMainEvent(EventMessage event){ if (event.getWhat() == EventGlobal.REFRESH_VIEW_STEP) { setCircularView(); updateBarChartView(bcStep,curSectionSteps); setDataItem(); } } @Subscribe(threadMode = ThreadMode.BACKGROUND) public void onBackgroundEvent(EventMessage event){ if (event.getWhat() == EventGlobal.DATA_LOAD_STEP) { curStep = IbandDB.getInstance().getCurStep(); curSectionSteps = IbandDB.getInstance().getCurSectionStep(); EventBus.getDefault().post(new EventMessage(EventGlobal.REFRESH_VIEW_STEP)); }else if (event.getWhat() == EventGlobal.REFRESH_VIEW_ALL){ EventBus.getDefault().post(new EventMessage(EventGlobal.DATA_LOAD_STEP)); }else if (event.getWhat() == EventGlobal.DATA_CHANGE_UNIT){ unit = (int) SPUtil.get(mContext, AppGlobal.DATA_SETTING_UNIT,0); EventBus.getDefault().post(new EventMessage(EventGlobal.REFRESH_VIEW_STEP)); } } private void initChartView(BarChart chart) { chart.getDescription().setEnabled(false);//描述设置 chart.setNoDataText("");//无数据时描述 chart.setTouchEnabled(true);//可接触 chart.setDrawMarkers(true); chart.setDrawBorders(true); //是否在折线图上添加边框 chart.setDragEnabled(false);//可拖拽 chart.setScaleEnabled(false);//可缩放 chart.setDoubleTapToZoomEnabled(false);//双击移动 chart.setScaleYEnabled(false);//滑动 chart.setDrawGridBackground(false);//画网格背景 chart.setDrawBorders(false); //是否在折线图上添加边框 chart.setPinchZoom(false);//设置少量移动 chart.setOnChartValueSelectedListener(selectedListener); chart.getLegend().setEnabled(false); chart.setMaxVisibleValueCount(7); chart.setData(new BarData()); chart.setFitBars(true); } private void initChartAxis(BarChart chart) { XAxis xAxis = chart.getXAxis(); xAxis.setEnabled(true);//显示x轴 xAxis.setTextColor(Color.BLACK);//x轴文字颜色 xAxis.setTextSize(12f);//x轴文字大小 xAxis.setDrawGridLines(false);//取消网格线 xAxis.setDrawAxisLine(false);//取消x轴底线 xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);//x轴位置 xAxis.setDrawLabels(false); // xAxis.setAxisMinimum(1);//设置最小点 // xAxis.setCenterAxisLabels(true); // xAxis.setLabelCount(7, false); xAxis.setGranularity(1f);//设置间隔 YAxis yAxis = chart.getAxisLeft(); // yAxis.setAxisMaximum(220f); yAxis.setAxisMinimum(0);//设置y轴最小点 yAxis.setDrawAxisLine(false);//画坐标线 yAxis.setDrawLabels(false);//画坐标下标 yAxis.setDrawGridLines(false);//设置网格线 yAxis.setDrawZeroLine(false); yAxis.setEnabled(true);//显示Y轴 chart.getAxisRight().setEnabled(false);//不显示右侧 } private void updateBarChartView(BarChart chart, List<StepModel> stepList) { curMap = new HashMap<>(); // StepModel step = curStep; int hour = Integer.parseInt(hourFormat.format(new Date())); if (stepList == null ){ stepList = new ArrayList<>(); } List<BarEntry> barList = new ArrayList<>(); for (int i = 0; i < stepList.size(); i++) { StepModel stepModel = stepList.get(i); String format = hourFormat.format(stepModel.getStepDate()); int h = Integer.valueOf(format); // step.setStepNum((step.getStepNum() - stepModel.getStepNum())); // step.setStepMileage(step.getStepMileage() - stepModel.getStepMileage()); // step.setStepCalorie(step.getStepCalorie() - stepModel.getStepCalorie()); curMap.put(h,stepModel); } // if (step != null) { // curMap.put(hour,step); // curSteps = step.getStepNum(); // curKa = step.getStepCalorie(); // curMi = step.getStepMileage(); // } for (int i = 0; i < 24; i++) { int value = 0; if (curMap.containsKey( (i) )) { value = curMap.get((i)).getStepNum(); } barList.add( new BarEntry(i,value)); } BarData data = new BarData(getInitChartDataSet(barList, Color.parseColor("#8aff9800"), "set1")); if (chart.getData() != null) { chart.clearValues(); } // data.setBarWidth(0.35f); // data.groupBars(0,0.4f,0.00f); chart.setData(data); //判断数据数量 chart.notifyDataSetChanged(); chart.setVisibleXRangeMinimum(24); // chart.setVisibleXRangeMaximum(7); chart.moveViewToX(data.getEntryCount() - 24); } private BarDataSet getInitChartDataSet(List<BarEntry> entryList, int color, String label) { BarDataSet set = new BarDataSet(entryList, label);//初始化折线数据源 set.setColor(color);//折线颜色 set.setBarBorderWidth(0.4f);// set.setValueTextColor(Color.BLACK);//折线值文字颜色 set.setBarBorderColor(Color.TRANSPARENT); set.setValueTextSize(12f);//折线值文字大小 set.setDrawValues(false); return set; } private void setDataItem(){ if (curStep == null) return; int curSteps,curMi,curKa; curSteps =curStep.getStepNum(); curMi = curStep.getStepMileage(); curKa = curStep.getStepCalorie(); diData1.setItemData("步数",curSteps+""); String miUnit = unit == 1 ? "英里":"公里"; diData2.setItemData("里程",miToKm(curMi,unit),miUnit); diData3.setItemData("卡路里",curKa+""); } private void setCircularView(){ if (curStep == null) return; int target = (int) SPUtil.get(mContext, AppGlobal.DATA_SETTING_TARGET_STEP,8000); String step = curStep.getStepNum()+""; String miUnit = unit == 1 ? "英里":"公里"; String state = miToKm(curStep.getStepMileage(),unit)+miUnit+"/" +curStep.getStepCalorie()+"大卡"; float progress = (curStep.getStepNum() / (float)target) * 100; // cvStep.setProgressWithAnimation(progress); cvStep.setText(step) .setState(state) .setProgress(progress) .invaliDate(); } OnChartValueSelectedListener selectedListener = new OnChartValueSelectedListener() { @Override public void onValueSelected(Entry e, Highlight h) { int hour = e.getX() >0 ? (int) e.getX() : 0; // Log.d(TAG, "onValueSelected() called with: e = [" + e.getX() + "], h = [" + hour + "]"); if (curMap.containsKey(hour)) { StepModel stepModel = curMap.get(hour); int step = stepModel.getStepNum(); int ka = stepModel.getStepCalorie(); int mi = stepModel.getStepMileage(); String miUnit = unit == 1 ? "英里":"公里"; String timeTitle = TimeUtil.zero(hour)+":00~" + TimeUtil.zero(hour+1)+":00"; diData1.setItemData(timeTitle,step+""); diData2.setItemData("里程",miToKm(mi,unit),miUnit); diData3.setItemData("卡路里",ka+""); } } @Override public void onNothingSelected() { setDataItem(); } }; public String miToKm(int mi,int unit){ if (unit == 1) { return String .format("%.1f",CheckUtil.kmToMi(mi/1000.0)); } return String .format("%.1f",(mi/1000.0)); } }
[ "qwe996321@163.com" ]
qwe996321@163.com
baaeca55a9958342d4255cf41a81c7e8f7198355
ba0b52e8d74df19b7a1503f9b3f51bbf680adaa5
/A6_MEMBROS_STATICOS/src/Utils/Constants.java
4afaaa3a7c72d70e6b0ca93172d6f92523cdcb7d
[]
no_license
LucasMouraPereira/JavaCodes
a42843cd6f04e666e68bc932ecb30df5ba81c610
945d53d2f9dcd2c13d67eb2581fb9a978c449ff3
refs/heads/master
2022-11-24T21:09:46.773697
2020-07-29T16:49:13
2020-07-29T16:49:13
282,039,110
0
0
null
null
null
null
UTF-8
Java
false
false
211
java
package Utils; public class Constants { public static final double IOF = 0.06; public static double currency (double dollarNow, double qtdDollar ) { return dollarNow * qtdDollar * (1.0 + IOF); } }
[ "lucasmourap@gmail.com" ]
lucasmourap@gmail.com
f595c3d6278e5b536920ef7458e98152f0f3a152
259d12f315c4a02ec00b1ec59700f7efa23eabd6
/POST TEST/src/Praktikum1/Lingkaran.java
dea380dd63e3c4d4d649c3d191fed9bfebff1ba8
[]
no_license
nideeuw/POSTTEST---PRAKTIKUM
c24658c94e28adc259824e69c679dff3d26cb279
1d78fe4f74fb979d78b2d8b0daca700926a45b18
refs/heads/main
2023-03-21T19:43:25.168883
2021-03-03T00:55:43
2021-03-03T00:55:43
343,955,993
0
0
null
null
null
null
UTF-8
Java
false
false
2,415
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 Praktikum1; import java.util.Scanner; /** * * @author MOKLET-2 */ public class Lingkaran { int d,r; double phi = 3.14; void hitung (){ Scanner input = new Scanner (System.in); System.out.println("MENGHITUNG LUAS LINGKARAN"); System.out.println("Ingin menghitung menggunakan apa? Pilih angka dibawah ini"); System.out.println("1.Diameter"); System.out.println("2.Jari-jari (r)"); System.out.print("Pilihan Anda: "); int pilihan = input.nextInt(); switch (pilihan){ case 1: System.out.print("Masukkan nilai diameter: "); d = input.nextInt(); System.out.println("Apakah nilai diameter termasuk kelipatan tujuh? "); System.out.print("Jawab ya/tidak: "); String jawab = input.next(); if (jawab.equalsIgnoreCase("ya")){ System.out.println("Luas Lingkaran: "+d*d*1/4*22/7); } else if (jawab.equalsIgnoreCase("tidak")){ System.out.println("Luas Lingkaran: "+d*d*1/4*phi); } else{ System.out.println("Tidak termasuk dalam pilihan"); } break; case 2: System.out.print("Masukkan nilai jari-jari (r): "); r = input.nextInt(); System.out.println("Apakah nilai jari-jari (r) termasuk kelipatan tujuh? "); System.out.print("Jawab ya/tidak: "); String jawab1 = input.next(); if (jawab1.equalsIgnoreCase("ya")){ System.out.println("Luas Lingkaran: "+r*r*22/7); } else if (jawab1.equalsIgnoreCase("tidak")){ System.out.println("Luas Lingkaran: "+r*r*phi); } else{ System.out.println("Tidak termasuk dalam pilihan"); } break; default: System.out.println("Tidak ada dalam pilihan"); break; } } }
[ "noreply@github.com" ]
nideeuw.noreply@github.com
c0e9fb0e83617e67db9e850cee075d2edb92becc
72dff0f24f8f9ecfea96852ef184d1523057e65b
/EntradaYSalida2/src/entradaysalida2/EntradaYSalida2.java
cd7473a1d0a9795b639402644a0d5f67878396e4
[]
no_license
crjchfis/Programacion-1
ef974f7414a987846de62e5da7b5d4dd1273f524
44534ac258717ce75086d8597203aa82bc9d25be
refs/heads/master
2020-12-31T03:56:48.609738
2013-04-18T11:43:07
2013-04-18T11:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
775
java
package entradaysalida2; import java.io.*; //LEER Y ESCRIBIR DESDE ARCHIVO LINEAS public class EntradaYSalida2 { public static void main(String[] args) { String nombreArchivo="LeerArchivo.java"; FileReader archivo; BufferedReader filtro; String linea; try { archivo = new FileReader(nombreArchivo); filtro = new BufferedReader(archivo); linea = filtro.readLine(); while (linea != null) { System.out.println(linea); linea = filtro.readLine(); } filtro.close(); }catch (IOException e) { System.out.println("Imposible abrir el archivo para leer"); } } }
[ "aguerre.clavel.cristian@gmail.com" ]
aguerre.clavel.cristian@gmail.com
cf60eafb85cdd6bd811c614843536762920a86d1
324c8a13d0a702e2c334a5605b933d14f1d5aea4
/YuNiFang/app/src/main/java/com/fengmi/he/Activity/MainActivity.java
e0dce3620acc13132299e93bd2c777d26207b6ad
[]
no_license
hexiaowen1993/work
d271ec8bdd9c50bf33d6960c63356500b993dae4
c3a431693fd29f755adb5c6f85f6d36ef40a4b07
refs/heads/master
2021-01-19T02:12:00.158267
2017-05-03T23:29:46
2017-05-03T23:29:46
84,400,603
0
0
null
null
null
null
UTF-8
Java
false
false
1,171
java
package com.fengmi.he.Activity; import android.content.Intent; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import com.fengmi.he.R; public class MainActivity extends AppCompatActivity { int time=1; Handler handler=new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); if(msg.what==0){ if(time>0){ time--; handler.sendEmptyMessageDelayed(0,1000); }else{ Intent intent=new Intent(MainActivity.this,Zhu.class); startActivity(intent); finish(); //移除消息 handler.removeMessages(0); } } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView pic= (ImageView) findViewById(R.id.pic); handler.sendEmptyMessageDelayed(0,1000); } }
[ "975026412@qq.com" ]
975026412@qq.com
48263e726a3adb4150e5c95679fbce65cc8d54a9
62fe1c9e247f37421d090eff986716fa9b3cb35b
/java35/src/cn/edu360/javase35/day10/StringDemo3.java
0d1c4f6f760a318c4693ea5fcf2dd61358b27be6
[]
no_license
Crazyzhw/FirstDay
99ff5edbc87ed1cd17bf51e194cafca81859c706
990ac0cb3ead0ded7e0b3ba8fee7f74c7af7a27d
refs/heads/master
2020-03-23T00:05:28.732687
2018-07-15T11:09:33
2018-07-15T11:09:33
140,843,663
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package cn.edu360.javase35.day10; public class StringDemo3 { public static void main(String[] args) { String s = "abC"; String s1 = "AbC"; System.out.println(s.equalsIgnoreCase(s1)); String s3 = "abCdedAbC"; System.out.println(s3.contains(s)); System.out.println(s3.startsWith(s)); System.out.println(s3.endsWith(s1)); System.out.println(s3.isEmpty()); } }
[ "39932071+Crazyzhw@users.noreply.github.com" ]
39932071+Crazyzhw@users.noreply.github.com
9950a68dd586f8087c78cc31c199c9e9f043f6e9
b84a092d57cb0e44c3b5f8887ed2c091589f15ff
/chapter_2/Builders.java
ae136c0ebb19eada9d1706c72d400a584954abc8
[]
no_license
cgledezma1101/effective_java
c468420065eade975f04b0fa22e8199ce28b520a
6421ae5d20dfbc050000c4f2635459048b27d4bb
refs/heads/master
2020-03-09T21:52:30.805421
2018-04-23T06:56:27
2018-04-23T06:56:27
129,020,976
0
0
null
null
null
null
UTF-8
Java
false
false
3,441
java
public class Builders { public static void main(String[] args) { NutritionFactsTelescoping cocaColaTelescoping = new NutritionFactsTelescoping(240, 8, 100, 0, 35, 27); NutritionFactsBeans cocaColaBeans = new NutritionFactsBeans(); cocaColaB.setServingSize(240); cocaColaB.setServings(8); cocaColaB.setCalories(100); cocaColaB.setSodium(35); cocaColaB.setCarbs(27); NutritionFactsBuilder cocaColaBuilder = NutritionFactsBuilder .Builder(240, 8) .calories(100) .sodium(35) .carbs(27) .build(); } class NutritionFactsBuilder { private final int servingSize; private final int servings; private final int calories; private final int fat; private final int sodium; private final int carbohydrate; private NutritionFactsBuilder(Builder builder) { servingSize = builder.servingSize; servings = builder.servings; calories = builder.calories; fat = builder.fat; sodium = builder.sodium; carbohydrate = builder.carbohydrate; } public static class Builder { // Required parameters private final int servingSize; private final int servings; // Optional parameters - initialized to default values private int calories = 0; private int fat = 0; private int sodium = 0; private int carbohydrate = 0; public Builder(int servingSize, int servings) { this.servingSize = servingSize; this.servings = servings; } public Builder calories(int val) { calories = val; return this; } public Builder fat(int val) { fat = val; return this; } public Builder sodium(int val) { sodium = val; return this; } public Builder carbs(int val) { carbohydrate = val; return this; } public NutritionFactsBuilder build() { return new NutritionFactsBuilder(this); } } } class NutritionFactsTelescoping { private final int servingSize; private final int servings; private final int calories; private final int fat; private final int sodium; private final int carbohydrate; public NutritionFactsTelescoping(int servingSize, int servings) { this(servingSize, servings, 0); } public NutritionFactsTelescoping(int servingSize, int servings, int calories) { this(servingSize, servings, calories, 0); } public NutritionFactsTelescoping(int servingSize, int servings, int calories, int fat) { this(servingSize, servings, calories, fat, 0); } public NutritionFactsTelescoping(int servingSize, int servings, int calories, int fat, int sodium) { this(servingSize, servings, calories, fat, sodium, 0); } public NutritionFactsTelescoping(int servingSize, int servings, int calories, int fat, int sodium, int carbohydrate) { this.servingSize = servingSize; this.servings = servings; this.calories = calories; this.fat = fat; this.sodium = sodium; this.carbohydrate = carbohydrate; } } class NutritionFactsBeans { private int servingSize; private int servings; private int calories; private int fat; private int sodium; private int carbohydrate; public NutritionFactsBeans() { } // Setters public void setServingSize(int val) { servingSize = val; } public void setServings(int val) { servings = val; } public void setCalories(int val) { calories = val; } public void setFat(int val) { fat = val; } public void setSodium(int val) { sodium = val; } public void setCarbs(int val) { carbohydrate = val; } } }
[ "cgledezma1101@gmail.com" ]
cgledezma1101@gmail.com
18474fed16428f61b546011cb1b6cca185bdaf73
62f8fe861cb48a0eea23161209964ef88b8a3076
/onjava8/src/main/java/exceptions/CloseExceptions.java
c4e15d93717be712621e5aed54787f007ed5d116
[ "Apache-2.0" ]
permissive
funnycoding/java_learn
38201508bcd361db991294d57ce2ec62b348dc50
c6e7426360a09de954728d94fdee5a2be700fd92
refs/heads/master
2023-01-31T14:28:12.499747
2020-12-12T12:18:11
2020-12-12T12:18:11
250,736,453
0
0
Apache-2.0
2020-12-12T11:53:48
2020-03-28T07:18:06
Java
UTF-8
Java
false
false
1,063
java
package exceptions; /** * @author XuYanXin * @program OnJava8_Example * @description * @date 2020/2/27 4:18 下午 */ // CloseExceptions.java class CloseException extends Exception { } class Report2 implements AutoCloseable { String name = getClass().getSimpleName(); public Report2() { System.out.println("Creating: " + name); } @Override public void close() throws CloseException { // 声明抛出异常,但是实际没有抛出 System.out.println("Closing " + name); } } class Closer extends Report2 { @Override public void close() throws CloseException { // 覆写父类方法 抛出异常 super.close(); throw new CloseException(); } } public class CloseExceptions { public static void main(String[] args) throws CloseException { try ( final First first = new First(); final Closer closer = new Closer(); final Second second = new Second() ){ System.out.println("In body"); } } }
[ "funnycodingxu@gmail.com" ]
funnycodingxu@gmail.com
72e855d0e5f01e2fdd4a404f02bfa4f641fab2eb
58c368e9e119248173a1e2a5b5d857fcd52502fc
/src/main/java/com/cake/server/interceptor/AuthorityInterceptor.java
5c94f0fb672cca17efe64e3e071cef016f4d9bdb
[]
no_license
yanglinqiang/app-server
97796ab59e3474c823d2b2fdfee5e9d1bbe46208
719b9081ea4fe9e127f7825a49a2b2ed8ba1e36b
refs/heads/master
2020-03-08T03:31:15.822799
2018-04-03T10:47:15
2018-04-03T10:47:15
127,893,385
0
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
package com.cake.server.interceptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AuthorityInterceptor extends HandlerInterceptorAdapter { public final static Logger logger = LoggerFactory.getLogger(RecordLogInterceptor.class.getName()); /** * 调用controller之前调用 * * @return 如果为真则继续执行请求的方法, 如果为false则该请求将被阻断, 不会执行相应的controller方法 */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { //对参数进行验证 // return this.verifyParams(request); return true; } /** * 调用controller之后调用做日志记录用 */ @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { } }
[ "linqiang.yang@tendcloud.com" ]
linqiang.yang@tendcloud.com
f014c9ce682e6d0c9226ba5c593be8f9b114e564
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a044/A044564Test.java
3d7d846c4633bd4bfac0354530c17bf63246848e
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a044; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A044564Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
e0c081f88ece8c9d00a6b045cbcc8e77a5dddbf3
0704a8046c4e3603b40a8da2334ad08085a7b72b
/sveditor/plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/ops/SVDBCreatePreProcScannerOp.java
c2994bdf64b44afaf6ff5d45b741f8755ae22ad1
[]
no_license
stanlyliusu/sveditor
de31f8ba449a048283483c387d906a7352e471f9
1346b843f3ce0e044f6859159f0f4e44337f1e44
refs/heads/master
2021-01-18T00:27:27.661005
2016-05-16T17:05:04
2016-05-16T17:05:04
59,161,275
1
0
null
2016-05-19T00:37:50
2016-05-19T00:37:50
null
UTF-8
Java
false
false
1,124
java
package net.sf.sveditor.core.db.index.ops; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import net.sf.sveditor.core.db.index.ISVDBIndex; import net.sf.sveditor.core.db.index.ISVDBIndexInt; import net.sf.sveditor.core.db.index.ISVDBIndexOperation; import net.sf.sveditor.core.db.index.ISVDBIndexOperationRunner; import net.sf.sveditor.core.preproc.ISVPreProcessor; public class SVDBCreatePreProcScannerOp implements ISVDBIndexOperation { private String fPath; private ISVPreProcessor fPreProc; public SVDBCreatePreProcScannerOp(String path) { fPath = path; fPreProc = null; } @Override public void index_operation(IProgressMonitor monitor, ISVDBIndex index) { ISVDBIndexInt index_int = (ISVDBIndexInt)index; fPreProc = index_int.createPreProcScanner(fPath); } public static ISVPreProcessor op(ISVDBIndexOperationRunner runner, String path) { SVDBCreatePreProcScannerOp op = new SVDBCreatePreProcScannerOp(path); runner.execOp(new NullProgressMonitor(), op, true); return op.fPreProc; } }
[ "matt.ballance@gmail.com" ]
matt.ballance@gmail.com
13be1caa12bd3c685ab54f091a46bdb185c04cb6
4120e073a4b0b2c79870e3ab87b294f98f47d0be
/cached-events/src/main/java/com/rideaustin/service/ride/RideEventsBuilder.java
b433b8b8d6a759c6e50efbf2afc141b1e435e681
[ "MIT" ]
permissive
jyt109/server
8933281097303d14b5a329f0c679edea4fcd174b
24354717624c25b5d4faf0b7ea540e2742e8039f
refs/heads/master
2022-03-20T10:36:44.973843
2019-10-03T11:43:07
2019-10-03T11:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,493
java
package com.rideaustin.service.ride; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import javax.inject.Inject; import org.springframework.beans.factory.BeanFactory; import org.springframework.core.env.Environment; import org.springframework.stereotype.Service; import com.rideaustin.model.enums.RideStatus; import com.rideaustin.repo.dsl.RideDslRepository; import com.rideaustin.rest.exception.ServerError; import com.rideaustin.rest.model.RideEvents; import com.rideaustin.service.ride.events.CachedEventType; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class RideEventsBuilder { private final RideDslRepository rideDslRepository; private final BeanFactory beanFactory; private final Integer backDateThreshold; @Inject public RideEventsBuilder(RideDslRepository rideDslRepository, BeanFactory beanFactory, Environment environment) { this.beanFactory = beanFactory; this.backDateThreshold = environment.getProperty("ride.events_backdate_threshold", Integer.class, 86400); this.rideDslRepository = rideDslRepository; } public List<RideEvent> buildEvents(RideEvents rideEvents) { List<RideEvent> events = new ArrayList<>(); List<RideEventInfo> invalidEvents = new ArrayList<>(); Set<Long> validRides = new HashSet<>(); Set<Long> rideIds = rideEvents .getEvents() .stream() .map(m -> m.get("rideId")) .map(Long::valueOf) .collect(Collectors.toSet()); Map<Long, RideStatus> statuses = rideDslRepository.getStatuses(rideIds); for (Map<String, String> eventProperties : rideEvents.getEvents()) { try { RideEvent event = buildEvent(eventProperties); ValidationResult validationResult = validate(event, statuses, validRides); if (validationResult.isValid()) { events.add(event); } else { invalidEvents.add(new RideEventInfo(event, validationResult)); } } catch (Exception e) { log.error("Unknown event", e); } } if (!invalidEvents.isEmpty()) { log.error("Invalid events occurred: " + invalidEvents); } return events; } private RideEvent buildEvent(Map<String, String> rideEvent) throws ServerError { String event = rideEvent.get("eventType"); if (event == null || !Arrays.stream(CachedEventType.values()).map(CachedEventType::name).collect(Collectors.toSet()).contains(event)) { String errorMessage = String.format("Unknown ride event %s", event); log.warn(errorMessage); throw new ServerError(errorMessage); } else { CachedEventType eventType = CachedEventType.valueOf(event); Class<? extends RideEvent> eventClass = eventType.getEventClass(); return beanFactory.getBean(eventClass, rideEvent); } } private ValidationResult validate(RideEvent event, Map<Long, RideStatus> statuses, Set<Long> validRides) { if (validRides.contains(event.getRideId())) { return new ValidationResult(true); } final RideStatus status = statuses.get(event.getRideId()); if (RideStatus.TERMINAL_STATUSES.contains(status)) { return new ValidationResult(false, ValidationResult.Reason.IN_TERMINAL_STATUS, String.format("Ride is in terminal status %s, further event processing will be skipped", status)); } else { final ValidationResult timestampValidation = invalidTimestamp(event); if (!timestampValidation.isValid()) { return timestampValidation; } } validRides.add(event.getRideId()); return new ValidationResult(true); } private ValidationResult invalidTimestamp(RideEvent event) { Instant eventTimestamp = Instant.ofEpochMilli(event.getTimestamp()); boolean inFuture = eventTimestamp.isAfter(Instant.now()); if (inFuture) { return new ValidationResult(false, ValidationResult.Reason.TIMESTAMP_IN_FUTURE, String.format("Event has timestamp %s which is in future", eventTimestamp)); } boolean inPastBeforeThreshold = Duration.between(eventTimestamp, Instant.now()).getSeconds() > backDateThreshold; if (inPastBeforeThreshold) { return new ValidationResult(false, ValidationResult.Reason.TIMESTAMP_IN_PAST, String.format("Event has timestamp %s which is in past before threshold of %d seconds", eventTimestamp, backDateThreshold)); } return new ValidationResult(true); } @Getter @RequiredArgsConstructor private static class RideEventInfo { private final RideEvent event; private final ValidationResult validationResult; @Override public String toString() { return String.format("{event=%s, validationResult=%s}", event, validationResult); } } @Getter @RequiredArgsConstructor private static class ValidationResult { enum Reason { IN_TERMINAL_STATUS, TIMESTAMP_IN_FUTURE, TIMESTAMP_IN_PAST } private final boolean valid; private final Reason reason; private final String message; ValidationResult(boolean valid) { this.valid = valid; this.reason = null; this.message = null; } @Override public String toString() { return valid ? "Valid event" : String.format("Invalid event{reason=%s, message='%s'}", reason, message); } } }
[ "mikhail.chugunov@crossover.com" ]
mikhail.chugunov@crossover.com