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
97333c14d3dcc6b1be0f9c71d6cc2f29f53ab603
c54062a41a990c192c3eadbb9807e9132530de23
/solutions/attributes/src/main/java/attributes/book/BookMain.java
f4711ebefe1a21ff03f1327e3cd8680abfc60efa
[]
no_license
Training360/strukturavalto-java-public
0d76a9dedd7f0a0a435961229a64023931ec43c7
82d9b3c54437dd7c74284f06f9a6647ec62796e3
refs/heads/master
2022-07-27T15:07:57.915484
2021-12-01T08:57:06
2021-12-01T08:57:06
306,286,820
13
115
null
null
null
null
UTF-8
Java
false
false
274
java
package attributes.book; public class BookMain { public static void main(String[] args) { Book book = new Book("Egri csillagok"); System.out.println(book.getTitle()); book.setTitle("1984"); System.out.println(book.getTitle()); } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
59b10665f158fac588876aabf9e11020c926febe
acf08ff60743111b2e572586b28a1b945952057c
/java-eclipse/FabricaDeCarros/FabricaDeCarros/src/progprinciapl/Principal.java
1d955eb7f4613aa2110eb3b94e8e40ba16794687
[]
no_license
nada-pont-com/Arquivos
f24b34536c266b4fff8d8ae5d39cfe3903f06443
587b739d2d55d470993c9cf67c3a010dd61097e2
refs/heads/master
2020-03-30T02:29:34.844853
2019-08-09T04:11:08
2019-08-09T04:11:08
150,633,370
0
0
null
null
null
null
UTF-8
Java
false
false
166
java
package progprinciapl; import interfacegrafica.Acao; public class Principal { public static void main(String[] args) { Acao acao = new Acao(); acao.menu(); } }
[ "nada.pont.com@gmail.com" ]
nada.pont.com@gmail.com
25f320ccd85a9d7dc4fd941253d689d3fa84501d
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/hardware/radio/V1_1/IRadioResponse.java
eec8946eb94bf6efcf407ee6dc56a46a2f63c2a9
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
217,297
java
package android.hardware.radio.V1_1; import android.hardware.radio.V1_0.ActivityStatsInfo; import android.hardware.radio.V1_0.Call; import android.hardware.radio.V1_0.CallForwardInfo; import android.hardware.radio.V1_0.CardStatus; import android.hardware.radio.V1_0.CarrierRestrictions; import android.hardware.radio.V1_0.CdmaBroadcastSmsConfigInfo; import android.hardware.radio.V1_0.CellInfo; import android.hardware.radio.V1_0.DataRegStateResult; import android.hardware.radio.V1_0.GsmBroadcastSmsConfigInfo; import android.hardware.radio.V1_0.HardwareConfig; import android.hardware.radio.V1_0.IccIoResult; import android.hardware.radio.V1_0.LastCallFailCauseInfo; import android.hardware.radio.V1_0.LceDataInfo; import android.hardware.radio.V1_0.LceStatusInfo; import android.hardware.radio.V1_0.NeighboringCell; import android.hardware.radio.V1_0.OperatorInfo; import android.hardware.radio.V1_0.RadioCapability; import android.hardware.radio.V1_0.RadioResponseInfo; import android.hardware.radio.V1_0.SendSmsResult; import android.hardware.radio.V1_0.SetupDataCallResult; import android.hardware.radio.V1_0.SignalStrength; import android.hardware.radio.V1_0.VoiceRegStateResult; import android.internal.hidl.base.V1_0.DebugInfo; import android.internal.hidl.base.V1_0.IBase; import android.os.HidlSupport; import android.os.HwBinder; import android.os.HwBlob; import android.os.HwParcel; import android.os.IHwBinder; import android.os.IHwInterface; import android.os.NativeHandle; import android.os.RemoteException; import com.android.internal.midi.MidiConstants; import com.android.internal.telephony.PhoneConstants; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.Objects; public interface IRadioResponse extends android.hardware.radio.V1_0.IRadioResponse { public static final String kInterfaceName = "android.hardware.radio@1.1::IRadioResponse"; @Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.internal.hidl.base.V1_0.IBase IHwBinder asBinder(); @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase void debug(NativeHandle nativeHandle, ArrayList<String> arrayList) throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase DebugInfo getDebugInfo() throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase ArrayList<byte[]> getHashChain() throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase ArrayList<String> interfaceChain() throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase String interfaceDescriptor() throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase boolean linkToDeath(IHwBinder.DeathRecipient deathRecipient, long j) throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase void notifySyspropsChanged() throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase void ping() throws RemoteException; void setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo radioResponseInfo) throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase void setHALInstrumentation() throws RemoteException; void setSimCardPowerResponse_1_1(RadioResponseInfo radioResponseInfo) throws RemoteException; void startKeepaliveResponse(RadioResponseInfo radioResponseInfo, KeepaliveStatus keepaliveStatus) throws RemoteException; void startNetworkScanResponse(RadioResponseInfo radioResponseInfo) throws RemoteException; void stopKeepaliveResponse(RadioResponseInfo radioResponseInfo) throws RemoteException; void stopNetworkScanResponse(RadioResponseInfo radioResponseInfo) throws RemoteException; @Override // android.hardware.radio.V1_0.IRadioResponse, android.internal.hidl.base.V1_0.IBase boolean unlinkToDeath(IHwBinder.DeathRecipient deathRecipient) throws RemoteException; static default IRadioResponse asInterface(IHwBinder binder) { if (binder == null) { return null; } IHwInterface iface = binder.queryLocalInterface(kInterfaceName); if (iface != null && (iface instanceof IRadioResponse)) { return (IRadioResponse) iface; } IRadioResponse proxy = new Proxy(binder); try { Iterator<String> it = proxy.interfaceChain().iterator(); while (it.hasNext()) { if (it.next().equals(kInterfaceName)) { return proxy; } } } catch (RemoteException e) { } return null; } static default IRadioResponse castFrom(IHwInterface iface) { if (iface == null) { return null; } return asInterface(iface.asBinder()); } static default IRadioResponse getService(String serviceName, boolean retry) throws RemoteException { return asInterface(HwBinder.getService(kInterfaceName, serviceName, retry)); } static default IRadioResponse getService(boolean retry) throws RemoteException { return getService(PhoneConstants.APN_TYPE_DEFAULT, retry); } static default IRadioResponse getService(String serviceName) throws RemoteException { return asInterface(HwBinder.getService(kInterfaceName, serviceName)); } static default IRadioResponse getService() throws RemoteException { return getService(PhoneConstants.APN_TYPE_DEFAULT); } public static final class Proxy implements IRadioResponse { private IHwBinder mRemote; public Proxy(IHwBinder remote) { this.mRemote = (IHwBinder) Objects.requireNonNull(remote); } @Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public IHwBinder asBinder() { return this.mRemote; } public String toString() { try { return interfaceDescriptor() + "@Proxy"; } catch (RemoteException e) { return "[class or subclass of android.hardware.radio@1.1::IRadioResponse]@Proxy"; } } public final boolean equals(Object other) { return HidlSupport.interfacesEqual(this, other); } public final int hashCode() { return asBinder().hashCode(); } @Override // android.hardware.radio.V1_0.IRadioResponse public void getIccCardStatusResponse(RadioResponseInfo info, CardStatus cardStatus) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); cardStatus.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(1, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void supplyIccPinForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(2, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void supplyIccPukForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(3, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void supplyIccPin2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(4, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void supplyIccPuk2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(5, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void changeIccPinForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(6, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void changeIccPin2ForAppResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(7, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void supplyNetworkDepersonalizationResponse(RadioResponseInfo info, int remainingRetries) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(remainingRetries); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(8, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCurrentCallsResponse(RadioResponseInfo info, ArrayList<Call> calls) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); Call.writeVectorToParcel(_hidl_request, calls); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(9, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void dialResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(10, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getIMSIForAppResponse(RadioResponseInfo info, String imsi) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(imsi); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(11, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void hangupConnectionResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(12, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void hangupWaitingOrBackgroundResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(13, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void hangupForegroundResumeBackgroundResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(14, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void switchWaitingOrHoldingAndActiveResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(15, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void conferenceResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(16, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void rejectCallResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(17, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getLastCallFailCauseResponse(RadioResponseInfo info, LastCallFailCauseInfo failCauseinfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); failCauseinfo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(18, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getSignalStrengthResponse(RadioResponseInfo info, SignalStrength sigStrength) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); sigStrength.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(19, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getVoiceRegistrationStateResponse(RadioResponseInfo info, VoiceRegStateResult voiceRegResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); voiceRegResponse.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(20, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getDataRegistrationStateResponse(RadioResponseInfo info, DataRegStateResult dataRegResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); dataRegResponse.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(21, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getOperatorResponse(RadioResponseInfo info, String longName, String shortName, String numeric) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(longName); _hidl_request.writeString(shortName); _hidl_request.writeString(numeric); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(22, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setRadioPowerResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(23, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendDtmfResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(24, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); sms.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(25, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendSMSExpectMoreResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); sms.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(26, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setupDataCallResponse(RadioResponseInfo info, SetupDataCallResult dcResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); dcResponse.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(27, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void iccIOForAppResponse(RadioResponseInfo info, IccIoResult iccIo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); iccIo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(28, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendUssdResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(29, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void cancelPendingUssdResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(30, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getClirResponse(RadioResponseInfo info, int n, int m) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(n); _hidl_request.writeInt32(m); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(31, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setClirResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(32, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCallForwardStatusResponse(RadioResponseInfo info, ArrayList<CallForwardInfo> callForwardInfos) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); CallForwardInfo.writeVectorToParcel(_hidl_request, callForwardInfos); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(33, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCallForwardResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(34, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCallWaitingResponse(RadioResponseInfo info, boolean enable, int serviceClass) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(enable); _hidl_request.writeInt32(serviceClass); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(35, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCallWaitingResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(36, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void acknowledgeLastIncomingGsmSmsResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(37, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void acceptCallResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(38, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void deactivateDataCallResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(39, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getFacilityLockForAppResponse(RadioResponseInfo info, int response) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(response); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(40, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setFacilityLockForAppResponse(RadioResponseInfo info, int retry) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(retry); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(41, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setBarringPasswordResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(42, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getNetworkSelectionModeResponse(RadioResponseInfo info, boolean manual) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(manual); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(43, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setNetworkSelectionModeAutomaticResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(44, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setNetworkSelectionModeManualResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(45, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getAvailableNetworksResponse(RadioResponseInfo info, ArrayList<OperatorInfo> networkInfos) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); OperatorInfo.writeVectorToParcel(_hidl_request, networkInfos); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(46, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void startDtmfResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(47, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void stopDtmfResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(48, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getBasebandVersionResponse(RadioResponseInfo info, String version) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(version); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(49, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void separateConnectionResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(50, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setMuteResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(51, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getMuteResponse(RadioResponseInfo info, boolean enable) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(enable); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(52, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getClipResponse(RadioResponseInfo info, int status) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(status); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(53, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getDataCallListResponse(RadioResponseInfo info, ArrayList<SetupDataCallResult> dcResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); SetupDataCallResult.writeVectorToParcel(_hidl_request, dcResponse); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(54, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setSuppServiceNotificationsResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(55, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void writeSmsToSimResponse(RadioResponseInfo info, int index) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(index); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(56, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void deleteSmsOnSimResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(57, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setBandModeResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(58, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getAvailableBandModesResponse(RadioResponseInfo info, ArrayList<Integer> bandModes) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32Vector(bandModes); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(59, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendEnvelopeResponse(RadioResponseInfo info, String commandResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(commandResponse); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(60, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendTerminalResponseToSimResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(61, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void handleStkCallSetupRequestFromSimResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(62, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void explicitCallTransferResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(63, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setPreferredNetworkTypeResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(64, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getPreferredNetworkTypeResponse(RadioResponseInfo info, int nwType) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(nwType); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(65, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getNeighboringCidsResponse(RadioResponseInfo info, ArrayList<NeighboringCell> cells) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); NeighboringCell.writeVectorToParcel(_hidl_request, cells); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(66, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setLocationUpdatesResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(67, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCdmaSubscriptionSourceResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(68, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCdmaRoamingPreferenceResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(69, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCdmaRoamingPreferenceResponse(RadioResponseInfo info, int type) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(type); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(70, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setTTYModeResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(71, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getTTYModeResponse(RadioResponseInfo info, int mode) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(mode); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(72, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setPreferredVoicePrivacyResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(73, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getPreferredVoicePrivacyResponse(RadioResponseInfo info, boolean enable) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(enable); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(74, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendCDMAFeatureCodeResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(75, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendBurstDtmfResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(76, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendCdmaSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); sms.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(77, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void acknowledgeLastIncomingCdmaSmsResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(78, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getGsmBroadcastConfigResponse(RadioResponseInfo info, ArrayList<GsmBroadcastSmsConfigInfo> configs) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); GsmBroadcastSmsConfigInfo.writeVectorToParcel(_hidl_request, configs); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(79, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setGsmBroadcastConfigResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(80, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setGsmBroadcastActivationResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(81, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCdmaBroadcastConfigResponse(RadioResponseInfo info, ArrayList<CdmaBroadcastSmsConfigInfo> configs) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); CdmaBroadcastSmsConfigInfo.writeVectorToParcel(_hidl_request, configs); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(82, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCdmaBroadcastConfigResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(83, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCdmaBroadcastActivationResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(84, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCDMASubscriptionResponse(RadioResponseInfo info, String mdn, String hSid, String hNid, String min, String prl) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(mdn); _hidl_request.writeString(hSid); _hidl_request.writeString(hNid); _hidl_request.writeString(min); _hidl_request.writeString(prl); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(85, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void writeSmsToRuimResponse(RadioResponseInfo info, int index) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(index); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(86, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void deleteSmsOnRuimResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(87, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getDeviceIdentityResponse(RadioResponseInfo info, String imei, String imeisv, String esn, String meid) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(imei); _hidl_request.writeString(imeisv); _hidl_request.writeString(esn); _hidl_request.writeString(meid); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(88, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void exitEmergencyCallbackModeResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(89, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getSmscAddressResponse(RadioResponseInfo info, String smsc) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(smsc); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(90, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setSmscAddressResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(91, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void reportSmsMemoryStatusResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(92, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void reportStkServiceIsRunningResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(93, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCdmaSubscriptionSourceResponse(RadioResponseInfo info, int source) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(source); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(94, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void requestIsimAuthenticationResponse(RadioResponseInfo info, String response) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(response); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(95, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void acknowledgeIncomingGsmSmsWithPduResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(96, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendEnvelopeWithStatusResponse(RadioResponseInfo info, IccIoResult iccIo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); iccIo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(97, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getVoiceRadioTechnologyResponse(RadioResponseInfo info, int rat) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(rat); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(98, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getCellInfoListResponse(RadioResponseInfo info, ArrayList<CellInfo> cellInfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); CellInfo.writeVectorToParcel(_hidl_request, cellInfo); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(99, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setCellInfoListRateResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(100, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setInitialAttachApnResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(101, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getImsRegistrationStateResponse(RadioResponseInfo info, boolean isRegistered, int ratFamily) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(isRegistered); _hidl_request.writeInt32(ratFamily); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(102, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendImsSmsResponse(RadioResponseInfo info, SendSmsResult sms) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); sms.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(103, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void iccTransmitApduBasicChannelResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); result.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(104, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void iccOpenLogicalChannelResponse(RadioResponseInfo info, int channelId, ArrayList<Byte> selectResponse) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(channelId); _hidl_request.writeInt8Vector(selectResponse); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(105, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void iccCloseLogicalChannelResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(106, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void iccTransmitApduLogicalChannelResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); result.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(107, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void nvReadItemResponse(RadioResponseInfo info, String result) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeString(result); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(108, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void nvWriteItemResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(109, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void nvWriteCdmaPrlResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(110, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void nvResetConfigResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(111, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setUiccSubscriptionResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(112, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setDataAllowedResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(113, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getHardwareConfigResponse(RadioResponseInfo info, ArrayList<HardwareConfig> config) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HardwareConfig.writeVectorToParcel(_hidl_request, config); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(114, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void requestIccSimAuthenticationResponse(RadioResponseInfo info, IccIoResult result) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); result.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(115, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setDataProfileResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(116, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void requestShutdownResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(117, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); rc.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(118, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); rc.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(119, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void startLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); statusInfo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(120, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void stopLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); statusInfo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(121, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void pullLceDataResponse(RadioResponseInfo info, LceDataInfo lceInfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); lceInfo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(122, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getModemActivityInfoResponse(RadioResponseInfo info, ActivityStatsInfo activityInfo) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); activityInfo.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(123, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setAllowedCarriersResponse(RadioResponseInfo info, int numAllowed) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeInt32(numAllowed); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(124, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void getAllowedCarriersResponse(RadioResponseInfo info, boolean allAllowed, CarrierRestrictions carriers) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); _hidl_request.writeBool(allAllowed); carriers.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(125, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void sendDeviceStateResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(126, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setIndicationFilterResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(127, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void setSimCardPowerResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(128, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse public void acknowledgeRequest(int serial) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); _hidl_request.writeInt32(serial); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(129, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(130, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void setSimCardPowerResponse_1_1(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(131, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void startNetworkScanResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(132, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void stopNetworkScanResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(133, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void startKeepaliveResponse(RadioResponseInfo info, KeepaliveStatus status) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); status.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(134, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_1.IRadioResponse public void stopKeepaliveResponse(RadioResponseInfo info) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IRadioResponse.kInterfaceName); info.writeToParcel(_hidl_request); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(135, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public ArrayList<String> interfaceChain() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256067662, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); return _hidl_reply.readStringVector(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public void debug(NativeHandle fd, ArrayList<String> options) throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); _hidl_request.writeNativeHandle(fd); _hidl_request.writeStringVector(options); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256131655, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public String interfaceDescriptor() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256136003, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); return _hidl_reply.readString(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public ArrayList<byte[]> getHashChain() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256398152, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); ArrayList<byte[]> _hidl_out_hashchain = new ArrayList<>(); HwBlob _hidl_blob = _hidl_reply.readBuffer(16); int _hidl_vec_size = _hidl_blob.getInt32(8); HwBlob childBlob = _hidl_reply.readEmbeddedBuffer((long) (_hidl_vec_size * 32), _hidl_blob.handle(), 0, true); _hidl_out_hashchain.clear(); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { byte[] _hidl_vec_element = new byte[32]; childBlob.copyToInt8Array((long) (_hidl_index_0 * 32), _hidl_vec_element, 32); _hidl_out_hashchain.add(_hidl_vec_element); } return _hidl_out_hashchain; } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public void setHALInstrumentation() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256462420, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) throws RemoteException { return this.mRemote.linkToDeath(recipient, cookie); } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public void ping() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(256921159, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public DebugInfo getDebugInfo() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(257049926, _hidl_request, _hidl_reply, 0); _hidl_reply.verifySuccess(); _hidl_request.releaseTemporaryStorage(); DebugInfo _hidl_out_info = new DebugInfo(); _hidl_out_info.readFromParcel(_hidl_reply); return _hidl_out_info; } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public void notifySyspropsChanged() throws RemoteException { HwParcel _hidl_request = new HwParcel(); _hidl_request.writeInterfaceToken(IBase.kInterfaceName); HwParcel _hidl_reply = new HwParcel(); try { this.mRemote.transact(257120595, _hidl_request, _hidl_reply, 1); _hidl_request.releaseTemporaryStorage(); } finally { _hidl_reply.release(); } } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) throws RemoteException { return this.mRemote.unlinkToDeath(recipient); } } public static abstract class Stub extends HwBinder implements IRadioResponse { @Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwInterface, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public IHwBinder asBinder() { return this; } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final ArrayList<String> interfaceChain() { return new ArrayList<>(Arrays.asList(IRadioResponse.kInterfaceName, android.hardware.radio.V1_0.IRadioResponse.kInterfaceName, IBase.kInterfaceName)); } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public void debug(NativeHandle fd, ArrayList<String> arrayList) { } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final String interfaceDescriptor() { return IRadioResponse.kInterfaceName; } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final ArrayList<byte[]> getHashChain() { return new ArrayList<>(Arrays.asList(new byte[]{5, -86, 61, -26, 19, 10, -105, -120, -3, -74, -12, -45, -52, 87, -61, -22, MidiConstants.STATUS_NOTE_ON, -16, 103, -25, 122, 94, 9, -42, -89, 114, -20, Byte.MAX_VALUE, 107, -54, 51, -46}, new byte[]{29, 74, 87, 118, 97, 76, 8, -75, -41, -108, -91, -20, 90, MidiConstants.STATUS_CONTROL_CHANGE, 70, -105, 38, 12, -67, 75, 52, 65, -43, -109, 92, -43, 62, -25, 29, 25, -38, 2}, new byte[]{-20, Byte.MAX_VALUE, -41, -98, MidiConstants.STATUS_CHANNEL_PRESSURE, 45, -6, -123, -68, 73, -108, 38, -83, -82, 62, -66, 35, -17, 5, 36, MidiConstants.STATUS_SONG_SELECT, -51, 105, 87, 19, -109, 36, -72, 59, 24, -54, 76})); } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final void setHALInstrumentation() { } @Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwBinder, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) { return true; } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final void ping() { } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final DebugInfo getDebugInfo() { DebugInfo info = new DebugInfo(); info.pid = HidlSupport.getPidIfSharable(); info.ptr = 0; info.arch = 0; return info; } @Override // android.hardware.radio.V1_0.IRadioResponse, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final void notifySyspropsChanged() { HwBinder.enableInstrumentation(); } @Override // android.hardware.radio.V1_0.IRadioResponse, android.os.IHwBinder, android.hardware.radio.V1_1.IRadioResponse, android.internal.hidl.base.V1_0.IBase public final boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) { return true; } @Override // android.os.IHwBinder public IHwInterface queryLocalInterface(String descriptor) { if (IRadioResponse.kInterfaceName.equals(descriptor)) { return this; } return null; } public void registerAsService(String serviceName) throws RemoteException { registerService(serviceName); } public String toString() { return interfaceDescriptor() + "@Stub"; } @Override // android.os.HwBinder public void onTransact(int _hidl_code, HwParcel _hidl_request, HwParcel _hidl_reply, int _hidl_flags) throws RemoteException { boolean _hidl_is_oneway = false; boolean _hidl_is_oneway2 = true; switch (_hidl_code) { case 1: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info = new RadioResponseInfo(); info.readFromParcel(_hidl_request); CardStatus cardStatus = new CardStatus(); cardStatus.readFromParcel(_hidl_request); getIccCardStatusResponse(info, cardStatus); return; case 2: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info2 = new RadioResponseInfo(); info2.readFromParcel(_hidl_request); supplyIccPinForAppResponse(info2, _hidl_request.readInt32()); return; case 3: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info3 = new RadioResponseInfo(); info3.readFromParcel(_hidl_request); supplyIccPukForAppResponse(info3, _hidl_request.readInt32()); return; case 4: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info4 = new RadioResponseInfo(); info4.readFromParcel(_hidl_request); supplyIccPin2ForAppResponse(info4, _hidl_request.readInt32()); return; case 5: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info5 = new RadioResponseInfo(); info5.readFromParcel(_hidl_request); supplyIccPuk2ForAppResponse(info5, _hidl_request.readInt32()); return; case 6: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info6 = new RadioResponseInfo(); info6.readFromParcel(_hidl_request); changeIccPinForAppResponse(info6, _hidl_request.readInt32()); return; case 7: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info7 = new RadioResponseInfo(); info7.readFromParcel(_hidl_request); changeIccPin2ForAppResponse(info7, _hidl_request.readInt32()); return; case 8: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info8 = new RadioResponseInfo(); info8.readFromParcel(_hidl_request); supplyNetworkDepersonalizationResponse(info8, _hidl_request.readInt32()); return; case 9: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info9 = new RadioResponseInfo(); info9.readFromParcel(_hidl_request); getCurrentCallsResponse(info9, Call.readVectorFromParcel(_hidl_request)); return; case 10: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info10 = new RadioResponseInfo(); info10.readFromParcel(_hidl_request); dialResponse(info10); return; case 11: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info11 = new RadioResponseInfo(); info11.readFromParcel(_hidl_request); getIMSIForAppResponse(info11, _hidl_request.readString()); return; case 12: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info12 = new RadioResponseInfo(); info12.readFromParcel(_hidl_request); hangupConnectionResponse(info12); return; case 13: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info13 = new RadioResponseInfo(); info13.readFromParcel(_hidl_request); hangupWaitingOrBackgroundResponse(info13); return; case 14: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info14 = new RadioResponseInfo(); info14.readFromParcel(_hidl_request); hangupForegroundResumeBackgroundResponse(info14); return; case 15: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info15 = new RadioResponseInfo(); info15.readFromParcel(_hidl_request); switchWaitingOrHoldingAndActiveResponse(info15); return; case 16: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info16 = new RadioResponseInfo(); info16.readFromParcel(_hidl_request); conferenceResponse(info16); return; case 17: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info17 = new RadioResponseInfo(); info17.readFromParcel(_hidl_request); rejectCallResponse(info17); return; case 18: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info18 = new RadioResponseInfo(); info18.readFromParcel(_hidl_request); LastCallFailCauseInfo failCauseinfo = new LastCallFailCauseInfo(); failCauseinfo.readFromParcel(_hidl_request); getLastCallFailCauseResponse(info18, failCauseinfo); return; case 19: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info19 = new RadioResponseInfo(); info19.readFromParcel(_hidl_request); SignalStrength sigStrength = new SignalStrength(); sigStrength.readFromParcel(_hidl_request); getSignalStrengthResponse(info19, sigStrength); return; case 20: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info20 = new RadioResponseInfo(); info20.readFromParcel(_hidl_request); VoiceRegStateResult voiceRegResponse = new VoiceRegStateResult(); voiceRegResponse.readFromParcel(_hidl_request); getVoiceRegistrationStateResponse(info20, voiceRegResponse); return; case 21: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info21 = new RadioResponseInfo(); info21.readFromParcel(_hidl_request); DataRegStateResult dataRegResponse = new DataRegStateResult(); dataRegResponse.readFromParcel(_hidl_request); getDataRegistrationStateResponse(info21, dataRegResponse); return; case 22: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info22 = new RadioResponseInfo(); info22.readFromParcel(_hidl_request); getOperatorResponse(info22, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString()); return; case 23: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info23 = new RadioResponseInfo(); info23.readFromParcel(_hidl_request); setRadioPowerResponse(info23); return; case 24: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info24 = new RadioResponseInfo(); info24.readFromParcel(_hidl_request); sendDtmfResponse(info24); return; case 25: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info25 = new RadioResponseInfo(); info25.readFromParcel(_hidl_request); SendSmsResult sms = new SendSmsResult(); sms.readFromParcel(_hidl_request); sendSmsResponse(info25, sms); return; case 26: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info26 = new RadioResponseInfo(); info26.readFromParcel(_hidl_request); SendSmsResult sms2 = new SendSmsResult(); sms2.readFromParcel(_hidl_request); sendSMSExpectMoreResponse(info26, sms2); return; case 27: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info27 = new RadioResponseInfo(); info27.readFromParcel(_hidl_request); SetupDataCallResult dcResponse = new SetupDataCallResult(); dcResponse.readFromParcel(_hidl_request); setupDataCallResponse(info27, dcResponse); return; case 28: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info28 = new RadioResponseInfo(); info28.readFromParcel(_hidl_request); IccIoResult iccIo = new IccIoResult(); iccIo.readFromParcel(_hidl_request); iccIOForAppResponse(info28, iccIo); return; case 29: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info29 = new RadioResponseInfo(); info29.readFromParcel(_hidl_request); sendUssdResponse(info29); return; case 30: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info30 = new RadioResponseInfo(); info30.readFromParcel(_hidl_request); cancelPendingUssdResponse(info30); return; case 31: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info31 = new RadioResponseInfo(); info31.readFromParcel(_hidl_request); getClirResponse(info31, _hidl_request.readInt32(), _hidl_request.readInt32()); return; case 32: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info32 = new RadioResponseInfo(); info32.readFromParcel(_hidl_request); setClirResponse(info32); return; case 33: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info33 = new RadioResponseInfo(); info33.readFromParcel(_hidl_request); getCallForwardStatusResponse(info33, CallForwardInfo.readVectorFromParcel(_hidl_request)); return; case 34: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info34 = new RadioResponseInfo(); info34.readFromParcel(_hidl_request); setCallForwardResponse(info34); return; case 35: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info35 = new RadioResponseInfo(); info35.readFromParcel(_hidl_request); getCallWaitingResponse(info35, _hidl_request.readBool(), _hidl_request.readInt32()); return; case 36: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info36 = new RadioResponseInfo(); info36.readFromParcel(_hidl_request); setCallWaitingResponse(info36); return; case 37: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info37 = new RadioResponseInfo(); info37.readFromParcel(_hidl_request); acknowledgeLastIncomingGsmSmsResponse(info37); return; case 38: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info38 = new RadioResponseInfo(); info38.readFromParcel(_hidl_request); acceptCallResponse(info38); return; case 39: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info39 = new RadioResponseInfo(); info39.readFromParcel(_hidl_request); deactivateDataCallResponse(info39); return; case 40: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info40 = new RadioResponseInfo(); info40.readFromParcel(_hidl_request); getFacilityLockForAppResponse(info40, _hidl_request.readInt32()); return; case 41: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info41 = new RadioResponseInfo(); info41.readFromParcel(_hidl_request); setFacilityLockForAppResponse(info41, _hidl_request.readInt32()); return; case 42: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info42 = new RadioResponseInfo(); info42.readFromParcel(_hidl_request); setBarringPasswordResponse(info42); return; case 43: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info43 = new RadioResponseInfo(); info43.readFromParcel(_hidl_request); getNetworkSelectionModeResponse(info43, _hidl_request.readBool()); return; case 44: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info44 = new RadioResponseInfo(); info44.readFromParcel(_hidl_request); setNetworkSelectionModeAutomaticResponse(info44); return; case 45: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info45 = new RadioResponseInfo(); info45.readFromParcel(_hidl_request); setNetworkSelectionModeManualResponse(info45); return; case 46: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info46 = new RadioResponseInfo(); info46.readFromParcel(_hidl_request); getAvailableNetworksResponse(info46, OperatorInfo.readVectorFromParcel(_hidl_request)); return; case 47: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info47 = new RadioResponseInfo(); info47.readFromParcel(_hidl_request); startDtmfResponse(info47); return; case 48: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info48 = new RadioResponseInfo(); info48.readFromParcel(_hidl_request); stopDtmfResponse(info48); return; case 49: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info49 = new RadioResponseInfo(); info49.readFromParcel(_hidl_request); getBasebandVersionResponse(info49, _hidl_request.readString()); return; case 50: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info50 = new RadioResponseInfo(); info50.readFromParcel(_hidl_request); separateConnectionResponse(info50); return; case 51: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info51 = new RadioResponseInfo(); info51.readFromParcel(_hidl_request); setMuteResponse(info51); return; case 52: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info52 = new RadioResponseInfo(); info52.readFromParcel(_hidl_request); getMuteResponse(info52, _hidl_request.readBool()); return; case 53: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info53 = new RadioResponseInfo(); info53.readFromParcel(_hidl_request); getClipResponse(info53, _hidl_request.readInt32()); return; case 54: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info54 = new RadioResponseInfo(); info54.readFromParcel(_hidl_request); getDataCallListResponse(info54, SetupDataCallResult.readVectorFromParcel(_hidl_request)); return; case 55: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info55 = new RadioResponseInfo(); info55.readFromParcel(_hidl_request); setSuppServiceNotificationsResponse(info55); return; case 56: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info56 = new RadioResponseInfo(); info56.readFromParcel(_hidl_request); writeSmsToSimResponse(info56, _hidl_request.readInt32()); return; case 57: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info57 = new RadioResponseInfo(); info57.readFromParcel(_hidl_request); deleteSmsOnSimResponse(info57); return; case 58: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info58 = new RadioResponseInfo(); info58.readFromParcel(_hidl_request); setBandModeResponse(info58); return; case 59: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info59 = new RadioResponseInfo(); info59.readFromParcel(_hidl_request); getAvailableBandModesResponse(info59, _hidl_request.readInt32Vector()); return; case 60: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info60 = new RadioResponseInfo(); info60.readFromParcel(_hidl_request); sendEnvelopeResponse(info60, _hidl_request.readString()); return; case 61: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info61 = new RadioResponseInfo(); info61.readFromParcel(_hidl_request); sendTerminalResponseToSimResponse(info61); return; case 62: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info62 = new RadioResponseInfo(); info62.readFromParcel(_hidl_request); handleStkCallSetupRequestFromSimResponse(info62); return; case 63: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info63 = new RadioResponseInfo(); info63.readFromParcel(_hidl_request); explicitCallTransferResponse(info63); return; case 64: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info64 = new RadioResponseInfo(); info64.readFromParcel(_hidl_request); setPreferredNetworkTypeResponse(info64); return; case 65: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info65 = new RadioResponseInfo(); info65.readFromParcel(_hidl_request); getPreferredNetworkTypeResponse(info65, _hidl_request.readInt32()); return; case 66: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info66 = new RadioResponseInfo(); info66.readFromParcel(_hidl_request); getNeighboringCidsResponse(info66, NeighboringCell.readVectorFromParcel(_hidl_request)); return; case 67: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info67 = new RadioResponseInfo(); info67.readFromParcel(_hidl_request); setLocationUpdatesResponse(info67); return; case 68: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info68 = new RadioResponseInfo(); info68.readFromParcel(_hidl_request); setCdmaSubscriptionSourceResponse(info68); return; case 69: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info69 = new RadioResponseInfo(); info69.readFromParcel(_hidl_request); setCdmaRoamingPreferenceResponse(info69); return; case 70: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info70 = new RadioResponseInfo(); info70.readFromParcel(_hidl_request); getCdmaRoamingPreferenceResponse(info70, _hidl_request.readInt32()); return; case 71: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info71 = new RadioResponseInfo(); info71.readFromParcel(_hidl_request); setTTYModeResponse(info71); return; case 72: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info72 = new RadioResponseInfo(); info72.readFromParcel(_hidl_request); getTTYModeResponse(info72, _hidl_request.readInt32()); return; case 73: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info73 = new RadioResponseInfo(); info73.readFromParcel(_hidl_request); setPreferredVoicePrivacyResponse(info73); return; case 74: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info74 = new RadioResponseInfo(); info74.readFromParcel(_hidl_request); getPreferredVoicePrivacyResponse(info74, _hidl_request.readBool()); return; case 75: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info75 = new RadioResponseInfo(); info75.readFromParcel(_hidl_request); sendCDMAFeatureCodeResponse(info75); return; case 76: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info76 = new RadioResponseInfo(); info76.readFromParcel(_hidl_request); sendBurstDtmfResponse(info76); return; case 77: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info77 = new RadioResponseInfo(); info77.readFromParcel(_hidl_request); SendSmsResult sms3 = new SendSmsResult(); sms3.readFromParcel(_hidl_request); sendCdmaSmsResponse(info77, sms3); return; case 78: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info78 = new RadioResponseInfo(); info78.readFromParcel(_hidl_request); acknowledgeLastIncomingCdmaSmsResponse(info78); return; case 79: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info79 = new RadioResponseInfo(); info79.readFromParcel(_hidl_request); getGsmBroadcastConfigResponse(info79, GsmBroadcastSmsConfigInfo.readVectorFromParcel(_hidl_request)); return; case 80: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info80 = new RadioResponseInfo(); info80.readFromParcel(_hidl_request); setGsmBroadcastConfigResponse(info80); return; case 81: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info81 = new RadioResponseInfo(); info81.readFromParcel(_hidl_request); setGsmBroadcastActivationResponse(info81); return; case 82: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info82 = new RadioResponseInfo(); info82.readFromParcel(_hidl_request); getCdmaBroadcastConfigResponse(info82, CdmaBroadcastSmsConfigInfo.readVectorFromParcel(_hidl_request)); return; case 83: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info83 = new RadioResponseInfo(); info83.readFromParcel(_hidl_request); setCdmaBroadcastConfigResponse(info83); return; case 84: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info84 = new RadioResponseInfo(); info84.readFromParcel(_hidl_request); setCdmaBroadcastActivationResponse(info84); return; case 85: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info85 = new RadioResponseInfo(); info85.readFromParcel(_hidl_request); getCDMASubscriptionResponse(info85, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString()); return; case 86: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info86 = new RadioResponseInfo(); info86.readFromParcel(_hidl_request); writeSmsToRuimResponse(info86, _hidl_request.readInt32()); return; case 87: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info87 = new RadioResponseInfo(); info87.readFromParcel(_hidl_request); deleteSmsOnRuimResponse(info87); return; case 88: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info88 = new RadioResponseInfo(); info88.readFromParcel(_hidl_request); getDeviceIdentityResponse(info88, _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString(), _hidl_request.readString()); return; case 89: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info89 = new RadioResponseInfo(); info89.readFromParcel(_hidl_request); exitEmergencyCallbackModeResponse(info89); return; case 90: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info90 = new RadioResponseInfo(); info90.readFromParcel(_hidl_request); getSmscAddressResponse(info90, _hidl_request.readString()); return; case 91: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info91 = new RadioResponseInfo(); info91.readFromParcel(_hidl_request); setSmscAddressResponse(info91); return; case 92: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info92 = new RadioResponseInfo(); info92.readFromParcel(_hidl_request); reportSmsMemoryStatusResponse(info92); return; case 93: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info93 = new RadioResponseInfo(); info93.readFromParcel(_hidl_request); reportStkServiceIsRunningResponse(info93); return; case 94: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info94 = new RadioResponseInfo(); info94.readFromParcel(_hidl_request); getCdmaSubscriptionSourceResponse(info94, _hidl_request.readInt32()); return; case 95: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info95 = new RadioResponseInfo(); info95.readFromParcel(_hidl_request); requestIsimAuthenticationResponse(info95, _hidl_request.readString()); return; case 96: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info96 = new RadioResponseInfo(); info96.readFromParcel(_hidl_request); acknowledgeIncomingGsmSmsWithPduResponse(info96); return; case 97: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info97 = new RadioResponseInfo(); info97.readFromParcel(_hidl_request); IccIoResult iccIo2 = new IccIoResult(); iccIo2.readFromParcel(_hidl_request); sendEnvelopeWithStatusResponse(info97, iccIo2); return; case 98: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info98 = new RadioResponseInfo(); info98.readFromParcel(_hidl_request); getVoiceRadioTechnologyResponse(info98, _hidl_request.readInt32()); return; case 99: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info99 = new RadioResponseInfo(); info99.readFromParcel(_hidl_request); getCellInfoListResponse(info99, CellInfo.readVectorFromParcel(_hidl_request)); return; case 100: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info100 = new RadioResponseInfo(); info100.readFromParcel(_hidl_request); setCellInfoListRateResponse(info100); return; case 101: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info101 = new RadioResponseInfo(); info101.readFromParcel(_hidl_request); setInitialAttachApnResponse(info101); return; case 102: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info102 = new RadioResponseInfo(); info102.readFromParcel(_hidl_request); getImsRegistrationStateResponse(info102, _hidl_request.readBool(), _hidl_request.readInt32()); return; case 103: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info103 = new RadioResponseInfo(); info103.readFromParcel(_hidl_request); SendSmsResult sms4 = new SendSmsResult(); sms4.readFromParcel(_hidl_request); sendImsSmsResponse(info103, sms4); return; case 104: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info104 = new RadioResponseInfo(); info104.readFromParcel(_hidl_request); IccIoResult result = new IccIoResult(); result.readFromParcel(_hidl_request); iccTransmitApduBasicChannelResponse(info104, result); return; case 105: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info105 = new RadioResponseInfo(); info105.readFromParcel(_hidl_request); iccOpenLogicalChannelResponse(info105, _hidl_request.readInt32(), _hidl_request.readInt8Vector()); return; case 106: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info106 = new RadioResponseInfo(); info106.readFromParcel(_hidl_request); iccCloseLogicalChannelResponse(info106); return; case 107: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info107 = new RadioResponseInfo(); info107.readFromParcel(_hidl_request); IccIoResult result2 = new IccIoResult(); result2.readFromParcel(_hidl_request); iccTransmitApduLogicalChannelResponse(info107, result2); return; case 108: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info108 = new RadioResponseInfo(); info108.readFromParcel(_hidl_request); nvReadItemResponse(info108, _hidl_request.readString()); return; case 109: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info109 = new RadioResponseInfo(); info109.readFromParcel(_hidl_request); nvWriteItemResponse(info109); return; case 110: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info110 = new RadioResponseInfo(); info110.readFromParcel(_hidl_request); nvWriteCdmaPrlResponse(info110); return; case 111: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info111 = new RadioResponseInfo(); info111.readFromParcel(_hidl_request); nvResetConfigResponse(info111); return; case 112: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info112 = new RadioResponseInfo(); info112.readFromParcel(_hidl_request); setUiccSubscriptionResponse(info112); return; case 113: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info113 = new RadioResponseInfo(); info113.readFromParcel(_hidl_request); setDataAllowedResponse(info113); return; case 114: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info114 = new RadioResponseInfo(); info114.readFromParcel(_hidl_request); getHardwareConfigResponse(info114, HardwareConfig.readVectorFromParcel(_hidl_request)); return; case 115: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info115 = new RadioResponseInfo(); info115.readFromParcel(_hidl_request); IccIoResult result3 = new IccIoResult(); result3.readFromParcel(_hidl_request); requestIccSimAuthenticationResponse(info115, result3); return; case 116: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info116 = new RadioResponseInfo(); info116.readFromParcel(_hidl_request); setDataProfileResponse(info116); return; case 117: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info117 = new RadioResponseInfo(); info117.readFromParcel(_hidl_request); requestShutdownResponse(info117); return; case 118: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info118 = new RadioResponseInfo(); info118.readFromParcel(_hidl_request); RadioCapability rc = new RadioCapability(); rc.readFromParcel(_hidl_request); getRadioCapabilityResponse(info118, rc); return; case 119: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info119 = new RadioResponseInfo(); info119.readFromParcel(_hidl_request); RadioCapability rc2 = new RadioCapability(); rc2.readFromParcel(_hidl_request); setRadioCapabilityResponse(info119, rc2); return; case 120: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info120 = new RadioResponseInfo(); info120.readFromParcel(_hidl_request); LceStatusInfo statusInfo = new LceStatusInfo(); statusInfo.readFromParcel(_hidl_request); startLceServiceResponse(info120, statusInfo); return; case 121: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info121 = new RadioResponseInfo(); info121.readFromParcel(_hidl_request); LceStatusInfo statusInfo2 = new LceStatusInfo(); statusInfo2.readFromParcel(_hidl_request); stopLceServiceResponse(info121, statusInfo2); return; case 122: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info122 = new RadioResponseInfo(); info122.readFromParcel(_hidl_request); LceDataInfo lceInfo = new LceDataInfo(); lceInfo.readFromParcel(_hidl_request); pullLceDataResponse(info122, lceInfo); return; case 123: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info123 = new RadioResponseInfo(); info123.readFromParcel(_hidl_request); ActivityStatsInfo activityInfo = new ActivityStatsInfo(); activityInfo.readFromParcel(_hidl_request); getModemActivityInfoResponse(info123, activityInfo); return; case 124: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info124 = new RadioResponseInfo(); info124.readFromParcel(_hidl_request); setAllowedCarriersResponse(info124, _hidl_request.readInt32()); return; case 125: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info125 = new RadioResponseInfo(); info125.readFromParcel(_hidl_request); boolean allAllowed = _hidl_request.readBool(); CarrierRestrictions carriers = new CarrierRestrictions(); carriers.readFromParcel(_hidl_request); getAllowedCarriersResponse(info125, allAllowed, carriers); return; case 126: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info126 = new RadioResponseInfo(); info126.readFromParcel(_hidl_request); sendDeviceStateResponse(info126); return; case 127: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info127 = new RadioResponseInfo(); info127.readFromParcel(_hidl_request); setIndicationFilterResponse(info127); return; case 128: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); RadioResponseInfo info128 = new RadioResponseInfo(); info128.readFromParcel(_hidl_request); setSimCardPowerResponse(info128); return; case 129: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(android.hardware.radio.V1_0.IRadioResponse.kInterfaceName); acknowledgeRequest(_hidl_request.readInt32()); return; case 130: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info129 = new RadioResponseInfo(); info129.readFromParcel(_hidl_request); setCarrierInfoForImsiEncryptionResponse(info129); return; case 131: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info130 = new RadioResponseInfo(); info130.readFromParcel(_hidl_request); setSimCardPowerResponse_1_1(info130); return; case 132: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info131 = new RadioResponseInfo(); info131.readFromParcel(_hidl_request); startNetworkScanResponse(info131); return; case 133: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info132 = new RadioResponseInfo(); info132.readFromParcel(_hidl_request); stopNetworkScanResponse(info132); return; case 134: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info133 = new RadioResponseInfo(); info133.readFromParcel(_hidl_request); KeepaliveStatus status = new KeepaliveStatus(); status.readFromParcel(_hidl_request); startKeepaliveResponse(info133, status); return; case 135: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IRadioResponse.kInterfaceName); RadioResponseInfo info134 = new RadioResponseInfo(); info134.readFromParcel(_hidl_request); stopKeepaliveResponse(info134); return; default: switch (_hidl_code) { case 256067662: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); ArrayList<String> _hidl_out_descriptors = interfaceChain(); _hidl_reply.writeStatus(0); _hidl_reply.writeStringVector(_hidl_out_descriptors); _hidl_reply.send(); return; case 256131655: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); debug(_hidl_request.readNativeHandle(), _hidl_request.readStringVector()); _hidl_reply.writeStatus(0); _hidl_reply.send(); return; case 256136003: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); String _hidl_out_descriptor = interfaceDescriptor(); _hidl_reply.writeStatus(0); _hidl_reply.writeString(_hidl_out_descriptor); _hidl_reply.send(); return; case 256398152: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); ArrayList<byte[]> _hidl_out_hashchain = getHashChain(); _hidl_reply.writeStatus(0); HwBlob _hidl_blob = new HwBlob(16); int _hidl_vec_size = _hidl_out_hashchain.size(); _hidl_blob.putInt32(8, _hidl_vec_size); _hidl_blob.putBool(12, false); HwBlob childBlob = new HwBlob(_hidl_vec_size * 32); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { long _hidl_array_offset_1 = (long) (_hidl_index_0 * 32); byte[] _hidl_array_item_1 = _hidl_out_hashchain.get(_hidl_index_0); if (_hidl_array_item_1 == null || _hidl_array_item_1.length != 32) { throw new IllegalArgumentException("Array element is not of the expected length"); } childBlob.putInt8Array(_hidl_array_offset_1, _hidl_array_item_1); } _hidl_blob.putBlob(0, childBlob); _hidl_reply.writeBuffer(_hidl_blob); _hidl_reply.send(); return; case 256462420: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); setHALInstrumentation(); return; case 256660548: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } return; case 256921159: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); ping(); _hidl_reply.writeStatus(0); _hidl_reply.send(); return; case 257049926: if ((_hidl_flags & 1) == 0) { _hidl_is_oneway2 = false; } if (_hidl_is_oneway2) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); DebugInfo _hidl_out_info = getDebugInfo(); _hidl_reply.writeStatus(0); _hidl_out_info.writeToParcel(_hidl_reply); _hidl_reply.send(); return; case 257120595: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (!_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } _hidl_request.enforceInterface(IBase.kInterfaceName); notifySyspropsChanged(); return; case 257250372: if ((_hidl_flags & 1) != 0) { _hidl_is_oneway = true; } if (_hidl_is_oneway) { _hidl_reply.writeStatus(Integer.MIN_VALUE); _hidl_reply.send(); return; } return; default: return; } } } } }
[ "dstmath@163.com" ]
dstmath@163.com
2fa9b1f9ddb7955a1426d0524b9f74b257982c49
31103a55a8df56417108b2d401395e2c07844cb4
/base/src/au/id/villar/mp3Sorter/id3/frames/ENCR.java
8aa98bfb4186ed7fbb2577efe08e22398277f06b
[]
no_license
morgano5/morgano-tags
92fc81eb8040ccbb2dd3b0c3e6dbe80758a23d99
bba3e3613ee2388b6454617b60aab40ac585669b
refs/heads/master
2021-01-01T17:56:58.734068
2013-06-29T04:17:21
2013-06-29T04:17:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
package au.id.villar.mp3Sorter.id3.frames; import au.id.villar.mp3Sorter.id3.ID3Reader; import au.id.villar.mp3Sorter.id3.InvalidTagException; import java.io.IOException; public class ENCR extends Frame { private String ownerId; private int methodSymbol; private byte[] encryptionData; public ENCR(FrameHeader header) { super(header); } public String getOwnerId() { return ownerId; } public void setOwnerId(String ownerId) { this.ownerId = ownerId; } public int getMethodSymbol() { return methodSymbol; } public void setMethodSymbol(int methodSymbol) { this.methodSymbol = methodSymbol; } public byte[] getEncryptionData() { return encryptionData; } public void setEncryptionData(byte[] encryptionData) { this.encryptionData = encryptionData; } @Override void readBodyFromStream(ID3Reader reader) throws IOException, InvalidTagException { ownerId = reader.readString(false); methodSymbol = reader.readBodyByte(); if(reader.getFrameCounter() > 0) encryptionData = reader.readRestOfFrame(); } @Override public String toString() { return new StringBuilder().append(header.getId()).append(", \"").append(getFrameDescription()).append("\"").append(", ownerId: ").append(ownerId) .append(", methodSymbol: ").append(methodSymbol).toString(); } @Override public String getFrameDescription() { return "Encryption method registration"; } }
[ "morgano5@gmail.com" ]
morgano5@gmail.com
1e363bad7a5b24818d11d82673a33031055c5311
4d9dbc6f814dc9aab8990d5bc517846c7545717c
/app/src/main/java/com/garethabrahams/garethabrahamsdevspace/AboutMeActivity.java
b134c8905a65ce0b02d3ce81661cf5a16962e51b
[]
no_license
GarethAbrahams/GarethAbrahamsDevSpace
cf637b63bca72cd37389a4c408a8c25658095967
9d282763e63a6de9bba2b65f275d8733287749f5
refs/heads/master
2022-11-27T04:40:51.232597
2020-07-30T19:05:13
2020-07-30T19:05:13
283,329,033
0
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
package com.garethabrahams.garethabrahamsdevspace; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class AboutMeActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about_me); String msg = "My name is Gareth Abrahams.\n"+"\n"+"A confident and well-rounded IT professional, with experience in management, service desk, desktop support procurement, SQL, IIS and server administration.\n" + "\n" + "Working for 17 year in a fast pace software development company, while studying part time for the past 4 years.\n" + "\n" + "Very much a family orientated person, married for 10 years and have a 6 year old daughter.\n"; TextView aboutText = (TextView) findViewById(R.id.AboutText); aboutText.setText(msg); Button backButton = (Button) findViewById(R.id.backButton); backButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(AboutMeActivity.this, MenuActivity.class); startActivity(intent); } }); } }
[ "garetha6@gmail.com" ]
garetha6@gmail.com
4fd9e46b8ae09a2e8a08975b55329d067123af2b
65595359a577e7b77e532adc60519ba1ba00cbd7
/app/src/main/java/com/gsplayer/persistance/source/sqlite/CounterSqlite.java
ab96759357555cda520d8d9221d87832a792a56c
[]
no_license
celluloid90/GSPlayer
d347200eb2eda5238348b0be659e85430ac465fe
38c4c93ed6bc52c09bdf46a063c75fe8b73465f9
refs/heads/master
2021-01-10T13:26:29.766086
2016-03-24T10:42:16
2016-03-24T10:42:16
54,632,361
0
0
null
null
null
null
UTF-8
Java
false
false
1,037
java
package com.gsplayer.persistance.source.sqlite; import android.database.Cursor; import com.gsplayer.persistance.source.relational.Table; import com.gsplayer.persistance.source.sql.Counter; /** * TURTLE PLAYER * <p/> * Licensed under MIT & GPL * <p/> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE * OR OTHER DEALINGS IN THE SOFTWARE. * <p/> * More Information @ com.gpss.com * * @author Simon Honegger (Hoene84) */ public class CounterSqlite extends Counter { public CounterSqlite(Table table) { super(table); } public Integer create(Cursor queryResult) { queryResult.moveToFirst(); return queryResult.getInt(0); } }
[ "shahinoor.shahin@bjitgroup.com" ]
shahinoor.shahin@bjitgroup.com
a1f6c0628f94042c8165124423bac569f9253378
dafb5c3abd51720da10e26872a5d7e59be1c0bf7
/src/main/java/com/zqbweather/app/model9/XDWeatherDB.java
0736ae188edf3ee944b410b187d633ab97dfba7b
[ "Apache-2.0" ]
permissive
YJWWZHANG/XDWeather
210c807e588df078b5828dda54458fd68c95a613
42dd28cc0b4c78eb12b705c89382ea76e8063716
refs/heads/master
2021-01-01T04:30:52.824953
2016-05-21T13:44:17
2016-05-21T13:44:17
59,361,649
0
1
null
null
null
null
UTF-8
Java
false
false
4,421
java
package com.zqbweather.app.model9; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.zqbweather.app.activity.MyApplication; import com.zqbweather.app.db.XDWeatherOpenHelper; import com.zqbweather.app.model9.Province9; import java.util.ArrayList; import java.util.List; /** * Created by admin on 2016/2/5. */ public class XDWeatherDB { public static final String DB_NAME = "xd_weather"; public static final int VERSION = 1; public static XDWeatherDB xdWeatherDB; private SQLiteDatabase db; private XDWeatherDB(Context context){ XDWeatherOpenHelper dbHelper = new XDWeatherOpenHelper(context, DB_NAME, null, VERSION); db = dbHelper.getWritableDatabase(); } public synchronized static XDWeatherDB getIntance(){ if(xdWeatherDB == null){ xdWeatherDB = new XDWeatherDB(MyApplication.getContext()); } return xdWeatherDB; } public void saveProvince(Province9 province){ if(province != null){ ContentValues values = new ContentValues(); values.put("province_name", province.getProvinceName()); values.put("province_pyname", province.getProvincePyName()); db.insert("Province", null, values); } } public void saveCity(City9 city){ if(city != null){ ContentValues values = new ContentValues(); values.put("city_name", city.getCityName()); values.put("city_pyname", city.getCityPyName()); values.put("province_pyname", city.getProvincePyName()); xdWeatherDB.db.insert("City", null, values); } } public void saveCounty(County9 county){ if(county != null){ ContentValues values = new ContentValues(); values.put("county_name", county.getCountyName()); values.put("county_weather_code", county.getCountyWeatherCode()); values.put("city_pyname", county.getCityPyName()); db.insert("County", null, values); } } public List<Province9> loadProvince(){ List<Province9> list = new ArrayList<>(); Cursor cursor = db.query("Province", null, null, null, null, null, null); if(cursor.moveToFirst()){ do{ Province9 province = new Province9(); province.setId(cursor.getInt(cursor.getColumnIndex("id"))); province.setProvinceName(cursor.getString(cursor.getColumnIndex("province_name"))); province.setProvincePyName(cursor.getString(cursor.getColumnIndex("province_pyname"))); list.add(province); }while (cursor.moveToNext()); } return list; } public List<City9> loadCity(String provincePyName){ List<City9> list = new ArrayList<>(); Cursor cursor = db.query("City", null, "province_pyname = ?", new String[]{provincePyName}, null, null, null); if(cursor.moveToFirst()){ do{ City9 city = new City9(); city.setId(cursor.getInt(cursor.getColumnIndex("id"))); city.setCityName(cursor.getString(cursor.getColumnIndex("city_name")));; city.setCityPyName(cursor.getString(cursor.getColumnIndex("city_pyname"))); city.setProvincePyName(cursor.getString(cursor.getColumnIndex("province_pyname"))); list.add(city); }while (cursor.moveToNext()); } return list; } public List<County9> loadCounty(String cityPyName){ List<County9> list = new ArrayList<>(); Cursor cursor = db.query("County", null, "city_pyname = ?", new String[]{cityPyName}, null, null, null); if(cursor.moveToFirst()){ do{ County9 county = new County9(); county.setId(cursor.getInt(cursor.getColumnIndex("id"))); county.setCountyName(cursor.getString(cursor.getColumnIndex("county_name"))); county.setCountyWeatherCode(cursor.getString(cursor.getColumnIndex("county_weather_code"))); county.setCityPyName(cursor.getString(cursor.getColumnIndex("city_pyname"))); list.add(county); }while (cursor.moveToNext()); } return list; } }
[ "tony@gmail.com" ]
tony@gmail.com
b2ef6c7eae671d679b1647491debc755f9c7ad3c
338c38883ba840234f824fbe054ab6c8b93d175a
/build/generated-sources/jax-rpc/webservice/LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder.java
215d4606982a44bd5b288efc2356d6d169357a10
[]
no_license
prem315/LyricHound
817491a7de6f5ae058ab4a00c0da8c60b45a9528
9013a78e00e2202cd21ba82365f07796a298548d
refs/heads/master
2020-06-09T04:16:11.341008
2015-04-05T11:07:35
2015-04-05T11:07:35
33,021,823
0
0
null
null
null
null
UTF-8
Java
false
false
2,791
java
// This class was generated by the JAXRPC SI, do not edit. // Contents subject to change without notice. // JAX-RPC Standard Implementation (1.1.3, build R1) // Generated source version: 1.1.3 package webservice; import com.sun.xml.rpc.encoding.*; import com.sun.xml.rpc.util.exception.LocalizableExceptionAdapter; public class LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder implements SOAPInstanceBuilder { private webservice.LyricWikiPortType_getHometown_ResponseStruct _instance; private java.lang.String country; private java.lang.String state; private java.lang.String hometown; private static final int myCOUNTRY_INDEX = 0; private static final int mySTATE_INDEX = 1; private static final int myHOMETOWN_INDEX = 2; public LyricWikiPortType_getHometown_ResponseStruct_SOAPBuilder() { } public void setCountry(java.lang.String country) { this.country = country; } public void setState(java.lang.String state) { this.state = state; } public void setHometown(java.lang.String hometown) { this.hometown = hometown; } public int memberGateType(int memberIndex) { switch (memberIndex) { case myCOUNTRY_INDEX: return GATES_INITIALIZATION | REQUIRES_CREATION; case mySTATE_INDEX: return GATES_INITIALIZATION | REQUIRES_CREATION; case myHOMETOWN_INDEX: return GATES_INITIALIZATION | REQUIRES_CREATION; default: throw new IllegalArgumentException(); } } public void construct() { } public void setMember(int index, java.lang.Object memberValue) { try { switch(index) { case myCOUNTRY_INDEX: _instance.setCountry((java.lang.String)memberValue); break; case mySTATE_INDEX: _instance.setState((java.lang.String)memberValue); break; case myHOMETOWN_INDEX: _instance.setHometown((java.lang.String)memberValue); break; default: throw new java.lang.IllegalArgumentException(); } } catch (java.lang.RuntimeException e) { throw e; } catch (java.lang.Exception e) { throw new DeserializationException(new LocalizableExceptionAdapter(e)); } } public void initialize() { } public void setInstance(java.lang.Object instance) { _instance = (webservice.LyricWikiPortType_getHometown_ResponseStruct)instance; } public java.lang.Object getInstance() { return _instance; } }
[ "patel.prem3105@gmail.com" ]
patel.prem3105@gmail.com
92a03352b357950f63f853757cca7bb62707e6de
0818a56ae2c4be2c0cd5a5d4ca682091546645d0
/src/main/java/services/FolderService.java
f29b0d792d9783e5f793fe7dd73d96625189e146
[ "MIT" ]
permissive
juagarfer4/Condominium-Manager
a68af660e2a9fb8904b8c48ad285db9c69812e8b
8e944d57af0832aac9bcd9c8331d329ec91d2105
refs/heads/master
2021-07-07T11:33:00.207263
2017-09-29T22:32:25
2017-09-29T22:32:25
105,249,749
0
0
null
null
null
null
UTF-8
Java
false
false
2,067
java
package services; import java.util.ArrayList; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import domain.Folder; import domain.Message; import domain.Owner; import repositories.FolderRepository; import security.UserAccount; @Service @Transactional public class FolderService { // Managed repository --------------------------------- @Autowired private FolderRepository folderRepository; // Supporting services --------------------------------- @Autowired private OwnerService ownerService; // Constructors ---------------------------------------- public FolderService(){ super(); } // Simple CRUD methods ----------------------------------- public Folder create(Owner owner){ Assert.notNull(owner, "error.null"); Folder result; Collection<Message> messages; result=new Folder(); messages=new ArrayList<Message>(); result.setMessages(messages); result.setOwner(owner); return result; } public Folder findOne (Integer folderId){ Folder result; Owner owner; Owner principal; result=folderRepository.findOne(folderId); owner=result.getOwner(); principal=ownerService.findByPrincipal(); Assert.isTrue(owner==principal); return result; } public void save(Folder folder){ String name; name=folder.getName(); Assert.isTrue(name=="INBOX"||name=="OUTBOX"||name=="TRASH", "folder.error.name"); folderRepository.save(folder); } // Other business methods -------------------------------- public Collection<Folder> findAllFoldersByOwner(){ Owner principal; principal=ownerService.findByPrincipal(); Collection<Folder> result; UserAccount userAccount; Integer userAccountId; userAccount=principal.getUserAccount(); userAccountId=userAccount.getId(); result=folderRepository.findAllFoldersByOwner(userAccountId); return result; } }
[ "juanitogarciaman@gmail.com" ]
juanitogarciaman@gmail.com
f4592420ff7fd39a7911881e9023f3c0e10f28aa
6ac25b8bdc3b080cd97d0e7d2fdf0f3d472e2024
/binary-tree-paths/Solution.java
ca4339ddad712f6476de107989cbf6c179dc0263
[]
no_license
jmazala/leetcode
852e5fc9e8529ee059fcb031109431cd074d6a8f
8a3bc5aa8fe827d5f63cab0f680a17500c2f90e0
refs/heads/master
2023-08-09T20:45:29.740162
2023-08-02T05:57:22
2023-08-02T05:57:22
252,583,974
0
0
null
2023-01-07T19:14:33
2020-04-02T23:06:42
JavaScript
UTF-8
Java
false
false
1,080
java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Definition for a binary tree node. public class TreeNode { int val; TreeNode * left; TreeNode right; TreeNode(int x) { val = x; } } */ class Solution { List<String> answer; public List<String> binaryTreePaths(TreeNode root) { this.answer = new ArrayList<String>(); helper(root, ""); return answer; } public void helper(TreeNode node, String prefix) { if (node == null) { return; } prefix += node.val; if (node.left == null && node.right == null) { answer.add(prefix); } prefix += "->"; if (node.left != null) { helper(node.left, prefix); } if (node.right != null) { helper(node.right, prefix); } } public static void main(String[] args) { TreeNode root = new TreeNode(1); root.left = new TreeNode(2); root.left.right = new TreeNode(5); root.right = new TreeNode(3); Solution s = new Solution(); System.out.println(Arrays.toString(s.binaryTreePaths(root).toArray())); } }
[ "mazala.2@osu.edu" ]
mazala.2@osu.edu
1f33c1ad4fa57b0e53a305801c01f7e77f5d649d
8be6b27a6cd6d91f56a0568deb249b811eb0e068
/SampleCode_AndroidStudio/AndroidStudioSampleCode/supermapAR/src/main/java/com/google/ar/core/supermap/java/common/rendering/ShaderUtil.java
7ad491f09307c089a3e5bab63f159b1f234ce659
[]
no_license
LittleSpark2018/iMobile-SampleCode
76daaeaaa907547dfa3e51ac4f226194b76ce8b2
3ca4e50831d1fb1029b76618b1e299167a247316
refs/heads/master
2022-04-04T21:36:35.864571
2020-02-19T07:05:46
2020-02-19T07:05:46
270,269,483
1
0
null
2020-06-07T10:23:47
2020-06-07T10:23:47
null
UTF-8
Java
false
false
3,351
java
/* * Copyright 2017 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.ar.core.supermap.java.common.rendering; import android.content.Context; import android.opengl.GLES20; import android.util.Log; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /** Shader helper functions. */ public class ShaderUtil { /** * Converts a raw text file, saved as a resource, into an OpenGL ES shader. * * @param type The type of shader we will be creating. * @param filename The filename of the asset file about to be turned into a shader. * @return The shader object handler. */ public static int loadGLShader(String tag, Context context, int type, String filename) throws IOException { String code = readRawTextFileFromAssets(context, filename); int shader = GLES20.glCreateShader(type); GLES20.glShaderSource(shader, code); GLES20.glCompileShader(shader); // Get the compilation status. final int[] compileStatus = new int[1]; GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0); // If the compilation failed, delete the shader. if (compileStatus[0] == 0) { Log.e(tag, "Error compiling shader: " + GLES20.glGetShaderInfoLog(shader)); GLES20.glDeleteShader(shader); shader = 0; } if (shader == 0) { throw new RuntimeException("Error creating shader."); } return shader; } /** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * * @param label Label to report in case of error. * @throws RuntimeException If an OpenGL error is detected. */ public static void checkGLError(String tag, String label) { int lastError = GLES20.GL_NO_ERROR; // Drain the queue of all errors. int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(tag, label + ": glError " + error); lastError = error; } if (lastError != GLES20.GL_NO_ERROR) { throw new RuntimeException(label + ": glError " + lastError); } } /** * Converts a raw text file into a string. * * @param filename The filename of the asset file about to be turned into a shader. * @return The context of the text file, or null in case of error. */ private static String readRawTextFileFromAssets(Context context, String filename) throws IOException { try (InputStream inputStream = context.getAssets().open(filename); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { StringBuilder sb = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { sb.append(line).append("\n"); } return sb.toString(); } } }
[ "wangli_hbhs@163.com" ]
wangli_hbhs@163.com
123e8cffd73629c2277fa254e15e2ace55e75cd2
3bfe01d2bf6e994730ae1ec3ea2e5c8cc7258253
/Main.java
5b8b4fb22fb973de7c242a38187ba6abe79bb47f
[]
no_license
AsadRizvi97/snp-identifier
63e6ea0599a5597382ed11bd1d377492443372c8
f9d06e43d10478b6b1a1b031c641d1b0bf88d888
refs/heads/master
2022-02-01T12:37:27.891909
2019-05-12T00:17:43
2019-05-12T00:17:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,648
java
import java.util.Arrays; import java.util.LinkedList; import edu.princeton.cs.algs4.In; public class Main { private LinkedList<Chromosome> chromosomes; //Store chromosomes as linked list private int numberOfSamples; //Store number of samples for print() public Main(String[] dataFiles) { LinkedList<String> identifiers = new LinkedList<>(); //Create linked list of identifiers to see if chromosome exists already chromosomes = new LinkedList<>(); numberOfSamples = dataFiles.length; //Set number of samples to number of data files inputted for (int i = 0; i < dataFiles.length; i++) { //For each data file, convert each line to Chromosome | Position | Reference | SNP In dataInput = new In(dataFiles[i]); while (!dataInput.isEmpty()) { String[] split = dataInput.readLine().split("\\s+"); if (split[0].startsWith("#") || split[3].length() != 1 || split[3].equals(".") || split[4].length() != 1 || split[4].equals(".")) { continue; } String[] line = {split[0], split[1], split[3], split[4]}; if (identifiers.contains(split[0])) { //If chromosome already exists, just update the old one already there Chromosome chromosome = chromosomes.get(identifiers.indexOf(split[0])); chromosome.update(line, i + 1); } else { //If no chromosome exists, create it Chromosome chromosome = new Chromosome(line, dataFiles.length, i + 1); chromosomes.add(chromosome); identifiers.add(split[0]); } } } } public void print(int label) { for (Chromosome chromosome : chromosomes) { //For each chromosome, print Position | Reference | Sample 1 | Sample 2 etc. System.out.printf("%-11s%s\n", "Chromosome", chromosome.identifier()); System.out.printf("%-10s%-11s", "Position", "Reference"); for (int i = 0; i < numberOfSamples; i++) { System.out.printf("%-7s%-3d", "Sample", i + 1); } System.out.println(); chromosome.print(label); System.out.println(); } } public static void main(String[] args) { int label = 0; Main aligner; if (args[0].equals("-label") || args[0].equals("-l")) { label = 1; aligner = new Main(Arrays.copyOfRange(args, 1, args.length)); } else { aligner = new Main(args); } aligner.print(label); } }
[ "34251237+AsadRizvi97@users.noreply.github.com" ]
34251237+AsadRizvi97@users.noreply.github.com
bb9ab754256338c51287913b18b69ba91a5db19b
12835ef1fa75d48a9da56272918ddb0716952820
/controle-core/src/org/csi/controle/core/entrega/Correios.java
72b663f45fc2887e5d88864d95ae07a34b4ed07a
[ "Apache-2.0" ]
permissive
carlettibruno/workorder-control
b56b0ee557fe1d46a6637d0518cfebebe9f0424b
901a23306fb24c898eed2b1dceed9ebc8bf1eb2e
refs/heads/master
2022-12-06T08:06:29.077656
2019-06-25T16:39:44
2019-06-25T16:39:44
121,046,073
0
0
Apache-2.0
2022-11-16T06:24:48
2018-02-10T19:18:10
Java
UTF-8
Java
false
false
242
java
package org.csi.controle.core.entrega; import java.util.List; import org.csi.rastreamento.correios.entidade.Evento; public class Correios extends Entrega { @Override public List<Evento> getEventos() { return null; } }
[ "carletti.bruno@gmail.com" ]
carletti.bruno@gmail.com
3f89f3ac85fbbf49bd599b54049995e300120fe8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_53fde7739b00630f9767bb7163ae554d28cbb320/GmlHandlerTest/1_53fde7739b00630f9767bb7163ae554d28cbb320_GmlHandlerTest_t.java
b250b18ebf2c9ba83f4477944562c4ddef0c7127
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
9,550
java
/* * HUMBOLDT: A Framework for Data Harmonisation and Service Integration. * EU Integrated Project #030962 01.10.2006 - 30.09.2010 * * For more information on the project, please refer to the this web site: * http://www.esdi-humboldt.eu * * LICENSE: For information on the license under which this program is * available, please refer to http:/www.esdi-humboldt.eu/license.html#core * (c) the HUMBOLDT Consortium, 2007 to 2010. */ package eu.esdihumboldt.gmlhandler; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Iterator; import java.util.List; import javax.xml.stream.FactoryConfigurationError; import javax.xml.stream.XMLStreamException; import org.apache.log4j.Logger; import org.deegree.commons.xml.XMLParsingException; import org.deegree.cs.exceptions.TransformationException; import org.deegree.cs.exceptions.UnknownCRSException; import org.deegree.feature.Feature; import org.deegree.feature.FeatureCollection; import org.deegree.feature.property.Property; import org.deegree.feature.types.ApplicationSchema; import org.deegree.feature.types.FeatureType; import org.deegree.feature.types.property.PropertyType; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; /** * * Test-class for the GMLHandler functionality. * * @author Anna Pitaev * @partner 04 / Logica * @version $Id$ */ public class GmlHandlerTest { /** Logger for this class */ private static final Logger LOG = Logger.getLogger(GmlHandlerTest.class); /** application schema location */ private static final String SCHEMA_LOCATION_GML32 = "urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0 http://svn.esdi-humboldt.eu/repo/humboldt2/trunk/cst/eu.esdihumboldt.cst.corefunctions/src/test/resource/eu/esdihumboldt/cst/corefunctions/inspire/inspire_v3.0_xsd" + "HydroPhysicalWaters.xsd"; /** http-based URL for the application schema */ private static final String SCHEMA_URL = "http://svn.esdi-humboldt.eu/repo/humboldt2/trunk/cst/eu.esdihumboldt.cst.corefunctions/src/test/resource/eu/esdihumboldt/cst/corefunctions/inspire/inspire_v3.0_xsd/" + "HydroPhysicalWaters.xsd"; /** source gml location */ private static final String GML32_INSTANCE_LOCATION = "http://svn.esdi-humboldt.eu/repo/humboldt2/branches/humboldt-deegree3/resource/sourceData/va_target_v3.gml"; /** generated instance location */ private static final String GML32_GENERATED_LOCATION = "src/test/resources/va_target_v3_generated.gml"; /** handler to proceed gmldata */ private static GmlHandler gmlHandler; /** * @throws java.lang.Exception */ @BeforeClass public static void setUpBeforeClass() throws Exception { // pre-define namespaces HashMap<String, String> namespaces = new HashMap<String, String>(); namespaces.put("gco", "http://www.isotc211.org/2005/gco"); namespaces.put("gmd", "http://www.isotc211.org/2005/gmd"); namespaces.put("gn", "urn:x-inspire:specification:gmlas:GeographicalNames:3.0"); namespaces.put("hy-p", "urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0"); namespaces.put("hy", "urn:x-inspire:specification:gmlas:HydroBase:3.0"); namespaces.put("base", "urn:x-inspire:specification:gmlas:BaseTypes:3.2"); namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance"); // set up GMLHandler with the test configuration gmlHandler = new GmlHandler(GMLVersions.gml3_2_1, SCHEMA_URL, namespaces); gmlHandler.setGmlUrl(GML32_INSTANCE_LOCATION); // set target gml destination gmlHandler.setTargetGmlUrl(GML32_GENERATED_LOCATION); } /** * @throws java.lang.Exception */ @AfterClass public static void tearDownAfterClass() throws Exception { new File(GML32_GENERATED_LOCATION).delete(); } /** * Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#readSchema()}. * * @throws IllegalAccessException * @throws InstantiationException * @throws ClassNotFoundException * @throws ClassCastException * @throws MalformedURLException */ @Test public final void testReadSchema() throws MalformedURLException, ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException { // read application schema ApplicationSchema schema = gmlHandler.readSchema(); // validate root FeatureTypes FeatureType[] rootFTypes = schema.getRootFeatureTypes(); assertEquals(17, rootFTypes.length); for (FeatureType rootType : rootFTypes) { LOG.debug("Root Feature Type : " + rootType.getName().getNamespaceURI() + ":" + rootType.getName().getLocalPart()); } // Compare the count of the FeatureTypes FeatureType[] ftypes = schema.getFeatureTypes(); for (FeatureType ftype : ftypes) { LOG.debug("Application Schema Type : " + ftype.getName().getNamespaceURI() + ":" + ftype.getName().getLocalPart()); // validate a single Feature Type if (ftype.getName().getLocalPart().equals("Rapids")) { assertEquals("hy-p", ftype.getName().getPrefix()); assertEquals("urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0", ftype.getName().getNamespaceURI()); // check parent type FeatureType pType = schema.getParentFt(ftype); LOG.debug("Parent Typy of hy-p:Rapids is " + pType.getName().toString()); assertEquals("FluvialPoint", pType.getName().getLocalPart()); // check property declarations list List<PropertyType> pDeclarations = (List<PropertyType>) ftype.getPropertyDeclarations(); assertEquals(8, pDeclarations.size()); for (PropertyType propType : pDeclarations) { LOG.debug("Property List of hy-p:Rapids contains : " + propType.getName().toString()); } } } assertEquals(49, ftypes.length); } /** * Little test to see if we can read in a local schema, i.e. file protocol. * * @throws MalformedURLException * @throws ClassCastException * @throws ClassNotFoundException * @throws InstantiationException * @throws IllegalAccessException */ @Test public final void testReadLocalSchema() throws MalformedURLException, ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException { String url = "file://" + this.getClass().getResource("./HydroPhysicalwaters.xsd").getFile(); gmlHandler.setSchemaUrl(url); // read application schema gmlHandler.readSchema(); } /** * Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#readFC()}. * * @throws UnknownCRSException * @throws IllegalAccessException * @throws InstantiationException * @throws ClassNotFoundException * @throws IOException * @throws FactoryConfigurationError * @throws XMLStreamException * @throws ClassCastException * @throws XMLParsingException */ @Test public final void testReadFC() throws XMLParsingException, ClassCastException, XMLStreamException, FactoryConfigurationError, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnknownCRSException { LOG.info("Reading of source Feature Collection.."); URL url = new URL(GML32_INSTANCE_LOCATION); // read FeatureCollection FeatureCollection fc = null; fc = gmlHandler.readFC(); // check feature collection size assertEquals(998, fc.size()); LOG.info("Feature Collection made up of " + fc.size()); // validate a single feature with id=Watercourses=VA.942 Iterator<Feature> fcIterator = fc.iterator(); LOG.info("Verifying of the single features"); while (fcIterator.hasNext()) { Feature feature = fcIterator.next(); LOG.debug("Found feature with ID = " + feature.getId()); if (feature.getId().equals("Watercourses_VA.942")) { LOG.info("Verifying feature with feature id = Watercourses_VA.942"); // check feature name assertEquals("Watercourse", feature.getName().getLocalPart()); // check feature property list Property[] props = feature.getProperties(); assertEquals(18, props.length); // check property localType for (Property prop : props) { LOG.debug("Found property " + prop.getName().toString()); if (prop.getName().getLocalPart().equals("localType")) { LOG.info("Verifying of Property Watercourse:localType"); assertEquals("Fluss, Bach", prop.getValue().toString()); } } } } } /** * Test method for {@link eu.esdihumboldt.gmlhandler.GmlHandler#writeFC(org.deegree.feature.FeatureCollection)} . * @throws IllegalAccessException * @throws InstantiationException * @throws ClassNotFoundException * @throws IOException * @throws FactoryConfigurationError * @throws TransformationException * @throws UnknownCRSException * @throws XMLStreamException * @throws ClassCastException * @throws FileNotFoundException * @throws XMLParsingException */ @Test public final void testWriteFC() throws XMLParsingException, FileNotFoundException, ClassCastException, XMLStreamException, UnknownCRSException, TransformationException, FactoryConfigurationError, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException { // TODO provide XUNIT-based testing // TODO clean up generated file after gmlHandler.writeFC(gmlHandler.readFC()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c14455e878121aaf3636f4e7d0b0bdedbba03831
dba87418d2286ce141d81deb947305a0eaf9824f
/sources/com/lowagie/text/Table.java
7df6e3d9dbe5e2541fc5dc7a30a1bf7b65d1dacc
[]
no_license
Sluckson/copyOavct
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
refs/heads/main
2023-03-09T12:14:38.824373
2021-02-26T01:38:16
2021-02-26T01:38:16
341,292,450
0
1
null
null
null
null
UTF-8
Java
false
false
32,444
java
package com.lowagie.text; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import harmony.java.awt.Dimension; import harmony.java.awt.Point; import java.util.ArrayList; import java.util.Iterator; public class Table extends Rectangle implements LargeElement { private int alignment; protected boolean autoFillEmptyCells; private float cellpadding; boolean cellsFitPage; private float cellspacing; private int columns; protected boolean complete; protected boolean convert2pdfptable; private Point curPosition; private Cell defaultCell; private int lastHeaderRow; private boolean locked; private boolean mTableInserted; protected boolean notAddedYet; float offset; private ArrayList rows; boolean tableFitsPage; private float width; private float[] widths; public boolean isNestable() { return true; } public int type() { return 22; } public Table(int i) throws BadElementException { this(i, 1); } public Table(int i, int i2) throws BadElementException { super(0.0f, 0.0f, 0.0f, 0.0f); this.rows = new ArrayList(); this.curPosition = new Point(0, 0); this.defaultCell = new Cell(true); this.lastHeaderRow = -1; this.alignment = 1; this.width = 80.0f; this.locked = false; this.mTableInserted = false; this.autoFillEmptyCells = false; this.tableFitsPage = false; this.cellsFitPage = false; this.offset = Float.NaN; this.convert2pdfptable = false; this.notAddedYet = true; this.complete = true; setBorder(15); setBorderWidth(1.0f); this.defaultCell.setBorder(15); if (i > 0) { this.columns = i; for (int i3 = 0; i3 < i2; i3++) { this.rows.add(new Row(i)); } this.curPosition = new Point(0, 0); this.widths = new float[i]; float f = 100.0f / ((float) i); for (int i4 = 0; i4 < i; i4++) { this.widths[i4] = f; } return; } throw new BadElementException("A table should have at least 1 column."); } public Table(Table table) { super(0.0f, 0.0f, 0.0f, 0.0f); this.rows = new ArrayList(); this.curPosition = new Point(0, 0); this.defaultCell = new Cell(true); this.lastHeaderRow = -1; this.alignment = 1; this.width = 80.0f; this.locked = false; this.mTableInserted = false; this.autoFillEmptyCells = false; this.tableFitsPage = false; this.cellsFitPage = false; this.offset = Float.NaN; this.convert2pdfptable = false; this.notAddedYet = true; this.complete = true; cloneNonPositionParameters(table); this.columns = table.columns; this.rows = table.rows; this.curPosition = table.curPosition; this.defaultCell = table.defaultCell; this.lastHeaderRow = table.lastHeaderRow; this.alignment = table.alignment; this.cellpadding = table.cellpadding; this.cellspacing = table.cellspacing; this.width = table.width; this.widths = table.widths; this.autoFillEmptyCells = table.autoFillEmptyCells; this.tableFitsPage = table.tableFitsPage; this.cellsFitPage = table.cellsFitPage; this.offset = table.offset; this.convert2pdfptable = table.convert2pdfptable; } public boolean process(ElementListener elementListener) { try { return elementListener.add(this); } catch (DocumentException unused) { return false; } } public ArrayList getChunks() { return new ArrayList(); } public int getColumns() { return this.columns; } public int size() { return this.rows.size(); } public Dimension getDimension() { return new Dimension(this.columns, size()); } public Cell getDefaultCell() { return this.defaultCell; } public void setDefaultCell(Cell cell) { this.defaultCell = cell; } public int getLastHeaderRow() { return this.lastHeaderRow; } public void setLastHeaderRow(int i) { this.lastHeaderRow = i; } public int endHeaders() { this.lastHeaderRow = this.curPosition.f4903x - 1; return this.lastHeaderRow; } public int getAlignment() { return this.alignment; } public void setAlignment(int i) { this.alignment = i; } public void setAlignment(String str) { if ("Left".equalsIgnoreCase(str)) { this.alignment = 0; } else if ("right".equalsIgnoreCase(str)) { this.alignment = 2; } else { this.alignment = 1; } } public float getPadding() { return this.cellpadding; } public void setPadding(float f) { this.cellpadding = f; } public float getSpacing() { return this.cellspacing; } public void setSpacing(float f) { this.cellspacing = f; } public void setAutoFillEmptyCells(boolean z) { this.autoFillEmptyCells = z; } public float getWidth() { return this.width; } public void setWidth(float f) { this.width = f; } public boolean isLocked() { return this.locked; } public void setLocked(boolean z) { this.locked = z; } public float[] getProportionalWidths() { return this.widths; } public void setWidths(float[] fArr) throws BadElementException { int i; if (fArr.length == this.columns) { int i2 = 0; int i3 = 0; float f = 0.0f; while (true) { i = this.columns; if (i3 >= i) { break; } f += fArr[i3]; i3++; } this.widths[i - 1] = 100.0f; while (true) { int i4 = this.columns; if (i2 < i4 - 1) { float f2 = (fArr[i2] * 100.0f) / f; float[] fArr2 = this.widths; fArr2[i2] = f2; int i5 = i4 - 1; fArr2[i5] = fArr2[i5] - f2; i2++; } else { return; } } } else { throw new BadElementException("Wrong number of columns."); } } public void setWidths(int[] iArr) throws DocumentException { float[] fArr = new float[iArr.length]; for (int i = 0; i < iArr.length; i++) { fArr[i] = (float) iArr[i]; } setWidths(fArr); } public boolean isTableFitsPage() { return this.tableFitsPage; } public void setTableFitsPage(boolean z) { this.tableFitsPage = z; if (z) { setCellsFitPage(true); } } public boolean isCellsFitPage() { return this.cellsFitPage; } public void setCellsFitPage(boolean z) { this.cellsFitPage = z; } public void setOffset(float f) { this.offset = f; } public float getOffset() { return this.offset; } public boolean isConvert2pdfptable() { return this.convert2pdfptable; } public void setConvert2pdfptable(boolean z) { this.convert2pdfptable = z; } public void addCell(Cell cell, int i, int i2) throws BadElementException { addCell(cell, new Point(i, i2)); } public void addCell(Cell cell, Point point) throws BadElementException { if (cell == null) { throw new NullPointerException("addCell - cell has null-value"); } else if (point != null) { if (cell.isTable()) { insertTable((Table) cell.getElements().next(), point); } if (point.f4903x < 0) { throw new BadElementException("row coordinate of location must be >= 0"); } else if (point.f4904y <= 0 && point.f4904y > this.columns) { throw new BadElementException("column coordinate of location must be >= 0 and < nr of columns"); } else if (isValidLocation(cell, point)) { if (cell.getBorder() == -1) { cell.setBorder(this.defaultCell.getBorder()); } cell.fill(); placeCell(this.rows, cell, point); setCurrentLocationToNextValidPosition(point); } else { throw new BadElementException("Adding a cell at the location (" + point.f4903x + "," + point.f4904y + ") with a colspan of " + cell.getColspan() + " and a rowspan of " + cell.getRowspan() + " is illegal (beyond boundaries/overlapping)."); } } else { throw new NullPointerException("addCell - point has null-value"); } } public void addCell(Cell cell) { try { addCell(cell, this.curPosition); } catch (BadElementException unused) { } } public void addCell(Phrase phrase) throws BadElementException { addCell(phrase, this.curPosition); } public void addCell(Phrase phrase, Point point) throws BadElementException { Cell cell = new Cell((Element) phrase); cell.setBorder(this.defaultCell.getBorder()); cell.setBorderWidth(this.defaultCell.getBorderWidth()); cell.setBorderColor(this.defaultCell.getBorderColor()); cell.setBackgroundColor(this.defaultCell.getBackgroundColor()); cell.setHorizontalAlignment(this.defaultCell.getHorizontalAlignment()); cell.setVerticalAlignment(this.defaultCell.getVerticalAlignment()); cell.setColspan(this.defaultCell.getColspan()); cell.setRowspan(this.defaultCell.getRowspan()); addCell(cell, point); } public void addCell(String str) throws BadElementException { addCell(new Phrase(str), this.curPosition); } public void addCell(String str, Point point) throws BadElementException { addCell(new Phrase(str), point); } public void insertTable(Table table) { if (table != null) { insertTable(table, this.curPosition); return; } throw new NullPointerException("insertTable - table has null-value"); } public void insertTable(Table table, int i, int i2) { if (table != null) { insertTable(table, new Point(i, i2)); return; } throw new NullPointerException("insertTable - table has null-value"); } public void insertTable(Table table, Point point) { if (table == null) { throw new NullPointerException("insertTable - table has null-value"); } else if (point != null) { this.mTableInserted = true; table.complete(); if (point.f4904y <= this.columns) { int size = (point.f4903x + 1) - this.rows.size(); if (size > 0) { for (int i = 0; i < size; i++) { this.rows.add(new Row(this.columns)); } } ((Row) this.rows.get(point.f4903x)).setElement(table, point.f4904y); setCurrentLocationToNextValidPosition(point); return; } throw new IllegalArgumentException("insertTable -- wrong columnposition(" + point.f4904y + ") of location; max =" + this.columns); } else { throw new NullPointerException("insertTable - point has null-value"); } } public void addColumns(int i) { int i2; ArrayList arrayList = new ArrayList(this.rows.size()); int i3 = this.columns + i; int i4 = 0; while (i4 < this.rows.size()) { Row row = new Row(i3); int i5 = 0; while (true) { i2 = this.columns; if (i5 >= i2) { break; } row.setElement(((Row) this.rows.get(i4)).getCell(i5), i5); i5++; } while (i2 < i3 && i4 < this.curPosition.f4903x) { row.setElement((Object) null, i2); i2++; } arrayList.add(row); i4++; } float[] fArr = new float[i3]; System.arraycopy(this.widths, 0, fArr, 0, this.columns); for (int i6 = this.columns; i6 < i3; i6++) { fArr[i6] = 0.0f; } this.columns = i3; this.widths = fArr; this.rows = arrayList; } public void deleteColumn(int i) throws BadElementException { int i2 = this.columns - 1; this.columns = i2; float[] fArr = new float[i2]; System.arraycopy(this.widths, 0, fArr, 0, i); System.arraycopy(this.widths, i + 1, fArr, i, this.columns - i); setWidths(fArr); System.arraycopy(this.widths, 0, fArr, 0, this.columns); this.widths = fArr; int size = this.rows.size(); for (int i3 = 0; i3 < size; i3++) { Row row = (Row) this.rows.get(i3); row.deleteColumn(i); this.rows.set(i3, row); } if (i == this.columns) { Point point = this.curPosition; point.setLocation(point.f4903x + 1, 0); } } public boolean deleteRow(int i) { if (i < 0 || i >= this.rows.size()) { return false; } this.rows.remove(i); Point point = this.curPosition; point.setLocation(point.f4903x - 1, this.curPosition.f4904y); return true; } public void deleteAllRows() { this.rows.clear(); this.rows.add(new Row(this.columns)); this.curPosition.setLocation(0, 0); this.lastHeaderRow = -1; } public boolean deleteLastRow() { return deleteRow(this.rows.size() - 1); } public void complete() { if (this.mTableInserted) { mergeInsertedTables(); this.mTableInserted = false; } if (this.autoFillEmptyCells) { fillEmptyMatrixCells(); } } public Object getElement(int i, int i2) { return ((Row) this.rows.get(i)).getCell(i2); } private void mergeInsertedTables() { int i; float[] fArr; float[] fArr2; Table table; float[][] fArr3; float[][] fArr4; Table table2 = this; int i2 = table2.columns; int[] iArr = new int[i2]; float[][] fArr5 = new float[i2][]; int[] iArr2 = new int[table2.rows.size()]; int i3 = 0; int i4 = 0; boolean z = false; while (true) { i = 1; if (i3 >= table2.columns) { break; } boolean z2 = z; int i5 = 1; float[] fArr6 = null; int i6 = 0; while (i6 < table2.rows.size()) { if (Table.class.isInstance(((Row) table2.rows.get(i6)).getCell(i3))) { Table table3 = (Table) ((Row) table2.rows.get(i6)).getCell(i3); if (fArr6 == null) { fArr6 = table3.widths; i5 = fArr6.length; fArr3 = fArr5; z2 = true; } else { int i7 = table3.getDimension().width; float[] fArr7 = new float[(fArr6.length * i7)]; float f = table3.widths[0] + 0.0f; float f2 = fArr6[0] + 0.0f; int i8 = 0; int i9 = 0; int i10 = 0; float f3 = 0.0f; while (i9 < fArr6.length && i10 < i7) { if (f > f2) { fArr7[i8] = f2 - f3; i9++; if (i9 < fArr6.length) { f2 += fArr6[i9]; } fArr4 = fArr5; } else { fArr7[i8] = f - f3; i10++; fArr4 = fArr5; if (((double) Math.abs(f - f2)) < 1.0E-4d && (i9 = i9 + 1) < fArr6.length) { f2 += fArr6[i9]; } if (i10 < i7) { f += table3.widths[i10]; } } f3 += fArr7[i8]; i8++; fArr5 = fArr4; } fArr3 = fArr5; float[] fArr8 = new float[i8]; System.arraycopy(fArr7, 0, fArr8, 0, i8); fArr6 = fArr8; i5 = i8; z2 = true; i6++; table2 = this; fArr5 = fArr3; } } else { fArr3 = fArr5; } i6++; table2 = this; fArr5 = fArr3; } fArr5[i3] = fArr6; i4 += i5; iArr[i3] = i5; i3++; z = z2; } int i11 = 0; int i12 = 0; while (i11 < table2.rows.size()) { int i13 = 1; for (int i14 = 0; i14 < table2.columns; i14++) { if (Table.class.isInstance(((Row) table2.rows.get(i11)).getCell(i14))) { Table table4 = (Table) ((Row) table2.rows.get(i11)).getCell(i14); if (table4.getDimension().height > i13) { i13 = table4.getDimension().height; } z = true; } } i12 += i13; iArr2[i11] = i13; i11++; i = 1; } if (i4 != table2.columns || i12 != table2.rows.size() || z) { float[] fArr9 = new float[i4]; int i15 = 0; int i16 = 0; while (true) { float[] fArr10 = table2.widths; if (i15 >= fArr10.length) { break; } float[] fArr11 = fArr9; if (iArr[i15] != 1) { for (int i17 = 0; i17 < iArr[i15]; i17++) { fArr11[i16] = (table2.widths[i15] * fArr5[i15][i17]) / 100.0f; i16++; } } else { fArr11[i16] = fArr10[i15]; i16++; } i15++; fArr9 = fArr11; i = 1; } ArrayList arrayList = new ArrayList(i12); int i18 = 0; while (i18 < i12) { float[] fArr12 = fArr9; arrayList.add(new Row(i4)); i18++; i = 1; } int i19 = 0; for (int i20 = 0; i20 < table2.rows.size(); i20++) { int i21 = 0; int i22 = 0; while (i21 < table2.columns) { if (Table.class.isInstance(((Row) table2.rows.get(i20)).getCell(i21))) { Table table5 = (Table) ((Row) table2.rows.get(i20)).getCell(i21); int[] iArr3 = new int[(table5.widths.length + i)]; int i23 = 0; int i24 = 0; while (true) { float[] fArr13 = table5.widths; if (i23 >= fArr13.length) { break; } Table table6 = table5; float[] fArr14 = fArr9; iArr3[i23] = i22 + i24; float f4 = fArr13[i23]; int i25 = i24; float f5 = 0.0f; while (true) { if (i25 >= iArr[i21]) { i24 = i25; break; } i24 = i25 + 1; f5 += fArr5[i21][i25]; float f6 = f4; if (((double) Math.abs(f4 - f5)) < 1.0E-4d) { break; } f4 = f6; i25 = i24; } i23++; table5 = table6; fArr9 = fArr14; } iArr3[i23] = i22 + i24; for (int i26 = 0; i26 < table5.getDimension().height; i26++) { int i27 = 0; while (i27 < table5.getDimension().width) { Object element = table5.getElement(i26, i27); if (element != null) { int i28 = i22 + i27; table = table5; if (Cell.class.isInstance(element)) { Cell cell = (Cell) element; i28 = iArr3[i27]; fArr2 = fArr9; cell.setColspan(iArr3[i27 + cell.getColspan()] - i28); } else { fArr2 = fArr9; } ((Row) arrayList.get(i26 + i19)).addElement(element, i28); } else { table = table5; fArr2 = fArr9; } i27++; table5 = table; fArr9 = fArr2; } } fArr = fArr9; } else { fArr = fArr9; Object element2 = table2.getElement(i20, i21); if (Cell.class.isInstance(element2)) { Cell cell2 = (Cell) element2; cell2.setRowspan((((Cell) ((Row) table2.rows.get(i20)).getCell(i21)).getRowspan() + iArr2[i20]) - 1); cell2.setColspan((((Cell) ((Row) table2.rows.get(i20)).getCell(i21)).getColspan() + iArr[i21]) - 1); table2.placeCell(arrayList, cell2, new Point(i19, i22)); } } i22 += iArr[i21]; i21++; fArr9 = fArr; i = 1; } i19 += iArr2[i20]; } table2.columns = i4; table2.rows = arrayList; table2.widths = fArr9; } } private void fillEmptyMatrixCells() { int i = 0; while (i < this.rows.size()) { try { for (int i2 = 0; i2 < this.columns; i2++) { if (!((Row) this.rows.get(i)).isReserved(i2)) { addCell(this.defaultCell, new Point(i, i2)); } } i++; } catch (BadElementException e) { throw new ExceptionConverter(e); } } } private boolean isValidLocation(Cell cell, Point point) { if (point.f4903x < this.rows.size()) { if (point.f4904y + cell.getColspan() > this.columns) { return false; } int rowspan = this.rows.size() - point.f4903x > cell.getRowspan() ? cell.getRowspan() : this.rows.size() - point.f4903x; int colspan = this.columns - point.f4904y > cell.getColspan() ? cell.getColspan() : this.columns - point.f4904y; for (int i = point.f4903x; i < point.f4903x + rowspan; i++) { for (int i2 = point.f4904y; i2 < point.f4904y + colspan; i2++) { if (((Row) this.rows.get(i)).isReserved(i2)) { return false; } } } return true; } else if (point.f4904y + cell.getColspan() > this.columns) { return false; } else { return true; } } private void assumeTableDefaults(Cell cell) { if (cell.getBorder() == -1) { cell.setBorder(this.defaultCell.getBorder()); } if (cell.getBorderWidth() == -1.0f) { cell.setBorderWidth(this.defaultCell.getBorderWidth()); } if (cell.getBorderColor() == null) { cell.setBorderColor(this.defaultCell.getBorderColor()); } if (cell.getBackgroundColor() == null) { cell.setBackgroundColor(this.defaultCell.getBackgroundColor()); } if (cell.getHorizontalAlignment() == -1) { cell.setHorizontalAlignment(this.defaultCell.getHorizontalAlignment()); } if (cell.getVerticalAlignment() == -1) { cell.setVerticalAlignment(this.defaultCell.getVerticalAlignment()); } } private void placeCell(ArrayList arrayList, Cell cell, Point point) { int rowspan = (point.f4903x + cell.getRowspan()) - arrayList.size(); assumeTableDefaults(cell); if (point.f4903x + cell.getRowspan() > arrayList.size()) { for (int i = 0; i < rowspan; i++) { arrayList.add(new Row(this.columns)); } } int i2 = point.f4903x; do { i2++; if (i2 >= point.f4903x + cell.getRowspan()) { ((Row) arrayList.get(point.f4903x)).addElement(cell, point.f4904y); return; } } while (((Row) arrayList.get(i2)).reserve(point.f4904y, cell.getColspan())); throw new RuntimeException("addCell - error in reserve"); } /* JADX WARNING: Removed duplicated region for block: B:3:0x000a */ /* Code decompiled incorrectly, please refer to instructions dump. */ private void setCurrentLocationToNextValidPosition(harmony.java.awt.Point r3) { /* r2 = this; int r0 = r3.f4903x int r3 = r3.f4904y L_0x0004: int r3 = r3 + 1 int r1 = r2.columns if (r3 != r1) goto L_0x000d int r0 = r0 + 1 r3 = 0 L_0x000d: java.util.ArrayList r1 = r2.rows int r1 = r1.size() if (r0 >= r1) goto L_0x0027 int r1 = r2.columns if (r3 >= r1) goto L_0x0027 java.util.ArrayList r1 = r2.rows java.lang.Object r1 = r1.get(r0) com.lowagie.text.Row r1 = (com.lowagie.text.Row) r1 boolean r1 = r1.isReserved(r3) if (r1 != 0) goto L_0x0004 L_0x0027: harmony.java.awt.Point r1 = new harmony.java.awt.Point r1.<init>(r0, r3) r2.curPosition = r1 return */ throw new UnsupportedOperationException("Method not decompiled: com.lowagie.text.Table.setCurrentLocationToNextValidPosition(harmony.java.awt.Point):void"); } public float[] getWidths(float f, float f2) { float f3; int i = 1; float[] fArr = new float[(this.columns + 1)]; if (this.locked) { f3 = (this.width * 100.0f) / f2; } else { f3 = this.width; } int i2 = this.alignment; if (i2 == 0) { fArr[0] = f; } else if (i2 != 2) { fArr[0] = f + (((100.0f - f3) * f2) / 200.0f); } else { fArr[0] = f + (((100.0f - f3) * f2) / 100.0f); } float f4 = (f2 * f3) / 100.0f; while (true) { int i3 = this.columns; if (i >= i3) { fArr[i3] = fArr[0] + f4; return fArr; } int i4 = i - 1; fArr[i] = fArr[i4] + ((this.widths[i4] * f4) / 100.0f); i++; } } public Iterator iterator() { return this.rows.iterator(); } public PdfPTable createPdfPTable() throws BadElementException { PdfPCell pdfPCell; if (this.convert2pdfptable) { setAutoFillEmptyCells(true); complete(); PdfPTable pdfPTable = new PdfPTable(this.widths); pdfPTable.setComplete(this.complete); if (isNotAddedYet()) { pdfPTable.setSkipFirstHeader(true); } SimpleTable simpleTable = new SimpleTable(); simpleTable.cloneNonPositionParameters(this); simpleTable.setCellspacing(this.cellspacing); pdfPTable.setTableEvent(simpleTable); pdfPTable.setHeaderRows(this.lastHeaderRow + 1); pdfPTable.setSplitLate(this.cellsFitPage); pdfPTable.setKeepTogether(this.tableFitsPage); if (!Float.isNaN(this.offset)) { pdfPTable.setSpacingBefore(this.offset); } pdfPTable.setHorizontalAlignment(this.alignment); if (this.locked) { pdfPTable.setTotalWidth(this.width); pdfPTable.setLockedWidth(true); } else { pdfPTable.setWidthPercentage(this.width); } Iterator it = iterator(); while (it.hasNext()) { Row row = (Row) it.next(); for (int i = 0; i < row.getColumns(); i++) { Element element = (Element) row.getCell(i); if (element != null) { if (element instanceof Table) { pdfPCell = new PdfPCell(((Table) element).createPdfPTable()); } else if (element instanceof Cell) { Cell cell = (Cell) element; pdfPCell = cell.createPdfPCell(); pdfPCell.setPadding(this.cellpadding + (this.cellspacing / 2.0f)); SimpleCell simpleCell = new SimpleCell(false); simpleCell.cloneNonPositionParameters(cell); simpleCell.setSpacing(this.cellspacing * 2.0f); pdfPCell.setCellEvent(simpleCell); } else { pdfPCell = new PdfPCell(); } pdfPTable.addCell(pdfPCell); } } } return pdfPTable; } throw new BadElementException("No error, just an old style table"); } public boolean isNotAddedYet() { return this.notAddedYet; } public void setNotAddedYet(boolean z) { this.notAddedYet = z; } public void flushContent() { setNotAddedYet(false); ArrayList arrayList = new ArrayList(); for (int i = 0; i < getLastHeaderRow() + 1; i++) { arrayList.add(this.rows.get(i)); } this.rows = arrayList; } public boolean isComplete() { return this.complete; } public void setComplete(boolean z) { this.complete = z; } public Cell getDefaultLayout() { return getDefaultCell(); } public void setDefaultLayout(Cell cell) { this.defaultCell = cell; } }
[ "lucksonsurprice94@gmail.com" ]
lucksonsurprice94@gmail.com
5474fe371349fe55493d9e640f956d983376ffb2
76326a5d4a7d74a46a20fb5fbc2be176d5767901
/src/ChristianA2/OverrideParent.java
c50ea9807b6478d8ff3d50bc38fbde6ef1e21060
[]
no_license
ChrisgetGit/Java.W2D4.Ekinci.Sander
9a5511d3f93d11bd02d2f4d20438e0c0ca43d0c9
549c928ee869df388e0542b79c35b7811783a37a
refs/heads/master
2022-11-08T20:52:58.071913
2020-07-09T12:55:01
2020-07-09T12:55:01
278,290,259
0
0
null
null
null
null
UTF-8
Java
false
false
142
java
package ChristianA2; public class OverrideParent { public void text (){ System.out.println("This is the parent class"); } }
[ "jimmyjaytscheina@gmail.com" ]
jimmyjaytscheina@gmail.com
da30a6cc3fce470cbd3c4f5d84e38d68fd4636c8
d8f2f3fe51a3ff82b89b53b53ff9eb1f9e590027
/hadoop/page_rank/src/main/java/org/mdp/learn/hadoop/page_rank/PrDriver.java
26585c9b111e44ff2562e7adab5df3e73243135b
[]
no_license
marcodippy/learning_hadoop
64cc06e91e42003238f72a56070c868d2047f9a4
58569ee95688a22942b473c20868cc0809526752
refs/heads/master
2021-01-10T07:54:20.865853
2015-12-05T16:11:37
2015-12-05T16:11:37
44,393,404
3
0
null
null
null
null
UTF-8
Java
false
false
1,962
java
package org.mdp.learn.hadoop.page_rank; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; import org.mdp.learn.hadoop.commons.HdfsUtils; public class PrDriver extends Configured implements Tool { public int run(String[] args) throws Exception { String INPUT_FILE = args[0], OUTPUT_FILE = args[2]; Long NUMBER_OF_NODES = Long.parseLong(args[1]), MAX_ITERATIONS = Long.parseLong(args[3]); long changedPageRanks = -1, lostPageRankMass = -1, iterations = 0; String tmpInputFile = INPUT_FILE; String tmpOutputFile = OUTPUT_FILE + iterations; do { PageRankJob pageRank = new PageRankJob(tmpInputFile, tmpOutputFile, NUMBER_OF_NODES).run(); pageRank.printStatus(); changedPageRanks = pageRank.getChangedPageRankNumber(); lostPageRankMass = pageRank.getLostPageRankMass(); if (iterations > 0) HdfsUtils.deleteIfExists(getConf(), new Path(tmpInputFile)); if (lostPageRankMass > 0) { tmpInputFile = tmpOutputFile; tmpOutputFile = tmpOutputFile + "_rdpr"; RedistributeLostPageRank redistributeLostPageRank = new RedistributeLostPageRank(tmpInputFile, tmpOutputFile, NUMBER_OF_NODES, lostPageRankMass).run(); changedPageRanks = redistributeLostPageRank.getChangedPageRankNumber(); // ??? HdfsUtils.deleteIfExists(getConf(), new Path(tmpInputFile)); } iterations++; tmpInputFile = tmpOutputFile; tmpOutputFile = OUTPUT_FILE + iterations; } while (changedPageRanks > 0 && iterations < MAX_ITERATIONS); HdfsUtils.rename(getConf(), new Path(tmpInputFile), new Path(OUTPUT_FILE)); System.out.println("Job finished in " + iterations + " iterations"); return 0; } public static void main(String[] args) throws Exception { System.exit(ToolRunner.run(new PrDriver(), args)); } }
[ "dpl.marco@gmail.com" ]
dpl.marco@gmail.com
bc042050cdfca87887d90aeb37fd912612037294
f4ae768f4a7075bb745af3bba676ac7ffb1be1b1
/src/TestNGFeatures/SoftAsserts.java
191b422e6df83c9fd8647211c65a14f8b31bc44a
[]
no_license
yahyagit/MyFirst
f6b9a0bbbb4c7b9775fc66c7aae7d80085ce7994
f6676e1ba92dad0a58179c8408d035220382081c
refs/heads/master
2020-03-30T18:25:26.622276
2017-07-11T07:25:36
2017-07-11T07:25:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
963
java
package TestNGFeatures; import org.testng.Assert; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; public class SoftAsserts { private SoftAssert softA = new SoftAssert(); @Test(priority=0) public void testCase1() { Assert.assertEquals("Msg", "Msg"); System.out.println("Msg"); Assert.assertEquals("Msg1", "Msg1"); System.out.println("Msg1"); } @Test(priority=1) public void testCase2() { Assert.assertEquals("Msg2", "Msg2"); System.out.println("Msg2"); Assert.assertEquals("Msg3", "Msg33"); System.out.println("Msg3"); Assert.assertEquals("Msg4", "Msg4"); System.out.println("Msg4"); } @Test(priority=2) public void testCase3() { Assert.assertEquals("Msg5", "Msg5"); System.out.println("Msg5"); softA.assertEquals("Msg6", "Msg66"); System.out.println("Msg6"); softA.assertEquals("Msg7", "Msg7"); System.out.println("Msg7"); softA.assertAll(); } }
[ "kdimuthu@gmail.com" ]
kdimuthu@gmail.com
d1a88f3d58d22b3c2c8a9192bb4ba7bd35bccaa1
c6f0eb41af209775f264da0ae56e21d7b92d8c87
/src/test/java/misc/migration/v1_1/EHistory3.java
a3756572a2f7e9be0761ef98ab8dd118539f63a2
[ "Apache-2.0" ]
permissive
JakubPetr/ebean
464d88fc466ef4e55258645c189923d99ce5d36f
4fc47fcd19b568d348bd23a35348198092318094
refs/heads/master
2021-06-05T01:53:20.477413
2021-05-23T15:45:11
2021-05-23T15:45:11
136,032,319
0
1
NOASSERTION
2023-05-08T07:01:37
2018-06-04T13:51:53
Java
UTF-8
Java
false
false
349
java
package misc.migration.v1_1; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import io.ebean.annotation.History; import io.ebean.annotation.HistoryExclude; @Entity @Table(name = "migtest_e_history3") @History public class EHistory3 { @Id Integer id; @HistoryExclude String testString; }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
5e876640500aef02f9d5b85c3c3b7aeddf0071ed
f474c2cef8eca505c5546e1d2bf898d886e147e0
/src/main/command/MonitorableThread.java
7aaed823969f41dd775558385df5d60152974e2a
[]
no_license
P2LGames/PGFramework
b081a937de4cdd4e4a5ddc76956123c5580f707a
287523390b5ad5d6890a8c0b5a8992680ef8a021
refs/heads/master
2023-07-17T01:40:57.584118
2021-01-14T05:45:28
2021-01-14T05:45:28
314,078,167
0
0
null
null
null
null
UTF-8
Java
false
false
238
java
package main.command; public interface MonitorableThread { void run(); void start(); void stop(); int getEntityId(); byte[] compileTimeoutError(); boolean isFinished(); void setTimedOut(boolean timedOut); }
[ "sterling.long@lztek.io" ]
sterling.long@lztek.io
5810cfd2eee559abcc24bc8229fe9fb4fc1b8c70
fdab1c9c2e8325d5568a9c2f6938ae035c5a18ef
/src/chen/study/day07继承与多态/内部类/成员内部类的定义与使用/Demo01InnerClass.java
5776900c27ba0ceab2808e4a84aa3571088c1cc8
[]
no_license
2199830642/Java-JavaWeb-Knowledge-points
95be9504e925200e83caebf02f0137f09edd72fe
bf7a3c44843cb434550346c731a7faf9f2282962
refs/heads/master
2022-12-01T19:39:00.466558
2020-08-06T14:46:13
2020-08-06T14:46:13
284,613,470
2
1
null
null
null
null
UTF-8
Java
false
false
1,199
java
package chen.study.day07继承与多态.内部类.成员内部类的定义与使用; /* * 如果一个事物的内部 包含另一个事物,这就是一个类包括另外一个类 * :身体与心脏的关系,汽车与发动机 * * 分类 * 1.成员内部类 * 2.局部内部类(包含匿名内部类) * * 1.成员内部类的格式: * 修饰符 class 类名称{ 外部类名称 * 修饰符 class 类名称{} 内部类名称 * } * 注意:内用外,随意使用,外用内,一定需要借助内部类对象 * * 如何使用成员内部类: * 1.间接使用:在外部类的方法中使用内部类,main只是调用外部类方法 * 2.直接使用:公式:【外部类名称.内部类名称 对象名 = new 外部类名称().new 内部类名称();】 * */ public class Demo01InnerClass { public static void main(String[] args) { //通过外部类对象调用外部类的方法,然后里面再间接使用内部类的方法 Body body = new Body(); body.setName("小陈"); body.method(); //直接调用 Body.heart heart = new Body().new heart(); heart.beat(); } }
[ "2199830642@qq.com" ]
2199830642@qq.com
0cb1dfe1ad3d8ffda734ba38ec21ab1e206f18d3
803a81cbf3b2c615cbff2bb4a724b3672dd13cdf
/src/main/java/com/cda/gateway/config/CacheConfiguration.java
47264e83767fca2bbb29aa9d8203c398b0f99052
[]
no_license
mbobadilla/jhipster-wateway-application
8ec5238fa4bc04bf1d94961286889962d52cf6bf
02629cb9e0a6a1e93a3f996063c372d427d57124
refs/heads/master
2022-12-21T23:39:24.412381
2020-02-20T13:53:18
2020-02-20T13:53:18
241,896,645
0
0
null
2022-12-16T05:13:12
2020-02-20T13:53:02
Java
UTF-8
Java
false
false
2,530
java
package com.cda.gateway.config; import java.time.Duration; import org.ehcache.config.builders.*; import org.ehcache.jsr107.Eh107Configuration; import org.hibernate.cache.jcache.ConfigSettings; import io.github.jhipster.config.JHipsterProperties; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.serviceregistry.Registration; import org.springframework.context.annotation.*; @Configuration @EnableCaching public class CacheConfiguration { private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration; public CacheConfiguration(JHipsterProperties jHipsterProperties) { JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache(); jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration( CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(ehcache.getMaxEntries())) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds()))) .build()); } @Bean public HibernatePropertiesCustomizer hibernatePropertiesCustomizer(javax.cache.CacheManager cacheManager) { return hibernateProperties -> hibernateProperties.put(ConfigSettings.CACHE_MANAGER, cacheManager); } @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.cda.gateway.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.cda.gateway.repository.UserRepository.USERS_BY_EMAIL_CACHE); createCache(cm, com.cda.gateway.domain.User.class.getName()); createCache(cm, com.cda.gateway.domain.Authority.class.getName()); createCache(cm, com.cda.gateway.domain.User.class.getName() + ".authorities"); // jhipster-needle-ehcache-add-entry }; } private void createCache(javax.cache.CacheManager cm, String cacheName) { javax.cache.Cache<Object, Object> cache = cm.getCache(cacheName); if (cache == null) { cm.createCache(cacheName, jcacheConfiguration); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b3530bf56b7624d914f6d8f813b2f43e31194a70
845661aeac1512abf1b3a0062eef4f432e1f0f3a
/g2-report-engine/src/main/java/com/googlecode/g2re/html/style/Font.java
3c03dd520b5235295909ec0de492334be6f1b204
[]
no_license
joshualucas84/g2-report-engine
491f38f5eb0aa5c41effb674f52a1bac3766cecc
25b6fd2917351a167ac98d90431224eff9e74e3f
refs/heads/master
2021-09-08T14:26:44.979345
2009-06-15T23:18:37
2009-06-15T23:18:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,522
java
package com.googlecode.g2re.html.style; /** * Defines how an elements font should be rendered * @author Brad Rydzewski */ public class Font implements StyledElement { private Color color; private float pixels = -1; private String fontFamily; private FontStyle fontStyle; private FontWeight fontWeight; public Font() { } public Font(String fontFamily) { setFontFamily(fontFamily); } public Font(String ff, float px) { setFontFamily(ff); setPixels(px); } public Font(float px) { setPixels(px); } public Color getColor() { return color; } public void setColor(Color color) { this.color = color; } public String getFontFamily() { return fontFamily; } public void setFontFamily(String fontFamily) { this.fontFamily = fontFamily; } public FontStyle getFontStyle() { return fontStyle; } public void setFontStyle(FontStyle fontStyle) { this.fontStyle = fontStyle; } public FontWeight getFontWeight() { return fontWeight; } public void setFontWeight(FontWeight fontWeight) { this.fontWeight = fontWeight; } public float getPixels() { return pixels; } public void setPixels(float pixels) { this.pixels = pixels; } /** * Converts this object to a CSS String * @return */ public String toCSS(){ StringBuilder css = new StringBuilder(); //append font-family if(getFontFamily()!=null && getFontFamily().isEmpty()==false){ css.append("font-family:").append(getFontFamily()); } if(getFontWeight()!=null) css.append(getFontWeight().toCSS()); if(getFontStyle()!=null) css.append(getFontStyle().toCSS()); if(getColor()!=null) css.append("color:").append(getColor().toString()).append(";"); if(getPixels()!=-1) css.append("font-size:").append(getPixels()).append(";"); return css.toString(); } }
[ "brad.rydzewski@81167618-2985-11de-8eb0-8789651ec4da" ]
brad.rydzewski@81167618-2985-11de-8eb0-8789651ec4da
9f1c950a6234bc3d78dd1f641b8071bb54b7792e
8889e6727b6210c1f0c5c0cc0ccfd675207b4f1e
/app/src/main/java/com/okawa/pedro/toolbarpagerdemo/di/scope/Fragment.java
ec374433463dbb9c7b6162f9fdaf95652f5aec21
[]
no_license
PedroOkawa/toolbar-pager-view
aee9bd2a7427ddfea09d747373827ff1904138ec
ad6687ec21eff5bf1b1963f98724cec85f7841a7
refs/heads/master
2021-01-10T16:03:22.682169
2016-02-28T00:22:56
2016-02-28T00:22:56
52,692,027
0
0
null
null
null
null
UTF-8
Java
false
false
160
java
package com.okawa.pedro.toolbarpagerdemo.di.scope; import javax.inject.Scope; /** * Created by pokawa on 26/02/16. */ @Scope public @interface Fragment { }
[ "pedro.henrique.okawa@gmail.com" ]
pedro.henrique.okawa@gmail.com
8ea4e828d95add819c50ea16f550fce13b924859
af6829eaea689efb7336d3cf11a9ddb36b284b92
/src/com/fh/controller/weal/weal/WealController.java
e3629e10bbc857efb9af3ba753c79208d0efbe18
[]
no_license
MrXT/erp
f336671aebf9c3f6702a1ca364e56cee64601df4
c37f53a6183f14e34c3d159e28af56dc5dbcb5de
refs/heads/master
2021-01-11T09:00:41.561800
2017-02-08T06:50:49
2017-02-08T06:50:49
77,453,295
0
0
null
null
null
null
UTF-8
Java
false
false
9,475
java
package com.fh.controller.weal.weal; import java.io.PrintWriter; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import org.apache.commons.lang.StringUtils; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import com.fh.controller.base.BaseController; import com.fh.entity.Page; import com.fh.entity.system.User; import com.fh.util.AppUtil; import com.fh.util.Const; import com.fh.util.DateUtil; import com.fh.util.FileUpload; import com.fh.util.ObjectExcelView; import com.fh.util.PageData; import com.fh.util.Jurisdiction; import com.fh.util.PathUtil; import com.fh.util.Tools; import com.fh.service.weal.weal.WealManager; /** * 说明:福利模块 * 创建人:FH Q313596790 * 创建时间:2016-12-01 */ @Controller @RequestMapping(value="/weal") public class WealController extends BaseController { String menuUrl = "weal/list.do"; //菜单地址(权限用) @Resource(name="wealService") private WealManager wealService; /**保存 * @param * @throws Exception */ @RequestMapping(value="/save") public ModelAndView save(String TITLE,String INFOR,HttpSession session,@RequestParam(required = false,value="files") MultipartFile [] files) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"新增Weal"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 StringBuilder sb = new StringBuilder(); for (MultipartFile file : files) { String ffile = DateUtil.getDays(), fileName = ""; if (null != file && !file.isEmpty()) { String filePath = PathUtil.getPath() + Const.FILEPATHIMG + ffile; // 文件上传路径 fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); // 执行上传 sb.append(ffile + "/" + fileName+","); } else { System.out.println("上传失败"); } } if(sb.length() != 0){ sb.delete(sb.length()-1,sb.length()); } ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); User user = (User)session.getAttribute(Const.SESSION_USER); pd.put("TITLE", TITLE); pd.put("INFOR", INFOR); pd.put("imgurl", sb.toString()); pd.put("WEAL_ID", this.get32UUID()); //主键 pd.put("CTIME", new Date()); pd.put("USER_ID", user.getUSER_ID()); wealService.save(pd); mv.addObject("msg","success"); mv.setViewName("save_result"); return mv; } /**删除 * @param out * @throws Exception */ @RequestMapping(value="/delete") public void delete(PrintWriter out) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"删除Weal"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 PageData pd = new PageData(); pd = this.getPageData(); wealService.delete(pd); out.write("success"); out.close(); } /**修改 * @param * @throws Exception */ @RequestMapping(value="/edit") public ModelAndView edit(String STATUS,String WEAL_ID) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"修改Weal"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd.put("STATUS", STATUS); pd.put("WEAL_ID", WEAL_ID); wealService.edit(pd); mv.addObject("msg","success"); mv.setViewName("save_result"); return mv; } /**列表 * @param page * @throws Exception */ @RequestMapping(value="/list") public ModelAndView list(Page page) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"列表Weal"); //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); String keywords = pd.getString("keywords"); //关键词检索条件 if(null != keywords && !"".equals(keywords)){ pd.put("keywords", keywords.trim()); } page.setPd(pd); List<PageData> varList = wealService.list(page); //列出Weal列表 mv.setViewName("weal/weal/weal_list"); mv.addObject("varList", varList); mv.addObject("pd", pd); mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 return mv; } @RequestMapping(value="/scanUsers") public ModelAndView scanUsers(Page page) throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"列表Weal"); //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); String keywords = pd.getString("keywords"); //关键词检索条件 if(null != keywords && !"".equals(keywords)){ pd.put("keywords", keywords.trim()); } page.setPd(pd); List<PageData> varList = wealService.userList(page); //列出Weal列表 mv.setViewName("weal/weal/weal_user"); mv.addObject("varList", varList); mv.addObject("pd", pd); mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 return mv; } /**去新增页面 * @param * @throws Exception */ @RequestMapping(value="/goAdd") public ModelAndView goAdd()throws Exception{ ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); mv.setViewName("weal/weal/weal_edit"); mv.addObject("msg", "save"); mv.addObject("pd", pd); return mv; } /**去修改页面 * @param * @throws Exception */ @RequestMapping(value="/goEdit") public ModelAndView goEdit()throws Exception{ ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); Page page = new Page(); String type = pd.getString("type"); page.setPd(pd); pd = wealService.list(page).get(0); //根据ID读取 pd.put("type", type); if(StringUtils.isNotBlank(pd.getString("imgurl"))){ pd.put("imgurls",pd.getString("imgurl").split(",")); } mv.setViewName("weal/weal/weal_edit"); mv.addObject("msg", "edit"); mv.addObject("pd", pd); return mv; } /**批量删除 * @param * @throws Exception */ @RequestMapping(value="/deleteAll") @ResponseBody public Object deleteAll() throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"批量删除Weal"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 PageData pd = new PageData(); Map<String,Object> map = new HashMap<String,Object>(); pd = this.getPageData(); List<PageData> pdList = new ArrayList<PageData>(); String DATA_IDS = pd.getString("DATA_IDS"); if(null != DATA_IDS && !"".equals(DATA_IDS)){ String ArrayDATA_IDS[] = DATA_IDS.split(","); wealService.deleteAll(ArrayDATA_IDS); pd.put("msg", "ok"); }else{ pd.put("msg", "no"); } pdList.add(pd); map.put("list", pdList); return AppUtil.returnObject(pd, map); } /**导出到excel * @param * @throws Exception */ @RequestMapping(value="/excel") public ModelAndView exportExcel() throws Exception{ logBefore(logger, Jurisdiction.getUsername()+"导出Weal到excel"); if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} ModelAndView mv = new ModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); Map<String,Object> dataMap = new HashMap<String,Object>(); List<String> titles = new ArrayList<String>(); titles.add("福利内容"); //1 titles.add("发布时间"); //2 titles.add("标题"); //3 dataMap.put("titles", titles); List<PageData> varOList = wealService.listAll(pd); List<PageData> varList = new ArrayList<PageData>(); for(int i=0;i<varOList.size();i++){ PageData vpd = new PageData(); vpd.put("var1", varOList.get(i).getString("INFOR")); //1 vpd.put("var2", varOList.get(i).getString("CTIME")); //2 vpd.put("var3", varOList.get(i).getString("TITLE")); //3 varList.add(vpd); } dataMap.put("varList", varList); ObjectExcelView erv = new ObjectExcelView(); mv = new ModelAndView(erv,dataMap); return mv; } @InitBinder public void initBinder(WebDataBinder binder){ DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); } }
[ "di.xiao@karakal.com.cn" ]
di.xiao@karakal.com.cn
eaf3fbac45354f74a3550f194396ac60d80353d7
9479affecbead662a94096e06dc1e5df6058854b
/app/src/main/java/com/pdroid84/deb/locationbyplacesapi/MainActivity.java
f297afb98f0accce7416752fe6b517bc4d7aacda
[]
no_license
pdroid84/LocationByPlacesAPI
f3aa2ad96c5337ff8db1708c4f58921d4d6efb11
27da2773cfadd2c1abbbf6119220a3b6547619f9
refs/heads/master
2021-01-10T05:30:07.032885
2015-06-06T22:17:13
2015-06-06T22:17:13
36,996,858
0
0
null
null
null
null
UTF-8
Java
false
false
3,489
java
package com.pdroid84.deb.locationbyplacesapi; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.ResultCallback; import com.google.android.gms.location.places.PlaceLikelihood; import com.google.android.gms.location.places.PlaceLikelihoodBuffer; import com.google.android.gms.location.places.Places; public class MainActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener{ private GoogleApiClient mGoogleApiClient; private String TAG = "DEB"; @Override protected void onCreate(Bundle savedInstanceState) { Log.d(TAG,"onCreate is called"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mGoogleApiClient = new GoogleApiClient .Builder(this) .addApi(Places.GEO_DATA_API) .addApi(Places.PLACE_DETECTION_API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); } @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); } @Override protected void onStart() { Log.d(TAG,"onStart is called"); super.onStart(); mGoogleApiClient.connect(); } @Override protected void onStop() { Log.d(TAG,"onStop is called"); mGoogleApiClient.disconnect(); super.onStop(); } @Override public void onConnected(Bundle bundle) { Log.d(TAG,"onConnected is called"); PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi .getCurrentPlace(mGoogleApiClient, null); result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() { @Override public void onResult(PlaceLikelihoodBuffer likelyPlaces) { Log.d(TAG,"onResult is called"); for (PlaceLikelihood placeLikelihood : likelyPlaces) { Log.d(TAG, String.format("Place '%s' has likelihood: %g", placeLikelihood.getPlace().getName(), placeLikelihood.getLikelihood())); } likelyPlaces.release(); } }); } @Override public void onConnectionSuspended(int i) { Log.d(TAG,"onConnectionSuspended is called"); } @Override public void onConnectionFailed(ConnectionResult connectionResult) { Log.d(TAG,"onConnectionFailed is called"); } }
[ "pdroid84@gmail.com" ]
pdroid84@gmail.com
333913d5a481b2b724c9be02e4eb52538ef806f6
f8c8707eeb0719e3f75e745fcbf8597745008b47
/java code/eclipse-workspace/springboot-data/src/main/java/com/edubridge/springboot/data/service/DepartmentService.java
2d6c2820eeb4898dbaf3ff120e445aa107ed7246
[]
no_license
gousiya669/edubridgeprojects
3dd296d5f83145d59823ad25a2d5239af88c4357
363a0cef5d3b4d9e214296e2edad7932fe9701c3
refs/heads/master
2023-08-12T20:18:12.974442
2021-10-05T16:50:36
2021-10-05T16:50:36
384,156,276
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package com.edubridge.springboot.data.service; import java.util.List; import com.edubridge.springboot.data.entities.Department; public interface DepartmentService { public Department saveDepartment(Department department); public List<Department> getAllDepartments(); public Department getDepartmentById(int deptId); public void deleteDepartmentById(int deptId); public Department updateDepartment(int deptId , Department department); }
[ "gousiya.webd@gmail.com" ]
gousiya.webd@gmail.com
cc275a0cb2cc7060098a37287eab394e36e54422
5433952408c865653c6b60212eaaa15c4bbab49c
/Util.java
6ba0ff9f73977645734cf320533e17d1d20eca1b
[]
no_license
andrew-weinrich/questions
176c42fcc797f2d95d840afb3a6322d082ada7ab
03c2e54c61c9fe1b4ae607f286f5413372cbc245
refs/heads/master
2020-03-08T22:56:27.755028
2018-04-07T01:37:58
2018-04-07T01:37:58
128,447,358
0
0
null
null
null
null
UTF-8
Java
false
false
2,166
java
public class Util { // Converts a list to a string representation // // technically, we could just convert the expected and actual outputs to strings // and then compare those strings, but that's not going to age well. // better to just test the actual elements, and use the string rep for debugging public static String listToString(ListNode list) { // empty list case if (list == null) return "(null)"; StringBuilder builder = new StringBuilder(); builder.append(list.val); ListNode currentNode = list.next; while (currentNode != null) { builder.append("->"); builder.append(currentNode.val); currentNode = currentNode.next; } return builder.toString(); } // compares two lists. returns null if they are identical, or an error string if they are not public static String compareLists(ListNode list1, ListNode list2) { ListNode currentOne = list1; ListNode currentTwo = list2; int index = 0; while (currentTwo != null) { if (currentOne == null) { return "Not enough elements in list1"; } if (currentTwo.val != currentOne.val) return "Mismatch on element " + index + ": " + currentOne.val; currentTwo = currentTwo.next; currentOne = currentOne.next; index++; } // check to make sure the actual output isn't too long if (currentOne != null) return "Extra elements in list1"; return null; } // builds a linked list from an array of numbers public static ListNode buildList(int[] numbers) { ListNode output = new ListNode(-1); ListNode current = output; for (int i = 0; i < numbers.length; i++) { ListNode node = new ListNode(numbers[i]); current.next = node; current = current.next; } return output.next; } }
[ "andrew.weinrich@gmail.com" ]
andrew.weinrich@gmail.com
e69600ab7bd5554375dbaa92dae2bf5be5010aeb
7e953bd2ce9f2bf1364e1bd09e2763723b46db65
/src/main/java/core/utilities/General.java
8939c8c8197689c3703836d3fd2110f6b0ec6d09
[]
no_license
KOM-Framework/kom-java
a1f1904a6caa0d5c5b1611836312bb2441589096
5a8c4919db5506ba1bd8073fb95c13dce608de5a
refs/heads/master
2020-04-05T13:01:57.868635
2017-07-04T14:25:20
2017-07-04T14:25:20
95,032,450
0
0
null
2017-07-30T19:50:25
2017-06-21T18:07:59
Java
UTF-8
Java
false
false
4,570
java
package core.utilities; import org.openqa.selenium.By; import java.util.ArrayList; /** * Created by olehk on 07/04/2017. */ public class General { public static String getMiddleValue(String originalString, String startSubStr, String endSubStr){ String out = originalString.substring(originalString.lastIndexOf(startSubStr)+startSubStr.length(), originalString.indexOf(endSubStr));; return out; } public static ArrayList<By> byChainedToByList(Object id){ String tempString = id.toString(); tempString = General.getMiddleValue(tempString, "By.chained({", "})"); String[] arr = tempString.split(",By."); ArrayList<By> out = new ArrayList<>(); for(String idString:arr){ String expression =idString.substring(idString.indexOf(":")+1, idString.length()).trim(); idString = idString.substring(0,idString.indexOf(":")).trim().replace("By.", ""); switch(idString) { case "xpath": out.add(By.xpath(expression)); break; case "id": out.add(By.id(expression)); break; } } return out; } public enum OrderType { ASC, DESC } public static boolean compareListStringOrder(ArrayList<String> resultList, OrderType orderType){ boolean compareResult=false; if (resultList.size()==0 | resultList.size()==1) { compareResult = true; }else { for (int i = 0; i < resultList.size() - 1; i++) { String currentString = resultList.get(i); String nextString = resultList.get(i + 1); if (currentString.isEmpty() && nextString.isEmpty()) { compareResult = true; i++; } if (!currentString.isEmpty() && currentString != null) { if (!nextString.isEmpty() && nextString != null) { switch (orderType) { case ASC: compareResult = nextString.toLowerCase().compareTo(currentString.toLowerCase()) >= 0; break; case DESC: compareResult = nextString.toLowerCase().compareTo(currentString.toLowerCase()) <= 0; break; } if (!compareResult) { Log.info(String.format("comparing results with %s order, current value: %s with next value: %s", orderType, currentString, nextString)); break; } } } } } return compareResult; } public static boolean compareNumericListOrder(ArrayList<String> resultList, OrderType orderType){ boolean compareResult=false; if (resultList.size()==0 | resultList.size()==1) { compareResult = true; }else { for (int i = 0; i < resultList.size() - 1; i++) { String currentString = resultList.get(i).replaceAll("\\s", "").replace(".", "").replace(",", ""); String nextString = resultList.get(i+1).replaceAll("\\s", "").replace(".", "").replace(",", ""); if (currentString.isEmpty() && nextString.isEmpty()) { compareResult = true; i++; } if (!currentString.isEmpty() && currentString != null) { Long currentValue = Long.valueOf(currentString); if (!currentString.isEmpty() && nextString != null) { Long nextValue = Long.valueOf(nextString); switch (orderType) { case ASC: compareResult = nextValue >= currentValue; break; case DESC: compareResult = nextValue <= currentValue; break; } if (!compareResult) { Log.info(String.format("comparing results with %s order, current value: %s with next value: %s", orderType, currentString, nextString)); break; } } } } } return compareResult; } }
[ "kuzovkov.oleg@gmail.com" ]
kuzovkov.oleg@gmail.com
a74fff7eb54e2ee62437a87dd40c5fb2c71a8238
c99ecaf5692a5dd3c4b6c5af8960b958ef61d22f
/excelClassExceptionDebug/src/jxl/Workbook.java
d03660e3c8238823bbaf89fb5c8f5e6ac5745109
[]
no_license
bloomer024/Mobile-Development
afc00c65c7b3ae98ac93a2d2ab3e5b629a8e124f
d68fb0a556702e172f327ab3bc0da8d4be37034a
refs/heads/master
2020-12-27T09:34:47.148817
2013-09-03T16:40:22
2013-09-03T16:40:22
37,514,253
1
0
null
2015-06-16T07:12:33
2015-06-16T07:12:32
null
UTF-8
Java
false
false
12,899
java
/********************************************************************* * * Copyright (C) 2002 Andrew Khan * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ***************************************************************************/ package jxl; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import src.jxl.read.biff.BiffException; import src.jxl.read.biff.PasswordException; import src.jxl.read.biff.WorkbookParser; import src.jxl.write.WritableWorkbook; import src.jxl.write.biff.WritableWorkbookImpl; /** * Represents a Workbook. Contains the various factory methods and provides * a variety of accessors which provide access to the work sheets. */ public abstract class Workbook { /** * The current version of the software */ private static final String VERSION = "2.6.12"; /** * The constructor */ protected Workbook() { } /** * Gets the sheets within this workbook. Use of this method for * large worksheets can cause performance problems. * * @return an array of the individual sheets */ public abstract Sheet[] getSheets(); /** * Gets the sheet names * * @return an array of strings containing the sheet names */ public abstract String[] getSheetNames(); /** * Gets the specified sheet within this workbook * As described in the accompanying technical notes, each call * to getSheet forces a reread of the sheet (for memory reasons). * Therefore, do not make unnecessary calls to this method. Furthermore, * do not hold unnecessary references to Sheets in client code, as * this will prevent the garbage collector from freeing the memory * * @param index the zero based index of the reQuired sheet * @return The sheet specified by the index * @exception IndexOutOfBoundException when index refers to a non-existent * sheet */ public abstract Sheet getSheet(int index) throws IndexOutOfBoundsException; /** * Gets the sheet with the specified name from within this workbook. * As described in the accompanying technical notes, each call * to getSheet forces a reread of the sheet (for memory reasons). * Therefore, do not make unnecessary calls to this method. Furthermore, * do not hold unnecessary references to Sheets in client code, as * this will prevent the garbage collector from freeing the memory * * @param name the sheet name * @return The sheet with the specified name, or null if it is not found */ public abstract Sheet getSheet(String name); /** * Accessor for the software version * * @return the version */ public static String getVersion() { return VERSION; } /** * Returns the number of sheets in this workbook * * @return the number of sheets in this workbook */ public abstract int getNumberOfSheets(); /** * Gets the named cell from this workbook. If the name refers to a * range of cells, then the cell on the top left is returned. If * the name cannot be found, null is returned. * This is a convenience function to quickly access the contents * of a single cell. If you need further information (such as the * sheet or adjacent cells in the range) use the functionally * richer method, findByName which returns a list of ranges * * @param name the name of the cell/range to search for * @return the cell in the top left of the range if found, NULL * otherwise */ public abstract Cell findCellByName(String name); /** * Returns the cell for the specified location eg. "Sheet1!A4". * This is identical to using the CellReferenceHelper with its * associated performance overheads, consequently it should * be use sparingly * * @param loc the cell to retrieve * @return the cell at the specified location */ public abstract Cell getCell(String loc); /** * Gets the named range from this workbook. The Range object returns * contains all the cells from the top left to the bottom right * of the range. * If the named range comprises an adjacent range, * the Range[] will contain one object; for non-adjacent * ranges, it is necessary to return an array of length greater than * one. * If the named range contains a single cell, the top left and * bottom right cell will be the same cell * * @param name the name of the cell/range to search for * @return the range of cells, or NULL if the range does not exist */ public abstract Range[] findByName(String name); /** * Gets the named ranges * * @return the list of named cells within the workbook */ public abstract String[] getRangeNames(); /** * Determines whether the sheet is protected * * @return TRUE if the workbook is protected, FALSE otherwise */ public abstract boolean isProtected(); /** * Parses the excel file. * If the workbook is password protected a PasswordException is thrown * in case consumers of the API wish to handle this in a particular way * * @exception BiffException * @exception PasswordException */ protected abstract void parse() throws BiffException, PasswordException; /** * Closes this workbook, and frees makes any memory allocated available * for garbage collection */ public abstract void close(); /** * A factory method which takes in an excel file and reads in the contents. * * @exception IOException * @exception BiffException * @param file the excel 97 spreadsheet to parse * @return a workbook instance */ public static Workbook getWorkbook(java.io.File file) throws IOException, BiffException { return getWorkbook(file, new WorkbookSettings()); } /** * A factory method which takes in an excel file and reads in the contents. * * @exception IOException * @exception BiffException * @param file the excel 97 spreadsheet to parse * @param ws the settings for the workbook * @return a workbook instance */ public static Workbook getWorkbook(java.io.File file, WorkbookSettings ws) throws IOException, BiffException { FileInputStream fis = new FileInputStream(file); // Always close down the input stream, regardless of whether or not the // file can be parsed. Thanks to Steve Hahn for this File dataFile = null; try { dataFile = new File(fis, ws); } catch (IOException e) { fis.close(); throw e; } catch (BiffException e) { fis.close(); throw e; } fis.close(); Workbook workbook = new WorkbookParser(dataFile, ws); workbook.parse(); return workbook; } /** * A factory method which takes in an excel file and reads in the contents. * * @param is an open stream which is the the excel 97 spreadsheet to parse * @return a workbook instance * @exception IOException * @exception BiffException */ public static Workbook getWorkbook(InputStream is) throws IOException, BiffException { return getWorkbook(is, new WorkbookSettings()); } /** * A factory method which takes in an excel file and reads in the contents. * * @param is an open stream which is the the excel 97 spreadsheet to parse * @param ws the settings for the workbook * @return a workbook instance * @exception IOException * @exception BiffException */ public static Workbook getWorkbook(InputStream is, WorkbookSettings ws) throws IOException, BiffException { File dataFile = new File(is, ws); Workbook workbook = new WorkbookParser(dataFile, ws); workbook.parse(); return workbook; } /** * Creates a writable workbook with the given file name * * @param file the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(java.io.File file) throws IOException { return createWorkbook(file, new WorkbookSettings()); } /** * Creates a writable workbook with the given file name * * @param file the file to copy from * @param ws the global workbook settings * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(java.io.File file, WorkbookSettings ws) throws IOException { FileOutputStream fos = new FileOutputStream(file); WritableWorkbook w = new WritableWorkbookImpl(fos, true, ws); return w; } /** * Creates a writable workbook with the given filename as a copy of * the workbook passed in. Once created, the contents of the writable * workbook may be modified * * @param file the output file for the copy * @param in the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(java.io.File file, Workbook in) throws IOException { return createWorkbook(file, in, new WorkbookSettings()); } /** * Creates a writable workbook with the given filename as a copy of * the workbook passed in. Once created, the contents of the writable * workbook may be modified * * @param file the output file for the copy * @param in the workbook to copy * @param ws the configuration for this workbook * @return a writable workbook */ public static WritableWorkbook createWorkbook(java.io.File file, Workbook in, WorkbookSettings ws) throws IOException { FileOutputStream fos = new FileOutputStream(file); WritableWorkbook w = new WritableWorkbookImpl(fos, in, true, ws); return w; } /** * Creates a writable workbook as a copy of * the workbook passed in. Once created, the contents of the writable * workbook may be modified * * @param os the stream to write to * @param in the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os, Workbook in) throws IOException { return createWorkbook(os, in, ((WorkbookParser) in).getSettings()); } /** * Creates a writable workbook as a copy of * the workbook passed in. Once created, the contents of the writable * workbook may be modified * * @param os the output stream to write to * @param in the workbook to copy * @param ws the configuration for this workbook * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os, Workbook in, WorkbookSettings ws) throws IOException { WritableWorkbook w = new WritableWorkbookImpl(os, in, false, ws); return w; } /** * Creates a writable workbook. When the workbook is closed, * it will be streamed directly to the output stream. In this * manner, a generated excel spreadsheet can be passed from * a servlet to the browser over HTTP * * @param os the output stream * @return the writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os) throws IOException { return createWorkbook(os, new WorkbookSettings()); } /** * Creates a writable workbook. When the workbook is closed, * it will be streamed directly to the output stream. In this * manner, a generated excel spreadsheet can be passed from * a servlet to the browser over HTTP * * @param os the output stream * @param ws the configuration for this workbook * @return the writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os, WorkbookSettings ws) throws IOException { WritableWorkbook w = new WritableWorkbookImpl(os, false, ws); return w; } }
[ "dani_go91@abv.bg" ]
dani_go91@abv.bg
d7cb23ad235aeba4340e283a4fefbe07c31d1fc9
a0fc4cfd646eb59c3fd815d9b7e6ddd801ff14ea
/src/main/java/com/angelantonov/eventmaster/web/models/event/CreateEventModel.java
0963c23d3dd6c1b53d98fb563839fbe40c9cf1aa
[ "MIT" ]
permissive
angelantonov213/EventMaster
ae9366536420fb0d9bca3a466a93060e1009a482
7581137ec0002f481e14f8d5fe21d6697421aba7
refs/heads/master
2020-09-27T08:27:23.895165
2019-12-14T11:32:07
2019-12-14T11:32:07
226,474,598
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package com.angelantonov.eventmaster.web.models.event; import com.angelantonov.eventmaster.data.models.Venue; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @Getter @Setter @NoArgsConstructor public class CreateEventModel { private String name; private String description; private String imageUrl; @DateTimeFormat(pattern = "yyyy-MM-dd") private Date date; private double price; private Venue venue; }
[ "angel.antonov@taulia.com" ]
angel.antonov@taulia.com
015b9171f8fe0f4b0eab19156c70de0f31ea1a4c
431ccc0276d045e34c1749782e2d99c1179d219f
/dayOne/DataTypesAndOperators/SampleTestClass.java
d20891afaa7aaf823aa0a8b0f92e247d68e7f6cf
[]
no_license
Abeleencon/Core_java
16c8daf5bf7df8dd8760bb4f58176e457ccdc162
25d6482b56cfe3511112ff231313fd4aebdd715f
refs/heads/master
2020-04-01T15:32:21.879417
2018-10-16T19:26:01
2018-10-16T19:26:01
153,341,311
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package dayOne.DataTypesAndOperators; public class SampleTestClass { //Scope of the class //Scope of the Variable //Global variable static int num = 10; // We add static if we want to use the variable in the main or other methods static float f1 = 13.25f; public static void main(String[] args) { num = 12; System.out.println(num); } public void getOne() { //a method inside the main class 9 we can have an average of 5-8 methods in a class) // Variable inside this method are local variables } }
[ "abiodunowoseje@gmail.com" ]
abiodunowoseje@gmail.com
13b1d97bacd3167ff14540c6610ac3fb77449e42
e63e9c91333471e1a14ee98ace5a0c4f26369a2c
/src/org/campus02/zam/ss2020/threadsandmultithreading/threadstop/example/Worker.java
00265595693af91b012f9f3a04fb75c7be7dbbbe
[]
no_license
jayanthidd/Programming3
ff342216c97f0d1e487eb019f909fd679719c942
a3ee4f7f6b02b1aaa8a5cab08d93a53e88bb38c0
refs/heads/master
2023-01-01T22:01:10.341641
2020-10-19T16:01:28
2020-10-19T16:01:28
305,439,318
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package org.campus02.zam.ss2020.threadsandmultithreading.threadstop.example; public class Worker implements Runnable { public int counter= 0; private final int sleepInterval = 100; private static Object lock = new Object(); public Worker() { this.counter = 0; } @Override public void run() { synchronized (lock) { while (counter < 21) { lock.notify(); System.out.println(Thread.currentThread().getName() + "makes other threads free"); System.out.println(Thread.currentThread().getName() + " Counter : " + counter); counter++; try { Thread.sleep(sleepInterval); lock.wait(); System.out.println(Thread.currentThread().getName() + " is waiting"); } catch (InterruptedException e) { e.printStackTrace(); } } lock.notify(); } } }
[ "jayanthidhanaraj@yahoo.co.in" ]
jayanthidhanaraj@yahoo.co.in
2e546e5d7075805561689ac14e6f72dacf9eb351
223fa203e25d1882942cf77cc66ce6d54dda0953
/whoiswho-backend/src/main/java/be/g000glen00b/whoiswho/team/TeamSkillScore.java
aace79eecde3c195833323ddec13999cdb123f8c
[]
no_license
g00glen00b/whoiswho-graphql
65485afe0306d0f1eac745069087613812a854dd
802f2c75be84d8874e2aea203e26063ed2bc3b8f
refs/heads/master
2023-04-06T10:42:41.051600
2021-04-25T16:17:40
2021-04-25T16:17:40
278,083,511
41
27
null
2021-04-25T16:17:40
2020-07-08T12:29:45
JavaScript
UTF-8
Java
false
false
848
java
package be.g000glen00b.whoiswho.team; import be.g000glen00b.whoiswho.skill.Skill; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @Entity @Getter @Builder @NoArgsConstructor @AllArgsConstructor public class TeamSkillScore { @EmbeddedId private TeamSkillScoreId id; @ManyToOne @JoinColumn(name = "team_id", insertable = false, updatable = false) private Team team; @ManyToOne @JoinColumn(name = "skill_id", insertable = false, updatable = false) private Skill skill; private Long experience; public void increaseExperience(Integer newExperience) { this.experience += newExperience; } }
[ "me@g00glen00b.be" ]
me@g00glen00b.be
1ba37a690a15a806165627791a6c4cf247133f20
f65400893b5d3a80bf1ede506694850a92c05b21
/JavaStudy/src/ch12/IndexOf.java
16b56b9cdec2ce2fff5e221d87f3c0e71512e047
[]
no_license
fire216/JavaStudy
9795e3d46d72cbdbb3c3be59a87ca26bb05b8b33
a8f0d73994c6be20ee2b7101b5a12db8e721a614
refs/heads/master
2020-04-28T19:41:00.259026
2019-04-19T08:12:16
2019-04-19T08:12:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
package ch12; public class IndexOf { public static void main(String[] args) { // 0123456789 String text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."; System.out.println(text.length()); int index = -1; while (true) { index = text.indexOf("ipsum", index + 1); System.out.println(index); if (index == -1) { break; } } } }
[ "Student@DESKTOP-EF9PEQ2" ]
Student@DESKTOP-EF9PEQ2
c1febae4696db03c4982e812ddb3011b58cebccb
208ba847cec642cdf7b77cff26bdc4f30a97e795
/di/da/src/main/java/org.wp.da/models/ReaderPost.java
52cf1928dbb4b416aff3fcc4e9a4c19727a763e6
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
23,617
java
package org.wp.da.models; import android.text.TextUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.wp.da.ui.reader.ReaderConstants; import org.wp.da.ui.reader.models.ReaderBlogIdPostId; import org.wp.da.ui.reader.utils.ImageSizeMap; import org.wp.da.ui.reader.utils.ReaderImageScanner; import org.wp.da.ui.reader.utils.ReaderUtils; import org.wp.da.util.DateTimeUtils; import org.wp.da.util.GravatarUtils; import org.wp.da.util.HtmlUtils; import org.wp.da.util.JSONUtils; import org.wp.da.util.StringUtils; import java.text.BreakIterator; import java.util.Iterator; public class ReaderPost { private String pseudoId; public long postId; public long blogId; public long feedId; public long feedItemId; public long authorId; private String title; private String text; private String excerpt; private String authorName; private String authorFirstName; private String blogName; private String blogUrl; private String postAvatar; private String primaryTag; // most popular tag on this post based on usage in blog private String secondaryTag; // second most popular tag on this post based on usage in blog public double sortIndex; private String published; private String url; private String shortUrl; private String featuredImage; private String featuredVideo; public int numReplies; // includes comments, trackbacks & pingbacks public int numLikes; public boolean isLikedByCurrentUser; public boolean isFollowedByCurrentUser; public boolean isCommentsOpen; public boolean isExternal; public boolean isPrivate; public boolean isVideoPress; public boolean isJetpack; private String attachmentsJson; private String discoverJson; private String format; public long xpostPostId; public long xpostBlogId; public static ReaderPost fromJson(JSONObject json) { if (json == null) { throw new IllegalArgumentException("null json post"); } ReaderPost post = new ReaderPost(); post.postId = json.optLong("ID"); post.blogId = json.optLong("site_ID"); post.feedId = json.optLong("feed_ID"); post.feedItemId = json.optLong("feed_item_ID"); if (json.has("pseudo_ID")) { post.pseudoId = JSONUtils.getString(json, "pseudo_ID"); // read/ endpoint } else { post.pseudoId = JSONUtils.getString(json, "global_ID"); // sites/ endpoint } // remove HTML from the excerpt post.excerpt = HtmlUtils.fastStripHtml(JSONUtils.getString(json, "excerpt")).trim(); post.text = JSONUtils.getString(json, "content"); post.title = JSONUtils.getStringDecoded(json, "title"); post.format = JSONUtils.getString(json, "format"); post.url = JSONUtils.getString(json, "URL"); post.shortUrl = JSONUtils.getString(json, "short_URL"); post.setBlogUrl(JSONUtils.getString(json, "site_URL")); post.numLikes = json.optInt("like_count"); post.isLikedByCurrentUser = JSONUtils.getBool(json, "i_like"); post.isFollowedByCurrentUser = JSONUtils.getBool(json, "is_following"); post.isExternal = JSONUtils.getBool(json, "is_external"); post.isPrivate = JSONUtils.getBool(json, "site_is_private"); post.isJetpack = JSONUtils.getBool(json, "is_jetpack"); JSONObject jsonDiscussion = json.optJSONObject("discussion"); if (jsonDiscussion != null) { post.isCommentsOpen = JSONUtils.getBool(jsonDiscussion, "comments_open"); post.numReplies = jsonDiscussion.optInt("comment_count"); } else { post.isCommentsOpen = JSONUtils.getBool(json, "comments_open"); post.numReplies = json.optInt("comment_count"); } // parse the author section assignAuthorFromJson(post, json.optJSONObject("author")); post.featuredImage = JSONUtils.getString(json, "featured_image"); post.blogName = JSONUtils.getStringDecoded(json, "site_name"); post.published = JSONUtils.getString(json, "date"); // sort index determines how posts are sorted - this is a "score" for search results, // liked date for liked posts, and published date for all others if (json.has("score")) { post.sortIndex = json.optDouble("score"); } else if (json.has("date_liked")) { String likeDate = JSONUtils.getString(json, "date_liked"); post.sortIndex = DateTimeUtils.iso8601ToTimestamp(likeDate); } else { post.sortIndex = DateTimeUtils.iso8601ToTimestamp(post.published); } // if the post is untitled, make up a title from the excerpt if (!post.hasTitle() && post.hasExcerpt()) { post.title = extractTitle(post.excerpt, 50); } // remove html from title (rare, but does happen) if (post.hasTitle() && post.title.contains("<") && post.title.contains(">")) { post.title = HtmlUtils.stripHtml(post.title); } // parse the tags section assignTagsFromJson(post, json.optJSONObject("tags")); // parse the attachments JSONObject jsonAttachments = json.optJSONObject("attachments"); if (jsonAttachments != null && jsonAttachments.length() > 0) { post.attachmentsJson = jsonAttachments.toString(); } // site metadata - returned when ?meta=site was added to the request JSONObject jsonSite = JSONUtils.getJSONChild(json, "meta/data/site"); if (jsonSite != null) { post.blogId = jsonSite.optInt("ID"); post.blogName = JSONUtils.getString(jsonSite, "name"); post.setBlogUrl(JSONUtils.getString(jsonSite, "URL")); post.isPrivate = JSONUtils.getBool(jsonSite, "is_private"); // TODO: as of 29-Sept-2014, this is broken - endpoint returns false when it should be true post.isJetpack = JSONUtils.getBool(jsonSite, "jetpack"); } // "discover" posts JSONObject jsonDiscover = json.optJSONObject("discover_metadata"); if (jsonDiscover != null) { post.setDiscoverJson(jsonDiscover.toString()); } // xpost info assignXpostIdsFromJson(post, json.optJSONArray("metadata")); // if there's no featured image, check if featured media has been set - this is sometimes // a YouTube or Vimeo video, in which case store it as the featured video so we can treat // it as a video if (!post.hasFeaturedImage()) { JSONObject jsonMedia = json.optJSONObject("featured_media"); if (jsonMedia != null && jsonMedia.length() > 0) { String mediaUrl = JSONUtils.getString(jsonMedia, "uri"); if (!TextUtils.isEmpty(mediaUrl)) { String type = JSONUtils.getString(jsonMedia, "type"); boolean isVideo = (type != null && type.equals("video")); if (isVideo) { post.featuredVideo = mediaUrl; } else { post.featuredImage = mediaUrl; } } } } // if the post still doesn't have a featured image but we have attachment data, check whether // we can find a suitable featured image from the attachments if (!post.hasFeaturedImage() && post.hasAttachments()) { post.featuredImage = new ImageSizeMap(post.attachmentsJson) .getLargestImageUrl(ReaderConstants.MIN_FEATURED_IMAGE_WIDTH); } // if we *still* don't have a featured image but the text contains an IMG tag, check whether // we can find a suitable image from the text if (!post.hasFeaturedImage() && post.hasText() && post.text.contains("<img")) { post.featuredImage = new ReaderImageScanner(post.text, post.isPrivate) .getLargestImage(ReaderConstants.MIN_FEATURED_IMAGE_WIDTH); } return post; } /* * assigns cross post blog & post IDs from post's metadata section * "metadata": [ * { * "id": "21192", * "key": "xpost_origin", * "value": "11326809:18427" * } * ], */ private static void assignXpostIdsFromJson(ReaderPost post, JSONArray jsonMetadata) { if (jsonMetadata == null) return; for (int i = 0; i < jsonMetadata.length(); i++) { JSONObject jsonMetaItem = jsonMetadata.optJSONObject(i); String metaKey = jsonMetaItem.optString("key"); if (!TextUtils.isEmpty(metaKey) && metaKey.equals("xpost_origin")) { String value = jsonMetaItem.optString("value"); if (!TextUtils.isEmpty(value) && value.contains(":")) { String[] valuePair = value.split(":"); if (valuePair.length == 2) { post.xpostBlogId = StringUtils.stringToLong(valuePair[0]); post.xpostPostId = StringUtils.stringToLong(valuePair[1]); return; } } } } } /* * assigns author-related info to the passed post from the passed JSON "author" object */ private static void assignAuthorFromJson(ReaderPost post, JSONObject jsonAuthor) { if (jsonAuthor == null) return; post.authorName = JSONUtils.getStringDecoded(jsonAuthor, "name"); post.authorFirstName = JSONUtils.getStringDecoded(jsonAuthor, "first_name"); post.postAvatar = JSONUtils.getString(jsonAuthor, "avatar_URL"); post.authorId = jsonAuthor.optLong("ID"); // site_URL doesn't exist for /sites/ endpoints, so get it from the author if (TextUtils.isEmpty(post.blogUrl)) { post.setBlogUrl(JSONUtils.getString(jsonAuthor, "URL")); } } /* * assigns primary/secondary tags to the passed post from the passed JSON "tags" object */ private static void assignTagsFromJson(ReaderPost post, JSONObject jsonTags) { if (jsonTags == null) { return; } Iterator<String> it = jsonTags.keys(); if (!it.hasNext()) { return; } // most popular tag & second most popular tag, based on usage count on this blog String mostPopularTag = null; String nextMostPopularTag = null; int popularCount = 0; while (it.hasNext()) { JSONObject jsonThisTag = jsonTags.optJSONObject(it.next()); // if the number of posts on this blog that use this tag is higher than previous, // set this as the most popular tag, and set the second most popular tag to // the current most popular tag int postCount = jsonThisTag.optInt("post_count"); if (postCount > popularCount) { nextMostPopularTag = mostPopularTag; mostPopularTag = JSONUtils.getStringDecoded(jsonThisTag, "slug"); popularCount = postCount; } } // don't set primary tag if one is already set if (!post.hasPrimaryTag()) { post.setPrimaryTag(mostPopularTag); } post.setSecondaryTag(nextMostPopularTag); } /* * extracts a title from a post's excerpt - used when the post has no title */ private static String extractTitle(final String excerpt, int maxLen) { if (TextUtils.isEmpty(excerpt)) return null; if (excerpt.length() < maxLen) return excerpt.trim(); StringBuilder result = new StringBuilder(); BreakIterator wordIterator = BreakIterator.getWordInstance(); wordIterator.setText(excerpt); int start = wordIterator.first(); int end = wordIterator.next(); int totalLen = 0; while (end != BreakIterator.DONE) { String word = excerpt.substring(start, end); result.append(word); totalLen += word.length(); if (totalLen >= maxLen) break; start = end; end = wordIterator.next(); } if (totalLen==0) return null; return result.toString().trim() + "..."; } // -------------------------------------------------------------------------------------------- public String getAuthorName() { return StringUtils.notNullStr(authorName); } public void setAuthorName(String name) { this.authorName = StringUtils.notNullStr(name); } public String getAuthorFirstName() { return StringUtils.notNullStr(authorFirstName); } public void setAuthorFirstName(String name) { this.authorFirstName = StringUtils.notNullStr(name); } public String getTitle() { return StringUtils.notNullStr(title); } public void setTitle(String title) { this.title = StringUtils.notNullStr(title); } public String getText() { return StringUtils.notNullStr(text); } public void setText(String text) { this.text = StringUtils.notNullStr(text); } public String getExcerpt() { return StringUtils.notNullStr(excerpt); } public void setExcerpt(String excerpt) { this.excerpt = StringUtils.notNullStr(excerpt); } // https://codex.wordpress.org/Post_Formats public String getFormat() { return StringUtils.notNullStr(format); } public void setFormat(String format) { this.format = StringUtils.notNullStr(format); } public boolean isGallery() { return format != null && format.equals("gallery"); } public String getUrl() { return StringUtils.notNullStr(url); } public void setUrl(String url) { this.url = StringUtils.notNullStr(url); } public String getShortUrl() { return StringUtils.notNullStr(shortUrl); } public void setShortUrl(String url) { this.shortUrl = StringUtils.notNullStr(url); } public boolean hasShortUrl() { return !TextUtils.isEmpty(shortUrl); } public String getFeaturedImage() { return StringUtils.notNullStr(featuredImage); } public void setFeaturedImage(String featuredImage) { this.featuredImage = StringUtils.notNullStr(featuredImage); } public String getFeaturedVideo() { return StringUtils.notNullStr(featuredVideo); } public void setFeaturedVideo(String featuredVideo) { this.featuredVideo = StringUtils.notNullStr(featuredVideo); } public String getBlogName() { return StringUtils.notNullStr(blogName); } public void setBlogName(String blogName) { this.blogName = StringUtils.notNullStr(blogName); } public String getBlogUrl() { return StringUtils.notNullStr(blogUrl); } public void setBlogUrl(String blogUrl) { this.blogUrl = StringUtils.notNullStr(blogUrl); } public String getPostAvatar() { return StringUtils.notNullStr(postAvatar); } public void setPostAvatar(String postAvatar) { this.postAvatar = StringUtils.notNullStr(postAvatar); } public String getPseudoId() { return StringUtils.notNullStr(pseudoId); } public void setPseudoId(String pseudoId) { this.pseudoId = StringUtils.notNullStr(pseudoId); } public String getPublished() { return StringUtils.notNullStr(published); } public void setPublished(String published) { this.published = StringUtils.notNullStr(published); } public String getPrimaryTag() { return StringUtils.notNullStr(primaryTag); } public void setPrimaryTag(String tagName) { // this is a bit of a hack to avoid setting the primary tag to one of the defaults if (!ReaderTag.isDefaultTagTitle(tagName)) { this.primaryTag = StringUtils.notNullStr(tagName); } } boolean hasPrimaryTag() { return !TextUtils.isEmpty(primaryTag); } public String getSecondaryTag() { return StringUtils.notNullStr(secondaryTag); } public void setSecondaryTag(String tagName) { if (!ReaderTag.isDefaultTagTitle(tagName)) { this.secondaryTag = StringUtils.notNullStr(tagName); } } /* * attachments are stored as the actual JSON to avoid having a separate table for * them, may need to revisit this if/when attachments become more important */ public String getAttachmentsJson() { return StringUtils.notNullStr(attachmentsJson); } public void setAttachmentsJson(String json) { attachmentsJson = StringUtils.notNullStr(json); } public boolean hasAttachments() { return !TextUtils.isEmpty(attachmentsJson); } /* * "discover" posts also store the actual JSON */ public String getDiscoverJson() { return StringUtils.notNullStr(discoverJson); } public void setDiscoverJson(String json) { discoverJson = StringUtils.notNullStr(json); } public boolean isDiscoverPost() { return !TextUtils.isEmpty(discoverJson); } private transient ReaderPostDiscoverData discoverData; public ReaderPostDiscoverData getDiscoverData() { if (discoverData == null && !TextUtils.isEmpty(discoverJson)) { try { discoverData = new ReaderPostDiscoverData(new JSONObject(discoverJson)); } catch (JSONException e) { return null; } } return discoverData; } public boolean hasText() { return !TextUtils.isEmpty(text); } public boolean hasUrl() { return !TextUtils.isEmpty(url); } public boolean hasExcerpt() { return !TextUtils.isEmpty(excerpt); } public boolean hasFeaturedImage() { return !TextUtils.isEmpty(featuredImage); } public boolean hasFeaturedVideo() { return !TextUtils.isEmpty(featuredVideo); } public boolean hasPostAvatar() { return !TextUtils.isEmpty(postAvatar); } public boolean hasBlogName() { return !TextUtils.isEmpty(blogName); } public boolean hasAuthorName() { return !TextUtils.isEmpty(authorName); } public boolean hasAuthorFirstName() { return !TextUtils.isEmpty(authorFirstName); } public boolean hasTitle() { return !TextUtils.isEmpty(title); } public boolean hasBlogUrl() { return !TextUtils.isEmpty(blogUrl); } /* * returns true if this post is from a WordPress blog */ public boolean isWP() { return !isExternal; } /* * returns true if this is a cross-post */ public boolean isXpost() { return xpostBlogId != 0 && xpostPostId != 0; } /* * returns true if the passed post appears to be the same as this one - used when posts are * retrieved to determine which ones are new/changed/unchanged */ public boolean isSamePost(ReaderPost post) { return post != null && post.blogId == this.blogId && post.postId == this.postId && post.feedId == this.feedId && post.feedItemId == this.feedItemId && post.numLikes == this.numLikes && post.numReplies == this.numReplies && post.isFollowedByCurrentUser == this.isFollowedByCurrentUser && post.isLikedByCurrentUser == this.isLikedByCurrentUser && post.isCommentsOpen == this.isCommentsOpen && post.getTitle().equals(this.getTitle()) && post.getExcerpt().equals(this.getExcerpt()) && post.getText().equals(this.getText()); } public boolean hasIds(ReaderBlogIdPostId ids) { return ids != null && ids.getBlogId() == this.blogId && ids.getPostId() == this.postId; } /* * liking is enabled for all wp.com and jp posts with the exception of discover posts */ public boolean canLikePost() { return (isWP() || isJetpack) && (!isDiscoverPost()); } /**** * the following are transient variables - not stored in the db or returned in the json - whose * sole purpose is to cache commonly-used values for the post that speeds up using them inside * adapters ****/ /* * returns the featured image url as a photon url set to the passed width/height */ private transient String featuredImageForDisplay; public String getFeaturedImageForDisplay(int width, int height) { if (featuredImageForDisplay == null) { if (!hasFeaturedImage()) { featuredImageForDisplay = ""; } else { featuredImageForDisplay = ReaderUtils.getResizedImageUrl(featuredImage, width, height, isPrivate); } } return featuredImageForDisplay; } /* * returns the avatar url as a photon url set to the passed size */ private transient String avatarForDisplay; public String getPostAvatarForDisplay(int size) { if (avatarForDisplay == null) { if (!hasPostAvatar()) { return ""; } avatarForDisplay = GravatarUtils.fixGravatarUrl(postAvatar, size); } return avatarForDisplay; } /* * returns the blog's blavatar url as a photon url set to the passed size */ private transient String blavatarForDisplay; public String getPostBlavatarForDisplay(int size) { if (blavatarForDisplay == null) { if (!hasBlogUrl()) { return ""; } blavatarForDisplay = GravatarUtils.blavatarFromUrl(getBlogUrl(), size); } return blavatarForDisplay; } /* * converts iso8601 published date to an actual java date */ private transient java.util.Date dtPublished; public java.util.Date getDatePublished() { if (dtPublished == null) { dtPublished = DateTimeUtils.iso8601ToJavaDate(published); } return dtPublished; } /* * determine which tag to display for this post * - no tag if this is a private blog or there is no primary tag for this post * - primary tag, unless it's the same as the currently selected tag * - secondary tag if primary tag is the same as the currently selected tag */ private transient String tagForDisplay; public String getTagForDisplay(final String currentTagName) { if (tagForDisplay == null) { if (!isPrivate && hasPrimaryTag()) { if (getPrimaryTag().equalsIgnoreCase(currentTagName)) { tagForDisplay = getSecondaryTag(); } else { tagForDisplay = getPrimaryTag(); } } else { tagForDisplay = ""; } } return tagForDisplay; } /* * used when a unique numeric id is required by an adapter (when hasStableIds() = true) */ private transient long stableId; public long getStableId() { if (stableId == 0) { stableId = (pseudoId != null ? pseudoId.hashCode() : 0); } return stableId; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
b229cfaad0f83d8e86a7ef631ae412d54c328108
7eca373e07a5a054fb33770f1d2ea958563f6573
/src/com/csb/dao/meeting/UpdateMeetingQuestionnaireDao.java
fb7b8d26c01146a8791de8e4bd52f6a676e49e53
[]
no_license
bobchendingli/Tonghang
5b06582711e6f986de3511f45a99386131a03c61
9c1cdd4d5f70a1f19f2e995b4b5a5a1713f5dd1e
refs/heads/master
2020-05-18T15:17:41.795289
2014-10-08T13:47:29
2014-10-08T13:47:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
package com.csb.dao.meeting; import java.util.HashMap; import java.util.List; import java.util.Map; import com.csb.bean.ResultBean; import com.csb.dao.URLHelper; import com.csb.support.debug.AppLogger; import com.csb.support.error.WeiboException; import com.csb.support.http.HttpMethod; import com.csb.support.http.HttpUtility; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; /** * 更新会议提问处理 * * @author bobo * */ public class UpdateMeetingQuestionnaireDao { private String userid; private String meeting_id; private List<Map<String, String>> questionnaire_answer; public UpdateMeetingQuestionnaireDao(String userid, String meeting_id, List<Map<String, String>> questionnaire_answer) { this.userid = userid; this.meeting_id = meeting_id; this.questionnaire_answer = questionnaire_answer; } public void setQuestionnaire_answer( List<Map<String, String>> questionnaire_answer) { this.questionnaire_answer = questionnaire_answer; } public List<Map<String, String>> getQuestionnaire_answer() { return questionnaire_answer; } public void setMeeting_id(String meeting_id) { this.meeting_id = meeting_id; } public String getMeeting_id() { return meeting_id; } public ResultBean update() throws WeiboException { String apiUrl = URLHelper.URL_UPDATEMEETINGQUESTIONNAIREANSWER; String qaJson = null; Gson gson = new Gson(); try { Map<String, Object> answer = new HashMap<String, Object>(); answer.put("userid", userid); answer.put("meeting_id", meeting_id); answer.put("questionnaire_answer", questionnaire_answer); // Map<String, Object> answer = new HashMap<String, Object>(); // answer.put("answers", m); qaJson = gson.toJson(answer); } catch (JsonSyntaxException e) { AppLogger.e(e.getMessage()); return null; } Map<String, String> map = new HashMap<String, String>(); map.put("answers", qaJson); // map.put("meeting_id", meeting_id); // map.put("questionnaire_answer", qaJson); String jsonData = HttpUtility.getInstance().executeNormalTask( HttpMethod.Post, apiUrl, map); ResultBean value = null; try { value = gson.fromJson(jsonData, ResultBean.class); } catch (JsonSyntaxException e) { AppLogger.e(e.getMessage()); } return value; } }
[ "bob.chen.dingli@gmail.com" ]
bob.chen.dingli@gmail.com
1197c91fd13633fa44f7a00429c19e233d2ae461
c5e208720e683e8cf7718f82f23630cc0076ddf3
/33/src/Queue.java
130389973aa98dc4fbe42713104a9c5f5ff94ba9
[]
no_license
mallika2011/Bowling-Management-System
2a36f6fbdb58c5a4be6307f27736fc15458eb03b
f7a70ec903bef22793e9b51201e3b5d406d70ab8
refs/heads/master
2023-06-21T07:20:40.262461
2021-08-11T20:44:56
2021-08-11T20:44:56
249,407,856
1
1
null
null
null
null
UTF-8
Java
false
false
1,616
java
/* Queue.java * * Version * $Id$ * * Revisions: * $Log$ * */ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Vector; public class Queue { private Vector v; /** Queue() * * creates a new queue */ public Queue() { v = new Vector(); } public Object next() { return v.remove(0); } public void add(Object o) { v.addElement(o); } public boolean hasMoreElements() { return v.size() != 0; } public Vector asVector() { return v; } private Bowler registerPatron(String nickName) { Bowler patron = null; try { // only one patron / nick.... no dupes, no checks patron = BowlerFile.getBowlerInfo(nickName); } catch (FileNotFoundException e) { System.err.println("Error..." + e); } catch (IOException e) { System.err.println("Error..." + e); } return patron; } public void addPartyQueue(Vector partyNicks){ Vector partyBowlers = new Vector(); for (int i = 0; i < partyNicks.size(); i++) { Bowler newBowler = registerPatron(((String) partyNicks.get(i))); partyBowlers.add(newBowler); } Party newParty = new Party(partyBowlers); add(newParty); } public Vector getPartyQueue(){ Vector displayPartyQueue = new Vector(); for ( int i=0; i < ( (Vector)asVector()).size(); i++ ) { String nextParty = ((Bowler) ((Vector) ((Party) asVector().get( i ) ).getMembers()) .get(0)) .getNickName() + "'s Party"; displayPartyQueue.addElement(nextParty); } return displayPartyQueue; } }
[ "mallika2011@yahoo.com" ]
mallika2011@yahoo.com
fe3398fa997be06c0aa69df8063c663cdfe97b04
3f16f0318fc0bac3dfc9832f1e817da87db7a8da
/src/jp/co/yuki2006/busmap/route/NewAdvancedDetailActivity.java
4df4fd3d836715c2bba911ce9cedfe28e30c07c0
[ "Apache-2.0" ]
permissive
yuki2006/busviewer
697f392b23ba9c37ee6d5f18f5f02169c0c6cd96
15f23cdb505f05dd04d8443da78d146749241ebc
refs/heads/master
2020-01-21T04:34:25.304012
2014-03-27T04:11:38
2014-03-27T04:11:38
18,097,197
3
0
null
null
null
null
UTF-8
Java
false
false
3,283
java
/** * */ package jp.co.yuki2006.busmap.route; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout; import android.widget.TextView; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.view.MenuItem; import jp.co.yuki2006.busmap.R; import jp.co.yuki2006.busmap.etc.ActionBarUPWrapper; import jp.co.yuki2006.busmap.route.store.BusTransferSearch; import jp.co.yuki2006.busmap.route.store.NewBusSearch; import jp.co.yuki2006.busmap.store.BusStop; import jp.co.yuki2006.busmap.values.IntentValues; /** * @author yuki */ public class NewAdvancedDetailActivity extends SherlockFragmentActivity { /* * (非 Javadoc) * * @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle) */ @Override protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.Theme_Sherlock); super.onCreate(savedInstanceState); ActionBar actionBar = this.getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); LayoutInflater layoutInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); LinearLayout linearLayout = new LinearLayout(this); linearLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); linearLayout.setOrientation(LinearLayout.VERTICAL); setContentView(linearLayout); Intent intent = getIntent(); BusTransferSearch data = (BusTransferSearch) intent .getSerializableExtra(IntentValues.TRANSITION_ADVANCED_NEW_SEARCH); for (int i = 0; i < data.size(); i++) { NewBusSearch newBusSearch = data.get(i); View view = layoutInflater.inflate(R.layout.advanced_new_detail_element, (ViewGroup) findViewById(android.R.id.content), false); linearLayout.addView(view); for (int layout : new int[] { R.id.advanced_new_detail_departure, R.id.advanced_new_detail_arrival }) { boolean isDeparture = layout == R.id.advanced_new_detail_departure; View detailElement = view.findViewById(layout); ((TextView) detailElement.findViewById(R.id.advanced_search_label)). setText(isDeparture ? R.string.departure : R.string.arrive); ((TextView) detailElement.findViewById(R.id.advanced_new_time)). setText(newBusSearch.getTime(isDeparture)); BusStop busStop = newBusSearch.getBusStop(isDeparture); ((TextView) detailElement.findViewById(R.id.advanced_busstop_label)). setText(busStop.toString()); } ((TextView) view.findViewById(R.id.advanced_new_detail_bus_data)). setText( newBusSearch.getLineNumber() + " " + newBusSearch.getLastBusStopName() + "行き"); ((TextView) view.findViewById(R.id.advanced_new_detail_bus_remark)).setText(newBusSearch .getRemarkForString()); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: { ActionBarUPWrapper.doActionUpNavigation(this); break; } default: break; } return super.onOptionsItemSelected(item); } }
[ "yagfair@gmail.com" ]
yagfair@gmail.com
a53acfd98e857dad47abf9fb8e92f34bcce79655
280da3630f692c94472f2c42abd1051fb73d1344
/src/net/minecraft/src/BetterSnow.java
6bd40b743afe638806128ccaaa6a901716a764cc
[]
no_license
MicrowaveClient/Clarinet
7c35206c671eb28bc139ee52e503f405a14ccb5b
bd387bc30329e0febb6c1c1b06a836d9013093b5
refs/heads/master
2020-04-02T18:47:52.047731
2016-07-14T03:21:46
2016-07-14T03:21:46
63,297,767
1
0
null
null
null
null
UTF-8
Java
false
false
2,913
java
package net.minecraft.src; import net.minecraft.block.*; import net.minecraft.block.state.IBlockState; import net.minecraft.client.resources.model.IBakedModel; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; public class BetterSnow { private static IBakedModel modelSnowLayer = null; public static void update() { modelSnowLayer = Config.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(Blocks.snow_layer.getDefaultState()); } public static IBakedModel getModelSnowLayer() { return modelSnowLayer; } public static IBlockState getStateSnowLayer() { return Blocks.snow_layer.getDefaultState(); } public static boolean shouldRender(IBlockAccess blockAccess, Block block, IBlockState blockState, BlockPos blockPos) { return !checkBlock(block, blockState) ? false : hasSnowNeighbours(blockAccess, blockPos); } private static boolean hasSnowNeighbours(IBlockAccess blockAccess, BlockPos pos) { Block blockSnow = Blocks.snow_layer; return blockAccess.getBlockState(pos.north()).getBlock() != blockSnow && blockAccess.getBlockState(pos.south()).getBlock() != blockSnow && blockAccess.getBlockState(pos.west()).getBlock() != blockSnow && blockAccess.getBlockState(pos.east()).getBlock() != blockSnow ? false : blockAccess.getBlockState(pos.down()).getBlock().isOpaqueCube(); } private static boolean checkBlock(Block block, IBlockState blockState) { if (block.isFullCube()) { return false; } else if (block.isOpaqueCube()) { return false; } else if (block instanceof BlockSnow) { return false; } else if (block instanceof BlockBush && (block instanceof BlockDoublePlant || block instanceof BlockFlower || block instanceof BlockMushroom || block instanceof BlockSapling || block instanceof BlockTallGrass)) { return true; } else if (!(block instanceof BlockFence) && !(block instanceof BlockFenceGate) && !(block instanceof BlockFlowerPot) && !(block instanceof BlockPane) && !(block instanceof BlockReed) && !(block instanceof BlockWall)) { if (block instanceof BlockRedstoneTorch && blockState.getValue(BlockTorch.FACING) == EnumFacing.UP) { return true; } else { if (block instanceof BlockLever) { Comparable orient = blockState.getValue(BlockLever.FACING); if (orient == BlockLever.EnumOrientation.UP_X || orient == BlockLever.EnumOrientation.UP_Z) { return true; } } return false; } } else { return true; } } }
[ "justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704" ]
justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704
07bbfb0e073dd50a2ed77194e3d0726357ba2180
df15108a3563a0a2ec5b063762b30f351f067c35
/glossator/src/main/java/com/kritarie/glossator/binder/FactoryBinder.java
d4d42c4708e6da31b482c583a9d71d928c866793
[]
no_license
Kritarie/Glossator
d0804f221a1772bc04a4b6fdd245380febbc81d8
10f3cbbeacfbad69340e2848e0fb6b498b752060
refs/heads/master
2021-01-10T16:44:18.794113
2016-01-10T04:36:05
2016-01-10T04:36:05
47,955,569
1
0
null
null
null
null
UTF-8
Java
false
false
522
java
package com.kritarie.glossator.binder; import android.view.ViewGroup; import com.kritarie.glossator.GlossaryViewHolder; /** * Created by Sean on 12/11/2015. */ public class FactoryBinder<T> extends GlossaryBinder<T> { private HolderFactory<T> mFactory; public FactoryBinder(Class<T> modelClass, HolderFactory<T> factory) { super(modelClass); mFactory = factory; } @Override public GlossaryViewHolder<T> create(ViewGroup parent) { return mFactory.create(parent); } }
[ "sean@seanamos.net" ]
sean@seanamos.net
d6f89f7c2a019f6d1d9134ed18047c1210dd4853
86899bfb8098531e66dd019f26bbd10caf387fe5
/src/presentacion/Vista.java
4356ae8b85825797d166d7cd38d4edcbccb800e7
[]
no_license
DevOscarFA/SemaforoServidor
0d5a82cb5c8e9cfb61d5f154d675678527ef2f23
6f16e66e626ef68f955a2141c2ddd3e345cb7be6
refs/heads/master
2021-07-09T22:13:09.290917
2017-10-11T06:26:36
2017-10-11T06:26:36
105,409,238
0
0
null
null
null
null
UTF-8
Java
false
false
10,321
java
package presentacion; import java.awt.BorderLayout; import java.awt.Graphics; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class Vista extends JComponent { private static final long serialVersionUID = 2183908252623796318L; private final Modelo modelo; private Controlador controlador; private JFrame jFrame; // Grupo de atributos para linea 1 private JButton botonEncenderRojoL1; private JButton botonApagarRojoL1; private JButton botonEncenderAmarilloL1; private JButton botonApagarAmarilloL1; private JButton botonEncenderVerdeL1; private JButton botonApagarVerdeL1; // Grupo de atributos para linea 2 private JButton botonEncenderRojoL2; private JButton botonApagarRojoL2; private JButton botonEncenderAmarilloL2; private JButton botonApagarAmarilloL2; private JButton botonEncenderVerdeL2; private JButton botonApagarVerdeL2; // --------------------------------- private JButton botonDesconectar; private JScrollPane scrollPanel; private JTable tabla; public Vista(Modelo aThis) { modelo = aThis; initComponents(); capturarEventos(); } public JFrame getjFrame() { if (jFrame == null) { jFrame = new JFrame("SERVIDOR - Administrador de Semaforos"); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.getContentPane().add(this); jFrame.setResizable(false); jFrame.setVisible(true); jFrame.pack(); } return jFrame; } private void initComponents() { pintarSemaforoLinea1(); pintarSemaforoLinea2(); // Datos para la tabla Object[][] datos = null; // Cabeceras para las columnas de la tabla String[] cabeceras = new String[] { "IP Cliente", "Cant. Rojas Fund L1", "Cant. Amarillas Fund L1", "Cant. Verdes Fund L1", "Cant. Intermitentes L1", "Cant. Rojas Fund L2", "Cant. Amarillas Fund L2", "Cant. Verdes Fund L2", "Cant. Intermitentes L2" }; tabla = new JTable(); tabla.setModel(new DefaultTableModel(datos, cabeceras)); scrollPanel = new JScrollPane(); scrollPanel.setViewportView(tabla); add(scrollPanel, BorderLayout.CENTER); scrollPanel.setBounds(10, 200, 760, 150); } private void pintarSemaforoLinea1() { // -------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz Roja botonEncenderRojoL1 = new JButton("Encender"); add(botonEncenderRojoL1); botonEncenderRojoL1.setBounds(80, 25, 100, 30); botonApagarRojoL1 = new JButton("Apagar"); add(botonApagarRojoL1); botonApagarRojoL1.setBounds(180, 25, 100, 30); // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz // Amarilla botonEncenderAmarilloL1 = new JButton("Encender"); add(botonEncenderAmarilloL1); botonEncenderAmarilloL1.setBounds(80, 80, 100, 30); botonApagarAmarilloL1 = new JButton("Apagar"); add(botonApagarAmarilloL1); botonApagarAmarilloL1.setBounds(180, 80, 100, 30); // -------------------------------------------------------------------- // --------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz Verde botonEncenderVerdeL1 = new JButton("Encender"); add(botonEncenderVerdeL1); botonEncenderVerdeL1.setBounds(80, 135, 100, 30); botonApagarVerdeL1 = new JButton("Apagar"); add(botonApagarVerdeL1); botonApagarVerdeL1.setBounds(180, 135, 100, 30); // --------------------------------------------------------------------- // --------------------------------------------------------------------- // Establece las posiciones del boton relacionad con Desconectar botonDesconectar = new JButton("Desconectar"); add(botonDesconectar); botonDesconectar.setBounds(620, 360, 150, 30); // --------------------------------------------------------------------- botonEncenderRojoL1.setEnabled(false); botonEncenderAmarilloL1.setEnabled(false); botonEncenderVerdeL1.setEnabled(false); } private void pintarSemaforoLinea2() { // -------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz Roja botonEncenderRojoL2 = new JButton("Encender"); add(botonEncenderRojoL2); botonEncenderRojoL2.setBounds(480, 25, 100, 30); botonApagarRojoL2 = new JButton("Apagar"); add(botonApagarRojoL2); botonApagarRojoL2.setBounds(580, 25, 100, 30); // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz // Amarilla botonEncenderAmarilloL2 = new JButton("Encender"); add(botonEncenderAmarilloL2); botonEncenderAmarilloL2.setBounds(480, 80, 100, 30); botonApagarAmarilloL2 = new JButton("Apagar"); add(botonApagarAmarilloL2); botonApagarAmarilloL2.setBounds(580, 80, 100, 30); // -------------------------------------------------------------------- // --------------------------------------------------------------------- // Establece las posiciones de los botones relacionados con la luz Verde botonEncenderVerdeL2 = new JButton("Encender"); add(botonEncenderVerdeL2); botonEncenderVerdeL2.setBounds(480, 135, 100, 30); botonApagarVerdeL2 = new JButton("Apagar"); add(botonApagarVerdeL2); botonApagarVerdeL2.setBounds(580, 135, 100, 30); // --------------------------------------------------------------------- botonEncenderRojoL2.setEnabled(false); botonEncenderAmarilloL2.setEnabled(false); botonEncenderVerdeL2.setEnabled(false); } private void capturarEventos() { // ------------------------------------------------------- // Botones para linea 1 botonEncenderRojoL1.addActionListener(getControlador()); botonApagarRojoL1.addActionListener(getControlador()); botonEncenderAmarilloL1.addActionListener(getControlador()); botonApagarAmarilloL1.addActionListener(getControlador()); botonEncenderVerdeL1.addActionListener(getControlador()); botonApagarVerdeL1.addActionListener(getControlador()); // ------------------------------------------------------- // Botones para linea 2 botonEncenderRojoL2.addActionListener(getControlador()); botonApagarRojoL2.addActionListener(getControlador()); botonEncenderAmarilloL2.addActionListener(getControlador()); botonApagarAmarilloL2.addActionListener(getControlador()); botonEncenderVerdeL2.addActionListener(getControlador()); botonApagarVerdeL2.addActionListener(getControlador()); // ------------------------------------------------------- botonDesconectar.addActionListener(getControlador()); } @Override public void paintComponent(Graphics g) { modelo.pintarSemaforos(g); } public Controlador getControlador() { if (controlador == null) { controlador = new Controlador(this); } return controlador; } public void setControlador(Controlador controlador) { this.controlador = controlador; } public Modelo getModelo() { return modelo; } public JButton getBotonDesconectar() { return botonDesconectar; } public void setBotonDesconectar(JButton botonDesconectar) { this.botonDesconectar = botonDesconectar; } public JTable getTabla() { return tabla; } public void setTabla(JTable tabla) { this.tabla = tabla; } public JButton getBotonEncenderRojoL1() { return botonEncenderRojoL1; } public void setBotonEncenderRojoL1(JButton botonEncenderRojoL1) { this.botonEncenderRojoL1 = botonEncenderRojoL1; } public JButton getBotonApagarRojoL1() { return botonApagarRojoL1; } public void setBotonApagarRojoL1(JButton botonApagarRojoL1) { this.botonApagarRojoL1 = botonApagarRojoL1; } public JButton getBotonEncenderAmarilloL1() { return botonEncenderAmarilloL1; } public void setBotonEncenderAmarilloL1(JButton botonEncenderAmarilloL1) { this.botonEncenderAmarilloL1 = botonEncenderAmarilloL1; } public JButton getBotonApagarAmarilloL1() { return botonApagarAmarilloL1; } public void setBotonApagarAmarilloL1(JButton botonApagarAmarilloL1) { this.botonApagarAmarilloL1 = botonApagarAmarilloL1; } public JButton getBotonEncenderVerdeL1() { return botonEncenderVerdeL1; } public void setBotonEncenderVerdeL1(JButton botonEncenderVerdeL1) { this.botonEncenderVerdeL1 = botonEncenderVerdeL1; } public JButton getBotonApagarVerdeL1() { return botonApagarVerdeL1; } public void setBotonApagarVerdeL1(JButton botonApagarVerdeL1) { this.botonApagarVerdeL1 = botonApagarVerdeL1; } public JButton getBotonEncenderRojoL2() { return botonEncenderRojoL2; } public void setBotonEncenderRojoL2(JButton botonEncenderRojoL2) { this.botonEncenderRojoL2 = botonEncenderRojoL2; } public JButton getBotonApagarRojoL2() { return botonApagarRojoL2; } public void setBotonApagarRojoL2(JButton botonApagarRojoL2) { this.botonApagarRojoL2 = botonApagarRojoL2; } public JButton getBotonEncenderAmarilloL2() { return botonEncenderAmarilloL2; } public void setBotonEncenderAmarilloL2(JButton botonEncenderAmarilloL2) { this.botonEncenderAmarilloL2 = botonEncenderAmarilloL2; } public JButton getBotonApagarAmarilloL2() { return botonApagarAmarilloL2; } public void setBotonApagarAmarilloL2(JButton botonApagarAmarilloL2) { this.botonApagarAmarilloL2 = botonApagarAmarilloL2; } public JButton getBotonEncenderVerdeL2() { return botonEncenderVerdeL2; } public void setBotonEncenderVerdeL2(JButton botonEncenderVerdeL2) { this.botonEncenderVerdeL2 = botonEncenderVerdeL2; } public JButton getBotonApagarVerdeL2() { return botonApagarVerdeL2; } public void setBotonApagarVerdeL2(JButton botonApagarVerdeL2) { this.botonApagarVerdeL2 = botonApagarVerdeL2; } }
[ "oscarfdzalz@gmail.com" ]
oscarfdzalz@gmail.com
c82319f987d8a14c6f13d0e0862fe409f91bffa2
8469d2f71bc22fa2acf66a4bb05155c1d85282fa
/SapeStore/src/test/java/com/sapestore/controller/test/AccountControllerTest.java
2f30b0a7ee7c3c141349a4a1ea5e1334eb119259
[ "BSD-2-Clause" ]
permissive
rishon1313/sapestore
bce9f33ba16d82eb86be0a2567d92707b340a8c5
3f44263799e9abe279c6311a31d4df9209c9b59c
refs/heads/master
2021-08-17T02:02:18.544939
2017-11-20T17:28:41
2017-11-20T17:28:41
104,585,570
0
2
null
null
null
null
UTF-8
Java
false
false
4,729
java
package com.sapestore.controller.test; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; import com.sapestore.controller.AccountController; import com.sun.glass.ui.View; /** * The class <code>UserLoginControllerTest</code> contains tests for the class * {@link <code>UserLoginController</code>} * * @pattern JUnit Test Case * * @generatedBy CodePro at 7/12/14 11:26 AM * * @author kmedir * * @version $Revision$ */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:test-application-context.xml" }) @WebAppConfiguration public class AccountControllerTest { private MockMvc mockMvc; @Autowired private WebApplicationContext wac; /** * The object that is being tested. * * @see com.sapestore.controller.UserLoginController */ private AccountController fixture = new AccountController(); /** * Construct new test instance * * @param name the test name */ public AccountControllerTest() { } /** * Launch the test. * * @param args String[] */ public static void main(String[] args) { // add code to run tests here } /** * Return the object that is being tested. * * @return the test fixture * * @see com.sapestore.controller.UserLoginController */ public AccountController getFixture() { return fixture; } /** * Set the object that is being tested. * * @param fixture the test fixture */ public void setFixture(AccountController fixture) { this.fixture = fixture; } /** * Run the String beforeLogin(ModelMap) method test */ @Test public void testBeforeLogin() { try { System.out.println("entered testBeforeLogin"); mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); mockMvc.perform(get("/beforelogin")) .andExpect(status().isOk()); System.out.println("exited testBeforeLogin"); } catch (Exception e) { e.printStackTrace(); } } /** * Run the String login(UserLogin, ModelMap) method test */ @Test public void testLogin() { try { System.out.println("entered testLogin"); mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); mockMvc.perform(post("/login").param("userId", "testLoginId").param("password", "testPassword")) .andExpect(status().isOk()); System.out.println("exited testLogin"); } catch (Exception e) { e.printStackTrace(); } } /** * Run the String logout(WebRequest, SessionStatus) method test */ @Test public void testLogout() { try { System.out.println("entered testBeforeLogin"); mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); mockMvc.perform(get("/logout")) .andExpect(status().is(302)); System.out.println("exited testBeforeLogin"); } catch (Exception e) { e.printStackTrace(); } } @Test public void testShopMore(){ try { System.out.println("entered testShopMore"); mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); mockMvc.perform(get("/shopMore")).andExpect(status().isOk()) .andExpect(forwardedUrl("/WEB-INF/home.jsp")); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } } /*$CPS$ This comment was generated by CodePro. Do not edit it. * patternId = com.instantiations.assist.eclipse.pattern.testCasePattern * strategyId = com.instantiations.assist.eclipse.pattern.testCasePattern.junitTestCase * additionalTestNames = * assertTrue = false * callTestMethod = true * createMain = true * createSetUp = false * createTearDown = false * createTestFixture = true * createTestStubs = false * methods = beforeLogin(QModelMap;),login(QUserLogin;!QModelMap;) * package = com.sapestore.controller * package.sourceFolder = SapeStore/src/main/java * superclassType = junit.framework.TestCase * testCase = UserLoginControllerTest * testClassType = com.sapestore.controller.UserLoginController */
[ "root@localhost.localdomain" ]
root@localhost.localdomain
eb995597b4f4a3b644c4911a574485543e2bd688
1eaf9e35aa9fd2464f32cfa818a260ab97a6a078
/src/main/java/shop/book/PaperBook.java
3de9b3b149a59839f57e3d64ae1332b0ac147c24
[]
no_license
kacperdob/Empikv2
44b360d8176e47be4d7afed82fc7fc0cf98f8bc5
7d23b2f2c016e049b77f714ebbb3c42972b3648d
refs/heads/master
2022-04-03T22:22:04.317634
2020-02-17T12:27:47
2020-02-17T12:27:47
237,267,888
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package shop.book; import lombok.Getter; import java.math.BigDecimal; @Getter public class PaperBook extends Book{ public PaperBook(long id, String name, BigDecimal price, String author, int pageCounter) { super(id, name, price, author, pageCounter); } }
[ "kacper.dob@gmail.com" ]
kacper.dob@gmail.com
56c26bf9fffad3989fe6d1e65ef2cd77f5c2a2ab
91c3dd7c08ae0a308d0ce657ca84376a69155bf0
/src/main/java/dai/luis/models/Almacen.java
83c846d0c5876e40dd076ebd47734e7df8e6c6da
[]
no_license
saibot2/pruebas2018
fe1b86823fda9efff7af467ccdd25e5371ec83e8
55c15f2695dbc6faa4307258635c16a42991acd0
refs/heads/master
2022-02-04T09:31:23.748319
2018-05-10T10:25:55
2018-05-10T10:25:55
64,994,129
0
0
null
null
null
null
UTF-8
Java
false
false
2,168
java
package dai.luis.models; // Generated 24-oct-2017 8:06:34 by Hibernate Tools 4.0.0 import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; /** * Almacenes generated by hbm2java */ @Entity @Table(name = "almacenes", catalog = "pruebas") public class Almacen implements java.io.Serializable { private static final long serialVersionUID = 4944615340683546366L; public Almacen() { } public Almacen(String nombreAlmacen, String telefono, Set<Producto> productos) { this.nombreAlmacen = nombreAlmacen; this.telefono = telefono; this.productos = productos; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id_almacen", unique = true, nullable = false) private Long idAlmacen; @Column(name = "nombre_almacen", length = 100) private String nombreAlmacen; @Column(name = "telefono", length = 20) private String telefono; /*No es activo = 0, Es Activo != 0*/ @Column(name = "esactivo", nullable = false) private Integer esActivo; @OneToMany(fetch = FetchType.LAZY, mappedBy = "almacen",cascade = CascadeType.ALL) private Set<Producto> productos = new HashSet<Producto>(0); public Long getIdAlmacen() { return this.idAlmacen; } public void setIdAlmacen(Long idAlmacen) { this.idAlmacen = idAlmacen; } public String getNombreAlmacen() { return this.nombreAlmacen; } public void setNombreAlmacen(String nombreAlmacen) { this.nombreAlmacen = nombreAlmacen; } public String getTelefono() { return this.telefono; } public Integer getEsActivo() { return esActivo; } public void setEsActivo(Integer esActivo) { this.esActivo = esActivo; } public void setTelefono(String telefono) { this.telefono = telefono; } public Set<Producto> getProductos() { return productos; } public void setProductos(Set<Producto> productos) { this.productos = productos; } }
[ "saibott22@gmail.com" ]
saibott22@gmail.com
5cc8ee3cd7e71af8aabbc2b7948698e4d4e0f493
22ee19c86602e3f2de45b59f4e4d1b872f8a1e27
/custom-log4j2-appender/appender/src/main/java/org/wso2/sample/custom/log4j2/appender/CustomLog4j2Appender.java
0b8b2b5e656fa1b29071fdb3913160b92d0460ec
[ "Apache-2.0" ]
permissive
wso2-incubator/samples-is
b7f5aca5d8c595f180546e011410cc27563d7891
19d13bd10d1744572080926b438aacaff1484ad0
refs/heads/master
2022-08-31T06:49:18.082720
2022-08-17T14:35:15
2022-08-17T14:35:15
147,661,973
4
17
Apache-2.0
2022-08-17T14:35:16
2018-09-06T11:13:35
Java
UTF-8
Java
false
false
4,627
java
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.wso2.sample.custom.log4j2.appender; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.logging.log4j.core.Filter; import org.apache.logging.log4j.core.Layout; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.appender.AbstractAppender; import org.apache.logging.log4j.core.config.Property; import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.wso2.sample.custom.service.manager.CustomServiceManager; import java.io.Serializable; @Plugin(name = "CustomLog4j2LogAppender", category = "Core", elementType = "appender", printObject = false) public class CustomLog4j2Appender extends AbstractAppender { private static final Log log = LogFactory.getLog(CustomLog4j2Appender.class); private CustomLog4j2Appender(String name, Filter filter, final Layout<? extends Serializable> layout, boolean ignoreExceptions) { super(name, filter, layout, ignoreExceptions, Property.EMPTY_ARRAY); } @PluginFactory public static CustomLog4j2Appender createAppender( @PluginAttribute(value = "name") String name, @PluginElement("Layout") Layout<? extends Serializable> layout, @PluginElement("Filter") Filter filter, @PluginAttribute(value = "ignoreExceptions", defaultBoolean = true) boolean ignoreExceptions) { return new CustomLog4j2Appender(name, filter, layout, ignoreExceptions); } @Override public void start() { super.start(); // Do initiate something here. } @Override public void stop() { super.stop(); // Do stop something here. } @Override public void append(LogEvent logEvent) { log.info("Log event: " + logEvent.getMessage().getFormattedMessage() + ", received."); /* Here we can do something with the received log event. Following example demonstrate that. In this example, we are using the information from the log event and perform some logic in the Identity Server runtime. Keep in mind that this log appender is deployed under the fragmented host: 'org.ops4j.pax .logging.pax-logging-log4j2'. Because of that, we cannot use the OSGi services from the Identity Server default OSGi runtime. So this sample project keep a different OSGi bundle called 'org.wso2.sample.service.manager' deployed in the Identity Server runtime, and consume a singleton instance from it. It's also important that we are not using any classes loaded by the fragmented host, and pass that to the service manager to avoid class loading errors. This is the reason to use a separate model class to represent the logEvent. */ boolean isUserExists = CustomServiceManager.getInstance().isUserAvailable(new org.wso2.sample.custom.service .manager.model.Log(logEvent.getMessage().getFormattedMessage(), logEvent.getContextData().toMap())); // Now we have obtained the user existence from identity Server runtime. We will invoke an API endpoint with // this information. invokeUserExistenceEndpoint(logEvent.getMessage().getFormattedMessage(), isUserExists); } private void invokeUserExistenceEndpoint(String formattedLogMessage, boolean isUserExists) { // We could call an external endpoint here. Keep in mind that this log appender is not async operation. // Therefore, the client used to invoke the endpoint needs to invoke the endpoint asynchronously to avoid // performance issues. log.info("Invoking external APIs to notify user existence"); return; } }
[ "tharindu.bandara.edu@gmail.com" ]
tharindu.bandara.edu@gmail.com
60e692a31034dd32a0a0a708ab771046b5fa2c20
fffcf946aab37b73ac74bb445ddeda3c6fc2838b
/core/src/com/gaskarov/teerain/core/VisitorOrganoid.java
2a4b5a6ef0c20ffc070cccb8ef163d469c88c00d
[]
no_license
Barricade/TeeRain
cafc630fc5905ba39dd77d9b8365f9c5a2e8698a
0e44448fb707934d69a767d02549ea88031646dc
refs/heads/master
2021-01-20T03:06:56.221206
2019-07-09T22:46:10
2019-07-09T22:46:10
51,308,989
3
0
null
null
null
null
UTF-8
Java
false
false
5,433
java
package com.gaskarov.teerain.core; import com.badlogic.gdx.math.Vector2; import com.gaskarov.teerain.core.cellularity.Cellularity; import com.gaskarov.teerain.resource.Settings; import com.gaskarov.util.common.MathUtils; import com.gaskarov.util.constants.GlobalConstants; import com.gaskarov.util.container.Array; /** * Copyright (c) 2016 Ayrat Gaskarov <br> * All rights reserved. * * @author Ayrat Gaskarov */ public class VisitorOrganoid { // =========================================================== // Constants // =========================================================== // =========================================================== // Fields // =========================================================== private static final Array sPool = Array.obtain(); private boolean mIsEnabled; private boolean mIsVisitor; private int mVisitorX; private int mVisitorY; private int mVisitorWidth; private int mVisitorHeight; // =========================================================== // Constructors // =========================================================== private VisitorOrganoid() { } // =========================================================== // Getter & Setter // =========================================================== // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== private static VisitorOrganoid obtainPure() { if (GlobalConstants.POOL) synchronized (VisitorOrganoid.class) { return sPool.size() == 0 ? new VisitorOrganoid() : (VisitorOrganoid) sPool.pop(); } return new VisitorOrganoid(); } private static void recyclePure(VisitorOrganoid pObj) { if (GlobalConstants.POOL) synchronized (VisitorOrganoid.class) { sPool.push(pObj); } } public static VisitorOrganoid obtain(boolean pIsEnabled) { VisitorOrganoid obj = obtainPure(); obj.mIsEnabled = pIsEnabled; obj.mIsVisitor = false; obj.mVisitorX = 0; obj.mVisitorY = 0; obj.mVisitorWidth = 0; obj.mVisitorHeight = 0; return obj; } public static void recycle(VisitorOrganoid pObj) { recyclePure(pObj); } public void attach(Cellularity pCellularity, int pX, int pY, int pZ) { if (mIsEnabled) { if (!pCellularity.isChunk()) pCellularity.tickEnable(pX, pY, pZ); } } public void detach(Cellularity pCellularity, int pX, int pY, int pZ) { if (mIsEnabled) { if (!pCellularity.isChunk()) pCellularity.tickDisable(pX, pY, pZ); } } public void tissularedAttach(Cellularity pCellularity, int pX, int pY, int pZ) { if (mIsEnabled) pushVisitor(pCellularity, pX, pY, pZ); } public void tissularedDetach(Cellularity pCellularity, int pX, int pY, int pZ) { if (mIsEnabled) removeVisitor(pCellularity.getTissularity()); } public void tick(Cellularity pCellularity, int pX, int pY, int pZ) { if (mIsEnabled && !pCellularity.isChunk()) pushVisitor(pCellularity, pX, pY, pZ); } public boolean getIsEnabled() { return mIsEnabled; } public void setIsEnabled(Cellularity pCellularity, int pX, int pY, int pZ, boolean pIsEnabled) { if (mIsEnabled == pIsEnabled) return; mIsEnabled = pIsEnabled; if (pCellularity == null) return; Tissularity tissularity = pCellularity.getTissularity(); if (mIsEnabled) { if (tissularity != null) pushVisitor(pCellularity, pX, pY, pZ); if (!pCellularity.isChunk()) pCellularity.tickEnable(pX, pY, pZ); } else { if (!pCellularity.isChunk()) pCellularity.tickDisable(pX, pY, pZ); if (tissularity != null) removeVisitor(tissularity); } } private void pushVisitor(Cellularity pCellularity, int pX, int pY, int pZ) { Tissularity tissularity = pCellularity.getTissularity(); Vector2 p = pCellularity.localToChunk(pX + 0.5f, pY + 0.5f); float x = p.x; float y = p.y; int lx = pCellularity.localToGlobalX(MathUtils.floor(x) - (Settings.VISITOR_WIDTH + 1) / 2); int ly = pCellularity.localToGlobalY(MathUtils.floor(y) - (Settings.VISITOR_HEIGHT + 1) / 2); int rx = pCellularity.localToGlobalX(MathUtils.ceil(x) + (Settings.VISITOR_WIDTH - 1) / 2); int ry = pCellularity.localToGlobalY(MathUtils.ceil(y) + (Settings.VISITOR_HEIGHT - 1) / 2); int width = rx - lx + 1; int height = ry - ly + 1; if (mIsVisitor) tissularity.moveVisitor(mVisitorX, mVisitorY, mVisitorWidth, mVisitorHeight, lx, ly, width, height); else { tissularity.addVisitor(lx, ly, width, height); tissularity.pushVisitor(this, pCellularity, pX, pY, pZ); } mIsVisitor = true; mVisitorX = lx; mVisitorY = ly; mVisitorWidth = width; mVisitorHeight = height; } private void removeVisitor(Tissularity pTissularity) { if (mIsVisitor) { pTissularity.removeVisitor(this); pTissularity.removeVisitor(mVisitorX, mVisitorY, mVisitorWidth, mVisitorHeight); mIsVisitor = false; } } // =========================================================== // Inner and Anonymous Classes // =========================================================== }
[ "777grand@gmail.com" ]
777grand@gmail.com
d698a03ef6991cc56825f76d0cda421d2b569daf
7fc98eb4eb3ba89e6c4a6c4a0bb8a5b917e2077c
/src/com/mingzhao/designpattern/pattern23/p6/builder/example/ActorBuilder.java
0eaa19f16e6d0e9fe7fabc804819d22ffe522ad0
[]
no_license
TKMingGit/design-pattern
7b987cb130f2aa057681537e3c95afaae2297f0d
2e6f8f3b98e169c722698f82a2e9b281dcef0c89
refs/heads/master
2021-04-09T15:38:51.263071
2019-03-06T03:46:33
2019-03-06T03:46:33
125,588,811
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package com.mingzhao.designpattern.pattern23.p6.builder.example; /** * Created by luoyufeng on 2017/3/7. */ public abstract class ActorBuilder { protected Actor actor = new Actor(); public abstract void buildType(); public abstract void buildSex(); public abstract void buildFace(); public abstract void buildCostume(); public abstract void buildHairStyle(); public Actor createActor(){ return actor; } }
[ "ming.zhao@karakal.com.cn" ]
ming.zhao@karakal.com.cn
029751361bb047bb3ad8d91ef43b60698cc629da
4e1759b604516c067875f1254b6d67216efa1bbb
/weixinpojo/src/main/java/com/yinkai/entities/ImageExample.java
770508a9c59caca4019eb176bbd11cdd2858337c
[]
no_license
suoyiguke/weixinparent
92a16922993cf682115f23802e81143a68eb2971
d374b2a02ac0ee341969030a05fc4de3d3e2180b
refs/heads/master
2021-05-08T12:41:18.691106
2018-02-02T13:07:33
2018-02-02T13:07:33
119,958,912
0
0
null
null
null
null
UTF-8
Java
false
false
11,845
java
package com.yinkai.entities; import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class ImageExample implements Serializable { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public ImageExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andImageIdIsNull() { addCriterion("image_id is null"); return (Criteria) this; } public Criteria andImageIdIsNotNull() { addCriterion("image_id is not null"); return (Criteria) this; } public Criteria andImageIdEqualTo(Integer value) { addCriterion("image_id =", value, "imageId"); return (Criteria) this; } public Criteria andImageIdNotEqualTo(Integer value) { addCriterion("image_id <>", value, "imageId"); return (Criteria) this; } public Criteria andImageIdGreaterThan(Integer value) { addCriterion("image_id >", value, "imageId"); return (Criteria) this; } public Criteria andImageIdGreaterThanOrEqualTo(Integer value) { addCriterion("image_id >=", value, "imageId"); return (Criteria) this; } public Criteria andImageIdLessThan(Integer value) { addCriterion("image_id <", value, "imageId"); return (Criteria) this; } public Criteria andImageIdLessThanOrEqualTo(Integer value) { addCriterion("image_id <=", value, "imageId"); return (Criteria) this; } public Criteria andImageIdIn(List<Integer> values) { addCriterion("image_id in", values, "imageId"); return (Criteria) this; } public Criteria andImageIdNotIn(List<Integer> values) { addCriterion("image_id not in", values, "imageId"); return (Criteria) this; } public Criteria andImageIdBetween(Integer value1, Integer value2) { addCriterion("image_id between", value1, value2, "imageId"); return (Criteria) this; } public Criteria andImageIdNotBetween(Integer value1, Integer value2) { addCriterion("image_id not between", value1, value2, "imageId"); return (Criteria) this; } public Criteria andTopicIdIsNull() { addCriterion("topic_id is null"); return (Criteria) this; } public Criteria andTopicIdIsNotNull() { addCriterion("topic_id is not null"); return (Criteria) this; } public Criteria andTopicIdEqualTo(Integer value) { addCriterion("topic_id =", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdNotEqualTo(Integer value) { addCriterion("topic_id <>", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdGreaterThan(Integer value) { addCriterion("topic_id >", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdGreaterThanOrEqualTo(Integer value) { addCriterion("topic_id >=", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdLessThan(Integer value) { addCriterion("topic_id <", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdLessThanOrEqualTo(Integer value) { addCriterion("topic_id <=", value, "topicId"); return (Criteria) this; } public Criteria andTopicIdIn(List<Integer> values) { addCriterion("topic_id in", values, "topicId"); return (Criteria) this; } public Criteria andTopicIdNotIn(List<Integer> values) { addCriterion("topic_id not in", values, "topicId"); return (Criteria) this; } public Criteria andTopicIdBetween(Integer value1, Integer value2) { addCriterion("topic_id between", value1, value2, "topicId"); return (Criteria) this; } public Criteria andTopicIdNotBetween(Integer value1, Integer value2) { addCriterion("topic_id not between", value1, value2, "topicId"); return (Criteria) this; } public Criteria andNameIsNull() { addCriterion("name is null"); return (Criteria) this; } public Criteria andNameIsNotNull() { addCriterion("name is not null"); return (Criteria) this; } public Criteria andNameEqualTo(String value) { addCriterion("name =", value, "name"); return (Criteria) this; } public Criteria andNameNotEqualTo(String value) { addCriterion("name <>", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThan(String value) { addCriterion("name >", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThanOrEqualTo(String value) { addCriterion("name >=", value, "name"); return (Criteria) this; } public Criteria andNameLessThan(String value) { addCriterion("name <", value, "name"); return (Criteria) this; } public Criteria andNameLessThanOrEqualTo(String value) { addCriterion("name <=", value, "name"); return (Criteria) this; } public Criteria andNameLike(String value) { addCriterion("name like", value, "name"); return (Criteria) this; } public Criteria andNameNotLike(String value) { addCriterion("name not like", value, "name"); return (Criteria) this; } public Criteria andNameIn(List<String> values) { addCriterion("name in", values, "name"); return (Criteria) this; } public Criteria andNameNotIn(List<String> values) { addCriterion("name not in", values, "name"); return (Criteria) this; } public Criteria andNameBetween(String value1, String value2) { addCriterion("name between", value1, value2, "name"); return (Criteria) this; } public Criteria andNameNotBetween(String value1, String value2) { addCriterion("name not between", value1, value2, "name"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "suoyiguke_yinkai@aliyun.com" ]
suoyiguke_yinkai@aliyun.com
6aec957649750d92a7389324a1462db8e484cb00
9566dd099b5eedbfbae60f494cf8e89366969ed9
/app/src/main/java/com/example/securegatemeet/ResetPasswordActivity.java
b8daf1daa68d619621b2c475532ea48d8db39efb
[]
no_license
MeetMistry/Secure-Gate-Using-Android
95ac13177cfa84ef872d59e611e513fe04c060d0
d7414ee07c6820a94c9628b883bbd963d37b2be8
refs/heads/master
2022-12-01T11:03:24.473616
2020-08-12T18:23:02
2020-08-12T18:23:02
278,862,297
0
0
null
null
null
null
UTF-8
Java
false
false
2,660
java
package com.example.securegatemeet; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.FirebaseAuth; public class ResetPasswordActivity extends AppCompatActivity { private EditText inputEmail; private Button btnReset, btnBack; private FirebaseAuth auth; private ProgressBar progressBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_reset_password); inputEmail = (EditText) findViewById(R.id.email); btnReset = (Button) findViewById(R.id.btn_reset_password); btnBack = (Button) findViewById(R.id.btn_back); progressBar = (ProgressBar) findViewById(R.id.progressBar); auth = FirebaseAuth.getInstance(); btnBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); btnReset.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String email = inputEmail.getText().toString().trim(); if (TextUtils.isEmpty(email)) { Toast.makeText(getApplication(), "Enter your registered email id", Toast.LENGTH_SHORT).show(); return; } progressBar.setVisibility(View.VISIBLE); auth.sendPasswordResetEmail(email) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { Toast.makeText(ResetPasswordActivity.this, "We have sent you instructions to reset your password!", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(ResetPasswordActivity.this, "Failed! Please Enter Registered Email id", Toast.LENGTH_SHORT).show(); } progressBar.setVisibility(View.GONE); } }); } }); } }
[ "17it003@charusat.edu.in" ]
17it003@charusat.edu.in
31cf9b6ad5eed658a42426b2f73456bc42636b05
e154ba6d0515774b07fd1af979f55efd58e7891c
/src/main/java/org/mdev/revolution/communication/packets/outgoing/newnavigator/SearchResultSet.java
39891f0f709dd400bffb526cb7bc25c6d31a0bef
[]
no_license
jadenmitchell/Revolution
1d7e8779a660eb868c8090a7c16c5bdfcaea631d
82e014d2c794c29de5d7b5d52125fd45f30efa19
refs/heads/master
2020-12-11T09:30:02.593119
2016-07-31T07:52:25
2016-07-31T07:52:25
59,269,527
2
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package org.mdev.revolution.communication.packets.outgoing.newnavigator; import org.mdev.revolution.communication.packets.outgoing.ServerPacket; import org.mdev.revolution.communication.packets.outgoing.ServerPacketHeader; import org.mdev.revolution.database.domain.navigator.FlatCat; import org.mdev.revolution.game.navigator.NavigatorSearchAllowance; import org.mdev.revolution.game.navigator.NavigatorViewMode; import java.util.List; public class SearchResultSet extends ServerPacket { public SearchResultSet(String category, String data, List<FlatCat> categories) { super(ServerPacketHeader.SearchResultSet); super.writeString(category); super.writeString(data); super.writeInt(categories.size()); categories.forEach((c) -> { super.writeString("lol"); // Category Identifier super.writeString(c.getPublicName()); super.writeInt(NavigatorSearchAllowance.getIntValue(c.getSearchAllowance())); super.writeBoolean(false); super.writeInt(c.getViewMode() == NavigatorViewMode.REGULAR ? 0 : c.getViewMode() == NavigatorViewMode.THUMBNAIL ? 1 : 0); // TODO: Send the rest of the shit. }); } }
[ "m0de@null.net" ]
m0de@null.net
95a9dfefb3d9c68ece698dd4cbf4878a5a7636ca
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/iRobot_com.irobot.home/javafiles/android/support/v4/media/MediaBrowserServiceCompat$d$7.java
9d5e19ba1a8bb8d727889cf5775d26becb1897b3
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
1,801
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package android.support.v4.media; import android.support.v4.f.a; // Referenced classes of package android.support.v4.media: // MediaBrowserServiceCompat class MediaBrowserServiceCompat$d$7 implements Runnable { public void run() { android.os.IBinder ibinder = a.a(); // 0 0:aload_0 // 1 1:getfield #23 <Field MediaBrowserServiceCompat$e a> // 2 4:invokeinterface #33 <Method android.os.IBinder android.support.v4.media.MediaBrowserServiceCompat$e.a()> // 3 9:astore_1 b.a.b.remove(((Object) (ibinder))); // 4 10:aload_0 // 5 11:getfield #21 <Field MediaBrowserServiceCompat$d b> // 6 14:getfield #36 <Field MediaBrowserServiceCompat android.support.v4.media.MediaBrowserServiceCompat$d.a> // 7 17:getfield #39 <Field a MediaBrowserServiceCompat.b> // 8 20:aload_1 // 9 21:invokevirtual #45 <Method Object a.remove(Object)> // 10 24:pop // 11 25:return } final MediaBrowserServiceCompat.e a; final MediaBrowserServiceCompat.d b; MediaBrowserServiceCompat$d$7(MediaBrowserServiceCompat.d d1, MediaBrowserServiceCompat.e e) { b = d1; // 0 0:aload_0 // 1 1:aload_1 // 2 2:putfield #21 <Field MediaBrowserServiceCompat$d b> a = e; // 3 5:aload_0 // 4 6:aload_2 // 5 7:putfield #23 <Field MediaBrowserServiceCompat$e a> super(); // 6 10:aload_0 // 7 11:invokespecial #26 <Method void Object()> // 8 14:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
439364346170cacbe71491ca90f5dfa54774bb58
89efe8e875762e5823c1ae7e5eb5937004c7fcc1
/src/main/java/ge/ka/pwrserver/HelloController.java
ccfa08e45f2ab450fbed0da8b4bf62a8c749cec5
[]
no_license
gehka/pwr-server
a1e9da8a971a1abb41c88763d56fcbe2175532de
977b9a7ca60199d5395aef6504b8b19b273146da
refs/heads/master
2023-07-18T23:59:55.178472
2021-09-06T18:55:20
2021-09-06T18:55:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
package ge.ka.pwrserver; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import ge.ka.pwrserver.model.Accelerator; import ge.ka.pwrserver.service.RestService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.sql.Timestamp; @RestController public class HelloController { @Autowired private RestService restService; @RequestMapping(value="/", method = RequestMethod.GET) public String home() { return new Timestamp(System.currentTimeMillis()).toString(); } @RequestMapping(value="/hello", method = RequestMethod.GET) public String Hello() throws JsonProcessingException { Accelerator acc = new Accelerator(0, 11, 22, 33); ObjectMapper objectMapper = new ObjectMapper(); return objectMapper.writeValueAsString(acc); } @RequestMapping(value="/acc", method = RequestMethod.GET) public void getAccs(){ this.restService.doPost(); } }
[ "Ns8TZyUbNR8JKFiWyP0A" ]
Ns8TZyUbNR8JKFiWyP0A
292778f468e22b8cd23811d76082e5e014581b07
86647ab1dce23875b27988750c23b8455829f489
/commonlib/src/main/java/com/dudu/commonlib/xml/JDomXmlDocument.java
56458c4864084d4583fcf978c1182669003de3fd
[]
no_license
BAT6188/DuDuHome_Home
1fab41f8fd0456c6fdecb901dc2ee94c269ec516
08fa399406a1e19e7738c6767260db4153593f38
refs/heads/master
2023-05-28T18:38:36.377138
2016-07-25T06:48:06
2016-07-25T06:48:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
692
java
package com.dudu.commonlib.xml; /** * Created by Administrator on 2016/2/15. */ import org.jdom2.Document; import org.jdom2.JDOMException; import org.jdom2.input.SAXBuilder; import java.io.IOException; import java.io.InputStream; /** * Created by Eaway on 2016/2/15. */ public class JDomXmlDocument { public Document parserXml(InputStream inputStream) { Document document = null; SAXBuilder builder = new SAXBuilder(); try { document = builder.build(inputStream); } catch (JDOMException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return document; } }
[ "angcyo@126.com" ]
angcyo@126.com
1cf5a4f0954badee59a8c13eeabe8f47fc06aa71
8534ea766585cfbd6986fd845e59a68877ecb15b
/p006b/p007a/p008a/p009a/p010a/p012b/C0215n.java
09ca10f970e1b8f3561e7b26dc0eaad16c2758c6
[]
no_license
Shanzid01/NanoTouch
d7af94f2de686f76c2934b9777a92b9949b48e10
6d51a44ff8f719f36b880dd8d1112b31ba75bfb4
refs/heads/master
2020-04-26T17:39:53.196133
2019-03-04T10:23:51
2019-03-04T10:23:51
173,720,526
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package p006b.p007a.p008a.p009a.p010a.p012b; import java.io.File; import java.util.Comparator; /* compiled from: CommonUtils */ final class C0215n implements Comparator<File> { C0215n() { } public /* synthetic */ int compare(Object obj, Object obj2) { return m1938a((File) obj, (File) obj2); } public int m1938a(File file, File file2) { return (int) (file.lastModified() - file2.lastModified()); } }
[ "shanzid.shaiham@gmail.com" ]
shanzid.shaiham@gmail.com
575b25a3a897a0437dc095b3f4ad0ae1e63324a9
240b0a05e4c63e6557bf603450bb2f8287d87e00
/project/src/main/java/repository/impl/EmployeeRepositoryImpl.java
29cfc389ac1e56107bf306c08db1607995cb209d
[ "MIT" ]
permissive
nasrmohammad4804/hw15-console-Bank-Application
5b4ac474af69576615331260bdfb3a2341202b02
310a95d1234b3ae6b4809306ccb96b5b61de6100
refs/heads/master
2023-08-10T20:20:23.791335
2021-10-01T17:32:06
2021-10-01T17:32:06
408,320,231
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package repository.impl; import base.repository.impl.BaseRepositoryImpl; import domain.Employee; import repository.EmployeeRepository; import javax.persistence.EntityManager; public class EmployeeRepositoryImpl extends BaseRepositoryImpl<Employee,Long> implements EmployeeRepository { public EmployeeRepositoryImpl(EntityManager entityManager) { super(entityManager); } @Override public Class<Employee> getEntityClass() { return Employee.class; } }
[ "nasrmohammad4804@gmail.com" ]
nasrmohammad4804@gmail.com
14101c527519f0c54a6796e283284ec63a875aa3
dde3de70797c28ae0548460cb94ee0006ff0aaf2
/Build/Android/src/com/epicgames/ue4/DownloadShim.java
0ce75dea42ce86c5ca0fec6b14f3be0f76dafcac
[]
no_license
APTist/ProjectShooter
ae02d12b65452ff6686647087389c415841b9fc6
49de18fe081738caaf654e8e9bddfd44997878ea
refs/heads/main
2023-07-28T02:04:43.552967
2021-09-13T08:19:46
2021-09-13T08:19:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,432
java
package com.epicgames.ue4; import com.Artist.ShooterSecond.OBBDownloaderService; import com.Artist.ShooterSecond.DownloaderActivity; import android.app.Activity; import com.google.android.vending.expansion.downloader.Helpers; import com.Artist.ShooterSecond.OBBData; public class DownloadShim { public static OBBDownloaderService DownloaderService; public static DownloaderActivity DownloadActivity; public static Class<DownloaderActivity> GetDownloaderType() { return DownloaderActivity.class; } public static boolean expansionFilesDelivered(Activity activity, int version) { for (OBBData.XAPKFile xf : OBBData.xAPKS) { String fileName = Helpers.getExpansionAPKFileName(activity, xf.mIsMain, Integer.toString(version), OBBData.AppType); GameActivity.Log.debug("Checking for file : " + fileName); String fileForNewFile = Helpers.generateSaveFileName(activity, fileName); String fileForDevFile = Helpers.generateSaveFileNameDevelopment(activity, fileName); GameActivity.Log.debug("which is really being resolved to : " + fileForNewFile + "\n Or : " + fileForDevFile); if (Helpers.doesFileExist(activity, fileName, xf.mFileSize, false)) { GameActivity.Log.debug("Found OBB here: " + fileForNewFile); } else if (Helpers.doesFileExistDev(activity, fileName, xf.mFileSize, false)) { GameActivity.Log.debug("Found OBB here: " + fileForDevFile); } else return false; } return true; } }
[ "rikitikitavy39@gmail.com" ]
rikitikitavy39@gmail.com
31f8a7f20c55acda2b1cb8de62d192a72762373e
3a20b07e2f1e148a14782d412d5e05ec82ff209e
/groupeH/trunk/IAgo/src/main/java/myPack/App.java
59916ca8082ff02309c8028fb42cb033ba354fe6
[]
no_license
sunye/alma-go
5683c2cd998112fd2cbadc2b17679adce041832e
8cffdc3f89f1a4c103b175a58c9b26c41d7e7bb9
refs/heads/master
2021-05-25T11:47:26.523567
2020-10-14T12:29:05
2020-10-14T12:29:05
32,451,651
0
0
null
2020-10-14T12:29:07
2015-03-18T10:12:34
HTML
UTF-8
Java
false
false
169
java
package myPack; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "mouezapeter@fe6e65f2-260b-11df-8e73-9931e1e0996c" ]
mouezapeter@fe6e65f2-260b-11df-8e73-9931e1e0996c
a9e5f49074ec4f0431387a57e568c730b39bab11
ab513fbacf6f85853cccaa04e295cc8083f51482
/4th Semester/Systems for Design and Implementation/Laboratory/Book App First/oscar-web/src/main/java/oscar/web/converter/ConverterBaseEntity.java
c36f3034ba024b663f65c1c6a1ff02ab20ff2275
[]
no_license
galoscar07/college2k16-2k19
1ee23e6690e4e5ac3ab9a8ed9792ebbeaecddbf6
a944bdbc13977aa6782e9eb83a97000aa58a9a93
refs/heads/master
2023-01-09T15:59:07.882933
2019-06-24T12:06:32
2019-06-24T12:06:32
167,170,983
1
1
null
2023-01-04T18:21:31
2019-01-23T11:22:29
Python
UTF-8
Java
false
false
225
java
package oscar.web.converter; import oscar.core.model.BaseEntity; import oscar.web.dto.BaseDto; interface ConverterBaseEntity<Model extends BaseEntity<Long>, Dto extends BaseDto> extends Converter<Model, Dto> { }
[ "galoscar@Gals-MacBook-Pro.local" ]
galoscar@Gals-MacBook-Pro.local
8bc68cef8c5caace263bc5fb978994a767e49c66
76f16f829caac1435a8c58b6b564e05db65f12dd
/src/main/java/org/frc2851/data/type/PlaceholderType.java
f72094d35684a8995ad9085d59bcf034ae962512
[]
no_license
CrevolutionRoboticsProgramming/VisionCommunicatorPlugin
2e74956594ca8288ccc9c61d22c33610ab1cb791
e4cbff9187736ac516531a3eeb6ffc715786df94
refs/heads/master
2020-07-22T11:27:15.670230
2019-09-22T18:45:45
2019-09-22T18:45:45
207,184,343
0
0
null
null
null
null
UTF-8
Java
false
false
816
java
package org.frc2851.data.type; import edu.wpi.first.shuffleboard.api.data.ComplexDataType; import org.frc2851.data.PlaceholderData; import java.util.Map; import java.util.function.Function; /** * Represents data of the {@link PlaceholderData} type. */ public final class PlaceholderType extends ComplexDataType<PlaceholderData> { public static final PlaceholderType Instance = new PlaceholderType(); private static final String TYPE_NAME = "PlaceholderData"; private PlaceholderType() { super(TYPE_NAME, PlaceholderData.class); } @Override public Function<Map<String, Object>, PlaceholderData> fromMap() { return map -> new PlaceholderData(); } @Override public PlaceholderData getDefaultValue() { return new PlaceholderData(); } }
[ "boring.ryan.alan@gmail.com" ]
boring.ryan.alan@gmail.com
c5f5e61ea9e88ee79ad2ae61bd8f13ecc1360d8d
7188a41b6ecdef00cfbf03cc662a631eeb7e2f18
/DaiCuongFirstApp - v1.1/app/src/main/java/com/project/daicuongbachkhoa/ui/vatly1/VatLy1QuizDbHelper.java
e156edeb902dfdd7b58bf5e8004152c7f36976ac
[]
no_license
DongPhamBK/DaiCuongBachKhoa2
e78a45f809c1b16f55d5a2f82c86fa2c6e04dfdd
ad6b20a130af22bdd20bd1e28d6331d1d75f7081
refs/heads/master
2023-01-18T20:19:28.045856
2020-12-01T02:13:00
2020-12-01T02:13:00
317,399,061
0
0
null
null
null
null
UTF-8
Java
false
false
15,220
java
package com.project.daicuongbachkhoa.ui.vatly1; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Build; import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import com.project.daicuongbachkhoa.R; import com.project.daicuongbachkhoa.ui.vatly1.VatLy1QuizContract.*; import java.util.ArrayList; import java.util.List; // sử dụng class với SQLite public class VatLy1QuizDbHelper extends SQLiteOpenHelper { private static final String DATABASE_NAME = "VatLy1OnTapQuiz.db";// tạo database private static final int DATABASE_VERSION = 1;// PHIÊN BẢN private static VatLy1QuizDbHelper instace; private SQLiteDatabase db;// tạo database sqlite private VatLy1QuizDbHelper(@Nullable Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } public static synchronized VatLy1QuizDbHelper getInstace(Context context){ if(instace == null){ instace = new VatLy1QuizDbHelper(context.getApplicationContext()); } return instace; } @Override public void onCreate(SQLiteDatabase db) { this.db = db; final String SQL_CREATE_CATEGORIES_TABLE = "CREATE TABLE " + CategoriesTable.TABLE_NAME + "( " + CategoriesTable._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + CategoriesTable.COLUMN_NAME + " TEXT " + ")"; final String SQL_CREATE_QUESTIONS_TABLE = "CREATE TABLE " + QuestionTable.TABLE_NAME + " ( " + QuestionTable._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + QuestionTable.COLUMN_QUESTION + " TEXT, " + QuestionTable.COLUMN_OPTION1 + " TEXT, " + QuestionTable.COLUMN_OPTION2 + " TEXT, " + QuestionTable.COLUMN_OPTION3 + " TEXT, " + QuestionTable.COLUMN_ANSWER_NUM + " INTEGER, " + QuestionTable.COLUMN_DIFFICULTY + " TEXT, " + QuestionTable.COLUMN_CATEGORY_ID + " INTEGER," + "FOREIGN KEY(" + QuestionTable.COLUMN_CATEGORY_ID + ") REFERENCES " + CategoriesTable.TABLE_NAME + "(" + CategoriesTable._ID + ")" + "ON DELETE CASCADE" + ")"; db.execSQL(SQL_CREATE_CATEGORIES_TABLE); db.execSQL(SQL_CREATE_QUESTIONS_TABLE); fillCategoriesTable(); fillQuestionsTable(); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // chú ý lệnh sql cần chính xác db.execSQL("DROP TABLE IF EXISTS " + CategoriesTable.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + QuestionTable.TABLE_NAME); onCreate(db); } @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public void onConfigure(SQLiteDatabase db) { super.onConfigure(db); db.setForeignKeyConstraintsEnabled(true); // cái này nó bắt api cái trên, khi nào lỗi thì cần xem lại ! /* *********************************** NHỚ KIỂM TRA LẠI CHỖ NÀY NHÉ ! ******************************** */ } //bảng chương học private void fillCategoriesTable() { VatLy1Category c1 = new VatLy1Category("Động học chất điểm"); insertCategory(c1); VatLy1Category c2 = new VatLy1Category("Động lực học chất điểm"); insertCategory(c2); VatLy1Category c3 = new VatLy1Category("Động lực học vật rắn"); insertCategory(c3); } public void addCategory(VatLy1Category category){ db = getWritableDatabase(); insertCategory(category); } public void addCategories(List<VatLy1Category> categories ){ db = getWritableDatabase(); for(VatLy1Category category:categories){ insertCategory(category); } } private void insertCategory(VatLy1Category category) { ContentValues cv = new ContentValues(); cv.put(CategoriesTable.COLUMN_NAME, category.getName()); db.insert(CategoriesTable.TABLE_NAME, null, cv); } // bảng phương án private void fillQuestionsTable() { VatLy1Question q1 = new VatLy1Question("Trường hợp nào dưới đây có thể coi vật chuyển động như một chất điểm ?", "A.Chiếc ô tô trong bến xe.", "B.Mặt Trăng quanh Trái Đất", "C.Con cá trong chậu", 2, VatLy1Question.DIFFICULTY_EASY, VatLy1Category.CHUONG1); insertQuestion(q1); VatLy1Question q2 = new VatLy1Question("Nếu nói \"Trái Đất quay quanh Mặt Trời\" thì trong câu nói này vật nào được chọn làm vật mốc?", "A.Trái Đất", "B.Mặt Trăng", "C.Mặt Trời", 3, VatLy1Question.DIFFICULTY_EASY, VatLy1Category.CHUONG1); insertQuestion(q2); VatLy1Question q3 = new VatLy1Question("Hệ quy chiếu gồm:", "A.Vật làm mốc, hệ toạ độ, mốc thời gian.", "B.Hệ toạ độ, mốc thời gian, đồng hồ.", "C.Vật làm mốc, hệ toạ độ, mốc thời gian và đồng hồ.", 3, VatLy1Question.DIFFICULTY_EASY, VatLy1Category.CHUONG1); insertQuestion(q3); VatLy1Question q4 = new VatLy1Question("Công thức tính vận tốc", "A. v = s/t", "B. v = t/s", "C. v = s*t", 1, VatLy1Question.DIFFICULTY_EASY, VatLy1Category.CHUONG1); insertQuestion(q4); VatLy1Question q5 = new VatLy1Question("Công thức quãng đường đi được của chuyển động thẳng nhanh dần đều là:", "A. s = v0t + at2/2 (a và v0 cùng dấu).", "B. s = v0t + at2/2 (a và v0 trái dấu).", "C. x = x0 + v0t + at2/2 (a và v0 trái dấu).", 1, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q5); VatLy1Question q6 = new VatLy1Question("Tại một nơi nhất định trên Trái Đất và ở gần mặt đất, các vật đều rơi tự do với:", "A.Cùng một gia tốc g.", "B.Gia tốc khác nhau.", "C.Gia tốc bằng 0", 1, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q6); VatLy1Question q7 = new VatLy1Question("Trường hợp nào dưới đây có thể coi vật chuyển động như một chất điểm ?", "A.Chiếc ô tô trong bến xe.", "B.Mặt Trăng quanh Trái Đất", "C.Con cá trong chậu", 2, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q7); VatLy1Question q8 = new VatLy1Question("Nếu nói \"Trái Đất quay quanh Mặt Trời\" thì trong câu nói này vật nào được chọn làm vật mốc?", "A.Trái Đất", "B.Mặt Trăng", "C.Mặt Trời", 3, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q8); VatLy1Question q9 = new VatLy1Question("Hệ quy chiếu gồm:", "A.Vật làm mốc, hệ toạ độ, mốc thời gian.", "B.Hệ toạ độ, mốc thời gian, đồng hồ.", "C.Vật làm mốc, hệ toạ độ, mốc thời gian và đồng hồ.", 3, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q9); VatLy1Question q10 = new VatLy1Question("Công thức tính vận tốc", "A. v = s/t", "B. v = t/s", "C. v = s*t", 1, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q10); VatLy1Question q11 = new VatLy1Question("Công thức quãng đường đi được của chuyển động thẳng nhanh dần đều là:", "A. s = v0t + at2/2 (a và v0 cùng dấu).", "B. s = v0t + at2/2 (a và v0 trái dấu).", "C. x = x0 + v0t + at2/2 (a và v0 trái dấu).", 1, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q11); VatLy1Question q12 = new VatLy1Question("Tại một nơi nhất định trên Trái Đất và ở gần mặt đất, các vật đều rơi tự do với:", "A.Cùng một gia tốc g.", "B.Gia tốc khác nhau.", "C.Gia tốc bằng 0", 1, VatLy1Question.DIFFICULTY_MEDIUM, VatLy1Category.CHUONG1); insertQuestion(q12); VatLy1Question q13 = new VatLy1Question("Trường hợp nào dưới đây có thể coi vật chuyển động như một chất điểm ?", "A.Chiếc ô tô trong bến xe.", "B.Mặt Trăng quanh Trái Đất", "C.Con cá trong chậu", 2, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q13); VatLy1Question q14 = new VatLy1Question("Nếu nói \"Trái Đất quay quanh Mặt Trời\" thì trong câu nói này vật nào được chọn làm vật mốc?", "A.Trái Đất", "B.Mặt Trăng", "C.Mặt Trời", 3, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q14); VatLy1Question q15 = new VatLy1Question("Hệ quy chiếu gồm:", "A.Vật làm mốc, hệ toạ độ, mốc thời gian.", "B.Hệ toạ độ, mốc thời gian, đồng hồ.", "C.Vật làm mốc, hệ toạ độ, mốc thời gian và đồng hồ.", 3, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q15); VatLy1Question q16 = new VatLy1Question("Công thức tính vận tốc", "A. v = s/t", "B. v = t/s", "C. v = s*t", 1, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q16); VatLy1Question q17 = new VatLy1Question("Công thức quãng đường đi được của chuyển động thẳng nhanh dần đều là:", "A. s = v0t + at2/2 (a và v0 cùng dấu).", "B. s = v0t + at2/2 (a và v0 trái dấu).", "C. x = x0 + v0t + at2/2 (a và v0 trái dấu).", 1, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q17); VatLy1Question q18 = new VatLy1Question("Tại một nơi nhất định trên Trái Đất và ở gần mặt đất, các vật đều rơi tự do với:", "A.Cùng một gia tốc g.", "B.Gia tốc khác nhau.", "C.Gia tốc bằng 0", 1, VatLy1Question.DIFFICULTY_HARD, VatLy1Category.CHUONG1); insertQuestion(q18); } public void addQuestion(VatLy1Question question){ db = getWritableDatabase(); insertQuestion(question); } public void addQuestions(List<VatLy1Question> questions){ db = getWritableDatabase(); for(VatLy1Question question:questions){ insertQuestion(question); } } private void insertQuestion(VatLy1Question question) { ContentValues cv = new ContentValues(); cv.put(QuestionTable.COLUMN_QUESTION, question.getQuestion()); cv.put(QuestionTable.COLUMN_OPTION1, question.getOption1()); cv.put(QuestionTable.COLUMN_OPTION2, question.getOption2()); cv.put(QuestionTable.COLUMN_OPTION3, question.getOption3()); cv.put(QuestionTable.COLUMN_ANSWER_NUM, question.getAnswerNum()); cv.put(QuestionTable.COLUMN_DIFFICULTY, question.getDifficulty()); cv.put(QuestionTable.COLUMN_CATEGORY_ID, question.getCategoryId()); db.insert(QuestionTable.TABLE_NAME, null, cv); } public List<VatLy1Category> getAllCategories() { List<VatLy1Category> categoryList = new ArrayList<>(); db = getReadableDatabase(); Cursor c = db.rawQuery("SELECT * FROM " + CategoriesTable.TABLE_NAME, null); if (c.moveToFirst()) { do { VatLy1Category category = new VatLy1Category(); category.setId(c.getInt(c.getColumnIndex(CategoriesTable._ID))); category.setName(c.getString(c.getColumnIndex(CategoriesTable.COLUMN_NAME))); categoryList.add(category); } while (c.moveToNext()); } c.close(); return categoryList; } // nhập list câu hỏi public ArrayList<VatLy1Question> getAllQuestions() { ArrayList<VatLy1Question> questionList = new ArrayList<>(); db = getReadableDatabase(); Cursor c = db.rawQuery("SELECT * FROM " + QuestionTable.TABLE_NAME, null); if (c.moveToFirst()) { do { VatLy1Question question = new VatLy1Question(); question.setId(c.getInt(c.getColumnIndex(QuestionTable._ID))); question.setQuestion(c.getString(c.getColumnIndex(QuestionTable.COLUMN_QUESTION))); question.setOption1(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION1))); question.setOption2(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION2))); question.setOption3(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION3))); question.setAnswerNum(c.getInt(c.getColumnIndex(QuestionTable.COLUMN_ANSWER_NUM))); question.setDifficulty(c.getString(c.getColumnIndex(QuestionTable.COLUMN_DIFFICULTY))); question.setCategoryId(c.getInt(c.getColumnIndex(QuestionTable.COLUMN_CATEGORY_ID))); questionList.add(question); } while (c.moveToNext()); } c.close();// đừng quên khoá lại ! return questionList; } public ArrayList<VatLy1Question> getQuestions(int categoryId, String difficulty) { ArrayList<VatLy1Question> questionList = new ArrayList<>(); db = getReadableDatabase(); String selection = QuestionTable.COLUMN_CATEGORY_ID + " = ? " + " AND " + QuestionTable.COLUMN_DIFFICULTY + " = ? "; String[] selectionArgs = new String[]{String.valueOf(categoryId),difficulty}; Cursor c = db.query( QuestionTable.TABLE_NAME, null, selection, selectionArgs, null, null, null ); /* String[] selectionArgs = new String[]{difficulty}; Cursor c = db.rawQuery("SELECT * FROM " + QuestionTable.TABLE_NAME + " WHERE " + QuestionTable.COLUMN_DIFFICULTY + " = ?", selectionArgs); */ if (c.moveToFirst()) { do { VatLy1Question question = new VatLy1Question(); question.setId(c.getInt(c.getColumnIndex(QuestionTable._ID))); question.setQuestion(c.getString(c.getColumnIndex(QuestionTable.COLUMN_QUESTION))); question.setOption1(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION1))); question.setOption2(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION2))); question.setOption3(c.getString(c.getColumnIndex(QuestionTable.COLUMN_OPTION3))); question.setAnswerNum(c.getInt(c.getColumnIndex(QuestionTable.COLUMN_ANSWER_NUM))); question.setDifficulty(c.getString(c.getColumnIndex(QuestionTable.COLUMN_DIFFICULTY))); question.setCategoryId(c.getInt(c.getColumnIndex(QuestionTable.COLUMN_CATEGORY_ID))); questionList.add(question); } while (c.moveToNext()); } c.close();// đừng quên khoá lại ! return questionList; } }
[ "dong.pt173020@sis.hust.edu.vn" ]
dong.pt173020@sis.hust.edu.vn
0b2747914e7550ad47f1504d10c232bac668438b
530e3daf0896f2b8b3deca6483e3b893d0bb5483
/foodBox/api/src/main/java/org/yokekhei/fsd/capstone/api/repository/OrderRepository.java
d16e7214182c08032cbb69a164de6fe097af9fc7
[]
no_license
s94shweta/FSDSimplilearnShweta
37a780ff2e1196c4b7213493141d43c0e4aadef8
6f58b54db77886607dd6f7b89d2b6f464e619bd4
refs/heads/master
2023-07-07T06:38:43.204002
2021-08-08T19:51:09
2021-08-08T19:51:09
309,680,235
1
0
null
null
null
null
UTF-8
Java
false
false
633
java
package org.yokekhei.fsd.capstone.api.repository; import java.time.LocalDateTime; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.yokekhei.fsd.capstone.api.entity.Order; import org.yokekhei.fsd.capstone.api.entity.User; public interface OrderRepository extends JpaRepository<Order, Long> { List<Order> findAllByCreatedDateTimeBetween(LocalDateTime createdDateTimeStart, LocalDateTime createdDateTimeEnd); List<Order> findByUser(User user); List<Order> findByUserAndCreatedDateTimeBetween(User user, LocalDateTime createdDateTimeStart, LocalDateTime createdDateTimeEnd); }
[ "s94shweta@gmail.com" ]
s94shweta@gmail.com
2efd4ab4bcef4416d48223f54962c21dd3b980a3
01fbb3b01bee6db9e923e0a30174eff165265031
/COUPON-API-SERVICE/src/main/java/com/easytobuy/CouponApiServiceApplication.java
1d0e1d1d5705089ea717d54fc8b7ece4176370f4
[]
no_license
MaruthamSatish/EASYTOBUY_VERSION_0.01
bdc2adb27d86a2e73fcc81802c426292cf942fde
c71d05d723c5a6d91af1c727fd607bb685384231
refs/heads/main
2023-02-09T00:29:50.765235
2021-01-01T13:42:34
2021-01-01T13:42:34
300,364,271
0
0
null
null
null
null
UTF-8
Java
false
false
414
java
package com.easytobuy; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @SpringBootApplication @EnableEurekaClient public class CouponApiServiceApplication { public static void main(String[] args) { SpringApplication.run(CouponApiServiceApplication.class, args); } }
[ "smarutham@gmail.com" ]
smarutham@gmail.com
e8d870709c1e753891043a9f45a035cd97474c3d
0718470c4d1ae82e0ea8ac39ea2ce051d60b09f1
/src/test/java/StringCalculatorTest.java
fbed69e44151297ad14a985ccccf9438a8921bbb
[]
no_license
fahad-israr/TDD-Kata-String-Calculator
e74c8702b4f7f13f34092e8dbe674ed45e02d39c
0eb3a25598cce5137c2b85a797ce24b8111a08fb
refs/heads/master
2023-02-01T22:46:50.310071
2020-12-21T05:00:01
2020-12-21T05:00:01
320,345,981
0
0
null
null
null
null
UTF-8
Java
false
false
2,422
java
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; public class StringCalculatorTest { @Test public void testAddShouldReturn0() { StringCalculator calculator = new StringCalculator(); assertEquals(0, calculator.add("")); } @Test public void testAddShouldReturn1() { StringCalculator calculator = new StringCalculator(); assertEquals(1, calculator.add("1")); } @Test public void testAddShouldReturn3() { StringCalculator calculator = new StringCalculator(); assertEquals(3, calculator.add("1,2")); } @Test public void testAddShouldReturnNegativeInfinity() { StringCalculator calculator = new StringCalculator(); assertEquals(Integer.MIN_VALUE, calculator.add("1,2,sometext")); } @Test public void testAddShouldReturn6() { StringCalculator calculator = new StringCalculator(); assertEquals(6, calculator.add("1\n2,3")); } @Test public void testAddShouldReturn3withCustomDelimiter() { StringCalculator calculator = new StringCalculator(); assertEquals(3, calculator.add("//;\n1;2")); } @Test public void testAddShouldReturnException(){ StringCalculator calculator = new StringCalculator(); try { calculator.add("-1,2"); } catch (IllegalArgumentException e){ assertEquals(e.getMessage(), "Negatives not allowed: -1"); } try { calculator.add("2,-4,3,-5"); } catch (IllegalArgumentException e){ assertEquals(e.getMessage(), "Negatives not allowed: -4,-5"); } } @Test public void testAddShouldReturn2() { StringCalculator calculator = new StringCalculator(); assertEquals(2, calculator.add("1001,2")); } @Test public void testAddShouldReturn6withAnyDelimiterLength() { StringCalculator calculator = new StringCalculator(); assertEquals(6, calculator.add("//[***]\n1***2***3")); } @Test public void testAddShouldReturn6withMutipleDelimiter() { StringCalculator calculator = new StringCalculator(); assertEquals(6, calculator.add("//[*][%]\n1*2%3")); } @Test public void testAddShouldReturn6withMutipleDelimiterofAnyLength() { StringCalculator calculator = new StringCalculator(); assertEquals(6, calculator.add("//[***][%%%]\n1***2%%%3")); } }
[ "fahad00cms@gmail.com" ]
fahad00cms@gmail.com
0e2af2467ffc6783927ab1926ea2531b75a3e3e0
c8bace3885addf0ed59adb3a643e6fcb53e3487e
/news-jsp-mysql/src/java/com/news/util/DaiCaThang.java
f5b392333e6b399085a60e34015bacac06398286
[]
no_license
quandt162/Jsp_Servlet
25d1b0ca0c63d0b87cc57ff3b790f0fef4004cdf
e527f24546ad85375639cf7fc222627416ac0c7c
refs/heads/master
2021-01-10T04:47:01.704295
2015-12-04T13:53:04
2015-12-04T13:53:04
47,406,180
0
0
null
null
null
null
UTF-8
Java
false
false
3,371
java
package com.news.util; import java.util.Arrays; public class DaiCaThang { private static char[] SPECIAL_CHARACTERS = { ' ', '!', '"', '#', '$', '%', '*', '+', ',', ':', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '`', '|', '~', 'À', 'Á', 'Â', 'Ã', 'È', 'É', 'Ê', 'Ì', 'Í', 'Ò', 'Ó', 'Ô', 'Õ', 'Ù', 'Ú', 'Ý', 'à', 'á', 'â', 'ã', 'è', 'é', 'ê', 'ì', 'í', 'ò', 'ó', 'ô', 'õ', 'ù', 'ú', 'ý', 'Ă', 'ă', 'Đ', 'đ', 'Ĩ', 'ĩ', 'Ũ', 'ũ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ạ', 'ạ', 'Ả', 'ả', 'Ấ', 'ấ', 'Ầ', 'ầ', 'Ẩ', 'ẩ', 'Ẫ', 'ẫ', 'Ậ', 'ậ', 'Ắ', 'ắ', 'Ằ', 'ằ', 'Ẳ', 'ẳ', 'Ẵ', 'ẵ', 'Ặ', 'ặ', 'Ẹ', 'ẹ', 'Ẻ', 'ẻ', 'Ẽ', 'ẽ', 'Ế', 'ế', 'Ề', 'ề', 'Ể', 'ể', 'Ễ', 'ễ', 'Ệ', 'ệ', 'Ỉ', 'ỉ', 'Ị', 'ị', 'Ọ', 'ọ', 'Ỏ', 'ỏ', 'Ố', 'ố', 'Ồ', 'ồ', 'Ổ', 'ổ', 'Ỗ', 'ỗ', 'Ộ', 'ộ', 'Ớ', 'ớ', 'Ờ', 'ờ', 'Ở', 'ở', 'Ỡ', 'ỡ', 'Ợ', 'ợ', 'Ụ', 'ụ', 'Ủ', 'ủ', 'Ứ', 'ứ', 'Ừ', 'ừ', 'Ử', 'ử', 'Ữ', 'ữ', 'Ự', 'ự', }; private static char[] REPLACEMENTS = { '-', '\0', '\0', '\0', '\0', '\0', '\0', '_', '\0', '_', '\0', '\0', '\0', '\0', '\0', '\0', '_', '\0', '\0', '\0', '\0', '\0', 'A', 'A', 'A', 'A', 'E', 'E', 'E', 'I', 'I', 'O', 'O', 'O', 'O', 'U', 'U', 'Y', 'a', 'a', 'a', 'a', 'e', 'e', 'e', 'i', 'i', 'o', 'o', 'o', 'o', 'u', 'u', 'y', 'A', 'a', 'D', 'd', 'I', 'i', 'U', 'u', 'O', 'o', 'U', 'u', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'A', 'a', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'I', 'i', 'I', 'i', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', }; public static String toUrlFriendly(String s) { int maxLength = Math.min(s.length(), 236); char[] buffer = new char[maxLength]; int n = 0; for (int i = 0; i < maxLength; i++) { char ch = s.charAt(i); buffer[n] = removeAccent(ch); // skip not printable characters if (buffer[n] > 31) { n++; } } // skip trailing slashes while (n > 0 && buffer[n - 1] == '/') { n--; } return String.valueOf(buffer, 0, n); } public static char removeAccent(char ch) { int index = Arrays.binarySearch(SPECIAL_CHARACTERS, ch); if (index >= 0) { ch = REPLACEMENTS[index]; } return ch; } public static String removeAccent(String s) { StringBuilder sb = new StringBuilder(s); for (int i = 0; i < sb.length(); i++) { sb.setCharAt(i, removeAccent(sb.charAt(i))); } return sb.toString(); } public static String[] fuck69(String source){ if(source == null || "".equals(source)) return null; String tmp = toUrlFriendly(source).replace("-", "").toUpperCase(); String[] rs = new String[tmp.length()]; for(int i=0; i<tmp.length(); i++){ rs[i] = tmp.charAt(i)+" "; } return rs; } public static void main(String[] args) { // String rs[] = DaiCaThang.fuck69("Trịnh Lê Tú"); // System.out.println(DaiCaThang.fuck69("Trịnh Lê Tú").length); // for(String s : rs){ // System.out.print(s); // } System.out.println(toUrlFriendly("Trời mưa quá rồi").toLowerCase()); } }
[ "quandt2191@gmail.com" ]
quandt2191@gmail.com
b6cad4625411d7ef1fdfe4f28f2a9cb9f47ae839
3d65929e1d1b37cf2807b5f45a145fbc10cc073b
/Module4/20_case_study/case_study/src/main/java/vn/codegym/model/Position.java
1d1300f7775d2e061b5f081b254926424ce10a74
[]
no_license
MAIDOAN2302/A1020I1-DoanThiMai
336f111335ac42794fb00824764685b923becf62
2383398c1009f48d81c50ce2f4d3d4984110c215
refs/heads/master
2023-08-13T21:57:04.841504
2021-10-04T16:36:26
2021-10-04T16:36:26
312,744,327
2
0
null
null
null
null
UTF-8
Java
false
false
845
java
package vn.codegym.model; import javax.persistence.*; import javax.validation.constraints.NotBlank; import java.util.Set; @Entity public class Position { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @NotBlank(message = "Không được để trống") private String name; @OneToMany(mappedBy = "position") private Set<Employee> employees; public Position() { } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Employee> getEmployees() { return employees; } public void setEmployees(Set<Employee> employees) { this.employees = employees; } }
[ "doanthimai23021992@gmail.com" ]
doanthimai23021992@gmail.com
3b2234828ae250563add053f44db2bf2599373d0
120e8dad2d78043f66423fb2fe714b3b39f68a15
/java_programming/src/day41_arraylist/practiceGit.java
11e498188180eccd5f6ee181298cf0d237302304
[]
no_license
AleksandarBacko/API
5a7627eea40e4962adc2f7207ebcdd0a0fcf3cae
f28f472a383370d0201ab7b01ed28c4ca8e11a56
refs/heads/master
2023-07-11T07:10:53.231922
2021-07-28T22:34:07
2021-07-28T22:34:07
397,413,742
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package day41_arraylist; public class practiceGit { public static void main(String[] args) { System.out.println("git works"); System.out.println("sdaasdasdasd"); } }
[ "backo.backovic94@gmail.com" ]
backo.backovic94@gmail.com
5ef182d65e8a0708d7e594643abe9c97cdc1bef5
e0c8d4b3c1fdfb0f8469b7de23ffb9ca471052bb
/Week12-BankAccount/src/BankAccountTester.java
4617de7e98ff7199f01fd10b5ac90afaa45c244e
[]
no_license
tranric/Java_2015_stuff
d8848a4a783777a37b8ea9b37e3073d0341865f0
4f0069b01e6d946cadfdda91e1c1256d7c02ca31
refs/heads/main
2023-02-04T09:51:12.965424
2020-12-18T02:05:41
2020-12-18T02:05:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
import BankAccountClasses.*; public class BankAccountTester { public BankAccountTester(){ //BankAccount myAccount = new BankAccount(4000); SavingsAccount savings = new SavingsAccount(5000 , 0.02); ChequingAccount chq = new ChequingAccount(400); savings.addInterest(); System.out.println(savings.toString()); System.out.println(chq.toString()); chq.deposit(100); chq.withdraw(50); chq.withdraw(100); chq.withdraw(50); System.out.println(chq.toString()); chq.deductFees(); System.out.println(chq.toString()); } public static void main(String[] args) { new BankAccountTester(); } }
[ "55151012+tranric@users.noreply.github.com" ]
55151012+tranric@users.noreply.github.com
ca76e8d3faba1acdc281b3f97322c219fd0b9ff1
bf3a091d350d8ff1ecebb761b299a294ec031c53
/stock-management-automation/src/main/java/io/github/ydhekim/stock_management_automation/controller/GetAllWarehouseAttendantsController.java
cfbdd3debaaf5639b35475eae0dd9d967dfd6f92
[]
no_license
ydhekim/stock-management-automation
e7d0c29fe6d1181b6f89b98e3e78704eb3843fe9
a9d3a641fba240969d546865181a25d8bec365c2
refs/heads/master
2020-04-10T00:17:11.485470
2018-12-17T19:15:27
2018-12-17T19:15:27
160,681,022
0
5
null
2018-12-14T13:37:40
2018-12-06T13:47:45
JavaScript
UTF-8
Java
false
false
1,824
java
package io.github.ydhekim.stock_management_automation.controller; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import io.github.ydhekim.stock_management_automation.dao.WarehouseAttendantDAO; import io.github.ydhekim.stock_management_automation.dao.WarehouseAttendantDAOImpl; import io.github.ydhekim.stock_management_automation.model.Employee; @WebServlet("/GetAllWarehouseAttendantsController") public class GetAllWarehouseAttendantsController extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); WarehouseAttendantDAO warehouseAttendantDAO = new WarehouseAttendantDAOImpl(); ArrayList<Employee> employees; employees = warehouseAttendantDAO.getAllWarehouseAttendants(); out.println("Personel ID - Personel PW - Personel Adi - Personel Soyadi - Departman ID <br/>"); for (Employee employee : employees) { int employeeId = employee.getId(); int employeePw = employee.getPassword(); String firstName = employee.getFirstName(); String lastName = employee.getLastName(); int departmentId = employee.getDepartment().getId(); out.println(employeeId + " ---------- " + employeePw + " ---------- " + firstName + " ---------- " + lastName + " ---------- " + departmentId + "<br/>"); } out.println("<a href='index-mng.jsp'>Geri Don!</a>"); out.close(); } }
[ "yasin.d.hekim@gmail.com" ]
yasin.d.hekim@gmail.com
e1c5833fbd74e3ed594768dc21a1e7da11ad1ed2
45d1e88d4275045417b1128b1978bb277de4136c
/A04.Netty/B01.Netty_Book/doc/nettybook2-master/src/com/phei/netty/frame/correct/TimeServer.java
054d21c33f672d04db4956b944325cec23e27826
[ "Apache-2.0" ]
permissive
huaxueyihao/NoteOfStudy
2c1f95ef30e264776d0bbf72fb724b0fe9aceee4
061e62c97f4fa04fa417fd08ecf1dab361c20b87
refs/heads/master
2022-07-12T04:11:02.960324
2021-01-24T02:47:54
2021-01-24T02:47:54
228,293,820
0
0
Apache-2.0
2022-06-21T03:49:20
2019-12-16T03:19:50
Java
UTF-8
Java
false
false
2,617
java
/* * Copyright 2013-2018 Lilinfeng. * * 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.phei.netty.frame.correct; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.LineBasedFrameDecoder; import io.netty.handler.codec.string.StringDecoder; /** * @author lilinfeng * @date 2014年2月14日 * @version 1.0 */ public class TimeServer { public void bind(int port) throws Exception { // 配置服务端的NIO线程组 EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_BACKLOG, 1024) .childHandler(new ChildChannelHandler()); // 绑定端口,同步等待成功 ChannelFuture f = b.bind(port).sync(); // 等待服务端监听端口关闭 f.channel().closeFuture().sync(); } finally { // 优雅退出,释放线程池资源 bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } } private class ChildChannelHandler extends ChannelInitializer<SocketChannel> { @Override protected void initChannel(SocketChannel arg0) throws Exception { arg0.pipeline().addLast(new LineBasedFrameDecoder(1024)); arg0.pipeline().addLast(new StringDecoder()); arg0.pipeline().addLast(new TimeServerHandler()); } } /** * @param args * @throws Exception */ public static void main(String[] args) throws Exception { int port = 8080; if (args != null && args.length > 0) { try { port = Integer.valueOf(args[0]); } catch (NumberFormatException e) { // 采用默认值 } } new TimeServer().bind(port); } }
[ "837403116@qq.com" ]
837403116@qq.com
c60d94fe485a598a78c4f040ce0727f890ce4589
606d7911da535e25c34bac9778bd83322052950e
/src/main/java/tech/ouyu/quickResponder/back/QuickResponderApplication.java
424639aac8fb172625f37c4590c4b03289f5c614
[]
no_license
Ouyuone/quick-responder-back
b31a0cf4cc11fdcfe763d71bb92fac96cf5668e4
6e4bf63289138f235ec9871a414e1c7c5db0fc0b
refs/heads/main
2023-02-23T01:44:19.739372
2021-01-30T13:04:27
2021-01-30T13:04:27
320,580,067
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package tech.ouyu.quickResponder.back; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @MapperScan(basePackages = {"tech.ouyu.quickResponder.back.mapper"}) @SpringBootApplication public class QuickResponderApplication { public static void main(String[] args) { SpringApplication.run(QuickResponderApplication.class, args); } }
[ "461388758@qq.com" ]
461388758@qq.com
7cf758ba6d43d2d78856d1ce4583904f6c211c44
67789e4c8d45819105bb39efaa00eec6943ab42c
/src/main/java/br/com/prontuariounico/security/SpringSecurityAuditorAware.java
7725459d7ca93b7ed117d7fbda0632b2920bdf29
[]
no_license
emaruya/prontuario_unico
06fa9581f21a26dab8d1fcb85983ad64b7442433
815625ed9ba124db4d71ec097ab1bd1ddc9f3f2d
refs/heads/main
2023-01-28T00:14:48.242192
2020-12-07T01:49:08
2020-12-07T01:49:08
319,147,298
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
package br.com.prontuariounico.security; import br.com.prontuariounico.config.Constants; import java.util.Optional; import org.springframework.data.domain.AuditorAware; import org.springframework.stereotype.Component; /** * Implementation of {@link AuditorAware} based on Spring Security. */ @Component public class SpringSecurityAuditorAware implements AuditorAware<String> { @Override public Optional<String> getCurrentAuditor() { return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
a0c2aa62437cf6233a0042b310642b6143873575
1c965c1b1ccdd4d87828472d439f0dc18b8d8314
/appProyectoFinal/src/java/Model/Ejercicio.java
bf91d7f43daff0a26f23c547a1defb4836ce3249
[]
no_license
BayronJPR/appProyectoFinal
5cbd4e61fe4589e1558c28bcfbb0a4fb48d452e0
c03768af06fa47a2f106089741a61a6107d7c0e3
refs/heads/master
2022-03-07T12:32:10.134693
2019-08-02T21:21:36
2019-08-02T21:21:36
198,127,517
0
0
null
2019-08-02T21:22:15
2019-07-22T01:53:23
CSS
UTF-8
Java
false
false
1,063
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 Model; /** * * @author MrHaksh */ public class Ejercicio { int idEjercicio; String descripcion; int log; public Ejercicio(int idEjercicio, String descripcion, int log) { this.setIdEjercicio(idEjercicio); this.setDescripcion(descripcion); this.setLog(log); } public Ejercicio() { } public int getIdEjercicio() { return idEjercicio; } public void setIdEjercicio(int idEjercicio) { this.idEjercicio = idEjercicio; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public int getLog() { return log; } public void setLog(int log) { this.log = log; } }
[ "MrHaksh@MrHaksh" ]
MrHaksh@MrHaksh
24c190ac4905fc5ec5b55da4a9ed3449873ec1f1
fc7dbc55c28514a48629184383c808d348b8425c
/300. Longest Increasing Subsequence/src/Solution2.java
8347195e0cca92c51c9d09c11a58b75dfeba915f
[]
no_license
novRay/leetcode_solution
afbb4b905aeb5040957ea0a817043bd85eb1dbcd
aa6844cc10ca0177b5753678bec19ca144c96671
refs/heads/master
2023-08-19T02:05:59.819837
2021-10-16T07:16:51
2021-10-16T07:16:51
408,674,456
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
import java.util.Arrays; // Greedy + Binary Search (Patience Sort) public class Solution2 { public int lengthOfLIS(int[] nums) { int n = nums.length; int[] tails = new int[n]; int res = 0; for (int num : nums) { int lo = 0; int hi = res; if (res == 0 || num > tails[res - 1]) { tails[res] = num; res ++; } else { while (lo < hi) { int mid = (lo + hi) / 2; if (tails[mid] < num) { lo = mid + 1; } else { hi = mid; } } tails[lo] = num; } } return res; } }
[ "rayyc810@gmail.com" ]
rayyc810@gmail.com
610fbdb6e1f6290a07ccd370b4746d8ea3a590e6
60b39cfa29cee07d052ce07093aff567fe1d789a
/src/main/java/com/bootdo/mia/service/impl/ExperevaluateServiceImpl.java
f6d1fba83395aeb7051055d15cc4a80013b2628a
[]
no_license
iamfine099/mia
05ecb7d8b98871797b30de8250e68fe46f665efa
4c7469e1d8918269e9a6b0cc2a90a7ffc1b9a05d
refs/heads/master
2022-09-11T09:39:11.970942
2020-04-03T05:25:07
2020-04-03T05:25:07
180,247,196
0
0
null
2022-09-01T23:06:57
2019-04-08T23:18:11
JavaScript
UTF-8
Java
false
false
4,210
java
package com.bootdo.mia.service.impl; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.IOException; import java.net.URLEncoder; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.bootdo.mia.dao.ExperevaluateDao; import com.bootdo.mia.domain.ExperevaluateDO; import com.bootdo.mia.service.ExperevaluateService; import com.bootdo.common.utils.excel.ImportExcel; import org.springframework.web.multipart.MultipartFile; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; @Service public class ExperevaluateServiceImpl implements ExperevaluateService { @Autowired private ExperevaluateDao experevaluateDao; @Override public ExperevaluateDO get(Integer eetId){ return experevaluateDao.get(eetId); } @Override public List<ExperevaluateDO> list(Map<String, Object> map){ return experevaluateDao.list(map); } @Override public List<ExperevaluateDO> detailList(Map<String, Object> map){ return experevaluateDao.detailList(map); } @Override public int count(Map<String, Object> map){ return experevaluateDao.count(map); } @Override public int detailCount(Map<String, Object> map){ return experevaluateDao.detailCount(map); } @Override public int save(ExperevaluateDO experevaluate){ return experevaluateDao.save(experevaluate); } @Override public int update(ExperevaluateDO experevaluate){ return experevaluateDao.update(experevaluate); } @Override public int remove(Integer eetId){ return experevaluateDao.remove(eetId); } @Override public int batchRemove(Integer[] eetIds){ return experevaluateDao.batchRemove(eetIds); } /** * 职位类别导出EXCEL * @param request * @param response * @param out */ public void exportExcel(HttpServletRequest request, HttpServletResponse response, Map<String, Object> map, ServletOutputStream out) { TemplateExportParams params = new TemplateExportParams("templates/doc/Experevaluate.xls"); List<ExperevaluateDO> list = experevaluateDao.list(map); Map<String, Object> map1 = new HashMap<String, Object>(); map1.put("maplist", list); Workbook workbook = ExcelExportUtil.exportExcel(params,map1); try { String fileName = "Experevaluate"+new Date().getTime()/1000+".xls"; response.setContentType("application/octet-stream"); response.setHeader("name", fileName); response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0"); response.setHeader("Pragma", "public"); response.setDateHeader("Expires", 0); response.setHeader("Content-disposition","attachment; filename=\""+URLEncoder.encode(fileName, "UTF-8")+ "\""); workbook.write(out); workbook.close(); out.flush(); out.close(); } catch (IOException e) { e.printStackTrace(); } } /** * 导入excel * @param fileName * @param file * @return * @throws IOException * @throws InvalidFormatException */ public void importExcel(String fileName, MultipartFile file) throws Exception { ImportExcel ei = new ImportExcel(file, 1, 0); List<ExperevaluateDO> list = ei.getDataList(ExperevaluateDO.class); // for (ExperevaluateDO experevaluate : list) { if(experevaluate != null) { experevaluateDao.save( experevaluate); } } } @Override public int notCompleteCount(Map<String,Object> map) { return experevaluateDao.notCompleteCount(map); } @Override public String avgScore(Integer articleId) { return experevaluateDao.avgScore(articleId); } @Override public Integer recommendNum(Integer articleId) { return experevaluateDao.recommendNum(articleId); } @Override public Integer likeNum(Integer articleId) { return experevaluateDao.likeNum(articleId); } @Override public int deleteByArticleId(Integer articleId){ return experevaluateDao.deleteByArticleId(articleId); } }
[ "wangjr@riverroad.cn" ]
wangjr@riverroad.cn
5585e22b77985af4b0b307282b80663283ea0f15
4b787007b59c2e575082a37584ef0a88a5628df0
/app/src/main/java/com/adamapps/coursealert/HomeActivity.java
bb5f12c0b8de37d963e0aeb989df40c20f59d2fb
[]
no_license
adamfils/SchoolAssistant
12a117206e954d5ab624e2b2afe2c32bb2d8d0e3
5a757de3a3f3b5ff765f9c2552ebcd83c577f69c
refs/heads/master
2021-01-20T16:10:02.437775
2017-08-18T07:10:21
2017-08-18T07:10:21
90,822,185
0
0
null
null
null
null
UTF-8
Java
false
false
24,399
java
package com.adamapps.coursealert; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.media.MediaPlayer; import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.NonNull; 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.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.adamapps.coursealert.GettingStarted.Welcome; import com.adamapps.coursealert.model.SinglePostModel; import com.firebase.ui.database.FirebaseRecyclerAdapter; import com.github.clans.fab.FloatingActionButton; import com.github.clans.fab.FloatingActionMenu; import com.google.android.gms.auth.api.Auth; import com.google.android.gms.auth.api.signin.GoogleSignInOptions; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.ResultCallback; import com.google.android.gms.common.api.Status; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.Query; import com.google.firebase.database.ValueEventListener; import com.like.LikeButton; import com.like.OnLikeListener; import com.miguelcatalan.materialsearchview.MaterialSearchView; import com.squareup.picasso.Callback; import com.squareup.picasso.NetworkPolicy; import com.squareup.picasso.Picasso; import jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout; public class HomeActivity extends AppCompatActivity implements GoogleApiClient.OnConnectionFailedListener { DatabaseReference reference; RecyclerView recyclerView; FirebaseAuth auth; FirebaseUser user; GoogleApiClient mGoogleApiClient; private boolean mProcessLike = false; DatabaseReference like_ref; DatabaseReference comment_ref; WaveSwipeRefreshLayout waveSwipeRefreshLayout; ImageButton deleteButton; private Query mQuery; MaterialSearchView search_view; FloatingActionButton post; FloatingActionMenu fab_menu; DatabaseReference postRef; private MediaPlayer mp; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home_activty); //Toolbar Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); toolbar.setTitle(R.string.app_name); toolbar.setTitleTextColor(Color.WHITE); toolbar.showOverflowMenu(); mp = new MediaPlayer(); post = (FloatingActionButton) findViewById(R.id.new_post); fab_menu = (FloatingActionMenu) findViewById(R.id.fab_menu); postRef = FirebaseDatabase.getInstance().getReference().child("post"); auth = FirebaseAuth.getInstance(); user = auth.getCurrentUser(); search_view = (MaterialSearchView) findViewById(R.id.search_view); search_view.setOnSearchViewListener(new MaterialSearchView.SearchViewListener() { @Override public void onSearchViewShown() { } @Override public void onSearchViewClosed() { firebaseRecycler(); } }); search_view.setOnQueryTextListener(new MaterialSearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String query) { return false; } @Override public boolean onQueryTextChange(String newText) { if (newText != null && !newText.isEmpty()) { mQuery = postRef.orderByChild("name").startAt(newText); FirebaseRecyclerAdapter<SinglePostModel, PostViewHolder> adapter = new FirebaseRecyclerAdapter<SinglePostModel, PostViewHolder> (SinglePostModel.class, R.layout.single_post_layout, PostViewHolder.class, mQuery) { @Override protected void populateViewHolder(PostViewHolder viewHolder, SinglePostModel model, int position) { final String post_key = getRef(position).getKey(); viewHolder.setImage(HomeActivity.this, model.getImage()); viewHolder.setTitle(model.getTitle()); viewHolder.setDesc(model.getDesc()); viewHolder.setUid(model.getName()); viewHolder.setLikeBtn(post_key); viewHolder.setUsersLike(post_key); viewHolder.like_btn.setOnLikeListener(new OnLikeListener() { @Override public void liked(final LikeButton likeButton) { mProcessLike = true; like_ref = reference.child("Likes"); like_ref.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (mProcessLike) { like_ref.child(post_key).child(auth.getCurrentUser().getUid()) .setValue(auth.getCurrentUser().getDisplayName()) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toast.makeText(HomeActivity.this, "Liked", Toast.LENGTH_SHORT).show(); mp.reset(); mp = MediaPlayer.create(getApplicationContext(), R.raw.snd_like_story); mp.start(); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Toast.makeText(HomeActivity.this, "Could Not Like", Toast.LENGTH_SHORT).show(); } }); likeButton.setAnimationScaleFactor(3); mProcessLike = false; } } @Override public void onCancelled(DatabaseError databaseError) { } }); } @Override public void unLiked(LikeButton likeButton) { like_ref = reference.child("Likes"); like_ref.child(post_key).child(auth.getCurrentUser().getUid()).removeValue().addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toast.makeText(HomeActivity.this, "DisLiked", Toast.LENGTH_SHORT).show(); } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Toast.makeText(HomeActivity.this, "Could Not Dislike \n" + e, Toast.LENGTH_SHORT).show(); } }); likeButton.setAnimationScaleFactor(3); mProcessLike = false; } }); } }; recyclerView.setLayoutManager(new LinearLayoutManager(HomeActivity.this)); recyclerView.setAdapter(adapter); } else { firebaseRecycler(); } return true; } }); reference = FirebaseDatabase.getInstance().getReference(); postRef = reference.child("post"); recyclerView = (RecyclerView) findViewById(R.id.post_preview); postRef.keepSynced(true); houseKeeping(); like_ref.keepSynced(true); firebaseRecycler(); } private void firebaseRecycler() { FirebaseRecyclerAdapter<SinglePostModel, PostViewHolder> adapter = new FirebaseRecyclerAdapter<SinglePostModel, PostViewHolder> (SinglePostModel.class, R.layout.single_post_layout, PostViewHolder.class, postRef) { @Override protected void populateViewHolder(PostViewHolder viewHolder, SinglePostModel model, int position) { final String post_key = getRef(position).getKey(); viewHolder.setImage(HomeActivity.this, model.getImage()); viewHolder.setTitle(model.getTitle()); viewHolder.setDesc(model.getDesc()); viewHolder.setUid(model.getName()); viewHolder.setLikeBtn(post_key); viewHolder.setUsersLike(post_key); viewHolder.like_btn.setOnLikeListener(new OnLikeListener() { @Override public void liked(final LikeButton likeButton) { mProcessLike = true; like_ref = reference.child("Likes"); like_ref.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (mProcessLike) { like_ref.child(post_key).child(auth.getCurrentUser().getUid()) .setValue(auth.getCurrentUser().getDisplayName()) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toast.makeText(HomeActivity.this, "Liked", Toast.LENGTH_SHORT).show(); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Toast.makeText(HomeActivity.this, "Could Not Like", Toast.LENGTH_SHORT).show(); } }); likeButton.setAnimationScaleFactor(3); mProcessLike = false; } } @Override public void onCancelled(DatabaseError databaseError) { } }); } @Override public void unLiked(LikeButton likeButton) { like_ref = reference.child("Likes"); like_ref.child(post_key).child(auth.getCurrentUser().getUid()).removeValue().addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toast.makeText(HomeActivity.this, "DisLiked", Toast.LENGTH_SHORT).show(); } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Toast.makeText(HomeActivity.this, "Could Not Dislike \n" + e, Toast.LENGTH_SHORT).show(); } }); likeButton.setAnimationScaleFactor(3); mProcessLike = false; } }); viewHolder.mView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { return; } }); } }; recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setAdapter(adapter); } private void houseKeeping() { final DatabaseReference connectedRef = FirebaseDatabase.getInstance().getReference(".info/connected"); waveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.refresh_layout); waveSwipeRefreshLayout.setWaveColor(Color.parseColor("#c85a54")); waveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { connectedRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { boolean connected = dataSnapshot.getValue(Boolean.class); if (connected) { Toast.makeText(HomeActivity.this, "You Are Connected", Toast.LENGTH_SHORT).show(); new Task().execute(); } else { Toast.makeText(HomeActivity.this, "You Seem Not To Be Connected", Toast.LENGTH_SHORT).show(); new Task().execute(); } } @Override public void onCancelled(DatabaseError databaseError) { } }); } }); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.default_web_client_id)) .requestEmail() .build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, this) .addApi(Auth.GOOGLE_SIGN_IN_API, gso) .build(); like_ref = reference.child("Likes"); comment_ref = reference.child("Comments"); } public void NewPost(View v) { fab_menu.close(true); startActivity(new Intent(this, NewPostActivity.class)); } public void SearchUser(View v) { fab_menu.close(true); startActivity(new Intent(this, SearchUserActivity.class)); } public void Profile(View v) { fab_menu.close(true); startActivity(new Intent(this, CurrentUserProfile.class)); } public void Logout(View v) { fab_menu.close(true); FirebaseAuth.getInstance().signOut(); Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { Toast.makeText(HomeActivity.this, "Signed Out Hope To See You Soon", Toast.LENGTH_SHORT).show(); } }); finish(); startActivity(new Intent(HomeActivity.this, Welcome.class)); } private class Task extends AsyncTask<Void, Void, String[]> { @Override protected String[] doInBackground(Void... voids) { return new String[0]; } @Override protected void onPostExecute(String[] strings) { waveSwipeRefreshLayout.setRefreshing(false); super.onPostExecute(strings); } } @Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) { } public static class PostViewHolder extends RecyclerView.ViewHolder { View mView; LikeButton like_btn; ImageButton comment_btn; TextView usersLike; DatabaseReference like_ref; FirebaseAuth auth; public PostViewHolder(View itemView) { super(itemView); mView = itemView; like_btn = (LikeButton) mView.findViewById(R.id.like_button); comment_btn = (ImageButton) mView.findViewById(R.id.comment_btn); usersLike = (TextView) mView.findViewById(R.id.usersWhoLike); like_ref = FirebaseDatabase.getInstance().getReference().child("Likes"); auth = FirebaseAuth.getInstance(); like_ref.keepSynced(true); } public void setComment(String post_key) { } public void setUsersLike(String post_key) { like_ref.child(post_key).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { long userNumber = dataSnapshot.getChildrenCount(); /*for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()){ String users = dataSnapshot1.getValue(String.class); StringBuilder buffer = new StringBuilder(); for (int i=0;i<userNumber;i++){ if(i>0){ buffer.append(","); } buffer.append(users); } usersLike.setText(buffer); }*/ usersLike.setText(String.valueOf(userNumber)); } @Override public void onCancelled(DatabaseError databaseError) { } }); } public void setLikeBtn(final String post_key) { like_ref.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (dataSnapshot.child(post_key).hasChild(auth.getCurrentUser().getUid())) { //like_btn.setImageResource(R.drawable.ic_like_blue); like_btn.setLiked(true); like_btn.setAnimationScaleFactor(4); } else { //like_btn.setImageResource(R.drawable.ic_like_grey); like_btn.setLiked(false); like_btn.setAnimationScaleFactor(3); } } @Override public void onCancelled(DatabaseError databaseError) { } }); } void setImage(final Context context, final String image) { final ImageView postImage = (ImageView) mView.findViewById(R.id.singlePostImage); Picasso.with(context).load(image). placeholder(R.drawable.ic_image).error(R.drawable.ic_image_coloured).networkPolicy(NetworkPolicy.OFFLINE).into(postImage, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(context).load(image). placeholder(R.drawable.ic_image).error(R.drawable.ic_image_coloured).into(postImage); } }); } public void setTitle(String title) { TextView titleNew = (TextView) mView.findViewById(R.id.singlePostTitle); titleNew.setText(title); } void setDesc(String desc) { TextView description = (TextView) mView.findViewById(R.id.singlePostDescription); description.setText(desc); } void setUid(String uid) { TextView userId = (TextView) mView.findViewById(R.id.singleUserId); userId.setText(uid); } void setName(String name) { TextView userId = (TextView) mView.findViewById(R.id.singleUserId); userId.setText(name); } } @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); MenuItem item = menu.findItem(R.id.action_search); search_view.setMenuItem(item); 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(); if (id == R.id.logout) { FirebaseAuth.getInstance().signOut(); Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(new ResultCallback<Status>() { @Override public void onResult(@NonNull Status status) { Toast.makeText(HomeActivity.this, "Signed Out", Toast.LENGTH_SHORT).show(); } }); finish(); startActivity(new Intent(HomeActivity.this, Welcome.class)); } if (id == R.id.explore) { fab_menu.close(true); startActivity(new Intent(this, ExploreCategories.class)); } return super.onOptionsItemSelected(item); } @Override public void onBackPressed() { if (search_view.isSearchOpen()) { search_view.closeSearch(); } else { super.onBackPressed(); } } }
[ "filswino@gmail.com" ]
filswino@gmail.com
94d89507c1d3d25b02ffb0ec5b349caddc12dd4b
6fe6e726bc5959593201127cd8975ae7ab0d39da
/config-server-git/src/main/java/spring/config/ConfigServerGitApplication.java
8f85f2cbff07692444fef42357e343d5eeee03b4
[]
no_license
lcodyto/springcloud-study
3d77ee61e0d4d77e746e434f077c896cde76109a
7412efe39e65e56799037180b40901f9c5fb076c
refs/heads/master
2023-05-06T02:02:17.946975
2021-05-04T15:52:00
2021-05-04T15:52:00
372,820,373
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package spring.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.config.server.EnableConfigServer; @EnableConfigServer @SpringBootApplication public class ConfigServerGitApplication { public static void main(String[] args) { SpringApplication.run(ConfigServerGitApplication.class, args); } }
[ "liu55371481@163.com" ]
liu55371481@163.com
09570baa2ad2fa78bb8d0ecdaddf0d90bb93e617
d1d8b0885c964b647c8ac0451ea7f0dc3726f847
/ServletHtml/ServletHtml/src/com/jspservletcookbook/bean/WorkReportBean.java
82732330881be8e71dc6c400e21bed63a3e560b2
[]
no_license
fhlkm/WebProject
8595d84e6abb86a16430e372c55a18a474c4229b
5336855d6a9c353cf4ac51108ccf028d0f76b0f5
refs/heads/master
2020-04-15T12:51:04.692902
2015-03-20T22:39:25
2015-03-20T22:39:25
32,610,551
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
package com.jspservletcookbook.bean; public class WorkReportBean { public static final String SNO ="Number"; public static final String Time="Time"; public static final String Name="Name"; public static final String Date="Date"; public static final String SCHECKLIST="Checklists"; public static final String Image="Image"; public static final String DESCRIPTION ="DESCRIPTION"; public static final String IMG_REPORT_PICTURE ="IMG_REPORT_PICTURE"; public static final String PICTURE="PICTURE"; public static final String PICTURES ="PICTURES"; public static final String PART="PART"; }
[ "hfeng11@hawk.iit.edu" ]
hfeng11@hawk.iit.edu
38a1636f54f3f202a9b00f73f6bb66e2137f8ab6
8d7010fc64c8c91c028f2bb5e11550cbce7244b2
/src/main/java/services/impl/UserSecurityServiceImpl.java
9467f9b3d2718423310b4cffbd299ddbeb274143
[]
no_license
Typersun/quiz-engine-servlets
c6c927af59fb9f132ddfbd861f665f32ef31b73d
a9f4a0e4fecd690a60260eb1a7033fff8ae25d3c
refs/heads/master
2023-05-08T04:45:14.648728
2021-05-27T18:19:43
2021-05-27T18:19:43
360,391,358
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package services.impl; import dto.LoginDto; import dto.RegistrationDto; import dto.TokenDto; import dto.errors.ErrorEntity; import exceptions.QuizEngineException; import lombok.AllArgsConstructor; import models.Profile; import models.User; import repositories.UserRepository; import services.UserSecurityService; import utils.JwtHelper; import java.util.Optional; @AllArgsConstructor public class UserSecurityServiceImpl implements UserSecurityService { private final UserRepository userRepository; private final JwtHelper jwtHelper; private final Validator validator; @Override public TokenDto save(RegistrationDto entity) throws QuizEngineException { Optional<ErrorEntity> optionalError = validator.getUserRegisterFormError(entity); if (optionalError.isPresent()) { throw new QuizEngineException(optionalError.get()); } User user = User.builder() .username(entity.getUsername()) .email(entity.getEmail()) .password(entity.getPassword()) .profile(new Profile()) .build(); userRepository.save(user); return new TokenDto(jwtHelper.generateToken(user)); } @Override public TokenDto auth(LoginDto entity) throws QuizEngineException { Optional<ErrorEntity> optionalError = validator.getLoginFormError(entity); if (optionalError.isPresent()) { throw new QuizEngineException(optionalError.get()); } User user = User.builder() .username(entity.getUsername()) .password(entity.getPassword()) .build(); return new TokenDto(jwtHelper.generateToken(user)); } }
[ "wintersun116@gmail.com" ]
wintersun116@gmail.com
895834b55e663c820faf329f2502e1b59c811fc8
bf4e5ce01d5db32f95400e9e1a79d69c0c760e5e
/app/src/main/java/com/xhly/godutch/utility/DateTools.java
fe4cb40e5062d8fa2319375fbc8bf680261c4aaf
[]
no_license
xhly521/AAHelper
cef8f61b90b6d42bcccb4f1a07ffc0f407217a83
5079de7254753cf21d54be5e518cae7ad72c1c4f
refs/heads/master
2020-04-03T19:08:02.936008
2016-06-24T01:20:40
2016-06-24T01:20:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
46,411
java
package com.xhly.godutch.utility; import java.io.Serializable; import java.text.ParseException; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; /** * 日期操作工具类,主要实现了日期的常用操作。 * <p> * 在工具类中经常使用到工具类的格式化描述,这个主要是一个日期的操作类,所以日志格式主要使用 SimpleDateFormat的定义格式. * <p> * 格式的意义如下: 日期和时间模式 <br> * 日期和时间格式由日期和时间模式字符串指定。在日期和时间模式字符串中,未加引号的字母 'A' 到 'Z' 和 'a' 到 'z' * 被解释为模式字母,用来表示日期或时间字符串元素。文本可以使用单引号 (') 引起来,以免进行解释。"''" * 表示单引号。所有其他字符均不解释;只是在格式化时将它们简单复制到输出字符串,或者在分析时与输入字符串进行匹配。 * <p> * 定义了以下模式字母(所有其他字符 'A' 到 'Z' 和 'a' 到 'z' 都被保留): <br> * <table> * <tr> * <td>字母</td> * <td>日期或时间元素</td> * <td>表示</td> * <td>示例</td> * <td> * </tr> * <tr> * <td>G</td> * <td>Era</td> * <td>标志符</td> * <td>Text</td> * <td>AD</td> * <td> * </tr> * <tr> * <td>y</td> * <td>年</td> * <td>Year</td> * <td>1996;</td> * <td>96</td> * <td> * </tr> * <tr> * <td>M</td> * <td>年中的月份</td> * <td>Month</td> * <td>July;</td> * <td>Jul;</td> * <td>07 * </tr> * <tr> * <td>w</td> * <td>年中的周数</td> * <td>Number</td> * <td>27</td> * <td> * </tr> * <tr> * <td>W</td> * <td>月份中的周数</td> * <td>Number</td> * <td>2</td> * <td> * </tr> * <tr> * <td>D</td> * <td>年中的天数</td> * <td>Number</td> * <td>189</td> * <td> * </tr> * <tr> * <td>d</td> * <td>月份中的天数</td> * <td>Number</td> * <td>10</td> * <td> * </tr> * <tr> * <td>F</td> * <td>月份中的星期</td> * <td>Number</td> * <td>2</td> * <td> * </tr> * <tr> * <td>E</td> * <td>星期中的天数</td> * <td>Text</td> * <td>Tuesday;</td> * <td>Tue * </tr> * <tr> * <td>a</td> * <td>Am/pm</td> * <td>标记</td> * <td>Text</td> * <td>PM</td> * <td> * </tr> * <tr> * <td>H</td> * <td>一天中的小时数(0-23)</td> * <td>Number</td> * <td>0 * </tr> * <tr> * <td>k</td> * <td>一天中的小时数(1-24)</td> * <td>Number</td> * <td>24</td> * <td> * </tr> * <tr> * <td>K</td> * <td>am/pm</td> * <td>中的小时数(0-11)</td> * <td>Number</td> * <td>0</td> * <td> * </tr> * <tr> * <td>h</td> * <td>am/pm</td> * <td>中的小时数(1-12)</td> * <td>Number</td> * <td>12</td> * <td> * </tr> * <tr> * <td>m</td> * <td>小时中的分钟数</td> * <td>Number</td> * <td>30</td> * <td> * </tr> * <tr> * <td>s</td> * <td>分钟中的秒数</td> * <td>Number</td> * <td>55</td> * <td> * </tr> * <tr> * <td>S</td> * <td>毫秒数</td> * <td>Number</td> * <td>978</td> * <td> * </tr> * <tr> * <td>z</td> * <td>时区</td> * <td>General</td> * <td>time</td> * <td>zone</td> * <td>Pacific</td> * <td>Standard</td> * <td>Time;</td> * <td>PST;</td> * <td>GMT-08:00 * </tr> * <tr> * <td>Z</td> * <td>时区</td> * <td>RFC</td> * <td>822</td> * <td>time</td> * <td>zone</td> * <td>-0800</td> * <td> * </tr> * </table> * * 模式字母通常是重复的,其数量确定其精确表示: * */ public final class DateTools implements Serializable { /** * */ private static final long serialVersionUID = -3098985139095632110L; private DateTools() { } /** * 格式化日期显示格式 * * @param sdate * 原始日期格式 s - 表示 "yyyy-mm-dd" 形式的日期的 String 对象 * @param format * 格式化后日期格式 * @return 格式化后的日期显示 */ public static String dateFormat(String sdate, String format) { SimpleDateFormat formatter = new SimpleDateFormat(format); java.sql.Date date = java.sql.Date.valueOf(sdate); String dateString = formatter.format(date); return dateString; } /** * 求两个日期相差天数 * * @param sd * 起始日期,格式yyyy-MM-dd * @param ed * 终止日期,格式yyyy-MM-dd * @return 两个日期相差天数 */ public static long getIntervalDays(String sd, String ed) { return ((java.sql.Date.valueOf(ed)).getTime() - (java.sql.Date .valueOf(sd)).getTime()) / (3600 * 24 * 1000); } /** * 起始年月yyyy-MM与终止月yyyy-MM之间跨度的月数。 * * @param beginMonth * 格式为yyyy-MM * @param endMonth * 格式为yyyy-MM * @return 整数。 */ public static int getInterval(String beginMonth, String endMonth) { int intBeginYear = Integer.parseInt(beginMonth.substring(0, 4)); int intBeginMonth = Integer.parseInt(beginMonth.substring(beginMonth .indexOf("-") + 1)); int intEndYear = Integer.parseInt(endMonth.substring(0, 4)); int intEndMonth = Integer.parseInt(endMonth.substring(endMonth .indexOf("-") + 1)); return ((intEndYear - intBeginYear) * 12) + (intEndMonth - intBeginMonth) + 1; } /** * 根据给定的分析位置开始分析日期/时间字符串。例如,时间文本 "07/10/96 4:5 PM, PDT" 会分析成等同于 * Date(837039928046) 的 Date。 * * @param sDate * @param dateFormat * @return */ public static Date getDate(String sDate, String dateFormat) { SimpleDateFormat fmt = new SimpleDateFormat(dateFormat); ParsePosition pos = new ParsePosition(0); return fmt.parse(sDate, pos); } /** * 取得当前日期的年份,以yyyy格式返回. * * @return 当年 yyyy */ public static String getCurrentYear() { return getFormatCurrentTime("yyyy"); } /** * 自动返回上一年。例如当前年份是2007年,那么就自动返回2006 * * @return 返回结果的格式为 yyyy */ public static String getBeforeYear() { String currentYear = getFormatCurrentTime("yyyy"); int beforeYear = Integer.parseInt(currentYear) - 1; return "" + beforeYear; } /** * 取得当前日期的月份,以MM格式返回. * * @return 当前月份 MM */ public static String getCurrentMonth() { return getFormatCurrentTime("MM"); } /** * 取得当前日期的天数,以格式"dd"返回. * * @return 当前月中的某天dd */ public static String getCurrentDay() { return getFormatCurrentTime("dd"); } /** * 返回当前时间字符串。 * <p> * 格式:yyyy-MM-dd * * @return String 指定格式的日期字符串. */ public static String getCurrentDate() { return getFormatDateTime(new Date(), "yyyy-MM-dd"); } /** * 返回当前指定的时间戳。格式为yyyy-MM-dd HH:mm:ss * * @return 格式为yyyy-MM-dd HH:mm:ss,总共19位。 */ public static String getCurrentDateTime() { return getFormatDateTime(new Date(), "yyyy-MM-dd HH:mm:ss"); } /** * 返回给定时间字符串。 * <p> * 格式:yyyy-MM-dd * * @param date * 日期 * @return String 指定格式的日期字符串. */ public static String getFormatDate(Date date) { return getFormatDateTime(date, "yyyy-MM-dd"); } /** * 根据制定的格式,返回日期字符串。例如2007-05-05 * * @param format * "yyyy-MM-dd" 或者 "yyyy/MM/dd",当然也可以是别的形式。 * @return 指定格式的日期字符串。 */ public static String getFormatDate(String format) { return getFormatDateTime(new Date(), format); } /** * 返回当前时间字符串。 * <p> * 格式:yyyy-MM-dd HH:mm:ss * * @return String 指定格式的日期字符串. */ public static String getCurrentTime() { return getFormatDateTime(new Date(), "yyyy-MM-dd HH:mm:ss"); } /** * 返回给定时间字符串。 * <p> * 格式:yyyy-MM-dd HH:mm:ss * * @param date * 日期 * @return String 指定格式的日期字符串. */ public static String getFormatTime(Date date) { return getFormatDateTime(date, "yyyy-MM-dd HH:mm:ss"); } /** * 返回给短时间字符串。 * <p> * 格式:yyyy-MM-dd * * @param date * 日期 * @return String 指定格式的日期字符串. */ public static String getFormatShortTime(Date date) { return getFormatDateTime(date, "yyyy-MM-dd"); } /** * 根据给定的格式,返回时间字符串。 * <p> * 格式参照类描绘中说明.和方法getFormatDate是一样的。 * * @param format * 日期格式字符串 * @return String 指定格式的日期字符串. */ public static String getFormatCurrentTime(String format) { return getFormatDateTime(new Date(), format); } /** * 根据给定的格式与时间(Date类型的),返回时间字符串。最为通用。<br> * * @param date * 指定的日期 * @param format * 日期格式字符串 * @return String 指定格式的日期字符串. */ public static String getFormatDateTime(Date date, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(date); } /** * 取得指定年月日的日期对象. * * @param year * 年 * @param month * 月注意是从1到12 * @param day * 日 * @return 一个java.util.Date()类型的对象 */ public static Date getDateObj(int year, int month, int day) { Calendar c = new GregorianCalendar(); c.set(year, month - 1, day); return c.getTime(); } /** * 获取指定日期的下一天。 * * @param date * yyyy/MM/dd * @return yyyy/MM/dd */ public static String getDateTomorrow(String date) { Date tempDate = null; if (date.indexOf("/") > 0) tempDate = getDateObj(date, "[/]"); if (date.indexOf("-") > 0) tempDate = getDateObj(date, "[-]"); tempDate = getDateAdd(tempDate, 1); return getFormatDateTime(tempDate, "yyyy/MM/dd"); } /** * 获取与指定日期相差指定天数的日期。 * * @param date * yyyy/MM/dd * @param offset * 正整数 * @return yyyy/MM/dd */ public static String getDateOffset(String date, int offset) { // Date tempDate = getDateObj(date, "[/]"); Date tempDate = null; if (date.indexOf("/") > 0) tempDate = getDateObj(date, "[/]"); if (date.indexOf("-") > 0) tempDate = getDateObj(date, "[-]"); tempDate = getDateAdd(tempDate, offset); return getFormatDateTime(tempDate, "yyyy/MM/dd"); } /** * 取得指定分隔符分割的年月日的日期对象. * * @param argsDate * 格式为"yyyy-MM-dd" * @param split * 时间格式的间隔符,例如“-”,“/”,要和时间一致起来。 * @return 一个java.util.Date()类型的对象 */ public static Date getDateObj(String argsDate, String split) { String[] temp = argsDate.split(split); int year = new Integer(temp[0]).intValue(); int month = new Integer(temp[1]).intValue(); int day = new Integer(temp[2]).intValue(); return getDateObj(year, month, day); } /** * 取得给定字符串描述的日期对象,描述模式采用pattern指定的格式. * * @param dateStr * 日期描述 从给定字符串的开始分析文本,以生成一个日期。该方法不使用给定字符串的整个文本。 有关日期分析的更多信息,请参阅 * parse(String, ParsePosition) 方法。一个 String,应从其开始处进行分析 * * @param pattern * 日期模式 * @return 给定字符串描述的日期对象。 */ public static Date getDateFromString(String dateStr, String pattern) { SimpleDateFormat sdf = new SimpleDateFormat(pattern); Date resDate = null; try { resDate = sdf.parse(dateStr); } catch (Exception e) { e.printStackTrace(); } return resDate; } /** * 取得当前Date对象. * * @return Date 当前Date对象. */ public static Date getDateObj() { Calendar c = new GregorianCalendar(); return c.getTime(); } /** * * @return 当前月份有多少天; */ public static int getDaysOfCurMonth() { int curyear = new Integer(getCurrentYear()).intValue(); // 当前年份 int curMonth = new Integer(getCurrentMonth()).intValue();// 当前月份 int mArray[] = new int[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // 判断闰年的情况 ,2月份有29天; if ((curyear % 400 == 0) || ((curyear % 100 != 0) && (curyear % 4 == 0))) { mArray[1] = 29; } return mArray[curMonth - 1]; // 如果要返回下个月的天数,注意处理月份12的情况,防止数组越界; // 如果要返回上个月的天数,注意处理月份1的情况,防止数组越界; } /** * 根据指定的年月 返回指定月份(yyyy-MM)有多少天。 * * @param time * yyyy-MM * @return 天数,指定月份的天数。 */ public static int getDaysOfCurMonth(final String time) { if (time.length() != 7) { throw new NullPointerException("参数的格式必须是yyyy-MM"); } String[] timeArray = time.split("-"); int curyear = new Integer(timeArray[0]).intValue(); // 当前年份 int curMonth = new Integer(timeArray[1]).intValue();// 当前月份 if (curMonth > 12) { throw new NullPointerException("参数的格式必须是yyyy-MM,而且月份必须小于等于12。"); } int mArray[] = new int[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // 判断闰年的情况 ,2月份有29天; if ((curyear % 400 == 0) || ((curyear % 100 != 0) && (curyear % 4 == 0))) { mArray[1] = 29; } if (curMonth == 12) { return mArray[0]; } return mArray[curMonth - 1]; // 如果要返回下个月的天数,注意处理月份12的情况,防止数组越界; // 如果要返回上个月的天数,注意处理月份1的情况,防止数组越界; } /** * 返回指定为年度为year月度month的月份内,第weekOfMonth个星期的第dayOfWeek天是当月的几号。<br> * 00 00 00 01 02 03 04 <br> * 05 06 07 08 09 10 11<br> * 12 13 14 15 16 17 18<br> * 19 20 21 22 23 24 25<br> * 26 27 28 29 30 31 <br> * 2006年的第一个周的1到7天为:05 06 07 01 02 03 04 <br> * 2006年的第二个周的1到7天为:12 13 14 08 09 10 11 <br> * 2006年的第三个周的1到7天为:19 20 21 15 16 17 18 <br> * 2006年的第四个周的1到7天为:26 27 28 22 23 24 25 <br> * 2006年的第五个周的1到7天为:02 03 04 29 30 31 01 。本月没有就自动转到下个月了。 * * @param year * 形式为yyyy <br> * @param month * 形式为MM,参数值在[1-12]。<br> * @param weekOfMonth * 在[1-6],因为一个月最多有6个周。<br> * @param dayOfWeek * 数字在1到7之间,包括1和7。1表示星期天,7表示星期六<br> * -6为星期日-1为星期五,0为星期六 <br> * @return <type>int</type> */ public static int getDayofWeekInMonth(String year, String month, String weekOfMonth, String dayOfWeek) { Calendar cal = new GregorianCalendar(); // 在具有默认语言环境的默认时区内使用当前时间构造一个默认的 GregorianCalendar。 int y = new Integer(year).intValue(); int m = new Integer(month).intValue(); cal.clear();// 不保留以前的设置 cal.set(y, m - 1, 1);// 将日期设置为本月的第一天。 cal.set(Calendar.DAY_OF_WEEK_IN_MONTH, new Integer(weekOfMonth).intValue()); cal.set(Calendar.DAY_OF_WEEK, new Integer(dayOfWeek).intValue()); // System.out.print(cal.get(Calendar.MONTH)+" "); // System.out.print("当"+cal.get(Calendar.WEEK_OF_MONTH)+"\t"); // WEEK_OF_MONTH表示当天在本月的第几个周。不管1号是星期几,都表示在本月的第一个周 return cal.get(Calendar.DAY_OF_MONTH); } /** * 根据指定的年月日小时分秒,返回一个java.Util.Date对象。 * * @param year * 年 * @param month * 月 0-11 * @param date * 日 * @param hourOfDay * 小时 0-23 * @param minute * 分 0-59 * @param second * 秒 0-59 * @return 一个Date对象。 */ public static Date getDate(int year, int month, int date, int hourOfDay, int minute, int second) { Calendar cal = new GregorianCalendar(); cal.set(year, month, date, hourOfDay, minute, second); return cal.getTime(); } /** * 根据指定的年、月、日返回当前是星期几。1表示星期天、2表示星期一、7表示星期六。 * * @param year * @param month * month是从1开始的12结束 * @param day * @return 返回一个代表当期日期是星期几的数字。1表示星期天、2表示星期一、7表示星期六。 */ public static int getDayOfWeek(String year, String month, String day) { Calendar cal = new GregorianCalendar(new Integer(year).intValue(), new Integer(month).intValue() - 1, new Integer(day).intValue()); return cal.get(Calendar.DAY_OF_WEEK); } /** * 根据指定的年、月、日返回当前是星期几。1表示星期天、2表示星期一、7表示星期六。 * * @param date * "yyyy/MM/dd",或者"yyyy-MM-dd" * @return 返回一个代表当期日期是星期几的数字。1表示星期天、2表示星期一、7表示星期六。 */ public static int getDayOfWeek(String date) { String[] temp = null; if (date.indexOf("/") > 0) { temp = date.split("/"); } if (date.indexOf("-") > 0) { temp = date.split("-"); } return getDayOfWeek(temp[0], temp[1], temp[2]); } /** * 返回当前日期是星期几。例如:星期日、星期一、星期六等等。 * * @param date * 格式为 yyyy/MM/dd 或者 yyyy-MM-dd * @return 返回当前日期是星期几 */ public static String getChinaDayOfWeek(String date) { String[] weeks = new String[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; int week = getDayOfWeek(date); return weeks[week - 1]; } /** * 根据指定的年、月、日返回当前是星期几。1表示星期天、2表示星期一、7表示星期六。 * * @param date * * @return 返回一个代表当期日期是星期几的数字。1表示星期天、2表示星期一、7表示星期六。 */ public static int getDayOfWeek(Date date) { Calendar cal = new GregorianCalendar(); cal.setTime(date); return cal.get(Calendar.DAY_OF_WEEK); } /** * 返回制定日期所在的周是一年中的第几个周。<br> * created by wangmj at 20060324.<br> * * @param year * @param month * 范围1-12<br> * @param day * @return int */ public static int getWeekOfYear(String year, String month, String day) { Calendar cal = new GregorianCalendar(); cal.clear(); cal.set(new Integer(year).intValue(), new Integer(month).intValue() - 1, new Integer(day).intValue()); return cal.get(Calendar.WEEK_OF_YEAR); } /** * 取得给定日期加上一定天数后的日期对象. * * @param date * 给定的日期对象 * @param amount * 需要添加的天数,如果是向前的天数,使用负数就可以. * @return Date 加上一定天数以后的Date对象. */ public static Date getDateAdd(Date date, int amount) { Calendar cal = new GregorianCalendar(); cal.setTime(date); cal.add(GregorianCalendar.DATE, amount); return cal.getTime(); } /** * 取得给定日期加上一定天数后的日期对象. * * @param date * 给定的日期对象 * @param amount * 需要添加的天数,如果是向前的天数,使用负数就可以. * @param format * 输出格式. * @return Date 加上一定天数以后的Date对象. */ public static String getFormatDateAdd(Date date, int amount, String format) { Calendar cal = new GregorianCalendar(); cal.setTime(date); cal.add(GregorianCalendar.DATE, amount); return getFormatDateTime(cal.getTime(), format); } /** * 获得当前日期固定间隔天数的日期,如前60天dateAdd(-60) * * @param amount * 距今天的间隔日期长度,向前为负,向后为正 * @param format * 输出日期的格式. * @return java.lang.String 按照格式输出的间隔的日期字符串. */ public static String getFormatCurrentAdd(int amount, String format) { Date d = getDateAdd(new Date(), amount); return getFormatDateTime(d, format); } /** * 取得给定格式的昨天的日期输出 * * @param format * 日期输出的格式 * @return String 给定格式的日期字符串. */ public static String getFormatYestoday(String format) { return getFormatCurrentAdd(-1, format); } /** * 返回指定日期的前一天。<br> * * @param sourceDate * @param format * yyyy MM dd hh mm ss * @return 返回日期字符串,形式和formcat一致。 */ public static String getYestoday(String sourceDate, String format) { return getFormatDateAdd(getDateFromString(sourceDate, format), -1, format); } /** * 返回明天的日期,<br> * * @param format * @return 返回日期字符串,形式和formcat一致。 */ public static String getFormatTomorrow(String format) { return getFormatCurrentAdd(1, format); } /** * 返回指定日期的后一天。<br> * * @param sourceDate * @param format * @return 返回日期字符串,形式和formcat一致。 */ public static String getFormatDateTommorrow(String sourceDate, String format) { return getFormatDateAdd(getDateFromString(sourceDate, format), 1, format); } /** * 根据主机的默认 TimeZone,来获得指定形式的时间字符串。 * * @param dateFormat * @return 返回日期字符串,形式和formcat一致。 */ public static String getCurrentDateString(String dateFormat) { Calendar cal = Calendar.getInstance(TimeZone.getDefault()); SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); sdf.setTimeZone(TimeZone.getDefault()); return sdf.format(cal.getTime()); } // /** // * @deprecated 不鼓励使用。 返回当前时间串 格式:yyMMddhhmmss,在上传附件时使用 // * // * @return String // */ // public static String getCurDate() { // GregorianCalendar gcDate = new GregorianCalendar(); // int year = gcDate.get(GregorianCalendar.YEAR); // int month = gcDate.get(GregorianCalendar.MONTH) + 1; // int day = gcDate.get(GregorianCalendar.DAY_OF_MONTH); // int hour = gcDate.get(GregorianCalendar.HOUR_OF_DAY); // int minute = gcDate.get(GregorianCalendar.MINUTE); // int sen = gcDate.get(GregorianCalendar.SECOND); // String y; // String m; // String d; // String h; // String n; // String s; // y = new Integer(year).toString(); // // if (month < 10) { // m = "0" + new Integer(month).toString(); // } else { // m = new Integer(month).toString(); // } // // if (day < 10) { // d = "0" + new Integer(day).toString(); // } else { // d = new Integer(day).toString(); // } // // if (hour < 10) { // h = "0" + new Integer(hour).toString(); // } else { // h = new Integer(hour).toString(); // } // // if (minute < 10) { // n = "0" + new Integer(minute).toString(); // } else { // n = new Integer(minute).toString(); // } // // if (sen < 10) { // s = "0" + new Integer(sen).toString(); // } else { // s = new Integer(sen).toString(); // } // // return "" + y + m + d + h + n + s; // } /** * 根据给定的格式,返回时间字符串。 和getFormatDate(String format)相似。 * * @param format * yyyy MM dd hh mm ss * @return 返回一个时间字符串 */ public static String getCurTimeByFormat(String format) { Date newdate = new Date(System.currentTimeMillis()); SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(newdate); } /** * 获取两个时间串时间的差值,单位为秒 * * @param startTime * 开始时间 yyyy-MM-dd HH:mm:ss * @param endTime * 结束时间 yyyy-MM-dd HH:mm:ss * @return 两个时间的差值(秒) */ public static long getDiff(String startTime, String endTime) { long diff = 0; SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { Date startDate = ft.parse(startTime); Date endDate = ft.parse(endTime); diff = startDate.getTime() - endDate.getTime(); diff = diff / 1000; } catch (ParseException e) { e.printStackTrace(); } return diff; } /** * 获取小时/分钟/秒 * * @param second * 秒 * @return 包含小时、分钟、秒的时间字符串,例如3小时23分钟13秒。 */ public static String getHour(long second) { long hour = second / 60 / 60; long minute = (second - hour * 60 * 60) / 60; long sec = (second - hour * 60 * 60) - minute * 60; return hour + "小时" + minute + "分钟" + sec + "秒"; } /** * 返回指定时间字符串。 * <p> * 格式:yyyy-MM-dd HH:mm:ss * * @return String 指定格式的日期字符串. */ public static String getDateTime(long microsecond) { return getFormatDateTime(new Date(microsecond), "yyyy-MM-dd HH:mm:ss"); } /** * 返回当前时间加实数小时后的日期时间。 * <p> * 格式:yyyy-MM-dd HH:mm:ss * * @return Float 加几实数小时. */ public static String getDateByAddFltHour(float flt) { int addMinute = (int) (flt * 60); Calendar cal = new GregorianCalendar(); cal.setTime(new Date()); cal.add(GregorianCalendar.MINUTE, addMinute); return getFormatDateTime(cal.getTime(), "yyyy-MM-dd HH:mm:ss"); } /** * 返回指定时间加指定小时数后的日期时间。 * <p> * 格式:yyyy-MM-dd HH:mm:ss * * @return 时间. */ public static String getDateByAddHour(String datetime, int minute) { String returnTime = null; Calendar cal = new GregorianCalendar(); SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date; try { date = ft.parse(datetime); cal.setTime(date); cal.add(GregorianCalendar.MINUTE, minute); returnTime = getFormatDateTime(cal.getTime(), "yyyy-MM-dd HH:mm:ss"); } catch (ParseException e) { e.printStackTrace(); } return returnTime; } /** * 获取两个时间串时间的差值,单位为小时 * * @param startTime * 开始时间 yyyy-MM-dd HH:mm:ss * @param endTime * 结束时间 yyyy-MM-dd HH:mm:ss * @return 两个时间的差值(秒) */ public static int getDiffHour(String startTime, String endTime) { long diff = 0; SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { Date startDate = ft.parse(startTime); Date endDate = ft.parse(endTime); diff = startDate.getTime() - endDate.getTime(); diff = diff / (1000 * 60 * 60); } catch (ParseException e) { e.printStackTrace(); } return new Long(diff).intValue(); } /** * 返回年份的下拉框。 * * @param selectName * 下拉框名称 * @param value * 当前下拉框的值 * @param startYear * 开始年份 * @param endYear * 结束年份 * @return 年份下拉框的html */ public static String getYearSelect(String selectName, String value, int startYear, int endYear) { int start = startYear; int end = endYear; if (startYear > endYear) { start = endYear; end = startYear; } StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\">"); for (int i = start; i <= end; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 返回年份的下拉框。 * * @param selectName * 下拉框名称 * @param value * 当前下拉框的值 * @param startYear * 开始年份 * @param endYear * 结束年份 * 例如开始年份为2001结束年份为2005那么下拉框就有五个值。(2001、2002、2003、2004、2005)。 * @return 返回年份的下拉框的html。 */ public static String getYearSelect(String selectName, String value, int startYear, int endYear, boolean hasBlank) { int start = startYear; int end = endYear; if (startYear > endYear) { start = endYear; end = startYear; } StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = start; i <= end; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 返回年份的下拉框。 * * @param selectName * 下拉框名称 * @param value * 当前下拉框的值 * @param startYear * 开始年份 * @param endYear * 结束年份 * @param js * 这里的js为js字符串。例如 " onchange=\"changeYear()\" " * ,这样任何js的方法就可以在jsp页面中编写,方便引入。 * @return 返回年份的下拉框。 */ public static String getYearSelect(String selectName, String value, int startYear, int endYear, boolean hasBlank, String js) { int start = startYear; int end = endYear; if (startYear > endYear) { start = endYear; end = startYear; } StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\" " + js + ">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = start; i <= end; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 返回年份的下拉框。 * * @param selectName * 下拉框名称 * @param value * 当前下拉框的值 * @param startYear * 开始年份 * @param endYear * 结束年份 * @param js * 这里的js为js字符串。例如 " onchange=\"changeYear()\" " * ,这样任何js的方法就可以在jsp页面中编写,方便引入。 * @return 返回年份的下拉框。 */ public static String getYearSelect(String selectName, String value, int startYear, int endYear, String js) { int start = startYear; int end = endYear; if (startYear > endYear) { start = endYear; end = startYear; } StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\" " + js + ">"); for (int i = start; i <= end; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 获取月份的下拉框 * * @param selectName * @param value * @param hasBlank * @return 返回月份的下拉框。 */ public static String getMonthSelect(String selectName, String value, boolean hasBlank) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 12; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 获取月份的下拉框 * * @param selectName * @param value * @param hasBlank * @param js * @return 返回月份的下拉框。 */ public static String getMonthSelect(String selectName, String value, boolean hasBlank, String js) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\" " + js + ">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 12; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 获取天的下拉框,默认的为1-31。 注意:此方法不能够和月份下拉框进行联动。 * * @param selectName * @param value * @param hasBlank * @return 获得天的下拉框 */ public static String getDaySelect(String selectName, String value, boolean hasBlank) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 31; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 获取天的下拉框,默认的为1-31 * * @param selectName * @param value * @param hasBlank * @param js * @return 获取天的下拉框 */ public static String getDaySelect(String selectName, String value, boolean hasBlank, String js) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\" " + js + ">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 31; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 计算两天之间有多少个周末(这个周末,指星期六和星期天,一个周末返回结果为2,两个为4,以此类推。) (此方法目前用于统计司机用车记录。) * 注意开始日期和结束日期要统一起来。 * * @param startDate * 开始日期 ,格式"yyyy/MM/dd" 或者"yyyy-MM-dd" * @param endDate * 结束日期 ,格式"yyyy/MM/dd"或者"yyyy-MM-dd" * @return int */ public static int countWeekend(String startDate, String endDate) { int result = 0; Date sdate = null; Date edate = null; if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { sdate = getDateObj(startDate, "/"); // 开始日期 edate = getDateObj(endDate, "/");// 结束日期 } if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { sdate = getDateObj(startDate, "-"); // 开始日期 edate = getDateObj(endDate, "-");// 结束日期 } // 首先计算出都有那些日期,然后找出星期六星期天的日期 int sumDays = Math.abs(getDiffDays(startDate, endDate)); int dayOfWeek = 0; for (int i = 0; i <= sumDays; i++) { dayOfWeek = getDayOfWeek(getDateAdd(sdate, i)); // 计算每过一天的日期 if (dayOfWeek == 1 || dayOfWeek == 7) { // 1 星期天 7星期六 result++; } } return result; } /** * 返回两个日期之间相差多少天。 注意开始日期和结束日期要统一起来。 * * @param startDate * 格式"yyyy/MM/dd" 或者"yyyy-MM-dd" * @param endDate * 格式"yyyy/MM/dd" 或者"yyyy-MM-dd" * @return 整数。 */ public static int getDiffDays(String startDate, String endDate) { long diff = 0; SimpleDateFormat ft = null; if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { ft = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); } if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } try { Date sDate = ft.parse(startDate + " 00:00:00"); Date eDate = ft.parse(endDate + " 00:00:00"); diff = eDate.getTime() - sDate.getTime(); diff = diff / 86400000;// 1000*60*60*24; } catch (ParseException e) { e.printStackTrace(); } return (int) diff; } /** * 返回两个日期之间的详细日期数组(包括开始日期和结束日期)。 例如:2007/07/01 到2007/07/03 ,那么返回数组 * {"2007/07/01","2007/07/02","2007/07/03"} 注意开始日期和结束日期要统一起来。 * * @param startDate * 格式"yyyy/MM/dd"或者 yyyy-MM-dd * @param endDate * 格式"yyyy/MM/dd"或者 yyyy-MM-dd * @return 返回一个字符串数组对象 */ public static String[] getArrayDiffDays(String startDate, String endDate) { int LEN = 0; // 用来计算两天之间总共有多少天 // 如果结束日期和开始日期相同 if (startDate.equals(endDate)) { return new String[] { startDate }; } Date sdate = null; if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { sdate = getDateObj(startDate, "/"); // 开始日期 } if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { sdate = getDateObj(startDate, "-"); // 开始日期 } LEN = getDiffDays(startDate, endDate); String[] dateResult = new String[LEN + 1]; dateResult[0] = startDate; for (int i = 1; i < LEN + 1; i++) { if (startDate.indexOf("/") > 0 && endDate.indexOf("/") > 0) { dateResult[i] = getFormatDateTime(getDateAdd(sdate, i), "yyyy/MM/dd"); } if (startDate.indexOf("-") > 0 && endDate.indexOf("-") > 0) { dateResult[i] = getFormatDateTime(getDateAdd(sdate, i), "yyyy-MM-dd"); } } return dateResult; } /** * 判断一个日期是否在开始日期和结束日期之间。 * * @param srcDate * 目标日期 yyyy/MM/dd 或者 yyyy-MM-dd * @param startDate * 开始日期 yyyy/MM/dd 或者 yyyy-MM-dd * @param endDate * 结束日期 yyyy/MM/dd 或者 yyyy-MM-dd * @return 大于等于开始日期小于等于结束日期,那么返回true,否则返回false */ public static boolean isInStartEnd(String srcDate, String startDate, String endDate) { if (startDate.compareTo(srcDate) <= 0 && endDate.compareTo(srcDate) >= 0) { return true; } else { return false; } } /** * 获取天的下拉框,默认的为1-4。 注意:此方法不能够和月份下拉框进行联动。 * * @param selectName * @param value * @param hasBlank * @return 获得季度的下拉框 */ public static String getQuarterSelect(String selectName, String value, boolean hasBlank) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 4; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 获取季度的下拉框,默认的为1-4 * * @param selectName * @param value * @param hasBlank * @param js * @return 获取季度的下拉框 */ public static String getQuarterSelect(String selectName, String value, boolean hasBlank, String js) { StringBuffer sb = new StringBuffer(""); sb.append("<select name=\"" + selectName + "\" " + js + ">"); if (hasBlank) { sb.append("<option value=\"\"></option>"); } for (int i = 1; i <= 4; i++) { if (!value.trim().equals("") && i == Integer.parseInt(value)) { sb.append("<option value=\"" + i + "\" selected>" + i + "</option>"); } else { sb.append("<option value=\"" + i + "\">" + i + "</option>"); } } sb.append("</select>"); return sb.toString(); } /** * 将格式为yyyy或者yyyy.MM或者yyyy.MM.dd的日期转换为yyyy/MM/dd的格式。位数不足的,都补01。<br> * 例如.1999 = 1999/01/01 再如:1989.02=1989/02/01 * * @param argDate * 需要进行转换的日期。格式可能为yyyy或者yyyy.MM或者yyyy.MM.dd * @return 返回格式为yyyy/MM/dd的字符串 */ public static String changeDate(String argDate) { if (argDate == null || argDate.trim().equals("")) { return ""; } String result = ""; // 如果是格式为yyyy/MM/dd的就直接返回 if (argDate.length() == 10 && argDate.indexOf("/") > 0) { return argDate; } String[] str = argDate.split("[.]"); // .比较特殊 int LEN = str.length; for (int i = 0; i < LEN; i++) { if (str[i].length() == 1) { if (str[i].equals("0")) { str[i] = "01"; } else { str[i] = "0" + str[i]; } } } if (LEN == 1) { result = argDate + "/01/01"; } if (LEN == 2) { result = str[0] + "/" + str[1] + "/01"; } if (LEN == 3) { result = str[0] + "/" + str[1] + "/" + str[2]; } return result; } /** * 将格式为yyyy或者yyyy.MM或者yyyy.MM.dd的日期转换为yyyy/MM/dd的格式。位数不足的,都补01。<br> * 例如.1999 = 1999/01/01 再如:1989.02=1989/02/01 * * @param argDate * 需要进行转换的日期。格式可能为yyyy或者yyyy.MM或者yyyy.MM.dd * @return 返回格式为yyyy/MM/dd的字符串 */ public static String changeDateWithSplit(String argDate, String split) { if (argDate == null || argDate.trim().equals("")) { return ""; } if (split == null || split.trim().equals("")) { split = "-"; } String result = ""; // 如果是格式为yyyy/MM/dd的就直接返回 if (argDate.length() == 10 && argDate.indexOf("/") > 0) { return argDate; } // 如果是格式为yyyy-MM-dd的就直接返回 if (argDate.length() == 10 && argDate.indexOf("-") > 0) { return argDate; } String[] str = argDate.split("[.]"); // .比较特殊 int LEN = str.length; for (int i = 0; i < LEN; i++) { if (str[i].length() == 1) { if (str[i].equals("0")) { str[i] = "01"; } else { str[i] = "0" + str[i]; } } } if (LEN == 1) { result = argDate + split + "01" + split + "01"; } if (LEN == 2) { result = str[0] + split + str[1] + split + "01"; } if (LEN == 3) { result = str[0] + split + str[1] + split + str[2]; } return result; } /** * 返回指定日期的的下一个月的天数。 * * @param argDate * 格式为yyyy-MM-dd或者yyyy/MM/dd * @return 下一个月的天数。 */ public static int getNextMonthDays(String argDate) { String[] temp = null; if (argDate.indexOf("/") > 0) { temp = argDate.split("/"); } if (argDate.indexOf("-") > 0) { temp = argDate.split("-"); } Calendar cal = new GregorianCalendar(new Integer(temp[0]).intValue(), new Integer(temp[1]).intValue() - 1, new Integer(temp[2]).intValue()); int curMonth = cal.get(Calendar.MONTH); cal.set(Calendar.MONTH, curMonth + 1); int curyear = cal.get(Calendar.YEAR);// 当前年份 curMonth = cal.get(Calendar.MONTH);// 当前月份,0-11 int mArray[] = new int[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // 判断闰年的情况 ,2月份有29天; if ((curyear % 400 == 0) || ((curyear % 100 != 0) && (curyear % 4 == 0))) { mArray[1] = 29; } return mArray[curMonth]; } public static void main(String[] args) { System.out.println(DateTools.getCurrentDateTime()); System.out.println("first=" + changeDateWithSplit("2000.1", "")); System.out.println("second=" + changeDateWithSplit("2000.1", "/")); String[] t = getArrayDiffDays("2008/02/15", "2008/02/19"); for (int i = 0; i < t.length; i++) { System.out.println(t[i]); } t = getArrayDiffDays("2008-02-15", "2008-02-19"); for (int i = 0; i < t.length; i++) { System.out.println(t[i]); } System.out.println(getNextMonthDays("2008/02/15") + "||" + getCurrentMonth() + "||" + DateTools.changeDate("1999")); System.out.println(DateTools.changeDate("1999.1")); System.out.println(DateTools.changeDate("1999.11")); System.out.println(DateTools.changeDate("1999.1.2")); System.out.println(DateTools.changeDate("1999.11.12")); } }
[ "807259238@qq.com" ]
807259238@qq.com
c713e65f857b8dc109f5a78d3c9869f22152cdbf
a1da428be70cf8d8d3e3519985eb0c37707a8243
/fastapi/src/main/java/org/pulp/fastapi/extension/SequenceObservable.java
48726bcf5f19ade1eb6251d261ca79062daefca8
[]
no_license
huxinjun/fastapi
088fef57760ec4088e006f7763455caa9fee7f08
6b6d395ce54ec3ef6b96ec794504724233669c44
refs/heads/master
2023-02-03T14:40:42.305750
2020-12-23T11:40:20
2020-12-23T11:40:20
273,634,312
1
0
null
null
null
null
UTF-8
Java
false
false
3,798
java
package org.pulp.fastapi.extension; import android.support.annotation.NonNull; import android.text.TextUtils; import org.pulp.fastapi.model.Error; import org.pulp.fastapi.model.IModel; import org.pulp.fastapi.util.Log; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import io.reactivex.Observable; import retrofit2.Retrofit; /** * 单接口多url顺序请求,直到成功为止 * Created by xinjun on 2019/12/12 21:47 */ public class SequenceObservable<T extends IModel> extends SimpleObservable<T> { /** * 配置的path无法访问回调 * Created by xinjun on 2019/12/13 10:35 */ public interface Unreachable { void onUnreachable(Error error, String path); } private String[] paths; private int currIndex = 0; private Unreachable unreachableCallback;//url无法访问回调 private Faild faild; SequenceObservable(Observable<T> upstream, Type observableType, Annotation[] annotations, Retrofit retrofit, Class<?> apiClass) { super(upstream, observableType, annotations, retrofit, apiClass); } @Override public SequenceObservable<T> refresh() { setExtraParam(null); setCurrData(null); super.success(new Success<T>() { @Override public void onSuccess(@NonNull T data) { dispose(); } }); super.faild(new Faild() { @Override public void onFaild(@NonNull Error error) { Log.out("success.faild hash=" + this.hashCode()); if (unreachableCallback != null) unreachableCallback.onUnreachable(error, getCurrPath()); nextUrl(); } }); return this; } @Override public SequenceObservable<T> success(final Success<T> success) { super.success(new Success<T>() { @Override public void onSuccess(@NonNull T data) { if (success != null) success.onSuccess(data); dispose(); } }); super.faild(new Faild() { @Override public void onFaild(@NonNull Error error) { Log.out("success.faild hash=" + this.hashCode()); if (unreachableCallback != null) unreachableCallback.onUnreachable(error, getCurrPath()); nextUrl(); } }); return this; } @Override public SequenceObservable<T> faild(Faild faild) { this.faild = faild; return this; } @Override public SequenceObservable<T> toastError() { return (SequenceObservable<T>) super.toastError(); } public SequenceObservable<T> unreachable(Unreachable unreachable) { this.unreachableCallback = unreachable; return this; } private void nextUrl() { if (currIndex >= paths.length - 1) { Error error = new Error(); error.setCode(Error.Code.ALL_URLS_INVALID.code); error.setMsg("all path is unreachable"); if (this.faild != null) this.faild.onFaild(error); toastErrorIfNeed(error); dispose(); return; } currIndex++; refresh(); } String getCurrPath() { if (paths == null || paths.length == 0) throw new RuntimeException("not found paths,please use @MultiPath annotation above api method"); String currPath = paths[currIndex]; if (TextUtils.isEmpty(currPath)) throw new RuntimeException("@MultiPath value item must not be null or emtpy"); return currPath; } void setPaths(String[] paths) { this.paths = paths; } }
[ "hu12315005@126.com" ]
hu12315005@126.com
8ba9145fe404252a9ef1e00234a44c1ba4dbc1b7
2d328561c7d4a96ee5c8612ccebdef7c978fae77
/RestfulClient/src/main/java/com/restfulclient/impl/RequestBody.java
db2be545e2aab125240581f9a8f4f4fc25e341da
[ "Apache-2.0" ]
permissive
osvaldogh85/rest_tinny
acb634c73cb2ac3481c548832d4b85c46e2a9580
6122e65b3550cbaddb0dfb1145b32daee9cd56d9
refs/heads/main
2023-07-28T05:30:04.301660
2021-09-14T20:58:05
2021-09-14T20:58:05
364,962,499
0
0
null
null
null
null
UTF-8
Java
false
false
1,621
java
package com.restfulclient.impl; import com.restfulclient.interfaces.IRequestBody; public class RequestBody implements IRequestBody { public static final int ZERO_LENGTH = 0; private byte[] body; private BodyType bodyType; private Object content=null; private RequestBody(final BodyType bodyType, Object content,final byte[] body) { this.body = body; this.bodyType = bodyType; this.content=content; } public static IRequestBody build(final BodyType bodyType,String body) { return new RequestBody(bodyType, body, body.getBytes()); } public static IRequestBody build(final BodyType bodyType) { return new RequestBody(bodyType, null, null); } public static IRequestBody buildDefault() { return new RequestBody(BodyType.NONE, null, null); } public static IRequestBody build(final BodyType bodyType,Object content,final byte[] body) { return new RequestBody(bodyType, content , body); } @Override public byte[] getBody() { return body; } @Override public void setBody(byte[] body) { this.body = body; } @Override public BodyType getBodyType() { return bodyType; } @Override public void clean() { body=null; bodyType=null; } @Override public long getBodyLength() { return this.body.length; } @Override public Object getBodyContent() { return content; } @Override public void setBodyContent(Object content) { this.content=content; } }
[ "odge@gft.com" ]
odge@gft.com
8479575b52bad789557b605639536752dfc7c597
8c3742a2ca655a649a31d6e60224bea5647495bf
/src/main/java/com/hdjd/grit/model/pojo/VO/TemplateData.java
2803af22c3bf99a55032f2bab8b7965f10fd6b2b
[]
no_license
unsnow/grit
fe2c60f1d3c78ed76a704e18b6fe7d94c2dffa9f
a26b9c03f052ad37c7c310b4f8215b776bb51e5a
refs/heads/master
2022-12-28T11:08:17.323258
2020-10-14T02:55:35
2020-10-14T02:55:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.hdjd.grit.model.pojo.VO; import lombok.Data; /** * @description 设置推送的文字和颜色 */ @Data public class TemplateData { //keyword1:订单类型,keyword2:下单金额,keyword3:配送地址,keyword4:取件地址,keyword5备注 private String value;//,,依次排下去 public TemplateData(String value){ this.value = value; } // private String time6; //订单预约时间 // private String thing4; //订单金额 // private String date5; //支付时间 // private String color;//字段颜色(微信官方已废弃,设置没有效果) }
[ "1634064086@qq.com" ]
1634064086@qq.com
a59fe8e47e73c4f5b0c25b4d30fad14bdd15be12
f91bcd71b19e9a7159816c16a889861b56330a20
/RemoteMonitor/src/Server/ServerProcess.java
5792852ddb8b412d6bed992031258b3d115f98bc
[]
no_license
luoxinglian/Lolita
8b2e9b219a8821ee89d6a814c068cc87934a2325
7c5afe3725765f9a71b9f2ec25208e86dd8c5111
refs/heads/master
2021-01-12T11:22:34.347625
2016-11-06T12:38:06
2016-11-06T12:38:06
72,906,904
0
0
null
2016-11-05T05:22:55
2016-11-05T05:22:54
null
UTF-8
Java
false
false
1,450
java
package Server; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; public class ServerProcess extends ArrayList { private SocketManager socketMan = new SocketManager(); public void getServer() { try { ServerSocket serverSocket = new ServerSocket(7788); System.out.println("�������׽����Ѿ�����"); while (true) { Socket socket = serverSocket.accept(); new write_Thread(socket).start(); socketMan.add(socket); // socketMan.sendClientCount(); } } catch (Exception e) { e.printStackTrace(); } } class write_Thread extends Thread { Socket socket = null; private BufferedReader reader; private PrintWriter writer; public write_Thread(Socket socket) { this.socket = socket; } public void run() { try { reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); writer = new PrintWriter(socket.getOutputStream(), true); String msgArea; while ((msgArea = reader.readLine()) != null) { System.out.println(msgArea); socketMan.sendToAll(msgArea); } } catch (Exception e) { e.printStackTrace(); } } } public static void main(String args[]) { ServerProcess server = new ServerProcess(); server.getServer(); } public void open() { // TODO Auto-generated method stub } }
[ "522268397@qq.com" ]
522268397@qq.com
cbf4592d37ac7b546eb545a6b4101a05fd9168ef
56c068ac8118fbc3e15e37e538935a283b9f908d
/src/com/WaveCreator/TarsosWrapper/TarsosRunner.java
fb45adf23298b6988e2fb6ce2bc40d9e1c254a72
[]
no_license
nietoperz809/wavecreator
8944cd630288b234388a0a9cf812ab425541178e
64f3456208fc891f9a2a5250a564c19bec471a1a
refs/heads/master
2021-01-17T09:11:52.268778
2018-08-26T23:52:21
2018-08-26T23:52:21
28,629,861
1
0
null
null
null
null
UTF-8
Java
false
false
2,605
java
package com.WaveCreator.TarsosWrapper; import be.tarsos.dsp.AudioDispatcher; import be.tarsos.dsp.AudioEvent; import be.tarsos.dsp.AudioProcessor; import be.tarsos.dsp.io.jvm.JVMAudioInputStream; import be.tarsos.dsp.io.jvm.WaveformWriter; import com.WaveCreator.Wave16; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import java.io.ByteArrayInputStream; import java.util.ArrayList; /** * Created by Administrator on 3/7/2017. */ public class TarsosRunner { static class Wave16Creator extends WaveformWriter { final ArrayList<Wave16> waves = new ArrayList<>(); Wave16 result; final float sampleRate; final AudioFormat format; public Wave16Creator (AudioFormat format) { super(format, "tarsosCreated"); sampleRate = format.getSampleRate(); this.format = format; } @Override public boolean process (AudioEvent audioEvent) { int byteOverlap = audioEvent.getOverlap() * format.getFrameSize(); int byteStepSize = audioEvent.getBufferSize() * format.getFrameSize() - byteOverlap; if(audioEvent.getTimeStamp() == 0) { byteOverlap = 0; byteStepSize = audioEvent.getBufferSize() * format.getFrameSize(); } byte[] fb = audioEvent.getByteBuffer(); Wave16 wv = new Wave16 (fb, (int) sampleRate, byteOverlap, byteStepSize); waves.add(wv); return true; } @Override public void processingFinished () { Wave16[] arr = new Wave16[waves.size()]; waves.toArray(arr); result = Wave16.combineAppend(arr); //System.out.println("finished"); } } public static Wave16 execute (Wave16 in, AudioProcessor proc, int buffsize) { byte[] arr = in.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(arr); AudioInputStream inputStream = new AudioInputStream(bais, in.getAudioFormat(), arr.length); int overlap = buffsize-128; AudioFormat format = inputStream.getFormat(); //new AudioFormat(44100,16,1,true,false); ; JVMAudioInputStream i2 = new JVMAudioInputStream(inputStream); AudioDispatcher dispatcher = new AudioDispatcher(i2, buffsize, overlap); dispatcher.addAudioProcessor(proc); Wave16Creator wc = new Wave16Creator(format); dispatcher.addAudioProcessor(wc); dispatcher.run(); return wc.result; } }
[ "pbull809@gmail.com" ]
pbull809@gmail.com
abef9fd16b4828299457a0bb91e7eaa383163a29
7887568d9fc991bd0c062398013cffc681127123
/src/com/web/daos/ScheduleDao.java
034658a0ce29453294d4b3e98b6738b9b4978ce2
[]
no_license
yoonsil/jee-soccer
fbb09c790032ab5f413b7a1514ece2310e0ebb27
08654b73e8073e97d2b147e255b7620cee8d9b31
refs/heads/master
2020-07-31T08:16:10.281990
2019-10-01T01:40:15
2019-10-01T01:40:15
210,541,908
0
0
null
null
null
null
UTF-8
Java
false
false
57
java
package com.web.daos; public interface ScheduleDao { }
[ "thisiserinchoi@gmail.com" ]
thisiserinchoi@gmail.com
1fb2956f88ed6da884b045a771fe6205195ec391
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Jsoup-84/org.jsoup.helper.W3CDom/default/11/org/jsoup/helper/W3CDom_ESTest.java
d3bc32c781fdc27a713fea868ecfb77e10827481
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
9,970
java
/* * This file was automatically generated by EvoSuite * Fri Jul 30 09:19:25 GMT 2021 */ package org.jsoup.helper; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.jsoup.helper.W3CDom; import org.jsoup.nodes.DataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.XmlDeclaration; import org.jsoup.parser.Parser; import org.junit.runner.RunWith; import org.w3c.dom.DOMException; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class W3CDom_ESTest extends W3CDom_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { Document document0 = new Document(":nh-last-of-typ("); Element element0 = document0.tagName(":nh-last-of-typ("); document0.prependChild(element0); W3CDom w3CDom0 = new W3CDom(); // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: DOMException"); // } catch(DOMException e) { // } } @Test(timeout = 4000) public void test01() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parse("xmlns", "j4"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); W3CDom.W3CBuilder w3CDom_W3CBuilder0 = new W3CDom.W3CBuilder(document1); // Undeclared exception! // try { w3CDom_W3CBuilder0.tail(document0, 749); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.helper.W3CDom$W3CBuilder", e); // } } @Test(timeout = 4000) public void test02() throws Throwable { Document document0 = Parser.parse("org.jsoup.helper.W3CDom", "org.jsoup.helper.W3CDom"); Element element0 = document0.tagName("org.jsoup.helper.W3CDom"); document0.prependChild(element0); W3CDom w3CDom0 = new W3CDom(); // Undeclared exception! w3CDom0.fromJsoup(document0); } @Test(timeout = 4000) public void test03() throws Throwable { Document document0 = new Document("smalO"); W3CDom w3CDom0 = new W3CDom(); w3CDom0.factory = null; // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.jsoup.helper.W3CDom", e); // } } @Test(timeout = 4000) public void test04() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = new Document("$6|_T~"); // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: IndexOutOfBoundsException"); // } catch(IndexOutOfBoundsException e) { // // // // Index: 0, Size: 0 // // // verifyException("java.util.ArrayList", e); // } } @Test(timeout = 4000) public void test05() throws Throwable { W3CDom w3CDom0 = new W3CDom(); // Undeclared exception! // try { w3CDom0.fromJsoup((Document) null); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // Object must not be null // // // verifyException("org.jsoup.helper.Validate", e); // } } @Test(timeout = 4000) public void test06() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parse("~&%fsQ71hr9", "~&%fsQ71hr9"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); // Undeclared exception! // try { w3CDom0.convert(document0, document1); // fail("Expecting exception: DOMException"); // } catch(DOMException e) { // } } @Test(timeout = 4000) public void test07() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Document.createShell(""); Element element0 = document0.attr("", "xmlns:|pb-^&"); document0.prependChild(element0); // Undeclared exception! // try { w3CDom0.convert(document0, (org.w3c.dom.Document) null); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // String must not be empty // // // verifyException("org.jsoup.helper.Validate", e); // } } @Test(timeout = 4000) public void test08() throws Throwable { Document document0 = new Document(".Kd$@N2q_lG93W"); W3CDom w3CDom0 = new W3CDom(); Document document1 = Parser.parseBodyFragment(".Kd$@N2q_lG93W", ".Kd$@N2q_lG93W"); org.w3c.dom.Document document2 = w3CDom0.fromJsoup(document1); // Undeclared exception! // try { w3CDom0.convert(document0, document2); // fail("Expecting exception: IndexOutOfBoundsException"); // } catch(IndexOutOfBoundsException e) { // // // // Index: 0, Size: 0 // // // verifyException("java.util.ArrayList", e); // } } @Test(timeout = 4000) public void test09() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parse("n&/<r:R9pLRe>$vv =", "n&/<r:R9pLRe>$vv ="); // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: DOMException"); // } catch(DOMException e) { // } } @Test(timeout = 4000) public void test10() throws Throwable { Document document0 = Parser.parseBodyFragment("xmlns:xjemlm:i|s\"", "xmlns:xjemlm:i|s\""); Element element0 = document0.attr("xmlns:xjemlm:i|s\"", "xmlns:xjemlm:i|s\""); document0.prependChild(element0); W3CDom w3CDom0 = new W3CDom(); // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: DOMException"); // } catch(DOMException e) { // } } @Test(timeout = 4000) public void test11() throws Throwable { Document document0 = Parser.parseBodyFragment("xmlns", "xmlns"); Element element0 = document0.attr("xmlns", "xmlns"); document0.prependChild(element0); W3CDom w3CDom0 = new W3CDom(); // Undeclared exception! // try { w3CDom0.fromJsoup(document0); // fail("Expecting exception: DOMException"); // } catch(DOMException e) { // } } @Test(timeout = 4000) public void test12() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parseBodyFragment("\";)d')7~", "\";)d')7~"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); W3CDom.W3CBuilder w3CDom_W3CBuilder0 = new W3CDom.W3CBuilder(document1); XmlDeclaration xmlDeclaration0 = new XmlDeclaration("\";)d')7~", "f-P;x74j-tO=", true); w3CDom_W3CBuilder0.head(xmlDeclaration0, (-1)); assertFalse(xmlDeclaration0.hasParent()); } @Test(timeout = 4000) public void test13() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Document.createShell("{\u0001d'S"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); W3CDom.W3CBuilder w3CDom_W3CBuilder0 = new W3CDom.W3CBuilder(document1); DataNode dataNode0 = new DataNode("{\u0001d'S"); // Undeclared exception! // try { w3CDom_W3CBuilder0.head(dataNode0, (-234)); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // } } @Test(timeout = 4000) public void test14() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parseBodyFragment("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>", "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); assertNotNull(document1); } @Test(timeout = 4000) public void test15() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Document.createShell(""); // Undeclared exception! // try { w3CDom0.convert(document0, (org.w3c.dom.Document) null); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // } } @Test(timeout = 4000) public void test16() throws Throwable { W3CDom w3CDom0 = new W3CDom(); Document document0 = Parser.parse("command", "command"); org.w3c.dom.Document document1 = w3CDom0.fromJsoup(document0); String string0 = w3CDom0.asString(document1); assertEquals("<html>\n<head>\n<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>command</body>\n</html>\n", string0); } @Test(timeout = 4000) public void test17() throws Throwable { Document document0 = Parser.parseBodyFragment("xmlns:xmlns:<html>\n<head>\n<met htt-equiv\"cwntent-type\" conten=\"text/html; charset=ut-8\"\n9/head\n<bod></body\n<yhtml>", "xmlns:xmlns:<html>\n<head>\n<met htt-equiv\"cwntent-type\" conten=\"text/html; charset=ut-8\"\n9/head\n<bod></body\n<yhtml>"); W3CDom w3CDom0 = new W3CDom(); w3CDom0.fromJsoup(document0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
cebb661be362dc1de29d0c6e170bb43250bf3e6e
7a3ad8a883d2a7cf1a46c9d713b0dafeb4126601
/src/main/java/com/tnsoft/web/service/impl/ExportServiceImpl.java
4484598f58a26fd87ad10d7bb407ae7a8b799aa3
[]
no_license
TheOneChina/znll
b45546b69a71aeef5b6257634fff6e45cd73d34a
2970d1e16beacd0cbaa44be21c1c27e36c55e94e
refs/heads/master
2020-04-27T20:19:30.049617
2019-03-18T12:25:19
2019-03-18T12:25:19
174,340,693
1
0
null
null
null
null
UTF-8
Java
false
false
29,793
java
package com.tnsoft.web.service.impl; import com.expertise.common.util.StringUtils; import com.itextpdf.io.image.ImageData; import com.itextpdf.io.image.ImageDataFactory; import com.itextpdf.kernel.font.PdfFont; import com.itextpdf.kernel.font.PdfFontFactory; import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.layout.Document; import com.itextpdf.layout.border.Border; import com.itextpdf.layout.element.Cell; import com.itextpdf.layout.element.Image; import com.itextpdf.layout.element.Paragraph; import com.itextpdf.layout.element.Table; import com.itextpdf.layout.property.TextAlignment; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; import com.tnsoft.hibernate.model.Express; import com.tnsoft.hibernate.model.Tag; import com.tnsoft.hibernate.model.TagExpress; import com.tnsoft.hibernate.model.TempExpress; import com.tnsoft.web.dao.ExpressDAO; import com.tnsoft.web.dao.TagDAO; import com.tnsoft.web.dao.TagExpressDAO; import com.tnsoft.web.dao.TempExpressDAO; import com.tnsoft.web.model.Constants; import com.tnsoft.web.service.ExportService; import com.tnsoft.web.util.ChartUtil; import com.tnsoft.web.util.Utils; import jxl.Workbook; import jxl.write.Label; import jxl.write.WritableSheet; import jxl.write.WritableWorkbook; import jxl.write.WriteException; import org.springframework.stereotype.Service; import javax.annotation.Resource; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URLEncoder; import java.text.DecimalFormat; import java.util.Date; import java.util.List; @Service("exportService") public class ExportServiceImpl implements ExportService { @Resource(name = "tempExpressDAO") private TempExpressDAO tempExpressDAO; @Resource(name = "expressDAO") private ExpressDAO expressDAO; @Resource(name = "tagExpressDAO") private TagExpressDAO tagExpressDAO; @Resource(name = "tagDAO") private TagDAO tagDAO; @Override public void exportToPDF(int expressId, Date start, Date end, int flag, HttpServletRequest request, HttpServletResponse response) { try { ServletOutputStream outputStream = response.getOutputStream(); response.reset(); response.setContentType("application/pdf"); List<TempExpress> tempExpressList = tempExpressDAO.getByExpressIdWithTimeLimit(expressId, start, end); Express express = expressDAO.getById(expressId); TagExpress tagExpress = tagExpressDAO.getLastTagExpressByEId(expressId); Tag tag = tagDAO.getById(tagExpress.getTagNo()); String fileName = express.getExpressNo(); if (StringUtils.isEmpty(fileName)) { fileName = expressId + ".pdf"; } else { fileName += ".pdf"; } response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); //Initialize PDF writer PdfWriter writer = new PdfWriter(outputStream); //Initialize PDF document PdfDocument pdf = new PdfDocument(writer); // Initialize document Document document = new Document(pdf); PdfFont helvetica = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false); //不同版本名称 String expressNo, statusActive, statusFinish; if (flag == Constants.Version.EXPRESS) { //物流版 expressNo = "订单号"; statusActive = "配送中"; statusFinish = "已签收"; } else { //医药/标准版 expressNo = "监测点名称"; statusActive = "监测中"; statusFinish = "已结束"; } Float maxAlertTemperature, minAlertTemperature; if (express.getTemperatureMax() != null) { maxAlertTemperature = express.getTemperatureMax(); } else { if (tag.getTemperatureMax() != null) { maxAlertTemperature = tag.getTemperatureMax(); } else { maxAlertTemperature = null; } } if (express.getTemperatureMin() != null) { minAlertTemperature = express.getTemperatureMin(); } else { if (tag.getTemperatureMin() != null) { minAlertTemperature = tag.getTemperatureMin(); } else { minAlertTemperature = null; } } String maxAlertTemperatureStr, minAlertTemperatureStr; if (null != maxAlertTemperature) { maxAlertTemperatureStr = maxAlertTemperature + ""; } else { maxAlertTemperatureStr = "无"; } if (null != minAlertTemperature) { minAlertTemperatureStr = minAlertTemperature + ""; } else { minAlertTemperatureStr = "无"; } float[] briefTableWidths = {90, 90, 90, 90, 90, 90}; Table briefTable = new Table(briefTableWidths); briefTable.addCell(new Paragraph(expressNo).setFont(helvetica)).addCell(new Cell(1, 3).add(new Paragraph(express.getExpressNo()).setFont(helvetica))); if (express.getStatus() == Constants.ExpressState.STATE_FINISHED) { briefTable.addCell(new Paragraph("状态").setFont(helvetica)).addCell(new Paragraph(statusFinish) .setFont(helvetica)); } else { briefTable.addCell(new Paragraph("状态").setFont(helvetica)).addCell(new Paragraph(statusActive) .setFont(helvetica)); } String creationTimeStr = ""; String finishedTimeStr = ""; if (null != express.getCreationTime()) { creationTimeStr = Utils.SF.format(express.getCreationTime()); } if (null != express.getCheckOutTime()) { finishedTimeStr = Utils.SF.format(express.getCheckOutTime()); } briefTable.addCell(new Paragraph("开始时间").setFont(helvetica)).addCell(new Cell(1, 2).add(new Paragraph (creationTimeStr).setFont(helvetica))); briefTable.addCell(new Paragraph("结束时间").setFont(helvetica)).addCell(new Cell(1, 2).add(new Paragraph (finishedTimeStr).setFont(helvetica))); briefTable.addCell(new Paragraph("低温阈值").setFont(helvetica)).addCell(new Paragraph (minAlertTemperatureStr).setFont(helvetica)); briefTable.addCell(new Paragraph("高温阈值").setFont(helvetica)).addCell(new Paragraph (maxAlertTemperatureStr).setFont(helvetica)); //温湿度曲线获得 BufferedImage bufferedImage = ChartUtil.getChart(tempExpressList, maxAlertTemperature, minAlertTemperature, flag); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(byteArrayOutputStream); encoder.encode(bufferedImage); ImageData imageData = ImageDataFactory.create(byteArrayOutputStream.toByteArray()); Image image = new Image(imageData); float[] widths = {200, 150, 150}; Table originalDataTable = new Table(widths); originalDataTable.addCell(new Paragraph("时间").setFont(helvetica)).addCell(new Paragraph("温度(℃)") .setFont(helvetica)).addCell(new Paragraph("湿度(%)").setFont(helvetica)); int alertCount = 0; Float averageTemp = null, minTemp = null, maxTemp = null, averageHumidity = null, minHumidity = null, maxHumidity = null; if (tempExpressList.size() > 0) { minTemp = tempExpressList.get(0).getTemperature(); maxTemp = tempExpressList.get(0).getTemperature(); averageTemp = 0F; minHumidity = tempExpressList.get(0).getHumidity(); maxHumidity = tempExpressList.get(0).getHumidity(); averageHumidity = 0F; int size = tempExpressList.size(); for (TempExpress tempExpress : tempExpressList) { if (tempExpress.getHumidity() == 0) { originalDataTable.addCell(Utils.SF.format(tempExpress.getCreationTime())).addCell(tempExpress .getTemperature() + "").addCell("-"); } else { originalDataTable.addCell(Utils.SF.format(tempExpress.getCreationTime())).addCell(tempExpress .getTemperature() + "").addCell(tempExpress.getHumidity() + ""); } if (null != maxAlertTemperature && tempExpress.getTemperature() >= maxAlertTemperature) { alertCount++; } if (null != minAlertTemperature && tempExpress.getTemperature() <= minAlertTemperature) { alertCount++; } if (minTemp > tempExpress.getTemperature()) { minTemp = tempExpress.getTemperature(); } if (maxTemp < tempExpress.getTemperature()) { maxTemp = tempExpress.getTemperature(); } if (minHumidity > tempExpress.getHumidity()) { minHumidity = tempExpress.getHumidity(); } if (maxHumidity < tempExpress.getHumidity()) { maxHumidity = tempExpress.getHumidity(); } averageTemp += tempExpress.getTemperature() / size; averageHumidity += tempExpress.getHumidity() / size; } } //将统计数据添加到报表 briefTable.addCell(new Paragraph("报警次数").setFont(helvetica)).addCell(new Paragraph (alertCount + "").setFont(helvetica)); if (null != averageTemp) { briefTable.addCell(new Paragraph("平均温度").setFont(helvetica)).addCell(new Paragraph (averageTemp + "").setFont(helvetica)); } else { briefTable.addCell(new Paragraph("平均温度").setFont(helvetica)).addCell(new Paragraph ("无").setFont(helvetica)); } if (null != maxTemp) { briefTable.addCell(new Paragraph("最高温度").setFont(helvetica)).addCell(new Paragraph (maxTemp + "").setFont(helvetica)); } else { briefTable.addCell(new Paragraph("最高温度").setFont(helvetica)).addCell(new Paragraph ("无").setFont(helvetica)); } if (null != minTemp) { briefTable.addCell(new Paragraph("最低温度").setFont(helvetica)).addCell(new Paragraph (minTemp + "").setFont(helvetica)); } else { briefTable.addCell(new Paragraph("最低温度").setFont(helvetica)).addCell(new Paragraph ("无").setFont(helvetica)); } if (null != averageHumidity && averageHumidity > 0) { briefTable.addCell(new Paragraph("平均湿度").setFont(helvetica)).addCell(new Paragraph (averageHumidity + "").setFont(helvetica)); } else { // briefTable.addCell(new Paragraph("平均湿度").setFont(helvetica)).addCell(new Paragraph // ("无").setFont(helvetica)); } if (null != maxHumidity && maxHumidity > 0) { briefTable.addCell(new Paragraph("最高湿度").setFont(helvetica)).addCell(new Paragraph (maxHumidity + "").setFont(helvetica)); } else { // briefTable.addCell(new Paragraph("最高湿度").setFont(helvetica)).addCell(new Paragraph // ("无").setFont(helvetica)); } if (null != minHumidity && minHumidity > 0) { briefTable.addCell(new Paragraph("最低湿度").setFont(helvetica)).addCell(new Paragraph (minHumidity + "").setFont(helvetica)); } else { // briefTable.addCell(new Paragraph("最低湿度").setFont(helvetica)).addCell(new Paragraph // ("无").setFont(helvetica)); } briefTable.addCell(new Paragraph("设备识别号").setFont(helvetica)).addCell(new Cell(1, 5).add(new Paragraph (tag.getTagNo()).setFont(helvetica))); //添加到pdf document.add(new Paragraph("数据曲线").setFont(helvetica).setFontSize(24)); document.add(image); document.add(new Paragraph("数据报表").setFont(helvetica).setFontSize(24)); document.add(briefTable); document.add(new Paragraph("原始数据").setFont(helvetica).setFontSize(24)); document.add(originalDataTable); //Close document document.close(); pdf.close(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } @Override public void exportToXLS(int expressId, Date start, Date end, int flag, HttpServletRequest request, HttpServletResponse response) { try { ServletOutputStream outputStream = response.getOutputStream(); response.reset();//清空输出流 response.setContentType("application/msexcel"); List<TempExpress> tempExpressList = tempExpressDAO.getByExpressIdWithTimeLimit(expressId, start, end); Express express = expressDAO.getById(expressId); // TagExpress tagExpress = tagExpressDAO.getLastTagExpressByEId(expressId); // Tag tag = tagDAO.getById(tagExpress.getTagNo()); String fileName = express.getExpressNo(); if (StringUtils.isEmpty(fileName)) { fileName = expressId + ".xls"; } else { fileName += ".xls"; } //不同版本名称 String expressNo; if (flag == Constants.Version.EXPRESS) { //物流版 expressNo = "订单号"; } else { //医药/标准版 expressNo = "监测点名称"; } response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); WritableWorkbook wwb = Workbook.createWorkbook(outputStream); WritableSheet ws = wwb.createSheet("sheet1", 0); ws.addCell(new Label(0, 0, expressNo)); //将生成的单元格添加到工作表中 ws.addCell(new Label(1, 0, express.getExpressNo())); ws.addCell(new Label(0, 1, "时间")); ws.addCell(new Label(1, 1, "温度(℃)")); int row = 2; if (tempExpressList.size() > 0 && tempExpressList.get(0).getHumidity() > 0) { for (TempExpress tempExpress : tempExpressList) { ws.addCell(new Label(2, 1, "湿度(%)")); ws.addCell(new Label(0, row, Utils.SF.format(tempExpress.getCreationTime()))); ws.addCell(new Label(1, row, tempExpress.getTemperature() + "")); ws.addCell(new Label(2, row, tempExpress.getHumidity() + "")); row++; } } else { for (TempExpress tempExpress : tempExpressList) { ws.addCell(new Label(0, row, Utils.SF.format(tempExpress.getCreationTime()))); ws.addCell(new Label(1, row, tempExpress.getTemperature() + "")); row++; } } wwb.write(); wwb.close(); } catch (IOException | WriteException e) { e.printStackTrace(); } } @Override public void exportCalibrationToPDF(String tagNo, HttpServletRequest request, HttpServletResponse response) { try { ServletOutputStream outputStream = response.getOutputStream(); response.reset(); response.setContentType("application/pdf"); Tag tag = tagDAO.getById(tagNo); if (null == tag) { return; } String fileName = tag.getTagNo() + ".pdf"; response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); //Initialize PDF writer PdfWriter writer = new PdfWriter(outputStream); //Initialize PDF document PdfDocument pdf = new PdfDocument(writer); // Initialize document Document document = new Document(pdf); PdfFont helvetica = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false); String rangeCN, rangeEN, rangeHCN, rangHEN, model; if (tag.getCalibrationType() == Constants.Calibrate.TM20) { rangeCN = "测温范围:-20 ~ 50℃"; rangeEN = "Temp Range:-20 ~ 50℃"; rangeHCN = ""; rangHEN = ""; model = "TM20"; } else if (tag.getCalibrationType() == Constants.Calibrate.TM20E) { rangeCN = "测温范围:-100 ~ 50℃"; rangeEN = "Temp Range:-100 ~ 50℃"; rangeHCN = ""; rangHEN = ""; model = "TM20E"; } else if (tag.getCalibrationType() == Constants.Calibrate.THM20) { rangeCN = "测温范围:-20 ~ 60℃"; rangeEN = "Temp Range:-20 ~ 60℃"; rangeHCN = "测湿范围:0-100%RH"; rangHEN = "Humidity Range:0-100%RH"; model = "THM20"; } else if (tag.getCalibrationType() == Constants.Calibrate.THM20E) { rangeCN = "测温范围:-40 ~ 85℃"; rangeEN = "Temp Range:-40 ~ 85℃"; rangeHCN = "测湿范围:0-100%RH"; rangHEN = "Humidity Range:0-100%RH"; model = "THM20E"; } else { rangeCN = ""; rangeEN = ""; rangeHCN = ""; rangHEN = ""; model = ""; } //设置默认字体 document.setFont(helvetica); document.setFontSize(10.5f); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); float[] widths = {170, 180, 180}; Table infoTable = new Table(widths); infoTable.addCell(new Paragraph("设备名称:智能温湿度监测仪")).addCell(new Paragraph(rangeCN)).addCell(new Paragraph (rangeHCN)); infoTable.addCell(new Paragraph("Name:Intelligent temperature and humidity monitor")).addCell(new Paragraph(rangeEN)).addCell(new Paragraph(rangHEN)); infoTable.addCell(new Cell(1, 3).add(new Paragraph(""))); infoTable.addCell(new Paragraph("型号规格:" + model)).addCell(new Cell(1, 2).add(new Paragraph("设备识别码:" + tag .getTagNo()))); infoTable.addCell(new Paragraph("Model:" + model)).addCell(new Cell(1, 2).add(new Paragraph("Instrument " + "ID:" + tag.getTagNo()))); infoTable.addCell(new Cell(1, 3).add(new Paragraph(""))); infoTable.addCell(new Cell(1, 3).add(new Paragraph("校准日期:" + Utils.SF.format(tag.getCalibrationTime())))); infoTable.addCell(new Cell(1, 3).add(new Paragraph("Calibration Date:" + Utils.SF.format(tag .getCalibrationTime())))); infoTable.getCell(0, 0).setBorder(Border.NO_BORDER); infoTable.getCell(0, 1).setBorder(Border.NO_BORDER); infoTable.getCell(0, 2).setBorder(Border.NO_BORDER); infoTable.getCell(1, 0).setBorder(Border.NO_BORDER); infoTable.getCell(1, 1).setBorder(Border.NO_BORDER); infoTable.getCell(1, 2).setBorder(Border.NO_BORDER); infoTable.getCell(2, 0).setBorder(Border.NO_BORDER); infoTable.getCell(3, 0).setBorder(Border.NO_BORDER); infoTable.getCell(3, 1).setBorder(Border.NO_BORDER); infoTable.getCell(4, 0).setBorder(Border.NO_BORDER); infoTable.getCell(4, 1).setBorder(Border.NO_BORDER); infoTable.getCell(5, 0).setBorder(Border.NO_BORDER); infoTable.getCell(6, 0).setBorder(Border.NO_BORDER); infoTable.getCell(7, 0).setBorder(Border.NO_BORDER); document.add(infoTable); DecimalFormat decimalFormat = new DecimalFormat("##0.00"); float[] widths1 = {145, 145, 145, 145}; document.add(new Paragraph("")); document.add(new Paragraph("一、温度示值校准 Temperature:(℃)")); Table tempTable = new Table(widths1); tempTable.addCell(new Paragraph("标准温度值(℃)\n Reference Value")) .addCell(new Paragraph("被校仪器示值(℃)\n Measured Value")) .addCell(new Paragraph("示值误差(℃)\n Indication Error")) .addCell(new Paragraph("允许误差(℃)\n Permissible Error")); if (tag.getCalibrationType() == Constants.Calibrate.TM20 || tag.getCalibrationType() == Constants .Calibrate.TM20E) { tempTable.addCell(new Paragraph(tag.getStandardLowTemp() + "")) .addCell(new Paragraph(tag.getCalibrationLowTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationLowTemp() - tag .getStandardLowTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); tempTable.addCell(new Paragraph(tag.getStandardMediumTemp() + "")) .addCell(new Paragraph(tag.getCalibrationMediumTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationMediumTemp() - tag .getStandardMediumTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); tempTable.addCell(new Paragraph(tag.getStandardHighTemp() + "")) .addCell(new Paragraph(tag.getCalibrationHighTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationHighTemp() - tag .getStandardHighTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); document.add(tempTable); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("")); } else { if (tag.getStandardLowTemp() > 0) { tempTable.addCell(new Paragraph(tag.getStandardLowTemp() + "")) .addCell(new Paragraph(tag.getCalibrationLowTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationLowTemp() - tag .getStandardLowTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); } else { tempTable.addCell(new Paragraph(tag.getStandardLowTemp() + "")) .addCell(new Paragraph(tag.getCalibrationLowTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationLowTemp() - tag .getStandardLowTemp()))) .addCell(new Paragraph("1")); } if (tag.getStandardMediumTemp() > 0) { tempTable.addCell(new Paragraph(tag.getStandardMediumTemp() + "")) .addCell(new Paragraph(tag.getCalibrationMediumTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationMediumTemp() - tag .getStandardMediumTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); } else { tempTable.addCell(new Paragraph(tag.getStandardMediumTemp() + "")) .addCell(new Paragraph(tag.getCalibrationMediumTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationMediumTemp() - tag .getStandardMediumTemp()))) .addCell(new Paragraph("1")); } if (tag.getStandardHighTemp() > 0) { tempTable.addCell(new Paragraph(tag.getStandardHighTemp() + "")) .addCell(new Paragraph(tag.getCalibrationHighTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationHighTemp() - tag .getStandardHighTemp()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_TEMP + "")); document.add(tempTable); } else { tempTable.addCell(new Paragraph(tag.getStandardHighTemp() + "")) .addCell(new Paragraph(tag.getCalibrationHighTemp() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationHighTemp() - tag .getStandardHighTemp()))) .addCell(new Paragraph("1")); document.add(tempTable); } document.add(new Paragraph("")); document.add(new Paragraph("二、相对湿度示值校准 Relative Humidity:(%RH)")); Table humidityTable = new Table(widths1); humidityTable.addCell(new Paragraph("标准湿度值(%RH)\n Reference Value")) .addCell(new Paragraph("被校仪器示值(%RH)\n Measured Value")) .addCell(new Paragraph("示值误差(%RH)\n Indication Error")) .addCell(new Paragraph("允许误差(%RH)\n Permissible Error")); humidityTable.addCell(new Paragraph(tag.getStandardHumidity() + "")) .addCell(new Paragraph(tag.getCalibrationHumidity() + "")) .addCell(new Paragraph(decimalFormat.format(tag.getCalibrationHumidity() - tag .getStandardHumidity()))) .addCell(new Paragraph(Constants.Calibrate.PERMISSIBLE_ERROR_HUMIDITY + "")); document.add(humidityTable); } document.add(new Paragraph("")); document.add(new Paragraph("Note:")); document.add(new Paragraph("1.本次校准依据的技术规范:JJG205-2005 机械式温湿度计检定规程\nReference documents for the " + "calibration: JJG205-2005 Mechanical " + "Thermo-hygrometers\n2.本次校准地点及其环境:物华通信及环境试验实验室,25℃,75%RH\nEnvironment Used in Calibration : WUVA " + "Communications and Environmental test laboratory,25℃," + "75%RH\n3.本证书仅对所检的器具有效,该证书未经本公司许可不得翻录,本设备校准周期为12 个月\nThis certificate only for the inspection " + "instruments effectively, the certificate shall not be copied without permission of the company, " + "the equipment calibration cycle is 12 months\n")); document.add(new Paragraph("")); document.add(new Paragraph("")); document.add(new Paragraph("校 准 员 核 验 员 " + " 批 准 人\nOperator Inspector " + " Approver").setTextAlignment(TextAlignment.CENTER)); //Close document document.close(); pdf.close(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } }
[ "18576702314@163.com" ]
18576702314@163.com
82349d8cb884df78c599ba8fc78b577fc2df6fb8
49778f2f41b83ab783c04cec96b6b386c33bdf88
/Remove_Nth_Node_From_End_of_List.java
7c7290645e7c65f6df98b90c4443dc668bdad816
[]
no_license
cqx83/Leetcode
b8521154bc8cf1e5ee10e94ea3a6707a0d272b15
850562066937be04f881131f22c76677446f2f3f
refs/heads/master
2016-09-03T06:38:28.582489
2014-08-22T06:09:57
2014-08-22T06:09:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
public class Solution { public ListNode removeNthFromEnd(ListNode head, int n) { ListNode d = new ListNode(0); d.next = head; ListNode s = d, f = d; while(n-- > 0) { f = f.next; } while(f.next != null) { s = s.next; f = f.next; } s.next = s.next.next; return d.next; } }
[ "t-macwin@hotmail.com" ]
t-macwin@hotmail.com
b198e20f55f7c9b0641c7d97c9d68c356471f9ab
e7e497b20442a4220296dea1550091a457df5a38
/main_project/search/ExternalSearcher/src/externalsearch/ExternalSearcherI.java
680c9fb58c89f358776e449d1d45069eb8e4c83a
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,410
java
// ********************************************************************** // // Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.3.1 package externalsearch; import java.io.File; import java.io.IOException; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Vector; import java.util.concurrent.atomic.AtomicInteger; import com.xiaonei.search2.Config; import com.xiaonei.search2.model.IndexResult; import com.xiaonei.search2.model.IndexResultItem; import com.xiaonei.search2.model.IndexType; import engine.search.BooleanQuery; import engine.search.ConditionToQuery; import engine.search.IndexReader; import engine.search.IndexSearcher; import engine.search.TermQuery; import engine.search.TransformCondition; public final class ExternalSearcherI extends _ExternalSearcherDisp { private static Map<String, String> keymap = new HashMap<String, String>(); private IndexSearcher[] searchers = new IndexSearcher[2]; private AtomicInteger cur = new AtomicInteger(-1); private String curIndex = ""; private static String dir = "/data/xce/XiaoNeiSearch/index3"; private CheckThread thread = new CheckThread(dir, this); public void reloadIndex(String path) throws IOException, InterruptedException { if (path.equals(curIndex)) { return; } long start = System.currentTimeMillis(); System.out.println("加载索引 " + dir); File file = new File(dir + "/" + path); String[] indexs = file.list(); System.out.println(indexs[0]); List<IndexReader> readers = new ArrayList<IndexReader>(); for (int i = 0; i < indexs.length; i++) { readers.add(i, new IndexReader(dir + "/" + path + "/" + indexs[i])); } int pos = (cur.get() + 1) % 2; if (readers.size() == 0) { searchers[pos] = null; } else { searchers[pos] = new IndexSearcher( readers.toArray(new IndexReader[readers.size()])); } cur.incrementAndGet(); curIndex = path; long end = System.currentTimeMillis(); long cost = end - start; System.out.println("加载结束:cost:" + cost); System.out.println("keymap size:" + keymap.size()); for (Map.Entry<String, String> entry : keymap.entrySet()) { System.out.println("keymap key:" + entry.getKey() + " value:" + entry.getValue()); } Thread.sleep(10000); searchers[1 - pos] = null; System.gc(); } public ExternalSearcherI() { thread.start(); } static { keymap.put("GENERAL.gender", "gender"); keymap.put("GENERAL.range.age", "age"); keymap.put("WORKPLACE_INFO.workplace_name", "workplace"); keymap.put("JS_INFO.junior_high_school_info.junior_high_school_year", "junior.year"); keymap.put("JS_INFO.junior_high_school_info.junior_high_school_name", "junior.name"); keymap.put("UNIVERSITY_INFO.enroll_year", "univ.year"); keymap.put("UNIVERSITY_INFO.university_id", "univ.name"); keymap.put("GENERAL.home_province", "homeprovince"); keymap.put("GENERAL.home_city", "homecity"); keymap.put("HIGH_SCHOOL_INFO.high_school_name", "high.name"); keymap.put("HIGH_SCHOOL_INFO.enroll_year", "high.year"); } public static class Result implements Serializable { public int resultHits = 0; public int totalHits = 0; public Vector<IndexResultItem> hitsResult = new Vector<IndexResultItem>(); } @SuppressWarnings("unused") public IndexResult search( java.util.Map<java.lang.String, java.lang.String> condition, int begin, int limit, Ice.Current __current) { if (cur.get() < 0) { System.out.println("Index is Not ready"); return null; } IndexSearcher searcher = searchers[cur.get() % 2]; if (searcher == null) { System.out.println("Index is Not ready"); return null; } SimpleDateFormat dateFm = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); String dateTime = dateFm.format(new java.util.Date()); System.out.println(dateTime); long start = System.currentTimeMillis(); int realBegin = Math.min(Config.HARD_LIMIT, begin); if (realBegin + limit > Config.HARD_LIMIT) { realBegin = Config.HARD_LIMIT - limit; } System.out.println("begin:" + begin + " limit:" + limit + " realBegin:" + realBegin); int needsTotal = realBegin + limit; TransformCondition transformer = new TransformCondition(condition, keymap); Map<String, String> query = transformer.transform(); for (Map.Entry<String, String> entry : query.entrySet()) { System.out.println("AFTER TRANSFORM key:" + entry.getKey() + " value:" + entry.getValue()); } Result result_user = new Result(); IndexResult indexResult = new IndexResult(); indexResult.typedCount = new HashMap<IndexType, Integer>(); long getQueryStart = System.currentTimeMillis(); ConditionToQuery termQuery = new ConditionToQuery( searcher.getReaders()[0]); BooleanQuery booleanQuery = new BooleanQuery(); try { booleanQuery = termQuery.getQuery(query); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } long getQueryEnd = System.currentTimeMillis(); long searchStart = System.currentTimeMillis(); ArrayList<Integer> ids = null; try { ids = searcher.search(booleanQuery, needsTotal); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } long searchEnd = System.currentTimeMillis(); long getUserIdStart = System.currentTimeMillis(); if (ids == null || realBegin >= ids.size() || realBegin < 0) { System.out.println("result is null, return"); return indexResult; } for (int id : ids) { System.out.println("id:" + id); } long getUserIdEnd = System.currentTimeMillis(); long getIndexResultStart = System.currentTimeMillis(); for (int id : ids) { HashMap<String, String> content = new HashMap<String, String>(); // content.put("is_friend", "0"); result_user.hitsResult.add(new IndexResultItem(IndexType.User, id, content)); } System.out.println("Searcher: " + cur.get() + " begin:" + realBegin + " limit:" + limit + " result_user.size:" + result_user.hitsResult.size()); result_user.resultHits = result_user.hitsResult.size(); result_user.totalHits = ids.size(); List<IndexResultItem> result_app = null; List<IndexResultItem> result_page = null; int result_app_size = 0; int result_page_size = 0; int result_app_totalsize = 0; int result_page_totalsize = 0; List<IndexResultItem> hitsResult = new Vector<IndexResultItem>( needsTotal); hitsResult.addAll(result_user.hitsResult); long getIndexResultEnd = System.currentTimeMillis(); long end = System.currentTimeMillis(); indexResult.currentPos = realBegin; indexResult.timeCost = end - start; indexResult.totalCount = result_user.totalHits; indexResult.typedCount.put(IndexType.User, result_user.totalHits); indexResult.contents = hitsResult .toArray(new IndexResultItem[hitsResult.size()]); StringBuilder builder = new StringBuilder(); builder.append("KEY:"); for (Map.Entry<String, String> entry : condition.entrySet()) { // System.out.println("AFTER TRANSFORM key:" + entry.getKey() // + " value:" + entry.getValue()); builder.append(entry.getKey() + ":" + entry.getValue() + ","); } // System.out.println("hitsResult.size:" + hitsResult.size() // + " contents.size:" + indexResult.contents.length); builder.append("; hitsResult.size:" + hitsResult.size() + "; contents.size:" + indexResult.contents.length); // System.out.println("totalCount:" + indexResult.totalCount); // System.out.println("totalCost:" + (end - start) + "ms; getQueryCost:" // + (getQueryEnd - getQueryStart) + "ms; searchCost:" // + (searchEnd - searchStart) + "ms; getUserIdCost:" // + (getUserIdEnd - getUserIdStart) + "ms; getIndexResultCost:" // + (getIndexResultEnd - getIndexResultStart)); builder.append("; totalCost:" + (end - start) + "; getQueryCost:" + (getQueryEnd - getQueryStart) + "; searchCost:" + (searchEnd - searchStart) + "; getUserIdCost:" + (getUserIdEnd - getUserIdStart) + "; getIndexResultCost:" + (getIndexResultEnd - getIndexResultStart)); System.out.println(builder.toString()); return indexResult; } }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
d487451296254e9c3ccf561b4ef83aea80c12372
7b7c0f0b98a2993f0107e6f8fa7036e6e90db2c9
/app/src/main/java/com/example/jsonparsingwithglideandvolley/Class/AboutMovies.java
14d6523759b70345c2ecb2762885dab99a6f72a8
[]
no_license
humayu96/JsonParsingWithGlideAndVolley
4ef394676ddd03abd973ed9f5306d750653086fb
9a2dd2e22d7bdb6b8cdabbc21898f2966177a1e0
refs/heads/master
2020-04-28T22:05:46.958569
2019-03-14T11:09:03
2019-03-14T11:09:03
175,605,732
0
0
null
null
null
null
UTF-8
Java
false
false
1,706
java
package com.example.jsonparsingwithglideandvolley.Class; // Anime public class AboutMovies { public String name; public String description; public String rating; public String img; public String categories; public String studio; public int episode; public AboutMovies() { } public AboutMovies(String name, String description, String rating, String img, String categories, String studio, int episode) { this.name = name; this.description = description; this.rating = rating; this.img = img; this.categories = categories; this.studio = studio; this.episode = episode; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getRating() { return rating; } public void setRating(String rating) { this.rating = rating; } public String getImg() { return img; } public void setImg(String img) { this.img = img; } public String getCategories() { return categories; } public void setCategories(String categories) { this.categories = categories; } public String getStudio() { return studio; } public void setStudio(String studio) { this.studio = studio; } public int getEpisode() { return episode; } public void setEpisode(int episode) { this.episode = episode; } }
[ "39210393+HumayunSheikh@users.noreply.github.com" ]
39210393+HumayunSheikh@users.noreply.github.com
f55844b95dfc18d258d2e25557b246c32e4cd8e5
b52cf581d7637563d148bddc9d226bbf654a474e
/src/main/java/com/rainple/weChatRobot/pojo/BaseMessage.java
bfa3f3a894f21c5467569a1514e6d6496a0a493c
[]
no_license
rainple1860/robot
453675dad590dac3456ea94099ac4b7fb5e2e0e3
e31d8f692226db8c1d2127034316567279f0f4a4
refs/heads/master
2023-08-23T00:27:44.477293
2021-10-20T15:12:30
2021-10-20T15:12:30
191,574,506
1
0
null
null
null
null
UTF-8
Java
false
false
949
java
package com.rainple.weChatRobot.pojo; /** * 消息父类 * @author Stephen * */ public class BaseMessage { //接收方微信号 private String ToUserName; //发送方微信号 private String FromUserName; //创建时间 private long CreateTime; //消息类型 private String MsgType; public String getToUserName() { return ToUserName; } public void setToUserName(String toUserName) { ToUserName = toUserName; } public String getFromUserName() { return FromUserName; } public void setFromUserName(String fromUserName) { FromUserName = fromUserName; } public long getCreateTime() { return CreateTime; } public void setCreateTime(long createTime) { CreateTime = createTime; } public String getMsgType() { return MsgType; } public void setMsgType(String msgType) { MsgType = msgType; } }
[ "rainple@foxmail.com" ]
rainple@foxmail.com
cd8ea3318bceab1785267d20b7e730d02916af13
0d163e2b966ee5959554610951ecf3c85bc77a13
/src/main/java/com/jctp/md/JCTPMdSpiAdapter.java
5dcb602bc492bcafb4b4be6e6c386fa1f48a0d3e
[]
no_license
jiangcuilan/JCTP
46dda8f84c44ad5765f9a7a5073515677615c991
62863c1f157047b9a87eaaf3c7fa16f36eb1c2ee
refs/heads/master
2021-01-20T20:36:21.325448
2016-08-07T04:01:33
2016-08-07T04:01:33
64,987,317
5
5
null
null
null
null
UTF-8
Java
false
false
3,082
java
package com.jctp.md; import static com.jctp.util.JCTPStructUtil.getStructObject; import org.bridj.BridJ; import org.bridj.Pointer; import org.bridj.StructObject; import org.bridj.ann.Virtual; import com.ctp.thostftdcmdapi.CThostFtdcMdSpi; import com.ctp.thostftdcuserapistruct.CThostFtdcDepthMarketDataField; import com.ctp.thostftdcuserapistruct.CThostFtdcRspInfoField; import com.ctp.thostftdcuserapistruct.CThostFtdcRspUserLoginField; import com.ctp.thostftdcuserapistruct.CThostFtdcSpecificInstrumentField; import com.ctp.thostftdcuserapistruct.CThostFtdcUserLogoutField; /** * MdSpi适配器类 * * @author Hraink E-mail:Hraink@Gmail.com * @version 2013-1-27 上午11:31:12 */ public final class JCTPMdSpiAdapter extends CThostFtdcMdSpi{ JCTPMdSpi mdSpi; public JCTPMdSpiAdapter(JCTPMdSpi mdSpi) { BridJ.protectFromGC(this); this.mdSpi = mdSpi; } @Override @Virtual(0) public void OnFrontConnected() { mdSpi.onFrontConnected(); } @Override @Virtual(1) public void OnFrontDisconnected(int nReason) { mdSpi.onFrontDisconnected(nReason); } @Override @Virtual(2) public void OnHeartBeatWarning(int nTimeLapse) { mdSpi.onHeartBeatWarning(nTimeLapse); } @Override @Virtual(3) public void OnRspUserLogin( Pointer<CThostFtdcRspUserLoginField> pRspUserLogin, Pointer<CThostFtdcRspInfoField> pRspInfo, int nRequestID, boolean bIsLast) { mdSpi.onRspUserLogin(getStructObject(pRspUserLogin), getStructObject(pRspInfo), nRequestID, bIsLast); } @Override @Virtual(4) public void OnRspUserLogout(Pointer<CThostFtdcUserLogoutField> pUserLogout, Pointer<CThostFtdcRspInfoField> pRspInfo, int nRequestID, boolean bIsLast) { mdSpi.onRspUserLogout(getStructObject(pUserLogout), getStructObject(pRspInfo), nRequestID, bIsLast); } @Override @Virtual(5) public void OnRspError(Pointer<CThostFtdcRspInfoField> pRspInfo, int nRequestID, boolean bIsLast) { mdSpi.onRspError(getStructObject(pRspInfo), nRequestID, bIsLast); } @Override @Virtual(6) public void OnRspSubMarketData( Pointer<CThostFtdcSpecificInstrumentField> pSpecificInstrument, Pointer<CThostFtdcRspInfoField> pRspInfo, int nRequestID, boolean bIsLast) { mdSpi.onRspSubMarketData(getStructObject(pSpecificInstrument), getStructObject(pRspInfo), nRequestID, bIsLast); } @Override @Virtual(7) public void OnRspUnSubMarketData( Pointer<CThostFtdcSpecificInstrumentField> pSpecificInstrument, Pointer<CThostFtdcRspInfoField> pRspInfo, int nRequestID, boolean bIsLast) { mdSpi.onRspUnSubMarketData(getStructObject(pSpecificInstrument), getStructObject(pRspInfo), nRequestID, bIsLast); } @Override @Virtual(8) public void OnRtnDepthMarketData( Pointer<CThostFtdcDepthMarketDataField> pDepthMarketData) { mdSpi.onRtnDepthMarketData(getStructObject(pDepthMarketData)); } /** * 获得Field * * 对可能出现的null值做处理 * @param <T> * @param field field的指针对象 * @return */ private <T extends StructObject> T getField(Pointer<T> field) { return field == null ? null : field.get(); } }
[ "710581431@qq.com" ]
710581431@qq.com
2d2ce2bc1585a0e43a1278bd4b7e2fc7a18bb095
57f6ad86a4959a7aad2fe609d667ec5ddf081ab8
/Day1123/src/net/tis/day23/AAA.java
595e580f8074d7a9a75a100ad5a927751e67b5c7
[]
no_license
leejj0221/apple
a04426fcfcd46773112357c307fa5cda146160f4
847e48daeee700dd60d7d1d8a18fdcde8214c469
refs/heads/master
2023-04-07T09:16:54.077075
2021-04-06T00:55:41
2021-04-06T00:55:41
354,688,008
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
300
java
package net.tis.day23; public class AAA { public int my; public static void apple() { System.out.println("\nstatic apple¸Þ¼Òµå"); }//apple END public void color() { System.out.println("\nnon-static color"); }//color END public static void main(String[]args) { } }//class AAA END
[ "dlwowns0221@naver.com" ]
dlwowns0221@naver.com
a635638b46e1cfb7518cf05d055366a3e60a54b4
eadd59d4d3755818f76ce344109345a95cf3c001
/src/Endoscopy/EndoscopyExtractorOld.java
3dbbdd79b10841e65b0185c4951b547d9a8c017d
[]
no_license
sebastiz/Physipopv2.0.3
129728fcf24c56afc1e97bb206c7d93dec54b902
86184120deb321afd1e04e2eda4d866fca07b922
refs/heads/master
2021-09-24T08:11:44.695007
2018-10-05T12:10:59
2018-10-05T12:10:59
105,247,903
0
0
null
null
null
null
UTF-8
Java
false
false
7,974
java
package Endoscopy; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import Overview.Checkers; import Overview.DBConnectorForAll; import org.pmw.tinylog.Logger; public class EndoscopyExtractorOld { public EndoscopyExtractorOld() { } public static void Endoscopy_mane(String filepath) throws IOException, SQLException { String first=""; String second=""; Statement st; String tab=""; String FName=null; String SName=null; String HospNum=null; String DOB=null; String VisitDate=null; String ResultPerformed=null; //Take the spreadsheet and look at the visitDate //Then take the pathology spreadsheet and look at the sample taken date //Then add the array togather for the ones where the Hospital NUmber and VisitDate match //Then you need to add the pathology reports together and the endoscopies together so that the next iteration of endoscopies have no loose ends of pathology ////System.out.println("Yes I am over here in the Endoscopy Section"); Map<String,String> mapEndoscBarr= new LinkedHashMap<String,String>(); FileInputStream fis = new FileInputStream(new File(filepath)); HSSFWorkbook workBook = new HSSFWorkbook (fis); HSSFSheet sheet = workBook.getSheetAt (0); List<HSSFRow> filteredRows = new ArrayList<HSSFRow>(); //Filter by pathology from what I am given Iterator<Row> rows= sheet.rowIterator(); while (rows.hasNext ()){ HSSFRow row = (HSSFRow) rows.next (); Iterator<Cell> cells = row.cellIterator (); while (cells.hasNext ()){ HSSFCell cell = (HSSFCell) cells.next (); if (cell.toString().contains("Barrett")) { filteredRows.add(row); break; } } } ////System.out.println("filteredRowsSIZE"+filteredRows.size()); ArrayList<List<String>> out = new ArrayList<List<String>>(); for (HSSFRow n:filteredRows){ Iterator<Cell> cells = n.cellIterator (); ArrayList<String> in =new ArrayList<String>(); while (cells.hasNext ()){ HSSFCell cell = (HSSFCell) cells.next (); in.add(cell.toString()); } out.add(in); } workBook.close(); //Add each array to a HashMap ////System.out.println("OUTSIZE"+out.size()); int adder=0; for (List<String> n:out){ adder++; if(adder % 5 == 0){ //System.out.println("Divisible by 2"); try { //System.gc(); Thread.sleep(500); } catch (InterruptedException e1) { e1.printStackTrace(); } } mapEndoscBarr.clear(); ////System.out.println("NNNNNNNNNNN"+n); try { HospNum=n.get(0).trim(); mapEndoscBarr.put("HospNum_Id", n.get(1).trim()); } catch (Exception e10) { e10.printStackTrace(); } try { FName=n.get(2).trim(); mapEndoscBarr.put("FIRSTNAME", n.get(2).trim().replaceAll("'", "")); } catch (Exception e9) { e9.printStackTrace(); } try { SName=n.get(3).trim(); mapEndoscBarr.put("LASTNAME", n.get(3).trim().replaceAll("'", "")); } catch (Exception e8) { e8.printStackTrace(); } try { mapEndoscBarr.put("ENDOSCOPIST", n.get(4).trim().replaceAll("'", "")); } catch (Exception e7) { e7.printStackTrace(); } try { mapEndoscBarr.put("ENDOTWO", n.get(5).trim()); } catch (Exception e6) { e6.printStackTrace(); } try { mapEndoscBarr.put("TRAINEE", n.get(6).trim()); } catch (Exception e5) { e5.printStackTrace(); } try { mapEndoscBarr.put("ER_PROCEDUREPERFORMED", n.get(7).trim()); } catch (Exception e) { e.printStackTrace(); } try { mapEndoscBarr.put("VisitDate", n.get(8).trim()); VisitDate=n.get(8).trim(); } catch (Exception e4) { e4.printStackTrace(); } try { mapEndoscBarr.put("ROOM", n.get(9).trim().replaceAll("'", "")); } catch (Exception e3) { e3.printStackTrace(); } try { mapEndoscBarr.put("INDICATIONS", n.get(10).trim().replaceAll("'", "")); } catch (Exception e2) { e2.printStackTrace(); } try { mapEndoscBarr.put("ER_EXTENTOFEXAM", n.get(11).trim().replaceAll("'", "")); } catch (Exception e1) { e1.printStackTrace(); } try { mapEndoscBarr.put("ER_FINDINGS_STR", n.get(12).trim().replaceAll("'", "")); } catch (Exception e) { e.printStackTrace(); } try { mapEndoscBarr.put("ER_DIAGNOSIS_STR", n.get(13).trim().replaceAll("'", "")); } catch (Exception e) { e.printStackTrace(); } try { mapEndoscBarr.put("ER_RECOMMENDATIONS", n.get(14).trim().replaceAll("'", "")); } catch (Exception e) { e.printStackTrace(); } try { mapEndoscBarr.put("ER_RECALLREASON1", n.get(15).trim().replaceAll("'", "")); } catch (Exception e) { e.printStackTrace(); } try { Pattern CStage_pattern = Pattern.compile("(C(\\s|=)*\\d+)",Pattern.DOTALL); Matcher matcherC12Stage_pattern = CStage_pattern.matcher(n.get(12).toString().trim()); Matcher matcherC13Stage_pattern = CStage_pattern.matcher(n.get(13).toString().trim()); if (matcherC12Stage_pattern.find()) { mapEndoscBarr.put("C_Stage",matcherC12Stage_pattern.group(1).replaceAll("\\n^$", "").replaceAll(" ", "").replaceAll("\n", "").replaceAll("\\t", "").replaceAll("=", "").replaceAll("C", "")); //System.out.println("GOT THE C 12"); } else if (matcherC13Stage_pattern.find()) { mapEndoscBarr.put("C_Stage",matcherC13Stage_pattern.group(1).replaceAll("\\n^$", "").replaceAll(" ", "").replaceAll("\n", "").replaceAll("\\t", "").replaceAll("=", "").replaceAll("M", "")); //System.out.println("GOT THE C 13"); } } catch (Exception e) { e.printStackTrace(); } try { Pattern MStage_pattern = Pattern.compile("(M(\\s|=)*\\d+)",Pattern.DOTALL); Matcher matcherM12Stage_pattern = MStage_pattern.matcher(n.get(12).toString().trim()); Matcher matcherM13Stage_pattern = MStage_pattern.matcher(n.get(13).toString().trim()); if (matcherM12Stage_pattern.find()) { mapEndoscBarr.put("M_Stage",matcherM12Stage_pattern.group(1).replaceAll("\\n^$", "").replaceAll(" ", "").replaceAll("\n", "").replaceAll("\\t", "").replaceAll("C", "")); //System.out.println("GOT THE M 12"); } else if (matcherM13Stage_pattern.find()) { //System.out.println("GOT THE M 13"); mapEndoscBarr.put("M_Stage",matcherM13Stage_pattern.group(1).replaceAll("\\n^$", "").replaceAll(" ", "").replaceAll("\n", "").replaceAll("\\t", "").replaceAll("C", "")); } } catch (Exception e) { e.printStackTrace(); } try { DBConnectorForAll ConnectMeUp = new DBConnectorForAll(); tab="Endoscopy"; st=ConnectMeUp.Connector(HospNum,FName,SName,DOB); first=ConnectMeUp.StringInsertKeyPreparer(st,mapEndoscBarr,tab); second=ConnectMeUp.StringInsertValuePreparer(st,mapEndoscBarr,tab); VisitDate=ResultPerformed; if (!Checkers.VisitDateChecker(st,tab,HospNum).contains(VisitDate)){ ConnectMeUp.Inserter(st,HospNum,first,second,tab,filepath); } System.gc(); } catch (Exception e) { Logger.error(e+HospNum+"->From EndoscopyOld"+filepath); } } } }
[ "sebastiz@hotmail.com" ]
sebastiz@hotmail.com
50f63aaa2afdc97e778ed67ebc68705bc310cc45
f48c04532f155c30a040e03237cffdde586e96fb
/src/main/java/com/hu/fenxiao/controller/front/CartController.java
2e0ae60f17e8b5f16e5c7226fdbdbd1c0c444588
[]
no_license
Metathinking/fenxiao
7d649e37303d77755fd14a40cb1313d37de89096
5c14e99773b75f33ba7cb29742fe245fe6573141
refs/heads/master
2020-03-07T21:20:04.097037
2018-05-07T03:48:37
2018-05-07T03:48:37
127,723,560
0
0
null
null
null
null
UTF-8
Java
false
false
4,775
java
package com.hu.fenxiao.controller.front; import com.hu.fenxiao.controller.admin.AdminTuiGuangSettingController; import com.hu.fenxiao.domain.CartItem; import com.hu.fenxiao.domain.Member; import com.hu.fenxiao.exception.ServiceException; import com.hu.fenxiao.service.CartItemService; import com.hu.fenxiao.util.ExceptionTipHandler; import com.hu.fenxiao.util.Tip; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpSession; import java.util.List; @Controller @RequestMapping("member/cart") public class CartController { private Logger logger = LogManager.getLogger(AdminTuiGuangSettingController.class); @Autowired private CartItemService cartItemService; @RequestMapping(value = "list", method = RequestMethod.GET) public String list(Model model) { model.addAttribute("sign", "cart"); return "front/cart"; } @RequestMapping(value = "list", method = RequestMethod.POST) @ResponseBody public Tip getList(HttpSession session) { List<CartItem> list = null; try { Member member = (Member) session.getAttribute("MEMBER"); list = cartItemService.list(member.getId()); return new Tip(true, 100, "", list); } catch (ServiceException e) { e.printStackTrace(); return ExceptionTipHandler.handler(e); } catch (Exception e) { logger.error(e.getMessage(), e); e.printStackTrace(); return ExceptionTipHandler.handler(e); } } /** * 商品加入购物车 * * @param productId * @return */ @RequestMapping(value = "add", method = RequestMethod.POST) @ResponseBody public Tip addItem(@RequestParam String productId, @RequestParam(required = false) Integer quantity, HttpSession session) { try { if (quantity == null || quantity == 0) { quantity = 1; } Member member = (Member) session.getAttribute("MEMBER"); cartItemService.edit(member.getId(), productId, quantity); return new Tip(true, 100, "成功"); } catch (ServiceException e) { e.printStackTrace(); return ExceptionTipHandler.handler(e); } catch (Exception e) { logger.error(e.getMessage(), e); return ExceptionTipHandler.handler(e); } } /** * 购物车商品增加一个 * * @param productId * @return */ @RequestMapping(value = "raise", method = RequestMethod.POST) @ResponseBody public Tip raise(@RequestParam String productId, HttpSession session) { try { Member member = (Member) session.getAttribute("MEMBER"); int quantity = cartItemService.raise(member.getId(), productId); return new Tip(true, 100, quantity + "", quantity); } catch (ServiceException e) { e.printStackTrace(); return ExceptionTipHandler.handler(e); } catch (Exception e) { e.printStackTrace(); logger.error(e.getMessage(), e); return ExceptionTipHandler.handler(e); } } @RequestMapping(value = "reduce", method = RequestMethod.POST) @ResponseBody public Tip reduce(@RequestParam String productId, HttpSession session) { try { Member member = (Member) session.getAttribute("MEMBER"); int quantity = cartItemService.reduce(member.getId(), productId); return new Tip(true, 100, quantity + "", quantity); } catch (ServiceException e) { e.printStackTrace(); return ExceptionTipHandler.handler(e); } catch (Exception e) { e.printStackTrace(); logger.error(e.getMessage(), e); return ExceptionTipHandler.handler(e); } } /** * 删除购物车商品 * * @param cartItemId * @return */ @RequestMapping(value = "delete", method = RequestMethod.POST) @ResponseBody public Tip delete(@RequestParam String cartItemId) { try { cartItemService.delete(cartItemId); return new Tip(true, 100, "成功"); } catch (ServiceException e) { e.printStackTrace(); return ExceptionTipHandler.handler(e); } catch (Exception e) { logger.error(e.getMessage(), e); return ExceptionTipHandler.handler(e); } } }
[ "503523986@qq.com" ]
503523986@qq.com
c1cc3623291ff5aee7d7d4bf5c97f2f1ad332e5f
23827633298df1569d2e64e623c0e5a6d97cdfa6
/observer/src/main/java/cn/ep/dp/observer/impl/Watcher.java
9032deac8a49fefab84bd5e6c042a5b0dcb15ab1
[]
no_license
dark-ep/design-patterns
e556ede3f1e9ccb78c1a3057c5f6226a1eafef04
a54720b648c513462f20f43c140edbb15284ae8c
refs/heads/master
2020-03-25T11:32:50.792419
2018-01-12T07:39:08
2018-01-12T07:39:08
143,736,976
0
0
null
null
null
null
UTF-8
Java
false
false
629
java
package cn.ep.dp.observer.impl; import cn.ep.dp.observer.WatcherObserver; import cn.ep.dp.observer.subject.BaseWaterQuality; /** * @author lhl */ public class Watcher implements WatcherObserver { /** * 职务 */ private String job; @Override public String getJob() { return job; } @Override public void setJob(String job) { this.job = job; } @Override public void update(BaseWaterQuality subject) { // 这里是采用拉的方式 System.out.println(job + "获取到通知,当前污染级别为:" + subject.getPolluteLevel()); } }
[ "lhl_1986@qq.com" ]
lhl_1986@qq.com
7992e136da5e3bed413ef11c9017e504ae92a951
1b02b3a179e2bdd2a6d2805373e4b3e8e8f3ae9c
/src/Student.java
5c179f6467fb7ce6e3c176d6e240f6f2f651a2cd
[]
no_license
Lucihpet/Lab9
075cd7b5dcac4a4a6a6762454865d52b6c1b405c
8f1cb0287abfcfe106a841bd59a52884719bb3f3
refs/heads/master
2021-02-26T00:33:32.924838
2020-03-11T03:14:49
2020-03-11T03:14:49
245,480,778
0
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class Student /*implements Comparable<Student>*/ /*implements Cloneable*/ implements Serializable { protected String name; protected double GPA; public Student (String n, double gpa) { this.name = n; this. GPA = gpa; } public Student (Student other) { this.name = other.name; this.GPA = other.GPA; } public void setName(String n) { this.name = n; } public void setGPA(double gpa) { this.GPA = gpa; } public String getName() { return this.name; } public double getGPA() { return this.GPA; } public int compareTo(Student other) { return (int)(this.GPA - other.GPA); } @Override public Student clone() { return new Student(this); } public static void main (String[] args) { List<Student> students = new ArrayList<>(); students.add(new Student("Tim", 3.4)); students.add(new Student("Allison", 3.7)); students.add(new Student("Matt", 3.2)); students.add(new Student("Fred", 2.7)); students.add(new Student("Beth", 3.9)); students.add(new Student("Heather", 4.0)); students.add(new Student("Jake", 3.2)); students.add(new Student("Zack", 2.9)); students.add(new Student("Chris", 3.0)); students.add(new Student("Melody", 3.7)); } }
[ "59805094+Lucihpet@users.noreply.github.com" ]
59805094+Lucihpet@users.noreply.github.com
a2c858687aab0a7d914897afb73ee93f607b5d83
7ad5a3ceb5b28e31d54269515e35232fbc87fd21
/core/src/main/java/org/jpedal/jbig2/decoders/JBIG2StreamDecoder.java
749ef2dd8a594b01fe0869c788012446601acaed
[ "Apache-2.0" ]
permissive
demetbolata/icepdf4
966a4a8eea50cb4bf82100180f72189f589b09c3
e8dfcb5c03502f1e38d077a730761de945153cd7
refs/heads/master
2023-03-15T16:02:51.443928
2016-05-29T09:02:30
2016-05-29T09:02:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
18,812
java
/* * Copyright 2006-2012 ICEsoft Technologies Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.jpedal.jbig2.decoders; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.jpedal.jbig2.JBIG2Exception; import org.jpedal.jbig2.image.JBIG2Bitmap; import org.jpedal.jbig2.io.StreamReader; import org.jpedal.jbig2.segment.Segment; import org.jpedal.jbig2.segment.SegmentHeader; import org.jpedal.jbig2.segment.extensions.ExtensionSegment; import org.jpedal.jbig2.segment.pageinformation.PageInformationSegment; import org.jpedal.jbig2.segment.pattern.PatternDictionarySegment; import org.jpedal.jbig2.segment.region.generic.GenericRegionSegment; import org.jpedal.jbig2.segment.region.halftone.HalftoneRegionSegment; import org.jpedal.jbig2.segment.region.refinement.RefinementRegionSegment; import org.jpedal.jbig2.segment.region.text.TextRegionSegment; import org.jpedal.jbig2.segment.stripes.EndOfStripeSegment; import org.jpedal.jbig2.segment.symboldictionary.SymbolDictionarySegment; import org.jpedal.jbig2.util.BinaryOperation; public class JBIG2StreamDecoder { private StreamReader reader; private boolean noOfPagesKnown; private boolean randomAccessOrganisation; private int noOfPages = -1; private List segments = new ArrayList(); private List bitmaps = new ArrayList(); private byte[] globalData; private ArithmeticDecoder arithmeticDecoder; private HuffmanDecoder huffmanDecoder; private MMRDecoder mmrDecoder; public static boolean debug = false; public void movePointer(int i){ reader.movePointer(i); } public void setGlobalData(byte[] data) { globalData = data; } public void decodeJBIG2(byte[] data) throws IOException, JBIG2Exception { reader = new StreamReader(data); resetDecoder(); boolean validFile = checkHeader(); if (JBIG2StreamDecoder.debug) System.out.println("validFile = " + validFile); if (!validFile) { /** * Assume this is a stream from a PDF so there is no file header, * end of page segments, or end of file segments. Organisation must * be sequential, and the number of pages is assumed to be 1. */ noOfPagesKnown = true; randomAccessOrganisation = false; noOfPages = 1; /** check to see if there is any global data to be read */ if (globalData != null) { /** set the reader to read from the global data */ reader = new StreamReader(globalData); huffmanDecoder = new HuffmanDecoder(reader); mmrDecoder = new MMRDecoder(reader); arithmeticDecoder = new ArithmeticDecoder(reader); /** read in the global data segments */ readSegments(); /** set the reader back to the main data */ reader = new StreamReader(data); } else { /** * There's no global data, so move the file pointer back to the * start of the stream */ reader.movePointer(-8); } } else { /** * We have the file header, so assume it is a valid stand-alone * file. */ if (JBIG2StreamDecoder.debug) System.out.println("==== File Header ===="); setFileHeaderFlags(); if (JBIG2StreamDecoder.debug) { System.out.println("randomAccessOrganisation = " + randomAccessOrganisation); System.out.println("noOfPagesKnown = " + noOfPagesKnown); } if (noOfPagesKnown) { noOfPages = getNoOfPages(); if (JBIG2StreamDecoder.debug) System.out.println("noOfPages = " + noOfPages); } } huffmanDecoder = new HuffmanDecoder(reader); mmrDecoder = new MMRDecoder(reader); arithmeticDecoder = new ArithmeticDecoder(reader); /** read in the main segment data */ readSegments(); } public HuffmanDecoder getHuffmanDecoder() { return huffmanDecoder; } public MMRDecoder getMMRDecoder() { return mmrDecoder; } public ArithmeticDecoder getArithmeticDecoder() { return arithmeticDecoder; } private void resetDecoder() { noOfPagesKnown = false; randomAccessOrganisation = false; noOfPages = -1; segments.clear(); bitmaps.clear(); } public void cleanupPostDecode() { // Clear away everything but the page segments for (Iterator it = segments.iterator(); it.hasNext();) { Segment segment = (Segment) it.next(); SegmentHeader segmentHeader = segment.getSegmentHeader(); if (segmentHeader.getSegmentType() != segment.PAGE_INFORMATION) { it.remove(); } } bitmaps.clear(); } private void readSegments() throws IOException, JBIG2Exception { if (JBIG2StreamDecoder.debug) System.out.println("==== Segments ===="); boolean finished = false; while (!reader.isFinished() && !finished) { SegmentHeader segmentHeader = new SegmentHeader(); if (JBIG2StreamDecoder.debug) System.out.println("==== Segment Header ===="); readSegmentHeader(segmentHeader); // read the Segment data Segment segment = null; int segmentType = segmentHeader.getSegmentType(); int[] referredToSegments = segmentHeader.getReferredToSegments(); int noOfReferredToSegments = segmentHeader.getReferredToSegmentCount(); switch (segmentType) { case Segment.SYMBOL_DICTIONARY: if (JBIG2StreamDecoder.debug) System.out.println("==== Segment Symbol Dictionary ===="); segment = new SymbolDictionarySegment(this); segment.setSegmentHeader(segmentHeader); break; case Segment.INTERMEDIATE_TEXT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Intermediate Text Region ===="); segment = new TextRegionSegment(this, false); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_TEXT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Text Region ===="); segment = new TextRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_LOSSLESS_TEXT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Lossless Text Region ===="); segment = new TextRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.PATTERN_DICTIONARY: if (JBIG2StreamDecoder.debug) System.out.println("==== Pattern Dictionary ===="); segment = new PatternDictionarySegment(this); segment.setSegmentHeader(segmentHeader); break; case Segment.INTERMEDIATE_HALFTONE_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Intermediate Halftone Region ===="); segment = new HalftoneRegionSegment(this, false); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_HALFTONE_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Halftone Region ===="); segment = new HalftoneRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_LOSSLESS_HALFTONE_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Lossless Halftone Region ===="); segment = new HalftoneRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.INTERMEDIATE_GENERIC_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Intermediate Generic Region ===="); segment = new GenericRegionSegment(this, false); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_GENERIC_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Generic Region ===="); segment = new GenericRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_LOSSLESS_GENERIC_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Lossless Generic Region ===="); segment = new GenericRegionSegment(this, true); segment.setSegmentHeader(segmentHeader); break; case Segment.INTERMEDIATE_GENERIC_REFINEMENT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Intermediate Generic Refinement Region ===="); segment = new RefinementRegionSegment(this, false, referredToSegments, noOfReferredToSegments); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_GENERIC_REFINEMENT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate Generic Refinement Region ===="); segment = new RefinementRegionSegment(this, true, referredToSegments, noOfReferredToSegments); segment.setSegmentHeader(segmentHeader); break; case Segment.IMMEDIATE_LOSSLESS_GENERIC_REFINEMENT_REGION: if (JBIG2StreamDecoder.debug) System.out.println("==== Immediate lossless Generic Refinement Region ===="); segment = new RefinementRegionSegment(this, true, referredToSegments, noOfReferredToSegments); segment.setSegmentHeader(segmentHeader); break; case Segment.PAGE_INFORMATION: if (JBIG2StreamDecoder.debug) System.out.println("==== Page Information Dictionary ===="); segment = new PageInformationSegment(this); segment.setSegmentHeader(segmentHeader); break; case Segment.END_OF_PAGE: continue; case Segment.END_OF_STRIPE: if (JBIG2StreamDecoder.debug) System.out.println("==== End of Stripes ===="); segment = new EndOfStripeSegment(this); segment.setSegmentHeader(segmentHeader); break; case Segment.END_OF_FILE: if (JBIG2StreamDecoder.debug) System.out.println("==== End of File ===="); finished = true; continue; case Segment.PROFILES: if (JBIG2StreamDecoder.debug) System.out.println("PROFILES UNIMPLEMENTED"); break; case Segment.TABLES: if (JBIG2StreamDecoder.debug) System.out.println("TABLES UNIMPLEMENTED"); break; case Segment.EXTENSION: if (JBIG2StreamDecoder.debug) System.out.println("==== Extensions ===="); segment = new ExtensionSegment(this); segment.setSegmentHeader(segmentHeader); break; default: System.out.println("Unknown Segment type in JBIG2 stream"); break; } if (!randomAccessOrganisation) { segment.readSegment(); } segments.add(segment); } if (randomAccessOrganisation) { for (Iterator it = segments.iterator(); it.hasNext();) { Segment segment = (Segment) it.next(); segment.readSegment(); } } } public PageInformationSegment findPageSegement(int page) { for (Iterator it = segments.iterator(); it.hasNext();) { Segment segment = (Segment) it.next(); SegmentHeader segmentHeader = segment.getSegmentHeader(); if (segmentHeader.getSegmentType() == segment.PAGE_INFORMATION && segmentHeader.getPageAssociation() == page) { return (PageInformationSegment) segment; } } return null; } public Segment findSegment(int segmentNumber) { for (Iterator it = segments.iterator(); it.hasNext();) { Segment segment = (Segment) it.next(); if (segment.getSegmentHeader().getSegmentNumber() == segmentNumber) { return segment; } } return null; } private void readSegmentHeader(SegmentHeader segmentHeader) throws IOException, JBIG2Exception { handleSegmentNumber(segmentHeader); handleSegmentHeaderFlags(segmentHeader); handleSegmentReferredToCountAndRententionFlags(segmentHeader); handleReferedToSegmentNumbers(segmentHeader); handlePageAssociation(segmentHeader); if (segmentHeader.getSegmentType() != Segment.END_OF_FILE) handleSegmentDataLength(segmentHeader); } private void handlePageAssociation(SegmentHeader segmentHeader) throws IOException { int pageAssociation; boolean isPageAssociationSizeSet = segmentHeader.isPageAssociationSizeSet(); if (isPageAssociationSizeSet) { // field is 4 bytes long short[] buf = new short[4]; reader.readByte(buf); pageAssociation = BinaryOperation.getInt32(buf); } else { // field is 1 byte long pageAssociation = reader.readByte(); } segmentHeader.setPageAssociation(pageAssociation); if (JBIG2StreamDecoder.debug) System.out.println("pageAssociation = " + pageAssociation); } private void handleSegmentNumber(SegmentHeader segmentHeader) throws IOException { short[] segmentBytes = new short[4]; reader.readByte(segmentBytes); int segmentNumber = BinaryOperation.getInt32(segmentBytes); if (JBIG2StreamDecoder.debug) System.out.println("SegmentNumber = " + segmentNumber); segmentHeader.setSegmentNumber(segmentNumber); } private void handleSegmentHeaderFlags(SegmentHeader segmentHeader) throws IOException { short segmentHeaderFlags = reader.readByte(); // System.out.println("SegmentHeaderFlags = " + SegmentHeaderFlags); segmentHeader.setSegmentHeaderFlags(segmentHeaderFlags); } private void handleSegmentReferredToCountAndRententionFlags(SegmentHeader segmentHeader) throws IOException, JBIG2Exception { short referedToSegmentCountAndRetentionFlags = reader.readByte(); int referredToSegmentCount = (referedToSegmentCountAndRetentionFlags & 224) >> 5; // 224 // = // 11100000 short[] retentionFlags = null; /** take off the first three bits of the first byte */ short firstByte = (short) (referedToSegmentCountAndRetentionFlags & 31); // 31 = // 00011111 if (referredToSegmentCount <= 4) { // short form retentionFlags = new short[1]; retentionFlags[0] = firstByte; } else if (referredToSegmentCount == 7) { // long form short[] longFormCountAndFlags = new short[4]; /** add the first byte of the four */ longFormCountAndFlags[0] = firstByte; for (int i = 1; i < 4; i++) // add the next 3 bytes to the array longFormCountAndFlags[i] = reader.readByte(); /** get the count of the referred to Segments */ referredToSegmentCount = BinaryOperation.getInt32(longFormCountAndFlags); /** calculate the number of bytes in this field */ int noOfBytesInField = (int) Math.ceil(4 + ((referredToSegmentCount + 1) / 8d)); // System.out.println("noOfBytesInField = " + noOfBytesInField); int noOfRententionFlagBytes = noOfBytesInField - 4; retentionFlags = new short[noOfRententionFlagBytes]; reader.readByte(retentionFlags); } else { // error throw new JBIG2Exception("Error, 3 bit Segment count field = " + referredToSegmentCount); } segmentHeader.setReferredToSegmentCount(referredToSegmentCount); if (JBIG2StreamDecoder.debug) System.out.println("referredToSegmentCount = " + referredToSegmentCount); segmentHeader.setRententionFlags(retentionFlags); if (JBIG2StreamDecoder.debug) System.out.print("retentionFlags = "); if (JBIG2StreamDecoder.debug) { for (int i = 0; i < retentionFlags.length; i++) System.out.print(retentionFlags[i] + " "); System.out.println(""); } } private void handleReferedToSegmentNumbers(SegmentHeader segmentHeader) throws IOException { int referredToSegmentCount = segmentHeader.getReferredToSegmentCount(); int[] referredToSegments = new int[referredToSegmentCount]; int segmentNumber = segmentHeader.getSegmentNumber(); if (segmentNumber <= 256) { for (int i = 0; i < referredToSegmentCount; i++) referredToSegments[i] = reader.readByte(); } else if (segmentNumber <= 65536) { short[] buf = new short[2]; for (int i = 0; i < referredToSegmentCount; i++) { reader.readByte(buf); referredToSegments[i] = BinaryOperation.getInt16(buf); } } else { short[] buf = new short[4]; for (int i = 0; i < referredToSegmentCount; i++) { reader.readByte(buf); referredToSegments[i] = BinaryOperation.getInt32(buf); } } segmentHeader.setReferredToSegments(referredToSegments); if (JBIG2StreamDecoder.debug) { System.out.print("referredToSegments = "); for (int i = 0; i < referredToSegments.length; i++) System.out.print(referredToSegments[i] + " "); System.out.println(""); } } private int getNoOfPages() throws IOException { short[] noOfPages = new short[4]; reader.readByte(noOfPages); return BinaryOperation.getInt32(noOfPages); } private void handleSegmentDataLength(SegmentHeader segmentHeader) throws IOException { short[] buf = new short[4]; reader.readByte(buf); int dateLength = BinaryOperation.getInt32(buf); segmentHeader.setDataLength(dateLength); if (JBIG2StreamDecoder.debug) System.out.println("dateLength = " + dateLength); } private void setFileHeaderFlags() throws IOException { short headerFlags = reader.readByte(); if ((headerFlags & 0xfc) != 0) { System.out.println("Warning, reserved bits (2-7) of file header flags are not zero " + headerFlags); } int fileOrganisation = headerFlags & 1; randomAccessOrganisation = fileOrganisation == 0; int pagesKnown = headerFlags & 2; noOfPagesKnown = pagesKnown == 0; } private boolean checkHeader() throws IOException { short[] controlHeader = new short[] { 151, 74, 66, 50, 13, 10, 26, 10 }; short[] actualHeader = new short[8]; reader.readByte(actualHeader); return Arrays.equals(controlHeader, actualHeader); } public int readBits(int num) throws IOException { return reader.readBits(num); } public int readBit() throws IOException { return reader.readBit(); } public void readByte(short[] buff) throws IOException { reader.readByte(buff); } public void consumeRemainingBits() throws IOException { reader.consumeRemainingBits(); } public short readByte() throws java.io.IOException { return reader.readByte(); } public void appendBitmap(JBIG2Bitmap bitmap) { bitmaps.add(bitmap); } public JBIG2Bitmap findBitmap(int bitmapNumber) { for (Iterator it = bitmaps.iterator(); it.hasNext();) { JBIG2Bitmap bitmap = (JBIG2Bitmap) it.next(); if (bitmap.getBitmapNumber() == bitmapNumber) { return bitmap; } } return null; } public JBIG2Bitmap getPageAsJBIG2Bitmap(int i) { JBIG2Bitmap pageBitmap = findPageSegement(1).getPageBitmap(); return pageBitmap; } public boolean isNumberOfPagesKnown() { return noOfPagesKnown; } public int getNumberOfPages() { return noOfPages; } public boolean isRandomAccessOrganisationUsed() { return randomAccessOrganisation; } public List getAllSegments() { return segments; } }
[ "balaumadevi@gmail.com" ]
balaumadevi@gmail.com
22cb80af646c0db82ef4d38b5a7a3b8d26fadcbb
5fa205de1d8e5cfcd45170c1f8e8a0b095763241
/src/view/LoaningsFrame.java
4620263a35b2d81cdcf842b540fc3be9d189c123
[]
no_license
duongbx288/QuanlyThuvien
aa6746fbeb37b5f5944c45822821cc9d6eea70d0
0ce2652ec8c8df93a1244caef9e67ad58880c763
refs/heads/main
2023-08-02T09:14:01.840176
2021-10-04T10:23:27
2021-10-04T10:23:27
413,369,641
0
0
null
null
null
null
UTF-8
Java
false
false
13,424
java
package view; import java.awt.BorderLayout; import java.awt.EventQueue; import java.util.ArrayList; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JTable; import javax.swing.JScrollPane; import javax.swing.table.DefaultTableModel; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCellStyle; import org.apache.poi.xssf.usermodel.XSSFCreationHelper; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import controller.BooksController; import controller.LoaningsController; import controller.ReadersController; import input.LoaningInputFrame; import model.Loanings; import net.proteanit.sql.DbUtils; import javax.swing.ImageIcon; import javax.swing.JButton; import java.awt.event.ActionListener; import java.io.File; import java.io.FileOutputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.awt.event.ActionEvent; import javax.swing.JTextField; import javax.swing.JLabel; import javax.swing.SwingConstants; import javax.swing.UIManager; import java.awt.Color; import java.awt.Font; public class LoaningsFrame extends JFrame { private JPanel contentPane; private JTable table; DefaultTableModel model; public ArrayList<Loanings> list; private JTextField mamt; private JTextField madg; private JTextField matt; public void showTable() { for (Loanings s : list) { model.addRow(new Object[]{ s.getmamt1(), s.getmadg1(), s.getmatt1(), s.getnmuon(), s.getnhentra(), s.gettiencoc() }); } } public static void MuonsachExcel() throws Exception { Connection connect = DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=Thư_viện_trg3901;username=sa;password=thuvienXD" ); Statement statement = connect.createStatement(); ResultSet resultSet = statement.executeQuery("select * from Muontra_XD3901"); XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet spreadsheet = workbook.createSheet("Đơn mượn sách"); XSSFCreationHelper createHelper = workbook.getCreationHelper(); XSSFCellStyle cellStyle = workbook.createCellStyle(); cellStyle.setDataFormat( createHelper.createDataFormat().getFormat("MMMM dd, yyyy")); spreadsheet.setDefaultColumnWidth(20); XSSFRow row = spreadsheet.createRow(1); XSSFCell cell; cell = row.createCell(1); cell.setCellValue("Mã đơn mượn trả"); cell = row.createCell(2); cell.setCellValue("Mã độc giả"); cell = row.createCell(3); cell.setCellValue("Mã thủ thư"); cell = row.createCell(4); cell.setCellValue("Ngày mượn"); cell = row.createCell(5); cell.setCellValue("Ngày hẹn trả"); cell = row.createCell(6); cell.setCellValue("Tiền cọc"); int i = 2; while(resultSet.next()) { row = spreadsheet.createRow(i); cell = row.createCell(1); cell.setCellValue(resultSet.getString("Ma_muon_tra")); cell = row.createCell(2); cell.setCellValue(resultSet.getString("Ma_doc_gia")); cell = row.createCell(3); cell.setCellValue(resultSet.getString("Ma_thu_thu")); cell = row.createCell(4); cell.setCellValue(resultSet.getDate("Ngay_muon")); cell.setCellStyle(cellStyle); cell = row.createCell(5); cell.setCellValue(resultSet.getDate("Ngay_hen_tra")); cell.setCellStyle(cellStyle); cell = row.createCell(6); cell.setCellValue(resultSet.getString("Tien_coc")); i++; } FileOutputStream out = new FileOutputStream(new File("ThongtinMuontra.xlsx")); workbook.write(out); out.close(); System.out.println("ThongtinMuontra.xlsx written successfully"); workbook.close(); } public static void main(String[] args) { try { UIManager.setLookAndFeel("com.jtattoo.plaf.graphite.GraphiteLookAndFeel"); } catch (Throwable e) { e.printStackTrace(); } EventQueue.invokeLater(new Runnable() { public void run() { try { LoaningsFrame frame = new LoaningsFrame(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public LoaningsFrame() { setTitle("Mượn_trảXD3901"); list = new LoaningsController().getListMuontra(); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 1264, 603); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(25, 115, 977, 441); contentPane.add(scrollPane); table = new JTable(); table.setModel(new DefaultTableModel( new Object[][] { }, new String[] { "M\u00E3 \u0111\u01A1n cho m\u01B0\u1EE3n s\u00E1ch", "M\u00E3 \u0111\u1ED9c gi\u1EA3", "M\u00E3 th\u1EE7 th\u01B0", "Ng\u00E0y m\u01B0\u1EE3n", "Ng\u00E0y h\u1EB9n tr\u1EA3", "Ti\u1EC1n c\u1ECDc" } )); scrollPane.setViewportView(table); table.setFillsViewportHeight(true); table.setRowHeight(table.getRowHeight()+20); JButton btnNewButton = new JButton("Thêm"); btnNewButton.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { LoaningInputFrame inputfrm = new LoaningInputFrame(); inputfrm.setVisible(true); } }); btnNewButton.setBounds(26, 69, 115, 36); contentPane.add(btnNewButton); JButton btnNewButton_1 = new JButton("Làm mới"); btnNewButton_1.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Connection conn = DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=Thư_viện_trg3901;username=sa;password=thuvienXD"); String query = "SELECT * FROM Muontra_XD3901"; PreparedStatement st = conn.prepareStatement(query); ResultSet rs = st.executeQuery(); table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException e1) { e1.printStackTrace(); } } }); btnNewButton_1.setBounds(170, 69, 115, 36); contentPane.add(btnNewButton_1); JButton btnNewButton_2 = new JButton("Xóa"); btnNewButton_2.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int row1 = table.getSelectedRow(); if(row1 == -1) { } else { int opt = JOptionPane.showConfirmDialog(null,"Are u sure to delete the chosen information","Xóa thông tin đơn mượn sách",JOptionPane.YES_NO_OPTION); if(opt == 0) { try { Connection conn = DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=Thư_viện_trg3901;username=sa;password=thuvienXD"); int row = table.getSelectedRow(); String value = (table.getModel().getValueAt(row, 0).toString()); String query = "DELETE FROM Muontra_XD3901 WHERE [Ma_muon_tra] = '"+value+"'"; PreparedStatement pst = conn.prepareStatement(query); pst.executeUpdate(); String query1 = "SELECT * FROM Muontra_XD3901 "; PreparedStatement st = conn.prepareStatement(query1); ResultSet rs = st.executeQuery(); table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException e1) {e1.printStackTrace();} } } } }); btnNewButton_2.setBounds(308, 69, 115, 36); contentPane.add(btnNewButton_2); JButton btnNewButton_5 = new JButton("Sửa"); btnNewButton_5.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Connection conn = DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=Thư_viện_trg3901;username=sa;password=thuvienXD"); int row = table.getSelectedRow(); String value0 = (table.getModel().getValueAt(row, 0).toString()); String value1 = (table.getModel().getValueAt(row, 1).toString()); String value2 = (table.getModel().getValueAt(row, 2).toString()); String value3 = (table.getModel().getValueAt(row, 3).toString()); String value4 = (table.getModel().getValueAt(row, 4).toString()); int value5 = Integer.parseInt( table.getValueAt(row, 5).toString()); String query = "UPDATE Muontra_XD3901 SET Ma_muon_tra = '"+value0+"', Ma_doc_gia = '"+value1+"', Ma_thu_thu = '"+value2+"', Ngay_muon = '"+value3+"', Ngay_hen_tra = '"+value4+"', Tien_coc = '"+value5+"' WHERE [Ma_muon_tra] = '"+value0+"'"; PreparedStatement pst = conn.prepareStatement(query); pst.executeUpdate(); String query1 = "SELECT * FROM Muontra_XD3901 "; PreparedStatement st = conn.prepareStatement(query1); ResultSet rs = st.executeQuery(); table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException e1) {e1.printStackTrace();} } }); btnNewButton_5.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_5.setBounds(444, 69, 115, 36); contentPane.add(btnNewButton_5); JButton btnNewButton_3 = new JButton("Tìm kiếm"); btnNewButton_3.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Connection conn = DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;databaseName=Thư_viện_trg3901;username=sa;password=thuvienXD"); String query = "SELECT * FROM Muontra_XD3901 WHERE Ma_muon_tra LIKE '%" + mamt.getText() + "%' AND Ma_doc_gia LIKE N\'%" + madg.getText() + "%' AND Ma_thu_thu LIKE N\'%" + matt.getText() + "%'"; PreparedStatement st = conn.prepareStatement(query); ResultSet rs = st.executeQuery(); table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException e1) { e1.printStackTrace(); } } }); btnNewButton_3.setBounds(1026, 127, 115, 36); contentPane.add(btnNewButton_3); JButton btnNewButton_3_1 = new JButton("Xuất file Excel"); btnNewButton_3_1.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_3_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { MuonsachExcel(); Process process = Runtime.getRuntime().exec("cmd /c start ThongtinMuontra.xlsx "); } catch (Exception e1) { JOptionPane.showMessageDialog(rootPane,"Có lỗi khi xuất file Excel"); e1.printStackTrace(); } } }); btnNewButton_3_1.setBounds(1026, 388, 115, 36); contentPane.add(btnNewButton_3_1); mamt = new JTextField(); mamt.setColumns(10); mamt.setBounds(1095, 195, 115, 36); contentPane.add(mamt); madg = new JTextField(); madg.setColumns(10); madg.setBounds(1095, 258, 115, 36); contentPane.add(madg); matt = new JTextField(); matt.setColumns(10); matt.setBounds(1095, 322, 115, 36); contentPane.add(matt); JLabel lblMnCho = new JLabel("Mã đơn cho"); lblMnCho.setBounds(1018, 195, 67, 18); contentPane.add(lblMnCho); JLabel lblMcGi_1 = new JLabel("Mã độc giả"); lblMcGi_1.setBounds(1018, 258, 67, 26); contentPane.add(lblMcGi_1); JLabel lblMThTh = new JLabel("Mã thủ thư"); lblMThTh.setBounds(1018, 322, 67, 26); contentPane.add(lblMThTh); JLabel lblMnSch = new JLabel("mượn sách"); lblMnSch.setBounds(1018, 213, 67, 18); contentPane.add(lblMnSch); JButton btnNewButton_2_1 = new JButton("Trở lại"); btnNewButton_2_1.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_2_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { HomeFrame hmfrm = new HomeFrame(); hmfrm.setVisible(true); contentPane.setVisible(false); dispose(); } }); btnNewButton_2_1.setBounds(582, 69, 115, 36); contentPane.add(btnNewButton_2_1); JLabel lblNewLabel_3 = new JLabel("Thông tin mượn sách"); lblNewLabel_3.setForeground(Color.WHITE); lblNewLabel_3.setFont(new Font("Corbel Light", Font.PLAIN, 25)); lblNewLabel_3.setBounds(40, 10, 241, 55); contentPane.add(lblNewLabel_3); JLabel Nen1 = new JLabel(""); Nen1.setBackground(new Color(210, 105, 30)); Nen1.setBounds(27, 10, 1200, 95); Nen1.setOpaque(true); contentPane.add(Nen1); JLabel Nen2 = new JLabel(""); Nen2.setBackground(new Color(184, 134, 11)); Nen2.setBounds(1012, 116, 215, 346); Nen2.setOpaque(true); contentPane.add(Nen2); JLabel Nen0 = new JLabel(""); Nen0.setBounds(0, 0, 1254, 569); ImageIcon icon = new ImageIcon("icontoUse/Huge-Library-Wallpaper.jpg"); Nen0.setIcon(icon); contentPane.add(Nen0); JButton btnNewButton_2_1_1 = new JButton("Sửa"); btnNewButton_2_1_1.setFont(new Font("Dialog", Font.PLAIN, 14)); btnNewButton_2_1_1.setBounds(582, 69, 115, 36); contentPane.add(btnNewButton_2_1_1); model = (DefaultTableModel) table.getModel(); showTable(); } }
[ "duongbx183901@gmail.com" ]
duongbx183901@gmail.com