blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 390 | content_id stringlengths 40 40 | detected_licenses listlengths 0 35 | license_type stringclasses 2 values | repo_name stringlengths 6 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 539 values | visit_date timestamp[us]date 2016-08-02 21:09:20 2023-09-06 10:10:07 | revision_date timestamp[us]date 1990-01-30 01:55:47 2023-09-05 21:45:37 | committer_date timestamp[us]date 2003-07-12 18:48:29 2023-09-05 21:45:37 | github_id int64 7.28k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 13 values | gha_event_created_at timestamp[us]date 2012-06-11 04:05:37 2023-09-14 21:59:18 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-28 02:39:21 ⌀ | gha_language stringclasses 62 values | src_encoding stringclasses 26 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 128 12.8k | extension stringclasses 11 values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 79 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f140deafbb345147094b906605b7e4cec15c4e2 | 0ac3db7e3a7f1b408f5f8f34bf911b1c7e7a4289 | /src/bone/server/server/datatables/PetTable.java | ab2cf74bc99f0102808de5f67a872d06ae141c6f | [] | no_license | zajako/lineage-jimin | 4d56ad288d4417dca92bc824f2d1b484992702e3 | d8148ac99ad0b5530be3c22e6d7a5db80bbf2e5e | refs/heads/master | 2021-01-10T00:57:46.449401 | 2011-10-05T22:32:33 | 2011-10-05T22:32:33 | 46,512,502 | 0 | 2 | null | null | null | null | UHC | Java | false | false | 7,475 | 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 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package bone.server.server.datatables;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import bone.server.L1DatabaseFactory;
import bone.server.server.model.Instance.L1NpcInstance;
import bone.server.server.templates.L1Pet;
import bone.server.server.utils.SQLUtil;
// Referenced classes of package bone.server.server:
// IdFactory
public class PetTable {
private static Logger _log = Logger.getLogger(PetTable.class.getName());
private static PetTable _instance;
private final HashMap<Integer, L1Pet> _pets = new HashMap<Integer, L1Pet>();
public static PetTable getInstance() {
if (_instance == null) {
_instance = new PetTable();
}
return _instance;
}
private PetTable() {
load();
}
private void load() {
Connection con = null;
PreparedStatement pstm = null;
ResultSet rs = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("SELECT * FROM pets");
rs = pstm.executeQuery();
L1Pet pet = null;
while (rs.next()) {
pet = new L1Pet();
int itemobjid = rs.getInt(1);
pet.set_itemobjid(itemobjid);
pet.set_objid(rs.getInt(2));
pet.set_npcid(rs.getInt(3));
pet.set_name(rs.getString(4));
pet.set_level(rs.getInt(5));
pet.set_hp(rs.getInt(6));
pet.set_mp(rs.getInt(7));
pet.set_exp(rs.getInt(8));
pet.set_lawful(rs.getInt(9));
pet.set_food(rs.getInt(10));
pet.set_foodtime(rs.getInt(11));
_pets.put(new Integer(itemobjid), pet);
}
} catch (SQLException e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(rs);
SQLUtil.close(pstm);
SQLUtil.close(con);
}
}
public void storeNewPet(L1NpcInstance pet, int objid, int itemobjid) {
L1Pet l1pet = new L1Pet();
l1pet.set_itemobjid(itemobjid);
l1pet.set_objid(objid);
l1pet.set_npcid(pet.getNpcTemplate().get_npcId());
l1pet.set_name(pet.getNpcTemplate().get_nameid());
l1pet.set_level(pet.getNpcTemplate().get_level());
l1pet.set_hp(pet.getMaxHp());
l1pet.set_mp(pet.getMaxMp());
l1pet.set_exp(750);
l1pet.set_lawful(0);
l1pet.set_food(0);
l1pet.set_foodtime(1200000);
_pets.put(new Integer(itemobjid), l1pet);
Connection con = null;
PreparedStatement pstm = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("INSERT INTO pets SET item_obj_id=?,objid=?,npcid=?,name=?,lvl=?,hp=?,mp=?,exp=?,lawful=?,food=?,foodtime=?");
pstm.setInt(1, l1pet.get_itemobjid());
pstm.setInt(2, l1pet.get_objid());
pstm.setInt(3, l1pet.get_npcid());
pstm.setString(4, l1pet.get_name());
pstm.setInt(5, l1pet.get_level());
pstm.setInt(6, l1pet.get_hp());
pstm.setInt(7, l1pet.get_mp());
pstm.setInt(8, l1pet.get_exp());
pstm.setInt(9, l1pet.get_lawful());
pstm.setInt(10, l1pet.get_food());
pstm.setInt(11, l1pet.get_foodtime());
pstm.execute();
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(pstm);
SQLUtil.close(con);
}
}
public void storePet(L1Pet pet) {
Connection con = null;
PreparedStatement pstm = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("UPDATE pets SET objid=?,npcid=?,name=?,lvl=?,hp=?,mp=?,exp=?,lawful=?,food=? WHERE item_obj_id=?");
pstm.setInt(1, pet.get_objid());
pstm.setInt(2, pet.get_npcid());
pstm.setString(3, pet.get_name());
pstm.setInt(4, pet.get_level());
pstm.setInt(5, pet.get_hp());
pstm.setInt(6, pet.get_mp());
pstm.setInt(7, pet.get_exp());
pstm.setInt(8, pet.get_lawful());
pstm.setInt(9, pet.get_food());
pstm.setInt(10, pet.get_itemobjid());
pstm.execute();
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(pstm);
SQLUtil.close(con);
}
}
public void storePetFoodTime(int id, int food, int foodtime) {
Connection con = null;
PreparedStatement pstm = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("UPDATE pets SET food=?,foodtime=? WHERE objid=?");
pstm.setInt(1, food);
pstm.setInt(2, foodtime);
pstm.setInt(3, id);
pstm.execute();
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(pstm);
SQLUtil.close(con);
}
}
public void deletePet(int itemobjid) {
Connection con = null;
PreparedStatement pstm = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
pstm = con.prepareStatement("DELETE FROM pets WHERE item_obj_id=?");
pstm.setInt(1, itemobjid);
pstm.execute();
} catch (SQLException e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(pstm);
SQLUtil.close(con);
}
_pets.remove(itemobjid);
}
/**
* Pets 테이블에 이미 이름이 존재할까를 돌려준다.
*
* @param nameCaseInsensitive
* 조사하는 애완동물의 이름. 대문자 소문자의 차이는 무시된다.
* @return 이미 이름이 존재하면 true
*/
public static boolean isNameExists(String nameCaseInsensitive) {
String nameLower = nameCaseInsensitive.toLowerCase();
Connection con = null;
PreparedStatement pstm = null;
ResultSet rs = null;
try {
con = L1DatabaseFactory.getInstance().getConnection();
/*
* 같은 이름을 찾는다. MySQL는 디폴트로 case insensitive인 싶은
* 본래 LOWER는 필요없지만, binary로 변경되었을 경우에 대비해.
*/
pstm = con.prepareStatement("SELECT item_obj_id FROM pets WHERE LOWER(name)=?");
pstm.setString(1, nameLower);
rs = pstm.executeQuery();
if (!rs.next()) { // 같은 이름이 없었다
return false;
}
if (PetTypeTable.getInstance().isNameDefault(nameLower)) { // 디폴트의 이름이라면 중복 하고 있지 않으면 간주한다
return false;
}
} catch (SQLException e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
SQLUtil.close(rs);
SQLUtil.close(pstm);
SQLUtil.close(con);
}
return true;
}
public L1Pet getTemplate(int itemobjid) {
return _pets.get(new Integer(itemobjid));
}
public L1Pet[] getPetTableList() {
return _pets.values().toArray(new L1Pet[_pets.size()]);
}
}
| [
"wlals1978@nate.com"
] | wlals1978@nate.com |
4a060d860f089136a669890291ff7fe01fd3978a | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-12584-2-4-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateStore_ESTest_scaffolding.java | 3c73917a0ae7327bfab2601c53cbfc5361b8f0cc | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 443 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 01 14:55:47 UTC 2020
*/
package com.xpn.xwiki.store;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiHibernateStore_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
c21ba354f9cea339fa8476ee617548ca84157a90 | 043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04 | /subject_systems/Struts2/src/struts-2.3.30/src/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/commons/CommonsLoggerFactory.java | c90a8c989d2d97e91fb04b795ed9b39c568468a9 | [] | no_license | MarceloLaser/arcade_console_test_resources | e4fb5ac4a7b2d873aa9d843403569d9260d380e0 | 31447aabd735514650e6b2d1a3fbaf86e78242fc | refs/heads/master | 2020-09-22T08:00:42.216653 | 2019-12-01T21:51:05 | 2019-12-01T21:51:05 | 225,093,382 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 129 | java | version https://git-lfs.github.com/spec/v1
oid sha256:e10e0da86f0007cb5d75f236edafc454ff83b86e468fe76a59b875a89b18dac3
size 1254
| [
"marcelo.laser@gmail.com"
] | marcelo.laser@gmail.com |
b198091eb78691c2d09fcf4caf0eeda05a73f33e | 35e656065008890f8b969dddb64189da6db82977 | /app/src/main/java/com/github/dachhack/sprout/levels/traps/SummoningTrap.java | be1edcd1966a5d76623c0681c140e0f422631e12 | [] | no_license | Smujb/harder-sprouted-pd | 52cc9809baabb17d42e7b60650fd1b89647224a7 | e3a8b7b94432a211cd2a26c4ea1e5cd9dfe67f13 | refs/heads/master | 2021-01-07T23:30:44.249813 | 2020-02-01T13:58:04 | 2020-02-01T13:58:04 | 241,845,803 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,560 | java | /*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.github.dachhack.sprout.levels.traps;
import java.util.ArrayList;
import com.github.dachhack.sprout.Dungeon;
import com.github.dachhack.sprout.actors.Actor;
import com.github.dachhack.sprout.actors.Char;
import com.github.dachhack.sprout.actors.mobs.Bestiary;
import com.github.dachhack.sprout.actors.mobs.Mob;
import com.github.dachhack.sprout.items.Heap;
import com.github.dachhack.sprout.items.wands.WandOfBlink;
import com.github.dachhack.sprout.levels.Level;
import com.github.dachhack.sprout.scenes.GameScene;
import com.watabou.utils.Random;
public class SummoningTrap {
private static final float DELAY = 2f;
private static final Mob DUMMY = new Mob() {
};
// 0x770088
public static void trigger(int pos, Char c) {
if (Dungeon.bossLevel()) {
return;
}
if (c != null) {
Actor.occupyCell(c);
}
int nMobs = 1;
if (Random.Int(2) == 0) {
nMobs++;
if (Random.Int(2) == 0) {
nMobs++;
}
}
// It's complicated here, because these traps can be activated in chain
ArrayList<Integer> candidates = new ArrayList<Integer>();
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
int p = pos + Level.NEIGHBOURS8[i];
if (Actor.findChar(p) == null
&& (Level.passable[p] || Level.avoid[p])) {
candidates.add(p);
}
}
ArrayList<Integer> respawnPoints = new ArrayList<Integer>();
while (nMobs > 0 && candidates.size() > 0) {
int index = Random.index(candidates);
DUMMY.pos = candidates.get(index);
Actor.occupyCell(DUMMY);
respawnPoints.add(candidates.remove(index));
nMobs--;
}
for (Integer point : respawnPoints) {
Mob mob = Bestiary.mob(Dungeon.depth);
mob.state = mob.WANDERING;
GameScene.add(mob, DELAY);
WandOfBlink.appear(mob, point);
}
Heap heap = Dungeon.level.heaps.get(pos);
if (heap != null) {heap.summon();}
}
}
| [
"smujamesb@gmail.com"
] | smujamesb@gmail.com |
e152aef1a8796af65b40d18d59f4f2e31a000c8a | 073bd1080450a4d20cff37ba6ccfd96ad8045c61 | /items-thinking-in-java/src/main/java/org/andy/items/thkinjava/string/Exercises/Ex8.java | f4ce644907d8b78ed4f887a2c3884966026978be | [] | no_license | zwz611/scattered-items | 3ec399a3241d2f97fc6b3fe0e648edf2523176e0 | 53eb3017d603efa8442c761523ac1b02df4027b9 | refs/heads/master | 2020-03-29T01:12:17.966862 | 2017-07-12T10:59:15 | 2017-07-12T10:59:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 445 | java | package org.andy.items.thkinjava.string.Exercises;
import org.andy.items.thkinjava.string.Splitting;
import org.andy.items.thkinjava.string.utils.Print;
import java.util.Arrays;
/**
* Happy day, happy life.
*
* @author andy
* @version 1.0-SNAPSHOT
* Created date: 2014-10-28 19:00
*/
public class Ex8 {
public static void main(String[] args) {
Print.ln(Arrays.toString(Splitting.knights.split("the|you")));
}
}
| [
"461857202@qq.com"
] | 461857202@qq.com |
8e90b4764131bbf9a50f8d538df0acb06e61c759 | c4f86ef2844f08d64b9e19e4667be12db88a2cd9 | /gui/src/main/java/org/jboss/as/console/client/shared/dispatch/ResponseProcessorFactory.java | b28efd890ac6046f169e255a33288d61c811f853 | [] | no_license | n1hility/console | c41a1bcdc0fee4331ff204f57a9f1417125b7d9f | d7b1f97d55f3a33aa3cb5ca0d6300dcf5248cb5b | refs/heads/master | 2021-01-18T22:32:41.799336 | 2012-02-10T20:58:34 | 2012-02-13T08:04:56 | 2,305,576 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 812 | java | package org.jboss.as.console.client.shared.dispatch;
import org.jboss.dmr.client.ModelNode;
/**
* @author Heiko Braun
* @date 1/17/12
*/
public class ResponseProcessorFactory {
public static ResponseProcessorFactory INSTANCE = new ResponseProcessorFactory();
// used before bootstrap completes
public static ResponseProcessor NOOP = new ResponseProcessor() {
@Override
public void process(ModelNode response) {
}
};
public static ResponseProcessor PROCESSOR = NOOP;
public ResponseProcessor create()
{
return PROCESSOR;
}
public void bootstrap(boolean isStandalone)
{
if(isStandalone)
PROCESSOR = new StandaloneResponseProcessor();
else
PROCESSOR = new DomainResponseProcessor();
}
}
| [
"ike.braun@googlemail.com"
] | ike.braun@googlemail.com |
3ba79340ea44dad9c0683ef220b659701f56aeec | 5112790f5d95201b511792621aec26ece97da0c6 | /portlet-tck_3.0/V2DispatcherTests3S/src/main/java/javax/portlet/tck/portlets/DispatcherTests3S_SPEC2_19_ForwardJSPEvent.java | 01f60b9b7aae9f58562c98cec7df0167e235bc56 | [
"Apache-2.0"
] | permissive | sfcoy/portals-pluto | 2cddeb578d1526ea4e02bf5435c5d3b9b43a52b1 | 2006d1e7d7cfd7af3824bf4d6a18bc5d36532f8d | refs/heads/master | 2021-01-18T04:36:42.903125 | 2014-08-14T13:20:48 | 2014-08-14T13:20:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,514 | 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 javax.portlet.tck.portlets;
import java.io.*;
import java.util.*;
import java.util.logging.*;
import static java.util.logging.Logger.*;
import javax.xml.namespace.QName;
import javax.portlet.*;
import javax.portlet.filter.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.portlet.tck.beans.*;
import javax.portlet.tck.constants.*;
import static javax.portlet.tck.beans.JSR286DispatcherTestCaseDetails.*;
import static javax.portlet.tck.constants.Constants.*;
import static javax.portlet.PortletSession.*;
import static javax.portlet.ResourceURL.*;
/**
* This portlet implements several test cases for the JSR 362 TCK. The test case names
* are defined in the /src/main/resources/xml-resources/additionalTCs.xml
* file. The build process will integrate the test case names defined in the
* additionalTCs.xml file into the complete list of test case names for execution by the driver.
*
* This is the main portlet for the test cases. If the test cases call for events, this portlet
* will initiate the events, but not process them. The processing is done in the companion
* portlet DispatcherTests3S_SPEC2_19_ForwardJSPEvent_event
*
*/
public class DispatcherTests3S_SPEC2_19_ForwardJSPEvent implements Portlet, ResourceServingPortlet {
private static final String LOG_CLASS =
DispatcherTests3S_SPEC2_19_ForwardJSPEvent.class.getName();
private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
private PortletConfig portletConfig = null;
@Override
public void init(PortletConfig config) throws PortletException {
this.portletConfig = config;
}
@Override
public void destroy() {
}
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
throws PortletException, IOException {
LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
Cookie c = new Cookie(COOKIE_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", COOKIE_VALUE);
c.setMaxAge(10);
portletResp.addProperty(c);
portletResp.addProperty(PROP_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", PROP_VALUE);
long tid = Thread.currentThread().getId();
portletReq.setAttribute("void", tid);
StringWriter writer = new StringWriter();
QName eventQName = new QName(TCKNAMESPACE,
"DispatcherTests3S_SPEC2_19_ForwardJSPEvent");
portletResp.setEvent(eventQName, "Hi!");
}
@Override
public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
throws PortletException, IOException {
LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
Cookie c = new Cookie(COOKIE_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", COOKIE_VALUE);
c.setMaxAge(10);
portletResp.addProperty(c);
portletResp.addProperty(PROP_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", PROP_VALUE);
long tid = Thread.currentThread().getId();
portletReq.setAttribute("void", tid);
PrintWriter writer = portletResp.getWriter();
}
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
throws PortletException, IOException {
LOGGER.entering(LOG_CLASS, "main portlet render entry");
Cookie c = new Cookie(COOKIE_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", COOKIE_VALUE);
c.setMaxAge(10);
portletResp.addProperty(c);
portletResp.addProperty(PROP_PREFIX +"DispatcherTests3S_SPEC2_19_ForwardJSPEvent", PROP_VALUE);
long tid = Thread.currentThread().getId();
portletReq.setAttribute("void", tid);
PrintWriter writer = portletResp.getWriter();
/* TestCase: V2DispatcherTests3S_SPEC2_19_ForwardJSPEvent_dispatch4 */
/* Details: "The parameters associated with a request dispatcher are */
/* scoped only for the duration of the include or forward call" */
{
PortletURL aurl = portletResp.createActionURL();
TestButton tb = new TestButton("V2DispatcherTests3S_SPEC2_19_ForwardJSPEvent_dispatch4", aurl);
tb.writeTo(writer);
}
/* TestCase: V2DispatcherTests3S_SPEC2_19_ForwardJSPEvent_invoke3 */
/* Details: "Parameters to the forward method for a target servlet */
/* can be wrapped request and response classes from the portlet */
/* lifecyle method initiating the include" */
{
PortletURL aurl = portletResp.createActionURL();
TestButton tb = new TestButton("V2DispatcherTests3S_SPEC2_19_ForwardJSPEvent_invoke3", aurl);
tb.writeTo(writer);
}
}
}
| [
"msnicklous@apache.org"
] | msnicklous@apache.org |
50048fb55f7fbe1a87b03906adb2c7242e2fb39f | 9786f73a11c62b4bf58c221ad984e00a125f944c | /src/Class16/Homework10.java | 0e35cd28d594353ee5da9429e39e03f3d4e59b74 | [] | no_license | sharmadeepak8616/Repo_Java | cd73fb24a0104879f28085e880774648def8af79 | c8e627736f4d2e3ddf02f64f2aa41f960d96e764 | refs/heads/master | 2021-07-15T09:10:45.409097 | 2021-01-13T02:24:48 | 2021-01-13T02:24:48 | 294,540,907 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | package Class16;
public class Homework10 {
/**
* Question 1:
* Create a method, that will return all duplicates values with count from the given List<String>
* List<String> words = {"happy", "peace", "joy", "grow", "joy", "laugh", "happy", "laugh", "joy"};
* Output:
* happy - 2
* joy - 3
* laugh - 2
*
*
* Question 2:
* Create a hashMap with any numbers of key-value pairs from the user
* Key should be Integer
* Value should be String
*
* Create method that will print the keys with same value, else "All keys have different values"
*
* Input to method -> [{101="happy"}, {102="peace"}, {103="Happy"}, {104="learn"}, {105="PEaCe"}, {106="HAPPY"}]
* Output (print) ->
* "happy" with keys -> 101, 103, 106
* "peace" with keys -> 102, 105
*
* Input to method -> [{111="happy"}, {98="peace"}, {10="LAugh"}, {55="learn"}, {101="Grow"}]
* Output (print) ->
* All keys have different values
*
*/
}
| [
"sharma.deepak8616@gmail.com"
] | sharma.deepak8616@gmail.com |
54bbbc0adaa50cb72950d7ea691f9e609e76e86d | 0857e94d17e6e0a01ec82530761fd73dc5be11e5 | /billing/src/main/java/net/robotmedia/billing/helper/AbstractBillingActivity.java | 00f72e5c819688a7327af8d4fdba255b3c3c3d1a | [
"Apache-2.0"
] | permissive | FlakyTestDetection/android-common | 634195e98de7d6cd3b938daa532c0be2ab4ee3aa | 8bc7bc5af88d36f9af488ca8e01391df3299d92b | refs/heads/master | 2021-01-20T06:38:32.480599 | 2017-09-11T12:34:05 | 2017-09-11T12:34:05 | 89,903,660 | 0 | 0 | null | 2017-05-01T06:46:29 | 2017-05-01T06:46:29 | null | UTF-8 | Java | false | false | 4,249 | java | /*
* Copyright 2013 serso aka se.solovyev
*
* 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.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Contact details
*
* Email: se.solovyev@gmail.com
* Site: http://se.solovyev.org
*/
package net.robotmedia.billing.helper;
import android.app.Activity;
import net.robotmedia.billing.BillingController;
import net.robotmedia.billing.BillingController.BillingStatus;
import net.robotmedia.billing.ResponseCode;
import net.robotmedia.billing.model.Transaction.PurchaseState;
import javax.annotation.Nonnull;
public abstract class AbstractBillingActivity extends Activity implements BillingController.IConfiguration {
protected AbstractBillingObserver mBillingObserver;
/**
* Returns the billing status. If it's currently unknown, requests to check
* if billing is supported and
* {@link net.robotmedia.billing.helper.AbstractBillingActivity#onBillingChecked(boolean)} should be
* called later with the result.
*
* @return the current billing status (unknown, supported or unsupported).
* @see net.robotmedia.billing.helper.AbstractBillingActivity#onBillingChecked(boolean)
*/
public BillingStatus checkBillingSupported() {
return BillingController.checkBillingSupported(this);
}
public abstract void onBillingChecked(boolean supported);
@Override
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBillingObserver = new AbstractBillingObserver(this) {
@Override
public void onCheckBillingSupportedResponse(boolean supported) {
AbstractBillingActivity.this.onBillingChecked(supported);
}
@Override
public void onPurchaseIntentFailure(@Nonnull String productId, @Nonnull ResponseCode responseCode) {
}
@Override
public void onPurchaseStateChanged(@Nonnull String productId, @Nonnull PurchaseState state) {
AbstractBillingActivity.this.onPurchaseStateChanged(productId, state);
}
@Override
public void onRequestPurchaseResponse(@Nonnull String productId, @Nonnull ResponseCode response) {
AbstractBillingActivity.this.onRequestPurchaseResponse(productId, response);
}
@Override
public void onErrorRestoreTransactions(@Nonnull ResponseCode responseCode) {
// ignore errors when restoring transactions
}
};
BillingController.registerObserver(mBillingObserver);
BillingController.setConfiguration(this); // This activity will provide
// the public key and salt
this.checkBillingSupported();
if (!mBillingObserver.isTransactionsRestored()) {
BillingController.restoreTransactions(this);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
BillingController.unregisterObserver(mBillingObserver); // Avoid
// receiving
// notifications after
// destroy
BillingController.setConfiguration(null);
}
public abstract void onPurchaseStateChanged(String productId, PurchaseState state);
;
public abstract void onRequestPurchaseResponse(String productId, ResponseCode response);
/**
* Requests the purchase of the specified item. The transaction will not be
* confirmed automatically; such confirmation could be handled in
* {@link net.robotmedia.billing.helper.AbstractBillingActivity#onPurchaseExecuted(String)}. If automatic
* confirmation is preferred use
* {@link BillingController#requestPurchase(android.content.Context, String, boolean)}
* instead.
*
* @param productId id of the item to be purchased.
*/
public void requestPurchase(String productId) {
BillingController.requestPurchase(this, productId);
}
/**
* Requests to restore all transactions.
*/
public void restoreTransactions() {
BillingController.restoreTransactions(this);
}
}
| [
"se.solovyev@gmail.com"
] | se.solovyev@gmail.com |
e508d48171257d6da1202a69e1d2c7bb18fea10d | 1a4c03c69eeafdeac1c2d4267a2953fc62081602 | /java.corba/com/sun/corba/se/PortableActivationIDL/ServerAlreadyUninstalledHelper.java | 8495b1a8e7c5b4510cee14e77effb54981678d83 | [] | no_license | senchzzZ/source-jdk9 | 593dbb872a7960a262efd5762713eec4045c5c84 | c46ca2e7e9c3286e0609ecc2696407f62be88d44 | refs/heads/master | 2021-01-25T13:23:38.272084 | 2018-04-02T11:23:59 | 2018-04-02T11:23:59 | 123,562,262 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,915 | java | package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/ServerAlreadyUninstalledHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from t:/workspace/corba/src/java.corba/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Tuesday, December 19, 2017 6:18:15 PM PST
*/
abstract public class ServerAlreadyUninstalledHelper
{
private static String _id = "IDL:PortableActivationIDL/ServerAlreadyUninstalled:1.0";
public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
_tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
_tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.ServerIdHelper.id (), "ServerId", _tcOf_members0);
_members0[0] = new org.omg.CORBA.StructMember (
"serverId",
_tcOf_members0,
null);
__typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.id (), "ServerAlreadyUninstalled", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled read (org.omg.CORBA.portable.InputStream istream)
{
com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled value = new com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled ();
// read and discard the repository ID
istream.read_string ();
value.serverId = istream.read_string ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled value)
{
// write the repository ID
ostream.write_string (id ());
ostream.write_string (value.serverId);
}
}
| [
"zhaoshengqi@passiontec.com"
] | zhaoshengqi@passiontec.com |
1f2f705fc805251b5fd5c1f5809ec13d5b717350 | 254fdb8729b639fd0fb9896364d0e89186521b6a | /LintCode/Majority Number.java | b61559e82830066c1a6525687da4be4c25969d17 | [] | no_license | jiangxf/java_interview | 99e9601aefa058a2465946803ad348ffb91f804e | 1a1794689d7a977464e7e47a994140de67cf56be | refs/heads/master | 2020-04-08T14:54:06.386481 | 2018-12-04T06:03:31 | 2018-12-04T06:03:31 | 159,456,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,888 | java | 与 Single Number 的解题思路相同,都用到了 抵消 的思想。
Single Number 利用 XOR 运算实现了相同数字的抵消,最后得到需要的那个数字。
而我们这里这需要求占了超过了数组一半的数字。
所以我们仍然利用 抵消 的思想:
取两个数,若这两个数相等,则 count++
否则将这两个数remove,count--.
因为Majority Number 至少占一半以上,所以必定会被剩下。(数量多就是任性...随便 remvoe 都不怕)
Majority Number II,超1/3,那么就分三份处理,三三不同的话抵消,countA,countB来计算最多出现的两个。
Majority Number III,超1/k,那么自然分k份.这里用到 HashMap.
/*
Description
Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it.
Notice
You may assume that the array is non-empty and the majority number always exist in the array.
Example
Given [1, 1, 1, 1, 2, 2, 2], return 1
Challenge
O(n) time and O(1) extra space
Tags
Greedy LintCode Copyright Enumeration Zenefits
*/
public class Solution {
/*
* @param nums: a list of integers
* @return: find a majority number
*/
public int majorityNumber(List<Integer> nums) {
// count 作用为计算当前情况下(抵消之后的)还剩下的相同数字的数目
// candidate 作用为储存当前情况下相同的数字
int count = 0;
int candidate = -1;
for (int i : nums) {
if (candidate == i) {
count++;
} else {
if (count == 0) {
candidate = i;
count = 1;
} else {
count--;
}
}
}
return candidate;
}
}
| [
"jiangxiaofeng@simuyun.com"
] | jiangxiaofeng@simuyun.com |
6537e62c5ffd3a401fc18df5205e2ba2e3627140 | 777d41c7dc3c04b17dfcb2c72c1328ea33d74c98 | /app/src/main/java/com/wmlive/hhvideo/widget/StatusView.java | 275b8f69e28a2eac63591be5f41b9a0baf561067 | [] | no_license | foryoung2018/videoedit | 00fc132c688be6565efb373cae4564874f61d52a | 7a316996ce1be0f08dbf4c4383da2c091447c183 | refs/heads/master | 2020-04-08T04:56:42.930063 | 2018-11-25T14:27:43 | 2018-11-25T14:27:43 | 159,038,966 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,161 | java | package com.wmlive.hhvideo.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.wmlive.hhvideo.utils.MyClickListener;
import cn.wmlive.hhvideo.R;
/**
* 页面状态
* Created by lsq on 12/15/2016.
*/
public class StatusView extends FrameLayout {
private ImageView mIvPagePic;
private ProgressBar mPbLoading;
private TextView mTvPageInfo;
private Button mBtPageOperate;
private OptionClickListener mOptionClickListener;
public static final int STATUS_NORMAL = 0; //页面正常
public static final int STATUS_LOADING = 1; //页面加载
public static final int STATUS_EMPTY = 2; //页面为空
public static final int STATUS_ERROR = 3; //页面出错
public static StatusView createStatusView(Context context) {
return new StatusView(context);
}
public StatusView setOptionClickListener(OptionClickListener clickListener) {
mOptionClickListener = clickListener;
return this;
}
public StatusView(Context context) {
this(context, null);
}
public StatusView(Context context, AttributeSet attrs) {
super(context, attrs);
initView(context);
}
private void initView(Context context) {
LinearLayout statusPage = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.view_status_page, null);
mIvPagePic = (ImageView) statusPage.findViewById(R.id.iv_page_pic);
mPbLoading = (ProgressBar) statusPage.findViewById(R.id.pb_loading);
mTvPageInfo = (TextView) statusPage.findViewById(R.id.tv_page_info);
mBtPageOperate = (Button) statusPage.findViewById(R.id.bt_page_operate);
addView(statusPage);
}
/**
* 显示其他非数据页面
*
* @param status 0:数据正常,1:正在加载,2:页面为空,3:页面出错
* @param message
*/
public void showStatusPage(int status, String message) {
this.setVisibility(status != STATUS_NORMAL ? View.VISIBLE : View.GONE);
if (status != STATUS_NORMAL) {
mPbLoading.setVisibility(status == STATUS_LOADING ? View.VISIBLE : View.GONE);
mTvPageInfo.setVisibility(status != STATUS_ERROR ? View.VISIBLE : View.GONE);
mTvPageInfo.setText(message);
mBtPageOperate.setVisibility(status == STATUS_ERROR ? View.VISIBLE : View.GONE);
mIvPagePic.setVisibility(status != STATUS_LOADING ? View.VISIBLE : View.GONE);
mBtPageOperate.setOnClickListener(new MyClickListener() {
@Override
protected void onMyClick(View v) {
if (mOptionClickListener != null) {
mOptionClickListener.onOptionClick(v);
}
}
});
}
}
public interface OptionClickListener {
void onOptionClick(View view);
}
}
| [
"1184394624@qq.com"
] | 1184394624@qq.com |
d6e21d45948a2e97758020f8d3ab06784de270bb | 14958b9a960b30fcb146f2c7f05ba7dc37472491 | /crnk-client/src/test/java/io/crnk/client/PageNumberSizeClientTest.java | 82d166eb23d71e5b4f2852dc016c40a51d66d423 | [
"Apache-2.0"
] | permissive | macleodbroad-wf/crnk-framework | 15ef0e742df556ef980159784cb71c1a0f348876 | 00fc807a8a66fbc18513960d5bb012402a0329f0 | refs/heads/master | 2020-08-07T02:02:32.275912 | 2019-10-06T08:47:00 | 2019-10-06T08:47:00 | 213,251,940 | 0 | 0 | Apache-2.0 | 2019-10-06T22:13:08 | 2019-10-06T22:13:08 | null | UTF-8 | Java | false | false | 3,262 | java | package io.crnk.client;
import com.fasterxml.jackson.databind.JsonNode;
import io.crnk.core.resource.meta.JsonLinksInformation;
import io.crnk.core.queryspec.QuerySpec;
import io.crnk.core.queryspec.mapper.DefaultQuerySpecUrlMapper;
import io.crnk.core.queryspec.pagingspec.NumberSizePagingBehavior;
import io.crnk.core.queryspec.pagingspec.NumberSizePagingSpec;
import io.crnk.core.queryspec.pagingspec.OffsetLimitPagingSpec;
import io.crnk.core.repository.ResourceRepository;
import io.crnk.core.resource.annotations.JsonApiResource;
import io.crnk.core.resource.list.ResourceList;
import io.crnk.test.mock.models.Schedule;
import io.crnk.test.mock.models.Task;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.io.Serializable;
public class PageNumberSizeClientTest extends AbstractClientTest {
@Before
public void setup() {
super.setup();
DefaultQuerySpecUrlMapper urlMapper = (DefaultQuerySpecUrlMapper) client.getUrlMapper();
urlMapper.setAllowUnknownAttributes(true);
}
@Override
protected TestApplication configure() {
TestApplication app = new TestApplication();
app.getFeature().addModule(NumberSizePagingBehavior.createModule());
return app;
}
@Override
protected void setupClient(CrnkClient client) {
client.addModule(NumberSizePagingBehavior.createModule());
}
@Test
public void testDefault() {
ResourceRepository<Schedule, Serializable> repo = client.getRepositoryForType(Schedule.class);
for (int i = 100; i < 120; i++) {
Schedule schedule = new Schedule();
schedule.setName("someSchedule" + i);
repo.create(schedule);
}
QuerySpec querySpec = new QuerySpec(Schedule.class);
querySpec.setPaging(new NumberSizePagingSpec(2, 5));
ResourceList<Schedule> list = repo.findAll(querySpec);
Assert.assertEquals(5, list.size());
Schedule schedule = list.get(0);
Assert.assertEquals("someSchedule105", schedule.getName());
String url = client.getServiceUrlProvider().getUrl();
JsonLinksInformation links = list.getLinks(JsonLinksInformation.class);
JsonNode firstLink = links.asJsonNode().get("first");
Assert.assertNotNull(firstLink);
Assert.assertEquals(url + "/schedules?page[number]=1&page[size]=5", firstLink.asText());
}
@Test
public void testOffsetLimitInteroperablity() {
JsonApiResource annotation = Task.class.getAnnotation(JsonApiResource.class);
Assert.assertEquals(OffsetLimitPagingSpec.class, annotation.pagingSpec());
ResourceRepository<Task, Serializable> repo = client.getRepositoryForType(Task.class);
for (int i = 100; i < 120; i++) {
Task task = new Task();
task.setName("someTask" + i);
repo.create(task);
}
QuerySpec querySpec = new QuerySpec(Schedule.class);
querySpec.setPaging(new NumberSizePagingSpec(2, 5));
ResourceList<Task> list = repo.findAll(querySpec);
Assert.assertEquals(5, list.size());
Task task = list.get(0);
Assert.assertEquals("someTask105", task.getName());
String url = client.getServiceUrlProvider().getUrl();
JsonLinksInformation links = list.getLinks(JsonLinksInformation.class);
JsonNode firstLink = links.asJsonNode().get("first");
Assert.assertNotNull(firstLink);
Assert.assertEquals(url + "/tasks?page[number]=1&page[size]=5", firstLink.asText());
}
} | [
"remo.meier.ch@gmail.com"
] | remo.meier.ch@gmail.com |
77390ec34646bc9ff4fd61ef1c04c543a68b8dbd | 497dc3519e3831681756986d1e40ee92953c0970 | /app/src/main/java/com/coolweather/android/gson/Forecast.java | 18c2153a2d52fe96c4d9babf567192bd3f254e60 | [
"Apache-2.0"
] | permissive | dunken2003/coolweather | 1ef0fe499e2646fde651a59dc037c9b491b5a1ce | fde54223a7db3edda01708f88598919f3c48a05a | refs/heads/master | 2020-06-26T07:24:39.464608 | 2019-07-31T06:20:54 | 2019-07-31T06:20:54 | 199,567,737 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 475 | java | package com.coolweather.android.gson;
import com.google.gson.annotations.SerializedName;
public class Forecast {
public String date;
@SerializedName("tmp")
public Temperature temperature;
@SerializedName("cond")
public More more;
public class Temperature {
public String max;
public String min;
}
public class More {
@SerializedName("txt_d")
public String info;
}
}
| [
"tony@gmail.com"
] | tony@gmail.com |
105e9b24b67d7302de01c7c6403dd2a5a52c6996 | afab90e214f8cb12360443e0877ab817183fa627 | /bitcamp-project/v00 (old data)/v16/src/main/java/com/eomcs/lms/handler/MemberList.java | 443337620d06c5c6af09ab7c0800ea4093f6d653 | [] | no_license | oreoTaste/bitcamp-study | 40a96ef548bce1f80b4daab0eb650513637b46f3 | 8f0af7cd3c5920841888c5e04f30603cbeb420a5 | refs/heads/master | 2020-09-23T14:47:32.489490 | 2020-05-26T09:05:40 | 2020-05-26T09:05:40 | 225,523,347 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 995 | java | package com.eomcs.lms.handler;
import java.util.Arrays;
import com.eomcs.lms.domain.Member;
public class MemberList {
Member[] list;
int size = 0;
static final int DEFAULT_CAPACITY = 100;
public MemberList() {
this.list = new Member[DEFAULT_CAPACITY];
}
public MemberList(int capacity) {
if(capacity < DEFAULT_CAPACITY || capacity > 100_000)
this.list = new Member[DEFAULT_CAPACITY];
else
this.list = new Member[capacity];
}
/////////////////////////////////////////////////////////////////////////////////////
public void add(Member mem) {
if(this.list.length == size) {
int oldCapacity = this.list.length;
int newCapacity = oldCapacity + (oldCapacity >> 1);
this.list = Arrays.copyOf(this.list, newCapacity);
}
this.list[this.size++] = mem;
}
/////////////////////////////////////////////////////////////////////////////////////
public Member[] toArray() {
return Arrays.copyOf(this.list, size);
}
}
| [
"youngkuk.sohn@gmail.com"
] | youngkuk.sohn@gmail.com |
fcf8afe34ea93ed6840c79da6f2fe82a40b26750 | f20fdd6814c2b3310e320b1e2437971aa0330ff8 | /app/src/main/java/tbc/techbytecare/kk/touristguideproject/Database/DBHelper.java | 51423780ef74ad4693276e04625087a94d9fb7ea | [] | no_license | UncagedMist/TGProject | 7fa6f1ceeda46929fe6745d1fd34f3d4e59fcf01 | f839b23ae5ba7af1e47671eee6b6e4eb9562d496 | refs/heads/master | 2020-03-11T20:04:12.318573 | 2018-04-19T14:16:36 | 2018-04-19T14:16:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,602 | java | package tbc.techbytecare.kk.touristguideproject.Database;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import java.util.ArrayList;
public class DBHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "MyDatabase.db";
public static final String TRANS_TABLE_NAME = "transact";
public static final String TRANS_COLUMN_SENDER = "sender";
public static final String TRANS_COLUMN_RECEIVER = "receiver";
public static final String TRANS_COLUMN_AMOUNT = "amount";
public static final String WALLET_TABLE_NAME = "wallet";
public static final String WALLET_COLUMN_NUMBER = "number";
public static final String WALLET_COLUMN_CASH = "cash";
public DBHelper(Context context) {
super(context, DATABASE_NAME , null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(
"create table transact " +
"(id integer primary key, sender text,receiver text,amount text)"
);
db.execSQL(
"create table wallet " +
"(id integer primary key, number text,cash text)"
);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS transact");
db.execSQL("DROP TABLE IF EXISTS wallet");
onCreate(db);
}
public boolean insertContact (String sender, String receiver, String amount) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("sender", sender);
contentValues.put("receiver", receiver);
contentValues.put("amount", amount);
db.insert("transact", null, contentValues);
return true;
}
public boolean insertWallet (String number, String cash) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("number", number);
contentValues.put("cash", cash);
db.insert("wallet", null, contentValues);
return true;
}
public Cursor getTransData(int id) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from transact where id="+id+"", null );
return res;
}
public Cursor getWalletData(int id) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from wallet where id="+id+"", null );
return res;
}
public int getWalletId(String number) throws SQLException
{
SQLiteDatabase db = this.getReadableDatabase();
long recc=0;
String rec=null;
Cursor mCursor = db.rawQuery(
"SELECT id FROM wallet WHERE number= '"+number+"'" , null);
if (mCursor != null)
{
mCursor.moveToFirst();
recc=mCursor.getLong(0);
rec=String.valueOf(recc);
}
return Integer.parseInt(rec);
}
public boolean isPhonePresent(String phone) {
ArrayList arrayList = getAllWallets();
for(int i=0;i<arrayList.size();i+=2)
if(arrayList.get(i).equals(phone))
return true;
return false;
}
public boolean updateWallet (Integer id, String number, String cash) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("number", number);
contentValues.put("cash", cash);
db.update("wallet", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
return true;
}
public Integer deleteTrans (Integer id) {
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("transact",
"id = ? ",
new String[] { Integer.toString(id) });
}
public Integer deleteWallet (Integer id) {
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("wallet",
"id = ? ",
new String[] { Integer.toString(id) });
}
public ArrayList<String> getAllTransactions() {
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from transact", null );
res.moveToFirst();
while(res.isAfterLast() == false){
array_list.add(res.getString(res.getColumnIndex(TRANS_COLUMN_SENDER)));
array_list.add(res.getString(res.getColumnIndex(TRANS_COLUMN_RECEIVER)));
array_list.add(res.getString(res.getColumnIndex(TRANS_COLUMN_AMOUNT)));
res.moveToNext();
}
return array_list;
}
public ArrayList<String> getAllWallets() {
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from wallet", null );
res.moveToFirst();
while(res.isAfterLast() == false){
array_list.add(res.getString(res.getColumnIndex(WALLET_COLUMN_NUMBER)));
array_list.add(res.getString(res.getColumnIndex(WALLET_COLUMN_CASH)));
res.moveToNext();
}
return array_list;
}
}
| [
"Kundan_kk52@outlook.com"
] | Kundan_kk52@outlook.com |
3245ad0b430e8e1446612c33184ab996a3ed73f8 | 4e660ecd8dfea06ba2f530eb4589bf6bed669c0c | /src/org/tempuri/GetAllJyzhmxResponse.java | 0949849d4a877ab697a5f5e7dc42532e745a2548 | [] | no_license | zhangity/SANMEN | 58820279f6ae2316d972c1c463ede671b1b2b468 | 3f5f7f48709ae8e53d66b30f9123aed3bcc598de | refs/heads/master | 2020-03-07T14:16:23.069709 | 2018-03-31T15:17:50 | 2018-03-31T15:17:50 | 127,522,589 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,975 | java | /**
* GetAllJyzhmxResponse.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.tempuri;
public class GetAllJyzhmxResponse implements java.io.Serializable {
private org.tempuri.ReturnExTable getAllJyzhmxResult;
public GetAllJyzhmxResponse() {
}
public GetAllJyzhmxResponse(
org.tempuri.ReturnExTable getAllJyzhmxResult) {
this.getAllJyzhmxResult = getAllJyzhmxResult;
}
/**
* Gets the getAllJyzhmxResult value for this GetAllJyzhmxResponse.
*
* @return getAllJyzhmxResult
*/
public org.tempuri.ReturnExTable getGetAllJyzhmxResult() {
return getAllJyzhmxResult;
}
/**
* Sets the getAllJyzhmxResult value for this GetAllJyzhmxResponse.
*
* @param getAllJyzhmxResult
*/
public void setGetAllJyzhmxResult(org.tempuri.ReturnExTable getAllJyzhmxResult) {
this.getAllJyzhmxResult = getAllJyzhmxResult;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof GetAllJyzhmxResponse)) return false;
GetAllJyzhmxResponse other = (GetAllJyzhmxResponse) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.getAllJyzhmxResult==null && other.getGetAllJyzhmxResult()==null) ||
(this.getAllJyzhmxResult!=null &&
this.getAllJyzhmxResult.equals(other.getGetAllJyzhmxResult())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getGetAllJyzhmxResult() != null) {
_hashCode += getGetAllJyzhmxResult().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(GetAllJyzhmxResponse.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">GetAllJyzhmxResponse"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("getAllJyzhmxResult");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "GetAllJyzhmxResult"));
elemField.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", "ReturnExTable"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"dzyuting@163.com"
] | dzyuting@163.com |
c4d7c924ae5f271caad8511bebf6726516686b83 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14122-30-25-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/xar/internal/handler/packager/Packager_ESTest.java | 87825ae0d5d4d22856e64c05ec0c9b67375a8cdd | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 572 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 12:23:25 UTC 2020
*/
package org.xwiki.extension.xar.internal.handler.packager;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Packager_ESTest extends Packager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
731ae89c1f13741386782f16b8d9d4afa36f8102 | d915e3731c617def360cd2aa959e186436c66505 | /copy/sm-shop/src/main/java/com/efairway/shop/application/config/LocalLocationImageConfig.java | a4af49dfa19b78e4c37c5dde9a8aa5f18a66569e | [
"Apache-2.0"
] | permissive | saksham-sarkar/efairway-Repository | 95e125e64ed31d6c137f49d538c228e77b8a62fe | 58d2af25f5a89ab59f36c230836b6a943d57713d | refs/heads/master | 2022-07-31T05:04:46.591012 | 2019-12-19T10:20:02 | 2019-12-19T10:20:02 | 228,995,097 | 0 | 0 | null | 2022-07-15T21:08:01 | 2019-12-19T07:01:28 | Java | UTF-8 | Java | false | false | 641 | java | package com.efairway.shop.application.config;
import com.efairway.shop.utils.ImageFilePath;
import com.efairway.shop.utils.LocalImageFilePathUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
//@Profile({"default","docker","gcp","firebase"})
public class LocalLocationImageConfig {
@Bean
public ImageFilePath img() {
LocalImageFilePathUtils localImageFilePathUtils = new LocalImageFilePathUtils();
localImageFilePathUtils.setBasePath("/images");
// localImageFilePathUtils.setBasePath("/static");
return localImageFilePathUtils;
}
}
| [
"saksham.sarkar2791@gmail.com"
] | saksham.sarkar2791@gmail.com |
5f505b4f943a5a540847e64e889101e930bd206f | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/io/reactivex/subscribers/ResourceSubscriber.java | 726ec797a81a3afb10375a0f4e2268636553253e | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,867 | java | package io.reactivex.subscribers;
import io.reactivex.FlowableSubscriber;
import io.reactivex.disposables.Disposable;
import io.reactivex.internal.disposables.ListCompositeDisposable;
import io.reactivex.internal.functions.ObjectHelper;
import io.reactivex.internal.subscriptions.SubscriptionHelper;
import io.reactivex.internal.util.EndConsumerHelper;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import org.reactivestreams.Subscription;
public abstract class ResourceSubscriber<T> implements FlowableSubscriber<T>, Disposable {
public final AtomicReference<Subscription> a = new AtomicReference<>();
public final ListCompositeDisposable b = new ListCompositeDisposable();
public final AtomicLong c = new AtomicLong();
public final void add(Disposable disposable) {
ObjectHelper.requireNonNull(disposable, "resource is null");
this.b.add(disposable);
}
@Override // io.reactivex.disposables.Disposable
public final void dispose() {
if (SubscriptionHelper.cancel(this.a)) {
this.b.dispose();
}
}
@Override // io.reactivex.disposables.Disposable
public final boolean isDisposed() {
return this.a.get() == SubscriptionHelper.CANCELLED;
}
public void onStart() {
request(Long.MAX_VALUE);
}
@Override // io.reactivex.FlowableSubscriber, org.reactivestreams.Subscriber
public final void onSubscribe(Subscription subscription) {
if (EndConsumerHelper.setOnce(this.a, subscription, getClass())) {
long andSet = this.c.getAndSet(0);
if (andSet != 0) {
subscription.request(andSet);
}
onStart();
}
}
public final void request(long j) {
SubscriptionHelper.deferredRequest(this.a, this.c, j);
}
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
d41252bc58c28c4fa971cda11ed4ced63d42a153 | 52e9164c0077fbcf7d09f9ab801f588adc7cada3 | /springdemo/src/main/java/com/springdemo/scheduletask/task/People.java | 7c4d84b6ed84e4427b8d2853019b73a74a101727 | [] | no_license | wherowsj/testframwork | aa33ac16786a40106f54b8f22742135e790a4c15 | 1493149b4b0caf1692270d17c703193231421635 | refs/heads/master | 2022-06-13T01:35:32.239505 | 2020-04-11T07:17:53 | 2020-04-11T07:17:53 | 262,540,048 | 1 | 0 | null | 2020-05-09T09:53:02 | 2020-05-09T09:53:01 | null | UTF-8 | Java | false | false | 1,222 | java | package com.springdemo.scheduletask.task;
import java.util.Collection;
public abstract class People {
public abstract String name();
public abstract void work();
public void startADay() {
System.out.println("wake up ..drunk milke ,have breakfast...");
}
public void makeMoney() {
System.out.println("make money.....");
}
public void endAday() {
System.out.println("end of a day.....");
}
public void acion(Action... actions) {
for (Action e : actions) {
action(e);
}
}
private void action(Action e) {
switch (e) {
case WAKE_UP:
startADay();
break;
case SLEEP:
endAday();
break;
case MAKE_MONEY:
makeMoney();
break;
case GO_HOME:
goHome();
break;
default:
System.out.println("there is no action defined");
break;
}
}
public void goHome() {
System.out.println("go home......");
}
;
enum Action {
WAKE_UP, MAKE_MONEY, SLEEP, GO_HOME;
}
}
| [
"719203729@qq.com"
] | 719203729@qq.com |
1c06a7e6263a3c11877331da3b0fe895b0aa40bf | 77f672fc6405ecbff714b0418737d143c8604267 | /Day_06/src/banyuan/com/B.java | 80f36e1d58e0604cb90778bf640ad5796a6681ea | [] | no_license | chou120/chunqiu | 553f05a5e7429f7ef33243daca5ebab53c4ab843 | 5e115ecb30df675b959d9048ef260b4435543dbb | refs/heads/master | 2020-09-22T08:02:17.226507 | 2020-05-13T08:24:27 | 2020-05-13T08:24:27 | 225,113,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 161 | java | package banyuan.com;
public abstract class B implements InterfaceDemo{
@Override
public void eat(){
System.out.println("----");
}
}
| [
"1208160221@qq.com"
] | 1208160221@qq.com |
a63777cffd206a864a6f64645d760f73104d7979 | 963599f6f1f376ba94cbb504e8b324bcce5de7a3 | /sources/com/yandex/metrica/impl/p039ob/C4194vg.java | de47e8967808b1fa9edad0cfc33eabfb135b2127 | [] | no_license | NikiHard/cuddly-pancake | 563718cb73fdc4b7b12c6233d9bf44f381dd6759 | 3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4 | refs/heads/main | 2023-04-09T06:58:04.403056 | 2021-04-20T00:45:08 | 2021-04-20T00:45:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 180 | java | package com.yandex.metrica.impl.p039ob;
/* renamed from: com.yandex.metrica.impl.ob.vg */
public interface C4194vg {
/* renamed from: a */
void mo39414a(C4193vf vfVar);
}
| [
"a.amirovv@mail.ru"
] | a.amirovv@mail.ru |
ac0286ba400f2670b1511661f84ca8203f34ce7d | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_b1c40a19e266e67c0b936eb02532e5d1ef140ede/Sequence/29_b1c40a19e266e67c0b936eb02532e5d1ef140ede_Sequence_s.java | 108bc69518d38cd91ca0e79ba4e74763e43fa7e5 | [] | 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 | 235 | java | package io.seq;
import java.io.Serializable;
class Sequence implements Serializable {
String header;
String value;
@Override
public String toString() {
return String.format(">%s|%s", header, value);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
786c155f1ae8bfebe6022b64e6dd5dedf4a7b6b7 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes5.dex_source_from_JADX/com/facebook/common/numbers/FileSizeUtil.java | 59be9ef1a7b749b4e8e4e349e4985d6b708feee9 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 689 | java | package com.facebook.common.numbers;
import android.content.res.Resources;
import com.facebook.common.android.ResourcesMethodAutoProvider;
import com.facebook.inject.InjectorLike;
import javax.inject.Inject;
/* compiled from: alarm_manager_fix_enabled */
public class FileSizeUtil {
public final Resources f11100a;
public static FileSizeUtil m19098b(InjectorLike injectorLike) {
return new FileSizeUtil(ResourcesMethodAutoProvider.a(injectorLike));
}
@Inject
public FileSizeUtil(Resources resources) {
this.f11100a = resources;
}
public static FileSizeUtil m19097a(InjectorLike injectorLike) {
return m19098b(injectorLike);
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
e309787dba4905f6f6d665845bc3a2c7feb0bf93 | 59269e6549dd6c9d5a752e69591f3d5d11702e07 | /ezyfox-bean/src/test/java/com/tvd12/ezyfox/bean/testing/prototype1/ClassC.java | 854596bb57536185b573bdbbe6d935df5de3a801 | [
"Apache-2.0"
] | permissive | trungthao1989/ezyfox | 7d51e2eb7fa1de30d1b4185496e618a919ee88d4 | 88885d4ba61c79c6da791aff0b9229dc59ddb271 | refs/heads/master | 2020-05-26T12:25:59.843302 | 2019-05-21T17:14:54 | 2019-05-21T17:14:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 375 | java | package com.tvd12.ezyfox.bean.testing.prototype1;
import com.tvd12.ezyfox.annotation.EzyKeyValue;
import com.tvd12.ezyfox.bean.annotation.EzyPrototype;
@EzyPrototype(value = "hello", properties = {
@EzyKeyValue(key = "type", value = "request_listener"),
@EzyKeyValue(key = "cmd", value = "2"),
@EzyKeyValue(key = "priority", value = "-1")
})
public class ClassC {
}
| [
"itprono3@gmail.com"
] | itprono3@gmail.com |
e77592bd31b3fb949b8ae33031d0a9d9d81db16e | f1a5cf469b0512c1fbbcc4ca878eed0f124e3120 | /rong-parent/rong-console/rong-funds-service/src/main/java/com/rong/sys/module/query/TsDictionary.java | ab5646224acdf6694062d0035f740f4f40226d73 | [] | no_license | ShineDreamCatcher/JavaProject | aba9737156e9d197cbe1421dab2a0bdac36bbbde | 4a64939ed77074ba0fb7ce6fb9cd4b310ab85023 | refs/heads/master | 2022-12-30T03:19:23.592240 | 2020-04-26T07:06:42 | 2020-04-26T07:06:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package com.rong.sys.module.query;
import com.rong.common.module.QueryInfo;
import com.rong.sys.module.entity.TbDictionary;
import lombok.Data;
@Data
public class TsDictionary extends QueryInfo<TbDictionary> {
public enum Fields {
id,
createDate,
updateDate,
deltag,
state,
sort,
type,
key,
value,
description,
valueType;
}
} | [
"favor_zlx@163.com"
] | favor_zlx@163.com |
d2d20c6e5be4c1c6e0a80cf70779369089207984 | eeb50e718d07116f4f0c8b6a6f79a5649bc896ca | /qidao-api-service-model/src/main/java/com/qidao/application/model/common/oss/RegionCodeFilter.java | 6d5c666378e4d1603a7d024469cbe848e078ab95 | [] | no_license | tzbgithub/keqidao2 | b161c3f7edc578bc9d70dd74a69785d150e048b1 | 6d3bc986a81b732b55d30e961773fd87b7dead14 | refs/heads/master | 2023-04-22T09:19:43.860468 | 2021-05-10T05:12:02 | 2021-05-10T05:12:02 | 365,924,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 701 | java | package com.qidao.application.model.common.oss;
import java.util.ArrayList;
import java.util.List;
class RegionCodeFilter {
private static List<String> blackList = new ArrayList<String>(3);
synchronized static String convert(String region) {
if (blackList.contains(region) || region == null || region.length() < 1) {
return getDefaultRegion();
}
return region;
}
synchronized static boolean block(String region) {
if (region.equals(getDefaultRegion())) {
return false;
}
blackList.add(region);
return true;
}
private static String getDefaultRegion() {
return "ap-shanghai";
}
} | [
"564858834@qq.com"
] | 564858834@qq.com |
ae69988d9c70f7f04063499e87917b2f5fdaec36 | 99f3951bd06f70769cfd4c9b48f902eadd60679c | /shop-core/src/main/java/com/enation/app/shop/trade/model/enums/ReceiptType.java | 078599bee426828948feed5714ddd0f4bbe4305c | [] | no_license | chenzijin6/java-shop | de8e47c8616386421098d7819ba6e3947cb219f2 | e21c6cd3c7ec3e90a3a6fcddcd78847f926931e0 | refs/heads/master | 2020-12-02T00:40:24.875439 | 2018-01-25T22:33:37 | 2018-01-25T22:33:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 449 | java | package com.enation.app.shop.trade.model.enums;
/**
* 发票类型
* @author fk
* @version v6.4
* @since v6.4
* 2017年10月20日 下午3:39:00
*/
public enum ReceiptType {
PERSON("个人"),
COMPANY("单位");
private String description;
ReceiptType(String _description){
this.description=_description;
}
public String description(){
return this.description;
}
public String value(){
return this.name();
}
}
| [
"king0ver@yeah.net"
] | king0ver@yeah.net |
eee645b87676341e4e924c4529471f40187104f0 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/validation/com/hazelcast/query/impl/extractor/specification/ExtractionInListSpecTest.java | 0ead32deb211354eee4348e0242ea2864445dbec | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 7,305 | java | /**
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.query.impl.extractor.specification;
import com.hazelcast.config.InMemoryFormat;
import com.hazelcast.query.Predicates;
import com.hazelcast.query.QueryException;
import com.hazelcast.query.impl.extractor.AbstractExtractionSpecification;
import com.hazelcast.query.impl.extractor.AbstractExtractionTest;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static com.hazelcast.query.impl.extractor.AbstractExtractionSpecification.Expected.empty;
import static com.hazelcast.query.impl.extractor.AbstractExtractionSpecification.Expected.of;
/**
* Specification test that verifies the behavior of corner-cases extraction in collections ONLY.
* <p/>
* Extraction mechanism: IN-BUILT REFLECTION EXTRACTION
* <p/>
* This test is parametrised on two axes (see the parametrisationData() method):
* - in memory format
* - indexing
*/
@RunWith(Parameterized.class)
@Category({ QuickTest.class, ParallelTest.class })
public class ExtractionInListSpecTest extends AbstractExtractionTest {
private static final ComplexTestDataStructure.Person BOND = ComplexTestDataStructure.person("Bond", ComplexTestDataStructure.limb("left-hand", ComplexTestDataStructure.tattoos(), ComplexTestDataStructure.finger("thumb"), ComplexTestDataStructure.finger(null)), ComplexTestDataStructure.limb("right-hand", ComplexTestDataStructure.tattoos("knife"), ComplexTestDataStructure.finger("middle"), ComplexTestDataStructure.finger("index")));
private static final ComplexTestDataStructure.Person KRUEGER = ComplexTestDataStructure.person("Krueger", ComplexTestDataStructure.limb("linke-hand", ComplexTestDataStructure.tattoos("bratwurst"), ComplexTestDataStructure.finger("Zeigefinger"), ComplexTestDataStructure.finger("Mittelfinger")), ComplexTestDataStructure.limb("rechte-hand", ComplexTestDataStructure.tattoos(), ComplexTestDataStructure.finger("Ringfinger"), ComplexTestDataStructure.finger("Daumen")));
private static final ComplexTestDataStructure.Person HUNT_NULL_TATTOOS = ComplexTestDataStructure.person("Hunt", ComplexTestDataStructure.limb("left", null, new ComplexTestDataStructure.Finger[]{ }));
private static final ComplexTestDataStructure.Person HUNT_NULL_LIMB = ComplexTestDataStructure.person("Hunt");
public ExtractionInListSpecTest(InMemoryFormat inMemoryFormat, AbstractExtractionSpecification.Index index, AbstractExtractionSpecification.Multivalue multivalue) {
super(inMemoryFormat, index, multivalue);
}
@Test
public void size_property() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_.size", 2), mv), of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER));
}
@Test
public void size_property_atLeaf() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[0].tattoos_.size", 1), mv), of(ExtractionInListSpecTest.KRUEGER));
}
@Test
public void null_collection_size() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_LIMB), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[0].fingers_.size", 1), mv), empty());
}
@Test
public void null_collection_size_compared_to_null() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_LIMB), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[0].fingers_.size", null), mv), of(ExtractionInListSpecTest.HUNT_NULL_LIMB));
}
@Test
public void null_collection_size_reduced() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_LIMB), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[any].fingers_.size", 1), mv), empty());
}
@Test
public void null_collection_size_reduced_compared_to_null() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_LIMB), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[any].fingers_.size", null), mv), of(ExtractionInListSpecTest.HUNT_NULL_LIMB));
}
@Test
public void null_collection_size_atLeaf() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[0].tattoos_.size", 1), mv), empty());
}
@Test
public void null_collection_size_atLeaf_compared_to_null() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[0].tattoos_.size", null), mv), of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS));
}
@Test
public void null_collection_size_atLeaf_reduced() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[any].tattoos_.size", 1), mv), empty());
}
@Test
public void null_collection_size_atLeaf_reduced_compared_to_null() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS), AbstractExtractionSpecification.Query.of(Predicates.equal("limbs_[any].tattoos_.size", null), mv), of(ExtractionInListSpecTest.HUNT_NULL_TATTOOS));
}
@Test
public void indexOutOfBound_notExistingProperty() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER), AbstractExtractionSpecification.Query.of(equal("limbs_[100].sdafasdf", "knife"), mv), of(QueryException.class));
}
@Test
public void indexOutOfBound_notExistingProperty_notAtLeaf() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER), AbstractExtractionSpecification.Query.of(equal("limbs_[100].sdafasdf.zxcvzxcv", "knife"), mv), of(QueryException.class));
}
@Test
public void indexOutOfBound_atLeaf_notExistingProperty() {
execute(AbstractExtractionSpecification.Input.of(ExtractionInListSpecTest.BOND, ExtractionInListSpecTest.KRUEGER), AbstractExtractionSpecification.Query.of(equal("limbs_[0].fingers_[100].asdfas", "knife"), mv), of(QueryException.class));
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
56af7df8721672355c2404d5d05cb9afa25c16a1 | 233e63710e871ef841ff3bc44d3660a0c8f8564d | /trunk/gameserver/src/gameserver/restrictions/RestrictionPriority.java | 6aae3ffb8b72916a7778ef756a390b371902e4bc | [] | no_license | Wankers/Project | 733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6 | da6db42f127d5970522038971a8bebb76baa595d | refs/heads/master | 2016-09-06T10:46:13.768097 | 2012-08-01T23:19:49 | 2012-08-01T23:19:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | /*
* This file is part of Aion Extreme Emulator <aion-core.net>.
*
* Aion Extreme Emulator is a 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.
*
* Aion Extreme Emulator 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 Aion Extreme Emulator. If not, see <http://www.gnu.org/licenses/>.
*/
package gameserver.restrictions;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author NB4L1
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface RestrictionPriority {
public static final double DEFAULT_PRIORITY = 0.0;
double value() default DEFAULT_PRIORITY;
}
| [
"sylvanodu14gmail.com"
] | sylvanodu14gmail.com |
a4f57c5424d4888be0279fb0acaeaaaaa689fa83 | 0d430563d908de7cda867380b6fe85e77be11c3d | /workspace/practise java/DataStructures/Graphs.java | 01c26d078d2767cf98e06403dc7c11e0d312714a | [] | no_license | hshar89/MyCodes | e2eec3b9a2649fec04e5b391d0ca3d4d9d5ae6dc | e388f005353c9606873b6cafdfce1e92d13273e7 | refs/heads/master | 2022-12-23T00:36:01.951137 | 2020-04-03T13:39:22 | 2020-04-03T13:39:22 | 252,720,397 | 1 | 0 | null | 2022-12-16T00:35:41 | 2020-04-03T12:04:10 | Java | UTF-8 | Java | false | false | 3,176 | java | package DataStructures;
import java.util.*;
import java.util.LinkedList;
class count{
int countPaths;
public count(){
countPaths = 0;
}
}
public class Graphs {
private int V;
private ArrayList<ArrayList<Integer>> adj;
Graphs(int V){
this.V = V;
this.adj = new ArrayList<ArrayList<Integer>>(V);
for(int i=0;i<V;i++){
adj.add(new ArrayList<Integer>());
}
}
void addEdge(int v, int u){
adj.get(v).add(u);
}
void DFS(int v){
boolean visited[] = new boolean[V];
DFSUtil(v,visited);
}
void DFSUtil(int v, boolean[] visited){
visited[v] = true;
System.out.print(v+" ");
Iterator<Integer> i = adj.get(v).iterator();
while(i.hasNext()){
int n = i.next();
if(!visited[n]){
DFSUtil(n,visited);
}
}
}
void BFS(){
boolean visited[] = new boolean[V];
for(int i=0;i<V;i++){
if(visited[i] == false)
BFSUtil(i,visited);
}
}
void BFSUtil(int v, boolean[] visited){
visited[v] = true;
Queue<Integer> q = new LinkedList<Integer>();
q.add(v);
while(!q.isEmpty()){
int s = q.remove();
System.out.print(s+" ");
for(int i=0;i<adj.get(s).size();i++){
int node = adj.get(s).get(i);
if(!visited[node]){
q.add(node);
visited[node] = true;
}
}
}
}
//Util method to Count number of paths from source to destination
static void countPathsUtil(ArrayList<ArrayList<Integer>> list, int s, int d, boolean ancestor[],count c1){
Iterator<Integer> itr = list.get(s).iterator();
//Keep a track of ancestors so that circular loop does not happen
ancestor[s] = true;
while(itr.hasNext()){
int a = itr.next();
if(!ancestor[a]){
countPathsUtil(list,a,d,ancestor,c1);
}
}
//If current source equals destination increase count
if(s == d){
c1.countPaths++;
}
//mark ancestor false once work is done
ancestor[s] = false;
}
static int countPaths(ArrayList<ArrayList<Integer>> list, int s, int d)
{
// add your code here
if(d>list.size() || s<0 || s>list.size() || d<0){
return 0;
}
boolean ancestor[] = new boolean[list.size()+1];
count c1 = new count();
for(int i=0;i<list.size();i++){
ancestor[i] = false;
}
countPathsUtil(list,s,d,ancestor,c1);
return c1.countPaths;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Graphs g = new Graphs(5);
g.addEdge(0, 1);
g.addEdge(1, 0);
g.addEdge(0, 2);
g.addEdge(2, 0);
g.addEdge(1, 2);
g.addEdge(2, 1);
g.addEdge(2, 3);
g.addEdge(3, 2);
g.addEdge(3, 4);
g.addEdge(4, 3);
g.addEdge(1, 4);
g.addEdge(4, 1);
g.addEdge(1, 3);
g.addEdge(3, 1);
System.out.println("Following is Depth First Traversal "+
"(starting from vertex 2)");
g.DFS(2);
System.out.println("\nFollowing is Breadth First Traversal ");
g.BFS();
}
}
| [
"harshsharma3@deloitte.com"
] | harshsharma3@deloitte.com |
1924e941aa1b724ad24ad7e8740b5a953ba561e5 | 58a0495674943c94d8391a677eaa4a749ad3cf36 | /src/main/java/com/thinkinginjava/io/ViewBuffers.java | 38847d410ba92c59950e2f6bdcd70698fa10b868 | [] | no_license | PavelTsekhanovich/ThinkingInJava | f00897ce6bd38871d9eaa0e00bf1d8c17350203e | 7754c639472c47ba1940856edbb0dee75d6a8b6b | refs/heads/master | 2021-09-17T23:22:21.421088 | 2018-07-06T19:24:24 | 2018-07-06T19:24:24 | 105,444,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,899 | java | package com.thinkinginjava.io;
import java.nio.*;
import static com.thinkinginjava.net.mindview.util.Print.print;
import static com.thinkinginjava.net.mindview.util.Print.printnb;
public class ViewBuffers {
public static void main(String[] args) {
ByteBuffer bb = ByteBuffer.wrap(
new byte[]{0, 0, 0, 0, 0, 0, 0, 'a'});
bb.rewind();
printnb("Byte Buffer ");
while (bb.hasRemaining())
printnb(bb.position() + " -> " + bb.get() + ", ");
print();
CharBuffer cb =
((ByteBuffer) bb.rewind()).asCharBuffer();
printnb("Char Buffer ");
while (cb.hasRemaining())
printnb(cb.position() + " -> " + cb.get() + ", ");
print();
FloatBuffer fb =
((ByteBuffer) bb.rewind()).asFloatBuffer();
printnb("Float Buffer ");
while (fb.hasRemaining())
printnb(fb.position() + " -> " + fb.get() + ", ");
print();
IntBuffer ib =
((ByteBuffer) bb.rewind()).asIntBuffer();
printnb("Int Buffer ");
while (ib.hasRemaining())
printnb(ib.position() + " -> " + ib.get() + ", ");
print();
LongBuffer lb =
((ByteBuffer) bb.rewind()).asLongBuffer();
printnb("Long Buffer ");
while (lb.hasRemaining())
printnb(lb.position() + " -> " + lb.get() + ", ");
print();
ShortBuffer sb =
((ByteBuffer) bb.rewind()).asShortBuffer();
printnb("Short Buffer ");
while (sb.hasRemaining())
printnb(sb.position() + " -> " + sb.get() + ", ");
print();
DoubleBuffer db =
((ByteBuffer) bb.rewind()).asDoubleBuffer();
printnb("Double Buffer ");
while (db.hasRemaining())
printnb(db.position() + " -> " + db.get() + ", ");
}
}
| [
"p.tsekhanovich93@gmail.com"
] | p.tsekhanovich93@gmail.com |
149a6d16842db3662a9caf01377be31de8b67537 | 6b4125b3d69cbc8fc291f93a2025f9f588d160d3 | /private-components/mock-core/src/main/java/org/limewire/core/impl/library/FileListAdapter.java | 62a97ecaf4ae840177976d2919d0677c292a05b5 | [] | no_license | mnutt/limewire5-ruby | d1b079785524d10da1b9bbae6fe065d461f7192e | 20fc92ea77921c83069e209bb045b43b481426b4 | refs/heads/master | 2022-02-10T12:20:02.332362 | 2009-09-11T15:47:07 | 2009-09-11T15:47:07 | 89,669 | 2 | 3 | null | 2022-01-27T16:18:46 | 2008-12-12T19:40:01 | Java | UTF-8 | Java | false | false | 4,332 | java | package org.limewire.core.impl.library;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.Collections;
import java.util.List;
import org.limewire.concurrent.ListeningFuture;
import org.limewire.concurrent.SimpleFuture;
import org.limewire.core.api.Category;
import org.limewire.core.api.URN;
import org.limewire.core.api.library.FileItem;
import org.limewire.core.api.library.FileProcessingEvent;
import org.limewire.core.api.library.LibraryFileList;
import org.limewire.core.api.library.LibraryState;
import org.limewire.core.api.library.LocalFileItem;
import org.limewire.core.api.library.LocalFileList;
import org.limewire.filter.Filter;
import org.limewire.listener.EventListener;
import com.limegroup.gnutella.library.FileDesc;
import ca.odell.glazedlists.BasicEventList;
import ca.odell.glazedlists.EventList;
import ca.odell.glazedlists.GlazedLists;
import ca.odell.glazedlists.impl.swing.SwingThreadProxyEventList;
public class FileListAdapter implements LocalFileList, LibraryFileList {
private EventList<LocalFileItem> eventList = GlazedLists.threadSafeList(new BasicEventList<LocalFileItem>());
private EventList<LocalFileItem> swingEventList = new SwingThreadProxyEventList<LocalFileItem>(eventList);
public FileListAdapter() {
}
public FileListAdapter(MockCombinedShareList combinedShareList) {
eventList = combinedShareList.createMemberList();
swingEventList = new SwingThreadProxyEventList<LocalFileItem>(eventList);
}
@Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
// TODO Auto-generated method stub
}
@Override
public LibraryState getState() {
return LibraryState.LOADED;
}
@Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
// TODO Auto-generated method stub
}
@Override
public EventList<LocalFileItem> getSwingModel() {
return swingEventList;
}
@Override
public EventList<LocalFileItem> getModel() {
return eventList;
}
@Override
public ListeningFuture<List<ListeningFuture<LocalFileItem>>> addFolder(File folder) {
List<ListeningFuture<LocalFileItem>> list = Collections.emptyList();
return new SimpleFuture<List<ListeningFuture<LocalFileItem>>>(list);
}
@Override
public ListeningFuture<LocalFileItem> addFile(File file) {
LocalFileItem item = new MockLocalFileItem(file.getName(), 1000,12345,23456, 0,0, Category.IMAGE);
eventList.add(item);
return new SimpleFuture<LocalFileItem>(item);
}
@Override
public void removeFile(File file) {
eventList.remove(new MockLocalFileItem(file.getName(), 1000,12345,23456, 0,0, Category.IMAGE));
}
public void addFileItem(LocalFileItem fileItem) {
eventList.add(fileItem);
}
public void removeFileItem(FileItem item) {
eventList.remove(item);
}
@Override
public int size() {
return eventList.size();
}
@Override
public boolean contains(File file) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean contains(URN urn) {
// TODO Auto-generated method stub
return false;
}
@Override
public LocalFileItem getFileItem(File file) {
// TODO Auto-generated method stub
return null;
}
@Override
public List<FileDesc> getFileDescsByURN(com.limegroup.gnutella.URN urn) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isFileAddable(File file) {
return true;
}
@Override
public void addFileProcessingListener(EventListener<FileProcessingEvent> listener) {
}
@Override
public void removeFileProcessingListener(EventListener<FileProcessingEvent> listener) {
}
@Override
public void removeFiles(Filter<LocalFileItem> fileFilter) {
}
@Override
public void clear() {
eventList.clear();
}
@Override
public void cancelPendingTasks() {
}
@Override
public void fileRenamed(File oldFile, File newFile) {
}
}
| [
"michael@nuttnet.net"
] | michael@nuttnet.net |
8fbe38f9d00767bff101e477efd63da3dd9a7135 | 2ced3f8d89be1502e239c1b2adbc27e74f511408 | /src/com/dpower/pub/dp2700/activity/SMSCheckActivity.java | 4d65f9a6910dd873a9a6e73edc44242d8e264949 | [] | no_license | lichao3140/NewPub2700 | 8206fb1057639b9caa947021525b4df94464c1e0 | d170eb13350c1a808435f468911a8dbca9f9658b | refs/heads/master | 2021-04-05T23:34:34.099071 | 2018-03-13T12:16:59 | 2018-03-13T12:16:59 | 125,046,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,760 | java | package com.dpower.pub.dp2700.activity;
import java.io.File;
import com.dpower.pub.dp2700.R;
import com.dpower.pub.dp2700.tools.SPreferences;
import com.dpower.util.ConstConf;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.ProgressBar;
/**
* 信息查看
*/
public class SMSCheckActivity extends BaseActivity {
private WebView mWebView;
private ImageView mImageView;
private ProgressBar mProgressBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sms_check);
init();
}
private void init() {
findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
String resName = null;
if (getIntent().getExtras() != null) {
resName = getIntent().getExtras().getString("resName");
}
mImageView = (ImageView) findViewById(R.id.image_view);
mWebView = (WebView) findViewById(R.id.web_view);
mProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
mProgressBar.setVisibility(View.VISIBLE);
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {
mProgressBar.setVisibility(View.GONE);
super.onPageFinished(view, url);
}
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
mProgressBar.setVisibility(View.GONE);
super.onReceivedError(view, errorCode, description, failingUrl);
}
});
if (resName.contains("jpg")) {
Bitmap bitmap = BitmapFactory.decodeFile(ConstConf.MESSAGE_PATH + File.separator + resName);
mImageView.setVisibility(View.VISIBLE);
mWebView.setVisibility(View.GONE);
mImageView.setImageBitmap(bitmap);
} else {
mImageView.setVisibility(View.GONE);
mWebView.setVisibility(View.VISIBLE);
mWebView.loadUrl("file://" + ConstConf.MESSAGE_PATH + File.separator + resName);
}
}
@Override
protected void onResume() {
findViewById(R.id.root_view).setBackground(SPreferences.getInstance().getWallpaper());
super.onResume();
}
@Override
public void onBackPressed() {
if (mWebView.canGoBack()) {
mWebView.goBack();
} else {
super.onBackPressed();
}
}
}
| [
"396229938@qq.com"
] | 396229938@qq.com |
c1856b06dc8b6a647c75b9598f4b365631b3c2c9 | 7f287b27f6f0a4accb3ab01da7452f23565396ae | /fs/progetto/src/it/unibas/fs/modello/Modello.java | e7c845282d515aa67fe7551acb201e880d96de7e | [] | no_license | MihaiSoanea/Java-Projects | d941776f7a0bd79527dde805e1a549f609484dd6 | 56c0d5d2792160c8fa4e4f5c43938fefd48ddd4f | refs/heads/master | 2020-09-01T15:06:47.126318 | 2019-11-01T13:47:48 | 2019-11-01T13:47:48 | 218,987,814 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 390 | java | package it.unibas.fs.modello;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class Modello implements Serializable {
private Utente utente;
public Utente getUtente() {
return utente;
}
public void setUtente(Utente utente) {
this.utente = utente;
}
}
| [
"mihaisoanea@yahoo.it"
] | mihaisoanea@yahoo.it |
1f1b05013bbc51a94c7699ae877032d513304ec6 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Hibernate/Hibernate3826.java | 21b5bb6900e02e1f767f0df0bb5f8a7111f31dfa | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 544 | java | private Object readIdentifierHydratedState(ResultSet resultSet, ResultSetProcessingContext context)
throws SQLException {
try {
return entityReference.getEntityPersister().getIdentifierType().hydrate(
resultSet,
entityReferenceAliases.getColumnAliases().getSuffixedKeyAliases(),
context.getSession(),
null
);
}
catch (Exception e) {
throw new HibernateException(
"Encountered problem trying to hydrate identifier for entity ["
+ entityReference.getEntityPersister() + "]",
e
);
}
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
d47f9461561a29c245619c8fd45425a44fa65eac | ec13fd6ad41661e1b2f578819f3b0b0474edbb5f | /org/apache/http/auth/AuthSchemeRegistry.java | 4d6c74d6251525bf16b4f73a0f8e7c52ac6ebfeb | [] | no_license | BukkitReborn/Mineplexer | 80afaa667a91624712906b29a0fbbc9380a6e1b2 | e1038978a1baa9ae88613923842834c4561f0628 | refs/heads/master | 2020-12-02T22:37:49.522092 | 2017-01-17T18:51:53 | 2017-01-17T18:51:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,852 | java | package org.apache.http.auth;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.annotation.ThreadSafe;
import org.apache.http.params.HttpParams;
@ThreadSafe
public final class AuthSchemeRegistry
{
private final ConcurrentHashMap<String, AuthSchemeFactory> registeredSchemes;
public AuthSchemeRegistry()
{
this.registeredSchemes = new ConcurrentHashMap();
}
public void register(String name, AuthSchemeFactory factory)
{
if (name == null) {
throw new IllegalArgumentException("Name may not be null");
}
if (factory == null) {
throw new IllegalArgumentException("Authentication scheme factory may not be null");
}
this.registeredSchemes.put(name.toLowerCase(Locale.ENGLISH), factory);
}
public void unregister(String name)
{
if (name == null) {
throw new IllegalArgumentException("Name may not be null");
}
this.registeredSchemes.remove(name.toLowerCase(Locale.ENGLISH));
}
public AuthScheme getAuthScheme(String name, HttpParams params)
throws IllegalStateException
{
if (name == null) {
throw new IllegalArgumentException("Name may not be null");
}
AuthSchemeFactory factory = (AuthSchemeFactory)this.registeredSchemes.get(name.toLowerCase(Locale.ENGLISH));
if (factory != null) {
return factory.newInstance(params);
}
throw new IllegalStateException("Unsupported authentication scheme: " + name);
}
public List<String> getSchemeNames()
{
return new ArrayList(this.registeredSchemes.keySet());
}
public void setItems(Map<String, AuthSchemeFactory> map)
{
if (map == null) {
return;
}
this.registeredSchemes.clear();
this.registeredSchemes.putAll(map);
}
}
| [
"H4nSolo@gmx.de"
] | H4nSolo@gmx.de |
138cdbec870c476c7e2e0163000e39c1424b20d7 | 653461036412b0a43b6bc6744890304048f92caf | /src/main/java/network/minter/explorer/models/BaseCoinValue.java | 9b86946eed561962950db34f7b1a7e212987f025 | [
"MIT"
] | permissive | MinterTeam/minter-android-explorer | 29847f025e4513f506811dc356fbbafc998da5da | 228a051ce360fd92fe3f176492d8275e2ad2115f | refs/heads/master | 2021-07-21T20:58:20.858899 | 2021-07-15T10:58:24 | 2021-07-15T10:58:24 | 139,714,916 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,210 | java | /*
* Copyright (C) by MinterTeam. 2020
* @link <a href="https://github.com/MinterTeam">Org Github</a>
* @link <a href="https://github.com/edwardstock">Maintainer Github</a>
*
* The MIT License
*
* 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 network.minter.explorer.models;
import org.parceler.Parcel;
import java.math.BigDecimal;
/**
* minter-android-explorer. 2020
*
* @author Eduard Maximovich (edward.vstock@gmail.com)
*/
@Parcel
public class BaseCoinValue {
public CoinItemBase coin;
public BigDecimal amount = BigDecimal.ZERO;
public BigDecimal bipValue = BigDecimal.ZERO;
@SuppressWarnings("EqualsReplaceableByObjectsCall")
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof BaseCoinValue)) return false;
BaseCoinValue that = (BaseCoinValue) o;
if (coin != null ? !coin.equals(that.coin) : that.coin != null) return false;
return amount.equals(that.amount);
}
@Override
public int hashCode() {
int result = coin != null ? coin.hashCode() : 0;
result = 31 * result + amount.hashCode();
return result;
}
}
| [
"edward.vstock@gmail.com"
] | edward.vstock@gmail.com |
3cb459a6ea7201309375c6e0bfe6ddf46ac6bd0c | 963212f9ece3f4e13a4f0213e7984dab1df376f5 | /qardio_source/cfr_dec/com/getqardio/android/utils/PregnancyUtils.java | 0335cf771ba62361c62e6a3a2305cb9bb065a6fa | [] | no_license | weitat95/mastersDissertation | 2648638bee64ea50cc93344708a58800a0f2af14 | d465bb52b543dea05c799d1972374e877957a80c | refs/heads/master | 2020-06-08T17:31:51.767796 | 2019-12-15T19:09:41 | 2019-12-15T19:09:41 | 193,271,681 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,741 | java | /*
* Decompiled with CFR 0.147.
*
* Could not load the following classes:
* android.content.Context
*/
package com.getqardio.android.utils;
import android.content.Context;
import com.getqardio.android.mvp.common.util.RxUtil;
import com.getqardio.android.provider.DataHelper;
import com.getqardio.android.utils.DateUtils;
import com.getqardio.android.utils.PregnancyUtils$$Lambda$1;
import com.getqardio.android.utils.PregnancyUtils$$Lambda$2;
import com.getqardio.android.utils.PregnancyUtils$$Lambda$3;
import io.reactivex.Observable;
import io.reactivex.ObservableTransformer;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import java.util.Calendar;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import timber.log.Timber;
public class PregnancyUtils {
public static int calculateDayOfPregnancy(Date date, Date date2) {
date = DateUtils.getStartOfTheDay(date);
return (int)TimeUnit.DAYS.convert(date2.getTime() - date.getTime(), TimeUnit.MILLISECONDS);
}
public static Date calculateDueDate(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(6, 280);
return calendar.getTime();
}
public static int calculateMonthOfPregnancy(Date date, Date date2) {
date = DateUtils.getStartOfTheDay(date);
return (int)Math.ceil((date2.getTime() - date.getTime()) / 2688000000L);
}
public static Date calculateStartDate(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(6, -280);
return calendar.getTime();
}
public static int calculateWeekOfPregnancy(Date date, Date date2) {
date = DateUtils.getStartOfTheDay(date);
return (int)((double)(date2.getTime() - date.getTime()) * 1.0 / (double)TimeUnit.MILLISECONDS.convert(7L, TimeUnit.DAYS)) + 1;
}
static /* synthetic */ Object lambda$stopPregnancyModeAsync$0(Context context, long l, Object object) throws Exception {
DataHelper.PregnancyDataHelper.stopCurrentPregnancy(context, l);
DataHelper.PregnancyDataHelper.setPregnancyModeActive(context, l, false);
return null;
}
static /* synthetic */ void lambda$stopPregnancyModeAsync$1(Object object) throws Exception {
Timber.d("stoped", new Object[0]);
}
public static void stopPregnancyModeAsync(Context context, long l) {
Observable.just(new Object()).map(PregnancyUtils$$Lambda$1.lambdaFactory$(context, l)).compose(RxUtil.applySchedulers()).subscribe(PregnancyUtils$$Lambda$2.lambdaFactory$(), PregnancyUtils$$Lambda$3.lambdaFactory$());
}
}
| [
"weitat95@live.com"
] | weitat95@live.com |
2fad8ea88a3d2f790b9714f3b18a46e7a16eda2b | e3efc1fede34736a2cd21da72c83939186277ca2 | /server/src/main/java/org/fastcatsearch/http/action/management/common/GetNodeTaskStateAction.java | 8f0b40c5e4bfae88ab7a862c649ce345d006f030 | [
"Apache-2.0"
] | permissive | songaal/abcc | e3a646d3636105b1290c251395c90e3b785f9c88 | 6839cbf947296ff8ff4439c591aa314a14f19f7b | refs/heads/master | 2023-04-03T04:40:09.743919 | 2019-10-14T08:05:21 | 2019-10-14T08:05:21 | 222,627,949 | 0 | 0 | Apache-2.0 | 2023-03-23T20:38:31 | 2019-11-19T06:47:36 | Java | UTF-8 | Java | false | false | 1,993 | java | package org.fastcatsearch.http.action.management.common;
import java.io.Writer;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.fastcatsearch.http.ActionMapping;
import org.fastcatsearch.http.action.ActionRequest;
import org.fastcatsearch.http.action.ActionResponse;
import org.fastcatsearch.http.action.AuthAction;
import org.fastcatsearch.job.state.TaskKey;
import org.fastcatsearch.job.state.TaskState;
import org.fastcatsearch.job.state.TaskStateService;
import org.fastcatsearch.service.ServiceManager;
import org.fastcatsearch.util.ResponseWriter;
@ActionMapping("/management/common/node-task-state")
public class GetNodeTaskStateAction extends AuthAction {
@Override
public void doAuthAction(ActionRequest request, ActionResponse response) throws Exception {
String nodeId = request.getParameter("nodeId");
TaskStateService taskStateService = ServiceManager.getInstance().getService(TaskStateService.class);
Map<TaskKey, TaskState> taskMap = taskStateService.getNodeTaskMap(nodeId);
Writer writer = response.getWriter();
ResponseWriter resultWriter = getDefaultResponseWriter(writer);
resultWriter.object().key("taskState")
.array();
if(taskMap != null) {
Iterator<Map.Entry<TaskKey,TaskState>> iterator = taskMap.entrySet().iterator();
while(iterator.hasNext()) {
Entry<TaskKey,TaskState> entry = iterator.next();
TaskKey taskKey = entry.getKey();
TaskState taskState = entry.getValue();
resultWriter.object()
.key("summary").value(taskKey.getSummary())
.key("isScheduled").value(taskState.isScheduled())
.key("state").value(taskState.getState())
.key("step").value(taskState.getStep())
.key("startTime").value(taskState.getStartTime())
.key("endTime").value(taskState.getEndTime())
.key("elapsed").value(taskState.getElapsedTime());
resultWriter.endObject();
}
}
resultWriter.endArray().endObject();
resultWriter.done();
}
}
| [
"swsong@danawa.com"
] | swsong@danawa.com |
532c17b9d994438754dd6e7a34a895aa21507a39 | 99e44fc1db97c67c7ae8bde1c76d4612636a2319 | /app/src/main/java/com/android/gallery3d/filtershow/pipeline/HighresRenderingRequestTask.java | bf6748f8a9c656dd09aedb4668b2c5e5f2dcdef5 | [
"MIT"
] | permissive | wossoneri/AOSPGallery4AS | add7c34b2901e3650d9b8518a02dd5953ba48cef | 0be2c89f87e3d5bd0071036fe89d0a1d0d9db6df | refs/heads/master | 2022-03-21T04:42:57.965745 | 2022-02-23T08:44:51 | 2022-02-23T08:44:51 | 113,425,141 | 3 | 2 | MIT | 2022-02-23T08:44:52 | 2017-12-07T08:45:41 | Java | UTF-8 | Java | false | false | 2,728 | java | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.gallery3d.filtershow.pipeline;
import android.graphics.Bitmap;
import com.android.libs.src_pd.gallery3d.filtershow.filters.FiltersManager;
public class HighresRenderingRequestTask extends ProcessingTask {
private CachingPipeline mHighresPreviewPipeline = null;
private boolean mPipelineIsOn = false;
public void setHighresPreviewScaleFactor(float highResPreviewScale) {
mHighresPreviewPipeline.setHighResPreviewScaleFactor(highResPreviewScale);
}
public void setPreviewScaleFactor(float previewScale) {
mHighresPreviewPipeline.setPreviewScaleFactor(previewScale);
}
static class Render implements Request {
RenderingRequest request;
}
static class RenderResult implements Result {
RenderingRequest request;
}
public HighresRenderingRequestTask() {
mHighresPreviewPipeline = new CachingPipeline(
FiltersManager.getHighresManager(), "Highres");
}
public void setOriginal(Bitmap bitmap) {
mHighresPreviewPipeline.setOriginal(bitmap);
}
public void setOriginalBitmapHighres(Bitmap originalHires) {
mPipelineIsOn = true;
}
public void stop() {
mHighresPreviewPipeline.stop();
}
public void postRenderingRequest(RenderingRequest request) {
if (!mPipelineIsOn) {
return;
}
Render render = new Render();
render.request = request;
postRequest(render);
}
@Override
public Result doInBackground(Request message) {
RenderingRequest request = ((Render) message).request;
RenderResult result = null;
mHighresPreviewPipeline.renderHighres(request);
result = new RenderResult();
result.request = request;
return result;
}
@Override
public void onResult(Result message) {
if (message == null) {
return;
}
RenderingRequest request = ((RenderResult) message).request;
request.markAvailable();
}
@Override
public boolean isDelayedTask() { return true; }
}
| [
"siyolatte@gmail.com"
] | siyolatte@gmail.com |
03b187281d3c99973879ce897f489735716d7c6a | c156bf50086becbca180f9c1c9fbfcef7f5dc42c | /src/main/java/com/waterelephant/sxyDrainage/mapper/FqgjOperateBasicMapper.java | 2f712e97355b2721284a35480d5718700006d5f8 | [] | no_license | zhanght86/beadwalletloanapp | 9e3def26370efd327dade99694006a6e8b18a48f | 66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8 | refs/heads/master | 2020-12-02T15:01:55.982023 | 2019-11-20T09:27:24 | 2019-11-20T09:27:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | //package com.waterelephant.sxyDrainage.mapper;
//
//import com.waterelephant.sxyDrainage.entity.fqgj.FqgjOperateBasic;
//import tk.mybatis.mapper.common.Mapper;
//
///**
// * @author wangfei
// * @version 1.0
// * @date 2018/5/29
// * @Description <TODO>
// * @since JDK 1.8
// */
//public interface FqgjOperateBasicMapper extends Mapper<FqgjOperateBasic> {
//}
| [
"wurenbiao@beadwallet.com"
] | wurenbiao@beadwallet.com |
fbd9cb5ed85123c872f3136e25e2962400a24a59 | 6f8636ab2e86c95dcaf27cefdbac77196155e1e9 | /src/main/java/com/infinityraider/infinitylib/utility/ModLoadUtil.java | bc8a501da6d9fbc7084d781648e0f3a31fd8980a | [
"MIT"
] | permissive | InfinityRaider/InfinityLib | a062fb7250292d0ae7736af356a35a0634e5822a | 7bec1c3ded874453bd0dff63962015d9240042a4 | refs/heads/master | 2023-06-12T00:43:57.415590 | 2023-06-01T19:08:57 | 2023-06-01T19:08:57 | 63,778,238 | 3 | 14 | MIT | 2023-06-01T19:08:59 | 2016-07-20T12:06:27 | Java | UTF-8 | Java | false | false | 578 | java | package com.infinityraider.infinitylib.utility;
import com.infinityraider.infinitylib.InfinityMod;
import java.lang.reflect.Field;
public class ModLoadUtil {
public static void populateStaticModInstanceField(InfinityMod mod) {
for (Field field : mod.getClass().getDeclaredFields()) {
if (field.getType().isAssignableFrom(InfinityMod.class)) {
try {
field.set(null, mod);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
}
| [
"theoneandonlyraider@gmail.com"
] | theoneandonlyraider@gmail.com |
817c884142348b331d3c756da234ef2e79336b8e | 8803ec022a004ccb67c4d78b72b549e3c47ad6b7 | /mifan-reward-service/src/main/java/com/mifan/reward/service/enums/EntityState.java | 07cc14fe47c291576cdf1d5aa485e5e9559f8228 | [] | no_license | helldzl/moon-api | 56ce803d94d94d801913eef4b0b140b19456ca91 | 44761f7ac6817193f4a562a702e42b01cee3f303 | refs/heads/master | 2020-03-07T08:24:15.351040 | 2018-03-30T03:34:24 | 2018-03-30T03:34:24 | 127,377,122 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 334 | java | package com.mifan.reward.service.enums;
public enum EntityState {
/**
* 创建完成
* */
ENABLED(1),
/**
* 已删除
* */
DISABLED(0);
EntityState(Integer state) {
this.state = state;
}
private Integer state;
public Integer getState() {
return state;
}
}
| [
"1949602@qq.com"
] | 1949602@qq.com |
51377a1f35e1f94c4b9f1f92d3782ac7da9ed8dc | a26cb82c15e8706b95ea01505b779e7de45e3e58 | /fast-admin/src/main/java/com/ylkget/Application.java | eab901320cc66a7cd9173fb78ba1d2bb67b417e1 | [
"MIT"
] | permissive | ylksty/lc-fast | f9e3edcb8ec4d7d3981ee58c69ebfe63b480ddaa | d99f27e0ac3adf42cb9bbb584fe366438b1ea8dc | refs/heads/main | 2023-03-22T15:53:45.197806 | 2021-03-14T14:34:11 | 2021-03-14T14:34:11 | 346,523,153 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 291 | java | package com.ylkget;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
| [
"ylksty@163.com"
] | ylksty@163.com |
587e4f0c4f844ce7b57eb7ae0c9e8534793087e0 | e51de484e96efdf743a742de1e91bce67f555f99 | /Android/triviacrack_src/src/com/google/android/gms/internal/dr.java | 8c5c981e9db54ea8cd05cd0618f9f7dca7dba5f2 | [] | no_license | adumbgreen/TriviaCrap | b21e220e875f417c9939f192f763b1dcbb716c69 | beed6340ec5a1611caeff86918f107ed6807d751 | refs/heads/master | 2021-03-27T19:24:22.401241 | 2015-07-12T01:28:39 | 2015-07-12T01:28:39 | 28,071,899 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,104 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.internal;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
// Referenced classes of package com.google.android.gms.internal:
// dq, ds
public abstract class dr extends Binder
implements dq
{
public dr()
{
attachInterface(this, "com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
}
public static dq a(IBinder ibinder)
{
if (ibinder == null)
{
return null;
}
android.os.IInterface iinterface = ibinder.queryLocalInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
if (iinterface != null && (iinterface instanceof dq))
{
return (dq)iinterface;
} else
{
return new ds(ibinder);
}
}
public IBinder asBinder()
{
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j)
{
switch (i)
{
default:
return super.onTransact(i, parcel, parcel1, j);
case 1598968902:
parcel1.writeString("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
return true;
case 1: // '\001'
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
String s = b();
parcel1.writeNoException();
parcel1.writeString(s);
return true;
case 2: // '\002'
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
Intent intent = c();
parcel1.writeNoException();
if (intent != null)
{
parcel1.writeInt(1);
intent.writeToParcel(parcel1, 1);
return true;
} else
{
parcel1.writeInt(0);
return true;
}
case 3: // '\003'
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
int l = d();
parcel1.writeNoException();
parcel1.writeInt(l);
return true;
case 4: // '\004'
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
boolean flag = a();
parcel1.writeNoException();
int k = 0;
if (flag)
{
k = 1;
}
parcel1.writeInt(k);
return true;
case 5: // '\005'
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseResult");
e();
parcel1.writeNoException();
return true;
}
}
}
| [
"klayderpus@chimble.net"
] | klayderpus@chimble.net |
b01e9a33aeeba4ec27db23a7b2291e49b082ea04 | 61602d4b976db2084059453edeafe63865f96ec5 | /com/xunlei/downloadprovider/personal/message/chat/a.java | 3b2937e7054db0a20c229c154b2913e65327b5f9 | [] | no_license | ZoranLi/thunder | 9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0 | 0778679ef03ba1103b1d9d9a626c8449b19be14b | refs/heads/master | 2020-03-20T23:29:27.131636 | 2018-06-19T06:43:26 | 2018-06-19T06:43:26 | 137,848,886 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | package com.xunlei.downloadprovider.personal.message.chat;
import android.content.Context;
import android.widget.ImageView;
import com.xunlei.downloadprovider.R;
import com.xunlei.downloadprovider.ad.common.c;
/* compiled from: ChatGlideBuilders */
public final class a {
public static void a(Context context, String str, ImageView imageView) {
c.a(context, str).placeholder(R.drawable.ic_default_avatar_new).error(R.drawable.ic_default_avatar_new).fallback(R.drawable.ic_default_avatar_new).into(imageView);
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
d8e45c4843374ce270d815228770b29bd82a6359 | c1edb3429dd09bd8ced418ca492216733dfb4820 | /src/main/java/kfs/kfsUtils/kfsXmlGen/kfsXmlDoc.java | 094536922c5959f742ff4660a7be7eb50ac66a55 | [
"Apache-2.0"
] | permissive | k0fis/kfsXmlGen | 4b4f24d696836a7a5370bd9240549b4882802228 | d06e91417a40a47674dcc0b6eb9973e3f26f101b | refs/heads/master | 2016-09-11T08:47:14.690037 | 2014-04-07T10:07:11 | 2014-04-07T10:07:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,426 | java | package kfs.kfsUtils.kfsXmlGen;
import java.util.ArrayList;
import java.util.Iterator;
/**
*
* @author PaveDrim
*/
public class kfsXmlDoc extends kfsXmlItem implements Iterable<kfsXmlDocDef> {
private final ArrayList<kfsXmlDocDef> defs;
public kfsXmlDoc(String name) {
super(name);
defs = new ArrayList<kfsXmlDocDef>();
addDocAttr("xml", "encoding", "UTF-8", "version", "1.0");
}
public final kfsXmlDoc addDocAttr(String attrName, String a1Name, //
String a1Value, String a2Name, String a2Value) {
for (kfsXmlDocDef dd : defs) {
if (dd.getName().equals(attrName)) {
dd.setAttribute(a1Name, a1Value);
dd.setAttribute(a2Name, a2Value);
return this;
}
}
defs.add((new kfsXmlDocDef(attrName))//
.addAttribute(a1Name, a1Value)//
.addAttribute(a2Name, a2Value)//
);
return this;
}
public kfsXmlDoc addStylesheet(String href) {
return addDocAttr("xml-stylesheet", "type", "text/xsl", "href", href);
}
@Override
public String toString() {
return (new kfsSb())//
.aIter(defs, kfsSb.nl).nl(defs.size() <= 1).a(super.toString())//
.toString();
}
@Override
public Iterator<kfsXmlDocDef> iterator() {
return defs.iterator();
}
}
| [
"k0fis@me.com"
] | k0fis@me.com |
8eb35927a0a4e09e2ff532e0df32037bb6cb557b | 287dbb340765a05fac6047e4fa9e7d6277696596 | /src/main/java/me/twister915/punishments/model/manager/impl/TemporaryBanManager.java | 0e297d6e8ead4383f461b8b8cca23a856f7bb8a5 | [
"Apache-2.0"
] | permissive | Twister915/TwistedPunishments | d807329eb0213f433257266f44b1c3d31464e041 | 048757098c75d44c6da48fc51d5bd38ee87d7121 | refs/heads/master | 2021-01-20T09:12:51.766304 | 2014-07-25T22:04:44 | 2014-07-25T22:04:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,180 | java | /******************************************************************************
Copyright 2014 Joey Sacchini *
*
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 me.twister915.punishments.model.manager.impl;
import me.twister915.punishments.model.PunishmentFactory;
import me.twister915.punishments.model.manager.BaseManager;
import me.twister915.punishments.model.manager.BaseStorage;
import me.twister915.punishments.model.type.TemporaryBan;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import java.net.InetAddress;
public final class TemporaryBanManager extends BaseManager<TemporaryBan> {
public TemporaryBanManager(PunishmentFactory<TemporaryBan> factory, BaseStorage<TemporaryBan> storage) {
super(factory, storage, TemporaryBan.class);
}
@Override
protected void onPunish(TemporaryBan punishment, OfflinePlayer punished) {
if (punished instanceof Player) ((Player) punished).kickPlayer(getDisconnectMessage(punishment));
}
@Override
protected boolean canConnect(TemporaryBan punishment, Player player, InetAddress address) {
return false;
}
}
| [
"joey.sacchini264@gmail.com"
] | joey.sacchini264@gmail.com |
50dbc7bc5233e3e9dceb6586bc1dd1a614ac6b2b | 1ec73a5c02e356b83a7b867580a02b0803316f0a | /java/bj/powernode/basic/day26/GUI_Examples/list/JList1.java | f473114acb0c78eae8d3ed42effb04a9eaab8ba6 | [] | no_license | jxsd0084/JavaTrick | f2ee8ae77638b5b7654c3fcf9bceea0db4626a90 | 0bb835fdac3c2f6d1a29d1e6e479b553099ece35 | refs/heads/master | 2021-01-20T18:54:37.322832 | 2016-06-09T03:22:51 | 2016-06-09T03:22:51 | 60,308,161 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,212 | java | package bj.powernode.basic.day26.GUI_Examples.list;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Vector;
public class JList1 {
public static void main( String args[] ) {
JFrame f = new JFrame( "JList" );
Container contentPane = f.getContentPane();
contentPane.setLayout( new GridLayout( 1, 2 ) );
String[] s = { "美国", "日本", "大陆", "英国", "法国" };
Vector v = new Vector();
v.addElement( "Nokia 8850" );
v.addElement( "Nokia 8250" );
v.addElement( "Motorola V8088" );
v.addElement( "Motorola V3688x" );
v.addElement( "Panasonic GD92" );
v.addElement( "其他" );
JList list1 = new JList( s );
list1.setBorder( BorderFactory.createTitledBorder( "您最喜欢到哪个国家玩呢?" ) );
JList list2 = new JList( v );
list2.setBorder( BorderFactory.createTitledBorder( "您最喜欢哪一种手机?" ) );
contentPane.add( new JScrollPane( list1 ) );
contentPane.add( new JScrollPane( list2 ) );
f.pack();
f.show();
f.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit( 0 );
}
} );
}
}
| [
"chenlong88882001@163.com"
] | chenlong88882001@163.com |
b4dcd3401b607982ca6f6b4880e16874ab7ee6a9 | dd4f84a8e9f4b719cc8204f9459c223981dc7448 | /java_syntax_1/level4/lecture6/task8/TargetIsTargeted.java | f56f8b7d470dea58eef4d485cb393e352d72ff2a | [] | no_license | SevenLightnapper/javarush | 0ab08f532813ae20f68ea01c1b84b2ee5c5a137e | d9631957d5a17f3055e6b3013073a8ed0c8db229 | refs/heads/master | 2020-07-02T13:33:49.565221 | 2019-08-09T20:59:32 | 2019-08-09T20:59:32 | 201,534,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,634 | java | package javarush.java_syntax_1.level4.lecture6.task8;
import java.io.*;
public class TargetIsTargeted {
/*
Ввести с клавиатуры два целых числа, которые будут координатами точки, не лежащей на координатных осях OX и OY.
Вывести на экран номер координатной четверти, в которой находится данная точка.
Подсказка:
Принадлежность точки с координатами (a,b) к одной из четвертей определяется следующим образом:
для первой четверти a>0 и b>0;
для второй четверти a<0 и b>0;
для третьей четверти a<0 и b<0;
для четвертой четверти a>0 и b<0.
Пример для чисел 4 6:
1
Пример для чисел -6 -6:
3
*/
/*
package com.javarush.Task.task04.task0425;
*/
/*
Цель установлена!
*/
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));//напишите тут ваш код
String q = reader.readLine();
String w = reader.readLine();
int a = Integer.parseInt(q);
int b = Integer.parseInt(w);
if (a > 0 && b > 0)
System.out.println(1);
else if (a < 0 && b > 0)
System.out.println(2);
else if (a < 0 && b < 0)
System.out.println(3);
else if (a > 0 && b < 0)
System.out.println(4);
}
}
| [
"dairenray@gmail.com"
] | dairenray@gmail.com |
14c9ac39de5ead5d495e9d275826d5fd1b3b2c52 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0100/src/java/module0100/a/Foo3.java | fd0c48c367f0bb57a6b93cc7dbcc0395cdfdcfcb | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,538 | java | package module0100.a;
import javax.naming.directory.*;
import javax.net.ssl.*;
import javax.rmi.ssl.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public abstract class Foo3<L> extends module0100.a.Foo2<L> implements module0100.a.IFoo3<L> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
public L element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module0100.a.Foo2.create(input);
}
public String getName() {
return module0100.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module0100.a.Foo2.getInstance().setName(getName());
return;
}
public L get() {
return (L)module0100.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (L)element;
module0100.a.Foo2.getInstance().set(this.element);
}
public L call() throws Exception {
return (L)module0100.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
01658bbdc8e1fbef2148ff7c883a2b4f6fb08824 | c6dc3346f5bc2e63b18d1491b3be4f9ccebe3209 | /src/main/java/com/hotelserver/model/search/TransportationsType.java | 0873d617d6a78e5aab4e6f33be498da51d48b5b4 | [] | no_license | codingBitsKolkata/hotel-server | bd3293172fa5c796454d59f23b333b698765adcc | 97e5c1c3229eef72992cdbd01436f93158ba3103 | refs/heads/master | 2020-04-13T14:16:18.712379 | 2019-03-27T06:40:00 | 2019-03-27T06:40:00 | 163,256,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,068 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.03.10 at 01:51:57 PM IST
//
package com.hotelserver.model.search;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for TransportationsType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="TransportationsType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Transportations" type="{http://www.opentravel.org/OTA/2003/05}TransportationType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransportationsType", propOrder = {
"transportations"
})
@XmlSeeAlso({
RelativePositionType.class
})
public class TransportationsType {
@XmlElement(name = "Transportations")
protected TransportationType transportations;
/**
* Gets the value of the transportations property.
*
* @return
* possible object is
* {@link TransportationType }
*
*/
public TransportationType getTransportations() {
return transportations;
}
/**
* Sets the value of the transportations property.
*
* @param value
* allowed object is
* {@link TransportationType }
*
*/
public void setTransportations(TransportationType value) {
this.transportations = value;
}
}
| [
"avirup.pal@gmail.com"
] | avirup.pal@gmail.com |
11aa4b61da0a7602b5807670f1fdeb453440d03d | 4913ef8eb5cde6e3b1ee74a27c3f3d54319148d9 | /allbinary_src/cache/AllBinaryCacheLibraryM/src/main/java/org/allbinary/logic/util/cache/BasicArrayListResetablePool.java | 909d1e7ce6f3fa2187749de2c8d7cbb9dd5a6077 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | AllBinary/AllBinary-Platform | 0876cfbe8f0d003b628181551f90df36f6203c6a | 92adcd63427fcacbfac9cb4a6b47b92a3c2acaa7 | refs/heads/master | 2023-08-18T23:24:09.932268 | 2023-08-15T03:09:32 | 2023-08-15T03:09:32 | 1,953,077 | 16 | 3 | NOASSERTION | 2023-07-05T00:52:21 | 2011-06-25T18:29:09 | Java | UTF-8 | Java | false | false | 1,424 | java | /*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package org.allbinary.logic.util.cache;
public class BasicArrayListResetablePool extends AbstractArrayListPool
{
public BasicArrayListResetablePool(CacheableInterfaceFactoryInterface cacheableInterfaceFactoryInterface) {
super(cacheableInterfaceFactoryInterface);
}
public void clear()
{
//buffers.clear();
//pos = buffers.size() - 1;
}
public CacheableInterface remove(Object key) throws Exception
{
int size = this.buffers.size();
if(size > 0)
{
return (CacheableInterface) buffers.remove(size - 1);
}
else
{
return this.cacheableInterfaceFactoryInterface.getInstance(key);
}
/*
if (pos < 0)
{
CacheableInterface cacheableInterface =
this.cacheableInterfaceFactoryInterface.getInstance(key);
buffers.add(cacheableInterface);
return cacheableInterface;
}
return (CacheableInterface) buffers.get(pos--);
*/
}
}
| [
"travisberthelot@hotmail.com"
] | travisberthelot@hotmail.com |
d181a853962791a67f36e1feaee12ad64d0202a4 | ec674fc37ef417321bf6ebfdd9ff776f07f17c3e | /app/src/main/java/com/deshang/ttjx/ui/main/adapter/VideoAdapter.java | a4c2a9389d106985f4556ad7832b2a32f7419bed | [] | no_license | Zhai-WenWu/toutiaojingxuan1.0.8 | f68a12b053fc98e7c3ab7c77e5a37813cee4165a | 0ede2af97b77c6c7f0c47a213516947a01bd612e | refs/heads/master | 2020-04-08T04:28:31.110844 | 2018-11-25T09:58:12 | 2018-11-25T09:58:12 | 159,018,034 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,252 | java | package com.deshang.ttjx.ui.main.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.deshang.ttjx.R;
import com.deshang.ttjx.framework.imageload.GlideLoading;
import com.deshang.ttjx.ui.tab3.bean.VideoBean;
import java.util.List;
/**
* Created by L on 2018/10/26.
*/
public class VideoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int NormalVideo = 0;
private static final int AD = 1;
private Context context;
private List<Object> data;
public VideoAdapter(Context context, List<Object> data) {
this.context = context;
this.data = data;
}
@Override
public int getItemViewType(int position) {
// if (data.get(position) instanceof VideoBean.ReturnBean) {
return NormalVideo;
/*} else {
return AD;
}*/
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
/*if (viewType == NormalVideo) {*/
View view = LayoutInflater.from(context).inflate(R.layout.item_video_normal, parent, false);
return new VideoNormalHolder(view);
/*} else {
return null;
}*/
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
if (holder instanceof VideoNormalHolder) {
VideoNormalHolder videoHolder = (VideoNormalHolder) holder;
VideoBean.ReturnBean bean = (VideoBean.ReturnBean) data.get(position);
videoHolder.content.setText(bean.getTitle());
videoHolder.likeNumber.setText(String.valueOf(bean.getArticle_vote_count()));
videoHolder.showNumber.setText(bean.getClicks());
GlideLoading.getInstance().loadImgUrlNyImgLoader(context, bean.getCover_img(), videoHolder.image);
videoHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onClick(position);
}
}
});
}
}
@Override
public int getItemCount() {
return data.size();
}
private OnClickListener listener;
public interface OnClickListener {
void onClick(int position);
}
public void setOnClickListener(OnClickListener listener) {
this.listener = listener;
}
private class VideoNormalHolder extends RecyclerView.ViewHolder {
TextView content;
ImageView image;
TextView showNumber;
TextView likeNumber;
private VideoNormalHolder(View itemView) {
super(itemView);
image = (ImageView) itemView.findViewById(R.id.image);
content = (TextView) itemView.findViewById(R.id.video_content);
showNumber = (TextView) itemView.findViewById(R.id.show_number);
likeNumber = (TextView) itemView.findViewById(R.id.like_number);
}
}
}
| [
"782891615@qq.com"
] | 782891615@qq.com |
8f4538e65b72fd63b30353faed1fd29d4e88920a | cfeb4f027d74c1f6ab47b5ead84818e1b13c8512 | /app/src/main/java/com/alpha/alphaapp/ui/widget/et/EmptyEditText.java | da945e3b3bdc826e629920c019cf578b4ccf4966 | [] | no_license | Kenway090704/alphaApp | bd5e9d69141def353d23847a71812b4ee317b79f | e1f427b8644bf3de4ce6d27a810d8419b9ecc225 | refs/heads/master | 2020-12-02T21:14:53.044966 | 2017-10-17T09:43:23 | 2017-10-17T09:43:23 | 92,364,963 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,462 | java | package com.alpha.alphaapp.ui.widget.et;
import android.content.Context;
import android.content.res.TypedArray;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.method.PasswordTransformationMethod;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.alpha.alphaapp.R;
import com.alpha.lib_sdk.app.tool.Util;
/**
* Created by kenway on 17/6/13 11:36
* Email : xiaokai090704@126.com
* 输入用户名和帐号的输入框
*/
public class EmptyEditText extends LinearLayout {
private static final String TAG = "AccountEditText";
private Context context;
private EditText et;
private ImageView iv_del;
private String txt_hint;
private String input_type;
public EmptyEditText(Context context) {
super(context);
}
public EmptyEditText(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.AccountEditText);
txt_hint = array.getString(R.styleable.AccountEditText_hint);
input_type = array.getString(R.styleable.AccountEditText_input_type);
array.recycle();
initViews();
}
/**
* 获取右边删除内容的icon 对象
*
* @return
*/
public ImageView getImageViewRight() {
return iv_del;
}
public Editable getText() {
if (et == null) {
return null;
}
return et.getText();
}
/**
* 获取输入框中的文字(前后空格已去除)
*
* @return
*/
public String getEditTextStr() {
if (!Util.isNull(et)) {
return et.getText().toString().trim();
} else {
return null;
}
}
public EditText getEditText() {
return et;
}
private void initViews() {
View view = LayoutInflater.from(context).inflate(R.layout.widget_et_no_icon, this);
et = (EditText) view.findViewById(R.id.acc_edit_et_hint);
iv_del = (ImageView) view.findViewById(R.id.acc_edit_iv_del);
if (!Util.isNullOrBlank(txt_hint))
et.setHint(txt_hint);
if (!Util.isNull(input_type))
et.setTransformationMethod(PasswordTransformationMethod.getInstance());
iv_del.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
et.getText().clear();
}
});
et.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
if (Util.isNullOrBlank(et.getText().toString())) {
iv_del.setVisibility(INVISIBLE);
} else {
iv_del.setVisibility(VISIBLE);
}
} else {
iv_del.setVisibility(INVISIBLE);
}
}
});
}
/**
* 对EditText 设置监听事件
*
* @param textWatcher
*/
public void setWatcherListener(TextWatcher textWatcher) {
if (et != null && textWatcher != null) {
et.addTextChangedListener(textWatcher);
}
}
}
| [
"254903810@qq.com"
] | 254903810@qq.com |
9015f35ef62bfbd8f670dcdee68d5f09d54fe74a | 5de9adb9e25bc031c3f9bd0d58e2002819e9980b | /module_base/src/main/java/com/lib/basiclib/base/xui/widget/spinner/editspinner/BaseEditSpinnerAdapter.java | 67fc325bc8a39fbee1eb3700df33859d7bcf7ca7 | [] | no_license | xp304467543/Cpb_BASE | f5a4fe5fd08680d2cd2a95d0b9734b27856da26b | f93880928cb62c23bff260d1fad6731e0991e8e6 | refs/heads/master | 2023-08-13T18:56:01.985659 | 2021-10-11T05:02:17 | 2021-10-11T05:02:17 | 408,704,289 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 526 | java | package com.lib.basiclib.base.xui.widget.spinner.editspinner;
import android.widget.BaseAdapter;
/**
* 基础可输入下拉框
*
* @since 2020/11/26 下午2:16
*/
public abstract class BaseEditSpinnerAdapter extends BaseAdapter {
/**
* editText输入监听
*
* @return
*/
public abstract EditSpinnerFilter getEditSpinnerFilter();
/**
* 获取需要填入editText的字符串
* @param position
* @return
*/
public abstract String getItemString(int position);
}
| [
"304467543@qq.com"
] | 304467543@qq.com |
ea2dc9cb2c7b1da05640ce0f32f5539074a152e7 | 89d6f9031a103be29adbd37a27e9d31971001f9c | /src/main/java/net/unit8/example/trust/adapter/persistence/UserJpaEntity.java | b1abc57d78de4008ff88f37ad7f180c7b1e30457 | [
"MIT"
] | permissive | kawasima/specification-patterns | 50184674bd6fbdccdad0faf1d302960aa3f47c15 | 4688edb9f9bd15e0559aaef15bde1da95a1bbc13 | refs/heads/master | 2022-02-06T01:16:22.205432 | 2021-08-31T07:02:20 | 2021-08-31T07:02:20 | 223,903,544 | 0 | 0 | MIT | 2022-01-21T23:50:43 | 2019-11-25T08:55:27 | Java | UTF-8 | Java | false | false | 1,731 | java | package net.unit8.example.trust.adapter.persistence;
import lombok.Data;
import net.unit8.example.trust.domain.UserRank;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
@Entity(name = "user")
@Table(name = "users")
@Data
public class UserJpaEntity {
@Id
private String id;
@Column(name = "name", nullable = false)
private String name;
@Column(name = "rank", nullable = false)
private UserRank rank;
@ManyToMany
@JoinTable(name = "user_companies",
joinColumns = @JoinColumn(name ="user_id"),
inverseJoinColumns = @JoinColumn(name = "company_id"))
private Set<CompanyJpaEntity> companies = new HashSet<>();
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private Set<MotivationJpaEntity> motivations = new HashSet<>();
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "friends",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "friend_id"))
private Set<UserJpaEntity> friends = new HashSet<>();
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "name=" + name
+ ", companies=" + companies
+ ", motivations=[" + motivations.stream()
.map(MotivationJpaEntity::getGrade)
.map(Objects::toString)
.collect(Collectors.joining(",")) + "]"
+ ", friends=[" + friends.stream()
.map(f -> f.id)
.collect(Collectors.joining(",")) + "]";
}
}
| [
"kawasima1016@gmail.com"
] | kawasima1016@gmail.com |
1f5dc19718964822d4bcc37a4493dcde03a522e2 | 8109bfb029eb4aeecc142b8a3fce3ffb250e7f72 | /app/src/main/java/com/gebeya/mobile/bidir/data/groups/remote/GroupParser.java | 4cd19f089910993b9a9d62afca01727cd9cb2fb1 | [] | no_license | AbnetS/bidir-android | d011f3b7e030a23e08a221284167684f24c58e86 | 5db668af8c394321cc1e3eb3c9bb945be6d78c20 | refs/heads/master | 2022-06-20T15:25:51.852664 | 2019-12-16T05:30:14 | 2019-12-16T05:30:14 | 262,890,874 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,184 | java | package com.gebeya.mobile.bidir.data.groups.remote;
import android.support.annotation.NonNull;
import com.gebeya.mobile.bidir.data.groups.Group;
import com.google.gson.JsonObject;
/**
* Interface definition for a class responsible for parsing a {@link com.gebeya.mobile.bidir.data.groups.Group}
*/
public interface GroupParser {
String NEW = "New";
String API_NEW = "new";
String SCREENING_IN_PROGRESS = "Screening_in_progress";
String API_SCREENING_IN_PROGRESS = "screening_in_progress";
String SCREENING_SUBMITTED = "Screening_submitted";
String API_SCREENING_SUBMITTED = "submitted";
String ELIGIBLE = "Eligible";
String API_ELIGIBLE = "eligible";
String INELIGIBLE = "Ineligible";
String API_INELIGIBLE = "ineligible";
String LOAN_APPLICATION_NEW = "Loan_application_new";
String API_LOAN_APPLICATION_NEW = "loan_application_new";
String LOAN_APPLICATION_IN_PROGRESS = "Loan_application_in_progress";
String API_LOAN_APPLICATION_IN_PROGRESS = "loan_application_inprogress";
String LOAN_APPLICATION_SUBMITTED = "Loan_application_submitted";
String API_LOAN_APPLICATION_SUBMITTED = "loan_application_submitted";
String LOAN_APPLICATION_ACCEPTED = "Loan_application_accepted";
String API_LOAN_APPLICATION_ACCEPTED = "loan_application_accepted";
String LOAN_APPLICATION_DECLINED = "Loan_application_declined";
String API_LOAN_APPLICATION_DECLINED = "loan_application_declined";
String ACAT_NEW = "ACAT_NEW";
String API_ACAT_NEW = "ACAT_New";
String ACAT_IN_PROGRESS = "ACAT_in_progress";
String API_ACAT_IN_PROGRESS = "ACAT_IN_PROGRESS";
String ACAT_SUBMITTED = "ACAT_SUBMITTED";
String API_ACAT_SUBMITTED = "ACAT-Submitted";
String ACAT_RESUBMITTED = "ACAT_RESUBMITTED";
String API_ACAT_RESUBMITTED = "ACAT-Resubmitted";
String ACAT_DECLINED_FOR_REVIEW = "ACAT_DECLINED_FOR_REVIEW";
String API_ACAT_DECLINED_FOR_REVIEW = "ACAT_Declined_For_Review";
String ACAT_AUTHORIZED = "ACAT_AUTHORIZED";
String API_ACAT_AUTHORIZED = "ACAT-Authorized";
String LOAN_GRANTED = "LOAN_GRANTED";
String API_LOAN_GRANTED = "loan_granted";
String LOAN_APPRAISAL_IN_PROGRESS = "LOAN_APPRAISAL_IN_PROGRESS";
String API_LOAN_APPRAISAL_IN_PROGRESS = "appraisal_in_progress";
String LOAN_PAYMENT_IN_PROGRESS = "LOAN_PAYMENT_IN_PROGRESS";
String API_LOAN_PAYMENT_IN_PROGRESS = "payment_in_progress";
String LOAN_PAID = "LOAN_PAID";
String API_LOAN_PAID = "loan_paid";
String UNKNOWN_STATUS = "unknown_status";
/**
* Return a local status implementation for the API.
*
* @param api status the API accepts
* @return local implementation
*/
String getLocalStatus(@NonNull String api);
/**
* Return an api status implementation for local usage.
*
* @param local status the local implementation accepts/uses
* @return api implementation
*/
String getApiStatus(@NonNull String local);
/**
* Parse the given object and return a {@link Group} object.
* @throws Exception
*/
Group parse(@NonNull JsonObject object) throws Exception;
}
| [
"abutihere@gmail.com"
] | abutihere@gmail.com |
c641efaacea73f68a41b3cae851d67e22b189c33 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/test/com/thinkaurelius/titan/util/datastructures/BitMapTest.java | 06cc0ba956af81a6d67505ec9f8bba07980f8a63 | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 634 | java | package com.thinkaurelius.titan.util.datastructures;
import org.junit.Assert;
import org.junit.Test;
public class BitMapTest {
@Test
public void testBitMap() {
byte map = BitMap.setBitb(BitMap.createMapb(2), 4);
Assert.assertTrue(BitMap.readBitb(map, 2));
Assert.assertTrue(BitMap.readBitb(map, 4));
map = BitMap.unsetBitb(map, 2);
Assert.assertFalse(BitMap.readBitb(map, 2));
Assert.assertFalse(BitMap.readBitb(map, 3));
Assert.assertFalse(BitMap.readBitb(map, 7));
map = BitMap.setBitb(map, 7);
Assert.assertTrue(BitMap.readBitb(map, 7));
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
37276b958a1c90b5a113a30cf17ec1c0e527c7eb | a9def05b540c52b7a281a097c606a43a9a4b9c97 | /src/main/java/org/bian/dto/SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecord.java | 9ffaefd9fe2b82ad7f19f24e4ca182c1c982a935 | [
"Apache-2.0"
] | permissive | bianapis/sd-commission-agreement-v3 | c7c1e433be33a617e5b77200ac73c032dd84dc14 | fde28ba5ec665b58f6d29818ab3cbafdd371aec7 | refs/heads/master | 2022-12-27T03:32:25.698908 | 2020-09-28T06:57:34 | 2020-09-28T06:57:34 | 298,785,989 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,652 | java | package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.SDCommissionAgreementActivateInputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceConfigurationSetup;
import org.bian.dto.SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceAgreement;
import org.bian.dto.SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceSubscription;
import javax.validation.Valid;
/**
* SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecord
*/
public class SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecord {
private String commissionAgreementServiceConfigurationSettingReference = null;
private String commissionAgreementServiceConfigurationSettingDescription = null;
private SDCommissionAgreementActivateInputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceConfigurationSetup commissionAgreementServiceConfigurationSetup = null;
private SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceSubscription commissionAgreementServiceSubscription = null;
private SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceAgreement commissionAgreementServiceAgreement = null;
private String commissionAgreementServiceStatus = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Refers to the service configuration parameter for the service
* @return commissionAgreementServiceConfigurationSettingReference
**/
public String getCommissionAgreementServiceConfigurationSettingReference() {
return commissionAgreementServiceConfigurationSettingReference;
}
public void setCommissionAgreementServiceConfigurationSettingReference(String commissionAgreementServiceConfigurationSettingReference) {
this.commissionAgreementServiceConfigurationSettingReference = commissionAgreementServiceConfigurationSettingReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Description of the configuration parameter, allowed values and processing impact
* @return commissionAgreementServiceConfigurationSettingDescription
**/
public String getCommissionAgreementServiceConfigurationSettingDescription() {
return commissionAgreementServiceConfigurationSettingDescription;
}
public void setCommissionAgreementServiceConfigurationSettingDescription(String commissionAgreementServiceConfigurationSettingDescription) {
this.commissionAgreementServiceConfigurationSettingDescription = commissionAgreementServiceConfigurationSettingDescription;
}
/**
* Get commissionAgreementServiceConfigurationSetup
* @return commissionAgreementServiceConfigurationSetup
**/
public SDCommissionAgreementActivateInputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceConfigurationSetup getCommissionAgreementServiceConfigurationSetup() {
return commissionAgreementServiceConfigurationSetup;
}
public void setCommissionAgreementServiceConfigurationSetup(SDCommissionAgreementActivateInputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceConfigurationSetup commissionAgreementServiceConfigurationSetup) {
this.commissionAgreementServiceConfigurationSetup = commissionAgreementServiceConfigurationSetup;
}
/**
* Get commissionAgreementServiceSubscription
* @return commissionAgreementServiceSubscription
**/
public SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceSubscription getCommissionAgreementServiceSubscription() {
return commissionAgreementServiceSubscription;
}
public void setCommissionAgreementServiceSubscription(SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceSubscription commissionAgreementServiceSubscription) {
this.commissionAgreementServiceSubscription = commissionAgreementServiceSubscription;
}
/**
* Get commissionAgreementServiceAgreement
* @return commissionAgreementServiceAgreement
**/
public SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceAgreement getCommissionAgreementServiceAgreement() {
return commissionAgreementServiceAgreement;
}
public void setCommissionAgreementServiceAgreement(SDCommissionAgreementActivateOutputModelCommissionAgreementServiceConfigurationRecordCommissionAgreementServiceAgreement commissionAgreementServiceAgreement) {
this.commissionAgreementServiceAgreement = commissionAgreementServiceAgreement;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The status of the offered service (e.g. active, suspended, idle)
* @return commissionAgreementServiceStatus
**/
public String getCommissionAgreementServiceStatus() {
return commissionAgreementServiceStatus;
}
public void setCommissionAgreementServiceStatus(String commissionAgreementServiceStatus) {
this.commissionAgreementServiceStatus = commissionAgreementServiceStatus;
}
}
| [
"spabandara@Virtusa.com"
] | spabandara@Virtusa.com |
b835347a9b2c9ffedae0913bec3ebcd5ed848521 | e1f5731a58d798de898c34600d81edd930d1b54e | /oauth/src/main/java/pl/edu/icm/unity/oauth/as/token/BaseTokenResource.java | cdf0d008fc04ef4f4532cce70ead18eddf608d6d | [] | no_license | comradekingu/unity | dd72d2a02b2bc35a3006341e515deec5839a9483 | 49e9f5dfe21e91996fc4b448dec8818624a10b5c | refs/heads/master | 2020-04-02T01:34:40.684710 | 2018-10-16T10:35:35 | 2018-10-16T10:35:35 | 153,862,984 | 0 | 0 | null | 2018-10-20T02:41:05 | 2018-10-20T02:41:05 | null | UTF-8 | Java | false | false | 3,089 | java | /*
* Copyright (c) 2014 ICM Uniwersytet Warszawski All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package pl.edu.icm.unity.oauth.as.token;
import java.util.Date;
import org.apache.logging.log4j.Logger;
import com.nimbusds.oauth2.sdk.ParseException;
import com.nimbusds.oauth2.sdk.token.BearerAccessToken;
import com.nimbusds.oauth2.sdk.token.BearerTokenError;
import pl.edu.icm.unity.base.token.Token;
import pl.edu.icm.unity.base.utils.Log;
import pl.edu.icm.unity.engine.api.token.TokensManagement;
import pl.edu.icm.unity.oauth.as.OAuthProcessor;
import pl.edu.icm.unity.oauth.as.OAuthToken;
/**
* Common code inherited by OAuth resources
*
* @author K. Benedyczak
*/
public class BaseTokenResource extends BaseOAuthResource
{
private static final Logger log = Log.getLogger(Log.U_SERVER_OAUTH, BaseTokenResource.class);
private TokensManagement tokensManagement;
public BaseTokenResource(TokensManagement tokensManagement)
{
super();
this.tokensManagement = tokensManagement;
}
protected TokensPair resolveBearerToken(String bearerToken) throws OAuthTokenException
{
if (bearerToken == null)
throw new OAuthTokenException(
makeBearerError(BearerTokenError.MISSING_TOKEN, "To access this endpoint "
+ "an access token must be used for authorization"));
BearerAccessToken accessToken;
try
{
accessToken = BearerAccessToken.parse(bearerToken);
} catch (ParseException e)
{
throw new OAuthTokenException(
makeBearerError(BearerTokenError.INVALID_TOKEN, "Must use Bearer access token"));
}
try
{
Token rawToken = tokensManagement.getTokenById(OAuthProcessor.INTERNAL_ACCESS_TOKEN,
accessToken.getValue());
OAuthToken parsedAccessToken = parseInternalToken(rawToken);
return new TokensPair(rawToken, parsedAccessToken);
} catch (IllegalArgumentException e)
{
throw new OAuthTokenException(makeBearerError(BearerTokenError.INVALID_TOKEN));
}
}
protected void extendValidityIfNeeded(Token rawToken, OAuthToken parsedAccessToken) throws OAuthTokenException
{
long newExpiry = System.currentTimeMillis() + ((long)parsedAccessToken.getTokenValidity()*1000);
long maxExpiry = rawToken.getCreated().getTime() + ((long)parsedAccessToken.getMaxExtendedValidity()*1000);
if (maxExpiry < newExpiry)
newExpiry = maxExpiry;
if (newExpiry > rawToken.getExpires().getTime())
{
try
{
tokensManagement.updateToken(OAuthProcessor.INTERNAL_ACCESS_TOKEN, rawToken.getValue(), new Date(newExpiry),
rawToken.getContents());
} catch (IllegalArgumentException e)
{
log.warn("Can't update access token validity, this shouldn't happen", e);
throw new OAuthTokenException(makeBearerError(BearerTokenError.INVALID_TOKEN));
}
rawToken.setExpires(new Date(newExpiry));
}
}
public static class TokensPair
{
public final Token tokenSrc;
public final OAuthToken parsedToken;
public TokensPair(Token tokenSrc, OAuthToken parsedToken)
{
super();
this.tokenSrc = tokenSrc;
this.parsedToken = parsedToken;
}
}
}
| [
"golbi@unity-idm.eu"
] | golbi@unity-idm.eu |
efb9f6e2e884f69542f15974afddf5ac9dc25934 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/90/128.java | 9a0344ad96cb2f09a63b6429bd13d45c9a3e93c8 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 948 | java | package <missing>;
public class GlobalMembers
{
public static void Main()
{
int t;
int[][] a = new int[1000][2];
int k;
int i;
int m;
int n;
int f = new int(int m,int n);
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
t = Integer.parseInt(tempVar);
}
for (i = 0;i < t;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a[i][0] = Integer.parseInt(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead(" ");
if (tempVar3 != null)
{
a[i][1] = Integer.parseInt(tempVar3);
}
}
for (i = 0;i < t;i++)
{
m = a[i][0];
n = a[i][1];
k = f(m, n);
System.out.printf("%d",k);
if (i != t - 1)
{
System.out.print("\n");
}
}
}
public static int f(int m,int n)
{
int k = 0;
if (m == 0 || n == 1)
{
k = 1;
}
else if (m < 0)
{
k = 0;
}
else
{
k = f(m, n - 1) + f(m - n, n);
}
return k;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
607150f425e7c7f0e856e5c1dd39e857605a1007 | ab3eccd0be02fb3ad95b02d5b11687050a147bce | /apis/mapbox-gl/out/src/main/java/js/browser/PerformanceMark.java | 2a3f465cb304e734744633b72b67d7f1ce0a05fa | [] | no_license | ibaca/typescript2java | 263fd104a9792e7be2a20ab95b016ad694a054fe | 0b71b8a3a4c43df1562881f0816509ca4dafbd7e | refs/heads/master | 2021-04-27T10:43:14.101736 | 2018-02-23T11:37:16 | 2018-02-23T11:37:18 | 122,543,398 | 0 | 0 | null | 2018-02-22T22:33:30 | 2018-02-22T22:33:29 | null | UTF-8 | Java | false | false | 507 | java | package js.browser;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
/**
* source type: PerformanceMark
* flags: Object (32768)
* declared in: tsd/browser/lib.es6.d.ts at pos 545286
* declared in: tsd/browser/lib.es6.d.ts at pos 545355
* 1 constructors
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="PerformanceMark")
public class PerformanceMark extends PerformanceEntry
{
/*
Constructors
*/
public PerformanceMark () {
}
}
| [
"ignacio@bacamt.com"
] | ignacio@bacamt.com |
1f9418016969faaf3079dcd253520bb86009e52f | 454eb75d7402c4a0da0e4c30fb91aca4856bbd03 | /o2o/trunk/web/src/main/java/cn/com/dyninfo/o2o/furniture/web/publish/dao/WithdrawalDAO.java | 6d8cd5608f163492f6a90b165c1054099a75113e | [] | no_license | fengclondy/guanhongshijia | 15a43f6007cdf996f57c4d09f61b25143b117d73 | c710fe725022fe82aefcb552ebe6d86dcb598d75 | refs/heads/master | 2020-04-15T16:43:37.291843 | 2016-09-09T05:44:14 | 2016-09-09T05:44:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,031 | java | /*
* Copyright (c) 2009-2016 SHENZHEN Eternal Dynasty Technology Co.,Ltd.
* All rights reserved.
*
* This file contains valuable properties of SHENZHEN Eternal Dynasty
* Technology Co.,Ltd., embodying substantial creative efforts and
* confidential information, ideas and expressions. No part of this
* file may be reproduced or distributed in any form or by any means,
* or stored in a data base or a retrieval system, without the prior
* written permission of SHENZHEN Eternal Dynasty Technology Co.,Ltd.
*
*/
package cn.com.dyninfo.o2o.furniture.web.publish.dao;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import cn.com.dyninfo.o2o.furniture.admin.dao.BaseDAO;
@Repository("withdrawalDAO")
public class WithdrawalDAO extends BaseDAO {
@Autowired
public WithdrawalDAO(SessionFactory sessionFactory) {
super(sessionFactory);
this.table="Withdrawal";
}
}
| [
"leo.cai@9c87f486-7f2d-4350-b948-b2028470fdc6"
] | leo.cai@9c87f486-7f2d-4350-b948-b2028470fdc6 |
232b1aed0cf08b7e61ce4d57bde0f5d08354c50c | 872967c9fa836eee09600f4dbd080c0da4a944c1 | /source/test/org/omg/CORBA/INV_OBJREF.java | def8692cbd678bb790fbde722d4c8be46f52ab88 | [] | no_license | pangaogao/jdk | 7002b50b74042a22f0ba70a9d3c683bd616c526e | 3310ff7c577b2e175d90dec948caa81d2da86897 | refs/heads/master | 2021-01-21T02:27:18.595853 | 2018-10-22T02:45:34 | 2018-10-22T02:45:34 | 101,888,886 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,727 | java | /*
* Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package test.org.omg.CORBA;
/**
* This exception indicates that an object reference is internally
* malformed. For example, the repository ID may have incorrect
* syntax or the addressing information may be invalid. This
* exception is raised by ORB::string_to_object if the passed
* string does not decode correctly. An ORB may choose to detect
* calls via nil references (but is not obliged to do detect them).
* <tt>INV_OBJREF</tt> is used to indicate this.<P>
* It contains a minor code, which gives more detailed information about
* what caused the exception, and a completion status. It may also contain
* a string describing the exception.
* <P>
* See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
* Code Meanings</A> to see the minor codes for this exception.
*
* @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
* Java IDL exceptions</A>
* @since JDK1.2
*/
public final class INV_OBJREF extends SystemException {
/**
* Constructs an <code>INV_OBJREF</code> exception with a default
* minor code of 0 and a completion state of COMPLETED_NO.
*/
public INV_OBJREF() {
this("");
}
/**
* Constructs an <code>INV_OBJREF</code> exception with the specified detail
* message, a minor code of 0, and a completion state of COMPLETED_NO.
* @param s the String containing a detail message
*/
public INV_OBJREF(String s) {
this(s, 0, CompletionStatus.COMPLETED_NO);
}
/**
* Constructs an <code>INV_OBJREF</code> exception with the specified
* minor code and completion status.
* @param minor the minor code
* @param completed a <code>CompletionStatus</code> instance indicating
* the completion status
*/
public INV_OBJREF(int minor, CompletionStatus completed) {
this("", minor, completed);
}
/**
* Constructs an <code>INV_OBJREF</code> exception with the specified detail
* message, minor code, and completion status.
* A detail message is a String that describes this particular exception.
* @param s the String containing a detail message
* @param minor the minor code
* @param completed a <code>CompletionStatus</code> instance indicating
* the completion status
*/
public INV_OBJREF(String s, int minor, CompletionStatus completed) {
super(s, minor, completed);
}
}
| [
"gaopanpan@meituan.com"
] | gaopanpan@meituan.com |
b20e7bf675ae8a2eb1dac64b1263ef445da6b4b0 | c0e4430afc85ab61f93bbcda31f6fb479e539140 | /src/main/java/iyunu/NewTLOL/ibatis/PartnerType.java | c80dce862c194d025b555a029aea86ed934ca01b | [] | no_license | Liuguozhu/MyWork | 68e0b5bca566b16f7da59f229e493875d3b7a943 | 86a6c7eac8cf50e839a4ce018e399d7e26648a33 | refs/heads/master | 2021-05-29T18:14:28.386853 | 2015-08-28T09:14:49 | 2015-08-28T09:30:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,330 | java | package iyunu.NewTLOL.ibatis;
import iyunu.NewTLOL.json.PartnerJson;
import iyunu.NewTLOL.model.partner.instance.Partner;
import iyunu.NewTLOL.server.partner.PartnerServer;
import iyunu.NewTLOL.util.Translate;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.ibatis.sqlmap.engine.type.TypeHandler;
public class PartnerType implements TypeHandler {
@Override
public boolean equals(Object arg0, String arg1) {
return false;
}
@Override
public Object getResult(ResultSet rs, String parameter) throws SQLException {
String v = rs.getString(parameter);
ArrayList<Partner> list = new ArrayList<Partner>();
if (v != null) {
String[] strs = v.split("#");
for (String string : strs) {
String[] str = string.split("!");
Partner partner = PartnerJson.instance().getPartner(Translate.stringToInt(str[0]));
partner.decode(str[1]);
PartnerServer.countPotential(partner);
list.add(partner);
}
}
return list;
}
@Override
public Object getResult(ResultSet rs, int parameter) throws SQLException {
String v = rs.getString(parameter);
ArrayList<Partner> list = new ArrayList<Partner>();
if (v != null) {
String[] strs = v.split("#");
for (String string : strs) {
String[] str = string.split("!");
Partner partner = PartnerJson.instance().getPartner(Translate.stringToInt(str[0]));
partner.decode(str[1]);
PartnerServer.countPotential(partner);
list.add(partner);
}
}
return list;
}
@Override
public Object getResult(CallableStatement arg0, int arg1) throws SQLException {
return null;
}
@Override
public void setParameter(PreparedStatement prmt, int index, Object parameter, String jdbcType) throws SQLException {
@SuppressWarnings("unchecked")
List<Partner> partners = (List<Partner>) parameter;
if (partners.size() == 0) {
prmt.setString(index, "");
} else {
String str = "";
for (Partner partner : partners) {
str += "#" + partner.getIndex() + "!" + partner.encode();
}
prmt.setString(index, str.substring(1));
}
}
@Override
public Object valueOf(String arg0) {
return null;
}
}
| [
"fhyfhy17@163.com"
] | fhyfhy17@163.com |
ce1f54f71532f78d5d357e5f0a918e770d6bc353 | 9343f47db5dc52e6eca3e572d360983348975c31 | /projects/OG-Util/src/main/java/com/opengamma/util/jms/SpringJmsTopicContainerFactory.java | 3566e6a337f4fe2937f23b1e4124c9d091f140d5 | [
"Apache-2.0"
] | permissive | amkimian/OG-Platform | 323784bf3fea8a8af5fb524bcb4318d613eb6d9a | 11e9c34c571bef4a1b515f3704aeedeb2beb15c8 | refs/heads/master | 2021-01-20T20:57:29.978541 | 2013-02-19T19:40:06 | 2013-02-19T19:40:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,515 | java | /**
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.util.jms;
import javax.jms.ConnectionFactory;
import org.springframework.jms.listener.AbstractMessageListenerContainer;
import org.springframework.jms.listener.DefaultMessageListenerContainer;
import com.opengamma.OpenGammaRuntimeException;
import com.opengamma.util.ArgumentChecker;
/**
* Container used to receive JMS messages.
*/
public class SpringJmsTopicContainerFactory implements JmsTopicContainerFactory {
/**
* The JMS connection factory.
*/
private final ConnectionFactory _connectionFactory;
/**
* Creates an instance.
*
* @param connectionFactory the JMS connection factory, not null
*/
public SpringJmsTopicContainerFactory(ConnectionFactory connectionFactory) {
ArgumentChecker.notNull(connectionFactory, "connectionFactory");
_connectionFactory = connectionFactory;
}
//-------------------------------------------------------------------------
/**
* Gets the connection factory.
*
* @return the connection factory, not null
*/
public ConnectionFactory getConnectionFactory() {
return _connectionFactory;
}
//-------------------------------------------------------------------------
@Override
public JmsTopicContainer create(String topicName, Object listener) {
AbstractMessageListenerContainer jmsContainer = doCreate(_connectionFactory, topicName, listener);
return new SpringJmsTopicContainer(jmsContainer);
}
/**
* Creates a container to receive JMS messages.
*
* @param connectionFactory the JMS connection factory, not null
* @param topicName the topic name, not null
* @param listener the listener, not null
* @return the container, not null
*/
protected AbstractMessageListenerContainer doCreate(ConnectionFactory connectionFactory, String topicName, Object listener) {
DefaultMessageListenerContainer jmsContainer = new DefaultMessageListenerContainer();
jmsContainer.setConnectionFactory(connectionFactory);
jmsContainer.setDestinationName(topicName);
jmsContainer.setPubSubDomain(true);
jmsContainer.setMessageListener(listener);
return jmsContainer;
}
//-------------------------------------------------------------------------
@Override
public String toString() {
return SpringJmsTopicContainerFactory.class.getSimpleName();
}
//-------------------------------------------------------------------------
/**
* Container used to receive JMS messages.
*/
class SpringJmsTopicContainer implements JmsTopicContainer {
/**
* The JMS container.
*/
private final AbstractMessageListenerContainer _jmsContainer;
/**
* Creates an instance.
*
* @param jmsContainer the container, not null
*/
SpringJmsTopicContainer(AbstractMessageListenerContainer jmsContainer) {
ArgumentChecker.notNull(jmsContainer, "jmsContainer");
if (jmsContainer.isPubSubDomain() == false) {
throw new OpenGammaRuntimeException("Underlying Spring container must be topic based");
}
_jmsContainer = jmsContainer;
_jmsContainer.afterPropertiesSet();
}
@Override
public void start() {
_jmsContainer.start();
}
@Override
public void stop() {
_jmsContainer.stop();
}
@Override
public boolean isRunning() {
return _jmsContainer.isRunning();
}
}
}
| [
"stephen@opengamma.com"
] | stephen@opengamma.com |
6de50600bb1a0db28d6b829c1c58f9b8046d834d | 6fa942cc6adb2b71f890674ddf9232552fe4c961 | /src/main/java/eu/saltyscout/booleregion/plugin/session/Session.java | 816074472fa988ca7ff3211ef869376b5f55a281 | [] | no_license | PeterKr46/boole-region | 1aeb74553a858b8f6fe067a1598fa86397ea384d | 3fab900b935fa9e6f2c0c31d2f39fb4c16d657c0 | refs/heads/master | 2020-06-12T23:21:02.911329 | 2019-03-02T20:08:05 | 2019-03-02T20:08:05 | 75,479,145 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 573 | java | package eu.saltyscout.booleregion.plugin.session;
import java.util.UUID;
/**
* Created by Peter on 03-Dec-16.
*/
public interface Session {
/**
* @return the time the session was started as a UNIX timestamp.
*/
long getSessionStart();
/**
* @return the Clipboard for this Session.
*/
Clipboard getClipboard();
/**
*
* @return the Player this Session belongs to.
*/
UUID getOwner();
/**
* @return true if the Owner of this Session is online.
*/
boolean isOwnerOnline();
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
b8d59e24f2f28adbfcaa08d646adab50e20e55e5 | c173fc0a3d23ffda1a23b87da425036a6b890260 | /hrsaas/src/org/paradyne/sql/D1/ITApplicationModelSql.java | bf1ebb986c2b98e107cfd72db9d4b5529baf064c | [
"Apache-2.0"
] | permissive | ThirdIInc/Third-I-Portal | a0e89e6f3140bc5e5d0fe320595d9b02d04d3124 | f93f5867ba7a089c36b1fce3672344423412fa6e | refs/heads/master | 2021-06-03T05:40:49.544767 | 2016-08-03T07:27:44 | 2016-08-03T07:27:44 | 62,725,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,029 | java | package org.paradyne.sql.D1;
import org.paradyne.lib.SqlBase;
/**
* @author aa1381
*
*/
public class ITApplicationModelSql extends SqlBase {
/** (non-Javadoc).
* @see org.paradyne.lib.SqlBase#getQuery(int)
* @return String.
* @param id - Used to select specific query.
*/
public String getQuery(final int id) {
switch (id) {
case 1:
return " INSERT INTO HRMS_D1_IT_SEC_APPLICATIONS(APPLN_ID,APPLN_NAME,APPLN_SECTION,APPLN_ACTIVE) " + " VALUES(?,?,?,?)";
case 2:
return " UPDATE HRMS_D1_IT_SEC_APPLICATIONS SET APPLN_NAME=? ,APPLN_SECTION=?,APPLN_ACTIVE=? WHERE APPLN_ID=? ";
case 3:
return " SELECT APPLN_ID,APPLN_NAME,CASE WHEN APPLN_ACTIVE='Y' THEN 'Yes' ELSE 'No' END FROM HRMS_D1_IT_SEC_APPLICATIONS ORDER BY APPLN_NAME ";
case 4:
return " DELETE from HRMS_D1_IT_SEC_APPLICATIONS WHERE APPLN_ID=? ";
default:
return "Framework could not the query number specified";
}
}
}
| [
"Jigar.V@jigar_vasani.THIRDI.COM"
] | Jigar.V@jigar_vasani.THIRDI.COM |
c2e469644b491fa38e999f445694bc73d4c43585 | 8b9190a8c5855d5753eb8ba7003e1db875f5d28f | /sources/com/google/android/gms/measurement/internal/zzas.java | ccb53ec6a23e68fba06628c1cba74ef942da47b4 | [] | no_license | stevehav/iowa-caucus-app | 6aeb7de7487bd800f69cb0b51cc901f79bd4666b | e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044 | refs/heads/master | 2020-12-29T10:25:28.354117 | 2020-02-05T23:15:52 | 2020-02-05T23:15:52 | 238,565,283 | 21 | 3 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package com.google.android.gms.measurement.internal;
import com.google.android.gms.internal.measurement.zzjh;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@17.0.1 */
final /* synthetic */ class zzas implements zzdz {
static final zzdz zza = new zzas();
private zzas() {
}
public final Object zza() {
return Integer.valueOf((int) zzjh.zzz());
}
}
| [
"steve@havelka.co"
] | steve@havelka.co |
c3bebcfb48ce11e6046e32bf9f729c0ec695e4d9 | aa6997aba1475b414c1688c9acb482ebf06511d9 | /src/com/sun/corba/se/PortableActivationIDL/RepositoryPackage/ServerDef.java | afbf2a27951173b8a7f8ca524b7f7045113c7413 | [] | no_license | yueny/JDKSource1.8 | eefb5bc88b80ae065db4bc63ac4697bd83f1383e | b88b99265ecf7a98777dd23bccaaff8846baaa98 | refs/heads/master | 2021-06-28T00:47:52.426412 | 2020-12-17T13:34:40 | 2020-12-17T13:34:40 | 196,523,101 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,338 | java | package com.sun.corba.se.PortableActivationIDL.RepositoryPackage;
/**
* com/sun/corba/se/PortableActivationIDL/RepositoryPackage/ServerDef.java . Generated by the
* IDL-to-Java compiler (portable), version "3.2" from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u60/4407/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Tuesday, August 4, 2015 11:07:52 AM PDT
*/
public final class ServerDef implements org.omg.CORBA.portable.IDLEntity {
public String applicationName = null;
// serverName values.
public String serverName = null;
// Class name of server's main class.
public String serverClassPath = null;
// class path used to run the server.
public String serverArgs = null;
// arguments passed to the server
public String serverVmArgs = null;
// arguments passed to the server's Java VM1
public boolean isInstalled = false;
public ServerDef() {
} // ctor
public ServerDef(String _applicationName, String _serverName, String _serverClassPath,
String _serverArgs, String _serverVmArgs, boolean _isInstalled) {
applicationName = _applicationName;
serverName = _serverName;
serverClassPath = _serverClassPath;
serverArgs = _serverArgs;
serverVmArgs = _serverVmArgs;
isInstalled = _isInstalled;
} // ctor
} // class ServerDef
| [
"yueny09@163.com"
] | yueny09@163.com |
949f4947b4ae478c1f8c0ede2e2579810fc16350 | c81963cab526c4dc24bee21840f2388caf7ff4cf | /com/google/protobuf/ByteOutput.java | 43103e9facbddf5c7f175b64093db507a84fde0c | [] | no_license | ryank231231/jp.co.penet.gekidanprince | ba2f38e732828a4454402aa7ef93a501f8b7541e | d76db01eeadf228d31006e4e71700739edbf214f | refs/heads/main | 2023-02-19T01:38:54.459230 | 2021-01-16T10:04:22 | 2021-01-16T10:04:22 | 329,815,191 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 731 | java | package com.google.protobuf;
import java.io.IOException;
import java.nio.ByteBuffer;
public abstract class ByteOutput {
public abstract void write(byte paramByte) throws IOException;
public abstract void write(ByteBuffer paramByteBuffer) throws IOException;
public abstract void write(byte[] paramArrayOfbyte, int paramInt1, int paramInt2) throws IOException;
public abstract void writeLazy(ByteBuffer paramByteBuffer) throws IOException;
public abstract void writeLazy(byte[] paramArrayOfbyte, int paramInt1, int paramInt2) throws IOException;
}
/* Location: Y:\classes2-dex2jar.jar!\com\google\protobuf\ByteOutput.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"ryank231231@gmail.com"
] | ryank231231@gmail.com |
9ff10274624e444232ccc9011757101b537099ee | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE190_Integer_Overflow/s02/CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74a.java | efe332910cd9cfc5bf0972ab3964a6a41a600711 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 5,468 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74a.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-74a.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter())
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE190_Integer_Overflow.s02;
import testcasesupport.*;
import java.util.HashMap;
import javax.servlet.http.*;
import java.util.StringTokenizer;
import java.util.logging.Level;
public class CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */
/* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */
{
StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&");
while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken(); /* a token will be like "id=33" */
if(token.startsWith("id=")) /* check if we have the "id" parameter" */
{
try
{
data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat);
}
break; /* exit while loop */
}
}
}
HashMap<Integer,Integer> dataHashMap = new HashMap<Integer,Integer>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74b()).badSink(dataHashMap , request, response );
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
goodB2G(request, response);
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
HashMap<Integer,Integer> dataHashMap = new HashMap<Integer,Integer>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74b()).goodG2BSink(dataHashMap , request, response );
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */
/* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */
{
StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&");
while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken(); /* a token will be like "id=33" */
if(token.startsWith("id=")) /* check if we have the "id" parameter" */
{
try
{
data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat);
}
break; /* exit while loop */
}
}
}
HashMap<Integer,Integer> dataHashMap = new HashMap<Integer,Integer>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE190_Integer_Overflow__int_getQueryString_Servlet_add_74b()).goodB2GSink(dataHashMap , request, response );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
7196f343956c9e0360e7a4a5fc0cfd9ba5f21992 | fec4c1754adce762b5c4b1cba85ad057e0e4744a | /jfMsgService/src/main/java/com/jf/service/MemberSupplementarySignInService.java | 89e70e37c4e996481fa9f9087a9ccb1cf999abad | [] | no_license | sengeiou/workspace_xg | 140b923bd301ff72ca4ae41bc83820123b2a822e | 540a44d550bb33da9980d491d5c3fd0a26e3107d | refs/heads/master | 2022-11-30T05:28:35.447286 | 2020-08-19T02:30:25 | 2020-08-19T02:30:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,088 | java | package com.jf.service;
import com.jf.common.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jf.dao.MemberSupplementarySignInMapper;
import com.jf.entity.MemberSupplementarySignIn;
import com.jf.entity.MemberSupplementarySignInExample;
@Service
@Transactional
public class MemberSupplementarySignInService extends BaseService<MemberSupplementarySignIn, MemberSupplementarySignInExample> {
@Autowired
private MemberSupplementarySignInMapper memberSupplementarySignInMapper;
@Autowired
public void setMemberSupplementarySignInMapper(MemberSupplementarySignInMapper memberSupplementarySignInMapper) {
this.setDao(memberSupplementarySignInMapper);
this.memberSupplementarySignInMapper = memberSupplementarySignInMapper;
}
public void closeSupplementaryStatus(MemberSupplementarySignIn memberSupplementarySignIn) {
memberSupplementarySignIn.setStatus("3");
updateByPrimaryKeySelective(memberSupplementarySignIn);
}
}
| [
"397716215@qq.com"
] | 397716215@qq.com |
a1098fe187a587104a4a33d5bb76c961ac8f2432 | 1b0388a68f79739f849ab95eaa06df44801f4ae0 | /projectlibre_exchange/src/com/projectlibre/core/pm/exchange/converters/mpx/MpxOptionsConverter.java | 6790ccda612a83ebd72a29e29c6f43fe930cdba5 | [] | no_license | jraselin/projectlibre | c3b76335c843d4fc45996e903a86e405a90f6be1 | 4f73f9af0d5b92b725efae5cb101135f264f4e99 | refs/heads/master | 2023-02-24T16:53:53.345244 | 2021-01-27T22:10:49 | 2021-01-27T22:10:49 | 331,617,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,464 | java | /*******************************************************************************
* The contents of this file are subject to the Common Public Attribution License
* Version 1.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.projectlibre.com/license . The License is based on the Mozilla Public
* License Version 1.1 but Sections 14 and 15 have been added to cover use of
* software over a computer network and provide for limited attribution for the
* Original Developer. In addition, Exhibit A has been modified to be consistent
* with Exhibit B.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
* specific language governing rights and limitations under the License. The
* Original Code is ProjectLibre. The Original Developer is the Initial Developer
* and is ProjectLibre Inc. All portions of the code written by ProjectLibre are
* Copyright (c) 2012-2019. All Rights Reserved. All portions of the code written by
* ProjectLibre are Copyright (c) 2012-2019. All Rights Reserved. Contributor
* ProjectLibre, Inc.
*
* Alternatively, the contents of this file may be used under the terms of the
* ProjectLibre End-User License Agreement (the ProjectLibre License) in which case
* the provisions of the ProjectLibre License are applicable instead of those above.
* If you wish to allow use of your version of this file only under the terms of the
* ProjectLibre License and not to allow others to use your version of this file
* under the CPAL, indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by the ProjectLibre
* License. If you do not delete the provisions above, a recipient may use your
* version of this file under either the CPAL or the ProjectLibre Licenses.
*
*
* [NOTE: The text of this Exhibit A may differ slightly from the text of the notices
* in the Source Code files of the Original Code. You should use the text of this
* Exhibit A rather than the text found in the Original Code Source Code for Your
* Modifications.]
*
* EXHIBIT B. Attribution Information for ProjectLibre required
*
* Attribution Copyright Notice: Copyright (c) 2012-2019, ProjectLibre, Inc.
* Attribution Phrase (not exceeding 10 words):
* ProjectLibre, open source project management software.
* Attribution URL: http://www.projectlibre.com
* Graphic Image as provided in the Covered Code as file: projectlibre-logo.png with
* alternatives listed on http://www.projectlibre.com/logo
*
* Display of Attribution Information is required in Larger Works which are defined
* in the CPAL as a work which combines Covered Code or portions thereof with code
* not governed by the terms of the CPAL. However, in addition to the other notice
* obligations, all copies of the Covered Code in Executable and Source Code form
* distributed must, as a form of attribution of the original author, include on
* each user interface screen the "ProjectLibre" logo visible to all users.
* The ProjectLibre logo should be located horizontally aligned with the menu bar
* and left justified on the top left of the screen adjacent to the File menu. The
* logo must be at least 144 x 31 pixels. When users click on the "ProjectLibre"
* logo it must direct them back to http://www.projectlibre.com.
*******************************************************************************/
package com.projectlibre.core.pm.exchange.converters.mpx;
import com.projectlibre.pm.calendar.CalendarOptions;
/**
* @author Laurent Chretienneau
*
*/
public class MpxOptionsConverter {
public void from(net.sf.mpxj.ProjectProperties projectHeader, CalendarOptions calendarOptions, MpxImportState state) {
calendarOptions.setDaysPerMonth(projectHeader.getDaysPerMonth().doubleValue());
calendarOptions.setHoursPerWeek(projectHeader.getMinutesPerWeek().doubleValue()/60.0D);
calendarOptions.setHoursPerDay(projectHeader.getMinutesPerDay().doubleValue()/60.0D);
calendarOptions.setDefaultStart(projectHeader.getDefaultStartTime() == null ?
0L : projectHeader.getDefaultStartTime().getTime());
calendarOptions.setDefaultEnd(projectHeader.getDefaultEndTime() == null ?
0L : projectHeader.getDefaultEndTime().getTime());
}
}
| [
"jraselin@gmail.com"
] | jraselin@gmail.com |
fd12e88ad31ee11d2d58b31997de925a3cb3147e | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/boot/svg/a/a/g.java | 4763323912c2af5f53dd2c5ee313f7ef69a66779 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,616 | java | package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
import com.tencent.smtt.sdk.WebView;
public final class g extends c {
private final int height = 96;
private final int width = 96;
public final int a(int i, Object... objArr) {
switch (i) {
case 0:
return 96;
case 1:
return 96;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
Matrix h = c.h(looper);
float[] g = c.g(looper);
Paint k = c.k(looper);
k.setFlags(385);
k.setStyle(Style.FILL);
Paint k2 = c.k(looper);
k2.setFlags(385);
k2.setStyle(Style.STROKE);
k.setColor(WebView.NIGHT_MODE_COLOR);
k2.setStrokeWidth(1.0f);
k2.setStrokeCap(Cap.BUTT);
k2.setStrokeJoin(Join.MITER);
k2.setStrokeMiter(4.0f);
k2.setPathEffect(null);
c.a(k2, looper).setStrokeWidth(1.0f);
canvas.save();
Paint a = c.a(k, looper);
a.setColor(-1);
g = c.a(g, 1.0f, 0.0f, 9.0f, 0.0f, 1.0f, 21.0f);
h.reset();
h.setValues(g);
canvas.concat(h);
canvas.save();
Paint a2 = c.a(a, looper);
Path l = c.l(looper);
l.moveTo(16.0f, 3.0f);
l.cubicTo(27.571133f, -2.8609138f, 43.519093f, -0.13518363f, 52.0f, 10.0f);
l.cubicTo(55.015995f, 12.687686f, 56.702606f, 16.060032f, 58.0f, 20.0f);
l.cubicTo(53.84834f, 22.386908f, 54.956116f, 27.709045f, 55.0f, 32.0f);
l.cubicTo(51.89227f, 32.106026f, 48.828426f, 31.668318f, 46.0f, 32.0f);
l.cubicTo(40.42531f, 34.334362f, 40.385387f, 43.516293f, 46.0f, 46.0f);
l.cubicTo(47.032036f, 45.804314f, 48.23961f, 46.003273f, 49.0f, 46.0f);
l.cubicTo(42.640858f, 51.18614f, 33.9583f, 53.921818f, 25.0f, 53.0f);
l.cubicTo(21.613102f, 52.42963f, 18.130098f, 50.758377f, 15.0f, 50.0f);
l.cubicTo(10.964495f, 49.7039f, 7.6112313f, 51.295567f, 4.0f, 52.0f);
l.cubicTo(4.4276276f, 48.201763f, 7.4315925f, 44.073376f, 5.0f, 41.0f);
l.cubicTo(0.8348453f, 35.28936f, -0.87172616f, 28.425297f, 3.5527137E-15f, 22.0f);
l.cubicTo(1.9625797f, 13.652635f, 8.1102295f, 6.758725f, 16.0f, 3.0f);
l.lineTo(16.0f, 3.0f);
l.close();
WeChatSVGRenderC2Java.setFillType(l, 2);
canvas.drawPath(l, a2);
canvas.restore();
canvas.save();
a2 = c.a(a, looper);
l = c.l(looper);
l.moveTo(59.0f, 25.0f);
l.cubicTo(60.022385f, 23.507645f, 63.989056f, 23.527437f, 65.0f, 25.0f);
l.cubicTo(65.397224f, 28.960669f, 65.11956f, 32.513546f, 65.0f, 36.0f);
l.cubicTo(68.62015f, 36.086216f, 72.041405f, 35.95756f, 75.0f, 36.0f);
l.cubicTo(78.40791f, 35.710144f, 78.48725f, 39.896404f, 77.0f, 42.0f);
l.cubicTo(73.34049f, 42.5289f, 69.1854f, 41.727276f, 65.0f, 42.0f);
l.cubicTo(65.16914f, 45.20098f, 65.29806f, 48.42727f, 65.0f, 52.0f);
l.cubicTo(65.26831f, 54.563156f, 60.756218f, 54.444397f, 59.0f, 53.0f);
l.cubicTo(58.336548f, 49.476307f, 59.0803f, 45.646328f, 59.0f, 42.0f);
l.cubicTo(55.440876f, 41.945f, 52.01962f, 42.06376f, 49.0f, 42.0f);
l.cubicTo(45.16719f, 42.509106f, 45.117607f, 35.621075f, 49.0f, 36.0f);
l.cubicTo(51.970036f, 35.95756f, 55.411125f, 36.086216f, 59.0f, 36.0f);
l.cubicTo(58.93155f, 32.513546f, 58.643967f, 28.970564f, 59.0f, 25.0f);
l.lineTo(59.0f, 25.0f);
l.close();
WeChatSVGRenderC2Java.setFillType(l, 2);
canvas.drawPath(l, a2);
canvas.restore();
canvas.restore();
c.j(looper);
break;
}
return 0;
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
66f6c4e408ba3c7c732f277ad148a3a08b248ef6 | 6c41293019b5b47de468dbd7d3a37072caf77308 | /src/main/java/wechart/quartz/ScheduledGetFileTasks.java | 3141cbabf49ded7efaae3291aba2bdd36a864bc2 | [] | no_license | codergithut/springboot-redis-wechart | f087c6f13b67f6b24fb7354651cf0b73d71b5c8b | 13e3697f5984e356bd118bbcd01d01bf6060b6b8 | refs/heads/master | 2021-01-02T22:20:14.980012 | 2017-08-22T11:59:54 | 2017-08-22T11:59:54 | 99,320,420 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,867 | java | package wechart.quartz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.data.mongodb.core.IndexOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.index.Index;
import org.springframework.data.mongodb.core.query.Order;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.stereotype.Component;
import wechart.config.CommonValue;
import wechart.model.TalkHistoryContent;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* @author <a href="mailto:tianjian@gtmap.cn">tianjian</a>
* @version 1.0, 2017/2/13
* @description 定时器启动到指定文件夹下获取数据并上传到消费接受中心
*/
@Component
@Configurable
public class ScheduledGetFileTasks {
@Autowired
MongoTemplate mongoTemplate;
@Autowired
SetOperations setOperations;
public void saveHistoryContent() throws Exception {
IndexOperations io = mongoTemplate.indexOps("talkHistoryContent");
Index index = new Index();
index.on("members", Order.ASCENDING); //为name属性加上 索引
io.ensureIndex(index);
Set<String> keys = setOperations.members(CommonValue.HISTORYCONTENT);
for(String key : keys) {
Set<String> contents = setOperations.members(key);
String[] members = key.split("_");
TalkHistoryContent talkHistoryContent = new TalkHistoryContent();
talkHistoryContent.setMembers(members);
List<String> files = new ArrayList<String>();
for(String content : contents) {
files.add(content);
}
mongoTemplate.save(talkHistoryContent);
}
}
}
| [
"1731857742@qq.com"
] | 1731857742@qq.com |
a7090be8dfea360db759e7ab9804df551ee56c46 | a08f0c2e3e492c364f035d3b3b5fc4c29611e7c9 | /poi-application/ExcelDemosWithPOI/src/com/howtodoinjava/demo/poi/ExcelFormulaDemo.java | 37c9967c55a900e5b927d10d174839ce931ecf43 | [] | no_license | chamanbharti/java-works | 9832eb8ba6a81c88250fa81a71fa9db728993cd3 | aec6b503bde515dc174b23404c936635a7f59add | refs/heads/master | 2023-04-26T16:49:48.915313 | 2021-05-31T12:44:50 | 2021-05-31T12:44:50 | 328,213,982 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,904 | java | package com.howtodoinjava.demo.poi;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Iterator;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class ExcelFormulaDemo
{
public static void main(String[] args)
{
XSSFWorkbook workbook = new XSSFWorkbook();
XSSFSheet sheet = workbook.createSheet("Calculate Simple Interest");
Row header = sheet.createRow(0);
header.createCell(0).setCellValue("Pricipal");
header.createCell(1).setCellValue("RoI");
header.createCell(2).setCellValue("Time");
header.createCell(3).setCellValue("Interest (P r t)");
Row dataRow = sheet.createRow(1);
dataRow.createCell(0).setCellValue(14500d);
dataRow.createCell(1).setCellValue(9.25);
dataRow.createCell(2).setCellValue(3d);
dataRow.createCell(3).setCellFormula("A2*B2*C2");
try {
FileOutputStream out = new FileOutputStream(new File("formulaDemo.xlsx"));
workbook.write(out);
out.close();
System.out.println("Excel written successfully..");
readSheetWithFormula();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void readSheetWithFormula()
{
try
{
FileInputStream file = new FileInputStream(new File("formulaDemo.xlsx"));
//Create Workbook instance holding reference to .xlsx file
XSSFWorkbook workbook = new XSSFWorkbook(file);
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
//Get first/desired sheet from the workbook
XSSFSheet sheet = workbook.getSheetAt(0);
//Iterate through each rows one by one
Iterator<Row> rowIterator = sheet.iterator();
while (rowIterator.hasNext())
{
Row row = rowIterator.next();
//For each row, iterate through all the columns
Iterator<Cell> cellIterator = row.cellIterator();
while (cellIterator.hasNext())
{
Cell cell = cellIterator.next();
//If it is formula cell, it will be evaluated otherwise no change will happen
switch (evaluator.evaluateInCell(cell).getCellType())
{
case Cell.CELL_TYPE_NUMERIC:
System.out.print(cell.getNumericCellValue() + "\t\t");
break;
case Cell.CELL_TYPE_STRING:
System.out.print(cell.getStringCellValue() + "\t\t");
break;
case Cell.CELL_TYPE_FORMULA:
//Not again
break;
}
}
System.out.println("");
}
file.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
| [
"chaman.bharti84@gmail.com"
] | chaman.bharti84@gmail.com |
5e839f904eff7efdde474ebb536c487ce9292a85 | a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f | /src/main/java/pnc/mesadmin/dto/GetAllReaInfo/GetAllReaInfoRes.java | 6b300c07b5adbc6b88df7e6e5313bea5c634d2e6 | [] | no_license | pnc-mes/base | b88583929e53670340a704f848e4e9e2027f1334 | 162135b8752b4edc397b218ffd26664929f6920d | refs/heads/main | 2023-01-07T22:06:10.794300 | 2020-10-27T07:47:20 | 2020-10-27T07:47:20 | 307,621,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 975 | java | package pnc.mesadmin.dto.GetAllReaInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* 公司名称:驭航信息技术(上海)有限公司
* 系统名称:PNC-MES管理系统
* 子系统名称:获取 原因 列表 信息DTO返回业务数据实体类Res
* 创建人:张亮亮
* 创建时间:2017-5-31
* 修改人:
* 修改时间:
*/
public class GetAllReaInfoRes implements Serializable{
@JsonProperty("Status")
private String Status;
@JsonProperty("Body")
private GetAllReaInfoResB Body;
@JsonIgnore
public String getStatus() {
return Status;
}
@JsonIgnore
public void setStatus(String status) {
Status = status;
}
@JsonIgnore
public GetAllReaInfoResB getBody() {
return Body;
}
@JsonIgnore
public void setBody(GetAllReaInfoResB body) {
Body = body;
}
}
| [
"95887577@qq.com"
] | 95887577@qq.com |
f023bd82dbc57ddb288b94940bd861bcd565de5f | 8810972d0375c0a853e3a66bd015993932be9fad | /org.modelica.uml.sysml/src/org/modelica/uml/sysml/ModelicaClassifier.java | 82e4439b072ba8fe97f4ac55eb4682a4bd47bc14 | [] | no_license | OpenModelica/MDT | 275ffe4c61162a5292d614cd65eb6c88dc58b9d3 | 9ffbe27b99e729114ea9a4b4dac4816375c23794 | refs/heads/master | 2020-09-14T03:35:05.384414 | 2019-11-27T22:35:04 | 2019-11-27T23:08:29 | 222,999,464 | 3 | 2 | null | 2019-11-27T23:08:31 | 2019-11-20T18:15:27 | Java | UTF-8 | Java | false | false | 462 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.modelica.uml.sysml;
import org.eclipse.uml2.uml.Classifier;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Modelica Classifier</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.modelica.uml.sysml.SysmlPackage#getModelicaClassifier()
* @model
* @generated
*/
public interface ModelicaClassifier extends Classifier {
} // ModelicaClassifier | [
"adrian.pop@liu.se"
] | adrian.pop@liu.se |
ae9d2401a8e1366add234aef8072d392025d2558 | 13e8d50f75ee607d69e60b39483ca2d9d309c8cc | /SWT/src/chapter_13_19_10/Popup.java | 930163a1101fd7cb0c7d5c65dda5e6ef644ac1d5 | [] | no_license | xgdsmileboy/SWING-SWT-TIJ | 852773bc1a6cabf794d60ad5ab4ade2e80efa8df | 4a5ca48d70c5714ccbaa12f41835cdbf4fc4ce6f | refs/heads/master | 2020-12-24T15:23:12.926710 | 2015-05-08T05:46:30 | 2015-05-08T05:46:30 | 35,258,830 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,520 | java | package chapter_13_19_10;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Text;
import borderLayout.BorderData;
import borderLayout.BorderLayout;
import chapter_13_19_3.Show;
public class Popup extends Composite {
Menu popup;
Text t;
public Popup(Composite parent, int style){
super(parent, style);
SelectionListener a1 = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
t.setText(((MenuItem)e.getSource()).getText());
}
};
this.setLayout(new BorderLayout());
popup = new Menu(getShell(), SWT.POP_UP);
t = new Text(this, SWT.SINGLE | SWT.BORDER);
t.setLayoutData(BorderData.NORTH);
MenuItem m = new MenuItem(popup, SWT.PUSH);
m.setText("Hither");
m.addSelectionListener(a1);
m = new MenuItem(popup, SWT.PUSH);
m.setText("Yon");
m.addSelectionListener(a1);
m = new MenuItem(popup, SWT.PUSH);
m.setText("Afar");
m.addSelectionListener(a1);
m = new MenuItem(popup, SWT.SEPARATOR);
m = new MenuItem(popup, SWT.PUSH);
m.setText("Stay Here");
m.addSelectionListener(a1);
t.setMenu(popup);
this.setMenu(popup);
}
public static void main(String[] args) {
Show.inFrame(new Popup(Show.shell, SWT.NONE), 200, 150);
}
}
| [
"xgd_smileboy@163.com"
] | xgd_smileboy@163.com |
d46e50fdb6d540f37cebe44112e9deb417b71976 | df48dc6e07cdf202518b41924444635f30d60893 | /jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlSeriesNameLevel.java | dd3e6a556f3b43fb493aa964e8b85ae5c9dbc183 | [
"MIT"
] | permissive | ashwanikaggarwal/jinx-com4j | efc38cc2dc576eec214dc847cd97d52234ec96b3 | 41a3eaf71c073f1282c2ab57a1c91986ed92e140 | refs/heads/master | 2022-03-29T12:04:48.926303 | 2020-01-10T14:11:17 | 2020-01-10T14:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 542 | java | package com.exceljava.com4j.excel ;
import com4j.*;
/**
*/
public enum XlSeriesNameLevel implements ComEnum {
/**
* <p>
* The value of this constant is -3
* </p>
*/
xlSeriesNameLevelNone(-3),
/**
* <p>
* The value of this constant is -2
* </p>
*/
xlSeriesNameLevelCustom(-2),
/**
* <p>
* The value of this constant is -1
* </p>
*/
xlSeriesNameLevelAll(-1),
;
private final int value;
XlSeriesNameLevel(int value) { this.value=value; }
public int comEnumValue() { return value; }
}
| [
"tony@pyxll.com"
] | tony@pyxll.com |
ebd18992d9f1d5072bef1c85ab71422c5e4363b7 | be91c7a8bcdc5f5e56f0a212a062f1ca174421d8 | /tools-facade-jnl/src/main/java/org/tis/tools/rservice/jnl/basic/IJnlCustServiceRService.java | 450cbd9c658b991ac2370886486214e741e3f133 | [] | no_license | shiyunlai/tistools | 5357b58573e45f19b322ec9a2da02bfaccc52723 | dcc19bd3edfa4787ee26d2c4bfd550d6481f3897 | refs/heads/master | 2021-01-12T10:47:26.225074 | 2018-09-06T10:45:53 | 2018-09-06T10:45:53 | 72,700,499 | 0 | 10 | null | 2018-02-28T03:18:51 | 2016-11-03T02:21:37 | JavaScript | UTF-8 | Java | false | false | 1,852 | java |
/**
* Copyright (C) 2016 bronsp.com, All rights reserved.
*/
package org.tis.tools.rservice.jnl.basic;
import java.util.List;
import org.tis.tools.base.WhereCondition;
import org.tis.tools.model.po.jnl.JnlCustService;
/**
* <pre>
* 客户服务流水(JNL_CUST_SERVICE)的基础远程服务接口定义
* </pre>
*
* @autor generated by tools:gen-dao
*
*/
public interface IJnlCustServiceRService {
/**
* 新增客户服务流水(JNL_CUST_SERVICE)
* @param t 新记录
*/
public void insert(JnlCustService t);
/**
* 更新客户服务流水(JNL_CUST_SERVICE),只修改t对象有值的字段
* @param t 新值
*/
public void update(JnlCustService t);
/**
* 强制更新客户服务流水(JNL_CUST_SERVICE)
* @param t 新值
*/
public void updateForce(JnlCustService t);
/**
* 删除客户服务流水(JNL_CUST_SERVICE)
* @param guid 记录guid
*/
public void delete(String guid);
/**
* 根据条件删除客户服务流水(JNL_CUST_SERVICE)
* @param wc 条件
*/
public void deleteByCondition(WhereCondition wc);
/**
* 根据条件更新客户服务流水(JNL_CUST_SERVICE)
* @param wc 条件
* @param t 新值
*/
public void updateByCondition(WhereCondition wc, JnlCustService t);
/**
* 根据条件查询客户服务流水(JNL_CUST_SERVICE)
* @param wc 条件
* @return 满足条件的记录list
*/
public List<JnlCustService> query(WhereCondition wc);
/**
* 根据条件统计客户服务流水(JNL_CUST_SERVICE)记录数
* @param wc 条件
* @return 记录数
*/
public int count(WhereCondition wc);
/**
* 根据id查询客户服务流水(JNL_CUST_SERVICE)记录
* @param guid 记录guid
* @return 匹配的记录
*/
public JnlCustService loadByGuid(String guid);
}
| [
"shiyunlai@gmail.com"
] | shiyunlai@gmail.com |
ca190fadb2141630bf6a79fe82009f11c40625f7 | 5244c1dbcf31773f2798af6610dbf91e7a11ad5c | /section16-reactive-programming-introduction/src/main/java/main115_observer_design_pattern/Book.java | 504d175f5ae71b548d016023e3811a7412b7a672 | [] | no_license | alperarabaci/functional-reactive-programming-in-modern-style | 98042de82f92901e74180d8407240103ed14d7d6 | eafac41f0cb11fb576a36ae959409ef636da79ac | refs/heads/main | 2023-04-07T02:43:29.572597 | 2021-04-17T18:57:28 | 2021-04-17T18:57:28 | 306,057,204 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,870 | java | package main115_observer_design_pattern;
import java.util.ArrayList;
import java.util.List;
class Book implements SubjectLibrary{
private String name;
private String type;
private String author;
private double price;
private String inStock;
private List<Observer> observers = new ArrayList<>();
public Book(String name, String type, String author, double price, String inStock) {
this.name = name;
this.type = type;
this.author = author;
this.price = price;
this.inStock = inStock;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getInStock() {
return inStock;
}
public void setInStock(String inStock) {
this.inStock = inStock;
System.out.println("Availability changed from Sold out to Back in stock \n");
notifyObserver();
}
public List<Observer> getObservers() {
return observers;
}
public void setObservers(List<Observer> observers) {
this.observers = observers;
}
@Override
public void subscribeObserver(Observer ob) {
observers.add(ob);
}
@Override
public void unSubscribeObserver(Observer ob) {
observers.remove(ob);
}
@Override
public void notifyObserver() {
System.out.println(toString() + " So, please notify all users");
for (Observer observer : observers) {
observer.update(this.inStock);
}
}
@Override
public String toString() {
return "Book [name=" + name + ", type=" + type + ", author=" + author + ", price=" + price + ", inStock="
+ inStock + "]";
}
}
| [
"melihalper.arabaci@gmail.com"
] | melihalper.arabaci@gmail.com |
b6b650643aba75657e19ba567a9ea37cf85a00cf | e977c424543422f49a25695665eb85bfc0700784 | /benchmark/icse15/1365865/buggy-version/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilterFactory.java | 2baf35fc6126ca7410d86a1756d94fa85f19976c | [] | no_license | amir9979/pattern-detector-experiment | 17fcb8934cef379fb96002450d11fac62e002dd3 | db67691e536e1550245e76d7d1c8dced181df496 | refs/heads/master | 2022-02-18T10:24:32.235975 | 2019-09-13T15:42:55 | 2019-09-13T15:42:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,760 | java | package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.IOException;
import java.util.List;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter;
import org.apache.lucene.analysis.util.*;
/**
* Factory for {@link StemmerOverrideFilter}.
* <pre class="prettyprint" >
* <fieldType name="text_dicstem" class="solr.TextField" positionIncrementGap="100">
* <analyzer>
* <tokenizer class="solr.WhitespaceTokenizerFactory"/>
* <filter class="solr.StemmerOverrideFilterFactory" dictionary="dictionary.txt" ignoreCase="false"/>
* </analyzer>
* </fieldType></pre>
*
*/
public class StemmerOverrideFilterFactory extends TokenFilterFactory implements ResourceLoaderAware {
private CharArrayMap<String> dictionary = null;
private boolean ignoreCase;
public void inform(ResourceLoader loader) {
String dictionaryFiles = args.get("dictionary");
ignoreCase = getBoolean("ignoreCase", false);
if (dictionaryFiles != null) {
assureMatchVersion();
List<String> files = splitFileNames(dictionaryFiles);
try {
if (files.size() > 0) {
dictionary = new CharArrayMap<String>(luceneMatchVersion,
files.size() * 10, ignoreCase);
for (String file : files) {
List<String> list = loader.getLines(file.trim());
for (String line : list) {
String[] mapping = line.split("\t", 2);
dictionary.put(mapping[0], mapping[1]);
}
}
}
} catch (IOException e) {
throw new InitializationException("IOException thrown while loading dictionary", e);
}
}
}
public boolean isIgnoreCase() {
return ignoreCase;
}
public TokenStream create(TokenStream input) {
return dictionary == null ? input : new StemmerOverrideFilter(luceneMatchVersion, input, dictionary);
}
}
| [
"durieuxthomas@hotmail.com"
] | durieuxthomas@hotmail.com |
732c6ec3915ea3277d17d51d0623d3d17217bd46 | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.27.0/sources/com/iqoption/kyc/questionnaire/substeps/BaseKycQuestionnaireSubStepFragment$questionType$2.java | dce5dc6da7a5c7e40e3311b94711007a24b61f8b | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 1,296 | java | package com.iqoption.kyc.questionnaire.substeps;
import com.iqoption.core.microservices.kyc.response.questionnaire.QuestionnaireType;
import java.io.Serializable;
import kotlin.TypeCastException;
import kotlin.i;
import kotlin.jvm.a.a;
import kotlin.jvm.internal.Lambda;
@i(bne = {1, 1, 15}, bnf = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, bng = {"<anonymous>", "Lcom/iqoption/core/microservices/kyc/response/questionnaire/QuestionnaireType;", "invoke"})
/* compiled from: BaseKycQuestionnaireSubStepFragment.kt */
final class BaseKycQuestionnaireSubStepFragment$questionType$2 extends Lambda implements a<QuestionnaireType> {
final /* synthetic */ a this$0;
BaseKycQuestionnaireSubStepFragment$questionType$2(a aVar) {
this.this$0 = aVar;
super(0);
}
/* renamed from: aMV */
public final QuestionnaireType invoke() {
Serializable serializable = com.iqoption.core.ext.a.s(this.this$0).getSerializable("ARG_QUESTION_TYPE");
if (serializable != null) {
return (QuestionnaireType) serializable;
}
throw new TypeCastException("null cannot be cast to non-null type com.iqoption.core.microservices.kyc.response.questionnaire.QuestionnaireType");
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
a1a539f2724c551893bfd0f722cb0cb9978d8bd0 | 4e16a6780f479bf703e240a1549d090b0bafc53b | /work/decompile-c69e3af0/net/minecraft/world/entity/ai/behavior/warden/Digging.java | cc07c3efb8952660ba18bbb31cdff1ecc281b1fb | [] | no_license | 0-Yama/ServLT | 559b683832d1f284b94ef4a9dbd4d8adb543e649 | b2153c73bea55fdd4f540ed2fba3a1e46ec37dc5 | refs/heads/master | 2023-03-16T01:37:14.727842 | 2023-03-05T14:55:51 | 2023-03-05T14:55:51 | 302,899,503 | 0 | 2 | null | 2020-10-15T10:51:21 | 2020-10-10T12:42:47 | JavaScript | UTF-8 | Java | false | false | 1,579 | java | package net.minecraft.world.entity.ai.behavior.warden;
import com.google.common.collect.ImmutableMap;
import net.minecraft.server.level.WorldServer;
import net.minecraft.sounds.SoundEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityPose;
import net.minecraft.world.entity.ai.behavior.Behavior;
import net.minecraft.world.entity.ai.memory.MemoryModuleType;
import net.minecraft.world.entity.ai.memory.MemoryStatus;
import net.minecraft.world.entity.monster.warden.Warden;
public class Digging<E extends Warden> extends Behavior<E> {
public Digging(int i) {
super(ImmutableMap.of(MemoryModuleType.ATTACK_TARGET, MemoryStatus.VALUE_ABSENT, MemoryModuleType.WALK_TARGET, MemoryStatus.VALUE_ABSENT), i);
}
protected boolean canStillUse(WorldServer worldserver, E e0, long i) {
return e0.getRemovalReason() == null;
}
protected boolean checkExtraStartConditions(WorldServer worldserver, E e0) {
return e0.isOnGround() || e0.isInWater() || e0.isInLava();
}
protected void start(WorldServer worldserver, E e0, long i) {
if (e0.isOnGround()) {
e0.setPose(EntityPose.DIGGING);
e0.playSound(SoundEffects.WARDEN_DIG, 5.0F, 1.0F);
} else {
e0.playSound(SoundEffects.WARDEN_AGITATED, 5.0F, 1.0F);
this.stop(worldserver, e0, i);
}
}
protected void stop(WorldServer worldserver, E e0, long i) {
if (e0.getRemovalReason() == null) {
e0.remove(Entity.RemovalReason.DISCARDED);
}
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
11de9167fd408371e2e726d06cff607277f7c93e | 124fc32c35af00b7da9771bb90246111aca75b85 | /zrouter/zrouter-api/src/main/java/com/wuwind/zrouter_api/Postcard.java | 3c8f6815a8f523a51732a65dfcf1c46a94c2c362 | [] | no_license | wuwind/CstFrame | 677db0115286056ce89dc0192b6bf79798cd44fb | 7c73349a2cf0ef49d1bdaf422b4b51111a43ab70 | refs/heads/master | 2022-11-08T12:00:02.598707 | 2020-06-16T07:50:28 | 2020-06-16T07:50:28 | 270,188,708 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,467 | java | package com.wuwind.zrouter_api;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.wuwind.zrouter_annotation.facade.model.RouteMeta;
import com.wuwind.zrouter_annotation.facade.template.IProvider;
/**
* 用于封装 目的地的各种操作,比如跳转Activity,切换Fragment,或者执行 业务模块暴露出来的service
*/
public class Postcard extends RouteMeta {
private IProvider provider;//为了模块间数据交互而预备的属性,先放着
private Bundle mBundle;// activity跳转的时候有可能会携带参数,这里先预留一个属性
private int flag = FLAG_DEFAULT;// Activity的启动模式,在java里面是用int值表示的,所以这里也留个字段
public static final int FLAG_DEFAULT = -1;
public int getFlag() {
return flag;
}
public void setFlag(int mFlag) {
this.flag = mFlag;
}
public Bundle getExtras() {
return mBundle;
}
public void setExtras(Bundle bundle) {
this.mBundle = bundle;
}
public IProvider getProvider() {
return provider;
}
public void setProvider(IProvider provider) {
this.provider = provider;
}
public Postcard(String path) {
this(path, null);
}
public Postcard(String path, Bundle bundle) {
this.path = path;
this.mBundle = (null == bundle ? new Bundle() : bundle);
}
/**
* 开始执行任务,是跳转Activity呢?还是切换Fragment呢?还是 执行业务模块暴露的服务呢。。。
*/
public Object navigation() {
return ZRouter.getInstance().navigation(this);
}
/**
* Inserts a String value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
* @param key a String, or null
* @param value a String, or null
* @return current
*/
public Postcard withString(@Nullable String key, @Nullable String value) {
mBundle.putString(key, value);
return this;
}
/**
* Inserts a Boolean value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
* @param key a String, or null
* @param value a boolean
* @return current
*/
public Postcard withBoolean(@Nullable String key, boolean value) {
mBundle.putBoolean(key, value);
return this;
}
/**
* Inserts a short value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a short
* @return current
*/
public Postcard withShort(@Nullable String key, short value) {
mBundle.putShort(key, value);
return this;
}
/**
* Inserts an int value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value an int
* @return current
*/
public Postcard withInt(@Nullable String key, int value) {
mBundle.putInt(key, value);
return this;
}
/**
* Inserts a long value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a long
* @return current
*/
public Postcard withLong(@Nullable String key, long value) {
mBundle.putLong(key, value);
return this;
}
/**
* Inserts a double value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a double
* @return current
*/
public Postcard withDouble(@Nullable String key, double value) {
mBundle.putDouble(key, value);
return this;
}
/**
* Inserts a byte value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a byte
* @return current
*/
public Postcard withByte(@Nullable String key, byte value) {
mBundle.putByte(key, value);
return this;
}
/**
* Inserts a char value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a char
* @return current
*/
public Postcard withChar(@Nullable String key, char value) {
mBundle.putChar(key, value);
return this;
}
/**
* Inserts a float value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
* @param key a String, or null
* @param value a float
* @return current
*/
public Postcard withFloat(@Nullable String key, float value) {
mBundle.putFloat(key, value);
return this;
}
/**
* Inserts a CharSequence value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
* @param key a String, or null
* @param value a CharSequence, or null
* @return current
*/
public Postcard withCharSequence(@Nullable String key, @Nullable CharSequence value) {
mBundle.putCharSequence(key, value);
return this;
}
}
| [
"412719784@qq.com"
] | 412719784@qq.com |
2534d51e229871f2777879d2e6a09faf2d3d9351 | 784c2de080ebee37e4d5489713e3fe1f44049584 | /Java/Misc/mvc-with-java-swing/src/main/java/com/link_intersystems/publications/blog/mvc/Main.java | 499ee6419a87c398cf0913d9f4f0d2483a5ae7be | [] | no_license | zwvista/SampleMisc | 95bdac231936189db23cb8b1e9500e05ed841ed4 | d74affe9213958fa4b0bce1ff47db2cfaea9c589 | refs/heads/master | 2023-03-09T06:29:19.263169 | 2023-01-27T12:47:56 | 2023-01-27T12:47:56 | 35,654,095 | 0 | 0 | null | 2023-03-07T00:28:53 | 2015-05-15T04:52:17 | C# | UTF-8 | Java | false | false | 435 | java | package com.link_intersystems.publications.blog.mvc;
import com.link_intersystems.publications.blog.mvc.view.MainFrame;
/**
* Application entry point.
*
* @author René Link <a
* href="mailto:rene.link@link-intersystems.com">[rene.link@link-
* intersystems.com]</a>
*
*/
public class Main {
public static void main(String[] args) {
MainFrame mainFrame = new MainFrame();
mainFrame.setVisible(true);
}
}
| [
"zwvista@msn.com"
] | zwvista@msn.com |
2f25a70b40069e785f047201a1f1a99faaf80f1c | 933f64605904bffb962aa8f93552e098d0f84bbf | /src/main/java/org/lndroid/framework/usecases/ActionAddListContactsPrivilege.java | 39d9c81d79e503797914154d085769353654f2a0 | [
"MIT"
] | permissive | juantellez/lndroid-framework | 4b37147a6e7fb181d37066276b9bac8922da7f1b | 1f961998f2e28758d1742b3da45ad70d961f5c82 | refs/heads/master | 2020-12-31T22:16:32.150796 | 2020-02-07T11:46:30 | 2020-02-07T11:46:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,011 | java | package org.lndroid.framework.usecases;
import java.io.IOException;
import java.lang.reflect.Type;
import org.lndroid.framework.WalletData;
import org.lndroid.framework.client.IPluginClient;
import org.lndroid.framework.common.DefaultPlugins;
import org.lndroid.framework.common.IPluginData;
public class ActionAddListContactsPrivilege extends
ActionUseCaseBase<WalletData.ListContactsPrivilege, WalletData.ListContactsPrivilege> {
public ActionAddListContactsPrivilege(IPluginClient client) {
super(DefaultPlugins.ADD_LIST_CONTACTS_PRIVILEGE, client, "ActionAddListContactsPrivilege");
}
@Override
protected WalletData.ListContactsPrivilege getData(IPluginData in) {
in.assignDataType(WalletData.ListContactsPrivilege.class);
try {
return in.getData();
} catch (IOException e) {
return null;
}
}
@Override
protected Type getRequestType() {
return WalletData.ListContactsPrivilege.class;
}
}
| [
"brugeman.artur@gmail.com"
] | brugeman.artur@gmail.com |
b44283211c638da87a99a855d135815b9dee7787 | c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1 | /modulos/apps/LOCALGIS-MODEL-Catastro/src/main/java/com/geopista/server/catastro/servicioWebCatastro/UnidadRegistroBI.java | 7fc7748cbadec4c07fb0e08a6684f874c648c1f9 | [] | no_license | pepeysusmapas/allocalgis | 925756321b695066775acd012f9487cb0725fcde | c14346d877753ca17339f583d469dbac444ffa98 | refs/heads/master | 2020-09-14T20:15:26.459883 | 2016-09-27T10:08:32 | 2016-09-27T10:08:32 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 3,002 | java | /**
* UnidadRegistroBI.java
* © MINETUR, Government of Spain
* This program is part of LocalGIS
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.geopista.server.catastro.servicioWebCatastro;
/**
* Created by IntelliJ IDEA.
* User: jcarrillo
* Date: 30-mar-2007
* Time: 14:26:03
* To change this template use File | Settings | File Templates.
*/
/**
* Bean que implementa la unidad de registro de los bienes inmuebles para la exportacion masiva, cuando un expediente
* no ha llegado a finalizado y se comunica a catastro su existencia. Se crea este objeto que luego sera parseado con
* java2xml para crear el fichero fin entrada.
* */
public class UnidadRegistroBI
{
private String codigoDelegacion;
private String codigoMunicipio;
private String refCatas1;
private String refCatas2;
private String cargo;
private String digitoControl1;
private String digitoControl2;
/**
* Constructor de la clase.
* */
public UnidadRegistroBI()
{
}
public String getCodigoDelegacion()
{
return codigoDelegacion;
}
public void setCodigoDelegacion(String codigoDelegacion)
{
this.codigoDelegacion = codigoDelegacion;
}
public String getCodigoMunicipio()
{
return codigoMunicipio;
}
public void setCodigoMunicipio(String codigoMunicipio)
{
this.codigoMunicipio = codigoMunicipio;
}
public String getRefCatas1()
{
return refCatas1;
}
public void setRefCatas1(String refCatas1)
{
this.refCatas1 = refCatas1;
}
public String getRefCatas2()
{
return refCatas2;
}
public void setRefCatas2(String refCatas2)
{
this.refCatas2 = refCatas2;
}
public String getCargo()
{
return cargo;
}
public void setCargo(String cargo)
{
this.cargo = cargo;
}
public String getDigitoControl1()
{
return digitoControl1;
}
public void setDigitoControl1(String digitoControl1)
{
this.digitoControl1 = digitoControl1;
}
public String getDigitoControl2()
{
return digitoControl2;
}
public void setDigitoControl2(String digitoControl2)
{
this.digitoControl2 = digitoControl2;
}
}
| [
"jorge.martin@cenatic.es"
] | jorge.martin@cenatic.es |
605817c7f1d24057289a26d93491e862ad6917f7 | 78c696de905e3f1a699b106c6f23893bd0e96fa3 | /src/org/eclipse/ui/IEditorSite.java | 7bb42cb372e68c712ad74cfc7b5f5d0dfb70dc7e | [] | no_license | jiangyu2015/eclipse-4.5.2-source | 71d1e0b45e744ce0038e5ba17b6c3c12fd3634c5 | e4a90a19989564e28d73ff64a4a2ffc2cbfeaf9e | refs/heads/master | 2021-01-10T09:07:58.554745 | 2016-03-03T13:18:11 | 2016-03-03T13:18:11 | 52,862,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,805 | java | /*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelectionProvider;
/**
* The primary interface between an editor part and the workbench.
* <p>
* The workbench exposes its implemention of editor part sites via this
* interface, which is not intended to be implemented or extended by clients.
* </p>
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IEditorSite extends IWorkbenchPartSite {
/**
* Returns the action bar contributor for this editor.
* <p>
* An action contributor is responsable for the creation of actions.
* By design, this contributor is used for one or more editors of the same type.
* Thus, the contributor returned by this method is not owned completely
* by the editor - it is shared.
* </p>
*
* @return the editor action bar contributor, or <code>null</code> if none exists
*/
public IEditorActionBarContributor getActionBarContributor();
/**
* Returns the action bars for this part site. Editors of the same type (and
* in the same window) share the same action bars. Contributions to the
* action bars are done by the <code>IEditorActionBarContributor</code>.
*
* @return the action bars
* @since 2.1
*/
public IActionBars getActionBars();
/**
* <p>
* Registers a pop-up menu with the default id for extension. The default id
* is defined as the part id.
* </p>
* <p>
* By default, context menus include object contributions based on the
* editor input for the current editor. It is possible to override this
* behaviour by calling this method with <code>includeEditorInput</code>
* as <code>false</code>. This might be desirable for editors that
* present a localized view of an editor input (e.g., a node in a model
* editor).
* </p>
* <p>
* For a detailed description of context menu registration see
* {@link IWorkbenchPartSite#registerContextMenu(MenuManager, ISelectionProvider)}
* </p>
*
* @param menuManager
* the menu manager; must not be <code>null</code>.
* @param selectionProvider
* the selection provider; must not be <code>null</code>.
* @param includeEditorInput
* Whether the editor input should be included when adding object
* contributions to this context menu.
* @see IWorkbenchPartSite#registerContextMenu(MenuManager,
* ISelectionProvider)
* @since 3.1
*/
public void registerContextMenu(MenuManager menuManager,
ISelectionProvider selectionProvider, boolean includeEditorInput);
/**
* <p>
* Registers a pop-up menu with a particular id for extension. This method
* should only be called if the target part has more than one context menu
* to register.
* </p>
* <p>
* By default, context menus include object contributions based on the
* editor input for the current editor. It is possible to override this
* behaviour by calling this method with <code>includeEditorInput</code>
* as <code>false</code>. This might be desirable for editors that
* present a localized view of an editor input (e.g., a node in a model
* editor).
* </p>
* <p>
* For a detailed description of context menu registration see
* {@link IWorkbenchPartSite#registerContextMenu(MenuManager, ISelectionProvider)}
* </p>
*
* @param menuId
* the menu id; must not be <code>null</code>.
* @param menuManager
* the menu manager; must not be <code>null</code>.
* @param selectionProvider
* the selection provider; must not be <code>null</code>.
* @param includeEditorInput
* Whether the editor input should be included when adding object
* contributions to this context menu.
* @see IWorkbenchPartSite#registerContextMenu(MenuManager,
* ISelectionProvider)
* @since 3.1
*/
public void registerContextMenu(String menuId, MenuManager menuManager,
ISelectionProvider selectionProvider, boolean includeEditorInput);
}
| [
"187_6810_5877@sina.com"
] | 187_6810_5877@sina.com |
30678d5f28b3142674c31c40c4bb35d56866996c | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_17_0/Backhaul/RelayAdvancedProfileGetResult.java | 161bfdbb7c7288fe2ef400706ac4eb9374c28ee5 | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 2,336 | java |
package Netspan.NBI_17_0.Backhaul;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for RelayAdvancedProfileGetResult complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="RelayAdvancedProfileGetResult">
* <complexContent>
* <extension base="{http://Airspan.Netspan.WebServices}WsResponse">
* <sequence>
* <element name="RelayAdvancedProfileResult" type="{http://Airspan.Netspan.WebServices}RelayAdvancedProfileResult" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RelayAdvancedProfileGetResult", propOrder = {
"relayAdvancedProfileResult"
})
public class RelayAdvancedProfileGetResult
extends WsResponse
{
@XmlElement(name = "RelayAdvancedProfileResult")
protected List<RelayAdvancedProfileResult> relayAdvancedProfileResult;
/**
* Gets the value of the relayAdvancedProfileResult property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the relayAdvancedProfileResult property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRelayAdvancedProfileResult().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RelayAdvancedProfileResult }
*
*
*/
public List<RelayAdvancedProfileResult> getRelayAdvancedProfileResult() {
if (relayAdvancedProfileResult == null) {
relayAdvancedProfileResult = new ArrayList<RelayAdvancedProfileResult>();
}
return this.relayAdvancedProfileResult;
}
}
| [
"dshalom@airspan.com"
] | dshalom@airspan.com |
abf343bbefdc3ee23ed31492f541f1a59fa1b25e | 5530b4b42377d5930ed2684e95d002779866c9cb | /wps/plugins/net.refractions.udig.wps/src/net/refractions/udig/wps/WpsPlugin.java | 78bd7de765a66c5d10f58af470d60c1468c92cee | [] | no_license | uDig-Community/udig-community | f8e25e1d67dc2acd41abda18f5d373fd4a27a0be | 5fb860610dc294174af3a32e9430c908a1f10723 | refs/heads/master | 2021-01-25T07:34:56.734589 | 2012-06-12T20:11:43 | 2012-06-12T20:11:43 | 1,397,067 | 5 | 11 | null | null | null | null | UTF-8 | Java | false | false | 4,325 | java | /*
* uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
* Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package net.refractions.udig.wps;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
*/
public class WpsPlugin extends AbstractUIPlugin {
//The shared instance.
private static WpsPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
public static final String ID = "net.refractions.udig.wps"; //$NON-NLS-1$
/**
* The constructor.
*/
public WpsPlugin() {
super();
WpsPlugin.plugin = this;
}
/**
* This method is called upon plug-in activation
*/
public void start(BundleContext context) throws Exception {
super.start(context);
}
/**
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
resourceBundle = null;
super.stop(context);
}
/**
* @return x
* Returns the shared instance.
*/
public static WpsPlugin getDefault() {
return WpsPlugin.plugin;
}
/**
* @param key
* @return x
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle = WpsPlugin.getDefault().getResourceBundle();
try {
return (bundle != null) ? bundle.getString(key) : key;
} catch (MissingResourceException e) {
return key;
}
}
/**
* @return x
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
try {
if (resourceBundle == null)
resourceBundle = ResourceBundle.getBundle("net.refractions.udig.wps.WpsPluginResources"); //$NON-NLS-1$
} catch (MissingResourceException x) {
resourceBundle = null;
}
return resourceBundle;
}
/**
* Logs the Throwable in the plugin's log.
* <p>
* This will be a user visable ERROR if:
* <ul>
* <li>t is an Exception we are assuming it is human readable or if a message is provided
* </ul>
* </p>
* @param message
* @param t
*/
public static void log( String message, Throwable t ) {
int status = t instanceof Exception || message != null ? IStatus.ERROR : IStatus.WARNING;
getDefault().getLog().log(new Status(status, ID, IStatus.OK, message, t));
}
/**
* Messages that only engage if getDefault().isDebugging()
* <p>
* It is much prefered to do this:<pre><code>
* private static final String RENDERING = "net.refractions.udig.project/render/trace";
* if( ProjectUIPlugin.getDefault().isDebugging() && "true".equalsIgnoreCase( RENDERING ) ){
* System.out.println( "your message here" );
* }
* </code></pre>
* </p>
* @param message
* @param e
*/
public static void trace( String message, Throwable e) {
if( getDefault().isDebugging() ) {
if( message != null ) System.out.println( message );
if( e != null ) e.printStackTrace();
}
}
/**
* Performs the Platform.getDebugOption true check on the provided trace
* <p>
* Note: ProjectUIPlugin.getDefault().isDebugging() must also be on.
* <ul>
* <li>Trace.RENDER - trace rendering progress
* </ul>
* </p>
* @param trace currently only RENDER is defined
* @return true if -debug is on for this plugin
*/
public static boolean isDebugging( final String trace ){
return getDefault().isDebugging() &&
"true".equalsIgnoreCase(Platform.getDebugOption(trace)); //$NON-NLS-1$
}
}
| [
"jesse.eichar@camptocamp.com"
] | jesse.eichar@camptocamp.com |
a22e4742f590f9be2d3ce59870cc4291da0d1b7c | 75ae440466edf001ab811878619d9abab9e64e3a | /Seguridades/Seguridades-ejb/src/java/ec/edu/espe_ctt/seguridades/entity/SegOpcion.java | 378b89e273a99f634411cc7b39673df3cad46e00 | [] | no_license | developerJhonAlon/ProyectosSociales | deefdbd3a5f512a11439c1cc53d785032d9a8133 | 70100377499be092460e0578478b9ceefa92464b | refs/heads/master | 2020-03-26T03:54:33.641829 | 2020-03-22T02:20:12 | 2020-03-22T02:20:12 | 144,476,444 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,632 | 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 ec.edu.espe_ctt.seguridades.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.List;
import javax.imageio.ImageIO;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author PC1
*/
@Entity
@Table(name = "SEG_OPCION",schema = "SISEAC")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "SegOpcion.findAll", query = "SELECT s FROM SegOpcion s"),
@NamedQuery(name = "SegOpcion.findByOpcId", query = "SELECT s FROM SegOpcion s WHERE s.opcId = :opcId"),
@NamedQuery(name = "SegOpcion.findByOpcNombre", query = "SELECT s FROM SegOpcion s WHERE s.opcNombre = :opcNombre"),
@NamedQuery(name = "SegOpcion.findByOpcNivel", query = "SELECT s FROM SegOpcion s WHERE s.opcNivel = :opcNivel"),
@NamedQuery(name = "SegOpcion.findByOpcOrden", query = "SELECT s FROM SegOpcion s WHERE s.opcOrden = :opcOrden"),
@NamedQuery(name = "SegOpcion.findByOpcUrl", query = "SELECT s FROM SegOpcion s WHERE s.opcUrl = :opcUrl")})
public class SegOpcion implements Serializable {
private static final long serialVersionUID = 1L;
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
@SequenceGenerator(name = "SEQ_SEG_OPCION", sequenceName = "SEQ_SEG_OPCION", allocationSize = 1)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "SEQ_SEG_OPCION")
@Basic(optional = false)
@NotNull
@Id
@Column(name = "OPC_ID")
private BigDecimal opcId;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 60)
@Column(name = "OPC_NOMBRE")
private String opcNombre;
@Basic(optional = false)
@NotNull
@Column(name = "OPC_NIVEL")
private BigInteger opcNivel;
@Basic(optional = false)
@NotNull
@Column(name = "OPC_ORDEN")
private BigInteger opcOrden;
@Size(max=60)
@Column(name = "OPC_IMAGEN")
private String opcImagen;
@Size(max = 128)
@Column(name = "OPC_URL")
private String opcUrl;
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "segOpcion")
private List<SegOpcPerfil> segOpcPerfilList;
@JoinColumn(name = "SIS_ID", referencedColumnName = "SIS_ID")
@ManyToOne(optional = false)
private SegSistemas segSistemas;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "segOpcion")
private List<SegOpcion> segOpcionList;
@JoinColumn(name = "SEG_OPC_ID", referencedColumnName = "OPC_ID")
@ManyToOne
private SegOpcion segOpcion;
;
@Transient
private Collection<SegOpcion> lhijos;
public SegOpcion() {
}
public SegOpcion(BigDecimal opcId) {
this.opcId = opcId;
}
public SegOpcion(BigDecimal opcId, String opcNombre, BigInteger opcNivel, BigInteger opcOrden) {
this.opcId = opcId;
this.opcNombre = opcNombre;
this.opcNivel = opcNivel;
this.opcOrden = opcOrden;
}
public BigDecimal getOpcId() {
return opcId;
}
public void setOpcId(BigDecimal opcId) {
this.opcId = opcId;
}
public String getOpcNombre() {
return opcNombre;
}
public void setOpcNombre(String opcNombre) {
this.opcNombre = opcNombre;
}
public BigInteger getOpcNivel() {
return opcNivel;
}
public void setOpcNivel(BigInteger opcNivel) {
this.opcNivel = opcNivel;
}
public BigInteger getOpcOrden() {
return opcOrden;
}
public void setOpcOrden(BigInteger opcOrden) {
this.opcOrden = opcOrden;
}
public String getOpcUrl() {
return opcUrl;
}
public void setOpcUrl(String opcUrl) {
this.opcUrl = opcUrl;
}
public Collection<SegOpcion> getLhijos() {
return lhijos;
}
public void setLhijos(Collection<SegOpcion> lhijos) {
this.lhijos = lhijos;
}
public SegSistemas getSegSistemas() {
return segSistemas;
}
public void setSegSistemas(SegSistemas segSistemas) {
this.segSistemas = segSistemas;
}
public SegOpcion getSegOpcion() {
return segOpcion;
}
public void setSegOpcion(SegOpcion segOpcion) {
this.segOpcion = segOpcion;
}
public String getOpcImagen() {
return opcImagen;
}
public void setOpcImagen(String opcImagen) {
this.opcImagen = opcImagen;
}
@XmlTransient
public List<SegOpcPerfil> getSegOpcPerfilList() {
return segOpcPerfilList;
}
public void setSegOpcPerfilList(List<SegOpcPerfil> segOpcPerfilList) {
this.segOpcPerfilList = segOpcPerfilList;
}
@XmlTransient
public List<SegOpcion> getSegOpcionList() {
return segOpcionList;
}
public void setSegOpcionList(List<SegOpcion> segOpcionList) {
this.segOpcionList = segOpcionList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (opcId != null ? opcId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SegOpcion)) {
return false;
}
SegOpcion other = (SegOpcion) object;
if ((this.opcId == null && other.opcId != null) || (this.opcId != null && !this.opcId.equals(other.opcId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "ec.edu.espe_ctt.seguridades.entity.SegOpcion[ opcId=" + opcId + " ]";
}
}
| [
"jhonalonjami@gmail.com"
] | jhonalonjami@gmail.com |
60d85fce798b7c6c0d2e07085ff639abc54348cf | edf91e40d1e04d6a83a15abb587a1c352eb56ad5 | /server/src/main/java/org/trams/webbook/bean/BookViewing.java | 3d89da4134f3d69bf60780df5f5dc74af51e6f35 | [] | no_license | phong9x/webbook | 5337993dd89804d33868fb581722142a2702a155 | 4e410c8b76ec8119d6a5110324f79ea7c59d19d2 | refs/heads/master | 2021-09-01T06:38:51.685539 | 2017-12-25T11:25:14 | 2017-12-25T11:25:14 | 115,332,399 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,610 | java | /*
* Created on 2 Feb 2016 ( Time 17:41:47 )
* Generated by Telosys Tools Generator ( version 2.1.1 )
*/
package org.trams.webbook.bean;
import java.io.Serializable;
import javax.validation.constraints.*;
import java.util.Date;
public class BookViewing implements Serializable {
private static final long serialVersionUID = 1L;
//----------------------------------------------------------------------
// ENTITY PRIMARY KEY ( BASED ON A SINGLE FIELD )
//----------------------------------------------------------------------
@NotNull
private Integer id;
//----------------------------------------------------------------------
// ENTITY DATA FIELDS
//----------------------------------------------------------------------
@NotNull
private Integer userId;
@NotNull
private Integer bookId;
private Date createDate;
private Date updateDate;
//----------------------------------------------------------------------
// GETTER & SETTER FOR THE KEY FIELD
//----------------------------------------------------------------------
public void setId( Integer id ) {
this.id = id ;
}
public Integer getId() {
return this.id;
}
//----------------------------------------------------------------------
// GETTERS & SETTERS FOR FIELDS
//----------------------------------------------------------------------
public void setUserId( Integer userId ) {
this.userId = userId;
}
public Integer getUserId() {
return this.userId;
}
public void setBookId( Integer bookId ) {
this.bookId = bookId;
}
public Integer getBookId() {
return this.bookId;
}
public void setCreateDate( Date createDate ) {
this.createDate = createDate;
}
public Date getCreateDate() {
return this.createDate;
}
public void setUpdateDate( Date updateDate ) {
this.updateDate = updateDate;
}
public Date getUpdateDate() {
return this.updateDate;
}
//----------------------------------------------------------------------
// toString METHOD
//----------------------------------------------------------------------
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(id);
sb.append("|");
sb.append(userId);
sb.append("|");
sb.append(bookId);
sb.append("|");
sb.append(createDate);
sb.append("|");
sb.append(updateDate);
return sb.toString();
}
}
| [
"kennyphong2811@gmail.com"
] | kennyphong2811@gmail.com |
9b67bdbcc715183c6ce45bbe7afbdd0b30f8f83a | d089eb917c03c1d8a3897380ac5569f4b34795e6 | /src/main/java/io/RCCFicoScore/client/ProgressRequestBody.java | 243c29e51871c74ba73c2f9132225d2731d8d273 | [] | no_license | APIHub-CdC/rcc-ficoscore-client-java | c860b015b2584dacc84fd9df78675f88fc79078d | 54d33397457c52ff56db5f6f90db2a2b2d91fba7 | refs/heads/release/2.0.3 | 2023-02-04T18:05:55.079769 | 2023-02-01T22:39:12 | 2023-02-01T22:39:12 | 200,298,899 | 0 | 0 | null | 2023-02-01T22:41:12 | 2019-08-02T21:17:33 | Java | UTF-8 | Java | false | false | 1,757 | java | package io.RCCFicoScore.client;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import java.io.IOException;
import okio.Buffer;
import okio.BufferedSink;
import okio.ForwardingSink;
import okio.Okio;
import okio.Sink;
public class ProgressRequestBody extends RequestBody {
public interface ProgressRequestListener {
void onRequestProgress(long bytesWritten, long contentLength, boolean done);
}
private final RequestBody requestBody;
private final ProgressRequestListener progressListener;
public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
this.requestBody = requestBody;
this.progressListener = progressListener;
}
@Override
public MediaType contentType() {
return requestBody.contentType();
}
@Override
public long contentLength() throws IOException {
return requestBody.contentLength();
}
@Override
public void writeTo(BufferedSink sink) throws IOException {
BufferedSink bufferedSink = Okio.buffer(sink(sink));
requestBody.writeTo(bufferedSink);
bufferedSink.flush();
}
private Sink sink(Sink sink) {
return new ForwardingSink(sink) {
long bytesWritten = 0L;
long contentLength = 0L;
@Override
public void write(Buffer source, long byteCount) throws IOException {
super.write(source, byteCount);
if (contentLength == 0) {
contentLength = contentLength();
}
bytesWritten += byteCount;
progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
}
};
}
}
| [
"bryantcancino@gmail.com"
] | bryantcancino@gmail.com |
4d7e4910bca20e903c42edb2319b48e9299c2777 | f4fc8a35108b1942d19f7bb978812c1f51bbdb9f | /test/mn/compassmate/protocol/Tk103ProtocolDecoderTest.java | 8d971051f5e329add5382cbc27e1544200222ddc | [] | no_license | bilguun0428/compassmateTest | 2bd4be5e8acd09cbe68ebf51487502d16fada192 | e19910a024f84a0b6c1a3db53726bebd02de365b | refs/heads/master | 2020-04-10T02:55:04.866035 | 2018-12-07T01:56:00 | 2018-12-07T01:56:00 | 160,755,793 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,365 | java | package mn.compassmate.protocol;
import mn.compassmate.protocol.Tk103Protocol;
import mn.compassmate.protocol.Tk103ProtocolDecoder;
import org.junit.Test;
import mn.compassmate.ProtocolTest;
public class Tk103ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new Tk103Protocol());
verifyPosition(decoder, text(
"(007611121184BR00170816A2401.5217N07447.0788E000.0221352232.340000004FL0030F14F)"));
verifyNull(decoder, text(
"(027044702512BP00027044702512HSO01A4)"));
verifyPosition(decoder, text(
"(864768011069660,ZC11,250517,V,0000.0000N,00000.0000E,000.0,114725,000.0,0.00,11)"));
verifyPosition(decoder, text(
"(864768011069660,ZC17,250517,A,3211.7118N,03452.8086E,0.68,115525,208.19,64.50,9)"));
verifyNull(decoder, text(
"(357593060760397BP02,G,2,170304A6015.7466N01101.8460E001.609445591.048,7)"));
verifyPosition(decoder, text(
"(325031693849BR00170228A5750.8012N02700.7476E000.2154529000.0000000200L00000000,170228,194530)"));
verifyPosition(decoder, text(
"(087073803649BR00170221A6142.0334N02712.2197E000.3203149000.00,00000000L00000000)"));
verifyPosition(decoder, text(
"(864768010869060,DW30,050117,A,5135.82713N,00001.17918E,0.089,154745,000.0,43.40,12)"));
verifyNotNull(decoder, text(
"(087073104337BZ00,740,000,3bf7,0425,3bf7,0bf5,3bf7,09e7,3bf7,cbad,3bf7,0dcf,3bf7,c7b2,01000000)"));
verifyNull(decoder, text(
"(087073005534BP00HSO"));
verifyNull(decoder, text(
"(027028258309BQ86,0,05550c21b10d1d0f431008bd114c0ea5078400010007a100423932,161117005322,01000001)"));
verifyNull(decoder, text(
"(027028258309BQ86,0,05470c0eb20d040f4410022911360e92077e00010007a1004237c7,161117005232,01000001)"));
verifyPosition(decoder, text(
"(01602009983BR00160830V1855.7022S4817.8731W000.0002729000.0010000000L00000000)"));
verifyPosition(decoder, text(
"(088046338039BR00160727A3354.7768N03540.7258E000.0140832068.4700000000L00BEB0D4+017.7)"));
verifyPosition(decoder, text(
"(088046338039BP05000088046338039160727A3354.7768N03540.7258E000.0140309065.1000000000L00BEB0D4+017.3)"));
verifyAttributes(decoder, text(
"(013632651491,ZC20,180716,144222,6,392,65535,255"));
verifyAttributes(decoder, text(
"(087072009461BR00000007V0000.0000N00000.0000E000.00014039900000000L00000000"));
verifyPosition(decoder, text(
"(013612345678BO012061830A2934.0133N10627.2544E040.0080331309.6200000000L000770AD"));
verifyNotNull(decoder, text(
"(088047194605BZ00,510,010,36e6,932c,43,36e6,766b,36,36e6,7668,32"));
verifyAttributes(decoder, text(
"(013632651491,ZC20,040613,040137,6,421,112,0"));
verifyAttributes(decoder, text(
"(864768010159785,ZC20,291015,030413,3,362,65535,255"));
verifyPosition(decoder, text(
"(088047365460BR00151024A2555.3531S02855.3329E004.7055148276.1701000000L00009AA3)"),
position("2015-10-24 05:51:48.000", true, -25.92255, 28.92222));
verifyPosition(decoder, text(
"(088047365460BP05354188047365460150929A3258.1754S02755.4323E009.4193927301.9000000000L00000000)"));
verifyPosition(decoder, text(
"(088048003342BP05354188048003342150917A1352.9801N10030.9050E000.0103115265.5600010000L000003F9)"));
verifyPosition(decoder, text(
"(088048003342BR00150917A1352.9801N10030.9050E000.0103224000.0000010000L000003F9)"));
verifyPosition(decoder, text(
"(088048003342BR00150807A1352.9871N10030.9084E000.0110718000.0001010000L00000000)"));
verifyNull(decoder, text(
"(090411121854BP0000001234567890HSO"));
verifyPosition(decoder, text(
"(01029131573BR00150428A3801.6382N02351.0159E000.0080729278.7800000000LEF9ECB9C)"));
verifyPosition(decoder, text(
"(035988863964BP05000035988863964110524A4241.7977N02318.7561E000.0123536356.5100000000L000946BB"));
verifyPosition(decoder, text(
"(013632782450BP05000013632782450120803V0000.0000N00000.0000E000.0174654000.0000000000L00000000"));
verifyPosition(decoder, text(
"(013666666666BP05000013666666666110925A1234.5678N01234.5678W000.002033490.00000000000L000024DE"));
verifyPosition(decoder, text(
"(013666666666BO012110925A1234.5678N01234.5678W000.0025948118.7200000000L000024DE"));
verifyPosition(decoder, text(
"\n\n\n(088045133878BR00130228A5124.5526N00117.7152W000.0233614352.2200000000L01B0CF1C"));
verifyPosition(decoder, text(
"(008600410203BP05000008600410203130721A4152.5790N01239.2770E000.0145238173.870100000AL0000000"));
verifyPosition(decoder, text(
"(013012345678BR00130515A4843.9703N01907.6211E000.019232800000000000000L00009239"));
verifyPosition(decoder, text(
"(012345678901BP05000012345678901130520A3439.9629S05826.3504W000.1175622323.8700000000L000450AC"));
verifyPosition(decoder, text(
"(012345678901BR00130520A3439.9629S05826.3504W000.1175622323.8700000000L000450AC"));
verifyPosition(decoder, text(
"(352606090042050,BP05,240414,V,0000.0000N,00000.0000E,000.0,193133,000.0"));
verifyPosition(decoder, text(
"(352606090042050,BP05,240414,A,4527.3513N,00909.9758E,4.80,112825,155.49"),
position("2014-04-24 11:28:25.000", true, 45.45586, 9.16626));
verifyPosition(decoder, text(
"(013632782450,BP05,101201,A,2234.0297N,11405.9101E,000.0,040137,178.48,00000000,L00000000"));
verifyPosition(decoder, text(
"(864768010009188,BP05,271114,V,4012.19376N,00824.05638E,000.0,154436,000.0"));
verifyPosition(decoder, text(
"(013632651491,BP05,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyPosition(decoder, text(
"(013632651491,ZC07,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyPosition(decoder, text(
"(013632651491,ZC11,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyPosition(decoder, text(
"(013632651491,ZC12,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyPosition(decoder, text(
"(013632651491,ZC13,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyPosition(decoder, text(
"(013632651491,ZC17,040613,A,2234.0297N,11405.9101E,000.0,040137,178.48)"));
verifyNull(decoder, text(
"(013632651491,ZC20,040613,040137,6,42,112,0)"));
verifyPosition(decoder, text(
"(094050000111BP05000094050000111150808A3804.2418N04616.7468E000.0201447133.3501000011L0028019DT000)"));
}
}
| [
"bilguun.b@itzone.local"
] | bilguun.b@itzone.local |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.