blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
9d0c7ae8544be72f19afec303c40f766377fc7e0
78f6c79972c551d8f387d9f3cdc21e1fde0bc8ad
/website-blog-service/src/main/java/net/sunxu/website/blog/service/repo/jpa/CommentInfoRepo.java
0185e4785b79ef769b51c81d09c5cac31d171ff0
[ "MIT" ]
permissive
sunxuia/website-blog
74805e640c27dc82281a87850278a33a0624b5e1
6e688c4c9d7e45baeb7d829652e55b60d3eb4239
refs/heads/master
2020-07-25T11:03:53.142537
2019-10-10T11:54:22
2019-10-10T11:54:22
208,267,790
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package net.sunxu.website.blog.service.repo.jpa; import java.util.List; import java.util.Set; import net.sunxu.website.blog.service.entity.jpa.CommentInfo; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @Repository public interface CommentInfoRepo extends ResourceInfoRepo<CommentInfo> { List<CommentInfo> findAllByArticleIdOrderByLastUpdateTimeDesc(Long articleId, Pageable page); int deleteAllByArticleId(Long articleId); @Query("select id from CommentInfo where articleId = ?1") Set<Long> listIdsByArticleId(Long articleId); List<CommentInfo> findAllByArticleIdAndCreatorIdOrderByLastUpdateTimeDesc(Long articleId, Long creatorId); }
[ "ntsunxu@163.com" ]
ntsunxu@163.com
5c04a67f1f7bcc274eaffcb2620ebb8ce5b9dafa
0010b5b85355231f0ee1fb2702dc3a554381b62d
/app/src/main/java/com/bukhmastov/cdoitmo/object/SettingsScheduleExams.java
3493f904cec43f01cd759273b613bcf61fd1905f
[ "MIT" ]
permissive
bukhmastov/CDOITMO
e361fe4c8b43df5dfe2671a8d7bf908a9366f390
f881f1ed8bf9fa9fecc907901a310d8ff31bd507
refs/heads/master
2021-01-13T16:43:00.036479
2020-01-12T13:00:05
2020-01-12T13:00:05
77,790,484
11
4
MIT
2018-07-21T11:48:01
2017-01-01T18:08:58
Java
UTF-8
Java
false
false
345
java
package com.bukhmastov.cdoitmo.object; import com.bukhmastov.cdoitmo.activity.ConnectedActivity; import com.bukhmastov.cdoitmo.function.Consumer; import com.bukhmastov.cdoitmo.object.preference.Preference; public interface SettingsScheduleExams { void show(ConnectedActivity activity, Preference preference, Consumer<String> callback); }
[ "bukhmastov-alex@ya.ru" ]
bukhmastov-alex@ya.ru
2eb4aa8ae27b3c7dace9c818330ae85c2bdfe577
9aa39744391dfd9926f04f3838299e11b12de185
/app/src/main/java/com/video/newqu/view/widget/EffectsButton.java
e2994493cc6edd82bba8c3532fc4c41f1ec299bd
[]
no_license
djp0507/Video
c32a45ff3727883bb5f5b853e6d227c7b9e1be76
50c7c3fc784db1bc5c61f5b86d3224dd5cc2a9c0
refs/heads/master
2021-09-01T05:14:39.639940
2017-12-25T01:52:12
2017-12-25T01:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,563
java
package com.video.newqu.view.widget; import android.content.Context; import android.support.v7.widget.AppCompatButton; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; /** * TinyHung@outlook.com * 2017/9/13 16:36 * 点击有动画效果的Button */ public class EffectsButton extends AppCompatButton { private static String TAG = "EffectsButton"; private boolean clickable = true; private ScaleAnimation upAnimation = createUpAnim(); private OnClickEffectButtonListener onClickEffectButtonListener; private boolean shouldAbortAnim; private int preX; private int preY; private int[] locationOnScreen; private Animation.AnimationListener animationListener = new Animation.AnimationListener() { public void onAnimationEnd(Animation paramAnonymousAnimation) { //setSelected(!isSelected()); clearAnimation(); //Log.d(TAG, "onAnimationEnd: "); if (onClickEffectButtonListener != null) { onClickEffectButtonListener.onClickEffectButton(EffectsButton.this); } } public void onAnimationRepeat(Animation paramAnonymousAnimation) {} public void onAnimationStart(Animation paramAnonymousAnimation) {} }; public EffectsButton(Context paramContext) { this(paramContext, null); } public EffectsButton(Context paramContext, AttributeSet paramAttributeSet) { this(paramContext, paramAttributeSet, 0); } public EffectsButton(Context paramContext, AttributeSet paramAttributeSet, int paramInt) { super(paramContext, paramAttributeSet, paramInt); upAnimation.setAnimationListener(this.animationListener); locationOnScreen = new int[2]; setGravity(Gravity.CENTER); } private ScaleAnimation createUpAnim() { ScaleAnimation localScaleAnimation = new ScaleAnimation(1.2F, 1.0F, 1.2F, 1.0F, 1, 0.5F, 1, 0.5F); localScaleAnimation.setDuration(50L); localScaleAnimation.setFillEnabled(true); localScaleAnimation.setFillEnabled(false); localScaleAnimation.setFillAfter(true); return localScaleAnimation; } private ScaleAnimation createDownAnim() { ScaleAnimation localScaleAnimation = new ScaleAnimation(1.0F, 1.2F, 1.0F, 1.2F, 1, 0.5F, 1, 0.5F); localScaleAnimation.setDuration(50L); localScaleAnimation.setFillEnabled(true); localScaleAnimation.setFillBefore(false); localScaleAnimation.setFillAfter(true); return localScaleAnimation; } public boolean onTouchEvent(MotionEvent motionEvent) { super.onTouchEvent(motionEvent); if (!this.clickable) { return false; } if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { clearAnimation(); startAnimation(createDownAnim()); this.shouldAbortAnim = false; getLocationOnScreen(this.locationOnScreen); preX = (this.locationOnScreen[0] + getWidth() / 2); preY = (this.locationOnScreen[1] + getHeight() / 2); } if (motionEvent.getAction() == MotionEvent.ACTION_UP) { clearAnimation(); if (!this.shouldAbortAnim) { startAnimation(this.upAnimation); } this.shouldAbortAnim = false; } else if (motionEvent.getAction() == MotionEvent.ACTION_CANCEL) { clearAnimation(); startAnimation(createUpAnim()); this.shouldAbortAnim = false; } else if ((motionEvent.getAction() == MotionEvent.ACTION_MOVE) && (!this.shouldAbortAnim) && (!checkPos(motionEvent.getRawX(), motionEvent.getRawY()))) { this.shouldAbortAnim = true; clearAnimation(); startAnimation(createUpAnim()); } return true; } boolean checkPos(float rawX, float rawY) { rawX = Math.abs(rawX - this.preX); rawY = Math.abs(rawY - this.preY); return (rawX <= getWidth() / 2) && (rawY <= getHeight() / 2); } public void setClickable(boolean clickable) { this.clickable = clickable; } public void setOnClickEffectButtonListener(OnClickEffectButtonListener parama) { this.onClickEffectButtonListener = parama; } public interface OnClickEffectButtonListener { void onClickEffectButton(EffectsButton view); } }
[ "584312311@qq.com" ]
584312311@qq.com
acd73978ee997d83de0c10e2da10b8fa613c491c
ceeea83e2553c0ffef73bb8d3dc784477e066531
/ResortManagement/src/com/svs/ensign/resort/service/IN_FinanceService.java
58264096a433226d97a473be354a58ca11bd3fec
[ "Apache-2.0" ]
permissive
anupammaiti/ERP
99bf67f9335a2fea96e525a82866810875bc8695
8c124deb41c4945c7cd55cc331b021eae4100c62
refs/heads/master
2020-08-13T19:30:59.922232
2019-10-09T17:04:58
2019-10-09T17:04:58
215,025,440
1
0
Apache-2.0
2019-10-14T11:26:11
2019-10-14T11:26:10
null
UTF-8
Java
false
false
5,371
java
package com.svs.ensign.resort.service; import java.util.List; import com.svs.ensign.resort.bean.AggingaccountpaybleBean; import com.svs.ensign.resort.bean.AggingaccountreceivableBean; import com.svs.ensign.resort.bean.AutoExpencesesTravelBean; import com.svs.ensign.resort.bean.CashdisbursementsjournalBean; import com.svs.ensign.resort.bean.CashreceiptsjournalBean; import com.svs.ensign.resort.bean.DailycashreportBean; import com.svs.ensign.resort.bean.EntertainmentExpencesesBean; import com.svs.ensign.resort.bean.FinanceCustomerBean; import com.svs.ensign.resort.bean.FoodExcepensesBean; import com.svs.ensign.resort.bean.GroupDetailsBean; import com.svs.ensign.resort.bean.HotelExpensesBean; import com.svs.ensign.resort.bean.LedgerDetailsBean; import com.svs.ensign.resort.bean.MeasuresBean; import com.svs.ensign.resort.bean.MisleniousExpencesesBean; import com.svs.ensign.resort.bean.NonTradingExpencesesBean; import com.svs.ensign.resort.bean.PettycashjornalBean; import com.svs.ensign.resort.bean.PettycashvoucherBean; import com.svs.ensign.resort.bean.PhoneBillExpencesesBean; import com.svs.ensign.resort.bean.StockGroupDetailsBean; import com.svs.ensign.resort.bean.StockItemBean; import com.svs.ensign.resort.bean.VocherContraBean; import com.svs.ensign.resort.bean.VocherDetailsBean; import com.svs.ensign.resort.bean.VocherJournalBean; import com.svs.ensign.resort.bean.VocherPaymentBean; import com.svs.ensign.resort.bean.VocherPurchaseBean; import com.svs.ensign.resort.bean.VocherPurchaseReturnBean; import com.svs.ensign.resort.bean.VocherSalesBean; import com.svs.ensign.resort.bean.VocherSalesReturnBean; import com.svs.ensign.resort.bean.VoucherRecieptBean; import net.sf.json.JSONObject; public interface IN_FinanceService { public boolean createFinanceCustomer(FinanceCustomerBean fncust); public JSONObject viewFinanceCustomerByExecutorID(String username); public JSONObject viewCustomerInstallmentsByAdmin(); public JSONObject viewFnCustomerInstallmentsByManagerID(String username); public boolean updateCustomerInstallments(FinanceCustomerBean fncust); public JSONObject viewCustomerByCustomerId(long username); //Finance Starts //Expenses //Daily Auto Expenses Travel. public boolean createDailyAutoExpenses(AutoExpencesesTravelBean autoexpensestravel); public boolean generatePhoneBillDailyExpenses(PhoneBillExpencesesBean phonebillexpenses);//PhoneBillExpenses public boolean geneateFoodBillExp(FoodExcepensesBean foodexpen); public boolean geneateHotelExp(HotelExpensesBean hotelexp); public boolean generateEntertainmentExp(EntertainmentExpencesesBean entertainmentexp); public boolean generateMisleneousExp(MisleniousExpencesesBean misleneousexp); public boolean generateNonTradingExp(NonTradingExpencesesBean nontradingexp); //Executive public JSONObject viewAutoTravelExpensesByExecutive(String deltby); public JSONObject viewPhoneBillExpensesByExecutive(String deltby); public JSONObject viewFoodExpensesByExecutive(String username); public JSONObject viewHotelExpensesByExecutive(String username); public JSONObject viewEntertainmentExpByExecutive(String username); public JSONObject viewMisleneousExpByExecutive(String username); public JSONObject viewNonTradingExpByExecutive(String username); //Manager //Director //Aging Of Account public boolean generateAgingOfAccountPayable(AggingaccountpaybleBean aggingofaccountpayable); public boolean generateAgingOfAccountRecivable(AggingaccountreceivableBean agingofaccountrecivable); public boolean generateCashDisbursmentJournal(CashdisbursementsjournalBean cashdisbursmentjournal); public boolean generateCashRecieptJournal(CashreceiptsjournalBean cashreciptjournal); public boolean createCashreceiptsjournal(CashreceiptsjournalBean cashreceiptsjournalBean); public boolean createDailycashreport(DailycashreportBean dailycashreportBean); public boolean createPettycashjournal(PettycashjornalBean pettycashjornalBean); public boolean createPettycashvoucher(PettycashvoucherBean pettycashvoucherBean); //Executive public JSONObject viewAgingOfAccountPayableByExecutive(String username); //Accounts public boolean createLedgerDetails(LedgerDetailsBean ledgerdetails); public boolean createVoucherDetails(VocherDetailsBean voucherdetailsbean); public boolean createGroupDetails(GroupDetailsBean groupdetails); //Vocher Types public boolean createVoucherReciept(VoucherRecieptBean voucherreciept); public boolean createVoucherPayment(VocherPaymentBean voucherpayment); public boolean createVoucherJournal(VocherJournalBean voucherjournal); public boolean createVoucherContra(VocherContraBean vouchercontrabean); public boolean createVoucherPurchase(VocherPurchaseBean voucherpurchase); public boolean createVoucherSales(VocherSalesBean vouchersales); public boolean createVoucherPurchaseReturn(VocherPurchaseReturnBean voucherpurchasereturn); public boolean createVoucherSalesReturn(VocherSalesReturnBean voucherreturnbean); //Stock public boolean createStockGroups(StockGroupDetailsBean stockgroup); public boolean createStockItems(StockItemBean stockitem); public boolean createMeasureUnits(MeasuresBean measuresbean); }
[ "rrkravikiranrrk@gmail.com" ]
rrkravikiranrrk@gmail.com
fd90c2e4e792767dade9a3df74289b2d2f2c1248
2d3c8c4e169d30c92315d59a0979d3eefc904bab
/app/src/main/java/com/anysoftkeyboard/AskPrefs.java
515ed503b939895452061754a01b14ff077130db
[ "Apache-2.0" ]
permissive
librezale/AnySoftKeyboard
ee53fc92ada04bd98601805a28d0c614471de1d1
5eba501164326be4f4289ca30d6dd6a9e61ff48c
refs/heads/master
2021-01-11T23:19:19.288274
2017-02-04T22:46:33
2017-02-04T22:46:33
78,566,703
1
0
null
2017-01-10T19:32:18
2017-01-10T19:32:18
null
UTF-8
Java
false
false
3,079
java
/* * Copyright (c) 2013 Menny Even-Danan * * 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.anysoftkeyboard; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; public interface AskPrefs { boolean alwaysUseFallBackUserDictionary(); enum AnimationsLevel { Full, Some, None } String getDomainText(); boolean alwaysHideLanguageKey(); boolean getShowKeyPreview(); boolean getShowKeyboardNameText(); boolean getShowHintTextOnKeys(); boolean getUseCustomHintAlign(); int getCustomHintAlign(); int getCustomHintVAlign(); AnimationsLevel getAnimationsLevel(); boolean getSwitchKeyboardOnSpace(); boolean getUseFullScreenInputInLandscape(); boolean getUseFullScreenInputInPortrait(); boolean getUseRepeatingKeys(); float getKeysHeightFactorInPortrait(); float getKeysHeightFactorInLandscape(); boolean getInsertSpaceAfterCandidatePick(); int getGestureSwipeUpKeyCode(boolean fromSpaceBar); int getGestureSwipeDownKeyCode(); int getGestureSwipeLeftKeyCode(boolean fromSpaceBar, boolean withTwoFingers); int getGestureSwipeRightKeyCode(boolean fromSpaceBar, boolean withTwoFingers); int getGesturePinchKeyCode(); int getGestureSeparateKeyCode(); boolean getActionKeyInvisibleWhenRequested(); boolean isDoubleSpaceChangesToPeriod(); boolean shouldShowPopupForLanguageSwitch(); boolean supportPasswordKeyboardRowMode(); boolean hideSoftKeyboardWhenPhysicalKeyPressed(); boolean use16KeysSymbolsKeyboards(); boolean useBackword(); boolean getCycleOverAllSymbols(); boolean useVolumeKeyForLeftRight(); boolean useCameraKeyForBackspaceBackword(); boolean useContactsDictionary(); int getAutoDictionaryInsertionThreshold(); boolean isStickyExtensionKeyboard(); int getSwipeVelocityThreshold(); int getSwipeDistanceThreshold(); int getLongPressTimeout(); int getMultiTapTimeout(); boolean workaround_alwaysUseDrawText(); String getInitialKeyboardCondenseState(); boolean useChewbaccaNotifications(); boolean showKeyPreviewAboveKey(); void addChangedListener(OnSharedPreferenceChangeListener listener); void removeChangedListener(OnSharedPreferenceChangeListener listener); boolean shouldSwapPunctuationAndSpace(); int getFirstAppVersionInstalled(); long getFirstTimeAppInstalled(); long getTimeCurrentVersionInstalled(); boolean getPersistLayoutForPackageId(); }
[ "menny@evendanan.net" ]
menny@evendanan.net
3654948bae98d4a3e748f68b5d9d6057d7bfdb84
294a3b4ba75e870be61be25e5c03d91d0aede9fe
/java-multithread/src/main/java/com/brianway/learning/java/multithread/synchronize/example2/Run2_private01.java
acbd1a00fc0b88b87eb173e45c7ded7691359879
[ "Apache-2.0" ]
permissive
hanpang8983/java-learning
e23235658bb119baee9e22e4d27b3765d019821e
9732c15d5f45d6a51cff199e42e35ffbcc655600
refs/heads/master
2021-01-22T11:41:44.257168
2016-04-17T11:33:56
2016-04-17T11:33:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
688
java
package com.brianway.learning.java.multithread.synchronize.example2; /** * Created by Brian on 2016/4/11. */ /** * P55 * 实例变量非线程安全 */ public class Run2_private01 { public static void main(String[] args) { HasSelfPrivateNum numRef = new HasSelfPrivateNum(); ThreadA threadA = new ThreadA(numRef); threadA.start(); ThreadB threadB = new ThreadB(numRef); threadB.start(); } } /* //synchronized public void addI(String username) 输出: a set over b set over b num= 200 a num= 200 --------------- HasSelfPrivateNum中addI加synchronized 输出:(注意顺序) a set over a num= 100 b set over b num= 200 */
[ "250902678@qq.com" ]
250902678@qq.com
236f6a87fbbb31d48cf26ac98711fa7406d59cc5
40f4908483b98fc4f370ff4f2d520e1284d045b3
/immortals_repo/knowledge-repo/cp/cp3.1/cp-eval-service/src/main/java/com/securboration/immortals/service/eos/impl/EvaluationFsm.java
d1484a0b6b314425d202f0be0b30b091936548bc
[]
no_license
TF-185/bbn-immortals
7f70610bdbbcbf649f3d9021f087baaa76f0d8ca
e298540f7b5f201779213850291337a8bded66c7
refs/heads/master
2023-05-31T00:16:42.522840
2019-10-24T21:45:07
2019-10-24T21:45:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,978
java
package com.securboration.immortals.service.eos.impl; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import com.securboration.immortals.adapt.engine.AdaptationEngine; import com.securboration.immortals.service.eos.api.types.EvaluationConfiguration; import com.securboration.immortals.service.eos.api.types.EvaluationRunConfiguration; import com.securboration.immortals.service.eos.api.types.EvaluationStatusReport; import com.securboration.immortals.service.eos.nonapi.types.EvaluationContext; import com.securboration.immortals.swri.EvaluationProperties; public class EvaluationFsm { private final Object lock = new Object(); private final Map<String,EvaluationContext> dataMap = new HashMap<>(); private AdaptationEngine adaptationEngine; public EvaluationFsm(AdaptationEngine adaptationEngine){ this.adaptationEngine = adaptationEngine; } private void put(final EvaluationContext status){ dataMap.put(status.getContextId(), status); } private EvaluationContext get(final String contextId){ return dataMap.get(contextId); } public EvaluationStatusReport statusOf(final String contextId) throws IOException{ synchronized(lock){ final EvaluationContext context = get(contextId); final EvaluationStatusReport report = new EvaluationStatusReport(); report.setContextId(contextId); report.setStatus(context.getCurrentStatus()); report.getCommandResults().addAll(context.getCommandResults()); report.setEvaluationReportZip(context.getEvaluatedPackageZip()); return report; } } public void cleanup(final String contextId){ synchronized(lock){ if(contextId == null){ dataMap.clear(); } else { dataMap.remove(contextId); } } } public List<String> getContextIds(){ synchronized(lock){ return new ArrayList<>(dataMap.keySet()); } } public String evaluate( final EvaluationProperties properties, final EvaluationConfiguration highLevelConfig ) throws IOException, InterruptedException{ final String contextId = UUID.randomUUID().toString(); final EvaluationRunConfiguration lowLevelConfig = EosHelper.getEvaluatableConfiguration( properties, highLevelConfig ); final EvaluationContext d = new EvaluationContext( contextId, lowLevelConfig, highLevelConfig ); d.setAdaptationEngine(adaptationEngine); synchronized(lock){ if(dataMap.size() > 100){//TODO: this is very arbitrary throw new RuntimeException( "there are " + dataMap.size() + " active contexts, which indicates a resource leak. " + "Try cleaning up using DELETE /eos/context" ); } put(d); } final Thread t = new Thread(()->{ Evaluator evaluator = new Evaluator(d); try { evaluator.evaluate(lock); } catch (Exception e) { e.printStackTrace(new PrintStream(d.getStderr())); throw new RuntimeException(e); } }); t.setDaemon(true); t.setName("evaluator-" + contextId); t.start(); return contextId; } }
[ "austin.wellman@raytheon.com" ]
austin.wellman@raytheon.com
ceba4615c17fd5c475a137d820649cf37103c648
4de6150f9e4d8ddef09f41f4a4902872b1c3aa3d
/lucene_practice/src/org/apache/lucene/codecs/BlockTermState.java
07ee270ddfb763c9826968a9c4edac7c6333d003
[]
no_license
yehaote/mi
91d47ca1fb42ba62c10b8ab862390ee891d4c3a9
d7835cfa0f38b128ea65f90b33d18e9946e554ea
refs/heads/master
2016-09-11T05:48:43.750926
2013-10-10T06:01:56
2013-10-10T06:01:56
3,130,168
0
0
null
null
null
null
UTF-8
Java
false
false
2,369
java
package org.apache.lucene.codecs; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.lucene.index.DocsEnum; // javadocs import org.apache.lucene.index.OrdTermState; import org.apache.lucene.index.TermState; /** * Holds all state required for {@link PostingsReaderBase} * to produce a {@link org.apache.lucene.index.DocsEnum} without re-seeking the * terms dict. */ public class BlockTermState extends OrdTermState { /** how many docs have this term */ public int docFreq; /** total number of occurrences of this term */ public long totalTermFreq; /** the term's ord in the current block */ public int termBlockOrd; /** fp into the terms dict primary file (_X.tim) that holds this term */ public long blockFilePointer; /** Sole constructor. (For invocation by subclass * constructors, typically implicit.) */ protected BlockTermState() { } @Override public void copyFrom(TermState _other) { assert _other instanceof BlockTermState : "can not copy from " + _other.getClass().getName(); BlockTermState other = (BlockTermState) _other; super.copyFrom(_other); docFreq = other.docFreq; totalTermFreq = other.totalTermFreq; termBlockOrd = other.termBlockOrd; blockFilePointer = other.blockFilePointer; // NOTE: don't copy blockTermCount; // it's "transient": used only by the "primary" // termState, and regenerated on seek by TermState } @Override public String toString() { return "docFreq=" + docFreq + " totalTermFreq=" + totalTermFreq + " termBlockOrd=" + termBlockOrd + " blockFP=" + blockFilePointer; } }
[ "yehaote@gmail.com" ]
yehaote@gmail.com
b45835db756fa28fe2da0a087270a1ce7e8a7326
dc16d5ab381f823dfb24eb5ba7a051b499f617bd
/examples/src/boofcv/examples/ExampleVisualOdometryMonocularPlane.java
dc670b729f18aef87d3374252757c901937a1b16
[ "Apache-2.0" ]
permissive
tom-adsfund/BoofCV
702b65f1df6b90ac1f6bc3241f9d05169d532df4
a29c80dedcf4ea92b80f259ca879c599f199e8f7
refs/heads/master
2021-01-17T21:21:52.274709
2013-12-02T19:58:10
2013-12-02T19:58:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,969
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.examples; import boofcv.abst.feature.detect.interest.ConfigGeneralDetector; import boofcv.abst.feature.tracker.PkltConfig; import boofcv.abst.feature.tracker.PointTrackerTwoPass; import boofcv.abst.sfm.AccessPointTracks3D; import boofcv.abst.sfm.d3.MonocularPlaneVisualOdometry; import boofcv.abst.sfm.d3.VisualOdometry; import boofcv.factory.feature.tracker.FactoryPointTrackerTwoPass; import boofcv.factory.sfm.FactoryVisualOdometry; import boofcv.io.MediaManager; import boofcv.io.image.SimpleImageSequence; import boofcv.io.wrapper.DefaultMediaManager; import boofcv.misc.BoofMiscOps; import boofcv.struct.calib.MonoPlaneParameters; import boofcv.struct.image.ImageSInt16; import boofcv.struct.image.ImageType; import boofcv.struct.image.ImageUInt8; import georegression.struct.point.Vector3D_F64; import georegression.struct.se.Se3_F64; /** * Bare bones example showing how to estimate the camera's ego-motion using a single camera and a known * plane. Additional information on the scene can be optionally extracted from the algorithm, * if it implements AccessPointTracks3D. * * @author Peter Abeles */ public class ExampleVisualOdometryMonocularPlane { public static void main( String args[] ) { MediaManager media = DefaultMediaManager.INSTANCE; String directory = "../data/applet/vo/drc/"; // load camera description and the video sequence MonoPlaneParameters calibration = BoofMiscOps.loadXML(media.openFile(directory + "mono_plane.xml")); SimpleImageSequence<ImageUInt8> video = media.openVideo(directory + "left.mjpeg", ImageType.single(ImageUInt8.class)); // specify how the image features are going to be tracked PkltConfig<ImageUInt8, ImageSInt16> configKlt = PkltConfig.createDefault(ImageUInt8.class, ImageSInt16.class); configKlt.pyramidScaling = new int[]{1, 2, 4, 8}; configKlt.templateRadius = 3; PointTrackerTwoPass<ImageUInt8> tracker = FactoryPointTrackerTwoPass.klt(configKlt, new ConfigGeneralDetector(600, 3, 1)); // declares the algorithm MonocularPlaneVisualOdometry<ImageUInt8> visualOdometry = FactoryVisualOdometry.monoPlaneInfinity(75, 2, 1.5, 200, tracker, ImageType.single(ImageUInt8.class)); // Pass in intrinsic/extrinsic calibration. This can be changed in the future. visualOdometry.setCalibration(calibration); // Process the video sequence and output the location plus number of inliers while( video.hasNext() ) { ImageUInt8 left = video.next(); if( !visualOdometry.process(left) ) { throw new RuntimeException("VO Failed!"); } Se3_F64 leftToWorld = visualOdometry.getCameraToWorld(); Vector3D_F64 T = leftToWorld.getT(); System.out.printf("Location %8.2f %8.2f %8.2f inliers %s\n", T.x, T.y, T.z, inlierPercent(visualOdometry)); } } /** * If the algorithm implements AccessPointTracks3D, then count the number of inlier features * and return a string. */ public static String inlierPercent(VisualOdometry<?> alg) { if( !(alg instanceof AccessPointTracks3D)) return ""; AccessPointTracks3D access = (AccessPointTracks3D)alg; int count = 0; int N = access.getAllTracks().size(); for( int i = 0; i < N; i++ ) { if( access.isInlier(i) ) count++; } return String.format("%%%5.3f", 100.0 * count / N); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
5e0801fd5347e57acbbc8578fc916af6347cdb95
c48caee8e6ecb588e4a64dfec6f754fcd43ea924
/thymeleaf-spring6/src/main/java/org/thymeleaf/spring6/context/webmvc/SpringWebMvcThymeleafRequestContext.java
57e663c41472b2fce7b4a38bb4a54c6e9b81d1d3
[ "Apache-2.0" ]
permissive
thymeleaf/thymeleaf-spring
d1e3b6aee6c51c812930d8f5233428f127e43b36
f078508ce7d1d823373964551a007cd35fad5270
refs/heads/3.1-master
2023-09-01T13:22:00.857469
2022-01-18T19:34:18
2022-01-18T19:34:18
4,399,506
422
170
Apache-2.0
2022-12-16T04:36:03
2012-05-21T22:28:35
Java
UTF-8
Java
false
false
7,860
java
/* * ============================================================================= * * Copyright (c) 2011-2018, The THYMELEAF team (http://www.thymeleaf.org) * * 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.thymeleaf.spring6.context.webmvc; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.TimeZone; import jakarta.servlet.http.HttpServletRequest; import org.springframework.context.MessageSource; import org.springframework.context.MessageSourceResolvable; import org.springframework.context.NoSuchMessageException; import org.springframework.ui.context.Theme; import org.springframework.validation.Errors; import org.springframework.web.servlet.support.RequestContext; import org.thymeleaf.spring6.context.IThymeleafBindStatus; import org.thymeleaf.spring6.context.IThymeleafRequestContext; import org.thymeleaf.spring6.context.IThymeleafRequestDataValueProcessor; import org.thymeleaf.util.Validate; /** * <p> * Implementation of the {@link IThymeleafRequestContext} interface, meant to wrap a Spring * {@link RequestContext} object. * </p> * * @see RequestContext * * @author Daniel Fern&aacute;ndez * * @since 3.0.3 * */ public class SpringWebMvcThymeleafRequestContext implements IThymeleafRequestContext { private final RequestContext requestContext; private final HttpServletRequest httpServletRequest; private final SpringWebMvcThymeleafRequestDataValueProcessor thymeleafRequestDataValueProcessor; public SpringWebMvcThymeleafRequestContext( final RequestContext requestContext, final HttpServletRequest httpServletRequest) { super(); Validate.notNull(requestContext, "Spring WebMVC RequestContext cannot be null"); Validate.notNull(httpServletRequest, "HttpServletRequest cannot be null"); this.requestContext = requestContext; this.httpServletRequest = httpServletRequest; this.thymeleafRequestDataValueProcessor = new SpringWebMvcThymeleafRequestDataValueProcessor( this.requestContext.getRequestDataValueProcessor(), httpServletRequest); } public HttpServletRequest getHttpServletRequest() { return this.httpServletRequest; } @Override public MessageSource getMessageSource() { return this.requestContext.getMessageSource(); } @Override public Map<String, Object> getModel() { return this.requestContext.getModel(); } @Override public Locale getLocale() { return this.requestContext.getLocale(); } @Override public TimeZone getTimeZone() { return this.requestContext.getTimeZone(); } @Override public void changeLocale(final Locale locale) { this.requestContext.changeLocale(locale); } @Override public void changeLocale(final Locale locale, final TimeZone timeZone) { this.requestContext.changeLocale(locale, timeZone); } @Override public void setDefaultHtmlEscape(final boolean defaultHtmlEscape) { this.requestContext.setDefaultHtmlEscape(defaultHtmlEscape); } @Override public boolean isDefaultHtmlEscape() { return this.requestContext.isDefaultHtmlEscape(); } @Override public Boolean getDefaultHtmlEscape() { return this.requestContext.getDefaultHtmlEscape(); } @Override public String getContextPath() { return this.requestContext.getContextPath(); } @Override public String getContextUrl(final String relativeUrl) { return this.requestContext.getContextUrl(relativeUrl); } @Override public String getContextUrl(final String relativeUrl, final Map<String, ?> params) { return this.requestContext.getContextUrl(relativeUrl, params); } @Override public String getRequestPath() { return this.requestContext.getRequestUri(); } @Override public String getQueryString() { return this.requestContext.getQueryString(); } @Override public String getMessage(final String code, final String defaultMessage) { return this.requestContext.getMessage(code, defaultMessage); } @Override public String getMessage(final String code, final Object[] args, final String defaultMessage) { return this.requestContext.getMessage(code, args, defaultMessage); } @Override public String getMessage(final String code, final List<?> args, final String defaultMessage) { return this.requestContext.getMessage(code, args, defaultMessage); } @Override public String getMessage(final String code, final Object[] args, final String defaultMessage, final boolean htmlEscape) { return this.requestContext.getMessage(code, args, defaultMessage, htmlEscape); } @Override public String getMessage(final String code) throws NoSuchMessageException { return this.requestContext.getMessage(code); } @Override public String getMessage(final String code, final Object[] args) throws NoSuchMessageException { return this.requestContext.getMessage(code, args); } @Override public String getMessage(final String code, final List<?> args) throws NoSuchMessageException { return this.requestContext.getMessage(code, args); } @Override public String getMessage(final String code, final Object[] args, final boolean htmlEscape) throws NoSuchMessageException { return this.requestContext.getMessage(code, args, htmlEscape); } @Override public String getMessage(final MessageSourceResolvable resolvable) throws NoSuchMessageException { return this.requestContext.getMessage(resolvable); } @Override public String getMessage(final MessageSourceResolvable resolvable, final boolean htmlEscape) throws NoSuchMessageException { return this.requestContext.getMessage(resolvable, htmlEscape); } @Override public Optional<Errors> getErrors(final String name) { return Optional.ofNullable(this.requestContext.getErrors(name)); } @Override public Optional<Errors> getErrors(final String name, final boolean htmlEscape) { return Optional.ofNullable(this.requestContext.getErrors(name, htmlEscape)); } @Override public Theme getTheme() { return this.requestContext.getTheme(); } @Override public IThymeleafRequestDataValueProcessor getRequestDataValueProcessor() { return this.thymeleafRequestDataValueProcessor; } @Override public IThymeleafBindStatus getBindStatus(final String path) throws IllegalStateException { return Optional.ofNullable(this.requestContext.getBindStatus(path)).map(SpringWebMvcThymeleafBindStatus::new).orElse(null); } @Override public IThymeleafBindStatus getBindStatus(final String path, final boolean htmlEscape) throws IllegalStateException { return Optional.ofNullable(this.requestContext.getBindStatus(path, htmlEscape)).map(SpringWebMvcThymeleafBindStatus::new).orElse(null); } @Override public String toString() { return this.requestContext.toString(); } }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
78a89dd477c61d59970bbcb9c6212f4c6851ec50
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/770_2.java
e1d45e536b7c6ce5670971eea2cfaf18c81f43bc
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
//,temp,TestFileBasedCopyListing.java,301,321,temp,TestIntegration.java,201,218 //,3 public class xxx { @Test(timeout=100000) public void testUpdateSingleDirTargetPresent() { try { addEntries(listFile, "Usingledir"); mkdirs(root + "/Usingledir/Udir1"); mkdirs(target.toString()); runTest(listFile, target, true, true); checkResult(target, 1, "Udir1"); } catch (IOException e) { LOG.error("Exception encountered while testing distcp", e); Assert.fail("distcp failure"); } finally { TestDistCpUtils.delete(fs, root); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
b5b25d5a6dbea4ed1bdbfe292d31203c8ffd68d8
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
/maind/src/main/java/com/vvt/capture/telegram/internal/TLRPC$TL_decryptedMessageLayer.java
844cd5a385dd81c7b28e76ca77953c0a6e4b6a2f
[]
no_license
EchoAGI/Flexispy.re
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
ba65a5b8b033b92c5867759f2727c5141b7e92fc
refs/heads/master
2023-04-26T02:52:18.732433
2018-07-16T07:46:56
2018-07-16T07:46:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,842
java
package com.vvt.capture.telegram.internal; public class TLRPC$TL_decryptedMessageLayer extends TLObject { public static int constructor = 467867529; public int in_seq_no; public int layer; public TLRPC.DecryptedMessage message; public int out_seq_no; public byte[] random_bytes; public static TL_decryptedMessageLayer TLdeserialize(AbstractSerializedData paramAbstractSerializedData, int paramInt, boolean paramBoolean) { int i = constructor; Object localObject; if (i != paramInt) { if (paramBoolean) { localObject = new java/lang/RuntimeException; Object[] arrayOfObject = new Object[1]; Integer localInteger = Integer.valueOf(paramInt); arrayOfObject[0] = localInteger; String str = String.format("can't parse magic %x in TL_decryptedMessageLayer", arrayOfObject); ((RuntimeException)localObject).<init>(str); throw ((Throwable)localObject); } i = 0; localObject = null; } for (;;) { return (TL_decryptedMessageLayer)localObject; localObject = new com/vvt/capture/telegram/internal/TLRPC$TL_decryptedMessageLayer; ((TL_decryptedMessageLayer)localObject).<init>(); ((TL_decryptedMessageLayer)localObject).readParams(paramAbstractSerializedData, paramBoolean); } } public void readParams(AbstractSerializedData paramAbstractSerializedData, boolean paramBoolean) { Object localObject = paramAbstractSerializedData.readByteArray(paramBoolean); this.random_bytes = ((byte[])localObject); int i = paramAbstractSerializedData.readInt32(paramBoolean); this.layer = i; i = paramAbstractSerializedData.readInt32(paramBoolean); this.in_seq_no = i; i = paramAbstractSerializedData.readInt32(paramBoolean); this.out_seq_no = i; i = paramAbstractSerializedData.readInt32(paramBoolean); localObject = TLRPC.DecryptedMessage.TLdeserialize(paramAbstractSerializedData, i, paramBoolean); this.message = ((TLRPC.DecryptedMessage)localObject); } public void serializeToStream(AbstractSerializedData paramAbstractSerializedData) { int i = constructor; paramAbstractSerializedData.writeInt32(i); byte[] arrayOfByte = this.random_bytes; paramAbstractSerializedData.writeByteArray(arrayOfByte); i = this.layer; paramAbstractSerializedData.writeInt32(i); i = this.in_seq_no; paramAbstractSerializedData.writeInt32(i); i = this.out_seq_no; paramAbstractSerializedData.writeInt32(i); this.message.serializeToStream(paramAbstractSerializedData); } } /* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/capture/telegram/internal/TLRPC$TL_decryptedMessageLayer.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "52388483@qq.com" ]
52388483@qq.com
bc13bdb2f7230dab31b617cffd2940bd9ef0c2fc
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/c/b/a/b/b.java
aa780293746c719d05d8d80ae37c931e412e8482
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
5,359
java
package com.c.b.a.b; final class b { private final a a; private final int[] b; b(a parama, int[] paramArrayOfInt) { if (paramArrayOfInt.length == 0) { throw new IllegalArgumentException(); } this.a = parama; int j = paramArrayOfInt.length; if ((j > 1) && (paramArrayOfInt[0] == 0)) { int i = 1; while ((i < j) && (paramArrayOfInt[i] == 0)) { i += 1; } if (i == j) { this.b = new int[] { 0 }; return; } this.b = new int[j - i]; System.arraycopy(paramArrayOfInt, i, this.b, 0, this.b.length); return; } this.b = paramArrayOfInt; } int a() { return this.b.length - 1; } int a(int paramInt) { return this.b[(this.b.length - 1 - paramInt)]; } b a(int paramInt1, int paramInt2) { if (paramInt1 < 0) { throw new IllegalArgumentException(); } if (paramInt2 == 0) { return this.a.a(); } int i = this.b.length; int[] arrayOfInt = new int[i + paramInt1]; paramInt1 = 0; while (paramInt1 < i) { arrayOfInt[paramInt1] = this.a.c(this.b[paramInt1], paramInt2); paramInt1 += 1; } return new b(this.a, arrayOfInt); } b a(b paramb) { if (!this.a.equals(paramb.a)) { throw new IllegalArgumentException("GenericGFPolys do not have same GenericGF field"); } if (b()) { return paramb; } if (paramb.b()) { return this; } Object localObject = this.b; int[] arrayOfInt = paramb.b; if (localObject.length > arrayOfInt.length) { paramb = arrayOfInt; } for (;;) { arrayOfInt = new int[localObject.length]; int j = localObject.length - paramb.length; System.arraycopy(localObject, 0, arrayOfInt, 0, j); int i = j; while (i < localObject.length) { arrayOfInt[i] = a.b(paramb[(i - j)], localObject[i]); i += 1; } return new b(this.a, arrayOfInt); paramb = (b)localObject; localObject = arrayOfInt; } } int b(int paramInt) { int j = 0; int i; if (paramInt == 0) { i = a(0); return i; } int m = this.b.length; if (paramInt == 1) { int[] arrayOfInt = this.b; k = arrayOfInt.length; paramInt = 0; for (;;) { i = paramInt; if (j >= k) { break; } paramInt = a.b(paramInt, arrayOfInt[j]); j += 1; } } j = this.b[0]; int k = 1; for (;;) { i = j; if (k >= m) { break; } j = a.b(this.a.c(paramInt, j), this.b[k]); k += 1; } } b b(b paramb) { if (!this.a.equals(paramb.a)) { throw new IllegalArgumentException("GenericGFPolys do not have same GenericGF field"); } if ((b()) || (paramb.b())) { return this.a.a(); } int[] arrayOfInt1 = this.b; int k = arrayOfInt1.length; paramb = paramb.b; int m = paramb.length; int[] arrayOfInt2 = new int[k + m - 1]; int i = 0; while (i < k) { int n = arrayOfInt1[i]; int j = 0; while (j < m) { arrayOfInt2[(i + j)] = a.b(arrayOfInt2[(i + j)], this.a.c(n, paramb[j])); j += 1; } i += 1; } return new b(this.a, arrayOfInt2); } boolean b() { boolean bool = false; if (this.b[0] == 0) { bool = true; } return bool; } b c(int paramInt) { if (paramInt == 0) { localObject = this.a.a(); } do { return (b)localObject; localObject = this; } while (paramInt == 1); int j = this.b.length; Object localObject = new int[j]; int i = 0; while (i < j) { localObject[i] = this.a.c(this.b[i], paramInt); i += 1; } return new b(this.a, (int[])localObject); } public String toString() { StringBuilder localStringBuilder = new StringBuilder(a() * 8); int i = a(); if (i >= 0) { int k = a(i); int j; if (k != 0) { if (k >= 0) { break label104; } localStringBuilder.append(" - "); j = -k; label52: if ((i == 0) || (j != 1)) { j = this.a.b(j); if (j != 0) { break label127; } localStringBuilder.append('1'); } label81: if (i != 0) { if (i != 1) { break label158; } localStringBuilder.append('x'); } } for (;;) { i -= 1; break; label104: j = k; if (localStringBuilder.length() <= 0) { break label52; } localStringBuilder.append(" + "); j = k; break label52; label127: if (j == 1) { localStringBuilder.append('a'); break label81; } localStringBuilder.append("a^"); localStringBuilder.append(j); break label81; label158: localStringBuilder.append("x^"); localStringBuilder.append(i); } } return localStringBuilder.toString(); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\c\b\a\b\b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
9e80a871c3d86b440215145d0f854325c7d3fea7
4ed8a261dc1d7a053557c9c0bcec759978559dbd
/cnd/cnd.refactoring/test/unit/src/org/netbeans/modules/cnd/refactoring/RefactoringTest.java
071506e0f61c42f4332a8e8c81236301cf0fab65
[ "Apache-2.0" ]
permissive
kaveman-/netbeans
0197762d834aa497ad17dccd08a65c69576aceb4
814ad30e2d0a094f4aa3813bcbb5323a95a0b1d6
refs/heads/master
2021-01-04T06:49:41.139015
2020-02-06T15:13:37
2020-02-06T15:13:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,504
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2010 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. * * Contributor(s): * * Portions Copyrighted 2008 Sun Microsystems, Inc. */ package org.netbeans.modules.cnd.refactoring; import junit.framework.Test; import junit.framework.TestSuite; import org.netbeans.modules.cnd.refactoring.actions.GlobalRenamePerformerTestCase; import org.netbeans.modules.cnd.refactoring.actions.InstantRenamePerformerTestCase; import org.netbeans.modules.cnd.refactoring.hints.IntroduceVariable2TestCase; import org.netbeans.modules.cnd.refactoring.hints.IntroduceVariableTestCase; import org.netbeans.modules.cnd.refactoring.plugins.WhereUsedFiltersTestCase; import org.netbeans.modules.cnd.refactoring.plugins.WhereUsedInQuoteTestCase; import org.netbeans.modules.cnd.refactoring.plugins.WhereUsedTestCase; import org.netbeans.modules.cnd.test.CndBaseTestSuite; /** * */ public class RefactoringTest extends CndBaseTestSuite { private RefactoringTest() { super("C/C++ Refactoring Test"); // NOI18N addTestSuite(InstantRenamePerformerTestCase.class); addTestSuite(GlobalRenamePerformerTestCase.class); addTestSuite(WhereUsedInQuoteTestCase.class); addTestSuite(WhereUsedTestCase.class); addTestSuite(WhereUsedFiltersTestCase.class); addTestSuite(IntroduceVariableTestCase.class); addTestSuite(IntroduceVariable2TestCase.class); } public static Test suite() { TestSuite suite = new RefactoringTest(); return suite; } }
[ "geertjan@apache.org" ]
geertjan@apache.org
83392e34c8a3f771d0ba70ddac018cf5676488df
d04e329767233dc783dafc2fcc8bd8815685d4cc
/src/main/java/services/ExternalProviderCertificatesService.java
bde0a8a27ea09e1eb52d7eedc84ae380969802e0
[]
no_license
machacekondra/ovirt-engine-api-model
8fc263d4fe4bd0c8b34dd8954b57b13c5a9a157f
fd303da7781c06acfc5b8d314dde908a42965f3a
refs/heads/master
2021-01-15T13:11:08.384778
2017-01-10T09:39:29
2017-01-12T08:33:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,180
java
/* Copyright (c) 2015 Red Hat, 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 services; import annotations.Area; import org.ovirt.api.metamodel.annotations.In; import org.ovirt.api.metamodel.annotations.Out; import org.ovirt.api.metamodel.annotations.Service; import types.Certificate; @Service @Area("Infrastructure") public interface ExternalProviderCertificatesService { interface List { @Out Certificate[] certificates(); /** * Sets the maximum number of certificates to return. If not specified all the certificates are returned. */ @In Integer max(); } @Service ExternalProviderCertificateService certificate(String id); }
[ "juan.hernandez@redhat.com" ]
juan.hernandez@redhat.com
def00fafaaebe9be76ddbf275dd5db95556e8cba
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Core/System.Security.Cryptography.X509Certificates,Version=4.2.2.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/system/security/cryptography/x509certificates/X509RevocationFlag.java
c78fcce045a38b368bc54e1ace353677bd1c89f5
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,128
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.security.cryptography.x509certificates; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; // Import section // PACKAGE_IMPORT_SECTION /** * The base .NET class managing System.Security.Cryptography.X509Certificates.X509RevocationFlag, System.Security.Cryptography.X509Certificates, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Security.Cryptography.X509Certificates.X509RevocationFlag" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Security.Cryptography.X509Certificates.X509RevocationFlag</a> */ public class X509RevocationFlag extends NetObject { /** * Fully assembly qualified name: System.Security.Cryptography.X509Certificates, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Security.Cryptography.X509Certificates, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Security.Cryptography.X509Certificates */ public static final String assemblyShortName = "System.Security.Cryptography.X509Certificates"; /** * Qualified class name: System.Security.Cryptography.X509Certificates.X509RevocationFlag */ public static final String className = "System.Security.Cryptography.X509Certificates.X509RevocationFlag"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumReflected = createEnum(); JCEnum classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } static JCEnum createEnum() { try { return bridge.GetEnum(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public X509RevocationFlag(Object instance) { super(instance); if (instance instanceof JCObject) { try { String enumName = NetEnum.GetName(classType, (JCObject)instance); classInstance = enumReflected.fromValue(enumName); } catch (Throwable t) { if (JCOBridgeInstance.getDebug()) t.printStackTrace(); classInstance = enumReflected; } } else if (instance instanceof JCEnum) { classInstance = (JCEnum)instance; } } public X509RevocationFlag() { super(); // add reference to assemblyName.dll file try { addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } catch (Throwable jcne) { if (JCOBridgeInstance.getDebug()) jcne.printStackTrace(); } } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public JCType getJCOType() { return classType; } final static X509RevocationFlag getFrom(JCEnum object, String value) { try { return new X509RevocationFlag(object.fromValue(value)); } catch (JCException e) { return new X509RevocationFlag(object); } } // Enum fields section public static X509RevocationFlag EndCertificateOnly = getFrom(enumReflected, "EndCertificateOnly"); public static X509RevocationFlag EntireChain = getFrom(enumReflected, "EntireChain"); public static X509RevocationFlag ExcludeRoot = getFrom(enumReflected, "ExcludeRoot"); // Flags management section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
e9cabec7d4f6930db2961fbfc1a746af6321e2a9
0c382db6b89fdf64fcc56978b5e945dff51fe3cd
/src/main/java/ganymedes01/headcrumbs/libs/Reference.java
972aaefed947509c6864db4926ad7ecfb262caae
[]
no_license
lorddusk/Headcrumbs
aa0089812279153bfd89368c5445bdf25e9f077f
9a4226f185f0992b590ca92462620df5fca0d60d
refs/heads/master
2021-01-15T12:25:02.298540
2015-03-30T22:56:50
2015-03-30T22:56:50
33,192,435
0
0
null
2015-03-31T15:12:16
2015-03-31T15:12:15
null
UTF-8
Java
false
false
769
java
package ganymedes01.headcrumbs.libs; public class Reference { public static final String MOD_ID = "headcrumbs"; public static final String MOD_NAME = "Headcrumbs"; public static final String DEPENDENCIES = "required-after:Forge@[10.13.2.1291,);"; public static final String VERSION_NUMBER = "1.3.2"; public static final String ITEM_BLOCK_TEXTURE_PATH = MOD_ID + ":"; public static final String ENTITY_TEXTURE_PATH = ITEM_BLOCK_TEXTURE_PATH + "textures/entities/"; public static final String CLIENT_PROXY_CLASS = "ganymedes01." + MOD_ID + ".proxy.ClientProxy"; public static final String SERVER_PROXY_CLASS = "ganymedes01." + MOD_ID + ".proxy.CommonProxy"; public static final String GUI_FACTORY_CLASS = "ganymedes01.headcrumbs.configs.ConfigGuiFactory"; }
[ "foka_12@hotmail.com" ]
foka_12@hotmail.com
2a51baab7baa56fa8c98cddc729263ebde96a13f
bab312373c967caf5fe359b9c6a468bebf1f5d46
/subscriptionManager/src/main/java/gov/nasa/arc/mct/event/services/SubscriptionConstants.java
ce9b24f94d4b723a665479e866f5d40d10964dea
[]
no_license
HugoGuarin/ochouno
15dd6f1feb04d28f298205e2ebb76c7a3be3c8e3
1ce702b45edf7554584fdc8efffa5a9a13a32807
refs/heads/master
2021-01-21T23:28:54.839678
2017-06-23T18:45:04
2017-06-23T18:45:04
95,246,195
0
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
/******************************************************************************* * Mission Control Technologies, Copyright (c) 2009-2012, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * * The MCT platform is 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. * * MCT includes source code licensed under additional open source licenses. See * the MCT Open Source Licenses file included with this distribution or the About * MCT Licenses dialog available at runtime from the MCT Help menu for additional * information. *******************************************************************************/ package gov.nasa.arc.mct.event.services; /** * Defines constants used in communicating with the {@link SubscriptionAdmin} service. */ public abstract class SubscriptionConstants { /** An event property indicating that the event designates subscription status. */ public static final String SUBSCRIPTION_STATUS = "STATUS"; /** * A value for the <code>SUBSCRIPTION_STATUS</code> property that indicates * that the topic has been successfully subscribed-to. */ public static final String STATUS_SUBSCRIBED = "Subscribed"; /** * A value for the <code>SUBSCRIPTION_STATUS</code> property that indicates * that no provider for the topic was found. */ public static final String STATUS_UNAVAILABLE = "Unavailable"; }
[ "ricardo910821@gmail.com" ]
ricardo910821@gmail.com
9c5519181ca827eb7502b30b0cd1504d289b7a96
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/dataprovider/p010ws/p076v1/PnpV1WebService.java
a8ccb93c9e3c2c1f0855850cb52cb6140aff6de0
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
1,127
java
package p005cm.aptoide.p006pt.dataprovider.p010ws.p076v1; import android.content.SharedPreferences; import com.mopub.common.Constants; import okhttp3.OkHttpClient; import p005cm.aptoide.p006pt.dataprovider.BuildConfig; import p005cm.aptoide.p006pt.dataprovider.WebService; import p005cm.aptoide.p006pt.preferences.toolbox.ToolboxManager; import retrofit2.Converter.Factory; /* renamed from: cm.aptoide.pt.dataprovider.ws.v1.PnpV1WebService */ public abstract class PnpV1WebService<U> extends WebService<Service, U> { protected PnpV1WebService(OkHttpClient httpClient, Factory converterFactory, SharedPreferences sharedPreferences) { super(Service.class, httpClient, converterFactory, getHost(sharedPreferences)); } public static String getHost(SharedPreferences sharedPreferences) { StringBuilder sb = new StringBuilder(); sb.append(ToolboxManager.isToolboxEnableHttpScheme(sharedPreferences) ? Constants.HTTP : "https"); sb.append("://"); sb.append(BuildConfig.APTOIDE_WEB_SERVICES_NOTIFICATION_HOST); sb.append("/pnp/v1/"); return sb.toString(); } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
3884302e68ea9d1e6f2929512191b1bb077316aa
45e5b8e4d43925525e60fe3bc93dc43a04962c4a
/nodding/libs/GlassVoice/com/google/android/voicesearch/greco3/ResultsMergerStrategy.java
f1d19c2f8e0b66e978964b80b48898d792eb24df
[ "BSD-3-Clause" ]
permissive
ramonwirsch/glass_snippets
1818ba22b4c11cdb8a91714e00921028751dd405
2495edec63efc051e3a10bf5ed8089811200e9ad
refs/heads/master
2020-04-08T09:37:22.980415
2014-06-24T12:07:53
2014-06-24T12:07:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
869
java
package com.google.android.voicesearch.greco3; public enum ResultsMergerStrategy { static { EMBEDDED_MERGE_NETWORK = new ResultsMergerStrategy("EMBEDDED_MERGE_NETWORK", 1); EMBEDDED_IGNORE_NETWORK = new ResultsMergerStrategy("EMBEDDED_IGNORE_NETWORK", 2); EMBEDDED_ONLY = new ResultsMergerStrategy("EMBEDDED_ONLY", 3); ResultsMergerStrategy[] arrayOfResultsMergerStrategy = new ResultsMergerStrategy[4]; arrayOfResultsMergerStrategy[0] = PREFER_NETWORK; arrayOfResultsMergerStrategy[1] = EMBEDDED_MERGE_NETWORK; arrayOfResultsMergerStrategy[2] = EMBEDDED_IGNORE_NETWORK; arrayOfResultsMergerStrategy[3] = EMBEDDED_ONLY; } } /* Location: /home/phil/workspace/glass_hello_world/libs/GlassVoice-dex2jar.jar * Qualified Name: com.google.android.voicesearch.greco3.ResultsMergerStrategy * JD-Core Version: 0.6.2 */
[ "scholl@ess.tu-darmstadt.de" ]
scholl@ess.tu-darmstadt.de
220411733b5d17e071439531a546d9987e5d1a1e
a4a0435f275ddd45655e5b5d41d86566b7f05865
/microservices/security_practice/src/main/java/org/mddarr/security_practice/security/services/UserDetailsImpl.java
b55e0bb57768488e14c55db32ee953a268ffb333
[]
no_license
MathiasDarr/spring_trip_services
2a5f904e2565f06cd92c8a89192534a3d5449b36
bb000db199313f27412bf9e5b6ba8655c7ed6512
refs/heads/master
2023-01-30T12:54:48.624726
2020-12-16T12:31:29
2020-12-16T12:31:29
320,996,993
0
0
null
null
null
null
UTF-8
Java
false
false
2,219
java
package org.mddarr.security_practice.security.services; import com.fasterxml.jackson.annotation.JsonIgnore; import org.mddarr.security_practice.models.UserEntity; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; public class UserDetailsImpl implements UserDetails { private static final long serialVersionUID = 1L; private Long id; private String username; private String email; @JsonIgnore private String password; private Collection<? extends GrantedAuthority> authorities; public UserDetailsImpl(Long id, String username, String email, String password, Collection<? extends GrantedAuthority> authorities) { this.id = id; this.username = username; this.email = email; this.password = password; this.authorities = authorities; } public static UserDetailsImpl build(UserEntity user) { List<GrantedAuthority> authorities = user.getRoles().stream() .map(role -> new SimpleGrantedAuthority(role.getName().name())) .collect(Collectors.toList()); return new UserDetailsImpl( user.getId(), user.getUsername(), user.getEmail(), user.getPassword(), authorities); } @Override public Collection<? extends GrantedAuthority> getAuthorities() { return authorities; } public Long getId() { return id; } public String getEmail() { return email; } @Override public String getPassword() { return password; } @Override public String getUsername() { return username; } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UserDetailsImpl user = (UserDetailsImpl) o; return Objects.equals(id, user.id); } }
[ "mddarr@gmail.com" ]
mddarr@gmail.com
ba835ff6ed7acc327c09c5023558ed7e63a60681
09b036ef8b9c016473f2ccf160bd7e07a1e77c6e
/Zoo/src/myzoo/Student.java
9d63b53a166e027d5ddc51881be3a5817a4a8f50
[]
no_license
anujshukla123/java_june
3d2ad32af2a96ddace71c3253cac8051fa9b9954
41752b0ec8ad5fcbb534e241c671ea13793670e8
refs/heads/master
2020-03-20T20:01:41.791619
2018-06-17T16:33:34
2018-06-17T16:33:34
137,666,812
0
0
null
2018-06-17T15:48:34
2018-06-17T15:48:34
null
UTF-8
Java
false
false
163
java
package myzoo; /** * Created by cerebro on 12/06/18. */ public class Student { public String name; public int age; public static int averageAge; }
[ "101.prashant@gmail.com" ]
101.prashant@gmail.com
e425a2d288e387d458010ff2746256858605f889
66bb9e407ed67a325a7f1eb816798ec7e453c863
/intellij/org.eclipse.xtext.core.idea.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/idea/lang/SimpleReconstrTestLanguageSyntaxHighlighterFactory.java
b3bd1d9b598bbaea81c814f080fa91d6f9b8d2a8
[ "LicenseRef-scancode-generic-cla" ]
no_license
malbac/xtext
639f85c4a20d752cbcbad290ccae2e52f7e108bb
f5dd7b4308f1c16ef4b645c9ac811b9c0ca2e103
refs/heads/master
2021-01-18T12:52:18.153143
2015-04-24T16:54:44
2015-04-24T16:55:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package org.eclipse.xtext.parsetree.reconstr.idea.lang; import org.jetbrains.annotations.NotNull; import com.intellij.openapi.fileTypes.SingleLazyInstanceSyntaxHighlighterFactory; import com.intellij.openapi.fileTypes.SyntaxHighlighter; public class SimpleReconstrTestLanguageSyntaxHighlighterFactory extends SingleLazyInstanceSyntaxHighlighterFactory { @NotNull protected SyntaxHighlighter createHighlighter() { return SimpleReconstrTestLanguageLanguage.INSTANCE.getInstance(SyntaxHighlighter.class); } }
[ "anton.kosyakov@itemis.de" ]
anton.kosyakov@itemis.de
afaf39a034aa253966e4e07d20bf84e6f9bb23fe
8138da3b905564d6b2933d5ebae6b7d5b3d9d20c
/wb/t20190228/v2/ThreadCritical.java
33a04aad573c6da1426145247bb0073701c94d29
[ "MIT" ]
permissive
stackprobe/Spica01
08f0fa0eb67dbc146d3116e74451ade79b9e0589
1e4e1b3e1b20bafc85805f6cf0ee01a16b39a9de
refs/heads/master
2021-06-30T07:16:34.917063
2020-09-29T14:24:10
2020-09-29T14:24:10
155,574,647
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package wb.t20190228.v2; import charlotte.tools.Critical; public class ThreadCritical extends Critical { private Object SYNCROOT = new Object(); private Thread _enteredTh = null; private int _reenteredCount = 0; @Override public void enter() { Thread currentTh = Thread.currentThread(); synchronized(SYNCROOT) { if(_enteredTh == currentTh) { _reenteredCount++; return; } } super.enter(); synchronized(SYNCROOT) { _enteredTh = currentTh; } } @Override public void leave() { Thread currentTh = Thread.currentThread(); synchronized(SYNCROOT) { if(_enteredTh != currentTh) { throw null; // never } if(1 <= _reenteredCount) { _reenteredCount--; return; } _enteredTh = null; } super.leave(); } }
[ "stackprobes@gmail.com" ]
stackprobes@gmail.com
08e75d21d04ca8b1514fb6d57c73109f3f4ae938
cbad3334a18b0877925b891f2e52496b0095740c
/第14章 片元着色器的妙用/Sample14_10/src/com/bn/Sample14_10/LoadUtil.java
0652cfc92633d56c4b8624491f2ae07681ff0301
[]
no_license
tangyong3g/openGl20Games
73e05de4add4e326e6f2082e555d37c091bd2614
f1b06bb64a210b82ca4fbbff98e23f1290f42762
refs/heads/master
2021-01-17T04:48:34.641523
2019-12-07T02:06:39
2019-12-07T02:06:39
11,811,001
13
7
null
null
null
null
GB18030
Java
false
false
8,086
java
package com.bn.Sample14_10; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import android.content.res.Resources; import android.util.Log; public class LoadUtil { //求两个向量的叉积 public static float[] getCrossProduct(float x1,float y1,float z1,float x2,float y2,float z2) { //求出两个矢量叉积矢量在XYZ轴的分量ABC float A=y1*z2-y2*z1; float B=z1*x2-z2*x1; float C=x1*y2-x2*y1; return new float[]{A,B,C}; } //向量规格化 public static float[] vectorNormal(float[] vector) { //求向量的模 float module=(float)Math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]+vector[2]*vector[2]); return new float[]{vector[0]/module,vector[1]/module,vector[2]/module}; } //从obj文件中加载携带顶点信息的物体,并自动计算每个顶点的平均法向量 public static LoadedObjectVertexNormalTexture loadFromFile (String fname, Resources r,MySurfaceView mv) { //加载后物体的引用 LoadedObjectVertexNormalTexture lo=null; //原始顶点坐标列表--直接从obj文件中加载 ArrayList<Float> alv=new ArrayList<Float>(); //顶点组装面索引列表--根据面的信息从文件中加载 ArrayList<Integer> alFaceIndex=new ArrayList<Integer>(); //结果顶点坐标列表--按面组织好 ArrayList<Float> alvResult=new ArrayList<Float>(); //平均前各个索引对应的点的法向量集合Map //此HashMap的key为点的索引, value为点所在的各个面的法向量的集合 HashMap<Integer,HashSet<Normal>> hmn=new HashMap<Integer,HashSet<Normal>>(); //原始纹理坐标列表 ArrayList<Float> alt=new ArrayList<Float>(); //纹理坐标结果列表 ArrayList<Float> altResult=new ArrayList<Float>(); try { InputStream in=r.getAssets().open(fname); InputStreamReader isr=new InputStreamReader(in); BufferedReader br=new BufferedReader(isr); String temps=null; //扫面文件,根据行类型的不同执行不同的处理逻辑 while((temps=br.readLine())!=null) { //用空格分割行中的各个组成部分 String[] tempsa=temps.split("[ ]+"); if(tempsa[0].trim().equals("v")) {//此行为顶点坐标 //若为顶点坐标行则提取出此顶点的XYZ坐标添加到原始顶点坐标列表中 alv.add(Float.parseFloat(tempsa[1])); alv.add(Float.parseFloat(tempsa[2])); alv.add(Float.parseFloat(tempsa[3])); } else if(tempsa[0].trim().equals("vt")) {//此行为纹理坐标行 //若为纹理坐标行则提取ST坐标并添加进原始纹理坐标列表中 alt.add(Float.parseFloat(tempsa[1])/2.0f); alt.add(Float.parseFloat(tempsa[2])/2.0f); } else if(tempsa[0].trim().equals("f")) {//此行为三角形面 /* *若为三角形面行则根据 组成面的顶点的索引从原始顶点坐标列表中 *提取相应的顶点坐标值添加到结果顶点坐标列表中,同时根据三个 *顶点的坐标计算出此面的法向量并添加到平均前各个索引对应的点 *的法向量集合组成的Map中 */ int[] index=new int[3];//三个顶点索引值的数组 //计算第0个顶点的索引,并获取此顶点的XYZ三个坐标 index[0]=Integer.parseInt(tempsa[1].split("/")[0])-1; float x0=alv.get(3*index[0]); float y0=alv.get(3*index[0]+1); float z0=alv.get(3*index[0]+2); alvResult.add(x0); alvResult.add(y0); alvResult.add(z0); //计算第1个顶点的索引,并获取此顶点的XYZ三个坐标 index[1]=Integer.parseInt(tempsa[2].split("/")[0])-1; float x1=alv.get(3*index[1]); float y1=alv.get(3*index[1]+1); float z1=alv.get(3*index[1]+2); alvResult.add(x1); alvResult.add(y1); alvResult.add(z1); //计算第2个顶点的索引,并获取此顶点的XYZ三个坐标 index[2]=Integer.parseInt(tempsa[3].split("/")[0])-1; float x2=alv.get(3*index[2]); float y2=alv.get(3*index[2]+1); float z2=alv.get(3*index[2]+2); alvResult.add(x2); alvResult.add(y2); alvResult.add(z2); //记录此面的顶点索引 alFaceIndex.add(index[0]); alFaceIndex.add(index[1]); alFaceIndex.add(index[2]); //通过三角形面两个边向量0-1,0-2求叉积得到此面的法向量 //求0号点到1号点的向量 float vxa=x1-x0; float vya=y1-y0; float vza=z1-z0; //求0号点到2号点的向量 float vxb=x2-x0; float vyb=y2-y0; float vzb=z2-z0; //通过求两个向量的叉积计算法向量 float[] vNormal=vectorNormal(getCrossProduct ( vxa,vya,vza,vxb,vyb,vzb )); for(int tempInxex:index) {//记录每个索引点的法向量到平均前各个索引对应的点的法向量集合组成的Map中 //获取当前索引对应点的法向量集合 HashSet<Normal> hsn=hmn.get(tempInxex); if(hsn==null) {//若集合不存在则创建 hsn=new HashSet<Normal>(); } //将此点的法向量添加到集合中 //由于Normal类重写了equals方法,因此同样的法向量不会重复出现在此点 //对应的法向量集合中 hsn.add(new Normal(vNormal[0],vNormal[1],vNormal[2])); //将集合放进HsahMap中 hmn.put(tempInxex, hsn); } //将纹理坐标组织到结果纹理坐标列表中 //第0个顶点的纹理坐标 int indexTex=Integer.parseInt(tempsa[1].split("/")[1])-1; altResult.add(alt.get(indexTex*2)); altResult.add(alt.get(indexTex*2+1)); //第1个顶点的纹理坐标 indexTex=Integer.parseInt(tempsa[2].split("/")[1])-1; altResult.add(alt.get(indexTex*2)); altResult.add(alt.get(indexTex*2+1)); //第2个顶点的纹理坐标 indexTex=Integer.parseInt(tempsa[3].split("/")[1])-1; altResult.add(alt.get(indexTex*2)); altResult.add(alt.get(indexTex*2+1)); } } //生成顶点数组 int size=alvResult.size(); float[] vXYZ=new float[size]; for(int i=0;i<size;i++) { vXYZ[i]=alvResult.get(i); } //生成法向量数组 float[] nXYZ=new float[alFaceIndex.size()*3]; int c=0; for(Integer i:alFaceIndex) { //根据当前点的索引从Map中取出一个法向量的集合 HashSet<Normal> hsn=hmn.get(i); //求出平均法向量 float[] tn=Normal.getAverage(hsn); //将计算出的平均法向量存放到法向量数组中 nXYZ[c++]=tn[0]; nXYZ[c++]=tn[1]; nXYZ[c++]=tn[2]; } //生成纹理数组 size=altResult.size(); float[] tST=new float[size]; for(int i=0;i<size;i++) { tST[i]=altResult.get(i); } //创建3D物体对象 lo=new LoadedObjectVertexNormalTexture(mv,vXYZ,nXYZ,tST); } catch(Exception e) { Log.d("load error", "load error"); e.printStackTrace(); } return lo; } }
[ "ty_sany@163.com" ]
ty_sany@163.com
2a8a48964a18744f7232bbae0808de0fd936f14c
228a50b8eb1fbd7b03161ad2a323f62a26b6815a
/src/com/example/customviewdemo/BitmapColorActivity.java
1d3b2a2c8020e1156f56886fa45019b5eca95211
[ "Apache-2.0" ]
permissive
jianghang/CustomViewDemo
ebcab266cbdd9443d2e39587a8a62bb6332247a7
3baa1058749ac595cb2e4beace4467fac0386f31
refs/heads/master
2021-01-10T09:08:21.228479
2015-12-13T07:23:40
2015-12-13T07:23:40
47,763,253
0
0
null
null
null
null
GB18030
Java
false
false
6,303
java
package com.example.customviewdemo; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import com.example.customviewdemo.R.color; import com.example.customviewdemo.view.ImageHelper; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.media.ExifInterface; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewParent; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import android.widget.PopupWindow; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; public class BitmapColorActivity extends Activity implements OnSeekBarChangeListener { private static final int CROP_PHOTO = 2; private static final int MID_VALUE = 127; private static final int MAX_VALUE = 255; private ImageView colorImage; private Uri imageUri; private Bitmap mBitmap; private SeekBar mHueSeek; private SeekBar mSaturationSeek; private SeekBar mLumSeek; private float mHue; private float mSaturation; private float mLum; private ImageView originalImage; private Context mContext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bitmap_color); mContext = this; mHue = (MID_VALUE - MID_VALUE) * 1.0F / MID_VALUE * 180; mSaturation = MID_VALUE * 1.0F / MID_VALUE; mLum = MID_VALUE * 1.0F / MID_VALUE; colorImage = (ImageView) findViewById(R.id.colorImage); originalImage = (ImageView) findViewById(R.id.originalImage); mHueSeek = (SeekBar) findViewById(R.id.hueSeek); mHueSeek.setMax(MAX_VALUE); mHueSeek.setProgress(MID_VALUE); mHueSeek.setOnSeekBarChangeListener(this); mSaturationSeek = (SeekBar) findViewById(R.id.staurationSeek); mSaturationSeek.setMax(MAX_VALUE); mSaturationSeek.setProgress(MID_VALUE); mSaturationSeek.setOnSeekBarChangeListener(this); mLumSeek = (SeekBar) findViewById(R.id.lumSeek); mLumSeek.setMax(MAX_VALUE); mLumSeek.setProgress(MID_VALUE); mLumSeek.setOnSeekBarChangeListener(this); colorImage.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showPopupWindow(v); } }); } protected void showPopupWindow(View v) { View contentView = LayoutInflater.from(mContext).inflate( R.layout.pop_window, null); TextView hueTv = (TextView) contentView.findViewById(R.id.huetv); TextView saturationTv = (TextView) contentView .findViewById(R.id.saturationtv); TextView lumTv = (TextView) contentView.findViewById(R.id.lumtv); hueTv.setText("Hue: " + mHue); saturationTv.setText("Saturation: " + mSaturation); lumTv.setText("Lum: " + mLum); PopupWindow popupwindow = new PopupWindow(contentView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, true); popupwindow.setBackgroundDrawable(getResources().getDrawable( R.drawable.shapedemo));//使用PopupWindow需要设定背景,不然会出现奇怪的问题(实测) popupwindow.showAsDropDown(v); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.bitmapcolormenu, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.add_bitmap: Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);//调用系统相册 startActivityForResult(intent, CROP_PHOTO); break; default: break; } return super.onOptionsItemSelected(item); } /** * <p>Title: onActivityResult</p> * <p>Description: </p> * @param requestCode * @param resultCode * @param data * @see 接收系统相册返回的文件路径 */ @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case CROP_PHOTO: if (resultCode == RESULT_OK) { Uri selectedImage = data.getData(); String[] filePathColumn = { MediaStore.Images.Media.DATA }; Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); String picturePath = cursor.getString(columnIndex); cursor.close(); LinearLayout layout = (LinearLayout) colorImage.getParent(); // mBitmap = BitmapFactory.decodeFile(picturePath); mBitmap = ImageHelper.decodeSampledBitmapFromFile(picturePath, layout.getWidth(), layout.getHeight()); mBitmap = ImageHelper.rotateImage(mBitmap, picturePath); originalImage.setImageBitmap(mBitmap); colorImage.setImageBitmap(mBitmap); mHueSeek.setProgress(MID_VALUE); mSaturationSeek.setProgress(MID_VALUE); mLumSeek.setProgress(MID_VALUE); } break; default: break; } } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { switch (seekBar.getId()) { case R.id.hueSeek: mHue = (progress - MID_VALUE) * 1.0F / MID_VALUE * 180; break; case R.id.staurationSeek: mSaturation = progress * 1.0F / MID_VALUE; break; case R.id.lumSeek: mLum = progress * 1.0F / MID_VALUE; break; default: break; } Bitmap bm = getImageViewBitmap(originalImage); colorImage.setImageBitmap(ImageHelper.handleImageEffect(bm, mHue, mSaturation, mLum)); } private Bitmap getImageViewBitmap(ImageView iv) { Bitmap bm = ((BitmapDrawable) iv.getDrawable()).getBitmap(); return bm; } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { } }
[ "664019848@qq.com" ]
664019848@qq.com
26bd64831eec9a97f8c3f5a5286d9bee54ce3d86
b22e4849975af86484aeb309e313f5c2682fc981
/src/p13/lecture/A03Generic.java
d8948474f3183e88158971369aa68b01b75fc7db
[]
no_license
sebaek/java20210325
329ab75a0c213d7035633d9416497db7c7f68450
9c312f9fa501f17527f58ad8a2046ed0849e6e8a
refs/heads/master
2023-05-06T15:31:22.775246
2021-05-24T07:29:35
2021-05-24T07:29:35
351,269,340
1
2
null
null
null
null
UTF-8
Java
false
false
581
java
package p13.lecture; public class A03Generic { public static void main(String[] args) { Generic3<String> g3 = new Generic3<>(); g3.setO("java"); String s = g3.getO(); System.out.println(s); Generic3<Integer> g4 = new Generic3<>(); // g4.setO("java"); g4.setO(999); int i = g4.getO(); // auto unboxing System.out.println(i); Generic3<Double> g5 = new Generic3<>(); g5.setO(3.14); double d = g5.getO(); System.out.println(d); } } class Generic3<T> { private T o; public T getO() { return o; } public void setO(T o) { this.o = o; } }
[ "sebaek@gmail.com" ]
sebaek@gmail.com
7e2983b04c4b054f5ee9f1dd1732833e9d306f14
f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28
/Android/UISystem/View/src/main/java/com/ztiany/view/ContentActivity.java
1582a12ff1aada0118478427e2e7bdccfe62beab
[ "Apache-2.0" ]
permissive
flyfire/Programming-Notes-Code
3b51b45f8760309013c3c0cc748311d33951a044
4b1bdd74c1ba0c007c504834e4508ec39f01cd94
refs/heads/master
2020-05-07T18:00:49.757509
2019-04-10T11:15:13
2019-04-10T11:15:13
180,750,568
1
0
Apache-2.0
2019-04-11T08:40:38
2019-04-11T08:40:38
null
UTF-8
Java
false
false
2,043
java
package com.ztiany.view; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; /** * @author Ztiany * Email: ztiany3@gmail.com * Date : 2017-08-05 15:27 */ public class ContentActivity extends AppCompatActivity { private Toolbar mToolbar; public static Intent getLaunchIntent(Context context, String title, Class fragment) { Intent intent = new Intent(context, ContentActivity.class); intent.putExtra("key1", title); intent.putExtra("key2", fragment.getName()); return intent; } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.common_activity_content); mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); mToolbar.setContentInsetStartWithNavigation(0); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); mToolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { supportFinishAfterTransition(); } }); } if (savedInstanceState == null) { String name = getIntent().getStringExtra("key2"); getSupportFragmentManager() .beginTransaction() .replace(R.id.fl_content, Fragment.instantiate(this, name, null), name) .commit(); } } @Override protected void onResume() { super.onResume(); String title = getIntent().getStringExtra("key1"); Log.d("ContentActivity", title); mToolbar.setTitle(title); } }
[ "ztiany3@gmail.com" ]
ztiany3@gmail.com
04872f10cde825b48cf5b114d0d4840fcf5b111c
2a68b37337f2f91b4deca2f4581b64c0c8750081
/src/main/java/com/bc/app/server/service/impl/PushTemplateServiceImpl.java
10f4c2caab8b4891be4a0ada2c3b179a200110c5
[]
no_license
BooksCup/app-server
fa17c7df330a77e7ef8eae160ae7a4868d67c9fb
3ada8214e574c2909e1aa7b6628e602bec5eea54
refs/heads/master
2023-04-23T13:57:59.831519
2021-05-12T12:32:06
2021-05-12T12:32:06
328,857,644
0
0
null
null
null
null
UTF-8
Java
false
false
801
java
package com.bc.app.server.service.impl; import com.bc.app.server.entity.PushTemplate; import com.bc.app.server.mapper.PushTemplateMapper; import com.bc.app.server.service.PushTemplateService; import org.springframework.stereotype.Service; import javax.annotation.Resource; /** * 推送模板 * * @author zhou */ @Service("pushTemplateService") public class PushTemplateServiceImpl implements PushTemplateService { @Resource PushTemplateMapper pushTemplateMapper; /** * 根据推送类型获取推送模板 * * @param serviceType 推送类型 * @return 推送模板 */ @Override public PushTemplate getPushTemplateMapperByServiceType(String serviceType) { return pushTemplateMapper.getPushTemplateMapperByServiceType(serviceType); } }
[ "812809680@qq.com" ]
812809680@qq.com
e9a50d91baea452f88256e08ba1b7a48b751da60
96f3bada9ec68a98b3b369db726e85f3621345ff
/src/main/java/teh/predv2/Solaris/Constants/Variables.java
a40c3f553981f77ed0228e78f59e7881bed6b4f8
[]
no_license
arc6373/ExamplePlugin
6c80f302b746dc849b5cdd1fe1708770afe41cca
b9710075a6cd7253060800b8b60d2a3784d7b8ee
refs/heads/master
2020-12-22T00:54:59.920952
2020-01-27T23:50:52
2020-01-27T23:50:52
236,621,032
0
0
null
null
null
null
UTF-8
Java
false
false
1,489
java
package teh.predv2.Solaris.Constants; import org.bukkit.NamespacedKey; import org.bukkit.persistence.PersistentDataType; import teh.predv2.Solaris.Main; public class Variables { // Variables used during startup to apply to the user public static Integer STARTING_MAX_MANA = 50; public static Integer STARTING_MAX_HEALTH = 50; // Variables used for persistent data container // Namespace keys for persistent data to prevent misuse errors public static NamespacedKey keyMaxMana = new NamespacedKey(Main.plugin, "MAX_MANA"); public static NamespacedKey keyMana = new NamespacedKey(Main.plugin, "MANA"); public static NamespacedKey keyMaxHealth = new NamespacedKey(Main.plugin, "MAX_HEALTH"); public static NamespacedKey keyHealth = new NamespacedKey(Main.plugin, "HEALTH"); // These abilities will be passed to a manager which will apply and remove abilities @SuppressWarnings("rawtypes") public enum Abilities { MAGIC_DAMAGE("MAGIC_DAMAGE", 10, PersistentDataType.INTEGER), MAGIC_RES("MAGIC_RESISTANCE", 10, PersistentDataType.INTEGER); private String name; private Integer amount; private PersistentDataType type; Abilities(String name, Integer amount, PersistentDataType type) { this.name = name; this.amount = amount; this.type = type; } public String getName() { return this.name; } public Integer getAmount() { return this.amount; } public PersistentDataType getType() { return this.type; } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
de3810c9c37b713c33140a7fef0c6b1eec39f53c
db4be411318a78c25fb96d13aa35763b43751f0d
/HardChair-Backend/src/main/java/fudan/se/lab2/repository/ArticleRepository.java
fb872483eb14b0737ee427bcb985e11e8d6b49dc
[]
no_license
FudanSELab/StarChair
062f4365d77b79dd699e24055ecb8cdef166fab7
3dc8a2dce2cfd882ce5afcd92b612885108f6b54
refs/heads/master
2023-01-01T02:52:23.454229
2020-10-19T02:06:34
2020-10-19T02:06:34
304,575,054
1
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package fudan.se.lab2.repository; import fudan.se.lab2.domain.Article; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import javax.transaction.Transactional; import java.util.List; @Repository public interface ArticleRepository extends CrudRepository<Article, Long> { Article findByFilePath(String filePath); @Query(value = "from Article where contributor = ?1 and meetingId = ?2") List<Article> findByContributorAndMeetingId(String contributor, String meetingId); @Query(value = "from Article where meetingId = ?1") List<Article> findByMeetingId(String meetingId); @Query(value = "from Article where articleName = ?1 and summary = ?2 and contributor = ?3 and meetingId = ?4") Article getArticle(String articleName, String summary, String contributor, String meetingId); @Query(value = "from Article where id = ?1") Article findByArticleId(Long id); @Transactional @Modifying @Query(value = "delete from Article where ID = ?1", nativeQuery = true) void deleteArticle(Long article_id); @Transactional @Modifying @Query(value = "delete from ARTICLE_PC where ARTICLE_ID = ?1", nativeQuery = true) void deleteArticlePc(Long article_id); @Query(value = "SELECT a.* FROM ARTICLE a,ARTICLE_PC p WHERE p.PC_ID = ?1 AND a.ID = p.ARTICLE_ID AND a.MEETING_ID = ?2", nativeQuery = true) List<Article> getAllotedArticle(Long pc_id, String meetingId); }
[ "27091925@qq.com" ]
27091925@qq.com
21881eff007e3e632c60da3642143e7b3d8a68fe
13f937f75987ad2185c51ca4b1cd013d3e647e1e
/DMI/Dynamic Multi-dimension Identification/DMIVerification/src/main/java/com/pay/cloud/util/DimDictEnum.java
434924150620b809d215dfb126344c38d80e53e5
[]
no_license
hwlsniper/DMI
30644374b35b2ed8bb297634311a71d0f1b0eb91
b6ac5f1eac635485bb4db14437aa3444e582be84
refs/heads/master
2020-03-19T16:44:33.828781
2018-05-22T05:38:52
2018-05-22T05:38:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,440
java
package com.pay.cloud.util; /** * 支付平台数据字典 * Created by yacheng.ji on 2016/4/13. */ public enum DimDictEnum { //*************支付平台用户状态 begin***************/ PAY_USER_STAT_NORMAL(1, "正常"), PAY_USER_STAT_DISABLE(2, "已禁用"), PAY_USER_STAT_CANCEL(9, "已注销"), //*************支付平台用户状态 end***************/ //*************平台账户状态 begin***************/ ACCOUNT_STAT_NORMAL(1, "正常"), ACCOUNT_STAT_FREEZE(9, "冻结"), //*************平台账户状态 end***************/ //*************平台账户类型 begin***************/ ACCOUNT_TYPE_PRIVATE(1, "平台私人账户"), ACCOUNT_TYPE_MERCHANT(2, "平台商户账户"), //*************平台账户类型 end***************/ //*************订单交易状态 begin***************/ TD_TRANS_STAT_INIT(100, "初始化"), TD_TRANS_STAT_PROCESSING(101, "进行中"), TD_TRANS_STAT_SUCCESS(110, "成功"), TD_TRANS_STAT_FAILED(120, "失败"), TD_TRANS_STAT_EXCEPTION(130, "异常"), //*************订单交易状态 end***************/ //*************对账状态 begin***************/ CONFIRM_STAT_CHECK_NO_ERROR(600, "核对无误"), CONFIRM_STAT_CHECK_ERROR(610, "核对出错"), CONFIRM_STAT_WAIT_CHECK(619, "待核对"), //*************对账状态 end***************/ //*************收入支出标识 begin***************/ IN_OUT_FLAG_INCOME(1, "收入"), IN_OUT_FLAG_EXPENDITURE(2, "支出"), IN_OUT_FLAG_BANK_CARD_EXPENDITURE(3, "银行卡支出"), IN_OUT_FLAG_BANK_CARD_INCOME(4,"银行卡收入"), //*************收入支出标识 end***************/ //*************订单退款状态 begin***************/ TD_RET_STAT_INIT(1, "初始化"), TD_RET_STAT_APPLY_SUCC(2, "申请成功"), TD_RET_STAT_REFUND_SUCC(6, "退款成功"), TD_RET_STAT_REFUND_FAIL(9, "退款失败"), //*************订单退款状态 end***************/ //*************交易业务类型 begin***************/ TD_TRANS_BUSI_TYPE_JIAOFEI(201, "缴费"), TD_TRANS_BUSI_TYPE_GUAHAO(202, "挂号"), TD_TRANS_BUSI_TYPE_GOUYAO(203, "购药"), //*************交易业务类型 end***************/ //*************交易类型 begin***************/ TD_TRANS_TYPE_PAYMENT(101, "支付"), TD_TRANS_TYPE_TRANSFER(111, "转账"), TD_TRANS_TYPE_CASH(121, "提现"), TD_TRANS_TYPE_REFUND(131, "退款"), TD_TRANS_TYPE_RECHARGE(141, "充值"), //*************交易类型 end***************/ //*************交易操作通道类别 begin***************/ TD_OPER_CHAN_TYPE_ANDROID(11, "Android"), TD_OPER_CHAN_TYPE_IOS(12, "IOS"), TD_OPER_CHAN_TYPE_WECHAT(21, "微信"), TD_OPER_CHAN_TYPE_WEB(31, "WEB"), //*************交易操作通道类别 end***************/ //*************支付账号类别 begin***************/ PAY_ACT_TYPE_DEBIT_CARD(102, "个人借记卡"), PAY_ACT_TYPE_CREDIT_CARD(103, "个人信用卡"), //*************支付账号类别 end***************/ //*************是否有效 begin***************/ VALID_FLAG_VALID(1, "有效"), VALID_FLAG_INVALID(0, "无效"), //*************是否有效 end***************/ //*************证件类型 begin***************/ P_CERT_TYPE_ID_SHENFENZHENG(1, "身份证"), P_CERT_TYPE_ID_JUNGUANZHENG(2, "军官证"), P_CERT_TYPE_ID_HUZHAO(3, "护照"), P_CERT_TYPE_ID_QITA(99, "其他"), //*************证件类型 end***************/ //*************性别 begin***************/ P_GEND_ID_MALE(1, "男"), P_GEND_ID_FEMALE(0, "女"), //*************性别 end***************/ //*************使用支付通道方式 begin***************/ USE_PAY_CHANNEL_TYPE_SHANGYE(1, "商业支付"), USE_PAY_CHANNEL_TYPE_SHEBAO(2, "社保支付"), USE_PAY_CHANNEL_TYPE_HUNHE(3, "混合支付"), //*************使用支付通道方式 end***************/ //*************自费标识 begin***************/ BUY_SELF_YES(0, "自费"), BUY_SELF_NO(1, "非自费"), //*************自费标识 end***************/ //*************交易任务处理状态 begin***************/ TD_PROC_STAT_ID_TREATMENT_PENDING(0, "待处理"), TD_PROC_STAT_ID_TREATMENT_IN(1, "处理中"), TD_PROC_STAT_ID_TREATMENT_SUCCESS(6, "处理成功"), TD_PROC_STAT_ID_TREATMENT_FAILURE(-1, "处理失败"), //*************交易任务处理状态 end*************** //*************收单模式 begin***************/ FUND_MODEL_ID_1(1, "大账户集中收单"), FUND_MODEL_ID_2(2, "多商户直接收单"), FUND_MODEL_ID_3(3, "通道直转子账户(内部户)"), //*************收单模式 end***************/ //*************医疗类别 begin***************/ MEDICAL_CLASS_PUTONGMENZHEN(11, "普通门诊"), MEDICAL_CLASS_YAODIANGOUYAO(14, "药店购药"), MEDICAL_CLASS_MANXINGBING(16, "门诊规定病种(慢性病)"), MEDICAL_CLASS_JIHUASHENGYUSHOUSHU(45, "计划生育手术(门诊)"), //*************医疗类别 end*************** //*************不允许医保结算交互 begin***************/ MEDICAL_SETTLE_INTERACTIVE_UNBIND_SI_CARD(1001, "您还未绑定社保卡,无法进行医保支付,请先绑定本人的社保卡\n\n注:暂不支持城乡居医保用户在线医保支付"), MEDICAL_SETTLE_INTERACTIVE_NOT_THE_SAME_PERSON(1002, "实名认证与绑定社保卡的身份信息不一致,无法进行医保支付,请先绑定本人的社保卡\n\n注:暂不支持城乡居民医保用户在线医保支付"), MEDICAL_SETTLE_INTERACTIVE_MEDICAL_TREATMENT_BLOCK(1003, "您的社保卡可能已封锁或已挂失,无法进行医保支付,请前往当地社保局办事大厅处理"), MEDICAL_SETTLE_INTERACTIVE_MTS_NOT_MATCH(1004, "诊断信息未匹配,无法进行在线医保支付,只能个人自费\n\n注:若需进行医保支付,请携带社保卡到就诊医院的结算窗口办理"), MEDICAL_SETTLE_INTERACTIVE_MI_PERSON_IS_NULL(1005, "您的社保卡只绑定了养老保险,未绑定医保参保身份,不能进行医保支付,只能个人自费\n\n注:城乡居民医保用户目前无法使用本系统绑定医疗保险,功能正在建设中,敬请期待"), MEDICAL_SETTLE_INTERACTIVE_INSURED_PERSONNEL_TYPE(1006, "获取当前参保人员类型异常,将无法进行医保支付,只能个人自费"), MEDICAL_SETTLE_INTERACTIVE_MI_SETTLE_CLOSING_DATE(1007, "每月月底{X}后进行医保结账清算业务,不能进行医保支付,只能个人自费"), MEDICAL_SETTLE_INTERACTIVE_GET_SOCIAL_CARD_INFO_ERROR(1008, "获取社保卡信息失败,暂不能进行医保支付,只能个人自费"), MEDICAL_SETTLE_INTERACTIVE_SOCIAL_CARD_INFO_NOT_EXIST(1009, "您还未申办社保卡,无法进行医保支付,请携带身份证前往当地社保局经办大厅办理"), MEDICAL_SETTLE_INTERACTIVE_SOCIAL_CARD_NOT_ACTIVE(1010, "您的社保卡可能在办理中或未激活,无法进行医保支付,请前往当地社保局申办或激活"), MEDICAL_SETTLE_INTERACTIVE_GET_MI_TREATMENT_BLOCKADE_INFO_ERROR(1011, "获取医疗待遇封锁信息失败,暂不能进行医保支付,只能个人自费"), MEDICAL_SETTLE_INTERACTIVE_MI_PRE_SETTLE_EXCEPTION(1011, "医保分账异常,暂不能进行医保支付,只能个人自费"), MEDICAL_SETTLE_INTERACTIVE_MI_YP_SEX_LIMIT(1011, "因该处方中存在与您性别不符的药品,请联系您的就诊医生解决"), MEDICAL_SETTLE_INTERACTIVE_MI_FYP_SEX_LIMIT(1011, "因该处方中存在与您性别不符的诊疗服务,请联系您的就诊医生解决"), MEDICAL_SETTLE_INTERACTIVE_MI_YP_AGE_LIMIT(1011, "该处方中存在与您年龄不符的药品,请联系您的就诊医生"), MEDICAL_SETTLE_INTERACTIVE_MI_FYP_AGE_LIMIT(1011, "该处方中存在与您年龄不符的诊疗服务,请联系您的就诊医生"), //*************不允许医保结算交互 end*************** //*************短信通道 begin***************/ SMS_CHANNEL_MENGWANG(1, "梦网"), SMS_CHANNEL_MANDAO(2, "漫道"), //*************短信通道 end***************/ //*************实名认证通道 begin***************/ REAL_NAME_FOUR_ELEMENTS_PUHUI(1, "银联四要素验证(普惠)"), REAL_NAME_THREE_ELEMENTS_HUIYUE(2, "实人三要素验证(慧阅)"); //*************实名认证通道 end***************/ private int code; private String name; DimDictEnum(int code, String name){ this.code = code; this.name = name; } public static boolean checkTransBusiType(int code){ return code == TD_TRANS_BUSI_TYPE_JIAOFEI.getCode() || code == TD_TRANS_BUSI_TYPE_GUAHAO.getCode() || code == TD_TRANS_BUSI_TYPE_GOUYAO.getCode(); } public int getCode() { return code; } public String getCodeString() { return String.valueOf(code); } public void setCode(int code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "33211781+thekeygithub@users.noreply.github.com" ]
33211781+thekeygithub@users.noreply.github.com
11fff85da28ca98799c7d340d8cb0fcf12e4e670
b23667e1291436e9d4b87c6ca7b44007db1c36ab
/java/com/hmdzl/spspd/change/items/scrolls/ScrollOfIdentify.java
6cf95aedd9efc9dbb7129294e7eeba747b8002d7
[]
no_license
TriniTDM/SPS-PD
1184c290c61eccbfeb4c64c66312d7681e15a92c
5dc247b0c2c5789aa93af583edb835178896bac6
refs/heads/master
2020-07-18T02:37:55.807787
2019-06-01T03:10:50
2019-06-01T03:10:50
206,155,670
0
0
null
2019-09-03T19:23:37
2019-09-03T19:23:36
null
UTF-8
Java
false
false
2,084
java
/* * Pixel Dungeon * Copyright (C) 2012-2014 Oleg Dolya * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> */ package com.hmdzl.spspd.change.items.scrolls; import com.hmdzl.spspd.change.Assets; import com.hmdzl.spspd.change.Badges; import com.hmdzl.spspd.change.effects.Identification; import com.hmdzl.spspd.change.items.Item; import com.hmdzl.spspd.change.utils.GLog; import com.hmdzl.spspd.change.windows.WndBag; import com.hmdzl.spspd.change.messages.Messages; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Random; import java.util.ArrayList; public class ScrollOfIdentify extends InventoryScroll { { //name = "Scroll of Identify"; //inventoryTitle = "Select an item to identify"; mode = WndBag.Mode.UNIDENTIFED; consumedValue = 10; initials = 1; bones = true; } @Override public void empoweredRead() { ArrayList<Item> unIDed = new ArrayList<>(); for( Item i : curUser.belongings){ if (!i.isIdentified()){ unIDed.add(i); } } if (unIDed.size() > 1) { Random.element(unIDed).identify(); Sample.INSTANCE.play( Assets.SND_TELEPORT ); } doRead(); } @Override protected void onItemSelected(Item item) { curUser.sprite.parent.add(new Identification(curUser.sprite.center() .offset(0, -16))); item.identify(); GLog.i(Messages.get(this, "it_is", item)); Badges.validateItemLevelAquired(item); } @Override public int price() { return isKnown() ? 30 * quantity : super.price(); } }
[ "295754791@qq.com" ]
295754791@qq.com
36a2fdecc8cdd4942b100f4bae01071e4b665fb6
470638d559d0e626ea6cff28462e8d0ec97f11f3
/jsp-servlet/代码/websession/src/com/zyw/listener/DemoListener.java
7cd4ad816c5809c93788318a99298ed124e97c4a
[]
no_license
LiShuxue/BackEnd-Base
40069d6cc88501f170a0b30969b8bb978e453d31
5ab9d1e16b9924fe252933342fdb8c57f86631cd
refs/heads/master
2023-08-31T02:12:27.381616
2023-08-30T02:11:02
2023-08-30T02:11:02
93,992,632
0
0
null
2022-07-13T18:28:38
2017-06-11T08:49:05
HTML
GB18030
Java
false
false
764
java
package com.zyw.listener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; /** * * HttpSessionListener 接口,监听会话的创建和销毁 * 当创建会话时 默认调用 sessionCreated() * 当销毁会话时 默认调用 sessionDestroyed() */ public class DemoListener implements HttpSessionListener { /** * 创建新session对象时执行 */ public void sessionCreated(HttpSessionEvent e) { //getServletContext() 得到application //每一个用户的访问都会创建一个新的session System.out.println("listener---create"); } /** * invalidate销毁session时执行 */ public void sessionDestroyed(HttpSessionEvent arg0) { System.out.println("listener---destroy"); } }
[ "1149926505@qq.com" ]
1149926505@qq.com
03545dccec791b095af2ab14a2066474b012a604
cea3fe1ae551bf2f81b431876d15563d6347119b
/case 4.3.1 Shiro Demo/shiro-oauth/src/main/java/com/myshiro/shirooauth/common/WrapperResponse.java
520ae8bf4e04549ddb1f700555e892458a341ea5
[]
no_license
black-ant/case
2e33cbd74b559924d3a53092a8b070edea4d143d
589598bb41398b330bc29b2ca61757296b55b579
refs/heads/master
2023-07-31T23:22:51.168312
2022-07-24T06:15:53
2022-07-24T06:15:53
137,761,384
86
26
null
2023-07-17T01:03:21
2018-06-18T14:22:01
Java
UTF-8
Java
false
false
1,068
java
package com.myshiro.shirooauth.common; /** * @author 10169 * @Description TODO * @Date 2019/2/22 22:48 * @Version 1.0 **/ public class WrapperResponse { private WrapperResponse() { } public static <E> Wrapper<E> wrap(int code, String message, E o) { return new Wrapper<>(code, message, o); } public static <E> Wrapper<E> wrap(int code, String message) { return wrap(code, message, null); } public static <E> Wrapper<E> wrap(int code) { return wrap(code, null); } public static <E> Wrapper<E> wrap(Exception e) { return new Wrapper<>(Wrapper.ERROR_CODE, e.getMessage()); } public static <E> E unWrap(Wrapper<E> wrapper) { return wrapper.getResult(); } public static <E> Wrapper<E> illegalArgument() { return wrap(Wrapper.ILLEGAL_CODE, Wrapper.ILLEGAL_MESSAGE); } public static <E> Wrapper<E> ok() { return new Wrapper<>(); } public static <E> Wrapper<E> success(E o) { return new Wrapper<>(200,"操作成功",o); } }
[ "1016930479@qq.com" ]
1016930479@qq.com
4e409755d3aaad7d3acac2c9850ef39780dcfb9d
f5d5b368c1ae220b59cfb26bc26526b494c54d0e
/LocationAlarm/src/edu/uj/pmd/locationalarm/database/DatabaseHandler.java
c43879dcd0dfdc2eaa6d445576536e2eb46873ba
[]
no_license
kishordgupta/2012_bkup
3778c26082697b1cf223e27822d8efe90b35fc76
53ef4014fb3e11158c3f9242cb1f829e02e3ef69
refs/heads/master
2021-01-10T08:25:57.122415
2020-10-16T12:06:52
2020-10-16T12:06:52
47,512,520
0
0
null
null
null
null
UTF-8
Java
false
false
4,142
java
package edu.uj.pmd.locationalarm.database; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import java.util.ArrayList; import java.util.List; /** * User: piotrplaneta * Date: 29.12.2012 * Time: 16:10 */ public class DatabaseHandler extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 1; private static final String DATABASE_NAME = "locationAlarmFavorites"; private static final String TABLE_FAVORITES = "favoriteDestinations"; private static final String KEY_ID = "id"; private static final String KEY_NAME = "name"; private static final String KEY_LONGITUDE = "longitude"; private static final String KEY_LATITUDE = "latitude"; public DatabaseHandler(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_FAVORITES + "(" + KEY_ID + " INTEGER PRIMARY KEY,"+ KEY_NAME + " TEXT," + KEY_LONGITUDE + " REAL," + KEY_LATITUDE + " REAL" + ")"; db.execSQL(CREATE_CONTACTS_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITES); onCreate(db); } public void addFavoriteDestination(Destination destination) { SQLiteDatabase database = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_NAME, destination.getName()); values.put(KEY_LONGITUDE, destination.getLongitude()); values.put(KEY_LATITUDE, destination.getLatitude()); database.insert(TABLE_FAVORITES, null, values); database.close(); } public Destination getFavoriteDestination(int id) { SQLiteDatabase database = this.getReadableDatabase(); Cursor cursor = database.query(TABLE_FAVORITES, new String[] { KEY_ID, KEY_NAME, KEY_LONGITUDE, KEY_LATITUDE }, KEY_ID + "=?", new String[] { String.valueOf(id) }, null, null, null, null); if (cursor != null) cursor.moveToFirst(); Destination destination = new Destination(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getDouble(2), cursor.getDouble(3)); cursor.close(); database.close(); return destination; } public List<Destination> getAllFavoriteDestinations() { List<Destination> favoriteDestinationsList = new ArrayList<Destination>(); String selectQuery = "SELECT * FROM " + TABLE_FAVORITES; SQLiteDatabase database = this.getWritableDatabase(); Cursor cursor = database.rawQuery(selectQuery, null); if (cursor.moveToFirst()) { do { Destination destination = new Destination(); destination.setId(Integer.parseInt(cursor.getString(0))); destination.setName(cursor.getString(1)); destination.setLongitude(cursor.getDouble(2)); destination.setLatitude(cursor.getDouble(3)); favoriteDestinationsList.add(destination); } while (cursor.moveToNext()); } cursor.close(); database.close(); return favoriteDestinationsList; } public int getFavoriteDestinationsCount() { String countQuery = "SELECT * FROM " + TABLE_FAVORITES; SQLiteDatabase database = this.getReadableDatabase(); Cursor cursor = database.rawQuery(countQuery, null); int count = cursor.getCount(); cursor.close(); database.close(); return count; } public void deleteFavoriteDestination(Destination destination) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_FAVORITES, KEY_ID + " = ?", new String[] { String.valueOf(destination.getId()) }); db.close(); } }
[ "kdgupta87@gmail.com" ]
kdgupta87@gmail.com
4a1b8e511141113e557ba308e45fa21a6c722f1e
3c3c7956e203e50c72b25491943ff3b43ef86a01
/android/app/src/main/java/com/withered_thunder_27282/MainActivity.java
db045acd259f03ac15482cac163504b5d4ed5c8e
[]
no_license
crowdbotics-apps/withered-thunder-27282
8fb210df523f3ac657143d19ea9794f5e2514241
35dfb4b1fe17bda75bfdfdbae2f047a811933078
refs/heads/master
2023-05-05T21:24:53.447931
2021-05-23T17:29:06
2021-05-23T17:29:06
370,115,273
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package com.withered_thunder_27282; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. This is used to schedule * rendering of the component. */ @Override protected String getMainComponentName() { return "withered_thunder_27282"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
8beb93c23c6bb0a5152650e608fa6f40f031d676
cb8d3696c404f489a92d98c820ffe1b67678f669
/Aop/proxyfactorybean-demo/src/main/java/com/zwd/example/proxyfactorybean/demo/service/UserServiceImpl.java
a0bebe557c669f57d7d0da7a5bb1551547126dc0
[]
no_license
chenglinjava68/spring-examples
3dabae67d0523e43e7985c4cdc2eefba475e6c86
f39abb830751db310da1fe160bc73ef1f44569d8
refs/heads/master
2020-04-14T15:53:19.953747
2018-12-18T01:02:11
2018-12-18T01:02:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.zwd.example.proxyfactorybean.demo.service; import org.springframework.beans.factory.*; import org.springframework.context.ApplicationContextAware; /** * @author zwd * @date 2018/10/10 10:09 * @Email stephen.zwd@gmail.com */ public class UserServiceImpl implements UserService{ public void getUserid(String userId) { System.out.println("执行getUserid"); } }
[ "810095178@qq.com" ]
810095178@qq.com
89909710c061a6cc2631afb73feb230181296533
411e9b935c3138660ff8fe91efb57aac922ecc90
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/AnimalSpeciesEnumFactory.java
33f735552559a27067852a40755102432454f957
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
pobedite/hapi-fhir
6591f9004f4bd6b59491026d4db6440e20223072
223df60c1d0ad5683b62a801bebf3b3a793e5335
refs/heads/master
2020-06-09T12:59:04.666298
2016-12-08T15:50:42
2016-12-08T15:50:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,670
java
package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Sat, Nov 5, 2016 08:41-0400 for FHIR v1.7.0 import org.hl7.fhir.dstu3.model.EnumFactory; public class AnimalSpeciesEnumFactory implements EnumFactory<AnimalSpecies> { public AnimalSpecies fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("canislf".equals(codeString)) return AnimalSpecies.CANISLF; if ("ovisa".equals(codeString)) return AnimalSpecies.OVISA; if ("serinuscd".equals(codeString)) return AnimalSpecies.SERINUSCD; throw new IllegalArgumentException("Unknown AnimalSpecies code '"+codeString+"'"); } public String toCode(AnimalSpecies code) { if (code == AnimalSpecies.CANISLF) return "canislf"; if (code == AnimalSpecies.OVISA) return "ovisa"; if (code == AnimalSpecies.SERINUSCD) return "serinuscd"; return "?"; } public String toSystem(AnimalSpecies code) { return code.getSystem(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
218ec00a967b2fc24afb9698f5f81442d629dcbe
7d263d491491bd34df2053de62fad1b46e9ad695
/cli/src/main/java/com/apicatalog/alps/cli/Utils.java
226763aa7f1e4970b34da3b06da39fe7b7fa1494
[ "Apache-2.0" ]
permissive
mamund/alps-cli
333d79bbed6a7fe1877f30ebaa4a857f1f1523bb
710870ca9dda938d755c79ee1e388dcfc377db67
refs/heads/master
2023-01-23T05:59:54.934831
2020-12-06T09:06:18
2020-12-06T09:06:18
318,905,234
0
0
null
2020-12-05T22:50:35
2020-12-05T22:50:34
null
UTF-8
Java
false
false
2,207
java
/* * Copyright 2020 the original author or authors. * * 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.apicatalog.alps.cli; import java.io.File; import com.apicatalog.alps.io.DocumentParser; import com.apicatalog.alps.json.JsonDocumentParser; import com.apicatalog.alps.oas.OpenApiReader; import com.apicatalog.alps.xml.XmlDocumentParser; final class Utils { private Utils() { } static final String detectMediaType(File file) { if (file.getName() != null) { if (file.getName().toLowerCase().endsWith(".xml") || file.getName().toLowerCase().endsWith("+xml")) { return Constants.MEDIA_TYPE_ALPS_XML; } if (file.getName().toLowerCase().endsWith(".json") || file.getName().toLowerCase().endsWith("+json")) { return Constants.MEDIA_TYPE_ALPS_JSON; } if (file.getName().toLowerCase().endsWith(".yaml") || file.getName().toLowerCase().endsWith(".yml") || file.getName().toLowerCase().endsWith("+yaml")) { return Constants.MEDIA_TYPE_ALPS_YAML; } } return null; } static final DocumentParser getParser(final String mediaType) { if (Constants.MEDIA_TYPE_ALPS_JSON.equals(mediaType)) { return new JsonDocumentParser(); } if (Constants.MEDIA_TYPE_ALPS_XML.equals(mediaType)) { return new XmlDocumentParser(); } if (Constants.MEDIA_TYPE_OPEN_API.equals(mediaType)) { return new OpenApiReader(); } throw new IllegalArgumentException("Unsupported source media type [" + mediaType + "]."); } }
[ "filip26@gmail.com" ]
filip26@gmail.com
7a06951cc03706f47ab1d02d3dae6b02171da429
3bfd6b1699515874bbe53eaa6f29bb29f2b2e8d4
/matrix/Test.java
c06c678bf79f7be52583f1fa1587a865d1a7febb
[]
no_license
yeziyu-Y/JavaHomework
940eb250e8e1620d818b23da234e18e581bf5dc7
7a9be352c9848d5484e3414f140af22a9d91113b
refs/heads/master
2021-02-08T12:32:06.632735
2020-04-30T15:15:20
2020-04-30T15:15:20
244,151,883
3
0
null
null
null
null
UTF-8
Java
false
false
3,380
java
package matrix; import java.util.Arrays; import java.util.Date; public class Test { public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub int nRow = 128; int nCol = 128; MatrixGenerator mg1 = new MatrixGenerator(nRow, 5, 10); mg1.printMatrix(); MatrixGenerator mg2 = new MatrixGenerator(5, nCol, 10); mg2.printMatrix(); MultiThreadMatrixCompute m1 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute m2 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute m3 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute m4 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute m5 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute m6 = new MultiThreadMatrixCompute(mg1, mg2); MultiThreadMatrixCompute.setThreadNum(2); Date start1 = new Date(); m1.start(); m2.start(); m1.join(); m2.join(); Date end1 = new Date(); MultiThreadMatrixCompute.setThreadNum(4); Date start2 = new Date(); m5.start(); m6.start(); m3.start(); m4.start(); m5.join(); m6.join(); m3.join(); m4.join(); Date end2 = new Date(); double[][] res = m1.getRes(); // print2DArray(mg1.row, mg2.col, res); long count1 = end1.getTime() - start1.getTime(); long count2 = end2.getTime() - start2.getTime(); double[][] sgRes = sgCompute(nRow, nCol, mg1.getM(), mg2.getM()); System.out.println("[2 threads finished in " + count1 + " ms]" ); System.out.println("[4 threads finished in " + count2 + " ms]" ); System.out.println("====== Result " + nRow + "*" + nCol + " Matrix ======"); if (deepEquals(sgRes, res)) System.out.println("Results are the same"); else System.out.println("Results NOT the same"); } public static void print2DArray(int row, int col, double[][] m){ for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) System.out.printf("%6.2f ", m[i][j]); System.out.println(); } System.out.println(); } public static double[][] sgCompute(int resRow, int resCol, double[][] mat1, double[][] mat2){ double[][] res = new double[resRow][resCol]; Date start = new Date(); for (int i = 0; i < resRow; i++) { for (int j = 0; j < resCol; j++) res[i][j] = compute(i, j, mat1, mat2); } Date end = new Date(); long count = end.getTime() - start.getTime(); System.out.println("[sgCompute finished in " + count + " ms]" ); return res; } private static double compute(int res_row, int res_col, double[][] mat1, double[][] mat2){ double res = 0; for (int i = 0; i < 5; i++) res += mat1[res_row][i] * mat2[i][res_col]; return res; } public static boolean deepEquals (double[][] a, double[][] b) { if (a.length != b.length) return false; else { for (int i = 0; i < a.length; i++) if (a[i].length != b.length) return false; else if (!Arrays.equals(a[i], b[i])) return false; } return true; } }
[ "you@example.com" ]
you@example.com
37a22aae46a6d15833a23165e26fd65178353e14
6ee1a808ade224cb8bab48d53fb629910270f422
/week1-cassandra/loader/src/main/java/loader/TweetsSupplier.java
1a6f7f5a1146373accb946cbf34050c0dd52f07a
[]
no_license
Dmitry404/bdata-course
861abeb5a74b168d7529f3f70f7327a11d66618b
ebba6dbad120c8dcf1db6d8b52436e0db45704c4
refs/heads/master
2020-04-16T01:44:31.120756
2017-06-16T11:47:16
2017-06-16T11:47:16
83,243,381
1
0
null
null
null
null
UTF-8
Java
false
false
2,626
java
package loader; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; public class TweetsSupplier { private BufferedReader bufferedReader = null; public TweetsSupplier(InputStream inputStream) { try { Reader reader = new InputStreamReader(inputStream, "UTF-8"); bufferedReader = new BufferedReader(reader); skipHeader(); } catch (IOException e) { drawnSupplier(); } } private void drawnSupplier() { if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e) { throw new RuntimeException(e); } } bufferedReader = null; } private boolean isDrown() { return bufferedReader == null; } public boolean hasMoreTweets() { return !isDrown(); } private String skipHeader() throws IOException { return bufferedReader.readLine(); } public Tweet getTweet() { if (isDrown()) { return null; } try { while(true) { String line = bufferedReader.readLine(); if (line == null) { drawnSupplier(); return null; } Tweet tweet = new Tweet(line); if (!tweet.isValid) { continue; } return tweet; } } catch (IOException e) { throw new RuntimeException(e); } } public static class Tweet { public final String id; public final String hashTag; public final String user; public final String message; public final String createdAt; public final String latitude; public final String longitude; private final boolean isValid; public Tweet(String line) { String[] strings = line.split(","); isValid = !(strings.length <= 2); id = strings.length > 0 ? strings[0] : ""; hashTag = strings.length > 1 ? strings[1] : ""; user = strings.length > 2 ? strings[2] : ""; message = strings.length > 3 ? strings[3] : ""; createdAt = strings.length > 4 ? strings[4] : ""; latitude = strings.length > 5 ? strings[5] : ""; longitude = strings.length > 6 ? strings[6] : ""; } @Override public String toString() { return "Tweet{" + "isValid=" + isValid + ", id='" + id + '\'' + ", hashTag='" + hashTag + '\'' + ", user='" + user + '\'' + ", message='" + message + '\'' + ", createdAt='" + createdAt + '\'' + ", latitude='" + latitude + '\'' + ", longitude='" + longitude + '\'' + '}'; } } }
[ "dmitry404@gmail.com" ]
dmitry404@gmail.com
60b95617c07506e7e07c71811bd09bfb7894ffed
e506171a9f6ba23692a200dac6c1782aac6fc96b
/src/main/java/leetcode/_951__1000/_991/Demo01.java
e168e62d1135dd52f2ae7acf06db2664d754dee8
[]
no_license
minatoyukina/java-note
03bfd337c9b871103553dc4c230ae68a98552e83
9cd34686651945df748144a9fd6d7917e2be097f
refs/heads/master
2023-08-18T03:18:26.235678
2023-08-15T06:02:21
2023-08-15T06:02:21
174,096,999
0
0
null
2023-06-14T22:29:27
2019-03-06T07:45:47
Java
UTF-8
Java
false
false
131
java
package leetcode._951__1000._991; import org.junit.Test; public class Demo01 { @Test public void test() { } }
[ "1096445518@qq.com" ]
1096445518@qq.com
d953a460817d582067762be8286cb657558d8955
c6f3fbce0b7304c672fc99a94fe43b418eae9e6c
/src/main/java/com/junyou/bus/fuben/service/PataConfigService.java
f4d75ef187162d868275f0c8b65f014c7b98b03f
[]
no_license
hw233/cq_game-java
a6f1fa6526062c10a9ea322cc832b4c42e6b8f9a
c2384b58efa73472752742a93bf36ef02d65fe48
refs/heads/master
2020-04-27T11:24:29.835913
2018-06-03T14:03:36
2018-06-03T14:03:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,802
java
package com.junyou.bus.fuben.service; import java.util.HashMap; import java.util.Map; import org.springframework.stereotype.Service; import com.junyou.bus.fuben.entity.PataConfig; import com.junyou.configure.parser.impl.AbsClasspathConfigureParser; import com.junyou.gameconfig.utils.GameConfigUtil; import com.junyou.utils.common.CovertObjectUtil; /** * 爬塔配置解析 * @author LiuYu * 2015-6-11 上午11:50:38 */ @Service public class PataConfigService extends AbsClasspathConfigureParser { private final String configureName = "PaTa.jat"; private Map<Integer,PataConfig> configs; @Override protected void configureDataResolve(byte[] data) { Object[] dataList = GameConfigUtil.getResource(data); Map<Integer,PataConfig> configs = new HashMap<>(); for (Object obj : dataList) { Map<String, Object> tmp = (Map<String, Object>)obj; if (null != tmp) { PataConfig config = createPataConfig(tmp); configs.put(config.getId(), config); } } this.configs = configs; } private PataConfig createPataConfig(Map<String, Object> tmp){ PataConfig config = new PataConfig(); config.setId(CovertObjectUtil.object2int(tmp.get("id"))); config.setExp(CovertObjectUtil.obj2long(tmp.get("jiangexp"))); config.setZq(CovertObjectUtil.obj2long(tmp.get("jiangzhen"))); config.setMoney(CovertObjectUtil.object2int(tmp.get("jiangmoney"))); config.setTime(CovertObjectUtil.object2int(tmp.get("time"))); // config.setFuhuo(true); String monster = CovertObjectUtil.object2String(tmp.get("bossid")); Map<String,Integer> map = new HashMap<>(); map.put(monster, 1); config.setWantedMap(map); return config; } @Override protected String getConfigureName() { return configureName; } public PataConfig loadById(Integer id){ return configs.get(id); } }
[ "18221610336@163.com" ]
18221610336@163.com
d30860c44086a05081876ed18a9258bb18f1602f
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/discover/api/DiscoverApiNew.java
86c72d4ad3a0944dffaa6f7d43c6d4e008e5bf20
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,291
java
package com.p280ss.android.ugc.aweme.discover.api; import com.p280ss.android.ugc.aweme.discover.api.p1174a.C26569b; import com.p280ss.android.ugc.aweme.discover.model.BannerList; import com.p280ss.android.ugc.aweme.discover.model.CategoryList; import kotlin.jvm.internal.C7573i; import p346io.reactivex.C7492s; import retrofit2.p363b.C7730f; import retrofit2.p363b.C7744t; /* renamed from: com.ss.android.ugc.aweme.discover.api.DiscoverApiNew */ public interface DiscoverApiNew { /* renamed from: a */ public static final C26557a f70056a = C26557a.f70057a; /* renamed from: com.ss.android.ugc.aweme.discover.api.DiscoverApiNew$a */ public static final class C26557a { /* renamed from: a */ static final /* synthetic */ C26557a f70057a = new C26557a(); /* renamed from: b */ private static final DiscoverApiNew f70058b; private C26557a() { } /* renamed from: a */ public static DiscoverApiNew m87298a() { return f70058b; } static { Object create = C26569b.f70091a.create(DiscoverApiNew.class); C7573i.m23582a(create, "RetrofitProvider.COMMON_…scoverApiNew::class.java)"); f70058b = (DiscoverApiNew) create; } } @C7730f(mo20420a = "/aweme/v1/find/") C7492s<BannerList> getBannerList(@C7744t(mo20436a = "banner_tab_type") Integer num, @C7744t(mo20436a = "ad_personality_mode") Integer num2, @C7744t(mo20436a = "mac_address") String str); @C7730f(mo20420a = "/aweme/v1/category/list/") C7492s<CategoryList> getCategoryList(@C7744t(mo20436a = "cursor") int i, @C7744t(mo20436a = "count") int i2, @C7744t(mo20436a = "ad_personality_mode") Integer num); @C7730f(mo20420a = "/aweme/v2/category/list/") C7492s<CategoryList> getCategoryV2List(@C7744t(mo20436a = "cursor") int i, @C7744t(mo20436a = "count") int i2, @C7744t(mo20436a = "is_complete") Integer num, @C7744t(mo20436a = "ad_personality_mode") Integer num2); @C7730f(mo20420a = "/aweme/v1/category/fascinating/list/") C7492s<CategoryList> getFindFascinatingList(@C7744t(mo20436a = "cursor") int i, @C7744t(mo20436a = "count") int i2, @C7744t(mo20436a = "ad_personality_mode") Integer num, @C7744t(mo20436a = "mac_address") String str); }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
23d6588b029d2d667e38326504e8aa0677d84e05
3a73668217274f8b8cb0f0aadbd5fb74249487cd
/src/main/java/net/mindengine/dashserver/controllers/DashboardController.java
2dd488cda79c036f3b22083acbd5aa70de1bff41
[ "Apache-2.0" ]
permissive
ishubin/dash-server
4bb4650efc2be38ac6c76e2b7df779f7de1b2852
c73778bae70d5b0e4ace9107ef09a35ad85d172a
refs/heads/master
2020-09-12T20:37:45.360110
2016-12-10T09:22:43
2016-12-10T09:22:43
73,516,289
0
0
null
null
null
null
UTF-8
Java
false
false
1,807
java
/******************************************************************************* * Copyright 2016 Ivan Shubin https://github.com/ishubin/dash-server * * 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 net.mindengine.dashserver.controllers; import com.github.jknack.handlebars.Handlebars; import net.mindengine.dashserver.compiler.AssetProvider; import static java.util.stream.Collectors.toList; public class DashboardController extends Controller { private final AssetProvider assetProvider; public DashboardController(AssetProvider assetProvider) { this.assetProvider = assetProvider; init(); } private void init() { getHsTpl("/dashboards/:dashboardName", "dashboard", (req, model) -> { String profile = req.queryParams("profile"); if (profile == null) { profile = "default"; } model.put("dashboardProfile", profile); model.put("dashboardName", req.params("dashboardName")); model.put("widgetAssets", assetProvider.getAssets().stream() .map(wa -> new Handlebars.SafeString(wa.getAsset())) .collect(toList()) ); }); } }
[ "ivan.ishubin@gmail.com" ]
ivan.ishubin@gmail.com
867660f9b1e7d7bc5379431e650e2dd2f5c3e52c
9fde32c83336a7b8066087afd6f753521d1f7cf3
/JDK1.8Examples/src/exp/tables/dynamic/OrderHistoryDisplay.java
c49525d150961cd84638b41732f1c13341538414
[]
no_license
ruivale/Java
6443c9be67044ac82f366d24a8a1175881edc26a
cbe659deda1e933c4b1db469ac08168bc08ff201
refs/heads/master
2023-04-10T21:35:41.071469
2023-03-28T15:43:35
2023-03-28T15:43:35
68,197,319
0
0
null
null
null
null
UTF-8
Java
false
false
3,987
java
package exp.tables.dynamic; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; /** * <p> * Title: * </p> * * <p> * Description: * </p> * * <p> * Copyright: Copyright (c) * </p> * * <p> * Company: * </p> * * @author unascribed * @version 1.0 */ public class OrderHistoryDisplay extends JPanel { //~ Instance fields ---------------------------------------------------------- private JLabel lblHistory; private JScrollPane scrlHistory; private JTable tblHistory; //~ Constructors ------------------------------------------------------------- /** * Creates a new OrderHistoryDisplay object. */ public OrderHistoryDisplay () { HistoryTableModel hstModel = new HistoryTableModel(); setLayout(new BorderLayout()); tblHistory = new JTable(hstModel); tblHistory.setPreferredScrollableViewportSize(new Dimension( 500, 70)); TableColumn column = null; for(int i = 0; i < 3; i++) { column = tblHistory.getColumnModel() .getColumn(i); if(i == 2) { column.setPreferredWidth(30); } else { column.setPreferredWidth(5); } } scrlHistory = new JScrollPane(tblHistory); lblHistory = new JLabel("Order Update History"); add( lblHistory, BorderLayout.NORTH); add( scrlHistory, BorderLayout.SOUTH); } //~ Methods ------------------------------------------------------------------ /** * DOCUMENT ME! * * @param inHistory DOCUMENT ME! */ /* public void showHistory (OrderHistory[] inHistory) { HistoryTableModel hstModel = new HistoryTableModel(inHistory); tblHistory.setModel(hstModel); } */ //~ Inner Classes ------------------------------------------------------------ private class HistoryTableModel extends AbstractTableModel { //~ Instance fields -------------------------------------------------------- final int TABLE_LENGTH = 8; private String[] columnNames = { "Date", "Status", "Comments" }; private Object[][] datHistTable; //~ Constructors ----------------------------------------------------------- //Constructor for an empty table public HistoryTableModel () { datHistTable = new Object[TABLE_LENGTH][columnNames.length]; for(int i = 0; i < columnNames.length; i++) { for(int j = 0; j < TABLE_LENGTH; j++) { //datHistTable[j] = ""; } } } //Constructor for a table with entries /* public HistoryTableModel (OrderHistory[] inHistory) { datHistTable = null; datHistTable = new Object[inHistory.length][columnNames.length]; for(int row = 0; row < inHistory.length; row++) { datHistTable[row][0] = inHistory[row].getDateUpdated(); datHistTable[row][1] = inHistory[row].getStatus(); datHistTable[row][2] = inHistory[row].getComments(); } } */ //~ Methods ---------------------------------------------------------------- public int getColumnCount () { return columnNames.length; } public String getColumnName (int inCol) { return columnNames[inCol]; } public int getRowCount () { return datHistTable.length; } public void setValueAt ( Object inObject, int row, int col) { datHistTable[row][col] = inObject; fireTableCellUpdated( row, col); } public Object getValueAt ( int inRow, int inCol) { return datHistTable[inRow][inCol]; } } public static void main(String a[]){ JFrame f = new JFrame(); f.setTitle("-----------"); f.getContentPane() .setLayout(new BorderLayout()); f.getContentPane() .add(new OrderHistoryDisplay(), BorderLayout.CENTER); f.setBounds(100, 100, 200, 70); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); } }
[ "ruivale@gmail.com" ]
ruivale@gmail.com
1b1ffafe1c1e1acd15f1ba459ae86b0444a402e1
d9508daf0462a4069e8aead781296019e87b2bf1
/org.afplib/src/main/java/org/afplib/afplib/TRN.java
45f8f30950fb2e98f098dc3a1787b80de76f7a02
[ "Apache-2.0" ]
permissive
nikfield/afplib
a77ef7fa2052d91f9adcd226637954d132f538ad
81fa0421ab85f57ea54bb4cd7332bbf34438c39a
refs/heads/master
2021-01-21T19:40:34.768094
2016-01-26T11:55:37
2016-01-26T11:55:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,201
java
/** */ package org.afplib.afplib; import org.afplib.base.Triplet; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>TRN</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.afplib.afplib.TRN#getTRNDATA <em>TRNDATA</em>}</li> * </ul> * </p> * * @see org.afplib.afplib.AfplibPackage#getTRN() * @model * @generated */ public interface TRN extends Triplet { /** * Returns the value of the '<em><b>TRNDATA</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>mandatory<br>variable length</p> * <!-- end-model-doc --> * @return the value of the '<em>TRNDATA</em>' attribute. * @see #setTRNDATA(byte[]) * @see org.afplib.afplib.AfplibPackage#getTRN_TRNDATA() * @model required="true" * @generated */ byte[] getTRNDATA(); /** * Sets the value of the '{@link org.afplib.afplib.TRN#getTRNDATA <em>TRNDATA</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>TRNDATA</em>' attribute. * @see #getTRNDATA() * @generated */ void setTRNDATA(byte[] value); } // TRN
[ "yan@hcsystems.de" ]
yan@hcsystems.de
5ace053d87c07fbf8a06cb717bfb02a080ba7429
67803251fd48047ebb3aa77513a01e7d9cf3ba5f
/mama-buy-trade-service/src/main/java/com/njupt/swg/mamabuytradeservice/common/exception/MamaBuyException.java
acc721b4fb24b341b00683f26bdfa9fbda270c7f
[]
no_license
hai0378/mama-buy
8fdd57fad1925cb4e0a1a636f8151f75c5c2933f
2967898a1808fc9065cfd53a6b0d1ebbebe3a7f0
refs/heads/master
2020-04-14T17:26:53.175233
2018-12-30T08:48:00
2018-12-30T08:48:00
163,980,685
1
0
null
2019-01-03T14:05:01
2019-01-03T14:05:00
null
UTF-8
Java
false
false
604
java
package com.njupt.swg.mamabuytradeservice.common.exception; import com.njupt.swg.mamabuytradeservice.common.constants.Constants; /** * Created by JackWang<coder520.com> * * @Date 18:52 2018/1/16 */ public class MamaBuyException extends RuntimeException{ private int statusCode = Constants.RESP_STATUS_INTERNAL_ERROR; public MamaBuyException(int statusCode,String message) { super(message); this.statusCode = statusCode; } public MamaBuyException(String message) { super(message); } public int getStatusCode() { return statusCode; } }
[ "317758022@qq.com" ]
317758022@qq.com
832c94a8b8c63a2fdaf7faa845cb79b43207d190
cc95a4130d62d18d3764c749cb54fd659084b643
/src/com/star/logging/frame/LoggingManager.java
aa1c66c98ecf86903b10ddeada3d3addae4e76ed
[]
no_license
zwq303/star-framework
ad499f91dd0667201aee4302f4c2d3d70b719274
ceab6e5e8924791a1a37b2fad247b800d7470ea0
refs/heads/master
2021-01-21T00:59:33.565492
2013-04-09T11:12:02
2013-04-09T11:12:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,944
java
package com.star.logging.frame; /** * 设计说明: * 1、根据配置的log4j.properties(必须打在jar包中或者放在bin目录下方可生效)打印日志; * 2、可直接记录Throwable、string,String记录分为info和error; * 3、该日志记录建议只用作框架运行信息记录,而不要直接应用于系统测试运行。 * * @author 测试仔刘毅 **/ import java.util.Properties; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; public class LoggingManager { private String className; private Properties property = new Properties(); private Logger logger = null; /** * construct with set class name parameter. * * @param clsName the name of your runtime class to be logged * @throws RuntimeException **/ public LoggingManager(String clsName) { this.className = clsName; } /** * record error info. * * @param t Throwable:Exceptions and Errors * @param userText user defined message to record * @throws RuntimeException **/ public void error(Throwable t, String userText) { try { property.load(this.getClass().getResourceAsStream("/log4j.properties")); PropertyConfigurator.configure(property); logger = Logger.getLogger("message"); logger.info("#################################################################"); logger.error(className + ":" + userText, t); logger.info("#################################################################\n"); } catch (Exception ie) { throw new RuntimeException("can not load log4j.properties:" + ie.getMessage()); } } /** * orverride the error method with default user text null. * * @param t Throwable:Exceptions and Errors **/ public void error(Throwable t) { error(t, null); } /** * orverride the error method. * * @param text user defined message to record * @throws RuntimeException **/ public void error(String text) { try { property.load(this.getClass().getResourceAsStream("/log4j.properties")); PropertyConfigurator.configure(property); logger = Logger.getLogger("message"); logger.info("#################################################################"); logger.info(className + ": "); logger.error(text); logger.info("#################################################################\n"); } catch (Exception ie) { throw new RuntimeException("can not load log4j.properties:" + ie.getMessage()); } } /** * record user defined info message. * * @param text user defined message to record * @throws RuntimeException **/ public void info(String text) { try { property.load(this.getClass().getResourceAsStream("/log4j.properties")); PropertyConfigurator.configure(property); logger = Logger.getLogger("message"); logger.info(className + ": " + text + "\n"); } catch (Exception ie) { throw new RuntimeException("can not load log4j.properties:" + ie.getMessage()); } } }
[ "yijiubasi@163.com" ]
yijiubasi@163.com
0bc218f7318a80f0fd9886c1c5b2fb2566dcadd3
ce52038047763d5932b3a373e947e151e6f3d168
/src/JTLMM.resource.JTLMM/src-gen/JTLMM/resource/JTLMM/mopp/JTLMMBuilderAdapter.java
66763542b1abd49e878f04d422d12617f366fb80
[]
no_license
rominaeramo/JTLframework
f6d506d117ab6c1f8c0dc83a72f8f00eb31c862b
5371071f63d8f951f532eed7225fb37656404cae
refs/heads/master
2021-01-21T13:25:24.999553
2016-05-12T15:32:27
2016-05-12T15:32:27
47,969,148
1
0
null
null
null
null
UTF-8
Java
false
false
4,963
java
/** * <copyright> * </copyright> * * */ package JTLMM.resource.JTLMM.mopp; public class JTLMMBuilderAdapter extends org.eclipse.core.resources.IncrementalProjectBuilder implements org.eclipse.core.resources.IResourceDeltaVisitor, org.eclipse.core.resources.IResourceVisitor { /** * The ID of the default, generated builder. */ public final static String BUILDER_ID = "JTLMM.resource.JTLMM.builder"; private JTLMM.resource.JTLMM.IJTLMMBuilder defaultBuilder = new JTLMM.resource.JTLMM.mopp.JTLMMBuilder(); /** * This resource set is used during the whole build. */ private org.eclipse.emf.ecore.resource.ResourceSet resourceSet; /** * This monitor is used during the build. */ private org.eclipse.core.runtime.IProgressMonitor monitor; public org.eclipse.core.resources.IProject[] build(int kind, java.util.Map<String, String> args, final org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException { // Set context for build this.monitor = monitor; this.resourceSet = new org.eclipse.emf.ecore.resource.impl.ResourceSetImpl(); // Perform build by calling the resource visitors org.eclipse.core.resources.IResourceDelta delta = getDelta(getProject()); if (delta != null) { // This is an incremental build delta.accept(this); } else { // This is a full build getProject().accept(this); } // Reset build context this.resourceSet = null; this.monitor = null; return null; } public void build(org.eclipse.core.resources.IFile resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.core.runtime.IProgressMonitor monitor) { org.eclipse.emf.common.util.URI uri = org.eclipse.emf.common.util.URI.createPlatformResourceURI(resource.getFullPath().toString(), true); JTLMM.resource.JTLMM.IJTLMMBuilder builder = getBuilder(); if (builder.isBuildingNeeded(uri)) { JTLMM.resource.JTLMM.mopp.JTLMMResource customResource = (JTLMM.resource.JTLMM.mopp.JTLMMResource) resourceSet.getResource(uri, true); new JTLMM.resource.JTLMM.mopp.JTLMMMarkerHelper().removeAllMarkers(resource, getBuilderMarkerId()); builder.build(customResource, monitor); } } /** * Returns the builder that shall be used by this adapter. This allows subclasses * to perform builds with different builders. */ public JTLMM.resource.JTLMM.IJTLMMBuilder getBuilder() { return defaultBuilder; } /** * Returns the id for the markers that are created by this builder. This allows * subclasses to produce different kinds of markers. */ public String getBuilderMarkerId() { return new JTLMM.resource.JTLMM.mopp.JTLMMMarkerHelper().getMarkerID(JTLMM.resource.JTLMM.JTLMMEProblemType.BUILDER_ERROR); } /** * Runs the task item builder to search for new task items in changed resources. */ public void runTaskItemBuilder(org.eclipse.core.resources.IFile resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.core.runtime.IProgressMonitor monitor) { JTLMM.resource.JTLMM.mopp.JTLMMTaskItemBuilder taskItemBuilder = new JTLMM.resource.JTLMM.mopp.JTLMMTaskItemBuilder(); new JTLMM.resource.JTLMM.mopp.JTLMMMarkerHelper().removeAllMarkers(resource, taskItemBuilder.getBuilderMarkerId()); taskItemBuilder.build(resource, resourceSet, monitor); } @Override public boolean visit(org.eclipse.core.resources.IResourceDelta delta) throws org.eclipse.core.runtime.CoreException { org.eclipse.core.resources.IResource resource = delta.getResource(); return doVisit(resource, delta.getKind() == org.eclipse.core.resources.IResourceDelta.REMOVED); } @Override public boolean visit(org.eclipse.core.resources.IResource resource) throws org.eclipse.core.runtime.CoreException { return doVisit(resource, false); } protected boolean doVisit(org.eclipse.core.resources.IResource resource, boolean removed) throws org.eclipse.core.runtime.CoreException { if (removed) { org.eclipse.emf.common.util.URI uri = org.eclipse.emf.common.util.URI.createPlatformResourceURI(resource.getFullPath().toString(), true); JTLMM.resource.JTLMM.IJTLMMBuilder builder = getBuilder(); if (builder.isBuildingNeeded(uri)) { builder.handleDeletion(uri, monitor); } new JTLMM.resource.JTLMM.mopp.JTLMMMarkerHelper().removeAllMarkers(resource, getBuilderMarkerId()); return false; } if (resource instanceof org.eclipse.core.resources.IFile && resource.getName().endsWith("." + new JTLMM.resource.JTLMM.mopp.JTLMMMetaInformation().getSyntaxName())) { // First, call the default generated builder that is usually customized to add // compilation-like behavior. build((org.eclipse.core.resources.IFile) resource, resourceSet, monitor); // Second, call the task item builder that searches for task items in DSL // documents and creates task markers. runTaskItemBuilder((org.eclipse.core.resources.IFile) resource, resourceSet, monitor); return false; } return true; } }
[ "tucci.michele@gmail.com" ]
tucci.michele@gmail.com
5fe134adb04c9d14716890d139225d087d4b353e
ed1d3bb7da6004064e8cdc7bf842715a3e6d357c
/binding2/mdsal-binding2-generator-util/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/util/BindingGeneratorUtil.java
23a1ab1723b1ef5be956a0d15cf524c817e9c603
[]
no_license
crisbermud/mdsal
f65f67f90a9522726bb46e729e9906334cef8572
9e218c9d98dadef77bc8beabae6e4d3731468868
refs/heads/master
2021-01-22T03:14:09.365197
2017-02-03T15:08:46
2017-02-03T17:09:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,264
java
/* * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.binding.javav2.generator.util; import com.google.common.annotations.Beta; import com.google.common.base.CharMatcher; import com.google.common.collect.Iterables; import java.util.Iterator; import org.opendaylight.mdsal.binding.javav2.util.BindingMapping; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.SchemaPath; /** * Standard Util class that contains various method for converting * input strings to valid JAVA language strings e.g. package names, * class names, attribute names and/or valid JavaDoc comments. */ @Beta public final class BindingGeneratorUtil { private static final CharMatcher GT_MATCHER = CharMatcher.is('>'); private static final CharMatcher LT_MATCHER = CharMatcher.is('<'); private BindingGeneratorUtil() { throw new UnsupportedOperationException("Utility class"); } /** * Creates package name from specified <code>basePackageName</code> (package * name for module) and <code>schemaPath</code>. * * Resulting package name is concatenation of <code>basePackageName</code> * and all local names of YANG nodes which are parents of some node for * which <code>schemaPath</code> is specified. * * Based on type of node, there is also possible suffix added in order * to prevent package name conflicts. * * @param basePackageName * string with package name of the module, MUST be normalized, * otherwise this method may return an invalid string. * @param schemaPath * list of names of YANG nodes which are parents of some node + * name of this node * @return string with valid JAVA package name * @throws NullPointerException if any of the arguments are null */ public static String packageNameForGeneratedType(final String basePackageName, final SchemaPath schemaPath) { final Iterable<QName> pathTowardsRoot = schemaPath.getPathTowardsRoot(); final Iterable<QName> pathFromRoot = schemaPath.getPathFromRoot(); final int size = Iterables.size(pathTowardsRoot) - 1; if (size <= 0) { return basePackageName; } return generateNormalizedPackageName(basePackageName, pathFromRoot, size); } /** * Creates package name from specified <code>basePackageName</code> (package * name for module) and <code>schemaPath</code> which crosses an augmentation. * * Resulting package name is concatenation of <code>basePackageName</code> * and all local names of YANG nodes which are parents of some node for * which <code>schemaPath</code> is specified. * * Based on type of node, there is also possible suffix added in order * to prevent package name conflicts. * * @param basePackageName * string with package name of the module, MUST be normalized, * otherwise this method may return an invalid string. * @param schemaPath * list of names of YANG nodes which are parents of some node + * name of this node * @return string with valid JAVA package name * @throws NullPointerException if any of the arguments are null */ public static String packageNameForAugmentedGeneratedType(final String basePackageName, final SchemaPath schemaPath) { final Iterable<QName> pathTowardsRoot = schemaPath.getPathTowardsRoot(); final Iterable<QName> pathFromRoot = schemaPath.getPathFromRoot(); final int size = Iterables.size(pathTowardsRoot); if (size == 0) { return basePackageName; } return generateNormalizedPackageName(basePackageName, pathFromRoot, size); } private static String generateNormalizedPackageName(final String base, final Iterable<QName> path, final int size) { final StringBuilder builder = new StringBuilder(base); final Iterator<QName> iterator = path.iterator(); for (int i = 0; i < size; ++i) { builder.append('.'); String nodeLocalName = iterator.next().getLocalName(); //FIXME: colon or dash in identifier? builder.append(nodeLocalName); } return BindingMapping.normalizePackageName(builder.toString()); } /** * Encodes angle brackets in yang statement description * @param description description of a yang statement which is used to generate javadoc comments * @return string with encoded angle brackets */ public static String encodeAngleBrackets(String description) { String newDesc = description; if (newDesc != null) { newDesc = LT_MATCHER.replaceFrom(newDesc, "&lt;"); newDesc = GT_MATCHER.replaceFrom(newDesc, "&gt;"); } return newDesc; } //TODO: further implementation of static util methods... }
[ "nite@hq.sk" ]
nite@hq.sk
dae4539679c00d8761fd5f3ae3138e52bd6e9fa5
7266bddf868668815d80fb2ba2f83e9df5dcc8f6
/core/functions.migration/src/kotlin/ExtensionFunction17.java
d07cfdbf7884aae387fb26011dfcfc896057fe65
[]
no_license
bihai/exp
3375a50072a9f137793342c40369fdddf0e2bd07
133e9354a4ccec21eb4d226cf3f6c1f3da072309
refs/heads/master
2020-12-31T02:01:44.573575
2015-06-01T10:13:19
2015-06-01T10:13:19
39,162,594
0
1
null
2015-07-15T21:38:52
2015-07-15T21:38:52
null
UTF-8
Java
false
false
1,005
java
/* * Copyright 2010-2015 JetBrains s.r.o. * * 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. */ // Auto-generated file. DO NOT EDIT! package kotlin; /** * @deprecated Use the new function classes from the package kotlin.jvm.functions. */ @Deprecated public interface ExtensionFunction17<E, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> extends kotlin.jvm.functions.Function18<E, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> { }
[ "Alexander.Udalov@jetbrains.com" ]
Alexander.Udalov@jetbrains.com
90bb14b3a77ea244b19f804c03a138a11da3b305
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/12/1458.java
3e731d373a44f913b1be5f18a2eb2049b576dcea
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
605
java
package <missing>; public class GlobalMembers { public static int Main() { int i; int j; int x; int y; int count = 0; int[] a = new int[16]; for (i = 1;;i++) { count = 0; for (j = 0;;j++) { a[j] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); if ((a[j] == 0) || (a[j] == -1)) { break; } } for (x = 0;x <= j - 1;x++) { for (y = 0;y <= j - 1;y++) { if (a[y] == a[x] * 2) { count = count + 1; } } } if (a[j] != -1) { System.out.print(count); System.out.print("\n"); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
9a49c8a9e78fb7953d35ead1313fc19b6a66d9bc
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/PACT_com.pactforcure.app/javafiles/com/pactforcure/app/ui/SettingsActivity$$Lambda$6.java
9dad8a8b7886a8d12530b8c849265f1ed9ead914
[ "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,666
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 com.pactforcure.app.ui; import android.content.DialogInterface; // Referenced classes of package com.pactforcure.app.ui: // SettingsActivity final class SettingsActivity$$Lambda$6 implements android.content.ener { public static android.content.ener lambdaFactory$(SettingsActivity settingsactivity) { return ((android.content.ener) (new SettingsActivity$$Lambda$6(settingsactivity))); // 0 0:new #2 <Class SettingsActivity$$Lambda$6> // 1 3:dup // 2 4:aload_0 // 3 5:invokespecial #20 <Method void SettingsActivity$$Lambda$6(SettingsActivity)> // 4 8:areturn } public void onClick(DialogInterface dialoginterface, int i) { SettingsActivity.lambda$null$45(arg$1, dialoginterface, i); // 0 0:aload_0 // 1 1:getfield #15 <Field SettingsActivity arg$1> // 2 4:aload_1 // 3 5:iload_2 // 4 6:invokestatic #28 <Method void SettingsActivity.lambda$null$45(SettingsActivity, DialogInterface, int)> // 5 9:return } private final SettingsActivity arg$1; private SettingsActivity$$Lambda$6(SettingsActivity settingsactivity) { // 0 0:aload_0 // 1 1:invokespecial #13 <Method void Object()> arg$1 = settingsactivity; // 2 4:aload_0 // 3 5:aload_1 // 4 6:putfield #15 <Field SettingsActivity arg$1> // 5 9:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
bd3ffc01e5c113d644ba60efe946ff99ad79d04f
0b99941112b4407465c643b056e770f40ecd4cbe
/helloworld/Hello/src/July13/PlayingwithNumbers.java
dd77f72aaaa9e902e4f062ce4338612061fbdacb
[]
no_license
banthony79/JavaPractice
c81c9e65936af7948d32d5de9923cfd34ff41251
e3d144e5e5c6973bcc30a7c185d44c39a1cfee19
refs/heads/master
2023-01-18T14:13:21.684925
2020-11-29T18:06:41
2020-11-29T18:06:41
300,121,082
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package July13; public class PlayingwithNumbers { public static void main(String[] args) { int num1 = 40; int num2 = 25; int answer1; int answer2; boolean answer3; answer1 = deductNumbers(num1, num2); System.out.println(answer1); answer2 = sumofNumbers(num1, num2); System.out.println(answer2); answer3 = numbersAreequal(num1, num2); System.out.println(answer3); } public static int deductNumbers(int x, int y) { int ans = x - y; return ans; } public static int sumofNumbers(int x, int y) { int sum = x + y; return sum; } public static boolean numbersAreequal (int b, int l) { if (b == l) return true; else return false; } }
[ "blooyeng@gmail.com" ]
blooyeng@gmail.com
8449efabfff3d86e289846d966330442d22cf6fb
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/osmdroid_osmdroid/osmdroid-android/src/main/java/org/osmdroid/views/overlay/Overlay.java
b7f9cfafa976f815ebaeb97acda543172194975a
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,759
java
// isComment package org.osmdroid.views.overlay; import java.util.concurrent.atomic.AtomicInteger; import org.osmdroid.api.IMapView; import org.osmdroid.util.BoundingBox; import org.osmdroid.util.TileSystem; import org.osmdroid.util.TileSystemWebMercator; import org.osmdroid.views.MapView; import org.osmdroid.views.util.constants.OverlayConstants; import android.content.Context; import android.graphics.Canvas; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.MotionEvent; /** * isComment */ public abstract class isClassOrIsInterface implements OverlayConstants { // isComment // isComment // isComment private static AtomicInteger isVariable = new AtomicInteger(); // isComment protected static final float isVariable = -isDoubleConstant; protected static final float isVariable = isDoubleConstant; // isComment // isComment // isComment private static final Rect isVariable = new Rect(); private boolean isVariable = true; // isComment private final TileSystem isVariable = isNameExpr.isMethod(); protected BoundingBox isVariable = new BoundingBox(isNameExpr.isMethod(), isNameExpr.isMethod(), isNameExpr.isMethod(), isNameExpr.isMethod()); /** * isComment */ @Deprecated public isConstructor(final Context isParameter) { } public isConstructor() { } // isComment // isComment // isComment /** * isComment */ public BoundingBox isMethod() { return isNameExpr; } /** * isComment */ public void isMethod(final boolean isParameter) { this.isFieldAccessExpr = isNameExpr; } /** * isComment */ public boolean isMethod() { return this.isFieldAccessExpr; } /** * isComment */ protected static final int isMethod() { return isNameExpr.isMethod(); } /** * isComment */ protected static final int isMethod(final int isParameter) { return isNameExpr.isMethod(isNameExpr); } // isComment // isComment // isComment /** * isComment */ public abstract void isMethod(final Canvas isParameter, final MapView isParameter, final boolean isParameter); // isComment // isComment // isComment /** * isComment */ public void isMethod(final MapView isParameter) { } /** * isComment */ public boolean isMethod(final int isParameter, final KeyEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final int isParameter, final KeyEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MotionEvent isParameter, final float isParameter, final float isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MotionEvent isParameter, final float isParameter, final float isParameter, final MapView isParameter) { return true; } public void isMethod(final MotionEvent isParameter, final MapView isParameter) { return; } /** * isComment */ public boolean isMethod(final MotionEvent isParameter, final MapView isParameter) { return true; } /** * isComment */ protected static synchronized void isMethod(final Canvas isParameter, final Drawable isParameter, final int isParameter, final int isParameter, final boolean isParameter, final float isParameter) { isNameExpr.isMethod(); isNameExpr.isMethod(-isNameExpr, isNameExpr, isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr + isNameExpr, isNameExpr.isFieldAccessExpr + isNameExpr, isNameExpr.isFieldAccessExpr + isNameExpr, isNameExpr.isFieldAccessExpr + isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(); } /** * isComment */ public void isMethod() { } /** * isComment */ public void isMethod() { } /** * isComment */ public interface isClassOrIsInterface { /** * isComment */ boolean isMethod(int isParameter, int isParameter, Point isParameter, IMapView isParameter); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
21c09ffc4de9b8acaf17c19d6cc43331658b58c3
36db8ea6d43f04fd15b3168bcbdf1c86147f0dc6
/Java8LambdaSample/src/main/java/sample/defaultFunInterface/DefaultFunInterface.java
89d30d912bd65d28328282d480846aa7e6cf1be5
[]
no_license
sunning9001/AllInOneSample
79685de54a8af2f85b1bf6d5dea93d8e8d4602f7
e5809b840d125e801989d60aab770c43d0648cc8
refs/heads/master
2022-12-22T21:13:30.880178
2020-11-10T08:10:13
2020-11-10T08:10:13
96,510,636
0
0
null
2022-12-16T03:08:00
2017-07-07T07:14:52
Java
UTF-8
Java
false
false
145
java
package sample.defaultFunInterface; public interface DefaultFunInterface { // 定义默认方法 count default int count() { return 1; } }
[ "sunning@auto-fis.com" ]
sunning@auto-fis.com
06f12ee3de3ffacb75858c88db6d0247756b2900
b8665f55930e934a75935824c6e5c95d85191fa6
/glaf-base/src/main/java/com/glaf/base/modules/sys/actionform/LoginForm.java
84c5611c82c79380fb13144cd9e8ac7ece4dc751
[ "Apache-2.0" ]
permissive
jior/glaf-gac
8f8834e87ec398179c53298df05e1bd4fd064bb8
ec41663b88b9400024954f3a5e3cf53354b8f9a0
refs/heads/master
2016-09-03T07:23:12.805688
2013-11-19T06:18:21
2013-11-19T06:18:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package com.glaf.base.modules.sys.actionform; public class LoginForm { private static final long serialVersionUID = 1L; private String userId; private String password; private String password1; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getPassword1() { return password1; } public void setPassword1(String password1) { this.password1 = password1; } }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
dc00dc2ae77d46207f155c1fabc0a9061ad021d3
088cad7c00db1e05ad2ab219e393864f3bf7add6
/classes/android/support/design/widget/BottomNavigationView$OnNavigationItemReselectedListener.java
1024d61ef6abd9bcaa4d4c850c871d1af5ed2111
[]
no_license
devidwfreitas/com-santander-app.7402
8e9f344f5132b1c602d80929f1ff892293f4495d
e9a92b20dc3af174f9b27ad140643b96fb78f04d
refs/heads/main
2023-05-01T09:33:58.835056
2021-05-18T23:54:43
2021-05-18T23:54:43
368,692,384
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
package android.support.design.widget; import android.support.annotation.NonNull; import android.view.MenuItem; public interface BottomNavigationView$OnNavigationItemReselectedListener { void onNavigationItemReselected(@NonNull MenuItem paramMenuItem); } /* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\android\support\design\widget\BottomNavigationView$OnNavigationItemReselectedListener.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "devid.wfreitas@gmail.com" ]
devid.wfreitas@gmail.com
3092d73b5f651d7a3b67cf624cd50ec1c5509e68
79ce1613f361cecdf20f37caf16bde39f62cf559
/src/test/java/cn/yangcx/concurrency21/AtomicityTest.java
1ee80e100e6f3a91031de4053c927712ce111daf
[]
no_license
yangcxx/ThinkingInJava
24939f40f0998588a47cdf5cd212b1a14af93143
b4ef593b85ce840d40a170963bbeeab47d2ee805
refs/heads/master
2023-08-16T05:35:00.903600
2021-10-04T09:30:57
2021-10-04T09:30:57
388,625,646
0
0
null
null
null
null
UTF-8
Java
false
false
931
java
package cn.yangcx.concurrency21; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * @author YANGCX * @date 2021/9/11 22:12 */ public class AtomicityTest implements Runnable { private int i = 0; public int getValue() { return i; } private synchronized void evenIncrement() { i++; i++; } @Override public void run() { while (true) { evenIncrement(); } } public static void main(String[] args) { ExecutorService pool = Executors.newCachedThreadPool(); AtomicityTest at = new AtomicityTest(); pool.execute(at); while (true) { // todo 主线程不一定能立即获取到值 int value = at.getValue(); if (value % 2 != 0) { System.out.println(value); System.exit(0); } } } }
[ "charlesyoung0811@gmail.com" ]
charlesyoung0811@gmail.com
e983c9485c07489490160f381ef02940b72a0138
b4893f54e524d61c6035ffd70804ca2d7537a2b7
/src/net/vurs/conn/cassandra/typesafety/CassandraSuperColumn.java
2298f41ad39e3fde947138f48f5a2d5d2f7cc80e
[]
no_license
lzimm/vurs
96553ed5a54359699e4dc44eed062048ba7e7ce3
8e9c035538ff27f5368359f177ec37cb3700d1ba
refs/heads/master
2021-01-01T05:33:24.743946
2012-12-07T04:11:23
2012-12-07T04:11:23
7,047,447
0
1
null
null
null
null
UTF-8
Java
false
false
263
java
package net.vurs.conn.cassandra.typesafety; import net.vurs.conn.cassandra.typesafety.keytypes.ColumnIndexType; public interface CassandraSuperColumn<S, A extends ColumnIndexType<S, ?>, K, B extends ColumnIndexType<K, ?>> extends CassandraBackedDefinition { }
[ "lewis@lzimm.com" ]
lewis@lzimm.com
b7daa16bdb243c326e8a6a759b6f7d2256ed0ec7
de01cb554c2292b0fbb79b4d5413a2f6414ea472
/algorithms/Medium/998.maximum-binary-tree-ii.java
9ab354ad12796cbc2784ace7b1a3ea50cfedea1b
[]
no_license
h4hany/yeet-the-leet
98292017eadd3dde98a079aafcd7648aa98701b4
563d779467ef5a7cc85cbe954eeaf3c1f5463313
refs/heads/master
2022-12-10T08:35:39.830260
2020-09-02T23:12:15
2020-09-02T23:12:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,147
java
/* * @lc app=leetcode id=998 lang=java * * [998] Maximum Binary Tree II * * https://leetcode.com/problems/maximum-binary-tree-ii/description/ * * algorithms * Medium (63.13%) * Total Accepted: 16.9K * Total Submissions: 26.8K * Testcase Example: '[4,1,3,null,null,2]\n5' * * We are given the root node of a maximum tree: a tree where every node has a * value greater than any other value in its subtree. * * Just as in the previous problem, the given tree was constructed from an list * A (root = Construct(A)) recursively with the following Construct(A) * routine: * * * If A is empty, return null. * Otherwise, let A[i] be the largest element of A.  Create a root node with * value A[i]. * The left child of root will be Construct([A[0], A[1], ..., A[i-1]]) * The right child of root will be Construct([A[i+1], A[i+2], ..., A[A.length - * 1]]) * Return root. * * * Note that we were not given A directly, only a root node root = * Construct(A). * * Suppose B is a copy of A with the value val appended to it.  It is * guaranteed that B has unique values. * * Return Construct(B). * * * Example 1: * * * * * Input: root = [4,1,3,null,null,2], val = 5 * Output: [5,4,null,1,3,null,null,2] * Explanation: A = [1,4,2,3], B = [1,4,2,3,5] * * * Example 2: * * * * * Input: root = [5,2,4,null,1], val = 3 * Output: [5,2,4,null,1,null,3] * Explanation: A = [2,1,5,4], B = [2,1,5,4,3] * * * Example 3: * * * * * Input: root = [5,2,3,null,1], val = 4 * Output: [5,2,4,null,1,3] * Explanation: A = [2,1,5,3], B = [2,1,5,3,4] * * * * Constraints: * * * 1 <= B.length <= 100 * * */ /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * this.right = right; * } * } */ class Solution { public TreeNode insertIntoMaxTree(TreeNode root, int val) { } }
[ "kevin.wkmiao@gmail.com" ]
kevin.wkmiao@gmail.com
e773fe340a1d3074b29af43078a7985ffba92f08
7c87736e3256d9cce9a2a3b1a2f3a7f46a3344ff
/src/Chapter_3/Section_1/Test6.java
5cafcfafaf427e3aae482a00e66df16d347731c0
[]
no_license
tuojiang/JAVAMultiThreadedDemo
a1789e4a89c67e34507add12cc56e35860f5978f
42c081fe947e72559f846cd7e83093fd8857f2b3
refs/heads/master
2020-03-18T14:10:57.168217
2018-06-20T03:06:43
2018-06-20T03:06:43
134,834,748
0
0
null
null
null
null
UTF-8
Java
false
false
3,247
java
package Chapter_3.Section_1; /** * <p>@description: 1)当线程数很多的时候,之间用notifyAll()唤醒所有线程 * * @author boboan * @version V1.0 * @date 2018-06-01-上午9:24 **/ public class Test6 { public static void main(String[] args) { ObjService objService = new ObjService(); ThreadA threadA = new ThreadA(objService); ThreadB threadB = new ThreadB(objService); ThreadC threadC = new ThreadC(objService); ThreadNotify threadNotify = new ThreadNotify(objService); threadA.setName("A"); threadB.setName("B"); threadC.setName("C"); threadNotify.setName("GOGO"); threadA.start(); threadB.start(); threadC.start(); threadNotify.start(); } static class ObjService{ public void testMethod(Object object){ synchronized (object){ try { System.out.println(Thread.currentThread().getName()+"在运行"); object.wait(); System.out.println(Thread.currentThread().getName()+"停止运行"); } catch (InterruptedException e) { e.printStackTrace(); } } } public void notifyTO(Object object) { synchronized (object){ System.out.println(Thread.currentThread().getName()+"在notifyTO运行"); object.notify(); try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName()+"停止notifyTO运行"); } } } static class ThreadA extends Thread{ private Object object; public ThreadA(Object object) { this.object = object; } @Override public void run() { super.run(); Test4.ObjService objService = new Test4.ObjService(); objService.testMethod(object); } } static class ThreadB extends Thread{ private Object object; public ThreadB(Object object) { this.object = object; } @Override public void run() { super.run(); Test4.ObjService objService = new Test4.ObjService(); objService.testMethod(object); } } static class ThreadC extends Thread{ private Object object; public ThreadC(Object object) { this.object = object; } @Override public void run() { super.run(); Test4.ObjService objService = new Test4.ObjService(); objService.testMethod(object); } } static class ThreadNotify extends Thread{ private Object object; public ThreadNotify(Object object) { this.object = object; } @Override public void run() { super.run(); synchronized (object){ System.out.println("唤醒线程:"+Thread.currentThread().getName()); object.notifyAll(); } } } }
[ "yihongou@tcl.com" ]
yihongou@tcl.com
966f00fdeab527c3c9a20c7c8b516a21ae3244cc
3552e020f37f6adaaa16ef73af8a5232d3fb0921
/server/src/main/java/org/snomed/heathanalytics/server/ingestion/elasticsearch/ElasticOutputStream.java
6b5fdce0c5fcfb7a73cc1586f90ee6f145f7ea1c
[ "Apache-2.0" ]
permissive
IHTSDO/health-data-analytics
e117512fbd6f55f1e799696049d8c563bff8f656
ac1b1a14e63ceca95b4b34b45fefa2f0c732a954
refs/heads/ui-prototyping
2023-08-05T02:01:42.935888
2023-03-30T07:33:57
2023-03-30T07:33:57
129,092,573
41
10
Apache-2.0
2023-03-15T05:44:57
2018-04-11T12:47:58
Java
UTF-8
Java
false
false
1,961
java
package org.snomed.heathanalytics.server.ingestion.elasticsearch; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.snomed.heathanalytics.model.ClinicalEncounter; import org.snomed.heathanalytics.model.Patient; import org.snomed.heathanalytics.server.ingestion.HealthDataOutputStream; import org.snomed.heathanalytics.server.store.PatientRepository; import org.springframework.stereotype.Service; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Optional; @Service public class ElasticOutputStream implements HealthDataOutputStream { private final PatientRepository patientRepository; private final Logger logger = LoggerFactory.getLogger(getClass()); private final Map<String, Patient> patientBuffer = new HashMap<>(); public ElasticOutputStream(PatientRepository patientRepository) { this.patientRepository = patientRepository; } @Override public void createPatient(Patient patient) { patientRepository.save(patient); } @Override public void createPatients(Collection<Patient> patients) { patientRepository.saveAll(patients); } @Override public void addClinicalEncounter(String roleId, ClinicalEncounter encounter) { Patient patient = patientBuffer.get(roleId); if (patient == null) { Optional<Patient> patientOptional = patientRepository.findById(roleId); if (patientOptional.isPresent()) { patient = patientOptional.get(); patientBuffer.put(roleId, patient); } } if (patient != null) { patient.addEncounter(encounter); if (patientBuffer.size() == 10_000) { flush(); } } else { logger.error("Failed to add clinical encounter {}/{} - patient not found with id {}", encounter.getDate(), encounter.getConceptId(), roleId); } } @Override public void close() { flush(); } public void flush() { if (!patientBuffer.isEmpty()) { patientRepository.saveAll(patientBuffer.values()); patientBuffer.clear(); } } }
[ "kaikewley@gmail.com" ]
kaikewley@gmail.com
cef4c5c5339d376de3768efb478a3451d901958d
350a028b43ef498f6bcf748c7855f00c74379ecb
/2.Technology Fundamentals SoftUni/ListsArraysAdvanced/src/Anonymous.java
3649f4e417cf3919009efd69ff4cb0cc36b2b62a
[]
no_license
martinrangelov96/SoftUni-Lections-Exercises-And-Homeworks
e2322ba51de0b354ba94ec4d19415de8938ee5b4
009a21268621238027b288a95b2dfc6a09578155
refs/heads/master
2022-12-02T15:58:02.790326
2019-07-17T07:15:30
2019-07-17T07:15:30
168,360,969
1
0
null
2022-11-24T09:51:29
2019-01-30T14:57:54
Java
UTF-8
Java
false
false
2,503
java
import java.util.*; import java.util.stream.Collectors; public class Anonymous { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<String> elements = Arrays.stream(sc.nextLine().split(" ")) .collect(Collectors.toList()); String line = sc.nextLine(); while (!line.equals("3:1")) { String[] tokens = line.split(" "); String cmd = tokens[0]; int start = Math.min(Integer.parseInt(tokens[1]), elements.size() - 1); start = Math.max(0, start); int end = Integer.parseInt(tokens[2]); List<String> result = new ArrayList<>(); if (cmd.equals("merge")) { end = Math.min(Integer.parseInt(tokens[2]), elements.size() - 1); end = Math.max(0, end); if (start > 0) { result.addAll(elements.subList(0, start)); } String merged = elements.subList(start, end + 1) .stream() .reduce((res, el) -> res + el) .get(); result.add(merged); if (end + 1 < elements.size()) { result.addAll(elements.subList(end + 1, elements.size())); } elements = result; } else { String element = elements.get(start); end = Math.min(end, element.length()); int symbols = element.length() / end; int lastElementLength = symbols + element.length() % end; int parts = element.length() - lastElementLength; String lastElement = element.substring(element.length() - lastElementLength); element = element.substring(0, element.length() - lastElementLength); for (int i = 0; i < parts && element.length() > 0; i++) { result.add(element.substring(0, symbols)); element = element.substring(symbols); } if (!element.isEmpty()) { result.add(element); } if (!lastElement.isEmpty()) { result.add(lastElement); } elements.remove(start); elements.addAll(start, result); } line = sc.nextLine(); } elements.forEach(e -> System.out.print(e + " ")); } }
[ "martin.rangelov96@gmail.com" ]
martin.rangelov96@gmail.com
e4f582f15031cd1271db57107de239571e8f0b63
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_201436ab117395fbac4be098a74f0952d04741a6/ConnectionHandler/8_201436ab117395fbac4be098a74f0952d04741a6_ConnectionHandler_t.java
a12623553441fb3e71b62556d0d89d80e08e0649
[]
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
2,490
java
/* * Copyright 2011-13 Fraunhofer ISE, energy & meteo Systems GmbH and other contributors * * This file is part of OpenIEC61850. * For more information visit http://www.openmuc.org * * OpenIEC61850 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. * * OpenIEC61850 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 OpenIEC61850. If not, see <http://www.gnu.org/licenses/>. * */ package org.openmuc.openiec61850.jositransport; import java.io.IOException; import java.net.Socket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * The class extends Thread and handles ISO Transport connections. Once a connection has been initiated (CR,CC) it gives * the connection in form of the Connection class to the ConnectionListener. * */ public final class ConnectionHandler implements Runnable { private final static Logger logger = LoggerFactory.getLogger(ConnectionHandler.class); private final Socket socket; private final ServerThread serverThread; ConnectionHandler(Socket socket, ServerThread serverThread) { this.socket = socket; this.serverThread = serverThread; } @Override public void run() { try { TConnection tConnection = null; try { tConnection = new TConnection(socket, serverThread.maxTPDUSizeParam, serverThread.messageTimeout, serverThread.messageFragmentTimeout); } catch (IOException e) { logger.warn("Exception occured when someone tried to connect: " + e.getMessage(), e); return; } try { tConnection.listenForCR(); } catch (IOException e) { logger.warn("Exception occured when someone tried to connect. Server was listening for ISO Transport CR packet: {}", e.getMessage()); tConnection.close(); return; } if (serverThread.isAlive() == true) { serverThread.connectionIndication(tConnection); } if (tConnection != null) { tConnection.close(); } } finally { serverThread.removeHandler(this); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f1c5e6aba79a3543abbf17fd9cb95b950e20856e
c8fedb84fae1cd58f80ecf06e26e3f12f0dc9232
/onespider-worker/src/test/java/com/jinguduo/spider/spider/tengxun/TengxunCommentIdApiSpiderTests.java
4b413752d85383796c2a74a9ee5c797efe1f03ba
[]
no_license
tomall469/springcloud-nacos-spider
dba4790392069b6166a257e1aced2f20b244a2c5
6ef51f85d6d0d3ff83f976fdaba54335f089994c
refs/heads/master
2023-03-16T21:01:24.814922
2021-03-08T09:45:50
2021-03-08T09:45:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,197
java
package com.jinguduo.spider.spider.tengxun; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.HttpStatus; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.Assert; import com.jinguduo.spider.WorkerMainApplication; import com.jinguduo.spider.cluster.model.Job; import com.jinguduo.spider.cluster.scheduler.DelayRequest; import com.jinguduo.spider.common.util.IoResourceHelper; import com.jinguduo.spider.webmagic.Page; import com.jinguduo.spider.webmagic.ResultItems; @RunWith(SpringRunner.class) @ActiveProfiles("test") @SpringBootTest public class TengxunCommentIdApiSpiderTests { @Autowired private TengxunCommentIdApiSpider tengxunCommentIdApiSpider; final static String JSON_FILE = "/json/TengxunCommentIdApiSpiderTests.json"; final static String RAW_TEXT = IoResourceHelper.readResourceContent(JSON_FILE); final static String URL = "http://ncgi.video.qq.com/fcgi-bin/video_comment_id?otype=json&op=3&vid=j0020qc692d"; DelayRequest delayRequest; @Before public void setup() { Job job = new Job(); job.setPlatformId(1); job.setShowId(1); job.setUrl(URL); job.setFrequency(100); job.setMethod("GET"); // request delayRequest = new DelayRequest(job); } @Test public void testContext() { Assert.notNull(tengxunCommentIdApiSpider); Assert.notNull(RAW_TEXT); } @Test public void testProcessOk() throws Exception { // page Page page = new Page(); page.setRequest(delayRequest); page.setStatusCode(HttpStatus.OK.value()); page.setRawText(RAW_TEXT); tengxunCommentIdApiSpider.process(page); ResultItems resultItems = page.getResultItems(); Assert.notNull(resultItems); List<Job> job = resultItems.get(Job.class.getSimpleName()); Assert.notNull(job); } }
[ "guduomedia111@163.com" ]
guduomedia111@163.com
c3fd8f54f0578704a176b84dceeaca6a80ceea24
3001fcfe996fb82ad6cfb1843a71e54434975373
/utils/test/on2013_04/on2013_04_15_Croc_Champ_2013___Round_1/B___Network_Topology/Main.java
71adf8ba38d8de1355e2dd98d65134caea3bef7d
[]
no_license
niyaznigmatullin/nncontests
751d8cde9c18feae165dd7d1b0ea2cf1f075d39c
59748ce96f521e832c5a511ba849a523e35ad469
refs/heads/master
2022-07-14T08:33:27.055971
2022-06-28T17:58:23
2022-06-28T17:58:23
36,932,376
7
1
null
null
null
null
UTF-8
Java
false
false
406
java
package lib.test.on2013_04.on2013_04_15_Croc_Champ_2013___Round_1.B___Network_Topology; import net.egork.chelper.tester.NewTester; import org.junit.Assert; import org.junit.Test; public class Main { @Test public void test() throws Exception { if (!NewTester.test("src/lib/test/on2013_04/on2013_04_15_Croc_Champ_2013___Round_1/B___Network_Topology/B - Network Topology.task")) Assert.fail(); } }
[ "niyaz.nigmatullin@gmail.com" ]
niyaz.nigmatullin@gmail.com
971f38d672e423de2e6a78fb575d5f8420e5e2cc
7f2399320ef6fbca4bda10b2e6b3506e3dbfb50b
/src/main/java/fr/inria/coming/repairability/models/InstanceStats.java
9cf2d34adab23ea5620194e5bb13a7f71f7f605d
[ "MIT" ]
permissive
amir9979/coming
25ee89e90eb1a9e30cd9eba10caff2478c6be90a
c329557d5cc69d4ce92cd670f95f426e9118bb39
refs/heads/master
2023-05-26T10:58:30.623599
2021-06-14T07:43:34
2021-06-14T07:43:34
311,617,839
0
0
MIT
2021-06-14T07:43:35
2020-11-10T10:06:21
Java
UTF-8
Java
false
false
1,461
java
package fr.inria.coming.repairability.models; import spoon.reflect.reference.CtTypeReference; import java.util.HashSet; import java.util.Set; /** * Created by khesoem on 10/4/2019. */ public class InstanceStats { private int numberOfSrcEntities; private Set<CtTypeReference<?>> srcEntityTypes; private int numberOfDstEntities; private Set<CtTypeReference<?>> dstEntityTypes; public InstanceStats(){ numberOfDstEntities = -1; numberOfSrcEntities = -1; srcEntityTypes = new HashSet<>(); dstEntityTypes = new HashSet<>(); } public int getNumberOfSrcEntities() { return numberOfSrcEntities; } public void setNumberOfSrcEntities(int numberOfSrcEntities) { this.numberOfSrcEntities = numberOfSrcEntities; } public Set<CtTypeReference<?>> getSrcEntityTypes() { return srcEntityTypes; } public void setSrcEntityTypes(Set<CtTypeReference<?>> srcEntityTypes) { this.srcEntityTypes = srcEntityTypes; } public int getNumberOfDstEntities() { return numberOfDstEntities; } public void setNumberOfDstEntities(int numberOfDstEntities) { this.numberOfDstEntities = numberOfDstEntities; } public Set<CtTypeReference<?>> getDstEntityTypes() { return dstEntityTypes; } public void setDstEntityTypes(Set<CtTypeReference<?>> dstEntityTypes) { this.dstEntityTypes = dstEntityTypes; } }
[ "martinezmatias@users.noreply.github.com" ]
martinezmatias@users.noreply.github.com
551cad7d7dec3822e47188bcb0da72c8c919a8b4
bdb249c3436511fd8a914928291d97a4dc3cfc54
/KotlinTest/App/src/main/java/com/hexun/training/widget/XListViewFooter.java
4292f531212de159ad1d0f951ed38e01559d6273
[]
no_license
1136346879/picture_dx
090ba198fde99eb322ab3c9975f4fb805f202cfa
fd26e94c6f5f86f77de5b544cd27b6a748aaa2dc
refs/heads/master
2023-02-20T04:19:08.732978
2023-02-10T08:37:59
2023-02-10T08:37:59
158,658,353
13
4
null
null
null
null
UTF-8
Java
false
false
4,870
java
/** * @file XFooterView.java * @create Mar 31, 2012 9:33:43 PM * @author Maxwin * @description XListView's footer */ package com.hexun.training.widget; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import com.example.administrator.kotlintest.R; public class XListViewFooter extends LinearLayout { public final static int STATE_NORMAL = 0; public final static int STATE_READY = 1; public final static int STATE_LOADING = 2; private Context mContext; private View mContentView; private View mProgressBar; private TextView mHintView; private LinearLayout mLayout; private CharSequence mHoverText; public XListViewFooter(Context context) { super(context); initView(context); } public XListViewFooter(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } public void setState(int state) { mHintView.setVisibility(View.INVISIBLE); mProgressBar.setVisibility(View.INVISIBLE); mLayout.setVisibility(View.INVISIBLE); if (state == STATE_READY) { mLayout.setVisibility(View.VISIBLE); mHintView.setVisibility(View.VISIBLE); if (TextUtils.isEmpty(mHoverText)) { mHintView.setText(R.string.cd_base_list_view_footer_hint_ready); } else { mHintView.setText(mHoverText); } } else if (state == STATE_LOADING) { mProgressBar.setVisibility(View.VISIBLE); mLayout.setVisibility(View.GONE); } else { mLayout.setVisibility(View.VISIBLE); mHintView.setVisibility(View.VISIBLE); if (TextUtils.isEmpty(mHoverText)) { mHintView.setText(R.string.cd_base_list_view_footer_hint_normal); } else { mHintView.setText(mHoverText); } } } /** * 设置停留时的文字 * @param text */ public void setHoverText(CharSequence text) { mHoverText = text; if (text != null) { mHintView.setText(text); } else { mHintView.setText(R.string.cd_base_list_view_footer_hint_normal); } } public void setBottomMargin(int height) { if (height < 0) { return; } int half = height/2; LayoutParams lp = (LayoutParams) mContentView .getLayoutParams(); lp.bottomMargin = half; lp.topMargin = half; mContentView.setLayoutParams(lp); } public int getBottomMargin() { LayoutParams lp = (LayoutParams) mContentView .getLayoutParams(); return lp.bottomMargin + lp.topMargin; } /** * normal status */ public void normal() { mHintView.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.GONE); } /** * loading status */ public void loading() { mHintView.setVisibility(View.GONE); mProgressBar.setVisibility(View.VISIBLE); } /** * hide footer when disable pull load more */ public void hide() { LayoutParams lp = (LayoutParams) mContentView .getLayoutParams(); lp.height = 0; mContentView.setLayoutParams(lp); setVisibility(GONE); } /** * show footer */ public void show() { setVisibility(VISIBLE); LayoutParams lp = (LayoutParams) mContentView .getLayoutParams(); lp.height = ViewGroup.LayoutParams.WRAP_CONTENT; mContentView.setLayoutParams(lp); } private void initView(Context context) { mContext = context; moreView = LayoutInflater.from(mContext) .inflate(R.layout.xlistview_footer, null); LayoutParams params = new LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); params.gravity = Gravity.CENTER_VERTICAL; addView(moreView, params); mContentView = moreView.findViewById(R.id.xlistview_footer_content); mProgressBar = moreView.findViewById(R.id.xlistview_footer_progressbar); mHintView = (TextView) moreView.findViewById(R.id.xlistview_footer_hint_textview); mLayout = (LinearLayout)moreView.findViewById(R.id.xlistview_footer_loadmore_layout); } public View getMoreView() { return moreView; } public void setMoreView(View moreView) { this.moreView = moreView; } private View moreView; private int mExactlyHeight; public void setExactlyHeight(int height) { this.mExactlyHeight = height; if (moreView != null) { LayoutParams params = (LayoutParams)moreView.getLayoutParams(); if (height > 0) { params.height = height; moreView.setLayoutParams(params); } else if (params.height != LayoutParams.WRAP_CONTENT) { params.height = LayoutParams.WRAP_CONTENT; moreView.setLayoutParams(params); } } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (mExactlyHeight > 0) { super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(mExactlyHeight, MeasureSpec.EXACTLY)); } else { super.onMeasure(widthMeasureSpec, heightMeasureSpec); } } }
[ "1136346879@qq.com" ]
1136346879@qq.com
d3024d22702b666de5777445123ea2257f7228a3
b7075f3398399b955ef00940a1e268612afb404a
/app/src/main/java/com/goldenapple/lottery/data/GetThirdPlatBalanceCommand.java
7af0888e3b22c280d530f06bead59e45ca9cb1df
[]
no_license
iuvei/GoldenApple
5fffcea0b67a05c9ee36358d00ca6d11a889504c
6faec199308e68d1f817bbec68987ff334067023
refs/heads/master
2020-05-20T12:22:21.932932
2019-01-14T05:33:31
2019-01-14T05:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package com.goldenapple.lottery.data; import com.goldenapple.lottery.base.net.RequestConfig; import com.google.gson.annotations.SerializedName; @RequestConfig(api = "service?packet=Fund&action=GetThirdPlatBalance") public class GetThirdPlatBalanceCommand extends CommonAttribute{ @SerializedName("plat_id") private String platId; public void setPlatId(String platId) { this.platId = platId; } }
[ "429533813@qq.com" ]
429533813@qq.com
a867f9a043fb3b3607797fc6a8295204cd2af155
a0f3352148e86501a9e92b24b0a2b11d5c8a1fcf
/src/main/java/com/hendisantika/useraccountregistration/controller/RegisterController.java
ef497c0a0502c0103b42cf8494d99173d39c8756
[]
no_license
hendisantika/user-account-registration
0bfb1cee4ad5ba7619bd252ddb698b0bb3aa9f83
455713ebacc309d2d769f79c9829084d077db43f
refs/heads/master
2023-06-11T07:58:48.135399
2023-05-25T23:18:43
2023-05-25T23:18:43
129,107,775
1
1
null
null
null
null
UTF-8
Java
false
false
5,973
java
package com.hendisantika.useraccountregistration.controller; import com.hendisantika.useraccountregistration.model.User; import com.hendisantika.useraccountregistration.service.EmailService; import com.hendisantika.useraccountregistration.service.UserService; import com.nulabinc.zxcvbn.Strength; import com.nulabinc.zxcvbn.Zxcvbn; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mail.SimpleMailMessage; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import java.util.Map; import java.util.UUID; /** * Created by IntelliJ IDEA. * Project : user-account-registration * User: hendisantika * Email: hendisantika@gmail.com * Telegram : @hendisantika34 * Date: 12/04/18 * Time: 06.10 * To change this template use File | Settings | File Templates. */ @Controller public class RegisterController { private BCryptPasswordEncoder bCryptPasswordEncoder; private UserService userService; private EmailService emailService; @Autowired public RegisterController(BCryptPasswordEncoder bCryptPasswordEncoder, UserService userService, EmailService emailService) { this.bCryptPasswordEncoder = bCryptPasswordEncoder; this.userService = userService; this.emailService = emailService; } // Return registration form template @GetMapping("/register") public ModelAndView showRegistrationPage(ModelAndView modelAndView, User user) { modelAndView.addObject("user", user); modelAndView.setViewName("register"); return modelAndView; } // Process form input data @PostMapping("/register") public ModelAndView processRegistrationForm(ModelAndView modelAndView, @Valid User user, BindingResult bindingResult, HttpServletRequest request) { // Lookup user in database by e-mail User userExists = userService.findByEmail(user.getEmail()); System.out.println(userExists); if (userExists != null) { modelAndView.addObject("alreadyRegisteredMessage", "Oops! There is already a user registered with the email provided."); modelAndView.setViewName("register"); bindingResult.reject("email"); } if (bindingResult.hasErrors()) { modelAndView.setViewName("register"); } else { // new user so we create user and send confirmation e-mail // Disable user until they click on confirmation link in email user.setEnabled(false); // Generate random 36-character string token for confirmation link user.setConfirmationToken(UUID.randomUUID().toString()); userService.saveUser(user); String appUrl = request.getScheme() + "://" + request.getServerName(); SimpleMailMessage registrationEmail = new SimpleMailMessage(); registrationEmail.setTo(user.getEmail()); registrationEmail.setSubject("Registration Confirmation"); registrationEmail.setText("To confirm your e-mail address, please click the link below:\n" + appUrl + "/confirm?token=" + user.getConfirmationToken()); registrationEmail.setFrom("noreply@domain.com"); emailService.sendEmail(registrationEmail); modelAndView.addObject("confirmationMessage", "A confirmation e-mail has been sent to " + user.getEmail()); modelAndView.setViewName("register"); } return modelAndView; } // Process confirmation link @RequestMapping(value = "/confirm", method = RequestMethod.GET) public ModelAndView confirmRegistration(ModelAndView modelAndView, @RequestParam("token") String token) { User user = userService.findByConfirmationToken(token); if (user == null) { // No token found in DB modelAndView.addObject("invalidToken", "Oops! This is an invalid confirmation link."); } else { // Token found modelAndView.addObject("confirmationToken", user.getConfirmationToken()); } modelAndView.setViewName("confirm"); return modelAndView; } // Process confirmation link @RequestMapping(value = "/confirm", method = RequestMethod.POST) public ModelAndView confirmRegistration(ModelAndView modelAndView, BindingResult bindingResult, @RequestParam Map<String, String> requestParams, RedirectAttributes redir) { modelAndView.setViewName("confirm"); Zxcvbn passwordCheck = new Zxcvbn(); Strength strength = passwordCheck.measure(requestParams.get("password")); if (strength.getScore() < 3) { //modelAndView.addObject("errorMessage", "Your password is too weak. Choose a stronger one."); bindingResult.reject("password"); redir.addFlashAttribute("errorMessage", "Your password is too weak. Choose a stronger one."); modelAndView.setViewName("redirect:confirm?token=" + requestParams.get("token")); System.out.println(requestParams.get("token")); return modelAndView; } // Find the user associated with the reset token User user = userService.findByConfirmationToken(requestParams.get("token")); // Set new password user.setPassword(bCryptPasswordEncoder.encode(requestParams.get("password"))); // Set user to enabled user.setEnabled(true); // Save user userService.saveUser(user); modelAndView.addObject("successMessage", "Your password has been set!"); return modelAndView; } }
[ "hendisantika@gmail.com" ]
hendisantika@gmail.com
fede24b1fe6b25e7f549419c53e0b5d8203657a5
3b34ec3651055b290f99ebb43a7db0169022c924
/DS4P/access-control-service/common-library/src/main/java/org/hl7/v3/IVXBTS.java
2ffa158e74fa01634c2fe0a39e6717c103ff1d4f
[ "BSD-3-Clause" ]
permissive
pmaingi/Consent2Share
f9f35e19d124cd40275ef6c43953773f0a3e6f25
00344812cd95fdc75a9a711d35f92f1d35f10273
refs/heads/master
2021-01-11T01:20:55.231460
2016-09-29T16:58:40
2016-09-29T16:58:40
70,718,518
1
0
null
2016-10-12T16:21:33
2016-10-12T16:21:33
null
UTF-8
Java
false
false
594
java
package org.hl7.v3; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name="IVXB_TS") public class IVXBTS extends TS { @XmlAttribute(name="inclusive") protected Boolean inclusive; public boolean isInclusive() { if (this.inclusive == null) { return true; } return this.inclusive.booleanValue(); } public void setInclusive(Boolean value) { this.inclusive = value; } }
[ "tao.lin@feisystems.com" ]
tao.lin@feisystems.com
dac799bf2d1b2ea78a3995b60b92f50a06cbf39d
462c6815dadc83b1bd406fba29ab0c905cf4bc05
/src/bee/generated/client/MessageDescriptionExtension.java
aff883cb547deb13e1ebaa96c5e2a310d660942c
[]
no_license
francoisperron/learning-soap-onvif
ab89b38d770547c0b9ad17a45865c7b8adea5d09
6a0ed9167ad8c2369993da21a5d115a309f42e16
refs/heads/master
2020-05-14T23:53:35.084374
2019-04-18T02:33:17
2019-04-18T02:33:17
182,002,749
1
0
null
null
null
null
UTF-8
Java
false
false
1,881
java
package bee.generated.client; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * <p>Java class for MessageDescriptionExtension complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MessageDescriptionExtension"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MessageDescriptionExtension", propOrder = { "any" }) public class MessageDescriptionExtension { @XmlAnyElement(lax = true) protected List<Object> any; /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Element } * {@link Object } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } }
[ "fperron@gmail.com" ]
fperron@gmail.com
e34f5938791cc06909d8af83a52b4205ba50cd53
2b3e0c89b9ef2d01a1014723eb2659330f29c0c1
/Core Service Java Client/src/com/sdltridion/contentmanager/coreservice/_2012/BatchMove.java
e11ed50cd8e558905ba9e1824ed075e86119bfcd
[]
no_license
mitza13/yet-another-tridion-blog
def0263f9797e62239956733da1682c2ebc08aec
a803ec3772d02dbfc76a21e7a5d44cc9ec87aac3
refs/heads/master
2021-01-20T04:28:52.805980
2018-04-06T14:54:57
2018-04-06T14:54:57
42,700,739
2
1
null
null
null
null
UTF-8
Java
false
false
2,445
java
package com.sdltridion.contentmanager.coreservice._2012; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import com.sdltridion.contentmanager.r6.ArrayOfWeakLink; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="subjectLinks" type="{http://www.sdltridion.com/ContentManager/R6}ArrayOfWeakLink" minOccurs="0"/> * &lt;element name="destinationId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "subjectLinks", "destinationId" }) @XmlRootElement(name = "BatchMove") public class BatchMove { @XmlElement(nillable = true) protected ArrayOfWeakLink subjectLinks; @XmlElement(nillable = true) protected String destinationId; /** * Gets the value of the subjectLinks property. * * @return * possible object is * {@link ArrayOfWeakLink } * */ public ArrayOfWeakLink getSubjectLinks() { return subjectLinks; } /** * Sets the value of the subjectLinks property. * * @param value * allowed object is * {@link ArrayOfWeakLink } * */ public void setSubjectLinks(ArrayOfWeakLink value) { this.subjectLinks = value; } /** * Gets the value of the destinationId property. * * @return * possible object is * {@link String } * */ public String getDestinationId() { return destinationId; } /** * Sets the value of the destinationId property. * * @param value * allowed object is * {@link String } * */ public void setDestinationId(String value) { this.destinationId = value; } }
[ "mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6" ]
mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6
127eef818ed1114342ae16ba1a6fbc89f51808eb
1c7d2d5cc03112ae3fc1351c0c544faf2132c03f
/com/google/android/android/common/data/DataBufferSafeParcelable.java
90ae019df1e31eb4a8ff16772d6a9e4822b81710
[]
no_license
RishikReddy2408/OS_Hack_1.0.1
e49eff837ae4f9a03fee9f56c5a3041a3e58dce4
23352a6ec7ee17e23a1f5bc0b85ae07f0c3aeeb6
refs/heads/master
2020-08-21T13:05:23.391312
2019-10-20T05:51:15
2019-10-20T05:51:15
216,165,741
6
3
null
null
null
null
UTF-8
Java
false
false
1,776
java
package com.google.android.android.common.data; import android.content.ContentValues; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.google.android.gms.common.annotation.KeepForSdk; @KeepForSdk public class DataBufferSafeParcelable<T extends com.google.android.gms.common.internal.safeparcel.SafeParcelable> extends com.google.android.gms.common.data.AbstractDataBuffer<T> { private static final String[] zaln = { "data" }; private final Parcelable.Creator<T> zalo; public DataBufferSafeParcelable(DataHolder paramDataHolder, Parcelable.Creator paramCreator) { super(paramDataHolder); zalo = paramCreator; } public static void addValue(DataHolder.Builder paramBuilder, com.google.android.android.common.internal.safeparcel.SafeParcelable paramSafeParcelable) { Parcel localParcel = Parcel.obtain(); paramSafeParcelable.writeToParcel(localParcel, 0); paramSafeParcelable = new ContentValues(); paramSafeParcelable.put("data", localParcel.marshall()); paramBuilder.withRow(paramSafeParcelable); localParcel.recycle(); } public static DataHolder.Builder buildDataHolder() { return DataHolder.builder(zaln); } public com.google.android.android.common.internal.safeparcel.SafeParcelable get(int paramInt) { Object localObject = mDataHolder.getByteArray("data", paramInt, mDataHolder.getWindowIndex(paramInt)); Parcel localParcel = Parcel.obtain(); localParcel.unmarshall((byte[])localObject, 0, localObject.length); localParcel.setDataPosition(0); localObject = (com.google.android.android.common.internal.safeparcel.SafeParcelable)zalo.createFromParcel(localParcel); localParcel.recycle(); return localObject; } }
[ "rishik.s.m.reddy@gmail.com" ]
rishik.s.m.reddy@gmail.com
9629adb85d52f9fda91145bd731c1d0f37de1851
3b55fa2ab12a3034cd38a7ace86b9d6adc9127db
/default/coordinacionacademica/gen/direc/students/index/NameProperty.java
b73dc89d8c2dfc501cfc3a981607298530aea886
[]
no_license
ellishia/CEIP
e1b58eb5fef0aa7130845f2f31c4c96f4f348c5a
206177a0924d1f0c0e84f77a93976fd9439d9645
refs/heads/master
2020-12-30T09:58:04.809910
2013-05-13T08:45:27
2013-05-13T08:45:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package direc.students.index; import org.monet.metamodel.AttributeProperty; @SuppressWarnings("all") public class NameProperty extends AttributeProperty { public NameProperty() { super();this._code = "imphcdia"; this._name = "Name"; this._label = "Nombre"; this._type = org.monet.metamodel.AttributeProperty.TypeEnumeration.STRING; } public static String static_getName() { return "Name"; } }
[ "askerosi@askerosi-laptop.(none)" ]
askerosi@askerosi-laptop.(none)
f8b2a35c2a84437ad7c741fc47962811ca84ca41
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/domain/AlipayOpenPublicGroupCrowdQueryModel.java
b215e21cebc84e4c17e7ee82c5624656ff33d72a
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 人群数量查询 * * @author auto create * @since 1.0, 2020-02-19 15:44:30 */ public class AlipayOpenPublicGroupCrowdQueryModel extends AlipayObject { private static final long serialVersionUID = 4482964133829665195L; /** * 用户分组的规则项列表,规则项之间元素是与的逻辑,每个规则项内部用多个值表示或的逻辑 */ @ApiListField("label_rule") @ApiField("complex_label_rule") private List<ComplexLabelRule> labelRule; public List<ComplexLabelRule> getLabelRule() { return this.labelRule; } public void setLabelRule(List<ComplexLabelRule> labelRule) { this.labelRule = labelRule; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
40f818ca32119191d7fea75fc47034148ef763a3
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_51469.java
8ae60812e070a171441b96b2a0b6cf501afce6cc
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
775
java
/** * Generate a CodeClimateIssue suitable for processing into JSON from the given RuleViolation. * @param rv RuleViolation to convert. * @return The generated issue. */ private CodeClimateIssue asIssue(RuleViolation rv){ CodeClimateIssue issue=new CodeClimateIssue(); issue.check_name=rule.getName(); issue.description=cleaned(rv.getDescription()); issue.content=new CodeClimateIssue.Content(BODY_PLACEHOLDER); issue.location=getLocation(rv); issue.remediation_points=getRemediationPoints(); issue.categories=getCategories(); switch (rule.getPriority()) { case HIGH: issue.severity="critical"; break; case MEDIUM_HIGH: case MEDIUM: case MEDIUM_LOW: issue.severity="normal"; break; case LOW: default : issue.severity="info"; break; } return issue; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
ccf40850e9eaf34ec7cb3600853201dad6c8ede9
3f38441c63a0594a7fde9bc410d938034f44c01a
/src/main/java/ni/org/ics/estudios/movil/controller/seroprevalencia/ParticipanteSeroprevalenciaController.java
f5b7a6c9be45f1d84fed34fd8a4a1fb804eeda92
[]
no_license
msalinasicsni/estudios-ics
08362aa7aeaf1c8b72cd9981820ebb3afc39f5c5
18bf52c68bfc5ddcf92a8b6c119744328b4cf415
refs/heads/master
2022-12-24T06:53:24.073574
2022-12-19T17:06:22
2022-12-19T17:06:22
187,891,317
0
1
null
2019-05-21T18:18:42
2019-05-21T18:18:41
null
UTF-8
Java
false
false
2,654
java
package ni.org.ics.estudios.movil.controller.seroprevalencia; import ni.org.ics.estudios.domain.seroprevalencia.ParticipanteSeroprevalencia; import ni.org.ics.estudios.service.seroprevalencia.ParticipanteSeroprevalenciaService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import java.util.Arrays; import java.util.List; /** * Created by Miguel Salinas on 5/5/2017. * V1.0 */ @Controller @RequestMapping("/movil/*") public class ParticipanteSeroprevalenciaController { private static final Logger logger = LoggerFactory.getLogger(ParticipanteSeroprevalenciaController.class); @Resource(name = "participanteSeroprevalenciaService") private ParticipanteSeroprevalenciaService participanteSeroprevalenciaService; /** * Acepta una solicitud GET para JSON * @return JSON */ @RequestMapping(value = "participantesSA", method = RequestMethod.GET, produces = "application/json") public @ResponseBody List<ParticipanteSeroprevalencia> getParticipantesSA() { logger.info("Descargando toda la informacion de Participante seroprevalencia arbovirus" ); List<ParticipanteSeroprevalencia> respuestaList = participanteSeroprevalenciaService.getParticipantesSA(); if (respuestaList == null){ logger.debug("Nulo"); } return respuestaList; } /** * Acepta una solicitud POST con un par�metro JSON * @param participantesArray Objeto serializado de ParticipanteSeroprevalencia * @return String con el resultado */ @RequestMapping(value = "participantesSA", method = RequestMethod.POST, consumes = "application/json") public @ResponseBody String saveParticipantesSA(@RequestBody ParticipanteSeroprevalencia[] participantesArray){ logger.debug("Insertando/Actualizando formularios Participante seroprevalencia arbovirus"); if (participantesArray == null){ logger.debug("Nulo"); return "No recibi nada!"; }else{ List<ParticipanteSeroprevalencia> participantes = Arrays.asList(participantesArray); for (ParticipanteSeroprevalencia participante : participantes){ participanteSeroprevalenciaService.saveOrUpdateParticipanteSA(participante); } } return "Datos recibidos!"; } }
[ "msalinas@icsnicaragua.org" ]
msalinas@icsnicaragua.org
0904e0db798240fe26b22f1482bf22053001917a
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/kyptLBSapi/src/java/com/kypt/c2pp/inside/msg/resp/SndmResp.java
023c61e0c8fb7b7c967ca8f37f48677b5555c9bc
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,374
java
package com.kypt.c2pp.inside.msg.resp; import java.io.UnsupportedEncodingException; import com.kypt.c2pp.inside.msg.InsideMsgResp; import com.kypt.c2pp.util.ValidationUtil.GENERAL_STATUS; import com.kypt.configuration.C2ppCfg; /** * 信息下发类指令通用应答 */ public class SndmResp extends InsideMsgResp { public static final String COMMAND = "sndm_resp"; private String status; public SndmResp(){ super.setCommand(COMMAND); } public String getStatus() { return status; } public void setStatus(GENERAL_STATUS setStatus) { switch (setStatus) { case success: this.status = "0"; break; case failure: this.status = "1"; break; case sendfailure: this.status = "2"; break; case nonsupport: this.status = "3"; break; case notonline: this.status = "4"; break; case timeout: this.status = "5"; break; } } @Override public byte[] getBytes() throws UnsupportedEncodingException { String req = this.toString(); if (this.getEncoding() != null &&this.getEncoding().length() > 0) { return req.getBytes(this.getEncoding()); } else { return req.getBytes(); } } public String toString() { return "CAITR " + this.getSeq() + " " + this.getOemId()+"_"+this.getDeviceNo() + " 0 " + "D_SNDM {RET:" + this.status + "}\r\n"; } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
90eccb8ac2239e8d282808ce8070511f24013b21
6ffd590dbf461bd5bc68c75ed8357c3bc85a2bea
/dl4j-eclipse/src/deeplearning4j_nn/src/main/java/org/deeplearning4j/nn/layers/OutputLayer.java
0bbabacbc488b1f86d62ca78a4f5d082ba7444ff
[]
no_license
nagyistge/dl4j_for_eclipse
e017fcfd545c879e18f91d36c15d46872fba390f
8fb1a2d813dd064d7b46e24e8b696c364d84c6b6
refs/heads/master
2021-06-14T16:11:23.572374
2017-02-13T07:15:41
2017-02-13T07:15:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,432
java
/* * * * Copyright 2015 Skymind,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 deeplearning4j_nn.src.main.java.org.deeplearning4j.nn.layers; //import org.deeplearning4j.nn.conf.NeuralNetConfiguration; import org.nd4j.linalg.api.ndarray.INDArray; import deeplearning4j_nn.src.main.java.org.deeplearning4j.nn.conf.NeuralNetConfiguration; /** * Output layer with different objective * incooccurrences for different objectives. * This includes classification as well as prediction * @author Adam Gibson * */ public class OutputLayer extends BaseOutputLayer<deeplearning4j_nn.src.main.java.org.deeplearning4j.nn.conf.layers.OutputLayer> { public OutputLayer(NeuralNetConfiguration conf) { super(conf); } public OutputLayer(NeuralNetConfiguration conf, INDArray input) { super(conf, input); } }
[ "iamlamd@yahoo.co.jp" ]
iamlamd@yahoo.co.jp
afd0ad877d50a7610baa1f49b17f613e53f011f6
7736da1e7eb763d838e6715e89293d75ea536d3a
/a20/src/main/java/memoizrlabs/com/a20/util6/util5/util1/Ut2.java
5142a1ecfc93a131fce49d9b553d8811609a5df3
[ "Apache-2.0" ]
permissive
memoizr/gradle-build-times-stress-test
6944af4a731bda6e84cd27525837b4efed84ebcf
16bf4e9c8291ad90ccc083f287fb00a8218a43e8
refs/heads/master
2020-09-21T04:36:39.864158
2016-09-13T12:11:15
2016-09-13T12:11:15
67,682,637
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package memoizrlabs.com.a20.util6.util5.util1; public class Ut2 { class Foo { public void printHey() { System.out.println("hey"); } } class Foo2 { public void printHey() { System.out.println("hey"); } } class Foo3 { public void printHey() { System.out.println("hey"); } } class Foo4 { public void printHey() { System.out.println("hey"); } } }
[ "memoizrlabs@gmail.com" ]
memoizrlabs@gmail.com
627e09c6c025d3cc2acfcad81f9a90781762f0db
81ba543811bfffb16731c334793dc883c7d92e9f
/src/main/java/head_01/demo_db/DateBaseDemo.java
97b5eb7cf131c84e1f7083240735ac2ff7579fc6
[]
no_license
lrutivi/HeadFirstSQL-1
3a8d926d9630b4d5d50a788f048e31b7a8a76254
c96a9e978a6b55135e8c5cd85eb5e6eb1aa8f6d9
refs/heads/master
2020-06-24T15:29:57.989781
2017-09-11T17:57:16
2017-09-11T17:57:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package head_01.demo_db; import java.sql.SQLException; public class DateBaseDemo { public static void main(String[] args) throws ClassNotFoundException, SQLException { Conn.Conn(); // Conn.CreateDB(); // Conn.WriteDB(); // Conn.WriteDB(); Conn.ReadDB(); Conn.CloseDB(); } }
[ "timon2@ukr.net" ]
timon2@ukr.net
e41c03f57dfd968ea8a8600a003815fc9ee6a614
4ce49a5b41e5b30a39eacd1b829c10c5c336e43d
/json-path/src/main/java/io/restassured/mapper/factory/DefaultGsonObjectMapperFactory.java
8a9934de970998092b1f9839689881a6f87f04c3
[ "Apache-2.0" ]
permissive
britka/rest-assured
50f351d6c4a3af4f7c5135d9c88859cdf005f813
a61192c842de03bc646f5b96fd00a184e32651af
refs/heads/master
2021-01-11T18:25:42.793588
2018-06-29T11:49:21
2018-06-29T11:49:21
79,540,136
1
2
Apache-2.0
2020-08-25T08:48:42
2017-01-20T08:19:24
Java
UTF-8
Java
false
false
934
java
/* * Copyright 2016 the original author or authors. * * 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 io.restassured.mapper.factory; import com.google.gson.Gson; import java.lang.reflect.Type; /** * Simply creates a new Gson instance. */ public class DefaultGsonObjectMapperFactory implements GsonObjectMapperFactory { public Gson create(Type cls, String charset) { return new Gson(); } }
[ "johan.haleby@gmail.com" ]
johan.haleby@gmail.com
69073dc802bdb6fc87cb8b109e979055a83de516
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/class/sling/912.java
0b4a0dadad770dd5310c83019d9e8129304f064b
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
6,520
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sling.bundleresource.impl; import static org.apache.jackrabbit.JcrConstants.NT_FILE; import static org.apache.jackrabbit.JcrConstants.NT_FOLDER; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Iterator; import org.apache.sling.api.resource.AbstractResource; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceMetadata; import org.apache.sling.api.resource.ResourceResolver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** A Resource that wraps a Bundle entry */ public class BundleResource extends AbstractResource { /** default log */ private final Logger log = LoggerFactory.getLogger(getClass()); private final ResourceResolver resourceResolver; private final BundleResourceCache bundle; private final MappedPath mappedPath; private final String path; private URL url; private final String resourceType; private final ResourceMetadata metadata; public static BundleResource getResource(ResourceResolver resourceResolver, BundleResourceCache bundle, MappedPath mappedPath, String resourcePath) { String entryPath = mappedPath.getEntryPath(resourcePath); // first try, whether the bundle has an entry with a trailing slash // which would be a folder. In this case we check whether the // repository contains an item with the same path. If so, we // don't create a BundleResource but instead return null to be // able to return an item-based resource URL entry = bundle.getEntry(entryPath.concat("/")); if (entry != null) { // append the slash to path for next steps resourcePath = resourcePath.concat("/"); } // which would then of course be a file if (entry == null) { entry = bundle.getEntry(entryPath); } // or a bundle file if (entry != null) { return new BundleResource(resourceResolver, bundle, mappedPath, resourcePath); } // the bundle does not contain the path return null; } public BundleResource(ResourceResolver resourceResolver, BundleResourceCache bundle, MappedPath mappedPath, String resourcePath) { this.resourceResolver = resourceResolver; this.bundle = bundle; this.mappedPath = mappedPath; metadata = new ResourceMetadata(); metadata.setResolutionPath(resourcePath); metadata.setCreationTime(bundle.getBundle().getLastModified()); metadata.setModificationTime(bundle.getBundle().getLastModified()); if (resourcePath.endsWith("/")) { this.path = resourcePath.substring(0, resourcePath.length() - 1); this.resourceType = NT_FOLDER; metadata.put(ResourceMetadata.INTERNAL_CONTINUE_RESOLVING, Boolean.TRUE); } else { this.path = resourcePath; this.resourceType = NT_FILE; try { URL url = bundle.getEntry(mappedPath.getEntryPath(resourcePath)); metadata.setContentLength(url.openConnection().getContentLength()); } catch (Exception e) { } } } public String getPath() { return path; } public String getResourceType() { return resourceType; } /** Returns <code>null</code>, bundle resources have no super type */ public String getResourceSuperType() { return null; } public ResourceMetadata getResourceMetadata() { return metadata; } public ResourceResolver getResourceResolver() { return resourceResolver; } @Override @SuppressWarnings("unchecked") public <Type> Type adaptTo(Class<Type> type) { if (type == InputStream.class) { // unchecked cast return (Type) getInputStream(); } else if (type == URL.class) { // unchecked cast return (Type) getURL(); } // fall back to nothing return super.adaptTo(type); } @Override public String toString() { return getClass().getSimpleName() + ", type=" + getResourceType() + ", path=" + getPath(); } // ---------- internal ----------------------------------------------------- /** * Returns a stream to the bundle entry if it is a file. Otherwise returns * <code>null</code>. */ private InputStream getInputStream() { // implement this for files only if (isFile()) { try { URL url = getURL(); if (url != null) { return url.openStream(); } } catch (IOException ioe) { log.error("getInputStream: Cannot get input stream for " + this, ioe); } } // otherwise there is no stream return null; } private URL getURL() { if (url == null) { try { url = new URL(BundleResourceURLStreamHandler.PROTOCOL, null, -1, path, new BundleResourceURLStreamHandler(bundle.getBundle(), mappedPath.getEntryPath(path))); } catch (MalformedURLException mue) { log.error("getURL: Cannot get URL for " + this, mue); } } return url; } @Override public Iterator<Resource> listChildren() { return new BundleResourceIterator(this); } BundleResourceCache getBundle() { return bundle; } MappedPath getMappedPath() { return mappedPath; } boolean isFile() { return NT_FILE.equals(getResourceType()); } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
e0ac411eb734b80980d11dd5114bf08d882a909b
71e7162d2491abcea99e08418e939c7b3e3fd6fb
/sz0099-parent/sz0099-course-app-product/src/main/java/dml/sz0099/course/app/biz/delegate/article/ArticleParagraphDelegateImpl.java
e2dadde1cd6f1e7022adf5155db37fce973cf471
[]
no_license
snowflake3721/sz0099
1b7127daf9aba559425f9fb4ac580892c7cb74f9
0d6252db85f54aa7f1ccbc4fbf86ebe98898ce1b
refs/heads/master
2020-04-29T07:46:17.756488
2019-03-16T11:47:33
2019-03-16T11:47:33
175,964,689
0
0
null
null
null
null
UTF-8
Java
false
false
4,067
java
package dml.sz0099.course.app.biz.delegate.article; import java.io.Serializable; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.alibaba.dubbo.config.annotation.Service; import dml.sz0099.course.app.biz.service.article.ParagraphService; import dml.sz0099.course.app.persist.entity.article.Paragraph; /** * paragraphServiceImpl * 服务代理接口 * ---------------------------------------------------------------------------------------- * Requirement Author Date Function * init bruceyang 2017-08-16 basic init * * */ @Service public class ArticleParagraphDelegateImpl implements ArticleParagraphDelegate, Serializable { private static final Logger LOGGER = LoggerFactory.getLogger(ArticleParagraphDelegateImpl.class); @Autowired private ParagraphService paragraphService; /** * 根据Id查询Paragraph实体对象 * @param id * @return */ @Override public Paragraph findById(Long id) { LOGGER.debug("--- delegate>>>findById begin --------- id is:{} ", id); Paragraph paragraph = paragraphService.findById(id); LOGGER.debug("--- delegate>>>findById end --------- id is:{} , result is {} ", id, paragraph); return paragraph; } @Override public Paragraph findByAid(Long aid) { LOGGER.debug("--- delegate>>>findByAid begin --------- aid is:{} ", aid); Paragraph paragraph = paragraphService.findByAid(aid); LOGGER.debug("--- delegate>>>findByAid end --------- aid is:{} , result is {} ", aid, paragraph); return paragraph; } /** * 根据IdList查询Paragraph实体对象列表 * @param idList * @return */ @Override public List<Paragraph> findByIdList(List<Long> idList) { LOGGER.debug("--- delegate>>>findByIdList begin --------- "); List<Paragraph> paragraphList = paragraphService.findByIdList(idList); LOGGER.debug("--- delegate>>>findByIdList end --------- result is {} ", paragraphList); return paragraphList; } /** * 持久化实体 */ @Override public Paragraph persistEntity(Paragraph paragraph) { LOGGER.debug("--- delegate>>>persistEntity begin --------- "); Paragraph entity = paragraphService.persistEntity(paragraph); Long id = paragraph.getId(); LOGGER.debug("--- delegate>>>persistEntity end , id is:{} ---------", id); return entity; } @Override public Paragraph mergeEntity(Paragraph paragraph) { Long id = paragraph.getId(); LOGGER.debug("--- delegate.mergeEntity begin, id is {} --------- ",id); Paragraph entity = paragraphService.mergeEntity(paragraph); LOGGER.debug("--- delegate.mergeEntity end , id is:{} ---------", id); return entity; } @Override public Paragraph saveOrUpdate(Paragraph paragraph) { Long id = paragraph.getId(); LOGGER.debug("--- delegate.saveOrUpdate begin, id is {} --------- ",id); Paragraph entity = paragraphService.saveOrUpdate(paragraph); LOGGER.debug("--- delegate.saveOrUpdate end , id is:{} ---------", id); return entity; } @Override public Page<Paragraph> findPage(Paragraph paragraph, Pageable pageable) { LOGGER.debug("--- delegate.findPage --------- "); Page<Paragraph> page = paragraphService.findPage(paragraph, pageable); return page; } @Override public boolean existById(Long id) { return paragraphService.existById(id); } public Paragraph createParagraph(Paragraph paragraph ){ LOGGER.debug("-------delegate>>>ParagraphDelegateImpl.createParagraph----------begin---------"); Paragraph entity = paragraphService.createParagraph( paragraph ); return entity; } public void deleteByIdListAndUserId(List<Long> idList, Long userId, boolean cascade ){ LOGGER.debug("-------delegate>>>deleteByIdListAndUserId----------begin---------"); paragraphService.deleteByIdListAndUserId(idList, userId, cascade); } public Paragraph persistForPhoto(Paragraph paragraph) { return paragraphService.persistForPhoto(paragraph); } }
[ "1839604586@qq.com" ]
1839604586@qq.com
8049e1ea83c8d2ec95f9f905b55e621ac6b4d9cc
b7a72c5cfbd4568d1369effb827ad7359f2c842d
/src/test/java/springbook/user/sqlservice/repository/EmbeddedSqlRegistryTest.java
a0dce97b5ee808adefdc32fa4e6ef45684a28255
[]
no_license
yangfriendship/tobyspring
e62696387012518fb462a2c00cdd1a1bb8ee3780
deff9b00f4e50cdf9803b87a11b97aa36c9a3135
refs/heads/main
2023-06-18T08:15:26.999993
2021-07-15T07:38:04
2021-07-15T07:38:04
327,917,024
0
0
null
null
null
null
UTF-8
Java
false
false
2,443
java
package springbook.user.sqlservice.repository; import static junit.framework.Assert.fail; import java.util.HashMap; import java.util.Map; import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import springbook.user.exception.SqlUpdateFailureException; public class EmbeddedSqlRegistryTest extends AbstractSqlRegistryTest { private EmbeddedDatabase database; @Override protected UpdateTableSqlRegistry createSqlRegistry() { database = new EmbeddedDatabaseBuilder() .setType(EmbeddedDatabaseType.HSQL) .addScript("/sqlmap/sqlmapSchema.sql") .build(); EmbeddedDbSqlRegistry registry = new EmbeddedDbSqlRegistry(); registry.setDataSource(database); return registry; } @Test public void transactionTest() { super.sqlmap.put("KEY1", "CHANGED1"); super.sqlmap.put("KEY2", "CHANGED2"); super.sqlRegistry.updateSql(super.sqlmap); String findKey = sqlRegistry.findSql("KEY1"); Assert.assertEquals("CHANGED1", findKey); } @After public void tearDown() { database.shutdown(); } @Test public void transactionUpdateTest(){ checkFindResult("SQL1","SQL2","SQL3"); Map<String,String> sqlmap = new HashMap<String, String>(); sqlmap.put("KEY1","Modified1"); sqlmap.put("UNKNOWN_KEY","Modified9999"); try{ super.sqlRegistry.updateSql(sqlmap); fail(); }catch (SqlUpdateFailureException e){ checkFindResult("SQL1","SQL2","SQL3"); } } class TestUpdateTableSqlRegistry extends EmbeddedDbSqlRegistry { private final String DEFAULT_TARGET_KEY = "KEY1"; private String EXCEPTION_TARGET_KEY = DEFAULT_TARGET_KEY; public void setEXCEPTION_TARGET_KEY(String EXCEPTION_TARGET_KEY) { this.EXCEPTION_TARGET_KEY = EXCEPTION_TARGET_KEY; } @Override public void updateSql(String key, String sql) throws SqlUpdateFailureException { if (key.equals(EXCEPTION_TARGET_KEY)) { throw new RuntimeException(); } super.updateSql(key, sql); } } }
[ "yangfriendship@naver.com" ]
yangfriendship@naver.com
7d69333bfbadfd57d4bb4488639cfa8f9cded1e0
1e425d8861c4016eb3e379c76f741ddb1d60ed8b
/mobi/mmdt/ott/view/contact/p209a/C1961h.java
3657b8a823f9672a1938950a2c1e123ce71ae1e6
[]
no_license
jayarambaratam/Soroush
302ebd5b172e511354969120c89f4e82cdb297bf
21e6b9a1ab415262db1f97a9a6e02a8827e01184
refs/heads/master
2021-01-17T22:50:54.415189
2016-02-04T10:57:55
2016-02-04T10:57:55
52,431,208
2
1
null
2016-02-24T09:42:40
2016-02-24T09:42:40
null
UTF-8
Java
false
false
607
java
package mobi.mmdt.ott.view.contact.p209a; import android.text.Editable; import android.text.TextWatcher; /* renamed from: mobi.mmdt.ott.view.contact.a.h */ class C1961h implements TextWatcher { final /* synthetic */ C1960g f6294a; C1961h(C1960g c1960g) { this.f6294a = c1960g; } public void afterTextChanged(Editable editable) { } public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { this.f6294a.f6292k.m9243a(charSequence.toString()); } }
[ "grayhat@kimo.com" ]
grayhat@kimo.com
d84969d9b9e620767b3098ec981165b9da41087f
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project32/src/test/java/org/gradle/test/performance32_1/Test32_72.java
337c286aaa2e8bd9b065401cd7a67171056ab660
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
289
java
package org.gradle.test.performance32_1; import static org.junit.Assert.*; public class Test32_72 { private final Production32_72 production = new Production32_72("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
abd6431cf6458b47e37062fc13765c83c0c0e192
e787a594807d6f654a7f3bc935bd7b598e4ac936
/src/main/java/org/jenkinsci/plugins/uicontrol/path_browser/TreeNode.java
0bcb8995bc88fe0368331d980cdb6dfcf651e2ac
[]
no_license
cloudbees/ui-control-plugin
9f1a806458d533db7f898a4cb6b140aff3d6e7db
b9352cc1d55da4d429b23e62cd30f91b7edbaade
refs/heads/master
2021-01-19T12:58:49.037097
2015-02-24T18:36:50
2015-02-24T18:36:50
31,089,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
package org.jenkinsci.plugins.uicontrol.path_browser; import hudson.util.HttpResponses; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; import javax.servlet.ServletException; import java.io.IOException; /** * @author Kohsuke Kawaguchi */ @ExportedBean public abstract class TreeNode implements HttpResponse { /** * Opaque ID that client-side JavaScript doesn't try to interpret. */ @Exported public abstract String getPath(); /** * Human readable name of this particular node. * This name shouldn't include the names of the ancestors. */ @Exported(name="name") public abstract String getDisplayName(); /** * Can this node possibly have children? * * Used as UI cue. */ @Exported public abstract boolean hasChildren(); /** * Can this node be selected as the value of the control? */ @Exported public abstract boolean isSelectable(); /** * TODO: needs better documentation * * Used to draw icons in the left of the item. This value will be directly appended to the CSS class of * the LI element. The caller is expected to insert separate CSS stylesheet that binds this to the appropriate * icons. * * This is also used to sort children by similar kinds (such as jobs vs folders) */ @Exported public abstract String getType(); public abstract Iterable<TreeNode> children(); public abstract TreeNode resolve(String relPath); public abstract TreeNode getParent(); /** * {@link TreeNode} should produce a path. */ @Override public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { HttpResponses.plainText(getPath()).generateResponse(req,rsp,node); } }
[ "kk@kohsuke.org" ]
kk@kohsuke.org
c412536c851e6ddd9a1ad02b579235df8b8f9916
962beabf61c4b23519937d0f4120ac2ab2f78672
/src/test/java/io/reactivex/internal/operators/maybe/MaybeDoAfterSuccessTest.java
7ac8714d4515eab45ca99aacd2249918bf906a69
[ "Apache-2.0" ]
permissive
kiranu1024/RxJava-framework
bafc16c460fb6aad1db2e328a8437f48530d35d2
ed268e487d6a411f1e4b1e8d618a8b92a4e957d1
refs/heads/master
2020-06-18T06:42:41.345654
2019-07-10T12:35:08
2019-07-10T12:35:08
196,200,410
1
0
null
null
null
null
UTF-8
Java
false
false
4,249
java
/** * Copyright (c) 2016-present, RxJava Contributors. * * 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 io.reactivex.internal.operators.maybe; import static org.junit.Assert.*; import java.util.*; import org.junit.Test; import io.reactivex.*; import io.reactivex.exceptions.TestException; import io.reactivex.functions.*; import io.reactivex.internal.functions.Functions; import io.reactivex.observers.TestObserver; import io.reactivex.plugins.RxJavaPlugins; import io.reactivex.subjects.PublishSubject; import io.reactivex.testsupport.TestHelper; public class MaybeDoAfterSuccessTest { final List<Integer> values = new ArrayList<Integer>(); final Consumer<Integer> afterSuccess = new Consumer<Integer>() { @Override public void accept(Integer e) throws Exception { values.add(-e); } }; final TestObserver<Integer> to = new TestObserver<Integer>() { @Override public void onNext(Integer t) { super.onNext(t); MaybeDoAfterSuccessTest.this.values.add(t); } }; @Test public void just() { Maybe.just(1) .doAfterSuccess(afterSuccess) .subscribeWith(to) .assertResult(1); assertEquals(Arrays.asList(1, -1), values); } @Test public void error() { Maybe.<Integer>error(new TestException()) .doAfterSuccess(afterSuccess) .subscribeWith(to) .assertFailure(TestException.class); assertTrue(values.isEmpty()); } @Test public void empty() { Maybe.<Integer>empty() .doAfterSuccess(afterSuccess) .subscribeWith(to) .assertResult(); assertTrue(values.isEmpty()); } @Test(expected = NullPointerException.class) public void consumerNull() { Maybe.just(1).doAfterSuccess(null); } @Test public void justConditional() { Maybe.just(1) .doAfterSuccess(afterSuccess) .filter(Functions.alwaysTrue()) .subscribeWith(to) .assertResult(1); assertEquals(Arrays.asList(1, -1), values); } @Test public void errorConditional() { Maybe.<Integer>error(new TestException()) .doAfterSuccess(afterSuccess) .filter(Functions.alwaysTrue()) .subscribeWith(to) .assertFailure(TestException.class); assertTrue(values.isEmpty()); } @Test public void emptyConditional() { Maybe.<Integer>empty() .doAfterSuccess(afterSuccess) .filter(Functions.alwaysTrue()) .subscribeWith(to) .assertResult(); assertTrue(values.isEmpty()); } @Test public void consumerThrows() { List<Throwable> errors = TestHelper.trackPluginErrors(); try { Maybe.just(1) .doAfterSuccess(new Consumer<Integer>() { @Override public void accept(Integer e) throws Exception { throw new TestException(); } }) .test() .assertResult(1); TestHelper.assertUndeliverable(errors, 0, TestException.class); } finally { RxJavaPlugins.reset(); } } @Test public void dispose() { TestHelper.checkDisposed(PublishSubject.<Integer>create().singleElement().doAfterSuccess(afterSuccess)); } @Test public void doubleOnSubscribe() { TestHelper.checkDoubleOnSubscribeMaybe(new Function<Maybe<Integer>, MaybeSource<Integer>>() { @Override public MaybeSource<Integer> apply(Maybe<Integer> m) throws Exception { return m.doAfterSuccess(afterSuccess); } }); } }
[ "satyakiran.vakada@gmail.com" ]
satyakiran.vakada@gmail.com
3692a41939d57c7c4b5cc2c4f23e03aec79b1d6a
eb1dec8dffe0a459f229fa190d626b265f8df4f5
/src/main/java/kmer/forcomparisononly/atomicintegerarray/UnbalancedAtomicIntegerArrayKMerCounter.java
24ce7e2d879477641ce6327bfcc1cdc08ff15c12
[]
no_license
caoxxoac/CSE231
03770d2f556111e58475efa290fcc29312bd15f2
9cb56071653547dfc2e8ce10aa9e86be7c4a4c14
refs/heads/master
2022-01-19T19:30:00.594111
2019-07-22T08:43:24
2019-07-22T08:43:24
198,167,964
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
/******************************************************************************* * Copyright (C) 2016-2017 Dennis Cosgrove * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ package kmer.forcomparisononly.atomicintegerarray; import static edu.wustl.cse231s.v5.V5.forall; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicIntegerArray; import edu.wustl.cse231s.NotYetImplementedException; import kmer.core.KMerCount; import kmer.core.KMerCounter; import kmer.core.KMerUtils; import kmer.core.array.AtomicIntegerArrayKMerCount; /** * @author Xiangzhi Cao * @author Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/) */ public class UnbalancedAtomicIntegerArrayKMerCounter implements KMerCounter { @Override public KMerCount parse(List<byte[]> sequences, int k) throws InterruptedException, ExecutionException { throw new NotYetImplementedException(); } }
[ "xcao22@wustl.edu" ]
xcao22@wustl.edu
a5936ed493e41e88c14aba3fff8fa6aeb0e1d735
160fbf95ff64260dad2ed4c19c78392f26a5d7ec
/src/main/java/stea1th/anagram/helpers/StringSplitter.java
bf193567659deb874fa8544528b0e94316a45a94
[]
no_license
stea1th/anagram
7a942a8da8dec198154b5210031f10ab6c527ea5
503506267e29cae7183c08cc7c8b1766bfa1226f
refs/heads/master
2021-07-06T01:08:11.156913
2019-12-30T11:31:40
2019-12-30T11:31:40
228,591,123
0
0
null
2021-03-31T21:48:59
2019-12-17T10:25:09
Java
UTF-8
Java
false
false
995
java
package stea1th.anagram.helpers; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; public class StringSplitter { public List<String> splitStringToLetters(String word) { String[] array = word.split(""); return Arrays.asList(array); } public Map<String, List<String>> splitLinesToWordsMap(List<String> lines) { List<String> words = new ArrayList<>(); lines.stream() .map(line -> Arrays.asList(line.split(" "))) .map(w -> { List<String> list = new ArrayList<>(); for (String x : w) { if (!x.equals("")) list.add(x); } return list; }) .forEach(words::addAll); return words.stream().collect(Collectors.toMap(string -> string, this::splitStringToLetters)); } }
[ "stea1th@mail.ru" ]
stea1th@mail.ru
f9119b90236c5ee3ce4293dffe195cc1fb09a6b7
85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5
/prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/gestor/bodega/administracion/calendario/ICargaArchivoPlanificacionGestor.java
da878a154d13c6eba62268303ba3755f39c6f909
[]
no_license
SebasBenalcazarS/RepoAngularJS
1d60d0dec454fe4f1b1a8c434b656d55166f066f
5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c
refs/heads/master
2016-08-03T23:21:26.639859
2015-08-19T16:05:00
2015-08-19T16:05:00
40,517,374
1
0
null
null
null
null
UTF-8
Java
false
false
457
java
/** * */ package ec.com.smx.sic.cliente.gestor.bodega.administracion.calendario; import ec.com.smx.sic.cliente.exception.SICException; /** * @author * */ public interface ICargaArchivoPlanificacionGestor { /** * Procesar el archivo con la planificaci&oacute;n para la rececpci&oacute;n de bodegas * @param codigoCompania * @throws SICException */ void procesarArchivoPlanificacionBodega (Integer codigoCompania) throws SICException; }
[ "nbenalcazar@kruger.com.ec" ]
nbenalcazar@kruger.com.ec
9626c48cb61ac259421188449ef9778b818add60
fec4a09f54f4a1e60e565ff833523efc4cc6765a
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/level/levelgen/placement/nether/WorldGenDecoratorCountMultilayer.java
ebc0caba9df189724d4647d59e2f89ac5df1501f
[]
no_license
DefiantBurger/SkyblockItems
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
refs/heads/master
2023-06-23T17:08:45.610270
2021-07-27T03:27:28
2021-07-27T03:27:28
389,780,883
0
0
null
null
null
null
UTF-8
Java
false
false
2,989
java
package net.minecraft.world.level.levelgen.placement.nether; import com.google.common.collect.Lists; import com.mojang.serialization.Codec; import java.util.List; import java.util.Random; import java.util.stream.Stream; import net.minecraft.core.BlockPosition; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.IBlockData; import net.minecraft.world.level.levelgen.HeightMap; import net.minecraft.world.level.levelgen.feature.configurations.WorldGenDecoratorFrequencyConfiguration; import net.minecraft.world.level.levelgen.placement.WorldGenDecorator; import net.minecraft.world.level.levelgen.placement.WorldGenDecoratorContext; public class WorldGenDecoratorCountMultilayer extends WorldGenDecorator<WorldGenDecoratorFrequencyConfiguration> { public WorldGenDecoratorCountMultilayer(Codec<WorldGenDecoratorFrequencyConfiguration> codec) { super(codec); } public Stream<BlockPosition> a(WorldGenDecoratorContext worldgendecoratorcontext, Random random, WorldGenDecoratorFrequencyConfiguration worldgendecoratorfrequencyconfiguration, BlockPosition blockposition) { List<BlockPosition> list = Lists.newArrayList(); int i = 0; boolean flag; do { flag = false; for (int j = 0; j < worldgendecoratorfrequencyconfiguration.a().a(random); ++j) { int k = random.nextInt(16) + blockposition.getX(); int l = random.nextInt(16) + blockposition.getZ(); int i1 = worldgendecoratorcontext.a(HeightMap.Type.MOTION_BLOCKING, k, l); int j1 = a(worldgendecoratorcontext, k, i1, l, i); if (j1 != Integer.MAX_VALUE) { list.add(new BlockPosition(k, j1, l)); flag = true; } } ++i; } while (flag); return list.stream(); } private static int a(WorldGenDecoratorContext worldgendecoratorcontext, int i, int j, int k, int l) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(i, j, k); int i1 = 0; IBlockData iblockdata = worldgendecoratorcontext.a(blockposition_mutableblockposition); for (int j1 = j; j1 >= worldgendecoratorcontext.c() + 1; --j1) { blockposition_mutableblockposition.t(j1 - 1); IBlockData iblockdata1 = worldgendecoratorcontext.a(blockposition_mutableblockposition); if (!a(iblockdata1) && a(iblockdata) && !iblockdata1.a(Blocks.BEDROCK)) { if (i1 == l) { return blockposition_mutableblockposition.getY() + 1; } ++i1; } iblockdata = iblockdata1; } return Integer.MAX_VALUE; } private static boolean a(IBlockData iblockdata) { return iblockdata.isAir() || iblockdata.a(Blocks.WATER) || iblockdata.a(Blocks.LAVA); } }
[ "joseph.cicalese@gmail.com" ]
joseph.cicalese@gmail.com
71afec1a922036bbb96c3347c2907128e1b2b924
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Gallery2/src/main/java/com/android/gallery3d/ui/BitmapScreenNail.java
93374d5ba75819be5302b2600cee705ed3f7609b
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,181
java
package com.android.gallery3d.ui; import android.graphics.Bitmap; import android.graphics.RectF; public class BitmapScreenNail extends AbstractGifScreenNail implements ScreenNail { private final BitmapTexture mBitmapTexture; public BitmapScreenNail(Bitmap bitmap) { this.mBitmapTexture = new BitmapTexture(bitmap); } public int getWidth() { return this.mBitmapTexture.getWidth(); } public int getHeight() { return this.mBitmapTexture.getHeight(); } public void draw(GLCanvas canvas, int x, int y, int width, int height) { if (!super.drawGifIfNecessary(canvas, x, y, width, height)) { this.mBitmapTexture.draw(canvas, x, y, width, height); } } public void noDraw() { } public void recycle() { this.mBitmapTexture.recycle(); super.recycle(); } public void draw(GLCanvas canvas, RectF source, RectF dest) { canvas.drawTexture(this.mBitmapTexture, source, dest); } public Bitmap getBitmap() { return this.mBitmapTexture.getBitmap(); } public boolean isLoaded() { return this.mBitmapTexture.isLoaded(); } }
[ "liming@droi.com" ]
liming@droi.com
f4c97915b41d64db424f33da2518fb99f2129e3b
5c1ca5d9c701a657d5409c7f1d6b2095c8477c29
/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileFolderProperties.java
8f0a9d36465a462854f3c880e43351e04bd1f0f5
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
wbittles/egeria
ce5c0a3b53d7a2ae312382414747153a64244e8f
0e4d8a4e85fb9166bef34b832ff5e3362e2460c2
refs/heads/master
2023-03-10T06:26:27.208177
2022-07-01T11:30:04
2022-07-01T11:30:04
225,344,723
1
0
Apache-2.0
2023-03-01T04:24:51
2019-12-02T10:13:21
Java
UTF-8
Java
false
false
2,493
java
/* SPDX-License-Identifier: Apache 2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.properties; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** * FileFolderProperties defines an asset that is a folder. The qualified name is the fully qualified path name of the folder. */ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class FileFolderProperties extends DataStoreProperties { private static final long serialVersionUID = 1L; /** * Default constructor */ public FileFolderProperties() { super(); } /** * Copy/clone constructor * * @param template object to copy */ public FileFolderProperties(FileFolderProperties template) { super(template); } /** * JSON-style toString * * @return return string containing the property names and values */ @Override public String toString() { return "FileFolderProperties{" + "pathName='" + getPathName() + '\'' + ", createTime=" + getCreateTime() + ", modifiedTime=" + getModifiedTime() + ", encodingType='" + getEncodingType() + '\'' + ", encodingLanguage='" + getEncodingLanguage() + '\'' + ", encodingDescription='" + getEncodingDescription() + '\'' + ", encodingProperties=" + getEncodingProperties() + ", displayName='" + getDisplayName() + '\'' + ", description='" + getDescription() + '\'' + ", qualifiedName='" + getQualifiedName() + '\'' + ", additionalProperties=" + getAdditionalProperties() + ", vendorProperties=" + getVendorProperties() + ", typeName='" + getTypeName() + '\'' + ", extendedProperties=" + getExtendedProperties() + '}'; } }
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
04276a26190b5e07c4dcc79a8b5eeb344c15a2e7
1a5b9fe874ff100fa0799344164e0c9eff66606c
/Algorithm - 201907/18.ExamPreparation-Part I/src/PartV_Exercise/_2_Balls/Balls.java
d9353b840ac47d859b6b8efd69e981f14659e2fb
[]
no_license
NikolovV/Independend
ad2237abec32f085d5ecbbd41e6415a3cfe616b0
701e4b5c9ead64ca7666263398237e5d272fc0f5
refs/heads/master
2021-02-28T08:58:03.386460
2020-12-25T19:08:40
2020-12-25T19:08:40
245,680,270
0
0
null
null
null
null
UTF-8
Java
false
false
1,508
java
package PartV_Exercise._2_Balls; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.stream.Collectors; public class Balls { private static int[] result; private static int pockets; private static int pocketCapacity; private static final StringBuilder output = new StringBuilder(); public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); pockets = Integer.parseInt(reader.readLine()); int balls = Integer.parseInt(reader.readLine()); pocketCapacity = Integer.parseInt(reader.readLine()); result = new int[pockets]; generate(0, balls); System.out.print(output); } private static void generate(int index, int ballsLeft) { if (index == pockets) { if (ballsLeft == 0) { output.append(Arrays.stream(result) .mapToObj(String::valueOf) .collect(Collectors.joining(", "))) .append(System.lineSeparator()); } return; } int ballsToPut = ballsLeft - (pockets - (index + 1)); if (ballsToPut > pocketCapacity) { ballsToPut = pocketCapacity; } for (int i = ballsToPut; i > 0; i--) { result[index] = i; generate(index + 1, ballsLeft - i); } } }
[ "ventci.nikolov@gmail.com" ]
ventci.nikolov@gmail.com