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
299a3edfedf62bd7f2891bb48e96a5e6b9acd9bc
d49e3ff34467c71630681df5a791cb3e4bd72ab7
/src/android/support/v7/view/SupportActionModeWrapper$CallbackWrapper.java
c9c88d7881c35b429b6485c2c3d5e9b170f0a841
[]
no_license
reverseengineeringer/com.gogoair.ife
124691cf49e832f5dd8009ceb590894a7a058dfa
e88a26eec5640274844e6cdafcd706be727e8ae3
refs/heads/master
2020-09-15T19:45:27.094286
2016-09-01T13:32:34
2016-09-01T13:32:34
67,133,682
0
0
null
null
null
null
UTF-8
Java
false
false
2,796
java
package android.support.v7.view; import android.content.Context; import android.support.v4.internal.view.SupportMenu; import android.support.v4.internal.view.SupportMenuItem; import android.support.v4.util.SimpleArrayMap; import android.support.v7.view.menu.MenuWrapperFactory; import android.view.Menu; import android.view.MenuItem; import java.util.ArrayList; public class SupportActionModeWrapper$CallbackWrapper implements ActionMode.Callback { final ArrayList mActionModes; final Context mContext; final SimpleArrayMap mMenus; final android.view.ActionMode.Callback mWrappedCallback; public SupportActionModeWrapper$CallbackWrapper(Context paramContext, android.view.ActionMode.Callback paramCallback) { mContext = paramContext; mWrappedCallback = paramCallback; mActionModes = new ArrayList(); mMenus = new SimpleArrayMap(); } private Menu getMenuWrapper(Menu paramMenu) { Menu localMenu2 = (Menu)mMenus.get(paramMenu); Menu localMenu1 = localMenu2; if (localMenu2 == null) { localMenu1 = MenuWrapperFactory.wrapSupportMenu(mContext, (SupportMenu)paramMenu); mMenus.put(paramMenu, localMenu1); } return localMenu1; } public android.view.ActionMode getActionModeWrapper(ActionMode paramActionMode) { int j = mActionModes.size(); int i = 0; while (i < j) { SupportActionModeWrapper localSupportActionModeWrapper = (SupportActionModeWrapper)mActionModes.get(i); if ((localSupportActionModeWrapper != null) && (mWrappedObject == paramActionMode)) { return localSupportActionModeWrapper; } i += 1; } paramActionMode = new SupportActionModeWrapper(mContext, paramActionMode); mActionModes.add(paramActionMode); return paramActionMode; } public boolean onActionItemClicked(ActionMode paramActionMode, MenuItem paramMenuItem) { return mWrappedCallback.onActionItemClicked(getActionModeWrapper(paramActionMode), MenuWrapperFactory.wrapSupportMenuItem(mContext, (SupportMenuItem)paramMenuItem)); } public boolean onCreateActionMode(ActionMode paramActionMode, Menu paramMenu) { return mWrappedCallback.onCreateActionMode(getActionModeWrapper(paramActionMode), getMenuWrapper(paramMenu)); } public void onDestroyActionMode(ActionMode paramActionMode) { mWrappedCallback.onDestroyActionMode(getActionModeWrapper(paramActionMode)); } public boolean onPrepareActionMode(ActionMode paramActionMode, Menu paramMenu) { return mWrappedCallback.onPrepareActionMode(getActionModeWrapper(paramActionMode), getMenuWrapper(paramMenu)); } } /* Location: * Qualified Name: android.support.v7.view.SupportActionModeWrapper.CallbackWrapper * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
c344bc7a2954cb9bb223ed0e6ee379902d5da145
239fb7a902b74b09762637248200d4b062cccb61
/app/src/main/java/com/xy/lib/zxing/AppPickerActivity.java
bce2e2d4e5501f2f9021926e3abece900f5d0a38
[]
no_license
XiuyeXYE/AndroidUtil
75975a226f9453a58c0156062fc8ebe00048e5a8
b491d632e7853b1e113aab263a9c4b8de118c1c3
refs/heads/master
2022-12-29T12:17:12.373381
2020-10-12T05:41:08
2020-10-12T05:41:08
250,170,310
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
/* * Copyright (C) 2009 ZXing 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.xy.lib.zxing; import android.app.ListActivity; import android.content.Intent; import android.os.AsyncTask; import android.view.View; import android.widget.Adapter; import android.widget.ListView; import java.util.List; /** * Activity for picking an installed application to share via Intent. */ public final class AppPickerActivity extends ListActivity { private AsyncTask<Object, Object, List<AppInfo>> backgroundTask; @Override protected void onResume() { super.onResume(); backgroundTask = new LoadPackagesAsyncTask(this); backgroundTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } @Override protected void onPause() { AsyncTask<?, ?, ?> task = backgroundTask; if (task != null) { task.cancel(true); backgroundTask = null; } super.onPause(); } @Override protected void onListItemClick(ListView l, View view, int position, long id) { Adapter adapter = getListAdapter(); if (position >= 0 && position < adapter.getCount()) { String packageName = ((AppInfo) adapter.getItem(position)).getPackageName(); Intent intent = new Intent(); intent.addFlags(Intents.FLAG_NEW_DOC); intent.putExtra("url", "market://details?id=" + packageName); // Browser.BookmarkColumns.URL setResult(RESULT_OK, intent); } else { setResult(RESULT_CANCELED); } finish(); } }
[ "xiuye_engineer@outlook.com" ]
xiuye_engineer@outlook.com
071facc3c0a4a60cb6f8e01150f9c0579a25540b
191785d1164726bdf1afd96b299fd2ade9231685
/final project/bookstore/src/main/java/com/shetu/bookstore/service/impl/CartItemServiceImpl.java
6daf0b473c7d4a7eb4d78ba6c6107cab9dbbe4bd
[]
no_license
shshetu/Oracle-vendor
0aaf49b5e50adc176f0c46f779c9bdedd82c1540
3ca86278530f0edc8e6856d932af62d64c39c552
refs/heads/master
2020-07-07T12:04:58.376105
2019-09-16T07:04:17
2019-09-16T07:04:17
203,342,566
0
0
null
null
null
null
UTF-8
Java
false
false
2,896
java
package com.shetu.bookstore.service.impl; import com.shetu.bookstore.domain.*; import com.shetu.bookstore.repository.BookToCartItemRepository; import com.shetu.bookstore.repository.CartItemRepository; import com.shetu.bookstore.service.CartItemService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.List; import java.util.Optional; @Service public class CartItemServiceImpl implements CartItemService { @Autowired private CartItemRepository cartItemRepository; @Autowired private BookToCartItemRepository bookToCartItemRepository; @Override public List<CartItem> findByShoppingCart(ShoppingCart shoppingCart) { return cartItemRepository.findByShoppingCart(shoppingCart); } @Override public CartItem updateCartItem(CartItem cartItem) { BigDecimal bigDecimal = new BigDecimal(cartItem.getBook().getOurPrice()).multiply(new BigDecimal(cartItem.getQty())); bigDecimal = bigDecimal.setScale(2,BigDecimal.ROUND_HALF_UP); cartItem.setSubtotal(bigDecimal); cartItemRepository.save(cartItem); return cartItem; } @Override public CartItem addBookToCartItem(Book book, User user, int qty) { List<CartItem> cartItemList = findByShoppingCart(user.getShoppingCart()); for (CartItem cartItem : cartItemList){ if(book.getId() == cartItem.getBook().getId()){ cartItem.setQty(cartItem.getQty()+qty); cartItem.setSubtotal(new BigDecimal(book.getOurPrice()).multiply(new BigDecimal(qty))); cartItemRepository.save(cartItem); return cartItem; } } CartItem cartItem = new CartItem(); cartItem.setShoppingCart(user.getShoppingCart()); cartItem.setBook(book); cartItem.setQty(qty); cartItem.setSubtotal(new BigDecimal(book.getOurPrice()).multiply(new BigDecimal(qty))); cartItem = cartItemRepository.save(cartItem); BookToCartItem bookToCartItem = new BookToCartItem(); bookToCartItem.setBook(book); bookToCartItem.setCartItem(cartItem); bookToCartItemRepository.save(bookToCartItem); return cartItem; } @Override public CartItem findById(Long id) { CartItem cartItem = new CartItem(); Optional<CartItem> tempCartItem = cartItemRepository.findById(id); if(tempCartItem.isPresent()){ cartItem = tempCartItem.get(); } return cartItem; } @Override public void removeCartItem(CartItem cartItem) { bookToCartItemRepository.deleteByCartItem(cartItem); cartItemRepository.delete(cartItem); } @Override public CartItem save(CartItem cartItem) { return cartItemRepository.save(cartItem); } }
[ "shshetu2017@gmail.com" ]
shshetu2017@gmail.com
68065d014b82f71ff4253b53430d7d77443fb2b1
1b738f5326d11005f44f03b7bc50311efdced477
/midas_server/src/main/java/com/victor/midas/calculator/indicator/IndexOfMarketIndex.java
cb362dfa6b1eaf0bb88107f57045bfe5df5416a0
[]
no_license
jk983294/midas_hand
bbbe7910e4a3c73b562108218d765719f379c7bb
a452972700d12f429e2477abd342a7005b168c67
refs/heads/master
2020-04-04T05:40:10.708689
2018-05-28T14:17:29
2018-05-28T14:17:29
43,751,719
0
2
null
null
null
null
UTF-8
Java
false
false
1,798
java
package com.victor.midas.calculator.indicator; import com.victor.midas.calculator.common.IndexCalcBase; import com.victor.midas.model.common.StockType; import com.victor.midas.model.vo.CalcParameter; import com.victor.midas.util.MidasException; /** * tradable stock intersection days of market index */ public class IndexOfMarketIndex extends IndexCalcBase { public final static String INDEX_NAME = "index2MarketIndex"; public final static String INDEX_NAME1 = "marketIndex2Index"; private int[] index2MarketIndex; private int[] marketIndex2Index; public IndexOfMarketIndex(CalcParameter parameter) { super(parameter); } @Override public String getIndexName() { return INDEX_NAME; } @Override public void calculate() throws MidasException { if(!StockType.Index.equals(stock.getStockType())){ int[] marketDates = filterUtil.getMarketIndex().getDatesInt(); marketIndex2Index = new int[marketDates.length]; stock.setCobIndex(0); int marketCob, cobIndex; for (int i = 0; i < marketDates.length; i++) { marketCob = marketDates[i]; cobIndex = stock.getCobIndex(); if(stock.isSameDayWithIndex(marketCob)){ index2MarketIndex[cobIndex] = i; marketIndex2Index[i] = cobIndex; } else { marketIndex2Index[i] = -1; } stock.advanceIndex(marketCob); } addIndexData(INDEX_NAME, index2MarketIndex); // addIndexData(INDEX_NAME1, marketIndex2Index); } } @Override protected void initIndex() throws MidasException { index2MarketIndex = new int[len]; } }
[ "jk983294@gmail.com" ]
jk983294@gmail.com
325cfd2d67cc769eccc7f57c82ae4b11b12841ce
8553367f97586cfb9e878fcaffe7a11b912dbc96
/jdk-source/jdk1.8/src/main/java/org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java
b065558cf190760d820dc3ef613b612cf9036ea1
[]
no_license
GoldWater16/GoldWater
92abb6b4f2e448469408771d8aad96a9b412aa0a
8180d5689c8059c0fe9fbbe2770e8f6947d35c73
refs/heads/master
2023-07-20T12:30:06.481550
2022-05-21T15:27:09
2022-05-21T15:27:09
174,562,633
2
3
null
2023-07-13T17:02:44
2019-03-08T15:36:04
Java
UTF-8
Java
false
false
2,308
java
package org.omg.PortableInterceptor; /** * org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u60/4407/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl * Tuesday, August 4, 2015 11:07:53 AM PDT */ public interface IORInterceptor_3_0Operations extends org.omg.PortableInterceptor.IORInterceptorOperations { /** The components_established method is invoked on all registered * IORInterceptor_3_0 instances after establish_components * has been invoked on all registered IORInterceptor instances. * The adapter_template is available in info during this call. * The current_factory may be get or set in info during this call. * <p> * Any exception thrown from this method is handled by the Object * Adapter that called this interceptor. In the case of the POA, * an exception results in a OBJ_ADAPTER exception with an OMG * standard minor code of 6. * @param info The IORInfo for the object adapter being created. */ void components_established (org.omg.PortableInterceptor.IORInfo info); /** Called whenever the state of an adapter manager changes. * For the POA, that is the POAManager. If the state change * is reported through <code>adapter_manager_state_changed</code>, * it is not reported through <code>adapter_state_changed</code>. * @param id the adapter manager id of the adapter manager that * changed state * @param state the new state of the adapter manager */ void adapter_manager_state_changed (int id, short state); /** Called whenever the state of an object adapter changes, and * the state change is not caused by an adapter manager. Such * changes are reported to all registered <code>IORInterceptor_3_0</code> * instances. * @param templates the sequence of <code>ObjectReferenceTemplate</code> instances * on which this state change occurred. * @param state the new <code>AdapterState</code> shared by all of the templates. */ void adapter_state_changed (org.omg.PortableInterceptor.ObjectReferenceTemplate[] templates, short state); } // interface IORInterceptor_3_0Operations
[ "huzewu@lecloudpay.com" ]
huzewu@lecloudpay.com
95f79422b3d9764ac6d9c4d9501b6659418ca3aa
f5f2d3a992c1dd2eb1724451e82b56ad185007d2
/src/main/java/com/jdon/jivejdon/model/event/UploadFilesSavedEvent.java
725dddbf47bb7db2dc6c2418b9c25ea167c3bd19
[ "Apache-2.0" ]
permissive
zscomehuyue/jivejdon
4912b456b09476851e8baf3df50269d050f14eeb
3f2ef3088184fe9c2128d8f0b5ab4110f9d2b847
refs/heads/master
2020-08-02T07:12:14.512305
2019-10-08T02:44:58
2019-10-08T02:44:58
211,272,769
0
0
null
2019-09-27T08:30:09
2019-09-27T08:30:08
null
UTF-8
Java
false
false
1,135
java
/* * Copyright 2003-2009 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.jdon.jivejdon.model.event; import java.util.Collection; import com.jdon.jivejdon.model.attachment.UploadFile; public class UploadFilesSavedEvent { private final Long messageId; private final Collection<UploadFile> uploads; public UploadFilesSavedEvent(Long messageId, Collection<UploadFile> uploads) { super(); this.messageId = messageId; this.uploads = uploads; } public Long getMessageId() { return messageId; } public Collection<UploadFile> getUploads() { return uploads; } }
[ "banq@163.com" ]
banq@163.com
c7d22d39fd68a1a4291745aca35081be0ae246f5
837a32f471113eeefa2220f977816d5fe1514e7c
/starfish-learn-hadoop/src/main/java/priv/starfish/hadoop/mr/wordcount/WordcountCombiner.java
68272231b0c0d5a35123510221726da7cf97d6c1
[]
no_license
Jstarfish/starfish-learning
cc218149f278a585ad7531d9278299a217ff302f
5b5f84344e040c5572276e11aa4f5fd96d5d03c9
refs/heads/master
2023-09-04T03:39:25.178705
2023-08-17T08:49:26
2023-08-17T08:49:26
143,983,467
4
5
null
2023-01-02T22:12:42
2018-08-08T08:23:29
JavaScript
UTF-8
Java
false
false
747
java
package priv.starfish.hadoop.mr.wordcount; import java.io.IOException; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; public class WordcountCombiner extends Reducer<Text, IntWritable, Text, IntWritable> { IntWritable v = new IntWritable(); @Override protected void reduce(Text key, Iterable<IntWritable> values, Reducer<Text, IntWritable, Text, IntWritable>.Context context) throws IOException, InterruptedException { int sum = 0; // 1 累加求和 for (IntWritable value : values) { sum += value.get(); } v.set(sum); // 2 写出 context.write(key, v); } }
[ "jstarfish@126.com" ]
jstarfish@126.com
8b43e151b42799a41eee2396e0124efd2a25cf6a
697e8d0a012693876df14ce2440b42d7818149ac
/XChange-develop/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/polling/BitstampMarketDataService.java
98c663c88aaa1d053bced6b5553875ca326e725b
[ "MIT" ]
permissive
tochkov/coin-eye
0bdadf195408d77dda220d6558ebc775330ee75c
f04bb141cab3a04d348b04bbf9f00351176bb8d3
refs/heads/master
2021-01-01T04:26:00.984029
2016-04-15T14:22:17
2016-04-15T14:22:17
56,127,186
2
5
null
null
null
null
UTF-8
Java
false
false
1,643
java
package com.xeiam.xchange.bitstamp.service.polling; import java.io.IOException; import com.xeiam.xchange.Exchange; import com.xeiam.xchange.bitstamp.BitstampAdapters; import com.xeiam.xchange.currency.CurrencyPair; import com.xeiam.xchange.dto.marketdata.OrderBook; import com.xeiam.xchange.dto.marketdata.Ticker; import com.xeiam.xchange.dto.marketdata.Trades; import com.xeiam.xchange.service.polling.marketdata.PollingMarketDataService; import com.xeiam.xchange.utils.Assert; /** * @author Matija Mazi */ public class BitstampMarketDataService extends BitstampMarketDataServiceRaw implements PollingMarketDataService { /** * Constructor * * @param exchange */ public BitstampMarketDataService(Exchange exchange) { super(exchange); } @Override public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { Assert.isTrue(currencyPair.equals(CurrencyPair.BTC_USD), "Currency Pair must be USD/BTC!!!"); return BitstampAdapters.adaptTicker(getBitstampTicker(), currencyPair); } @Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { Assert.isTrue(currencyPair.equals(CurrencyPair.BTC_USD), "Currency Pair must be USD/BTC!!!"); return BitstampAdapters.adaptOrderBook(getBitstampOrderBook(), currencyPair, 1000); } @Override public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { Assert.isTrue(currencyPair.equals(CurrencyPair.BTC_USD), "Currency Pair must be USD/BTC!!!"); return BitstampAdapters.adaptTrades(getBitstampTransactions(args), currencyPair); } }
[ "philip.tochkov@gmail.com" ]
philip.tochkov@gmail.com
d0ca78e8d4822aba2ae5e28b87542138509433ba
01d4416163c2c8beace93930a8e7c3c7281cbc36
/Zelda/src/zelda/game/entity/seeds/ScentPod.java
932f98324137fad397612203449202f82e5dd01f
[]
no_license
cubeman99/old-eclipse-workspace
639c7a6540545b68b4068159872c3986f81925d0
e6001ce0e9e657abfbe8e8ec5fb9e3d956251d39
refs/heads/master
2020-08-03T08:03:01.258280
2019-09-29T14:41:31
2019-09-29T14:41:31
211,675,002
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
package zelda.game.entity.seeds; import zelda.common.Resources; import zelda.common.Sounds; import zelda.common.geometry.Vector; import zelda.common.graphics.Sprite; import zelda.common.util.GMath; import zelda.game.entity.Entity; public class ScentPod extends Entity { private static final int FADE_TIME = GMath.seconds(4); // Fade after 4 // seconds private static final int TIME = GMath.seconds(5); // Destroy after 5 seconds private Vector position; private Sprite sprite; private int timer; public ScentPod(Vector position) { this.position = new Vector(position); timer = 0; sprite = new Sprite(Resources.SPRITE_SCENT_POD); Sounds.ITEM_SCENT_POD.play(); } @Override public void update() { sprite.update(); timer++; // Start flickering after a certain time. if (timer == FADE_TIME) sprite.getAnimation().createFlicker(); // Destroy after the time is up. if (timer > TIME) { destroy(); } } @Override public void draw() { sprite.draw(position); } }
[ "jordand95@gmail.com" ]
jordand95@gmail.com
8e81afb0822b3c02c82e410ddcce8cafc0bf8e9d
4e0ac01b7dbf95263b241d78badf14e67d535ef2
/pizzashack-services/pizzashack-api-jersey-impl/src/main/java/org/pizzashack/jersey/resource/PizzashackAPIImpl.java
84616331fd1f3a36d110c3395a6374854aa25a7c
[]
no_license
davidy104/wso2am-pizzashack
d0b94cd45e06385dcf3d274d6f6428697e8d16a3
91c3ad36028d003be4a2015c649b963bf610152b
refs/heads/master
2021-01-23T21:34:34.299182
2013-12-02T00:14:16
2013-12-02T00:14:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,141
java
package org.pizzashack.jersey.resource; import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.pizzashack.GenericAPIError; import org.pizzashack.data.MenuItemDTO; import org.pizzashack.data.OrderDTO; import org.pizzashack.ds.OrderManagerDS; import org.pizzashack.ds.PizzaMenuDS; import org.pizzashack.jersey.PizzashackAPIUtils; import org.pizzashack.resource.PizzashackAPI; import org.pizzashack.util.PATCH; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component @Path("/v1") public class PizzashackAPIImpl implements PizzashackAPI { private static final Logger LOGGER = LoggerFactory .getLogger(PizzashackAPIImpl.class); @Autowired private OrderManagerDS orderManagerDs; @Autowired private PizzaMenuDS pizzaMenuDs; @Override @Path("/menu") @GET @Produces("application/json") public Response getMenu() { LOGGER.debug("getMenu start:{}"); List<MenuItemDTO> resultList = null; GenericAPIError genericAPIError = null; try { resultList = pizzaMenuDs.getAllMenuItems(); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("getMenu end:{}"); return PizzashackAPIUtils.buildResponse(resultList, genericAPIError); } @Override @PATCH @Consumes("application/json") @Produces("application/json") @Path("/order/delivery/{orderId}") public Response updateOrderDeliverStatus( @PathParam("orderId") Long orderId, @QueryParam("deliverStatus") String status) { LOGGER.debug("deliverOrder start:{}", orderId); LOGGER.debug("status:{}", status); GenericAPIError genericAPIError = null; OrderDTO result = null; try { result = orderManagerDs.updateDeliverStatus(orderId, status); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("deliverOrder end:{}"); return PizzashackAPIUtils.buildResponse(result, genericAPIError); } @Override @POST @Consumes("application/json") @Produces("application/json") @Path("/order") public Response placeOrder(OrderDTO order) { LOGGER.debug("placeOrder start:{}", order); OrderDTO result = null; GenericAPIError genericAPIError = null; try { result = orderManagerDs.placeOrder(order); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("placeOrder end:{}", result); return PizzashackAPIUtils.buildResponse(result, genericAPIError); } @Override @Path("/order/{orderId}") @GET @Produces("application/json") public Response getOrderById(@PathParam("orderId") Long orderId) { LOGGER.debug("getOrderById start:{}", orderId); OrderDTO result = null; GenericAPIError genericAPIError = null; try { result = orderManagerDs.getOrderById(orderId); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("placeOrder end:{}", result); return PizzashackAPIUtils.buildResponse(result, genericAPIError); } @Override @DELETE @Produces("application/json") @Path("/order/{orderId}") public Response cancelOrder(@PathParam("orderId") Long orderId) { LOGGER.debug("cancelOrder start:{}", orderId); GenericAPIError genericAPIError = null; try { orderManagerDs.cancelOrder(orderId); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("cancelOrder end:{}"); return PizzashackAPIUtils.buildResponse(null, genericAPIError); } @Override @PUT @Consumes("application/json") @Produces("application/json") @Path("/order/{orderId}") public Response updateOrder(@PathParam("orderId") Long orderId, OrderDTO order) { LOGGER.debug("updateOrder start:{}", orderId); GenericAPIError genericAPIError = null; OrderDTO result = null; try { result = orderManagerDs.updateOrder(orderId, order); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("updateOrder end:{}", result); return PizzashackAPIUtils.buildResponse(result, genericAPIError); } @Override @GET @Produces("application/json") @Path("/order/query") public Response getOrders(@QueryParam("customerName") String customerName, @QueryParam("customerEmail") String customerEmail, @QueryParam("delivered") String delivered) { LOGGER.debug("getOrders start:{}"); LOGGER.debug("customerName:{}", customerName); LOGGER.debug("customerEmail:{}", customerEmail); LOGGER.debug("delivered:{}", delivered); List<OrderDTO> orders = null; GenericAPIError genericAPIError = null; try { orders = orderManagerDs.getOrdersByCustomer(customerName, customerEmail, delivered); } catch (Exception e) { genericAPIError = PizzashackAPIUtils.errorHandle(e); } LOGGER.debug("getOrders end:{}"); return PizzashackAPIUtils.buildResponse(orders, genericAPIError); } }
[ "david.yuan@yellow.co.nz" ]
david.yuan@yellow.co.nz
097dd05640da7eece3dad1534b036a397cd96fee
9573f936174ccbcda704e1b83d596a3f093f727c
/OPERAcraft New/temp/src/minecraft_server/net/minecraft/src/LogAgent.java
065a310ea4ea5cc1cae8e0d7d62f7a5526f0f569
[]
no_license
operacraft/Minecraft
17466d8538be6253f4d689926d177614c6accf5b
89c4012b11cf5fa118cd5e63b0f51d03ee1ddc09
refs/heads/master
2021-01-10T05:54:10.056575
2016-02-24T15:54:29
2016-02-24T15:54:49
51,405,369
1
2
null
null
null
null
UTF-8
Java
false
false
2,721
java
package net.minecraft.src; import java.util.logging.ConsoleHandler; import java.util.logging.FileHandler; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import net.minecraft.src.ILogAgent; import net.minecraft.src.LogAgentINNER1; import net.minecraft.src.LogFormatter; public class LogAgent implements ILogAgent { private final Logger field_98242_a; private final String field_98240_b; private final String field_98241_c; private final String field_98239_d; public LogAgent(String p_i11036_1_, String p_i11036_2_, String p_i11036_3_) { this.field_98242_a = Logger.getLogger(p_i11036_1_); this.field_98241_c = p_i11036_1_; this.field_98239_d = p_i11036_2_; this.field_98240_b = p_i11036_3_; this.func_98238_b(); } private void func_98238_b() { this.field_98242_a.setUseParentHandlers(false); Handler[] var1 = this.field_98242_a.getHandlers(); int var2 = var1.length; for(int var3 = 0; var3 < var2; ++var3) { Handler var4 = var1[var3]; this.field_98242_a.removeHandler(var4); } LogFormatter var6 = new LogFormatter(this, (LogAgentINNER1)null); ConsoleHandler var7 = new ConsoleHandler(); var7.setFormatter(var6); this.field_98242_a.addHandler(var7); try { FileHandler var8 = new FileHandler(this.field_98240_b, true); var8.setFormatter(var6); this.field_98242_a.addHandler(var8); } catch (Exception var5) { this.field_98242_a.log(Level.WARNING, "Failed to log " + this.field_98241_c + " to " + this.field_98240_b, var5); } } public Logger func_98076_a() { return this.field_98242_a; } public void func_98233_a(String p_98233_1_) { this.field_98242_a.log(Level.INFO, p_98233_1_); } public void func_98236_b(String p_98236_1_) { this.field_98242_a.log(Level.WARNING, p_98236_1_); } public void func_98231_b(String p_98231_1_, Object ... p_98231_2_) { this.field_98242_a.log(Level.WARNING, p_98231_1_, p_98231_2_); } public void func_98235_b(String p_98235_1_, Throwable p_98235_2_) { this.field_98242_a.log(Level.WARNING, p_98235_1_, p_98235_2_); } public void func_98232_c(String p_98232_1_) { this.field_98242_a.log(Level.SEVERE, p_98232_1_); } public void func_98234_c(String p_98234_1_, Throwable p_98234_2_) { this.field_98242_a.log(Level.SEVERE, p_98234_1_, p_98234_2_); } // $FF: synthetic method static String func_98237_a(LogAgent p_98237_0_) { return p_98237_0_.field_98239_d; } }
[ "operacraft@googlegroups.com" ]
operacraft@googlegroups.com
eef2bc1277a6a72f5b049669fca1986a957d9c4d
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p033co/infinum/goldeneye/config/camera2/AdvancedFeatureConfigImpl$supportedAntibandingModes$2.java
bbe18523cb1a616f359de7f6dcc22e6f0ce961aa
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,095
java
package p033co.infinum.goldeneye.config.camera2; import android.hardware.camera2.CameraCharacteristics; import java.util.ArrayList; import java.util.Collection; import java.util.List; import kotlin.Metadata; import kotlin.collections.CollectionsKt; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Lambda; import p033co.infinum.goldeneye.models.AntibandingMode; @Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\f\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001H\n¢\u0006\u0002\b\u0003"}, mo51343d2 = {"<anonymous>", "", "Lco/infinum/goldeneye/models/AntibandingMode;", "invoke"}, mo51344k = 3, mo51345mv = {1, 1, 13}) /* renamed from: co.infinum.goldeneye.config.camera2.AdvancedFeatureConfigImpl$supportedAntibandingModes$2 */ /* compiled from: AdvancedFeatureConfigImpl.kt */ final class AdvancedFeatureConfigImpl$supportedAntibandingModes$2 extends Lambda implements Function0<List<? extends AntibandingMode>> { final /* synthetic */ AdvancedFeatureConfigImpl this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ AdvancedFeatureConfigImpl$supportedAntibandingModes$2(AdvancedFeatureConfigImpl advancedFeatureConfigImpl) { super(0); this.this$0 = advancedFeatureConfigImpl; } public final List<AntibandingMode> invoke() { int[] iArr = (int[]) ((CameraCharacteristics) this.this$0.getCharacteristics()).get(CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES); if (iArr == null) { return CollectionsKt.emptyList(); } Collection arrayList = new ArrayList(iArr.length); for (int valueOf : iArr) { arrayList.add(AntibandingMode.Companion.fromCamera2(Integer.valueOf(valueOf))); } Collection arrayList2 = new ArrayList(); for (Object next : (List) arrayList) { if (((AntibandingMode) next) != AntibandingMode.UNKNOWN) { arrayList2.add(next); } } return (List) arrayList2; } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
44ba96900930942bd2fab88190da0df993447dff
ab5ded3fe672cdb9f42cc01f6e7193ad24e22008
/ds-java/src/main/java/chapter5/sparsematrix/CrossNode.java
9a12a847650a0b473818aa73fbb88474bb75646e
[]
no_license
xiaozhiliaoo/algorithm-practice
e038ef31f30097633650d62018890e4ca9e944b9
25e6e9217c18f451ab747847b1b605770ce37000
refs/heads/master
2022-06-22T06:13:06.252993
2022-05-30T13:12:02
2022-05-30T13:12:02
248,150,272
0
1
null
2022-02-05T03:53:48
2020-03-18T05:56:13
Java
UTF-8
Java
false
false
1,402
java
package chapter5.sparsematrix; /** * Created by lili on 2017/7/1. */ //5.2.2 稀疏矩阵的压缩存储 //5. 稀疏矩阵十字链表 //十字链表结点类 public class CrossNode //十字链表结点类 { Triple data; //数据域表示三元组,默认访问权限 CrossNode right, down; //right指向行的下一个结点,down指向列的下一个结点 //构造结点,data指定元素,right指向行的下一个结点,down指向列的下一个结点 public CrossNode(Triple data, CrossNode right, CrossNode down) { this.data = data; this.right = right; this.down = down; } } /* 没有用到 public CrossNode() { this(null, null, null); }*/ /* public class CrossNode<T> //十字链表结点类 { public T data; //数据元素 public CrossNode<T> right, down; //next指向行的后继结点,down指向列的后继结点 //构造结点,data指定元素,next指向行的后继结点,down指向列的后继结点 public CrossNode(T data, CrossNode<T> right, CrossNode<T> down) { this.data = data; this.right = right; this.down = down; } public CrossNode() { this(null, null, null); } } */
[ "lili@chainup.com" ]
lili@chainup.com
bdfedee3d11a201e603071a54b054f3ebbfec590
6807f629f99e0a12007efdc344b19acb2eaddc8a
/app/src/main/java/com/fuicuiedu/xc/recyclerview_20170421/MainActivity.java
45845006888ebce20dc86cb5e5fca4fcd9e57741
[]
no_license
wxcican/RecyclerView_20170421
51d679353b25cf9fa49819347e17191d86cee904
0f505efd1fc17dcb87110ce4d8942509c65af053
refs/heads/master
2021-01-19T23:08:45.778083
2017-04-21T03:30:25
2017-04-21T03:30:25
88,931,529
0
0
null
null
null
null
UTF-8
Java
false
false
2,058
java
package com.fuicuiedu.xc.recyclerview_20170421; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import org.w3c.dom.Text; import java.util.ArrayList; import java.util.List; //RecyclerView的使用 //1.依赖 //2.布局文件中使用该控件 //3.找到控件(findViewbyId) //4.数据(假数据) //5.设这布局管理器(layoutManager) //6.适配器适配数据展示 public class MainActivity extends AppCompatActivity { private RecyclerView recyclerView; private List<String> mDatas; private MainAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); recyclerView = (RecyclerView) findViewById(R.id.recyclerview); initData(); //设置布局管理器 recyclerView.setLayoutManager(new LinearLayoutManager(this)); //设置适配器 adapter = new MainAdapter(mDatas); adapter.setOnItemClickListener(new MainAdapter.OnItemClickListener() { @Override public void onItemClick(View view, int postion) { Toast.makeText(MainActivity.this, "点击了" + postion, Toast.LENGTH_SHORT).show(); } @Override public void onItemLongClick(View view, int postion) { Toast.makeText(MainActivity.this, "长按了" + postion, Toast.LENGTH_SHORT).show(); } }); recyclerView.setAdapter(adapter); } private void initData() { mDatas = new ArrayList<>(); for (int i = 0; i < 30; i++) { mDatas.add("第" + i + "条数据"); } } }
[ "wxcican@qq.com" ]
wxcican@qq.com
e99c6cd3b191c22c453c0cc35867bf1b0ff235ae
eb31160e5915c422860267acbd1dcb3c3743c09c
/jOOQ-test/examples/org/jooq/examples/mysql/sakila/routines/FilmNotInStock.java
5f37121045a564a57694037a2d4b515e7988c54c
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
digulla/jOOQ
b75b43c2e15b4e46d3412aca9d08d65c240c94f3
6c3334d5b73749a2045ae038e71a0003ba5f6139
refs/heads/master
2022-06-20T17:34:48.041188
2022-06-04T21:52:39
2022-06-04T21:52:39
4,752,073
0
0
NOASSERTION
2022-06-04T21:52:40
2012-06-22T14:36:17
Java
UTF-8
Java
false
false
1,446
java
/** * This class is generated by jOOQ */ package org.jooq.examples.mysql.sakila.routines; /** * This class is generated by jOOQ. */ public class FilmNotInStock extends org.jooq.impl.AbstractRoutine<java.lang.Void> { private static final long serialVersionUID = 136011591; /** * An uncommented item */ public static final org.jooq.Parameter<java.lang.Integer> P_FILM_ID = createParameter("p_film_id", org.jooq.impl.SQLDataType.INTEGER); /** * An uncommented item */ public static final org.jooq.Parameter<java.lang.Integer> P_STORE_ID = createParameter("p_store_id", org.jooq.impl.SQLDataType.INTEGER); /** * An uncommented item */ public static final org.jooq.Parameter<java.lang.Integer> P_FILM_COUNT = createParameter("p_film_count", org.jooq.impl.SQLDataType.INTEGER); /** * Create a new routine call instance */ public FilmNotInStock() { super("film_not_in_stock", org.jooq.examples.mysql.sakila.Sakila.SAKILA); addInParameter(P_FILM_ID); addInParameter(P_STORE_ID); addOutParameter(P_FILM_COUNT); } /** * Set the <code>p_film_id</code> parameter to the routine */ public void setPFilmId(java.lang.Integer value) { setValue(P_FILM_ID, value); } /** * Set the <code>p_store_id</code> parameter to the routine */ public void setPStoreId(java.lang.Integer value) { setValue(P_STORE_ID, value); } public java.lang.Integer getPFilmCount() { return getValue(P_FILM_COUNT); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
65c025e19d2229699991edd2146e71026e6dbc62
e977c424543422f49a25695665eb85bfc0700784
/benchmark/bears/apache-incubator-servicecomb-java-chassis/bears_153/buggy-version/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java
295592d39b4f72cbad8a9ae4815b67ebc09058b8
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,868
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.servicecomb.serviceregistry.api.registry; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_APPLICATION_ID_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_DEFAULT_REGISTER_BY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_FRAMEWORK_DEFAULT_NAME; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_FRAMEWORK_DEFAULT_VERSION; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_DESCRIPTION_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_NAME_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_ROLE_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.DEFAULT_MICROSERVICE_NAME; import static org.apache.servicecomb.serviceregistry.definition.DefinitionConst.CONFIG_ALLOW_CROSS_APP_KEY; import static org.apache.servicecomb.serviceregistry.definition.DefinitionConst.DEFAULT_APPLICATION_ID; import static org.apache.servicecomb.serviceregistry.definition.DefinitionConst.DEFAULT_MICROSERVICE_VERSION; import java.util.Map; import org.apache.commons.configuration.Configuration; import org.apache.servicecomb.serviceregistry.config.ConfigurePropertyUtils; import org.apache.servicecomb.serviceregistry.config.MicroservicePropertiesLoader; import org.apache.servicecomb.serviceregistry.definition.MicroserviceDefinition; public class MicroserviceFactory { public Microservice create(String appId, String microserviceName) { MicroserviceDefinition microserviceDefinition = MicroserviceDefinition.create(appId, microserviceName); return create(microserviceDefinition); } public Microservice create(MicroserviceDefinition microserviceDefinition) { Configuration configuration = microserviceDefinition.getConfiguration(); Microservice microservice = createMicroserviceFromDefinition(configuration); microservice.setInstance(MicroserviceInstance.createFromDefinition(configuration)); return microservice; } private Microservice createMicroserviceFromDefinition(Configuration configuration) { Microservice microservice = new Microservice(); microservice.setServiceName(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_NAME_KEY, DEFAULT_MICROSERVICE_NAME)); microservice.setAppId(configuration.getString(CONFIG_APPLICATION_ID_KEY, DEFAULT_APPLICATION_ID)); microservice.setVersion(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY, DEFAULT_MICROSERVICE_VERSION)); microservice.setDescription(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_DESCRIPTION_KEY, "")); microservice.setLevel(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_ROLE_KEY, "FRONT")); microservice.setPaths(ConfigurePropertyUtils.getMicroservicePaths(configuration)); Map<String, String> propertiesMap = MicroservicePropertiesLoader.INSTANCE.loadProperties(configuration); microservice.setProperties(propertiesMap); // set alias name when allow cross app if (allowCrossApp(propertiesMap)) { microservice.setAlias(Microservice.generateAbsoluteMicroserviceName(microservice.getAppId(), microservice.getServiceName())); } // use default values, we can add configure item in future. Framework framework = new Framework(); framework.setName(CONFIG_FRAMEWORK_DEFAULT_NAME); framework.setVersion(CONFIG_FRAMEWORK_DEFAULT_VERSION); microservice.setFramework(framework); microservice.setRegisterBy(CONFIG_DEFAULT_REGISTER_BY); return microservice; } private boolean allowCrossApp(Map<String, String> propertiesMap) { return Boolean.valueOf(propertiesMap.get(CONFIG_ALLOW_CROSS_APP_KEY)); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
1058a00b2d53e5c4b37a863ffd6e80566a7707bd
34491e8a3ed1499d840e0d18dcb8101546150720
/Designer/designer/src/de/hpi/bpmn/serialization/erdf/templates/EndCompensationEventTemplate.java
60efe7cc49831039b3114ef59b891956d8bc95eb
[ "MIT" ]
permissive
adele-robots/fiona
128061a86593bc75b3c5b0cf591de2158c681cc6
1ef1fb18e620e18b2187e79e4cca31d66d3f1fd2
refs/heads/master
2020-06-19T04:42:14.203355
2020-06-10T10:46:58
2020-06-10T10:46:58
196,561,178
0
1
null
null
null
null
UTF-8
Java
false
false
1,051
java
package de.hpi.bpmn.serialization.erdf.templates; import de.hpi.bpmn.DiagramObject; import de.hpi.bpmn.EndCompensationEvent; import de.hpi.bpmn.serialization.erdf.ERDFSerializationContext; public class EndCompensationEventTemplate extends NonConnectorTemplate { private static BPMN2ERDFTemplate instance; public static BPMN2ERDFTemplate getInstance() { if (instance == null) { instance = new EndCompensationEventTemplate(); } return instance; } public StringBuilder getCompletedTemplate(DiagramObject diagramObject, ERDFSerializationContext transformationContext) { EndCompensationEvent e = (EndCompensationEvent) diagramObject; StringBuilder s = getResourceStartPattern(transformationContext.getResourceIDForDiagramObject(e)); appendOryxField(s,"type",STENCIL_URI + "#EndCompensationEvent"); appendOryxField(s,"eventtype","End"); appendNonConnectorStandardFields(e,s,transformationContext); appendOryxField(s,"result","Compensation"); appendResourceEndPattern(s, e, transformationContext); return s; } }
[ "root@euve263700.serverprofi24.net" ]
root@euve263700.serverprofi24.net
e310ede8e7b661a28971758e7a60d8a8cc259210
6eb473fdee564e75899580270c5566bdea7b5e08
/org/apache/lucene/search/SimilarityDelegator.java
023492bd687fd3b5fcf8ff6004fcd7ea157c2f70
[]
no_license
Rashmos/Information_Retrieval_System
d2f9e3db1e8a7177b3114d430e0f9c799e59dd67
4b7bc23cb38a100a202df403fd90a217e89594e6
refs/heads/master
2020-05-26T18:35:47.617244
2014-01-28T07:06:33
2014-01-28T07:06:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,877
java
/* */ package org.apache.lucene.search; /* */ /* */ import org.apache.lucene.index.FieldInvertState; /* */ /* */ public class SimilarityDelegator extends Similarity /* */ { /* */ private Similarity delegee; /* */ /* */ public SimilarityDelegator(Similarity delegee) /* */ { /* 34 */ this.delegee = delegee; /* */ } /* */ /* */ public float computeNorm(String fieldName, FieldInvertState state) /* */ { /* 39 */ return this.delegee.computeNorm(fieldName, state); /* */ } /* */ /* */ public float lengthNorm(String fieldName, int numTerms) /* */ { /* 44 */ return this.delegee.lengthNorm(fieldName, numTerms); /* */ } /* */ /* */ public float queryNorm(float sumOfSquaredWeights) /* */ { /* 49 */ return this.delegee.queryNorm(sumOfSquaredWeights); /* */ } /* */ /* */ public float tf(float freq) /* */ { /* 54 */ return this.delegee.tf(freq); /* */ } /* */ /* */ public float sloppyFreq(int distance) /* */ { /* 59 */ return this.delegee.sloppyFreq(distance); /* */ } /* */ /* */ public float idf(int docFreq, int numDocs) /* */ { /* 64 */ return this.delegee.idf(docFreq, numDocs); /* */ } /* */ /* */ public float coord(int overlap, int maxOverlap) /* */ { /* 69 */ return this.delegee.coord(overlap, maxOverlap); /* */ } /* */ /* */ public float scorePayload(int docId, String fieldName, int start, int end, byte[] payload, int offset, int length) /* */ { /* 74 */ return this.delegee.scorePayload(docId, fieldName, start, end, payload, offset, length); /* */ } /* */ } /* Location: /Users/Rashmi/Downloads/set_rp2614/rashmi.jar * Qualified Name: org.apache.lucene.search.SimilarityDelegator * JD-Core Version: 0.6.2 */
[ "Rashmi@rashmis-MacBook-Pro.local" ]
Rashmi@rashmis-MacBook-Pro.local
99716304d341ca576be490ba772855c7839a3237
42687b13df351a38339e0bb0114b137037b38d7a
/cat/cars_source_from_JADX/sources/kotlin/p004io/TextStreamsKt$readLines$1.java
d8bd4673c23e6d15c51f07cf191bd44ed38b7654
[]
no_license
Hong5489/FireShellCTF2020
3f3096f65b56e58346a14365c88d70b3a6676405
0722492979aeec697d8fb07fbb403eeb133fc79e
refs/heads/master
2021-04-16T08:04:34.640027
2020-03-23T05:19:48
2020-03-23T05:19:48
249,339,328
2
0
null
null
null
null
UTF-8
Java
false
false
1,124
java
package kotlin.p004io; import java.util.ArrayList; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; @Metadata(mo6927bv = {1, 0, 3}, mo6928d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, mo6929d2 = {"<anonymous>", "", "it", "", "invoke"}, mo6930k = 3, mo6931mv = {1, 1, 15}) /* renamed from: kotlin.io.TextStreamsKt$readLines$1 */ /* compiled from: ReadWrite.kt */ final class TextStreamsKt$readLines$1 extends Lambda implements Function1<String, Unit> { final /* synthetic */ ArrayList $result; TextStreamsKt$readLines$1(ArrayList arrayList) { this.$result = arrayList; super(1); } public /* bridge */ /* synthetic */ Object invoke(Object obj) { invoke((String) obj); return Unit.INSTANCE; } public final void invoke(String it) { Intrinsics.checkParameterIsNotNull(it, "it"); this.$result.add(it); } }
[ "hongwei5489@gmail.com" ]
hongwei5489@gmail.com
c9ff7cd2d0597a966847511e8e0ac2f8e8adf2d8
466bbcea33a63219165bece2ae217db4a7fde59a
/cgo_db/src/main/java/com/cgo/db/service/IRepApprepairlogService.java
4536f0a7dd162f32bfcb786e163051400081908b
[]
no_license
hgdsys007/cgo_module
7ed38b6e7b199daeb65e2b08db629e5c97ace86a
4e1af510541cc4ae7eadf916034fd8e83abc69a4
refs/heads/master
2022-04-03T14:46:43.336331
2019-11-20T04:01:58
2019-11-20T04:02:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
288
java
package com.cgo.db.service; import com.cgo.db.entity.RepApprepairlog; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 服务类 * </p> * * @author Mht * @since 2019-11-18 */ public interface IRepApprepairlogService extends IService<RepApprepairlog> { }
[ "asd@1.com" ]
asd@1.com
31127c547822563f772f3ebc1285d6cf07427a99
d9d8333a1a53c9bf90e4f61c49be03c7d7f92978
/SearchService/src/main/java/com/filmmaster/searchservice/WebServerFactoryCustomizerConfiguration.java
348819662fb172453a5cb83a01af500ec78a5095
[]
no_license
11michi11/FilmMaster
1243317aa6bcf12f5544033cc2a6da76b3b38422
9036dbc16f5b5cc327da2bb564d14be59640624a
refs/heads/master
2021-06-05T21:09:21.421933
2020-07-31T13:21:33
2020-07-31T13:21:33
140,289,307
0
0
null
null
null
null
UTF-8
Java
false
false
899
java
package com.filmmaster.searchservice; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; import org.springframework.context.annotation.Configuration; import org.springframework.util.SocketUtils; @Configuration public class WebServerFactoryCustomizerConfiguration implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> { @Value("${port.number.min:8000}") private Integer minPort; @Value("${port.number.max:8010}") private Integer maxPort; @Override public void customize(ConfigurableServletWebServerFactory factory) { int port = SocketUtils.findAvailableTcpPort(minPort, maxPort); factory.setPort(port); System.getProperties().put("server.port", port); } }
[ "11michi11@gmail.com" ]
11michi11@gmail.com
db1a4843657a08766532d5d825f892a746aefeb7
390c6baa41bcb419ea16b163b350d0f248b517c2
/my.test.mmf.core/src/de/dainel/cleanqualifiedtypes/CleanQualifiedTypes.java
9bea25c4e6a63b0c7050e9546e6b1f8e96c98925
[]
no_license
bukodi/my-test-mmf
18bfa49d747cff14d99073e6190a3f3b8d1a4efa
5721d3683e0dd8eba74291e3f90e31c02a35af36
refs/heads/master
2020-12-24T14:52:58.032841
2013-08-29T11:17:43
2013-08-29T11:17:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,877
java
package de.dainel.cleanqualifiedtypes; import java.util.List; import my.test.mmf.core.util.MyRuntimeException; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.CompilationUnit; import de.dainel.cleanqualifiedtypes.util.ManipulatorHelper; /** * @author Michael Ernst */ public class CleanQualifiedTypes { public void run(ICompilationUnit lwUnit) { try { if (!lwUnit.isStructureKnown()) throw new MyRuntimeException("The given compilation unit contains compiling errors, so qualified types could not be added to the imports."); } catch (JavaModelException e) { throw new MyRuntimeException("Could not handle resource.", e); } CompilationUnit unit = parse(lwUnit); run(unit); } public void run(char[] source) { CompilationUnit unit = parse(source); run(unit); } private void run(CompilationUnit unit) { QualifiedTypeDetector detector = new QualifiedTypeDetector(); unit.accept(detector); boolean isChanged = rewrite(unit, detector.getTypeManagers()); if (isChanged) { save(unit); } } protected boolean rewrite(CompilationUnit unit, List<QualifiedTypeBindingManager> typeManagers) { QualifiedTypeRewriter qualifiedTypeRewriter = createRewriter(unit, typeManagers); return qualifiedTypeRewriter.rewrite(); } protected QualifiedTypeRewriter createRewriter(CompilationUnit unit, List<QualifiedTypeBindingManager> typeManagers) { return new QualifiedTypeRewriter(unit, typeManagers); } protected void save(CompilationUnit unit) { try { // write changes back to Java source code ManipulatorHelper.saveDirectlyModifiedUnit(unit); } catch (CoreException e) { e.printStackTrace(); } } /** * Parses source code. * * @param lwUnit * the Java Model handle for the compilation unit * @return the root AST node of the parsed source */ protected CompilationUnit parse(char[] source) { ASTParser parser = ASTParser.newParser(AST.JLS4); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(source); // set source return (CompilationUnit) parser.createAST(null /* IProgressMonitor */); // parse } /** * Parses source code. * * @param lwUnit * the Java Model handle for the compilation unit * @return the root AST node of the parsed source */ protected CompilationUnit parse(ICompilationUnit lwUnit) { ASTParser parser = ASTParser.newParser(AST.JLS4); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(lwUnit); // set source return (CompilationUnit) parser.createAST(null /* IProgressMonitor */); // parse } }
[ "bukodi@gmail.com" ]
bukodi@gmail.com
f0ac2e6c51c9df9767bdf67a2f8bdd5145d9be16
a11ba1b53c0e1e978b5f4f55a38b4ff5b13d5e36
/ui/src/main/java/org/apache/hop/core/SwtUniversalImageBitmap.java
596286b0671419ccebc49be4be8c0f45bfa3063a
[ "Apache-2.0" ]
permissive
lipengyu/hop
157747f4da6d909a935b4510e01644935333fef9
8afe35f0705f44d78b5c33c1ba3699f657f8b9dc
refs/heads/master
2020-09-12T06:31:58.176011
2019-11-11T21:17:59
2019-11-11T21:17:59
222,341,727
1
0
Apache-2.0
2019-11-18T01:50:19
2019-11-18T01:50:18
null
UTF-8
Java
false
false
2,445
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * 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.apache.hop.core; import org.eclipse.swt.graphics.Device; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Transform; public class SwtUniversalImageBitmap extends SwtUniversalImage { private final Image bitmap; private final float zoomFactor; public SwtUniversalImageBitmap( Image bitmap, float zoomFactor ) { this.bitmap = bitmap; this.zoomFactor = zoomFactor; } @Override public synchronized void dispose() { super.dispose(); if ( !bitmap.isDisposed() ) { bitmap.dispose(); } } @Override protected Image renderSimple( Device device ) { return bitmap; } @Override protected Image renderSimple( Device device, int width, int height ) { return renderRotated( device, width, height, 0d ); } @Override protected Image renderRotated( Device device, int width, int height, double angleRadians ) { Image result = new Image( device, width * 2, height * 2 ); GC gc = new GC( result ); int bw = bitmap.getBounds().width; int bh = bitmap.getBounds().height; Transform affineTransform = new Transform( device ); affineTransform.translate( width, height ); affineTransform.rotate( (float) Math.toDegrees( angleRadians ) ); affineTransform.scale( (float) zoomFactor * width / bw, (float) zoomFactor * height / bh ); gc.setTransform( affineTransform ); gc.drawImage( bitmap, 0, 0, bw, bh, -bw / 2, -bh / 2, bw, bh ); gc.dispose(); return result; } }
[ "mattcasters@gmail.com" ]
mattcasters@gmail.com
aa5c598bb9b4c4784a683e1bbb4d443961b20f83
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_424b580eb98d945b704c3cf729781ed2ccda156e/DefaultFlag/34_424b580eb98d945b704c3cf729781ed2ccda156e_DefaultFlag_s.java
aabc6da647e88a7bcdb0a82cf02193cf91ec06c9
[]
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
4,460
java
// $Id$ /* * WorldGuard * Copyright (C) 2010 sk89q <http://www.sk89q.com> * * 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.sk89q.worldguard.protection.flags; /** * * @author sk89q */ public final class DefaultFlag { public static final StateFlag PASSTHROUGH = new StateFlag("passthrough", 'z', false); public static final StateFlag BUILD = new StateFlag("build", 'b', true); public static final StateFlag PVP = new StateFlag("pvp", 'p', true); public static final StateFlag MOB_DAMAGE = new StateFlag("mob-damage", 'm', true); public static final StateFlag MOB_SPAWNING = new StateFlag("mob-spawning", 'M', true); public static final StateFlag CREEPER_EXPLOSION = new StateFlag("creeper-explosion", 'c', true); public static final StateFlag SLEEP = new StateFlag("sleep", true); public static final StateFlag TNT = new StateFlag("tnt", 't', true); public static final StateFlag LIGHTER = new StateFlag("lighter", 'l', true); public static final StateFlag FIRE_SPREAD = new StateFlag("fire-spread", 'f', true); public static final StateFlag LAVA_FIRE = new StateFlag("lava-fire", 'F', true); public static final StateFlag LIGHTNING = new StateFlag("lightning", true); public static final StateFlag CHEST_ACCESS = new StateFlag("chest-access", 'C', false); public static final StateFlag WATER_FLOW = new StateFlag("water-flow", true); public static final StateFlag LAVA_FLOW = new StateFlag("lava-flow", true); public static final StateFlag USE = new StateFlag("use", false); public static final StateFlag PLACE_VEHICLE = new StateFlag("vehicle-place", false); public static final StateFlag SNOW_FALL = new StateFlag("snow-fall", true); public static final StringFlag GREET_MESSAGE = new StringFlag("greeting"); public static final StringFlag FAREWELL_MESSAGE = new StringFlag("farewell"); public static final BooleanFlag NOTIFY_GREET = new BooleanFlag("notify-greet"); public static final BooleanFlag NOTIFY_FAREWELL = new BooleanFlag("notify-farewell"); public static final StringFlag DENY_SPAWN = new StringFlag("deny-spawn"); public static final IntegerFlag HEAL_DELAY = new IntegerFlag("heal-delay"); public static final IntegerFlag HEAL_AMOUNT = new IntegerFlag("heal-amount"); public static final VectorFlag TELE_LOC = new VectorFlag("teleport"); public static final RegionGroupFlag TELE_PERM = new RegionGroupFlag("teleport-group"); public static final VectorFlag SPAWN_LOC = new VectorFlag("spawn"); public static final RegionGroupFlag SPAWN_PERM = new RegionGroupFlag("spawn-group"); public static final BooleanFlag BUYABLE = new BooleanFlag("buyable"); public static final DoubleFlag PRICE = new DoubleFlag("price"); public static final Flag<?>[] flagsList = new Flag<?>[] { PASSTHROUGH, BUILD, PVP, MOB_DAMAGE, MOB_SPAWNING, CREEPER_EXPLOSION, SLEEP, TNT, LIGHTER, FIRE_SPREAD, LAVA_FIRE, CHEST_ACCESS, WATER_FLOW, LAVA_FLOW, USE, PLACE_VEHICLE, GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_GREET, NOTIFY_FAREWELL, DENY_SPAWN, HEAL_DELAY, HEAL_AMOUNT, TELE_LOC, TELE_PERM, SPAWN_LOC, SPAWN_PERM, BUYABLE, PRICE, SNOW_FALL }; private DefaultFlag() { } public static Flag<?>[] getFlags() { return flagsList; } /** * Get the legacy flag. * * @param flagString * @return null if not found */ public static StateFlag getLegacyFlag(String flagString) { for (Flag<?> flag : flagsList) { if (flag instanceof StateFlag && flagString.equals(String.valueOf(flag.getLegacyCode()))) { return (StateFlag) flag; } } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6266318280cad0bc3a8bbbc148d4e30004dcd0df
acd7cff1d4892900d0721190d78eac09a649a047
/src/by/it/leshchenko/jd01_08/Vector.java
53d028a154acbdba7f5da38960d2340719bb938c
[]
no_license
Konstantinchik/Java-course
968a1d59472f91d4e6c5bcdb6eb1df3059681d65
381e159562e03b7dcd4e7dc7e18a85d3f19390fb
refs/heads/main
2023-03-24T17:29:49.276214
2021-03-19T19:56:05
2021-03-19T19:56:05
349,524,807
0
0
null
null
null
null
UTF-8
Java
false
false
4,046
java
package by.it.leshchenko.jd01_08; import java.util.Arrays; import java.util.StringJoiner; import java.util.regex.Matcher; import java.util.regex.Pattern; class Vector extends Var { private final double[] value; public double[] getValue() { return value; } public Vector(double[] value) { this.value = Arrays.copyOf(value, value.length); } public Vector(Vector vector) { this.value = vector.value; } public Vector(String strVector) { double[] array; Matcher matcher = Pattern.compile("\\{(.*)}").matcher(strVector); String[] strings; if (matcher.find()) { strings = matcher.group(1).split(",\\s?"); } else { strings = new String[0]; } array = new double[strings.length]; for (int i = 0; i < strings.length; i++) { array[i] = Double.parseDouble(strings[i]); } value = Arrays.copyOf(array, array.length); } @Override public Var add(Var other) { if (other instanceof Scalar) { double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] += ((Scalar) other).getValue(); } return new Vector(result); } else if (other instanceof Vector && this.value.length == ((Vector) other).value.length) { double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] += ((Vector) other).value[i]; } return new Vector(result); } else { return super.add(other); } } @Override public Var sub(Var other) { if (other instanceof Scalar) { double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] -= ((Scalar) other).getValue(); } return new Vector(result); } else if (other instanceof Vector && this.value.length == ((Vector) other).value.length) { double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] -= ((Vector) other).value[i]; } return new Vector(result); } else { return super.sub(other); } } @Override public Var mul(Var other) { if (other instanceof Scalar) { double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] = result[i] * ((Scalar) other).getValue(); } return new Vector(result); } else if (other instanceof Vector && this.value.length == ((Vector) other).value.length) { double[] array = Arrays.copyOf(value, value.length); double result = 0; for (int i = 0; i < array.length; i++) { result += array[i] * ((Vector) other).value[i]; } return new Scalar(result); } else { return super.mul(other); } } @Override public Var div(Var other) { if (other instanceof Scalar) { double otherValue = ((Scalar) other).getValue(); if (otherValue == 0) { System.out.println("Деление на 0 невозможно"); return null; } double[] result = Arrays.copyOf(value, value.length); for (int i = 0; i < result.length; i++) { result[i] = result[i] / ((Scalar) other).getValue(); } return new Vector(result); } else { return super.div(other); } } @Override public String toString() { StringJoiner joiner = new StringJoiner(", ", "{", "}"); for (double item : value) { joiner.add(Double.toString(item)); } return joiner.toString(); } }
[ "kgluschenko83@gmail.com" ]
kgluschenko83@gmail.com
761325b2e2c19c8cc2e46d876cd7cde432003f41
9f4f9c1e6a91ff96672e6ad26ff99111141fa363
/Algorithm/src/Code_Up/a1078.java
903f18d128cdb042d72b7b47ca2d9da17f4fe61a
[]
no_license
loon0214/Algorithm
40ec4dccd3e425aea779ba00ab05dcf93ff49bfe
26626b9a97a81384b53edc36596214dc1e971767
refs/heads/master
2023-03-02T01:35:57.825246
2021-02-10T23:41:01
2021-02-10T23:41:01
337,883,973
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package Code_Up; import java.util.Scanner; public class a1078 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int sum =0; for(int i=0; i<=number; i++) { if(i%2==0) {sum+=i;} } System.out.println(sum); } }
[ "valentine458@naver.com" ]
valentine458@naver.com
14b00905354e53a152d379a23ac94b5ac4886848
a4157887f09e780e9b006513e713a01543a20f11
/src/com/facebook/buck/core/rules/graphbuilder/BuildRuleKey.java
d539b34a43f0dcb7f3d9d0e8283483d35f4491d8
[ "Apache-2.0" ]
permissive
ereli/buck
8b6df315251ac69ad9269f77a4e560808c760cd4
b9e298a1b188fa53fbd80c40078ef62b5d732b33
refs/heads/master
2020-03-18T04:25:53.828658
2018-05-21T15:27:06
2018-05-21T15:27:06
134,286,674
0
0
Apache-2.0
2018-05-21T15:22:24
2018-05-21T15:18:28
Java
UTF-8
Java
false
false
2,071
java
/* * Copyright 2018-present Facebook, 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 com.facebook.buck.core.rules.graphbuilder; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.targetgraph.BuildRuleCreationContextWithTargetGraph; import com.facebook.buck.core.model.targetgraph.TargetNode; import com.facebook.buck.core.rules.BuildRule; import org.immutables.value.Value; /** * An Immutable Key to a {@link BuildRule} for computation in {@link * com.facebook.buck.graph.transformationengine.AsyncTransformationEngine}. The Key is used to * represent what {@link BuildRule} subgraph we are attempting to compute. * * <p>The {@link BuildRule} subgraph is identified by: * * <ul> * <li>the {@link TargetNode} corresponding to the {@link BuildTarget} which contains information * about the desired {@link BuildTarget}, including flavour information, and cell path, etc. * </ul> */ @Value.Immutable(builder = false, copy = false, prehash = true) public abstract class BuildRuleKey { @Value.Parameter @Value.Auxiliary public abstract BuildTarget getBuildTarget(); @Value.Derived protected TargetNodeWrapper getTargetNodeWrapper() { return TargetNodeWrapper.of( getBuildRuleCreationContext().getTargetGraph().get(getBuildTarget())); } public TargetNode<?, ?> getTargetNode() { return getTargetNodeWrapper().getTargetNode(); } @Value.Parameter @Value.Auxiliary public abstract BuildRuleCreationContextWithTargetGraph getBuildRuleCreationContext(); }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
e23cb3ab042ca95afd62ac32004cdc11f3f69030
835c5e5a428465a1bb14aa2922dd8bf9d1f83648
/bitcamp-project-server/version/v32_09/src/main/java/com/eomcs/lms/servlet/MemberAddServlet.java
530ea849d196cee9ec2a43b5a992dd728e159875
[]
no_license
juneglee/bitcamp-study
cc1de00c3e698db089d0de08488288fb86550260
605bddb266510109fb78ba440066af3380b25ef1
refs/heads/master
2020-09-23T13:00:46.749867
2020-09-18T14:26:39
2020-09-18T14:26:39
225,505,347
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package com.eomcs.lms.servlet; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import com.eomcs.lms.dao.json.MemberJsonFileDao; import com.eomcs.lms.domain.Member; public class MemberAddServlet implements Servlet { MemberJsonFileDao memberDao; public MemberAddServlet(MemberJsonFileDao memberDao) { this.memberDao = memberDao; } @Override public void service(ObjectInputStream in, ObjectOutputStream out) throws Exception { Member member = (Member) in.readObject(); if (memberDao.insert(member) > 0) { out.writeUTF("OK"); } else { out.writeUTF("FAIL"); out.writeUTF("같은 번호의 회원이 있습니다."); } } }
[ "klcpop1@example.com" ]
klcpop1@example.com
9f07ac67127c4ff6c4fa1253a21d4a3d2f33cb57
a10543f3d7106dc324c4f4d8ed032a8a416ab895
/src/main/java/com/ab/view/listener/AbIocEventListener.java
48fba41f362e5797b8982b4b79926defa756b685
[]
no_license
whywuzeng/jingmgouproject
32bfa45339700419842df772b91a2c178dcf0e23
0a6d1b9d33f7dca653f199181446b2a2ba8a07a4
refs/heads/master
2022-07-15T21:32:28.100332
2022-06-24T10:12:28
2022-06-24T10:12:28
81,888,796
1
4
null
null
null
null
UTF-8
Java
false
false
7,254
java
package com.ab.view.listener; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemLongClickListener; import android.widget.AdapterView.OnItemSelectedListener; import com.ab.global.AbAppException; import java.lang.reflect.Method; public class AbIocEventListener implements View.OnClickListener, View.OnLongClickListener, AdapterView.OnItemClickListener, AdapterView.OnItemSelectedListener, AdapterView.OnItemLongClickListener { private String clickMethod; private Object handler; private String itemClickMethod; private String itemLongClickMehtod; private String itemSelectMethod; private String longClickMethod; private String nothingSelectedMethod; public AbIocEventListener(Object paramObject) { this.handler = paramObject; } private static Object invokeClickMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null) return null; try { Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { View.class }); if (localMethod != null) return localMethod.invoke(paramObject, paramArrayOfObject); throw new AbAppException("no such method:" + paramString); } catch (Exception paramObject) { paramObject.printStackTrace(); } return null; } private static Object invokeItemClickMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null) return null; try { Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { AdapterView.class, View.class, Integer.TYPE, Long.TYPE }); if (localMethod != null) return localMethod.invoke(paramObject, paramArrayOfObject); throw new AbAppException("no such method:" + paramString); } catch (Exception paramObject) { paramObject.printStackTrace(); } return null; } private static boolean invokeItemLongClickMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null) try { throw new AbAppException("invokeItemLongClickMethod: handler is null :"); } catch (Exception paramObject) { paramObject.printStackTrace(); return false; } Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { AdapterView.class, View.class, Integer.TYPE, Long.TYPE }); if (localMethod != null) { paramObject = localMethod.invoke(paramObject, paramArrayOfObject); if (paramObject == null); for (boolean bool = false; ; bool = Boolean.valueOf(paramObject.toString()).booleanValue()) return Boolean.valueOf(bool).booleanValue(); } throw new AbAppException("no such method:" + paramString); } private static Object invokeItemSelectMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null) return null; try { Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { AdapterView.class, View.class, Integer.TYPE, Long.TYPE }); if (localMethod != null) return localMethod.invoke(paramObject, paramArrayOfObject); throw new AbAppException("no such method:" + paramString); } catch (Exception paramObject) { paramObject.printStackTrace(); } return null; } private static boolean invokeLongClickMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null); while (true) { return false; try { Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { View.class }); if (localMethod != null) { paramObject = localMethod.invoke(paramObject, paramArrayOfObject); if (paramObject != null) return Boolean.valueOf(paramObject.toString()).booleanValue(); } else { throw new AbAppException("no such method:" + paramString); } } catch (Exception paramObject) { paramObject.printStackTrace(); } } return false; } private static Object invokeNoSelectMethod(Object paramObject, String paramString, Object[] paramArrayOfObject) { if (paramObject == null) return null; try { Method localMethod = paramObject.getClass().getDeclaredMethod(paramString, new Class[] { AdapterView.class }); if (localMethod != null) return localMethod.invoke(paramObject, paramArrayOfObject); throw new AbAppException("no such method:" + paramString); } catch (Exception paramObject) { paramObject.printStackTrace(); } return null; } public AbIocEventListener click(String paramString) { this.clickMethod = paramString; return this; } public AbIocEventListener itemClick(String paramString) { this.itemClickMethod = paramString; return this; } public AbIocEventListener itemLongClick(String paramString) { this.itemLongClickMehtod = paramString; return this; } public AbIocEventListener longClick(String paramString) { this.longClickMethod = paramString; return this; } public AbIocEventListener noSelect(String paramString) { this.nothingSelectedMethod = paramString; return this; } public void onClick(View paramView) { invokeClickMethod(this.handler, this.clickMethod, new Object[] { paramView }); } public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong) { invokeItemClickMethod(this.handler, this.itemClickMethod, new Object[] { paramAdapterView, paramView, Integer.valueOf(paramInt), Long.valueOf(paramLong) }); } public boolean onItemLongClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong) { return invokeItemLongClickMethod(this.handler, this.itemLongClickMehtod, new Object[] { paramAdapterView, paramView, Integer.valueOf(paramInt), Long.valueOf(paramLong) }); } public void onItemSelected(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong) { invokeItemSelectMethod(this.handler, this.itemSelectMethod, new Object[] { paramAdapterView, paramView, Integer.valueOf(paramInt), Long.valueOf(paramLong) }); } public boolean onLongClick(View paramView) { return invokeLongClickMethod(this.handler, this.longClickMethod, new Object[] { paramView }); } public void onNothingSelected(AdapterView<?> paramAdapterView) { invokeNoSelectMethod(this.handler, this.nothingSelectedMethod, new Object[] { paramAdapterView }); } public AbIocEventListener select(String paramString) { this.itemSelectMethod = paramString; return this; } } /* Location: F:\一周备份\面试apk\希望代码没混淆\jingmgou\jingmgou2\classes-dex2jar.jar * Qualified Name: com.ab.view.listener.AbIocEventListener * JD-Core Version: 0.6.2 */
[ "jiushiqiangone@sina.com" ]
jiushiqiangone@sina.com
4032cae639cc08a84d667471f10f0a159eb33535
e8069a92e8fa4c6ce711c6a6b308f66963f2125b
/sampleapp2/src/main/java/com/capgemini/sampleapp2/general/service/impl/ApplicationAccessDeniedHandler.java
b5525757fbefee7b4cd4b21b270e650d96bbc5c2
[]
no_license
pablo-parra/microservices_poc
64babe74f9965ee0a742ee96ee41338bb237dd4c
fe8474c9f113d77d759120a77b6e5e7a6b0035fe
refs/heads/master
2020-03-12T21:07:13.410654
2018-09-20T10:13:00
2018-09-20T10:13:00
130,821,267
1
0
null
null
null
null
UTF-8
Java
false
false
1,356
java
package com.capgemini.sampleapp2.general.service.impl; import java.io.IOException; import javax.inject.Inject; import javax.inject.Named; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.Response; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.web.access.AccessDeniedHandler; import io.oasp.module.rest.service.impl.RestServiceExceptionFacade; /** * */ @Named("ApplicationAccessDeniedHandler") public class ApplicationAccessDeniedHandler implements AccessDeniedHandler { private RestServiceExceptionFacade exceptionFacade; @Override public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException { Response restResponse = this.exceptionFacade.toResponse(accessDeniedException); Object entity = restResponse.getEntity(); response.setStatus(restResponse.getStatus()); if (entity != null) { response.getWriter().write(entity.toString()); } } /** * @param exceptionFacade the exceptionFacade to set */ @Inject public void setExceptionFacade(RestServiceExceptionFacade exceptionFacade) { this.exceptionFacade = exceptionFacade; } }
[ "pablo.parra-dominguez@capgemini.com" ]
pablo.parra-dominguez@capgemini.com
a0b96febefddcbfd72e0f3d59505a83281087146
b111bfbd2c5835a53dc0f1f25b2a330cbd14ac51
/docx4j-openxml-objects/src/main/java/org/docx4j/dml/diagram/STArrowheadStyle.java
71baa622c0a5cf8e3114ec059a0c0f3c8462646e
[ "Apache-2.0" ]
permissive
AbuDeCoder/docx4j
abbda615c4f370dbd0c6c428a417494bc1439940
127959025e7b20dfaa78f8994cf78f6ef55ed39c
refs/heads/master
2021-09-18T02:34:31.266670
2021-08-13T02:48:36
2021-08-13T02:48:36
252,779,966
1
0
null
2020-04-03T16:08:16
2020-04-03T16:08:15
null
UTF-8
Java
false
false
2,060
java
/* * Copyright 2007-2008, Plutext Pty Ltd. * * This file is part of docx4j. docx4j 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. */ package org.docx4j.dml.diagram; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ST_ArrowheadStyle. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ST_ArrowheadStyle"&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"&gt; * &lt;enumeration value="auto"/&gt; * &lt;enumeration value="arr"/&gt; * &lt;enumeration value="noArr"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "ST_ArrowheadStyle") @XmlEnum public enum STArrowheadStyle { /** * Auto * */ @XmlEnumValue("auto") AUTO("auto"), /** * Arrowhead Present * */ @XmlEnumValue("arr") ARR("arr"), /** * No Arrowhead * */ @XmlEnumValue("noArr") NO_ARR("noArr"); private final String value; STArrowheadStyle(String v) { value = v; } public String value() { return value; } public static STArrowheadStyle fromValue(String v) { for (STArrowheadStyle c: STArrowheadStyle.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "jason@plutext.org" ]
jason@plutext.org
34818dc72a4e54035f51b6f62d4798d14f341e5e
947fc9eef832e937f09f04f1abd82819cd4f97d3
/src/apk/androidx/fragment/app/C0202q.java
c6cbd837180d009a38d0e2f65e4883edf57da520
[]
no_license
thistehneisen/cifra
04f4ac1b230289f8262a0b9cf7448a1172d8f979
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
refs/heads/master
2020-09-22T09:35:57.739040
2019-12-01T19:39:59
2019-12-01T19:39:59
225,136,583
1
0
null
null
null
null
UTF-8
Java
false
false
416
java
package androidx.fragment.app; /* renamed from: androidx.fragment.app.q reason: case insensitive filesystem */ /* compiled from: FragmentManagerImpl */ class C0202q implements Runnable { /* renamed from: a reason: collision with root package name */ final /* synthetic */ C0207w f1547a; C0202q(C0207w wVar) { this.f1547a = wVar; } public void run() { this.f1547a.u(); } }
[ "putnins@nils.digital" ]
putnins@nils.digital
0b992c9b1fd5afac9b999d6bbd7ce73a82712820
bc1e54853af18e70b3d377370ef9271958994e43
/lealone-atomicdb/src/main/java/com/codefollower/lealone/atomicdb/repair/NodePair.java
77aab68fae633bbdb85ab462493f626bd08dd51c
[ "Apache-2.0" ]
permissive
alemic/Lealone
d5cf7241dce252b60513ff77b1c695ec613ce187
0a15b13e7ec6752b1adb5b063a7cc6f3e6852bad
refs/heads/master
2020-02-26T17:44:21.599597
2014-01-19T05:43:29
2014-01-19T05:43:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,885
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 com.codefollower.lealone.atomicdb.repair; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.net.InetAddress; import com.codefollower.lealone.atomicdb.io.IVersionedSerializer; import com.codefollower.lealone.atomicdb.net.CompactEndpointSerializationHelper; import com.google.common.base.Objects; /** * NodePair is used for repair message body to indicate the pair of nodes. * * @since 2.0 */ public class NodePair { public static IVersionedSerializer<NodePair> serializer = new NodePairSerializer(); public final InetAddress endpoint1; public final InetAddress endpoint2; public NodePair(InetAddress endpoint1, InetAddress endpoint2) { this.endpoint1 = endpoint1; this.endpoint2 = endpoint2; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NodePair nodePair = (NodePair) o; return endpoint1.equals(nodePair.endpoint1) && endpoint2.equals(nodePair.endpoint2); } @Override public int hashCode() { return Objects.hashCode(endpoint1, endpoint2); } public static class NodePairSerializer implements IVersionedSerializer<NodePair> { public void serialize(NodePair nodePair, DataOutput out, int version) throws IOException { CompactEndpointSerializationHelper.serialize(nodePair.endpoint1, out); CompactEndpointSerializationHelper.serialize(nodePair.endpoint2, out); } public NodePair deserialize(DataInput in, int version) throws IOException { InetAddress ep1 = CompactEndpointSerializationHelper.deserialize(in); InetAddress ep2 = CompactEndpointSerializationHelper.deserialize(in); return new NodePair(ep1, ep2); } public long serializedSize(NodePair nodePair, int version) { return 2 * CompactEndpointSerializationHelper.serializedSize(nodePair.endpoint1); } } }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
7b9cdbe51ffdaddc340692c5c4f7fa08e1c17fba
b9bfebe568f1afd9b90f83f3067e2aa1f266a8ee
/Concurrent/src/main/java/rich/zrc/method/Sleep_Yield.java
54aea5cea97fb6585acb9af0f0bce96fcaf43556
[]
no_license
ZrcLeibniz/Java
fa7c737840d33e572e5d8d87951b6ccd609a38af
cfc3119712844dd8856009101575c819874d89f0
refs/heads/master
2023-06-21T01:49:48.132730
2021-07-23T07:07:42
2021-07-23T07:07:42
267,491,828
0
0
null
2020-10-13T02:18:30
2020-05-28T04:20:10
Java
UTF-8
Java
false
false
2,935
java
package rich.zrc.method; /* sleep 1.调用sleep会让当前线程从Running进入Timed Waiting状态 2.其它线程可以使用interrupt方法打断正在睡眠的线程,这时sleep方法会抛出InterruptedException 3.睡眠结束后的线程未必会立刻得到执行 4.建议用TimeUnit的Sleep代替Thread的sleep来获得更好的可读性 yield 1.调用yield会让当前线程从Running进入Runnable状态,然后调度执行其他同优先级的线程。如果这时没有同优先级的线程,那么不能保证让当前线程暂停的效果 2.具体的额实现依赖于操作系统的任务调度器 */ import lombok.extern.slf4j.Slf4j; import org.junit.Test; import java.util.concurrent.TimeUnit; @Slf4j(topic = "c.Sleep_Yield") public class Sleep_Yield { @Test public void test1() { Thread thread = new Thread("t1") { @Override public void run() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } }; log.debug("running"); thread.start(); log.debug("t1 state: {}", thread.getState()); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } log.debug("t1 state: {}", thread.getState()); } @Test public void test2() { Thread thread = new Thread() { @Override public void run() { log.debug("enter sleep..."); try { Thread.sleep(2000); } catch (InterruptedException e) { log.debug("wake up..."); e.printStackTrace(); } } }; thread.start(); try { Thread.sleep(1000); log.debug("interrupt..."); thread.interrupt(); } catch (InterruptedException e) { e.printStackTrace(); } } @Test public void test3() { try { log.debug("enter"); TimeUnit.SECONDS.sleep(3); log.debug("end"); } catch (InterruptedException e) { e.printStackTrace(); } } public void test4() { Runnable task1 = () -> { int count1 = 0; for (; ; ) { System.out.println("----->1 " + count1++); } }; Runnable task2 = () -> { int count2 = 0; for (; ; ) { Thread.yield(); System.out.println(" ----->2 " + count2++); } }; Thread thread1 = new Thread(task1, "t1"); Thread thread2 = new Thread(task2, "t2"); thread1.setPriority(10); thread1.setPriority(1); thread1.start(); thread2.start(); } }
[ "2834511920@qq.com" ]
2834511920@qq.com
f41fedf71ca9ac01d7bfaa03014eb98989708079
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Codec-17/org.apache.commons.codec.binary.StringUtils/BBC-F0-opt-20/tests/29/org/apache/commons/codec/binary/StringUtils_ESTest_scaffolding.java
67e44398f2a756f28e54a4287f06250d745dcefb
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,427
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Oct 24 01:51:10 GMT 2021 */ package org.apache.commons.codec.binary; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class StringUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.codec.binary.StringUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StringUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.codec.binary.StringUtils", "org.apache.commons.codec.Charsets", "org.apache.commons.codec.binary.CharSequenceUtils" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(StringUtils_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.codec.binary.StringUtils", "org.apache.commons.codec.Charsets", "org.apache.commons.codec.binary.CharSequenceUtils" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
b361d46a5c04a8d4001632235a024e5cc0e0df69
962a6192bbbadcd1a314026406670d8e87db83f5
/talkTV30/src/main/java/com/sumavision/talktv2/components/GuideGallery.java
665961e09192c061fba82be9fd2b6dd4e6324c2a
[]
no_license
sharpayzara/TalkTV3.0_Studio_yy
1aa09c1b5ba697514535a507fd017faf1db81b06
801afa091aa41835873f466655872190745a9d93
refs/heads/master
2021-01-19T16:04:12.195817
2017-04-13T21:00:19
2017-04-13T21:00:19
88,245,487
0
1
null
null
null
null
UTF-8
Java
false
false
2,363
java
package com.sumavision.talktv2.components; import java.util.Timer; import java.util.TimerTask; import android.annotation.SuppressLint; import android.content.Context; import android.os.Handler; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; import android.widget.Gallery; /** * 自定义gallery * * * @author:zhaohongru * * @time:2013-12-5 下午2:33:38 */ @SuppressWarnings("deprecation") @SuppressLint("HandlerLeak") public class GuideGallery extends Gallery { private Timer timer = new Timer(); private TimerTask task = new TimerTask() { @Override public void run() { mHandler.sendEmptyMessage(timerAnimation); } }; public GuideGallery(Context context, AttributeSet attrs) { super(context, attrs); timer.schedule(task, 5000, 8000); } private static final int timerAnimation = 1; private final Handler mHandler = new Handler() { @Override public void handleMessage(android.os.Message msg) { switch (msg.what) { case timerAnimation: int position = getSelectedItemPosition(); if (position >= (getCount() - 1)) { onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, null); } else { onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, null); } break; default: break; } }; }; @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: // requestFocus(); break; case MotionEvent.ACTION_MOVE: requestDisallowInterceptTouchEvent(true); break; default: break; } return super.onTouchEvent(event); }; @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { int keyCode; if (isScrollingLeft(e1, e2)) { keyCode = KeyEvent.KEYCODE_DPAD_LEFT; } else { keyCode = KeyEvent.KEYCODE_DPAD_RIGHT; } onKeyDown(keyCode, null); return false; } private boolean isScrollingLeft(MotionEvent e1, MotionEvent e2) { return e2.getX() > e1.getX(); } public void stopGallery() { timer.cancel(); task.cancel(); } public void startGallery() { if (timer != null) { task.cancel(); timer.cancel(); Timer timer = new Timer(); task = new TimerTask() { @Override public void run() { mHandler.sendEmptyMessage(timerAnimation); } }; timer.schedule(task, 5000, 8000); } } }
[ "864064269@qq.com" ]
864064269@qq.com
9927fd2d7cdd5f8492a43c22709d1993d38c35ab
5f10f0671c975011fa05f16a829dbb0eb19e2b52
/tests/src/test/java/com/orientechnologies/orient/test/database/auto/FetchPlanComplexNestedLevelsTest.java
27c60f1b62e76d509344f2d897add144a5ea85b6
[ "BSD-3-Clause", "CDDL-1.0", "Apache-2.0" ]
permissive
guilhermejccavalcanti/orientdb
6d02bd6202608aef71aef73b8724c6bdb1be708b
c2a78a6047b3d17bc3fa6ee8b4c7a78c9812617e
refs/heads/master
2020-03-25T05:48:19.849467
2018-08-12T20:37:38
2018-08-12T20:37:38
143,466,702
0
0
Apache-2.0
2018-08-03T19:39:09
2018-08-03T19:39:09
null
UTF-8
Java
false
false
5,277
java
/* * Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com) * * 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.orientechnologies.orient.test.database.auto; import java.util.List; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Optional; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.orientechnologies.orient.core.metadata.schema.OClass; import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.sql.OCommandSQL; import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery; @Test(groups = "query", sequential = true) public class FetchPlanComplexNestedLevelsTest extends DocumentDBBaseTest { @Parameters(value = "url") public FetchPlanComplexNestedLevelsTest(@Optional String url) { super(url); } @BeforeClass public void beforeClass() throws Exception { super.beforeClass(); final OClass personTest = database.getMetadata().getSchema().getClass("PersonTest"); if (personTest == null) database.getMetadata().getSchema().createClass("PersonTest", database.getMetadata().getSchema().getClass("V")); else if (personTest.getSuperClass() == null) personTest.setSuperClass(database.getMetadata().getSchema().getClass("V")); final OClass followTest = database.getMetadata().getSchema().getClass("FollowTest"); if (followTest == null) database.getMetadata().getSchema().createClass("FollowTest", database.getMetadata().getSchema().getClass("E")); else if (followTest.getSuperClass() == null) followTest.setSuperClass(database.getMetadata().getSchema().getClass("E")); database.command(new OCommandSQL("create vertex PersonTest set name = 'A'")).execute(); database.command(new OCommandSQL("create vertex PersonTest set name = 'B'")).execute(); database.command(new OCommandSQL("create vertex PersonTest set name = 'C'")).execute(); database.command( new OCommandSQL( "create edge FollowTest from (select from PersonTest where name = 'A') to (select from PersonTest where name = 'B')")) .execute(); database.command( new OCommandSQL( "create edge FollowTest from (select from PersonTest where name = 'B') to (select from PersonTest where name = 'C')")) .execute(); } @Test public void queryAll2() { final List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>( "select @this.toJSON('fetchPlan:*:2') as json from (select from PersonTest where name='A')")); Assert.assertEquals(result.size(), 1); String json = result.get(0).rawField("json"); Assert.assertNotNull(json); final ODocument parsed = new ODocument().fromJSON(json); Assert.assertNotNull(parsed.rawField("out_FollowTest.in.out_FollowTest")); } @Test public void queryOutWildcard2() { final List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>( "select @this.toJSON('fetchPlan:out_*:2') as json from (select from PersonTest where name='A')")); Assert.assertEquals(result.size(), 1); String json = result.get(0).rawField("json"); Assert.assertNotNull(json); final ODocument parsed = new ODocument().fromJSON(json); Assert.assertNotNull(parsed.rawField("out_FollowTest.in.out_FollowTest")); } @Test public void queryOutOneLevelOnly() { final List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>( "select @this.toJSON('fetchPlan:[0]out_*:0') as json from (select from PersonTest where name='A')")); Assert.assertEquals(result.size(), 1); String json = result.get(0).field("json"); Assert.assertNotNull(json); int pos = json.indexOf("\"in\":\""); Assert.assertTrue(pos > -1); Assert.assertEquals(json.charAt(pos) + 1, '#'); } @Test public void startZeroGetOutStar2() { final List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>( "select @this.toJSON('fetchPlan:[0]out_*:2') as json from (select from PersonTest where name='A')")); Assert.assertEquals(result.size(), 1); String json = result.get(0).field("json"); Assert.assertNotNull(json); int pos = json.indexOf("\"in\":{"); Assert.assertTrue(pos > -1); } @Test public void start2GetOutStar2() { final List<ODocument> result = database.query(new OSQLSynchQuery<ODocument>( "select @this.toJSON('fetchPlan:[2]out_*:2') as json from (select from PersonTest where name='A')")); Assert.assertEquals(result.size(), 1); String json = result.get(0).field("json"); Assert.assertNotNull(json); int pos = json.indexOf("\"in\":\""); Assert.assertFalse(pos > -1); } }
[ "l.garulli@gmail.com" ]
l.garulli@gmail.com
b654e8b7c982744df6fb8129b2a52038410ab453
de8b590c72c1ca28ac07e206ce87f5e2c50449be
/src/main/java/org/wilson/world/novel/PurgeNStatsJob.java
bf964e137c26864a100e0bbc447e33a24767fe4d
[]
no_license
liumiaowilson/world
a513bfaacc94cbcf5b88c1a2ce5426944c7f83b4
818ee21b67edbf4961424d9d474110ac8201f591
refs/heads/master
2020-04-06T05:50:52.671982
2017-08-05T00:02:21
2017-08-05T00:02:21
62,312,015
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package org.wilson.world.novel; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wilson.world.cache.CachedDAO; import org.wilson.world.dao.DAO; import org.wilson.world.job.PurgeJob; import org.wilson.world.manager.NovelStatManager; import org.wilson.world.util.TimeUtils; public class PurgeNStatsJob extends PurgeJob { @Override public PreparedStatement getPurgeStatement(Connection con) throws SQLException { long current = System.currentTimeMillis(); long last = current - 30 * TimeUtils.DAY_DURATION; String sql = "delete from novel_stats where time < ?"; PreparedStatement ps = con.prepareStatement(sql); ps.setLong(1, last); return ps; } @SuppressWarnings("rawtypes") @Override public void notifyPurged() { DAO dao = NovelStatManager.getInstance().getDAO(); if(dao instanceof CachedDAO) { ((CachedDAO)dao).getCache().load(); } } }
[ "mialiu@ebay.com" ]
mialiu@ebay.com
42e2be42bd13ee6bebc7941c95ec9c9a0c54c8c7
e62c3b93b38d2d7781d38ba1cdbabfea2c1cf7af
/BOCMBankClient606/src/main/java/com/chinamworld/bocmbci/biz/finc/trade/FincTradeBuySuccessActivity.java
501de3dabe7a6131c7752e6d33edd6d7991edb04
[]
no_license
soghao/zgyh
df34779708a8d6088b869d0efc6fe1c84e53b7b1
09994dda29f44b6c1f7f5c7c0b12f956fc9a42c1
refs/heads/master
2021-06-19T07:36:53.910760
2017-06-23T14:23:10
2017-06-23T14:23:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,751
java
package com.chinamworld.bocmbci.biz.finc.trade; import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.chinamworld.bocmbci.R; import com.chinamworld.bocmbci.bii.constant.Finc; import com.chinamworld.bocmbci.biz.finc.FincBaseActivity; import com.chinamworld.bocmbci.biz.finc.control.FincControl; import com.chinamworld.bocmbci.constant.LocalData; import com.chinamworld.bocmbci.utils.PopupWindowUtils; import com.chinamworld.bocmbci.utils.StringUtil; /** * 基金买入成功页面 * * @author xyl * */ public class FincTradeBuySuccessActivity extends FincBaseActivity { private static final String TAG = "FincTradeBuySuccessActivity"; private String buyAmountStr; private String fundCodeStr; private String fundNameStr; private String feeTypeStr; private String tradeCurrencyStr; private String fundSeqStr; private String transIdStr; private String fundStateStr;// 基金状态 private TextView tradeIdTv; private TextView fundaccNumTv; private TextView accNumTv; private TextView fundSeqTv; private TextView fundNameTv; private TextView fundCodeTv; private TextView fundStateTv; private TextView feeTypeTv; private TextView fundCurrencyTv; private TextView buyAmountTv; /**执行方式*/ private LinearLayout finc_executeType_layout; private TextView finc_executeType_tv; /**执行日期*/ private LinearLayout finc_exeDate_layout; private TextView finc_exeDate_tv; private Button confirmBtn; private String assignedDateStr = null; private String cashFlagCode; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); init(); initData(); } /** * 初始化布局 * * @Author xyl */ private void init() { View childview = mainInflater.inflate(R.layout.finc_trade_buy_success, null); tabcontent.addView(childview); setTitle(R.string.finc_title_buy); tradeIdTv = (TextView) childview.findViewById(R.id.finc_tradeId_tv); fundaccNumTv = (TextView) childview.findViewById(R.id.finc_accNum_tv);// 基金账户号码 accNumTv = (TextView) childview.findViewById(R.id.finc_zjAccId_tv);// 资金账户号码 fundSeqTv = (TextView) childview.findViewById(R.id.finc_fundseq_colon);// 基金交易流水号 fundCodeTv = (TextView) childview .findViewById(R.id.finc_fundCode_textview); fundNameTv = (TextView) childview .findViewById(R.id.finc_fundName_textview); fundStateTv = (TextView) childview.findViewById(R.id.finc_fundstate_tv); feeTypeTv = (TextView) childview .findViewById(R.id.finc_feetype_textView); fundCurrencyTv = (TextView) childview .findViewById(R.id.finc_currency_tv); buyAmountTv = (TextView) childview.findViewById(R.id.finc_buyamount_tv); /**执行方式*/ finc_executeType_layout = (LinearLayout) childview.findViewById(R.id.finc_executeType_layout); finc_executeType_tv = (TextView) childview.findViewById(R.id.finc_executeType_tv); /**执行日期*/ finc_exeDate_layout = (LinearLayout) childview.findViewById(R.id.finc_exeDate_layout); finc_exeDate_tv = (TextView) childview.findViewById(R.id.finc_exeDate_tv); confirmBtn = (Button) childview.findViewById(R.id.finc_confirm); back.setVisibility(View.INVISIBLE); backImage.setVisibility(View.INVISIBLE); confirmBtn.setOnClickListener(this); initRightBtnForMain(); PopupWindowUtils.getInstance().setOnShowAllTextListener(this, fundNameTv); } private void initData() { Intent intent = getIntent(); Bundle extras = intent.getExtras(); buyAmountStr = extras.getString(Finc.I_BUYAMOUNT); fundCodeStr = extras.getString(Finc.I_FUNDCODE); fundNameStr = extras.getString(Finc.I_FUNDNAME); feeTypeStr = extras.getString(Finc.I_FEETYPE); tradeCurrencyStr = extras.getString(Finc.I_CURRENCYCODE); // cashFlagCode =extras.getString(Finc.I_CASHFLAG); cashFlagCode = (String) fincControl.fundDetails .get(Finc.FINC_CASHFLAG); fundSeqStr = extras.getString(Finc.I_FINCBUYSQL); transIdStr = extras.getString(Finc.I_TRANSACTIONID); fundStateStr = extras.getString(Finc.I_FUNDSTATE); assignedDateStr = extras.getString(Finc.I_ASSIGNEDDATE); if(assignedDateStr == null){ finc_executeType_layout.setVisibility(View.GONE); finc_exeDate_layout.setVisibility(View.GONE); }else{ /**执行方式*/ finc_executeType_layout.setVisibility(View.VISIBLE); /**执行日期*/ finc_exeDate_layout.setVisibility(View.VISIBLE); finc_exeDate_tv.setText(assignedDateStr); } tradeIdTv.setText(transIdStr); if(StringUtil.isNullOrEmpty(fundSeqStr)){ fundSeqTv.setText("-"); }else{ fundSeqTv.setText(fundSeqStr); } fundCodeTv.setText(fundCodeStr); fundNameTv.setText(fundNameStr); fundStateTv.setText(LocalData.fincFundStateCodeToStr.get(fundStateStr)); feeTypeTv.setText(LocalData.fundfeeTypeCodeToStr.get(feeTypeStr)); fundCurrencyTv.setText(FincControl.fincCurrencyAndCashFlag(tradeCurrencyStr, cashFlagCode));//如果不是人民币 显示币种和炒汇 buyAmountTv.setText(StringUtil.parseStringCodePattern(tradeCurrencyStr, buyAmountStr,2)); accNumTv.setText(StringUtil.getForSixForString(fincControl.accNum)); fundaccNumTv.setText(fincControl.invAccId); } @Override public void onClick(View v) { super.onClick(v); switch (v.getId()) { case R.id.finc_confirm: finish(); break; default: break; } } @Override public void finish() { setResult(RESULT_OK); super.finish(); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK){ return true; } return super.onKeyDown(keyCode, event); } }
[ "15609143618@163.com" ]
15609143618@163.com
da6e3ab6f7de53b62b69de32fc3c9f1fc655d113
b4a2a49b9744329e5e894cef1222be309bfe58b2
/src/main/java/org/tugraz/sysds/parser/ParseInfo.java
0fcc6d410066da75c8901dbd681cfe9e2f0dc1d7
[ "Apache-2.0" ]
permissive
tugraz-isds/systemds
b1942d8f905ccf8a5da233a376c8bab045688cbf
c771440e9d41507a1420a58d316ac82b53923d55
refs/heads/master
2021-06-26T02:49:55.256823
2020-09-01T15:39:21
2020-09-01T15:39:21
147,829,568
42
28
Apache-2.0
2020-10-13T10:59:15
2018-09-07T13:48:30
Java
UTF-8
Java
false
false
3,476
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.tugraz.sysds.parser; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.misc.Interval; public interface ParseInfo { public void setBeginLine(int beginLine); public void setBeginColumn(int beginColumn); public void setEndLine(int endLine); public void setEndColumn(int endColumn); public void setText(String text); public void setFilename(String filename); public int getBeginLine(); public int getBeginColumn(); public int getEndLine(); public int getEndColumn(); public String getText(); public String getFilename(); public static ParseInfo ctxAndFilenameToParseInfo(ParserRuleContext ctx, String fname) { ParseInfo pi = new ParseInfo() { private int beginLine; private int beginColumn; private int endLine; private int endColumn; private String text; private String filename; @Override public void setBeginLine(int beginLine) { this.beginLine = beginLine; } @Override public void setBeginColumn(int beginColumn) { this.beginColumn = beginColumn; } @Override public void setEndLine(int endLine) { this.endLine = endLine; } @Override public void setEndColumn(int endColumn) { this.endColumn = endColumn; } @Override public void setText(String text) { this.text = text; } @Override public void setFilename(String filename) { this.filename = filename; } @Override public int getBeginLine() { return beginLine; } @Override public int getBeginColumn() { return beginColumn; } @Override public int getEndLine() { return endLine; } @Override public int getEndColumn() { return endColumn; } @Override public String getText() { return text; } @Override public String getFilename() { return filename; } }; pi.setBeginLine(ctx.start.getLine()); pi.setBeginColumn(ctx.start.getCharPositionInLine()); pi.setEndLine(ctx.stop.getLine()); pi.setEndColumn(ctx.stop.getCharPositionInLine()); // preserve whitespace if possible if ((ctx.start != null) && (ctx.stop != null) && (ctx.start.getStartIndex() != -1) && (ctx.stop.getStopIndex() != -1) && (ctx.start.getStartIndex() <= ctx.stop.getStopIndex()) && (ctx.start.getInputStream() != null)) { String text = ctx.start.getInputStream() .getText(Interval.of(ctx.start.getStartIndex(), ctx.stop.getStopIndex())); if (text != null) { text = text.trim(); } pi.setText(text); } else { String text = ctx.getText(); if (text != null) { text = text.trim(); } pi.setText(text); } pi.setFilename(fname); return pi; } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
7debad1f4342f7857edfefad63692707acf846b8
fe91ffa11707887e4cdddde8f386a8c8e724aa58
/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/RecyclerViewTestUtils.java
eb223de6e8bf1b0fb8a256c71f399e17349c9bbe
[ "BSD-3-Clause" ]
permissive
akshaymarch7/chromium
78baac2b45526031846ccbaeca96c639d1d60ace
d273c844a313b1e527dec0d59ce70c95fd2bd458
refs/heads/master
2023-02-26T23:48:03.686055
2020-04-15T01:20:07
2020-04-15T01:20:07
255,778,651
2
1
BSD-3-Clause
2020-04-15T02:04:56
2020-04-15T02:04:55
null
UTF-8
Java
false
false
5,396
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.test.util.browser; import android.view.View; import androidx.recyclerview.widget.RecyclerView; import org.chromium.base.test.util.CallbackHelper; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper; import org.chromium.content_public.browser.test.util.TestThreadUtils; import java.util.concurrent.TimeoutException; /** * Utilities for {@link RecyclerView}, to handle waiting for animation changes and other potential * flakiness sources. */ public final class RecyclerViewTestUtils { private RecyclerViewTestUtils() {} public static RecyclerView.ViewHolder waitForView( final RecyclerView recyclerView, final int position) { CriteriaHelper.pollUiThread(new Criteria() { @Override public boolean isSatisfied() { RecyclerView.ViewHolder viewHolder = recyclerView.findViewHolderForAdapterPosition(position); if (viewHolder == null) { updateFailureReason("Cannot find view holder for position " + position + "."); return false; } if (viewHolder.itemView.getParent() == null) { updateFailureReason("The view is not attached for position " + position + "."); return false; } if (!viewHolder.itemView.isShown()) { updateFailureReason("The view is not visible for position " + position + "."); return false; } return true; } }); waitForStableRecyclerView(recyclerView); return recyclerView.findViewHolderForAdapterPosition(position); } public static void waitForViewToDetach(final RecyclerView recyclerView, final View view) throws TimeoutException { final CallbackHelper callback = new CallbackHelper(); recyclerView.addOnChildAttachStateChangeListener( new RecyclerView.OnChildAttachStateChangeListener() { @Override public void onChildViewAttachedToWindow(View view) {} @Override public void onChildViewDetachedFromWindow(View detachedView) { if (detachedView == view) { recyclerView.removeOnChildAttachStateChangeListener(this); callback.notifyCalled(); } } }); callback.waitForCallback("The view did not detach.", 0); waitForStableRecyclerView(recyclerView); } public static void waitForStableRecyclerView(final RecyclerView recyclerView) { CriteriaHelper.pollUiThread(new Criteria() { @Override public boolean isSatisfied() { if (recyclerView.isComputingLayout()) { updateFailureReason("The recycler view is computing layout."); return false; } if (recyclerView.isLayoutFrozen()) { updateFailureReason("The recycler view layout is frozen."); return false; } if (recyclerView.isAnimating()) { updateFailureReason("The recycler view is animating."); return false; } if (recyclerView.isDirty()) { updateFailureReason("The recycler view is dirty."); return false; } if (recyclerView.isLayoutRequested()) { updateFailureReason("The recycler view has layout requested."); return false; } return true; } }); } /** * Scrolls the {@link View} at the given adapter position into view and returns * its {@link RecyclerView.ViewHolder}. * @param recyclerView the {@link RecyclerView} to scroll. * @param position the adapter position for which to return the {@link RecyclerView.ViewHolder}. * @return the ViewHolder for the given {@code position}. */ public static RecyclerView.ViewHolder scrollToView(RecyclerView recyclerView, int position) { TestThreadUtils.runOnUiThreadBlocking(() -> recyclerView.scrollToPosition(position)); return waitForView(recyclerView, position); } /** * Scrolls the {@link RecyclerView} to the bottom. */ public static void scrollToBottom(RecyclerView recyclerView) { TestThreadUtils.runOnUiThreadBlocking(() -> { // Scroll to bottom. recyclerView.scrollToPosition(recyclerView.getAdapter().getItemCount() - 1); }); CriteriaHelper.pollUiThread(new Criteria(){ @Override public boolean isSatisfied() { // Wait until we can scroll no further. // A positive parameter checks scrolling down, a negative one scrolling up. return !recyclerView.canScrollVertically(1); } }); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
825c1880a17e95f835c7fd91486723163705535d
9676778cb3dba27db7fb9584f167aa5e66da8aeb
/opentracing-metrics/src/main/java/io/opentracing/contrib/metrics/tracer/MetricsTracer.java
5201fd6a1b2e4fb509ee738d9d7cd2db83cf9a85
[ "Apache-2.0" ]
permissive
objectiser/java-metrics-prototype
33e551c35b418532d7a514ed2ad7092c20538df9
4218950c33fd9bd2e599139a6079dc3e2ed5cbbf
refs/heads/master
2021-03-27T08:46:58.419218
2017-06-13T16:04:53
2017-06-13T16:04:53
93,865,113
0
1
null
null
null
null
UTF-8
Java
false
false
7,512
java
package io.opentracing.contrib.metrics.tracer; import java.util.HashMap; import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import io.opentracing.ActiveSpan; import io.opentracing.BaseSpan; import io.opentracing.Span; import io.opentracing.SpanContext; import io.opentracing.Tracer; import io.opentracing.contrib.metrics.MetricsReporter; import io.opentracing.propagation.Format; public class MetricsTracer implements Tracer { private final Tracer tracer; private final MetricsReporter reporter; private final Map<SpanContext,MetricData> metricData = new WeakHashMap<SpanContext,MetricData>(); public MetricsTracer(Tracer tracer, MetricsReporter reporter) { this.tracer = tracer; this.reporter = reporter; } MetricsReporter getReporter() { return reporter; } @Override public ActiveSpan activeSpan() { return new MetricsActiveSpan(this, tracer.activeSpan()); } @Override public ActiveSpan makeActive(Span span) { return new MetricsActiveSpan(this, tracer.makeActive(span)); } @Override public SpanBuilder buildSpan(String operation) { return new MetricsSpanBuilder(operation, tracer.buildSpan(operation)); } @Override public <C> SpanContext extract(Format<C> format, C carrier) { return tracer.extract(format, carrier); } @Override public <C> void inject(SpanContext context, Format<C> format, C carrier) { tracer.inject(context, format, carrier); } void spanStarted(BaseSpan<?> span, String operationName, long startNanoTime, Map<String,Object> tags) { if (reporter != null) { synchronized (metricData) { metricData.put(span.context(), new MetricData(span, operationName, startNanoTime, tags)); } } } void spanUpdateTag(SpanContext context, String key, Object value) { if (reporter != null) { synchronized (metricData) { MetricData data = metricData.get(context); if (data != null) { data.getTags().put(key, value); } } } } void spanUpdateOperation(SpanContext context, String operationName) { if (reporter != null) { synchronized (metricData) { MetricData data = metricData.get(context); if (data != null) { data.setOperationName(operationName); } } } } void spanFinished(SpanContext context, long finishNanoTime) { if (reporter != null) { MetricData data = null; synchronized (metricData) { data = metricData.remove(context); } if (data != null) { reporter.reportSpan(data.getSpan(), data.getOperationName(), data.getTags(), TimeUnit.NANOSECONDS.toMicros(finishNanoTime - data.getStartNanoTime())); } } } void spanCreatedContinuation(SpanContext context) { if (reporter != null) { synchronized (metricData) { MetricData data = metricData.get(context); if (data != null) { data.incrementRefCount(); } } } } void spanDeactivated(SpanContext context) { if (reporter != null) { synchronized (metricData) { MetricData data = metricData.get(context); if (data != null && data.decrementRefCount() == 0) { spanFinished(context, System.nanoTime()); } } } } static class MetricData { private final AtomicInteger refCount; private BaseSpan<?> span; private String operationName; private final long startNanoTime; private Map<String,Object> tags; public MetricData(BaseSpan<?> span, String operationName, long startNanoTime, Map<String,Object> tags) { this.span = span; this.operationName = operationName; this.startNanoTime = startNanoTime; this.tags = tags; this.refCount = new AtomicInteger(1); } public BaseSpan<?> getSpan() { return span; } public String getOperationName() { return operationName; } public void setOperationName(String operationName) { this.operationName = operationName; } public long getStartNanoTime() { return startNanoTime; } public Map<String,Object> getTags() { return tags; } public void incrementRefCount() { refCount.incrementAndGet(); } public int decrementRefCount() { return refCount.decrementAndGet(); } } public class MetricsSpanBuilder implements SpanBuilder { private final String operationName; private final SpanBuilder builder; private final long startNanoTime = System.nanoTime(); private final Map<String,Object> tags = new HashMap<String,Object>(); public MetricsSpanBuilder(String operationName, SpanBuilder builder) { this.operationName = operationName; this.builder = builder; } @Override public SpanBuilder asChildOf(SpanContext parent) { builder.asChildOf(parent); return this; } @Override public SpanBuilder asChildOf(BaseSpan<?> parent) { builder.asChildOf(parent); return this; } @Override public SpanBuilder addReference(String referenceType, SpanContext referencedContext) { builder.addReference(referenceType, referencedContext); return this; } @Override public SpanBuilder ignoreActiveSpan() { builder.ignoreActiveSpan(); return this; } @Override public SpanBuilder withTag(String key, String value) { tags.put(key, value); builder.withTag(key, value); return this; } @Override public SpanBuilder withTag(String key, boolean value) { tags.put(key, value); builder.withTag(key, value); return this; } @Override public SpanBuilder withTag(String key, Number value) { tags.put(key, value); builder.withTag(key, value); return this; } @Override public SpanBuilder withStartTimestamp(long microseconds) { builder.withStartTimestamp(microseconds); return this; } @Override public ActiveSpan startActive() { ActiveSpan activeSpan = new MetricsActiveSpan(MetricsTracer.this, builder.startActive()); spanStarted(activeSpan, operationName, startNanoTime, tags); return activeSpan; } @Override public Span startManual() { Span span = new MetricsSpan(MetricsTracer.this, builder.startManual()); spanStarted(span, operationName, startNanoTime, tags); return span; } @Override public Span start() { return startManual(); } } }
[ "gary@brownuk.com" ]
gary@brownuk.com
efac27c08e388bfe498e9cf895852180a851afd2
fa2d84d1fd00ee5ffd0cb85808dce6f0d909d204
/algs/src/main/java/edu/princeton/cs/algs4/ch43/EdgeWeightedDirectedCycle.java
63edaf5028cd7c5a1ed7ced9972b5011ea725fb0
[]
no_license
hbwzhsh/tutorials
8ad70095fa9c4a5d3f2ca27a98afe404a1e0101c
02d0f97da44e71f3fd47def8010611796efce3e8
refs/heads/master
2021-01-18T00:58:05.822652
2015-05-29T08:28:26
2015-05-29T08:28:26
36,609,864
1
0
null
2015-05-31T15:42:17
2015-05-31T15:42:17
null
UTF-8
Java
false
false
7,602
java
package edu.princeton.cs.algs4.ch43; import edu.princeton.cs.algs4.ch13.Stack; import edu.princeton.cs.algs4.ch42.DirectedEdge; import edu.princeton.cs.introcs.*; /************************************************************************* * Compilation: javac EdgeWeightedDirectedCycle.java * Execution: java EdgeWeightedDirectedCycle V E F * Dependencies: EdgeWeightedDigraph.java DirectedEdge Stack.java * * Finds a directed cycle in an edge-weighted digraph. * Runs in O(E + V) time. * * *************************************************************************/ /** * The <tt>EdgeWeightedDirectedCycle</tt> class represents a data type for * determining whether an edge-weighted digraph has a directed cycle. * The <em>hasCycle</em> operation determines whether the edge-weighted * digraph has a directed cycle and, if so, the <em>cycle</em> operation * returns one. * <p> * This implementation uses depth-first search. * The constructor takes time proportional to <em>V</em> + <em>E</em> * (in the worst case), * where <em>V</em> is the number of vertices and <em>E</em> is the number of edges. * Afterwards, the <em>hasCycle</em> operation takes constant time; * the <em>cycle</em> operation takes time proportional * to the length of the cycle. * <p> * See {@link edu.princeton.cs.algs4.ch42.Topological} to compute a topological order if the edge-weighted * digraph is acyclic. * <p> * For additional documentation, see <a href="/algs4/44sp">Section 4.4</a> of * <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne. * * @author Robert Sedgewick * @author Kevin Wayne */ public class EdgeWeightedDirectedCycle { private boolean[] marked; // marked[v] = has vertex v been marked? private DirectedEdge[] edgeTo; // edgeTo[v] = previous edge on path to v private boolean[] onStack; // onStack[v] = is vertex on the stack? private Stack<DirectedEdge> cycle; // directed cycle (or null if no such cycle) /** * Determines whether the edge-weighted digraph <tt>G</tt> has a directed cycle and, * if so, finds such a cycle. * @param G the edge-weighted digraph */ public EdgeWeightedDirectedCycle(EdgeWeightedDigraph G) { marked = new boolean[G.V()]; onStack = new boolean[G.V()]; edgeTo = new DirectedEdge[G.V()]; for (int v = 0; v < G.V(); v++) if (!marked[v]) dfs(G, v); // check that digraph has a cycle assert check(G); } // check that algorithm computes either the topological order or finds a directed cycle private void dfs(EdgeWeightedDigraph G, int v) { onStack[v] = true; marked[v] = true; for (DirectedEdge e : G.adj(v)) { int w = e.to(); // short circuit if directed cycle found if (cycle != null) return; //found new vertex, so recur else if (!marked[w]) { edgeTo[w] = e; dfs(G, w); } // trace back directed cycle else if (onStack[w]) { cycle = new Stack<DirectedEdge>(); while (e.from() != w) { cycle.push(e); e = edgeTo[e.from()]; } cycle.push(e); } } onStack[v] = false; } /** * Does the edge-weighted digraph have a directed cycle? * @return <tt>true</tt> if the edge-weighted digraph has a directed cycle, * <tt>false</tt> otherwise */ public boolean hasCycle() { return cycle != null; } /** * Returns a directed cycle if the edge-weighted digraph has a directed cycle, * and <tt>null</tt> otherwise. * @return a directed cycle (as an iterable) if the edge-weighted digraph * has a directed cycle, and <tt>null</tt> otherwise */ public Iterable<DirectedEdge> cycle() { return cycle; } // certify that digraph is either acyclic or has a directed cycle private boolean check(EdgeWeightedDigraph G) { // edge-weighted digraph is cyclic if (hasCycle()) { // verify cycle DirectedEdge first = null, last = null; for (DirectedEdge e : cycle()) { if (first == null) first = e; if (last != null) { if (last.to() != e.from()) { System.err.printf("cycle edges %s and %s not incident\n", last, e); return false; } } last = e; } if (last.to() != first.from()) { System.err.printf("cycle edges %s and %s not incident\n", last, first); return false; } } return true; } /** * Unit tests the <tt>EdgeWeightedDirectedCycle</tt> data type. */ public static void main(String[] args) { // create random DAG with V vertices and E edges; then add F random edges int V = Integer.parseInt(args[0]); int E = Integer.parseInt(args[1]); int F = Integer.parseInt(args[2]); EdgeWeightedDigraph G = new EdgeWeightedDigraph(V); int[] vertices = new int[V]; for (int i = 0; i < V; i++) vertices[i] = i; StdRandom.shuffle(vertices); for (int i = 0; i < E; i++) { int v, w; do { v = StdRandom.uniform(V); w = StdRandom.uniform(V); } while (v >= w); double weight = Math.random(); G.addEdge(new DirectedEdge(v, w, weight)); } // add F extra edges for (int i = 0; i < F; i++) { int v = (int) (Math.random() * V); int w = (int) (Math.random() * V); double weight = Math.random(); G.addEdge(new DirectedEdge(v, w, weight)); } StdOut.println(G); // find a directed cycle EdgeWeightedDirectedCycle finder = new EdgeWeightedDirectedCycle(G); if (finder.hasCycle()) { StdOut.print("Cycle: "); for (DirectedEdge e : finder.cycle()) { StdOut.print(e + " "); } StdOut.println(); } // or give topologial sort else { StdOut.println("No directed cycle"); } } } /************************************************************************* * Copyright 2002-2012, Robert Sedgewick and Kevin Wayne. * * This file is part of algs4-package.jar, which accompanies the textbook * * Algorithms, 4th edition by Robert Sedgewick and Kevin Wayne, * Addison-Wesley Professional, 2011, ISBN 0-321-57351-X. * http://algs4.cs.princeton.edu * * * algs4-package.jar 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. * * algs4-package.jar 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 algs4-package.jar. If not, see http://www.gnu.org/licenses. *************************************************************************/
[ "zqhxuyuan@gmail.com" ]
zqhxuyuan@gmail.com
2c84e387320489b8b38e453938ebf35127c91d97
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_cd5698cfe1dc270a34ee8bf4cfc065ae2a65a6a9/MuleMojo/15_cd5698cfe1dc270a34ee8bf4cfc065ae2a65a6a9_MuleMojo_s.java
bc1d651894d8721e7aa8b39d109e4afa55ded9ce
[]
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
6,752
java
/* * $Id$ * ------------------------------------------------------------------------------------- * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.tools.maven.plugin; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.jar.JarArchiver; /** * Build a Mule application archive. * * @phase package * @goal mule * @requiresDependencyResolution runtime */ public class MuleMojo extends AbstractMuleMojo { /** * @component */ private MavenProjectHelper projectHelper; /** * Directory containing the classes. * * @parameter expression="${project.build.outputDirectory}" * @required */ private File classesDirectory; /** * Whether a JAR file will be created for the classes in the app. Using this optional * configuration parameter will make the generated classes to be archived into a jar file * and the classes directory will then be excluded from the app. * * @parameter expression="${archiveClasses}" default-value="false" */ private boolean archiveClasses; /** * List of exclusion elements (having groupId and artifactId children) to exclude from the * application archive. * * @parameter * @since 1.2 */ private List<Exclusion> exclusions; /** * List of inclusion elements (having groupId and artifactId children) to exclude from the * application archive. * * @parameter * @since 1.5 */ private List<Inclusion> inclusions; /** * Exclude all artifacts with Mule groupIds. Default is <code>true</code>. * * @parameter default-value="true" * @since 1.4 */ private boolean excludeMuleDependencies; /** * @parameter default-value="false" * @since 1.7 */ private boolean filterAppDirectory; /** * @parameter default-value="false" * @since 1.8 */ private boolean prependGroupId; public void execute() throws MojoExecutionException, MojoFailureException { File app = getMuleZipFile(); try { createMuleApp(app); } catch (ArchiverException e) { throw new MojoExecutionException("Exception creating the Mule App", e); } this.projectHelper.attachArtifact(this.project, "zip", app); } protected void createMuleApp(final File app) throws MojoExecutionException, ArchiverException { validateProject(); MuleArchiver archiver = new MuleArchiver(prependGroupId); addAppDirectory(archiver); addCompiledClasses(archiver); addDependencies(archiver); archiver.setDestFile(app); try { app.delete(); archiver.createArchive(); } catch (IOException e) { getLog().error("Cannot create archive", e); } } private void validateProject() throws MojoExecutionException { File muleConfig = new File(appDirectory, "mule-config.xml"); File deploymentDescriptor = new File(appDirectory, "mule-deploy.properties"); if ((muleConfig.exists() == false) && (deploymentDescriptor.exists() == false)) { String message = String.format("No mule-config.xml or mule-deploy.properties in %1s", this.project.getBasedir()); getLog().error(message); throw new MojoExecutionException(message); } } private void addAppDirectory(MuleArchiver archiver) throws ArchiverException { if (filterAppDirectory) { archiver.addResources(getFilteredAppDirectory()); } else { archiver.addResources(appDirectory); } } private void addCompiledClasses(MuleArchiver archiver) throws ArchiverException, MojoExecutionException { if (this.archiveClasses == false) { addClassesFolder(archiver); } else { addArchivedClasses(archiver); } } private void addClassesFolder(MuleArchiver archiver) throws ArchiverException { if (this.classesDirectory.exists()) { getLog().info("Copying classes directly"); archiver.addClasses(this.classesDirectory, null, null); } else { getLog().info(this.classesDirectory + " does not exist, skipping"); } } private void addArchivedClasses(MuleArchiver archiver) throws ArchiverException, MojoExecutionException { if (this.classesDirectory.exists() == false) { getLog().info(this.classesDirectory + " does not exist, skipping"); return; } getLog().info("Copying classes as a jar"); final JarArchiver jarArchiver = new JarArchiver(); jarArchiver.addDirectory(this.classesDirectory, null, null); final File jar = new File(this.outputDirectory, this.finalName + ".jar"); jarArchiver.setDestFile(jar); try { jarArchiver.createArchive(); archiver.addLib(jar); } catch (IOException e) { final String message = "Cannot create project jar"; getLog().error(message, e); throw new MojoExecutionException(message, e); } } private void addDependencies(MuleArchiver archiver) throws ArchiverException { for (Artifact artifact : getArtifactsToArchive()) { String message = String.format("Adding <%1s> as a lib", artifact.getId()); getLog().info(message); archiver.addLibraryArtifact(artifact); } } private Set<Artifact> getArtifactsToArchive() { ArtifactFilter filter = new ArtifactFilter(this.project, this.inclusions, this.exclusions, this.excludeMuleDependencies); return filter.getArtifactsToArchive(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
205b11b78007a323cd8daa4a2a44540eb5eaee63
5997633f833b5c0172b7f774eeb2350f64cedbd7
/webapp/src/main/java/com/box/l10n/mojito/quartz/QuartzPollableTaskScheduler.java
2115f5c4b89f8464773531d11967e2d63760ce4d
[ "Apache-2.0" ]
permissive
boxmoji/mojito
42b5cceffba891ec3750d1bcf8a8160af21608ce
03b3c9f8602697b37278dcee131cf9cb9b53bb5c
refs/heads/master
2023-08-09T21:43:44.325425
2020-09-01T19:18:35
2020-09-01T20:07:54
70,105,535
0
0
Apache-2.0
2020-09-15T03:26:28
2016-10-05T22:48:30
Java
UTF-8
Java
false
false
6,286
java
package com.box.l10n.mojito.quartz; import com.box.l10n.mojito.entity.PollableTask; import com.box.l10n.mojito.json.ObjectMapper; import com.box.l10n.mojito.service.pollableTask.PollableFuture; import com.box.l10n.mojito.service.pollableTask.PollableTaskBlobStorage; import com.box.l10n.mojito.service.pollableTask.PollableTaskService; import com.ibm.icu.text.MessageFormat; import org.quartz.JobBuilder; import org.quartz.JobDetail; import org.quartz.JobKey; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.Trigger; import org.quartz.TriggerBuilder; import org.quartz.TriggerKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import static com.box.l10n.mojito.quartz.QuartzConfig.DYNAMIC_GROUP_NAME; @Component public class QuartzPollableTaskScheduler { /** * logger */ static Logger logger = LoggerFactory.getLogger(QuartzPollableTaskScheduler.class); @Autowired Scheduler scheduler; @Autowired PollableTaskService pollableTaskService; @Autowired PollableTaskBlobStorage pollableTaskBlobStorage; @Autowired ObjectMapper objectMapper; public <I, O> PollableFuture<O> scheduleJob(Class<? extends QuartzPollableJob<I, O>> clazz, I input) { QuartzJobInfo<I, O> quartzJobInfo = QuartzJobInfo.newBuilder(clazz). withInput(input). withMessage(clazz.getSimpleName()). build(); return scheduleJob(quartzJobInfo); } /** * Schedules a job. * * @param clazz class of the job to be executed * @param input the input of the job (will get serialized inline the quartz data or in the blobstorage, see inlineInput) * @param parentId optional parentId for the pollable task id associated with the job * @param message set on the pollable task * @param expectedSubTaskNumber set on the pollable task * @param triggerStartDate date at which the job should be started * @param uniqueId optional id used to generate the job keyname. If not provided the pollable task id is used. * Pollable id keeps changing, unique id can be used for recuring jobs (eg. update stats of repositry xyz) * @param inlineInput to inline the input in quartz data or save it in the blobstorage * @param <I> * @param <O> * @return */ public <I, O> PollableFuture<O> scheduleJob(QuartzJobInfo<I, O> quartzJobInfo) { String pollableTaskName = getPollableTaskName(quartzJobInfo.getClazz()); logger.debug("Create currentPollableTask with name: {}", pollableTaskName); PollableTask pollableTask = pollableTaskService.createPollableTask( quartzJobInfo.getParentId(), pollableTaskName, quartzJobInfo.getMessage(), quartzJobInfo.getExpectedSubTaskNumber(), quartzJobInfo.getTimeout()); String uniqueId = quartzJobInfo.getUniqueId() != null ? quartzJobInfo.getUniqueId() : pollableTask.getId().toString(); String keyName = getKeyName(quartzJobInfo.getClazz(), uniqueId); try { TriggerKey triggerKey = new TriggerKey(keyName, DYNAMIC_GROUP_NAME); JobKey jobKey = new JobKey(keyName, DYNAMIC_GROUP_NAME); JobDetail jobDetail = scheduler.getJobDetail(jobKey); if (jobDetail == null) { logger.debug("Job doesn't exist, create for key: {}", keyName); jobDetail = JobBuilder.newJob().ofType(quartzJobInfo.getClazz()) .withIdentity(jobKey) .build(); } logger.debug("Schedule a job for key: {}", keyName); TriggerBuilder<Trigger> triggerTriggerBuilder = TriggerBuilder.newTrigger() .startAt(quartzJobInfo.getTriggerStartDate()) .forJob(jobDetail) .usingJobData(QuartzPollableJob.POLLABLE_TASK_ID, pollableTask.getId().toString()) .withIdentity(triggerKey); if (quartzJobInfo.isInlineInput()) { logger.debug("This job input is inlined into the quartz job"); triggerTriggerBuilder.usingJobData(QuartzPollableJob.INPUT, objectMapper.writeValueAsStringUnchecked(quartzJobInfo.getInput())); } else { logger.debug("The input data is saved into the blob storage"); pollableTaskBlobStorage.saveInput(pollableTask.getId(), quartzJobInfo.getInput()); } Trigger trigger = triggerTriggerBuilder.build(); if (!scheduler.checkExists(triggerKey)) { logger.debug("Schedule QuartzPollableJob with key: {}", keyName); scheduler.scheduleJob(jobDetail, trigger); } else { logger.debug("Job already scheduled for key: {}, reschedule", keyName); scheduler.rescheduleJob(triggerKey, trigger); } } catch (SchedulerException se) { String msg = MessageFormat.format("Couldn't schedule QuartzPollableJob with key: {0}", keyName); logger.error(msg, se); throw new RuntimeException(msg, se); } Class<O> jobOutputType = getJobOutputType(quartzJobInfo); return new QuartzPollableFutureTask<O>(pollableTask, jobOutputType); } <I, O> Class<O> getJobOutputType(QuartzJobInfo<I, O> quartzJobInfo) { QuartzPollableJob<I, O> quartzPollableJob = null; try { quartzPollableJob = quartzJobInfo.getClazz().newInstance(); } catch (Exception e) { throw new RuntimeException("Can't get the output type of the job", e); } Class<? super O> outputType = quartzPollableJob.getOutputType(); return (Class<O>) outputType; } String getKeyName(Class clazz, String id) { return getPollableTaskName(clazz) + "_" + id; } private String getPollableTaskName(Class clazz) { return clazz.getCanonicalName(); } }
[ "aurambaj@users.noreply.github.com" ]
aurambaj@users.noreply.github.com
4841c5be4c993fb9853031d47e7c4b3e97b435e5
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
/sources/p116io/jsonwebtoken/impl/JwtMap.java
3a4dbb1000f51823a0788a3245ab3f864ae9ba9d
[]
no_license
v1ckxy/radar-covid
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
refs/heads/master
2022-12-06T11:29:19.567919
2020-08-29T08:00:19
2020-08-29T08:00:19
294,198,796
1
0
null
2020-09-09T18:39:43
2020-09-09T18:39:43
null
UTF-8
Java
false
false
4,573
java
package p116io.jsonwebtoken.impl; import java.text.ParseException; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import p116io.jsonwebtoken.lang.Assert; import p116io.jsonwebtoken.lang.DateFormats; /* renamed from: io.jsonwebtoken.impl.JwtMap */ public class JwtMap implements Map<String, Object> { public final Map<String, Object> map; public JwtMap() { this.map = new LinkedHashMap(); } public JwtMap(Map<String, ?> map2) { this(); Assert.notNull(map2, "Map argument cannot be null."); putAll(map2); } public static Date parseIso8601Date(String str, String str2) { try { return DateFormats.parseIso8601Date(str); } catch (ParseException e) { StringBuilder sb = new StringBuilder(); sb.append("'"); sb.append(str2); sb.append("' value does not appear to be ISO-8601-formatted: "); sb.append(str); throw new IllegalArgumentException(sb.toString(), e); } } public static Date toDate(Object obj, String str) { if (obj == null) { return null; } if (obj instanceof Date) { return (Date) obj; } if (obj instanceof Calendar) { return ((Calendar) obj).getTime(); } if (obj instanceof Number) { return new Date(((Number) obj).longValue()); } if (obj instanceof String) { return parseIso8601Date((String) obj, str); } StringBuilder sb = new StringBuilder(); sb.append("Cannot create Date from '"); sb.append(str); sb.append("' value '"); sb.append(obj); sb.append("'."); throw new IllegalStateException(sb.toString()); } public static Date toSpecDate(Object obj, String str) { if (obj == null) { return null; } if (obj instanceof Number) { obj = Long.valueOf(((Number) obj).longValue() * 1000); } else if (obj instanceof String) { try { obj = Long.valueOf(Long.parseLong((String) obj) * 1000); } catch (NumberFormatException unused) { } } return toDate(obj, str); } public void clear() { this.map.clear(); } public boolean containsKey(Object obj) { return this.map.containsKey(obj); } public boolean containsValue(Object obj) { return this.map.containsValue(obj); } public Set<Entry<String, Object>> entrySet() { return this.map.entrySet(); } public boolean equals(Object obj) { return this.map.equals(obj); } public Object get(Object obj) { return this.map.get(obj); } public String getString(String str) { Object obj = get(str); if (obj != null) { return String.valueOf(obj); } return null; } public int hashCode() { return this.map.hashCode(); } public boolean isEmpty() { return this.map.isEmpty(); } public Set<String> keySet() { return this.map.keySet(); } public Object put(String str, Object obj) { return obj == null ? this.map.remove(str) : this.map.put(str, obj); } public void putAll(Map<? extends String, ?> map2) { if (map2 != null) { for (String str : map2.keySet()) { put(str, map2.get(str)); } } } public Object remove(Object obj) { return this.map.remove(obj); } @Deprecated public void setDate(String str, Date date) { if (date == null) { this.map.remove(str); return; } this.map.put(str, Long.valueOf(date.getTime() / 1000)); } public Object setDateAsSeconds(String str, Date date) { if (date == null) { return this.map.remove(str); } return this.map.put(str, Long.valueOf(date.getTime() / 1000)); } public void setValue(String str, Object obj) { if (obj == null) { this.map.remove(str); } else { this.map.put(str, obj); } } public int size() { return this.map.size(); } public String toString() { return this.map.toString(); } public Collection<Object> values() { return this.map.values(); } }
[ "josemmoya@outlook.com" ]
josemmoya@outlook.com
32bc704dcbc28e9b713b7f2669cc55c934f8dada
b2d4f5b9ed1ad6e079c5422767fce584bd906367
/src/main/java/com/pepper/project/sm/point/mapper/PointMapper.java
c8873a0f9f8250cf11b839dbd5c450cf281b7eb1
[ "MIT" ]
permissive
hanjietao/ops-pro
6683494ab56c5c0c3432dbd1df09c223a552f28e
a31f37e322da2e5fe3dc0977f2b70332a90c8706
refs/heads/master
2022-09-26T06:48:33.506079
2020-04-09T03:42:34
2020-04-09T03:42:34
237,716,491
0
0
MIT
2022-09-01T23:21:26
2020-02-02T04:09:49
TSQL
UTF-8
Java
false
false
411
java
package com.pepper.project.sm.point.mapper; import com.pepper.project.sm.point.domain.Point; import java.util.List; public interface PointMapper { Point selectPointById(Integer id); List<Point> selectPointList(Point point); public int insertPoint(Point point); int deletePointByIds(String[] ids); int updatePoint(Point point); List<Point> selectPointListByUserId(Long userId); }
[ "hjtxyr@163.com" ]
hjtxyr@163.com
0686343e73186bae8683dc39233e8f9f020d835f
5ab95c433ef08a4ac93bd95f6e1011ba9b79cc0e
/src/main/java/org/kuali/rice/kew/v2_0/DetermineValidActions.java
3e61729bd22b93a0ad364d79a62ad9654408b2d1
[]
no_license
CU-CommunityApps/ksb-client
f98b5505937c95a32db86d7f3baa0f34b7427f68
2792c064bc90f50710e05ee5ba3d4c304d3a2999
refs/heads/master
2021-01-16T21:34:16.647538
2019-01-18T19:36:13
2019-01-18T19:36:13
17,973,861
0
0
null
2019-03-13T20:16:52
2014-03-21T09:00:48
Java
UTF-8
Java
false
false
2,048
java
package org.kuali.rice.kew.v2_0; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for determineValidActions complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="determineValidActions"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="documentId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="principalId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "determineValidActions", propOrder = { "documentId", "principalId" }) public class DetermineValidActions { protected String documentId; protected String principalId; /** * Gets the value of the documentId property. * * @return * possible object is * {@link String } * */ public String getDocumentId() { return documentId; } /** * Sets the value of the documentId property. * * @param value * allowed object is * {@link String } * */ public void setDocumentId(String value) { this.documentId = value; } /** * Gets the value of the principalId property. * * @return * possible object is * {@link String } * */ public String getPrincipalId() { return principalId; } /** * Sets the value of the principalId property. * * @param value * allowed object is * {@link String } * */ public void setPrincipalId(String value) { this.principalId = value; } }
[ "shawn.bower@gmail.com" ]
shawn.bower@gmail.com
59776b4044607dd569cbb3faeb7e65383eff3a71
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
/net.sf.smbt.comm.xbee.edit/src/net/sf/smbt/xbee/provider/XbeeItemProviderAdapterFactory.java
15c6f1d6a9d09a44a768a0ebb75a9dc20a269878
[]
no_license
lucascraft/ubq_wip
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
eff577040f21be71ea2c76c187d574f1617703ce
refs/heads/master
2021-01-22T02:28:20.687330
2015-06-10T12:38:47
2015-06-10T12:38:47
37,206,324
0
0
null
null
null
null
UTF-8
Java
false
false
5,754
java
/** * <copyright> * </copyright> * * $Id$ */ package net.sf.smbt.xbee.provider; import java.util.ArrayList; import java.util.Collection; import net.sf.smbt.xbee.util.XbeeAdapterFactory; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.edit.provider.ChangeNotifier; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.provider.IChangeNotifier; import org.eclipse.emf.edit.provider.IDisposable; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.INotifyChangedListener; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; /** * This is the factory that is used to provide the interfaces needed to support Viewers. * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. * The adapters also support Eclipse property sheets. * Note that most of the adapters are shared among multiple instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class XbeeItemProviderAdapterFactory extends XbeeAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { /** * This keeps track of the root adapter factory that delegates to this adapter factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ComposedAdapterFactory parentAdapterFactory; /** * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<Object> supportedTypes = new ArrayList<Object>(); /** * This constructs an instance. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public XbeeItemProviderAdapterFactory() { supportedTypes.add(IEditingDomainItemProvider.class); supportedTypes.add(IStructuredItemContentProvider.class); supportedTypes.add(ITreeItemContentProvider.class); supportedTypes.add(IItemLabelProvider.class); supportedTypes.add(IItemPropertySource.class); } /** * This keeps track of the one adapter used for all {@link net.sf.smbt.xbee.Xbee} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected XbeeItemProvider xbeeItemProvider; /** * This creates an adapter for a {@link net.sf.smbt.xbee.Xbee}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter createXbeeAdapter() { if (xbeeItemProvider == null) { xbeeItemProvider = new XbeeItemProvider(this); } return xbeeItemProvider; } /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComposeableAdapterFactory getRootAdapterFactory() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } /** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean isFactoryForType(Object type) { return supportedTypes.contains(type) || super.isFactoryForType(type); } /** * This implementation substitutes the factory itself as the key for the adapter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object adapt(Object object, Object type) { if (isFactoryForType(type)) { Object adapter = super.adapt(object, type); if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) { return adapter; } } return null; } /** * This adds a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void addListener(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); } /** * This removes a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void removeListener(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } /** * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void fireNotifyChanged(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } } /** * This disposes all of the item providers created by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void dispose() { if (xbeeItemProvider != null) xbeeItemProvider.dispose(); } }
[ "lucas.bigeardel@gmail.com" ]
lucas.bigeardel@gmail.com
a0291f2f2aa7ba3845cfe3948b2f5c7dbec9e3d1
e89e05ab422f137fd823a35f829ebd5959750a2d
/app/src/main/java/qtc/project/pos/ui/views/activity/login/ActivityLoginViewInterface.java
fd4cacac812a6495129a30b8ec2396672e9fe2d0
[]
no_license
dinhdeveloper/Admin_POS
34d0409a8555fd8c0d7d3792d5b7361e1890ca13
346dd41df428d172f95d59663c7b4ef9144f162f
refs/heads/master
2023-03-29T09:32:36.961033
2021-03-31T04:27:42
2021-03-31T04:27:42
279,499,743
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package qtc.project.pos.ui.views.activity.login; import b.laixuantam.myaarlibrary.base.BaseViewInterface; import qtc.project.pos.activity.LoginActivity; public interface ActivityLoginViewInterface extends BaseViewInterface { void initialize(LoginActivity activity, ActivityLoginViewCallback callback); }
[ "dinhtrancntt@gmail.com" ]
dinhtrancntt@gmail.com
c0632a1877891c2b49f6f712c2dfabaa7b9fa296
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/AlipayCommerceIotAccountbindingDeleteModel.java
6f56d3c928c256aa6a849586d7241e7d4cb609bb
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,021
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 用户账号绑定关系删除 * * @author auto create * @since 1.0, 2017-09-14 22:22:19 */ public class AlipayCommerceIotAccountbindingDeleteModel extends AlipayObject { private static final long serialVersionUID = 6549855258921215578L; /** * 协议服务商id+唯一+指定操作数据归属于哪个协议服务商+协议服务商接入时由支付宝统一分配 */ @ApiField("protocol_supplier_id") private String protocolSupplierId; /** * 蚂蚁统一会员ID */ @ApiField("user_id") private String userId; public String getProtocolSupplierId() { return this.protocolSupplierId; } public void setProtocolSupplierId(String protocolSupplierId) { this.protocolSupplierId = protocolSupplierId; } public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
e72c857a0b12d7ac0ef73c52c18ddc9d35e2d4e0
7d5938f1cdb1ec969f53c924b8012c01bda02020
/src/main/java/io/shm/tsubasa/domain/MCheatCaution.java
081cde661e8b6c79595489e338571b18244153f1
[]
no_license
warleyc/tsubasa
dc1b39566432acd7675873d88078d39efbb9d1e0
3f359290725cd1457691430ae7e36c10044f23ed
refs/heads/master
2022-12-24T23:04:27.146997
2019-06-14T23:47:56
2019-06-14T23:47:56
191,244,465
0
1
null
2022-12-16T04:52:45
2019-06-10T20:56:19
Java
UTF-8
Java
false
false
2,708
java
package io.shm.tsubasa.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import javax.validation.constraints.*; import java.io.Serializable; import java.util.Objects; /** * A MCheatCaution. */ @Entity @Table(name = "m_cheat_caution") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class MCheatCaution implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotNull @Column(name = "caution", nullable = false) private Integer caution; @Lob @Column(name = "description", nullable = false) private String description; @Lob @Column(name = "image_asset_name", nullable = false) private String imageAssetName; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getCaution() { return caution; } public MCheatCaution caution(Integer caution) { this.caution = caution; return this; } public void setCaution(Integer caution) { this.caution = caution; } public String getDescription() { return description; } public MCheatCaution description(String description) { this.description = description; return this; } public void setDescription(String description) { this.description = description; } public String getImageAssetName() { return imageAssetName; } public MCheatCaution imageAssetName(String imageAssetName) { this.imageAssetName = imageAssetName; return this; } public void setImageAssetName(String imageAssetName) { this.imageAssetName = imageAssetName; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof MCheatCaution)) { return false; } return id != null && id.equals(((MCheatCaution) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "MCheatCaution{" + "id=" + getId() + ", caution=" + getCaution() + ", description='" + getDescription() + "'" + ", imageAssetName='" + getImageAssetName() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
579c8d810ad6fdbef31eb4f382ef020db0f71b0b
43e553b1bd618ba199d5f1d1981705bcef7c015c
/app/src/main/java/com/example/lanjianhua131/coolweather/gson/Forecast.java
bf8ab0d087a5d7028704c19a7725333851d04c1a
[ "Apache-2.0" ]
permissive
lanjianhua2016/coolweather
f7e7713c618fbb051b7eed5631483d09d60e7efc
2d83cd1bc030ac417b3a4ee2528539aa0c01d601
refs/heads/master
2020-07-09T11:36:59.258781
2019-08-24T08:16:57
2019-08-24T08:16:57
203,959,182
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package com.example.lanjianhua131.coolweather.gson; import com.google.gson.annotations.SerializedName; public class Forecast { public String date; @SerializedName("tmp") public Temperature temperature; @SerializedName("cond") public More more; public class Temperature{ public String max; public String min; } public class More{ @SerializedName("txt_d") public String info; } }
[ "tony@gmail.com" ]
tony@gmail.com
d2f38baf230dacc8c5fd70d6cd804a4ed7c9c0bf
351ede50510f06a75b9d3a376f124ec99077a3c4
/mallplus-portal/src/main/java/com/zrp/mallplus/ums/service/impl/UmsMemberProductCategoryRelationServiceImpl.java
a173ea400f8a25682041b6697c03de277f8eca55
[]
no_license
zhangRuiPei/mallPlus
5ada557425d27490d49a3cebd17a4ddc5993940d
e23741c50b0f4f1d65de438f0caaddd0c7794285
refs/heads/master
2022-12-17T22:42:29.697965
2020-09-14T09:36:44
2020-09-14T09:36:44
293,774,917
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package com.zrp.mallplus.ums.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zrp.mallplus.ums.entity.UmsMemberProductCategoryRelation; import com.zrp.mallplus.ums.mapper.UmsMemberProductCategoryRelationMapper; import com.zrp.mallplus.ums.service.IUmsMemberProductCategoryRelationService; import org.springframework.stereotype.Service; /** * <p> * 会员与产品分类关系表(用户喜欢的分类) 服务实现类 * </p> * * @author zscat * @since 2019-04-19 */ @Service public class UmsMemberProductCategoryRelationServiceImpl extends ServiceImpl<UmsMemberProductCategoryRelationMapper, UmsMemberProductCategoryRelation> implements IUmsMemberProductCategoryRelationService { }
[ "695239914@qq.com" ]
695239914@qq.com
40272a741c6e0d3fbc470214aada9aebd40dd7aa
b24b3a57e14b5136616b9703935015a90de193e8
/app/api/src/main/java/com/mengyunzhi/tutelab/service/HotQuestionServiceImpl.java
93c37698472847758be3b7ba2ed5808a97d87e63
[ "MIT" ]
permissive
yunzhiclub/tuteLaboratory
f5c76d4ef56ea9a0b6e9685b33d4d792064cab22
ff415d3774200c5a2d896258491a0896307040f6
refs/heads/master
2018-07-10T02:36:42.168519
2018-06-28T02:00:48
2018-06-28T02:00:48
110,914,892
0
1
null
null
null
null
UTF-8
Java
false
false
596
java
package com.mengyunzhi.tutelab.service; import com.mengyunzhi.tutelab.entity.HotQuestion; import com.mengyunzhi.tutelab.repository.HotQuestionRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class HotQuestionServiceImpl implements HotQuestionService { @Autowired HotQuestionRepository hotQuestionRepository; @Override public List<HotQuestion> findAll() { return (List<HotQuestion>) hotQuestionRepository.findAllByOrderByWeightDescCreateTimeDesc(); } }
[ "3792535@qq.com" ]
3792535@qq.com
753dd5621078e139f1ad50f0199631f850fb0399
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/com/dji/analytics/a/a.java
e9191dd1d3bae4059fbf2fb289c1a332f6eb1057
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
2,606
java
package com.dji.analytics.a; import com.dji.analytics.DJIA; import com.dji.analytics.d.d; import com.dji.analytics.f.c; import com.dji.analytics.f.f; import java.util.HashMap; import java.util.Set; /* compiled from: DJIReport */ public class a { private HashMap<String, Object> a = new HashMap<>(); private String b = ""; public HashMap<String, Object> a() { return this.a; } public String b() { return this.b; } public a(String str, HashMap<String, String> hashMap, boolean z) { String a2 = a(str); this.a.put("uuid", com.dji.analytics.d.a.a().e()); this.a.put("type", a2); this.b = c.a(); this.a.put("reportid", this.b); this.a.put("time", Long.valueOf(System.currentTimeMillis())); this.a.put("sessionid", d.a()); HashMap<String, String> extraData = DJIA.getConfig().getExtraData(); if (extraData != null) { for (String str2 : extraData.keySet()) { this.a.put(str2, extraData.get(str2)); } } if (hashMap != null) { HashMap hashMap2 = new HashMap(); for (String str3 : hashMap.keySet()) { hashMap2.put(str3, a(hashMap.get(str3))); } this.a.put("eventvalue", hashMap2); } this.a.put("appver", com.dji.analytics.d.a.a().d()); } public a(byte[] bArr) { this.a = a(bArr); } private HashMap<String, Object> a(byte[] bArr) { HashMap<String, Object> a2; return (bArr == null || bArr.length <= 0 || (a2 = f.a(bArr)) == null) ? new HashMap<>() : a2; } public byte[] c() { return f.a(this.a); } public String toString() { StringBuilder sb = new StringBuilder(); Set<String> keySet = this.a.keySet(); sb.append("{"); for (String str : keySet) { sb.append("{"); sb.append(str); sb.append(":"); sb.append(this.a.get(str)); sb.append("},"); } sb.append("}"); return sb.toString(); } private String a(String str) { if (str == null) { return "null_value_add_by_djia"; } return str; } public void d() { if (this.a.containsKey("dji_id")) { this.a.put("uuid", this.a.get("dji_id")); this.a.remove("dji_id"); } } public void e() { if (this.a.containsKey("uuid")) { this.a.put("dji_id", this.a.get("uuid")); this.a.remove("uuid"); } } }
[ "michael@districtrace.com" ]
michael@districtrace.com
80cfb1fc0345365e10a5fd4f187a5ac3795f1539
e4c81bdbae663e1d168392768f299c9a550341ba
/eoms-web/src/main/java/com/lj/eoms/finance/WithdrawController.java
0eae4d6740c563027f792ac486cbb730d7386471
[]
no_license
wo510751575/kun
995e75f03424d98d11c33fd2fe6681666108ec54
4907f79d1232ecea8ae5fe138809066a0fbc1212
refs/heads/master
2022-12-21T08:20:44.972860
2019-11-15T11:03:14
2019-11-15T11:03:14
219,097,605
0
1
null
2022-12-16T11:35:53
2019-11-02T03:22:39
Java
UTF-8
Java
false
false
5,620
java
/** * Copyright &copy; 2017-2020 All rights reserved. * * Licensed under the 深圳市小坤 License, Version 1.0 (the "License"); * */ package com.lj.eoms.finance; import java.util.Date; import java.util.List; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.ape.common.web.BaseController; import com.google.common.collect.Lists; import com.lj.base.core.pagination.Page; import com.lj.base.core.pagination.PageSortType; import com.lj.base.core.util.StringUtils; import com.lj.eshop.dto.AccountDto; import com.lj.eshop.dto.FindWithdrawPage; import com.lj.eshop.dto.MessageDto; import com.lj.eshop.dto.WithdrawDto; import com.lj.eshop.emus.MemberRankApplyStatus; import com.lj.eshop.emus.MessageTemplate; import com.lj.eshop.emus.Status; import com.lj.eshop.service.IAccountService; import com.lj.eshop.service.IMessageService; import com.lj.eshop.service.IWithdrawService; /** * * * 类说明:提现申请@Controller * * * <p> * 详细描述: * * @Company: * @author * * CreateDate: 2017年8月30日 */ @Controller @RequestMapping("${adminPath}/finance/withdraw/") public class WithdrawController extends BaseController { public static final String LIST = "modules/finance/withdraw/list"; public static final String FORM = "modules/finance/withdraw/form"; public static final String EDIT = "modules/finance/withdraw/edit"; public static final String VIEW = "modules/finance/withdraw/view"; @Autowired private IWithdrawService withdrawService; @Autowired private IAccountService iAccountService; @Autowired private IMessageService messageService; /** 列表 */ @RequiresPermissions("finance:withdraw:view") @RequestMapping(value = { "list", "" }) public String list(FindWithdrawPage findWithdrawPage, Integer pageNo, Integer pageSize, Model model) { WithdrawDto reqDto = findWithdrawPage.getParam(); if (reqDto == null) { reqDto = new WithdrawDto(); findWithdrawPage.setParam(reqDto); } if (pageNo != null) { findWithdrawPage.setStart((pageNo - 1) * pageSize); } if (pageSize != null) { findWithdrawPage.setLimit(pageSize); } findWithdrawPage.setSortDir(PageSortType.desc); findWithdrawPage.setSortBy("create_time"); Page<WithdrawDto> pageDto = withdrawService.findWithdrawPage(findWithdrawPage); List<WithdrawDto> list = Lists.newArrayList(); list.addAll(pageDto.getRows()); com.ape.common.persistence.Page<WithdrawDto> page = new com.ape.common.persistence.Page<WithdrawDto>( pageNo == null ? 1 : pageNo, pageDto.getLimit(), pageDto.getTotal(), list); page.initialize(); model.addAttribute("findWithdrawPage", findWithdrawPage); model.addAttribute("page", page); return LIST; } /** 新增/修改/查看表单 */ @RequiresPermissions("finance:withdraw:view") @RequestMapping(value = "/form") public String form(String code, Boolean isView, Model model) { model.addAttribute("statuss", Status.values()); try { WithdrawDto param = new WithdrawDto(); param.setCode(code); WithdrawDto rtDto = withdrawService.findWithdraw(param); model.addAttribute("data", rtDto); if (isView != null && isView) { return VIEW; } } catch (Exception e) { e.printStackTrace(); } return FORM; } /** 审核 */ @RequiresPermissions("finance:withdraw:edit") @RequestMapping(value = "/status") public String status(WithdrawDto withdrawDto, RedirectAttributes redirectAttributes) { // 如果审核状态为空,就不做处理 if (StringUtils.isNotEmpty(withdrawDto.getStatus())) { WithdrawDto rtDto = new WithdrawDto(); rtDto.setCode(withdrawDto.getCode()); rtDto = withdrawService.findWithdraw(rtDto); // 状态为空或者待审核的才可以修改状态 if (StringUtils.isEmpty(rtDto.getStatus()) || StringUtils.equal(rtDto.getStatus(), MemberRankApplyStatus.WAIT.getValue())) { rtDto.setUpdateTime(new Date()); rtDto.setStatus(withdrawDto.getStatus()); // 金额恢复, AccountDto rAccountDto = iAccountService.findAccountByMbrCode(rtDto.getMbrCode()); // 审核失败 if (StringUtils.equal(withdrawDto.getStatus(), MemberRankApplyStatus.FAIL.getValue())) { if (null != rtDto.getAmt()) { // 可用增加, rAccountDto.setCashAmt(rAccountDto.getCashAmt().add(rtDto.getAmt())); // 提现总额减少 rAccountDto.setTotalWithdrawAmt(rAccountDto.getTotalWithdrawAmt().subtract(rtDto.getAmt())); iAccountService.updateAccount(rAccountDto); // 通知申请失败 MessageDto messageDto = new MessageDto(); messageDto.setRecevier(rAccountDto.getMbrCode()); messageService.addMessageByTemplate(messageDto, MessageTemplate.B_SERVICE_NOT_PARAM_WITHDRAW_FAIL); } } else if (StringUtils.equal(withdrawDto.getStatus(), MemberRankApplyStatus.SUCCESS.getValue())) { // 通知申请成功 MessageDto messageDto = new MessageDto(); messageDto.setRecevier(rAccountDto.getMbrCode()); messageService.addMessageByTemplate(messageDto, MessageTemplate.B_SERVICE_NOT_PARAM_WITHDRAW_SUCCESS); } withdrawService.updateWithdraw(rtDto); addMessage(redirectAttributes, "审核操作成功"); } else { addMessage(redirectAttributes, "审核操作失败"); } } return "redirect:" + adminPath + "/finance/withdraw/"; } }
[ "37724558+wo510751575@users.noreply.github.com" ]
37724558+wo510751575@users.noreply.github.com
bbdc6e5ae50c2fae3f1cd5be86bafd136af0fc64
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-12798-40-17-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/doc/XWikiDocument_ESTest_scaffolding.java
f2d1499c553d3f69abde255e1b87d148fdbc1d17
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 01 00:25:53 UTC 2020 */ package com.xpn.xwiki.doc; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiDocument_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
41c927647467829b98ed7104aa344a353a778d3a
eb9bfc910667d3ce3e9a93d7f928619d224d4f86
/plc4j/drivers/c-bus/src/main/generated/org/apache/plc4x/java/cbus/readwrite/SALDataReserved.java
ec564726f307a87d944f02cda9fb14b137392377
[ "Unlicense", "Apache-2.0" ]
permissive
apache/plc4x
ae2e60cf98e742c410f9ee691b1e2eaecd405f96
a05857e0dd18951223293e73beaaa1c46f6c78ab
refs/heads/develop
2023-09-04T13:54:26.459699
2023-09-04T12:24:37
2023-09-04T12:24:37
114,859,883
842
362
Apache-2.0
2023-09-08T06:46:49
2017-12-20T08:00:09
Java
UTF-8
Java
false
false
4,045
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 * * https://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.plc4x.java.cbus.readwrite; import static org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.*; import static org.apache.plc4x.java.spi.codegen.fields.FieldWriterFactory.*; import static org.apache.plc4x.java.spi.codegen.io.DataReaderFactory.*; import static org.apache.plc4x.java.spi.codegen.io.DataWriterFactory.*; import static org.apache.plc4x.java.spi.generation.StaticHelper.*; import java.time.*; import java.util.*; import org.apache.plc4x.java.api.exceptions.*; import org.apache.plc4x.java.api.value.*; import org.apache.plc4x.java.spi.codegen.*; import org.apache.plc4x.java.spi.codegen.fields.*; import org.apache.plc4x.java.spi.codegen.io.*; import org.apache.plc4x.java.spi.generation.*; // Code generated by code-generation. DO NOT EDIT. public class SALDataReserved extends SALData implements Message { // Accessors for discriminator values. public ApplicationId getApplicationId() { return ApplicationId.RESERVED; } public SALDataReserved(SALData salData) { super(salData); } @Override protected void serializeSALDataChild(WriteBuffer writeBuffer) throws SerializationException { PositionAware positionAware = writeBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("SALDataReserved"); writeBuffer.popContext("SALDataReserved"); } @Override public int getLengthInBytes() { return (int) Math.ceil((float) getLengthInBits() / 8.0); } @Override public int getLengthInBits() { int lengthInBits = super.getLengthInBits(); SALDataReserved _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); return lengthInBits; } public static SALDataBuilder staticParseSALDataBuilder( ReadBuffer readBuffer, ApplicationId applicationId) throws ParseException { readBuffer.pullContext("SALDataReserved"); PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); // Validation if (!((1) == (2))) { throw new ParseValidationException("RESERVED Not yet implemented"); } readBuffer.closeContext("SALDataReserved"); // Create the instance return new SALDataReservedBuilderImpl(); } public static class SALDataReservedBuilderImpl implements SALData.SALDataBuilder { public SALDataReservedBuilderImpl() {} public SALDataReserved build(SALData salData) { SALDataReserved sALDataReserved = new SALDataReserved(salData); return sALDataReserved; } } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SALDataReserved)) { return false; } SALDataReserved that = (SALDataReserved) o; return super.equals(that) && true; } @Override public int hashCode() { return Objects.hash(super.hashCode()); } @Override public String toString() { WriteBufferBoxBased writeBufferBoxBased = new WriteBufferBoxBased(true, true); try { writeBufferBoxBased.writeSerializable(this); } catch (SerializationException e) { throw new RuntimeException(e); } return "\n" + writeBufferBoxBased.getBox().toString() + "\n"; } }
[ "christofer.dutz@c-ware.de" ]
christofer.dutz@c-ware.de
de7e5de02817ccd724eb9a231f38c7ee489230ba
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/delight.java
d43f3dc3aeab730628404720e08dc5e4dfe23056
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
229
java
// This file is automatically generated. package adila.db; /* * TUNTUN English DREAM PAD * * DEVICE: delight * MODEL: ITP-R408W */ final class delight { public static final String DATA = "TUNTUN English|DREAM PAD|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
5bd5e92f9a077ae9948992a10786d5dc20b2e76a
6f73a0d38addee468dd21aba1d5d53963be84825
/application/src/test/java/org/mifos/framework/components/batchjobs/helpers/ApplyHolidayChangesHelperIntegrationTest.java
b9a87eef90a87a2bef470dc8de1e0e9600c50a8b
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.4.x
0f157f74220e8e65cc13c4252bf597c80aade1fb
0540a4b398407b9415feca1f84b6533126d96511
refs/heads/master
2020-12-25T19:26:15.934566
2010-05-11T23:34:08
2010-05-11T23:34:08
2,946,607
0
0
null
null
null
null
UTF-8
Java
false
false
4,476
java
/* * Copyright (c) 2005-2009 Grameen Foundation USA * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.framework.components.batchjobs.helpers; import java.util.Date; import java.util.List; import junit.framework.Assert; import org.mifos.application.holiday.business.HolidayBO; import org.mifos.application.holiday.business.HolidayPK; import org.mifos.application.holiday.business.RepaymentRuleEntity; import org.mifos.application.holiday.persistence.HolidayPersistence; import org.mifos.application.util.helpers.YesNoFlag; import org.mifos.framework.MifosIntegrationTestCase; import org.mifos.framework.exceptions.ApplicationException; import org.mifos.framework.exceptions.SystemException; import org.mifos.framework.hibernate.helper.StaticHibernateUtil; import org.mifos.framework.util.helpers.TestObjectFactory; public class ApplyHolidayChangesHelperIntegrationTest extends MifosIntegrationTestCase { public ApplyHolidayChangesHelperIntegrationTest() throws SystemException, ApplicationException { super(); } private HolidayBO holidayEntity; private ApplyHolidayChangesHelper applyHolidayChangesHelper; @Override protected void setUp() throws Exception { super.setUp(); ApplyHolidayChangesTask applyHolidayChangesTask = new ApplyHolidayChangesTask(); applyHolidayChangesHelper = (ApplyHolidayChangesHelper) applyHolidayChangesTask.getTaskHelper(); } @Override public void tearDown() throws Exception { applyHolidayChangesHelper = null; StaticHibernateUtil.closeSession(); super.tearDown(); } public void testExecuteAgainstAppliedHolidays() throws Exception { HolidayPK holidayPK = new HolidayPK((short) 1, new Date()); RepaymentRuleEntity entity = new HolidayPersistence().getRepaymentRule((short) 1); holidayEntity = new HolidayBO(holidayPK, null, "Test Holiday", entity); holidayEntity.setHolidayChangesAppliedFlag(YesNoFlag.YES.getValue()); // Disable date Validation because startDate is less than today holidayEntity.setValidationEnabled(false); holidayEntity.save(); StaticHibernateUtil.commitTransaction(); StaticHibernateUtil.closeSession(); // //////Meat&Potato////////// applyHolidayChangesHelper.execute(System.currentTimeMillis()); StaticHibernateUtil.closeSession(); // //////////////// List<HolidayBO> holidays = new HolidayPersistence().getUnAppliedHolidays(); // There should not be any UnappliedHolidays Assert.assertNotNull(holidays); Assert.assertEquals(holidays.size(), 0); TestObjectFactory.cleanUpHolidays(holidays); holidayEntity = null; } public void testExecuteAgainst_Un_AppliedHolidays() throws Exception { HolidayPK holidayPK = new HolidayPK((short) 1, new Date()); RepaymentRuleEntity entity = new HolidayPersistence().getRepaymentRule((short) 1); holidayEntity = new HolidayBO(holidayPK, null, "Test Holiday", entity); // Disable date Validation because startDate is less than today holidayEntity.setValidationEnabled(false); holidayEntity.save(); StaticHibernateUtil.commitTransaction(); StaticHibernateUtil.closeSession(); // //////Meat&Potato////////// applyHolidayChangesHelper.execute(System.currentTimeMillis()); StaticHibernateUtil.closeSession(); // //////////////// List<HolidayBO> holidays = new HolidayPersistence().getUnAppliedHolidays(); // There should not be any UnappliedHolidays Assert.assertNotNull(holidays); Assert.assertEquals(holidays.size(), 0); TestObjectFactory.cleanUpHolidays(holidays); holidayEntity = null; } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
b8fbf2c0865439085e094f9c86e8d74dfa4a22e4
7ef841751c77207651aebf81273fcc972396c836
/astream/src/main/java/com/loki/astream/stubs/SampleClass196.java
fbdcf232e962278e8cf2edf3d0f752448f47aaa3
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package com.loki.astream.stubs;import com.jenzz.pojobuilder.api.Builder;import com.jenzz.pojobuilder.api.Ignore; @Builder public class SampleClass196 { @Ignore private SampleClass197 sampleClass; public SampleClass196(){ sampleClass = new SampleClass197(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
26f13ae177865e29bfda8c5c55251ea7912176c0
80403ec5838e300c53fcb96aeb84d409bdce1c0c
/server/modules/study/src/org/labkey/study/view/StudySummaryWebPartFactory.java
91a4d90956c4f47d4762d893925e87e24b6fb7cf
[]
no_license
scchess/LabKey
7e073656ea494026b0020ad7f9d9179f03d87b41
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
refs/heads/master
2021-09-17T10:49:48.147439
2018-03-22T13:01:41
2018-03-22T13:01:41
126,447,224
0
1
null
null
null
null
UTF-8
Java
false
false
5,134
java
/* * Copyright (c) 2006-2015 LabKey Corporation * * 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.labkey.study.view; import org.jetbrains.annotations.NotNull; import org.labkey.api.attachments.Attachment; import org.labkey.api.data.Container; import org.labkey.api.security.User; import org.labkey.api.security.permissions.AdminPermission; import org.labkey.api.security.permissions.ReadPermission; import org.labkey.api.study.Cohort; import org.labkey.api.study.Dataset; import org.labkey.api.study.Location; import org.labkey.api.study.Visit; import org.labkey.api.view.ActionURL; import org.labkey.api.view.BaseWebPartFactory; import org.labkey.api.view.HtmlView; import org.labkey.api.view.HttpView; import org.labkey.api.view.JspView; import org.labkey.api.view.NavTree; import org.labkey.api.view.Portal; import org.labkey.api.view.ViewContext; import org.labkey.api.view.WebPartView; import org.labkey.study.controllers.StudyController; import org.labkey.study.model.StudyImpl; import org.labkey.study.model.StudyManager; import org.springframework.validation.BindException; import java.util.List; /** * User: Mark Igra * Date: Aug 9, 2006 * Time: 4:38:42 PM */ public class StudySummaryWebPartFactory extends BaseWebPartFactory { public static String NAME = "Study Overview"; public StudySummaryWebPartFactory() { super(NAME); } public static class StudySummaryBean { private Container _container; private StudyImpl _study; private String _currentURL; public StudySummaryBean(ViewContext portalCtx) { _container = portalCtx.getContainer(); _currentURL = portalCtx.getActionURL().getLocalURIString(); } public StudyImpl getStudy() { if (_study == null) _study = StudyManager.getInstance().getStudy(_container); return _study; } public List<? extends Visit> getVisits(Visit.Order order) { return getStudy().getVisits(order); } public List<? extends Dataset> getDatasets() { return getStudy().getDatasets(); } public List<? extends Location> getSites() { return getStudy().getLocations(); } public List<? extends Cohort> getCohorts(User user) { return getStudy().getCohorts(user); } public long getSubjectCount() { return StudyManager.getInstance().getParticipantCount(getStudy()); } public List<Attachment> getProtocolDocuments() { return getStudy().getProtocolDocuments(); } public String getCurrentURL() { return _currentURL; } public String getDescriptionHtml() { String html = getStudy().getDescriptionHtml(); // Hack! Remove div so we can nestle the edit icon up to the text if (html.endsWith("</div>")) { html = html.replaceFirst("<div .*?>", ""); html = html.substring(0, html.length() - 6); } return html; } public String getInvestigator(){ return getStudy().getInvestigator(); } public String getGrant(){ return getStudy().getGrant(); } } public WebPartView getWebPartView(@NotNull ViewContext portalCtx, @NotNull Portal.WebPart webPart) { if (!portalCtx.hasPermission(ReadPermission.class)) return new HtmlView(NAME, portalCtx.getUser().isGuest() ? "Please log in to see this data" : "You do not have permission to see this data"); BindException errors = (BindException) HttpView.currentRequest().getAttribute("errors"); WebPartView v = new JspView<>("/org/labkey/study/view/studySummary.jsp", new StudySummaryBean(portalCtx), errors); v.setTitle(NAME); if(portalCtx.getContainer().hasPermission(portalCtx.getUser(), AdminPermission.class)) { ActionURL editMetaDataURL = new ActionURL(StudyController.ManageStudyPropertiesAction.class, portalCtx.getContainer()); editMetaDataURL.addParameter("returnURL",portalCtx.getActionURL().toString()); NavTree edit = new NavTree("Edit", editMetaDataURL.toString(), null, "fa fa-pencil"); v.addCustomMenu(edit); } return v; } }
[ "klum@labkey.com" ]
klum@labkey.com
3072739fca59172f11c5484e67d0c440309be41e
4dd4c24195d26552ddadc5733b54e8c715e9625a
/xprt-db/src/org/mfr/data/XLanguage.java
4f2c8b030b6a7ca916e0271378c2f7e18ac80a32
[]
no_license
attilahogyai/bbsitter-srv
c81abf6120821f4532ae1069753ada4a283efb03
a5e229a70fe71de33e5648075f2ac57f1e3ff14d
refs/heads/master
2021-01-12T13:00:39.687709
2016-09-27T21:47:41
2016-09-27T21:47:41
69,401,134
0
0
null
null
null
null
UTF-8
Java
false
false
852
java
package org.mfr.data; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "x_language") public class XLanguage { private Integer id; private String code; private String description; public XLanguage(){ super(); } public XLanguage(String id){ this.id=Integer.parseInt(id); } @Id @GeneratedValue @Column(name = "id", unique = true, nullable = false) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String descriptiuon) { this.description = descriptiuon; } }
[ "attila.hogyai@gmail.com" ]
attila.hogyai@gmail.com
176eeddae573758b550b9a6b3c1c4db6b56211fd
e62690334ea72c71aa5a302e0e97a5abd20e4b34
/src/main/java/edu/uw/zookeeper/clients/Version.java
7010a91713ceaeff3ae17bec598f1c4a3c5ac0ac
[ "Apache-2.0" ]
permissive
lisaglendenning/zookeeper-clients
832537ab29e2821357c8da316e2336fa82f29ace
ef77ab634595cef6a0deb9da51c30004e3d8f99e
refs/heads/master
2021-01-10T21:11:53.886715
2015-06-08T22:50:33
2015-06-08T22:50:33
12,425,803
1
0
null
null
null
null
UTF-8
Java
false
false
645
java
package edu.uw.zookeeper.clients; import java.util.Properties; public abstract class Version { public static edu.uw.zookeeper.Version getDefault() { return edu.uw.zookeeper.Version.fromPom(getPom()); } public static String getGroup() { return "edu.uw.zookeeper.lite"; } public static String getArtifact() { return "zklite-clients"; } public static String getProjectName() { return "ZooKeeper-Lite Clients"; } public static Properties getPom() { return edu.uw.zookeeper.Version.getPom(getGroup(), getArtifact()); } private Version() {} }
[ "lisa@glendenning.net" ]
lisa@glendenning.net
27f5dcfc5aa2a7f1f605ebfbf563cd0ea6e98e22
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/84_ifx-framework-org.sourceforge.ifx.framework.pain004.simpletype.AddressTypeCode-0.5-6/org/sourceforge/ifx/framework/pain004/simpletype/AddressTypeCode_ESTest_scaffolding.java
d3928e63cc6a83a26738071014fcbaeb52f30f7c
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 14:23:05 GMT 2019 */ package org.sourceforge.ifx.framework.pain004.simpletype; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class AddressTypeCode_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
576c2261692f984496a64cafd3903cf18329b689
3898d6d186a61e8be3709141d40f7b949ce09d48
/src/main/java/com/cisco/axl/api/_10/ListSoftKeyTemplateRes.java
54236539a5efd4b07fab563be93650408edeaba8
[]
no_license
dert261/cucmAxlImpl
a155bf1a8694a341fe932f8f601dafadd2a374a1
3000b6e614937d973cd4444a0dd7faf2513f569a
refs/heads/master
2021-01-21T04:19:13.714018
2016-06-29T08:07:29
2016-06-29T08:07:29
54,956,061
0
0
null
null
null
null
UTF-8
Java
false
false
3,936
java
package com.cisco.axl.api._10; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ListSoftKeyTemplateRes complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ListSoftKeyTemplateRes"> * &lt;complexContent> * &lt;extension base="{http://www.cisco.com/AXL/API/10.0}APIResponse"> * &lt;sequence> * &lt;element name="return"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="softKeyTemplate" type="{http://www.cisco.com/AXL/API/10.0}LSoftKeyTemplate" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ListSoftKeyTemplateRes", propOrder = { "_return" }) public class ListSoftKeyTemplateRes extends APIResponse { @XmlElement(name = "return", required = true) protected ListSoftKeyTemplateRes.Return _return; /** * Gets the value of the return property. * * @return * possible object is * {@link ListSoftKeyTemplateRes.Return } * */ public ListSoftKeyTemplateRes.Return getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link ListSoftKeyTemplateRes.Return } * */ public void setReturn(ListSoftKeyTemplateRes.Return value) { this._return = value; } /** * <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="softKeyTemplate" type="{http://www.cisco.com/AXL/API/10.0}LSoftKeyTemplate" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "softKeyTemplate" }) public static class Return { protected List<LSoftKeyTemplate> softKeyTemplate; /** * Gets the value of the softKeyTemplate 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 softKeyTemplate property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSoftKeyTemplate().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link LSoftKeyTemplate } * * */ public List<LSoftKeyTemplate> getSoftKeyTemplate() { if (softKeyTemplate == null) { softKeyTemplate = new ArrayList<LSoftKeyTemplate>(); } return this.softKeyTemplate; } } }
[ "v.bozhenkov@obelisk-voip.ru" ]
v.bozhenkov@obelisk-voip.ru
d94880f4fe86bc9d3936d1c09492dae557cd654d
5825fbb7a4bc465100955d64fe6c8cc52b7e3a67
/parent/core/src/main/java/net/sf/jguiraffe/transform/DateTimeTransformer.java
f253599fb03e76568fa1f87f167ae9c42f2088ea
[ "Apache-2.0" ]
permissive
oheger/jguiraffe
ee801097a1b35c65424693e56939136402578aae
546b1241bc672ed2eb7257f02b5b43e91b087d48
refs/heads/master
2022-11-10T21:16:37.300727
2022-11-05T16:23:27
2022-11-05T16:23:27
157,102,785
1
0
Apache-2.0
2022-09-30T20:06:42
2018-11-11T17:21:51
Java
UTF-8
Java
false
false
3,772
java
/* * Copyright 2006-2022 The JGUIraffe Team. * * 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.sf.jguiraffe.transform; import java.text.DateFormat; import java.util.Locale; import org.apache.commons.configuration.Configuration; /** * <p> * A specialized transformer that transforms strings into date objects with both * a date and time component. * </p> * <p> * This transformer class allows user to enter a date and a time in a single * input field, such as <code>1/31/2008 10:19</code>. Most of the required * functionality is already implemented by the base class. This class creates an * appropriate <code>DateFormat</code> object that supports parsing time * stamps. * </p> * <p> * For the documentation of the supported error messages refer to the super * class. In addition to the properties defined by * <code>DateTransformerBase</code>, the following properties can be set: * <table border="1"> * <tr> * <th>Property</th> * <th>Description</th> * <th>Default</th> * </tr> * <tr> * <td valign="top">timeStyle</td> * <td>Defines the style of the time component. This can be one of the style * constants declared by the <code>java.text.DateFormat</code> class like * <code>SHORT</code> or <code>FULL</code>. While the style for the date * component is set by the inherited <code>style</code> property, with this * property the style for the time component can be set separately.</td> * <td valign="top">SHORT</td> * </tr> * </table> * </p> * * @author Oliver Heger * @version $Id: DateTimeTransformer.java 205 2012-01-29 18:29:57Z oheger $ */ public class DateTimeTransformer extends DateTransformerBase { /** Constant for the time style property. */ protected static final String PROP_TIME_STYLE = "timeStyle"; /** Stores the formatting style to be used for the time portion. */ private int timeStyle; /** * Creates a new instance of <code>DateTimeTransformer</code>. */ public DateTimeTransformer() { setTimeStyle(DateFormat.SHORT); } /** * Returns the style for the time portion. * * @return the style for the time */ public int getTimeStyle() { return timeStyle; } /** * Sets the style for the time. The styles for the date portion and the time * portion are separately set. Here one of the constants supported by * <code>java.text.DateFormat</code> (e.g. <code>SHORT</code>, * <code>MEDIUM</code> etc.) can be passed in. * * @param timeStyle the style for the time */ public void setTimeStyle(int timeStyle) { this.timeStyle = timeStyle; } /** * Creates the format object to be used by this transformer. This * implementation returns a date/time instance of <code>DateFormat</code>. * * @param locale the locale * @param style the style for the date portion * @param config the configuration with the properties * @return the format object */ @Override protected DateFormat createFormat(Locale locale, int style, Configuration config) { return DateFormat.getDateTimeInstance(style, config.getInt( PROP_TIME_STYLE, getTimeStyle()), locale); } }
[ "oliver.heger@oliver-heger.de" ]
oliver.heger@oliver-heger.de
492ccc9df52c4ed18ce9659bb735365f19b50ea3
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/realm-java/2016/4/RealmPrimaryKeyTests.java
d642764f0d40ab09bcc3dd06e607d41dc87b7c08
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
5,627
java
/* * Copyright 2016 Realm 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 io.realm; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import io.realm.entities.PrimaryKeyRequiredAsBoxedByte; import io.realm.entities.PrimaryKeyRequiredAsBoxedInteger; import io.realm.entities.PrimaryKeyRequiredAsBoxedLong; import io.realm.entities.PrimaryKeyRequiredAsBoxedShort; import io.realm.entities.PrimaryKeyRequiredAsString; import io.realm.objectid.NullPrimaryKey; import io.realm.rule.TestRealmConfigurationFactory; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @RunWith(Parameterized.class) public class RealmPrimaryKeyTests { @Rule public final TestRealmConfigurationFactory configFactory = new TestRealmConfigurationFactory(); protected Realm realm; @Before public void setUp() { RealmConfiguration realmConfig = configFactory.createConfiguration(); realm = Realm.getInstance(realmConfig); } @After public void tearDown() { if (realm != null) { realm.close(); } } /** * Base parameters for testing null/not-null primary key value. The parameters are aligned in an * order of 1) a test target class, 2) a primary key field class, 3) a primary Key value, 4) a * secondary field class, and 5) a secondary field value, accommodating {@interface NullPrimaryKey} * to condense unit tests. */ @Parameterized.Parameters public static Iterable<Object[]> data() { return Arrays.asList(new Object[][]{ // 1) Test target class 2) PK Class 3) PK value 4) 2nd Class 5) 2nd field value {PrimaryKeyRequiredAsString.class, String.class, "424123", String.class, "SomeSecondaryValue"}, {PrimaryKeyRequiredAsBoxedByte.class, Byte.class, Byte.valueOf("67"), String.class, "This-Is-Second-One"}, {PrimaryKeyRequiredAsBoxedShort.class, Short.class, Short.valueOf("1729"), String.class, "AnyValueIsAccepted"}, {PrimaryKeyRequiredAsBoxedInteger.class, Integer.class, Integer.valueOf("19"), String.class, "PlayWithSeondFied!"}, {PrimaryKeyRequiredAsBoxedLong.class, Long.class, Long.valueOf("62914"), String.class, "Let's name a value"} }); } final private Class<? extends RealmObject> testClazz; final private Class primaryKeyFieldType; final private Object primaryKeyFieldValue; final private Class secondaryFieldType; final private Object secondaryFieldValue; public RealmPrimaryKeyTests(Class<? extends RealmObject> testClazz, Class primaryKeyFieldType, Object primaryKeyFieldValue, Class secondaryFieldType, Object secondaryFieldValue) { this.testClazz = testClazz; this.primaryKeyFieldType = primaryKeyFieldType; this.primaryKeyFieldValue = primaryKeyFieldValue; this.secondaryFieldType = secondaryFieldType; this.secondaryFieldValue = secondaryFieldValue; } // @PrimaryKey + @Required annotation accept not-null value properly as a primary key value for Realm version 0.89.1+ @Test public void copyToRealmOrUpdate_requiredPrimaryKey() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException { RealmObject obj = (RealmObject)testClazz.getConstructor(primaryKeyFieldType, secondaryFieldType).newInstance(primaryKeyFieldValue, secondaryFieldValue); realm.beginTransaction(); realm.copyToRealmOrUpdate(obj); realm.commitTransaction(); RealmResults results = realm.where(testClazz).findAll(); assertEquals(1, results.size()); assertEquals(primaryKeyFieldValue, ((NullPrimaryKey)results.first()).getId()); assertEquals(secondaryFieldValue, ((NullPrimaryKey)results.first()).getName()); } // @PrimaryKey + @Required annotation does accept null as a primary key value for Realm version 0.89.1+ @Test public void copyToRealmOrUpdate_requiredPrimaryKeyThrows() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException { try { RealmObject obj = (RealmObject)testClazz.getConstructor(primaryKeyFieldType, secondaryFieldType).newInstance(null, null); realm.beginTransaction(); realm.copyToRealmOrUpdate(obj); fail("@PrimaryKey + @Required field cannot be null"); } catch (RuntimeException expected) { if (testClazz.equals(PrimaryKeyRequiredAsString.class)) { assertTrue(expected instanceof IllegalArgumentException); } else { assertTrue(expected instanceof NullPointerException); } } finally { realm.cancelTransaction(); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
2da82d72a9d595c7b9114f3a82cbc318a3cb4eed
05e13c408bede78bb40cbaba237669064eddee10
/src/main/java/com/fedex/ws/uploaddocument/v17/UploadDocumentDetail.java
359e36b6e942111da8cf82ead57559412a7cf024
[]
no_license
noboomu/shipping-carriers
f60ae167bd645368012df0817f0c0d54e8fff616
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
refs/heads/master
2023-05-07T08:54:31.217066
2021-06-02T23:48:11
2021-06-02T23:48:11
373,320,009
0
0
null
null
null
null
UTF-8
Java
false
false
5,435
java
package com.fedex.ws.uploaddocument.v17; import java.math.BigInteger; import javax.xml.datatype.XMLGregorianCalendar; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlSchemaType; import jakarta.xml.bind.annotation.XmlType; /** * <p>Java class for UploadDocumentDetail complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="UploadDocumentDetail"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="LineNumber" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/&gt; * &lt;element name="CustomerReference" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="DocumentType" type="{http://fedex.com/ws/uploaddocument/v17}UploadDocumentType" minOccurs="0"/&gt; * &lt;element name="FileName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;element name="DocumentContent" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/&gt; * &lt;element name="ExpirationDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "UploadDocumentDetail", propOrder = { "lineNumber", "customerReference", "documentType", "fileName", "documentContent", "expirationDate" }) public class UploadDocumentDetail { @XmlElement(name = "LineNumber") @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger lineNumber; @XmlElement(name = "CustomerReference") protected String customerReference; @XmlElement(name = "DocumentType") @XmlSchemaType(name = "string") protected UploadDocumentType documentType; @XmlElement(name = "FileName") protected String fileName; @XmlElement(name = "DocumentContent") protected byte[] documentContent; @XmlElement(name = "ExpirationDate") @XmlSchemaType(name = "date") protected XMLGregorianCalendar expirationDate; /** * Gets the value of the lineNumber property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getLineNumber() { return lineNumber; } /** * Sets the value of the lineNumber property. * * @param value * allowed object is * {@link BigInteger } * */ public void setLineNumber(BigInteger value) { this.lineNumber = value; } /** * Gets the value of the customerReference property. * * @return * possible object is * {@link String } * */ public String getCustomerReference() { return customerReference; } /** * Sets the value of the customerReference property. * * @param value * allowed object is * {@link String } * */ public void setCustomerReference(String value) { this.customerReference = value; } /** * Gets the value of the documentType property. * * @return * possible object is * {@link UploadDocumentType } * */ public UploadDocumentType getDocumentType() { return documentType; } /** * Sets the value of the documentType property. * * @param value * allowed object is * {@link UploadDocumentType } * */ public void setDocumentType(UploadDocumentType value) { this.documentType = value; } /** * Gets the value of the fileName property. * * @return * possible object is * {@link String } * */ public String getFileName() { return fileName; } /** * Sets the value of the fileName property. * * @param value * allowed object is * {@link String } * */ public void setFileName(String value) { this.fileName = value; } /** * Gets the value of the documentContent property. * * @return * possible object is * byte[] */ public byte[] getDocumentContent() { return documentContent; } /** * Sets the value of the documentContent property. * * @param value * allowed object is * byte[] */ public void setDocumentContent(byte[] value) { this.documentContent = value; } /** * Gets the value of the expirationDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getExpirationDate() { return expirationDate; } /** * Sets the value of the expirationDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setExpirationDate(XMLGregorianCalendar value) { this.expirationDate = value; } }
[ "bauer.j@gmail.com" ]
bauer.j@gmail.com
53c561e820a1d2b1c8ab3e253327c1906ad452f8
b9b1109f2e0931d6a8381994da926d532b44f3ac
/bitcamp-java-basic/src/main/java/com/eomcs/spring/ioc/ex01/e/Exam01.java
9a661d1b378b9ec0c0dbf709d14ac740a176d617
[]
no_license
eomjinyoung/bitcamp-20200713
a1ba5ec8c352cd33d6549d8e31ca44f2e3df4db7
d791bd087b073a186facacbc562ddce24970447d
refs/heads/master
2023-02-08T14:51:58.820397
2021-01-01T01:35:21
2021-01-01T01:35:21
279,742,777
2
3
null
2020-10-28T08:31:29
2020-07-15T02:33:14
Java
UTF-8
Java
false
false
634
java
// IoC 컨테이너에 객체를 보관하기 package com.eomcs.spring.ioc.ex01.e; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.eomcs.spring.ioc.SpringUtils; public class Exam01 { public static void main(String[] args) { ApplicationContext iocContainer = new ClassPathXmlApplicationContext(// "com/eomcs/spring/ioc/ex01/e/application-context.xml"); // 현재 IoC 컨테이너에 들어 있는 객체를 출력해 보자. SpringUtils.printBeanList(iocContainer); System.out.println("실행 완료!"); } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
5acccc8b3a3411b6366074b0274506119bbe6845
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_1468.java
d799ef91d2f5df0df6b489112a8867b7a7591a41
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { String sql = "SELECT DEPARTMENT_ID, MANAGER_ID, LOCATION_ID FROM DEPARTMENTS WHERE MANAGER_ID <=" + val2+" OR LOCATION_ID <" + rand1; Statement stmt = conn.createStatement(); stmt.executeQuery(sql); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
0164b0942b947e5963555944e514c31c9a5189cd
d0ebbd623d1552167c4989768056dcc28078ff85
/abc99/src/main/java/com/fastcode/abc99/addons/reporting/application/dashboardversion/dto/GetUserOutput.java
ca5b0820cd70c8c29dfc234dddecb8b768b91754
[]
no_license
fastcoderepos/abc99
5f8383488094555e9001e2a5ae4a60c0f347146e
0f8e2681ee4dd5d35f8b83714c6ed3f3546ef8e5
refs/heads/master
2023-02-15T11:40:23.634524
2021-01-06T11:49:39
2021-01-06T11:49:39
327,296,257
0
0
null
null
null
null
UTF-8
Java
false
false
902
java
package com.fastcode.abc99.addons.reporting.application.dashboardversion.dto; import java.util.Date; import lombok.Getter; import lombok.Setter; @Getter @Setter public class GetUserOutput { private Integer accessFailedCount; private String authenticationSource; private String emailAddress; private String emailConfirmationCode; private String firstName; private Long id; private Boolean isActive; private Boolean isEmailConfirmed; private Boolean isLockoutEnabled; private String isPhoneNumberConfirmed; private Date lastLoginTime; private String lastName; private Date lockoutEndDateUtc; private String password; private String passwordResetCode; private Date passwordTokenExpiration; private String phoneNumber; private Long profilePictureId; private Boolean twoFactorEnabled; private String userName; private String dashboardVersion; private Long dashboardversionId; }
[ "info@nfinityllc.com" ]
info@nfinityllc.com
9b7cdc58e293105be119af482ca759926aba22be
dd124ff483bb401f9b16265766d0b47ae2750dd6
/Platform/src/net/sf/anathema/framework/itemdata/model/NonPersistableItemData.java
88933ec04a6310336aa46f38442105ec46f9acac
[]
no_license
eleizel/anathema
d3ece56766963033df057d76ad3580195d107d84
9d003666094e0ff6c17de2ba698d989dd451de9f
refs/heads/master
2020-12-25T10:36:40.969421
2012-04-24T20:30:24
2012-04-24T20:30:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package net.sf.anathema.framework.itemdata.model; import net.sf.anathema.framework.presenter.itemmanagement.PrintNameAdjuster; import net.sf.anathema.lib.control.change.IChangeListener; public abstract class NonPersistableItemData implements IItemData { public void addDirtyListener(IChangeListener changeListener) { // nothing to do; } public boolean isDirty() { return false; } public void removeDirtyListener(IChangeListener changeListener) { // nothing to do; } public void setClean() { // nothing to do; } public void setPrintNameAdjuster(PrintNameAdjuster adjuster) { // nothing to do; } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
3ff4ef76be1e7675dd0045912b6db9a021ba759a
f1be7c4ba9291368667bed8f17ce9f004e757821
/src/member/service/ChangePasswordService1.java
0427a7374fc3ce36633c59964f362c9baf5d3472
[]
no_license
wkdalswn11/myproject
5d0f6d9fcea36c1dfc7d2b576b9a86d5c76d4371
5cf6b42e5eb4f59b8b8babd30863b038b6e2bb4e
refs/heads/master
2023-03-06T23:26:47.246279
2021-02-01T05:59:13
2021-02-01T05:59:13
334,842,243
0
0
null
null
null
null
UTF-8
Java
false
false
948
java
package member.service; import java.sql.Connection; import java.sql.SQLException; import jdbc.ConnectionProvider1; import jdbc.JdbcUtil; import member.dao.MemberDaos; import member.model.Members; public class ChangePasswordService1 { private MemberDaos memberDaos = new MemberDaos(); public void changePassword(String userId, String curPwd, String newPwd) { Connection con = null; try { con = ConnectionProvider1.getConnection(); con.setAutoCommit(false); Members members = memberDaos.selectById(con, userId); if(members == null) { throw new MemberNotFoundException(); } if(!members.matchPassword(curPwd) ) { throw new InvalidPasswordException(); } members.changePassword(newPwd); memberDaos.update(con, members); memberDaos.update2(con, members); con.commit(); } catch (SQLException e) { JdbcUtil.rollback(con); e.printStackTrace(); } finally { JdbcUtil.close(con); } } }
[ "wkdalswn133@naver.com" ]
wkdalswn133@naver.com
13148f83305393e4bb5cf289dfd05b424e979e36
0b0fecba32b12f8204466563e394a469b3bd1b6b
/app/src/main/java/james/medianotification/adapters/ContributorAdapter.java
2d09e5c7258ae143dd5c88965a517f6af3dcde37
[ "Apache-2.0" ]
permissive
fennifith/MediaNotification
b495dd0355faeed8d94f1d0b75a11919cb2b8008
b33eaaaf6c0e068e7531339522a59a453d9df7d8
refs/heads/master
2021-10-10T08:54:29.268845
2019-01-08T16:26:07
2019-01-08T16:26:07
99,525,708
9
2
null
null
null
null
UTF-8
Java
false
false
2,545
java
package james.medianotification.adapters; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import java.util.List; import james.medianotification.R; import james.medianotification.data.ContributorData; import james.medianotification.views.CircleImageView; public class ContributorAdapter extends RecyclerView.Adapter<ContributorAdapter.ViewHolder> { private List<ContributorData> contributors; public ContributorAdapter(List<ContributorData> contributors) { this.contributors = contributors; } @Override public ContributorAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_contributor, parent, false)); } @Override public void onBindViewHolder(final ContributorAdapter.ViewHolder holder, int position) { ContributorData contributor = contributors.get(position); Glide.with(holder.imageView.getContext()).asBitmap().load(contributor.imageUrl).into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) { holder.imageView.setImageBitmap(resource); } }); holder.textView.setText(contributor.name); holder.itemView.setTag(contributor); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (view.getTag() != null && view.getTag() instanceof ContributorData) view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(((ContributorData) view.getTag()).url))); } }); } @Override public int getItemCount() { return contributors.size(); } public class ViewHolder extends RecyclerView.ViewHolder { private CircleImageView imageView; private TextView textView; public ViewHolder(View itemView) { super(itemView); imageView = itemView.findViewById(R.id.image); textView = itemView.findViewById(R.id.title); } } }
[ "18jafenn90@gmail.com" ]
18jafenn90@gmail.com
2a0d801e05e183c2526f10d6e9af731959ad7255
0a667a88a7f130282752571746a7495c7f46d8e6
/src/main/java/org/ultramine/network/ServerUMPacketProxy.java
fcbe3937c0d1ad2a0f5e312f6741121aec60152a
[]
no_license
TechCatOther/um_private_regions
d341710ae242c3fb03967d5c0b1b60f22b81a19e
929450d871355324794cabed849da90383f5d1fc
refs/heads/master
2020-03-22T03:22:27.792060
2018-07-02T10:27:02
2018-07-02T10:27:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
900
java
package org.ultramine.network; import java.io.IOException; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; public class ServerUMPacketProxy extends Packet { private UMPacket packet; public ServerUMPacketProxy(){} public ServerUMPacketProxy(UMPacket packet) { this.packet = packet; } @Override public void writePacketData(PacketBuffer buf) throws IOException { buf.writeByte((byte)UMNetworkRegistry.getPacketID(packet)); packet.write(buf); } @Override public void readPacketData(PacketBuffer buf) throws IOException { int id = buf.readUnsignedByte(); packet = UMNetworkRegistry.makePacketClient(id); packet.read(buf); } @Override public void processPacket(INetHandler net) { packet.processClient((NetHandlerPlayClient)net); } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
4394351d9d051f982b792b9b1a0706bdfa2bd9bd
9cd474ff195074d2fa31cc6062e86ebd98e83329
/com.spark.psi.base.browser/src/com/spark/psi/base/browser/supplier/SupplierListRender.java
28fb8262201a7eed8f33621701072db0dd909c1f
[]
no_license
jideas/spark-whxc-psi
543c24abe53b3243876f4a90198fd2a18276562a
cb3160395c61421685a110628da1d82a761d483f
refs/heads/master
2021-01-10T09:07:46.430871
2013-05-11T13:46:55
2013-05-11T13:46:55
47,181,021
0
0
null
null
null
null
GB18030
Java
false
false
5,056
java
package com.spark.psi.base.browser.supplier; import com.jiuqi.dna.ui.common.constants.JWT; import com.jiuqi.dna.ui.wt.widgets.Button; import com.jiuqi.dna.ui.wt.widgets.Label; import com.jiuqi.dna.ui.wt.widgets.Text; import com.jiuqi.util.StringUtils; import com.spark.common.components.controls.text.SSearchText2; import com.spark.common.components.table.STableColumn; import com.spark.common.components.table.STableStyle; import com.spark.common.components.table.StableUtil; import com.spark.common.utils.character.DoubleUtil; import com.spark.common.utils.date.DateUtil; import com.spark.psi.base.browser.PSIListPageRender; import com.spark.psi.publish.BaseDictionaryEnum; import com.spark.psi.publish.EnumEntity; import com.spark.psi.publish.base.key.BaseDictionaryKey; import com.spark.psi.publish.base.partner.entity.SupplierItem; import com.spark.common.components.table.edit.SEditTableStyle; /** * 供应商列表视图 */ public class SupplierListRender extends PSIListPageRender { @Override protected void afterFooterRender() { super.afterFooterRender(); // new Label(headerLeftArea).setText("供应商数量:"); new Label(headerLeftArea).setID(SupplierListProcessor.ID_LABEL_COUNT); // Text text = new SSearchText2(headerRightArea); text.setHint("输入搜索内容"); text.setID(SupplierListProcessor.ID_TEXT_SEARCHTEXT); Button button = new Button(footerLeftArea, JWT.APPEARANCE2); button.setID(SupplierListProcessor.ID_BUTTON_NEW); button.setText(" 新增供应商 "); } public STableColumn[] getColumns() { STableColumn[] columns = new STableColumn[9]; columns[0] = new STableColumn(SupplierListProcessor.Columns.Number.name(), 100, JWT.LEFT, "供应商编号"); columns[1] = new STableColumn(SupplierListProcessor.Columns.Name.name(), 200, JWT.LEFT, "供应商名称"); columns[1].setGrab(true); columns[2] = new STableColumn(SupplierListProcessor.Columns.SupplierType.name(), 100, JWT.CENTER, "供应商类型"); columns[3] = new STableColumn(SupplierListProcessor.Columns.TaxRate.name(), 80, JWT.RIGHT, "税率"); columns[4] = new STableColumn(SupplierListProcessor.Columns.TotalTradeAmount.name(), 100, JWT.RIGHT, "采购总额"); columns[5] = new STableColumn(SupplierListProcessor.Columns.TotalTradeCount.name(), 100, JWT.RIGHT, "采购次数"); columns[6] = new STableColumn(SupplierListProcessor.Columns.RecentTradeDate.name(), 100, JWT.CENTER, "最近采购"); columns[7] = new STableColumn(SupplierListProcessor.Columns.BalanceAmount.name(), 100, JWT.RIGHT, "应付余额"); columns[8] = new STableColumn(SupplierListProcessor.Columns.ContactPerson.name(), 100, JWT.CENTER, "联系人"); columns[0].setSortable(true); columns[1].setSortable(true); columns[2].setSortable(true); columns[3].setSortable(true); columns[4].setSortable(true); columns[5].setSortable(true); columns[6].setSortable(true); columns[7].setSortable(true); columns[8].setSortable(true); return columns; } @Override public int getDecimal(Object element, int columnIndex) { switch (columnIndex) { case 1: return 2; case 4: return 2; default: return -1; } } public String getText(Object element, int columnIndex) { SupplierItem item = (SupplierItem) element; switch (columnIndex) { case 0: return item.getPartnerNo(); case 1: return StableUtil.toLink("edit", "", item.getShortName()); case 2: return getContext().find(EnumEntity.class, new BaseDictionaryKey(BaseDictionaryEnum.SupplierType, item.getSupplierType())).getName(); case 3: return DoubleUtil.getRoundStr(item.getTaxRate()); case 4: return DoubleUtil.getRoundStr(item.getTradeTotalAmount()); case 5: return String.valueOf(item.getTradeTotalCount()); case 6: return DateUtil.dateFromat(item.getRecentTradeDate()); case 7: return DoubleUtil.getRoundStr(item.getBalanceAmount()); case 8: return item.getContactName(); default: return ""; } } @Override public String getToolTipText(Object element, int columnIndex) { SupplierItem item = (SupplierItem) element; switch (columnIndex) { case 1: return item.getName(); case 8: StringBuffer buffer = new StringBuffer(); buffer.append("手机:"); buffer.append(StringUtils.isEmpty(item.getContactMobileNo()) ? "无" : item.getContactMobileNo()); buffer.append("\n"); buffer.append("固话:"); buffer.append(StringUtils.isEmpty(item.getContactLandLineNumber()) ? "无" : item .getContactLandLineNumber()); buffer.append("\n"); buffer.append("电子邮箱:"); buffer.append(StringUtils.isEmpty(item.getContactEmail()) ? "无" : item.getContactEmail()); buffer.append("\n"); return buffer.toString(); default: return ""; } } public STableStyle getTableStyle() { SEditTableStyle style = new SEditTableStyle(); style.setPageAble(false); return style; } }
[ "weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454" ]
weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454
7bff0a2f8a0c2b1535d26643dd73340f84aad417
62588c60809ea3268f5bead7c5335ce7fb562a40
/java/ec3/common/block/BlockPortal.java
1bc3e59f789a6d1942c49920b4f963d76ba65952
[]
no_license
DarkxElocius/EssentialCraft3
1d163881441ee2e37d7b9ba4427b6588363fd89d
3fd25a97cd271d0102ce59ff492a74a30323b87c
refs/heads/master
2021-01-17T23:32:34.082390
2015-05-16T20:11:20
2015-05-16T20:11:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package ec3.common.block; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ec3.utils.cfg.Config; import ec3.utils.common.ECUtils; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockPortal extends net.minecraft.block.BlockPortal{ public BlockPortal() { super(); } @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return this.blockIcon; } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister p_149651_1_) { this.blockIcon = p_149651_1_.registerIcon(this.getTextureName()); } public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { } public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { if(!p_149670_1_.isRemote) { if(ECUtils.inPortalTime.containsKey(p_149670_5_)) { int i = ECUtils.inPortalTime.get(p_149670_5_); if(i >= 200 && !p_149670_1_.isRemote) { i = 0; p_149670_5_.travelToDimension(Config.dimensionID); } ECUtils.inPortalTime.put(p_149670_5_, i+=1); }else { ECUtils.inPortalTime.put(p_149670_5_, 2); } } } @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) { } }
[ "Modbder@gmail.com" ]
Modbder@gmail.com
07ae6f7628c5b81e64337b759e67da73955a10e7
87dba7ffaba84dbc81304b1afdb83dfb65f3da5c
/Web/src/main/java/org/voovan/http/websocket/WebSocketSession.java
05ba4cb6b97e06e613b03af9e237b4b61f4bdcda
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
zbgapi/Voovan
404dd3e75c1008e67dfd20030c1308c9db3f3a4c
debfbe19865363d4ee1f399343d3a58e3cabdeff
refs/heads/master
2022-12-31T21:37:44.272961
2020-09-26T16:23:22
2020-09-26T16:23:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,558
java
package org.voovan.http.websocket; import org.voovan.http.server.*; import org.voovan.http.websocket.exception.WebSocketFilterException; import org.voovan.network.IoSession; import org.voovan.network.exception.SendMessageException; import org.voovan.tools.collection.Attributes; import org.voovan.tools.log.Logger; import java.nio.ByteBuffer; /** * WebSocket 会话对象 * * @author: helyho * Voovan Framework. * WebSite: https://github.com/helyho/Voovan * Licence: Apache v2 License */ public class WebSocketSession extends Attributes { private IoSession socketSession; private WebSocketRouter webSocketRouter; private String remoteAddres; private int remotePort; private WebSocketType webSocketType; private boolean masked; /** * 构造函数 * @param socketSession Socket 会话 * @param webSocketRouter WebSocket 路由处理对象 * @param webSocketType WebSocket类型 */ public WebSocketSession(IoSession socketSession, WebSocketRouter webSocketRouter, WebSocketType webSocketType){ this.socketSession = socketSession; this.remoteAddres = socketSession.remoteAddress(); this.remotePort = socketSession.remotePort(); this.webSocketRouter = webSocketRouter; this.webSocketType = webSocketType; if(this.webSocketType == webSocketType.SERVER){ masked = false; } else { masked = true; } } /** * 获取WebSocket的地址 * @return WebSocket的地址 */ public String getLocation(){ HttpSessionState httpSessionState = WebServerHandler.getAttachment(socketSession); HttpRequest request = httpSessionState.getHttpRequest(); return request.protocol().getPath(); } /** * 获取 Http 的 session * @return HttpSession对象 */ public HttpSession getHttpSession(){ HttpSessionState httpSessionState = WebServerHandler.getAttachment(socketSession); HttpRequest request = httpSessionState.getHttpRequest(); if(request.sessionExists()) { return request.getSession(); } else { return null; } } /** * 获取对端连接的 IP * * @return 对端连接的 IP */ public String getRemoteAddress() { return this.remoteAddres; } /** * 获取对端连接的端口 * * @return 对端连接的端口 */ public int getRemotePort() { return remotePort; } /** * 获取 WebSocket 路由处理对象 * @return WebSocket 路由处理对象 */ public WebSocketRouter getWebSocketRouter() { return webSocketRouter; } /** * 设置获取WebSocket 路由处理对象 * @param webSocketRouter WebSocket 路由处理对象 */ public void setWebSocketRouter(WebSocketRouter webSocketRouter) { this.webSocketRouter = webSocketRouter; } /** * 发送 websocket 消息 * @param obj 消息对象 * @throws SendMessageException 发送异常 * @throws WebSocketFilterException WebSocket过滤器异常 */ public void send(Object obj) throws SendMessageException, WebSocketFilterException { ByteBuffer byteBuffer = (ByteBuffer) WebSocketDispatcher.filterEncoder(this, obj); WebSocketFrame webSocketFrame = WebSocketFrame.newInstance(true, WebSocketFrame.Opcode.TEXT, masked, byteBuffer); this.socketSession.syncSend(webSocketFrame); } /** * 发送 websocket 消息二进制消息 * @param obj 消息对象 * @throws SendMessageException 发送异常 * @throws WebSocketFilterException WebSocket过滤器异常 */ public void sendBinary(Object obj) throws SendMessageException, WebSocketFilterException { ByteBuffer byteBuffer = null; if(obj instanceof byte[]){ byteBuffer = ByteBuffer.wrap((byte[])obj); } else if(obj instanceof ByteBuffer) { byteBuffer = (ByteBuffer)obj; } else { byteBuffer = (ByteBuffer)WebSocketDispatcher.filterEncoder(this, obj); } WebSocketFrame webSocketFrame = WebSocketFrame.newInstance(true, WebSocketFrame.Opcode.BINARY, masked, byteBuffer); this.socketSession.syncSend(webSocketFrame); } /** * 发送 websocket 帧 * @param webSocketFrame 帧 * @throws SendMessageException 发送异常 */ protected void send(WebSocketFrame webSocketFrame) throws SendMessageException { this.socketSession.syncSend(webSocketFrame); } /** * 判断连接状态 * @return true: 连接状态, false: 断开状态 */ public boolean isConnected(){ return socketSession.isConnected(); } /** * 直接关闭 Socket 连接 * 不会发送 CLOSING 给客户端 */ /** * 关闭 WebSocket */ public void close() { WebSocketFrame closeWebSocketFrame = WebSocketFrame.newInstance(true, WebSocketFrame.Opcode.CLOSING, masked, ByteBuffer.wrap(WebSocketTools.intToByteArray(1000, 2))); try { send(closeWebSocketFrame); } catch (SendMessageException e) { Logger.error("Close WebSocket error, Socket will be close " ,e); socketSession.close(); } } protected IoSession getSocketSession() { return socketSession; } public void setSocketSession(IoSession socketSession) { this.socketSession = socketSession; } }
[ "helyho@gmail.com" ]
helyho@gmail.com
fff002bcdab5c1e92a0cf48c832a56239e1039c2
413b9c213ea950c6456689a8a5c1228d3efbaf40
/src/main/java/pro/tremblay/myapp/domain/Authority.java
7ae574744cba569a8f3e6453fb102e659f0ba81f
[]
no_license
henri-tremblay/hipster-atmosphere
5a45d7106c2219f40c9f9596a39eb26eae0d88d4
48ae8446533488ae22bc5012c95fa9b4f17954d1
refs/heads/master
2021-06-01T10:44:31.666984
2014-12-10T17:22:09
2014-12-10T17:22:09
27,828,628
1
2
null
2020-09-18T08:41:37
2014-12-10T16:30:28
Java
UTF-8
Java
false
false
1,470
java
package pro.tremblay.myapp.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Column; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.io.Serializable; /** * An authority (a security role) used by Spring Security. */ @Entity @Table(name = "T_AUTHORITY") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class Authority implements Serializable { @NotNull @Size(min = 0, max = 50) @Id @Column(length = 50) private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Authority authority = (Authority) o; if (name != null ? !name.equals(authority.name) : authority.name != null) { return false; } return true; } @Override public int hashCode() { return name != null ? name.hashCode() : 0; } @Override public String toString() { return "Authority{" + "name='" + name + '\'' + "}"; } }
[ "henri.tremblay@gmail.com" ]
henri.tremblay@gmail.com
53c3dda6ed04fe64f1e84b206e1b09524f707e7c
556fe62a31e4e78e17394ec8b4374d454a80455f
/src/main/java/org/agilewiki/jactor/JAIterator.java
32d7fe7f03df0e46e1b0534d132abdc2c467b47f
[]
no_license
gunnarahlberg/JActor
c5a51f6588994e871767a95c49fd8d3da4c71e3d
4d03b815967caa7bb9c145f0667be5cd8cda1e9a
refs/heads/master
2021-01-17T21:52:47.773177
2011-12-26T09:28:45
2011-12-26T09:28:45
3,068,601
1
0
null
null
null
null
UTF-8
Java
false
false
4,508
java
package org.agilewiki.jactor; /** * <p> * Iterates over its process method and works within any actor which supports 2-way messages. * </p> * <p> * We can use JAIterator to calculate factorials: * </p> * <pre> * final int max = 5; * ResponseProcessor printResult = new ResponseProcessor() { * public void process(Object rsp) { * System.out.println(rsp); * } * }; * * (new JAIterator(printResult) { * int i; * int r; * * public void process(ResponseProcessor rp) throws Exception { * if (r == 0) r = 1; * if (i >= max) rp.process(new Integer(r)); * else { * i += 1; * r = r * i; * rp.process(null); * } * } * }).iterate(); * </pre> * <p> * The JAIterator.process method is called repeatedly until it returns a non-null response, * which is then returned by JAIterator. However, the response need not be returned immediately, so the * JAIterator.process method can send messages to other actors: * </p> * <pre> * public class Factorial extends JLPCActor { * * public Factorial(Mailbox mailbox) { * super(mailbox); * } * * protected void processRequest(Object req, final ResponseProcessor rp) * throws Exception { * final int max = 5; * ResponseProcessor printResult = new ResponseProcessor() { * public void process(Object rsp) throws Exception { * System.out.println(rsp); * rp.process(null); * } * }; * (new JAIterator(printResult) { * int i; * int r; * Multiplier mp = new Multiplier(getMailbox()); * * public void process(ResponseProcessor rp) throws Exception { * if (r == 0) r = 1; * if (i >= max) rp.process(new Integer(r)); * else { * i += 1; * Multiply m = new Multiply(); * m.a = r; * m.b = i; * send(mp, m, new ResponseProcessor() { * public void process(Object rsp) throws Exception { * r = ((Integer) rsp).intValue(); * } * }); * rp.process(null); * } * } * }).iterate(); * } * } * </pre> */ abstract public class JAIterator { /** * Set to true when the response has not been received asynchronously. */ private boolean sync = false; /** * Set to true when the response has not been received synchronously. */ private boolean async = false; /** * Processes the final, non-null result. */ private final ResponseProcessor responseProcessor; /** * The internal ResponseProcessor which handles the responses from the call to process. */ private final ResponseProcessor irp = new ResponseProcessor() { @Override public void process(Object unwrappedResponse) throws Exception { if (unwrappedResponse == null) { if (!async) { sync = true; } else { iterate(); //not recursive } } else responseProcessor.process(unwrappedResponse); } }; /** * Create a JAIterator. * * @param responseProcessor Processes the final, non-null result. * @throws Exception Any uncaught exceptions raised by the process method. */ public JAIterator(ResponseProcessor responseProcessor) { this.responseProcessor = responseProcessor; } /** * Iterates over the process method. * * @throws Exception Any uncaught exceptions raised by the process method. */ public void iterate() throws Exception { sync = true; while (sync) { sync = false; process(irp); if (!sync) { async = true; } } } /** * Perform an iteration. * * @param responseProcessor Processes the response. * @throws Exception Any uncaught exceptions raised by the process method. */ abstract protected void process(ResponseProcessor responseProcessor) throws Exception; }
[ "laforge49@gmail.com" ]
laforge49@gmail.com
ad72e1807a8b5064e5524a0ccd36069702d463f0
1476edb142a8bc5b87b5ff985e59f37a672c7616
/tobys-dynamic-dispatch/src/com/toby01/DoubleDispatch.java
9a95acdf786c4eb75db0bb5c4668867a98528904
[]
no_license
cocodori/study
ccbc5a42abcee3d25e7c25584052bfc2e26d69e8
ba2097fbdbd77752f588c9b78d1318e6817c37f5
refs/heads/main
2023-04-02T19:44:15.926840
2021-04-13T14:07:45
2021-04-13T14:07:45
324,682,853
0
0
null
null
null
null
UTF-8
Java
false
false
1,373
java
package com.toby01; import java.util.Arrays; import java.util.List; public class DoubleDispatch { interface Post {void postOn(SNS sns);} static class Text implements Post { public void postOn(SNS sns) { sns.post(this); } } static class Picture implements Post { public void postOn(SNS sns) { sns.post(this); } } interface SNS { void post(Text text); void post(Picture picture); } static class Facebook implements SNS { public void post(Text text) { System.out.println("Text Facebook" );} public void post(Picture picture) { System.out.println("Picture Facebook"); } } static class Twitter implements SNS { public void post(Text text) { System.out.println("Text Facebook" );} public void post(Picture picture) { System.out.println("Picture Facebook"); } } static class GooglePlus implements SNS { public void post(Text text) { System.out.println("Text GooglePlus" );} public void post(Picture picture) { System.out.println("Picture GooglePlus"); } } public static void main(String[] args) { List<Post> posts = Arrays.asList(new Text(), new Picture()); List<SNS> sns = Arrays.asList(new Facebook(), new Twitter(), new GooglePlus()); posts.forEach(p -> sns.forEach(s -> p.postOn(s))); } }
[ "moradulee@gmail.com" ]
moradulee@gmail.com
c457cfd4961a5b6ed5fecea4a1bf45ec39047c4f
04c752ae64212a609e0c826d83c2c4c1dc632fe0
/Java 자료/기타/수행평가/2/Scorpio/src/main/java/edu/iot/Scorpio/command/SaveCommand.java
ccbb7257bc997e8795585a6b10242cfe4c69cc49
[]
no_license
akdlzlr/Class-book
c5bf1f70518472c6c0da92e5cd940471cf8f6648
3f2b86bef2c2c855473710009d87010134697a7b
refs/heads/master
2021-06-26T04:40:15.552305
2020-10-15T00:40:44
2020-10-15T00:40:44
160,276,489
0
0
null
null
null
null
UTF-8
Java
false
false
1,008
java
package edu.iot.Scorpio.command; import edu.iot.Scorpio.service.TourPlanService; import edu.iot.Scorpio.service.TourPlanServiceImpl; import edu.iot.common.command.Command; import edu.iot.common.ui.Prompt; public class SaveCommand implements Command{ TourPlanService service = TourPlanServiceImpl.getInstance(); @Override public void execute() throws Exception { // 저장 유무 확인 if(service.isFirst()) { // 새로 저장하는 경우 Prompt prompt = new Prompt(); String defaultName = service.getPlan().getTitle(); String fname = prompt.getString("파일명("+defaultName+")"); if(fname.equals("")) { // 엔터만 친 경우 fname = defaultName; } String path = "c:/temp/"+fname+".tsc"; // 바이너리 데이터여서 txt로 저장하면 깨짐 service.save(path); }else { // 다시 저장하는 경우 service.save(); } // 저장이 실패한 경우 Command에서 예외처리 발생 System.out.println("저장하였습니다."); } }
[ "akdlzlr@naver.com" ]
akdlzlr@naver.com
2bab6f1c99efdb6df750f0291063797b22d98680
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/cxl.java
1aeaf627c4aee6bb661b221f0cff0b79c8c7cb48
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,226
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; public final class cxl extends com.tencent.mm.bx.a { public String IGG; public String IHo; public String aaCS; public String aaCT; public String hAP; public final int op(int paramInt, Object... paramVarArgs) { AppMethodBeat.i(152610); if (paramInt == 0) { paramVarArgs = (i.a.a.c.a)paramVarArgs[0]; if (this.aaCS != null) { paramVarArgs.g(1, this.aaCS); } if (this.IHo != null) { paramVarArgs.g(2, this.IHo); } if (this.hAP != null) { paramVarArgs.g(3, this.hAP); } if (this.IGG != null) { paramVarArgs.g(4, this.IGG); } if (this.aaCT != null) { paramVarArgs.g(5, this.aaCT); } AppMethodBeat.o(152610); return 0; } if (paramInt == 1) { if (this.aaCS == null) { break label450; } } label450: for (int i = i.a.a.b.b.a.h(1, this.aaCS) + 0;; i = 0) { paramInt = i; if (this.IHo != null) { paramInt = i + i.a.a.b.b.a.h(2, this.IHo); } i = paramInt; if (this.hAP != null) { i = paramInt + i.a.a.b.b.a.h(3, this.hAP); } paramInt = i; if (this.IGG != null) { paramInt = i + i.a.a.b.b.a.h(4, this.IGG); } i = paramInt; if (this.aaCT != null) { i = paramInt + i.a.a.b.b.a.h(5, this.aaCT); } AppMethodBeat.o(152610); return i; if (paramInt == 2) { paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs)) { if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) { paramVarArgs.kFT(); } } AppMethodBeat.o(152610); return 0; } if (paramInt == 3) { i.a.a.a.a locala = (i.a.a.a.a)paramVarArgs[0]; cxl localcxl = (cxl)paramVarArgs[1]; switch (((Integer)paramVarArgs[2]).intValue()) { default: AppMethodBeat.o(152610); return -1; case 1: localcxl.aaCS = locala.ajGk.readString(); AppMethodBeat.o(152610); return 0; case 2: localcxl.IHo = locala.ajGk.readString(); AppMethodBeat.o(152610); return 0; case 3: localcxl.hAP = locala.ajGk.readString(); AppMethodBeat.o(152610); return 0; case 4: localcxl.IGG = locala.ajGk.readString(); AppMethodBeat.o(152610); return 0; } localcxl.aaCT = locala.ajGk.readString(); AppMethodBeat.o(152610); return 0; } AppMethodBeat.o(152610); return -1; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.protocal.protobuf.cxl * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
68d4f601299320d53fd56653aebbf8e9d0151984
a3c69c1a13d3b33f152858cd2f81877a79b03da9
/idcenter-client/src/main/java/org/antframework/idcenter/client/support/TaskExecutor.java
6c88ed4ec4400ccaba375f7f921fdc8f81dc55e2
[ "Apache-2.0" ]
permissive
zhongxunking/idcenter
c8da64e4bbc35610592449b4fa3dff937a02733a
f4d67ffe01fb05c9a45c98e6ea4d27b48a3c44bb
refs/heads/master
2023-04-29T10:11:50.692253
2021-12-01T12:37:02
2021-12-01T12:37:02
110,987,831
29
19
Apache-2.0
2021-07-03T12:38:09
2017-11-16T15:23:48
Java
UTF-8
Java
false
false
898
java
/* * 作者:钟勋 (email:zhongxunking@163.com) */ /* * 修订记录: * @author 钟勋 2021-07-02 21:14 创建 */ package org.antframework.idcenter.client.support; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * 任务执行器 */ public class TaskExecutor { // 执行器 private final Executor executor; public TaskExecutor(int threads) { executor = new ThreadPoolExecutor( threads, threads, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<>(), new ThreadPoolExecutor.CallerRunsPolicy()); } /** * 执行 * * @param task 任务 */ public void execute(Runnable task) { executor.execute(task); } }
[ "zhongxunking@163.com" ]
zhongxunking@163.com
1c2166f3d071aa66c3a351a6fce6512c36082de4
ce0a08692c51a465a19b0a7df6e4d311593a2d7a
/src/main/java/com/livinglogic/ul4/ShiftRightAST.java
73dcb8b78accfd7f069e44160790308556b2455e
[]
no_license
mahmoudimus/LivingLogic.Java.ul4
54e8c5f034399cafba8d642fb9455ffffdf3864b
f0fa1ca5d4036cb684df68bbe10228afe74e08d3
refs/heads/master
2023-06-04T08:04:37.664780
2021-06-15T16:11:31
2021-06-15T16:11:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,296
java
/* ** Copyright 2009-2021 by LivingLogic AG, Bayreuth/Germany ** All Rights Reserved ** See LICENSE for the license */ package com.livinglogic.ul4; import java.math.BigDecimal; import java.math.BigInteger; import java.util.List; import java.util.ArrayList; import java.util.Date; public class ShiftRightAST extends BinaryAST { protected static class Type extends BinaryAST.Type { @Override public String getNameUL4() { return "ShiftRightAST"; } @Override public String getUL4ONName() { return "de.livinglogic.ul4.shiftright"; } @Override public String getDoc() { return "AST node for a bitwise right shift expression (e.g. ``x >> y``)."; } @Override public ShiftRightAST create(String id) { return new ShiftRightAST(null, null, null, null); } @Override public boolean instanceCheck(Object object) { return object instanceof ShiftRightAST; } } public static final UL4Type type = new Type(); @Override public UL4Type getTypeUL4() { return type; } public ShiftRightAST(Template template, Slice pos, CodeAST obj1, CodeAST obj2) { super(template, pos, obj1, obj2); } public String getType() { return "shiftright"; } public static CodeAST make(Template template, Slice pos, CodeAST obj1, CodeAST obj2) { if (obj1 instanceof ConstAST && obj2 instanceof ConstAST) { try { Object result = call(((ConstAST)obj1).value, ((ConstAST)obj2).value); if (!(result instanceof Undefined)) return new ConstAST(template, pos, result); } catch (Exception ex) { // fall through to create a real {@code ShiftRightAST} object } } return new ShiftRightAST(template, pos, obj1, obj2); } public Object evaluate(EvaluationContext context) { return call(obj1.decoratedEvaluate(context), obj2.decoratedEvaluate(context)); } public static Object call(int arg1, int arg2) { if (arg2 < 0) return ShiftLeftAST.call(arg1, -arg2); else if (arg2 >= 32) return arg1 < 0 ? -1 : 0; return arg1 >> arg2; } public static Object call(long arg1, int arg2) { if (arg2 < 0) return ShiftLeftAST.call(arg1, -arg2); else if (arg2 >= 64) return arg1 < 0 ? -1 : 0; return arg1 >> arg2; } public static Object call(BigInteger arg1, int arg2) { return arg1.shiftRight(arg2); } public static Object call(Object arg1, Object arg2) { if (arg1 instanceof Integer || arg1 instanceof Byte || arg1 instanceof Short || arg1 instanceof Boolean) { if (arg2 instanceof BigInteger || arg2 instanceof Long || arg2 instanceof Integer || arg2 instanceof Byte || arg2 instanceof Short || arg2 instanceof Boolean) return call(Utils.toInt(arg1), Utils.toInt(arg2)); } if (arg1 instanceof Long) { if (arg2 instanceof BigInteger || arg2 instanceof Long || arg2 instanceof Integer || arg2 instanceof Byte || arg2 instanceof Short || arg2 instanceof Boolean) return call(Utils.toLong(arg1), Utils.toInt(arg2)); } else if (arg1 instanceof BigInteger) { if (arg2 instanceof BigInteger || arg2 instanceof Long || arg2 instanceof Integer || arg2 instanceof Byte || arg2 instanceof Short || arg2 instanceof Boolean) return call((BigInteger)arg1, Utils.toInt(arg2)); } throw new ArgumentTypeMismatchException("{!t} >> {!t} not supported", arg1, arg2); } }
[ "walter@livinglogic.de" ]
walter@livinglogic.de
93293c1b0c8cc16285d00b4a39fafb637a3bbc18
bf3584f8f6636d0d70706f4b8d9348796aaf2071
/src/복습하자/Ex11_1.java
8ef9a09bfed996a18cec0747556e5265c1f446b7
[]
no_license
stpn94/Java_chobo2
bc46671aa9a216c30bf29096b5af43a87e39897e
a83bcbd25c9b0c204790aaf8c5e88ddca1f20cf2
refs/heads/master
2023-03-20T12:27:22.604118
2021-03-09T06:47:09
2021-03-09T06:47:09
341,820,140
0
0
null
null
null
null
UTF-8
Java
false
false
1,757
java
package 복습하자; import java.util.*; public class Ex11_1 { public static void main(String[] args) { ArrayList list1 = new ArrayList(10); list1.add(new Integer(5)); // list1 리스트에 정수(5) 추가 list1.add(new Integer(4)); // list1 리스트에 정수(4) 추가 list1.add(new Integer(2)); // list1 리스트에 정수(2) 추가 list1.add(new Integer(0)); // list1 리스트에 정수(0) 추가 list1.add(new Integer(1)); // list1 리스트에 정수(1) 추가 list1.add(new Integer(3)); // list1 리스트에 정수(3) 추가 ArrayList list2 = new ArrayList(list1.subList(0, 3)); // list2에 새로운 ArrayList 타입의 객체 (list의 0번째에서 3번째까지) 넣는다. print(list1, list2); //출력 Collections.sort(list1); //정렬 Collections.sort(list2); //정렬 print(list1, list2); System.out.println("list1.containsAll(list2):" + list1.containsAll(list2)); System.out.println("--------------------------------------------------------"); list2.add("B"); //B 추가 list2.add("C"); //C 추가 list2.add(3,"AAAAA"); //index[3] 안에 A추가 print(list1, list2); System.out.println("--------------------------------------------------------"); list2.set(3, "AAAAAAAAA"); //index[3] 안에 A추가 print(list1, list2); System.out.println("--------------------------------------------------------"); System.out.println("list1.retainAll(list2) == " + list1.retainAll(list2)); //list1.과 . } private static void print(ArrayList list1, ArrayList list2) { System.out.println("list1 : " + list1); System.out.println("list2 : " + list2); System.out.println(); } }
[ "stpn94@gmail.com" ]
stpn94@gmail.com
396895733ba0de8cee5f936f1fad4357fb4d83cc
a0a1abc1b4114b320cb55d6085d364e34b192412
/code/cfg/cmd/condition/VipLimits2.java
8d35a941845b4d7f06bf698ffd8c96b643a5a845
[]
no_license
NoNameIt/cfggen
9011f89d246d56ffe20494cdcd2ed3aa2d1d8cb3
4a4d636e9a46f57b80a8e35cd97d93aaed19ff8e
refs/heads/master
2021-01-21T19:20:39.291158
2016-03-26T05:59:49
2016-03-26T05:59:49
55,063,092
29
0
null
2016-03-30T12:57:33
2016-03-30T12:57:33
null
UTF-8
Java
false
false
626
java
package cfg.cmd.condition; public final class VipLimits2 extends cfg.cmd.condition.Condition { public final static int TYPEID = 648048014; final public int getTypeId() { return TYPEID; } public final java.util.List<Integer> entertimes = new java.util.ArrayList<>(); public final java.util.List<cfg.cmd.condition.Condition> costs = new java.util.ArrayList<>(); public VipLimits2(cfg.DataStream fs) { super(fs); for(int n = fs.getInt(); n-- > 0 ; ) { this.entertimes.add(fs.getInt()); } for(int n = fs.getInt(); n-- > 0 ; ) { this.costs.add((cfg.cmd.condition.Condition)fs.getObject(fs.getString())); } } }
[ "taojingjian@gmail.com" ]
taojingjian@gmail.com
3d3db4ff59cf88f72242fbfcb1cb982e011cd89e
0a532b9d7ebc356ab684a094b3cf840b6b6a17cd
/java-source/src/main/javax/naming/RefAddr.java
3f58f211e17fc843227105debe95f4dd4cf32d63
[ "Apache-2.0" ]
permissive
XWxiaowei/JavaCode
ac70d87cdb0dfc6b7468acf46c84565f9d198e74
a7e7cd7a49c36db3ee479216728dd500eab9ebb2
refs/heads/master
2022-12-24T10:21:28.144227
2020-08-22T08:01:43
2020-08-22T08:01:43
98,070,624
10
4
Apache-2.0
2022-12-16T04:23:38
2017-07-23T02:51:51
Java
UTF-8
Java
false
false
4,231
java
/* * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.naming; /** * This class represents the address of a communications end-point. * It consists of a type that describes the communication mechanism * and an address contents determined by an RefAddr subclass. *<p> * For example, an address type could be "BSD Printer Address", * which specifies that it is an address to be used with the BSD printing * protocol. Its contents could be the machine name identifying the * location of the printer server that understands this protocol. *<p> * A RefAddr is contained within a Reference. *<p> * RefAddr is an abstract class. Concrete implementations of it * determine its synchronization properties. * * @author Rosanna Lee * @author Scott Seligman * * @see Reference * @see LinkRef * @see StringRefAddr * @see BinaryRefAddr * @since 1.3 */ /*<p> * The serialized form of a RefAddr object consists of only its type name * String. */ public abstract class RefAddr implements java.io.Serializable { /** * Contains the type of this address. * @serial */ protected String addrType; /** * Constructs a new instance of RefAddr using its address type. * * @param addrType A non-null string describing the type of the address. */ protected RefAddr(String addrType) { this.addrType = addrType; } /** * Retrieves the address type of this address. * * @return The non-null address type of this address. */ public String getType() { return addrType; } /** * Retrieves the contents of this address. * * @return The possibly null address contents. */ public abstract Object getContent(); /** * Determines whether obj is equal to this RefAddr. *<p> * obj is equal to this RefAddr all of these conditions are true *<ul> *<li> non-null *<li> instance of RefAddr *<li> obj has the same address type as this RefAddr (using String.compareTo()) *<li> both obj and this RefAddr's contents are null or they are equal * (using the equals() test). *</ul> * @param obj possibly null obj to check. * @return true if obj is equal to this refaddr; false otherwise. * @see #getContent * @see #getType */ public boolean equals(Object obj) { if ((obj != null) && (obj instanceof RefAddr)) { RefAddr target = (RefAddr)obj; if (addrType.compareTo(target.addrType) == 0) { Object thisobj = this.getContent(); Object thatobj = target.getContent(); if (thisobj == thatobj) return true; if (thisobj != null) return thisobj.equals(thatobj); } } return false; } /** * Computes the hash code of this address using its address type and contents. * The hash code is the sum of the hash code of the address type and * the hash code of the address contents. * * @return The hash code of this address as an int. * @see java.lang.Object#hashCode */ public int hashCode() { return (getContent() == null) ? addrType.hashCode() : addrType.hashCode() + getContent().hashCode(); } /** * Generates the string representation of this address. * The string consists of the address's type and contents with labels. * This representation is intended for display only and not to be parsed. * @return The non-null string representation of this address. */ public String toString(){ StringBuffer str = new StringBuffer("Type: " + addrType + "\n"); str.append("Content: " + getContent() + "\n"); return (str.toString()); } /** * Use serialVersionUID from JNDI 1.1.1 for interoperability */ private static final long serialVersionUID = -1468165120479154358L; }
[ "2809641033@qq.com" ]
2809641033@qq.com
84c9e1a0894f612509e618621ff61f8754cd4feb
277bf3a0d3587808141942d0f0d42882e7b3cd8f
/ProjectSourceCode /Apache Commons Math v3.5/src/test/java/org/apache/commons/math3/primes/PrimesTest.java
8fc6f32b42f2ba6b1811ad0585652e9adfb81040
[ "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-public-domain", "Unlicense" ]
permissive
yashgolwala/Software_Measurement_Team_M
d1b13389651dacbc8f735dc87a7d0992829c8909
3d2aef4c0711b7a02155a42ca6b08bb6c2693d4c
refs/heads/master
2020-06-11T11:19:32.815146
2019-06-26T03:45:15
2019-06-26T03:45:15
193,592,231
0
0
Unlicense
2019-06-25T16:17:29
2019-06-24T22:57:31
HTML
UTF-8
Java
false
false
129
java
version https://git-lfs.github.com/spec/v1 oid sha256:7cef1ca524ad6bae0e9d69ab7cb63366a89cf5eeff904f81938924aab2dc6df0 size 6842
[ "golwalayash@gmail.com" ]
golwalayash@gmail.com
c05fda263f898f26fae569f7ada1a86208bfb652
114fb922fda1a339a452c3e1a4ba031e81aabd7e
/src/main/java/no/ica/tollpost/service/impl/TgReconcilVManagerImpl.java
120c7046f8a36e67592ce81b7e7407ca07e905e6
[]
no_license
abrekka/fraf
bfb788b0db784925c998dcc844957657efa79fae
f8995ff2b0fece657017224a112f79cf3eb11e7d
refs/heads/master
2021-01-22T14:45:09.740555
2015-07-31T09:07:00
2015-07-31T09:07:00
39,994,857
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
package no.ica.tollpost.service.impl; import java.util.List; import no.ica.fraf.common.ReconcilVInterface; import no.ica.tollpost.dao.TgReconcilVDAO; import no.ica.tollpost.service.TgReconcilVManager; public class TgReconcilVManagerImpl implements TgReconcilVManager { private TgReconcilVDAO dao; /** * Setter dao-klasse * * @param dao */ public void setTgReconcilVDAO(TgReconcilVDAO dao) { this.dao = dao; } public List<ReconcilVInterface> findByBatchId(Integer batchId) { return dao.findByBatchId(batchId); } }
[ "atle@brekka.no" ]
atle@brekka.no
3bca52e16975e05bb9f02351cf897efceb45d273
6e57bdc0a6cd18f9f546559875256c4570256c45
/packages/apps/Nfc/src/com/android/nfc/beam/BeamReceiveService.java
9d24dd05c8180815ca888f3ebb53ec283c516e42
[]
no_license
dongdong331/test
969d6e945f7f21a5819cd1d5f536d12c552e825c
2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e
refs/heads/master
2023-03-07T06:56:55.210503
2020-12-07T04:15:33
2020-12-07T04:15:33
134,398,935
2
1
null
2022-11-21T07:53:41
2018-05-22T10:26:42
null
UTF-8
Java
false
false
5,369
java
package com.android.nfc.beam; import android.app.Service; import android.bluetooth.BluetoothAdapter; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.util.Log; /** * @hide */ public class BeamReceiveService extends Service implements BeamTransferManager.Callback { private static String TAG = "BeamReceiveService"; private static boolean DBG = true; public static final String EXTRA_BEAM_TRANSFER_RECORD = "com.android.nfc.beam.EXTRA_BEAM_TRANSFER_RECORD"; public static final String EXTRA_BEAM_COMPLETE_CALLBACK = "com.android.nfc.beam.TRANSFER_COMPLETE_CALLBACK"; private BeamStatusReceiver mBeamStatusReceiver; private boolean mBluetoothEnabledByNfc; private int mStartId; private BeamTransferManager mTransferManager; private Messenger mCompleteCallback; private final BluetoothAdapter mBluetoothAdapter; private final BroadcastReceiver mBluetoothStateReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) { int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); if (state == BluetoothAdapter.STATE_OFF) { mBluetoothEnabledByNfc = false; } } } }; public BeamReceiveService() { mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { mStartId = startId; BeamTransferRecord transferRecord; if (intent == null || (transferRecord = intent.getParcelableExtra(EXTRA_BEAM_TRANSFER_RECORD)) == null) { if (DBG) Log.e(TAG, "No transfer record provided. Stopping."); stopSelf(startId); return START_NOT_STICKY; } mCompleteCallback = intent.getParcelableExtra(EXTRA_BEAM_COMPLETE_CALLBACK); if (prepareToReceive(transferRecord)) { if (DBG) Log.i(TAG, "Ready for incoming Beam transfer"); return START_STICKY; } else { invokeCompleteCallback(false); stopSelf(startId); return START_NOT_STICKY; } } // TODO: figure out a way to not duplicate this code @Override public void onCreate() { super.onCreate(); // register BT state receiver IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); registerReceiver(mBluetoothStateReceiver, filter); } @Override public void onDestroy() { super.onDestroy(); if (mBeamStatusReceiver != null) { unregisterReceiver(mBeamStatusReceiver); } unregisterReceiver(mBluetoothStateReceiver); } boolean prepareToReceive(BeamTransferRecord transferRecord) { if (mTransferManager != null) { return false; } if (transferRecord.dataLinkType != BeamTransferRecord.DATA_LINK_TYPE_BLUETOOTH) { // only support BT return false; } if (!mBluetoothAdapter.isEnabled()) { if (!mBluetoothAdapter.enableNoAutoConnect()) { Log.e(TAG, "Error enabling Bluetooth."); return false; } mBluetoothEnabledByNfc = true; if (DBG) Log.d(TAG, "Queueing out transfer " + Integer.toString(transferRecord.id)); } mTransferManager = new BeamTransferManager(this, this, transferRecord, true); // register Beam status receiver mBeamStatusReceiver = new BeamStatusReceiver(this, mTransferManager); registerReceiver(mBeamStatusReceiver, mBeamStatusReceiver.getIntentFilter(), BeamStatusReceiver.BEAM_STATUS_PERMISSION, new Handler()); mTransferManager.start(); mTransferManager.updateNotification(); return true; } private void invokeCompleteCallback(boolean success) { if (mCompleteCallback != null) { try { Message msg = Message.obtain(null, BeamManager.MSG_BEAM_COMPLETE); msg.arg1 = success ? 1 : 0; mCompleteCallback.send(msg); } catch (RemoteException e) { Log.e(TAG, "failed to invoke Beam complete callback", e); } } } @Override public void onTransferComplete(BeamTransferManager transfer, boolean success) { // Play success sound if (!success) { if (DBG) Log.d(TAG, "Transfer failed, final state: " + Integer.toString(transfer.mState)); } if (mBluetoothEnabledByNfc) { mBluetoothEnabledByNfc = false; mBluetoothAdapter.disable(); } invokeCompleteCallback(success); stopSelf(mStartId); } @Override public IBinder onBind(Intent intent) { return null; } }
[ "dongdong331@163.com" ]
dongdong331@163.com
4659234b12c5969b153799e046f3490d43025b91
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/22/org/jfree/chart/axis/PeriodAxis_autoAdjustRange_1019.java
df0ae24bdcda07b23fd9fba6e4f58281b8487a9a
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,933
java
org jfree chart axi axi displai date scale base link org jfree data time regular time period regulartimeperiod axi work displai bottom top plot broken displai left chart period axi periodaxi axi valueaxi rescal axi ensur data visibl auto adjust rang autoadjustrang plot plot plot getplot plot plot data plot axi plot valueaxisplot axi plot valueaxisplot vap axi plot valueaxisplot plot rang vap data rang getdatarang default auto rang getdefaultautorang upper math round upper bound getupperbound lower math round lower bound getlowerbound creat instanc createinst auto rang time period class autorangetimeperiodclass date lower time zone timezon creat instanc createinst auto rang time period class autorangetimeperiodclass date upper time zone timezon set rang setrang
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
bb7509687bbda0644cd7a63fb76ec7919db33a86
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes64-dex2jar/com/applovin/impl/sdk/v.java
e00c9ec74906d52d0e0de17f68d4747d00e488f7
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
873
java
// // Decompiled by Procyon v0.5.34 // package com.applovin.impl.sdk; import java.util.HashSet; import com.applovin.sdk.AppLovinAdLoadListener; import com.applovin.sdk.AppLovinAdUpdateListener; import java.util.Collection; import com.applovin.sdk.AppLovinAd; class v { final Object a; AppLovinAd b; long c; boolean d; private final Collection<AppLovinAdUpdateListener> e; private final Collection<AppLovinAdLoadListener> f; private v() { this.a = new Object(); this.e = new HashSet<AppLovinAdUpdateListener>(); this.f = new HashSet<AppLovinAdLoadListener>(); } @Override public String toString() { return "AdLoadState{loadedAd=" + this.b + ", loadedAdExpiration=" + this.c + ", isWaitingForAd=" + this.d + ", updateListeners=" + this.e + ", pendingAdListeners=" + this.f + '}'; } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
ad4e9c3289a24ef212f29a3d0727d5f5f818084b
cadae5810bb583f949ab2579f6454d85529ea142
/HomeMateMobile/src/main/java/com/orvibo/homemate/device/timing/DeviceTimingActionActivity.java
f9b88d6dc007a1c61d2805c204325188e25e1f39
[]
no_license
MyStar219/LifeUp_Android
80c1802d0cd51b1988fbd6780d2b445d89336752
98c215edb56ec0510f46c36c9dd86bb414a0fc9a
refs/heads/master
2021-01-24T07:47:02.091663
2017-06-05T02:44:06
2017-06-05T02:44:06
93,357,878
4
0
null
null
null
null
UTF-8
Java
false
false
2,422
java
package com.orvibo.homemate.device.timing; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.RadioButton; import android.widget.RadioGroup; import com.smartgateway.app.R; /** * Created by Allen on 2015/4/3. */ public class DeviceTimingActionActivity extends Activity implements View.OnClickListener { private static final String TAG = DeviceTimingActionActivity.class .getSimpleName(); private ImageView back_iv; private RadioGroup rgAction; private RadioButton rb_open; private RadioButton rb_close; private String timingAction; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_device_timing_action); findViews(); init(); } private void findViews() { back_iv = (ImageView) findViewById(R.id.back_iv); rgAction = (RadioGroup) findViewById(R.id.rgAction); rb_open = (RadioButton) findViewById(R.id.rb_open); rb_close = (RadioButton) findViewById(R.id.rb_close); } private void init() { Intent intent = getIntent(); //TODO // device = (Device) intent.getSerializableExtra("device"); // deviceId = device.getId(); // uid = device.getUid(); back_iv.setOnClickListener(this); } @Override public void onBackPressed() { timingAction = getTimingAction(); Intent data = new Intent(); data.putExtra("timingAction", timingAction); data.putExtra("timingAction", timingAction); setResult(RESULT_OK, data); super.onBackPressed(); } private String getTimingAction() { String temp = ""; int index = rgAction.getCheckedRadioButtonId(); switch (index) { case R.id.rb_open: temp = getResources().getString(R.string.device_timing_action_open); break; case R.id.rb_close: temp = getResources().getString(R.string.device_timing_action_shutdown); break; } return temp; } @Override public void onClick(View v) { switch (v.getId()) { case R.id.back_iv: onBackPressed(); break; } } }
[ "star1985219@yahoo.com" ]
star1985219@yahoo.com
c8c3d7fb0699dd387788db09b54f78cc0c3cc673
80b292849056cb4bf3f8f76f127b06aa376fdaaa
/java/game/tera/gameserver/network/serverpackets/S_Unmount_Vehicle.java
b36e527cf99c5b72059b3e614192d1024364ac54
[]
no_license
unnamed44/tera_2805
70f099c4b29a8e8e19638d9b80015d0f3560b66d
6c5be9fc79157b44058c816dd8f566b7cf7eea0d
refs/heads/master
2020-04-28T04:06:36.652737
2019-03-11T01:26:47
2019-03-11T01:26:47
174,964,999
2
0
null
2019-03-11T09:15:36
2019-03-11T09:15:35
null
UTF-8
Java
false
false
1,196
java
package tera.gameserver.network.serverpackets; import tera.gameserver.model.playable.Player; import tera.gameserver.network.ServerPacketType; /** * Пакет слезания с маунта. * * @author Ronn */ public class S_Unmount_Vehicle extends ServerPacket { private static final ServerPacket instance = new S_Unmount_Vehicle(); public static final S_Unmount_Vehicle getInstance(Player player, int skillId) { S_Unmount_Vehicle packet = (S_Unmount_Vehicle) instance.newInstance(); packet.objectId = player.getObjectId(); packet.subId = player.getSubId(); packet.skillId = skillId; return packet; } /** уникальный ид игрока */ private int objectId; /** саб ид игрока */ private int subId; /** ид скила, которым он сел */ private int skillId; @Override public ServerPacketType getPacketType() { return ServerPacketType.S_UNMOUNT_VEHICLE; } @Override protected final void writeImpl() { writeOpcode(); writeInt(objectId);//91 0B 00 10 обжект ид наш writeInt(subId);//00 80 00 13 саб ид наш writeInt(skillId);//07 B2 01 00 ид скила } }
[ "171296@supinfo.com" ]
171296@supinfo.com
0b586e3de12639b64b7b3e3ddf4e1d07f53d058d
2d48384070131d2c011bd9a0cfa632d935a7afb1
/hk_mz_bean/src/main/java/com/mz/bean/role/vo/RoleVo.java
f232068bc5e712c20f8f1bd56c2f3952b9bf514b
[]
no_license
LichaoStone/hk_mz
a2bf126558a4b47fadc3f4749bd95c5e71c868b3
26d78dc8352032ce6c9fd503e944056cb2c2d1fd
refs/heads/master
2022-10-28T14:14:54.452328
2020-03-10T07:07:43
2020-03-10T07:07:43
246,231,171
0
0
null
2022-10-12T20:37:31
2020-03-10T07:07:46
JavaScript
UTF-8
Java
false
false
205
java
package com.mz.bean.role.vo; import com.mz.bean.role.Role; /** *角色表 */ public class RoleVo extends Role{ /** * */ private static final long serialVersionUID = 4453744888317244528L; }
[ "lichao@sdtv.cn" ]
lichao@sdtv.cn
b2ec7fef78f6ab16282733d565a5226d34822d0c
4e295ac823f67ec20015d8afb17400ca26a846f7
/Backend/src/main/java/lan/dk/podcastserver/manager/worker/updater/RSSUpdater.java
77dba7fd22b2274103600000d4869f8cfad80564
[ "Apache-2.0" ]
permissive
darrenweb/Podcast-Server
466619964735f871df7f11fc439e9fbb81d506b8
03ab4b137998a6b487eed9b1fbf90281f6adca01
refs/heads/master
2021-06-08T23:18:34.029320
2016-10-26T04:33:35
2016-10-26T04:33:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,639
java
package lan.dk.podcastserver.manager.worker.updater; import com.google.common.collect.Sets; import lan.dk.podcastserver.entity.Cover; import lan.dk.podcastserver.entity.Item; import lan.dk.podcastserver.entity.Podcast; import lan.dk.podcastserver.service.ImageService; import lan.dk.podcastserver.service.JdomService; import lan.dk.podcastserver.service.SignatureService; import lan.dk.podcastserver.service.properties.PodcastServerParameters; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jdom2.Element; import org.jdom2.Namespace; import org.springframework.stereotype.Component; import javax.validation.Validator; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Set; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static java.util.stream.Collectors.toSet; @Slf4j @Component("RSSUpdater") public class RSSUpdater extends AbstractUpdater { private static final Namespace MEDIA = Namespace.getNamespace("media", "http://search.yahoo.com/mrss/"); private static final Namespace FEED_BURNER = Namespace.getNamespace("feedburner", "http://rssnamespace.org/feedburner/ext/1.0"); private final JdomService jdomService; private final ImageService imageService; public RSSUpdater(PodcastServerParameters podcastServerParameters, SignatureService signatureService, Validator validator, JdomService jdomService, ImageService imageService) { super(podcastServerParameters, signatureService, validator); this.jdomService = jdomService; this.imageService = imageService; } public Set<Item> getItems(Podcast podcast) { log.debug("Traitement des Items"); return jdomService .parse(podcast.getUrl()) .map(p -> p.getRootElement().getChild("channel").getChildren("item")) .map(this::elementsToItems) .getOrElse(Sets.newHashSet()); } private Set<Item> elementsToItems(List<Element> elements) { return elements .stream() .filter(this::hasEnclosure) .map(this::extractItem) .collect(toSet()); } private Boolean hasEnclosure(Element item) { return item.getChild("enclosure") != null || item.getChild("origEnclosureLink", FEED_BURNER) != null; } private Item extractItem(Element item) { // Gestion des cas pour l'url : return Item.builder() .title(item.getChildText("title")) .pubDate(getPubDate(item)) .description(item.getChildText("description")) .mimeType(item.getChild("enclosure").getAttributeValue("type")) .length(lengthOf(item)) .cover(coverOf(item)) .url(urlOf(item)) .build(); } private long lengthOf(Element item) { return (StringUtils.isNotEmpty(item.getChild("enclosure").getAttributeValue("length"))) ? Long.parseLong(item.getChild("enclosure").getAttributeValue("length")) : 0L; } private String urlOf(Element element) { if (nonNull(element.getChild("origEnclosureLink", FEED_BURNER))) { return element.getChildText("origEnclosureLink", FEED_BURNER); } return element.getChild("enclosure").getAttributeValue("url"); } private Cover coverOf(Element element) { Element thumbnail = element.getChild("thumbnail", MEDIA); if (isNull(thumbnail)) { return null; } if (nonNull(thumbnail.getAttributeValue("url"))) { return imageService.getCoverFromURL(thumbnail.getAttributeValue("url")); } return imageService.getCoverFromURL(thumbnail.getText()); } private ZonedDateTime getPubDate(Element item) { try { return ZonedDateTime.parse(item.getChildText("pubDate").replace(" PST", " +0800"), DateTimeFormatter.RFC_1123_DATE_TIME); } catch (Exception e) { log.error("Problem during date parsing", e); // No better idea than returning null for unparseable date return null; } } @Override public String signatureOf(Podcast podcast) { return signatureService.generateSignatureFromURL(podcast.getUrl()); } @Override public Type type() { return new Type("RSS", "RSS"); } @Override public Integer compatibility(String url) { return Integer.MAX_VALUE-1; } }
[ "davin.kevin@gmail.com" ]
davin.kevin@gmail.com
a464e0a3762a03b32425937f4e2707d6f54aeb65
83e1289292d08a767556bd03e271b870241c0512
/test/oracle/test_tutorial/Example01.java
c94bec1c8dbeee4652d79231a4d0a5eacd8a8911
[]
no_license
s3ymd/oracle_jdbc
ff7e13e593e33701e7b977f7983854cd680b2723
bdd96a7441c8797444008a8bcc20b4935a023f5d
refs/heads/master
2021-01-10T20:57:21.548734
2015-07-31T07:05:27
2015-07-31T07:05:27
39,991,670
0
0
null
null
null
null
UTF-8
Java
false
false
805
java
package oracle.test_tutorial; import org.junit.After; import org.junit.Before; import org.junit.Test; import oracle.DatabaseExample; public class Example01 extends DatabaseExample { // 「@Before」アノテーションが付いたメソッドは、 // 「@Test」アノテーションが付いたメソッドに先立って実行されます。 @Before public void setUp() { System.out.println("setUp()が実行されました"); } @Test public void test1() { System.out.println("test1()が実行されました"); } // 「@Before」アノテーションが付いたメソッドは、 // 「@Test」アノテーションが付いたメソッドにつづいて実行されます。 @After public void tearDown() { System.out.println("tearDown()が実行されました"); } }
[ "test" ]
test