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
6d1df273747b9d5dadec2d83c1ec33dd116d62df
a4f6f13ddd47ea9b1e0359c8482cf3f5c3b1e8ef
/other/src/main/java/com/kong/design/active/visitor/Visitor.java
ee03f6692d327a54225645be07c2d53187a2b163
[]
no_license
lovedabai/spark-mvn
fc1832a01272a40caa04d71ab198364eddef634c
29181f56f720f503991871097749b017b476bf70
refs/heads/master
2020-03-21T20:22:32.336492
2016-07-25T02:02:31
2016-07-25T02:02:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.kong.design.active.visitor; /** * ่ฎฟ้—ฎ่€…ๆจกๅผๅฐฑๆ˜ฏไธ€็งๅˆ†็ฆปๅฏน่ฑกๆ•ฐๆฎ็ป“ๆž„ไธŽ่กŒไธบ็š„ๆ–นๆณ•๏ผŒ้€š่ฟ‡่ฟ™็งๅˆ†็ฆป๏ผŒๅฏ่พพๅˆฐไธบไธ€ไธช่ขซ่ฎฟ้—ฎ่€…ๅŠจๆ€ๆทปๅŠ ๆ–ฐ็š„ๆ“ไฝœ่€Œๆ— ้œ€ๅšๅ…ถๅฎƒ็š„ไฟฎๆ”น็š„ๆ•ˆๆžœใ€‚ * Created by kong on 2016/4/26. */ public interface Visitor { void visit(Subject sub); }
[ "konvish@163.com" ]
konvish@163.com
5ed1652f39c1fffd96ea1c4d16ac1a24e245060b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_8fea4580e886c2d7382d71d8f84896c78dab467c/KPrototypes_DistanceFunction/3_8fea4580e886c2d7382d71d8f84896c78dab467c_KPrototypes_DistanceFunction_s.java
c77fd69a9eaa85d749739623bd2646bbf033f70b
[]
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,061
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package weka.core; import java.util.Vector; /** * * @author Todor Tsonkov */ public class KPrototypes_DistanceFunction extends NormalizableDistance implements Cloneable { private double m_Gamma; /** for serialization. */ private static final long serialVersionUID = 1068606253458807903L; public KPrototypes_DistanceFunction( double gamma){ m_Gamma = gamma; } public KPrototypes_DistanceFunction() { super(); m_Gamma = 0.5; } public KPrototypes_DistanceFunction(Instances data, double gamma) { super(data); m_Gamma = gamma; } /** * Returns a string describing this object. * * @return a description of the evaluator suitable for * displaying in the explorer/experimenter gui */ public String globalInfo() { return "Implementing KPrototypes distance (or similarity) function.\n\n" + "One object defines not one distance but the data model in which " + "the distances between objects of that data model can be computed.\n\n" + "Attention: For efficiency reasons the use of consistency checks " + "(like are the data models of the two instances exactly the same), " + "is low.\n\n"; } //MOST IMPORTANT PART! /** * Calculates the distance between two instances. * * @param first the first instance * @param second the second instance * @return the distance between the two given instances */ @Override public double distance(Instance first, Instance second) { double sum_nominal = 0.0; double sum_continuous = 0.0; for(int i = 0; i < first.numAttributes(); i++){ if(first.attribute(i).isNominal()){ if(!first.attribute(i).equals(second.attribute(i)) ) sum_nominal+=1.0; }else if (first.attribute(i).isNumeric()){ sum_continuous += (first.attribute(i).weight() - second.attribute(i).weight())* (first.attribute(i).weight() - second.attribute(i).weight()); } } return sum_continuous + m_Gamma * sum_nominal; } /** * Returns the tip text for this property * @return tip text for this property suitable for * displaying in the explorer/experimenter gui */ public String gamma() { return "gamma parameter"; } /** * fet the gamma parameter * * @return the gamma parameter */ public double getGamma() { return m_Gamma; } /** * set the gamma parameter * * @param g the gamma parameter */ public void setGamma(double g) { m_Gamma = g; } /** * Gets the current settings of BisectingKMeans * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> result; String[] options; result = new Vector<String>(); result.add("-G"); result.add("" + getGamma()); options = super.getOptions(); for (int i = 0; i < options.length; i++) result.add(options[i]); //result. return result.toArray(new String[result.size()]); } /** * Parses a given list of options. * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String optionString; optionString = Utils.getOption("G", options); setGamma(Double.parseDouble(optionString)); super.setOptions(options); } //TODO: IMPLEMENT? protected double updateDistance(double currDist, double diff) { double result; result = currDist; result += diff * diff; return result; } public String getRevision() { return RevisionUtils.extract("$Revision: 1.13 $"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
55b359a33e6c21dcdec013fcfe7ca1fe64e0b49c
bd1151a43fdda6b5a48867cf621e0ac264d4ea7a
/Youtube/youtubechannel+NavigationDrawer+SelectedItemMarker/app/src/main/java/bhh/youtube/channel/YouTubeFailureRecoveryActivity.java
f26879077c4030f3505eb3da5ae3b34f49a3d733
[]
no_license
Nazmul56/Projects2017
1fcc953619d8ec7aa009f8b9181457a06215c266
8e35fa15019ad3c23bf7b8de9f1fda0dec8cbdb6
refs/heads/master
2021-05-08T00:31:14.126716
2017-10-21T04:59:07
2017-10-21T04:59:07
107,750,975
1
0
null
null
null
null
UTF-8
Java
false
false
2,294
java
package bhh.youtube.channel; import android.content.Intent; import android.widget.Toast; import com.google.android.youtube.player.YouTubeBaseActivity; import com.google.android.youtube.player.YouTubeInitializationResult; import com.google.android.youtube.player.YouTubePlayer; import com.google.firebase.remoteconfig.FirebaseRemoteConfig; import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings; /** * An abstract activity which deals with recovering from errors which may occur during API * initialization, but can be corrected through user action. */ public abstract class YouTubeFailureRecoveryActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener { /**Firebase Variables*/ protected FirebaseRemoteConfig mFirebaseRemoteConfig; private static final String YOUTUBE_API_KEY = "youtube_api_key"; private static final String ANDROID_YOUTUBE_API_KEY = "android_youtube_api_key"; private static final int RECOVERY_DIALOG_REQUEST = 1; @Override public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult errorReason) { if (errorReason.isUserRecoverableError()) { errorReason.getErrorDialog(this, RECOVERY_DIALOG_REQUEST).show(); } else { String errorMessage = String.format(getString(R.string.error_player), errorReason.toString()); Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show(); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == RECOVERY_DIALOG_REQUEST) { // Retry initialization if user performed a recovery action /**Remote Config Initialization*/ mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance(); FirebaseRemoteConfigSettings remoteConfigSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(true) .build(); mFirebaseRemoteConfig.setConfigSettings(remoteConfigSettings); mFirebaseRemoteConfig.setDefaults(R.xml.remote_config_defaults); getYouTubePlayerProvider().initialize(mFirebaseRemoteConfig.getString(ANDROID_YOUTUBE_API_KEY), this); // USE Remote Config API Key } } protected abstract YouTubePlayer.Provider getYouTubePlayerProvider(); }
[ "nazmul.cste07@gmail.com" ]
nazmul.cste07@gmail.com
dc19834ede589d11056a6483862630007dd009bd
9f62d3a5a5923ba1809dc2d621f1a627c4034c73
/JavaPractice/src/com/smakslow/juc/chart11/ConcurrentHash.java
2198a74a63402a366035ef63d604300b7e4febe5
[]
no_license
smakslow/java-learn
aa5587eaba0acd522850afc9cbc32597ad3be456
7d37c59568b047d384245fd28abf7bc3e0013093
refs/heads/master
2023-08-30T04:14:13.962547
2021-10-11T16:29:17
2021-10-11T16:29:17
356,228,254
0
0
null
null
null
null
UTF-8
Java
false
false
242
java
package com.smakslow.juc.chart11; import java.util.concurrent.ConcurrentHashMap; public class ConcurrentHash { public static void main(String[] args) { ConcurrentHashMap<String, Integer> map = new ConcurrentHashMap<>(); } }
[ "514841961@qq.com" ]
514841961@qq.com
0e52cc1cceabba5e438c786ea1685f1cff66a517
37bf9373dfbeef2446c13f18be98d8ead4699c9b
/src/pdf/eltag/DateUtil.java
2411db1475b09b051637c29a72c0955d3aeadffe
[]
no_license
moving33/studyJSP
6838df3b779d4a73c1441ed909e472cd6b97bcd7
969d0edd28ade63d8d4e7b7664efb3926b2411f4
refs/heads/master
2021-04-03T08:24:26.360623
2018-04-04T04:16:48
2018-04-04T04:16:48
124,928,123
2
1
null
null
null
null
UTF-8
Java
false
false
267
java
package pdf.eltag; import java.text.SimpleDateFormat; import java.util.Date; public class DateUtil { private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); public static String getDate(Date date){ return sdf.format(date); } }
[ "moving5254@gmail.com" ]
moving5254@gmail.com
0e6abe5f7fe04015c3860f2206fe26020913a185
4232c0db35a8516915c5ad9cdf5ca0a81db114d3
/src/main/java/com/codecool/webroute/Summer.java
fd098b5424520f6b2cb6c30dfbfaa5aa05ab0bf9
[]
no_license
bartoszmaleta/webrouteProjectServletAndAnnotations
ed020471cf780c8976137cf127bd07a38fa5b0a1
a1a3a86fc688e195c767bc9888bb6e0709bee09e
refs/heads/master
2022-12-01T16:28:20.763517
2020-08-19T19:03:18
2020-08-19T19:03:18
288,814,567
0
0
null
null
null
null
UTF-8
Java
false
false
707
java
package com.codecool.webroute; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; public class Summer { final Map<String, Method> handlerMethods; public Summer() { handlerMethods = new HashMap<>(); } /** * Accepts any number of handlers and extracts all methods annotated with {@link WebRoute}. * @param handlerClasses classes with methods annotated with {@link WebRoute}. */ public void registerHandlers(Class<?>... handlerClasses) { // TODO } /** * Starts HTTP server, waits for HTTP requests and redirects them to one of registered handler methods. */ public void run() { // TODO } }
[ "bartosz.maleta@gmail.com" ]
bartosz.maleta@gmail.com
d66e4fe3d36de9afa2ad489aabc4316d42ef39e5
de1e9f3384239dd02591ed832a87f9c549f0726a
/springinaction/chapter04/src/main/java/com/springinaction/springidol/MindReader.java
acd40b6ab12bb85b13acd08539b07ca19d932010
[]
no_license
huaxueyihao/spring-in-action
4f4467c084e4145ad0e685e3fe3a48ded13f6356
8d006260693f09f412723bd9363a51a1e14431a9
refs/heads/master
2021-01-22T21:48:50.477623
2017-04-16T08:47:57
2017-04-16T08:47:57
85,476,203
0
0
null
null
null
null
GB18030
Java
false
false
366
java
package com.springinaction.springidol; /** * ่ฏปๅฟƒ่€…็ฑป * @ClassName: MindReader * @Description: ๅฏไปฅ่ฏปๅ–ๅˆซไบบ็š„ๆ€ๆƒณ * @author mao * @date 2017ๅนด3ๆœˆ23ๆ—ฅ ไธ‹ๅˆ5:23:49 * */ public interface MindReader { //ๆ‹ฆๆˆชๅˆซไบบ็š„ๆƒณๆณ•(ๆ„Ÿๅบ”ๅˆซไบบ็š„ๅ†…ๅฟƒๆƒณๆณ•) void interceptThoughts(String thoughts); //่Žทๅพ—ๆƒณๆณ• String getThoughts(); }
[ "837403116@qq.com" ]
837403116@qq.com
e4b4ac46d0e7e99d5510fe078caedc56bd9442b0
fc541919c0bdf1329512c4be4f16f285ca869133
/src/main/java/com/chariot/games/quizzo/web/QuizzoController.java
f3a556c61129f92cfc8318879b59d02a04104fd3
[]
no_license
krimple/quizzo
a430cef561fac8c1887d83cd1cb6e9031c78117c
3d2fbd0290d0c7dd138f1c927ddbe2a20572c4f9
refs/heads/master
2020-12-24T14:56:20.119872
2012-03-21T12:50:33
2012-03-21T12:50:33
3,442,250
1
0
null
null
null
null
UTF-8
Java
false
false
766
java
package com.chariot.games.quizzo.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @RequestMapping("/quizzo/**") @Controller public class QuizzoController { @RequestMapping(method = RequestMethod.POST, value = "{id}") public void post(@PathVariable Long id, ModelMap modelMap, HttpServletRequest request, HttpServletResponse response) { } @RequestMapping public String index() { return "quizzo/index"; } }
[ "krimple@chariotsolutions.com" ]
krimple@chariotsolutions.com
7b0a1962c485ef279c85b37d51cfb7ff531485a2
3617e6fbda9d9db61d20cc6acbdf7c124af4e34f
/src/main/java/com/varaprasadps/no1/a2021/design2/pallu/PalluConversion.java
150afcaf1748af1a9f793e026c0ed3dd873346d5
[]
no_license
SrinivasSilks/DesignMixer
940560d43a20387f0cae59f80e7af52e03920667
2fe5dcbf3bff280c42faa9c721c2daca728076e9
refs/heads/master
2023-07-08T06:19:01.937400
2023-06-30T14:45:34
2023-06-30T14:45:34
126,555,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,540
java
package com.varaprasadps.no1.a2021.design2.pallu; import com.varaprasadps.image.ColumnRepeatGenerator; import com.varaprasadps.image.HorizontalFlipGenerator; import com.varaprasadps.image.LeftLayoutGenerator; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.List; public class PalluConversion { public static void main(final String[] args) throws IOException { JariConversion.main(null); RaniConversion.main(null); String out = "z-data/out/1/a2021/design2/pallu-%s-%s.bmp"; List<String> inputs = new LinkedList<>(); inputs.add("z-data/out/1/a2021/design2/p-rani-1900-2688.bmp"); inputs.add("z-data/out/1/a2021/design2/p-jari-1900-2688.bmp"); List<BufferedImage> inputBIs = new LinkedList<>(); for (String input : inputs) { inputBIs.add(ImageIO.read(new File(input))); } BufferedImage bi = LeftLayoutGenerator.get(HorizontalFlipGenerator.get(ColumnRepeatGenerator.get(inputBIs))); displayPixels(bi); saveBMP(bi, String.format(out, bi.getWidth(), bi.getHeight())); } private static void displayPixels(BufferedImage fileOne) { System.out.println(String.format("Width : %s, Height : %s", fileOne.getWidth(), fileOne.getHeight())); } private static void saveBMP(final BufferedImage bi, final String path) throws IOException { ImageIO.write(bi, "bmp", new File(path)); } }
[ "vara.prasad@xinja.com.au" ]
vara.prasad@xinja.com.au
ff52b6a4f9134cd37421898e3236b6658f76d3d6
37ec146943fadb0ce4e4b47eec692e1fdcd6940d
/ch02-usual/src/main/java/com/zccoder/boot1/ch2/usual/el/ElConfig.java
8bd9538a5f23f2883b423ef03fb703778b3770c2
[]
no_license
GeorgeLe5qq/springboot-learning
bd09efe2574ce2347a60611d83f5c41942bf56d7
2f72442f255273548766700d02b70851ebfebacb
refs/heads/master
2022-04-06T00:54:27.110860
2020-02-26T15:50:38
2020-02-26T15:50:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,605
java
package com.zccoder.boot1.ch2.usual.el; import org.apache.commons.io.IOUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.env.Environment; import org.springframework.core.io.Resource; /** * ้…็ฝฎ็ฑป * // ๆณจๅ…ฅ้…็ฝฎๆ–‡ไปถ * @author zhangcheng * @version V1.0 2017.01.26 */ @Configuration @ComponentScan("com.zccoder.boot1.ch2.usual.el") @PropertySource("classpath:com/zccoder/boot1/ch2/usual/el/test.properties") public class ElConfig { /** * // ๆณจๅ…ฅๆ™ฎ้€šๅญ—็ฌฆไธฒ */ @Value("I Love You!") private String normal; /** * // ๆณจๅ…ฅๆ“ไฝœ็ณป็ปŸๅฑžๆ€ง */ @Value("#{systemProperties['os.name']}") private String osName; /** * // ๆณจๅ…ฅ่กจ่พพๅผ็ป“ๆžœ */ @Value("#{T(java.lang.Math).random() * 100.0 }") private double randomNumber; /** * // ๆณจๅ…ฅๅ…ถไป–Beanๅฑžๆ€ง */ @Value("#{demoService.another}") private String fromAnother; /** * // ๆณจๅ…ฅๆ–‡ไปถ่ต„ๆบ */ @Value("classpath:com/zccoder/boot1/ch2/usual/el/test.txt") private Resource testFile; /** * // ๆณจๅ…ฅ็ฝ‘ๅ€่ต„ๆบ */ @Value("http://www.baidu.com") private Resource testUrl; /** * // ๆณจๅ…ฅ้…็ฝฎๆ–‡ไปถ */ @Value("${book.name}") private String bookName; /** * // ๆณจๅ…ฅ้…็ฝฎๆ–‡ไปถ */ @Autowired private Environment environment; /** * // ๆณจๅ…ฅ้…็ฝฎๆ–‡ไปถ * @return */ @Bean public static PropertySourcesPlaceholderConfigurer propertyConfigure() { return new PropertySourcesPlaceholderConfigurer(); } public void outputResource() { try { System.out.println(normal); System.out.println(osName); System.out.println(randomNumber); System.out.println(fromAnother); System.out.println(IOUtils.toString(testFile.getInputStream(),"UTF-8")); System.out.println(IOUtils.toString(testUrl.getInputStream(),"UTF-8")); System.out.println(bookName); System.out.println(environment.getProperty("book.author")); } catch (Exception e) { e.printStackTrace(); } } }
[ "zccoder@aliyun.com" ]
zccoder@aliyun.com
559b10b6e33eeb1caef662366aee0e15cacfbfba
4acffed84f7bfdae6a70e62868ffa6ad11679213
/_/Section09/app/src/main/java/packt/reactivestocks/yahoo/RetrofitYahooServiceFactory.java
5e2e6dd5cd3cd93c3f5f13d7f095de4fcb176e1c
[ "Apache-2.0" ]
permissive
paullewallencom/android-978-1-7886-2642-2
3e1c8beb1c44405c44f80cb4a7521c85605a07f9
c59874cf4cd72693c69bb9ba88ee7aa3c562c9e4
refs/heads/main
2023-02-08T01:49:37.260840
2021-01-01T00:19:29
2021-01-01T00:19:29
319,491,738
0
0
null
null
null
null
UTF-8
Java
false
false
1,173
java
package packt.reactivestocks.yahoo; import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class RetrofitYahooServiceFactory { HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor() .setLevel(HttpLoggingInterceptor.Level.BODY); OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(interceptor) .connectTimeout(20, TimeUnit.SECONDS) .readTimeout(20, TimeUnit.SECONDS) .writeTimeout(20, TimeUnit.SECONDS) .build(); Retrofit retrofit = new Retrofit.Builder() .client(client) .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .baseUrl("https://query.yahooapis.com/v1/public/") .build(); public YahooService create() { return retrofit.create(YahooService.class); } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
0bf3aad8a44fdba4c166eb3e9be3f8a376814384
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/p213co/znly/core/C6460g9.java
3ee99d451e041a7bc194feca2aa1258b5982f704
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
431
java
package p213co.znly.core; import p213co.znly.models.core.C7060b1; /* renamed from: co.znly.core.g9 */ /* compiled from: lambda */ public final /* synthetic */ class C6460g9 implements BuilderCreator { /* renamed from: a */ public static final /* synthetic */ C6460g9 f16039a = new C6460g9(); private /* synthetic */ C6460g9() { } public final Object create() { return C7060b1.newBuilder(); } }
[ "developer@appzoc.com" ]
developer@appzoc.com
1722ea9816a805957699e35e0e65b30200894d51
3af6963d156fc1bf7409771d9b7ed30b5a207dc1
/runtime/src/main/java/apple/uikit/UITextBorderStyle.java
81f77dee8267368de0d24328a8e38cea21215628
[ "Apache-2.0" ]
permissive
yava555/j2objc
1761d7ffb861b5469cf7049b51f7b73c6d3652e4
dba753944b8306b9a5b54728a40ca30bd17bdf63
refs/heads/master
2020-12-30T23:23:50.723961
2015-09-03T06:57:20
2015-09-03T06:57:20
48,475,187
0
0
null
2015-12-23T07:08:22
2015-12-23T07:08:22
null
UTF-8
Java
false
false
957
java
package apple.uikit; import java.io.*; import java.nio.*; import java.util.*; import com.google.j2objc.annotations.*; import com.google.j2objc.runtime.*; import com.google.j2objc.runtime.block.*; import apple.audiotoolbox.*; import apple.corefoundation.*; import apple.coregraphics.*; import apple.coreservices.*; import apple.foundation.*; import apple.coreanimation.*; import apple.coredata.*; import apple.coreimage.*; import apple.coretext.*; import apple.corelocation.*; @Library("UIKit/UIKit.h") @Mapping("UITextBorderStyle") public final class UITextBorderStyle extends ObjCEnum { @GlobalConstant("UITextBorderStyleNone") public static final long None = 0L; @GlobalConstant("UITextBorderStyleLine") public static final long Line = 1L; @GlobalConstant("UITextBorderStyleBezel") public static final long Bezel = 2L; @GlobalConstant("UITextBorderStyleRoundedRect") public static final long RoundedRect = 3L; }
[ "pchen@sellegit.com" ]
pchen@sellegit.com
48737b5f4f0a1aef4d91d42c368db5218f45e4ed
0d7e7635dbd730d91544605f88d8fc54d2cd1d58
/syml/production_project/underwritingProd/src/main/java/com/syml/morweb/CustomerAddressSecondaryResidence.java
a15fb29451b689e3be83102ae6dff0c4e337a46e
[]
no_license
Manoj-leela/manoj1
8febf318c3b592975d416716dc827dcd8873012f
804b91a20a1280bab6ca185bc348be5e3da24de4
refs/heads/master
2021-01-20T20:09:14.386232
2016-07-29T06:53:49
2016-07-29T06:53:49
64,456,932
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.03.23 at 03:36:43 PM MDT // package com.syml.morweb; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}typeCustomerAddress"> * &lt;sequence> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}CustomerReference" maxOccurs="unbounded"/> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}CustomerLiabilityRealEstate" maxOccurs="99999" minOccurs="0"/> * &lt;choice> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}AddressOccupancyOwnerOccupied"/> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}AddressOccupancyPartialOwnerOccupied"/> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}AddressOccupancyRental"/> * &lt;element ref="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}AddressOccupancyTenant"/> * &lt;/choice> * &lt;/sequence> * &lt;attribute name="fromDate" use="required" type="{http://MSC.IntegrationService.Schemas.MorWEB.BDI.Request.1}typeDate" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public class CustomerAddressSecondaryResidence extends TypeCustomerAddress { }
[ "abhishek.kumar@bizruntime.com" ]
abhishek.kumar@bizruntime.com
968b559d28ef54b3184a4be2ac2c1d120f2af4c7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_f71da0bd13631cf1edb30262fe159e35179fb51f/CDControllerCell/12_f71da0bd13631cf1edb30262fe159e35179fb51f_CDControllerCell_s.java
553bc750e5eb72c03a0e4cb9f2e05e4a6e19732d
[]
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
1,326
java
package ch.cyberduck.ui.cocoa; /* * Copyright (c) 2005 David Kocher. All rights reserved. * http://cyberduck.ch/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Bug fixes, suggestions and comments should be sent to: * dkocher@cyberduck.ch */ import ch.cyberduck.ui.cocoa.application.NSCell; import org.rococoa.Rococoa; /** * @version $Id$ */ public abstract class CDControllerCell implements NSCell { private static final _Class CLASS = org.rococoa.Rococoa.createClass("CDControllerCell", _Class.class); public static CDControllerCell controllerCell() { return Rococoa.cast(CLASS.alloc().init().autorelease(), CDControllerCell.class); } public interface _Class extends org.rococoa.NSClass { CDControllerCell alloc(); } public abstract CDControllerCell init(); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3efdb9a360e878cf9cf8338f726cbad95f176070
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-5-9-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/rendering/internal/renderer/xhtml/image/AbstractXHTMLImageTypeRenderer_ESTest_scaffolding.java
0fa9abeef4a4f2ed3e4f70726e6307675c845789
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Apr 06 01:15:14 UTC 2020 */ package org.xwiki.rendering.internal.renderer.xhtml.image; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractXHTMLImageTypeRenderer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
279c5d3784a42d608401e42723d512e028d8713f
e4f288d49be110967b27816704ae188aecd4aab4
/subprojects/jtrim-task-graph/src/test/java/org/jtrim2/taskgraph/TaskNodeKeyTest.java
f37b16dee72a81ae12166f5420bb6f9859418320
[ "Apache-2.0" ]
permissive
kelemen/JTrim
6a37b4d3859120ae72941835d82c98b5d058561a
6fb2fc59e8cde6e645c16a38feddcc1777c42d1f
refs/heads/master
2023-08-22T10:17:23.313463
2023-08-13T01:42:26
2023-08-13T01:42:26
4,034,471
8
1
null
null
null
null
UTF-8
Java
false
false
7,198
java
package org.jtrim2.taskgraph; import org.jtrim2.testutils.TestObj; import org.junit.Test; import static org.junit.Assert.*; public class TaskNodeKeyTest { private static TaskFactoryKey<Object, Object> factoryKey(String key) { return new TaskFactoryKey<>(Object.class, Object.class, key); } @Test public void testNullCustomKey() { TaskFactoryKey<Object, Object> factoryKey = factoryKey("F"); TaskNodeKey<Object, Object> key = new TaskNodeKey<>(factoryKey, null); assertSame(factoryKey, key.getFactoryKey()); assertNull(key.getFactoryArg()); String str = key.toString(); assertNotNull(str); assertTrue(str.contains(factoryKey.toString())); } @Test public void testNonNullCustomKey() { CustomArg customArg = new CustomArg("My-Test-Arg-1"); TaskFactoryKey<Object, Object> factoryKey = factoryKey("F"); TaskNodeKey<Object, Object> key = new TaskNodeKey<>(factoryKey, customArg); assertSame(factoryKey, key.getFactoryKey()); assertSame(customArg, key.getFactoryArg()); String str = key.toString(); assertNotNull(str); assertTrue(str.contains(factoryKey.toString())); assertTrue(str.contains(customArg.toString())); } @Test public void testEquals() { CustomArg customArg1 = new CustomArg("My-Test-Arg-1"); TaskFactoryKey<Object, Object> factoryKey = factoryKey("F"); TaskNodeKey<Object, Object> key1 = new TaskNodeKey<>(factoryKey, customArg1); CustomArg customArg2 = new CustomArg("My-Test-Arg-1"); TaskNodeKey<Object, Object> key2 = new TaskNodeKey<>(factoryKey, customArg2); assertTrue(key1.equals(key2)); assertTrue(key2.equals(key1)); assertEquals("hash", key1.hashCode(), key2.hashCode()); } private static Object nullObject() { return null; } @Test public void testCompareWithNull() { CustomArg customArg = new CustomArg("My-Test-Arg-1"); TaskNodeKey<Object, Object> key = new TaskNodeKey<>(factoryKey("F"), customArg); assertFalse(key.equals(nullObject())); } @Test public void testCompareWithWrongType() { CustomArg customArg = new CustomArg("My-Test-Arg-1"); TaskNodeKey<Object, Object> key = new TaskNodeKey<>(factoryKey("F"), customArg); Object otherObj = "My-Test-Arg-1"; assertFalse(key.equals(otherObj)); } @Test public void testCompareSame() { CustomArg customArg = new CustomArg("My-Test-Arg-1"); TaskNodeKey<Object, Object> key = new TaskNodeKey<>(factoryKey("F"), customArg); assertTrue(key.equals(key)); } @Test public void testCompareDifferentCustomKey() { CustomArg customArg1 = new CustomArg("My-Test-Arg-1"); TaskFactoryKey<Object, Object> factoryKey = factoryKey("F"); TaskNodeKey<Object, Object> key1 = new TaskNodeKey<>(factoryKey, customArg1); CustomArg customArg2 = new CustomArg("My-Test-Arg-2"); TaskNodeKey<Object, Object> key2 = new TaskNodeKey<>(factoryKey, customArg2); assertFalse(key1.equals(key2)); assertFalse(key2.equals(key1)); } @Test public void testCompareDifferentFactoryKey() { CustomArg customArg = new CustomArg("My-Test-Arg-1"); TaskFactoryKey<Object, Object> factoryKey1 = factoryKey("F1"); TaskNodeKey<Object, Object> key1 = new TaskNodeKey<>(factoryKey1, customArg); TaskFactoryKey<Object, Object> factoryKey2 = factoryKey("F2"); TaskNodeKey<Object, Object> key2 = new TaskNodeKey<>(factoryKey2, customArg); assertFalse(key1.equals(key2)); assertFalse(key2.equals(key1)); } @Test public void testWithFactoryCustomKey() { Object oldCustomKey = "OldCustomKey-testWithFactoryCustomKey"; Object newCustomKey = "NewCustomKey-testWithFactoryCustomKey"; CustomArg factoryArg = new CustomArg("Test-Arg"); TaskNodeKey<TestOutput, CustomArg> src = new TaskNodeKey<>( new TaskFactoryKey<>(TestOutput.class, CustomArg.class, oldCustomKey), factoryArg); TaskNodeKey<TestOutput, CustomArg> expected = new TaskNodeKey<>( new TaskFactoryKey<>(TestOutput.class, CustomArg.class, newCustomKey), factoryArg); TaskNodeKey<TestOutput, CustomArg> newNodeKey = src.withFactoryCustomKey(newCustomKey); assertEquals(expected, newNodeKey); } @Test public void testWithFactoryKey() { Object oldCustomKey = "OldCustomKey-testWithFactoryKey"; Object newCustomKey = "NewCustomKey-testWithFactoryKey"; CustomArg factoryArg = new CustomArg("Test-Arg"); TaskNodeKey<TestOutput, CustomArg> src = new TaskNodeKey<>( new TaskFactoryKey<>(TestOutput.class, CustomArg.class, oldCustomKey), factoryArg); TaskFactoryKey<TestOutput2, CustomArg> newFactoryKey = new TaskFactoryKey<>(TestOutput2.class, CustomArg.class, newCustomKey); TaskNodeKey<TestOutput2, CustomArg> expected = new TaskNodeKey<>(newFactoryKey, factoryArg); TaskNodeKey<TestOutput2, CustomArg> newNodeKey = src.withFactoryKey(newFactoryKey); assertEquals(expected, newNodeKey); } @Test public void testWithFactoryArg() { Object customKey = "CustomKey-testWithFactoryArg"; CustomArg factoryArg = new CustomArg("Test-Arg"); CustomArg factoryArg2 = new CustomArg("Test-Arg2"); TaskFactoryKey<TestOutput, CustomArg> factoryKey = new TaskFactoryKey<>(TestOutput.class, CustomArg.class, customKey); TaskNodeKey<TestOutput, CustomArg> src = new TaskNodeKey<>(factoryKey, factoryArg); TaskNodeKey<TestOutput, CustomArg> expected = new TaskNodeKey<>(factoryKey, factoryArg2); TaskNodeKey<TestOutput, CustomArg> newNodeKey = src.withFactoryArg(factoryArg2); assertEquals(expected, newNodeKey); } @Test public void testWithResultType() { Object customKey = "CustomKey-testWithResultType"; CustomArg factoryArg = new CustomArg("Test-Arg"); TaskNodeKey<TestOutput, CustomArg> src = new TaskNodeKey<>( new TaskFactoryKey<>(TestOutput.class, CustomArg.class, customKey), factoryArg); TaskNodeKey<TestOutput2, CustomArg> expected = new TaskNodeKey<>( new TaskFactoryKey<>(TestOutput2.class, CustomArg.class, customKey), factoryArg); TaskNodeKey<TestOutput2, CustomArg> newNodeKey = src.withResultType(TestOutput2.class); assertEquals(expected, newNodeKey); } private static final class TestOutput extends TestObj { public TestOutput(Object strValue) { super(strValue); } } private static final class TestOutput2 extends TestObj { public TestOutput2(Object strValue) { super(strValue); } } private static final class CustomArg extends TestObj { public CustomArg(Object strValue) { super(strValue); } } }
[ "attila.kelemen85@gmail.com" ]
attila.kelemen85@gmail.com
88f3cc2f944ab95600fb64774342588f37007a5e
20645b984308f6644d097fdae820389ab79a3084
/workspace_ehotel/[InterfaceAppeHotelWAIJsoinLalyana]/src/com/elcom/eodapp/media/common/eItemDining.java
746d007093d9f64b4886b118b3e7feceb149d6d2
[]
no_license
elcomthien/source
d314a09c317ea10a2cc057f897c9117263690994
b2cbb7dec061eb3d037d98b9f134ab6dc45216a8
refs/heads/master
2021-09-16T23:37:40.547101
2018-06-26T02:48:06
2018-06-26T02:48:06
109,084,993
0
0
null
null
null
null
UTF-8
Java
false
false
1,888
java
package com.elcom.eodapp.media.common; public class eItemDining { String itemCode; String itemNname; String printName; String itemDef; String menuno; String itemCurrency; String currencySmall; String currencyLagre; String itemUnit; String urlImage; String urlBg; String urlIcon; public String getItemCode() { return itemCode; } public void setItemCode(String itemCode) { this.itemCode = itemCode; } public String getItemNname() { return itemNname; } public void setItemNname(String itemNname) { this.itemNname = itemNname; } public String getPrintName() { return printName; } public void setPrintName(String printName) { this.printName = printName; } public String getItemDef() { return itemDef; } public void setItemDef(String itemDef) { this.itemDef = itemDef; } public String getMenuno() { return menuno; } public void setMenuno(String menuno) { this.menuno = menuno; } public String getItemCurrency() { return itemCurrency; } public void setItemCurrency(String itemCurrency) { this.itemCurrency = itemCurrency; } public String getCurrencySmall() { return currencySmall; } public void setCurrencySmall(String currencySmall) { this.currencySmall = currencySmall; } public String getCurrencyLagre() { return currencyLagre; } public void setCurrencyLagre(String currencyLagre) { this.currencyLagre = currencyLagre; } public String getItemUnit() { return itemUnit; } public void setItemUnit(String itemUnit) { this.itemUnit = itemUnit; } public String getUrlImage() { return urlImage; } public void setUrlImage(String urlImage) { this.urlImage = urlImage; } public String getUrlBg() { return urlBg; } public void setUrlBg(String urlBg) { this.urlBg = urlBg; } public String getUrlIcon() { return urlIcon; } public void setUrlIcon(String urlIcon) { this.urlIcon = urlIcon; } }
[ "32834285+app-core@users.noreply.github.com" ]
32834285+app-core@users.noreply.github.com
804576381fcc5ba9f295fb69efd76144c9382faf
4ec0d18654f11ecefb7b131f1467d3d0f97ea035
/src/com/kola/kmp/logic/util/tips/CurrencyTips.java
734c2e8e421ab7439bebeb62b4a42c9b38020031
[]
no_license
cietwwl/CFLogic
b5394afd4c10fdf41a14389f171f088958089c97
40f1044ea44fd3b6fa50412ffcb7954e3a9d4d3f
refs/heads/master
2021-01-23T16:04:51.113635
2015-05-16T06:24:00
2015-05-16T06:24:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,850
java
package com.kola.kmp.logic.util.tips; /** * <pre> * * @author CamusHuang * @creation 2013-1-9 ไธ‹ๅˆ3:57:48 * </pre> */ public class CurrencyTips { public static String ๅ……ๅ€ผๅˆฐๅธ = "ๅ……ๅ€ผๅˆฐๅธ"; // public static String ๅ……ๅ€ผ็š„ๅธๆˆทไธๅญ˜ๅœจ = "ๅ……ๅ€ผ็š„ๅธๆˆทไธๅญ˜ๅœจ"; public static String ๅ……ๅ€ผๆˆๅŠŸ่Žทๅพ—ไฟกๆฏx่ต ้€ไฟกๆฏx้ฆ–ๅ……ไฟกๆฏxๅฝ“ๅ‰ไฝ™้ขxๆ•ฐ้‡x่ดงๅธ = "ๆญๅ–œ๏ผŒๅ……ๅ€ผๆˆๅŠŸ๏ผŒ{}{}{}ๅฝ“ๅ‰ไฝ™้ข{}{}"; public static String xๆ—ถ้—ดๅ……ๅ€ผๆˆๅŠŸ่Žทๅพ—ไฟกๆฏx่ต ้€ไฟกๆฏx้ฆ–ๅ……ไฟกๆฏxๅฝ“ๅ‰ไฝ™้ขxๆ•ฐ้‡x่ดงๅธ = "ๆญๅ–œ๏ผŒ{}ๅ……ๅ€ผๆˆๅŠŸ๏ผŒ{}{}{}ๅฝ“ๅ‰ไฝ™้ข{}{}"; public static String Tips่Žทๅพ—xๆ•ฐ้‡x่ดงๅธ = "่Žทๅพ—{}{}๏ผŒ"; public static String Tips็ณป็ปŸ่ต ้€xๆ•ฐ้‡x่ดงๅธ = "็ณป็ปŸ่ต ้€{}{}๏ผŒ"; public static String Tips้ฆ–ๅ……่ต ้€xๆ•ฐ้‡x่ดงๅธ = "้ฆ–ๅ……่ต ้€{}{}๏ผŒ"; public static String ้ฆ–ๅ……็คผๅŒ… = "้ฆ–ๅ……็คผๅŒ…"; public static String xๆ—ถ้—ด้ฆ–ๅ……ๆˆๅŠŸ่Žทๅพ—ไปฅไธ‹็คผๅŒ… = "ๆญๅ–œ๏ผŒ{}้ฆ–ๅ……ๆˆๅŠŸ๏ผŒ่Žทๅพ—ไปฅไธ‹็คผๅŒ…"; public static String ้ฆ–ๅ……่ต ้€xๆ•ฐ้‡x่ดงๅธ = "้ฆ–ๅ……่ต ้€{}{}"; public static String ็ณป็ปŸ่ต ้€xๆ•ฐ้‡x่ดงๅธ="็ณป็ปŸ่ต ้€{}{}"; public static String ๆœˆๅกๅฅ–ๅŠฑๅ‘ๆ”พ = "ๆœˆๅกๅฅ–ๅŠฑๅ‘ๆ”พ"; public static String ๆญๅ–œๆ‚จไปŠๅคฉ็™ป้™†่Žทๅพ—xๆ•ฐ้‡x่ดงๅธๆ‚จ็š„ๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบx = "ไบฒ็ˆฑ็š„ไผšๅ‘˜๏ผŒๆญๅ–œๆ‚จไปŠๅคฉ็™ป้™†่Žทๅพ—{}{}๏ผŒๅŠ ๆฒนไฟๆŒ็™ป้™†ๅ“ฆ๏ผŒๆ‚จ็š„ๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบ{}"; public static String ่ดญไนฐๆœˆๅกๆˆๅŠŸ่Žทๅพ—ไฟกๆฏx่ต ้€ไฟกๆฏx้ฆ–ๅ……ไฟกๆฏxๅฝ“ๅ‰ไฝ™้ขxๆ•ฐ้‡x่ดงๅธๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบx = "ๆญๅ–œ๏ผŒ่ดญไนฐๆœˆๅกๆˆๅŠŸ๏ผŒ{}{}{}ๅฝ“ๅ‰ไฝ™้ข{}{}๏ผŒๆ‚จ็š„ๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบ{}"; public static String xๆ—ถ้—ด่ดญไนฐๆœˆๅกๆˆๅŠŸ่Žทๅพ—ไฟกๆฏx่ต ้€ไฟกๆฏx้ฆ–ๅ……ไฟกๆฏxๅฝ“ๅ‰ไฝ™้ขxๆ•ฐ้‡x่ดงๅธๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบx = "ๆญๅ–œ๏ผŒ{}่ดญไนฐๆœˆๅกๆˆๅŠŸ๏ผŒ{}{}{}ๅฝ“ๅ‰ไฝ™้ข{}{}๏ผŒๆ‚จ็š„ๆœˆๅกๅˆฐๆœŸๆ—ถ้—ดไธบ{}"; }
[ "sleepagain123@163.com" ]
sleepagain123@163.com
170788303772132612304948547cf906a4560ffb
ac6d56b6aafc7f66a7a22aca5cc2b809a71e7568
/src/main/java/com/matsg/battlegrounds/item/BattleItemAttribute.java
1654c486987292fd4a3ca5e78359217196979fe1
[]
no_license
thundereye2k/battlegrounds-plugin
3aa4d3e8b30fedeb41a031801b9e2efe9071a498
09d3600caf5949a32fe8296c402f636f652509f4
refs/heads/master
2020-03-31T10:30:07.474255
2018-10-08T17:01:34
2018-10-08T17:01:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
package com.matsg.battlegrounds.item; import com.matsg.battlegrounds.api.item.AttributeModifier; import com.matsg.battlegrounds.api.item.AttributeValue; import com.matsg.battlegrounds.api.item.ItemAttribute; public class BattleItemAttribute<T> implements ItemAttribute<T> { private AttributeValue<T> attributeValue; private String id; public BattleItemAttribute(String id, AttributeValue<T> attributeValue) { this.id = id; this.attributeValue = attributeValue; } public ItemAttribute clone() { try { BattleItemAttribute attribute = (BattleItemAttribute) super.clone(); if (attributeValue != null) { attribute.attributeValue = attributeValue.copy(); } return attribute; } catch (CloneNotSupportedException e) { e.printStackTrace(); } return null; } public String getId() { return id; } public AttributeValue<T> getAttributeValue() { return attributeValue; } public void setAttributeValue(AttributeValue<T> valueObject) { this.attributeValue = attributeValue; } public ItemAttribute applyModifier(AttributeModifier<T> modifier, String... args) { attributeValue = modifier.modify(attributeValue, args); return this; } }
[ "matsgemmeke@gmail.com" ]
matsgemmeke@gmail.com
215eb5fe00fbd641ba9d95e1255f8ac8e1631490
b218169eb27975819fe771b226430ac0759af53c
/src/com/ignite/mm/ticketing/callcenter/MovieDateAndCinemaActivity.java
0e2d99a027fe28702132bb7f79b3b86d05adc7f1
[]
no_license
ignitemyanmar/starticketandroid
23b40ba44040d1ea6bf238f980fc6261a3c666fa
69c8e2ed3172f9d08489bf68cc998ffcafb2d5f9
refs/heads/master
2021-06-12T18:39:09.390898
2017-02-27T10:32:05
2017-02-27T10:32:05
37,309,842
0
0
null
null
null
null
UTF-8
Java
false
false
5,424
java
package com.ignite.mm.ticketing.callcenter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ExpandableListView; import android.widget.ImageButton; import android.widget.ExpandableListView.OnChildClickListener; import android.widget.TextView; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockActivity; import com.ignite.mm.ticketing.callcenter.R; import com.ignite.mm.ticketing.custom.listview.adapter.ExpandableListViewAdapter; import com.ignite.mm.ticketing.sqlite.database.model.MovieCinema; import com.ignite.mm.ticketing.sqlite.database.model.MovieDate; public class MovieDateAndCinemaActivity extends SherlockActivity{ List<MovieDate> movieDate; HashMap<Integer,ArrayList<MovieCinema>> movieCinema; ExpandableListView expListView; private com.actionbarsherlock.app.ActionBar actionBar; private TextView actionBarTitle; private ImageButton actionBarBack; private String MovieID,TicketTypeID,MovieTitle; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.moviedate_expandlist); actionBar = getSupportActionBar(); actionBar.setCustomView(R.layout.action_bar); actionBarTitle = (TextView) actionBar.getCustomView().findViewById( R.id.action_bar_title); actionBarBack = (ImageButton) actionBar.getCustomView().findViewById( R.id.action_bar_back); actionBarBack.setOnClickListener(clickListener); actionBarTitle.setText("MOVIE"); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); Bundle bdle = getIntent().getExtras(); //TicketTypeID= bdle.getString("ticketTypeId"); MovieID = bdle.getString("movieid"); MovieTitle = bdle.getString("movietitle"); getData(); } private OnClickListener clickListener = new OnClickListener() { public void onClick(View v) { if (v == actionBarBack) { finish(); } } }; private void getData(){ movieDate = new ArrayList<MovieDate>(); // Adding parent data movieDate.add(new MovieDate("1","Friday - 30 JAN '14")); movieDate.add(new MovieDate("2","SAT - 1 FEB '14")); movieDate.add(new MovieDate("3","Sunday - 2 FEB '14")); movieDate.add(new MovieDate("4","Thursday - 6 FEB '14")); movieDate.add(new MovieDate("5","Friday - 7 FEB '14")); // Adding child data ArrayList<MovieCinema> friday30 = new ArrayList<MovieCinema>(); friday30.add(new MovieCinema("1","Mingalar Cinema")); friday30.add(new MovieCinema("2","Junction Cineplex")); friday30.add(new MovieCinema("3","Shay Saung Cinema")); ArrayList<MovieCinema> sat1 = new ArrayList<MovieCinema>(); sat1.add(new MovieCinema("1","Junction Mawtin Cineplex")); sat1.add(new MovieCinema("2","Mingalar Cinema")); sat1.add(new MovieCinema("3","Junction Cineplex")); ArrayList<MovieCinema> sunday2 = new ArrayList<MovieCinema>(); sunday2.add(new MovieCinema("1","Mingalar Cinema")); sunday2.add(new MovieCinema("2","Shay Saung Cinema")); ArrayList<MovieCinema> thursday6 = new ArrayList<MovieCinema>(); thursday6.add(new MovieCinema("1","Junction Mawtin Cineplex")); thursday6.add(new MovieCinema("2","Mingalar Cinema")); ArrayList<MovieCinema> friday7 = new ArrayList<MovieCinema>(); friday7.add(new MovieCinema("1","Junction Mawtin Cineplex")); friday7.add(new MovieCinema("2","Mingalar Cinema")); friday7.add(new MovieCinema("3","Junction Cineplex")); friday7.add(new MovieCinema("4","Shay Saung Cinema")); movieCinema = new HashMap<Integer, ArrayList<MovieCinema>>(); movieCinema.put(0, friday30); // Header, Child data movieCinema.put(1, sat1); movieCinema.put(2, sunday2); movieCinema.put(3, thursday6); movieCinema.put(4, friday7); //Log.i("menuList","Movie :" +movieCinema.get(0).get(0).getCinemaName()); expListView = (ExpandableListView) findViewById(R.id.lvExpand); expListView.setAdapter(new ExpandableListViewAdapter(this, movieDate, movieCinema)); expListView.setOnChildClickListener(childClickListener); expListView.setGroupIndicator(null); } private OnChildClickListener childClickListener = new OnChildClickListener() { public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { Intent nextScreen = new Intent(MovieDateAndCinemaActivity.this, MovieTimeActivity.class); Bundle bundle = new Bundle(); //bundle.putString("ticketTypeId", TicketTypeID); bundle.putString("movie_id", MovieID); bundle.putString("movie_title",MovieTitle); bundle.putString("date_id", movieDate.get(groupPosition).getId()); bundle.putString("date", movieDate.get(groupPosition).getDate()); bundle.putString("cinema_id", movieCinema.get(groupPosition).get(childPosition).getId()); bundle.putString("cinemaName", movieCinema.get(groupPosition).get(childPosition).getCinemaName()); nextScreen.putExtras(bundle); startActivity(nextScreen); return false; } }; }
[ "suwaiphyo1985@gmail.com" ]
suwaiphyo1985@gmail.com
1900564a3e026b32345911641c79a288b495e97d
03ee69a353430c2ecd80dbe228dbb083c73afd7f
/thymeleaf/src/test/java/com/hry/spring/ThymeleafApplicationTests.java
04efd596ff1d1373f7e2395eb25adfba9133683a
[]
no_license
caojx-git/spring_boot
595645279b088716b3b462a248c062c33ba92d10
912bba9903d00eacb38084101692d2c54ed97395
refs/heads/master
2020-03-22T19:54:52.298867
2018-07-10T12:12:53
2018-07-10T12:12:53
140,559,971
2
0
null
2018-07-11T10:30:16
2018-07-11T10:30:16
null
UTF-8
Java
false
false
334
java
package com.hry.spring; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ThymeleafApplicationTests { @Test public void contextLoads() { } }
[ "hryou0922@126.com" ]
hryou0922@126.com
4ebf7e3692fbad7fa83140036938bad1d59e71a5
424c440b53da63f8a3af5d3432e5e7896e9834ab
/src/Test.java
458706f5f7bf5ab27d162159b95b1c22522a39c5
[]
no_license
AlekseyMikaelyan/MultyThreadTest
7783864638cb5b561b7bd0fe3da594694fe3acdf
b66a4492c6217c2796664c366a8f70c8c267719b
refs/heads/master
2023-03-07T11:28:08.997154
2021-03-02T15:59:15
2021-03-02T15:59:15
343,828,297
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
public class Test { public static void main(String[] args) { Thread thread1 = new Thread(new MyThread3()); Thread thread2 = new Thread(new MyThread4()); thread1.start(); thread2.start(); } } class MyThread3 implements Runnable { @Override public void run() { for(int i = 0; i < 100; i++) { System.out.println(i); } } } class MyThread4 implements Runnable { @Override public void run() { for(int i = 100; i > 0; i--) { System.out.println(i); } } }
[ "mikaelaleksey@gmail.com" ]
mikaelaleksey@gmail.com
ec65a182d6e3b0a05582dfd99b965d8606c664e2
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java
df4989b82d7728d679953fc2cad4be8b22c46a22
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
7,042
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2001-2004 The Apache Software Foundation. * * 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. * <p> * ย ็‰ˆๆƒๆ‰€ๆœ‰2001-2004 Apache่ฝฏไปถๅŸบ้‡‘ไผšใ€‚ * * ย ๆ นๆฎApache่ฎธๅฏ่ฏ2.0็‰ˆ("่ฎธๅฏ่ฏ")ๆŽˆๆƒ;ๆ‚จไธ่ƒฝไฝฟ็”จๆญคๆ–‡ไปถ,้™ค้ž็ฌฆๅˆ่ฎธๅฏ่ฏใ€‚ๆ‚จๅฏไปฅ้€š่ฟ‡่Žทๅ–่ฎธๅฏ่ฏ็š„ๅ‰ฏๆœฌ * * ย http://www.apache.org/licenses/LICENSE-2.0 * * ย ้™ค้ž้€‚็”จๆณ•ๅพ‹่ฆๆฑ‚ๆˆ–ไนฆ้ขๅŒๆ„,ๅฆๅˆ™ๆ นๆฎ่ฎธๅฏ่ฏๅˆ†ๅ‘็š„่ฝฏไปถๆŒ‰"ๅŽŸๆ ท"ๅˆ†ๅ‘,ไธ้™„ๅธฆไปปไฝ•ๆ˜Ž็คบๆˆ–ๆš—็คบ็š„ๆ‹…ไฟๆˆ–ๆกไปถใ€‚่ฏทๅ‚้˜…็ฎก็†่ฎธๅฏ่ฏไธ‹็š„ๆƒ้™ๅ’Œ้™ๅˆถ็š„็‰นๅฎš่ฏญ่จ€็š„่ฎธๅฏ่ฏใ€‚ * */ /* * $Id: DocumentCall.java,v 1.2.4.1 2005/09/01 14:10:13 pvedula Exp $ * <p> * ย $ Id๏ผšDocumentCall.java,v 1.2.4.1 2005/09/01 14:10:13 pvedula Exp $ * */ package com.sun.org.apache.xalan.internal.xsltc.compiler; import java.util.Vector; import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.GETFIELD; import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE; import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.bcel.internal.generic.PUSH; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; /** /* <p> /* * @author Jacek Ambroziak * @author Morten Jorgensen */ final class DocumentCall extends FunctionCall { private Expression _arg1 = null; private Expression _arg2 = null; private Type _arg1Type; /** * Default function call constructor * <p> * ย ้ป˜่ฎคๅ‡ฝๆ•ฐ่ฐƒ็”จๆž„้€ ๅ‡ฝๆ•ฐ * */ public DocumentCall(QName fname, Vector arguments) { super(fname, arguments); } /** * Type checks the arguments passed to the document() function. The first * argument can be any type (we must cast it to a string) and contains the * URI of the document * <p> * ย ็ฑปๅž‹ๆฃ€ๆŸฅไผ ้€’็ป™document()ๅ‡ฝๆ•ฐ็š„ๅ‚ๆ•ฐใ€‚็ฌฌไธ€ไธชๅ‚ๆ•ฐๅฏไปฅๆ˜ฏไปปไฝ•็ฑปๅž‹(ๆˆ‘ไปฌๅฟ…้กปๅฐ†ๅ…ถ่ฝฌๆขไธบๅญ—็ฌฆไธฒ),ๅนถๅŒ…ๅซๆ–‡ๆกฃ็š„URI * */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { // At least one argument - two at most final int ac = argumentCount(); if ((ac < 1) || (ac > 2)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this); throw new TypeCheckError(msg); } if (getStylesheet() == null) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this); throw new TypeCheckError(msg); } // Parse the first argument _arg1 = argument(0); if (_arg1 == null) {// should not happened ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this); throw new TypeCheckError(msg); } _arg1Type = _arg1.typeCheck(stable); if ((_arg1Type != Type.NodeSet) && (_arg1Type != Type.String)) { _arg1 = new CastExpr(_arg1, Type.String); } // Parse the second argument if (ac == 2) { _arg2 = argument(1); if (_arg2 == null) {// should not happened ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this); throw new TypeCheckError(msg); } final Type arg2Type = _arg2.typeCheck(stable); if (arg2Type.identicalTo(Type.Node)) { _arg2 = new CastExpr(_arg2, Type.NodeSet); } else if (arg2Type.identicalTo(Type.NodeSet)) { // falls through } else { ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this); throw new TypeCheckError(msg); } } return _type = Type.NodeSet; } /** * Translates the document() function call to a call to LoadDocument()'s * static method document(). * <p> * ย ๅฐ†document()ๅ‡ฝๆ•ฐ่ฐƒ็”จ่ฝฌๆขไธบๅฏนLoadDocument()็š„้™ๆ€ๆ–นๆณ•ๆ–‡ๆกฃ()็š„่ฐƒ็”จใ€‚ */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); final int ac = argumentCount(); final int domField = cpg.addFieldref(classGen.getClassName(), DOM_FIELD, DOM_INTF_SIG); String docParamList = null; if (ac == 1) { // documentF(Object,String,AbstractTranslet,DOM) docParamList = "("+OBJECT_SIG+STRING_SIG+TRANSLET_SIG+DOM_INTF_SIG +")"+NODE_ITERATOR_SIG; } else { //ac == 2; ac < 1 or as >2 was tested in typeChec() // documentF(Object,DTMAxisIterator,String,AbstractTranslet,DOM) docParamList = "("+OBJECT_SIG+NODE_ITERATOR_SIG+STRING_SIG +TRANSLET_SIG+DOM_INTF_SIG+")"+NODE_ITERATOR_SIG; } final int docIdx = cpg.addMethodref(LOAD_DOCUMENT_CLASS, "documentF", docParamList); // The URI can be either a node-set or something else cast to a string _arg1.translate(classGen, methodGen); if (_arg1Type == Type.NodeSet) { _arg1.startIterator(classGen, methodGen); } if (ac == 2) { //_arg2 == null was tested in typeChec() _arg2.translate(classGen, methodGen); _arg2.startIterator(classGen, methodGen); } // Feck the rest of the parameters on the stack il.append(new PUSH(cpg, getStylesheet().getSystemId())); il.append(classGen.loadTranslet()); il.append(DUP); il.append(new GETFIELD(domField)); il.append(new INVOKESTATIC(docIdx)); } }
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
e09a3db4215f55a2c1a67d5d5f680ea1d0f9b59d
6a5e53d54a8e9787b390f9c3b69db2d7153d08bb
/core/modules/common/src/main/java/org/onetwo/common/xml/jaxb/DateAdapter.java
a59b1835ef3d737039580c83fcf22ed3c1e1e12e
[ "Apache-2.0" ]
permissive
wayshall/onetwo
64374159b23fc8d06373a01ecc989db291e57714
44c9cd40bc13d91e4917c6eb6430a95f395f906a
refs/heads/master
2023-08-17T12:26:47.634987
2022-07-05T06:54:30
2022-07-05T06:54:30
47,802,308
23
13
Apache-2.0
2023-02-22T07:08:34
2015-12-11T03:17:58
Java
UTF-8
Java
false
false
440
java
package org.onetwo.common.xml.jaxb; import java.util.Date; import javax.xml.bind.annotation.adapters.XmlAdapter; import org.onetwo.common.date.DateUtils; public class DateAdapter extends XmlAdapter<String, Date>{ @Override public Date unmarshal(String v) throws Exception { return DateUtils.parse(v); } @Override public String marshal(Date v) throws Exception { return DateUtils.formatDateTime(v); } }
[ "weishao.zeng@gmail.com" ]
weishao.zeng@gmail.com
7a77050c6d7c15ef1b7e5553279d8c530d5d709b
e032dab934c4fa3ff55da94de2f15d246a4aed8c
/jdk8-source/src/main/java/org/omg/IOP/ProfileIdHelper.java
97671317063bda3c9d13d74f344fedcc8ab50b43
[]
no_license
wr1ttenyu/f1nal
9d21aeb1ae14505fc2e9add9220f81719840f37f
fd27d32d2f877ea98c19d892d13df36a99059a46
refs/heads/master
2022-07-07T02:15:25.931532
2020-06-11T01:19:16
2020-06-11T01:19:16
207,061,707
0
0
null
2022-01-12T23:05:07
2019-09-08T04:31:27
Java
UTF-8
Java
false
false
1,515
java
package org.omg.IOP; /** * org/omg/IOP/ProfileIdHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/cygwin64/tmp/ojdkbuild/lookaside/java-1.8.0-openjdk/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl * Friday, January 25, 2019 2:33:21 PM PST */ /** Profile ID */ abstract public class ProfileIdHelper { private static String _id = "IDL:omg.org/IOP/ProfileId:1.0"; public static void insert (org.omg.CORBA.Any a, int that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static int extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.IOP.ProfileIdHelper.id (), "ProfileId", __typeCode); } return __typeCode; } public static String id () { return _id; } public static int read (org.omg.CORBA.portable.InputStream istream) { int value = (int)0; value = istream.read_ulong (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, int value) { ostream.write_ulong (value); } }
[ "xingyu.zhao@bangdao-tech.com" ]
xingyu.zhao@bangdao-tech.com
cf3429a5f079395506c524d2cbd8e01122416050
041e0bc57f2fcea2d0a018ed991b05b02501b984
/app/src/androidTest/java/com/li/mykotlin/ExampleInstrumentedTest.java
4fa50e220cead074a1904aebc9685b6a5015c4c2
[]
no_license
liyimeifeng/KotlinDemo
9438341c0b2bc4bdc92afb0541829aebf1bac153
9025a81605ea9ef57cac4694e4647a7f69c14fed
refs/heads/master
2021-01-21T18:18:02.115276
2017-05-24T08:40:42
2017-05-24T08:40:42
92,030,990
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package com.li.mykotlin; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.li.mykotlin", appContext.getPackageName()); } }
[ "liyi@dftcmedia.com" ]
liyi@dftcmedia.com
115bcf91d8b41906c51089cc7490fc7ec0ce10cd
14bcaa62c13dd8b5c973a897a8ed148605b92d99
/src/main/java/com/cve/web/db/render/DistributionResultsTableRenderer.java
35bbdb7147a00b69773468ba7a399cc16c5aaf39
[]
no_license
curtcox/dbbrowser
b42b981d67a7eb0cf823fecbfdeba6ee42895941
fa024675fd9d1d41617128c7163d24658a8d1c3c
refs/heads/master
2016-08-11T14:34:47.376657
2015-12-15T01:47:08
2015-12-15T01:47:08
47,861,079
0
0
null
null
null
null
UTF-8
Java
false
false
4,382
java
package com.cve.web.db.render; import com.cve.model.db.AggregateFunction; import com.cve.model.db.Cell; import com.cve.model.db.DBColumn; import com.cve.model.db.DBResultSet; import com.cve.model.db.DBRow; import com.cve.model.db.SelectResults; import com.cve.model.db.DBValue; import com.cve.html.CSS; import com.cve.ui.HTMLTags; import com.cve.log.Log; import com.cve.log.Logs; import com.cve.ui.UITableDetail; import com.cve.ui.UITableRow; import com.cve.ui.UITable; import com.cve.ui.UITableCell; import com.cve.web.core.ClientInfo; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List; import javax.annotation.concurrent.Immutable; import static com.cve.util.Check.notNull; import static com.cve.web.db.render.DBResultSetRenderer.*; /** * Renders the results of a database select as a single HTML table. */ @Immutable public final class DistributionResultsTableRenderer { /** * The results we render */ private final SelectResults results; /** * Information about what we are rendering to. */ private final ClientInfo client; final Log log = Logs.of(); /** * Utility methods for rendering select results. */ private final DBResultSetRenderer tools; private DistributionResultsTableRenderer(SelectResults results, ClientInfo client) { this.results = notNull(results); this.client = notNull(client); tools = DBResultSetRenderer.resultsOrdersHintsClient(results.resultSet, results.select.orders, results.hints, client); } static DistributionResultsTableRenderer results(SelectResults results, ClientInfo client) { return new DistributionResultsTableRenderer(results,client); } static String render(SelectResults results, ClientInfo client) { return new DistributionResultsTableRenderer(results,client).resultsTable(); } public String tdRowspan(String s, int width) { return "<td rowspan=" + HTMLTags.of().q(width) + ">" + s + "</td>"; } /** * Return a landscape table where every result set row maps to a table row. */ String resultsTable() { List<UITableRow> rows = Lists.newArrayList(); rows.add(row(tools.databaseRow(), CSS.DATABASE)); rows.add(row(tools.tableRow(), CSS.TABLE)); rows.add(row(columnNameRow())); rows.addAll(valueRows()); return UITable.of(rows).toString(); } UITableRow row(List<UITableCell> details, CSS css) { return UITableRow.of(details,css); } UITableRow row(List<UITableCell> details) { return UITableRow.of(details); } UITableDetail detail(String value, CSS css) { return UITableDetail.of(value,css); } UITableDetail detail(String value) { return UITableDetail.of(value); } /** * A table row where each cell represents a different column. * Cells in this row map one-to-one to columns in the result set. */ ImmutableList<UITableCell> columnNameRow() { DBResultSet resultSet = results.resultSet; List<UITableCell> out = Lists.newArrayList(); DBColumn column = resultSet.columns.get(0); out.add(detail(column.name,tools.classOf(column))); out.add(detail("count")); return ImmutableList.copyOf(out); } /** * The rows that contain all of the result set values. */ List<UITableRow> valueRows() { DBResultSet resultSet = results.resultSet; List<UITableRow> out = Lists.newArrayList(); CSS cssClass = CSS.ODD_ROW; for (DBRow row : resultSet.rows) { List<UITableCell> details = Lists.newArrayList(); DBColumn column = resultSet.columns.get(0); Cell valueCell = Cell.at(row, column); DBValue value = resultSet.getValue(row, column); details.add(detail(tools.valueCell(valueCell,value))); Cell countCell = Cell.at(row, column,AggregateFunction.COUNT); DBValue countValue = resultSet.values.get(countCell); details.add(detail(countValue.value.toString())); out.add(row(details, cssClass)); if (cssClass==CSS.EVEN_ROW) { cssClass = CSS.ODD_ROW; } else { cssClass = CSS.EVEN_ROW; } } return out; } }
[ "devnull@localhost" ]
devnull@localhost
7b0cc100fefb796144ad46f1467e8ba6e6b0846c
e6d8ca0907ff165feb22064ca9e1fc81adb09b95
/src/main/java/com/vmware/vim25/ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus.java
a5e95d7a4558205a19ceed2b6b2e9ec3eda0a963
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
incloudmanager/incloud-vijava
5821ada4226cb472c4e539643793bddeeb408726
f82ea6b5db9f87b118743d18c84256949755093c
refs/heads/inspur
2020-04-23T14:33:53.313358
2019-07-02T05:59:34
2019-07-02T05:59:34
171,236,085
0
1
BSD-3-Clause
2019-02-20T02:08:59
2019-02-18T07:32:26
Java
UTF-8
Java
false
false
2,610
java
/*================================================================================ Copyright (c) 2013 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the names of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================*/ package com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ public class ArrayOfClusterFailoverHostAdmissionControlInfoHostStatus { public ClusterFailoverHostAdmissionControlInfoHostStatus[] ClusterFailoverHostAdmissionControlInfoHostStatus; public ClusterFailoverHostAdmissionControlInfoHostStatus[] getClusterFailoverHostAdmissionControlInfoHostStatus() { return this.ClusterFailoverHostAdmissionControlInfoHostStatus; } public ClusterFailoverHostAdmissionControlInfoHostStatus getClusterFailoverHostAdmissionControlInfoHostStatus(int i) { return this.ClusterFailoverHostAdmissionControlInfoHostStatus[i]; } public void setClusterFailoverHostAdmissionControlInfoHostStatus(ClusterFailoverHostAdmissionControlInfoHostStatus[] ClusterFailoverHostAdmissionControlInfoHostStatus) { this.ClusterFailoverHostAdmissionControlInfoHostStatus=ClusterFailoverHostAdmissionControlInfoHostStatus; } }
[ "sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1" ]
sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1
3cbb9055ee907100cfe215ef1b7fb7238ea9ffdb
f81b774e5306ac01d2c6c1289d9e01b5264aae70
/chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java
ce5a6e19b9a409b793ea1df0500c20b1f1a2df48
[ "BSD-3-Clause" ]
permissive
waaberi/chromium
a4015160d8460233b33fe1304e8fd9960a3650a9
6549065bd785179608f7b8828da403f3ca5f7aab
refs/heads/master
2022-12-13T03:09:16.887475
2020-09-05T20:29:36
2020-09-05T20:29:36
293,153,821
1
1
BSD-3-Clause
2020-09-05T21:02:50
2020-09-05T21:02:49
null
UTF-8
Java
false
false
1,899
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.crash; import androidx.test.filters.SmallTest; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.DisabledTest; import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; /** Tests that intentionally crash in different ways. * * These are all purposefully disabled and should only be run manually. */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE) public class IntentionalCrashTest { @Rule public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = new ChromeActivityTestRule<>(ChromeActivity.class); @DisabledTest @SmallTest @Test public void testRendererCrash() { mActivityTestRule.startMainActivityFromLauncher(); mActivityTestRule.loadUrl("chrome://crash"); } @DisabledTest @SmallTest @Test public void testBrowserCrash() { mActivityTestRule.startMainActivityFromLauncher(); mActivityTestRule.loadUrl("chrome://inducebrowsercrashforrealz"); } @DisabledTest @SmallTest @Test public void testJavaCrash() { mActivityTestRule.startMainActivityFromLauncher(); mActivityTestRule.loadUrl("chrome://java-crash/"); } @DisabledTest @SmallTest @Test public void testGpuCrash() { mActivityTestRule.startMainActivityFromLauncher(); mActivityTestRule.loadUrl("chrome://gpucrash"); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
5882a204970c1cdb919b4bde7098054eb56f63b5
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/50/org/apache/commons/lang/text/DefaultMetaFormatFactory_getFormat_93.java
57e011bb03bebdebfd0e639d4c1dd05858efde0b
[]
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,081
java
org apach common lang text factori method produc metaformat instanc behav java text messag format messageformat author matt benson version default meta format factori defaultmetaformatfactori metaformat local param local local result format instanc format format format getformat local local format nmf number meta format numbermetaformat local format dmf date meta format datemetaformat local set handl pattern sethandlepattern format tmf time meta format timemetaformat local set handl pattern sethandlepattern multi format multiformat format order kei meta format orderednamekeyedmetaformat subformat kei format default format getdefaultformat nmf default format getdefaultformat dmf default format getdefaultformat tmf order kei meta format orderednamekeyedmetaformat pattern kei format nmf dmf tmf choic meta format choicemetaformat instanc order kei meta format orderednamekeyedmetaformat pattern kei format date meta format datemetaformat local time meta format timemetaformat local
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
52bc70b79a1ea95d991a4a375a583e4b2f3fe360
10a43e5cc03eb0c7e95ada57f0be7462bc35a548
/src/main/java/net/nawaman/swing/TextWrapPanel.java
536cb4bd6d926928cf8fe1a376977f9f4c88ae94
[]
no_license
NawaMan/NawaLibraries
044ffbdf463525b1b8c16109610772151867fc36
1cc15c3911186bb585f9de88e34aec8ba423d64c
refs/heads/master
2022-05-29T12:00:15.987637
2022-02-08T08:40:31
2022-02-08T08:40:31
184,431,873
0
0
null
2022-05-20T22:07:36
2019-05-01T14:51:10
Java
UTF-8
Java
false
false
2,082
java
package net.nawaman.swing; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JScrollPane; import javax.swing.JViewport; import javax.swing.text.JTextComponent; /** * Panel that will helps making the text panel wrapped enabled/disabled. * * This is done by adjusting the size of the inner panel and turning the horizontal scroll bar on/off. * If the size of the inner panel changes follows the preferred size of the text component and the horizontal bar is on, * the component will look like it is on a no-wrap mode. * If the size of the inner panel changes follows the scroll pane view port and the horizontal bar is off, the component * will look like it is on a wrap mode. **/ public class TextWrapPanel extends JScrollPane { private static final long serialVersionUID = -1437886380868517061L; /** The inner panel of this panel */ static class InnerPanel extends FixedPanel { private static final long serialVersionUID = -5308257118422152798L; InnerPanel(JTextComponent pTextComponent) { this.setLayout(new BorderLayout()); this.add(pTextComponent); this.setFixed(true); } boolean IsToWrap = false; /**{@inheritDoc}*/ @Override public void setSize(Dimension d) { if(this.IsToWrap && (d.width > this.getParent().getSize().width)) d.width = this.getParent().getSize().width; super.setSize(d); } } /** Constructs a TextWrapPanel */ public TextWrapPanel(JTextComponent pTextComponent) { super(new InnerPanel(pTextComponent)); this.InnerPanel = (InnerPanel)((JViewport)this.getComponent(0)).getComponent(0); } InnerPanel InnerPanel = null; /** Set the text wrap behavior */ public void setTextWrap(boolean pIsToWrap) { this.InnerPanel.IsToWrap = pIsToWrap; if(this.InnerPanel.IsToWrap) this.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); else this.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); } /** Checks if text wrap is enabled */ public boolean isTextWrapped() { return this.InnerPanel.IsToWrap; } }
[ "nawa@nawaman.net" ]
nawa@nawaman.net
01f123fd9f14bc63e4d191e82cbef1a75bea9c6c
f1572d3a826ced3a778dd378ab52fa22d1ec3ec9
/democode/exampleactivity/src/txc/example/SMSReceiver.java
d95c7a6f02cbf111f9341626c9bc86760df34cec
[]
no_license
txc1223/helloworld
0a3ae2cdf675e940816bcfba8a611de2b3aa4434
c0db8c4a9eaa923c995e7aec239db35ef6ed498a
refs/heads/master
2021-01-25T10:29:11.002995
2015-12-15T03:26:14
2015-12-15T03:26:14
31,292,917
0
0
null
null
null
null
GB18030
Java
false
false
1,077
java
package txc.example; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.telephony.gsm.SmsManager; public class SMSReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub Bundle bun=intent.getExtras(); if(bun!=null){ Object[] mypdus=(Object[])bun.get("pdus");//pdusๅนฟๆ’ญ็Ÿญๆถˆๆฏๅ‡บๆฅ็š„ๅ‚ๆ•ฐๅ ้”ฎๅ€ผๅฏน ๅ€ผไธบไธ€ไธชๆ•ฐ็ป„ SmsMessage[] messages=new SmsMessage[mypdus.length]; for (int i = 0; i < messages.length; i++) { messages[i]=SmsMessage.createFromPdu((byte[])mypdus[i]); } for(SmsMessage mess:messages){ //ๅพ—ๅˆฐๅœฐๅ€ๅ’Œๅ†…ๅฎน String from=mess.getDisplayOriginatingAddress(); String body=mess.getMessageBody(); //mess.getTimestampMillis(); SmsManager manager=SmsManager.getDefault(); manager.sendTextMessage("5556", null, from+":"+body, null, null); } } } }
[ "tangxucheng@shbeyondbit.com" ]
tangxucheng@shbeyondbit.com
43ecfcaa8ec7fbb161d0272d6720ff7c5f7f0fe8
ae9efe033a18c3d4a0915bceda7be2b3b00ae571
/jambeth/jambeth-service/src/main/java/com/koch/ambeth/service/merge/model/IEntityLifecycleExtension.java
62d54c85b6e15b365d306de2eb2ad00b784640ef
[ "Apache-2.0" ]
permissive
Dennis-Koch/ambeth
0902d321ccd15f6dc62ebb5e245e18187b913165
8552b210b8b37d3d8f66bdac2e094bf23c8b5fda
refs/heads/develop
2022-11-10T00:40:00.744551
2017-10-27T05:35:20
2017-10-27T05:35:20
88,013,592
0
4
Apache-2.0
2022-09-22T18:02:18
2017-04-12T05:36:00
Java
UTF-8
Java
false
false
902
java
package com.koch.ambeth.service.merge.model; /*- * #%L * jambeth-service * %% * Copyright (C) 2017 Koch Softwaredevelopment * %% * 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. * #L% */ public interface IEntityLifecycleExtension { void postCreate(IEntityMetaData metaData, Object newEntity); void postLoad(IEntityMetaData metaData, Object entity); void prePersist(IEntityMetaData metaData, Object entity); }
[ "dennis.koch@bruker.com" ]
dennis.koch@bruker.com
d4b3fb3d7a7c8768672285019c64896d06e46ed3
7b40d383ff3c5d51c6bebf4d327c3c564eb81801
/src/com/parse/ParseQuery$6.java
35f3773aa2ca9cf4201b3c03cf70b8f67c7de6dc
[]
no_license
reverseengineeringer/com.yik.yak
d5de3a0aea7763b43fd5e735d34759f956667990
76717e41dab0b179aa27f423fc559bbfb70e5311
refs/heads/master
2021-01-20T09:41:04.877038
2015-07-16T16:44:44
2015-07-16T16:44:44
38,577,543
2
0
null
null
null
null
UTF-8
Java
false
false
768
java
package com.parse; import M; import N; import java.util.ArrayList; import java.util.List; class ParseQuery$6 implements M<Void, N<List<T>>> { ParseQuery$6(ParseQuery paramParseQuery) {} public N<List<T>> then(N<Void> paramN) { paramN = new ArrayList(); if (ParseQuery.access$400(this$0) == null) { return N.a(paramN); } if (ParseQuery.access$500(this$0) != ParseQuery.CachePolicy.IGNORE_CACHE) {} for (boolean bool = true;; bool = false) { ParseQuery.access$602(this$0, System.nanoTime()); return ParseQuery.access$400(this$0).executeAsync().c(new ParseQuery.6.1(this, bool)); } } } /* Location: * Qualified Name: com.parse.ParseQuery.6 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
008723bbd965dea21a3b47ff4e531dfa42e5baae
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-1.9.5/kernel/api/fabric3-spi/src/main/java/org/fabric3/spi/introspection/java/annotation/ClassVisitor.java
98924c06a5bc8b344fe332f8aa14c18f37b17130
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
2,542
java
/* * Fabric3 * Copyright (c) 2009-2012 Metaform Systems * * Fabric3 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, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 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 Fabric3. * If not, see <http://www.gnu.org/licenses/>. */ package org.fabric3.spi.introspection.java.annotation; import org.fabric3.spi.introspection.IntrospectionContext; import org.fabric3.spi.model.type.java.InjectingComponentType; /** * Interface to a service that walks a Java class and updates the implementation definition based on annotations found. Errors and warnings are * reported in the IntrospectionContext. * * @version $Rev$ $Date$ */ public interface ClassVisitor { /** * Walk a class and update the component type. If errors or warnings are encountered, they will be collated in the IntrospectionContext. * * @param componentType the component type to update * @param clazz the Java class to walk * @param context the current introspection context */ void visit(InjectingComponentType componentType, Class<?> clazz, IntrospectionContext context); }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
f349f6c5998e955ebf391f91c0747a079b886173
db2a87d7af621679921bfdcd93a212230684793a
/src/cn/javass/dp/observer/example2/Client.java
3478acfb1a46e0168dda2b6df7822c7718480246
[]
no_license
Wilsoncyf/designpattern
fa5f8a50e0d89f644ccb7edc1971465f3d21d3e4
11f62dd0753a7848c9de0453ee021a845347ebaa
refs/heads/master
2022-12-05T02:48:24.323214
2020-08-31T15:50:02
2020-08-31T15:50:02
290,809,079
1
0
null
null
null
null
GB18030
Java
false
false
612
java
package cn.javass.dp.observer.example2; public class Client { public static void main(String[] args) { //ๅˆ›ๅปบไธ€ไธชๆŠฅ็บธ๏ผŒไฝœไธบ่ขซ่ง‚ๅฏŸ่€… NewsPaper subject = new NewsPaper(); //ๅˆ›ๅปบ้˜…่ฏป่€…๏ผŒไนŸๅฐฑๆ˜ฏ่ง‚ๅฏŸ่€… Reader reader1 = new Reader(); reader1.setName("ๅผ ไธ‰"); Reader reader2 = new Reader(); reader2.setName("ๆŽๅ››"); Reader reader3 = new Reader(); reader3.setName("็Ž‹ไบ”"); //ๆณจๅ†Œ้˜…่ฏป่€… subject.attach(reader1); subject.attach(reader2); subject.attach(reader3); //่ฆๅ‡บๆŠฅ็บธๅ•ฆ subject.setContent("ๆœฌๆœŸๅ†…ๅฎนๆ˜ฏ่ง‚ๅฏŸ่€…ๆจกๅผ"); } }
[ "417187306@qq.com" ]
417187306@qq.com
26cefb17a90cd4ed2e29f7fbe9a62293b2804065
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/response/KoubeiMarketingCampaignActivityOfflineResponse.java
4075d8b20f3e88ef4d515c8a22502995fdc6d594
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
947
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.campaign.activity.offline response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiMarketingCampaignActivityOfflineResponse extends AlipayResponse { private static final long serialVersionUID = 7363765695589194393L; /** * ๆดปๅŠจๅญ็Šถๆ€๏ผŒๅฆ‚ๅฎกๆ ธไธญ */ @ApiField("audit_status") private String auditStatus; /** * ๆดปๅŠจ็Šถๆ€ */ @ApiField("camp_status") private String campStatus; public void setAuditStatus(String auditStatus) { this.auditStatus = auditStatus; } public String getAuditStatus( ) { return this.auditStatus; } public void setCampStatus(String campStatus) { this.campStatus = campStatus; } public String getCampStatus( ) { return this.campStatus; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
530967c8b08e0d733b38b76af1f24614494f0682
2a983ca82d81f9a4f31b3fa71f5b236d13194009
/instrument-modules/user-modules/module-ehcache/src/main/java/com/pamirs/attach/plugin/ehcache/interceptor/CacheKeyInterceptor0.java
91cda5118f28bf33507eeadacc4f5f9bc72cb14f
[ "Apache-2.0" ]
permissive
hengyu-coder/LinkAgent-1
74ea4dcf51a0a05f2bb0ff22b309f02f8bf0a1a1
137ddf2aab5e91b17ba309a83d5420f839ff4b19
refs/heads/main
2023-06-25T17:28:44.903484
2021-07-28T03:41:20
2021-07-28T03:41:20
382,327,899
0
0
Apache-2.0
2021-07-02T11:39:46
2021-07-02T11:39:46
null
UTF-8
Java
false
false
3,823
java
/** * Copyright 2021 Shulie Technology, Co.Ltd * Email: shulie@shulie.io * 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, * See the License for the specific language governing permissions and * limitations under the License. */ package com.pamirs.attach.plugin.ehcache.interceptor; import com.pamirs.pradar.Pradar; import com.pamirs.pradar.cache.ClusterTestCacheWrapperKey; import com.pamirs.pradar.interceptor.AroundInterceptor; import com.shulie.instrument.simulator.api.ProcessController; import com.shulie.instrument.simulator.api.listener.ext.Advice; import net.sf.ehcache.Element; import org.apache.commons.lang.ArrayUtils; /** * @Description * @Author xiaobin.zfb * @mail xiaobin@shulie.io * @Date 2020/8/19 7:50 ไธ‹ๅˆ */ public class CacheKeyInterceptor0 extends AroundInterceptor { @Override public void doBefore(Advice advice) { if (!Pradar.isClusterTest()) { return; } Object[] args = advice.getParameterArray(); if (ArrayUtils.isEmpty(args)) { return; } Object key = advice.getParameterArray()[0]; if (!(key instanceof Element)) { return; } Element element = (Element) key; if (!(element.getObjectKey() instanceof ClusterTestCacheWrapperKey)) { Element ele = new Element(new ClusterTestCacheWrapperKey(element.getObjectKey()) , element.getObjectValue() , element.getVersion() , element.getCreationTime() , element.getLastAccessTime() , element.getHitCount() , element.usesCacheDefaultLifespan() , element.getTimeToLive() , element.getTimeToIdle() , element.getLastUpdateTime()); advice.changeParameter(0, ele); } if (args.length > 1 && args[1] instanceof Element) { Element element1 = (Element) args[1]; Element ele = new Element(new ClusterTestCacheWrapperKey(element1.getObjectKey()) , element1.getObjectValue() , element1.getVersion() , element1.getCreationTime() , element1.getLastAccessTime() , element1.getHitCount() , element1.usesCacheDefaultLifespan() , element1.getTimeToLive() , element1.getTimeToIdle() , element1.getLastUpdateTime()); advice.changeParameter(1, ele); } } @Override public void doAfter(Advice advice) throws Throwable { Object result = advice.getReturnObj(); if (!(result instanceof Element)) { return; } Element element = (Element) result; if (element.getObjectKey() instanceof ClusterTestCacheWrapperKey) { Element ele = new Element(((ClusterTestCacheWrapperKey) element.getObjectKey()).getKey() , element.getObjectValue() , element.getVersion() , element.getCreationTime() , element.getLastAccessTime() , element.getHitCount() , element.usesCacheDefaultLifespan() , element.getTimeToLive() , element.getTimeToIdle() , element.getLastUpdateTime()); ProcessController.returnImmediately(ele); } } }
[ "jirenhe@shulie.io" ]
jirenhe@shulie.io
a96ccb9157f401b005e6ffa37205c00ad5cfc895
716b288f76443f5360300965bc4ddbcb9ec01f87
/app/src/main/java/id/smartin/org/homecaretimedic/model/HomecareTransactionStatus.java
703424455cbf6123cdb674943fe2c75f6d811f37
[]
no_license
smartinindonesia/timedic-android-user
15b080d82c4ac718b4f8782b017c69e8a388679b
5d3c9de3316ab20d6307f28a19f25c7fa64752a3
refs/heads/master
2018-09-10T12:16:57.938028
2018-02-23T05:49:03
2018-02-23T05:49:03
110,251,179
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
package id.smartin.org.homecaretimedic.model; import com.google.gson.annotations.SerializedName; /** * Created by Hafid on 1/20/2018. */ public class HomecareTransactionStatus { @SerializedName("id") private Long id; @SerializedName("status") private String status; public HomecareTransactionStatus(Long id) { this.id = id; } public HomecareTransactionStatus(Long id, String status) { this.id = id; this.status = status; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
[ "yusfia.hafidz@gmail.com" ]
yusfia.hafidz@gmail.com
25bd2bc8df4a5641a5b2788bbe0e839e5daa67e4
1a8e9d4bd8d8eef38a2c3a6b4108cbb2f586d6aa
/Tom่€ๅธˆ็œŸๅฎž้กน็›ฎ/3dsq-full/src/main/java/com/d3sq/shopping/service/ICartService.java
91b66e69cf4b24bb76b89a967306e8c8e84373ff
[]
no_license
marcodeba/mySpringMVC
484c4302b7caa24a485188a00ae3f03321df2bd9
7f22cbc6a249076f465aafb8387d4e338261c897
refs/heads/master
2022-12-20T03:58:06.751153
2020-04-04T09:03:08
2020-04-04T09:03:08
251,573,930
0
0
null
2022-12-16T03:33:09
2020-03-31T10:43:41
Java
UTF-8
Java
false
false
1,179
java
package com.d3sq.shopping.service; import javax.core.common.ResultMsg; import com.d3sq.model.entity.MallCart; public interface ICartService { /** * ่Žทๅ–่ดญ็‰ฉ่ฝฆไธญ็š„ๅ•†ๅ“ๅˆ—่กจ * @param local * @param userId * @param enc * @return */ ResultMsg<?> getList(String local, Long userId, String enc); /** * ๆทปๅŠ ่ดญ็‰ฉ่ฝฆ * @param local * @param cart * @param enc * @return */ ResultMsg<?> addCart(String local, Long productId,Integer addCount,Float addPrice,Long userId, String enc); /** * ็ผ–่พ‘่ดญ็‰ฉ่ฝฆๅ•†ๅ“ๆ˜ฏๅฆ้€‰ไธญ็Šถๆ€ * @param local * @param id * @param type * @param check * @param userId * @param enc * @return */ ResultMsg<?> modifyCheck(String local, Long id, Integer type, Integer check, Long userId, String enc); /** * ๅŒๆญฅ่ดญ็‰ฉ่ฝฆ * @param local * @param userId * @param shops * @param enc * @return */ ResultMsg<?> mergeCart(String local, Long userId, String shops, String enc); /** * ๅˆ ้™ค่ดญ็‰ฉ่ฝฆ * @param local * @param userId * @param productId * @param enc * @return */ //ResultMsg<?> removeCart(String local,Long userId, Long productId, String enc); }
[ "tom@gupaoedu.com" ]
tom@gupaoedu.com
6ab0a8b25eb375042f242bc7dc85d464ec4df245
08c5675ad0985859d12386ca3be0b1a84cc80a56
/src/main/java/javax/swing/plaf/BorderUIResource.java
622762b7fcc49cf19bad1d58d63dff1c018998b6
[]
no_license
ytempest/jdk1.8-analysis
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
refs/heads/master
2023-03-18T04:37:52.530208
2021-03-09T02:51:16
2021-03-09T02:51:16
345,863,779
0
0
null
null
null
null
UTF-8
Java
false
false
7,739
java
/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.plaf; import java.awt.Component; import java.awt.Insets; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.io.Serializable; import java.beans.ConstructorProperties; import javax.swing.border.*; import javax.swing.Icon; import javax.swing.plaf.UIResource; /* * A Border wrapper class which implements UIResource. UI * classes which set border properties should use this class * to wrap any borders specified as defaults. * * This class delegates all method invocations to the * Border "delegate" object specified at construction. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @see javax.swing.plaf.UIResource * @author Amy Fowler * */ public class BorderUIResource implements Border, UIResource, Serializable { static Border etched; static Border loweredBevel; static Border raisedBevel; static Border blackLine; public static Border getEtchedBorderUIResource() { if (etched == null) { etched = new EtchedBorderUIResource(); } return etched; } public static Border getLoweredBevelBorderUIResource() { if (loweredBevel == null) { loweredBevel = new BevelBorderUIResource(BevelBorder.LOWERED); } return loweredBevel; } public static Border getRaisedBevelBorderUIResource() { if (raisedBevel == null) { raisedBevel = new BevelBorderUIResource(BevelBorder.RAISED); } return raisedBevel; } public static Border getBlackLineBorderUIResource() { if (blackLine == null) { blackLine = new LineBorderUIResource(Color.black); } return blackLine; } private Border delegate; /** * Creates a UIResource border object which wraps * an existing Border instance. * * @param delegate the border being wrapped */ public BorderUIResource(Border delegate) { if (delegate == null) { throw new IllegalArgumentException("null border delegate argument"); } this.delegate = delegate; } public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { delegate.paintBorder(c, g, x, y, width, height); } public Insets getBorderInsets(Component c) { return delegate.getBorderInsets(c); } public boolean isBorderOpaque() { return delegate.isBorderOpaque(); } public static class CompoundBorderUIResource extends CompoundBorder implements UIResource { @ConstructorProperties({"outsideBorder", "insideBorder"}) public CompoundBorderUIResource(Border outsideBorder, Border insideBorder) { super(outsideBorder, insideBorder); } } public static class EmptyBorderUIResource extends EmptyBorder implements UIResource { public EmptyBorderUIResource(int top, int left, int bottom, int right) { super(top, left, bottom, right); } @ConstructorProperties({"borderInsets"}) public EmptyBorderUIResource(Insets insets) { super(insets); } } public static class LineBorderUIResource extends LineBorder implements UIResource { public LineBorderUIResource(Color color) { super(color); } @ConstructorProperties({"lineColor", "thickness"}) public LineBorderUIResource(Color color, int thickness) { super(color, thickness); } } public static class BevelBorderUIResource extends BevelBorder implements UIResource { public BevelBorderUIResource(int bevelType) { super(bevelType); } public BevelBorderUIResource(int bevelType, Color highlight, Color shadow) { super(bevelType, highlight, shadow); } @ConstructorProperties({"bevelType", "highlightOuterColor", "highlightInnerColor", "shadowOuterColor", "shadowInnerColor"}) public BevelBorderUIResource(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { super(bevelType, highlightOuter, highlightInner, shadowOuter, shadowInner); } } public static class EtchedBorderUIResource extends EtchedBorder implements UIResource { public EtchedBorderUIResource() { super(); } public EtchedBorderUIResource(int etchType) { super(etchType); } public EtchedBorderUIResource(Color highlight, Color shadow) { super(highlight, shadow); } @ConstructorProperties({"etchType", "highlightColor", "shadowColor"}) public EtchedBorderUIResource(int etchType, Color highlight, Color shadow) { super(etchType, highlight, shadow); } } public static class MatteBorderUIResource extends MatteBorder implements UIResource { public MatteBorderUIResource(int top, int left, int bottom, int right, Color color) { super(top, left, bottom, right, color); } public MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon) { super(top, left, bottom, right, tileIcon); } public MatteBorderUIResource(Icon tileIcon) { super(tileIcon); } } public static class TitledBorderUIResource extends TitledBorder implements UIResource { public TitledBorderUIResource(String title) { super(title); } public TitledBorderUIResource(Border border) { super(border); } public TitledBorderUIResource(Border border, String title) { super(border, title); } public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition) { super(border, title, titleJustification, titlePosition); } public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) { super(border, title, titleJustification, titlePosition, titleFont); } @ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"}) public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) { super(border, title, titleJustification, titlePosition, titleFont, titleColor); } } }
[ "787491096@qq.com" ]
787491096@qq.com
10368256a43ec2d7918d8c62492da9a468f573d9
9c7074a2467350bd855cbacba2857199cda5ebc7
/20210809(ZJYD_v2.6.0)/app/src/main/java/com/pukka/ydepg/launcher/ui/adapter/MyAdapter.java
fb628dbed806c9d6d05b38b4e4c792a1ae6a281b
[]
no_license
wangkk24/testgit
ce6c3f371bcac56832f62f9631cdffb32d9f2ed2
0eb6d2cc42f61cf28ce50b77d754dcfbd152d91c
refs/heads/main
2023-07-15T21:45:24.674154
2021-08-31T07:13:14
2021-08-31T07:13:14
401,544,031
1
1
null
null
null
null
UTF-8
Java
false
false
6,193
java
package com.pukka.ydepg.launcher.ui.adapter; import android.content.Context; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import androidx.annotation.NonNull; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.pukka.ydepg.OTTApplication; import com.pukka.ydepg.R; import com.pukka.ydepg.common.extview.ImageViewExt; import com.pukka.ydepg.common.extview.RelativeLayoutExt; import com.pukka.ydepg.common.extview.ShimmerImageView; import com.pukka.ydepg.common.extview.TextViewExt; import com.pukka.ydepg.common.http.v6bean.v6node.VOD; import com.pukka.ydepg.common.utils.CornersTransform; import com.pukka.ydepg.common.utils.ScoreControl; import com.pukka.ydepg.common.utils.SuperScriptUtil; import com.pukka.ydepg.moudule.featured.bean.VodBean; import java.util.List; import butterknife.BindView; /** * MyFragmentๅކๅฒๆ”ถ่—็š„adapter * * @author yangjunyan * @FileName: com.pukka.ydepg.launcher.ui.adapter.MyAdapter.java * @date: 2017-12-18 11:30 * @version: V1.0 ๆ่ฟฐๅฝ“ๅ‰็‰ˆๆœฌๅŠŸ่ƒฝ */ public class MyAdapter extends BaseFocusAdapter<VodBean, BaseFocusViewHolder> { public MyAdapter(Context context, ItemEventListener itemEventListener) { super(context, itemEventListener); } @Override public BaseFocusViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return super.onCreateViewHolder(parent, viewType); } @Override public void onBindViewHolder(BaseFocusViewHolder holder, int position) { super.onBindViewHolder(holder, position); } @Override protected MyViewHolder createViewHolder(View view) { return new MyViewHolder(view); } public void setDatas(List<VodBean> datas) { this.datas = datas; notifyDataSetChanged(); } @Override public int getItemCount() { return datas == null ? 0 : datas.size(); } @Override public int resourceId() { return R.layout.item_myfragment_layout; } public class MyViewHolder extends BaseFocusViewHolder<VodBean> { @BindView(R.id.movies_list_item_img_hd) ImageViewExt mHdImg; @BindView(R.id.movies_list_item_score) TextViewExt mScoreTx; @BindView(R.id.movies_list_item_name) TextViewExt mNameTx; @BindView(R.id.movies_list_item_img) ShimmerImageView mPosterIv; @BindView(R.id.rl_item_my_list) RelativeLayoutExt mMoviesView; public MyViewHolder(View itemView) { super(itemView); mMoviesView.setBackgroundResource(R.drawable.select_vertical_scroll_item_bg); } @Override public void bind(VodBean vodBean, int position) { if (itemEventListener != null) { mMoviesView.setOnFocusChangeListener((view, focused) -> { mNameTx.setSelected(focused); view.setSelected(focused); if (focused){ mMoviesView.setPadding(context.getResources().getDimensionPixelSize(R.dimen.margin_2),context.getResources().getDimensionPixelSize(R.dimen.margin_2), context.getResources().getDimensionPixelSize(R.dimen.margin_2),context.getResources().getDimensionPixelSize(R.dimen.margin_2)); }else { mMoviesView.setPadding(0,0,0,0); } }); mMoviesView.setOnClickListener((v) -> { itemEventListener.onItemClick(v, position); }); } mMoviesView.setTag(position); mNameTx.setText(vodBean.getName()); //ๆ˜พ็คบๅณไธŠ่ง’ๆ ‡็ญพๅ›พ็‰‡ 1 HD 2 4 if (vodBean.getDefinition().equals("1")) { mHdImg.setVisibility(View.GONE); } else if (vodBean.getDefinition().equals("2")) { mHdImg.setVisibility(View.VISIBLE); mHdImg.setBackgroundResource(R.drawable.details_right_4k_icon); } else { mHdImg.setVisibility(View.GONE); } String score = vodBean.getRate(); if (!TextUtils.isEmpty(score) && score.equals("0.0")) { score = "7.0"; } if(ScoreControl.newNeedShowScore(vodBean)){ mScoreTx.setText(score); mScoreTx.setVisibility(View.VISIBLE); }else { mScoreTx.setVisibility(View.GONE); } //่งฃๅ†ณๆ”ถ่—ๅ’Œๆ’ญๆ”พๅކๅฒๆ— ๆตทๆŠฅๆ—ถไนŸๆœ‰้—ชๅ…‰ๆ•ˆๆžœ mPosterIv.setCanStartShimmer(!TextUtils.isEmpty(vodBean.getPoster())); mPosterIv.setImageResourcesUrl(vodBean.getPoster(),false); RequestOptions options = new RequestOptions().transform(new CornersTransform(6)).placeholder(R.drawable.default_poster); Glide.with(context).load(vodBean.getPoster()).apply(options).into(mPosterIv); VOD vod = new VOD(); vod.setCustomFields(vodBean.getCustomFields()); addLeftCorner(mMoviesView, SuperScriptUtil.getInstance().getSuperScriptForCollectionHistory(vod)); } } public void addLeftCorner(RelativeLayout relativeLayout, String scriptUrl) { if (!TextUtils.isEmpty(scriptUrl)){ ImageView ImgScript = new ImageView(context); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup .LayoutParams.WRAP_CONTENT, OTTApplication.getContext().getResources().getDimensionPixelSize(R.dimen.margin_30)); params.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params.addRule(RelativeLayout.ALIGN_PARENT_TOP); params.setMargins(OTTApplication.getContext().getResources().getDimensionPixelSize(R.dimen.margin_10),0,0,0); ImgScript.setLayoutParams(params); ImgScript.setScaleType(ImageView.ScaleType.FIT_START); relativeLayout.addView(ImgScript); Glide.with(context).load(scriptUrl).into(ImgScript); } } }
[ "wangkk@easier.cn" ]
wangkk@easier.cn
4e9f2dcb4c7fc6f0b1e9aaa74ab7d92b4f9088ea
8692972314994b8923b6f12b7ae9e76b30a36391
/memory_managment/ClassesList/src/Class720.java
ec0e931fad69e300e33ec23ae16812e50aa94321
[]
no_license
Petrash-Samoilenka/2017W-D2D3-ST-Petrash-Samoilenka
d2cd65c1d10bec3c4d1b69b124d4f0aeef1d7308
214fbb3682ef6714514af86cc9eaca62f02993e1
refs/heads/master
2020-05-27T15:04:52.163194
2017-06-16T14:19:38
2017-06-16T14:19:38
82,560,968
1
0
null
null
null
null
UTF-8
Java
false
false
3,746
java
public class Class720 extends Class1 { private String _s1; private String _s2; private String _s3; private String _s4; private String _s5; private String _s6; private String _s7; private String _s8; public Class720() { } public void getValue1(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue2(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue3(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue4(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue5(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue6(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue7(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue8(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue9(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue10(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue11(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue12(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue13(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue14(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue15(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue16(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue17(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue18(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue19(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue20(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } }
[ "rn.samoylenko@gmail.com" ]
rn.samoylenko@gmail.com
f28ec81ebacacfa7afc74cc0fcad6dde983f975e
c28a6f2c8ce8f986b5c22fd602e7349e68af8f9c
/android/vendor/realtek/apps/RealtekGallery2/src/com/android/gallery3d/data/UriSource.java
7095a89ad07ec14795821e7ceb6c4971409c82ed
[]
no_license
BPI-SINOVOIP/BPI-1296-Android6
d6ade74367696c644a1b053b308d164ba53d3f8c
1ba45ab7555440dc3721d6acda3e831e7a3e3ff3
refs/heads/master
2023-02-24T18:23:02.110515
2019-08-09T04:01:16
2019-08-09T04:01:16
166,341,197
0
5
null
null
null
null
UTF-8
Java
false
false
3,407
java
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.data; import android.content.ContentResolver; import android.net.Uri; import android.webkit.MimeTypeMap; import com.android.gallery3d.app.GalleryApp; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; class UriSource extends MediaSource { @SuppressWarnings("unused") private static final String TAG = "UriSource"; private static final String IMAGE_TYPE_PREFIX = "image/"; private static final String IMAGE_TYPE_ANY = "image/*"; private static final String CHARSET_UTF_8 = "utf-8"; private GalleryApp mApplication; public UriSource(GalleryApp context) { super("uri"); mApplication = context; } @Override public MediaObject createMediaObject(Path path) { String segment[] = path.split(); if (segment.length != 3) { throw new RuntimeException("bad path: " + path); } try { String uri = URLDecoder.decode(segment[1], CHARSET_UTF_8); String type = URLDecoder.decode(segment[2], CHARSET_UTF_8); return new UriImage(mApplication, path, Uri.parse(uri), type); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } } private String getMimeType(Uri uri) { if (ContentResolver.SCHEME_FILE.equals(uri.getScheme())) { String extension = MimeTypeMap.getFileExtensionFromUrl(uri.toString()); String type = MimeTypeMap.getSingleton() .getMimeTypeFromExtension(extension.toLowerCase()); if (type != null) return type; } // Assume the type is image if the type cannot be resolved // This could happen for "http" URI. String type = mApplication.getContentResolver().getType(uri); if (type == null) type = "image/*"; return type; } @Override public Path findPathByUri(Uri uri, String type) { String mimeType = getMimeType(uri); // Try to find a most specific type but it has to be started with "image/" if ((type == null) || (IMAGE_TYPE_ANY.equals(type) && mimeType.startsWith(IMAGE_TYPE_PREFIX))) { type = mimeType; } if (type.startsWith(IMAGE_TYPE_PREFIX) || uri.toString().startsWith("file")) { try { return Path.fromString("/uri/" + URLEncoder.encode(uri.toString(), CHARSET_UTF_8) + "/" +URLEncoder.encode(type, CHARSET_UTF_8)); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } } // We have no clues that it is an image return null; } }
[ "Justin" ]
Justin
7126d49984fe522a0a204f9adba4351bb7747ce3
6a652eb58cdbc1288dbfbf02243fda0cc56a55f6
/core/gen/main/java/com/riiablo/net/packet/bnls/ConnectionAccepted.java
0ba8581532216943b6559fd3b233afc8e412c85b
[ "Apache-2.0" ]
permissive
collinsmith/riiablo
1d98fe274d3893b813cf21f1339a5559f61ce20e
9d03f869ce9c7d33866b53050fa9c1ca8f0e1fbb
refs/heads/master
2023-09-03T05:23:40.625108
2023-08-18T06:10:30
2023-08-18T06:10:30
44,467,072
736
97
Apache-2.0
2020-10-25T23:30:43
2015-10-18T05:41:54
Java
UTF-8
Java
false
false
1,515
java
// automatically generated by the FlatBuffers compiler, do not modify package com.riiablo.net.packet.bnls; import java.nio.*; import java.lang.*; import java.util.*; import com.google.flatbuffers.*; @SuppressWarnings("unused") public final class ConnectionAccepted extends Table { public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); } public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb) { return getRootAsConnectionAccepted(_bb, new ConnectionAccepted()); } public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb, ConnectionAccepted obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } public ConnectionAccepted __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public static void startConnectionAccepted(FlatBufferBuilder builder) { builder.startTable(0); } public static int endConnectionAccepted(FlatBufferBuilder builder) { int o = builder.endTable(); return o; } public static final class Vector extends BaseVector { public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } public ConnectionAccepted get(int j) { return get(new ConnectionAccepted(), j); } public ConnectionAccepted get(ConnectionAccepted obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } } }
[ "collinsmith70@gmail.com" ]
collinsmith70@gmail.com
58bfcedb3a6b1b50fc303d8904e60c80c3baa0f6
8de0190ba91403621d09cdb0855612d00d8179b2
/leetcode-algorithm-java/src/test/java/johnny/leetcode/algorithm/Solution661Test.java
c0396d7bd43f2383692c5b4a73097d1b8f2221c2
[]
no_license
156420591/algorithm-problems-java
e2494831becba9d48ab0af98b99fca138aaa1ca8
1aec8a6e128763b1c1378a957d270f2a7952b81a
refs/heads/master
2023-03-04T12:36:06.143086
2021-02-05T05:38:15
2021-02-05T05:38:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package johnny.leetcode.algorithm; import org.junit.Test; import static org.junit.Assert.assertArrayEquals; public class Solution661Test extends JunitBase { @Test public void test() { System.out.println("imageSmoother"); Solution661 instance = new Solution661(); int[][] m1 = new int[][] { {1,1,1}, {1,0,1}, {1,1,1} }; int[][] result1 = new int[][] { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }; assertArrayEquals(result1, instance.imageSmoother(m1)); } }
[ "jojozhuang@gmail.com" ]
jojozhuang@gmail.com
83a6fea253e066d9f9d644249e9b6eb2a511e7d2
5081f893ee96226f723906485111431531480e90
/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java
bcf5ffcb6db179ffced139d55a15a653591a8338
[]
no_license
rmannibucau/batchee
fb74a931de61ed6d6df2b2c8a16683365d9d5e7a
1f1fae8a0cb0ac5dd0bf2955a26516a4a1455c1a
refs/heads/master
2021-01-19T18:35:57.929672
2013-11-04T14:48:41
2013-11-04T14:48:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,869
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.batchee.extras.stax; import org.apache.batchee.extras.stax.util.JAXBContextFactory; import org.apache.batchee.extras.stax.util.SAXStAXHandler; import org.apache.batchee.extras.transaction.TransactionalWriter; import javax.batch.api.BatchProperty; import javax.batch.api.chunk.ItemWriter; import javax.batch.operations.BatchRuntimeException; import javax.inject.Inject; import javax.xml.bind.Marshaller; import javax.xml.stream.XMLEventFactory; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLOutputFactory; import javax.xml.transform.sax.SAXResult; import java.io.File; import java.io.Serializable; import java.util.List; public class StaxItemWriter implements ItemWriter { @Inject @BatchProperty(name = "marshallingClasses") private String marshallingClasses; @Inject @BatchProperty(name = "marshallingPackage") private String marshallingPackage; @Inject @BatchProperty(name = "rootTag") private String rootTag; @Inject @BatchProperty(name = "encoding") private String encoding; @Inject @BatchProperty(name = "version") private String version; @Inject @BatchProperty(name = "output") private String output; private Marshaller marshaller; private XMLEventWriter writer; private XMLEventFactory xmlEventFactory; private TransactionalWriter txWriter; @Override public void open(final Serializable checkpoint) throws Exception { if (output == null) { throw new BatchRuntimeException("output should be set"); } if (marshallingPackage == null && marshallingClasses == null) { throw new BatchRuntimeException("marshallingPackage should be set"); } if (encoding == null) { encoding = "UTF-8"; } if (rootTag == null) { rootTag = "root"; } if (version == null) { version = "1.0"; } marshaller = JAXBContextFactory.getJaxbContext(marshallingPackage, marshallingClasses).createMarshaller(); final File file = new File(output); if (!file.getParentFile().exists() && file.getParentFile().mkdirs()) { throw new BatchRuntimeException("Output parent file can't be created"); } final XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); woodStoxConfig(xmlOutputFactory); xmlEventFactory = XMLEventFactory.newFactory(); txWriter = new TransactionalWriter(file, encoding, checkpoint); writer = xmlOutputFactory.createXMLEventWriter(txWriter); if (txWriter.position() == 0) { writer.add(xmlEventFactory.createStartDocument(encoding, version)); writer.add(xmlEventFactory.createStartElement("", "", rootTag)); writer.flush(); } } // this config is mainly taken from spring-batch and cxf private void woodStoxConfig(final XMLOutputFactory xmlOutputFactory) { if (xmlOutputFactory.isPropertySupported("com.ctc.wstx.automaticEndElements")) { xmlOutputFactory.setProperty("com.ctc.wstx.automaticEndElements", Boolean.FALSE); } if (xmlOutputFactory.isPropertySupported("com.ctc.wstx.outputValidateStructure")) { xmlOutputFactory.setProperty("com.ctc.wstx.outputValidateStructure", Boolean.FALSE); } } @Override public void close() throws Exception { if (writer != null) { writer.add(xmlEventFactory.createEndElement("", "", rootTag)); writer.add(xmlEventFactory.createEndDocument()); writer.close(); } } @Override public void writeItems(final List<Object> items) throws Exception { for (final Object item : items) { marshaller.marshal(item, new SAXResult(new SAXStAXHandler(writer, xmlEventFactory))); } writer.flush(); txWriter.flush(); } @Override public Serializable checkpointInfo() throws Exception { return txWriter.position(); } }
[ "rmannibucau@apache.org" ]
rmannibucau@apache.org
5b29e79c925677c8f5fafbd2f50c46f2190a00e3
5aaf23a0425077d4d6f634f14dc2a9eb56d79bcb
/src/main/java/com/bis/operox/inv/dao/impl/BrandDaoImpl.java
227900916969a703520faa230eb88f6c6615dbf3
[]
no_license
naidu8242/operox_shopping
578e35cc6de437e3dd526834a796d63159d9f900
fe4f3080fc58546e774110e31c022c55bcb326cb
refs/heads/master
2022-12-23T04:38:20.470280
2020-02-03T09:53:48
2020-02-03T09:53:48
237,930,620
0
0
null
2022-12-16T08:01:12
2020-02-03T09:38:49
Java
UTF-8
Java
false
false
2,587
java
package com.bis.operox.inv.dao.impl; import java.util.List; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.bis.operox.constants.Constants; import com.bis.operox.inv.dao.BrandDao; import com.bis.operox.inv.dao.entity.Brand; import com.bis.operox.inv.dao.entity.Customer; @Repository public class BrandDaoImpl implements BrandDao { @Autowired private SessionFactory sessionFactory; private static final Logger logger = LoggerFactory.getLogger(BrandDaoImpl.class); @Override @Transactional public Brand addBrand(Brand brand) { Session session = this.sessionFactory.getCurrentSession(); session.saveOrUpdate(brand); logger.info("Brand saved successfully, Brand Details="+brand); return brand; } @Override @Transactional public Brand getBrandById(Long brandId) { Session session = this.sessionFactory.getCurrentSession(); String query = "from Brand brand where brand.id = :brandId"; List<Brand> customerList = session.createQuery(query).setLong("brandId", brandId).setCacheable(true).list(); return customerList.get(0); } @Override @Transactional public List<Brand> getBrandByCatagoryId(Long catagoryId) { Session session = this.sessionFactory.getCurrentSession(); String query = "from Brand b where b.category.id =:catagoryId and b.status = "+Constants.RECORD_ACTIVE+""; List<Brand> brandList = session.createQuery(query).setLong("catagoryId", catagoryId).setCacheable(true).list(); return brandList; } @SuppressWarnings("unchecked") @Override @Transactional public List<Brand> listBrands() { Session session = this.sessionFactory.getCurrentSession(); List<Brand> brandsList = session.createQuery("from Brand brand where brand.status = "+Constants.RECORD_ACTIVE+"").list(); return brandsList; } @Override @Transactional public Boolean getBrandByBrandName(String brandName) { boolean isValidBrand = true; Integer status = 1; Session session = this.sessionFactory.getCurrentSession(); String query = "from Brand brand where brand.brandName = :brandName and brand.status = :status"; List<Brand> brandList = session.createQuery(query).setString("brandName", brandName).setInteger("status", status).setCacheable(true).list(); if(brandList != null && brandList.size() > 0){ isValidBrand = false; } return isValidBrand; } }
[ "plakshunnaidu@gmail.com" ]
plakshunnaidu@gmail.com
59db82c191bbb0d95cd368685b937feaaf8ffff8
33156d05be5ae4c19fea0c8dd698404fc6391357
/src/main/java/cn/tedu/store/mapper/GoodsCategoryMapper.java
e1ac1dfd9156dfeb18ee03a7dc29b9bf7a403536
[]
no_license
chenjiabing666/TeduStore
a3b800c639e61167ed28cb632bd2e0f551b7d2eb
46a0bd51d8e9ca739af171c0b856430c250f8e48
refs/heads/master
2020-03-21T06:48:40.720834
2018-06-22T02:11:32
2018-06-22T02:11:32
138,243,323
1
0
null
null
null
null
UTF-8
Java
false
false
705
java
package cn.tedu.store.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import cn.tedu.store.bean.GoodsCategory; /** * ๅ•†ๅ“ๅˆ†็ฑป็š„mapperๆŽฅๅฃ * @author chenjiabing */ public interface GoodsCategoryMapper { /** * ๆ นๆฎparentIdๆŸฅ่ฏขๅ‡บๅ•†ๅ“ๅˆ†็ฑป * @param parentId ็ˆถ็บงid * @param offest ๅ็งป้‡ * @param count ๆŸฅ่ฏข็š„ๆ•ฐ้‡ * @return ่ฟ”ๅ›žไบŒ็บงๅ’Œไธ‰็บงๅˆ†็ฑป็š„้›†ๅˆ */ List<GoodsCategory> selectGoodsCategoryBYParentId(@Param("parentId")Integer parentId,@Param("offest")Integer offest,@Param("count")Integer count); /** * ๆ นๆฎidๆŸฅ่ฏขๅˆ†็ฑปไฟกๆฏ * @param id * @return */ GoodsCategory selectGoodCategoryById(Integer id); }
[ "18796327106@163.com" ]
18796327106@163.com
a1c0006ccd2e427e2c888b1f5b9cf47043f7c036
f62b80bf6a8df55c83f035e79639ef279c677d01
/src/main/java/com/ringcentral/definitions/MobilePickupData.java
0cb232e377ce4c9efe519e9a2e9d7745b4c45f4a
[]
no_license
ringcentral/ringcentral-java
2776c83b7ec822b2ac01b8abed6a29e9d288d9da
b0fb081ffa48151d1a9b72517d2a5144a41144a5
refs/heads/master
2023-09-01T19:01:31.720178
2023-08-21T20:51:29
2023-08-21T20:51:29
55,440,696
17
27
null
2023-08-21T20:27:22
2016-04-04T20:00:47
Java
UTF-8
Java
false
false
1,020
java
package com.ringcentral.definitions; public class MobilePickupData { /** * List of extension IDs, configured to pick up a call from Desktop/Mobile applications */ public String[] ccMailboxes; /** * SIP proxy registration name */ public String to; /** * User data */ public String sid; /** * User data */ public String srvlvl; /** * User data */ public String srvLvlExt; public MobilePickupData ccMailboxes(String[] ccMailboxes) { this.ccMailboxes = ccMailboxes; return this; } public MobilePickupData to(String to) { this.to = to; return this; } public MobilePickupData sid(String sid) { this.sid = sid; return this; } public MobilePickupData srvlvl(String srvlvl) { this.srvlvl = srvlvl; return this; } public MobilePickupData srvLvlExt(String srvLvlExt) { this.srvLvlExt = srvLvlExt; return this; } }
[ "tyler4long@gmail.com" ]
tyler4long@gmail.com
ad6c405726882ad93b7932a7a32433221cb41088
5211a5dfeaad7499f15e73347a9945840d174e01
/src/main/java/com/aplos/common/backingpage/PageRequestListPage.java
82200c5958225ac23ad289c84923b481b8ad7126
[]
no_license
aplossystems/aplos-common
f406a5633480dfdb354a6de070facd9c5d2bf4bc
6a08a5acb1509ac9b033031c0f4ed60e7ad6cb92
refs/heads/master
2022-09-25T11:38:31.300861
2021-07-18T22:07:01
2021-07-18T22:07:01
38,530,563
0
2
null
2022-09-01T22:42:57
2015-07-04T10:36:40
Java
UTF-8
Java
false
false
3,420
java
package com.aplos.common.backingpage; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.model.SelectItem; import org.primefaces.model.SortOrder; import com.aplos.common.AplosLazyDataModel; import com.aplos.common.annotations.AssociatedBean; import com.aplos.common.aql.BeanDao; import com.aplos.common.beans.DataTableState; import com.aplos.common.beans.PageRequest; @ManagedBean @ViewScoped @AssociatedBean(beanClass=PageRequest.class) public class PageRequestListPage extends ListPage { private static final long serialVersionUID = 4254603330573726408L; @Override public AplosLazyDataModel getAplosLazyDataModel( DataTableState dataTableState, BeanDao aqlBeanDao) { return new PageRequestLdm(dataTableState, aqlBeanDao); } public class PageRequestLdm extends AplosLazyDataModel { private static final long serialVersionUID = 1713702560436522536L; private static final String ALL_PAGES = "All pages"; private static final String FRONTEND_ONLY = "Frontend only"; private static final String BACKEND_ONLY = "Backend only"; private boolean isShowingOnlyStatus404 = false; private boolean isShowingOnlySessionIdCreated = false; private String selectedPageVisibility; public PageRequestLdm(DataTableState dataTableState, BeanDao aqlBeanDao) { super(dataTableState, aqlBeanDao); } @Override public List<Object> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) { getBeanDao().clearWhereCriteria(); if( isShowingOnlyStatus404() ) { getBeanDao().addWhereCriteria( "bean.isStatus404 = true" ); } if( FRONTEND_ONLY.equals( getSelectedPageVisibility() ) ) { getBeanDao().addWhereCriteria( "bean.isFrontend = true" ); } else if( BACKEND_ONLY.equals( getSelectedPageVisibility() ) ) { getBeanDao().addWhereCriteria( "bean.isFrontend = false" ); } if( isShowingOnlySessionIdCreated() ) { getBeanDao().addWhereCriteria( "bean.sessionCreated = true" ); } return super.load(first, pageSize, sortField, sortOrder, filters); } public String getSessionIdStyle() { PageRequest pageRequest = (PageRequest) getAplosBean(); if( pageRequest != null && pageRequest.isSessionCreated() ) { return "background-color:green"; } return ""; } public List<SelectItem> getPageVisibilitySelectItems() { List<SelectItem> selectItems = new ArrayList<SelectItem>(); selectItems.add( new SelectItem( ALL_PAGES ) ); selectItems.add( new SelectItem( FRONTEND_ONLY ) ); selectItems.add( new SelectItem( BACKEND_ONLY ) ); return selectItems; } public boolean isShowingOnlyStatus404() { return isShowingOnlyStatus404; } public void setShowingOnlyStatus404(boolean isShowingOnlyStatus404) { this.isShowingOnlyStatus404 = isShowingOnlyStatus404; } public String getSelectedPageVisibility() { return selectedPageVisibility; } public void setSelectedPageVisibility(String selectedPageVisibility) { this.selectedPageVisibility = selectedPageVisibility; } public boolean isShowingOnlySessionIdCreated() { return isShowingOnlySessionIdCreated; } public void setShowingOnlySessionIdCreated( boolean isShowingOnlySessionIdCreated) { this.isShowingOnlySessionIdCreated = isShowingOnlySessionIdCreated; } } }
[ "info@aplossystems.co.uk" ]
info@aplossystems.co.uk
e64adae12af623f0fead516fa3e7fcad8dc9768c
8502e1e47522318bf3539d5ef057f124e2e75166
/1.4/test/utils/cache/TestJavaMethod.java
2b1decd3bcdc9547c56a5ee508cc61a26db9dfd0
[ "Apache-2.0" ]
permissive
YellowfinBI/apache-axis
5833d3b86ab9fef3f3264c05592ef7ed66e6970a
e7640afc686fb3f48a211bc956e03820c345c4ba
refs/heads/master
2023-05-24T17:22:30.715882
2023-05-18T00:56:42
2023-05-18T00:56:42
78,585,682
0
1
null
2023-05-18T00:56:43
2017-01-10T23:56:51
Java
UTF-8
Java
false
false
2,754
java
package test.utils.cache; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.axis.utils.cache.JavaMethod; import java.lang.reflect.Method; public class TestJavaMethod extends TestCase { public TestJavaMethod (String name) { super(name); } public static Test suite() { return new TestSuite(TestJavaMethod.class); } protected void setup() { } public void testGetMethodWithVectorMethods() { Class vector = new java.util.Vector().getClass(); JavaMethod jmAdd = new JavaMethod(vector, "add"); assertNotNull("jmAdd was null", jmAdd); Method[] adds = jmAdd.getMethod(); assertEquals("There are not 2 add methods as expected, there are " + adds.length, 2, adds.length); for (int i = 0; i < adds.length; ++i) { if (adds[i].getReturnType().equals(boolean.class)) { assertEquals("Unexpected boolean add signature", "public synchronized boolean java.util.Vector.add(java.lang.Object)", adds[i].toString()); } else { assertEquals("Unexpected void add signature", "public void java.util.Vector.add(int,java.lang.Object)", adds[i].toString()); } } } public void testGetMethodWithOverloadedStringValueOf() { /* RJB - now that I've removed the numArgs parameter, is this test really testing anything? Class str = new String().getClass(); JavaMethod jm = new JavaMethod(str, "valueOf"); assertNotNull("JavaMethod is null", jm); Method methodWithOneParam = jm.getMethod()[0]; assertEquals("Method with one param is not 'valueOf'", "valueOf",methodWithOneParam.getName()); Method methodWithThreeParams = jm.getMethod()[0]; assertEquals("Method with two params is not 'valueOf'", "valueOf",methodWithThreeParams.getName()); assertEquals("Method with one param return type is not 'java.lang.String'", "java.lang.String", methodWithOneParam.getReturnType().getName()); assertEquals("Method with two parama return type is not 'java.lang.String'", "java.lang.String", methodWithThreeParams.getReturnType().getName()); boolean gotError = false; try { Method nonceMethod = jm.getMethod()[0]; //should be no valueOf() method with 2 params nonceMethod.getName(); } catch (NullPointerException ex) { gotError = true; } assertTrue("Expected NullPointerException", gotError); */ } }
[ "deepak.narayan@yellowfin.bi" ]
deepak.narayan@yellowfin.bi
1e1a4dc0202b48ad9a6ee7ab13656018536b092d
c1f11feaf39dbfe0044c1f2945f82dc45fd8d6be
/boyer01111523/Helipad.java
9c64bc12343e0865f369d458b79f64047d49aea9
[]
no_license
0x70b1a5/Battlecode2015
7ac515c424b2930af16d402483ff55f8fa97eed5
a1e7e5255e8394df4689213ae22824b936670291
refs/heads/master
2021-05-28T03:01:20.029752
2015-02-12T23:44:11
2015-02-12T23:44:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package boyer01111523; import battlecode.common.*; public class Helipad extends BuildableRobot { public Helipad(RobotController robotController) { super(robotController); } public void run() { super.run(); try { if (this.robotController.isCoreReady()) { this.trySpawn(this.movementController.randomDirection(), Drone.type()); } } catch (GameActionException exception) { } this.robotController.yield(); } // MARK: Static Helpers public static RobotType type() { return RobotType.HELIPAD; } }
[ "aaronwojnowski@gmail.com" ]
aaronwojnowski@gmail.com
fdf302ba0979e7122a8762d8e988a1390878885e
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/scripts/quests/_10317_OrbisWitch.java
bdad2a0fcd63e123c09a8c47db38982f3ae7223b
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,785
java
package dwo.scripts.quests; import dwo.gameserver.model.actor.L2Npc; import dwo.gameserver.model.actor.instance.L2PcInstance; import dwo.gameserver.model.world.quest.Quest; import dwo.gameserver.model.world.quest.QuestSound; import dwo.gameserver.model.world.quest.QuestState; import dwo.gameserver.model.world.quest.QuestType; /** * L2GOD Team * User: ANZO * Date: 18.04.12 * Time: 5:07 */ public class _10317_OrbisWitch extends Quest { // ะšะฒะตัั‚ะพะฒั‹ะต ะฟะตั€ัะพะฝะฐะถะธ private static final int ะžะฟะตั€ะฐ = 32946; private static final int ะขะธะฟะธั = 32892; public _10317_OrbisWitch() { addStartNpc(ะžะฟะตั€ะฐ); addTalkId(ะžะฟะตั€ะฐ, ะขะธะฟะธั); } public static void main(String[] args) { new _10317_OrbisWitch(); } @Override public int getQuestId() { return 10317; } @Override public String onEvent(String event, QuestState qs) { if(event.equals("quest_accept") && !qs.isCompleted()) { qs.startQuest(); return "mde_ug_cat_opera_q10317_08.htm"; } return null; } @Override public String onAsk(L2PcInstance player, L2Npc npc, QuestState st, int reply) { if(npc.getNpcId() == ะžะฟะตั€ะฐ) { switch(reply) { case 1: return "mde_ug_cat_opera_q10317_04.htm"; case 2: return "mde_ug_cat_opera_q10317_05.htm"; case 3: return "mde_ug_cat_opera_q10317_06.htm"; case 4: return "mde_ug_cat_opera_q10317_07.htm"; } } else if(npc.getNpcId() == ะขะธะฟะธั) { if(reply == 1 && st.getCond() == 1) { st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH); st.addExpAndSp(74128050, 3319695); st.giveAdena(506760, true); st.exitQuest(QuestType.ONE_TIME); return "orbis_typia_q10317_02.htm"; } } return null; } @Override public String onTalk(L2Npc npc, QuestState st) { L2PcInstance player = st.getPlayer(); if(npc.getNpcId() == ะžะฟะตั€ะฐ) { switch(st.getState()) { case COMPLETED: return "mde_ug_cat_opera_q10317_02.htm"; case CREATED: QuestState previous = player.getQuestState(_10316_UndecayingMemoryOfThePast.class); return previous == null || !previous.isCompleted() || player.getLevel() < 95 ? "mde_ug_cat_opera_q10317_03.htm" : "mde_ug_cat_opera_q10317_01.htm"; case STARTED: return "mde_ug_cat_opera_q10317_09.htm"; } } else if(npc.getNpcId() == ะขะธะฟะธั) { switch(st.getState()) { case COMPLETED: return "orbis_typia_q10317_03.htm"; case STARTED: return "orbis_typia_q10317_01.htm"; } } return getNoQuestMsg(player); } @Override public boolean canBeStarted(L2PcInstance player) { QuestState previous = player.getQuestState(_10316_UndecayingMemoryOfThePast.class); return previous != null && previous.isCompleted() && player.getLevel() >= 95; } }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
e6917f5365d621272f919b9ac34cca423409241d
183732491ccf0693b044163c3eb9a0e657fcce94
/phloc-commons/src/main/java/com/phloc/commons/typeconvert/impl/DateTimeTypeConverterRegistrar.java
428fc149cb56bfc29c24e7eae74e347a7c87c7c7
[]
no_license
phlocbg/phloc-commons
9b0d6699af33d67ee832c14e0594c97cef44c05d
6f86abe9c4bb9f9f94fe53fc5ba149356f88a154
refs/heads/master
2023-04-23T22:25:52.355734
2023-03-31T18:09:10
2023-03-31T18:09:10
41,243,446
0
0
null
2022-07-01T22:17:52
2015-08-23T09:19:38
Java
UTF-8
Java
false
false
4,620
java
/** * Copyright (C) 2006-2015 phloc systems * http://www.phloc.com * office[at]phloc[dot]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.phloc.commons.typeconvert.impl; import java.util.Calendar; import java.util.Date; import javax.annotation.Nonnull; import javax.annotation.concurrent.Immutable; import com.phloc.commons.annotations.IsSPIImplementation; import com.phloc.commons.string.StringParser; import com.phloc.commons.typeconvert.ITypeConverter; import com.phloc.commons.typeconvert.ITypeConverterRegistrarSPI; import com.phloc.commons.typeconvert.ITypeConverterRegistry; import com.phloc.commons.typeconvert.rule.AbstractTypeConverterRuleAssignableSourceFixedDestination; /** * Register the date and time specific type converter * * @author Philip Helger */ @Immutable @IsSPIImplementation public final class DateTimeTypeConverterRegistrar implements ITypeConverterRegistrarSPI { public void registerTypeConverter (@Nonnull final ITypeConverterRegistry aRegistry) { // Calendar aRegistry.registerTypeConverter (Calendar.class, String.class, new ITypeConverter () { @Nonnull public String convert (@Nonnull final Object aSource) { return Long.toString (((Calendar) aSource).getTimeInMillis ()); } }); aRegistry.registerTypeConverter (Calendar.class, Long.class, new ITypeConverter () { @Nonnull public Long convert (@Nonnull final Object aSource) { return Long.valueOf (((Calendar) aSource).getTimeInMillis ()); } }); aRegistry.registerTypeConverter (Calendar.class, Date.class, new ITypeConverter () { @Nonnull public Date convert (@Nonnull final Object aSource) { return ((Calendar) aSource).getTime (); } }); aRegistry.registerTypeConverter (String.class, Calendar.class, new ITypeConverter () { @Nonnull public Calendar convert (@Nonnull final Object aSource) { final Calendar aCal = Calendar.getInstance (); aCal.setTimeInMillis (StringParser.parseLong ((String) aSource, 0)); return aCal; } }); aRegistry.registerTypeConverterRule (new AbstractTypeConverterRuleAssignableSourceFixedDestination (Number.class, Calendar.class) { @Nonnull public Calendar convert (@Nonnull final Object aSource) { final Calendar aCal = Calendar.getInstance (); aCal.setTimeInMillis (((Number) aSource).longValue ()); return aCal; } }); // Date aRegistry.registerTypeConverter (Date.class, Calendar.class, new ITypeConverter () { @Nonnull public Calendar convert (@Nonnull final Object aSource) { final Calendar aCal = Calendar.getInstance (); aCal.setTime ((Date) aSource); return aCal; } }); aRegistry.registerTypeConverter (Date.class, String.class, new ITypeConverter () { @Nonnull public String convert (@Nonnull final Object aSource) { return Long.toString (((Date) aSource).getTime ()); } }); aRegistry.registerTypeConverter (Date.class, Long.class, new ITypeConverter () { @Nonnull public Long convert (@Nonnull final Object aSource) { return Long.valueOf (((Date) aSource).getTime ()); } }); aRegistry.registerTypeConverter (String.class, Date.class, new ITypeConverter () { @Nonnull public Date convert (@Nonnull final Object aSource) { return new Date (StringParser.parseLong ((String) aSource, 0)); } }); aRegistry.registerTypeConverterRule (new AbstractTypeConverterRuleAssignableSourceFixedDestination (Number.class, Date.class) { @Nonnull public Date convert (@Nonnull final Object aSource) { return new Date (((Number) aSource).longValue ()); } }); } }
[ "bg@phloc.com" ]
bg@phloc.com
16948fc7f7196615514875cb59714d13fe7ad0db
e0276b8ecd4039b6c36c54b14349e18e86698291
/app/src/main/java/com/example/administrator/weiraoeducationinstitution/fragment/manage/Manage_Leave_StudentFragment.java
6669a25223843982cf6129d1192e885ebf51d4db
[]
no_license
Yangyuyangyu/WREInstitutionFirstEdition
62c285b7f49aced36620c79ff8a849a34b0be455
2c52314e6d314f37a295c1f662c5fcb963f135f7
refs/heads/master
2020-01-23T21:56:06.411238
2016-11-25T05:44:02
2016-11-25T05:44:02
74,729,004
0
0
null
null
null
null
UTF-8
Java
false
false
4,993
java
package com.example.administrator.weiraoeducationinstitution.fragment.manage; import android.support.v7.widget.LinearLayoutManager; import com.example.administrator.weiraoeducationinstitution.BaseApplication; import com.example.administrator.weiraoeducationinstitution.R; import com.example.administrator.weiraoeducationinstitution.adapter.manage.Manage_AskForLeaveAdapter; import com.example.administrator.weiraoeducationinstitution.bean.manage.Manage_LeaveBean; import com.example.administrator.weiraoeducationinstitution.bean.manage.leave.LeaveBean; import com.example.administrator.weiraoeducationinstitution.constants.Apis; import com.example.administrator.weiraoeducationinstitution.fragment.base.BaseFragment; import com.example.administrator.weiraoeducationinstitution.utils.HttpUtils; import com.example.administrator.weiraoeducationinstitution.utils.ToastUtils; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.jcodecraeer.xrecyclerview.ProgressStyle; import com.jcodecraeer.xrecyclerview.XRecyclerView; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; /** * Created by Administrator on 2016/5/3. */ public class Manage_Leave_StudentFragment extends BaseFragment { private static final String TAG = "Manage_Leave_StudentFragment"; private static final int ACTION_REFRESH = 1; private static final int ACTION_LOAD_MORE = 2; private int mCurrentAction = ACTION_REFRESH; private XRecyclerView mRecyclerView; private Manage_AskForLeaveAdapter mBookAdapter; private String mCurrentKeyWord; private int mPageSize = 10; private int mCurrentPageIndex = 1; @Override protected int setLayoutResourceID() { return R.layout.fragment_leave_student; } @Override protected void init() { } @Override protected void initData() { mRecyclerView.setRefreshing(true); } @Override protected void initView() { LinearLayoutManager LayoutManager = new LinearLayoutManager(getContext()); mRecyclerView = customFindViewById(R.id.askforleave_student_recyclerview); mBookAdapter = new Manage_AskForLeaveAdapter(getMContext(), new ArrayList<LeaveBean>()); mRecyclerView.setAdapter(mBookAdapter); mRecyclerView.setLayoutManager(LayoutManager); mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { @Override public void onRefresh() { switchAction(ACTION_REFRESH); } @Override public void onLoadMore() { switchAction(ACTION_LOAD_MORE); } }); mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallClipRotatePulse); mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.SquareSpin); } private void getData() { String reqUrl = Apis.GetManageType(BaseApplication.user_info.getId(), "3"); HttpUtils.getInstance().loadString(reqUrl, new HttpUtils.HttpCallBack() { @Override public void onLoading() { } @Override public void onSuccess(String result) { try { JSONObject jsonObject = new JSONObject(result); if(jsonObject.getString("code").equals("0")){ Gson gson = new Gson(); Manage_LeaveBean ml = gson.fromJson( jsonObject.getString("data"), new TypeToken<Manage_LeaveBean>() { }.getType()); mBookAdapter.addAll(ml.getStudent()); loadComplete(); mRecyclerView.setLoadingMoreEnabled(false); }else { ToastUtils.getInstance().showToast(jsonObject.getString("msg")); } } catch (JSONException e) { e.printStackTrace(); } } @Override public void onError(Exception e) { ToastUtils.getInstance().showToast(e.getMessage()); loadComplete(); } }); } private void loadComplete() { if (mCurrentAction == ACTION_REFRESH) mRecyclerView.refreshComplete(); if (mCurrentAction == ACTION_LOAD_MORE) mRecyclerView.loadMoreComplete(); } private void switchAction(int action) { mCurrentAction = action; switch (mCurrentAction) { case ACTION_REFRESH: mBookAdapter.clear(); mCurrentPageIndex = 1; break; case ACTION_LOAD_MORE: mCurrentPageIndex++; break; } getData(); } }
[ "394975750@qq.com" ]
394975750@qq.com
6455ebba16aab30682d7f4a75e1ac2e24ac312d3
cfb6a37d986ceef219c4dd87e27c1babd6e54cd9
/GoldenMango/app/src/main/java/com/goldenmango/lottery/component/CycleViewPagerIdleListener.java
b5a2bc6555e7263b12154f001311aaf7d90901b2
[]
no_license
azbjx5288/shangjia
3d975b0924bb0e3d7b1b6c1e7402f3d314d1ae3d
9af270fc94bcd60a5f33399c0ab3ad71c384c803
refs/heads/master
2021-09-22T15:43:00.720327
2018-09-11T12:58:48
2018-09-11T12:58:48
139,444,560
0
1
null
null
null
null
UTF-8
Java
false
false
274
java
package com.goldenmango.lottery.component; import android.view.View; /** * Created on 2016/2/03. * * @author ACE * @ๅŠŸ่ƒฝๆ่ฟฐ: viewpagerๅค„ไบŽ็ฉบ้—ฒ็Šถๆ€็›‘ๅฌๅ™จ */ public interface CycleViewPagerIdleListener { void onPagerSelected(View view, int position); }
[ "429533813@qq.com" ]
429533813@qq.com
d0156c3982851cc06bec1dec234af8538cef4f9b
703ee21288e3fd6d30d93045e85bc4b42deb24ae
/skysail.server.ext.osgi.monitor/src/de/twenty11/skysail/server/ext/osgi/monitor/agent/callback/serviceregistration/ServiceRegistrationCallback.java
27bd5281a59e7519abbccfd5f276ac56f33827f2
[]
no_license
evandor/skysail-server-ext
7debeb727bc2dda6e13470865f4f53b622bc1814
7ce442beb05b07c925a62c9fc51c236ba4b29fbe
refs/heads/master
2021-01-02T09:02:22.752209
2014-10-06T15:30:15
2014-10-06T15:30:15
2,910,524
0
0
null
null
null
null
UTF-8
Java
false
false
2,919
java
package de.twenty11.skysail.server.ext.osgi.monitor.agent.callback.serviceregistration; import org.osgi.framework.ServiceRegistration; import org.slf4j.Logger; import de.twenty11.skysail.server.ext.osgi.monitor.agent.MethodIdentifier; import de.twenty11.skysail.server.ext.osgi.monitor.agent.callback.OsgiMonitorCallback; import de.twenty11.skysail.server.ext.osgi.monitor.agent.callback.messages.RuntimeExceptionMessage; import de.twenty11.skysail.server.ext.osgi.monitor.agent.instrumentation.serviceregistration.UnregisterServiceInstrumentation; import de.twenty11.skysail.server.ext.osgi.monitor.agent.messages.serviceregistration.UnregisterServiceMessage; /** * the class called from the instrumented methods. * */ public class ServiceRegistrationCallback extends OsgiMonitorCallback { private static Logger agentLogger; static { addMethodCallback(new MethodIdentifier(ServiceRegistration.class.getName(), "unregister", "()V"), new UnregisterServiceInstrumentation(ServiceRegistrationCallback.class.getSimpleName(), "unregister")); } public static void unregister(ServiceRegistration sr) { logJson(new UnregisterServiceMessage(sr)); // String logMsgPrefix = getLogMsgPrefix("sr", "unregister"); // String ref = sr.toString(); // String bsn = ""; // String properties = ""; // String usedBy = ""; // ServiceReference reference = sr.getReference(); // if (reference != null) { // bsn = reference.getBundle().getSymbolicName(); // String[] propertyKeys = reference.getPropertyKeys(); // StringBuilder sb = new StringBuilder(); // for (String key : propertyKeys) { // Object property = reference.getProperty(key); // sb.append(key).append(": ").append(property.toString()).append(", "); // } // properties = sb.toString(); // Bundle[] usingBundles = reference.getUsingBundles(); // if (usingBundles != null) { // sb = new StringBuilder(); // for (Bundle bundle : usingBundles) { // sb.append(bundle.getSymbolicName()).append(", "); // } // usedBy = sb.toString(); // } // } // agentLogger.info("{" + logMsgPrefix + "\"bsn\": \"{}\", \n\"props\": \"{}\", \n\"usedBy\": \"{}\"},", // new Object[] { bsn, properties, usedBy }); } public static void catchMe(ServiceRegistration sr, String objectName, String methodName, RuntimeException e) { agentLogger.info("{\"type\": \"sr\", \"method\": \"{}\", \"bsn\": \"{}\"},", methodName, sr.toString()); } @Override public void setAgentLogger(Logger agentlogger) { ServiceRegistrationCallback.agentLogger = agentlogger; } public static void catchMe(String methodName, RuntimeException e) { logJson(new RuntimeExceptionMessage("sr", methodName, e)); } }
[ "evandor@gmail.com" ]
evandor@gmail.com
b08f3481b87067fe9bfef29226c076ab39538a01
c2bf5b82f209f41746d3b56b593db4a457e8bbd3
/src/main/java/br/com/travelmate/dao/Video4Dao.java
4ab0f75d8c801e917af54af7f960374ccc25c982
[]
no_license
julioizidoro/systm-com
93d008f4d291bc2e1eda33ec32abdbc537388795
ecf99caebbf59adc2bda33c7a3925794f796980d
refs/heads/master
2020-03-27T10:52:17.319659
2018-08-29T19:59:32
2018-08-29T19:59:32
146,450,606
0
0
null
null
null
null
UTF-8
Java
false
false
1,365
java
package br.com.travelmate.dao; import java.sql.SQLException; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.Query; import br.com.travelmate.connection.ConectionFactory; import br.com.travelmate.model.Video4; public class Video4Dao { public Video4 salvar(Video4 video4) throws SQLException{ EntityManager manager; manager = ConectionFactory.getInstance(); EntityTransaction tx = manager.getTransaction(); tx.begin(); video4 = manager.merge(video4); tx.commit(); return video4; } public List<Video4> listar(String sql)throws SQLException{ EntityManager manager; manager = ConectionFactory.getInstance(); Query q = manager.createQuery(sql); List<Video4> lista = q.getResultList(); return lista; } public void excluir(int idvideo4) throws SQLException { EntityManager manager = ConectionFactory.getInstance(); EntityTransaction tx = manager.getTransaction(); tx.begin(); Query q = manager.createQuery("Select v from Video4 v where v.idvideo4=" + idvideo4); if (q.getResultList().size()>0){ Video4 video4 = (Video4) q.getResultList().get(0); manager.remove(video4); } tx.commit(); } }
[ "julioizidoro@192.168.100.17" ]
julioizidoro@192.168.100.17
8cb632eb350a35b589eca5f3d5b8d4719603c3d9
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/LaserTankGGJ2017/src/net/worldwizard/lasertank/objects/Flag.java
495da2a25246edc9947c380053ae7753b07f67d1
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package net.worldwizard.lasertank.objects; import java.util.ArrayList; import net.worldwizard.lasertank.assets.GameImage; import net.worldwizard.lasertank.assets.GameImageCache; public class Flag extends GameObject { public Flag() { super(); this.setFrames(3); final ArrayList<GameImage> frames = new ArrayList<>(); frames.add(GameImageCache.get("flag_1")); frames.add(GameImageCache.get("flag_2")); frames.add(GameImageCache.get("flag_3")); this.setFrameAppearances(frames); this.setGoal(); } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
29c7497bcc1e0f7caf957627666b42e2a561483a
38a9418eb677d671e3f7e88231689398de0d232f
/baekjoon/src/main/java/p9295/Main.java
6555685c6f5fd82653d16dd9d5deb7c26cba3f6d
[]
no_license
csj4032/enjoy-algorithm
66c4774deba531a75058357699bc29918fc3a7b6
a57f3c1af3ac977af4d127de20fbee101ad2c33c
refs/heads/master
2022-08-25T03:06:36.891511
2022-07-09T03:35:21
2022-07-09T03:35:21
99,533,493
0
1
null
null
null
null
UTF-8
Java
false
false
555
java
package p9295; import java.util.Scanner; /** * ์ œ๋ชฉ : ์ฃผ์‚ฌ์œ„ * ๋งํฌ : https://www.acmicpc.net/problem/9295 */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); int n = sc.nextInt(); for (int i = 0; i < n; i++) { int a = sc.nextInt(); int b = sc.nextInt(); sb.append("Case " + (i + 1) + ": " + (a + b)); sb.append("\n"); } System.out.println(sb); } }
[ "csj4032@gmail.com" ]
csj4032@gmail.com
df5cfdaf7c162edceeeb2bf77db23a4b67c10264
25f8d4356382803f8654e89ff5d6a4e3b03eb73f
/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation_Test.java
437ec1fad99f8a9537dc8208ceada8cfa9fd9804
[ "Apache-2.0" ]
permissive
apache/juneau
606e71d4844084f6cb171a6ca610a31b311e287c
7af94c52ed6becff8c5dcde3f5bf0f57da59c9f6
refs/heads/master
2023-08-31T07:59:07.405183
2023-08-30T22:20:07
2023-08-30T22:20:07
64,732,665
76
37
Apache-2.0
2023-09-09T12:15:28
2016-08-02T07:00:07
Java
UTF-8
Java
false
false
4,449
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.juneau.rest.annotation; import static org.apache.juneau.assertions.Assertions.*; import static org.junit.Assert.*; import static org.junit.runners.MethodSorters.*; import org.apache.juneau.*; import org.junit.*; @FixMethodOrder(NAME_ASCENDING) public class RestPostCallAnnotation_Test { private static final String CNAME = RestPostCallAnnotation_Test.class.getName(); //------------------------------------------------------------------------------------------------------------------ // Basic tests //------------------------------------------------------------------------------------------------------------------ RestPostCall a1 = RestPostCallAnnotation.create() .on("a") .build(); RestPostCall a2 = RestPostCallAnnotation.create() .on("a") .build(); @Test public void a01_basic() { assertObject(a1).asJson().is("" + "{" + "on:['a']" + "}" ); } @Test public void a02_testEquivalency() { assertObject(a1).is(a2); assertInteger(a1.hashCode()).is(a2.hashCode()).isNotAny(0,-1); } //------------------------------------------------------------------------------------------------------------------ // PropertyStore equivalency. //------------------------------------------------------------------------------------------------------------------ @Test public void b01_testEquivalencyInPropertyStores() { BeanContext bc1 = BeanContext.create().annotations(a1).build(); BeanContext bc2 = BeanContext.create().annotations(a2).build(); assertTrue(bc1 == bc2); } //------------------------------------------------------------------------------------------------------------------ // Other methods. //------------------------------------------------------------------------------------------------------------------ public static class C1 { public int f1; public void m1() {} } public static class C2 { public int f2; public void m2() {} } @Test public void c01_otherMethods() throws Exception { RestPostCall c4 = RestPostCallAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build(); assertObject(c4).asJson().isContains("on:['"+CNAME+"$C1.m1()','"+CNAME+"$C2.m2()']"); } //------------------------------------------------------------------------------------------------------------------ // Comparison with declared annotations. //------------------------------------------------------------------------------------------------------------------ @RestPostCall( on="a" ) public static class D1 {} RestPostCall d1 = D1.class.getAnnotationsByType(RestPostCall.class)[0]; @RestPostCall( on="a" ) public static class D2 {} RestPostCall d2 = D2.class.getAnnotationsByType(RestPostCall.class)[0]; @Test public void d01_comparisonWithDeclarativeAnnotations() { assertObject(d1).is(d2).is(a1); assertInteger(d1.hashCode()).is(d2.hashCode()).is(a1.hashCode()).isNotAny(0,-1); } }
[ "james.bognar@salesforce.com" ]
james.bognar@salesforce.com
0483c12b73266d521442ae58facd027783751779
4a6061b7e12e287811e490200e9d0ec7929f6539
/src/com/gs/manager/GuestManager.java
a398a7aa2647a426dda6774f88e0689390e4c408
[]
no_license
kensenjohn/CallSeat
08ef3b302f43d9abe80446edcd5530a9228b1876
c7bbf75c413628c07f5fe44499e5017d2966d1bd
refs/heads/master
2020-04-10T08:08:43.035686
2015-08-17T20:48:39
2015-08-17T20:48:39
2,675,514
0
0
null
null
null
null
UTF-8
Java
false
false
3,064
java
package com.gs.manager; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.gs.bean.GuestBean; import com.gs.common.exception.ExceptionHandler; import com.gs.common.ParseUtil; import com.gs.data.GuestData; public class GuestManager { private static final Logger appLogging = LoggerFactory .getLogger("AppLogging"); public GuestBean createGuest(GuestBean guestBean) { if (guestBean == null || guestBean.getGuestId() == null || guestBean.getAdminId() == null || "".equalsIgnoreCase(guestBean.getAdminId()) || "".equalsIgnoreCase(guestBean.getGuestId()) || "".equalsIgnoreCase(guestBean.getUserInfoId())) { appLogging.error("There is no guest Info to create."); } else { GuestData guestData = new GuestData(); int iNumOfRecs = guestData.insertGuest(guestBean); if (iNumOfRecs > 0) { appLogging.info("Guest creation successful for : " + guestBean.getAdminId()); } else { appLogging.error("Error creating Guest " + guestBean.getAdminId()); guestBean = null; } } return guestBean; } public GuestBean getGuest(String sGuestId) { GuestBean guestBean = new GuestBean(); if (sGuestId != null && !"".equalsIgnoreCase(sGuestId)) { GuestData guestData = new GuestData(); guestBean = guestData.getGuest(sGuestId); } return guestBean; } public ArrayList<GuestBean> getGuestsByAdmin(String sAdminId) { ArrayList<GuestBean> arrGuestBean = new ArrayList<GuestBean>(); if (sAdminId != null && !"".equalsIgnoreCase(sAdminId)) { GuestData guestData = new GuestData(); arrGuestBean = guestData.getGuestByAdmin(sAdminId); } return arrGuestBean; } public JSONObject getGuestsJson(ArrayList<GuestBean> arrGuestBean) { JSONObject jsonObject = new JSONObject(); JSONArray jsonGuestArray = new JSONArray(); try { int numOfRows = 0; if (arrGuestBean != null && !arrGuestBean.isEmpty()) { int iIndex = 0; for (GuestBean guestBean : arrGuestBean) { jsonGuestArray.put(iIndex, guestBean.toJson()); iIndex++; } numOfRows = arrGuestBean.size(); } else { } jsonObject.put("num_of_rows", ParseUtil.iToI(numOfRows)); jsonObject.put("guests", jsonGuestArray); } catch (JSONException e) { appLogging.error(ExceptionHandler.getStackTrace(e)); } return jsonObject; } public ArrayList<GuestBean> getUnInvitedEventGuests(String sAdminId, String sEventId) { ArrayList<GuestBean> arrGuestBean = new ArrayList<GuestBean>(); if (sAdminId != null && !"".equalsIgnoreCase(sAdminId)) { GuestData guestData = new GuestData(); arrGuestBean = guestData .getUninvitedEventGuests(sAdminId, sEventId); } return arrGuestBean; } public Integer deleteGuest(String sGuestId) { Integer iNumOfRecs = 0; if (sGuestId != null && !"".equalsIgnoreCase(sGuestId)) { GuestData guestData = new GuestData(); iNumOfRecs = guestData.deleteGuest(sGuestId); } return iNumOfRecs; } }
[ "kensenjohn@gmail.com" ]
kensenjohn@gmail.com
19ca2c63028f9cd4b9d71e57e2e1994dc4c14267
3192b7a984ed59da652221d11bc2bdfaa1aede00
/cmcu-common/src/main/java/com/cmcu/common/entity/CommonEdArrangeUser.java
1e91db8758545416b94dac9358c68bb6dc3bc4ba
[]
no_license
shanghaif/-wz-
e6f5eca1511f6d68c0cd6eb3c0f118e340d9ff50
c7d6e8a000fbc4b6d8fed44cd5ffe483be45440c
refs/heads/main
2023-06-08T22:35:30.125549
2021-04-30T07:03:21
2021-04-30T07:03:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
package com.cmcu.common.entity; import java.util.Date; import javax.validation.constraints.*; import lombok.Data; @Data public class CommonEdArrangeUser { private Integer id; @NotNull(message="businessKeyไธ่ƒฝไธบ็ฉบ!") @Size(max=45, message="businessKey้•ฟๅบฆไธ่ƒฝ่ถ…่ฟ‡45") private String businessKey; @NotNull(message="arrangeIdไธ่ƒฝไธบ็ฉบ!") @Max(value=999999999, message="arrangeIdๅฟ…้กปไธบๆ•ฐๅญ—") private Integer arrangeId; @NotNull(message="roleNameไธ่ƒฝไธบ็ฉบ!") @Size(max=45, message="roleName้•ฟๅบฆไธ่ƒฝ่ถ…่ฟ‡45") private String roleName; @NotNull(message="roleCodeไธ่ƒฝไธบ็ฉบ!") @Size(max=45, message="roleCode้•ฟๅบฆไธ่ƒฝ่ถ…่ฟ‡45") private String roleCode; @NotNull(message="allUserไธ่ƒฝไธบ็ฉบ!") @Size(max=450, message="allUser้•ฟๅบฆไธ่ƒฝ่ถ…่ฟ‡450") private String allUser; @NotNull(message="allUserNameไธ่ƒฝไธบ็ฉบ!") @Size(max=450, message="allUserName้•ฟๅบฆไธ่ƒฝ่ถ…่ฟ‡450") private String allUserName; @NotNull(message="isDeletedไธ่ƒฝไธบ็ฉบ!") private Boolean deleted; @NotNull(message="gmtCreateไธ่ƒฝไธบ็ฉบ!") private Date gmtCreate; @NotNull(message="gmtModifiedไธ่ƒฝไธบ็ฉบ!") private Date gmtModified; }
[ "1129913541@qq.com" ]
1129913541@qq.com
d3237b8b219004aa52cedfc742e7ebbb0cc1e6d3
1e17900597a3a7e8dbc207b3f451b5196de62b97
/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/ASTAndExpression.java
dc69dc016560e64286467f64b9daaedfa3c5aac7
[ "W3C", "Apache-2.0" ]
permissive
apache/jackrabbit
cf8e918166e6c84740ba3ae7fa68a590e410ee2b
a90a43501fc87e0b8ff6e38a70db8a17e4aeffb6
refs/heads/trunk
2023-08-24T02:53:24.324993
2023-08-08T04:10:21
2023-08-08T04:10:21
206,403
298
251
Apache-2.0
2023-08-22T21:58:06
2009-05-21T01:43:24
Java
UTF-8
Java
false
false
454
java
/* Generated By:JJTree: Do not edit this line. ASTAndExpression.java */ package org.apache.jackrabbit.spi.commons.query.sql; public class ASTAndExpression extends SimpleNode { public ASTAndExpression(int id) { super(id); } public ASTAndExpression(JCRSQLParser p, int id) { super(p, id); } /** Accept the visitor. **/ public Object jjtAccept(JCRSQLParserVisitor visitor, Object data) { return visitor.visit(this, data); } }
[ "jukka@apache.org" ]
jukka@apache.org
b81a3adaadd1a1c7a3895ebb0a0ae666be6b534b
9b888f26d3e853441c787264aafa18c0d3309940
/src/ua/com/qalight/entity/User.java
35a128c1fe84747b2fccfc3793909a2ab49d0b50
[]
no_license
Ignatenko2207/WorkWithFileSystem
430f98827494cefc3b0a52ad8766a83e9699e838
381de94f2558b5b03b030bdbfef8c24d7eaf5b38
refs/heads/master
2020-04-09T09:45:42.456716
2018-12-03T19:52:57
2018-12-03T19:52:57
160,245,492
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
package ua.com.qalight.entity; import java.io.Serializable; @SuppressWarnings("serial") public class User implements Serializable{ private String userName; private String userSurname; private Integer age; private int userId; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserSurname() { return userSurname; } public void setUserSurname(String userSurname) { this.userSurname = userSurname; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public static void showClassName() { System.out.println(User.class.getSimpleName()); } @Override public String toString() { return userName + " " + userSurname; } }
[ "ignatenko2207@gmail.com" ]
ignatenko2207@gmail.com
d2b38040d0bc2703c7db924f3d9638f989cd53ca
85fdcf0631ca2cc72ce6385c2bc2ac3c1aea4771
/temp/src/minecraft/net/minecraft/src/ItemMonsterPlacer.java
2e20d3c0b7c9e085b7b6584dfbd82417f901f14f
[]
no_license
lcycat/Cpsc410-Code-Trip
c3be6d8d0d12fd7c32af45b7e3b8cd169e0e28d4
cb7f76d0f98409af23b602d32c05229f5939dcfb
refs/heads/master
2020-12-24T14:45:41.058181
2014-11-21T06:54:49
2014-11-21T06:54:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,609
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package net.minecraft.src; import java.util.*; // Referenced classes of package net.minecraft.src: // Item, CreativeTabs, StatCollector, ItemStack, // EntityList, EntityEggInfo, World, Facing, // Block, EntityPlayer, PlayerCapabilities, Entity, // EntityVillager, EntityLiving public class ItemMonsterPlacer extends Item { public ItemMonsterPlacer(int p_i3671_1_) { super(p_i3671_1_); func_77627_a(true); func_77637_a(CreativeTabs.field_78026_f); } public String func_77628_j(ItemStack p_77628_1_) { String s = (new StringBuilder()).append("").append(StatCollector.func_74838_a((new StringBuilder()).append(func_77658_a()).append(".name").toString())).toString().trim(); String s1 = EntityList.func_75617_a(p_77628_1_.func_77960_j()); if(s1 != null) { s = (new StringBuilder()).append(s).append(" ").append(StatCollector.func_74838_a((new StringBuilder()).append("entity.").append(s1).append(".name").toString())).toString(); } return s; } public int func_77620_a(int p_77620_1_, int p_77620_2_) { EntityEggInfo entityegginfo = (EntityEggInfo)EntityList.field_75627_a.get(Integer.valueOf(p_77620_1_)); if(entityegginfo != null) { if(p_77620_2_ == 0) { return entityegginfo.field_75611_b; } else { return entityegginfo.field_75612_c; } } else { return 0xffffff; } } public boolean func_77623_v() { return true; } public int func_77618_c(int p_77618_1_, int p_77618_2_) { if(p_77618_2_ > 0) { return super.func_77618_c(p_77618_1_, p_77618_2_) + 16; } else { return super.func_77618_c(p_77618_1_, p_77618_2_); } } public boolean func_77648_a(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { if(p_77648_3_.field_72995_K) { return true; } int i = p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_, p_77648_6_); p_77648_4_ += Facing.field_71586_b[p_77648_7_]; p_77648_5_ += Facing.field_71587_c[p_77648_7_]; p_77648_6_ += Facing.field_71585_d[p_77648_7_]; double d = 0.0D; if(p_77648_7_ == 1 && i == Block.field_72031_aZ.field_71990_ca || i == Block.field_72098_bB.field_71990_ca) { d = 0.5D; } if(func_77840_a(p_77648_3_, p_77648_1_.func_77960_j(), (double)p_77648_4_ + 0.5D, (double)p_77648_5_ + d, (double)p_77648_6_ + 0.5D) && !p_77648_2_.field_71075_bZ.field_75098_d) { p_77648_1_.field_77994_a--; } return true; } public static boolean func_77840_a(World p_77840_0_, int p_77840_1_, double p_77840_2_, double p_77840_4_, double p_77840_6_) { if(!EntityList.field_75627_a.containsKey(Integer.valueOf(p_77840_1_))) { return false; } Entity entity = EntityList.func_75616_a(p_77840_1_, p_77840_0_); if(entity != null) { entity.func_70012_b(p_77840_2_, p_77840_4_, p_77840_6_, p_77840_0_.field_73012_v.nextFloat() * 360F, 0.0F); if(entity instanceof EntityVillager) { EntityVillager entityvillager = (EntityVillager)entity; entityvillager.func_70938_b(entityvillager.func_70681_au().nextInt(5)); p_77840_0_.func_72838_d(entityvillager); return true; } p_77840_0_.func_72838_d(entity); ((EntityLiving)entity).func_70642_aH(); } return entity != null; } public void func_77633_a(int p_77633_1_, CreativeTabs p_77633_2_, List p_77633_3_) { EntityEggInfo entityegginfo; for(Iterator iterator = EntityList.field_75627_a.values().iterator(); iterator.hasNext(); p_77633_3_.add(new ItemStack(p_77633_1_, 1, entityegginfo.field_75613_a))) { entityegginfo = (EntityEggInfo)iterator.next(); } } }
[ "kye.13@hotmail.com" ]
kye.13@hotmail.com
26d0dc04b04ebf5c1404dc8a4b2c51fbad6f1972
11267a673c2963cf2199653be033dbfefb36cc46
/src/main/java/com/thinkinginjava/source/annotations/database/Constraints.java
4ca411af6417c40f7102afe5eac85c6b813d91ee
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
liwanzhang/thinking-in-java-4
0516d19f28b262e0b2018fc2566cf8c072f4e92b
cfd55eaf071ff61730b8110df25a3062ae5d8d49
refs/heads/master
2021-04-15T08:58:24.425103
2018-03-26T01:49:27
2018-03-26T01:49:28
126,585,556
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
//: annotations/database/Constraints.java package com.thinkinginjava.source.annotations.database; import java.lang.annotation.*; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Constraints { boolean primaryKey() default false; boolean allowNull() default true; boolean unique() default false; } ///:~
[ "wanli.zhang@dmall.com" ]
wanli.zhang@dmall.com
0197eb4d59e2dd12d6e6af9721a1e317e1478951
553c58fbb6ad99283e09935ed00659356d406705
/blog/src/main/java/com/example/demo/DemoApplication.java
3a385565219bb55deb744e952cc9792f5f29ad7e
[]
no_license
KiMiWaWonderful/znblDaChuang
6bc2a99837fbb3a533ca06e00f2909e7a5e38f3b
ca5dc7cb5eb594d19bc59b2d0f949605d1d1e9a2
refs/heads/master
2022-12-26T09:04:55.471909
2019-11-01T02:17:58
2019-11-01T02:17:58
164,176,445
3
0
null
2022-12-16T13:43:34
2019-01-05T02:59:36
JavaScript
UTF-8
Java
false
false
499
java
package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; //@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
[ "l571209083m@gmail.com" ]
l571209083m@gmail.com
f61336c6f736c7cbf90fc2c8431801b1dc43a5a2
40665051fadf3fb75e5a8f655362126c1a2a3af6
/idylnlp-idylnlp/2dfb3cbe25ae99e501aa6c77d71c2fd6eecfeb9b/669/ModelManifestTest.java
535284cd3c665cd89270210edce23e68bb754283
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
3,156
java
/******************************************************************************* * Copyright 2019 Mountain Fog, 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 ai.idylnlp.test.model; import static org.junit.Assert.assertEquals; import org.junit.Test; import com.neovisionaries.i18n.LanguageCode; import ai.idylnlp.model.manifest.StandardModelManifest; import ai.idylnlp.model.manifest.StandardModelManifest.ModelManifestBuilder; import ai.idylnlp.testing.ObjectTest; public class ModelManifestTest extends ObjectTest<StandardModelManifest> { @Test public void builderTest() { ModelManifestBuilder builder = new ModelManifestBuilder(); builder.setBeamSize(5); builder.setCreatorVersion("version-1.2.0"); builder.setEncryptionKey("encryption"); builder.setLanguageCode(LanguageCode.de); builder.setModelFileName("model.bin"); builder.setModelId("model-id"); builder.setName("model-name"); builder.setType("model-type"); StandardModelManifest modelManifest = builder.build(); assertEquals(5, modelManifest.getBeamSize()); assertEquals("version-1.2.0", modelManifest.getCreatorVersion()); assertEquals("encryption", modelManifest.getEncryptionKey()); assertEquals("deu", modelManifest.getLanguageCode().getAlpha3().toString()); assertEquals("model.bin", modelManifest.getModelFileName()); assertEquals("model-id", modelManifest.getModelId()); assertEquals("model-name", modelManifest.getName()); assertEquals("model-type", modelManifest.getType()); } @Test public void builderWithoutBeamSizeTest() { ModelManifestBuilder builder = new ModelManifestBuilder(); builder.setCreatorVersion("version-1.2.0"); builder.setEncryptionKey("encryption"); builder.setLanguageCode(LanguageCode.de); builder.setModelFileName("model.bin"); builder.setModelId("model-id"); builder.setName("model-name"); builder.setType("model-type"); StandardModelManifest modelManifest = builder.build(); assertEquals(StandardModelManifest.DEFAULT_BEAM_SIZE, modelManifest.getBeamSize()); assertEquals("version-1.2.0", modelManifest.getCreatorVersion()); assertEquals("encryption", modelManifest.getEncryptionKey()); assertEquals("deu", modelManifest.getLanguageCode().getAlpha3().toString()); assertEquals("model.bin", modelManifest.getModelFileName()); assertEquals("model-id", modelManifest.getModelId()); assertEquals("model-name", modelManifest.getName()); assertEquals("model-type", modelManifest.getType()); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
70368fbaee28bb5e3c296313ce67bb3da69b1c6b
77835671839fd71159757cb4536faf8bb34a1f54
/src/main/java/vora/priya/JDBC/StorageTypeJDBC.java
05d28554df3d125a38fdb85df5b7094d7c29e809
[]
no_license
priyaVora/contactDatabaseJDBC
baf34b8fa334ffbf009fc6e78c8a512b638e9636
2bde196c43322d5aee60116893d85f2de6f362df
refs/heads/master
2022-07-17T08:23:28.649573
2019-08-26T15:39:28
2019-08-26T15:39:28
204,505,356
0
0
null
2022-06-21T01:45:05
2019-08-26T15:27:30
Java
UTF-8
Java
false
false
3,313
java
package vora.priya.JDBC; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.layout.Background; import javafx.scene.layout.BackgroundFill; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; public class StorageTypeJDBC { COntactDatabase_ForJDBC cd = null; public StorageTypeJDBC(Stage primaryStage, COntactDatabase_ForJDBC cd2) throws Exception { this.cd = cd2; start(primaryStage); } public void start(final Stage primaryStage) throws Exception { VBox mainContainer = new VBox(); VBox box = new VBox(); VBox buttonBox = new VBox(); box.setPadding(new Insets(11.0)); buttonBox.setPadding(new Insets(11.0)); Button button = new Button("Select"); final ComboBox<String> choice = new ComboBox<>(); choice.setPromptText("Select the Storage Type for Your Account"); choice.getItems().add("A JDBC Database Connection"); choice.getItems().add("Files on Disk"); box.getChildren().add(choice); buttonBox.getChildren().add(button); button.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { if (choice.getValue() == choice.getItems().get(0)) { System.out.println("User Selected : " + choice.getItems().get(0)+ "JDBC"); JDBC_CRUD jdbc = new JDBC_CRUD(); String jdbcConnectionString = "jdbc:mysql://localhost:3306/mycontactdb"; try(Connection con = DriverManager.getConnection(jdbcConnectionString, "myuser", "testtest")) { //createTable(con); System.out.println("Table Created Succuessfully"); //insertRecords(con); System.out.println("Records inserted succuessfully"); // updateRecord(con,3, "CSC180", "awesome@student.neumont.edu"); System.out.println("Records Updated succuessfully"); //printRecords(con); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { LoginFRAMEFORJDBC frame = new LoginFRAMEFORJDBC(primaryStage, jdbc); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } else if (choice.getValue() == choice.getItems().get(1)) { System.out.println("User Selected : " + choice.getItems().get(1) + "FILE"); try { LoginFrame frame = new LoginFrame(primaryStage); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { System.out.println("User did not select anything!"); } } }); GridPane grid = new GridPane(); mainContainer.getChildren().add(box); mainContainer.getChildren().add(buttonBox); grid.add(mainContainer, 0, 0); grid.setBackground(new Background(new BackgroundFill(Color.rgb(139, 119, 64), null, null))); Scene scene = new Scene(grid); primaryStage.setScene(scene); primaryStage.show(); } }
[ "prvora89@gmail.com" ]
prvora89@gmail.com
14d962873ccca4ecfaa4e331e67dce8da52753ea
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_aa023d77f31ddf0ae0baec474058b365b572a35b/NestedRegionModel/8_aa023d77f31ddf0ae0baec474058b365b572a35b_NestedRegionModel_s.java
61c7685429d1cc46db7f88ad1055a18ec9632911
[]
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
5,922
java
/******************************************************************************* * JBoss, Home of Professional Open Source * Copyright 2010-2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *******************************************************************************/ package org.richfaces.tests.metamer.ftest.a4jRegion; import org.apache.commons.lang.WordUtils; import org.jboss.arquillian.drone.api.annotation.Default; import org.jboss.arquillian.graphene.Graphene; import org.jboss.arquillian.graphene.GrapheneContext; import org.jboss.arquillian.graphene.enricher.WebElementUtils; import org.jboss.arquillian.graphene.enricher.findby.ByJQuery; import org.jboss.arquillian.graphene.proxy.GrapheneProxy; import org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.Select; import static org.testng.Assert.assertTrue; /** * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a> * @version $Revision: 22500 $ */ public class NestedRegionModel { private static ThreadLocal<Integer> sequence = new ThreadLocal<Integer>() { @Override protected Integer initialValue() { return 0; }; }; @FindBy(css="select[id$=defaultsSelect]") private Select selectDefaults; public void setDefaultExecute(Execute execute) { selectOrFireChange(selectDefaults, execute.option); } public void setExecute(Component component, Execute execute) { selectOrFireChange(component.select, execute.option); } private void selectOrFireChange(Select select, String visibleText) { if (!visibleText.equals(select.getFirstSelectedOption().getText())) { Graphene.guardAjax(select).selectByVisibleText(visibleText); } } public void changeInputs() { sequence.set(sequence.get() + 1); for (Component component : Component.values()) { component.input.click(); component.input.clear(); component.input.sendKeys(Integer.toString(sequence.get())); } } public enum Component { OUTER("Outer"), REGION("Region"), NESTED("Nested region"), DECORATION("Decoration"), INSERTION("Insertion"); private final Select select; private final WebElement output; private final WebElement input; private final WebElement link; private final String executeOption; private Component(String name) { final String id = name.substring(0, 1).toLowerCase() + WordUtils.capitalize(name).replace(" ", "").substring(1); GrapheneContext context = GrapheneContext.getContextFor(Default.class); final WebDriver browser = context.getWebDriver(); this.select = GrapheneProxy.getProxyForHandler(GrapheneProxyHandler.forFuture(context, new GrapheneProxy.FutureTarget() { @Override public Object getTarget() { return new Select(browser.findElement(By.cssSelector("select[id$="+id+"Select]"))); } }), Select.class); this.output = WebElementUtils.findElementLazily(By.cssSelector("span[id$="+id+"ValueOutput]"), browser); this.input = WebElementUtils.findElementLazily(ByJQuery.jquerySelector("input:text[id$="+id+"ValueInput]"), browser); this.link = WebElementUtils.findElementLazily(ByJQuery.jquerySelector("input:submit[id$="+id+"ValueButton]"), browser); this.executeOption = name; } public void fireAction() { Graphene.guardAjax(link).click(); } public boolean isChanged() { final String out = output.getText(); assertTrue("".equals(out) || Integer.toString(sequence.get()).equals(out)); return Integer.toString(sequence.get()).equals(out); } } public enum Execute { DEFAULT("default"), ALL("@all"), REGION("@region"), FORM("@form"), THIS("@this"), COMPONENT_OUTER( Component.OUTER), COMPONENT_REGION(Component.REGION), COMPONENT_NESTED(Component.NESTED), COMPONENT_DECORATION( Component.DECORATION), COMPONENT_INSERTION(Component.INSERTION); private final String option; private final Component componentBase; private Execute(String label) { this.option = label; this.componentBase = null; } private Execute(Component component) { this.option = component.executeOption; this.componentBase = component; } public boolean isComponentBased() { return componentBase != null; } public Component getComponentBase() { return componentBase; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
074d2d3f47c324fd2b795c95bf8847c622a54e95
d0750532a32fb3b9c7b7f4d97231e6f32d1ecf72
/src/main/java/com/jeesite/modules/test/entity/grid/Category.java
bb04f90435341c0b3f8289758e4b7b4ad3177792
[ "Apache-2.0" ]
permissive
zhangfan822/jeegit
13f50a3385882d3ec97d0fc37dbe1941aff488b3
929f22079a7a7c10356c1d99ef9dfda1ee3d34b8
refs/heads/master
2021-01-20T18:30:27.042785
2017-03-20T12:06:06
2017-03-20T12:06:06
90,921,537
1
0
null
2017-05-11T00:55:22
2017-05-11T00:55:22
null
UTF-8
Java
false
false
612
java
package com.jeesite.modules.test.entity.grid; import com.jeesite.common.persistence.DataEntity; import com.jeesite.common.utils.excel.annotation.ExcelField; /** * ๅ•†ๅ“ๅˆ†็ฑปEntity * @author liugf * @version 2016-10-04 */ public class Category extends DataEntity<Category> { private static final long serialVersionUID = 1L; private String name; // ็ฑปๅž‹ๅ public Category() { super(); } public Category(String id){ super(id); } @ExcelField(title="็ฑปๅž‹ๅ", align=2, sort=1) public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "3311247533@qq.com" ]
3311247533@qq.com
f68f1273dc783ace3aa5b1928997c87f50b72c75
4d97a8ec832633b154a03049d17f8b58233cbc5d
/Lang/46/Lang/evosuite-branch/5/org/apache/commons/lang/StringEscapeUtilsEvoSuite_branch_Test_scaffolding.java
89b277b6893b49c95a621d4be4b14783cf52a361
[]
no_license
4open-science/evosuite-defects4j
be2d172a5ce11e0de5f1272a8d00d2e1a2e5f756
ca7d316883a38177c9066e0290e6dcaa8b5ebd77
refs/heads/master
2021-06-16T18:43:29.227993
2017-06-07T10:37:26
2017-06-07T10:37:26
93,623,570
2
1
null
null
null
null
UTF-8
Java
false
false
6,902
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Dec 11 18:12:27 GMT 2014 */ package org.apache.commons.lang; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; public class StringEscapeUtilsEvoSuite_branch_Test_scaffolding { @org.junit.Rule public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(6000); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 5000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); setSystemProperties(); 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(); resetClasses(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("java.vm.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.specification.version", "1.7"); java.lang.System.setProperty("java.home", "/usr/local/packages6/java/jdk1.7.0_55/jre"); java.lang.System.setProperty("user.dir", "/scratch/ac1gf/Lang/46/5/run_evosuite.pl_111768_1418320927"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); java.lang.System.setProperty("awt.toolkit", "sun.awt.X11.XToolkit"); java.lang.System.setProperty("file.encoding", "UTF-8"); java.lang.System.setProperty("file.separator", "/"); java.lang.System.setProperty("java.awt.graphicsenv", "sun.awt.X11GraphicsEnvironment"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("java.awt.printerjob", "sun.print.PSPrinterJob"); java.lang.System.setProperty("java.class.path", "/data/ac1gf/defects4j/framework/projects/lib/evosuite.jar:/scratch/ac1gf/Lang/46/5/run_evosuite.pl_111768_1418320927/target/classes"); java.lang.System.setProperty("java.class.version", "51.0"); java.lang.System.setProperty("java.endorsed.dirs", "/usr/local/packages6/java/jdk1.7.0_55/jre/lib/endorsed"); java.lang.System.setProperty("java.ext.dirs", "/usr/local/packages6/java/jdk1.7.0_55/jre/lib/ext:/usr/java/packages/lib/ext"); java.lang.System.setProperty("java.library.path", "lib"); java.lang.System.setProperty("java.runtime.name", "Java(TM) SE Runtime Environment"); java.lang.System.setProperty("java.runtime.version", "1.7.0_55-b13"); java.lang.System.setProperty("java.specification.name", "Java Platform API Specification"); java.lang.System.setProperty("java.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor.url", "http://java.oracle.com/"); java.lang.System.setProperty("java.version", "1.7.0_55"); java.lang.System.setProperty("java.vm.info", "mixed mode"); java.lang.System.setProperty("java.vm.name", "Java HotSpot(TM) 64-Bit Server VM"); java.lang.System.setProperty("java.vm.specification.name", "Java Virtual Machine Specification"); java.lang.System.setProperty("java.vm.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vm.specification.version", "1.7"); java.lang.System.setProperty("java.vm.version", "24.55-b03"); java.lang.System.setProperty("line.separator", "\n"); java.lang.System.setProperty("os.arch", "amd64"); java.lang.System.setProperty("os.name", "Linux"); java.lang.System.setProperty("os.version", "2.6.32-431.23.3.el6.x86_64"); java.lang.System.setProperty("path.separator", ":"); java.lang.System.setProperty("user.country", "GB"); java.lang.System.setProperty("user.home", "/home/ac1gf"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "ac1gf"); java.lang.System.setProperty("user.timezone", "GB-Eire"); } private static void initializeClasses() { org.evosuite.runtime.ClassStateSupport.initializeClasses(StringEscapeUtilsEvoSuite_branch_Test_scaffolding.class.getClassLoader() , "org.apache.commons.lang.Entities$TreeEntityMap", "org.apache.commons.lang.Entities", "org.apache.commons.lang.IntHashMap", "org.apache.commons.lang.UnhandledException", "org.apache.commons.lang.exception.NestableDelegate", "org.apache.commons.lang.Entities$EntityMap", "org.apache.commons.lang.IntHashMap$Entry", "org.apache.commons.lang.Entities$MapIntMap", "org.apache.commons.lang.exception.NestableRuntimeException", "org.apache.commons.lang.Entities$LookupEntityMap", "org.apache.commons.lang.Entities$ArrayEntityMap", "org.apache.commons.lang.Entities$PrimitiveEntityMap", "org.apache.commons.lang.Entities$BinaryEntityMap", "org.apache.commons.lang.Entities$HashEntityMap", "org.apache.commons.lang.exception.Nestable", "org.apache.commons.lang.StringEscapeUtils", "org.apache.commons.lang.StringUtils" ); } private static void resetClasses() { org.evosuite.runtime.reset.ClassResetter.getInstance().setClassLoader(StringEscapeUtilsEvoSuite_branch_Test_scaffolding.class.getClassLoader()); org.evosuite.runtime.ClassStateSupport.resetClasses( "org.apache.commons.lang.StringEscapeUtils", "org.apache.commons.lang.Entities", "org.apache.commons.lang.StringUtils", "org.apache.commons.lang.exception.NestableRuntimeException", "org.apache.commons.lang.exception.NestableDelegate" ); } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
c3687292d9705d8659f6d11892191657c20141d8
c577f5380b4799b4db54722749cc33f9346eacc1
/BugSwarm/kairosdb-kairosdb-160772309/buggy_files/src/main/java/org/kairosdb/core/aggregator/SaveAsAggregator.java
1696f23ad87dfd0214c128a9a49ffaf7af81fbd3
[]
no_license
tdurieux/BugSwarm-dissection
55db683fd95f071ff818f9ca5c7e79013744b27b
ee6b57cfef2119523a083e82d902a6024e0d995a
refs/heads/master
2020-04-30T17:11:52.050337
2019-05-09T13:42:03
2019-05-09T13:42:03
176,972,414
1
0
null
null
null
null
UTF-8
Java
false
false
3,927
java
package org.kairosdb.core.aggregator; import com.google.common.collect.ImmutableSortedMap; import com.google.inject.Inject; import org.kairosdb.core.DataPoint; import org.kairosdb.core.aggregator.annotation.AggregatorName; import org.kairosdb.core.datastore.DataPointGroup; import org.kairosdb.core.datastore.KairosDatastore; import org.kairosdb.core.exception.DatastoreException; import org.kairosdb.core.groupby.GroupBy; import org.kairosdb.core.groupby.GroupByResult; import org.kairosdb.core.groupby.TagGroupBy; import java.util.*; /** Created by bhawkins on 8/28/15. */ @AggregatorName(name = "save_as", description = "Saves the results to a new metric.") public class SaveAsAggregator implements Aggregator, GroupByAware { private KairosDatastore m_datastore; private String m_metricName; private Map<String, String> m_tags; private int m_ttl = 0; private Set<String> m_tagsToKeep = new HashSet<>(); private boolean m_addSavedFrom = true; @Inject public SaveAsAggregator(KairosDatastore datastore) { m_datastore = datastore; m_tags = new HashMap<>(); } public void setAddSavedFrom(boolean addSavedFrom) { m_addSavedFrom = addSavedFrom; } public void setMetricName(String metricName) { m_metricName = metricName; } public void setTags(Map<String, String> tags) { m_tags = tags; } public void setTtl(int ttl) { m_ttl = ttl; } public String getMetricName() { return m_metricName; } public Map<String, String> getTags() { return m_tags; } @Override public DataPointGroup aggregate(DataPointGroup dataPointGroup) { return new SaveAsDataPointAggregator(dataPointGroup); } @Override public boolean canAggregate(String groupType) { return true; } @Override public String getAggregatedGroupType(String groupType) { return groupType; } @Override public void setGroupBys(List<GroupBy> groupBys) { for (GroupBy groupBy : groupBys) { if (groupBy instanceof TagGroupBy) { TagGroupBy tagGroupBy = (TagGroupBy) groupBy; m_tagsToKeep.addAll(tagGroupBy.getTagNames()); } } } private class SaveAsDataPointAggregator implements DataPointGroup { private DataPointGroup m_innerDataPointGroup; private ImmutableSortedMap<String, String> m_groupTags; public SaveAsDataPointAggregator(DataPointGroup innerDataPointGroup) { m_innerDataPointGroup = innerDataPointGroup; ImmutableSortedMap.Builder<String, String> mapBuilder = ImmutableSortedMap.<String, String>naturalOrder(); mapBuilder.putAll(m_tags); if (m_addSavedFrom) mapBuilder.put("saved_from", innerDataPointGroup.getName()); for (String innerTag : innerDataPointGroup.getTagNames()) { Set<String> tagValues = innerDataPointGroup.getTagValues(innerTag); if (m_tagsToKeep.contains(innerTag) && (tagValues.size() == 1)) mapBuilder.put(innerTag, tagValues.iterator().next()); } m_groupTags = mapBuilder.build(); } @Override public boolean hasNext() { return m_innerDataPointGroup.hasNext(); } @Override public DataPoint next() { DataPoint next = m_innerDataPointGroup.next(); try { m_datastore.putDataPoint(m_metricName, m_groupTags, next, m_ttl); } catch (DatastoreException e) { throw new RuntimeException("Failure to save data to "+m_metricName, e); } return next; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public String getName() { return m_innerDataPointGroup.getName(); } @Override public List<GroupByResult> getGroupByResult() { return m_innerDataPointGroup.getGroupByResult(); } @Override public void close() { m_innerDataPointGroup.close(); } @Override public Set<String> getTagNames() { return m_innerDataPointGroup.getTagNames(); } @Override public Set<String> getTagValues(String tag) { return m_innerDataPointGroup.getTagValues(tag); } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
1dc44863b207e4cfa97fe8d38c7390ccae0a692b
bd97ee707f77fbe54bea8c0407691d385d034437
/permissionsex-core/src/main/java/ninja/leaping/permissionsex/backend/sql/SqlOptionSubjectData.java
7ed969142451099d67cc9e2ab84f2d70c8652752
[ "Apache-2.0" ]
permissive
ConnorTheCelt/PermissionsEx
aa843a6fa987812a413b8c2ffcf8ae7eacc9a385
34330baf558eb67273d66b411640214955bea3e2
refs/heads/master
2021-01-21T01:25:54.889821
2015-08-28T10:42:37
2015-08-28T10:42:37
41,541,814
0
0
null
2015-08-28T10:35:23
2015-08-28T10:35:22
null
UTF-8
Java
false
false
1,317
java
/** * PermissionsEx * Copyright (C) zml and PermissionsEx contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ninja.leaping.permissionsex.backend.sql; import ninja.leaping.permissionsex.backend.memory.MemoryOptionSubjectData; import java.sql.Connection; import java.sql.SQLException; import java.util.Map; import java.util.Set; /** * Created by zml on 21.03.15. */ public class SqlOptionSubjectData extends MemoryOptionSubjectData { @Override protected MemoryOptionSubjectData newData(Map<Set<Map.Entry<String, String>>, DataEntry> contexts) { return new SqlOptionSubjectData(contexts); } SqlOptionSubjectData() { super(); } SqlOptionSubjectData(Map<Set<Map.Entry<String, String>>, DataEntry> contexts) { super(contexts); } }
[ "zml@aoeu.xyz" ]
zml@aoeu.xyz
ae0a2664db321cbc05e826db4ba9f0beadd4e1b8
f9456e29108a59df11fb4c2cd63853fa781391e6
/src/main/java/org/txazo/jdk8/interf/FunctionalInterfaceTest.java
520daf4fdb28632f23569650cc93735d98d7675c
[ "Apache-2.0" ]
permissive
txazo/java
5a974d9fbc589e9744b0e3bf2f03723468388a25
d3e9b20ee98c890bfaa464140554961d9850a06d
refs/heads/master
2022-12-25T14:58:34.752341
2021-09-16T14:41:21
2021-09-16T14:41:21
62,528,396
0
1
Apache-2.0
2022-12-10T03:27:23
2016-07-04T03:19:02
Java
UTF-8
Java
false
false
393
java
package org.txazo.jdk8.interf; import org.junit.Test; /** * ๅ‡ฝๆ•ฐๅผๆŽฅๅฃ */ public class FunctionalInterfaceTest { @Test public void test() { execute(() -> System.out.println("execute")); } private void execute(Executor executor) { executor.execute(); } @FunctionalInterface private interface Executor { void execute(); } }
[ "784990655@qq.com" ]
784990655@qq.com
b3bce4681d77f010956dce0dd94a9a1c5f146c3f
cf9672e746f267f81b48c056e1801479631d06ea
/app/src/main/java/com/insightsurfface/joke/widget/toast/EasyToast.java
6bbf5b55440d715c1b3ebbb8ec1e260f548721f2
[]
no_license
warriorWorld/Joke
61a991fb18529dd75d3cb14632e269074dd4d503
2e37ec5be2d30addce4f398cf55368cb755551ac
refs/heads/master
2022-08-23T08:21:35.077562
2020-05-29T09:58:30
2020-05-29T09:58:30
266,741,215
0
0
null
null
null
null
UTF-8
Java
false
false
2,432
java
package com.insightsurfface.joke.widget.toast;/** * Created by Administrator on 2016/11/8. */ import android.app.Activity; import android.app.Application; import android.content.Context; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; import android.widget.Toast; import com.insightsurfface.joke.R; /** * ไฝœ่€…๏ผš่‹่ˆช on 2016/11/8 14:21 * ้‚ฎ็ฎฑ๏ผš772192594@qq.com */ public class EasyToast extends Toast { private Context context; private TextView titleTv, messageTv; /** * Construct an empty Toast object. You must call {@link #setView} before you * can call {@link #show}. * * @param context The context to use. Usually your {@link Application} * or {@link Activity} object. */ public EasyToast(Context context) { super(context); this.context = context; init(); } private void init() { View layout = LayoutInflater.from(context).inflate(R.layout.view_easy_toast, null); titleTv = (TextView) layout.findViewById(R.id.toast_title); messageTv = (TextView) layout.findViewById(R.id.toast_message); setGravity(Gravity.CENTER, 0, 0); setDuration(Toast.LENGTH_SHORT); setView(layout); } public void showToast(String title, String message) { if (!TextUtils.isEmpty(title) && TextUtils.isEmpty(message)) { //ๅชๆœ‰ๆ ‡้ข˜ๆ—ถ,ๆ ‡้ข˜ๆ˜ฏ็™ฝ่‰ฒ็š„ titleTv.setTextColor(context.getResources().getColor(R.color.white)); } else { titleTv.setTextColor(context.getResources().getColor(R.color.colorPrimary)); } if (!TextUtils.isEmpty(title)) { titleTv.setVisibility(View.VISIBLE); titleTv.setText(title); } else { titleTv.setVisibility(View.GONE); } if (!TextUtils.isEmpty(message)) { messageTv.setText(message); } else { messageTv.setVisibility(View.GONE); } show(); } public void showToast(String message, boolean longShow) { if (longShow) { setDuration(Toast.LENGTH_LONG); } else { setDuration(Toast.LENGTH_SHORT); } showToast("", message); } public void showToast(String message) { showToast("", message); } }
[ "772192594@qq.com" ]
772192594@qq.com
d7ba61c04c8d34834d4cc9f9b2a2030e59be9899
cc70f0eac152553f0744954a1c4da8af67faa5ab
/PPA/src/examples/AllCodeSnippets/class_606.java
afca5f63a9a1f60a3cd816666fc35ff89ff61d5c
[]
no_license
islamazhar/Detecting-Insecure-Implementation-code-snippets
b49b418e637a2098027e6ce70c0ddf93bc31643b
af62bef28783c922a8627c62c700ef54028b3253
refs/heads/master
2023-02-01T10:48:31.815921
2020-12-11T00:21:40
2020-12-11T00:21:40
307,543,127
0
0
null
null
null
null
UTF-8
Java
false
false
7,634
java
package examples.AllCodeSnippets; import android.os.Environment; import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; /** * Static methods used for common file operations. * * @author Carl Hartung (carlhartung@gmail.com) */ public class class_606 { private final static String t = "FileUtils"; // Used to validate and display valid form names. public static final String VALID_FILENAME = "[ _\\-A-Za-z0-9]*.x[ht]*ml"; // Storage paths public static final String FORMS_PATH = Environment.getExternalStorageDirectory() + "/odk/forms/"; public static final String INSTANCES_PATH = Environment.getExternalStorageDirectory() + "/odk/instances/"; public static final String CACHE_PATH = Environment.getExternalStorageDirectory() + "/odk/.cache/"; public static final String TMPFILE_PATH = CACHE_PATH + "tmp.jpg"; public static ArrayList<String> getValidFormsAsArrayList(String path) { ArrayList<String> formPaths = new ArrayList<String>(); File dir = new File(path); if (!storageReady()) { return null; } if (!dir.exists()) { if (!createFolder(path)) { return null; } } File[] dirs = dir.listFiles(); for (int i = 0; i < dirs.length; i++) { // skip all the directories if (dirs[i].isDirectory()) continue; String formName = dirs[i].getName(); formPaths.add(dirs[i].getAbsolutePath()); } return formPaths; } public static ArrayList<String> getFoldersAsArrayList(String path) { ArrayList<String> mFolderList = new ArrayList<String>(); File root = new File(path); if (!storageReady()) { return null; } if (!root.exists()) { if (!createFolder(path)) { return null; } } if (root.isDirectory()) { File[] children = root.listFiles(); for (File child : children) { boolean directory = child.isDirectory(); if (directory) { mFolderList.add(child.getAbsolutePath()); } } } return mFolderList; } public static boolean deleteFolder(String path) { // not recursive if (path != null && storageReady()) { File dir = new File(path); if (dir.exists() && dir.isDirectory()) { File[] files = dir.listFiles(); for (File file : files) { if (!file.delete()) { Log.i(t, "Failed to delete " + file); } } } return dir.delete(); } else { return false; } } public static boolean createFolder(String path) { if (storageReady()) { boolean made = true; File dir = new File(path); if (!dir.exists()) { made = dir.mkdirs(); } return made; } else { return false; } } public static boolean deleteFile(String path) { if (storageReady()) { File f = new File(path); return f.delete(); } else { return false; } } public static byte[] getFileAsBytes(File file) { byte[] bytes = null; InputStream is = null; try { is = new FileInputStream(file); // Get the size of the file long length = file.length(); if (length > Integer.MAX_VALUE) { Log.e(t, "File " + file.getName() + "is too large"); return null; } // Create the byte array to hold the data bytes = new byte[(int) length]; // Read in the bytes int offset = 0; int read = 0; try { while (offset < bytes.length && read >= 0) { read = is.read(bytes, offset, bytes.length - offset); offset += read; } } catch (IOException e) { Log.e(t, "Cannot read " + file.getName()); e.printStackTrace(); return null; } // Ensure all the bytes have been read in if (offset < bytes.length) { try { throw new IOException("Could not completely read file " + file.getName()); } catch (IOException e) { e.printStackTrace(); return null; } } return bytes; } catch (FileNotFoundException e) { Log.e(t, "Cannot find " + file.getName()); e.printStackTrace(); return null; } finally { // Close the input stream try { is.close(); } catch (IOException e) { Log.e(t, "Cannot close input stream for " + file.getName()); e.printStackTrace(); return null; } } } public static boolean storageReady() { String cardstatus = Environment.getExternalStorageState(); if (cardstatus.equals(Environment.MEDIA_REMOVED) || cardstatus.equals(Environment.MEDIA_UNMOUNTABLE) || cardstatus.equals(Environment.MEDIA_UNMOUNTED) || cardstatus.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { return false; } else { return true; } } public static String getMd5Hash(File file) { try { // CTS (6/15/2010) : stream file through digest instead of handing it the byte[] MessageDigest md = MessageDigest.getInstance("MD5"); int chunkSize = 256; byte[] chunk = new byte[chunkSize]; // Get the size of the file long lLength = file.length(); if (lLength > Integer.MAX_VALUE) { Log.e(t, "File " + file.getName() + "is too large"); return null; } int length = (int) lLength; InputStream is = null; is = new FileInputStream(file); int l = 0; for (l = 0; l + chunkSize < length; l += chunkSize) { is.read(chunk, 0, chunkSize); md.update(chunk, 0, chunkSize); } int remaining = length - l; if (remaining > 0) { is.read(chunk, 0, remaining); md.update(chunk, 0, remaining); } byte[] messageDigest = md.digest(); BigInteger number = new BigInteger(1, messageDigest); String md5 = number.toString(16); while (md5.length() < 32) md5 = "0" + md5; is.close(); return md5; } catch (NoSuchAlgorithmException e) { Log.e("MD5", e.getMessage()); return null; } catch (FileNotFoundException e) { Log.e("No Cache File", e.getMessage()); return null; } catch (IOException e) { Log.e("Problem reading from file", e.getMessage()); return null; } } }
[ "mislam9@wisc.edu" ]
mislam9@wisc.edu
ef6a671514809709c92c60499058709f839ddbe1
a5ca6cc475c6ba01b6ed5e65f8c742fbfd061e96
/dealer-api/src/main/java/com/utonw/dealer/api/dto/DetermineBindingTypeDTO.java
4c71d363a50fee86757884d0f30c08eb01e06c4e
[]
no_license
xiaolizigogogo/dealer
72a127927e6602df90542baca013210fd4155db9
938099c25e0fff2e40046cd55160c9120c4b05a2
refs/heads/master
2021-08-22T03:55:10.371671
2017-11-29T06:32:29
2017-11-29T06:32:29
112,417,891
0
2
null
null
null
null
UTF-8
Java
false
false
684
java
/** * @Description: TODO(็”จไธ€ๅฅ่ฏๆ่ฟฐ่ฏฅๆ–‡ไปถๅšไป€ไนˆ) * @author YX * @date 2017ๅนด10ๆœˆ17ๆ—ฅไธ‹ๅˆ2:46:47 */ package com.utonw.dealer.api.dto; /** * @author YX * @date 2017ๅนด10ๆœˆ17ๆ—ฅ ไธ‹ๅˆ2:46:47 */ public class DetermineBindingTypeDTO { /** * @Fields orderId : ่ฎขๅ•ๅท */ private String orderId; /** * @Fields plateNumber : ่ฝฆ็‰Œๅท */ private String plateNumber; public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getPlateNumber() { return plateNumber; } public void setPlateNumber(String plateNumber) { this.plateNumber = plateNumber; } }
[ "user.email" ]
user.email
47411d8a1fc5477716d4ae778c44dd0045ad7b77
85a16aeb2c2bbad43b632047ccd72cccd5799942
/src/venigma/server/VCipherSpi.java
4d7bf28750edd72e5c37318d24ec58fef92c7815
[]
no_license
evanx/vellumapp
cc22e7df8cc9ba31f27f17ab745ebbc603a7c33a
47754e4cb4491be8a4dee151dce721c0467c29a1
refs/heads/master
2021-01-21T00:18:05.473502
2014-05-31T11:57:27
2014-05-31T11:57:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,394
java
/* * Source https://github.com/evanx by @evanxsummers * */ package venigma.server; import venigma.provider.CipherConnection; import java.io.IOException; import java.security.*; import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException; import javax.crypto.*; import javax.crypto.spec.IvParameterSpec; import vellumexp.logr.Logr; import vellumexp.logr.LogrFactory; import venigma.provider.VProvider; /** * * @author evan */ public final class VCipherSpi extends javax.crypto.CipherSpi { Logr logger = LogrFactory.getLogger(getClass()); CipherConnection connection = new CipherConnection(VProvider.providerContext); String keyAlias = VProvider.providerContext.getKeyAlias(); int opmode; byte[] iv = new byte[16]; public VCipherSpi() { super(); } private void init(int opmode, IvParameterSpec ips) { iv = ips.getIV(); init(opmode); } public void init(int opmode, SecureRandom sr) { sr.nextBytes(iv); init(opmode); } private void init(int opmode) { this.opmode = opmode; try { connection.open(); } catch (IOException e) { logger.warn(e, null); } } @Override protected void engineSetMode(String mode) throws NoSuchAlgorithmException { } @Override protected void engineSetPadding(String padding) throws NoSuchPaddingException { } @Override protected int engineGetBlockSize() { return 0; } @Override protected int engineGetOutputSize(int outputSize) { return 0; } @Override protected byte[] engineGetIV() { return iv; } @Override protected AlgorithmParameters engineGetParameters() { return null; } @Override protected void engineInit(int opmode, Key key, SecureRandom sr) throws InvalidKeyException { init(opmode, sr); } @Override protected void engineInit(int opmode, Key key, AlgorithmParameterSpec aps, SecureRandom sr) throws InvalidKeyException, InvalidAlgorithmParameterException { if (aps instanceof IvParameterSpec) { init(opmode, (IvParameterSpec) aps); } else if (aps instanceof IvParameterSpec) { init(opmode, sr); } else { throw new RuntimeException(CipherResources.ERROR_MESSAGE_NO_IV_SPEC); } } @Override protected void engineInit(int opmode, Key key, AlgorithmParameters ap, SecureRandom sr) throws InvalidKeyException, InvalidAlgorithmParameterException { try { AlgorithmParameterSpec aps = ap.getParameterSpec(IvParameterSpec.class); if (aps instanceof IvParameterSpec) { init(opmode, (IvParameterSpec) aps); } else { init(opmode, sr); } } catch (InvalidParameterSpecException e) { throw new RuntimeException(CipherResources.ERROR_MESSAGE_NO_IV_SPEC, e); } } @Override protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) { return null; } @Override protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException { return 0; } @Override protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException { try { if (opmode == Cipher.ENCRYPT_MODE) { return encrypt(input); } else if (opmode == Cipher.DECRYPT_MODE) { return decrypt(input); } else { throw new RuntimeException(CipherResources.ERROR_MESSAGE_NO_MODE); } } catch (IOException e) { throw new RuntimeException(e); } } private byte[] encrypt(byte[] input) throws IOException { if (iv == null) { throw new RuntimeException(CipherResources.ERROR_MESSAGE_NO_IV_SPEC); } CipherRequest request = new CipherRequest(CipherRequestType.ENCIPHER, keyAlias, input, iv); CipherResponse response = connection.sendCipherRequest(request); if (response.responseType != CipherResponseType.OK) { throw new CipherResponseRuntimeException(response); } iv = response.getIv(); return response.getBytes(); } private byte[] decrypt(byte[] input) throws IOException { if (iv == null) { throw new RuntimeException(CipherResources.ERROR_MESSAGE_NO_IV_SPEC); } CipherRequest request = new CipherRequest(CipherRequestType.DECIPHER, keyAlias, input, iv); CipherResponse response = connection.sendCipherRequest(request); if (response.responseType != CipherResponseType.OK) { throw new CipherResponseRuntimeException(response); } return response.getBytes(); } @Override protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException { return 0; } }
[ "evan.summers@gmail.com" ]
evan.summers@gmail.com
8174e3366ac19c35e4eafa6edf71df0df37284d7
5d886e65dc224924f9d5ef4e8ec2af612529ab93
/sources/com/android/systemui/screenshot/GlobalScreenshot_Factory.java
6572d7d89ec0eba6579954ab4099100256db4baa
[]
no_license
itz63c/SystemUIGoogle
99a7e4452a8ff88529d9304504b33954116af9ac
f318b6027fab5deb6a92e255ea9b26f16e35a16b
refs/heads/master
2022-05-27T16:12:36.178648
2020-04-30T04:21:56
2020-04-30T04:21:56
260,112,526
3
1
null
null
null
null
UTF-8
Java
false
false
1,859
java
package com.android.systemui.screenshot; import android.content.Context; import android.content.res.Resources; import android.view.LayoutInflater; import dagger.internal.Factory; import javax.inject.Provider; public final class GlobalScreenshot_Factory implements Factory<GlobalScreenshot> { private final Provider<Context> contextProvider; private final Provider<LayoutInflater> layoutInflaterProvider; private final Provider<Resources> resourcesProvider; private final Provider<ScreenshotNotificationsController> screenshotNotificationsControllerProvider; public GlobalScreenshot_Factory(Provider<Context> provider, Provider<Resources> provider2, Provider<LayoutInflater> provider3, Provider<ScreenshotNotificationsController> provider4) { this.contextProvider = provider; this.resourcesProvider = provider2; this.layoutInflaterProvider = provider3; this.screenshotNotificationsControllerProvider = provider4; } public GlobalScreenshot get() { return provideInstance(this.contextProvider, this.resourcesProvider, this.layoutInflaterProvider, this.screenshotNotificationsControllerProvider); } public static GlobalScreenshot provideInstance(Provider<Context> provider, Provider<Resources> provider2, Provider<LayoutInflater> provider3, Provider<ScreenshotNotificationsController> provider4) { return new GlobalScreenshot((Context) provider.get(), (Resources) provider2.get(), (LayoutInflater) provider3.get(), (ScreenshotNotificationsController) provider4.get()); } public static GlobalScreenshot_Factory create(Provider<Context> provider, Provider<Resources> provider2, Provider<LayoutInflater> provider3, Provider<ScreenshotNotificationsController> provider4) { return new GlobalScreenshot_Factory(provider, provider2, provider3, provider4); } }
[ "itz63c@statixos.com" ]
itz63c@statixos.com
33e51f09ee72acd571c616b03b7ad8c314cc724e
8f898aacf2873a8129664d7b5a2cadc85d61e9ca
/blade-example/blade-easypoi/src/test/java/org/springblade/example/poi/test/word/ManyPageWordTest.java
130dc364aefcfa02aca154e301dde7f11df37177
[]
no_license
htao09/BladeX-Biz
1fb1a208ecc6f24983020deabe7230ae32ef741e
deb22cfdb05000ecc7c6eff19626a48ff35bf822
refs/heads/master
2022-04-10T03:03:02.668186
2020-01-01T08:09:48
2020-01-01T08:09:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package org.springblade.example.poi.test.word; import cn.afterturn.easypoi.word.WordExportUtil; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.junit.Test; import java.io.FileOutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author by jueyue on 19-5-27. */ public class ManyPageWordTest { @Test public void testPage() { List<Map<String, Object>> list = new ArrayList<>(); for (int i = 0; i < 100; i++) { Map<String, Object> map = new HashMap<>(); map.put("name", "ๅฐๆ˜Ž" + i); list.add(map); } //---------------------------------------------- try { XWPFDocument doc = WordExportUtil .exportWord07("word/loan.docx", list); FileOutputStream fos = new FileOutputStream("D:/home/excel/ManyPageWordTest.ๆ‹ผๆŽฅๅคš้กตๆต‹่ฏ•.docx"); doc.write(fos); fos.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "smallchill@163.com" ]
smallchill@163.com
5d24b85fbea0c6e21368b97ff202b62a53ec2f41
b34654bd96750be62556ed368ef4db1043521ff2
/time_tracker_user/tags/version3.0/trunk/src/java/tests/com/topcoder/timetracker/user/ThrowingUserPersistence.java
1624d2a2ae3b32e472a28e36e8844d8a6f8a4c38
[]
no_license
topcoder-platform/tcs-cronos
81fed1e4f19ef60cdc5e5632084695d67275c415
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
refs/heads/master
2023-08-03T22:21:52.216762
2019-03-19T08:53:31
2019-03-19T08:53:31
89,589,444
0
1
null
2019-03-19T08:53:32
2017-04-27T11:19:01
null
UTF-8
Java
false
false
1,943
java
/* * Copyright (C) 2005 TopCoder Inc., All Rights Reserved. */ package com.topcoder.timetracker.user; import java.util.Collection; import java.util.Collections; /** * <p> * Dummy implementation of the UserPersistence interface, for unit testing purposes only. * This implementation always throws exceptions. * </p> * * @see UserPersistence * * @author TCSDEVELOPER * @version 1.0 */ public class ThrowingUserPersistence implements UserPersistence { /** Tells class which methods to throw on; 1=add, 2=remove, 4=getUsers, 7 = all. */ private int throwMask = 7; /** * Set the throwMask to the argument. 1=add, 2=remove, 4=getUsers, 7 = all. * @param mask the new mask */ public void setThrowMask(int mask) { this.throwMask = mask; } /** * Dummy implementation that always throws an exception. * @param user ignored. * @throws PersistenceException always. */ public void addUser(User user) throws PersistenceException { if ((throwMask & 1) != 0) { throw new PersistenceException("Thrown from addUser."); } } /** * Dummy implementation that always throws an exception. * @param user ignored. * @throws PersistenceException always. */ public void removeUser(User user) throws PersistenceException { if ((throwMask & 2) != 0) { throw new PersistenceException("Thrown from removeUser."); } } /** * Dummy implementation that always throws an exception. * @return throws PersistenceException always. * @throws PersistenceException always. */ public Collection getUsers() throws PersistenceException { if ((throwMask & 4) != 0) { throw new PersistenceException("Thrown from getUsers."); } return Collections.EMPTY_LIST; } }
[ "mcaughey@fb370eea-3af6-4597-97f7-f7400a59c12a" ]
mcaughey@fb370eea-3af6-4597-97f7-f7400a59c12a
1af82342949cfeb9f9f672af421e7dfe3f1194b2
52c04ffd7714c69e77996adb32707592ad3b7e49
/src/org/redkale/convert/ext/DateSimpledCoder.java
e9f38ece5056a4441bba25dc83fbc5fdfdaa9493
[ "Apache-2.0" ]
permissive
beckhoho/redkale
4fa56f7fa358504037c9040be59e1e1565298935
fb51997c6b8151164149d321e752e8ed660e6136
refs/heads/master
2021-01-10T22:43:25.930920
2016-10-08T10:42:01
2016-10-08T10:42:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,021
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.redkale.convert.ext; import org.redkale.convert.Reader; import org.redkale.convert.SimpledCoder; import org.redkale.convert.Writer; import java.util.Date; /** * Date ็š„SimpledCoderๅฎž็Žฐ * * <p> * ่ฏฆๆƒ…่ง: http://redkale.org * * @author zhangjx * @param <R> Reader่พ“ๅ…ฅ็š„ๅญ็ฑปๅž‹ * @param <W> Writer่พ“ๅ‡บ็š„ๅญ็ฑปๅž‹ */ public final class DateSimpledCoder<R extends Reader, W extends Writer> extends SimpledCoder<R, W, Date> { public static final DateSimpledCoder instance = new DateSimpledCoder(); @Override public void convertTo(W out, Date value) { out.writeLong(value == null ? 0L : value.getTime()); } @Override public Date convertFrom(R in) { long t = in.readLong(); return t == 0 ? null : new Date(); } }
[ "22250530@qq.com" ]
22250530@qq.com
10ff7b16c135790b329a5940cef9780b50d9cc09
2b7c587542ffb625c92ee0770ae1f164f327096a
/ch08/15-exam/Q05-Console/TestClass.java
a08cc21775235495c8d4148245414bdf0a2fd228
[]
no_license
Sabyh11/Java-SE8-OCP-Exam-1Z0-809
bf881ea0e218838820022bfe3f6ee078dc0fd6c8
52a7c81c840b76f4c149056c71b119b1e5c1e32b
refs/heads/master
2022-01-20T11:10:47.983033
2018-07-07T17:41:00
2018-07-07T17:41:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
import java.io.*; public class TestClass { public static void main(String[] args) throws IOException { String line; Console c = System.console(); Writer w = c.writer(); if((line = c.readLine()) != null) w.append(line); w.flush(); } }
[ "mercurylink@gmail.com" ]
mercurylink@gmail.com
167710e3191abd7970abd7fd7fef11372b445f0b
47eb5bf54da6c19ca175fc8938ca9b6a2b545dfa
/ga-communication/src/main/java/com/thinkgem/ga/entity/GaDeviceMote.java
fbce8f4fb037746fe746457bf94949f63be95b1c
[]
no_license
liszhu/whatever_ty
44ddb837f2de19cb980c28fe06e6634f9d6bd8cb
e02ef9e125cac9103848c776e420edcf0dcaed2f
refs/heads/master
2021-12-13T21:37:06.539805
2017-04-05T01:50:23
2017-04-05T01:50:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,162
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.ga.entity; /** * ไธญ็ปง่ฎพๅค‡Entity * @author liuwsh * @version 2017-02-27 */ public class GaDeviceMote { private static final long serialVersionUID = 1L; private String id; private String apId; // ๅŸบ็ซ™id private String deviceId; // ่ฎพๅค‡ๅท private String longitude; // ็ปๅบฆ private String latitude; // ็บฌๅบฆ private String address; // ๅœฐๅ€ private String status; // ็Šถๆ€ private String remarks; /** * @return the apId */ public String getApId() { return apId; } /** * @param apId the apId to set */ public void setApId(String apId) { this.apId = apId; } /** * @return the deviceId */ public String getDeviceId() { return deviceId; } /** * @param deviceId the deviceId to set */ public void setDeviceId(String deviceId) { this.deviceId = deviceId; } /** * @return the longitude */ public String getLongitude() { return longitude; } /** * @param longitude the longitude to set */ public void setLongitude(String longitude) { this.longitude = longitude; } /** * @return the latitude */ public String getLatitude() { return latitude; } /** * @param latitude the latitude to set */ public void setLatitude(String latitude) { this.latitude = latitude; } /** * @return the address */ public String getAddress() { return address; } /** * @param address the address to set */ public void setAddress(String address) { this.address = address; } /** * @return the status */ public String getStatus() { return status; } /** * @param status the status to set */ public void setStatus(String status) { this.status = status; } /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the remarks */ public String getRemarks() { return remarks; } /** * @param remarks the remarks to set */ public void setRemarks(String remarks) { this.remarks = remarks; } }
[ "652241956@qq.com" ]
652241956@qq.com
f4633c35bd5760a7795ee5801732a822a2f1a6cf
1307ca6baf4f24fb80832a769646bfe38889c863
/impexp-client-gui/src/main/java/org/citydb/gui/components/checkboxtree/DefaultCheckboxTreeCellRenderer.java
b8f1d1e23bbc9798661f37d4ac565085832a8447
[ "Apache-2.0", "LGPL-3.0-only" ]
permissive
3dcitydb/importer-exporter
76fc106ab5ec4dbd33580c2d5d9fc3d8d3736aa9
da379c7d3de333f3c0ef9c2830a1126466326136
refs/heads/master
2023-08-07T18:21:45.576237
2023-08-03T07:56:17
2023-08-03T07:56:17
14,438,370
114
57
Apache-2.0
2023-09-11T17:04:21
2013-11-16T00:07:36
Java
UTF-8
Java
false
false
7,460
java
/* * 3D City Database - The Open Source CityGML Database * https://www.3dcitydb.org/ * * Copyright 2013 - 2021 * Chair of Geoinformatics * Technical University of Munich, Germany * https://www.lrg.tum.de/gis/ * * The 3D City Database is jointly developed with the following * cooperation partners: * * Virtual City Systems, Berlin <https://vc.systems/> * M.O.S.S. Computer Grafik Systeme GmbH, Taufkirchen <http://www.moss.de/> * * 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.citydb.gui.components.checkboxtree; import org.citydb.gui.components.checkboxtree.QuadristateButtonModel.State; import javax.swing.*; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreePath; import java.awt.*; /** * A renderer for the CheckboxTree. This implementation decorates a * DefaultTreeCellRenderer (i.e. a JLabel) with a checkbox, by adding a * QuadristateCheckbox to the former onto a JPanel. Both can be overridden by * subclasses. Note that double-clicking the label/icon of this renderer does * not toggle the checkbox. * * @author boldrini * @author bigagli */ public class DefaultCheckboxTreeCellRenderer extends JPanel implements CheckboxTreeCellRenderer { /** * Loads an ImageIcon from the file iconFile, searching it in the classpath. */ protected static ImageIcon loadIcon(String iconFile) { try { return new ImageIcon(DefaultCheckboxTreeCellRenderer.class.getClassLoader().getResource(iconFile)); } catch (NullPointerException npe) {// did not find the resource return null; } } protected QuadristateCheckbox checkBox = new QuadristateCheckbox(); protected DefaultTreeCellRenderer label; private int iconTextGap; // @Override // public void doLayout() { // Dimension d_check = this.checkBox.getPreferredSize(); // Dimension d_label = this.label.getPreferredSize(); // int y_check = 0; // int y_label = 0; // if (d_check.height < d_label.height) { // y_check = (d_label.height - d_check.height) / 2; // } else { // y_label = (d_check.height - d_label.height) / 2; // } // this.checkBox.setLocation(0, y_check); // this.checkBox.setBounds(0, y_check, d_check.width, d_check.height); // this.label.setLocation(d_check.width, y_label); // this.label.setBounds(d_check.width, y_label, d_label.width, // d_label.height); // } public DefaultCheckboxTreeCellRenderer() { /* this method was as follows (see ticket #6): * * this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); * add(this.checkBox); * add(this.label); * this.checkBox.setBackground(UIManager.getColor("Tree.textBackground")); * this.setBackground(UIManager.getColor("Tree.textBackground")); */ label = new DefaultTreeCellRenderer() { @Override public void setForeground(Color fg) { super.setForeground(fg); DefaultCheckboxTreeCellRenderer.this.setForeground(fg, false); } @Override public void setBackground(Color bg) { super.setBackground(bg); DefaultCheckboxTreeCellRenderer.this.setBackground(bg, false); } }; label.setBorderSelectionColor(null); checkBox.setOpaque(false); iconTextGap = Math.max(UIManager.getInt("CheckBox.iconTextGap") - checkBox.getMargin().right - label.getInsets().left, 0); // CHECK: a user suggested BorderLayout appears to work better than FlowLayout with most L&Fs this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); this.setOpaque(false); add(this.checkBox); add(Box.createHorizontalStrut(iconTextGap)); add(this.label); } @Override public Dimension getPreferredSize() { Dimension d_check = this.checkBox.getPreferredSize(); Dimension d_label = this.label.getPreferredSize(); return new Dimension(d_check.width + iconTextGap + d_label.width, (Math.max(d_check.height, d_label.height))); } /** * Decorates this renderer based on the passed in components. */ public Component getTreeCellRendererComponent(JTree tree, Object object, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { /* * most of the rendering is delegated to the wrapped * DefaultTreeCellRenderer, the rest depends on the TreeCheckingModel */ this.label.getTreeCellRendererComponent(tree, object, selected, expanded, leaf, row, hasFocus); if (tree instanceof CheckboxTree) { TreePath path = tree.getPathForRow(row); TreeCheckingModel checkingModel = ((CheckboxTree) tree).getCheckingModel(); this.checkBox.setEnabled(checkingModel.isPathEnabled(path) && tree.isEnabled()); boolean checked = checkingModel.isPathChecked(path); boolean greyed = checkingModel.isPathGreyed(path); if (checked && !greyed) { this.checkBox.setState(State.CHECKED); } if (!checked && greyed) { this.checkBox.setState(State.GREY_UNCHECKED); } if (checked && greyed) { this.checkBox.setState(State.GREY_CHECKED); } if (!checked && !greyed) { this.checkBox.setState(State.UNCHECKED); } } return this; } /** * Checks if the (x,y) coordinates are on the Checkbox. * * @param x * @param y * @return boolean */ public boolean isOnHotspot(int x, int y) { return this.checkBox.contains(x, y); } /** * Sets the icon used to represent non-leaf nodes that are not expanded. */ public void setClosedIcon(Icon newIcon) { this.label.setClosedIcon(newIcon); } /** * Sets the icon used to represent leaf nodes. */ public void setLeafIcon(Icon newIcon) { this.label.setLeafIcon(newIcon); } /** * Sets the icon used to represent non-leaf nodes that are expanded. */ public void setOpenIcon(Icon newIcon) { this.label.setOpenIcon(newIcon); } @Override public void setForeground(Color fg) { setForeground(fg, label != null); } @Override public void setBackground(Color bg) { setBackground(bg, label != null); } private void setForeground(Color fg, boolean propagate) { if (propagate) { label.setForeground(fg); } else { super.setForeground(fg); } } private void setBackground(Color bg, boolean propagate) { if (propagate) { label.setBackground(bg); } else { super.setBackground(bg); } } }
[ "cnagel@virtualcitysystems.de" ]
cnagel@virtualcitysystems.de
ab72aeb0d9684e85e2bc3da1f90a4c341726f372
3ffb8bb2a082293d718365c6fe4943ccf6bf2c9b
/twitlogic-core/src/main/java/net/fortytwo/twitlogic/query/Memo.java
ae295c4fc2838c8de20fa4bb01701d566957449b
[ "MIT" ]
permissive
joshsh/twitlogic
ec444f12f5ce676720adacb180320d50b5037509
60a3ae51ef23bd6e5d7f3932bc649415e4114668
refs/heads/master
2023-04-27T08:09:48.450074
2014-09-16T19:21:32
2014-09-16T19:21:32
275,576
19
10
null
null
null
null
UTF-8
Java
false
false
193
java
package net.fortytwo.twitlogic.query; /** * @author Joshua Shinavier (http://fortytwo.net). */ public class Memo<T, M> { public T target; public M value; public double weight; }
[ "josh@fortytwo.net" ]
josh@fortytwo.net
a74cb8e6d66ce368e9992736ea95df8791773afc
f8158ef2ac4eb09c3b2762929e656ba8a7604414
/google-ads/src/main/java/com/google/ads/googleads/v1/services/stub/GrpcDisplayKeywordViewServiceStub.java
2a4ec212184cd6d9e567d157b053e9f83bec2cc3
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
alejagapatrick/google-ads-java
12e89c371c730a66a7735f87737bd6f3d7d00e07
75591caeabcb6ea716a6067f65501d3af78804df
refs/heads/master
2020-05-24T15:50:40.010030
2019-05-13T12:10:17
2019-05-13T12:10:17
187,341,544
1
0
null
2019-05-18T09:56:19
2019-05-18T09:56:19
null
UTF-8
Java
false
false
5,783
java
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 com.google.ads.googleads.v1.services.stub; import com.google.ads.googleads.v1.resources.DisplayKeywordView; import com.google.ads.googleads.v1.services.GetDisplayKeywordViewRequest; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.UnaryCallable; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS /** * gRPC stub implementation for Google Ads API. * * <p>This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator") @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcDisplayKeywordViewServiceStub extends DisplayKeywordViewServiceStub { private static final MethodDescriptor<GetDisplayKeywordViewRequest, DisplayKeywordView> getDisplayKeywordViewMethodDescriptor = MethodDescriptor.<GetDisplayKeywordViewRequest, DisplayKeywordView>newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.ads.googleads.v1.services.DisplayKeywordViewService/GetDisplayKeywordView") .setRequestMarshaller( ProtoUtils.marshaller(GetDisplayKeywordViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DisplayKeywordView.getDefaultInstance())) .build(); private final BackgroundResource backgroundResources; private final UnaryCallable<GetDisplayKeywordViewRequest, DisplayKeywordView> getDisplayKeywordViewCallable; private final GrpcStubCallableFactory callableFactory; public static final GrpcDisplayKeywordViewServiceStub create( DisplayKeywordViewServiceStubSettings settings) throws IOException { return new GrpcDisplayKeywordViewServiceStub(settings, ClientContext.create(settings)); } public static final GrpcDisplayKeywordViewServiceStub create(ClientContext clientContext) throws IOException { return new GrpcDisplayKeywordViewServiceStub( DisplayKeywordViewServiceStubSettings.newBuilder().build(), clientContext); } public static final GrpcDisplayKeywordViewServiceStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcDisplayKeywordViewServiceStub( DisplayKeywordViewServiceStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcDisplayKeywordViewServiceStub, using the given settings. This is * protected so that it is easy to make a subclass, but otherwise, the static factory methods * should be preferred. */ protected GrpcDisplayKeywordViewServiceStub( DisplayKeywordViewServiceStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcDisplayKeywordViewServiceCallableFactory()); } /** * Constructs an instance of GrpcDisplayKeywordViewServiceStub, using the given settings. This is * protected so that it is easy to make a subclass, but otherwise, the static factory methods * should be preferred. */ protected GrpcDisplayKeywordViewServiceStub( DisplayKeywordViewServiceStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; GrpcCallSettings<GetDisplayKeywordViewRequest, DisplayKeywordView> getDisplayKeywordViewTransportSettings = GrpcCallSettings.<GetDisplayKeywordViewRequest, DisplayKeywordView>newBuilder() .setMethodDescriptor(getDisplayKeywordViewMethodDescriptor) .build(); this.getDisplayKeywordViewCallable = callableFactory.createUnaryCallable( getDisplayKeywordViewTransportSettings, settings.getDisplayKeywordViewSettings(), clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public UnaryCallable<GetDisplayKeywordViewRequest, DisplayKeywordView> getDisplayKeywordViewCallable() { return getDisplayKeywordViewCallable; } @Override public final void close() { shutdown(); } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }
[ "nwbirnie@gmail.com" ]
nwbirnie@gmail.com
04b1159f1d4ef54d8b753d75149c650c138cdcd8
267ee531636400c48e7a089952253aebfb96ee57
/main/java/vvr/core/src/main/java/io/eguan/vvr/configuration/keys/IbsBufferRotationThreshold.java
7f97c3a7631768c16377518e6aa99239b7b600d3
[]
no_license
juanmaneo/eguan
62eb32b770d56633c3b564172c6b074d935b3be0
f36f9e464129dd459f5bfdf6c24edf9f73ef4540
refs/heads/master
2020-12-24T12:04:50.905235
2016-04-07T23:36:58
2016-04-07T23:36:58
21,627,457
0
0
null
null
null
null
UTF-8
Java
false
false
2,574
java
package io.eguan.vvr.configuration.keys; /* * #%L * Project eguan * %% * Copyright (C) 2012 - 2016 Oodrive * %% * 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. * #L% */ import io.eguan.configuration.MetaConfiguration; import io.eguan.configuration.IntegerConfigKey.PositiveIntegerConfigKey; /** * Key defining the buffer rotation threshold, mapped to {@value #IBS_CONFIG_KEY} in the IBS configuration file. * * <table border='1'> * <tr> * <th>NAME</th> * <th>DESCRIPTION</th> * <th>REQUIRED</th> * <th>UNIT</th> * <th>TYPE</th> * <th>DEFAULT</th> * <th>MIN</th> * <th>MAX</th> * </tr> * <tr> * <td>{@value #NAME}</td> * <td>Buffer rotation threshold, mapped to {@value #IBS_CONFIG_KEY} in the IBS configuration file.</td> * <td>FALSE</td> * <td>number of records (0&nbsp;=&nbsp;unlimited)</td> * <td>int</td> * <td>{@value #DEFAULT_VALUE}</td> * <td>N/A</td> * <td>N/A</td> * </tr> * </table> * * @author oodrive * @author pwehrle * @author jmcaba * */ public final class IbsBufferRotationThreshold extends PositiveIntegerConfigKey implements IbsConfigKey { private static final String NAME = "ldb.bufferrotationthreshold"; private static final String IBS_CONFIG_KEY = "buffer_rotation_threshold"; private static final int MAX_VALUE = Integer.MAX_VALUE; private static final int DEFAULT_VALUE = 65536; private static final IbsBufferRotationThreshold INSTANCE = new IbsBufferRotationThreshold(); public static IbsBufferRotationThreshold getInstance() { return INSTANCE; } private IbsBufferRotationThreshold() throws IllegalArgumentException { super(NAME, MAX_VALUE, false); } @Override protected final Integer getDefaultValue() { return Integer.valueOf(DEFAULT_VALUE); } @Override public final String getBackendConfigKey() { return IBS_CONFIG_KEY; } @Override public final String getBackendConfigValue(final MetaConfiguration configuration) { return valueToString(getTypedValue(configuration)); } }
[ "p.wehrle@oodrive.com" ]
p.wehrle@oodrive.com
6a686d23eb2ece132776811fd4cafa699fb37a91
afa2b85e52ab9c8fc0ddb48ca8ba6fcaff44d79f
/app/src/main/java/com/iqiyi/qigsaw/sample/reporter/SampleSplitLoadReporter.java
55fdb76c23493b073b1e49b7572b8a947cfd263d
[ "MIT" ]
permissive
liushaofang/Qigsaw
46ad3b392707e28f39db3b629ace0b0bb3728e47
faf8dc7bcdfe787cf31b4cee464b93e2f8705c6a
refs/heads/master
2022-01-20T17:55:52.262244
2019-07-19T03:06:42
2019-07-19T03:06:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,346
java
package com.iqiyi.qigsaw.sample.reporter; import android.content.Context; import com.iqiyi.android.qigsaw.core.splitreport.DefaultSplitLoadReporter; import com.iqiyi.android.qigsaw.core.splitreport.SplitLoadError; import java.util.List; public class SampleSplitLoadReporter extends DefaultSplitLoadReporter { public SampleSplitLoadReporter(Context context) { super(context); } @Override public void onLoadOKUnderProcessStarting(List<String> requestModuleNames, String processName, long cost) { super.onLoadOKUnderProcessStarting(requestModuleNames, processName, cost); } @Override public void onLoadFailedUnderProcessStarting(List<String> requestModuleNames, String processName, List<SplitLoadError> errors, long cost) { super.onLoadFailedUnderProcessStarting(requestModuleNames, processName, errors, cost); } @Override public void onLoadOKUnderUserTriggering(List<String> requestModuleNames, String processName, long cost) { super.onLoadOKUnderUserTriggering(requestModuleNames, processName, cost); } @Override public void onLoadFailedUnderUserTriggering(List<String> requestModuleNames, String processName, List<SplitLoadError> errors, long cost) { super.onLoadFailedUnderUserTriggering(requestModuleNames, processName, errors, cost); } }
[ "kisson_cjw@hotmail.com" ]
kisson_cjw@hotmail.com
8c635174ef467437a77efe7817c2a532cffc746f
2c9e0541ed8a22bcdc81ae2f9610a118f62c4c4d
/harmony/tests/reliability/src/java/org/apache/harmony/test/reliability/api/kernel/thread/VolatileVariableTest/DekkerTest.java
766b02907839fa9796b0824072e85bd7ff100c3c
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
JetBrains/jdk8u_tests
774de7dffd513fd61458b4f7c26edd7924c7f1a5
263c74f1842954bae0b34ec3703ad35668b3ffa2
refs/heads/master
2023-08-07T17:57:58.511814
2017-03-20T08:13:25
2017-03-20T08:16:11
70,048,797
11
9
null
null
null
null
UTF-8
Java
false
false
5,979
java
/* * Copyright 2006 The Apache Software Foundation or its licensors, as applicable * * 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. */ /** * @author Igor A. Pyankov * @version $Revision: 1.6 $ */ package org.apache.harmony.test.reliability.api.kernel.thread.VolatileVariableTest; import org.apache.harmony.test.reliability.share.Test; /** * Goal: check that VM supports volatile variables. * * The test implements well-known concurrent programming algorithm for mutual * exclusion by T.J.Dekker. (http://en.wikipedia.org/wiki/Dekker's_algorithm) * * The test does: 1. Reads parameter, which is: param[0] - number of iterations * to run critical region in each thread 2. Starts and, then, joins all started * threads * * 3. Checks that in each thread all checks PASSed. * * 4. Each thread, being started: a. Runs param[0] iterations in a cycle, on * each iteration: b. Checks the flag c. Changes flag when receive control d. * Runs critical regoin of code * */ public class DekkerTest extends Test { public int NUMBER_OF_ITERATIONS = 100; public int[] statuses = { DStatus.PASS, DStatus.PASS }; public volatile long commonVar = 0; public static volatile int started; public static void main(String[] args) { System.exit(new DekkerTest().test(args)); } public int test(String[] params) { parseParams(params); Dekkerthread th0 = new Dekkerthread("0", this); Dekkerthread th1 = new Dekkerthread("1", this); started = 0; th0.start(); th1.start(); while (started < 2) { } ; try { th0.join(); // log.add("Thread #0 joined()"); th1.join(); // log.add("Thread #1 joined()"); } catch (InterruptedException ie) { return fail("interruptedException while join of threads"); } // For each thread check whether operations PASSed in the thread for (int i = 0; i < statuses.length; ++i) { if (statuses[i] != DStatus.PASS) { return fail("Status of thread " + i + ": is FAIL"); } // log.add("Status of thread " + i + ": is PASS"); } return pass("OK"); } public void parseParams(String[] params) { if (params.length >= 1) { NUMBER_OF_ITERATIONS = Integer.parseInt(params[0]); } } } class Dekkerthread extends Thread { volatile static boolean flag0 = false; volatile static boolean flag1 = false; volatile static int worker; // working thread number static long[] vars = { 0x00000000FFFFFFFFL, 0xFFFFFFFF00000000L }; private int threadNum; private int threadIteration; private DekkerTest base; public Dekkerthread(String arg, DekkerTest test) { super(); if (arg.equals("0")) { threadNum = 0; } else { threadNum = 1; } threadIteration = test.NUMBER_OF_ITERATIONS; base = test; } /* * check and close (if posible) semaphore before critical region of code */ public void regionIn(int current) { if (current == 0) { flag0 = true; } else { flag1 = true; } int j = 1 - current; if (j == 0) { while (flag0) { if (current != worker) { if (current == 0) { flag0 = false; } else { flag1 = false; } while (current != worker) { } if (current == 0) { flag0 = true; } else { flag1 = true; } } } } else { while (flag1) { if (current != worker) { if (current == 0) { flag0 = false; } else { flag1 = false; } while (current != worker) { } if (current == 0) { flag0 = true; } else { flag1 = true; } } } } } /* open semaphore after critical region of code */ public void regionOut(int current) { worker = 1 - current; // change working thread if (current == 0) { flag0 = false; } else { flag1 = false; } } public void run() { // base.log.add("Thread #" + threadNum + " started " + threadIteration); DekkerTest.started++; while (threadIteration-- > 0) { regionIn(threadNum); // critical region base.commonVar = vars[threadNum]; Thread.yield(); // to give a chance to another thread if (base.commonVar != vars[0] && base.commonVar != vars[1]) { base.statuses[threadNum] = DStatus.FAIL; regionOut(threadNum); return; } // end of critical region regionOut(threadNum); } // base.log.add("Thread #" + threadNum + " finished "); } } class DStatus { public static final int FAIL = -10; public static final int PASS = 10; }
[ "vitaly.provodin@jetbrains.com" ]
vitaly.provodin@jetbrains.com
740caa5d95773b5fa0f3a9f3a6b2ef66f38aba68
728f0dfe98e0cbf68555299eb5634335c383b607
/src/task2/Test.java
985436dc6ed02a0b82d170a1153ccd586a11b18c
[]
no_license
andreyDelay/task-2
082705ee8abd5b101d8864fff782ce95973ac27a
c272303342df7ec9aafee40af3820b5ecd88f802
refs/heads/master
2022-07-16T09:37:11.232366
2020-05-18T04:06:00
2020-05-18T04:06:00
263,941,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package task2; import org.junit.Assert; public class Test { /** * ะขะตัั‚ ั€ะฐะฑะพั‚ะฐะตั‚ ะฝะต ะฒัะตะณะดะฐ, ั‚ะฐะบ ะบะฐะบ ะผะฐััะธะฒ ะทะฐะฟะพะปะฝัะตั‚ัั ัะปัƒั‡ะฐะนะฝั‹ะผะธ ั‡ะธัะปะฐะผะธ * ั‡ั‚ะพะฑั‹ ั‚ะตัั‚ ั€ะฐะฑะพั‚ะฐะป ะบะพั€ั€ะตะบั‚ะฝะพ, ะฝะตะพะฑั…ะพะดะธะผะพ ะทะฐะบะพะผะผะตะฝั‚ะธั€ะพะฒะฐั‚ัŒ ัั‚ั€ะพะบะธ 25, 26 ะบะปะฐััะฐ task2.AnotherSolution * ะธ ั€ะฐัะบะพะผะผะตะฝั‚ะธั€ะพะฒะฐั‚ัŒ ัั‚ั€ะพะบัƒ 24 ะบะปะฐััะฐ task2.AnotherSolution * @throws Exception */ @org.junit.Test public void testTask2() throws Exception { BadSolution solution = new BadSolution(); int [] arr = solution.createArray(); AnotherSolution anotherSolution = new AnotherSolution(); for (int i = 0; i < arr.length; i++) { int tmp = (int) (Math.random() * 20) + 10; //System.out.println(tmp); String result = anotherSolution.getIndexesThatGiveRequiredSum(arr, tmp); //System.out.println(result); Assert.assertEquals("ok", result); } } }
[ "frowzygleb@gmail.com" ]
frowzygleb@gmail.com
e520579985d996c40128896e2bb4a96bd7f1b823
5e12a12323d3401578ea2a7e4e101503d700b397
/branches/fitnesse/src/test/java/fitnesse/responders/ChunkingResponderTest.java
801aee2c60ba5a9eed0bc9a0b81661522bb5f0bf
[]
no_license
xiangyong/jtester
369d4b689e4e66f25c7217242b835d1965da3ef8
5f4b3948cd8d43d3e8fea9bc34e5bd7667f4def9
refs/heads/master
2021-01-18T21:02:05.493497
2013-10-08T01:48:18
2013-10-08T01:48:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
// Copyright (C) 2003-2009 by Object Mentor, Inc. All rights reserved. // Released under the terms of the CPL Common Public License version 1.0. package fitnesse.responders; import static junit.framework.Assert.assertTrue; import static util.RegexTestCase.assertSubString; import org.junit.Before; import org.junit.Test; import fitnesse.FitNesseContext; import fitnesse.http.ChunkedResponse; import fitnesse.http.MockRequest; import fitnesse.http.MockResponseSender; import fitnesse.wiki.WikiPage; import fitnesse.wiki.WikiPageDummy; public class ChunkingResponderTest { private Exception exception; private ChunkedResponse response; private FitNesseContext context; private WikiPage root = new WikiPageDummy(); private ChunkingResponder responder = new ChunkingResponder() { protected void doSending() throws Exception { throw exception; } }; @Before public void setUp() throws Exception { context = new FitNesseContext(); context.root = root; } @Test public void testException() throws Exception { exception = new Exception("test exception"); response = (ChunkedResponse) responder.makeResponse(context, new MockRequest()); MockResponseSender sender = new MockResponseSender(); sender.doSending(response); String responseSender = sender.sentData(); assertSubString("test exception", responseSender); } @Test public void chunkingShouldBeTurnedOffIfnochunkParameterIsPresent() throws Exception { MockRequest request = new MockRequest(); request.addInput("nochunk", null); response = (ChunkedResponse) responder.makeResponse(context, request); assertTrue(response.isChunkingTurnedOff()); } }
[ "darui.wu@9ac485da-fb45-aad8-5227-9c360d3c5fad" ]
darui.wu@9ac485da-fb45-aad8-5227-9c360d3c5fad
f2f49c8b14503bf43a9d0f44c1131b6d9d44eeed
67d501ff9ceacca18f3259adc43d248b71569aa2
/idm-api/src/main/java/org/openforis/idm/metamodel/validation/MaxCountValidator.java
6ded21e8eb0aed7f264816029f2cd8464b1def0c
[]
no_license
Arbonaut/idm
ee4fa9941598ebbd8b34f97c77d420727e595294
8aa93d27da2073e57b4782c6b420e04a00dc251f
refs/heads/master
2021-01-17T15:55:29.135456
2012-06-09T13:59:13
2012-06-09T13:59:13
2,926,342
1
0
null
null
null
null
UTF-8
Java
false
false
940
java
/** * */ package org.openforis.idm.metamodel.validation; import org.openforis.idm.metamodel.NodeDefinition; import org.openforis.idm.model.Entity; /** * @author M. Togna * @author G. Miceli */ public class MaxCountValidator implements ValidationRule<Entity> { private NodeDefinition nodeDefinition; public MaxCountValidator(NodeDefinition nodeDefinition) { this.nodeDefinition = nodeDefinition; } public NodeDefinition getNodeDefinition() { return nodeDefinition; } @Override public ValidationResultFlag evaluate(Entity entity) { Integer maxCount = nodeDefinition.getMaxCount(); if (maxCount == null) { return ValidationResultFlag.OK; } else { String childName = nodeDefinition.getName(); int count = entity.getCount(childName); if ( count <= maxCount ) { return ValidationResultFlag.OK; } else { return ValidationResultFlag.ERROR; } } } }
[ "stefano.ricci@fao.org" ]
stefano.ricci@fao.org
b5941c22d8ac4d7b5c714142bfdd098e40cbf1f2
027ad5f852e770e4da19d4a3877a3e4ff5107da6
/AdvanceJavaWS/Proj-36-HttpSessionWithURLReWriting-SessionTracking4/src/com/nt/servlet/ThirdServlet.java
2ac5826f79b396243421cda2f478c5c10a317e9a
[]
no_license
varunraj2297/AdvanceJavaWS
25a96a1b974586194c76b28434f2d036e5e74f7d
1f19b09d3d0d4abb109c35e582e243780e450e48
refs/heads/master
2021-06-29T23:51:42.544714
2019-08-04T14:50:42
2019-08-04T14:50:42
176,876,753
0
0
null
2020-10-13T14:07:19
2019-03-21T05:35:43
Java
UTF-8
Java
false
false
2,523
java
package com.nt.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.nt.dto.JobSeekerDTO; import com.nt.service.JobSeekerMgmtService; import com.nt.service.JobSeekerMgmtServiceImpl; import com.sun.xml.internal.ws.developer.StreamingAttachment; @WebServlet("/thirdurl") public class ThirdServlet extends HttpServlet { JobSeekerMgmtService service=null; @Override public void init() throws ServletException { service=new JobSeekerMgmtServiceImpl(); } public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter pw=null; String loc=null,name=null,addrs=null,skill=null; int expsal=0,age=0,exp=0; HttpSession ses=null; JobSeekerDTO dto=null; String result=null; pw=res.getWriter(); res.setContentType("text/html"); loc=req.getParameter("loc"); expsal=Integer.parseInt(req.getParameter("expsal")); ses=req.getSession(false); name=(String) ses.getAttribute("name"); age=(int) ses.getAttribute("age"); addrs=(String) ses.getAttribute("addrs"); skill=(String) ses.getAttribute("skill"); exp=(int) ses.getAttribute("exp"); dto=new JobSeekerDTO(); dto.setJname(name); dto.setAge(age); dto.setAddrs(addrs); dto.setSkill(skill); dto.setExp(exp); dto.setLoc(loc); dto.setExpsal(expsal); try { result=service.registerJobSeeker(dto); } catch (Exception e) { e.printStackTrace(); } pw.println("<h1 style='color:red;text-align:center'>Result</h1>"); pw.println("<h1 style='color:blue;text-align:center'>"+result+"</h1>"); pw.println("form1/req1 data<br> "+name+"....."+age+"....."+addrs+"<br>"); pw.println("form2/req2 data<br> "+skill+"....."+exp+".....<br>"); pw.println("form3/req3 data<br> "+loc+"....."+expsal+".....<br>"); pw.println("<a href='personal.html'>home</a>"); pw.close(); } public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doGet(req, res); } }
[ "varunraj2297@gmail.com" ]
varunraj2297@gmail.com
5876e9e7b17987c4e5e62db65d6057a6d2615172
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/hd/saly/ds/HD_SALY_6200_MDataSet.java
89144e77dee87766a18a733cb632ae07f28dfcf5
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,505
java
/*************************************************************************************************** * ํŒŒ์ผ๋ช… : .java * ๊ธฐ๋Šฅ : ๋…์ž์šฐ๋Œ€-๊ตฌ๋…์‹ ์ฒญ * ์ž‘์„ฑ์ผ์ž : 2007-05-22 * ์ž‘์„ฑ์ž : ๊น€๋Œ€์„ญ ***************************************************************************************************/ /*************************************************************************************************** * ์ˆ˜์ •๋‚ด์—ญ : * ์ˆ˜์ •์ž : * ์ˆ˜์ •์ผ์ž : * ๋ฐฑ์—… : ***************************************************************************************************/ package chosun.ciis.hd.saly.ds; import java.sql.*; import java.util.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.hd.saly.dm.*; import chosun.ciis.hd.saly.rec.*; /** * */ public class HD_SALY_6200_MDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{ public ArrayList curlist = new ArrayList(); public String errcode; public String errmsg; public HD_SALY_6200_MDataSet(){} public HD_SALY_6200_MDataSet(String errcode, String errmsg){ this.errcode = errcode; this.errmsg = errmsg; } public void setErrcode(String errcode){ this.errcode = errcode; } public void setErrmsg(String errmsg){ this.errmsg = errmsg; } public String getErrcode(){ return this.errcode; } public String getErrmsg(){ return this.errmsg; } public void getValues(CallableStatement cstmt) throws SQLException{ this.errcode = Util.checkString(cstmt.getString(1)); this.errmsg = Util.checkString(cstmt.getString(2)); if(!"".equals(this.errcode)){ return; } ResultSet rset0 = (ResultSet) cstmt.getObject(4); while(rset0.next()){ HD_SALY_6200_MCURLISTRecord rec = new HD_SALY_6200_MCURLISTRecord(); rec.cd_type = Util.checkString(rset0.getString("cd_type")); rec.cd = Util.checkString(rset0.getString("cd")); rec.cdnm = Util.checkString(rset0.getString("cdnm")); rec.cd_abrv_nm = Util.checkString(rset0.getString("cd_abrv_nm")); this.curlist.add(rec); } } }/*---------------------------------------------------------------------------------------------------- Web Tier์—์„œ DataSet ๊ฐ์ฒด ๊ด€๋ จ ์ฝ”๋“œ ์ž‘์„ฑ์‹œ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. <% HD_SALY_6200_MDataSet ds = (HD_SALY_6200_MDataSet)request.getAttribute("ds"); %> Web Tier์—์„œ Record ๊ฐ์ฒด ๊ด€๋ จ ์ฝ”๋“œ ์ž‘์„ฑ์‹œ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. <% for(int i=0; i<ds.curlist.size(); i++){ HD_SALY_6200_MCURLISTRecord curlistRec = (HD_SALY_6200_MCURLISTRecord)ds.curlist.get(i);%> HTML ์ฝ”๋“œ๋“ค.... <%}%> ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier์—์„œ DataSet ๊ฐ์ฒด์˜ <%= %> ์ž‘์„ฑ์‹œ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. <%= ds.getErrcode()%> <%= ds.getErrmsg()%> <%= ds.getCurlist()%> ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier์—์„œ Record ๊ฐ์ฒด์˜ <%= %> ์ž‘์„ฑ์‹œ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. <%= curlistRec.cd_type%> <%= curlistRec.cd%> <%= curlistRec.cdnm%> <%= curlistRec.cd_abrv_nm%> ----------------------------------------------------------------------------------------------------*/ /* ์ž‘์„ฑ์‹œ๊ฐ„ : Fri Sep 11 17:40:04 KST 2015 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
115653899a51678eaa80413eea3a94c65a76fb14
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/cds-merchandising/merchandisingcmswebservices/web/testsrc/com/hybris/merchandising/controller/StrategyControllerTest.java
fa241196df885b122e0dcaace63e1451dedf0d56
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
1,748
java
/** * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package com.hybris.merchandising.controller; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import com.hybris.merchandising.dto.DropdownElement; import com.hybris.merchandising.service.StrategyService; import com.hybris.merchandising.service.impl.StrategyTest; /** * StrategyControllerTest is a test class for the {@link StrategyController}. */ public class StrategyControllerTest extends StrategyTest { StrategyController controller; StrategyService mockStrategyService; @Before public void setUp() { controller = new StrategyController(); mockStrategyService = Mockito.mock(StrategyService.class); Mockito.when(mockStrategyService.getStrategies(Integer.valueOf(1), Integer.valueOf(10))).thenReturn(getMockStrategies(10)); Mockito.when(mockStrategyService.getStrategies(Integer.valueOf(1), Integer.valueOf(16))).thenReturn(getMockStrategies(16)); controller.strategyService = mockStrategyService; } @Test public void testGetStrategies() { final Map<String, List<DropdownElement>> allStrategies = controller.getStrategies(null, null); for (int i = 0; i < 9; i++) { verifyDropDown(i, allStrategies.get("options").get(i)); } Mockito.verify(mockStrategyService, Mockito.times(1)).getStrategies(1, 10); final Map<String, List<DropdownElement>> pagedStrategies = controller.getStrategies(Integer.valueOf(0), Integer.valueOf(16)); for (int i = 0; i < 15; i++) { verifyDropDown(i, pagedStrategies.get("options").get(i)); } Mockito.verify(mockStrategyService, Mockito.times(1)).getStrategies(Integer.valueOf(1), Integer.valueOf(16)); } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com