blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
bbdf6c17b482bbfc8a268711a8d237138c162154
3e1cb853e6388477997e38850843636c27843e3b
/src/main/java/com/anhvv/hibernate/example/ActionType.java
efd93d9e25ae7936bf5324556aaaecfbe51eca3c
[]
no_license
vuonganhvu/hibernate-example
db3099be0c2ac0224ad89547d0f0e2919264840b
b747057e4780b0868439882352fc482310d7e462
refs/heads/master
2022-12-28T19:57:36.447707
2020-10-14T02:34:50
2020-10-14T02:34:50
261,242,055
0
0
null
null
null
null
UTF-8
Java
false
false
83
java
package com.anhvv.hibernate.example; public enum ActionType { PAYMENT, TASK }
[ "anhvuong.neu@gmail.com" ]
anhvuong.neu@gmail.com
701cd138f1c337067c16b578d6fd5641d4e6bc07
a2cf6093632c085a3f7b1fb7352479fd7ba99eef
/jgnash-fx/src/main/java/jgnash/uifx/control/SecurityComboBox.java
be60e512fb05d459bdf490abde5b453e20490371
[]
no_license
3men2kbson/jgnash
041914535cbdf2707200fc01df46f75b175b1f1a
add7b82746706bf411616b319739d2f49bea81a3
refs/heads/master
2021-01-17T17:18:46.499650
2016-04-14T09:56:41
2016-04-14T09:56:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,991
java
/* * jGnash, a personal finance application * Copyright (C) 2001-2016 Craig Cavanaugh * * 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 jgnash.uifx.control; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Objects; import javafx.application.Platform; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; import javafx.fxml.FXMLLoader; import javafx.scene.control.ComboBox; import jgnash.engine.Account; import jgnash.engine.Engine; import jgnash.engine.EngineFactory; import jgnash.engine.SecurityNode; import jgnash.engine.message.Message; import jgnash.engine.message.MessageBus; import jgnash.engine.message.MessageChannel; import jgnash.engine.message.MessageListener; import jgnash.engine.message.MessageProperty; /** * ComboBox that allows selection of a SecurityNode and manages it's own model * <p> * The default operation is to load all known {@code SecurityNodes}. If the * {@code accountProperty} is set, then only the account's {@code SecurityNodes} * will be available for selection. * * @author Craig Cavanaugh */ public class SecurityComboBox extends ComboBox<SecurityNode> implements MessageListener { /** * Model for the ComboBox */ final private ObservableList<SecurityNode> items; final private ObjectProperty<Account> accountProperty = new SimpleObjectProperty<>(); public SecurityComboBox() { final FXMLLoader loader = new FXMLLoader(getClass().getResource("SecurityComboBox.fxml")); loader.setRoot(this); loader.setController(this); // extract and reuse the default model items = getItems(); // warp in a sorted list setItems(new SortedList<>(items, null)); try { loader.load(); } catch (final IOException exception) { throw new RuntimeException(exception); } Platform.runLater(this::loadModel); // lazy load to let the ui build happen faster accountProperty.addListener((observable, oldValue, newValue) -> { loadModel(); }); MessageBus.getInstance().registerListener(this, MessageChannel.ACCOUNT, MessageChannel.COMMODITY, MessageChannel.SYSTEM); } public void setSecurityNode(final SecurityNode securityNode) { // Selection is not always consistent unless pushed to the EDT Platform.runLater(() -> setValue(securityNode)); } private void loadModel() { final Collection<SecurityNode> securityNodes; if (accountProperty.get() != null) { items.clear(); securityNodes = accountProperty.get().getSecurities(); } else { final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT); Objects.requireNonNull(engine); securityNodes = engine.getSecurities(); } if (!securityNodes.isEmpty()) { final List<SecurityNode> sortedNodeList = new ArrayList<>(securityNodes); Collections.sort(sortedNodeList); items.addAll(sortedNodeList); getSelectionModel().select(0); } } @Override public void messagePosted(final Message event) { if (event.getObject(MessageProperty.COMMODITY) instanceof SecurityNode) { final SecurityNode node = event.getObject(MessageProperty.COMMODITY); final Account account = event.getObject(MessageProperty.ACCOUNT); Platform.runLater(() -> { switch (event.getEvent()) { case ACCOUNT_SECURITY_ADD: if (account != null && account.equals(accountProperty.get())) { final int index = Collections.binarySearch(items, node); if (index < 0) { items.add(-index -1, node); } } break; case ACCOUNT_SECURITY_REMOVE: if (account != null && account.equals(accountProperty.get())) { items.removeAll(node); } break; case SECURITY_REMOVE: items.removeAll(node); break; case SECURITY_ADD: final int index = Collections.binarySearch(items, node); if (index < 0) { items.add(-index -1, node); } break; case SECURITY_MODIFY: items.removeAll(node); final int i = Collections.binarySearch(items, node); if (i < 0) { items.add(-i - 1, node); } break; case FILE_CLOSING: items.clear(); default: break; } }); } } public ObjectProperty<Account> accountProperty() { return accountProperty; } }
[ "jgnash.devel@gmail.com" ]
jgnash.devel@gmail.com
c1c19029cc47cdc08d29f898e339d81229590ae7
547d982300bdf45d7c802db676928bddc08c4d1c
/library-rental-project/src/main/java/blog/naver/bluesangil7/book/service/Genre.java
36af6eb6e2e67a70fbfcf15c1ae0b15935b33ec8
[]
no_license
bluesang/library
3304b7417fec0bfa409676f359f298da008f4fe2
c6c2417066a92815931c6cfc80112c0e8bbbe95f
refs/heads/master
2021-01-11T16:03:30.876533
2017-03-20T08:30:28
2017-03-20T08:30:28
79,995,535
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package blog.naver.bluesangil7.book.service; public class Genre { private int genreNo; private String genreName; public int getGenreNo() { return genreNo; } public void setGenreNo(int genreNo) { this.genreNo = genreNo; } public String getGenreName() { return genreName; } public void setGenreName(String genreName) { this.genreName = genreName; } @Override public String toString() { return "Genre [genreNo=" + genreNo + ", genreName=" + genreName + "]"; } }
[ "Administrator@smart20106" ]
Administrator@smart20106
aecab2ac7b4dfa59d8ef637db78897a984dbefc1
738dc7d8fb34cb9d2df16f11f70dccbc79920c91
/ArrayLab/src/Array.java
78b4f6ab1816a48089c38af7ec112518628557a2
[]
no_license
Raptura/CIS-1068
ea902cfa0544814e6f07ab2018b9eb2c7ac36f1b
83e0b90c53aa68adff72ed8e8ea0f80ada564afe
refs/heads/master
2021-01-12T11:37:19.538253
2016-10-28T18:34:33
2016-10-28T18:34:33
72,232,507
0
0
null
null
null
null
UTF-8
Java
false
false
1,174
java
public class Array { int[] array; public static void main(String[] args){ int[] a = new int[]{12,23,4,5,6,3,3,2,1}; Array arrayObj = new Array(a); arrayObj.bubbleSort(); arrayObj.print(); int val = arrayObj.binarySearch(12); System.out.println("12 is found at index:" + val); } public Array(int[] array){ this.array = array; } public void bubbleSort(){ boolean swapped = true; int temp; while (swapped){ swapped = false; for(int i = 0; i < array.length - 1; i++){ if(array[i] > array[i + 1]){ temp = array[i]; array[i] = array[i+1]; array[i + 1] = temp; swapped = true; } } } } public int binarySearch(int query){ int begin = 0; int end = array.length - 1; int mid; while(begin <= end){ mid = (int) Math.floor((begin + end) / 2); if(query == array[mid]){ return mid; } if(query > array[mid]){ begin = mid + 1; } if(query < array[mid]){ end = mid - 1; } } return -1; } public void print(){ for(int i = 0; i < array.length; i++){ System.out.println(array[i]); } } }
[ "smithark97@gmail.com" ]
smithark97@gmail.com
6f3bf4715f4d3e11116103364c138543e2aa9af4
fa6e5cbf615cc1c56f3a5cb50f2c817c0fa96d13
/OutpatientManagementModule/OutpatientManagement.DAL/src/com/lea/dal/hibernate/DatabaseRepository.java
fe114df044e4a5f7738af88089601abdbd36dabf
[]
no_license
LeaRezic/JavaExamAssignment
5cf71b705626e6bd304dd8357e76848f7c587545
fb2de3e57d1de45fa4fae2391875137fa8fe0f80
refs/heads/master
2020-03-21T21:30:51.738011
2018-07-19T09:16:43
2018-07-19T09:16:43
139,067,386
0
0
null
null
null
null
UTF-8
Java
false
false
8,374
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.lea.dal.hibernate; import com.lea.dal.domain.entities.*; import com.lea.dal.domain.repositories.Repository; import java.util.ArrayList; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; /** * * @author Lea */ public class DatabaseRepository implements Repository { private List<?> getAllEntitiesOfType(String className) { List<?> entityList = new ArrayList<>(); Session session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = null; try { tx = session.beginTransaction(); String currentQuery = "FROM " + className; entityList = session.createQuery(currentQuery).list(); tx.commit(); } catch (HibernateException ex) { if (tx != null) { tx.rollback(); } ex.printStackTrace(); } finally { session.close(); } return entityList; } private EntityBase getEntityByIdOfType(String className, int id) { EntityBase entity = () -> 0; Session session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = null; try { tx = session.beginTransaction(); String currentQuery = "FROM " + className + " WHERE id = " + id; entity = (EntityBase) session.createQuery(currentQuery).list().iterator().next(); tx.commit(); } catch (HibernateException ex) { if (tx != null) { tx.rollback(); } ex.printStackTrace(); } finally { session.close(); } return entity; } @Override public Doctor getDoctorById(int id) { return (Doctor) getEntityByIdOfType(Doctor.class.getSimpleName(), id); } @Override public List<Doctor> getAllDoctors() { return (ArrayList<Doctor>) getAllEntitiesOfType(Doctor.class.getSimpleName()); } @Override public Patient getPatientById(int id) { return (Patient) getEntityByIdOfType(Patient.class.getSimpleName(), id); } @Override public List<Patient> getAllPatients() { return (ArrayList<Patient>) getAllEntitiesOfType(Patient.class.getSimpleName()); } @Override public List<Patient> getAllPatientsByDoctor(int id) { List<Patient> patients = new ArrayList<>(); getAllPatients().forEach(p -> p.getAppointments() .forEach(a -> { if (a.getDoctor().getIddoctor() == id) { patients.add(p); } })); return patients; } @Override public Boolean insertOrUpdatePatient(Patient p) { insertOrUpdateEntity(p.getBasicDetailsByBasicDetailsId()); insertOrUpdateEntity(p.getBasicDetailsByNextOfKinId()); insertOrUpdateEntity(p.getComplaintDetails()); insertOrUpdateEntity(p.getLifestyleDetails()); insertOrUpdateEntity(p.getMedicalDetails()); insertOrUpdateEntity(p.getPersonalDetails()); insertOrUpdateEntity(p); return true; } @Override public Boolean insertOrUpdateDoctor(Doctor d) { insertOrUpdateEntity(d.getBasicDetails()); insertOrUpdateEntity(d); return true; } @Override public List<MaritalStatus> getAllMaritalStatuses() { return (ArrayList<MaritalStatus>) getAllEntitiesOfType(MaritalStatus.class.getSimpleName()); } @Override public List<DoctorSpecialization> getAllDoctorSpecializations() { return (ArrayList<DoctorSpecialization>) getAllEntitiesOfType(DoctorSpecialization.class.getSimpleName()); } @Override public List<BloodType> getAllBloodTypes() { return (ArrayList<BloodType>) getAllEntitiesOfType(BloodType.class.getSimpleName()); } @Override public List<Appointment> getAllAppointments() { return (ArrayList<Appointment>) getAllEntitiesOfType(Appointment.class.getSimpleName()); } @Override public Boolean insertOrUpdateAppointment() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } @Override public EmergencyRegistration getEmergencyRegistrationById(int id) { return (EmergencyRegistration) getEntityByIdOfType(EmergencyRegistration.class.getSimpleName(), id); } @Override public List<EmergencyRegistration> getAllEmeregencyRegistrations() { return (ArrayList<EmergencyRegistration>) getAllEntitiesOfType(EmergencyRegistration.class.getSimpleName()); } @Override public List<HospitalService> getAllHospitalServices() { return (List<HospitalService>) getAllEntitiesOfType(HospitalService.class.getSimpleName()); } private void insertOrUpdateEntity(EntityBase entity) { if (entity.fetchEntityId() == 0) { insertEntity(entity); } else { updateEntity(entity); } } private int insertEntity(EntityBase entity) { int newId = -1; Session session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = null; try { tx = session.beginTransaction(); newId = (int) session.save(entity); tx.commit(); } catch (HibernateException ex) { if (tx != null) { tx.rollback(); } ex.printStackTrace(); } finally { session.close(); } return newId; } private void updateEntity(EntityBase entity) { Session session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = null; try { tx = session.beginTransaction(); session.update(entity); tx.commit(); } catch (HibernateException ex) { if (tx != null) { tx.rollback(); } ex.printStackTrace(); } finally { session.close(); } } @Override public List<City> getAllCities() { return (List<City>) getAllEntitiesOfType(City.class.getSimpleName()); } @Override public List<Country> getAllCountries() { return (List<Country>) getAllEntitiesOfType(Country.class.getSimpleName()); } @Override public City getCityById(int id) { return (City) getEntityByIdOfType(City.class.getSimpleName(), id); } @Override public BloodType getBloodTypeById(int id) { return (BloodType) getEntityByIdOfType(BloodType.class.getSimpleName(), id); } @Override public MaritalStatus getMaritalStatusById(int id) { return (MaritalStatus) getEntityByIdOfType(MaritalStatus.class.getSimpleName(), id); } @Override public DoctorSpecialization getDoctorSpecializationById(int id) { return (DoctorSpecialization) getEntityByIdOfType(DoctorSpecialization.class.getSimpleName(), id); } @Override public Boolean insertEmergencyRegistration(EmergencyRegistration er) { insertOrUpdateEntity(er); return true; } @Override public void deleteEmergencyRegistration(EmergencyRegistration er) { deleteEntity(er); } private void deleteEntity(EntityBase entity) { Session session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = null; try { tx = session.beginTransaction(); session.delete(entity); tx.commit(); } catch (HibernateException ex) { if (tx != null) { tx.rollback(); } ex.printStackTrace(); } finally { session.close(); } } @Override public HospitalService getHospitalServiceById(int id) { return (HospitalService) getEntityByIdOfType(HospitalService.class.getSimpleName(), id); } @Override public Appointment getAppointmentById(int id) { return (Appointment) getEntityByIdOfType(Appointment.class.getSimpleName(), id); } }
[ "lea.rezic@gmail.com" ]
lea.rezic@gmail.com
b51103976cc42742ff9035e67bc1dfe3ff4ec1ee
59b6e9387608822d2a087d718ca8255296fe4afd
/app/src/main/java/com/global/toolbox/clock/ClockAdapter.java
194c46a8b500dc9ccec0424a65f933de2264ee17
[]
no_license
VEMTK/new_toolbox_game
bfd41c918170889ded90bbb9d354ea89ac407b4a
d378de8220a23aaab2af0bb504e03001940fda78
refs/heads/master
2020-12-02T07:49:45.632413
2017-07-10T03:18:20
2017-07-10T03:18:20
96,731,276
0
0
null
null
null
null
UTF-8
Java
false
false
2,089
java
package com.global.toolbox.clock; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.global.toolbox.R; import java.util.List; /** * Created by xlc on 2016/10/12. */ public class ClockAdapter extends BaseAdapter { private LayoutInflater layoutInflater; private List<Clock> mList; private Context mContext; public ClockAdapter(Context context, List<Clock> s) { layoutInflater = LayoutInflater.from(context); this.mList = s; this.mContext=context; } @Override public int getCount() { return mList.size(); } @Override public Object getItem(int position) { return mList.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if (convertView == null) { holder = new ViewHolder(); convertView = layoutInflater.inflate(R.layout.clock_time_item, null); holder.textView = (TextView) convertView.findViewById(R.id.clock_time_text); holder.jiange = (TextView) convertView.findViewById(R.id.clock_jiange); holder.current_time = (TextView) convertView.findViewById(R.id.clock_current_time); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.textView.setText(mList.get(position).getTimes()); holder.jiange.setText(mList.get(position).getJiange()); holder.current_time.setText(mList.get(position).getCurrent_time()); return convertView; } public final class ViewHolder { public TextView textView,jiange,current_time; } }
[ "852164779@qq.com" ]
852164779@qq.com
013d67246a1a679ebf29e20b473af65ea2c1af65
c82deda73cb8af591ae3232915fd3ae831b286ae
/hedera-node/src/test/java/com/hedera/services/files/interceptors/ConfigListUtilsTest.java
06b43c3cc3495d93cd1101d04da70308fa2aecc2
[ "Apache-2.0" ]
permissive
BitBondtmUK/hedera-services
1ca57a7c0335f731b1136f03d838469670e1a154
a0f349b0b7ed88370ffc471148462ba4d1d9ba0e
refs/heads/master
2022-12-03T18:12:17.603960
2020-08-26T04:37:35
2020-08-26T04:37:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,291
java
package com.hedera.services.files.interceptors; /*- * ‌ * Hedera Services Node * ​ * Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC * ​ * 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. * ‍ */ import com.hedera.services.files.MetadataMapFactory; import com.hederahashgraph.api.proto.java.ServicesConfigurationList; import com.hederahashgraph.api.proto.java.Setting; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith; import static com.hedera.services.files.interceptors.ConfigListUtils.*; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @RunWith(JUnitPlatform.class) class ConfigListUtilsTest { private ServicesConfigurationList example = ServicesConfigurationList.newBuilder() .addNameValue(Setting.newBuilder() .setName("key") .setValue("value")) .build(); @Test public void recognizesParseable() { // given: var nonsense = "NONSENSE".getBytes(); var truth = example.toByteArray(); // when: var nonsenseFlag = isConfigList(nonsense); var truthFlag = isConfigList(truth); // then: assertFalse(nonsenseFlag); assertTrue(truthFlag); } @Test public void parsesToDefaultIfInvalid() { // expect: Assertions.assertEquals( ServicesConfigurationList.getDefaultInstance(), uncheckedParse("NONSENSE".getBytes())); } @Test public void parses() { // expect: Assertions.assertEquals(example, uncheckedParse(example.toByteArray())); } @Test public void cannotBeConstructed() { // expect: assertThrows(IllegalStateException.class, ConfigListUtils::new); } }
[ "michael.tinker@hedera.com" ]
michael.tinker@hedera.com
a619c3028cbed251530b17addd346aea7a32e9c9
6be39fc2c882d0b9269f1530e0650fd3717df493
/weixin反编译/sources/com/tencent/mm/plugin/appbrand/game/l.java
e2963f5db93c9b4333b8a94260fc0d3dfb68740a
[]
no_license
sir-deng/res
f1819af90b366e8326bf23d1b2f1074dfe33848f
3cf9b044e1f4744350e5e89648d27247c9dc9877
refs/heads/master
2022-06-11T21:54:36.725180
2020-05-07T06:03:23
2020-05-07T06:03:23
155,177,067
5
0
null
null
null
null
UTF-8
Java
false
false
7,390
java
package com.tencent.mm.plugin.appbrand.game; import android.content.SharedPreferences; import android.webkit.JavascriptInterface; import com.tencent.mm.plugin.appbrand.debugger.q; import com.tencent.mm.plugin.appbrand.g.b; import com.tencent.mm.plugin.appbrand.g.f; import com.tencent.mm.plugin.appbrand.j; import com.tencent.mm.plugin.appbrand.jsapi.d; import com.tencent.mm.plugin.appbrand.r.h; import com.tencent.mm.plugin.report.service.g; import com.tencent.mm.sdk.platformtools.ad; import com.tencent.mm.sdk.platformtools.bi; import com.tencent.mm.sdk.platformtools.x; import com.tencent.mm.storage.c; public final class l { boolean jaQ = false; j jaR; f jaS; com.tencent.mm.plugin.appbrand.g.a jaT; com.tencent.mm.plugin.appbrand.g.a jaU; private Boolean jaV = null; private class a { private a() { } /* synthetic */ a(l lVar, byte b) { this(); } @JavascriptInterface public final int create(String str) { int i; synchronized (l.this) { if (!l.this.jaQ || l.this.jaS == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "create subContext failed. mStateReady = [%b] mSubContextAddon = [%s]", Boolean.valueOf(l.this.jaQ), l.this.jaS); i = -1; } else { b aek = l.this.jaS.aek(); l lVar = l.this; if (aek.adY()) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "bindSubContext subContext = [" + aek + "]"); } else if (lVar.jaU == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "initSubJSContext mBridgeHolder == null"); } else { lVar.jaU.a(aek, "WeixinJSContext"); } String str2 = ""; if (!lVar.aeq()) { aek.addJavascriptInterface(new d(lVar.jaR, aek), "WeixinJSCore"); str2 = a.a(lVar.jaR.iuk, "wxa_library/android.js", true); } x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject WAGameSubContext to SubContext"); str2 = bi.oM(str2) + a.a(lVar.jaR.iuk, "WAGameSubContext.js", false); g.pWK.a(778, 17, 1, false); h.a(aek, str2, new com.tencent.mm.plugin.appbrand.r.h.a() { public final void pH(String str) { x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK WAGameSubContext Script suc: %s", str); g.pWK.a(778, 19, 1, false); } public final void fs(String str) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK WAGameSubContext Script Failed: %s", str); g.pWK.a(778, 18, 1, false); com.tencent.mm.plugin.appbrand.report.a.C(l.this.jaR.iuk.mAppId, 24, 0); com.tencent.mm.plugin.appbrand.report.a.a(l.this.jaR.mAppId, l.this.jaR.iuk.isS.iRU.iJb, l.this.jaR.iuk.isS.iRU.iJa, 778, 18); } }); l lVar2 = l.this; if (!bi.oN(str)) { String a = a.a(lVar2.jaR.iuk, str, false); if (bi.oN(a)) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "bussiness code is null [%s]", a); } else { x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SubContext subContext.js"); g.pWK.a(778, 21, 1, false); h.a(aek, str, a, new com.tencent.mm.plugin.appbrand.r.h.a() { public final void pH(String str) { x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK subContext Script suc: %s", str); g.pWK.a(778, 23, 1, false); } public final void fs(String str) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK subContext Script Failed: %s", str); g.pWK.a(778, 22, 1, false); com.tencent.mm.plugin.appbrand.report.a.C(l.this.jaR.mAppId, 24, 0); com.tencent.mm.plugin.appbrand.report.a.a(l.this.jaR.mAppId, l.this.jaR.iuk.isS.iRU.iJb, l.this.jaR.iuk.isS.iRU.iJa, 778, 22); } }); q.a(lVar2.jaR.iuk, aek, str); } } x.i("MicroMsg.WAGameWeixinJSContextLogic", "create subContext success = [%d]", Integer.valueOf(aek.adZ())); i = aek.adZ(); } } return i; } @JavascriptInterface public final void destroy(int i) { synchronized (l.this) { if (!l.this.jaQ || l.this.jaS == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "destroy subContext failed. mStateReady = [%b] mSubContextAddon = [%s] contextId = [%d]", Boolean.valueOf(l.this.jaQ), l.this.jaS, Integer.valueOf(i)); return; } l.this.jaS.kh(i); } } } public l(j jVar, b bVar) { if (jVar == null || bVar == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. service is [%s] jsRuntime = [%s]", jVar, bVar); return; } f fVar = (f) bVar.v(f.class); if (fVar == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. jsRuntime not support subContext"); } else if (fVar.aej() == null) { x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. subContext has no main jscontext, you should to init it first."); } else { synchronized (this) { this.jaR = jVar; this.jaS = fVar; this.jaT = fVar.aej(); this.jaQ = true; } } } public final boolean aeq() { if (this.jaV == null) { boolean z; long Wz = bi.Wz(); SharedPreferences cgg = ad.cgg(); int i = cgg != null ? cgg.getInt("useisolatectxwxalibrary", 0) : 0; if (i == 1) { z = true; } else { if (i != -1) { com.tencent.mm.ipcinvoker.wx_extension.a.a aVar = b.gOV; c fp = com.tencent.mm.ipcinvoker.wx_extension.a.a.fp("100378"); if (fp == null || !fp.isValid()) { z = false; } else if (bi.getInt((String) fp.civ().get("useisolatectxwxalibrary"), 0) == 1) { z = true; } } z = false; } this.jaV = Boolean.valueOf(z); x.i("MicroMsg.WAGameWeixinJSContextLogic", "read ShouldUseIsolateCtxWxaLibrary cost time = [%d]", Long.valueOf(bi.bB(Wz))); } return this.jaV.booleanValue(); } }
[ "denghailong@vargo.com.cn" ]
denghailong@vargo.com.cn
b1afab38d5430738f6a6d5c57d6f7dc7944d86bd
b264d24c401fea860eb82d85cd5843ea93b2a1b1
/src/main/java/com/springingdream/products/api/ProductNotFoundAdvice.java
7859522f09f90714fce51eff1edbac4bf6292200
[]
no_license
SpringingDream/products
7f86ef500ae944fa22f4d4d22d24fcfc08c3f0e7
3f24c2e3a7aee592f70cfeaf15c00e874fe7d9c5
refs/heads/master
2020-04-11T19:51:26.604783
2018-12-27T01:37:58
2018-12-27T01:37:58
162,049,893
0
0
null
null
null
null
UTF-8
Java
false
false
600
java
package com.springingdream.products.api; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; @ControllerAdvice public class ProductNotFoundAdvice { @ResponseBody @ExceptionHandler(ProductNotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) String notFound(ProductNotFoundException e) { return e.getMessage(); } }
[ "knd2000.2@gmail.com" ]
knd2000.2@gmail.com
0c5a1513acb1e0887a2e54f82e6dcf78d92d1311
de202508b4a88ab39c5cb5291febad6ba7afa882
/app/src/main/java/be/pxl/parkingdata/brussel/BxlParkingWrapper.java
c8ea13ac48add04a26b6394cbbee06652ee938a3
[]
no_license
PXL-Smart-ICT/open-parking
b6fff43ca471c2beb592efc1ae9b5a33304faaa5
f02bee65f9ca13c9cd58dc32f20cbf81f7b51ad2
refs/heads/master
2021-05-29T08:14:29.939454
2015-05-13T07:49:55
2015-05-13T07:49:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package be.pxl.parkingdata.brussel; import java.util.List; public class BxlParkingWrapper { private int nhits; private BxlParameters parameters; private List<BxlParkingRecord> records; public synchronized int getNhits() { return nhits; } public synchronized void setNhits(int nhits) { this.nhits = nhits; } public synchronized BxlParameters getParameters() { return parameters; } public synchronized void setParameters(BxlParameters parameters) { this.parameters = parameters; } public synchronized List<BxlParkingRecord> getRecords() { return records; } public synchronized void setRecords(List<BxlParkingRecord> records) { this.records = records; } }
[ "servaas.tilkin@pxl.be" ]
servaas.tilkin@pxl.be
523a8accf668c6cd276030f74215eb89d0ed63c0
d2ebda1552ecf3773feb5e70f42884c171c5be56
/Module 4/Module4/Replay2.java
67c24a2dbe95bf4c5564f057b2d9b50e8bb1f350
[]
no_license
rhmvu/VU-Introduction-to-Programming-Assignments
c48fdef301521f84d427d3553b196d272393d1f4
dcee6d7cd14c59026c08c0c712cc39601aee4813
refs/heads/master
2021-07-03T11:46:09.493292
2017-09-17T15:42:07
2017-09-17T15:43:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,459
java
package Module4; import ui.UserInterfaceFactory; import java.io.PrintStream; import java.util.Scanner; import ui.OthelloReplayUserInterface; import ui.UIAuxiliaryMethods; class Replay2 { static final int BLACK = 2; static final int WHITE = 1; int waitingTime, x, y, player; Boolean move; OthelloReplayUserInterface ui; PrintStream out; Scanner input = UIAuxiliaryMethods.askUserForInput().getScanner(); Replay2(){ ui = UserInterfaceFactory.getOthelloReplayUI(); out = new PrintStream(System.out); } void start(){ ui.place(4-1, 5-1, BLACK); ui.place(5-1, 4-1, BLACK); ui.place(5-1, 5-1, WHITE); ui.place(4-1, 4-1, WHITE); ui.showChanges(); scanner(); } void scanner(){ while(input.hasNextLine()){ Scanner lineScanner= new Scanner(input.nextLine()); inputParser(lineScanner); changer(); } } void inputParser(Scanner lineScanner){ String inputPlayer= lineScanner.next(); player= setPlayer(inputPlayer); waitingTime= lineScanner.nextInt(); String stringMove= lineScanner.next(); move = stringMove.equals("move")? true: false; if(move==false){ ui.printf("player %s: passed\n", inputPlayer); scanner(); } int conquer = -1; while (lineScanner.hasNext()){ String xaxis = lineScanner.next(); int yaxis= lineScanner.nextInt(); getLocation(xaxis.charAt(0),yaxis); ui.place(x,y, player); ui.showChanges(); conquer ++; } ui.printf("player %s: conquered %d pieces\n", inputPlayer, conquer); } int setPlayer(String inputPlayer){ int result= inputPlayer.equals("white") ? WHITE: BLACK; return result; } void getLocation(char xaxis,int yaxis){ switch (xaxis){ case 'a': x=0; break; case 'b': x=1; break; case 'c': x=2; break; case 'd': x=3; break; case 'e': x=4; break; case 'f': x=5; break; case 'g': x=6; break; case 'h': x=7; break; } switch(yaxis){ case 1: y= 0; break; case 2: y= 1; break; case 3: y= 2; break; case 4: y= 3; break; case 5: y= 4; break; case 6: y= 5; break; case 7: y= 6; break; case 8: y= 7; break; } } void changer(){ ui.place(x,y, player); if(waitingTime >0){ ui.wait(waitingTime); ui.showChanges(); } if(input.hasNextLine()){ scanner(); } else{ ui.clearStatusBar(); ui.printf("The game is finished, the GUI wil close in 10 seconds"); ui.wait(10000); System.exit(0); } } public static void main(String[] args) { new Replay2().start(); } }
[ "ravdham@gmail.com" ]
ravdham@gmail.com
cd3027240b42b26ef7844d0231d4b7f9f7f2a9b2
b45b62a6896038bd20036dd8af408487d3d129bd
/src/isMatch.java
1b22ae7d81c5c4e3ced408a2f8a75509298eaa2f
[]
no_license
MickeyZeng/Code-Practice
1a2d7acabb2bc27f4b0eef4e517c7cc63fced1bd
8d6967bc2ac6a10f547131f23def97bdc59acc76
refs/heads/master
2023-03-30T00:25:47.400805
2021-04-09T07:24:09
2021-04-09T07:24:09
258,943,406
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
import java.util.ArrayList; public class isMatch { public static void main(String[] args) { System.out.println(isMatch("aa","a")); } public static boolean isMatch(String s, String p) { //还有好多的动态规划没写 return false; } }
[ "a1752399@student.adelaide.edu.au" ]
a1752399@student.adelaide.edu.au
2a17ef730c209ac43c0258a470320225e7a9a382
606b815682acff90e784473969eaa857ebcfac27
/151-Reverse-Words-in-a-String/solution.java
3ca05b69efb4c63320daf1058dcad91570b88a01
[]
no_license
jellylidong/My-Leetcode-Track
39f73e6c396fdf53d22f7f164587d58a29400499
12d7160e9d3141f123d27dbfca84ebe42c15314c
refs/heads/master
2021-01-17T10:20:53.057037
2016-07-15T04:45:50
2016-07-15T04:45:50
58,507,424
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
public class Solution { public String reverseWords(String str) { // = s.trim(); String[] ss = str.split("\\s+"); StringBuilder sb = new StringBuilder(); for(int i = ss.length-1; i >= 0; i--){ sb.append(ss[i]); sb.append(" "); } return sb.toString().trim(); } }
[ "jellylidong@users.noreply.github.com" ]
jellylidong@users.noreply.github.com
f4e02d95dd7b2f66376289fcd25c68633df03f66
22727214a106f8c65c31a6a4a293b7ab97e8cd23
/api/src/main/java/project/soa/model/User.java
32cdd6c36a00cde2a63d7d572b8c684f31fc3d35
[ "MIT" ]
permissive
kstypa/soa-project
8b691d7e277f7fe723c6752ea755ed33d2df1ffa
14e98b13848c9606892735d19411f1f94f56a301
refs/heads/master
2022-07-19T14:01:18.686246
2019-06-24T08:42:17
2019-06-24T08:42:17
190,364,992
0
0
MIT
2022-06-21T01:16:55
2019-06-05T09:20:58
Java
UTF-8
Java
false
false
596
java
package project.soa.model; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.io.Serializable; @Entity(name = "soa_users") @Data @NoArgsConstructor public class User implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private String login; private String password; private String first_name; private String last_name; @Enumerated(EnumType.STRING) @Basic(fetch = FetchType.EAGER) private Role role; public enum Role { MANAGER, CLIENT, COOK, DELIVERY_BOY } }
[ "bury09@gmail.com" ]
bury09@gmail.com
e21179a55fc962b77cd32e0bdabab4162bf9a226
34c02bc58256cc884dd54656147188a5bac8a731
/Student_DB/StudentDatabase.java
123839ab91702403b933073a38111c50b8bf0c4d
[]
no_license
Aryangpt007/JWT
1afadc5543c2389bfc748c0615c7d34d0d4dc41f
da21ed27a22edca1e29cfe20a1c7cfc24d1f5e05
refs/heads/master
2020-04-03T06:28:06.467191
2018-08-07T19:40:07
2018-08-07T19:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,092
java
import java.io.*; import java.util.*; class StudentDatabase { ArrayList<Student> s, A, B, C, F; StudentDatabase() { s= new ArrayList<Student>(); A= new ArrayList<Student>(); B= new ArrayList<Student>(); C= new ArrayList<Student>(); F= new ArrayList<Student>(); } void addStu(Student newStu) { s.add(newStu); assignGrades(); } void editStu(Student newStu, int pos) { s.set(pos, newStu); } int deleteStu(long prn) { int ans= searchByPrn(prn); if(ans==-404) return -404; else s.remove(ans); return 1; } void sortByPrn() { Student temp; for(int i=0; i<s.size(); ++i) { for(int j=0; j<s.size()-1-i; ++j) { if(s.get(j).prn>s.get(j+1).prn) { temp = s.get(j); s.set(j, s.get(j+1)); s.set(j+1, temp); } } } } void sortByMarks() { Student temp; for(int i=0; i<s.size(); ++i) { for(int j=0; j<s.size()-1-i; ++j) { if(s.get(j).totalMks<s.get(j+1).totalMks) { temp = s.get(j); s.set(j, s.get(j+1)); s.set(j+1, temp); } } } } void sortByName() { Student temp; for(int i=0; i<s.size(); ++i) { for(int j=0; j<s.size()-1-i; ++j) { if(((s.get(j).name).compareTo(s.get(j+1).name)>0)) { temp = s.get(j); s.set(j, s.get(j+1)); s.set(j+1, temp); } } } } void assignGrades() { for(Student x: s) { if(x.percentage<40) x.grade= 'F'; else if(x.percentage<60) x.grade= 'C'; else if(x.percentage<80) x.grade= 'B'; else x.grade= 'A'; } } void classify() { for(Student x: s) { switch(x.grade) { case 'A': A.add(x); break; case 'B': B.add(x); break; case 'C': C.add(x); break; case 'F': F.add(x); break; } } } void displayGradeCategory(char grade) { assignGrades(); classify(); for(Student x: s) { if(x.grade==grade) display(x); } } int searchByPrn(long prn) { boolean found= false; int position= -1; for(Student x: s) { if(x.prn==prn) { found= true; position= s.indexOf(x); } if(found) break; } if(found) return position; return -404; } int searchByPosition(int pos) { if (pos>=0 && pos<s.size()) return pos; else return -404; } int searchByName(String name) { boolean found= false; int position= -1; for(Student x: s) { if((x.name).equalsIgnoreCase(name)) { found= true; position= s.indexOf(x); } if(found) break; } if(found) return position; return -404; } void display(Student s) { System.out.println("________________________________________________"); System.out.print("NAME: "+s.name+"\t"); System.out.println("PRN: "+s.prn); System.out.print("AGE: "+s.age+"\t"); System.out.println("DATE OF BIRTH: "+s.dob); System.out.println("................................................"); System.out.println("\t\tMARKS"); System.out.println("................................................"); System.out.println("Subject 1\t\t"+s.sub1); System.out.println("Subject 2\t\t"+s.sub2); System.out.println("Subject 3\t\t"+s.sub3); System.out.println("Subject 4\t\t"+s.sub4); System.out.println("Subject 5\t\t"+s.sub5); System.out.println("Subject 6\t\t"+s.sub6); System.out.println("................................................"); System.out.println("PERCENTAGE: "+s.percentage+"\tGRADE: "+s.grade); System.out.println("................................................"); } void display(long prn) { int found= searchByPrn(prn); if(found== -404) System.out.println("Sorry! No student with this PRN"); else display(s.get(found)); } void display(int pos) { if(pos>=0 && pos<s.size()) display(s.get(pos)); else System.out.println("Wrong position entered!"); } void display(String name) { int found= searchByName(name); if(found== -404) System.out.println("Sorry! No student with this PRN"); else display(s.get(found)); } void display() { for(Student x: s) { display(x); System.out.println(); } } }
[ "bs98.saini@gmail.com" ]
bs98.saini@gmail.com
3be3006c4c30358cbd75e4c7a16c207995088a36
a4e2fcf2da52f479c2c25164599bbdb2628a1ffa
/soft/sextante_lib/sextante/src/es/unex/sextante/outputs/NullOutputChannel.java
125ed5256c54601945fade66e42d3650000de4eb
[]
no_license
GRSEB9S/sextante
126ffc222a2bed9918bae3b59f87f30158b9bbfe
8ea12c6c40712df01e2e87b02d722d51adb912ea
refs/heads/master
2021-05-28T19:24:23.306514
2013-03-04T15:21:30
2013-03-04T15:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package es.unex.sextante.outputs; public class NullOutputChannel implements IOutputChannel { @Override public String getAsCommandLineParameter() { return "!"; } }
[ "volayaf@gmail.com" ]
volayaf@gmail.com
f26997f3ab0f44fa44a676b3fa55c775e5387460
d09219b9a0a445eff5527f15b99bbcffde82120a
/pact/provider/jvm-provider/src/main/java/calculator/power/PowerStatus.java
99d899ab8f52f5ae6b9ebeaff1951431e65c2b8f
[]
no_license
signed/talk-contract-tests
64bc19bed761a3c816e6f2b49629a4e7a08c5f01
05d995659ccfbef3912f60c2b50916786017deb9
refs/heads/master
2023-01-10T04:42:41.948577
2020-10-28T18:38:54
2020-10-28T18:38:54
122,981,496
3
2
null
2023-01-06T01:48:36
2018-02-26T14:30:15
Java
UTF-8
Java
false
false
79
java
package calculator.power; public class PowerStatus { public String status; }
[ "thomas.heilbronner@gmail.com" ]
thomas.heilbronner@gmail.com
6ecf51b28b7130baff0696fb8e438f32129413ac
181072dbdb1a6a522db7e6e182ac4ed9ad059c86
/src/main/java/com/KL/member/service/CardService.java
b359f82a79afec599ef13644cc1dbbd06b82e48d
[]
no_license
seongjunLee96/KL
58f2dbe423744266ddb7bb15ce312d6d1eb0b0ff
8b6f707e05784c56f3e87b815f3423583c8783b3
refs/heads/master
2020-04-02T11:53:12.549963
2018-10-23T23:49:54
2018-10-23T23:49:54
147,130,858
0
0
null
null
null
null
UTF-8
Java
false
false
2,692
java
package com.KL.member.service; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.web.servlet.ModelAndView; import com.KL.member.dao.MemberDAO; import com.KL.member.dao.PtDAO; import com.KL.member.vo.MemberVO; import com.KL.member.vo.PtVO; @Service public class CardService { private ModelAndView mav; @Autowired private PtService pt; @Autowired private BCryptPasswordEncoder passEncoder; @Autowired private HttpSession session; @Autowired private PtDAO ptDAO; public ModelAndView ptpay(PtVO ptVO,HttpServletResponse response,String id,String tranl,String title,String start,String end,int price) throws IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); mav = new ModelAndView(); PtVO cardtest2=ptDAO.cardtest(ptVO); try { if(ptVO.getId().equals(cardtest2.getId()) ) { out.println("<script>"); out.println("alert('신청시간에 이미 수강하는 강의가 있습니다.');"); out.println("location.href='pton'");// 이전 페이지로 이동! out.println("</script>"); out.close(); }else { if(ptVO.getId().equals(cardtest2.getId()) && ptVO.getTitle().equals(cardtest2.getTitle())){ out.println("<script>"); out.println("alert('동일한강의는 신청이 불가능 합니다.');"); out.println("location.href='pton'");// 이전 페이지로 이동! out.println("</script>"); out.close(); } else { int result = ptDAO.addpt(ptVO); if (result == 0) { // 등록 실패하면 mav.setViewName("Pt/ptr"); } else { // 등록 성공하면 out.println("<script>"); out.println("alert('결제가완료되었습니다..');"); out.println("location.href='pton'"); out.println("</script>"); out.close(); /*mav.addObject("cardtest", cardtest); mav.setViewName("redirect:/textList"); */ } } } }catch(NullPointerException ne){ int result = ptDAO.addpt(ptVO); if (result == 0) { // 등록 실패하면 mav.setViewName("ptr"); } else { // 등록 성공하면 out.println("<script>"); out.println("alert('결제가완료되었습니다..');"); out.println("location.href='pton'"); out.println("</script>"); out.close(); } } return mav; } }
[ "39722371+seongjunLee96@users.noreply.github.com" ]
39722371+seongjunLee96@users.noreply.github.com
04e713944fbe82a86ef27157300eb1f25a14dd6f
a24ccb271d78b56bc4e7ccf2f3c5626730e2a071
/music/src/main/java/com/jcs/music/DimentionUtils.java
e176a8d6cb1868753b66b48acae6e10c316feb39
[]
no_license
Jichensheng/ToolsPractice
c74e136183cbb9115bca197dee38a5b2efc447c9
c4e5b6788bf30915bd7c88080e0dee1e61265fa4
refs/heads/master
2021-01-19T19:35:51.359950
2017-09-07T11:33:10
2017-09-07T11:33:10
88,426,455
0
0
null
2017-08-15T02:54:06
2017-04-16T16:07:21
Java
UTF-8
Java
false
false
1,517
java
package com.jcs.music; import android.content.Context; /** * author:Jics * 2017/6/26 13:55 */ public class DimentionUtils { /** * 将px值转换为dip或dp值,保证尺寸大小不变 * * @param pxValue * (DisplayMetrics类中属性density) * @return */ public static int px2dip(Context context, float pxValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (pxValue / scale + 0.5f); } /** * 将dip或dp值转换为px值,保证尺寸大小不变 * * @param dipValue * (DisplayMetrics类中属性density) * @return */ public static int dip2px(Context context, float dipValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dipValue * scale + 0.5f); } /** * 将px值转换为sp值,保证文字大小不变 * * @param pxValue * (DisplayMetrics类中属性scaledDensity) * @return */ public static int px2sp(Context context, float pxValue) { final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; return (int) (pxValue / fontScale + 0.5f); } /** * 将sp值转换为px值,保证文字大小不变 * * @param spValue * (DisplayMetrics类中属性scaledDensity) * @return */ public static int sp2px(Context context, float spValue) { final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; return (int) (spValue * fontScale + 0.5f); } }
[ "jichensheng@foxmail.com" ]
jichensheng@foxmail.com
eaad6c8dc8df4006c8de512a80c9a01421046c7a
b277c94b78cd231373d08567860e1020beda0513
/javadev/src/exam/oop11/TVUser.java
b740383ab5cb89e84932841b659d10d1ac9539b2
[]
no_license
MorimKang/Hello-Java
74743deca45b36e745079649e9ab7d6dacd8ce63
d3bf26bbe36f3daaa9bf914ff870ff4b5d3f13e2
refs/heads/master
2020-04-16T09:50:36.261845
2019-03-02T10:30:44
2019-03-02T10:30:44
165,478,987
0
0
null
null
null
null
UHC
Java
false
false
317
java
package exam.oop11; public class TVUser { public static void main(String[] args) { TV tv = new XiaomiTV(); //업캐스팅. 자동형변환. // System.out.println(TV.volt); tv.powerOn(); tv.channelUp(); tv.channelUp(); tv.soundUp(); tv.soundUp(); tv.soundDown(); tv.powerOff(); } }
[ "user@211.197.215.28" ]
user@211.197.215.28
1004410ac2e95e438654fd9b7778146f8942064b
64624f404053ee762f404233c2984074092def5e
/mybatis_day03_3_user_OneToMany/src/main/java/com/lqh/domain/User.java
1fae9901c01a9a462f2d3c9401338f9aad660d95
[]
no_license
bjlqh/mybatis
7a6a33cb30a1b8701a8a2b5cef0e48221233c781
b35641314b17186d43175e143e0cbcf52d37bb19
refs/heads/master
2022-07-25T08:38:16.397215
2019-06-09T15:54:16
2019-06-09T15:54:16
191,024,861
0
0
null
2022-06-21T01:15:08
2019-06-09T15:43:13
Java
UTF-8
Java
false
false
1,480
java
package com.lqh.domain; import java.util.Date; import java.util.List; public class User { private Integer id; private String username; private String sex; private Date birthday; private String address; private List<Account> accounts; public List<Account> getAccounts() { return accounts; } public void setAccounts(List<Account> accounts) { this.accounts = accounts; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } @Override public String toString() { return "User{" + "id=" + id + ", username='" + username + '\'' + ", sex='" + sex + '\'' + ", birthday=" + birthday + ", address='" + address + '\'' + ", accounts=" + accounts + '}'; } }
[ "149975436@qq.com" ]
149975436@qq.com
8dfeba72232dc28ee7d557a2c7b24cad8040e600
2d09a42489a840090a41b613a3146c5af9050278
/src/main/java/uz/doston/springjwtsecurity/model/User.java
652a19ce658f51c4b6615261ffa2cc1874c8ab4c
[]
no_license
Doston1316/SpringJwtSecurity
1a22c4b60a516f6bff8ef6e77c5b47d485c4909e
04adb3c2e285fcfef66385453aca1d019a68a6ad
refs/heads/master
2023-07-15T14:12:28.862885
2021-09-04T04:47:18
2021-09-04T04:47:18
402,966,003
1
0
null
null
null
null
UTF-8
Java
false
false
1,932
java
package uz.doston.springjwtsecurity.model; import uz.doston.springjwtsecurity.enam.Status; import javax.persistence.*; import java.util.Set; @Entity @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String userName; private String email; private String password; private String firstName; private String lastName; // @Enumerated(EnumType.STRING) private Status status; @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "user_role", joinColumns = @JoinColumn(name = "user_id",referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "role_name",referencedColumnName = "name")) private Set<Role> roles; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Status getStatus() { return status; } public void setStatus(Status status) { this.status = status; } public Set<Role> getRoles() { return roles; } public void setRoles(Set<Role> roles) { this.roles = roles; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
[ "84778369+Doston1316@users.noreply.github.com" ]
84778369+Doston1316@users.noreply.github.com
824b4d298c616a95f42c4a5d33745781578dbb5b
c0cdf03000f2856cbcbeae69b06671fc62aecf52
/src/ReplIt/OOP_10.java
6ee151bfb33a426adf1ee8478cd6b367ad5922b0
[]
no_license
nshaltaeva/Summer2019_Java
4e2497f9162d3d020d1027c40dae8abd29614051
db095e3fdaee52b519744e3a2e45c6d8a8a8d7ba
refs/heads/master
2020-07-22T21:49:06.934240
2019-12-10T22:12:21
2019-12-10T22:12:21
207,339,317
1
0
null
null
null
null
UTF-8
Java
false
false
174
java
package ReplIt; public class OOP_10 { public static int plus(int a, int b) { return a+b; } public static int minus(int a, int b) { return a-b; } }
[ "nshaltaeva@gmail.com" ]
nshaltaeva@gmail.com
2090454ac5f3597b32743784b1fb98453d0a9ba9
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/domain/KoubeiMarketingDataCustomreportDetailQueryModel.java
b36e1d3f8c342963f63e0d72db904cca0197ee25
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 自定义数据报表规则详情查询接口 * * @author auto create * @since 1.0, 2018-07-26 14:04:13 */ public class KoubeiMarketingDataCustomreportDetailQueryModel extends AlipayObject { private static final long serialVersionUID = 6556497565787439776L; /** * 自定义报表的规则KEY */ @ApiField("condition_key") private String conditionKey; public String getConditionKey() { return this.conditionKey; } public void setConditionKey(String conditionKey) { this.conditionKey = conditionKey; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
6820d5a929753a756e00e2746dcf777215f23c5c
0ac791743dec7dc31c899e504db0e30b346c3d7c
/src/java/br/com/great/contexto/Objeto.java
e00d2a82ac2f1a9ac25ea8234f30941a09adce10
[]
no_license
carleandro7/webservidor2
5758fe66ab2ade32439bdee8880f3d5edde7fb06
ed1b59b1577e4f2f37c9c6dffa402bde833ed3e2
refs/heads/master
2021-01-10T18:08:23.455822
2015-04-30T11:11:00
2015-04-30T11:11:00
29,984,623
1
0
null
null
null
null
UTF-8
Java
false
false
239
java
package br.com.great.contexto; public class Objeto { private Posicao posicao; public Posicao getPosicao() { return posicao; } public void setPosicao(Posicao posicao) { this.posicao = posicao; } }
[ "carleandro7@gmail.com" ]
carleandro7@gmail.com
2eaacd4f81a5ac370f14ab09f4ff9ba6f2e6dc11
b9d60892a5556b2b21cf8fa31f1fb4b5425ccc9c
/app/src/main/java/cl/estudiohumboldt/jitfront/DeviSpinnerAdapter.java
c30293a7d601ffdc274b245022144d92a7b1956e
[]
no_license
cristhoper/jitfront-android
5cb46bcd205496d6a0f4ae5422de9bde558f5fa8
22ab4c15d774218a8e834a9d675a9543690d9776
refs/heads/master
2021-10-26T04:52:35.306359
2019-04-10T17:32:54
2019-04-10T17:32:54
180,455,987
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package cl.estudiohumboldt.jitfront; import android.bluetooth.BluetoothDevice; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import java.util.ArrayList; class DeviSpinnerAdapter extends ArrayAdapter { private ArrayList<BluetoothDevice> mLeDevices; DeviSpinnerAdapter(Context ctx){ super(ctx, android.R.layout.simple_spinner_dropdown_item); mLeDevices = new ArrayList<BluetoothDevice>(); } void addDevice(BluetoothDevice device){ if (!mLeDevices.contains(device)){ mLeDevices.add(device); } } public BluetoothDevice getDevice(int pos){ return mLeDevices.get(pos); } public void clear(){ mLeDevices.clear(); } @Override public int getCount() { return mLeDevices.size(); } @Override public Object getItem(int position) { return mLeDevices.get(position); } @Override public long getItemId(int position) { return position; } }
[ "cristhoper@gmail.com" ]
cristhoper@gmail.com
51900de7a4011a6e3c69cfed1db3cd04cf3b335c
540d56e24fa1d5c3875bb80a36d416ee4a5d26e8
/commonlib/src/main/java/com/leifu/commonlib/view/dialog/LoadingDialog.java
341a40fc2ef44b92ce7d55af8d257c77ad831e79
[]
no_license
leifu1107/CommonLibDemo
f44e7b29aa68ce6dbb673f01712c206ba00d1886
14ec822400678b25e402d03f0273376cf3e0f323
refs/heads/master
2020-09-13T18:17:10.463701
2020-08-28T09:15:40
2020-08-28T09:15:40
222,865,651
1
0
null
null
null
null
UTF-8
Java
false
false
1,237
java
package com.leifu.commonlib.view.dialog; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.leifu.commonlib.R; /** * 自定义Dialog */ public class LoadingDialog extends Dialog { private Context context; /** * 跟随Dialog 一起显示的message 信息! */ private String msg; public LoadingDialog(Context context, int theme, String msg) { super(context, theme); this.context = context; this.msg = msg; } public LoadingDialog(Context context, String msg) { super(context, R.style.loadingDialog); this.context = context; this.msg = msg; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View view = View.inflate(context, R.layout.custom_view_loading, null); TextView textView = (TextView) view.findViewById(R.id.tv_message); if (!TextUtils.isEmpty(msg)) { textView.setText(msg); } setContentView(view); } @Override protected void onStop() { super.onStop(); } }
[ "leilifu@landsky.cn" ]
leilifu@landsky.cn
bde4f9defba3490eeed8444acafa7af9462442d2
d0745ec4fb1fa0ea25a6eda4da289b77de904304
/persistence/src/main/java/com/aaron/persistence/entities/Rank.java
42ed3e807f2f2ac5f85fe17e47b815fc981b9bac
[]
no_license
yangwenjie008/learning
6989123f94e42e1516a3339ab23705f3d89662c7
1326767cc724b753b143da6873fca60fd7c3c429
refs/heads/main
2023-02-23T10:09:40.024889
2021-01-25T18:24:34
2021-01-25T18:24:34
325,772,130
0
0
null
null
null
null
UTF-8
Java
false
false
120
java
package com.aaron.persistence.entities; public enum Rank { ENSIGN,LIEUTENANT,COMMANDER,CAPTAIN,COMMODORE,ADMIRAL }
[ "wenjie1051031930@163.com" ]
wenjie1051031930@163.com
08955bb1f0086e0770f5ccd6200b9c88c8d07264
08512248d6cac19af9566e1c947b55ef82a5cca2
/src/main/java/ua/moskovych/taras/services/GroupService.java
c8f39ff16bd7ce6cb5ac150bff47715b8829eff5
[]
no_license
TarasMoskovych/Timetable
0fd1cfab11a8458030b842408a371d5ad3f4a69b
50ff53685132708944cc1594bf5b445193f5a9c6
refs/heads/master
2021-05-15T09:10:45.829879
2017-10-23T18:32:08
2017-10-23T18:32:08
108,007,524
5
0
null
null
null
null
UTF-8
Java
false
false
435
java
package ua.moskovych.taras.services; import ua.moskovych.taras.entity.Group; import java.util.List; /** * Created by Taras on 02.04.2017. */ public interface GroupService { List<Group> findAll(); String getName(int id); void add(Group group); void add(String name, int count); void delete(int id); void edit(int id, String name, int nos); Group findByName(String name); Group findById(int id); }
[ "moskovych.taras@gmail.com" ]
moskovych.taras@gmail.com
17c6a6aab070876f3568a875316da79186c88ea9
3092e4a4444eef59d5f92e1b57ffd889fb84de46
/app/src/test/java/com/example/android/quakereportreal/ExampleUnitTest.java
9f87c5fd2b8d29964d46b25e70b95678153886ec
[]
no_license
IvanShkilevv/Quake-Report
d516dfbafb142db675cb54a1e246209b9043d57a
92a0c0749a8b5c73a62019ee9a8dd046ef8db3fa
refs/heads/master
2022-12-28T05:16:14.135501
2020-10-08T17:39:42
2020-10-08T17:39:42
285,533,017
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package com.example.android.quakereportreal; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "ivanshkilev@mail.ru" ]
ivanshkilev@mail.ru
139e6a3b1ff5f40415a3b1307e6d6905e95da6b9
3003f91470ab630def55d25c00f5723bd49a1c13
/kaltura-sample-code/src/main/java/us/zoom/cms/exception/BadServiceException.java
c02854912f2ab1f8ee49775d788478481c76815c
[ "MIT" ]
permissive
WeilerWebServices/Zoom
ea79b71cfe69d5d08e917dd6fc022e3d438518c2
5d548805ba93ee55e0da79fae67c7ccab6320b9b
refs/heads/master
2022-11-10T18:03:31.323755
2020-07-07T07:28:13
2020-07-07T07:28:13
273,389,548
0
3
null
null
null
null
UTF-8
Java
false
false
955
java
/* Copyright (c) 2018 Zoom Video Communications, Inc., All Rights Reserved */ package us.zoom.cms.exception; import org.springframework.http.HttpStatus; /** * Created by kavithakannan on 3/9/18. */ @SuppressWarnings("ClassWithoutNoArgConstructor") public class BadServiceException extends RuntimeException { private HttpStatus httpStatus = HttpStatus.INTERNAL_SERVER_ERROR; public HttpStatus getHttpStatus() { return httpStatus; } /** * Constructs a new runtime exception with the specified detail message. * The cause is not initialized, and may subsequently be initialized by a * call to {@link #initCause}. * @param message the detail message. The detail message is saved for later retrieval by the {@link #getMessage()} * method. */ public BadServiceException(HttpStatus httpStatus, String message) { super(message); this.httpStatus = httpStatus; } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
0cfb0315d3478b6ef0a813f47ae817ff866ee1df
cf6db2647b285ef065a3d6e16d28874e9d1b3293
/SpringHelloWorldAnnotation/src/com/deepsingh44/controller/Reception.java
79203331dba0a54d77f6c4da2b3eee9d51976e5f
[]
no_license
deepsingh44/Spring-Hibernate-Project-Tutorial
d7accc49514e028ae96f1e7d5ab21da6f3ec8f97
dd038b59e95117604e9cd0508b4216a7b0e0b98b
refs/heads/master
2023-03-30T02:35:21.944443
2021-04-07T06:26:34
2021-04-07T06:26:34
353,610,071
0
0
null
null
null
null
UTF-8
Java
false
false
705
java
package com.deepsingh44.controller; import org.springframework.web. servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import com.deepsingh44.config.AppConfig; //We just create Reception class as a FrontController public class Reception extends AbstractAnnotationConfigDispatcherServletInitializer{ @Override protected Class<?>[] getRootConfigClasses() { // TODO Auto-generated method stub return new Class[] {AppConfig.class}; } @Override protected Class<?>[] getServletConfigClasses() { // TODO Auto-generated method stub return null; } @Override protected String[] getServletMappings() { // TODO Auto-generated method stub return new String[] {"/"}; } }
[ "deepsingh44@gmail.com" ]
deepsingh44@gmail.com
61c2d16c42c78c2bc96ea048223c5d25cdecf83e
9fe3d1e8d19fe7f5de467b092a3e4cf8d5351ad8
/app/src/main/java/com/trabajofinal/razasypelajescercatomartinez/ConfiguracionActivity.java
0dfcede0f1ebe45f6e7f674151509f6f8de04483
[]
no_license
emiiimartinez/RazasYPelajesCercatoMartinez
1f805261f2c2d8112ba5a8d88f2eb06c5d559c36
2afd6086ad4db2531c1c0c9a5c517b01ca13ca6b
refs/heads/master
2020-04-23T08:26:42.806483
2019-03-09T03:09:24
2019-03-09T03:09:24
160,571,426
0
0
null
2018-12-10T17:55:29
2018-12-05T20:00:06
Java
UTF-8
Java
false
false
3,013
java
package com.trabajofinal.razasypelajescercatomartinez; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Switch; public class ConfiguracionActivity extends AppCompatActivity { Switch levelSwitch; Switch audioSwitch; RadioGroup interactionRadioGroup,minijuegoRadioGroup; RadioGroup recoViewModeRadioGroup, recoFilterRadioGroup; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_configuracion); setValues(); } private void setValues() { levelSwitch = findViewById(R.id.levelSwitch); audioSwitch = findViewById(R.id.audioSwitch); recoFilterRadioGroup = findViewById(R.id.filterViewModeRadioGroup); interactionRadioGroup = findViewById(R.id.interactionRadioGroup); minijuegoRadioGroup = findViewById(R.id.minijuegoRadioGroup); recoViewModeRadioGroup = findViewById(R.id.recoViewModeRadioGroup); SharedPreferences configPreferences = getSharedPreferences(getString(R.string.config_preferences),Context.MODE_PRIVATE); levelSwitch.setChecked(configPreferences.getBoolean(getString(R.string.level2_pref_key), false)); audioSwitch.setChecked(configPreferences.getBoolean(getString(R.string.fem_audio_pref_key), false)); recoFilterRadioGroup.check(configPreferences.getInt(getString(R.string.reco_filter_key), R.id.razaRadioBtn)); interactionRadioGroup.check(configPreferences.getInt(getString(R.string.interaction_pref_key), R.id.InteracARadBtn)); minijuegoRadioGroup.check(configPreferences.getInt(getString(R.string.minijuego_pref_key), R.id.RPRadioBtn)); recoViewModeRadioGroup.check(configPreferences.getInt(getString(R.string.reco_view_mode_pref_key), R.id.listRadioBtn)); } public void onAccept(View view) { SharedPreferences sharedPref = getSharedPreferences(getString(R.string.config_preferences),Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putBoolean(getString(R.string.fem_audio_pref_key), audioSwitch.isChecked()); editor.putBoolean(getString(R.string.level2_pref_key), levelSwitch.isChecked()); editor.putInt(getString(R.string.reco_filter_key), recoFilterRadioGroup.getCheckedRadioButtonId()); editor.putInt(getString(R.string.minijuego_pref_key), minijuegoRadioGroup.getCheckedRadioButtonId()); editor.putInt(getString(R.string.interaction_pref_key), interactionRadioGroup.getCheckedRadioButtonId()); editor.putInt(getString(R.string.reco_view_mode_pref_key), recoViewModeRadioGroup.getCheckedRadioButtonId()); editor.apply(); finish(); } }
[ "emi_51_lp@hotmail.com" ]
emi_51_lp@hotmail.com
41a06b6195633a86aaa1921a90b067c5e78ab425
4464f722fdfe38bdc374ba4659524ab6ee3a5b2f
/app/src/test/java/com/example/useraddressmapv3/ExampleUnitTest.java
21434d949bf0dfc76ee2fe1ed7621e323f3681fe
[]
no_license
lina1301/AndroidMap
60776d2c58166087fc389b6984516a750f877755
5165caf3c11d7a7f3ef2db8b092ce3310ae2a17b
refs/heads/master
2020-07-29T21:05:55.814978
2019-09-21T09:35:58
2019-09-21T09:35:58
209,959,288
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
package com.example.useraddressmapv3; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "affairemoi@ymail.com" ]
affairemoi@ymail.com
2c9c8f0219f23c3670bb9061ca0c2404858d2d94
545b2ff0dcc7ca42f7bafd9faea2d5ea3b0b274e
/apiDemos/src/main/java/com/example/android/apis/view/GridLayout3.java
2f8068b0fe32dd3d18178ea6845eb1ca229fb3ac
[]
no_license
ssj64260/Google-ApiDemos
da285dc735fa33e6992683ef1b2a24b036a2ceb9
a40bd16b91e1eae22cd60f9f7911e0f1b095f891
refs/heads/master
2021-01-19T14:40:39.845120
2017-11-26T09:08:34
2017-11-26T09:08:34
88,182,178
1
0
null
null
null
null
UTF-8
Java
false
false
4,965
java
/* * Copyright (C) 2011 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.example.android.apis.view; import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.GridLayout; import android.widget.TextView; import com.example.android.apis.BaseActivity; import static android.text.InputType.TYPE_CLASS_TEXT; import static android.text.InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; import static android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD; import static android.widget.GridLayout.ALIGN_BOUNDS; import static android.widget.GridLayout.BASELINE; import static android.widget.GridLayout.CENTER; import static android.widget.GridLayout.FILL; import static android.widget.GridLayout.LEFT; import static android.widget.GridLayout.LayoutParams; import static android.widget.GridLayout.RIGHT; import static android.widget.GridLayout.Spec; import static android.widget.GridLayout.spec; /** * A form, showing use of the GridLayout API. Here we demonstrate use of the row/column order * preserved property which allows rows and or columns to pass over each other when needed. * The two buttons in the bottom right corner need to be separated from the other UI elements. * This can either be done by separating rows or separating columns - but we don't need * to do both and may only have enough space to do one or the other. */ public class GridLayout3 extends BaseActivity { public static View create(Context context) { GridLayout p = new GridLayout(context); p.setUseDefaultMargins(true); p.setAlignmentMode(ALIGN_BOUNDS); Configuration configuration = context.getResources().getConfiguration(); if ((configuration.orientation == Configuration.ORIENTATION_PORTRAIT)) { p.setColumnOrderPreserved(false); } else { p.setRowOrderPreserved(false); } Spec titleRow = spec(0); Spec introRow = spec(1); Spec emailRow = spec(2, BASELINE); Spec passwordRow = spec(3, BASELINE); Spec button1Row = spec(5); Spec button2Row = spec(6); Spec centerInAllColumns = spec(0, 4, CENTER); Spec leftAlignInAllColumns = spec(0, 4, LEFT); Spec labelColumn = spec(0, RIGHT); Spec fieldColumn = spec(1, LEFT); Spec defineLastColumn = spec(3); Spec fillLastColumn = spec(3, FILL); { TextView c = new TextView(context); c.setTextSize(32); c.setText("Email setup"); p.addView(c, new LayoutParams(titleRow, centerInAllColumns)); } { TextView c = new TextView(context); c.setTextSize(16); c.setText("You can configure email in a few simple steps:"); p.addView(c, new LayoutParams(introRow, leftAlignInAllColumns)); } { TextView c = new TextView(context); c.setText("Email address:"); p.addView(c, new LayoutParams(emailRow, labelColumn)); } { EditText c = new EditText(context); c.setEms(10); c.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_EMAIL_ADDRESS); p.addView(c, new LayoutParams(emailRow, fieldColumn)); } { TextView c = new TextView(context); c.setText("Password:"); p.addView(c, new LayoutParams(passwordRow, labelColumn)); } { TextView c = new EditText(context); c.setEms(8); c.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_PASSWORD); p.addView(c, new LayoutParams(passwordRow, fieldColumn)); } { Button c = new Button(context); c.setText("Manual setup"); p.addView(c, new LayoutParams(button1Row, defineLastColumn)); } { Button c = new Button(context); c.setText("Next"); p.addView(c, new LayoutParams(button2Row, fillLastColumn)); } return p; } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(create(this)); } }
[ "799536767@qq.com" ]
799536767@qq.com
30069f4045643524906fe89c0c129767d3cf26ec
b33bd318003bcc8f36ac33d31ed384759da832d8
/src/main/java/ro/msg/learning/shop/controller/ShopController.java
14f184df8677b4b9e59c6687e37104a61b7781cc
[]
no_license
hapreanmanuel/shop
21817792c28a820c28b2b9a2f3b799fc4694850d
324fd8e7cafc2d112e8291c3312db887ab50e285
refs/heads/master
2021-05-11T10:05:29.083590
2018-03-19T08:54:35
2018-03-19T08:54:35
114,617,660
0
0
null
null
null
null
UTF-8
Java
false
false
1,958
java
package ro.msg.learning.shop.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; import ro.msg.learning.shop.domain.Customer; import ro.msg.learning.shop.domain.Order; import ro.msg.learning.shop.dto.OrderCreationDto; import ro.msg.learning.shop.dto.OrderSpecifications; import ro.msg.learning.shop.domain.Product; import ro.msg.learning.shop.service.ShopService; import ro.msg.learning.shop.service.StockService; import java.util.List; /* Main controller class for shop application */ @RestController @RequestMapping("/shop") public class ShopController { private ShopService shopService; private StockService stockService; @Autowired public ShopController(ShopService shopService, StockService stockService) { this.shopService = shopService; this.stockService = stockService; } @GetMapping(value = "/products", produces = "application/json") public List<Product> getAllProducts(){ return shopService.getAllProducts(); } @GetMapping(value = "/customers", produces = "application/json") public List<Customer> getCustomers() { return shopService.getAllCustomers(); } @PostMapping(value = "/orders/create", consumes = MediaType.APPLICATION_JSON_VALUE, produces = "application/json") public Order createOrder(@RequestBody OrderCreationDto request, Authentication authentication){ OrderSpecifications os = shopService.createOrderSpecifications(request, authentication.getName()); return shopService.createNewOrder(os); } @PostMapping(value="/orders/process/{orderId}", produces = "application/json") public Order processOrder(@PathVariable int orderId){ return stockService.processOrder(orderId); } }
[ "hapreanmanuel@gmail.com" ]
hapreanmanuel@gmail.com
67ea7691e4d52cb89f9361a37b73c740aabc6dae
3723f569324664a12a584b72b446a79c74f2a7b4
/project/src/main/java/cn/com/intra_mart/controller/ui_if/user/model/ImageCropParam.java
1008728163632cbc9d753e864ad9d0074ee86ccf
[ "MIT" ]
permissive
shujw/ui_if
949a5e40a0ca007bcec1e06a94dd5297bfe135e2
f077f255825d1f2fd0d19a019822e98cd47fd13e
refs/heads/master
2021-05-03T15:57:19.554950
2018-02-06T09:30:00
2018-02-06T09:30:00
120,432,947
0
0
null
2018-02-06T09:38:41
2018-02-06T09:38:40
null
UTF-8
Java
false
false
2,136
java
package cn.com.intra_mart.controller.ui_if.user.model; public class ImageCropParam { private Integer orgWidth; private Integer orgHeight; private Integer x; private Integer y; private Integer width; private Integer height; private Integer rotate; private Float scaleX; private Float scaleY; private Integer resizeX; private Integer resizeY; Boolean isCrop = false; private String imgContent; private String imgFileName; public String getImgContent() { return imgContent; } public void setImgContent(String imgContent) { this.imgContent = imgContent; } public String getImgFileName() { return imgFileName; } public void setImgFileName(String imgFileName) { this.imgFileName = imgFileName; } public Integer getX() { return x; } public void setX(Integer x) { this.x = x; } public Integer getY() { return y; } public void setY(Integer y) { this.y = y; } public Integer getWidth() { return width; } public void setWidth(Integer width) { this.width = width; } public Integer getHeight() { return height; } public void setHeight(Integer height) { this.height = height; } public Integer getRotate() { return rotate; } public void setRotate(Integer rotate) { this.rotate = rotate; } public Float getScaleX() { return scaleX; } public void setScaleX(Float scaleX) { this.scaleX = scaleX; } public Float getScaleY() { return scaleY; } public void setScaleY(Float scaleY) { this.scaleY = scaleY; } public Boolean getIsCrop() { return isCrop; } public void setIsCrop(Boolean isCrop) { this.isCrop = isCrop; } public Integer getOrgWidth() { return orgWidth; } public void setOrgWidth(Integer orgWidth) { this.orgWidth = orgWidth; } public Integer getOrgHeight() { return orgHeight; } public void setOrgHeight(Integer orgHeight) { this.orgHeight = orgHeight; } public Integer getResizeX() { return resizeX; } public void setResizeX(Integer resizeX) { this.resizeX = resizeX; } public Integer getResizeY() { return resizeY; } public void setResizeY(Integer resizeY) { this.resizeY = resizeY; } }
[ "hui.jin@intra-mart" ]
hui.jin@intra-mart
08808dbd040a016a999e6e51a07b945ca8831499
c7a6c52d123aaf87a97bcfbe5eba2f251d757dfa
/GirdView_link/app/src/main/java/com/example/girdview_link/Main2Activity.java
0724afe741ba4f9d24ad6a8d9bbba3c154ec73fe
[]
no_license
vhnghia/Gridview
508e4e5cfcfdb3ea41e02823825379c32f9448dc
6025668f7d43f0957016408ef133c7cea09661d0
refs/heads/master
2020-08-08T18:26:57.736926
2019-10-09T10:27:44
2019-10-09T10:27:44
213,888,282
0
0
null
null
null
null
UTF-8
Java
false
false
677
java
package com.example.girdview_link; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.webkit.WebView; public class Main2Activity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); Intent intent = getIntent(); String url = intent.getStringExtra("link"); System.out.println(url); WebView webView = (WebView)findViewById(R.id.webview1); webView.loadUrl(url); webView.getSettings().setJavaScriptEnabled(true); } }
[ "huunghia@MacMalls-MacBook-Pro-3.local" ]
huunghia@MacMalls-MacBook-Pro-3.local
321b7ec6e27de4e811665548320f9ea8d49414a3
214a006fd60cb7cb35d61157f3d215f3491d7f43
/app/src/test/java/com/example/a0110541/security_incident_reporting/ExampleUnitTest.java
ed9bc6998ff5d9fcbfbe586b86bafcebf2f28b82
[]
no_license
Simmy33/Security_Incident_App
d1baf89a474643ecf30ebd616cd8faf6fe7d3743
15f047de5bbe4b9f327cfac23d229b0c3ed5f6c9
refs/heads/master
2021-01-17T16:04:01.148084
2016-07-19T00:07:41
2016-07-19T00:07:41
63,645,392
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.example.a0110541.security_incident_reporting; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "0110541@inter.transnet.net" ]
0110541@inter.transnet.net
41803d39ea2018a390c07fc794fb19b4b13f5e10
39727ab097675f93d6ef025dfdc66f5037ad791b
/hc-mdm-dao/src/main/java/com/hc/scm/mdm/dao/mapper/BasBillTypeMapper.java
d7db6677fb25cebdabd1310f41965cbfae0a3a5c
[]
no_license
lijinxi/hc-mdm
be58e76b9b7310df0d67ba394fed4f1744c8b2da
5679e9257251417a8db268237648e6ea2c618087
refs/heads/master
2021-01-10T08:43:05.723534
2015-12-17T07:34:47
2015-12-17T07:34:47
47,642,075
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
package com.hc.scm.mdm.dao.mapper; import com.hc.scm.common.base.mapper.BaseCrudMapper; /** * Description: 请写出类的用途 * All rights Reserved, Designed Byhc* Copyright: Copyright(C) 2014-2015 * Company: Wonhigh. * @author: luojw * @date: 2015-03-26 14:51:54 * @version 1.0.0 */ public interface BasBillTypeMapper extends BaseCrudMapper { }
[ "1767270730@qq.com" ]
1767270730@qq.com
3429f41d3c9e7d15eb94541eb925fd88ad2dfe08
c1b4ec7a48645e2cd82e7b5d794bcf403b7d72dd
/mulanbay-pms/src/main/java/cn/mulanbay/pms/web/bean/response/chart/ScatterChartDetailData.java
21ddbd89b0405ae53e2e559eb589fe7dbc1af2c6
[ "Apache-2.0" ]
permissive
zbeol/mulanbay-server
7245766cdcd6564c4d0dc0552fcbc4124b94cdb2
ffadd9e5b774875bb798145073482c0cabef0195
refs/heads/master
2023-03-27T04:11:51.619489
2021-03-27T00:42:15
2021-03-27T00:42:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,466
java
package cn.mulanbay.pms.web.bean.response.chart; import java.util.ArrayList; import java.util.List; /** * 散点图 * * @author fenghong * @create 2017-07-10 21:44 */ public class ScatterChartDetailData { private String name; private Object xAxisAverage; private List<Object[]> data = new ArrayList<>(); public String getName() { return name; } public void setName(String name) { this.name = name; } public Object getxAxisAverage() { return xAxisAverage; } public void setxAxisAverage(Object xAxisAverage) { this.xAxisAverage = xAxisAverage; } public List<Object[]> getData() { return data; } public void setData(List<Object[]> data) { this.data = data; } public void addData(Object[] os) { if (os.length < 3) { data.add(new Object[]{os[0], os[1], 1}); } else { data.add(os); } } public void appendData(Object x, Object y, double v) { Object[] oo = this.getData(x, y); if (oo == null) { this.addData(new Object[]{x, y, v}); } else { v += Double.valueOf(oo[2].toString()); oo[2] = v; } } private Object[] getData(Object x, Object y) { for (Object[] oo : data) { if (oo[0].equals(x) && oo[1].equals(y)) { return oo; } } return null; } }
[ "fenghong007@hotmail.com" ]
fenghong007@hotmail.com
7333545587b44d53a14282eaaba0c10bfe04b234
ca1ddd2bff75d8e580956449d25a321914622eff
/project/src/main/java/com/grantwiswell/banking/service/EmployeeLoginService.java
20566e60bc51f56cf0ae3f0e430a97c204cb7a41
[ "MIT" ]
permissive
Grantimatter/ROC
1155bbb6cc7ca0be81ce5dfdce1eba5095b5990c
3771acc5c224f76b30febdc8208b61eb05c5bd57
refs/heads/main
2023-02-12T15:54:49.418636
2021-01-04T03:07:26
2021-01-04T03:07:26
305,429,503
0
1
null
null
null
null
UTF-8
Java
false
false
204
java
package com.grantwiswell.banking.service; import com.grantwiswell.banking.model.Employee; public interface EmployeeLoginService { public Employee employeeLogin(String user_name, String password); }
[ "GT101boy@gmail.com" ]
GT101boy@gmail.com
f4357046f70accad3f7f9216d6a5f1e4834e5681
b7a38d4f758d9e5eb24e5ee5f10509aef171573a
/app/app/src/main/java/com/emilio/tvseriesquiz/interactor/entities/SaveEntitiesInteractor.java
f05192f3a2a42cc6142baaa7e6c0ec872e77e185
[]
no_license
EmilioBello/TV-Series-Quiz-3
695a3e4aa921105fe893d1cb094bb75aa81b4175
52a1b5911d5d2351af8a6d0153fb6ac47f8d4fd9
refs/heads/master
2021-04-02T16:52:31.690529
2020-03-18T17:36:51
2020-03-18T17:36:51
248,297,046
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package com.emilio.tvseriesquiz.interactor.entities; import androidx.annotation.NonNull; import com.emilio.tvseriesquiz.model.realm.repository.RealmRepository; import java.util.List; public class SaveEntitiesInteractor<Pojo, DAO>{ private final Class<Pojo> typePojo; private final Class<DAO> typeDAO; public SaveEntitiesInteractor(@NonNull final Class<Pojo> typePojo, @NonNull final Class<DAO> typeDAO) { this.typePojo = typePojo; this.typeDAO = typeDAO; } public void init(@NonNull final List<Pojo> list) { RealmRepository<Pojo, DAO> repository = new RealmRepository<>(typePojo, typeDAO); repository.save(list); } }
[ "" ]
9c41dae10112c444740c34781826312877cb4658
5622d518bac15a05590055a147628a728ca19b23
/mate-tools/src/main/java/is2/util/.svn/text-base/OptionsSuper.java.svn-base
0a40f73a63db52e210a81f00e8b582117befc1a5
[ "GPL-3.0-only", "BSD-2-Clause" ]
permissive
JULIELab/jcore-dependencies
e51349ccf6f26c7b7dab777a9e6baacd7068b853
a303c6a067add1f4b05c4d2fe31c1d81ecaa7073
refs/heads/master
2023-03-19T20:26:55.083193
2023-03-09T20:32:13
2023-03-09T20:32:13
44,806,492
4
2
BSD-2-Clause
2022-11-16T19:48:08
2015-10-23T10:32:10
Java
UTF-8
Java
false
false
6,237
package is2.util; import is2.io.CONLLReader09; import java.io.File; public class OptionsSuper { public String trainfile = null; public String testfile = null; public File trainforest = null; public String nbframes = null; public String pbframes = null; public boolean nopred = false; public boolean upper = false; public boolean train = false; public boolean eval = false; public boolean test = false; public boolean keep = false; public boolean flt = false; public boolean loadTaggerModels =false; public String modelName = "prs.mdl"; public String modelTaggerName = null; public String useMapping = null; public String device = "C:"; public String tmp = null; public boolean createForest = true; public boolean decodeProjective = false; public double decodeTH = 0.3d; public String format = "CONLL"; public int formatTask =9; public int numIters = 10; public int best = 1000; public String outfile = "dp.conll"; public String charset = "UTF-8"; public String phraseTrain = null; public String phraseTest = null; public String goldfile = null; public String gout = "sec23.gld"; public String features = null; public String lexicon = null; public int hsize = 0x07ffffff; public int maxLen = 2000; public int maxForms = Integer.MAX_VALUE; public int beam = 4; public float prune = -100000000; public String third =""; public String second =""; public String first =""; public int cross=10; //public boolean secondOrder = true; public boolean useRelationalFeatures = false; public int count = 10000000; public int cores = Integer.MAX_VALUE; public int start = 0; public int minOccureForms = 0; public int tt=30; // tagger averaging public boolean allFeatures =false; public boolean normalize =false; public boolean no2nd =false; public boolean noLemmas=false; public boolean few2nd =false,noLinear=false,noMorph=false; public String clusterFile; // output confidence values public boolean conf =false; public String phraseFormat="penn"; // tiger | penn public boolean average = true; public boolean label =false; public boolean stack=false; public boolean oneRoot = false; public String significant1 =null,significant2 =null; // horizontal stacking public int minLength =0, maxLength =Integer.MAX_VALUE; public boolean overwritegold =false; public static final int MULTIPLICATIVE=1, SHIFT=2; public int featureCreation = MULTIPLICATIVE; public OptionsSuper (String[] args, String dummy) { for(int i = 0; i < args.length; i++) { i = addOption(args,i); } } public OptionsSuper() {} public int addOption(String args[], int i) { if (args[i].equals("-train")) { train = true; trainfile = args[i+1]; } else if (args[i].equals("-eval")) { eval = true; goldfile =args[i+1]; i++; } else if (args[i].equals("-gout")) { gout =args[i+1]; i++; } else if (args[i].equals("-test")) { test = true; testfile = args[i+1]; i++; } else if (args[i].equals("-sig1")) { significant1 = args[i+1]; i++; } else if (args[i].equals("-sig2")) { significant2 = args[i+1]; i++; } else if (args[i].equals("-i")) { numIters = Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-out")) { outfile = args[i+1]; i++; } else if (args[i].equals("-cluster")) { clusterFile = args[i+1]; i++; } else if (args[i].equals("-count")) { count = Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-model")) { modelName = args[i+1]; i++; } else if (args[i].equals("-tmodel")) { this.modelTaggerName = args[i+1]; i++; } else if (args[i].equals("-nonormalize")) { normalize=false; } else if (args[i].equals("-float")) { flt =true; } else if (args[i].equals("-hsize")) { hsize= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-charset")) { charset= args[++i]; } else if (args[i].equals("-pstrain")) { this.phraseTrain=args[i+1]; i++; } else if (args[i].equals("-pstest")) { this.phraseTest=args[i+1]; i++; } else if (args[i].equals("-len")) { maxLen= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-cores")) { cores= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-start")) { start= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-max")) { maxLength= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-min")) { minLength= Integer.parseInt(args[i+1]); i++; } else if (args[i].equals("-noLemmas")) { noLemmas= true; } else if (args[i].equals("-noavg")) { this.average= false; } else if (args[i].equals("-label")) { label= true; } else if (args[i].equals("-stack")) { stack= true; } else if (args[i].equals("-overwritegold")) { overwritegold = true; } else if (args[i].equals("-format")) { formatTask = Integer.parseInt(args[++i]); } else if (args[i].equals("-tt")) { tt = Integer.parseInt(args[++i]); } else if (args[i].equals("-min-occure-forms")) { minOccureForms = Integer.parseInt(args[++i]); } else if (args[i].equals("-loadTaggerModels")) { this.loadTaggerModels=true;; } else if (args[i].equals("-feature_creation")) { this.featureCreation = args[++i].equals("shift")?SHIFT:MULTIPLICATIVE; } return i; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("FLAGS ["); sb.append("train-file: " + trainfile); sb.append(" | "); sb.append("test-file: " + testfile); sb.append(" | "); sb.append("gold-file: " + goldfile); sb.append(" | "); sb.append("output-file: " + outfile); sb.append(" | "); sb.append("model-name: " + modelName); sb.append(" | "); sb.append("train: " + train); sb.append(" | "); sb.append("test: " + test); sb.append(" | "); sb.append("eval: " + eval); sb.append(" | "); sb.append("training-iterations: " + numIters); sb.append(" | "); sb.append("decode-type: " + decodeProjective); sb.append(" | "); sb.append("create-forest: " + createForest); sb.append(" | "); sb.append("format: " + format); sb.append("]\n"); return sb.toString(); } }
[ "franz.matthies@uni-jena.de" ]
franz.matthies@uni-jena.de
05ad5d6fba7811c087ff89479db3940f8f59ccd4
8311139d16e04e0ada7a45b8c530ae2e5f600b1c
/jaxws/hugeWsdl.war/WEB-INF/classes/com/redhat/gss/ws9/BigObject8.java
0f8cbfa450c31fe31556317d887081c21c6e3431
[]
no_license
kylape/support-examples
b9a494bf7dbc3671b21def7d89a32e35d4d0d00c
ade17506093fa3f50bc8d8a685572cf6329868e7
refs/heads/master
2020-05-17T10:43:54.707699
2014-11-28T16:22:14
2014-11-28T16:22:14
6,583,210
2
2
null
2014-06-19T22:38:39
2012-11-07T17:27:56
Java
UTF-8
Java
false
false
4,251
java
package com.redhat.gss.ws9; public class BigObject8 { private String arg0 = null; private String arg1 = null; private String arg2 = null; private String arg3 = null; private String arg4 = null; private String arg5 = null; private String arg6 = null; private String arg7 = null; private String arg8 = null; private String arg9 = null; private String arg10 = null; private String arg11 = null; private String arg12 = null; private String arg13 = null; private String arg14 = null; private String arg15 = null; private String arg16 = null; private String arg17 = null; private String arg18 = null; private String arg19 = null; private String arg20 = null; private String arg21 = null; private String arg22 = null; private String arg23 = null; private String arg24 = null; private String arg25 = null; public String getArg25() { return this.arg25; } public void setArg25(String arg25) { this.arg25 = arg25; } public String getArg24() { return this.arg24; } public void setArg24(String arg24) { this.arg24 = arg24; } public String getArg23() { return this.arg23; } public void setArg23(String arg23) { this.arg23 = arg23; } public String getArg22() { return this.arg22; } public void setArg22(String arg22) { this.arg22 = arg22; } public String getArg21() { return this.arg21; } public void setArg21(String arg21) { this.arg21 = arg21; } public String getArg20() { return this.arg20; } public void setArg20(String arg20) { this.arg20 = arg20; } public String getArg19() { return this.arg19; } public void setArg19(String arg19) { this.arg19 = arg19; } public String getArg18() { return this.arg18; } public void setArg18(String arg18) { this.arg18 = arg18; } public String getArg17() { return this.arg17; } public void setArg17(String arg17) { this.arg17 = arg17; } public String getArg16() { return this.arg16; } public void setArg16(String arg16) { this.arg16 = arg16; } public String getArg15() { return this.arg15; } public void setArg15(String arg15) { this.arg15 = arg15; } public String getArg14() { return this.arg14; } public void setArg14(String arg14) { this.arg14 = arg14; } public String getArg13() { return this.arg13; } public void setArg13(String arg13) { this.arg13 = arg13; } public String getArg12() { return this.arg12; } public void setArg12(String arg12) { this.arg12 = arg12; } public String getArg11() { return this.arg11; } public void setArg11(String arg11) { this.arg11 = arg11; } public String getArg10() { return this.arg10; } public void setArg10(String arg10) { this.arg10 = arg10; } public String getArg9() { return this.arg9; } public void setArg9(String arg9) { this.arg9 = arg9; } public String getArg8() { return this.arg8; } public void setArg8(String arg8) { this.arg8 = arg8; } public String getArg7() { return this.arg7; } public void setArg7(String arg7) { this.arg7 = arg7; } public String getArg6() { return this.arg6; } public void setArg6(String arg6) { this.arg6 = arg6; } public String getArg5() { return this.arg5; } public void setArg5(String arg5) { this.arg5 = arg5; } public String getArg4() { return this.arg4; } public void setArg4(String arg4) { this.arg4 = arg4; } public String getArg3() { return this.arg3; } public void setArg3(String arg3) { this.arg3 = arg3; } public String getArg2() { return this.arg2; } public void setArg2(String arg2) { this.arg2 = arg2; } public String getArg1() { return this.arg1; } public void setArg1(String arg1) { this.arg1 = arg1; } public String getArg0() { return this.arg0; } public void setArg0(String arg0) { this.arg0 = arg0; } }
[ "kyle.lape@redhat.com" ]
kyle.lape@redhat.com
7484b0bebe551b07ad3a679c74fb1e7738be050c
be457457e0ef74ba69543de13e3e064eab4b0ec1
/JaBaeProject/JaBaeProject/src/JaBae/Customer/DAO/MemberDAO.java
2d066663e7b3f98498ff074476e49803dafcb9be
[]
no_license
codingdobby/JavaProject-delivery
091f6ebb3081e972ef0b9624ca647fd9cfb4b3e1
dfea501181717843e5823dac172237cd65a15407
refs/heads/master
2021-08-02T10:35:46.489700
2021-07-21T15:33:13
2021-07-21T15:33:13
213,139,025
1
0
null
null
null
null
UTF-8
Java
false
false
6,798
java
package JaBae.Customer.DAO; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import JaBae.Customer.VO.MemberVO; public class MemberDAO { //Data Access Object // 공식처럼 사용,사용 많이 함 private Connection conn = null; private PreparedStatement pstm = null; private ResultSet rs = null; // select문 수행 후 결과를 저장하는 객체 public void connectDB() { String url = "jdbc:oracle:thin:@localhost:1521/xe"; // 2.url설정 String id = "Sample"; String pwd = "sample"; try { Class.forName("oracle.jdbc.driver.OracleDriver");// 1.드라이버 로딩 System.out.println("jdbc 연결 성공"); conn = DriverManager.getConnection(url, id, pwd); // 3.db연결 접속 확인 System.out.println("oracle연결 성공"); } catch (ClassNotFoundException e) { System.out.println("jdbc 연결 실패"); e.printStackTrace(); } catch (SQLException e) { System.out.println("orcale연결 실패"); } } public void closeDB() { try { if (pstm != null) pstm.close(); if (rs != null) rs.close(); conn.close(); } catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } } /*****************************************************************************************/ //아이디 조회하기 로그인 public boolean getid(String id) { boolean result = false; connectDB(); String SQL = "select cus_id from customer where cus_id=?"; try { pstm = conn.prepareStatement(SQL); pstm.setString(1, id); rs = pstm.executeQuery(); if (rs.next()) { result = true; } else { result = false; } // rs테이블의 모든 레코드를 botari에 담는 과정 } catch (SQLException e) { e.printStackTrace(); } // 공식 closeDB(); return result; } /*****************************************************************************************/ //selectView 화면 포인트 조회 public MemberVO getPoint(String id) { connectDB(); String SQL = "select point from customer where cus_id=?";// 회원인지 아닌지 구별 MemberVO vo = null;// ==>int a; try { pstm = conn.prepareStatement(SQL); pstm.setString(1, id); rs = pstm.executeQuery(); // select 문 수행시 // 결과 출력 if (rs.next() == true) { vo = new MemberVO(); vo.setPoint(rs.getInt("point")); } else { } } catch (SQLException e) { e.printStackTrace(); } closeDB(); return vo; } /*****************************************************************************************/ // 정보 수정 페이지에 값 바로 뜨게 동작하는 기능 public MemberVO getInfo(String idchk) { // ArrayList<MemberVO> botari = new ArrayList<MemberVO>(); connectDB(); String SQL = "select name, birth,substr(tel, 0,3) as tel1 , substr(tel,5,4) as tel2 , substr(tel,10,4) as tel3, addr from customer where cus_id=? "; MemberVO vo = null;// 결과를 담는 그릇 객체 try { pstm = conn.prepareStatement(SQL); pstm.setString(1, idchk); rs = pstm.executeQuery(); // select 문 수행 결과가 rs 테이블에 다 담겨져 있음 // rs 테이블의 모든 레코드를 botari에 담는다 if (rs.next() == true) { vo = new MemberVO();// 1개의 레코드를 담을 빈그릇(vo)을 준비 vo.setName(rs.getString("name")); vo.setTel(rs.getString("tel1")); vo.setTel2(rs.getString("tel2")); vo.setTel3(rs.getString("tel3")); vo.setAddr(rs.getString("addr")); if (rs.getString("birth") == null) { vo.setBirth(""); } else { vo.setBirth(rs.getString("birth")); } } } catch ( SQLException e) { e.printStackTrace(); } closeDB(); return vo; } /*****************************************************************************************/ // 고객 정보 수정 public void Update(String pwd, String local, String addr, String tel, String birth, String cus_id) { connectDB(); String SQL = "update customer set pwd=? ,l_no_cus_fk = (select l_no from loc where loc = ?), addr=? ,tel=?,birth=? where cus_id=?"; try { pstm = conn.prepareStatement(SQL); pstm.setString(1, pwd); pstm.setString(2, local); pstm.setString(3, addr); pstm.setString(4, tel); pstm.setString(5, birth); pstm.setString(6, cus_id); pstm.executeUpdate(); } catch (SQLException se) { se.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } finally { closeDB(); } } /*****************************************************************************************/ // 탈퇴 기능 public void Delete(String id) { connectDB(); String SQL = "delete from customer where cus_id=?"; try { pstm = conn.prepareStatement(SQL); pstm.setString(1, id); pstm.executeUpdate(); } catch (SQLException se) { se.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } finally { closeDB(); } } /*****************************************************************************************/ // 아이디 찾기 public MemberVO getID(String name, String tel) { // connectDB(); String SQL = "select cus_id from customer where name=? and tel=?"; MemberVO vo = null;// 결과를 담는 그릇 객체 try { pstm = conn.prepareStatement(SQL); pstm.setString(1, name); pstm.setString(2, tel); rs = pstm.executeQuery(); // select 문 수행 결과가 rs 테이블에 다 담겨져 있음 // rs 테이블의 모든 레코드를 botari에 담는다 if (rs.next() == true) { vo = new MemberVO();// 1개의 레코드를 담을 빈그릇(vo)을 준비 vo.setCus_id(rs.getString("cus_id")); } } catch ( SQLException e) { e.printStackTrace(); } closeDB(); return vo; } /*****************************************************************************************/ // 비밀번호 찾기 public MemberVO getPwd(String id, String tel) { // connectDB(); String SQL = "select substr(pwd,0,3) as pwd , substr(pwd, 6,3) as pwd2 from customer where cus_id=? and tel=?"; MemberVO vo = null;// 결과를 담는 그릇 객체 try { pstm = conn.prepareStatement(SQL); pstm.setString(1, id); pstm.setString(2, tel); rs = pstm.executeQuery(); // select 문 수행 결과가 rs 테이블에 다 담겨져 있음 // rs 테이블의 모든 레코드를 botari에 담는다 if (rs.next() == true) { vo = new MemberVO();// 1개의 레코드를 담을 빈그릇(vo)을 준비 vo.setPwd(rs.getString("pwd")); vo.setPwd2(rs.getString("pwd2")); } } catch ( SQLException e) { e.printStackTrace(); } closeDB(); return vo; } }
[ "ch30825@naver.com" ]
ch30825@naver.com
9e5f0c44b80358e7d4b641e0f1e63cd38de8df2a
2198dfe33f375e85201fc0d2fc1e6514cfc257f1
/ovidiurosu/ql_src/ql/error/ErrorList.java
46678f7374a0c0cc3928bb97496f4e793084040a
[ "Apache-2.0" ]
permissive
software-engineering-amsterdam/poly-ql
c073e19da80ab66ae540f7438d6637fb55286c07
acde6f943265e8aca08e1fe1ce213bcb1b5f9421
refs/heads/master
2022-05-01T10:05:32.627053
2022-04-19T12:05:26
2022-04-19T12:05:26
16,277,142
1
2
null
null
null
null
UTF-8
Java
false
false
780
java
package ql.error; import java.util.ArrayList; import java.util.Iterator; /** * @author orosu */ public class ErrorList { private final ArrayList<IError> _value; public ErrorList() { this._value = new ArrayList<IError>(); } public Iterator<IError> iterator() { return this._value.iterator(); } public void add(IError error) { this._value.add(error); } public void addAll(ErrorList errorList) { Iterator<IError> iterator = errorList.iterator(); while (iterator.hasNext()) { this.add(iterator.next()); } } public int size() { return this._value.size(); } public IError get(int index) { return this._value.get(index); } }
[ "ovidiu.rosu90@gmail.com" ]
ovidiu.rosu90@gmail.com
ef123e1270ee402d0fe21a9441e68e3458c4dfd0
8f9c708daf399e2ef084924896352842aba486de
/app/src/main/java/com/wjs/collectioncode/recyclerview/snaphelper/SnapAdapter.java
12b40085185b99607df26b060cdd3c6babcacd60
[]
no_license
wangjishan/CollectionCode-master
e639427b4221e18f521d45ee68fcc76efa652603
ddc060d1e3ddf7550e6acce55bb94d829a9783d6
refs/heads/master
2021-01-21T11:11:00.461752
2017-03-20T10:12:44
2017-03-20T10:12:44
83,531,464
0
0
null
null
null
null
UTF-8
Java
false
false
4,542
java
package com.wjs.collectioncode.recyclerview.snaphelper; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearSnapHelper; import android.support.v7.widget.RecyclerView; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.wjs.collectioncode.R; import java.util.ArrayList; public class SnapAdapter extends RecyclerView.Adapter<SnapAdapter.ViewHolder> { public static final int VERTICAL = 0; public static final int HORIZONTAL = 1; private ArrayList<Snap> mSnaps; // Disable touch detection for parent recyclerView if we use vertical nested recyclerViews private View.OnTouchListener mTouchListener = new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { v.getParent().requestDisallowInterceptTouchEvent(true); return false; } }; public SnapAdapter() { mSnaps = new ArrayList<>(); } public void addSnap(Snap snap) { mSnaps.add(snap); } @Override public int getItemViewType(int position) { Snap snap = mSnaps.get(position); switch (snap.getGravity()) { case Gravity.CENTER_VERTICAL: return VERTICAL; case Gravity.CENTER_HORIZONTAL: return HORIZONTAL; case Gravity.START: return HORIZONTAL; case Gravity.TOP: return VERTICAL; case Gravity.END: return HORIZONTAL; case Gravity.BOTTOM: return VERTICAL; } return HORIZONTAL; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = viewType == VERTICAL ? LayoutInflater.from(parent.getContext()) .inflate(R.layout.adapter_snap_vertical, parent, false) : LayoutInflater.from(parent.getContext()) .inflate(R.layout.adapter_snap, parent, false); if (viewType == VERTICAL) { view.findViewById(R.id.recyclerView).setOnTouchListener(mTouchListener); } return new ViewHolder(view); } @Override public void onBindViewHolder(ViewHolder holder, int position) { Snap snap = mSnaps.get(position); holder.snapTextView.setText(snap.getText()); if (snap.getGravity() == Gravity.START || snap.getGravity() == Gravity.END) { holder.recyclerView.setLayoutManager(new LinearLayoutManager(holder .recyclerView.getContext(), LinearLayoutManager.HORIZONTAL, false)); holder.recyclerView.setOnFlingListener(null); new GravitySnapHelper(snap.getGravity()).attachToRecyclerView(holder.recyclerView); } else if (snap.getGravity() == Gravity.CENTER_HORIZONTAL || snap.getGravity() == Gravity.CENTER_VERTICAL || snap.getGravity() == Gravity.CENTER) { holder.recyclerView.setLayoutManager(new LinearLayoutManager(holder .recyclerView.getContext(), snap.getGravity() == Gravity.CENTER_HORIZONTAL ? LinearLayoutManager.HORIZONTAL : LinearLayoutManager.VERTICAL, false)); holder.recyclerView.setOnFlingListener(null); new LinearSnapHelper().attachToRecyclerView(holder.recyclerView); } else { // Top / Bottom holder.recyclerView.setLayoutManager(new LinearLayoutManager(holder .recyclerView.getContext())); holder.recyclerView.setOnFlingListener(null); new GravitySnapHelper(snap.getGravity()).attachToRecyclerView(holder.recyclerView); } holder.recyclerView.setAdapter(new Adapter(snap.getGravity() == Gravity.START || snap.getGravity() == Gravity.END || snap.getGravity() == Gravity.CENTER_HORIZONTAL, snap.getApps())); } @Override public int getItemCount() { return mSnaps.size(); } public static class ViewHolder extends RecyclerView.ViewHolder { public TextView snapTextView; public RecyclerView recyclerView; public ViewHolder(View itemView) { super(itemView); snapTextView = (TextView) itemView.findViewById(R.id.snapTextView); recyclerView = (RecyclerView) itemView.findViewById(R.id.recyclerView); } } }
[ "wangjishan@fang.com" ]
wangjishan@fang.com
ceb178ee5f6a79c5025126bfa43e1362768ff501
9af8a544ef460830e3279caf7d4e883b6b684f8a
/lujpersist/src/main/java/luj/persist/internal/data/field/type/str/StrModificationApplier.java
1fc11f1d45d7681008f1a90cb520dd466077b4e5
[]
no_license
lowZoom/lujpersist
093cf3e1736a249985ce003b352dd4bc42ba8e42
b2ee19246a5de52a16147d897999189babfdf0f2
refs/heads/master
2022-11-28T13:49:00.931923
2022-02-16T11:21:46
2022-02-16T11:21:46
149,903,136
0
0
null
2022-11-16T02:20:39
2018-09-22T18:02:31
Java
UTF-8
Java
false
false
281
java
package luj.persist.internal.data.field.type.str; import org.springframework.stereotype.Service; @Service public class StrModificationApplier { public void apply(DbStr state) { String newValue = state.getMod(); state.setMod(null); state.setValue(newValue); } }
[ "david_lu_st@163.com" ]
david_lu_st@163.com
05abc8734a43dea87accb763145b995d4332dfd1
e8e707baf803acd6fb251d8fb5793eba079d2e82
/src/lista/exercicios/dip/violation/CarroDeCorrida.java
d8b81e2ac410da0b0e6eee296d93808f585e3137
[]
no_license
vallovera/ExercicioAula005
f3db3fbf40a3ddbc81aaa3cf21c01b2a9d002fa0
cc935c010f72bd2300bf9166ac0b94b6610a78fe
refs/heads/master
2021-07-06T08:21:06.730344
2017-10-02T03:27:30
2017-10-02T03:27:30
105,483,248
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package lista.exercicios.dip.violation; public class CarroDeCorrida extends Automovel{ public CarroDeCorrida(final int combustivel) { super(combustivel); } }
[ "flaviovallovera@gmail.com" ]
flaviovallovera@gmail.com
fce2076814d4ff7d964d64b688421876f513fbca
d3b1c4613d8dfbd0f85e85e75764a7511b1e6c3c
/app/src/main/java/br/eng/ecarrara/beerwith/data/BeerWithDbHelper.java
8ec6d53b6b2f7cbc404b871a4dcf29e7c0e827c4
[ "MIT" ]
permissive
ecarrara-araujo/BeerWith
277a0db93ea6ce3fe55e882ee8266cfee189fb10
3845254c42eb7fb6f03609cc1c0e293c21e8eebf
refs/heads/master
2021-01-01T20:17:13.806017
2015-08-28T20:03:35
2015-08-28T20:03:35
41,577,840
5
2
null
null
null
null
UTF-8
Java
false
false
1,236
java
package br.eng.ecarrara.beerwith.data; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import br.eng.ecarrara.beerwith.data.BeerWithContract.DrinkWithEntry; /** * Created by ecarrara on 13/12/2014. */ public class BeerWithDbHelper extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 1; public static final String DATABASE_NAME = "drinkwith.db"; public BeerWithDbHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { final String SQL_CREATE_DRINK_WITH_TABLE = "CREATE TABLE " + DrinkWithEntry.TABLE_NAME + " (" + DrinkWithEntry._ID + " INTEGER PRIMARY KEY, " + DrinkWithEntry.COLUMN_DRINKING_DATE + " TEXT NOT NULL, " + DrinkWithEntry.COLUMN_BEER_DESC + " TEXT NOT NULL, " + DrinkWithEntry.COLUMN_CONTACT_URI + " TEXT NOT NULL " + ");"; db.execSQL(SQL_CREATE_DRINK_WITH_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { return; } }
[ "ecarrara.araujo@gmail.com" ]
ecarrara.araujo@gmail.com
ab746010b066c20e165571ef93e6cc1c9daeb477
2c80567a4f341b4f5734a42df8f1db034eb2ead6
/game2048/src/main/java/com/guang/sun/game/camera/util/ImageUtil.java
93885cc0fe2cccdad4a0c238e29191c7be55a4dc
[ "Apache-2.0" ]
permissive
Guangdinghou/android-gpuimage
1115b53a3871d273e0a7dfa6803835f6f3cdd94f
fb99fbe6882a73827a65969524b098ddf55adef3
refs/heads/master
2021-01-17T06:35:44.526841
2016-04-14T09:44:38
2016-04-14T09:44:38
56,140,284
0
0
null
2016-04-13T09:50:17
2016-04-13T09:50:17
null
UTF-8
Java
false
false
474
java
package com.guang.sun.game.camera.util; import android.graphics.Bitmap; import android.graphics.Matrix; public class ImageUtil { /** * ��תBitmap * @param b * @param rotateDegree * @return */ public static Bitmap getRotateBitmap(Bitmap b, float rotateDegree){ Matrix matrix = new Matrix(); matrix.postRotate((float)rotateDegree); Bitmap rotaBitmap = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, false); return rotaBitmap; } }
[ "guangdinghou" ]
guangdinghou
2ac2030ff08102513d032fa26320f7cba798aa54
90ece9f4ae98bc9207eb80dce23fefadd7ce116d
/trunk/gaoshin-core/src/main/java/com/gaoshin/amazon/jax/ItemSearchResponse.java
8da34f6e3ec5970c76f6ed4b8cb4196ac996c728
[]
no_license
zhangyongjiang/unfuddle
3709018baafefd16003d3666aae6808c106ee038
e07a6268f46eee7bc2b4890c44b736462ab89642
refs/heads/master
2021-01-24T06:12:21.603134
2014-07-06T16:14:18
2014-07-06T16:14:18
21,543,421
1
1
null
null
null
null
UTF-8
Java
false
false
2,775
java
package com.gaoshin.amazon.jax; 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.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://webservices.amazon.com/AWSECommerceService/2010-09-01}OperationRequest" minOccurs="0"/> * &lt;element ref="{http://webservices.amazon.com/AWSECommerceService/2010-09-01}Items" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "operationRequest", "items" }) @XmlRootElement(name = "ItemSearchResponse") public class ItemSearchResponse { @XmlElement(name = "OperationRequest") protected OperationRequest operationRequest; @XmlElement(name = "Items") protected List<Items> items; /** * Gets the value of the operationRequest property. * * @return * possible object is * {@link OperationRequest } * */ public OperationRequest getOperationRequest() { return operationRequest; } /** * Sets the value of the operationRequest property. * * @param value * allowed object is * {@link OperationRequest } * */ public void setOperationRequest(OperationRequest value) { this.operationRequest = value; } /** * Gets the value of the items 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 items property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItems().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Items } * * */ public List<Items> getItems() { if (items == null) { items = new ArrayList<Items>(); } return this.items; } }
[ "zhangyongjiang@yahoo.com" ]
zhangyongjiang@yahoo.com
7bec98a86d5a4d537aadc204c4fb46ebf437100a
50b968e19a4a95318ff9d48fc4f364a67717f02e
/app/src/androidTest/java/com/example/spinner_sueldo/ExampleInstrumentedTest.java
ef25b386ef0e261b4bf4b4085e30d4c4f4b149a1
[]
no_license
YovGitLb/Spinner_Sueldo
1faeb427da7784320c190b98e02681f922853c3f
82718d9e0540e466138535f7ec844f16b6aa983f
refs/heads/master
2022-07-31T19:35:08.708085
2020-05-24T05:08:17
2020-05-24T05:08:17
266,473,875
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package com.example.spinner_sueldo; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.spinner_sueldo", appContext.getPackageName()); } }
[ "gledesmab@uni.pe" ]
gledesmab@uni.pe
dda8a4cc906e4b1cb63523f227ccef8bb8ac0b6a
509be6d3604b3590fe9be061e1fd39d013277423
/app/src/main/java/falleight/isft/StockData.java
8a994d7373eba240455c93a6ebdd93d1f58dfc2d
[]
no_license
hayabusata/ISFT
13377644a073b35f76eafe5c80110ebf49ded7fe
44e7734ad765397a5ad6f10282e531cd32a3caf0
refs/heads/master
2021-01-19T13:31:30.650579
2017-03-05T03:04:34
2017-03-05T03:04:34
82,395,872
0
0
null
2017-02-25T14:27:22
2017-02-18T15:26:51
Java
UTF-8
Java
false
false
1,217
java
package falleight.isft; public class StockData { private int id; private String email; private String password; private String name; private String status; private String roomNumber; private String type; private String word; public int getId() { return this.id; } public void setId(int newId) { this.id = newId; } public String getEmail() { return this.email; } public void setEmail(String newEmail) { this.email = newEmail; } public String getPassword() { return this.password; } public void setPassword(String newPassword) { this.password = newPassword; } public String getName() { return this.name; } public void setName(String newName) { this.name = newName; } public String getStatus() { return this.status; } public void setStatus(String newStatus) { this.status = newStatus; } public String getRoomNumber() { return this.roomNumber; } public void setRoomNumber(String newRoomNumber) { this.roomNumber = newRoomNumber; } public String getType() { return this.type; } public void setType(String newType) {this.type = newType; } public String getWord() { return this.word; } public void setWord(String newWord) {this.word = newWord; } }
[ "falcon.cryptomeria@gmail.com" ]
falcon.cryptomeria@gmail.com
9708abab900bcf2d790fbda0ab30a9ffb0b972ed
a9cf4118e0f032331542d38b7d29c60734a712bf
/src/Code_99_LuanShua/Code_0797.java
cfb1ea04f8aaca6509129bfa2e4a99c86d8e5a12
[]
no_license
jchen-96/leetCode
5531571fb43ffc5023250f1ca21c1ebe5922aa8c
4e411c9818d5d3194192b67016edafad36d75b29
refs/heads/master
2021-07-13T17:54:26.108694
2020-09-20T11:54:54
2020-09-20T11:54:54
176,665,761
0
0
null
null
null
null
UTF-8
Java
false
false
951
java
package Code_99_LuanShua; //https://leetcode-cn.com/problems/all-paths-from-source-to-target/ // need to read // dfs 深度优先搜索,回溯算法 import java.util.ArrayList; import java.util.List; public class Code_0797 { public List<List<Integer>> allPathsSourceTarget(int[][] graph) { List<List<Integer>> result=new ArrayList<>(); List<Integer> item=new ArrayList<>(); int n=graph.length; dfs(result,item,0,n-1,graph); return result; } private void dfs(List<List<Integer>> result,List<Integer> item,int i,int target,int[][] graph){ if(i==target){ item.add(i); result.add(new ArrayList<>(item)); item.remove(item.size()-1); return; } item.add(i); for(int index=0;index<graph[i].length;index++){ dfs(result,item,graph[i][index],target,graph); } item.remove(item.size()-1); } }
[ "1443616037@qq.com" ]
1443616037@qq.com
bd1bd4935ab9712f8eaacf4aa4724fdca4a894eb
1829bea13a6647817ffddc9c73e96ec69fc90712
/src/main/java/org/snpeff/snpEffect/VcfAnnotator.java
2c1b201a287225b03f4d01d2bb51e12a00ba17de
[]
no_license
mbourgey/SnpEff
637938836d85d0a857c0d38d5293aa1b512806fb
ca44f61338d49f4780b42140ab538348e2b177d1
refs/heads/master
2021-01-18T06:45:20.386620
2016-02-29T17:02:39
2016-02-29T17:02:39
52,807,651
0
0
null
2016-02-29T16:55:01
2016-02-29T16:55:01
null
UTF-8
Java
false
false
1,282
java
package org.snpeff.snpEffect; import org.snpeff.fileIterator.VcfFileIterator; import org.snpeff.vcf.VcfEntry; /** * Annotate a VCF file: E.g. add information to INFO column * */ public interface VcfAnnotator { /** * Add annotation headers to VCF file * * @return true if OK, false on error */ public boolean addHeaders(VcfFileIterator vcfFile); /** * Annotate a VCF file entry * * @return true if the entry was annotated */ public boolean annotate(VcfEntry vcfEntry); /** * This method is called after all annotations have been performed. * The vcfFile might have already been closed by this time * (i.e. the VcfFileIterator reached the end). * * @return true if OK, false on error */ public boolean annotateFinish(); /** * Initialize annotator: This method is called after vcfFile * is opened, but before the header is output. * The first vcfEntry might have (and often has) already been * read from the file. * * @return true if OK, false on error */ public boolean annotateInit(VcfFileIterator vcfFile); /** * Set configuration */ public void setConfig(Config config); /** * Set debug mode */ public void setDebug(boolean debug); /** * Set verbose mode */ public void setVerbose(boolean verbose); }
[ "pablo.e.cingolani@gmail.com" ]
pablo.e.cingolani@gmail.com
f82596c4dafb91e0b4b720bc0b9bf8af9c242ba7
5852a398ae202b0e0a9145075a0439cb766618ee
/src/main/java/org/edu_sharing/webservices/alfresco/extension/CopyNode.java
3796ac8797ad35dacb33e820c91bfe7e3771c8ff
[]
no_license
OpenOLAT/edusharingws
47c68bb99dd3a4bd7bf794d276d318116b41204f
0d3c42f35162edeff57f852aeda71846d02f90ca
refs/heads/master
2023-04-07T04:49:41.051516
2019-01-04T15:46:26
2019-01-04T15:46:26
164,126,223
0
0
null
null
null
null
UTF-8
Java
false
false
2,631
java
package org.edu_sharing.webservices.alfresco.extension; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Classe Java pour anonymous complex type. * * <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="nodeId" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="toNodeId" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="copyChildren" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "nodeId", "toNodeId", "copyChildren" }) @XmlRootElement(name = "copyNode") public class CopyNode { @XmlElement(required = true) protected String nodeId; @XmlElement(required = true) protected String toNodeId; protected boolean copyChildren; /** * Obtient la valeur de la propriété nodeId. * * @return * possible object is * {@link String } * */ public String getNodeId() { return nodeId; } /** * Définit la valeur de la propriété nodeId. * * @param value * allowed object is * {@link String } * */ public void setNodeId(String value) { this.nodeId = value; } /** * Obtient la valeur de la propriété toNodeId. * * @return * possible object is * {@link String } * */ public String getToNodeId() { return toNodeId; } /** * Définit la valeur de la propriété toNodeId. * * @param value * allowed object is * {@link String } * */ public void setToNodeId(String value) { this.toNodeId = value; } /** * Obtient la valeur de la propriété copyChildren. * */ public boolean isCopyChildren() { return copyChildren; } /** * Définit la valeur de la propriété copyChildren. * */ public void setCopyChildren(boolean value) { this.copyChildren = value; } }
[ "stephane.rosse@frentix.com" ]
stephane.rosse@frentix.com
1fa48b4c929bbcbc62124d965448ba8ebbc09f4a
7c72cb055c2905aea3e7f971808b13113ca66c88
/Entornos2/src/Ej2Test.java
52559bed07e0337b5a4f44f44c0a38ae3b60547e
[]
no_license
tejedorjesus/Segundo-trimestre
193cfbbd7cf57b83d2b82bf69bce884bb0dff3f8
9ea8a8f2446a66aab86653c8d66a43e525c863d4
refs/heads/master
2021-05-06T08:18:32.914325
2018-04-23T19:48:25
2018-04-23T19:48:25
114,010,918
0
0
null
null
null
null
UTF-8
Java
false
false
161
java
import static org.junit.Assert.*; import org.junit.Test; public class Ej2Test { @Test public void testContar_letra() { fail("Not yet implemented"); } }
[ "jesus.tejedor.ovejas@gmail.com" ]
jesus.tejedor.ovejas@gmail.com
5caa07ebfb50e0bf5fb0db21cbf67f4aeead6616
7fffc39739869f259fe2d103efa05b87739778d1
/Java/1017.java
7c277c92cf439c8f836e804c7f65046e7c42d177
[]
no_license
yunbinni/CodeUp
be39b3bd9fbeaa64be2a77a92918ebcc79b1799b
5cb95442edb2b766de74154e0b91e8e1c236dd13
refs/heads/main
2023-08-15T19:02:29.819912
2021-10-12T00:50:16
2021-10-12T00:50:16
366,761,440
0
0
null
null
null
null
UTF-8
Java
false
false
250
java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println(a + " " + a + " " + a); } }
[ "yunbin9049@gmail.com" ]
yunbin9049@gmail.com
db1008cf2d2fd70f165a1114bc2a43b9d8765ce6
b9d5157b4f6052e068fa0bc66312356d3d55ac99
/src/com/hncainiao/fubao/ui/fragment/DocFollFragment.java
abbb0bb282d605bb940774f7a40ec44b7c79ec12
[]
no_license
liujie007/cainiao
315e3cc094b892beabaa2fedc9f49eba0d7d535e
f5af11dcd7f958d8231e00db9cf36ff2240359ca
refs/heads/master
2021-01-10T08:44:20.156312
2015-10-29T03:48:31
2015-10-29T03:48:31
44,724,140
0
0
null
null
null
null
UTF-8
Java
false
false
6,888
java
package com.hncainiao.fubao.ui.fragment; import java.net.SocketTimeoutException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.http.Header; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ImageView; import android.widget.ListView; import com.hncainiao.fubao.R; import com.hncainiao.fubao.properties.Constant; import com.hncainiao.fubao.properties.SharedPreferencesConfig; import com.hncainiao.fubao.ui.activity.BaseActivity; import com.hncainiao.fubao.ui.activity.doctor.DoctorDetailActivity; import com.hncainiao.fubao.ui.adapter.DoctorAdapter; import com.hncainiao.fubao.ui.views.NetLoadDialog; import com.hncainiao.fubao.utils.NetworkUtil; import com.hncainiao.fubao.utils.ToastManager; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import com.loopj.android.http.RequestParams; /** * @author zhaojing * @version 2015年4月18日 上午10:13:57 * */ public class DocFollFragment extends Fragment { private View view; NetLoadDialog hDialog; private Context mContext; private ListView listView; private DoctorAdapter adapter; List<Map<String, Object>>mList=null; ImageView emptyView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub view = inflater.inflate(R.layout.fragment_follow_doctor, null); mContext = getActivity(); listView = (ListView) view.findViewById(R.id.lv_follow_doctors); emptyView=(ImageView)view.findViewById(R.id.imageview); listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // TODO Auto-generated method stub Intent intent = new Intent(mContext, DoctorDetailActivity.class); intent.putExtra("Doctor_id", mList.get(position).get("_id")+""); if(intent!=null&&!mList.get(position).get("_id").equals("")){ SharedPreferencesConfig.saveStringConfig(mContext, "Doctor_id",mList.get(position).get("_id")+""); startActivity(intent); getActivity().overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out); } } }); return view; } public void Showloading() { hDialog =new NetLoadDialog(mContext); hDialog.SetMessage("操作中..."); hDialog.showDialog(); } /** * 取消动画 */ public void Dissloading() { hDialog .dismissDialog(); } private void setData() throws SocketTimeoutException { mList = new ArrayList<Map<String, Object>>(); if(NetworkUtil.isOnline(mContext)){ try { AsyncHttpClient client = new AsyncHttpClient(); RequestParams params = new RequestParams(); String url = Constant.CONNER_DOCTOR; client.setTimeout(5000); params.put("member_id", SharedPreferencesConfig.getStringConfig(mContext, "member_id")); params.put("type", "2"); client.post(url, params, new AsyncHttpResponseHandler() { @Override public void onStart() { /** * 开始 * * */ Showloading(); super.onStart(); } @Override public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { Dissloading(); mList.clear(); System.out.println("医生关注列表" + new String(responseBody)); if(!BaseActivity.CheckJson(responseBody).equals("")){ try { JSONObject object = new JSONObject(new String( responseBody)); Map<String, Object> map = null; if (object.getInt("err") == 0) { JSONArray array = object.getJSONArray("subscribe"); for (int i = 0; i < array.length(); i++) { String name = array.getJSONObject(i).getString("doctor_name"); String hospital_name = array.getJSONObject( i).getString("hospital_name"); // String department_name = array.getJSONObject(i).getString("department_name"); String title = array.getJSONObject(i).getString("doctor_title"); //是否有号 String status=array.getJSONObject(i).getString("avaiable"); // SharedPreferencesConfig.saveStringConfig(mContext, "doctor_status", status); map = new HashMap<String, Object>(); map.put("name", name); map.put("level", title); map.put("locate", hospital_name); map.put("img", array.getJSONObject(i).getString("doctor_avatar")); map.put("_id", array.getJSONObject(i).getString("doctor_id")); map.put("doctor_status", status); mList.add(map); } } adapter = new DoctorAdapter(mContext); adapter.setList(paixu(mList)); listView.setAdapter(adapter); } catch (JSONException e) { }catch (Exception e) { // TODO: handle exception } } } @Override public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { Dissloading(); ToastManager.getInstance(mContext).showToast("获取医生失败"); } }); } catch (Exception e) { } } else { ToastManager.getInstance(mContext).showToast("当前无网络连接"); } } @Override public void onResume() { // TODO Auto-generated method stub try { setData(); } catch (SocketTimeoutException e) { // TODO Auto-generated catch block ToastManager.getInstance(mContext).showToast("数据获取超时,请重试"); e.printStackTrace(); } super.onResume(); } //Listview排序 public List<Map<String, Object>> paixu(List<Map<String, Object>> mList){ if(!mList.isEmpty()){ Collections.sort(mList, new Comparator<Map<String, Object>>() { @Override public int compare(Map<String, Object> object2, Map<String, Object> object1) { //根据文本排序 return ((String) object2.get("doctor_status")). compareTo((String) object1.get("doctor_status")); } }); } return mList; } }
[ "a770161055@qq.com" ]
a770161055@qq.com
1ce48a7aed8292c9f90360148bb9fbdd540f8202
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/ui/chatting/component/bq$i$a$$ExternalSyntheticLambda0.java
f72a94be126ed5312f0748047d92ee7f08c60a4a
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
477
java
package com.tencent.mm.ui.chatting.component; import android.view.View; import android.view.View.OnClickListener; public final class bq$i$a$$ExternalSyntheticLambda0 implements View.OnClickListener { public final void onClick(View arg1) {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes4.jar * Qualified Name: com.tencent.mm.ui.chatting.component.bq.i.a..ExternalSyntheticLambda0 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
2a49d2874cb536f28cda51e002f0ec70d880f89a
29b084f1bba7eee583df0691aa8c57b011ebd089
/src/main/java/pers/corvey/exam/controller/ResourceCommentController.java
30fcc0bff0cf262cdfbe3f5ae338a6e728d684ca
[]
no_license
Funds-soar/exam
ed6a45893bb8d6c98881be4a62063387facca2e2
ec153ab5bcb9b7a48ccdd20d61e9b90399dd5b1e
refs/heads/master
2023-04-29T21:20:05.005333
2021-05-09T12:47:35
2021-05-09T12:47:35
365,749,922
0
0
null
null
null
null
UTF-8
Java
false
false
1,811
java
package pers.corvey.exam.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import pers.corvey.exam.entity.Resource; import pers.corvey.exam.entity.ResourceComment; import pers.corvey.exam.entity.sys.SysUser; import pers.corvey.exam.entity.ui.CallBackMessage; import pers.corvey.exam.service.ResourceCommentService; import pers.corvey.exam.service.ResourceService; import pers.corvey.exam.util.CurrentUtils; @Controller @RequestMapping("/resourceComment") public class ResourceCommentController { private final ResourceCommentService service; private final ResourceService resourceService; @Autowired public ResourceCommentController(ResourceCommentService service, ResourceService resourceService) { this.service = service; this.resourceService = resourceService; } @RequestMapping("/good") @ResponseBody public int thumbsUp(@RequestParam("id") Long commentId) { return service.thumbsUp(commentId); } @PostMapping("/save") public String save(ResourceComment entity, @RequestParam("resourceId") Long resourceId) { SysUser user = CurrentUtils.getCurrentUser(); Resource Resource = resourceService.findByID(resourceId); entity.setUser(user); entity.setResource(Resource); CallBackMessage msg = CallBackMessage.createMsgAfterFunction( () -> service.save(entity), "回复成功!", "回复失败!请重试!"); msg.addToCurrentSession(); return "redirect:/resource/" + resourceId; } }
[ "amtoaer@gmail.com" ]
amtoaer@gmail.com
e589414063f4da40e3a8571b81763f9117bfb632
0bd0c3c44e28c72cc4fa7c3d2e4b1f3d71c7188e
/yixiekeji-provider/src/main/java/com/yixiekeji/model/seller/SellerModel.java
c6a4e4d1d97274ae7732ac9a52e595d5fa9537c2
[]
no_license
jbzhang99/xingfuyi
022030ddf03414ad769e71ca665693bb6d2c6855
797f752104b0703ad249ee6fe29b26b121338147
refs/heads/master
2021-01-02T03:12:57.428953
2019-10-30T07:53:59
2019-10-30T07:53:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,517
java
package com.yixiekeji.model.seller; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.slf4j.LoggerFactory; import org.slf4j.Logger; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.stereotype.Component; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.DefaultTransactionDefinition; import com.yixiekeji.core.StringUtil; import com.yixiekeji.core.exception.BusinessException; import com.yixiekeji.dao.shop.read.member.MemberCollectionSellerReadDao; import com.yixiekeji.dao.shop.read.order.OrdersReadDao; import com.yixiekeji.dao.shop.read.product.ProductCommentsReadDao; import com.yixiekeji.dao.shop.read.product.ProductReadDao; import com.yixiekeji.dao.shop.read.seller.SellerReadDao; import com.yixiekeji.dao.shop.write.member.MemberWriteDao; import com.yixiekeji.dao.shop.write.product.ProductWriteDao; import com.yixiekeji.dao.shop.write.seller.SellerApplyWriteDao; import com.yixiekeji.dao.shop.write.seller.SellerWriteDao; import com.yixiekeji.dao.shop.write.system.RegionsWriteDao; import com.yixiekeji.dto.CommentsDto; import com.yixiekeji.dto.OrderDayDto; import com.yixiekeji.entity.product.Product; import com.yixiekeji.entity.seller.Seller; import com.yixiekeji.entity.seller.SellerApply; import com.yixiekeji.entity.system.Regions; @Component(value = "sellerModel") public class SellerModel { private static Logger log = LoggerFactory.getLogger(SellerModel.class); @Resource private SellerWriteDao sellerWriteDao; @Resource private SellerReadDao sellerReadDao; @Resource private SellerApplyWriteDao sellerApplyDao; @Resource private DataSourceTransactionManager transactionManager; @Resource private MemberWriteDao memberWriteDao; @Resource private RegionsWriteDao regionsDao; @Resource private ProductReadDao productReadDao; @Resource private ProductWriteDao productWriteDao; @Resource private ProductCommentsReadDao productCommentsReadDao; @Resource private MemberCollectionSellerReadDao memberCollectionSellerReadDao; @Resource private OrdersReadDao ordersReadDao; public Seller getSellerById(Integer sellerId) { return sellerWriteDao.get(sellerId); } public Integer saveSeller(Seller seller) { return sellerWriteDao.save(seller); } public Integer updateSeller(Seller seller) { return sellerWriteDao.update(seller); } public Integer getSellersCount(Map<String, String> queryMap) { return sellerReadDao.getSellersCount(queryMap); } public List<Seller> getSellers(Map<String, String> queryMap, Integer start, Integer size) { List<Seller> list = sellerReadDao.getSellers(queryMap, start, size); if(!list.isEmpty() && null !=list){ for (Seller seller : list) { seller.setMemberName(memberWriteDao.get(seller.getMemberId()).getName()); } } return list; } public Seller getSellerByMemberId(Integer memberId) { return sellerWriteDao.getSellerByMemberId(memberId); } /** * 冻结商家,修改商家状态,修改商家下所有商品状态 * @param sellerId * @return */ public Boolean freezeSeller(Integer sellerId) throws Exception { DefaultTransactionDefinition def = new DefaultTransactionDefinition(); def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); TransactionStatus status = transactionManager.getTransaction(def); try { // 修改商家状态 Integer row = sellerWriteDao.freezeSeller(sellerId, Seller.AUDIT_STATE_3_FREEZE); if (row == 0) { throw new BusinessException("冻结商家时失败!"); } // 修改商家下的商品状态 productWriteDao.freezeProductsBySellerId(sellerId, Product.SELLER_STATE_2); transactionManager.commit(status); return true; } catch (BusinessException e) { transactionManager.rollback(status); throw e; } catch (Exception e) { transactionManager.rollback(status); throw e; } } /** * 解冻商家,修改商家状态,修改商家下所有商品状态 * @param sellerId * @return */ public Boolean unFreezeSeller(Integer sellerId) throws Exception { DefaultTransactionDefinition def = new DefaultTransactionDefinition(); def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); TransactionStatus status = transactionManager.getTransaction(def); try { // 修改商家状态 Integer row = sellerWriteDao.freezeSeller(sellerId, Seller.AUDIT_STATE_2_DONE); if (row == 0) { throw new BusinessException("解冻商家时失败!"); } // 修改商家下的商品状态 productWriteDao.freezeProductsBySellerId(sellerId, Product.SELLER_STATE_1); transactionManager.commit(status); return true; } catch (BusinessException e) { transactionManager.rollback(status); throw e; } catch (Exception e) { transactionManager.rollback(status); throw e; } } /** * 根据商家的用户ID,获取商家所在的地址(省市级) * @param memberId * @return */ public String getSellerLocationByMId(Integer memberId) { //获得商家申请信息 SellerApply sellerApply = sellerApplyDao.getSellerApplyByUserId(memberId); String location = ""; if (sellerApply != null && !StringUtil.isEmpty(sellerApply.getCompanyProvince()) && !StringUtil.isEmpty(sellerApply.getCompanyCity())) { Regions province = regionsDao.get(Integer.valueOf(sellerApply.getCompanyProvince())); Regions city = regionsDao.get(Integer.valueOf(sellerApply.getCompanyCity())); location = province.getRegionName() + city.getRegionName(); } return location; } /** * 定时任务设定商家的评分,用户评论各项求平均值设置为商家各项的综合评分 * @return */ public boolean jobSetSellerScore() { Map<String, String> queryMap = new HashMap<String, String>(); queryMap.put("q_auditStatus", Seller.AUDIT_STATE_2_DONE + ""); List<Seller> sellers = sellerReadDao.getSellers(queryMap, 0, 0); if (sellers != null && sellers.size() > 0) { for (Seller seller : sellers) { try { CommentsDto commentsDto = productCommentsReadDao .getSellerScoreSum(seller.getId()); if (commentsDto != null && commentsDto.getNumber() != null && commentsDto.getNumber() > 0) { Seller sellerNew = new Seller(); sellerNew.setId(seller.getId()); BigDecimal scoreDescription = (new BigDecimal(commentsDto.getDescription())) .divide((new BigDecimal(commentsDto.getNumber())), 1, BigDecimal.ROUND_HALF_UP); sellerNew.setScoreDescription(scoreDescription.toString()); BigDecimal scoreService = (new BigDecimal(commentsDto.getServiceAttitude())) .divide((new BigDecimal(commentsDto.getNumber())), 1, BigDecimal.ROUND_HALF_UP); sellerNew.setScoreService(scoreService.toString()); BigDecimal scoreDeliverGoods = (new BigDecimal( commentsDto.getProductSpeed())).divide( (new BigDecimal(commentsDto.getNumber())), 1, BigDecimal.ROUND_HALF_UP); sellerNew.setScoreDeliverGoods(scoreDeliverGoods.toString()); Integer update = sellerWriteDao.update(sellerNew); if (update == 0) { throw new BusinessException("修改商家评分时失败:sellerId=" + seller.getId()); } } } catch (Exception e) { log.error(e.getMessage()); } } } return true; } /** * 定时任务设定商家各项统计数据 * @return */ public boolean jobSellerStatistics() { Map<String, String> queryMap = new HashMap<String, String>(); queryMap.put("q_auditStatus", Seller.AUDIT_STATE_2_DONE + ""); List<Seller> sellers = sellerReadDao.getSellers(queryMap, 0, 0); if (sellers != null && sellers.size() > 0) { for (Seller seller : sellers) { try { Seller sellerNew = new Seller(); sellerNew.setId(seller.getId()); // 商品数量 Integer prdCount = productReadDao.getUpProductCountBySellerId(seller.getId()); sellerNew.setProductNumber(prdCount); // 店铺收藏 Integer countBySellerId = memberCollectionSellerReadDao .getCountBySellerId(seller.getId()); sellerNew.setCollectionNumber(countBySellerId); // 店铺总销售金额、店铺完成订单量 OrderDayDto dto = ordersReadDao.getSumMoneyOrderBySellerId(seller.getId()); if (dto != null) { BigDecimal moneyOrder = dto.getMoneyOrder() == null ? BigDecimal.ZERO : dto.getMoneyOrder(); BigDecimal moneyBack = dto.getMoneyBack() == null ? BigDecimal.ZERO : dto.getMoneyBack(); sellerNew.setSaleMoney(moneyOrder.subtract(moneyBack)); sellerNew.setOrderCountOver(dto.getCount()); } // 店铺总订单量 Integer count = ordersReadDao.getCountBySellerId(seller.getId()); sellerNew.setOrderCount(count); Integer update = sellerWriteDao.update(sellerNew); if (update == 0) { throw new BusinessException("统计商家数据时失败:sellerId=" + seller.getId()); } } catch (Exception e) { log.error(e.getMessage()); } } } return true; } /** * 根据名称取商家 * @param name * @return */ public List<Seller> getSellerByName(String name) { return sellerWriteDao.getSellerByName(name); } /** * 根据店铺名称取商家 * @param name * @return */ public List<Seller> getSellerBySellerName(String sellerName) { return sellerWriteDao.getSellerBySellerName(sellerName); } }
[ "524662994@qq.com" ]
524662994@qq.com
d6e96a7f72f2d604bfc5d42281dd3137718ac507
5f040de47af8bcd6b5f12a33c2430f84551d97d7
/app/src/test/java/com/yasir/android/tabsapplication/ExampleUnitTest.java
95be28e99d82c6c38e9bacf09efad45b9f8a50de
[]
no_license
yasirdev/Overlay_Loader_with_Image
901df3bbacce4d89c2bfd4f896c49d7a8dfabed1
960158875bf9f7081101168aeb72dbcf875a47aa
refs/heads/master
2020-09-21T06:26:24.076538
2016-09-09T00:58:57
2016-09-09T00:58:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.yasir.android.tabsapplication; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "YasirRajpoot@FM.local" ]
YasirRajpoot@FM.local
f329f5489029e58667a9f96066163ab0208e3545
c54a46af9fe7cbe604f9792ae8cfc644c6aa11c9
/app/src/main/java/com/Telstra/sample/repository/ContentRepository.java
103aec6d8d5b6fb4d24d2259411f419f914e978f
[]
no_license
arunkumar2289/TelstraApp
e65490abd2f4b97b9c8f49daaf3d9585221ab782
a1e79edf17cf0719c468a5de296b20e2824ab7e4
refs/heads/master
2021-04-29T22:03:11.228107
2018-02-26T12:23:08
2018-02-26T12:23:08
121,630,327
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
package com.Telstra.sample.repository; import android.text.TextUtils; import android.util.Log; import com.Telstra.sample.model.ImageData; import com.Telstra.sample.model.LiveData; import java.util.Iterator; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class ContentRepository { private RetrofitService retrofitService; private static ContentRepository contentRepository; LiveData liveData; private ContentRepository() { Retrofit retrofit = new Retrofit.Builder() .baseUrl(RetrofitService.HTTPS_API_CONTENT_URL) .addConverterFactory(GsonConverterFactory.create()) .build(); retrofitService = retrofit.create(RetrofitService.class); } public synchronized static ContentRepository getInstance() { if (contentRepository == null) { if (contentRepository == null) { contentRepository = new ContentRepository(); } } return contentRepository; } public void getProjectList(final RetrofitDataStatus dataStatus) { retrofitService.getProjectList().enqueue(new Callback<LiveData>() { @Override public void onResponse(Call<LiveData> call, Response<LiveData> response) { dataStatus.onSuccess(response.body()); } @Override public void onFailure(Call<LiveData> call, Throwable t) { dataStatus.onFailure(); } }); } }
[ "Krpappan@2289" ]
Krpappan@2289
2a25b528047cdec61bcac049439d299c25793051
cdd6d7eabbba1adfcb3d09459482bdafabea5ea9
/Java_Multithreading/src/main/java/Level_2/lvl_2_task_3/OurUncaughtExceptionHandler.java
f7e650b775fd229283759d889b7f0003b778295b
[]
no_license
AvengerDima/JavaRush
dde5f2cffeff1449a38dc29c6c6c75b49cb698bd
7805a3adf61fff3ae2762b86807c67befb31c814
refs/heads/master
2021-12-02T02:52:49.800659
2021-11-19T17:40:38
2021-11-19T17:40:38
256,775,964
1
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package Level_2.lvl_2_task_3; public class OurUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { @Override public void uncaughtException(Thread t, Throwable e) { final String string = "%s : %s : %s"; if (lvl_2_task_3.FIRST_THREAD_NAME.equals(t.getName())) { System.out.println(getFormattedStringForFirstThread(t, e, string)); } else if (lvl_2_task_3.SECOND_THREAD_NAME.equals(t.getName())) { System.out.println(getFormattedStringForSecondThread(t, e, string)); } else { System.out.println(getFormattedStringForOtherThread(t, e, string)); } } protected String getFormattedStringForOtherThread(Thread t, Throwable e, String string) { String result = String.format(string, e.getClass().getSimpleName(), e.getCause(), t.getName()); return result; } protected String getFormattedStringForSecondThread(Thread t, Throwable e, String string) { String result = String.format(string, e.getCause(), e.getClass().getSimpleName(), t.getName()); return result; } protected String getFormattedStringForFirstThread(Thread t, Throwable e, String string) { String result = String.format(string, t.getName(), e.getClass().getSimpleName(), e.getCause()); return result; } }
[ "Dima_c.2011@mail.ru" ]
Dima_c.2011@mail.ru
59fd0deb0cc2f34e071d2dddda7cd496b109e306
1c9bdf7e53599fa79f4e808a6daf1bab08b35a00
/peach/app/src/main/java/com/xygame/second/sg/comm/bean/TimerDuringBean.java
3cb9669c3ed6837beabdc92d8b3253e268c51324
[]
no_license
snoylee/GamePromote
cd1380613a16dc0fa8b5aa9656c1e5a1f081bd91
d017706b4d6a78b5c0a66143f6a7a48fcbd19287
refs/heads/master
2021-01-21T20:42:42.116142
2017-06-18T07:59:38
2017-06-18T07:59:38
94,673,520
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
package com.xygame.second.sg.comm.bean; import com.xygame.second.sg.jinpai.UsedTimeBean; import com.xygame.second.sg.jinpai.bean.ScheduleTimeBean; import java.io.Serializable; import java.util.List; /** * Created by tony on 2016/8/10. */ public class TimerDuringBean implements Serializable { private List<FreeTimeBean> timers; private FreeTimeBean timersOfDate; private List<ServiceTimeDateBean> dateDatas; private List<ScheduleTimeBean> scheduleTimeBeans; private List<UsedTimeBean> usedTimeBeans; public List<UsedTimeBean> getUsedTimeBeans() { return usedTimeBeans; } public void setUsedTimeBeans(List<UsedTimeBean> usedTimeBeans) { this.usedTimeBeans = usedTimeBeans; } public List<ServiceTimeDateBean> getDateDatas() { return dateDatas; } public void setDateDatas(List<ServiceTimeDateBean> dateDatas) { this.dateDatas = dateDatas; } public List<FreeTimeBean> getTimers() { return timers; } public void setTimers(List<FreeTimeBean> timers) { this.timers = timers; } public List<ScheduleTimeBean> getScheduleTimeBeans() { return scheduleTimeBeans; } public void setScheduleTimeBeans(List<ScheduleTimeBean> scheduleTimeBeans) { this.scheduleTimeBeans = scheduleTimeBeans; } public FreeTimeBean getTimersOfDate() { return timersOfDate; } public void setTimersOfDate(FreeTimeBean timersOfDate) { this.timersOfDate = timersOfDate; } }
[ "litieshan549860123@126.com" ]
litieshan549860123@126.com
acc4ecdd5c3c9f4ffa664850c90cf778c8566662
3ac7ef00869dd1ba4ecd70a8ce3f00fbd54fbe96
/Exercises/Generics/pr01/Box.java
970737a99b0849777bfb22b1f1e7ca51dea0444b
[]
no_license
StefanValerievMaslarski/Java_OOP_2_July_2016
53f8f00549893173135193b694d733b3c08fe04c
a1948913ee800ea154ef5e49ea5e3ec924c5e9e7
refs/heads/master
2021-01-12T15:22:31.719015
2016-10-24T06:50:03
2016-10-24T06:50:03
71,760,112
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
package generics.pr01; public class Box<T> { private static final int DEFAULT_CAPACITY = 16; private T element; // private T[] elements; // private int index; @SuppressWarnings("unchecked") Box(T element) { this.element = element; // this.elements = (T[]) new Object[DEFAULT_CAPACITY]; // this.index = 0; } // public void add(T element) { // this.elements[index] = element; // this.index++; // } // // public T[] getElements() { // return this.elements; // } @Override public String toString() { return element.getClass() + ": " + String.valueOf(this.element); } }
[ "stefan.maslarski@gmail.com" ]
stefan.maslarski@gmail.com
240aa8d4e12f18434417868daf3a7f71bc8d9253
490429ac31f3fdec4b9ba27d6e840928e756ce76
/src/main/java/com/bharath/ws/soap/dto/CreditCardInfo.java
3ac2aa043d9946460751e7840e448b30d45defe6
[]
no_license
rzuniga64/javafirstws
3cc99858413cdaa38804477e2f14a52b0116f024
a39c6b1f86b35a12b49e1befb00187effb52559d
refs/heads/master
2020-04-26T06:12:09.888169
2019-03-02T07:23:13
2019-03-02T07:23:13
173,357,538
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package com.bharath.ws.soap.dto; import java.util.Date; import javax.xml.bind.annotation.XmlType; @XmlType(name = "CreditCardInfo") public class CreditCardInfo { String cardNumber; private Date expirtyDate; String firstName; String lastName; String secCode; String Address; public String getCardNumber() { return cardNumber; } public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getSecCode() { return secCode; } public void setSecCode(String secCode) { this.secCode = secCode; } public String getAddress() { return Address; } public void setAddress(String address) { Address = address; } public Date getExpirtyDate() { return expirtyDate; } public void setExpirtyDate(Date expirtyDate) { this.expirtyDate = expirtyDate; } }
[ "rzuniga64@gmail.com" ]
rzuniga64@gmail.com
448ba7eb4b1f723ade457adf85989b9c75595d07
d433f3ac33d98a71be39d0e9be6ea6f80de4d2b0
/src/main/java/com/accelad/automation/ltpsice/output/raw/RawFileInputStreamReader.java
74d6c3c9260e08f073c807c838976b779f0c3b64
[]
no_license
Lemania/ltspice-bridge
68d7b1a276554c7a852cf6e7f98df2c7b14fc128
192bc484dc91fe9b5922ae2870204067a5ff6ae3
refs/heads/master
2020-03-26T13:49:56.835995
2017-01-22T12:22:09
2017-01-22T12:22:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,057
java
package com.accelad.automation.ltpsice.output.raw; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteOrder; import java.nio.charset.Charset; public class RawFileInputStreamReader { private static final Charset RAW_FILE_CHARSET = Charset.forName("UTF-16LE"); public static final int READ_BUFFER_SIZE = 65536; private final DataInputStream dataInputStream; public RawFileInputStreamReader(InputStream in) { BufferedInputStream bis = new BufferedInputStream(in, READ_BUFFER_SIZE); dataInputStream = new DataInputStream(bis); } public void close() throws IOException { dataInputStream.close(); } protected String readLine() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); while (true) { int data = dataInputStream.read(); baos.write(data); if (data == -1) return null; if (data == '\n' || data == '\r') { baos.write(dataInputStream.read()); break; } } String string = new String(baos.toByteArray(), RAW_FILE_CHARSET); return string.substring(0, string.length() - 1); } private Complex readDoubleComplex() throws IOException { double real = readDouble(); double imaginary = readDouble(); return new Complex(real, imaginary); } double readDouble() throws IOException { long longValue = dataInputStream.readLong(); if (ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN) longValue = Long.reverseBytes(longValue); return Double.longBitsToDouble(longValue); } float readFloat() throws IOException { int lt = dataInputStream.readInt(); if (ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN) lt = Integer.reverseBytes(lt); return Float.intBitsToFloat(lt); } }
[ "yoann.meste@accelad.com" ]
yoann.meste@accelad.com
614b318909ac9dfb33b0f98063e76b5264359a0c
354ea2bd46fe9ed6f55d36845d4a002a4d09d8e8
/src/leverage/game/version/VersionMeta.java
fac8ad9f970984e55d9b1eee3a3ba1171af801be
[]
no_license
MacKey-255/LEVERAGE-Launcher
84c22536fabc041b9ab888f63dee03ccb8814c83
ac3d929d08c7bc86873a1451fb37fb2799dc200d
refs/heads/master
2020-04-20T18:52:25.049189
2019-08-02T21:10:23
2019-08-02T21:10:23
169,033,845
3
0
null
null
null
null
UTF-8
Java
false
false
845
java
package leverage.game.version; public class VersionMeta { private final String id; private final String url; private final VersionType type; public VersionMeta(String id, String url, VersionType type) { this.id = id; this.url = url; this.type = type; } public final String getID() { return id; } public final String getURL() { return url; } public final VersionType getType() { return type; } @Override public final boolean equals(Object o) { return o instanceof VersionMeta && id.equalsIgnoreCase(((VersionMeta) o).id); } @Override public final int hashCode() { return id.hashCode(); } @Override public final String toString() { return id; } }
[ "unknown@example.com" ]
unknown@example.com
22b28450bbb834e68ac95864cdd8f04d4f09b77d
782f9efaf6f1bf14086224845a072c6fd45dde5a
/app/src/main/java/com/dlf/weizx/model/NaviModel.java
f04221985e8fa835052c58564aa2861714d806c5
[]
no_license
DF-du/WeiZX
745b8514e0f4fb62b7bd6784e71b83133bdca04a
d18aeeb2fc0ab1d7bc9d453e40421a90c4bed4da
refs/heads/master
2022-11-29T12:13:53.664759
2020-08-12T06:09:19
2020-08-12T06:09:19
284,498,820
1
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.dlf.weizx.model; import com.dlf.weizx.base.BaseModel; import com.dlf.weizx.bean.NaviBean; import com.dlf.weizx.net.HttpUtil; import com.dlf.weizx.net.ResultCallBack; import com.dlf.weizx.net.ResultSubscriber; import com.dlf.weizx.net.RxUtils; public class NaviModel extends BaseModel { public void getData(final ResultCallBack<NaviBean> callBack) { addDisposable( HttpUtil.getInstance() .getWanService() .getNavi() .compose(RxUtils.<NaviBean>rxSchedulerHelper()) .subscribeWith(new ResultSubscriber<NaviBean>() { @Override public void onNext(NaviBean naviBean) { callBack.onSuccess(naviBean); } }) ); } }
[ "2408755681@qq.com" ]
2408755681@qq.com
a2b72cdf8f04c037228f8629ce3b6e3ddbd86e5b
2870a300ca7ae1950a5b10d953086595ffcc47f2
/src/SS18/PROG2/UE/Adresse.java
022e07ad4b87f28020191762e43781f7ad168ae3
[]
no_license
annebond/BWI
d27f4f31a5a034dc83a394afa45a832087fd8961
46d04b9eb13082e966f7fa9391dd5356f8c09bfc
refs/heads/master
2018-09-11T00:15:35.706289
2018-07-04T07:15:19
2018-07-04T07:15:19
108,734,329
0
0
null
null
null
null
UTF-8
Java
false
false
114
java
package SS18.PROG2.UE; public class Adresse { public String strasse; public String PLZ; public String Ort; }
[ "anne.bondova@gmail.com" ]
anne.bondova@gmail.com
04146305f84d5ac5c5adc47576477cdeb06e9a81
a8494cf6cb4b25b7a9cc3dbda022f50e26e73168
/src/main/java/app/service/form/TableFormFieldService.java
363bdaa1ae15d96fa5d30926177ad9dfc99cc145
[]
no_license
SteveZhangF/ddd
ab1c763ac7d2c33d2e7b8d8e1ff4a29aa02a82d9
b0882f985cf3ec6f21ab0a420f9f814969841fee
refs/heads/master
2021-01-10T15:05:42.506250
2015-12-12T08:34:48
2015-12-12T08:34:48
43,917,471
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
/* * Copyright (c) 2015. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. * Vestibulum commodo. Ut rhoncus gravida arcu. */ package app.service.form; import app.model.forms.TableFormField; import app.newService.IBaseGenericService; /** * Created by steve on 11/12/15. */ public interface TableFormFieldService extends IBaseGenericService<TableFormField,String> { }
[ "zhangke3012@gmail.com" ]
zhangke3012@gmail.com
2950f55dff53f84a2ee16f11e216d33332860145
94210bec6f4ebb0f76abab59c188289852c79b54
/src/main/java/com/fileserver/app/works/bucket/BucketController.java
20c1d780bf39f105033c3f5f6bd557c38fe1e5da
[]
no_license
ApilPokhrel/FileServer_V2
a07d907139d0a9389b32570a1aa7b68aa05d1ffa
1ce2f8cc7e47806780ed6c630182e0284d496629
refs/heads/master
2022-07-30T11:24:44.952079
2019-06-05T11:58:42
2019-06-05T11:58:42
189,935,354
0
0
null
null
null
null
UTF-8
Java
false
false
3,063
java
package com.fileserver.app.works.bucket; import com.fileserver.app.config.Variables; import com.fileserver.app.handler.DateAndTime; import com.fileserver.app.handler.KeyGen; import com.fileserver.app.works.bucket.entity.BucketModel; import com.fileserver.app.works.bucket.entity.SaturationModel; import com.fileserver.app.works.user.UserSchema; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; @Service public class BucketController { Variables variables = new Variables(); private DateAndTime dateAndTime; @Autowired public BucketController(DateAndTime dateAndTime){ this.dateAndTime = dateAndTime; } public BucketSchema setBucket(BucketModel bucketModel, UserSchema user) throws Exception { BucketSchema bucketSchema = null; KeyGen keyGen = new KeyGen(); try { List<String> methods = Arrays.asList(bucketModel.getAllowed_methods().split("\\s*,\\s*")); if(bucketModel.getName().split(" ").length > 1){ throw new Exception("Name Cannot have space"); } List<String> file_type = Arrays.asList(bucketModel.getAllowed_file_type().split("\\s*,\\s*")); List<String> keys = Arrays.asList(bucketModel.getOwners().split("\\s*,\\s*")); bucketSchema = new BucketSchema(); bucketSchema.setName(bucketModel.getName().toLowerCase()); bucketSchema.setThreshold(Integer.parseInt(bucketModel.getThreshold())); bucketSchema.setAllowed_file_type(file_type); bucketSchema.setAllowed_methods(methods); bucketSchema.setSaturation(new SaturationModel(100000, 1, 0)); bucketSchema.setSize_used(0); bucketSchema.setCreateAt(dateAndTime.isoTimeNow()); List<String> owners = new ArrayList<>(); owners.add(user.getKey().get(user.getKey().size() - 1)); if(keys != null) { for (String key : keys) { if(!key.trim().isEmpty()){ System.out.println(keyGen.decodeKey(key)); owners.add(key); } } } bucketSchema.setOwners(owners); }catch (Exception ex){ throw new Exception(ex.getMessage()); } return bucketSchema; } public void bucketFolder(String name) throws Exception { name = name.toLowerCase().trim(); File file = new File(variables.SERVER_FOLDER+name);//Bucket Folder File fileSat = new File(variables.SERVER_FOLDER+name+"/"+1);//Saturation Folder try{ file.mkdir(); }catch(SecurityException ex){ throw new Exception(ex.getMessage()); } try{ fileSat.mkdir(); }catch(SecurityException ex){ throw new Exception(ex.getMessage()); } } }
[ "apilpokharel5@gmail.com" ]
apilpokharel5@gmail.com
941af70fac37f3a2fb8bae8a5dc853eed62f08b0
e41a9d645bb0fb37123c9d4a01bee1914c4b3729
/project3/KruskalTest.java
e5f9d65384def86581f6e111e1651dbb6995edba
[]
no_license
BelieverW/Data-Structures-in-Java
fd44a9851c07f5dc0cf2c6fd0900037502f56fc0
41b319eae3b2c07e875e2843f9143ac62d1e878e
refs/heads/master
2016-09-01T07:31:44.654129
2015-12-21T06:31:45
2015-12-21T06:31:45
45,292,670
9
1
null
null
null
null
UTF-8
Java
false
false
4,581
java
/* KruskalTest.java */ /** * The KruskalTest class tests the Kruskal class. */ import graph.*; import graphalg.*; import java.util.*; public class KruskalTest { private static final int VERTICES = 10; private static final int MAXINT = 100; private static boolean tree = true; private static boolean minTree = true; public static void addRandomEdges(WUGraph g, Object[] vertArray) { int i, j; System.out.println("Adding random edges to graph."); Random random = new Random(3); // Create a "Random" object with seed 0 for (i = 0; i < vertArray.length; i++) { for (j = i; j < vertArray.length; j++) { int r = random.nextInt() % MAXINT; // Between -99 and 99 if (r >= 0) { g.addEdge(vertArray[i], vertArray[j], r); } } } } public static void DFS(WUGraph t, DFSVertex current, DFSVertex prev, int[] maxOnPath, int maxEdge) { Neighbors neigh; int i; current.visited = true; maxOnPath[current.number] = maxEdge; neigh = t.getNeighbors(current); if (neigh != null) { for (i = 0; i < neigh.neighborList.length; i++) { DFSVertex next = (DFSVertex) neigh.neighborList[i]; if (next.visited) { if ((next != current) && (next != prev)) { tree = false; return; } } else if (neigh.weightList[i] > maxEdge) { DFS(t, next, current, maxOnPath, neigh.weightList[i]); } else { DFS(t, next, current, maxOnPath, maxEdge); } if (!tree) { return; } } } } public static void DFSTest(WUGraph g, WUGraph t, DFSVertex[] vertArray) { int[][] maxOnPath; Neighbors neigh; int i, j; System.out.println("Testing the tree."); maxOnPath = new int[VERTICES][VERTICES]; for (i = 0; i < VERTICES; i++) { for (j = 0; j < VERTICES; j++) { vertArray[j].visited = false; } DFS(t, vertArray[i], null, maxOnPath[i], -MAXINT); for (j = 0; j < VERTICES; j++) { if (!vertArray[j].visited) { tree = false; } } if (!tree) { return; } } for (i = 0; i < vertArray.length; i++) { for (j = 0; j < vertArray.length; j++) { System.out.print(" " + maxOnPath[i][j]); } System.out.println(); } for (i = 0; i < VERTICES; i++) { neigh = g.getNeighbors(vertArray[i]); if (neigh != null) { for (j = 0; j < neigh.neighborList.length; j++) { int v = ((DFSVertex) neigh.neighborList[j]).number; if (neigh.weightList[j] < maxOnPath[i][v]) { minTree = false; } } } } } public static void main(String[] args) { int i, j; int score; WUGraph g, t; DFSVertex[] vertArray; System.out.println("Running minimum spanning tree test."); System.out.println("Creating empty graph."); g = new WUGraph(); System.out.println("Adding " + VERTICES + " vertices."); vertArray = new DFSVertex[VERTICES]; for (i = 0; i < VERTICES; i++) { vertArray[i] = new DFSVertex(); vertArray[i].number = i; g.addVertex(vertArray[i]); } addRandomEdges(g, vertArray); for (i = 0; i < vertArray.length; i++) { for (j = 0; j < vertArray.length; j++) { if (g.isEdge(vertArray[i], vertArray[j])) { System.out.print(" " + g.weight(vertArray[i], vertArray[j])); } else { System.out.print(" *"); } } System.out.println(); } System.out.println("Finding the minimum spanning tree."); t = Kruskal.minSpanTree(g); for (i = 0; i < vertArray.length; i++) { for (j = 0; j < vertArray.length; j++) { if (t.isEdge(vertArray[i], vertArray[j])) { System.out.print(" " + t.weight(vertArray[i], vertArray[j])); } else { System.out.print(" *"); } } System.out.println(); } DFSTest(g, t, vertArray); if (tree) { System.out.println("One point for creating a tree."); if (minTree) { System.out.println("Two points for creating a minimum spanning tree."); score = 3; } else { System.out.println("Not a minimum spanning tree."); score = 1; } } else { System.out.println("Not a tree."); score = 0; } System.out.println("Your Kruskal test score is " + score + " out of 3."); System.out.println(" (Be sure also to run WUGTest.java.)"); } } class DFSVertex { boolean visited; int number; }
[ "hlwang0309@hotmail.com" ]
hlwang0309@hotmail.com
41c859dd50441825abe618a768ba4d171ca8dd01
d93a5c3107021baa241372592446a66b692ff03e
/Lab3/src/userInterface/ViewAccountJPanel.java
b51863129624fc7c056ee577400ac9398960a45c
[]
no_license
rohan-kapadnis/Application-Engineering-And-Development
db4ab0d15033c56bd20281213abb690d69018611
02215999bb447a82de0c244767badb0be4b40b88
refs/heads/master
2021-01-03T11:34:17.611315
2020-02-12T17:35:23
2020-02-12T17:35:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,715
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 userInterface; import business.Account; import java.awt.CardLayout; import javax.swing.JOptionPane; import javax.swing.JPanel; /** * * @author rohan */ public class ViewAccountJPanel extends javax.swing.JPanel { private JPanel userProcessContainer; private Account account; /** * Creates new form ViewAccountJPanel */ ViewAccountJPanel(JPanel userProcessContainer, Account account) { initComponents(); this.userProcessContainer = userProcessContainer; this.account = account; populateAccountDetails(); btnSave.setEnabled(false); btnUpdate.setEnabled(true); } private void populateAccountDetails(){ txtRoutingNumber.setText(account.getRoutingNumber()); txtAccountNumber.setText(account.getAccountNumber()); txtBankName.setText(account.getBankName()); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtRoutingNumber = new javax.swing.JTextField(); txtAccountNumber = new javax.swing.JTextField(); txtBankName = new javax.swing.JTextField(); btnBack = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); btnUpdate = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setPreferredSize(new java.awt.Dimension(900, 600)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Create Account"); jLabel2.setText("Routing Number:"); jLabel3.setText("Account Number:"); jLabel4.setText("Bank Name:"); txtRoutingNumber.setEnabled(false); txtRoutingNumber.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtRoutingNumberActionPerformed(evt); } }); txtAccountNumber.setEnabled(false); txtBankName.setEnabled(false); btnBack.setText("<<Back"); btnBack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBackActionPerformed(evt); } }); btnSave.setText("Save"); btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnUpdate.setText(" Update"); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); jLabel5.setText("View Account"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(btnBack)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(99, 99, 99) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(92, 92, 92)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel5) .addGap(24, 24, 24))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(btnSave) .addGap(18, 18, 18) .addComponent(btnUpdate)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtBankName, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE) .addComponent(txtAccountNumber) .addComponent(txtRoutingNumber)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 764, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(56, 56, 56) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txtRoutingNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtAccountNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4) .addGap(6, 6, 6)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel5) .addGap(90, 90, 90) .addComponent(txtBankName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(29, 29, 29) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnSave) .addComponent(btnUpdate)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 180, Short.MAX_VALUE) .addComponent(btnBack) .addGap(179, 179, 179)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 900, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 600, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) ); }// </editor-fold>//GEN-END:initComponents private void txtRoutingNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRoutingNumberActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtRoutingNumberActionPerformed private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed // TODO add your handling code here: userProcessContainer.remove(this); CardLayout layout = (CardLayout) userProcessContainer.getLayout(); layout.previous(userProcessContainer); }//GEN-LAST:event_btnBackActionPerformed private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed // TODO add your handling code here: txtRoutingNumber.setEnabled(true); txtAccountNumber.setEnabled(true); txtBankName.setEnabled(true); btnSave.setEnabled(true); btnUpdate.setEnabled(false); }//GEN-LAST:event_btnUpdateActionPerformed private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed // TODO add your handling code here: account.setRoutingNumber(txtRoutingNumber.getText()); account.setAccountNumber(txtAccountNumber.getText()); account.setBankName(txtBankName.getText()); btnSave.setEnabled(false); btnUpdate.setEnabled(true); JOptionPane.showMessageDialog(null,"Account updated Successfully"); }//GEN-LAST:event_btnSaveActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnBack; private javax.swing.JButton btnSave; private javax.swing.JButton btnUpdate; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JPanel jPanel1; private javax.swing.JTextField txtAccountNumber; private javax.swing.JTextField txtBankName; private javax.swing.JTextField txtRoutingNumber; // End of variables declaration//GEN-END:variables }
[ "kapadnis.r@husky.neu.edu" ]
kapadnis.r@husky.neu.edu
f4ecf99bda02afc11284cc4bfdc44628e6f8e23f
8946b569c02af825f060826747f86d48a8b968d1
/1JavaWorkBench/BaiduApi/src/main/java/util/Const.java
facc70483a9a6b7cfd14dd71eff5adc3b1564787
[]
no_license
chrgu000/MyProject-1
312aa357114ec514368ecad034c5819215bf33fa
d9c7344b7a22c8c67b7450d80b0e3cdbfed36ea1
refs/heads/master
2020-05-22T14:56:05.613471
2018-08-31T06:59:15
2018-08-31T06:59:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
114
java
package util; public class Const { public static final String PropertyPath = "config/myConfig.properites"; }
[ "pzx521521@qq.com" ]
pzx521521@qq.com
5a970c4acbe3e2db0cabc42714f2aeb717b7e2c6
766905a2296632a6aa28e7fd6b90a96e8344c1fd
/app/src/main/java/com/ferran/taskinator/MainActivity.java
e56870ebd52d57249d58a6381dfafdea05c93d9c
[]
no_license
ferranramirez/Taskinator
ee2c708cb57f3bdd2159afc94f5acf05139e526b
9c5ae5cf3dc1fe429d67bbf54e4bb93fa353567f
refs/heads/master
2020-04-09T00:24:42.948647
2018-11-30T18:56:03
2018-11-30T18:56:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,502
java
package com.ferran.taskinator; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.ferran.taskinator.tabs.AllFragment; import com.ferran.taskinator.tabs.MonthFragment; import com.ferran.taskinator.tabs.SomedayFragment; import com.ferran.taskinator.tabs.TodayFragment; public class MainActivity extends AppCompatActivity { private SectionsPagerAdapter mSectionsPagerAdapter; private ViewPager mViewPager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); /* Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); */ mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); // Set up the ViewPager with the sections adapter. mViewPager = (ViewPager) findViewById(R.id.container); mViewPager.setAdapter(mSectionsPagerAdapter); TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); mViewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout)); tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mViewPager)); /*FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { final android.support.v4.app.FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); android.app.Fragment prev = getFragmentManager().findFragmentByTag("dialog"); ft.addToBackStack(null); final MyDialogFragment dialogFragment = new InsertDialogFragment(); dialogFragment.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { Snackbar.make(view, "Task added", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); dialogFragment.show(ft, "dialog"); } });*/ } /* @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }*/ /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { /** * The fragment argument representing the section number for this * fragment. */ private static final String ARG_SECTION_NUMBER = "section_number"; public PlaceholderFragment() { } /** * Returns a new instance of this fragment for the given section * number. */ public static PlaceholderFragment newInstance(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(null, container, false); //int tabNumber = getArguments().getInt(ARG_SECTION_NUMBER); return rootView; } } /** * A {@link FragmentPagerAdapter} that returns a fragment corresponding to * one of the sections/tabs/pages. */ public class SectionsPagerAdapter extends FragmentPagerAdapter { public SectionsPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { // getItem is called to instantiate the fragment for the given page. // Return a PlaceholderFragment (defined as a static inner class below). Fragment fragment; if(position == 0) fragment = new TodayFragment(); else if(position == 1) fragment = new MonthFragment(); else if(position == 2) fragment = new SomedayFragment(); else fragment = new AllFragment(); return fragment; } @Override public int getCount() { // Show 4 total pages. return 4; } } }
[ "ferranramireznavajon@gmail.com" ]
ferranramireznavajon@gmail.com
aad88076a7406da03542c001d5e82f82e046964d
c67cbd22f9bc3c465fd763fdf87172f2c8ec77d4
/Desktop/Please Work/build/Android/Preview/app/src/main/java/com/foreign/Fuse/Controls/Native/Android/ViewGroup.java
ac15a139c2afe91d378b122c4ed1311fff8391a1
[]
no_license
AzazelMoreno/Soteria-project
7c58896d6bf5a9ad919bde6ddc2a30f4a07fa0d4
04fdb71065941176867fb9007ecf38bbf851ad47
refs/heads/master
2020-03-11T16:33:22.153713
2018-04-19T19:47:55
2018-04-19T19:47:55
130,120,337
0
0
null
null
null
null
UTF-8
Java
false
false
2,027
java
package com.foreign.Fuse.Controls.Native.Android; // fuse defined imports import com.uno.UnoObject; import com.uno.BoolArray; import com.uno.ByteArray; import com.uno.CharArray; import com.uno.DoubleArray; import com.uno.FloatArray; import com.uno.IntArray; import com.uno.LongArray; import com.uno.ObjectArray; import com.uno.ShortArray; import com.uno.StringArray; import com.Bindings.UnoHelper; import com.Bindings.UnoWrapped; import com.Bindings.ExternedBlockHost; public class ViewGroup { static void debug_log(Object message) { android.util.Log.d("PleaseWork", (message==null ? "null" : message.toString())); } public static void AddView227(final Object parentHandle,final Object childHandle) { android.view.ViewGroup viewGroup = (android.view.ViewGroup)parentHandle; android.view.View childView = (android.view.View)childHandle; viewGroup.addView(childView); } public static void AddView1228(final Object parentHandle,final Object childHandle,final int index) { android.view.ViewGroup viewGroup = (android.view.ViewGroup)parentHandle; android.view.View childView = (android.view.View)childHandle; viewGroup.addView(childView, index); } public static Object Create229() { android.widget.FrameLayout frameLayout = new com.fuse.android.views.ViewGroup(com.fuse.Activity.getRootActivity()); frameLayout.setFocusable(true); frameLayout.setFocusableInTouchMode(true); frameLayout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(android.view.ViewGroup.LayoutParams.MATCH_PARENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT)); return frameLayout; } public static void RemoveView230(final Object parentHandle,final Object childHandle) { android.view.ViewGroup viewGroup = (android.view.ViewGroup)parentHandle; android.view.View childView = (android.view.View)childHandle; viewGroup.removeView(childView); } }
[ "rudy0604594@gmail.com" ]
rudy0604594@gmail.com
a4d246f12738baa1a6a9362ac050d9d000518d76
768ac7d2fbff7b31da820c0d6a7a423c7e2fe8b8
/WEB-INF/java/com/youku/top/index/analyzer/WordProcessor.java
7909b5a2c229b917835a284dc770adabb3ae4aa7
[]
no_license
aiter/-java-soku
9d184fb047474f1e5cb8df898fcbdb16967ee636
864b933d8134386bd5b97c5b0dd37627f7532d8d
refs/heads/master
2021-01-18T17:41:28.396499
2015-08-24T06:09:21
2015-08-24T06:09:21
41,285,373
0
0
null
2015-08-24T06:08:00
2015-08-24T06:08:00
null
UTF-8
Java
false
false
13,309
java
/** * */ package com.youku.top.index.analyzer; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.lucene.analysis.Token; import com.youku.top.index.analyzer.WholeWord.Word; /** * @author william * 分词前处理 */ public class WordProcessor { private int type; private static Set<Character> numberSet = null; private static char[] numberWords = new char[]{ '0','1','2','3','4','5','6','7','8','9','一','二','三','四','五','六','七','八','九','十' }; static { numberSet = new HashSet<Character>(); for (int i=0;i<numberWords.length;i++) numberSet.add(numberWords[i]); } public static HashMap<String,String> numberMap = new HashMap<String,String>(); static { numberMap.put("01","1"); numberMap.put("02","2"); numberMap.put("03","3"); numberMap.put("04","4"); numberMap.put("05","5"); numberMap.put("06","6"); numberMap.put("07","7"); numberMap.put("08","8"); numberMap.put("09","9"); numberMap.put("零","0"); numberMap.put("一","1"); numberMap.put("二","2"); numberMap.put("三","3"); numberMap.put("四","4"); numberMap.put("五","5"); numberMap.put("六","6"); numberMap.put("七","7"); numberMap.put("八","8"); numberMap.put("九","9"); numberMap.put("十","10"); numberMap.put("一十","10"); numberMap.put("十一","11"); numberMap.put("十二","12"); numberMap.put("十三","13"); numberMap.put("十四","14"); numberMap.put("十五","15"); numberMap.put("十六","16"); numberMap.put("十七","17"); numberMap.put("十八","18"); numberMap.put("十九","19"); numberMap.put("二十","20"); numberMap.put("二一","21"); numberMap.put("二二","22"); numberMap.put("二三","23"); numberMap.put("二四","24"); numberMap.put("二五","25"); numberMap.put("二六","26"); numberMap.put("二七","27"); numberMap.put("二八","28"); numberMap.put("二九","29"); numberMap.put("三十","30"); numberMap.put("三一","31"); numberMap.put("三二","32"); numberMap.put("三三","33"); numberMap.put("三四","34"); numberMap.put("三五","35"); numberMap.put("三六","36"); numberMap.put("三七","37"); numberMap.put("三八","38"); numberMap.put("三九","39"); numberMap.put("四十","40"); numberMap.put("四一","41"); numberMap.put("四二","42"); numberMap.put("四三","43"); numberMap.put("四四","44"); numberMap.put("四五","45"); numberMap.put("四六","46"); numberMap.put("四七","47"); numberMap.put("四八","48"); numberMap.put("四九","49"); numberMap.put("五十","50"); numberMap.put("五一","51"); numberMap.put("五二","52"); numberMap.put("五三","53"); numberMap.put("五四","54"); numberMap.put("五五","55"); numberMap.put("五六","56"); numberMap.put("五七","57"); numberMap.put("五八","58"); numberMap.put("五九","59"); numberMap.put("六十","60"); numberMap.put("六一","61"); numberMap.put("六二","62"); numberMap.put("六三","63"); numberMap.put("六四","64"); numberMap.put("六五","65"); numberMap.put("六六","66"); numberMap.put("六七","67"); numberMap.put("六八","68"); numberMap.put("六九","69"); numberMap.put("七十","70"); numberMap.put("七一","71"); numberMap.put("七二","72"); numberMap.put("七三","73"); numberMap.put("七四","74"); numberMap.put("七五","75"); numberMap.put("七六","76"); numberMap.put("七七","77"); numberMap.put("七八","78"); numberMap.put("七九","79"); numberMap.put("八十","80"); numberMap.put("八一","81"); numberMap.put("八二","82"); numberMap.put("八三","83"); numberMap.put("八四","84"); numberMap.put("八五","85"); numberMap.put("八六","86"); numberMap.put("八七","87"); numberMap.put("八八","88"); numberMap.put("八九","89"); numberMap.put("九十","90"); numberMap.put("九一","91"); numberMap.put("九二","92"); numberMap.put("九三","93"); numberMap.put("九四","94"); numberMap.put("九五","95"); numberMap.put("九六","96"); numberMap.put("九七","97"); numberMap.put("九八","98"); numberMap.put("九九","99"); numberMap.put("二十一","21"); numberMap.put("二十二","22"); numberMap.put("二十三","23"); numberMap.put("二十四","24"); numberMap.put("二十五","25"); numberMap.put("二十六","26"); numberMap.put("二十七","27"); numberMap.put("二十八","28"); numberMap.put("二十九","29"); numberMap.put("三十一","31"); numberMap.put("三十二","32"); numberMap.put("三十三","33"); numberMap.put("三十四","34"); numberMap.put("三十五","35"); numberMap.put("三十六","36"); numberMap.put("三十七","37"); numberMap.put("三十八","38"); numberMap.put("三十九","39"); numberMap.put("四十一","41"); numberMap.put("四十二","42"); numberMap.put("四十三","43"); numberMap.put("四十四","44"); numberMap.put("四十五","45"); numberMap.put("四十六","46"); numberMap.put("四十七","47"); numberMap.put("四十八","48"); numberMap.put("四十九","49"); numberMap.put("五十一","51"); numberMap.put("五十二","52"); numberMap.put("五十三","53"); numberMap.put("五十四","54"); numberMap.put("五十五","55"); numberMap.put("五十六","56"); numberMap.put("五十七","57"); numberMap.put("五十八","58"); numberMap.put("五十九","59"); numberMap.put("六十一","61"); numberMap.put("六十二","62"); numberMap.put("六十三","63"); numberMap.put("六十四","64"); numberMap.put("六十五","65"); numberMap.put("六十六","66"); numberMap.put("六十七","67"); numberMap.put("六十八","68"); numberMap.put("六十九","69"); numberMap.put("七十一","71"); numberMap.put("七十二","72"); numberMap.put("七十三","73"); numberMap.put("七十四","74"); numberMap.put("七十五","75"); numberMap.put("七十六","76"); numberMap.put("七十七","77"); numberMap.put("七十八","78"); numberMap.put("七十九","79"); numberMap.put("八十一","81"); numberMap.put("八十二","82"); numberMap.put("八十三","83"); numberMap.put("八十四","84"); numberMap.put("八十五","85"); numberMap.put("八十六","86"); numberMap.put("八十七","87"); numberMap.put("八十八","88"); numberMap.put("八十九","89"); numberMap.put("九十一","91"); numberMap.put("九十二","92"); numberMap.put("九十三","93"); numberMap.put("九十四","94"); numberMap.put("九十五","95"); numberMap.put("九十六","96"); numberMap.put("九十七","97"); numberMap.put("九十八","98"); numberMap.put("九十九","99"); numberMap.put("一百","100"); numberMap.put("一千","1000"); numberMap.put("一千零一","1001"); numberMap.put("一万","10000"); } public static String[] analyzerPrepare(String s) { if (s == null) return null; char[] array = s.toCharArray(); int len = array.length; StringBuffer sb = null; StringBuffer sb_not_analyze = null; int last = 0; try { for (int i =0;i<len;i++) { if (i > 0 && array[i] == '集') { if (numberSet.contains(array[i-1])) { for (int j = i-1;j>=last;j--) { if (!numberSet.contains(array[j])) { if (array[j] == ' ' || array[j] == '第') { if (sb == null) sb = new StringBuffer(); String n = new String(array,j+1,i-j-1); String k = numberMap.get(n); if (k == null) k = n; sb.append(array,last,j-last).append(" ").append(k).append(" "); } else { if (sb == null) sb = new StringBuffer(); String n = new String(array,j+1,i-j-1); String k = numberMap.get(n); if (k == null) k = n; sb.append(array,last,j-last+1).append(" ").append(k).append(" "); } last = i+1; break; } else continue; } } else continue; } else if (i > 0 && (array[i] == '季' || array[i] == '部')) { if (i == len - 1 || (i < len-1 && array[i+1] != '度' && array[i+1] != '节')) { if (numberSet.contains(array[i-1])) { for (int j = i-1;j>=0;j--) { if (!numberSet.contains(array[j])) { if (array[j] == '第') { if (j>last) { if (sb == null) sb = new StringBuffer(); sb.append(array,last,j-last); } last = i+1; if (sb_not_analyze == null) sb_not_analyze = new StringBuffer(); else sb_not_analyze.append(" "); String n = new String(array,j+1,i-j-1); String k = numberMap.get(n); if (k == null) k = n; sb_not_analyze.append("第").append(k).append(array[i]); } break; } } } else continue; } } else { } } if (last < s.length()) { if (sb == null) sb = new StringBuffer(); sb.append(array,last,len-last); } }catch(Throwable e) { e.printStackTrace(); } return new String[]{sb!=null?sb.toString():sb_not_analyze!=null?null:s ,sb_not_analyze!=null?sb_not_analyze.toString():null}; } public static WholeWord getWholeWord(String s) { WholeWord tokens = new WholeWord(); if (s == null) return tokens; char[] array = s.toCharArray(); int len = array.length; int last = 0; try { for (int i =0;i<len;i++) { if (i > 0 && array[i] == '集') { if (numberSet.contains(array[i-1])) { for (int j = i-1;j>=last;j--) { if (!numberSet.contains(array[j])) { String k ; int start; if (array[j] == ' ' || array[j] == '第') { start = j; String n = new String(array,j+1,i-j-1); k = numberMap.get(n); if (k == null) k = n; if (j>last) tokens.add(s.substring(last,j)); } else { start = j+1; String n = new String(array,j+1,i-j-1); k = numberMap.get(n); if (k == null) k = n; if (j>last) tokens.add(s.substring(last,j+1)); } Token token = new Token(); token.setStartOffset(start); token.setEndOffset(i+1); token.setTermText(k); tokens.add(token); last = i+1; break; } else continue; } } else continue; } else if (i > 0 && (array[i] == '季' || array[i] == '部')) { if (i == len - 1 || (i < len-1 && array[i+1] != '度' && array[i+1] != '节')) { if (numberSet.contains(array[i-1])) { for (int j = i-1;j>=0;j--) { if (!numberSet.contains(array[j])) { if (array[j] == '第') { String n = new String(array,j+1,i-j-1); String k = numberMap.get(n); if (k == null) k = n; if (j>last) tokens.add(s.substring(last,j)); Token token = new Token(); token.setStartOffset(j); token.setEndOffset(i+1); token.setTermText("第"+k+array[i]); tokens.add(token); last = i+1; } break; } } } else continue; } } } }catch(Throwable e) { e.printStackTrace(); } if (!tokens.isEmpty()) { if (last < s.length()) tokens.add(s.substring(last)); } return tokens; } /** * 格式化字符串数字 * @param number * @return 不在map内,原值返回 */ public static String formatNumber(String number) { if (numberMap.containsKey(number)) return numberMap.get(number); return number; } public static String formatTeleplayName(String title) { return title.replaceAll("((中字|中文字幕|英文原声|中英文|中英双语|中英双字幕|双语字幕|国英|双语|国语|日语|韩语|汉语|无字幕|字幕|DVD|中文高清|高清|清晰)+版*)|抢先看|美剧|日剧|韩剧|偶像剧",""); } public static String formatVideoQueryString(String keyword) { if (keyword != null && keyword.endsWith("全集") && keyword.length() >2) { return keyword.substring(0,keyword.length()-2); } return keyword; } public static void main(String[] args) { WholeWord word = getWholeWord("[PPX字幕组][空之境界][Karanokyoukai][剧场版][第06部]"); if(!word.isEmpty()) { List<Word> list = word.getTokens(); for (int i=0;i<list.size();i++){ Word w = list.get(i); if (w.isToken) System.out.println(w.token.termText() + "\tstart="+w.token.startOffset() + "\tend="+w.token.endOffset()); else System.out.println(w.text); } } } }
[ "lyu302@gmail.com" ]
lyu302@gmail.com
c68003b85d9613f111ed2d4cda1047bf0d97fb86
2d616ab5bd61d8412bb6fe52525b55197e1809b6
/de.hannesniederhausen.storynotes.model/src-gen/de/hannesniederhausen/storynotes/model/impl/GenericCategoryImpl.java
17d2b799eb907bb0e14dd1883be55030cfae33f6
[]
no_license
hannesN/storynotes
011c0e6f1e38f23f5762ae82a440795061393148
8a67b8b5567a1f2074432b331d94736fb824782c
refs/heads/master
2021-01-10T20:25:42.357158
2014-11-10T01:09:13
2014-11-10T01:09:13
1,959,676
0
0
null
2014-11-10T01:09:14
2011-06-27T10:46:07
Java
UTF-8
Java
false
false
1,191
java
/** * Copyright (c) 2011 Hannes Niederhausen. * 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: * Hannes Niederhausen - Initial API and implementation * */ package de.hannesniederhausen.storynotes.model.impl; import de.hannesniederhausen.storynotes.model.GenericCategory; import de.hannesniederhausen.storynotes.model.StorynotesPackage; import org.eclipse.emf.ecore.EClass; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Generic Category</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public class GenericCategoryImpl extends CategoryImpl implements GenericCategory { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected GenericCategoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return StorynotesPackage.Literals.GENERIC_CATEGORY; } } //GenericCategoryImpl
[ "h.niederhausen@gmail.com" ]
h.niederhausen@gmail.com
a689a1472fed8ab6b9d6310c40fa3fdc46383e7f
fe8e180380a3b71e040cbfb482d16f37cb349c07
/app/src/main/java/com/bitpops/barcode/Model/Transfer.java
81e028ba38246c96b79948ead2e50020432c9d76
[]
no_license
YadgarovIslombek/InventoryPortal
11eb1242c86164ab1daa83de4238c13db7d02e60
2c30e1996e1c3179b7605d45d94628e2f6dad4c0
refs/heads/master
2022-04-01T11:15:25.922941
2020-02-05T21:21:08
2020-02-05T21:21:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.bitpops.barcode.Model; public class Transfer { public String from = ""; public String to = ""; public String sales_person_id = ""; public String sales_person_name = ""; public Transfer(String _from, String _to, String _sales_person_id, String _sales_person_name) { from = _from; to = _to; sales_person_id = _sales_person_id; sales_person_name = _sales_person_name; } }
[ "doga.ozkaraca@gmail.com" ]
doga.ozkaraca@gmail.com
f3785433046c26b3ec35a6648993941b3005540f
e4ad8db240e4a1d0b8cef27da7a6d62cf6e19667
/app/src/main/java/basti/coryphaei/com/blankboard/ScannerUtils.java
da34ff2c44929111514d5642d8d0b2631bc2d338
[]
no_license
basti-shi031/BlankBoard
9a7fe21cf10a5277b8022ba6c824f093a184b298
0559bce30beb1569580393fe6f171610a64692fb
refs/heads/master
2021-01-10T14:03:01.601185
2015-11-05T08:53:48
2015-11-05T08:53:48
45,599,188
1
0
null
null
null
null
UTF-8
Java
false
false
2,270
java
package basti.coryphaei.com.blankboard; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import android.media.MediaScannerConnection; import android.net.Uri; import android.os.Environment; import android.util.Log; import android.widget.Toast; import java.io.File; import java.io.FileOutputStream; /** * @author: HouSheng * * @类 说 明: 图片扫描工具类 */ public class ScannerUtils { // 扫描的三种方式 public static enum ScannerType { RECEIVER, MEDIA } // 首先保存图片 public static boolean saveImageToGallery(Context context, Bitmap bitmap, ScannerType type) { boolean saveSuccess = false; File appDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath(),"blankboard"); if (!appDir.exists()) { // 目录不存在 则创建 appDir.mkdirs(); } String fileName = System.currentTimeMillis() + ".jpg"; File file = new File(appDir, fileName); try { FileOutputStream fos = new FileOutputStream(file); bitmap.compress(CompressFormat.JPEG, 100, fos); // 保存bitmap至本地 fos.flush(); fos.close(); saveSuccess = true; } catch (Exception e) { e.printStackTrace(); } finally { if (type == ScannerType.RECEIVER) { ScannerByReceiver(context, file.getAbsolutePath()); } else if (type == ScannerType.MEDIA) { ScannerByMedia(context, file.getAbsolutePath()); } if (!bitmap.isRecycled()) { // bitmap.recycle(); 当存储大图片时,为避免出现OOM ,及时回收Bitmap System.gc(); // 通知系统回收 } } return saveSuccess; } /** Receiver扫描更新图库图片 **/ private static void ScannerByReceiver(Context context, String path) { context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + path))); Log.v("TAG", "receiver scanner completed"); } /** MediaScanner 扫描更新图片图片 **/ private static void ScannerByMedia(Context context, String path) { MediaScannerConnection.scanFile(context, new String[] {path}, null, null); Log.v("TAG", "media scanner completed"); } }
[ "1227401081@suda.edu.cn" ]
1227401081@suda.edu.cn
a625069a3a753fc2d5394b0497347b6176aaba2c
c69f2a524369c03bf68cc474c37d06ebdd197612
/app/src/main/java/com/yunkakeji/alibabademo/base/fragment/EventBusFragment.java
2d8e311679aea9150f2692e7d492ddc8aba49102
[]
no_license
2253355063/AlibabaDemo
880f77794100ffad43ee754ae31d08def77c76f6
5f976dd7997f98656989b42f48d465c37204c2fd
refs/heads/master
2020-11-25T17:27:59.147900
2019-12-18T06:23:56
2019-12-18T06:23:56
228,772,589
0
0
null
null
null
null
UTF-8
Java
false
false
996
java
package com.yunkakeji.alibabademo.base.fragment; import com.blankj.utilcode.util.ToastUtils; import com.google.gson.JsonObject; import com.yunkakeji.alibabademo.net.basic.JsonTag; import org.simple.eventbus.EventBus; import org.simple.eventbus.Subscriber; import org.simple.eventbus.ThreadMode; import androidx.fragment.app.Fragment; /** * Fragment抽象类 * Fragment中事件总线的注册和取消 * 事件总线消息接收和显示 */ public abstract class EventBusFragment extends Fragment { @Override public void onResume() { super.onResume(); EventBus.getDefault().register(this); } @Override public void onPause() { super.onPause(); EventBus.getDefault().unregister(this); } @Subscriber(mode = ThreadMode.MAIN) protected void receive(JsonObject jsonObject) { if (jsonObject.has(JsonTag.TAG_ERROR)) { ToastUtils.showShort(jsonObject.get(JsonTag.TAG_ERROR).getAsString()); } } }
[ "zhguojiang@126.com" ]
zhguojiang@126.com
b1bd2aab873a343e0bc4abc4e252cae316be97ca
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/drm/DrmInfo.java
5b087944b28958be33f96b63757fe65067f44ef8
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
2,792
java
/* * Decompiled with CFR 0.145. */ package android.drm; import android.drm.DrmInfoRequest; import android.drm.DrmUtils; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Set; public class DrmInfo { private final HashMap<String, Object> mAttributes = new HashMap(); private byte[] mData; private final int mInfoType; private final String mMimeType; public DrmInfo(int n, String charSequence, String string2) { this.mInfoType = n; this.mMimeType = string2; try { this.mData = DrmUtils.readBytes((String)charSequence); } catch (IOException iOException) { this.mData = null; } if (this.isValid()) { return; } charSequence = new StringBuilder(); ((StringBuilder)charSequence).append("infoType: "); ((StringBuilder)charSequence).append(n); ((StringBuilder)charSequence).append(",mimeType: "); ((StringBuilder)charSequence).append(string2); ((StringBuilder)charSequence).append(",data: "); ((StringBuilder)charSequence).append(Arrays.toString(this.mData)); ((StringBuilder)charSequence).toString(); throw new IllegalArgumentException(); } public DrmInfo(int n, byte[] arrby, String string2) { this.mInfoType = n; this.mMimeType = string2; this.mData = arrby; if (this.isValid()) { return; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("infoType: "); stringBuilder.append(n); stringBuilder.append(",mimeType: "); stringBuilder.append(string2); stringBuilder.append(",data: "); stringBuilder.append(Arrays.toString(arrby)); throw new IllegalArgumentException(stringBuilder.toString()); } public Object get(String string2) { return this.mAttributes.get(string2); } public byte[] getData() { return this.mData; } public int getInfoType() { return this.mInfoType; } public String getMimeType() { return this.mMimeType; } boolean isValid() { byte[] arrby = this.mMimeType; boolean bl = arrby != null && !arrby.equals("") && (arrby = this.mData) != null && arrby.length > 0 && DrmInfoRequest.isValidType(this.mInfoType); return bl; } public Iterator<Object> iterator() { return this.mAttributes.values().iterator(); } public Iterator<String> keyIterator() { return this.mAttributes.keySet().iterator(); } public void put(String string2, Object object) { this.mAttributes.put(string2, object); } }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
8e5ac403f1a74fd92e7629d9b8536c830e06fe35
5feb555778caf493f99810418832c806f2bd7019
/gm4g_pos_server_dev_phk/.svn/pristine/8e/8e5ac403f1a74fd92e7629d9b8536c830e06fe35.svn-base
9f5960fa5b6c9a7ec853bd279b76742f388a93a7
[]
no_license
Juliezmx/pos-training
8fe5ae9efa896515c87149d1305d78fcab8042ce
8842ebc0ee9696e4bc0128b5d60d8c6cb2efa870
refs/heads/master
2020-05-18T05:43:06.929447
2019-04-30T07:39:27
2019-04-30T07:39:27
184,214,589
0
0
null
null
null
null
UTF-8
Java
false
false
3,554
package app; import java.util.ArrayList; import commonui.FormConfirmBox; import core.Controller; import templatebuilder.TemplateBuilder; import virtualui.VirtualUIForm; import virtualui.VirtualUIFrame; /** interface for the listeners/observers callback method */ interface FormConfirmOrderDialogListener { void formConfirmOrderDialog_Timeout(); } public class FormConfirmOrderDialog extends VirtualUIForm implements FrameConfirmOrderDialogListener { TemplateBuilder m_oTemplateBuilder; private FrameConfirmOrderDialog m_oFrameConfirmOrderDialog; private boolean m_bUserCancel; /** list of interested listeners (observers, same thing) */ private ArrayList<FormConfirmOrderDialogListener> listeners; private FuncCheck m_oFuncCheck; /** add a new ModelListener observer for this Model */ public void addListener(FormConfirmOrderDialogListener listener) { listeners.add(listener); } public FormConfirmOrderDialog(Controller oParentController, FuncCheck o_FuncCheck, int iCashierTimer) { super(oParentController); m_oTemplateBuilder = new TemplateBuilder(); m_bUserCancel = false; listeners = new ArrayList<FormConfirmOrderDialogListener>(); // Load form from template file m_oTemplateBuilder.loadTemplate("frmConfirmOrderDialog.xml"); // Background Cover Page VirtualUIFrame oCoverFrame = new VirtualUIFrame(); m_oTemplateBuilder.buildFrame(oCoverFrame, "fraCoverFrame"); this.attachChild(oCoverFrame); m_oFrameConfirmOrderDialog = new FrameConfirmOrderDialog(o_FuncCheck); m_oTemplateBuilder.buildFrame(m_oFrameConfirmOrderDialog, "fraConfirmOrderDialog"); m_oFrameConfirmOrderDialog.addListener(this); this.attachChild(m_oFrameConfirmOrderDialog); if (iCashierTimer > 0){ m_oFrameConfirmOrderDialog.setConfirmOrderDialogTimeout(iCashierTimer); m_oFrameConfirmOrderDialog.setConfirmOrderDialogTimeoutTimer(true); } m_oFuncCheck = o_FuncCheck; } public boolean isUserCancel() { return m_bUserCancel; } @Override public void frameConfirmOrderDialog_clickClose() { this.finishShow(); } @Override public void frameConfirmOrderDialog_clickBack(String sTable, String sTableExtension) { m_bUserCancel = true; this.finishShow(); } @Override public void frameConfirmOrderDialog_timeout() { for (FormConfirmOrderDialogListener listener : listeners) { m_oFrameConfirmOrderDialog.setConfirmOrderDialogTimeoutTimer(false); if (AppGlobal.g_oFuncStation.get().getOrderingTimeoutOption() == FuncStation.ORDERING_TIMEOUT_OPTION_QUIT_CHECK_DIRECTLY && m_oFuncCheck != null) { listener.formConfirmOrderDialog_Timeout(); this.finishShow(); } else { // Show the option FormConfirmBox oFormConfirmBox = new FormConfirmBox(AppGlobal.g_oLang.get()._("continue_process"), AppGlobal.g_oLang.get()._("new_order"), this); oFormConfirmBox.setTitle(AppGlobal.g_oLang.get()._("attention")); oFormConfirmBox.setMessage(AppGlobal.g_oLang.get()._("order_time_out_is_reached")); oFormConfirmBox.setTimeout(30 * 1000); oFormConfirmBox.setTimeoutChecking(true); oFormConfirmBox.show(); oFormConfirmBox.setTimeoutChecking(false); if (oFormConfirmBox.isOKClicked()) { // Continue order and restart the ordering timeout m_oFrameConfirmOrderDialog.setConfirmOrderDialogTimeoutTimer(true); } else { listener.formConfirmOrderDialog_Timeout(); this.finishShow(); } } } } }
[ "admin@DESKTOP-34K1G8K" ]
admin@DESKTOP-34K1G8K
e46111d9558c99ea18de382163e423ad40213442
b305c071aed5398adcd57dd4dfdb12a7209c9f50
/inmobiliaria-web/src/main/java/com/proinsalud/sistemas/web/digital_turn/DigitalTurnSliderBean.java
9b5912ff08f2007cdc5b9de77a1edb6ba0058842
[]
no_license
johnefe/inmobiliariav2
d99be77efc726718d6be7551b368ea444d9db850
5212593e3f98d2040c0fe66fc598743fe8a982bb
refs/heads/master
2020-03-20T22:23:19.401521
2018-06-19T23:00:21
2018-06-19T23:00:21
137,795,903
1
0
null
null
null
null
UTF-8
Java
false
false
4,260
java
package com.proinsalud.sistemas.web.digital_turn; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.apache.commons.logging.Log; import org.primefaces.event.FileUploadEvent; import org.primefaces.model.UploadedFile; import org.springframework.beans.factory.annotation.Autowired; import com.proinsalud.sistemas.core.digital_turn.model.Slider; import com.proinsalud.sistemas.core.digital_turn.service.ISliderService; import com.proinsalud.sistemas.web.util.App; import com.proinsalud.sistemas.web.util.UtilWeb; /** * @author Ingeniero Jhon Frey Diaz * @datetime 22/02/2018 - 3:15:29 p. m. */ @ManagedBean @ViewScoped public class DigitalTurnSliderBean implements Serializable { private static final long serialVersionUID = -924733383539179402L; private static final Log LOG = App.getLogger(DigitalTurnSliderBean.class); @Autowired private ISliderService iSliderService; private UploadedFile uploadFile; private InputStream inputStream; private List<Slider> sliders; private Slider slider; private String destination = "H:\\proinsaludv3\\proinsaludApp\\proinsalud-web\\src\\main\\webapp\\resources\\assets\\img\\"; private boolean showForm; private boolean crearDiapositiva; private boolean updateDiapositiva; public DigitalTurnSliderBean() { super(); } @PostConstruct public void init() { App.initInjectionAutowired(this); slider = new Slider(); sliders = iSliderService.findAllEntity(); } public void loadDiapositivaSlider(Slider diapositiva) { try { updateDiapositiva = true; showForm=true; slider = iSliderService.findEntityById(diapositiva.getId()); } catch (Exception e) { UtilWeb.printError(LOG, e); } } public void createSlider() { try { uploadIcon(); if(slider.getUrlImage() !=null) { slider=iSliderService.persistEntity(slider); } } catch (Exception e) { UtilWeb.printError(LOG, e); } cancel(); } public void updateDiapositiva() { try { uploadIcon(); if (slider != null) { if (slider.getId() != null) { slider = iSliderService.mergeEntity(slider); uploadFile = null; } cancel(); init(); } } catch (Exception e) { UtilWeb.printError(LOG, e); } } public void formSlider() { crearDiapositiva = true; showForm=true; } public void uploadIcon() throws Exception { try { if (uploadFile != null && !uploadFile.getFileName().isEmpty()) { slider.setUrlImage(uploadFile.getFileName()); copyFile(uploadFile.getFileName(), uploadFile.getInputstream()); } } catch (IOException e) { UtilWeb.printError(LOG, e); throw new Exception(e); } } public void uploadFile(FileUploadEvent event) { uploadFile = event.getFile(); try { inputStream = uploadFile.getInputstream(); } catch (IOException e) { e.printStackTrace(); } } public void copyFile(String fileName, InputStream in) { try { OutputStream out = new FileOutputStream(new File(destination + fileName)); int read = 0; byte[] bytes = new byte[1024]; while ((read = in.read(bytes)) != -1) { out.write(bytes, 0, read); } in.close(); out.flush(); out.close(); } catch (IOException e) { UtilWeb.printError(LOG, e); } } public void cancel() { init(); showForm = false; updateDiapositiva=false; crearDiapositiva=false; } public List<Slider> getSliders() { return sliders; } public Slider getSlider() { return slider; } public void setSlider(Slider slider) { this.slider = slider; } public boolean isShowForm() { return showForm; } public UploadedFile getUploadFile() { return uploadFile; } public void setUploadFile(UploadedFile uploadFile) { this.uploadFile = uploadFile; } public InputStream getInputStream() { return inputStream; } public void setInputStream(InputStream inputStream) { this.inputStream = inputStream; } public boolean isCrearDiapositiva() { return crearDiapositiva; } public boolean isUpdateDiapositiva() { return updateDiapositiva; } }
[ "pc_systemjf@hotmail.com" ]
pc_systemjf@hotmail.com
a7b88eaddd576a4a6e523a7ebe0dfcbfc3c32e88
53e2c2773b7dda422f2956ee0168d5ff98e01f51
/mjfast-admin/src/main/java/com/mjcio/mjfast/admin/common/config/SwaggerConfig.java
546f7b8d4eb0c16a2689073ba84b84c8917793a9
[]
no_license
mjcio/mjfast
a6579a05cff858581c59ec7beaa371f05235c376
956fc2352e2aa89eb1389af4a2d117102ca3ba75
refs/heads/master
2020-03-19T20:25:51.258986
2018-06-12T00:43:37
2018-06-12T00:43:37
136,901,385
1
0
null
null
null
null
UTF-8
Java
false
false
2,021
java
/** * Copyright 2018 人人开源 http://www.renren.io * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.mjcio.mjfast.admin.common.config; import io.swagger.annotations.ApiOperation; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * Swagger配置 * * @author Mark sunlightcs@gmail.com * @since 3.0.0 2018-01-16 */ @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() // 加了ApiOperation注解的类,生成接口文档 .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) // 包下的类,生成接口文档 .apis(RequestHandlerSelectors.basePackage("io.renren.modules.job.controller")) .paths(PathSelectors.any()).build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder().title("企业快速开发框架在线API").description("在线API文档") .termsOfServiceUrl("http://www.renren.io").version("3.2.0").build(); } }
[ "chenxiandzipper@163.com" ]
chenxiandzipper@163.com
7c325afb290a6e48db467a84f42a3791e5648fed
87b99b5ee2dd5b7c3200b9e544aeb03226f179be
/src/join/ProducerConsumerTest.java
d7752b3dc4bd9dc4e6ff86a5ec068bd5e9867218
[]
no_license
cendi2005/thread
ba23f14db98b1a99529425ae1fa0009f0297cd6c
8630ece2d234eef7c7c61cc827821301f106d71c
refs/heads/master
2021-01-20T08:30:49.071561
2018-02-13T13:53:19
2018-02-13T13:53:19
90,157,387
1
0
null
null
null
null
UTF-8
Java
false
false
508
java
package join; public class ProducerConsumerTest { public static void main(String[] args) { PublicResource resource = new PublicResource(); new Thread(new ProducerThread(resource)).start(); new Thread(new ConsumerThread(resource)).start(); new Thread(new ProducerThread(resource)).start(); new Thread(new ConsumerThread(resource)).start(); new Thread(new ProducerThread(resource)).start(); new Thread(new ConsumerThread(resource)).start(); } }
[ "920941399@qq.com" ]
920941399@qq.com
15e7d8ea27ca6c19f2862d4d9aec244f6119077f
591d83511d8c43f7d0bd6a66318e298885104591
/app/src/main/java/com/franvara/sports/app/main/MainActivity.java
c63792b490650ac8a2cad511820ac4f0b06337c5
[]
no_license
franvara/Sports
446f3323e93a424b51afe5cf4d565030b9c5cdfc
b8872015c26f28516b0b54d6c11f5bdeda4388bb
refs/heads/master
2020-04-09T10:13:28.628670
2018-12-03T22:47:42
2018-12-03T22:47:42
160,262,847
0
0
null
null
null
null
UTF-8
Java
false
false
3,047
java
package com.franvara.sports.app.main; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.FrameLayout; import android.widget.Toast; import com.franvara.sports.Injector; import com.franvara.sports.R; import com.franvara.sports.app.utils.GenericUtils; import com.franvara.sports.domain.model.Player; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; public class MainActivity extends AppCompatActivity implements IMainView { //region Fields & Constants @BindView(R.id.toolbar) Toolbar toolbar; @BindView(R.id.rv_main) RecyclerView recyclerView; @BindView(R.id.srl_main) SwipeRefreshLayout swipeRefreshLayout; @BindView(R.id.fl_progress_container) FrameLayout fl_progress_container; Unbinder unbinder; private MainPresenter mPresenter; private MainRVAdapter rvAdapter; //endregion //region Lifecycle @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); unbinder = ButterKnife.bind(this); setSupportActionBar(toolbar); mPresenter = new MainPresenter(this, Injector.provideUseCaseHandler(), Injector.provideGetPlayersUseCase(this)); mPresenter.loadPlayers(); } @Override public void onResume() { super.onResume(); } @Override protected void onDestroy() { super.onDestroy(); unbinder.unbind(); } //endregion //region IMainView implementation @Override public void presentRecyclerView() { recyclerView.setHasFixedSize(true); final LinearLayoutManager llm = new LinearLayoutManager(this); recyclerView.setLayoutManager(llm); rvAdapter = new MainRVAdapter(); recyclerView.setAdapter(rvAdapter); } @Override public void setupSwipeRefresh() { swipeRefreshLayout.setOnRefreshListener(() -> { mPresenter.loadPlayers(); swipeRefreshLayout.setRefreshing(false); }); } @Override public void addPlayersToList(List<Player> playerList) { swipeRefreshLayout.setRefreshing(false); rvAdapter.addPlayers(playerList); if (!GenericUtils.isNetworkConnectionAvailable(this)) showToast(getString(R.string.no_internet_connection)); } @Override public void showToast(String error) { Toast.makeText(this, error, Toast.LENGTH_SHORT).show(); } @Override public void showProgress() { fl_progress_container.setVisibility(View.VISIBLE); } @Override public void hideProgress() { fl_progress_container.setVisibility(View.GONE); } //endregion }
[ "francisco.vara@mad.vass.es" ]
francisco.vara@mad.vass.es
39e92f362dd27394da462cd77fc34cfbc4f785a5
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/FileUserRepository.java
4eb0f85cd4d06223f88eaca2b5736147d2482817
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,640
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 org.neo4j.server.security.auth; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.kernel.impl.security.User; import org.neo4j.logging.Log; import org.neo4j.logging.LogProvider; import org.neo4j.server.security.auth.exception.FormatException; import static org.neo4j.server.security.auth.ListSnapshot.FROM_MEMORY; import static org.neo4j.server.security.auth.ListSnapshot.FROM_PERSISTED; /** * Stores user auth data. In memory, but backed by persistent storage so changes to this repository will survive * JVM restarts and crashes. */ public class FileUserRepository extends AbstractUserRepository { private final File authFile; private final FileSystemAbstraction fileSystem; // TODO: We could improve concurrency by using a ReadWriteLock private final Log log; private final UserSerialization serialization = new UserSerialization(); public FileUserRepository( FileSystemAbstraction fileSystem, File file, LogProvider logProvider ) { this.fileSystem = fileSystem; this.authFile = file; this.log = logProvider.getLog( getClass() ); } @Override public void start() throws Throwable { clear(); ListSnapshot<User> onDiskUsers = readPersistedUsers(); if ( onDiskUsers != null ) { setUsers( onDiskUsers ); } } @Override protected ListSnapshot<User> readPersistedUsers() throws IOException { if ( fileSystem.fileExists( authFile ) ) { long readTime; List<User> readUsers; try { readTime = fileSystem.lastModifiedTime( authFile ); readUsers = serialization.loadRecordsFromFile( fileSystem, authFile ); } catch ( FormatException e ) { log.error( "Failed to read authentication file \"%s\" (%s)", authFile.getAbsolutePath(), e.getMessage() ); throw new IllegalStateException( "Failed to read authentication file: " + authFile ); } return new ListSnapshot<>( readTime, readUsers, FROM_PERSISTED ); } return null; } @Override protected void persistUsers() throws IOException { serialization.saveRecordsToFile( fileSystem, authFile, users ); } @Override public ListSnapshot<User> getPersistedSnapshot() throws IOException { if ( lastLoaded.get() < fileSystem.lastModifiedTime( authFile ) ) { return readPersistedUsers(); } synchronized ( this ) { return new ListSnapshot<>( lastLoaded.get(), new ArrayList<>( users ), FROM_MEMORY ); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
56986f5283e4543e13561fcc5927105f42106998
d2b4b6ac33c126418383957bce0931829c6a82cd
/SumRootToLeafNumbers.java
918445f2eb77f3595f13eaa24d29e23590fe46c5
[]
no_license
raninagare/Trees-2
dca86a7ae7d15e333bd3f4d80ddbc17e19085712
26b014dafab5423f7223aeeb6a59319fa6b8b111
refs/heads/master
2022-07-22T03:31:52.557246
2020-05-14T02:30:57
2020-05-14T02:30:57
263,780,325
0
0
null
2020-05-14T01:03:13
2020-05-14T01:03:13
null
UTF-8
Java
false
false
2,772
java
package com.ds.rani.tree; import java.util.Stack; /** * Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. * * An example is the root-to-leaf path 1->2->3 which represents the number 123. * * Find the total sum of all root-to-leaf numbers. * * Note: A leaf is a node with no children. * * Example: * * Input: [1,2,3] * 1 * / \ * 2 3 * Output: 25 * Explanation: * The root-to-leaf path 1->2 represents the number 12. * The root-to-leaf path 1->3 represents the number 13. * Therefore, sum = 12 + 13 = 25. * Example 2: * * Input: [4,9,0,5,1] * 4 * / \ * 9 0 * / \ * 5 1 * Output: 1026 * Explanation: * The root-to-leaf path 4->9->5 represents the number 495. * The root-to-leaf path 4->9->1 represents the number 491. * The root-to-leaf path 4->0 represents the number 40. * Therefore, sum = 495 + 491 + 40 = 1026. */ //Approach:Using inorder traversal approach,while traversing I am maining stack of visited nodes // and sum from root to that node //Time Complexity:o(n) where n is number of nodes //Space Complexity: o(h) where h is height of the tree public class SumRootToLeafNumbers { /** * find sum * @param root root node of tree * @return sum */ public int sumNumbers(TreeNode root) { return helper( root ); } /** * * @param root * @return */ int helper(TreeNode root) { int result = 0; int sum = 0; //For null tree if (root == null) return result; //Maintain Pair of Node,sum(sum form root to that node) Stack<Pair> stack = new Stack<>(); TreeNode curr = root; //Inorder traversal while (!stack.isEmpty() || curr != null) { //go on left if (curr != null) { sum = sum * 10 + curr.val; stack.push( new Pair( curr, sum ) ); curr = curr.left; } else { //curr is null here so pop value from Pair pair = stack.pop(); curr = pair.getNode(); sum = pair.getSum(); if (curr.left == null && curr.right == null) result = result + sum; curr = curr.right; } } return result; } } /** * TreeNode class */ class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } class Pair { TreeNode node; int sum; Pair(TreeNode node, int sum) { this.node = node; this.sum = sum; } public TreeNode getNode() { return node; } public int getSum() { return sum; } }
[ "raninagare29@gmail.com" ]
raninagare29@gmail.com
38cd6556ac1a1b4c6f5912384154869739145a1d
e6aff698b6902023960d27ca7e82fa315768d613
/src/main/java/com/martwykotek/library/LibraryApp.java
964d47353e637bd8d59b97599a5adbeb94f43ab2
[]
no_license
dawidklos/library
4d60375246f61ffbd10345c5d11ebfcb87b20d82
13169f1b38342fd513207cffd6c668d5165e6a0a
refs/heads/master
2020-04-04T12:07:56.880671
2018-11-02T20:29:14
2018-11-02T20:29:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,983
java
package com.martwykotek.library; import com.martwykotek.library.config.ApplicationProperties; import com.martwykotek.library.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.env.Environment; import javax.annotation.PostConstruct; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) public class LibraryApp { private static final Logger log = LoggerFactory.getLogger(LibraryApp.class); private final Environment env; public LibraryApp(Environment env) { this.env = env; } /** * Initializes library. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments */ public static void main(String[] args) { SpringApplication app = new SpringApplication(LibraryApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } String serverPort = env.getProperty("server.port"); String contextPath = env.getProperty("server.servlet.context-path"); if (StringUtils.isBlank(contextPath)) { contextPath = "/"; } String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles()); } }
[ "themartwykotek@protonmail.com" ]
themartwykotek@protonmail.com
b6a7bcad9a7b5a31f9af18b27c822ff5efc8fe72
daade325bc943b1f212801eb056ec60781f94706
/code/MyApplication/app/src/main/java/com/example/myapplication/Activity/OfflineReservationActivity.java
eac5546d6162c99ad86e0bb3afd6200f51df2663
[]
no_license
Vin616161/Telehealth
8b27c04fe722796cdb93421e07b0b17f573c8329
a756411f6e86b5ced82d02efda1cf4a69541f600
refs/heads/master
2020-07-10T14:41:10.939676
2019-08-25T11:50:45
2019-08-25T11:50:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,700
java
package com.example.myapplication.Activity; import android.app.DatePickerDialog; import android.content.Intent; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.DatePicker; import android.widget.LinearLayout; import android.widget.Spinner; import android.widget.TextView; import com.example.myapplication.R; import com.example.myapplication.Utils.Constant; import com.example.myapplication.Utils.NetRequestService; import com.example.myapplication.View.TitleLayout; import java.util.Calendar; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; public class OfflineReservationActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener ,View.OnClickListener{ private TitleLayout titleLayout; private Spinner distance; private Spinner language; private Spinner sex; private static String dis; private static String lan; private static String ssex; private Button search; private LinearLayout time; private int mYear; private int mMonth; private int mDay; private TextView textView; private int diseaseId; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_offline_reservation); ActionBar actionBar=getSupportActionBar(); if(actionBar != null){ actionBar.hide(); } textView=findViewById(R.id.time_text); titleLayout = findViewById(R.id.title); titleLayout.setTitle("线下预约"); titleLayout.setNextGone(); titleLayout.setOnBackClickListener(new TitleLayout.OnBackClickListener() { @Override public void onMenuBackClick() { finish(); } }); search=(Button)findViewById(R.id.search_button); search.setOnClickListener(this); time=findViewById(R.id.time); time.setOnClickListener(this); distance=(Spinner)findViewById(R.id.distance); language=(Spinner)findViewById(R.id.language); sex=(Spinner)findViewById(R.id.sex); ArrayAdapter<CharSequence> adapter1 = ArrayAdapter.createFromResource( OfflineReservationActivity.this, R.array.distance_array, android.R.layout.simple_spinner_item); adapter1.setDropDownViewResource(R.layout.spinner_item); distance.setAdapter(adapter1); ArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource( OfflineReservationActivity.this, R.array.language_array, android.R.layout.simple_spinner_item); adapter2.setDropDownViewResource(R.layout.spinner_item); language.setAdapter(adapter2); ArrayAdapter<CharSequence> adapter3 = ArrayAdapter.createFromResource( OfflineReservationActivity.this, R.array.sex_array, android.R.layout.simple_spinner_item); adapter2.setDropDownViewResource(R.layout.spinner_item); sex.setAdapter(adapter3); distance.setOnItemSelectedListener(this); language.setOnItemSelectedListener(this); sex.setOnItemSelectedListener(this); Intent intent=getIntent(); diseaseId=intent.getIntExtra("diseaseId",0); } @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { switch (adapterView.getId()){ case R.id.distance: dis =adapterView.getItemAtPosition(i).toString(); break; case R.id.language: lan=adapterView.getItemAtPosition(i).toString(); break; case R.id.sex: ssex=adapterView.getItemAtPosition(i).toString(); break; default: break; } } @Override public void onNothingSelected(AdapterView<?> parent) { } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { finish(); } return true; } @Override public void onClick(View v) { switch (v.getId()){ case R.id.search_button: Intent intent=new Intent(OfflineReservationActivity.this,OfflineDoctorActivity.class); intent.putExtra("time",textView.getText().toString()); intent.putExtra("diseaseId",diseaseId); startActivity(intent); break; case R.id.time: Calendar calendar=Calendar.getInstance(); mYear=calendar.get(Calendar.YEAR); mMonth=calendar.get(Calendar.MONTH); mDay=calendar.get(Calendar.DAY_OF_MONTH); DatePickerDialog dialog=new DatePickerDialog(OfflineReservationActivity.this, new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { mYear=year; mMonth=month; mDay=dayOfMonth; textView.setText(String.valueOf(mYear)+"-"+String.valueOf(mMonth+1)+"-"+String.valueOf(mDay)); } },mYear,mMonth,mDay); dialog.show(); break; } } }
[ "94323744@qq.com" ]
94323744@qq.com
b424e958de3f25d1527563a8915883ced12c4df2
0329da1b165fbc224ce1b8571396048d843b1b7a
/代码/androidintentfilter/gen/com/example/androidintentfilter/R.java
0abc942e953059d9ada8099fd22976917d26bf91
[]
no_license
wangwangla/AndroidSensor
9710ed2e8afd7fcdcd6f33e8cd53745bc72a5a12
f2d90c5d32278513f363e7045fdf9e3a2e7c0df5
refs/heads/master
2021-12-15T01:21:29.559622
2021-12-04T01:55:22
2021-12-04T01:55:22
184,209,229
15
1
null
null
null
null
UTF-8
Java
false
false
2,835
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.androidintentfilter; public final class R { public static final class attr { } public static final class dimen { /** Default screen margins, per the Android Design guidelines. Example customization of dimensions originally defined in res/values/dimens.xml (such as screen margins) for screens with more than 820dp of available width. This would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). */ public static final int activity_horizontal_margin=0x7f040000; public static final int activity_vertical_margin=0x7f040001; } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int action_settings=0x7f080001; public static final int btn=0x7f080000; } public static final class layout { public static final int activity_main=0x7f030000; public static final int activity_show=0x7f030001; } public static final class menu { public static final int main=0x7f070000; public static final int show=0x7f070001; } public static final class string { public static final int action_settings=0x7f050002; public static final int app_name=0x7f050000; public static final int hello_world=0x7f050001; public static final int title_activity_show=0x7f050003; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f060000; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f060001; } }
[ "2818815189@qq.com" ]
2818815189@qq.com
e5d7f3475913b093817a1bc0d963fca6ee8c952f
9ea19ff224b97d8d1f3af09193a8b41d6bbb1c57
/app/src/main/java/elliajah/ro/readtogo/elliajah/ro/readtogo/sqlite/BookModel.java
5f19d77240372bf3317da3d126e2d87abc9accfb
[]
no_license
sneaker102/ReadToGo
d68973060eed897bc3d56c08b59acc7ca619ccf7
b374ccb2d88eec2cf46da2c4371fc4ab42b3a531
refs/heads/master
2020-05-19T03:57:52.899472
2019-05-03T20:01:02
2019-05-03T20:01:02
184,813,577
0
0
null
null
null
null
UTF-8
Java
false
false
3,851
java
package elliajah.ro.readtogo.elliajah.ro.readtogo.sqlite; public class BookModel { public static final String TABLE_NAME = "books"; public static final String COLUMN_ID = "id"; public static final String COLUMN_NAME = "name"; public static final String COLUMN_AUTHOR = "author"; public static final String COLUMN_GENRE = "genre"; public static final String COLUMN_GRADE = "grade"; public static final String COLUMN_PERSONAL_NOTES = "personal_notes"; public static final String COLUMN_EDITURA="editura"; public static final String COLUMN_IS_FINISHED="is_finished"; public static final String COLUMN_TIMESTAMP = "timestamp"; public static final String SELECT_ALL_QUERY = "SELECT * FROM "+TABLE_NAME; private int id,mIsFinished; private String mName,mAuthor,mGenre,mGrade,mPersonalNotes,mEditura,mTimesStamp; public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + "(" + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + COLUMN_NAME + " TEXT NOT NULL," +COLUMN_AUTHOR + " TEXT NOT NULL," +COLUMN_GENRE + " TEXT," +COLUMN_GRADE + " INTEGER," +COLUMN_PERSONAL_NOTES + " TEXT," +COLUMN_EDITURA + " TEXT," +COLUMN_IS_FINISHED + " INTEGER," + COLUMN_TIMESTAMP + " DATETIME DEFAULT CURRENT_TIMESTAMP" + ")"; public BookModel(int id, String mName, String mAuthor, String mGenre, String mGrade, String mPersonalNotes,int mIsFinished,String mEditura ,String mTimesStamp){ this.id=id; this.mName=mName; this.mAuthor=mAuthor; this.mGenre=mGenre; this.mGrade=mGrade; this.mPersonalNotes=mPersonalNotes; this.mEditura=mEditura; this.mIsFinished=mIsFinished; this.mTimesStamp=mTimesStamp; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getmName() { return mName; } public void setmName(String mName) { this.mName = mName; } public String getmAuthor() { return mAuthor; } public String getmEditura() { return mEditura; } public void setmEditura(String mEditura) { this.mEditura = mEditura; } public void setmAuthor(String mAuthor) { this.mAuthor = mAuthor; } public String getmGenre() { return mGenre; } public void setmGenre(String mGenre) { this.mGenre = mGenre; } public String getmGrade() { return mGrade; } public int getmIsFinished() { return mIsFinished; } public void setmIsFinished(int mIsFinished) { this.mIsFinished = mIsFinished; } public void setmGrade(String mGrade) { this.mGrade = mGrade; } public String getmPersonalNotes() { return mPersonalNotes; } public void setmPersonalNotes(String mPersonalNotes) { this.mPersonalNotes = mPersonalNotes; } public String getmTimesStamp() { return mTimesStamp; } public void setmTimesStamp(String mTimesStamp) { this.mTimesStamp = mTimesStamp; } @Override public String toString() { return "BookModel{" + "id=" + id + ", mIsFinished=" + mIsFinished + ", mName='" + mName + '\'' + ", mAuthor='" + mAuthor + '\'' + ", mGenre='" + mGenre + '\'' + ", mGrade='" + mGrade + '\'' + ", mPersonalNotes='" + mPersonalNotes + '\'' + ", mEditura='" + mEditura + '\'' + ", mTimesStamp='" + mTimesStamp + '\'' + '}'; } }
[ "sneaker102@yahoo.com" ]
sneaker102@yahoo.com
b4107b99f2bab7b350a66a5a535eea0b9ce04e70
f3e3166668717891b15fd822a7bd180d724377e7
/KnifesEdge/src/main/java/com/knifesedge/controllers/AuthController.java
ac12f1060b8d836b581117e0ed932f61ffbcc07b
[]
no_license
CWRiddle/KnifesEdge
d0d6b148fb404b60297ca8b352ec9e6575443dd1
44514089337153d163a0c7377dcf549537a62e80
refs/heads/main
2023-08-16T02:37:26.189115
2021-10-16T17:04:28
2021-10-16T17:04:28
417,892,300
0
0
null
null
null
null
UTF-8
Java
false
false
1,064
java
package com.knifesedge.controllers; import java.security.Principal; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import com.knifesedge.entities.User; import com.knifesedge.services.AuthService; import com.knifesedge.services.UserService; @RestController public class AuthController { @Autowired private AuthService authService; @Autowired private UserService uService; @PostMapping("register") public User register(@RequestBody User user, HttpServletResponse res) { if (user == null) { res.setStatus(400); } user = authService.register(user); return user; } @GetMapping("authenticate") public User authenticate(Principal principal) { return uService.findByUsername(principal.getName()); } }
[ "cwriddle5@gmail.com" ]
cwriddle5@gmail.com
282fdc95b4c0c3352407f1ba04fb6eb39d468bd9
e17a89b19fc227e5bac5444389d51b08e265f643
/tennis-bar-invite/src/main/java/com/shenghesun/invite/comment/controller/CommentController.java
7c36c8d5e13f93d3e6e86a85a9a3f191ff6d083e
[]
no_license
KevinDingFeng/tennis-bar
6e39142fb52cb2e75d4dd6a6addd3b1db5f666a7
6dd619a3dc21748702bbe3d88b13433dfc3bbc69
refs/heads/master
2020-03-28T14:01:36.006918
2018-10-08T20:05:34
2018-10-08T20:05:34
148,452,125
0
0
null
null
null
null
UTF-8
Java
false
false
6,074
java
package com.shenghesun.invite.comment.controller; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.alibaba.fastjson.JSONObject; import com.shenghesun.invite.cache.RedisResultCache; import com.shenghesun.invite.comment.entity.Comment; import com.shenghesun.invite.comment.entity.CommentLabel.LabelType; import com.shenghesun.invite.comment.service.CommentLabelService; import com.shenghesun.invite.comment.service.CommentService; import com.shenghesun.invite.config.wx.WxConfig; import com.shenghesun.invite.game.entity.ApplyJoinGame; import com.shenghesun.invite.game.entity.ApplyJoinGame.ApplyJoinGameStatus; import com.shenghesun.invite.game.entity.Game; import com.shenghesun.invite.game.service.ApplyJoinGameService; import com.shenghesun.invite.game.service.GameService; import com.shenghesun.invite.utils.JsonUtils; import com.shenghesun.invite.wx.entity.WxUserInfo; import com.shenghesun.invite.wx.service.WxUserInfoService; @RestController @RequestMapping(value = "/api/comment") public class CommentController { @Autowired private CommentService commentService; @Autowired private RedisResultCache redisResultCache; @Autowired private ApplyJoinGameService applyJoinGameService; @Autowired private GameService gameService; @Autowired private WxUserInfoService wxUserInfoService; @Autowired private CommentLabelService commentLabelService; /** * 设置允许自动绑定的属性名称 * * @param binder * @param req */ @InitBinder("entity") private void initBinder(ServletRequestDataBinder binder, HttpServletRequest req) { List<String> fields = new ArrayList<String>(Arrays.asList("gameStar", "courtStar", "presentStar","presentUser","gameLabels","courtLabels","gameId", "wxUserInfoId")); switch (req.getMethod().toLowerCase()) { case "post": // 新增 binder.setAllowedFields(fields.toArray(new String[fields.size()])); break; default: break; } } /** * 预处理,一般用于新增和修改表单提交后的预处理 * * @param id * @param req * @return */ @ModelAttribute("entity") public Comment prepare( @RequestParam(value = "id", required = false) Long id, HttpServletRequest req) { String method = req.getMethod().toLowerCase(); if (id != null && id > 0 && "post".equals(method)) {// 修改表单提交后数据绑定之前执行 return commentService.findById(id); } else if ("post".equals(method)) {// 新增表单提交后数据绑定之前执行 return new Comment(); } else { return null; } } /** * * @param id * @param comment * @param result * @param wxUserIds 提交到场的,实体中默认所有人都没到场 * @return */ @RequestMapping(value = "/update", method = RequestMethod.POST) public JSONObject update(@RequestParam(value = "id", required = false) Long id, @Validated @ModelAttribute("entity") Comment comment, BindingResult result, @RequestParam(value = "wxUserIds", required = false) Long[] wxUserIds) { if(result.hasErrors()) { return JsonUtils.getFailJSONObject("输入内容有误"); } if(id != null) { comment.setId(id); } Game game = gameService.findById(comment.getGameId()); comment.setGame(game); WxUserInfo wxUser = wxUserInfoService.findById(comment.getWxUserInfoId()); comment.setWxUserInfo(wxUser); comment = commentService.save(comment);// if(wxUserIds != null && wxUserIds.length > 0) { Long gameId = comment.getGameId(); //更新参与者数据 applyJoinGameService.updatePresentedByGameIdAndInWxUserIds(true, gameId, wxUserIds); } return JsonUtils.getSuccessJSONObject(); } @RequestMapping(value = "/detail", method = RequestMethod.GET) public JSONObject detail(HttpServletRequest request, @RequestParam(value = "gameId") Long gameId) { // 获取当前用户信息 String result = redisResultCache.getResultByToken(request.getHeader(WxConfig.CUSTOM_TOKEN_NAME)); Long authWxUserInfoId = Long.parseLong(result);// TODO //获取评论信息 Comment comment = commentService.findByGameIdAndWxUserInfoId(gameId, authWxUserInfoId); JSONObject json = new JSONObject(); if(comment == null) { comment = new Comment(); comment.setGameId(gameId); comment.setWxUserInfoId(authWxUserInfoId); } json.put("comment", comment); Game game = gameService.findById(gameId); if(game.getOrganizerId().longValue() == authWxUserInfoId.longValue()) { //作为发起者,才可以获取参与用户信息 List<ApplyJoinGame> joinWxUser = applyJoinGameService.findByGameIdAndApplyJoinGameStatus(gameId, ApplyJoinGameStatus.Agree); json.put("joinWxUser", joinWxUser); } return JsonUtils.getSuccessJSONObject(json); } /** * 获取所有评论标签 * @param request * @return */ @SuppressWarnings("rawtypes") @RequestMapping(value="/labels",method = RequestMethod.GET) public JSONObject getTypeLabel(HttpServletRequest request){ JSONObject json = new JSONObject(); List gameLabels = commentLabelService.findByLabelType(LabelType.GameLabel); List courtLabels = commentLabelService.findByLabelType(LabelType.CourtLabel); json.put("gameLabel", gameLabels); json.put("courtLabel", courtLabels); return JsonUtils.getSuccessJSONObject(json); } }
[ "chengrq@shenghesun.com" ]
chengrq@shenghesun.com