blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
409daa7bdf2ca035444e233ab89689a505129c2d
99993cee373542810763c6a037db527b86b0d4ac
/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1PodSecurityPolicyListBuilder.java
2d4aacb5447a6b7e5362ac9ead8527d495132bd9
[ "Apache-2.0" ]
permissive
saparaj/java
b54c355f2276ac7ac2cd09f2f0cf3212f7c41b2d
a7266c798f16ab01e9ceac441de199bd8a5a839a
refs/heads/master
2023-08-15T19:35:11.163843
2021-10-13T16:53:49
2021-10-13T16:53:49
269,235,029
0
0
Apache-2.0
2020-06-04T01:46:44
2020-06-04T01:46:43
null
UTF-8
Java
false
false
3,915
java
package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; import java.lang.Object; import java.lang.Boolean; public class V1beta1PodSecurityPolicyListBuilder extends io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluentImpl<io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListBuilder> implements io.kubernetes.client.fluent.VisitableBuilder<io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList,io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListBuilder> { io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluent<?> fluent; java.lang.Boolean validationEnabled; public V1beta1PodSecurityPolicyListBuilder() { this(true); } public V1beta1PodSecurityPolicyListBuilder(java.lang.Boolean validationEnabled) { this(new V1beta1PodSecurityPolicyList(), validationEnabled); } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluent<?> fluent) { this(fluent, true); } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluent<?> fluent,java.lang.Boolean validationEnabled) { this(fluent, new V1beta1PodSecurityPolicyList(), validationEnabled); } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluent<?> fluent,io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList instance) { this(fluent, instance, true); } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyListFluent<?> fluent,io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList instance,java.lang.Boolean validationEnabled) { this.fluent = fluent; fluent.withApiVersion(instance.getApiVersion()); fluent.withItems(instance.getItems()); fluent.withKind(instance.getKind()); fluent.withMetadata(instance.getMetadata()); this.validationEnabled = validationEnabled; } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList instance) { this(instance,true); } public V1beta1PodSecurityPolicyListBuilder(io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList instance,java.lang.Boolean validationEnabled) { this.fluent = this; this.withApiVersion(instance.getApiVersion()); this.withItems(instance.getItems()); this.withKind(instance.getKind()); this.withMetadata(instance.getMetadata()); this.validationEnabled = validationEnabled; } public io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicyList build() { V1beta1PodSecurityPolicyList buildable = new V1beta1PodSecurityPolicyList(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setItems(fluent.getItems()); buildable.setKind(fluent.getKind()); buildable.setMetadata(fluent.getMetadata()); return buildable; } public boolean equals(java.lang.Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; V1beta1PodSecurityPolicyListBuilder that = (V1beta1PodSecurityPolicyListBuilder) o; if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false; if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false; return true; } public int hashCode() { return java.util.Objects.hash(fluent, validationEnabled, super.hashCode()); } }
[ "bburns@microsoft.com" ]
bburns@microsoft.com
4a3f65516841cb21751b60b0a850f17ffbda52dd
99aa730af0b2cc054f0f0f56ad06e1273822fca6
/src/main/java/store/store/mappers/BooksForTable.java
a9e97fe9104f2efa66f84078be95775f45a3943a
[]
no_license
JakubKozimorStudy/BookStore
42f2e8347c8ab3917b07d2e7ed878e838dfcf813
49d6bbed51ca4773b8322083a064ba4ab9ef8b15
refs/heads/master
2022-10-18T03:42:13.888189
2020-06-10T12:31:44
2020-06-10T12:31:44
266,584,964
0
0
null
null
null
null
UTF-8
Java
false
false
1,438
java
package store.store.mappers; public class BooksForTable { private Long bookId; private String title; private String author; private String name; private Integer price; public BooksForTable(Long bookId, String title, String author, String name, Integer price) { this.bookId = bookId; this.title = title; this.author = author; this.name = name; this.price = price; } public Long getBookId() { return bookId; } public void setBookId(Long bookId) { this.bookId = bookId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getPrice() { return price; } public void setPrice(Integer price) { this.price = price; } @Override public String toString() { return "BooksForTable{" + "bookId=" + bookId + ", title='" + title + '\'' + ", author='" + author + '\'' + ", name='" + name + '\'' + ", price=" + price + '}'; } }
[ "gudzikoff@gmail.com" ]
gudzikoff@gmail.com
d87026a5fd3d503fe1c63ce6ee5171f3c907c34e
6fcf99a76ec1790a44d123cf4d0f57277ee28865
/src/Main.java
b4e68e82bda013a798718d70bb62b158f4a9a97f
[]
no_license
YevhenKhomenko/course_work_parallel_computing
211e9dc71bbda7202f53b31341ecc636a32a82f7
9f25823402948aee46a64efabc3eb9f90c029be7
refs/heads/master
2022-11-05T00:43:19.530090
2020-06-19T14:46:09
2020-06-19T14:46:09
266,805,967
0
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
import java.io.*; import java.util.*; //N = 2000 public class Main{ public static void main(String[] args){ System.out.println("Enter a path to the token file(.vocab extension) : "); File tokenFile = null; try { tokenFile = getFile(); } catch (IOException e) { e.printStackTrace(); } System.out.println("Enter a path to the data folder : "); File dataFolder = null; try { dataFolder = getFile(); } catch (IOException e) { e.printStackTrace(); } int numOfThreads = Integer.parseInt(args[0]); List<File> files = new ArrayList<>(); getFiles(dataFolder,files); InvertedIndexMap map = new InvertedIndexMap(tokenFile, files); map.startThreads(numOfThreads); map.generateOutputFile(); double execTime = map.getExecutionTime(); System.out.println("Execution time (seconds) : " + execTime); System.out.println("Find word: "); wordSearcher(map); } public static File getFile() throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String newPath = reader.readLine(); File newFile = new File(newPath); return newFile; } public static void getFiles (File folder, List<File> fileList){ for(File file : folder.listFiles()){ if(file.isDirectory()){ getFiles(file,fileList); }else{ fileList.add(file); } } } public static void wordSearcher(InvertedIndexMap map){ Map<String, Map<String, Integer>> curMap = map.getInvertedIndex(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); while (true) { String word = null; try { word = reader.readLine(); } catch (IOException e) { e.printStackTrace(); } System.out.println(curMap.get(word)); } } }
[ "ievgenkhonenko@MacBook-Pro-Ievgen.local" ]
ievgenkhonenko@MacBook-Pro-Ievgen.local
dbdd886da656b6ae1541c808c0a606f9e34efe3b
098002b3b78e724d90cef12905b6d5e2ea467d9f
/sources/androidx/appcompat/view/menu/SubMenuWrapperICS.java
384b06d315bc1189a9b5d08323e9efc8fb16cd11
[]
no_license
chaitanyks/android
0a5456f4fcb84b7cd9ae22d5e15b1f12e714be82
d3f98fc1208ddf0534bfa22cb81445b0be15ea72
refs/heads/main
2023-03-01T03:43:05.554071
2021-02-09T07:00:54
2021-02-09T07:00:54
337,319,041
0
0
null
null
null
null
UTF-8
Java
false
false
1,739
java
package androidx.appcompat.view.menu; import android.content.Context; import android.graphics.drawable.Drawable; import android.view.MenuItem; import android.view.SubMenu; import android.view.View; import androidx.core.internal.view.SupportSubMenu; class SubMenuWrapperICS extends MenuWrapperICS implements SubMenu { private final SupportSubMenu mSubMenu; SubMenuWrapperICS(Context context, SupportSubMenu subMenu) { super(context, subMenu); this.mSubMenu = subMenu; } @Override // android.view.SubMenu public SubMenu setHeaderTitle(int titleRes) { this.mSubMenu.setHeaderTitle(titleRes); return this; } @Override // android.view.SubMenu public SubMenu setHeaderTitle(CharSequence title) { this.mSubMenu.setHeaderTitle(title); return this; } @Override // android.view.SubMenu public SubMenu setHeaderIcon(int iconRes) { this.mSubMenu.setHeaderIcon(iconRes); return this; } @Override // android.view.SubMenu public SubMenu setHeaderIcon(Drawable icon) { this.mSubMenu.setHeaderIcon(icon); return this; } public SubMenu setHeaderView(View view) { this.mSubMenu.setHeaderView(view); return this; } public void clearHeader() { this.mSubMenu.clearHeader(); } @Override // android.view.SubMenu public SubMenu setIcon(int iconRes) { this.mSubMenu.setIcon(iconRes); return this; } @Override // android.view.SubMenu public SubMenu setIcon(Drawable icon) { this.mSubMenu.setIcon(icon); return this; } public MenuItem getItem() { return getMenuItemWrapper(this.mSubMenu.getItem()); } }
[ "defcdr@gmail.com" ]
defcdr@gmail.com
6737cb401632ff1ade4454c62fba4695207cca9d
2e660f02e0a836985f4b312def503c58077c1d8c
/src/main/java/com/muehda/digui/MiGong.java
c8388d4e8cd9921d19f5409c16cc07adaff0c8ed
[]
no_license
fengjunlin/data-structures
9cad23509aa5fdc9cbda25c2f8f5a74701d46c1d
f9fb1b953132eac32832dc44e48ea76f8531f3a2
refs/heads/master
2022-07-17T14:27:56.907031
2020-05-12T03:10:32
2020-05-12T03:10:32
263,218,970
1
0
null
null
null
null
UTF-8
Java
false
false
2,052
java
package com.muehda.digui; /** * @Description * @Author fengjl * @Date 2019/8/31 13:40 * @Version 1.0 **/ public class MiGong { public static void main(String[] args) { int[][] map = new int[8][7]; // 开始构建墙 for (int i = 0; i < 7; i++) { map[0][i] = 1; map[7][i] = 1; } for (int i = 0; i < 8; i++) { map[i][0] = 1; map[i][6] = 1; } // 设置挡板 map[3][1] = 1; map[3][2] = 1; // 输出地图 for (int i = 0; i < 8; i++) { for (int j = 0; j < 7; j++) { System.out.print(map[i][j] + " "); } System.out.println(); } setWay(map, 1, 1); // 输出地图 for (int i = 0; i < 8; i++) { for (int j = 0; j < 7; j++) { System.out.print(map[i][j] + " "); } System.out.println(); } } /** * 深入理解迷宫递归 * ①:1:代表墙, 2:代表已经走过的路,3:代表路走不同, * * @param map * @param i * @param j * @return */ public static boolean setWay(int[][] map, int i, int j) { if (map[6][5] == 2) { return true; } else { if (map[i][j] == 0) { map[i][j] = 2; if (setWay(map, i + 1, j)) { return true; } else if (setWay(map, i, j+1)) { return true; } else if (setWay(map, i-1, j)) { return true; } else if (setWay(map, i, j - 1)) { return true; } else { // 这个点的上下左右都不通的话,那么这个点设置为不通 map[i][j] = 3; return false; } } else { // 不等于0 可能就是 123 return false; } } } }
[ "jl.feng@muheda.com" ]
jl.feng@muheda.com
35601862925bb935fff75612453f08b913e8e600
0d20b4e5c3d2dc9c0aa3a42e7e3a3aedac1ffa09
/src/main/java/jp/hubfactory/moco/form/RegistUserActivityDetailForm.java
2af7c5a1e78bdc13111adaa39c8f88056444147c
[]
no_license
hubfactory-hafuka/moco_running
0fa69ceced8aa722050744b8f945b1603aa114a3
dc72929c3a617236b741a242bb1a23bf960748c5
refs/heads/master
2021-01-23T22:10:50.820014
2015-11-25T04:53:24
2015-11-25T04:53:24
31,254,706
0
0
null
2015-07-22T05:51:17
2015-02-24T10:18:47
Java
UTF-8
Java
false
false
213
java
package jp.hubfactory.moco.form; import lombok.Data; @Data public class RegistUserActivityDetailForm { /** 距離 */ private Integer distance; /** 経過時間 */ private Integer timeElapsed; }
[ "hafuka31042@gmail.com" ]
hafuka31042@gmail.com
90edaa85f2915ea68737f06d3b39a043f2192f2e
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
/x_collaboration_core_message/src/main/java/com/x/collaboration/core/message/dialog/TextMessage.java
73aa71d7c6cf5d1934c13953e89b728dcb9fd834
[ "BSD-3-Clause" ]
permissive
fancylou/o2oa
713529a9d383de5d322d1b99073453dac79a9353
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
refs/heads/master
2020-03-25T00:07:41.775230
2018-08-02T01:40:40
2018-08-02T01:40:40
143,169,936
0
0
BSD-3-Clause
2018-08-01T14:49:45
2018-08-01T14:49:44
null
UTF-8
Java
false
false
358
java
package com.x.collaboration.core.message.dialog; public class TextMessage extends DialogMessage { private String text; public TextMessage(String from, String person, String text) { super(DialogType.text, from, person); this.text = text; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
[ "caixiangyi2004@126.com" ]
caixiangyi2004@126.com
b9decd971254b5f47052ea93230c501a419cd515
929d704f27615532f68566055f10fb37a51df554
/drylining/build/generated/source/r/debug/com/google/android/exoplayer2/ui/R.java
27d14de89f2817e06e73d53e8e03bae48603a48a
[]
no_license
saubhagyamapps/drylining-final
5d9fce6fe7e058a70d7565d185393bc670721b81
cbf4c17b92558959e19e29b9789d76482ea0ea82
refs/heads/master
2021-10-15T23:01:42.841159
2019-02-06T10:29:57
2019-02-06T10:29:57
167,315,768
0
0
null
null
null
null
UTF-8
Java
false
false
8,752
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.google.android.exoplayer2.ui; public final class R { public static final class attr { public static final int ad_marker_color = 0x7f040022; public static final int ad_marker_width = 0x7f040023; public static final int auto_show = 0x7f040033; public static final int bar_height = 0x7f04003b; public static final int buffered_color = 0x7f040048; public static final int controller_layout_id = 0x7f040089; public static final int default_artwork = 0x7f040094; public static final int fastforward_increment = 0x7f0400b7; public static final int hide_on_touch = 0x7f0400ca; public static final int played_ad_marker_color = 0x7f04014d; public static final int played_color = 0x7f04014e; public static final int player_layout_id = 0x7f04014f; public static final int repeat_toggle_modes = 0x7f040163; public static final int resize_mode = 0x7f040164; public static final int rewind_increment = 0x7f040166; public static final int scrubber_color = 0x7f040173; public static final int scrubber_disabled_size = 0x7f040174; public static final int scrubber_dragged_size = 0x7f040175; public static final int scrubber_enabled_size = 0x7f040176; public static final int show_timeout = 0x7f040181; public static final int surface_type = 0x7f04019a; public static final int touch_target_height = 0x7f0401d7; public static final int unplayed_color = 0x7f0401db; public static final int use_artwork = 0x7f0401dd; public static final int use_controller = 0x7f0401de; } public static final class color { public static final int exo_edit_mode_background_color = 0x7f060080; } public static final class dimen { public static final int exo_media_button_height = 0x7f0700a0; public static final int exo_media_button_width = 0x7f0700a1; } public static final class drawable { public static final int exo_controls_fastforward = 0x7f0800b2; public static final int exo_controls_next = 0x7f0800b3; public static final int exo_controls_pause = 0x7f0800b4; public static final int exo_controls_play = 0x7f0800b5; public static final int exo_controls_previous = 0x7f0800b6; public static final int exo_controls_repeat_all = 0x7f0800b7; public static final int exo_controls_repeat_off = 0x7f0800b8; public static final int exo_controls_repeat_one = 0x7f0800b9; public static final int exo_controls_rewind = 0x7f0800ba; public static final int exo_edit_mode_logo = 0x7f0800bb; } public static final class id { public static final int all = 0x7f090042; public static final int exo_artwork = 0x7f0900b1; public static final int exo_content_frame = 0x7f0900b2; public static final int exo_controller = 0x7f0900b3; public static final int exo_controller_placeholder = 0x7f0900b4; public static final int exo_duration = 0x7f0900b5; public static final int exo_ffwd = 0x7f0900b6; public static final int exo_next = 0x7f0900b8; public static final int exo_overlay = 0x7f0900b9; public static final int exo_pause = 0x7f0900ba; public static final int exo_play = 0x7f0900bb; public static final int exo_position = 0x7f0900bc; public static final int exo_prev = 0x7f0900bd; public static final int exo_progress = 0x7f0900be; public static final int exo_repeat_toggle = 0x7f0900bf; public static final int exo_rew = 0x7f0900c0; public static final int exo_shutter = 0x7f0900c1; public static final int exo_subtitles = 0x7f0900c2; public static final int fill = 0x7f0900c6; public static final int fit = 0x7f0900c9; public static final int fixed_height = 0x7f0900cb; public static final int fixed_width = 0x7f0900cc; public static final int none = 0x7f090159; public static final int one = 0x7f090160; public static final int surface_view = 0x7f0901f9; public static final int texture_view = 0x7f09020d; } public static final class layout { public static final int exo_playback_control_view = 0x7f0b0067; public static final int exo_simple_player_view = 0x7f0b0068; } public static final class string { public static final int exo_controls_fastforward_description = 0x7f0f00c1; public static final int exo_controls_next_description = 0x7f0f00c2; public static final int exo_controls_pause_description = 0x7f0f00c3; public static final int exo_controls_play_description = 0x7f0f00c4; public static final int exo_controls_previous_description = 0x7f0f00c5; public static final int exo_controls_repeat_all_description = 0x7f0f00c6; public static final int exo_controls_repeat_off_description = 0x7f0f00c7; public static final int exo_controls_repeat_one_description = 0x7f0f00c8; public static final int exo_controls_rewind_description = 0x7f0f00c9; public static final int exo_controls_stop_description = 0x7f0f00ca; } public static final class style { public static final int ExoMediaButton = 0x7f1000cd; public static final int ExoMediaButton_FastForward = 0x7f1000ce; public static final int ExoMediaButton_Next = 0x7f1000cf; public static final int ExoMediaButton_Pause = 0x7f1000d0; public static final int ExoMediaButton_Play = 0x7f1000d1; public static final int ExoMediaButton_Previous = 0x7f1000d2; public static final int ExoMediaButton_Rewind = 0x7f1000d3; } public static final class styleable { public static final int[] AspectRatioFrameLayout = { 0x7f040164 }; public static final int AspectRatioFrameLayout_resize_mode = 0; public static final int[] DefaultTimeBar = { 0x7f040022, 0x7f040023, 0x7f04003b, 0x7f040048, 0x7f04014d, 0x7f04014e, 0x7f040173, 0x7f040174, 0x7f040175, 0x7f040176, 0x7f0401d7, 0x7f0401db }; public static final int DefaultTimeBar_ad_marker_color = 0; public static final int DefaultTimeBar_ad_marker_width = 1; public static final int DefaultTimeBar_bar_height = 2; public static final int DefaultTimeBar_buffered_color = 3; public static final int DefaultTimeBar_played_ad_marker_color = 4; public static final int DefaultTimeBar_played_color = 5; public static final int DefaultTimeBar_scrubber_color = 6; public static final int DefaultTimeBar_scrubber_disabled_size = 7; public static final int DefaultTimeBar_scrubber_dragged_size = 8; public static final int DefaultTimeBar_scrubber_enabled_size = 9; public static final int DefaultTimeBar_touch_target_height = 10; public static final int DefaultTimeBar_unplayed_color = 11; public static final int[] PlaybackControlView = { 0x7f040089, 0x7f0400b7, 0x7f040163, 0x7f040166, 0x7f040181 }; public static final int PlaybackControlView_controller_layout_id = 0; public static final int PlaybackControlView_fastforward_increment = 1; public static final int PlaybackControlView_repeat_toggle_modes = 2; public static final int PlaybackControlView_rewind_increment = 3; public static final int PlaybackControlView_show_timeout = 4; public static final int[] SimpleExoPlayerView = { 0x7f040033, 0x7f040089, 0x7f040094, 0x7f0400b7, 0x7f0400ca, 0x7f04014f, 0x7f040164, 0x7f040166, 0x7f040181, 0x7f04019a, 0x7f0401dd, 0x7f0401de }; public static final int SimpleExoPlayerView_auto_show = 0; public static final int SimpleExoPlayerView_controller_layout_id = 1; public static final int SimpleExoPlayerView_default_artwork = 2; public static final int SimpleExoPlayerView_fastforward_increment = 3; public static final int SimpleExoPlayerView_hide_on_touch = 4; public static final int SimpleExoPlayerView_player_layout_id = 5; public static final int SimpleExoPlayerView_resize_mode = 6; public static final int SimpleExoPlayerView_rewind_increment = 7; public static final int SimpleExoPlayerView_show_timeout = 8; public static final int SimpleExoPlayerView_surface_type = 9; public static final int SimpleExoPlayerView_use_artwork = 10; public static final int SimpleExoPlayerView_use_controller = 11; } }
[ "keshuvodedara@gmail.com" ]
keshuvodedara@gmail.com
a479bceb134dfce806567e46de05eff85a94ea2c
7ba385ae9217ed1deaf98afdbe01e159814a720b
/csv_data/src/main/java/nix/util/CsvTable.java
75b495234172e761c5f9e470809f99aa262ca970
[]
no_license
MarinaFedorenko/NIX-Homework-16
febd8c9ffc2bada7d2fac1cd0b753e491938a3ce
07b0f0218d1b0c0e34643001383470d186da6bd9
refs/heads/master
2023-01-14T00:53:24.397017
2020-11-12T22:06:24
2020-11-12T22:06:24
295,553,189
0
0
null
null
null
null
UTF-8
Java
false
false
2,894
java
package nix.util; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.*; public final class CsvTable { private final List<String> headers; private final Map<String, Integer> headerIndices; private final String[][] cells; private final int rows; private final int columns; private CsvTable(List<String> headers, String[][] cells) { this.cells = cells; this.rows = cells.length; this.columns = headers.size(); this.headers = Collections.unmodifiableList(headers); Map<String, Integer> headerIndices = new HashMap<>(headers.size()); int index = 0; for (String header : headers) { if(headerIndices.put(header, index++) != null) throw new IllegalArgumentException("Duplicate header: " + header); } this.headerIndices = headerIndices; } public int height() { return rows; } public int width() { return columns; } public List<String> getHeaders() { return headers; } public List<String> getRow(int row) { return List.of(cells[row]); } public String get(int row, int col) { return cells[row][col]; } public String get(int row, String col) { return cells[row][headerIndices.get(col)]; } public static Optional<CsvTable> fromFile(Path path) throws IOException { var lines = Files.readAllLines(path); return fromLines(lines); } public static Optional<CsvTable> fromLines(List<String> lines) { if (lines == null || lines.isEmpty()) return Optional.empty(); var iterator = lines.iterator(); var headers = split(iterator.next()); int columns = headers.size(); int rows = lines.size() - 1; String[][] cells = new String[rows][]; for (int row = 0; iterator.hasNext(); row++) { cells[row] = split(iterator.next(), columns); } return Optional.of(new CsvTable(headers, cells)); } private static List<String> split(String csvRow) { List<String> row = new ArrayList<>(); for (int end = 0, start = 0, length = csvRow.length(); end < length; end++) { if (csvRow.charAt(end) == ',') { row.add(start == end ? "" : csvRow.substring(start, end)); start = end + 1; } } return row; } private static String[] split(String csvRow, int limit) { String[] row = new String[limit]; for (int count = 0, start = 0, end = 0, length = csvRow.length(); end < length && count < limit; end++) { if (csvRow.charAt(end) == ',') { row[count++] = start == end ? "" : csvRow.substring(start, end); start = end + 1; } } return row; } }
[ "marina.fedora28@gmail.com" ]
marina.fedora28@gmail.com
907b0579d29cbbade409523772e46d261912bf99
c5beb9a55afafeba9375bd0fd71dfb0f34c9f057
/backend/ecommerce/src/main/java/com/alexpl/ecommerce/entity/Product.java
84621c3391ff821861edf7abd28e62a838752e37
[]
no_license
AlexandrosPlessias/eCommerce-App
bc3475d35ee4552150d84f7a5af79f4186177e16
3e83b5e0c6cd697d257e2d84b5a7e672d134a8a8
refs/heads/main
2023-09-06T07:46:54.592169
2021-11-21T15:27:58
2021-11-21T15:27:58
397,653,931
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package com.alexpl.ecommerce.entity; import lombok.Data; import org.hibernate.annotations.CreationTimestamp; import javax.persistence.*; import java.math.BigDecimal; import java.sql.Date; @Entity @Table(name = "product") @Data public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @ManyToOne @JoinColumn(name = "category_id", nullable = false) private ProductCategory category; @Column(name = "sku") private String sku; @Column(name = "name") private String name; @Column(name = "description") private String description; @Column(name = "unit_price") private BigDecimal unit_price; @Column(name = "image_url") private String image_url; @Column(name = "active") private Boolean active; @Column(name = "units_in_stock") private Integer units_in_stock; @Column(name = "date_created") @CreationTimestamp private Date date_created; @Column(name = "last_updated") @CreationTimestamp private Date last_updated; }
[ "67461036+AlexandrosPlessias@users.noreply.github.com" ]
67461036+AlexandrosPlessias@users.noreply.github.com
ef04ab280ffce070497fdde4a26044808accad91
3862d293505929c3087d8e763dad222709ea91f0
/src/main/java/com/bl/demo/service/EmployeeServiceImpl.java
b66a0494ead89cdef19f5213eee881184bd07e93
[]
no_license
priyankagarad/LoginRegistrationWithMockito
029003bec850db0066fab9ca3537eca9f1388fae
98980fa3e0aa0c26b6e2e8d4c4b200cee55b0ecc
refs/heads/master
2022-11-15T15:43:51.511571
2020-06-29T18:42:57
2020-06-29T18:42:57
275,118,992
0
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
package com.bl.demo.service; import com.bl.demo.model.Employee; import com.bl.demo.model.Login; import com.bl.demo.repository.IEmployeeRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service public class EmployeeServiceImpl implements IEmployeeService{ @Autowired IEmployeeRepository employeeRepository; public String greeting(){ return "Welcome"; } /**+ * @param employee :Reference of Employee Model Class * @return */ @Override public Employee addEmployee(Employee employee) { return employeeRepository.save(employee); } /** * @Purpose: check the Username and password are Match or not in the database * @param login :Reference of Employee Model Class * @return */ @Override public Employee loginProcess(Login login) { List<Employee> list = employeeRepository.findAll(); Optional<Employee> employee1 = list.stream() .filter(e -> e.getName().equals(login.getName()) && e.getPassword().equals(login.getPassword())) .findAny(); return employee1.get() != null ? employee1.get() : null; } }
[ "garadpriyanka1995@gmail.com" ]
garadpriyanka1995@gmail.com
2ec3acfbb172deddc9cd624e198f864f87796043
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/internal/play_billing/zzf.java
0b98f177338f5f088defccf69935deaf67a504f2
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
518
java
package com.google.android.gms.internal.play_billing; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; /* compiled from: com.android.billingclient:billing@@4.0.0 */ public class zzf extends Binder implements IInterface { public final IBinder asBinder() { throw null; } public final boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { throw null; } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
9a6bf3d7a9baeed81b26c2e1d32c6e6a631ab0c6
d903bc9bb776e9de8f9947193700d4ff645ae782
/Y2167DAWNALLDEMO/02Spring/src/main/java/cn/dawn/day03printer/ink/BlackInk.java
588e33e9c9949e312edf3263028ced168a462780
[]
no_license
1539224793/DAWN
7e4c575b680c96225b17f89699784b0d44bd6b56
508da552bca8ae7491ba9f82c4e62e7a287480aa
refs/heads/master
2021-04-09T10:20:58.569237
2018-03-16T14:00:55
2018-03-16T14:00:55
125,521,741
1
0
null
null
null
null
UTF-8
Java
false
false
204
java
package cn.dawn.day03printer.ink; /** * Created by Dawn on 2018/3/3. */ /*黑白墨盒*/ public class BlackInk implements Ink { public String getInkColor() { return "黑白墨盒"; } }
[ "1539224793@qq.com" ]
1539224793@qq.com
97288ca07231aca63e3ee6c771fb6eaef552c47c
5f3e14720140eae3bcd517b2b56813e54f5ba7f3
/src/main/java/com/ailtonluiz/erpapi/api/model/AddressModel.java
6e1b1d0f3be03438415acb5687885e65770aa79b
[]
no_license
ailtonluiz/erp-api
b5a9b4266898b58df69c39f18cb93d38fea579ce
913bf1399a2562941709f0c3114b1bf070fb1fde
refs/heads/master
2023-08-21T10:57:23.634353
2021-10-15T19:34:18
2021-10-15T19:34:18
416,838,474
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.ailtonluiz.erpapi.api.model; import lombok.Getter; import lombok.Setter; @Getter @Setter public class AddressModel { private String phone; private String zipCode; private String number; private String complement; private String district; private CitySummaryModel city; }
[ "ailtonatn@gmail.com" ]
ailtonatn@gmail.com
e63a621ad2598c488ebdf5692625c717dbe438de
fb8fd212b2d864a13af2f4c575a38a3ba64a8b6b
/src/sv/antifraud/FeatureOne.java
5ad91042bf4cbfee6d99c78b57c9232e1787f1cd
[]
no_license
vlasov01/digital-wallet
16e6baa4e54b11d8b6eee83b0cd4e204014cbd08
a6a747f8649d52e882cf56f5efac85b773896852
refs/heads/master
2020-12-24T08:08:33.009721
2016-11-16T22:24:19
2016-11-16T22:24:19
73,341,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,969
java
package sv.antifraud; /** * a program that detects suspicious transactions * fraud detection algorithm * Created by Sergey Vlasov on 11/4/2016. */ import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.util.HashSet; import java.util.Set; /** * a program that detects suspicious transactions * fraud detection algorithm * Feature 1 * Created by Sergey Vlasov on 11/4/2016. */ public final class FeatureOne extends AntifraudEngine { public static void main(String[] args){ outputFile = new File(baseOutputFilename+"output1.txt"); configIO(args); FeatureOne engine = new FeatureOne(); engine.execute(outputFile); } public void runValidator(final BufferedWriter bw) throws IOException { final Set<Long> set = //Collections.synchronizedSortedSet( - not required - single for a thread //new TreeSet<Long>();//); // 3938360 transactions // 469180 unique pairs new HashSet<Long>(4000000); //Improve speed to bootstrap initial state //new HashSet<Long>(); readFile(batchPaymentFile, new Strategy() { @Override public void performTask(int x, int y) {set.add(Transformer.toOrderedLong(x,y));} }); //max 77372 min 0 median 38456 readFile(streamPaymentFile, new Strategy() { @Override public void performTask(int x, int y) { try { if (set.contains(Transformer.toOrderedLong(x,y))) { bw.write("trusted\n"); trusted++; } else { bw.write("unverified\n"); } } catch (IOException e) { e.printStackTrace(); } } }); //System.out.println("set size="+set.size()); } }
[ "sergey_vlasov@yahoo.com" ]
sergey_vlasov@yahoo.com
2e60ea9aef403b939a04faa6ca058ba12de1cbfc
ad9bcda219a96fa70e905a9a55b8c7d9f9c14e8b
/gen/org/elixir_lang/psi/impl/ElixirEnclosedHexadecimalEscapeSequenceImpl.java
717caab68c02e181e4e10f3de5ea34bb9bc54fd5
[]
no_license
consulo-savepoint/intellij-elixir
0d6f3d99b2cf38d73e860eea09cfa80c8ce05f5f
7ba184db903be7b8a46b27d838ff58090a1ad54e
refs/heads/master
2021-05-28T22:55:40.796902
2015-07-02T13:34:34
2015-07-02T13:34:34
null
0
0
null
null
null
null
UTF-8
Java
false
true
1,185
java
// This is a generated file. Not intended for manual editing. package org.elixir_lang.psi.impl; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import org.elixir_lang.psi.ElixirEnclosedHexadecimalEscapeSequence; import org.elixir_lang.psi.ElixirVisitor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import static org.elixir_lang.psi.ElixirTypes.VALID_HEXADECIMAL_DIGITS; public class ElixirEnclosedHexadecimalEscapeSequenceImpl extends ASTWrapperPsiElement implements ElixirEnclosedHexadecimalEscapeSequence { public ElixirEnclosedHexadecimalEscapeSequenceImpl(ASTNode node) { super(node); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof ElixirVisitor) ((ElixirVisitor)visitor).visitEnclosedHexadecimalEscapeSequence(this); else super.accept(visitor); } @Override @Nullable public PsiElement getValidHexadecimalDigits() { return findChildByType(VALID_HEXADECIMAL_DIGITS); } public int codePoint() { return ElixirPsiImplUtil.codePoint(this); } }
[ "Kronic.Deth@gmail.com" ]
Kronic.Deth@gmail.com
7872b34f867216ee199269db036d1e0eb719ff8e
a1a95944fd4f31d0eab1e72ef8642d0b115a5353
/bitCamp - workspace/workspace/Week5Exercieses/src/ba/bitcamp/boris/exercises/day4/task3/WildAnimal.java
d5ebe071c342e17894d193afb7771b1a75957b65
[]
no_license
bc-boristomic/JavaProjects
4d293e08e7c0cbc91df681cb79c01579e31ebb8b
b07353fa7d46639ecbcdab35a4ac2949be27e757
refs/heads/master
2021-05-28T21:15:50.648539
2015-11-03T12:09:08
2015-11-03T12:09:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
267
java
package ba.bitcamp.boris.exercises.day4.task3; public class WildAnimal extends Animal { private Boolean isBeingFed; public Boolean getIsBeingFed() { return isBeingFed; } public void setIsBeingFed(Boolean isBeingFed) { this.isBeingFed = isBeingFed; } }
[ "boris.tomic@bitcamp.ba" ]
boris.tomic@bitcamp.ba
a3e786682986e72a40e895e4bbd808d4b59df017
cd4863874ea2ef166607b87806c79228d65683fd
/app/src/main/java/com/shoujia/zhangshangxiu/order/adapter/BankListAdapter.java
b14b72478d7dfb84cde28080b767808ede9746ac
[]
no_license
wutongyuqq/zhangshangxiu-app
efc54c1768ce124d5afe94ce995734ae7f32fddb
340a5e7c5cfa4ce793422e1104624019fbcdb6c0
refs/heads/master
2020-06-13T14:17:02.384043
2019-08-08T00:19:49
2019-08-08T00:19:51
194,684,847
1
1
null
null
null
null
UTF-8
Java
false
false
2,199
java
package com.shoujia.zhangshangxiu.order.adapter; import android.content.Context; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.shoujia.zhangshangxiu.R; import com.shoujia.zhangshangxiu.entity.CarInfo; import com.shoujia.zhangshangxiu.order.entity.RateBean; import java.util.List; /** * Created by Administrator on 2017/2/26 0026. */ public class BankListAdapter extends BaseAdapter { private List<RateBean> listData; Context context; Handler handler; public BankListAdapter(Context context, List<RateBean> listData) { this.context = context; this.listData = listData; } @Override public int getCount() { if (listData.size() == 0) { return 0; } return listData.size(); } public void setListData(List<RateBean> carInfos){ if(carInfos==null){ return; } if(listData!=null){ listData.clear(); } listData.addAll(carInfos); } @Override public Object getItem(int position) { return listData.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { final Hodler hodler; if (convertView == null) { hodler = new Hodler(); convertView = LayoutInflater.from(context).inflate( R.layout.bank_list_item, null); hodler.tv_cp_name = convertView .findViewById(R.id.tv_cp_name); convertView.setTag(hodler); }else{ hodler = (Hodler) convertView.getTag(); } RateBean bean = listData.get(position); hodler.tv_cp_name.setText(bean.setup1); if(bean.name.contains("支付宝")||bean.name.contains("微信")){ hodler.tv_cp_name.setVisibility(View.GONE); } return convertView; } class Hodler { TextView tv_cp_name; } }
[ "zou.jr@burgeon.cn" ]
zou.jr@burgeon.cn
74f9586de64b8a87b6fb6ff46383fccfd0b7e5eb
7cda29523330db964217567727c083b551a01bea
/modules/core/src/com/acc/cuba/tools/scheduler/core/ScheduledTaskLoader.java
79e6d3b13344bacea5c0be86f33c32adee4fb50d
[ "Apache-2.0" ]
permissive
gxbsst/cuba-scheduler-annotation
582f940b131399d51103d3e639e942892b7eb501
3779b1b088a942725dd236741c410bf5ef9d6c03
refs/heads/master
2021-07-05T12:46:22.536923
2017-09-30T04:58:20
2017-09-30T04:58:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,157
java
package com.acc.cuba.tools.scheduler.core; import com.acc.cuba.tools.scheduler.core.annotation.MethodParam; import com.acc.cuba.tools.scheduler.core.annotation.ScheduledBeanMethod; import com.acc.cuba.tools.scheduler.core.annotation.ScheduledBeanMethods; import com.acc.cuba.tools.scheduler.core.exception.WrongSchedulerDefinitionException; import com.acc.cuba.tools.scheduler.entity.SchedulerLoaderLog; import com.haulmont.cuba.core.Persistence; import com.haulmont.cuba.core.Transaction; import com.haulmont.cuba.core.app.scheduled.MethodParameterInfo; import com.haulmont.cuba.core.entity.ScheduledTask; import com.haulmont.cuba.core.entity.ScheduledTaskDefinedBy; import com.haulmont.cuba.core.entity.SchedulingType; import com.haulmont.cuba.core.global.DataManager; import com.haulmont.cuba.core.global.LoadContext; import com.haulmont.cuba.core.global.Metadata; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.springframework.aop.support.AopUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.core.MethodIntrospector; import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.stereotype.Component; import javax.inject.Inject; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; /** * Created by Aleksey Stukalov on 21/09/2017. */ @Component public class ScheduledTaskLoader implements BeanPostProcessor { @Inject private Metadata metadata; @Inject private Persistence persistence; @Inject private DataManager dataManager; @Inject private Logger log; private List<ScheduledMethodContext> scheduleAnnotatedMethods = new ArrayList<>(); protected boolean isScheduledTaskLoaded(String code) { SchedulerLoaderLog loaderLog = dataManager.load(LoadContext.create(SchedulerLoaderLog.class) .setQuery(LoadContext.createQuery("select e from scheduler$SchedulerLoaderLog e where e.code = :code") .setParameter("code", code))); return loaderLog != null; } public void loadScheduledMethods() { for (ScheduledMethodContext smc : scheduleAnnotatedMethods) { for (ScheduledBeanMethod scheduleConfig : smc.getScheduledBeanMethods()) try { loadTaskForScheduledBeanMethod(smc.getBeanName(), smc.getMethod(), scheduleConfig); } catch (WrongSchedulerDefinitionException e) { log.error(e.getMessage(), e); } } } protected boolean loadTaskForScheduledBeanMethod(String beanName, Method method, ScheduledBeanMethod config) { if (isScheduledTaskLoaded(config.code())) { log.info(String.format("Scheduler [%s] has already been imported for bean: %s, method: %s", config.code(), beanName, method.getName())); return false; } try (Transaction tx = persistence.createTransaction()) { ScheduledTask scheduledTask = metadata.create(ScheduledTask.class); scheduledTask.setBeanName(beanName); scheduledTask.setMethodName(method.getName()); scheduledTask.setDefinedBy(ScheduledTaskDefinedBy.BEAN); scheduledTask.setActive(config.isActive()); scheduledTask.setUserName(StringUtils.trimToNull(config.userName())); scheduledTask.setSingleton(config.isSingleton()); scheduledTask.setTimeout(config.timeout() > 0 ? config.timeout() : null); scheduledTask.setTimeFrame(config.timeFrame() > 0 ? config.timeFrame() : null); scheduledTask.setPermittedServers(StringUtils.trimToNull(config.permittedServers())); scheduledTask.setLogStart(config.logStart()); scheduledTask.setLogFinish(config.logFinish()); scheduledTask.setDescription(StringUtils.trimToNull(config.description())); //set parameters if (method.getParameters().length != config.methodParams().length) throw new WrongSchedulerDefinitionException(String.format("Scheduler [%s] definition doesn't comply the actual parameters number: bean: %s, method: %s", config.code(), beanName, method.getName())); List<Class> paramsTypes = Arrays.stream(method.getParameters()).map(Parameter::getType).collect(Collectors.toList()); // assumed that MethodParam-s are following in the same order as parameters of the method to map types to them List<MethodParameterInfo> params = new ArrayList<>(); for (MethodParam param : config.methodParams()) { params.add(new MethodParameterInfo(paramsTypes.iterator().next().getName(), param.name(), param.value())); } scheduledTask.updateMethodParameters(params); SchedulingType type = getSchedulingType(beanName, method, config); scheduledTask.setSchedulingType(type); switch (type) { case CRON: scheduledTask.setCron(config.cron().expression()); break; case FIXED_DELAY: scheduledTask.setPeriod(config.fixedDelay().period()); try { Date startDate = (new SimpleDateFormat("dd.MM.yyyy HH:mm:ss")).parse(config.fixedDelay().startDate()); scheduledTask.setStartDate(startDate); } catch (ParseException e) { throw new WrongSchedulerDefinitionException(String.format("Start date was not parsed for scheduler: %s, bean: %s, method: %s", config.code(), beanName, method.getName()), e); } break; case PERIOD: scheduledTask.setPeriod(config.period().period()); try { Date startDate = (new SimpleDateFormat("dd.MM.yyyy HH:mm:ss")).parse(config.period().startDate()); scheduledTask.setStartDate(startDate); } catch (ParseException e) { throw new WrongSchedulerDefinitionException(String.format("Start date was not parsed for scheduler: %s, bean: %s, method: %s", config.code(), beanName, method.getName()), e); } break; } SchedulerLoaderLog loaderLog = metadata.create(SchedulerLoaderLog.class); loaderLog.setCode(config.code()); loaderLog.setScheduledTask(scheduledTask); persistence.getEntityManager().persist(scheduledTask); persistence.getEntityManager().persist(loaderLog); log.info("Scheduler [{}] has been successfully imported for bean: {}, method: {}", config.code(), beanName, method.getName()); tx.commit(); return true; } } private SchedulingType getSchedulingType(String beanName, Method method, ScheduledBeanMethod config) throws WrongSchedulerDefinitionException { Set<SchedulingType> definedTypes = new HashSet<>(); if (!config.period().startDate().equals("")) definedTypes.add(SchedulingType.PERIOD); if (!config.cron().expression().equals("")) definedTypes.add(SchedulingType.CRON); if (!config.fixedDelay().startDate().equals("")) definedTypes.add(SchedulingType.FIXED_DELAY); if (definedTypes.size() == 1) return definedTypes.iterator().next(); else throw new WrongSchedulerDefinitionException( String.format("Scheduler [%s] has more than one Scheduling Type defined for : bean: %s, method: %s", config.code(), beanName, method.getName())); } @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } /** * The method scans all beans, that contain methods, annotated as {@link ScheduledBeanMethod} */ @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { Class<?> targetClass = AopUtils.getTargetClass(bean); Map<Method, Set<ScheduledBeanMethod>> annotatedMethods = MethodIntrospector.selectMethods(targetClass, (MethodIntrospector.MetadataLookup<Set<ScheduledBeanMethod>>) method -> { Set<ScheduledBeanMethod> scheduledMethods = AnnotatedElementUtils.getMergedRepeatableAnnotations( method, ScheduledBeanMethod.class, ScheduledBeanMethods.class); return (!scheduledMethods.isEmpty() ? scheduledMethods : null); }); for (Map.Entry<Method, Set<ScheduledBeanMethod>> entry : annotatedMethods.entrySet()) { scheduleAnnotatedMethods.add(new ScheduledMethodContext(beanName, entry.getKey(), entry.getValue())); } return bean; } }
[ "stukalov@haulmont.com" ]
stukalov@haulmont.com
5781eec848ce2c9205afe4d95a31e29fb1e72bdb
4e41feed69b5c3d98ffff3869419228a912e1aa3
/_11jsp/JSPSampleCopy/src/com/sist/IMemberAccess.java
f1125b0970f0d6dd56ba040b420bd4faada8a2af
[]
no_license
HR-Kim/sist
7442a87ee0361aa4d0de962c6b8598caec46e3f6
e386a3dfe187db7080134d2f27b258d97c29f1d7
refs/heads/master
2020-12-30T10:49:40.395072
2017-02-28T08:50:57
2017-02-28T08:50:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
package com.sist; public interface IMemberAccess { public boolean addMember(Member member); public Member login(Member member); }
[ "faithbae41@gmail.com" ]
faithbae41@gmail.com
e3e4ed0ee7e1b1d09145da0de3564398e9d857cd
f3c850fe13196c327fe9ec5b7a9b41c2afe78ed2
/core/src/main/java/org/fkjava/travel/core/CoreMain.java
c90fab607813ef5046f03b7666f135a6354bc38b
[ "Apache-2.0" ]
permissive
fkjava/travel
3a349e50b62459d481e8dbf5776f2f85061759ee
37a3e8ef9dc16dc1881198dac205cf8a3827676c
refs/heads/master
2020-03-24T21:27:48.427462
2018-07-31T15:57:43
2018-07-31T15:57:43
143,033,667
0
0
Apache-2.0
2018-07-31T15:33:05
2018-07-31T15:33:05
null
UTF-8
Java
false
false
322
java
package org.fkjava.travel.core; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class CoreMain { public static void main(String[] args) { SpringApplication.run(CoreConfig.class, args); } }
[ "luo_wenqiang@126.com" ]
luo_wenqiang@126.com
e916560b79a3294c7522ac87e590080ebe6a77ef
031fd96497cf82cedfb510e74909df16646f28fa
/pcmss.dev/pcmss/src/main/java/com/quick/portal/sms/smsServices/SmsTempleReplyResult.java
5ab9d27b8196be44bf72f65ae2f59edf67a09731
[]
no_license
dfjxpcxm/pcmss.dev
bc929f08732a8d26b378737c29a898a643b03256
fb8a7e4abe6caf4662ef77cff2bc3ecc1200708a
refs/heads/master
2022-12-26T11:43:27.844540
2020-06-29T07:01:26
2020-06-29T07:01:26
175,159,424
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.quick.portal.sms.smsServices; import java.util.ArrayList; public class SmsTempleReplyResult { /* { "result": 0, "errmsg": "", "data": { "id": 123, "international": 0, "status": 1, "text": "xxxxx", "type": 0 } } */ public class data { public int id; public int international; public int status; public String text; public int type; } public int result; public String errmsg; public Object data; public Object getData() { return data; } public void setData(Object data) { this.data = data; } }
[ "270869300@qq.com" ]
270869300@qq.com
19f016a41ac33b1ce39e455ee169ac56c910694b
11f58aaa997257f928e2a19dd21f5445e2effb2f
/test/leetcode/problem_0832/Solution_1Test.java
62ee4cd556891b676bfa7c81b5a9054f0c19cc37
[ "MIT" ]
permissive
husaynhakeem/Algorithms-Playground
033cf768202f9a3b00e1b6f1679ee42b9f7a36c3
25dc5a7688f49b473c004dd90a7536417655ba5a
refs/heads/master
2021-06-02T05:04:21.102476
2021-04-26T04:34:46
2021-04-26T04:34:46
115,767,706
25
12
null
2018-08-25T18:28:13
2017-12-30T02:14:31
Java
UTF-8
Java
false
false
1,464
java
package leetcode.problem_0832; import Utilities.java.ArrayUtils; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class Solution_1Test { private final Solution_1 solution = new Solution_1(); @Test public void flipAndInvertImage_1() throws Exception { final int[][] A = { {1, 1, 0}, {1, 0, 1}, {0, 0, 0} }; final int[][] result = solution.flipAndInvertImage(A); assertEquals(3, result.length); assertTrue(ArrayUtils.areArraysEqual(new int[]{1, 0, 0}, result[0])); assertTrue(ArrayUtils.areArraysEqual(new int[]{0, 1, 0}, result[1])); assertTrue(ArrayUtils.areArraysEqual(new int[]{1, 1, 1}, result[2])); } @Test public void flipAndInvertImage_2() throws Exception { final int[][] A = { {1, 1, 0, 0}, {1, 0, 0, 1}, {0, 1, 1, 1}, {1, 0, 1, 0} }; final int[][] result = solution.flipAndInvertImage(A); assertEquals(4, result.length); assertTrue(ArrayUtils.areArraysEqual(new int[]{1, 1, 0, 0}, result[0])); assertTrue(ArrayUtils.areArraysEqual(new int[]{0, 1, 1, 0}, result[1])); assertTrue(ArrayUtils.areArraysEqual(new int[]{0, 0, 0, 1}, result[2])); assertTrue(ArrayUtils.areArraysEqual(new int[]{1, 0, 1, 0}, result[3])); } }
[ "husaynhakeem@gmail.com" ]
husaynhakeem@gmail.com
6126b2d98ece22d4c62a21ad6307d6591f6cfe4a
dd2c761d5b690330948c359f49cb9dff733911fd
/zipkin-storage/zipkin2_cassandra/src/main/java/zipkin2/storage/cassandra/SelectServiceNames.java
0126aac4c112b5357331d3972c8bb4c409ee0a56
[ "Apache-2.0" ]
permissive
tbwork/zipkin
07a0e180c3b7956c71a2fe68f5c1e7da3923c685
169073c17a1c756c5dc8e8ef40499139ec672dc9
refs/heads/master
2020-03-16T15:55:15.291417
2018-05-09T14:49:32
2018-05-09T14:49:32
132,764,173
1
0
Apache-2.0
2018-05-09T13:53:00
2018-05-09T13:53:00
null
UTF-8
Java
false
false
2,700
java
/** * Copyright 2015-2017 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package zipkin2.storage.cassandra; import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.ResultSetFuture; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.querybuilder.QueryBuilder; import java.util.ArrayList; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Supplier; import zipkin2.Call; import zipkin2.storage.cassandra.internal.call.AccumulateAllResults; import zipkin2.storage.cassandra.internal.call.ResultSetFutureCall; import static zipkin2.storage.cassandra.Schema.TABLE_SERVICE_SPANS; final class SelectServiceNames extends ResultSetFutureCall { static class Factory { final Session session; final PreparedStatement preparedStatement; final AccumulateServicesAllResults accumulateServicesIntoSet = new AccumulateServicesAllResults(); Factory(Session session) { this.session = session; this.preparedStatement = session.prepare( QueryBuilder.select("service").distinct().from(TABLE_SERVICE_SPANS) ); } Call<List<String>> create() { return new SelectServiceNames(this).flatMap(accumulateServicesIntoSet); } } final Factory factory; SelectServiceNames(Factory factory) { this.factory = factory; } @Override protected ResultSetFuture newFuture() { return factory.session.executeAsync(factory.preparedStatement.bind()); } @Override public String toString() { return "SelectServiceNames{}"; } @Override public SelectServiceNames clone() { return new SelectServiceNames(factory); } static class AccumulateServicesAllResults extends AccumulateAllResults<List<String>> { @Override protected Supplier<List<String>> supplier() { return ArrayList::new; // list is ok because it is distinct results } @Override protected BiConsumer<Row, List<String>> accumulator() { return (row, list) -> list.add(row.getString("service")); } @Override public String toString() { return "AccumulateServicesAllResults{}"; } } }
[ "adriancole@users.noreply.github.com" ]
adriancole@users.noreply.github.com
739d01034619e0ccd1db079a2e8a2f6e576fc65c
5d23b200a447197178a11eed348fed11ab0d3846
/src/main/java/org/jboss/threads/ExecutionInterruptedException.java
23df5b9cdb7bfb7e457e340d7f75a02883450047
[ "Apache-2.0" ]
permissive
msfm/jboss-threads
6372b355f6197b2bd6094668d8d0ca4799c06ebc
a2142e2042282b9d062641ea4873a17fd5fa3639
refs/heads/master
2021-07-07T09:50:19.077651
2018-04-25T13:03:07
2018-04-25T13:03:07
135,964,748
0
0
Apache-2.0
2018-06-04T03:13:53
2018-06-04T03:13:53
null
UTF-8
Java
false
false
2,692
java
/* * JBoss, Home of Professional Open Source. * Copyright 2017 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.jboss.threads; import java.util.concurrent.RejectedExecutionException; /** * Thrown when a {@link java.util.concurrent.Executor#execute(Runnable)} submission is interrupted before the task could be accepted. If * this exception is thrown, the thread's {@code interrupted} flag will also be set. */ @Deprecated public class ExecutionInterruptedException extends RejectedExecutionException { private static final long serialVersionUID = -8420751681898632287L; /** * Constructs a {@code ExecutionInterruptedException} with no detail message. The cause is not initialized, and may * subsequently be initialized by a call to {@link #initCause(Throwable) initCause}. */ public ExecutionInterruptedException() { } /** * Constructs a {@code ExecutionInterruptedException} with the specified detail message. The cause is not initialized, * and may subsequently be initialized by a call to {@link #initCause(Throwable) initCause}. * * @param msg the detail message */ public ExecutionInterruptedException(final String msg) { super(msg); } /** * Constructs a {@code ExecutionInterruptedException} with the specified cause. The detail message is set to: * <pre>(cause == null ? null : cause.toString())</pre> * (which typically contains the class and detail message of {@code cause}). * * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method) */ public ExecutionInterruptedException(final Throwable cause) { super(cause); } /** * Constructs a {@code ExecutionInterruptedException} with the specified detail message and cause. * * @param msg the detail message * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method) */ public ExecutionInterruptedException(final String msg, final Throwable cause) { super(msg, cause); } }
[ "david.lloyd@redhat.com" ]
david.lloyd@redhat.com
e4a11003bb075cb878f853d675248a08b9115b9c
c233bb869994780049b11f6a41a696c0c23b35df
/src/main/java/com/study/algorithms/day02/ArrayToStackAndQueue.java
8ecff0c1ed13957d01fed38b9f7fe94a9c2a0351
[]
no_license
mideming/algorithms
fbd471bb9348c2af793a1b58ee9dd7a6b877a002
e3f37068c287dac52e1b2e28ca0aca1aa4ed95f1
refs/heads/master
2023-04-11T18:34:49.334958
2021-05-08T09:56:47
2021-05-08T09:56:47
349,919,930
0
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package com.study.algorithms.day02; /** * 数组实现栈和队列 * 栈:正常加,取从尾部取 * 队列:循环数组 */ public class ArrayToStackAndQueue { public static class MyQueue { private int[] arr = new int[7]; private int putIndex = 0; private int popIndex = 0; private int size = 0; private int limit = 7; public void push(int a) { if (size < limit) { arr[putIndex] = a; if (putIndex == (limit -1)) { putIndex = 0; } else { putIndex++; } size++; } else { throw new RuntimeException("越界"); } } public int pop() { if (size == 0) { throw new RuntimeException("队列为空"); } int i = arr[popIndex - 1]; if (popIndex == (limit -1)) { popIndex = 0; } else { popIndex++; } return i; } } }
[ "873737055@qq.com" ]
873737055@qq.com
6dc4261ac54585b9e1baf75ef8209d2343d8e290
c6cbfef06531ab855acaa80337cae2124b0e01ff
/app/src/androidTest/java/com/example/song/myapplication/ApplicationTest.java
915983483ff46830d64966493c30e5238069abac
[]
no_license
zgicg/MyApplication
b8c0c3f5c57fad56f561a507b518ea27c052991e
30ed9357815e318b945fbbb7d85b6eaae607f953
refs/heads/master
2021-06-02T22:35:52.615094
2016-07-26T05:40:25
2016-07-26T05:40:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.example.song.myapplication; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "280724396@qq.com" ]
280724396@qq.com
a8b0d704a35fbf6521d90568311925946b8bfdbf
bc4f3f3344c4ea9906975ce918346d31f85bb03a
/src/main/java/com/intel/rfid/security/SecurityContext.java
32f3d216891ca2b5684cc075faaadc18c594df32
[ "BSD-3-Clause" ]
permissive
rico360z28/rsp-sw-toolkit-gw
93bc2fa7122fe351aba61f7065e12c0657c5f507
cc94847317d7312ed3cbdf9771b036dfd6edd37a
refs/heads/master
2020-04-30T11:47:21.663277
2019-03-20T01:34:30
2019-03-20T01:34:30
176,810,630
0
0
null
2019-03-20T20:19:45
2019-03-20T20:19:44
null
UTF-8
Java
false
false
4,602
java
/* * Copyright (C) 2018 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ package com.intel.rfid.security; import com.intel.rfid.exception.ConfigException; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManagerFactory; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.Security; public class SecurityContext { protected Logger log = LoggerFactory.getLogger(getClass()); private static SecurityContext instance; public static SecurityContext instance() { if (instance == null) { instance = new SecurityContext(); } return instance; } private KeyManager keyMgr; private ProvisionTokenManager provisionTokenMgr; private BouncyCastleProvider bouncyCastleProvider; private SecurityContext() { Security.addProvider(getBouncyCastleProvider()); } public KeyManager getKeyMgr() { if (keyMgr == null) { keyMgr = new KeyManager(); } return keyMgr; } public ProvisionTokenManager getProvisionTokenMgr() { if (provisionTokenMgr == null) { provisionTokenMgr = new ProvisionTokenManager(); } return provisionTokenMgr; } public BouncyCastleProvider getBouncyCastleProvider() { if (bouncyCastleProvider == null) { bouncyCastleProvider = new BouncyCastleProvider(); } return bouncyCastleProvider; } public SSLSocketFactory getSecureSocketFactory() { SSLSocketFactory factory = null; try { // CA certificate is used to authenticate server KeyStore caKs = KeyStore.getInstance(KeyStore.getDefaultType()); caKs.load(null, null); caKs.setCertificateEntry("ca-certificate", getKeyMgr().getCACertificate()); TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); tmf.init(caKs); // create SSL socket factory SSLContext context = SSLContext.getInstance("TLSv1.2"); context.init(null, tmf.getTrustManagers(), null); factory = context.getSocketFactory(); } catch (GeneralSecurityException | IOException _e) { log.error("error creating secure socket factory: {}", _e); } return factory; } public static final String[] ALLOWED_CIPHERS = { "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256" }; public SslContextFactory getJettySslContextFactory() throws ConfigException { SslContextFactory factory = new SslContextFactory(); KeyManager km = getKeyMgr(); factory.setKeyStoreType(km.getKeystoreType()); factory.setKeyStorePath(km.getKeystoryPath()); factory.setKeyStorePassword(km.getKeystorePassword()); factory.setIncludeCipherSuites(ALLOWED_CIPHERS); if (log.isInfoEnabled()) { StringBuilder sb = new StringBuilder(); for (String s : factory.getExcludeCipherSuites()) { sb.append(s).append('\n'); } log.info("excluded cipher suites:\n{}", sb.toString()); sb = new StringBuilder(); for (String s : factory.getIncludeCipherSuites()) { sb.append(s).append('\n'); } log.info("included cipher suites:\n{}", sb.toString()); sb = new StringBuilder(); for (String s : factory.getExcludeProtocols()) { sb.append(s).append('\n'); } log.info("excluded protocols:\n{}", sb.toString()); sb = new StringBuilder(); for (String s : factory.getIncludeProtocols()) { sb.append(s).append('\n'); } log.info("included protocols:\n{}", sb.toString()); } return factory; } }
[ "timothy.shockley@intel.com" ]
timothy.shockley@intel.com
ef452d058e2dcd83fcc2de82eff53a2a76baad4f
c628920f41ecdec6493ab75c199cbe2cfd1329cd
/src/net.aeten.core/net/aeten/core/util/AtomicValue.java
998229d6065450cf5f8e27659b6877578893ea77
[ "MIT" ]
permissive
aneth-dev/net.aeten.core
9b3d4e40e8578fa9e288f70b6453a20cd26e3d4e
fe1e825fd4329321e4ef0db9319cccc2264764e7
refs/heads/master
2021-05-28T14:16:55.648666
2015-03-11T18:15:35
2015-03-11T18:15:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package net.aeten.core.util; import net.aeten.core.Factory; import net.aeten.core.Getter; import net.aeten.core.Setter; /** * An object reference that may be updated atomically. * * @author Thomas Pérennou * @param <V> * The type of object referred to by this reference */ public interface AtomicValue<V> extends Getter<V>, Setter<V> { /** * Eventually sets to the given value. * * @param newValue * the new value */ public void lazySet(V newValue); /** * Atomically sets the value to the given updated value if the current value * equals the expected value. "Equals" means depends of implementation (like * {@code ==} or {@code equals(Object)}). * * @param expect * the expected value * @param update * the new value * @return true if successful. False return indicates that the actual value * was not equal to the expected value. */ public boolean compareAndSet(V expect, V update); /** * Atomically sets the value to the given updated value if the current value * equals the expected value. "Equals" means depends of implementation (like * {@code ==} or {@code equals(Object)}). * * @param expect * the expected value * @param update * the factory of the new value * @return true if successful. False return indicates that the actual value * was not equal to the expected value. */ public boolean compareAndSet(V expect, Factory<V, Void> update); /** * Atomically sets the value to the given updated value if the current value * equals the expected value. "Equals" means depends of implementation (like * {@code ==} or {@code equals(Object)}). * * <p> * May fail spuriously and does not provide ordering guarantees, so is only * rarely an appropriate alternative to {@code compareAndSet}. * * @param expect * the expected value * @param update * the new value * @return true if successful. */ public boolean weakCompareAndSet(V expect, V update); /** * Atomically sets the value to the given updated value if the current value * equals the expected value. "Equals" means depends of implementation (like * {@code ==} or {@code equals(Object)}). * * <p> * May fail spuriously and does not provide ordering guarantees, so is only * rarely an appropriate alternative to {@code compareAndSet}. * * @param expect * the expected value * @param update * the factory of the new value * @return true if successful. */ public boolean weakCompareAndSet(V expect, Factory<V, Void> update); /** * Atomically sets to the given value and returns the old value. * * @param newValue * the new value * @return the previous value */ public V getAndSet(V newValue); }
[ "thomas.perennou@aeten.net" ]
thomas.perennou@aeten.net
8a9ce87b2338c6768262b056d1d635b58fcc0503
8c0ecbec868b5425b5f38beda441b3d6b66545ff
/basex-core/src/main/java/org/basex/gui/dialog/DialogColors.java
6989e8ce217cdfdf133cb4e41d7945d1c7fd152c
[ "BSD-3-Clause" ]
permissive
HGData/basex
76c5c8bb2d60ad6fbe260db51ffe75dd5e3dc3af
fa88ea21e8f0792e4cfd6a6d8f77e52df4eab167
refs/heads/master
2021-06-27T17:48:31.833330
2021-01-19T04:30:28
2021-01-19T04:30:28
209,368,032
0
0
NOASSERTION
2021-01-19T04:30:30
2019-09-18T17:36:06
Java
UTF-8
Java
false
false
2,263
java
package org.basex.gui.dialog; import static org.basex.core.Text.*; import java.awt.*; import org.basex.gui.*; import org.basex.gui.layout.*; import org.basex.util.options.*; /** * Dialog window for changing the used colors. * * @author BaseX Team 2005-19, BSD License * @author Christian Gruen */ public final class DialogColors extends BaseXDialog { /** Dialog. */ private static Dialog dialog; /** Maximum color range. */ private static final int MAXCOLOR = 32; /** Slider reference. */ private final BaseXSlider sliderRed; /** Slider reference. */ private final BaseXSlider sliderGreen; /** Slider reference. */ private final BaseXSlider sliderBlue; /** * Default constructor. * @param gui reference to the main window */ private DialogColors(final GUI gui) { super(gui, COLOR_SCHEMA, false); final BaseXBack p = new BaseXBack(new TableLayout(3, 2, 16, 8)); p.add(new BaseXLabel(RED)); sliderRed = newSlider(GUIOptions.COLORRED); p.add(sliderRed); p.add(new BaseXLabel(GREEN)); sliderGreen = newSlider(GUIOptions.COLORGREEN); p.add(sliderGreen); p.add(new BaseXLabel(BLUE)); sliderBlue = newSlider(GUIOptions.COLORBLUE); p.add(sliderBlue); set(p, BorderLayout.CENTER); set(newButtons(RESET), BorderLayout.SOUTH); finish(); } /** * Activates the dialog window. * @param gui reference to the main window */ public static void show(final GUI gui) { if(dialog == null) dialog = new DialogColors(gui); dialog.setVisible(true); } /** * Creates a slider. * @param option option * @return slider reference */ private BaseXSlider newSlider(final NumberOption option) { final BaseXSlider slider = new BaseXSlider(this, 0, MAXCOLOR, option, gui.gopts); BaseXLayout.setWidth(slider, 150); return slider; } @Override public void action(final Object comp) { if(comp instanceof BaseXButton) { // reset default values sliderRed.setValue(GUIOptions.COLORRED.value()); sliderGreen.setValue(GUIOptions.COLORGREEN.value()); sliderBlue.setValue(GUIOptions.COLORBLUE.value()); } sliderRed.assign(); sliderGreen.assign(); sliderBlue.assign(); gui.updateLayout(); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
da2d2fd699fd745b59c575339b4eb0bda386aeca
6c0db6c9a68e4a60b59a7419090a256e80bd69a2
/src/main/java/com/yoho/trace/anaylzer/model/SpanInfo.java
722bdaf1a1750f0b00ead0cd1d7524873f916f11
[]
no_license
sdgdsffdsfff/trace-analyner
2d6c820b29da90b356333d54acc18e8f08e22b9f
ce27b27c516db50332a4953dda27009cd1ed778b
refs/heads/master
2020-05-09T12:57:51.048854
2018-06-26T07:47:10
2018-06-26T07:47:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package com.yoho.trace.anaylzer.model; import lombok.Data; import java.io.Serializable; import java.util.Map; /** * Created by xjipeng on 2017/10/12. */ @Data public class SpanInfo implements Serializable { String name ; String traceid ; String spanid ; long begin ; long end ; String parent ; String endpoint ; String service ; String ip ; String srcService; String dstService; int level ; long receive ; //毫秒 /** * 来源页面ID */ private String pageId; private String httpHost; //该span出现异常次数 private int errorCount; long duration; private SpanType spanType; // 来源于qcloud哪个区 private String region; }
[ "xieyong@xieyongdeMacBook-Pro.local" ]
xieyong@xieyongdeMacBook-Pro.local
ab517ff2759df10477e862e93929a29fb7ada51d
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_16_5/Statistics/PerPlmnHourlyGet.java
04d5f0dd8f36a572b7530238db23954c75689d19
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
4,716
java
package Netspan.NBI_16_5.Statistics; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="NodeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="NodeId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="DateStart" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;element name="DateEnd" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "nodeName", "nodeId", "dateStart", "dateEnd" }) @XmlRootElement(name = "PerPlmnHourlyGet") public class PerPlmnHourlyGet { @XmlElement(name = "NodeName") protected List<String> nodeName; @XmlElement(name = "NodeId") protected List<String> nodeId; @XmlElement(name = "DateStart", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateStart; @XmlElement(name = "DateEnd", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateEnd; /** * Gets the value of the nodeName property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nodeName property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNodeName().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNodeName() { if (nodeName == null) { nodeName = new ArrayList<String>(); } return this.nodeName; } /** * Gets the value of the nodeId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nodeId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNodeId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNodeId() { if (nodeId == null) { nodeId = new ArrayList<String>(); } return this.nodeId; } /** * Gets the value of the dateStart property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateStart() { return dateStart; } /** * Sets the value of the dateStart property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateStart(XMLGregorianCalendar value) { this.dateStart = value; } /** * Gets the value of the dateEnd property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateEnd() { return dateEnd; } /** * Sets the value of the dateEnd property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateEnd(XMLGregorianCalendar value) { this.dateEnd = value; } }
[ "ggrunwald@ASIL-GGRUNWALD.airspan.com" ]
ggrunwald@ASIL-GGRUNWALD.airspan.com
d0fe63e6389b434891bf690fb8effd38ebc9572f
510503d8e8dd7538bc684811c5d78bc296bc1a7a
/src/main/java/com/smart/util/CastUtil.java
888292ff62d09daa5733ca623bff061362792b27
[]
no_license
nowayingswang/chapter1
d7224b1951ff2472117b7cd12e55377a6fe30b6e
8ab9f773513f29954d19d9b93c60983aa259523d
refs/heads/master
2021-01-01T04:14:00.753778
2017-07-18T17:46:20
2017-07-18T17:46:20
97,146,806
1
0
null
null
null
null
UTF-8
Java
false
false
1,449
java
package com.smart.util; /** * 类型转换 * Created by wang on 2017/7/15. */ public class CastUtil { /** * 转为string型 */ public static String castString(Object obj){ return castString(obj,""); } /** * 转为string型(提供默认值) */ public static String castString(Object obj,String defaultValue){ return obj != null ? String.valueOf(obj) : defaultValue; } /** * 转为int型 */ public static int castInt(Object obj) { return castInt(obj,0); } public static int castInt(Object obj,int defaultValue){ int intValue = defaultValue; if(obj != null){ String strValue = castString(obj); try { if(StringUtil.isNotEmpty(strValue)){ intValue = Integer.parseInt(strValue); } }catch (NumberFormatException e){ intValue = defaultValue; } } return intValue; } /** * 转为boolean型 */ public static boolean castBoolean(Object obj) { return castBoolean(obj,false); } /** * 转为boolean型 */ public static boolean castBoolean(Object obj,boolean defaultValue){ boolean booleanValue = defaultValue; if(obj != null){ booleanValue = Boolean.parseBoolean(castString(obj)); } return booleanValue; } }
[ "nowayings@gmail.com" ]
nowayings@gmail.com
e9a53f6e625c11fa2867faf1ae66bde5b99d38bd
2e6dc55b0726726cf1d280ff56199b324510edd8
/app/src/main/java/com/hcb/util/Md5.java
e6dfc8f213b7be5b3911cf808de20362250d1f7e
[]
no_license
Emi-android/Emi-android
cb49f0b2b808228d837732290b0973ab32575033
df3ca8294932d869bd3c89351bb26203b8509028
refs/heads/master
2021-05-06T14:43:56.005751
2017-12-07T03:42:05
2017-12-07T03:42:05
113,393,202
0
0
null
2017-12-07T03:42:07
2017-12-07T02:39:35
null
UTF-8
Java
false
false
2,905
java
/******************************************************************************* * Copyright (c) 2013 Chris Banes. * * 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.hcb.util; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Md5 { private static final char[] DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; public static String encode(String string) { try { MessageDigest digest = MessageDigest.getInstance("MD5"); return bytesToHexString(digest.digest(string.getBytes())); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return null; } private static String bytesToHexString(byte[] bytes) { final char[] buf = new char[bytes.length * 2]; byte b; int c = 0; for (int i = 0, z = bytes.length; i < z; i++) { b = bytes[i]; buf[c++] = DIGITS[(b >> 4) & 0xf]; buf[c++] = DIGITS[b & 0xf]; } return new String(buf); } /** * SHA加密 * * @param strSrc * 明文 * @return 加密之后的密文 */ public static String sha256Encrypt(String strSrc) { MessageDigest md = null; String strDes = null; byte[] bt = strSrc.getBytes(); try { md = MessageDigest.getInstance("SHA-256");// 将此换成SHA-1、SHA-512、SHA-384等参数 md.update(bt); strDes = bytes2Hex(md.digest()); // to HexString } catch (NoSuchAlgorithmException e) { return null; } return strDes; } /** * byte数组转换为16进制字符串 * * @param bts * 数据源 * @return 16进制字符串 */ public static String bytes2Hex(byte[] bts) { String des = ""; String tmp = null; for (int i = 0; i < bts.length; i++) { tmp = (Integer.toHexString(bts[i] & 0xFF)); if (tmp.length() == 1) { des += "0"; } des += tmp; } return des; } }
[ "18317713467@163.com" ]
18317713467@163.com
7489e872c664c965c89fea7b7d70bee43ce12f7d
1293ecda04c226faf6d2d06fad8adeaff2e8b37f
/app/src/main/java/com/ut/lulyfan/exrobot/ui/ShowResultFragment.java
d941e60fb1a56dded1facb810bd4a5d71f3e4800
[]
no_license
lulyfan/ExRobot
4fe9f5cac53961262c0b4481721c56ea1549c933
e346044a82cacdfc8ffc0705025fd13631347825
refs/heads/master
2021-09-09T00:42:19.371123
2017-12-18T08:42:36
2017-12-18T08:42:36
110,910,190
0
0
null
null
null
null
UTF-8
Java
false
false
8,139
java
package com.ut.lulyfan.exrobot.ui; import android.app.Fragment; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.github.omadahealth.lollipin.lib.enums.KeyboardButtonEnum; import com.github.omadahealth.lollipin.lib.interfaces.KeyboardButtonClickedListener; import com.github.omadahealth.lollipin.lib.views.KeyboardView; import com.ut.lulyfan.exrobot.R; import com.ut.lulyfan.exrobot.model.Customer; import com.ut.lulyfan.exrobot.util.DoorUtil; import com.ut.lulyfan.voicelib.voiceManager.SpeechSynthesizeManager; import static com.ut.lulyfan.exrobot.ui.ExActivity.END_EX; import static com.ut.lulyfan.exrobot.util.DoorUtil.CLOSED; /** * Created by Administrator on 2017/11/3/003. */ public class ShowResultFragment extends Fragment { private static final String KEY = "customer"; private boolean isVerifySuccessed = false; //是否输入了正确的取货码 private Handler handler; private SpeechSynthesizeManager ssm; private DoorUtil doorUtil; private Customer customer; public static ShowResultFragment newInstance(Customer customer) { Bundle bundle = new Bundle(); bundle.putSerializable(KEY, customer); ShowResultFragment fragment = new ShowResultFragment(); fragment.setArguments(bundle); return fragment; } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { doorUtil = new DoorUtil(getActivity()); customer = (Customer) getArguments().getSerializable(KEY); final String code = customer.getCode(); View root = inflater.inflate(R.layout.fragment_show_result, container, false); final TextView showResult = (TextView) root.findViewById(R.id.tv_showResult); showResult.setText(customer.getName() + ",您有"+customer.getExCount()+"件快递到了"); TextView countdown = (TextView) root.findViewById(R.id.countdown); handler = ((ExActivity)getActivity()).handler; ssm = ((ExActivity)getActivity()).ssm; final EditText tv_password = (EditText) root.findViewById(R.id.password); tv_password.setFocusable(false); final CountdownTask countdownTask = new CountdownTask(countdown); countdownTask.execute(120); final KeyboardView keyboardView = (KeyboardView) root.findViewById(R.id.keyboard_view); ((TextView)(keyboardView.findViewById(R.id.pin_code_button_sure).findViewById(R.id.keyboard_button_textview))).setText("确认"); keyboardView.setKeyboardButtonClickedListener(new KeyboardButtonClickedListener() { @Override public void onKeyboardClick(KeyboardButtonEnum keyboardButtonEnum) { switch (keyboardButtonEnum) { case BUTTON_CLEAR: int length = tv_password.getText().length(); if (length > 0) { String text = tv_password.getText().subSequence(0, length - 1).toString(); tv_password.setText(text); } break; case BUTTON_SURE: String input = tv_password.getText().toString(); if (input.equals("")) { Toast.makeText(getActivity(), "请先输入密码", Toast.LENGTH_SHORT).show(); return; } if (!input.equals(code) && !input.equals(getResources().getString(R.string.default_password))) { tv_password.setText(""); Toast.makeText(getActivity(), "取货码错误,请重新输入", Toast.LENGTH_SHORT).show(); return; } isVerifySuccessed = true; keyboardView.setFocusable(false); showResult.setText("请领取快递,并关闭厢门"); countdownTask.cancel(true); ((ExActivity)getActivity()).executor.execute(new Runnable() { @Override public void run() { getEx(); } }); break; default: tv_password.append(keyboardButtonEnum.getButtonValue() + ""); } } @Override public void onRippleAnimationEnd() { } }); //如果用户在超时时间内未输入正确的取货码,发送快递结束消息 // handler.postDelayed(new Runnable() { // @Override // public void run() { // if (!isVerifySuccessed) // Message.obtain(handler, END_EX, customer).sendToTarget(); // } // }, 2 * 60 * 1000); return root; } private void getEx() { doorUtil.open(); ssm.startSpeakingLoop("请领取快递,并厢门关闭", 20 * 1000); try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } while (true) { if (doorUtil.check() == CLOSED) { ssm.stopSpeakingLoop(); handler.sendEmptyMessage(ExActivity.END_EX); break; } try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } // static class AsyncTask<Inteter> extends android.os.AsyncTask { // // @Override // protected void onProgressUpdate(Object[] values) { // countdown.setText(values[0] + "S"); // } // // @Override // protected void onPostExecute(Object o) { // Message.obtain(handler, END_EX, customer).sendToTarget(); // } // // @Override // protected java.lang.Object doInBackground(java.lang.Object[] params) { // int seconds = (int) params[0]; // while (seconds > 0) { // // if (isCancelled()) // break; // // publishProgress(seconds); // try { // Thread.sleep(1000); // seconds --; // } catch (InterruptedException e) { // e.printStackTrace(); // } // } // return null; // } // } class CountdownTask extends AsyncTask<Integer, Integer, Object> { TextView countdown; public CountdownTask(TextView textView) { countdown = textView; } @Override protected Object doInBackground(Integer... params) { int seconds = params[0]; while (seconds > 0) { if (isCancelled()) break; publishProgress(seconds); try { Thread.sleep(1000); seconds --; } catch (InterruptedException e) { e.printStackTrace(); } } return null; } @Override protected void onProgressUpdate(Integer... values) { countdown.setText(values[0] + ""); } @Override protected void onPostExecute(Object o) { Message.obtain(handler, END_EX, customer).sendToTarget(); } } }
[ "18807644294@163.com" ]
18807644294@163.com
7294fdea96999dcf223e6d0e924a3e46b76cef97
43092d84e17fd255d6f51c728a79b71da54e1697
/3.JavaMultithreading/src/com/javarush/task/task24/task2401/SelfInterfaceMarker.java
771f2f2157c26a6a49ffc5d3aea3fb31d6e0f1db
[]
no_license
ADolodarenko/JavaRushTasks
0713f7ae7493c1de177e3b26c7cb2055fa3bf352
37c81df5e984b02db7597c0d7219c0e0ece82948
refs/heads/master
2020-12-03T02:16:02.100777
2017-07-31T13:11:32
2017-07-31T13:11:32
95,919,962
1
0
null
null
null
null
UTF-8
Java
false
false
137
java
package com.javarush.task.task24.task2401; /** * Created by n_alex on 25.03.2017. */ public interface SelfInterfaceMarker { }
[ "adolodar@gmail.com" ]
adolodar@gmail.com
16495d94c6b26b416e850cdc70a2c2940fab9250
5dc71202559b5863670e78e6c91b653714e23b48
/src/java/com/livehereandnow/ages/card/AgesCard.java
390363289fd8be45303a3a3e1ac99c1c5a873ea8
[]
no_license
max-taipei/max036
f7c418dbc5b407105e582770e08120a792331a62
cfbcd748751032d4e6d7caad44f79b6baa2b9ace
refs/heads/master
2021-01-22T11:46:42.722757
2014-06-27T02:47:28
2014-06-27T02:47:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
29,426
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.livehereandnow.ages.card; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; //import javax.persistence.Basic; //import javax.persistence.Column; //import javax.persistence.Entity; //import javax.persistence.GeneratedValue; //import javax.persistence.GenerationType; //import javax.persistence.Id; //import javax.persistence.NamedQueries; //import javax.persistence.NamedQuery; //import javax.persistence.Table; import javax.xml.bind.annotation.XmlRootElement; /** * * @author mark */ @Entity //@Table(name = "AGES_CARD") //@XmlRootElement @NamedQueries({ @NamedQuery(name = "AgesCard.findAll", query = "SELECT a FROM AgesCard a"), @NamedQuery(name = "AgesCard.findBySeq", query = "SELECT a FROM AgesCard a WHERE a.seq = :seq"), @NamedQuery(name = "AgesCard.findById", query = "SELECT a FROM AgesCard a WHERE a.id = :id"), @NamedQuery(name = "AgesCard.findByName", query = "SELECT a FROM AgesCard a WHERE a.name = :name"), @NamedQuery(name = "AgesCard.findByAge", query = "SELECT a FROM AgesCard a WHERE a.age = :age"), @NamedQuery(name = "AgesCard.findByCivilMilitary", query = "SELECT a FROM AgesCard a WHERE a.civilMilitary = :civilMilitary"), @NamedQuery(name = "AgesCard.findByTag", query = "SELECT a FROM AgesCard a WHERE a.tag = :tag"), @NamedQuery(name = "AgesCard.findByAction", query = "SELECT a FROM AgesCard a WHERE a.action = :action"), @NamedQuery(name = "AgesCard.findByIconPoints", query = "SELECT a FROM AgesCard a WHERE a.iconPoints = :iconPoints"), @NamedQuery(name = "AgesCard.findByEffect", query = "SELECT a FROM AgesCard a WHERE a.effect = :effect"), @NamedQuery(name = "AgesCard.findByCost", query = "SELECT a FROM AgesCard a WHERE a.cost = :cost"), @NamedQuery(name = "AgesCard.findByColor", query = "SELECT a FROM AgesCard a WHERE a.color = :color"), @NamedQuery(name = "AgesCard.findByCnt", query = "SELECT a FROM AgesCard a WHERE a.cnt = :cnt"), @NamedQuery(name = "AgesCard.findByTokenWhite", query = "SELECT a FROM AgesCard a WHERE a.tokenWhite = :tokenWhite"), @NamedQuery(name = "AgesCard.findByTokenRed", query = "SELECT a FROM AgesCard a WHERE a.tokenRed = :tokenRed"), @NamedQuery(name = "AgesCard.findByTokenYellow", query = "SELECT a FROM AgesCard a WHERE a.tokenYellow = :tokenYellow"), @NamedQuery(name = "AgesCard.findByTokenBlue", query = "SELECT a FROM AgesCard a WHERE a.tokenBlue = :tokenBlue"), @NamedQuery(name = "AgesCard.findByEffectWhite", query = "SELECT a FROM AgesCard a WHERE a.effectWhite = :effectWhite"), @NamedQuery(name = "AgesCard.findByEffectFood", query = "SELECT a FROM AgesCard a WHERE a.effectFood = :effectFood"), @NamedQuery(name = "AgesCard.findByEffectRed", query = "SELECT a FROM AgesCard a WHERE a.effectRed = :effectRed"), @NamedQuery(name = "AgesCard.findByEffectMusic", query = "SELECT a FROM AgesCard a WHERE a.effectMusic = :effectMusic"), @NamedQuery(name = "AgesCard.findByEffectStone", query = "SELECT a FROM AgesCard a WHERE a.effectStone = :effectStone"), @NamedQuery(name = "AgesCard.findByEffectIdea", query = "SELECT a FROM AgesCard a WHERE a.effectIdea = :effectIdea"), @NamedQuery(name = "AgesCard.findByEffectSmile", query = "SELECT a FROM AgesCard a WHERE a.effectSmile = :effectSmile"), @NamedQuery(name = "AgesCard.findByEffectHouse", query = "SELECT a FROM AgesCard a WHERE a.effectHouse = :effectHouse"), @NamedQuery(name = "AgesCard.findByEffectBlue", query = "SELECT a FROM AgesCard a WHERE a.effectBlue = :effectBlue"), @NamedQuery(name = "AgesCard.findByEffectWeapon", query = "SELECT a FROM AgesCard a WHERE a.effectWeapon = :effectWeapon"), @NamedQuery(name = "AgesCard.findByEffectWeaponOld", query = "SELECT a FROM AgesCard a WHERE a.effectWeaponOld = :effectWeaponOld"), @NamedQuery(name = "AgesCard.findByEffectYellow", query = "SELECT a FROM AgesCard a WHERE a.effectYellow = :effectYellow"), @NamedQuery(name = "AgesCard.findByCostPeople", query = "SELECT a FROM AgesCard a WHERE a.costPeople = :costPeople"), @NamedQuery(name = "AgesCard.findByCostFoot", query = "SELECT a FROM AgesCard a WHERE a.costFoot = :costFoot"), @NamedQuery(name = "AgesCard.findByCostWonder", query = "SELECT a FROM AgesCard a WHERE a.costWonder = :costWonder"), @NamedQuery(name = "AgesCard.findByCostMilitary", query = "SELECT a FROM AgesCard a WHERE a.costMilitary = :costMilitary"), @NamedQuery(name = "AgesCard.findByCostHorse", query = "SELECT a FROM AgesCard a WHERE a.costHorse = :costHorse"), @NamedQuery(name = "AgesCard.findByCostCannon", query = "SELECT a FROM AgesCard a WHERE a.costCannon = :costCannon"), @NamedQuery(name = "AgesCard.findByCostPeace", query = "SELECT a FROM AgesCard a WHERE a.costPeace = :costPeace"), @NamedQuery(name = "AgesCard.findByCostRevolution", query = "SELECT a FROM AgesCard a WHERE a.costRevolution = :costRevolution"), @NamedQuery(name = "AgesCard.findByCostRed", query = "SELECT a FROM AgesCard a WHERE a.costRed = :costRed"), @NamedQuery(name = "AgesCard.findByCostStone", query = "SELECT a FROM AgesCard a WHERE a.costStone = :costStone"), @NamedQuery(name = "AgesCard.findByCostIdea", query = "SELECT a FROM AgesCard a WHERE a.costIdea = :costIdea"), @NamedQuery(name = "AgesCard.findByCostFood", query = "SELECT a FROM AgesCard a WHERE a.costFood = :costFood"), @NamedQuery(name = "AgesCard.findByCostMusic", query = "SELECT a FROM AgesCard a WHERE a.costMusic = :costMusic")}) //) public class AgesCard implements Serializable, AgesCommon { // private final String[] ageStr = {"A", "I", "II", "III", "-"}; private static final long serialVersionUID = 1L; @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Basic(optional = false) // @Column(name = "SEQ") private Integer seq; // @Basic(optional = false) // @Column(name = "ID") private int id; // @Column(name = "NAME") private String name; // @Column(name = "AGE") private Integer age; // @Column(name = "CIVIL_MILITARY") private String civilMilitary; // @Column(name = "TAG") private String tag; // @Basic(optional = false) // @Column(name = "ACTION") private String action; // @Basic(optional = false) // @Column(name = "ICON_POINTS") private String iconPoints; // @Basic(optional = false) // @Column(name = "EFFECT") private String effect; // @Column(name = "COST") private String cost; // @Column(name = "COLOR") private String color; // @Basic(optional = false) // @Column(name = "CNT") private int cnt; // @Basic(optional = false) // @Column(name = "TOKEN_WHITE") private int tokenWhite; // @Basic(optional = false) // @Column(name = "TOKEN_RED") private int tokenRed; // @Basic(optional = false) // @Column(name = "TOKEN_YELLOW") private int tokenYellow; // @Basic(optional = false) // @Column(name = "TOKEN_BLUE") private int tokenBlue; // @Basic(optional = false) // @Column(name = "EFFECT_WHITE") private int effectWhite; // @Basic(optional = false) // @Column(name = "EFFECT_FOOD") private int effectFood; // @Basic(optional = false) // @Column(name = "EFFECT_RED") private int effectRed; // @Basic(optional = false) // @Column(name = "EFFECT_MUSIC") private int effectMusic; // @Basic(optional = false) // @Column(name = "EFFECT_STONE") private int effectStone; // @Basic(optional = false) // @Column(name = "EFFECT_IDEA") private int effectIdea; // @Basic(optional = false) // @Column(name = "EFFECT_SMILE") private int effectSmile; // @Basic(optional = false) // @Column(name = "EFFECT_HOUSE") private int effectHouse; // @Basic(optional = false) // @Column(name = "EFFECT_BLUE") private int effectBlue; // @Basic(optional = false) // @Column(name = "EFFECT_WEAPON") private int effectWeapon; // @Basic(optional = false) // @Column(name = "EFFECT_WEAPON_OLD") private int effectWeaponOld; // @Basic(optional = false) // @Column(name = "EFFECT_YELLOW") private int effectYellow; // @Basic(optional = false) // @Column(name = "COST_PEOPLE") private int costPeople; // @Basic(optional = false) // @Column(name = "COST_FOOT") private int costFoot; // @Basic(optional = false) // @Column(name = "COST_WONDER") private int costWonder; // @Basic(optional = false) // @Column(name = "COST_MILITARY") private int costMilitary; // @Basic(optional = false) // @Column(name = "COST_HORSE") private int costHorse; // @Basic(optional = false) // @Column(name = "COST_CANNON") private int costCannon; // @Basic(optional = false) // @Column(name = "COST_PEACE") private int costPeace; // @Basic(optional = false) // @Column(name = "COST_REVOLUTION") private int costRevolution; // @Basic(optional = false) // @Column(name = "COST_RED") private int costRed; // @Basic(optional = false) // @Column(name = "COST_STONE") private int costStone; // @Basic(optional = false) // @Column(name = "COST_IDEA") private int costIdea; // @Basic(optional = false) // @Column(name = "COST_FOOD") private int costFood; // @Basic(optional = false) // @Column(name = "COST_MUSIC") private int costMusic; private int roundTaken=999; public int get拿牌回合() { return roundTaken; } public void set拿牌回合(int roundTaken) { this.roundTaken = roundTaken; } public AgesCard() { } public AgesCard(Integer seq) { this.seq = seq; } public AgesCard(Integer seq, int id, String name, Integer age, String civilMilitary, String tag, String action, String iconPoints, String effect, String cost, String color, int cnt, int tokenWhite, int tokenRed, int tokenYellow, int tokenBlue, int effectWhite, int effectFood, int effectRed, int effectMusic, int effectStone, int effectIdea, int effectSmile, int effectHouse, int effectBlue, int effectWeapon, int effectWeaponOld, int effectYellow, int costPeople, int costFoot, int costWonder, int costMilitary, int costHorse, int costCannon, int costPeace, int costRevolution, int costRed, int costStone, int costIdea, int costFood, int costMusic) { this.seq = seq; this.id = id; this.name = name; this.age = age; this.civilMilitary = civilMilitary; this.tag = tag; this.action = action; this.iconPoints = iconPoints; this.effect = effect; this.cost = cost; this.color = color; this.cnt = cnt; this.tokenWhite = tokenWhite; this.tokenRed = tokenRed; this.tokenYellow = tokenYellow; this.tokenBlue = tokenBlue; this.effectWhite = effectWhite; this.effectFood = effectFood; this.effectRed = effectRed; this.effectMusic = effectMusic; this.effectStone = effectStone; this.effectIdea = effectIdea; this.effectSmile = effectSmile; this.effectHouse = effectHouse; this.effectBlue = effectBlue; this.effectWeapon = effectWeapon; this.effectWeaponOld = effectWeaponOld; this.effectYellow = effectYellow; this.costPeople = costPeople; this.costFoot = costFoot; this.costWonder = costWonder; this.costMilitary = costMilitary; this.costHorse = costHorse; this.costCannon = costCannon; this.costPeace = costPeace; this.costRevolution = costRevolution; this.costRed = costRed; this.costStone = costStone; this.costIdea = costIdea; this.costFood = costFood; this.costMusic = costMusic; } public AgesCard(Integer seq, int id, String action, String iconPoints, String effect, int cnt, int tokenWhite, int tokenRed, int tokenYellow, int tokenBlue, int effectWhite, int effectFood, int effectRed, int effectMusic, int effectStone, int effectIdea, int effectSmile, int effectHouse, int effectBlue, int effectWeapon, int effectWeaponOld, int effectYellow, int costPeople, int costFoot, int costWonder, int costMilitary, int costHorse, int costCannon, int costPeace, int costRevolution, int costRed, int costStone, int costIdea, int costFood, int costMusic) { this.seq = seq; this.id = id; this.action = action; this.iconPoints = iconPoints; this.effect = effect; this.cnt = cnt; this.tokenWhite = tokenWhite; this.tokenRed = tokenRed; this.tokenYellow = tokenYellow; this.tokenBlue = tokenBlue; this.effectWhite = effectWhite; this.effectFood = effectFood; this.effectRed = effectRed; this.effectMusic = effectMusic; this.effectStone = effectStone; this.effectIdea = effectIdea; this.effectSmile = effectSmile; this.effectHouse = effectHouse; this.effectBlue = effectBlue; this.effectWeapon = effectWeapon; this.effectWeaponOld = effectWeaponOld; this.effectYellow = effectYellow; this.costPeople = costPeople; this.costFoot = costFoot; this.costWonder = costWonder; this.costMilitary = costMilitary; this.costHorse = costHorse; this.costCannon = costCannon; this.costPeace = costPeace; this.costRevolution = costRevolution; this.costRed = costRed; this.costStone = costStone; this.costIdea = costIdea; this.costFood = costFood; this.costMusic = costMusic; } public Integer getSeq() { return seq; } public void setSeq(Integer seq) { this.seq = seq; } public boolean is科技牌() { if (this.costIdea != 0) { return true; } return false; } public boolean is奇蹟牌() { if (this.tag.equals("奇蹟")) { return true; } return false; } /**is政治階段可執行的軍事牌 * 1.TAG=戰爭 * 2.TAG=侵略 * 3.TAG=事件 * 4.TAG=領土 * * @return */ public boolean is政治階段可執行的軍事牌() { if (this.tag.equals("戰爭")) { return true; } if (this.tag.equals("侵略")) { return true; } if (this.tag.equals("事件")) { return true; } if (this.tag.equals("領土")) { return true; } return false; } public boolean is內政階段可執行的軍事牌() { if (this.tag.equals("戰術")) { return true; } return false; } public boolean is行動牌() { if (this.tag.equals("行動")) { return true; } return false; } public boolean isNOCARD() { if (this.id== 1000) { return true; } return false; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getAgeStr() { return AGE_NAME[age]; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getCivilMilitary() { return civilMilitary; } public void setCivilMilitary(String civilMilitary) { this.civilMilitary = civilMilitary; } public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getIconPoints() { return iconPoints; } public void setIconPoints(String iconPoints) { this.iconPoints = iconPoints; } public String getEffect() { return effect; } public void setEffect(String effect) { this.effect = effect; } public String getCost() { return cost; } public void setCost(String cost) { this.cost = cost; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public int getCnt() { return cnt; } public void setCnt(int cnt) { this.cnt = cnt; } public int getTokenWhite() { return tokenWhite; } public void setTokenWhite(int tokenWhite) { this.tokenWhite = tokenWhite; } public int getTokenRed() { return tokenRed; } public void setTokenRed(int tokenRed) { this.tokenRed = tokenRed; } public int getTokenYellow() { return tokenYellow; } public void setTokenYellow(int tokenYellow) { this.tokenYellow = tokenYellow; } public int getTokenBlue() { return tokenBlue; } public void setTokenBlue(int tokenBlue) { this.tokenBlue = tokenBlue; } public int getEffectWhite() { return effectWhite; } public void setEffectWhite(int effectWhite) { this.effectWhite = effectWhite; } public int getEffectFood() { return effectFood; } public void setEffectFood(int effectFood) { this.effectFood = effectFood; } public int getEffectRed() { return effectRed; } public void setEffectRed(int effectRed) { this.effectRed = effectRed; } public int getEffectMusic() { return effectMusic; } public void setEffectMusic(int effectMusic) { this.effectMusic = effectMusic; } public int getEffectStone() { return effectStone; } public void setEffectStone(int effectStone) { this.effectStone = effectStone; } public int getEffectIdea() { return effectIdea; } public void setEffectIdea(int effectIdea) { this.effectIdea = effectIdea; } public int getEffectSmile() { return effectSmile; } public void setEffectSmile(int effectSmile) { this.effectSmile = effectSmile; } public int getEffectHouse() { return effectHouse; } public void setEffectHouse(int effectHouse) { this.effectHouse = effectHouse; } public int getEffectBlue() { return effectBlue; } public void setEffectBlue(int effectBlue) { this.effectBlue = effectBlue; } public int getEffectWeapon() { return effectWeapon; } public void setEffectWeapon(int effectWeapon) { this.effectWeapon = effectWeapon; } public int getEffectWeaponOld() { return effectWeaponOld; } public void setEffectWeaponOld(int effectWeaponOld) { this.effectWeaponOld = effectWeaponOld; } public int getEffectYellow() { return effectYellow; } public void setEffectYellow(int effectYellow) { this.effectYellow = effectYellow; } public int getCostPeople() { return costPeople; } public void setCostPeople(int costPeople) { this.costPeople = costPeople; } public int getCostFoot() { return costFoot; } public void setCostFoot(int costFoot) { this.costFoot = costFoot; } public int getCostWonder() { return costWonder; } public void setCostWonder(int costWonder) { this.costWonder = costWonder; } public int getCostMilitary() { return costMilitary; } public void setCostMilitary(int costMilitary) { this.costMilitary = costMilitary; } public int getCostHorse() { return costHorse; } public void setCostHorse(int costHorse) { this.costHorse = costHorse; } public int getCostCannon() { return costCannon; } public void setCostCannon(int costCannon) { this.costCannon = costCannon; } public int getCostPeace() { return costPeace; } public void setCostPeace(int costPeace) { this.costPeace = costPeace; } public int getCostRevolution() { return costRevolution; } public void setCostRevolution(int costRevolution) { this.costRevolution = costRevolution; } public int getCostRed() { return costRed; } public void setCostRed(int costRed) { this.costRed = costRed; } public int getCostStone() { return costStone; } public void setCostStone(int costStone) { this.costStone = costStone; } public int getCostIdea() { return costIdea; } public void setCostIdea(int costIdea) { this.costIdea = costIdea; } public int getCostFood() { return costFood; } public void setCostFood(int costFood) { this.costFood = costFood; } public int getCostMusic() { return costMusic; } public void setCostMusic(int costMusic) { this.costMusic = costMusic; } @Override public int hashCode() { int hash = 0; hash += (seq != null ? seq.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof AgesCard)) { return false; } AgesCard other = (AgesCard) object; if ((this.seq == null && other.seq != null) || (this.seq != null && !this.seq.equals(other.seq))) { return false; } return true; } private String toString政府區() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append("-"); // sb.append(tag); sb.append(FULLWIDTH_SPACE).append("白").append(FULLWIDTH_COLON).append(effectWhite); sb.append(FULLWIDTH_SPACE).append("紅").append(FULLWIDTH_COLON).append(effectRed); sb.append("】"); return sb.toString(); } private String toString實驗室() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append("-"); // sb.append(tag); sb.append(FULLWIDTH_SPACE).append("黃").append(FULLWIDTH_COLON).append(tokenYellow); sb.append(FULLWIDTH_SPACE).append("藍").append(FULLWIDTH_COLON).append(tokenBlue); sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); sb.append("】"); return sb.toString(); } private String toString領袖區() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); sb.append("】"); return sb.toString(); } private String toString普通() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append("-"); sb.append(FULLWIDTH_SPACE).append(tag); sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); sb.append("】"); return sb.toString(); } private String toString建造中的奇蹟區() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append("-"); sb.append(FULLWIDTH_SPACE).append(tag); sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); sb.append(FULLWIDTH_SPACE).append("藍").append(FULLWIDTH_COLON).append(tokenBlue); sb.append("】"); return sb.toString(); } private String toString已完成的奇蹟() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); sb.append("】"); return sb.toString(); } private String toString行動牌() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); sb.append(action); sb.append("】"); return sb.toString(); } private String toStringSimple() { StringBuilder sb = new StringBuilder(); sb.append("【"); // sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append(FULLWIDTH_SPACE).append(tag); // sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); // sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); // sb.append("】"); return sb.toString(); } private String toString普通_藍點() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append(FULLWIDTH_SPACE).append(tag); // sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); // sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); // sb.append(FULLWIDTH_SPACE).append("藍").append(FULLWIDTH_COLON).append(tokenBlue); sb.append("】"); return sb.toString(); } private String toString普通_黃點() { StringBuilder sb = new StringBuilder(); sb.append("【"); sb.append(AGE_NAME[age]); sb.append(""); sb.append(id); sb.append(name); // sb.append(FULLWIDTH_SPACE).append(tag); // sb.append(FULLWIDTH_SPACE).append("成本{").append(iconPoints).append("}"); // sb.append(FULLWIDTH_SPACE).append("效果{").append(effect).append("}"); // sb.append(FULLWIDTH_SPACE).append("黃").append(FULLWIDTH_COLON).append(tokenYellow); sb.append("】"); return sb.toString(); } public String toString(int style) { switch (style) { case STYLE_政府區: return toString政府區(); case STYLE_領袖區: return toString領袖區(); case STYLE_建造中的奇蹟區: return toString建造中的奇蹟區(); case STYLE_已完成的奇蹟: return toString已完成的奇蹟(); case STYLE_實驗室: return toString實驗室(); case STYLE_行動牌: return toString行動牌(); case STYLE_普通_藍點: return toString普通_藍點(); case STYLE_普通_黃點: return toString普通_黃點(); default: return toStringSimple(); } } @Override public String toString() { return "AgesCard{" + "seq=" + seq + ", id=" + id + ", name=" + name + ", age=" + age + ", civilMilitary=" + civilMilitary + ", tag=" + tag + ", action=" + action + ", iconPoints=" + iconPoints + ", effect=" + effect + ", cost=" + cost + ", color=" + color + ", \ncnt=" + cnt + ", tokenWhite=" + tokenWhite + ", tokenRed=" + tokenRed + ", tokenYellow=" + tokenYellow + ", tokenBlue=" + tokenBlue + ", effectWhite=" + effectWhite + ", effectFood=" + effectFood + ", effectRed=" + effectRed + ", effectMusic=" + effectMusic + ", effectStone=" + effectStone + ", effectIdea=" + effectIdea + ", \neffectSmile=" + effectSmile + ", effectHouse=" + effectHouse + ", effectBlue=" + effectBlue + ", effectWeapon=" + effectWeapon + ", effectWeaponOld=" + effectWeaponOld + ", effectYellow=" + effectYellow + ", costPeople=" + costPeople + ", costFoot=" + costFoot + ", costWonder=" + costWonder + ", \ncostMilitary=" + costMilitary + ", costHorse=" + costHorse + ", costCannon=" + costCannon + ", costPeace=" + costPeace + ", costRevolution=" + costRevolution + ", costRed=" + costRed + ", costStone=" + costStone + ", costIdea=" + costIdea + ", costFood=" + costFood + ", costMusic=" + costMusic + '}'; } public void produce() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }
[ "" ]
bfcd5d6715d3ba9463e48beaa80ffcf3313ce8a2
f3fd11f8bcc2e9c41a417f216098141976f3419e
/src/main/java/ec/cjpq/go4demo1/creationalpatterns/builder/Meal.java
6055ab8a2fd401f5b1f005946277275fe3f7f07a
[]
no_license
carlosjulioperez/go4demo1
4f68e5c365748cdd148d5eed7d2f6ff756be9c89
1edd44a9f88d89800f3972f72e1b09ccc3c97e52
refs/heads/master
2020-06-11T09:38:07.733403
2016-12-19T04:41:57
2016-12-19T04:41:57
75,690,373
0
0
null
null
null
null
UTF-8
Java
false
false
733
java
package ec.cjpq.go4demo1.creationalpatterns.builder; import java.util.ArrayList; import java.util.List; /** * Gang of Four Design Patterns Demo 1 * Meal class having Item objects defines previously * @author carper, carlosjulioperez@gmail.com * 2016-12-07 */ public class Meal{ private List<Item> items = new ArrayList<Item>(); public void addItem(Item item){ items.add(item); } public float getCost(){ float cost = 0.0f; for(Item item: items){ cost += item.price(); } return cost; } public void showItems(){ for(Item item: items){ System.out.print("Item: " + item.name() ); System.out.print(", Packing: " + item.packing().pack() ); System.out.println(", Price: " + item.price() ); } } }
[ "carlosjulioperez@gmail.com" ]
carlosjulioperez@gmail.com
928d1e5273ab8d845df9add56c63427a6c01edd8
83be8125d0ba717f69ed2097948bcec8777d530a
/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/dao/M2MPocDAO.java
a59f121e0209ce58975eecfdf8371ec8896bb4c2
[]
no_license
andy19950/IOT_final
05ebf5a5681ab1c607e6867e892213bf882fbaf2
16f16fdf54da754b21c22361dabbad3c2500ac51
refs/heads/master
2021-01-13T12:59:32.043178
2017-06-21T10:11:51
2017-06-21T10:11:51
94,985,117
0
0
null
null
null
null
UTF-8
Java
false
false
2,443
java
/******************************************************************************* * Copyright (c) 2013-2015 LAAS-CNRS (www.laas.fr) * 7 Colonel Roche 31077 Toulouse - France * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Thierry Monteil (Project co-founder) - Management and initial specification, * conception and documentation. * Mahdi Ben Alaya (Project co-founder) - Management and initial specification, * conception, implementation, test and documentation. * Christophe Chassot - Management and initial specification. * Khalil Drira - Management and initial specification. * Yassine Banouar - Initial specification, conception, implementation, test * and documentation. * Guillaume Garzone - Conception, implementation, test and documentation. * Francois Aissaoui - Conception, implementation, test and documentation. ******************************************************************************/ package org.eclipse.om2m.core.dao; import javax.persistence.EntityManager; import org.eclipse.om2m.commons.resource.M2MPoc; /** * Implements CRUD Methods for {@link M2mPoc} resource persistence. * * @author <ul> * <li>Yessine Feki < yfeki@laas.fr > < yessine.feki@ieee.org ></li> * <li>Mahdi Ben Alaya < ben.alaya@laas.fr > < benalaya.mahdi@gmail.com ></li> * <li>Yassine Banouar < ybanouar@laas.fr > < yassine.banouar@gmail.com ></li> * </ul> */ public class M2MPocDAO extends DAO<M2MPoc> { /** * Retrieves the {@link M2MPoc} resource from the Database based on its uri * @param uri - uri of the {@link M2MPoc} resource to retrieve * @return The requested {@link M2MPoc} resource otherwise null */ public M2MPoc find(String uri, EntityManager em) { // Retrieve the object from DB return em.find(M2MPoc.class,uri); } /** * Deletes the {@link M2MPoc} resource from the DataBase without validating the transaction * @param resource - The {@link M2MPoc} resource to delete */ public void delete(M2MPoc resource, EntityManager em) { // Delete the resource em.remove(resource); } }
[ "andy19950@gmail.com" ]
andy19950@gmail.com
062bce614c526e77cae2d521b927b51e775bd0ed
9470eef74dd32f6974f3e38e624b646b0d9ff19d
/Day12.java
b53044d745c6f0c1dec0113a2661d570b37b45a9
[]
no_license
kingcasey/LearnJava
7318c7f4fce67691fda3db2dbca878944a8b52d8
b941baec6084df67ab21dc24b11975c1618018ff
refs/heads/master
2021-05-01T21:10:56.405913
2018-05-07T01:30:37
2018-05-07T01:30:37
120,972,749
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
public class Day12 { public static void main(String[] args) { int hourlyPay = Integer.parseInt(args[0]); int weeklyHours = Integer.parseInt(args[1]); int weeksWorked = Integer.parseInt(args [2]); int weekNum = 1; int weeklyPay = hourlyPay * weeklyHours; int totalPayEarned = weeklyPay * weeksWorked; int totalSavings = 0; while (weekNum <= weeksWorked) { //keep counting paycheck + savings weekly starting with week 1 until all worked weeks have been calculated System.out.print("Week " + weekNum + " - Paycheck: $" + weeklyPay + "; "); double savePercent = 0; int leftOver = weekNum % 10; switch(leftOver){ case 0: savePercent = .5; break; case 3: savePercent = .3; break; case 2: savePercent = .2; break; case 4: savePercent = .2; break; case 6: savePercent = .3; break; case 8: savePercent = .2; break; case 9: savePercent = .3; break; } int saveAmount = (int) (savePercent * weeklyPay); int payAfterSavings = weeklyPay - saveAmount; System.out.print("Saved: $" + saveAmount + "; "); System.out.print("Paycheck After Savings: $" + payAfterSavings + "; "); totalSavings = totalSavings + saveAmount; System.out.println("Savings Balance: $" + totalSavings); weekNum ++; } System.out.println("Total Pay Earned: $" + totalPayEarned); } }
[ "caseyjacksonking@gmail.com" ]
caseyjacksonking@gmail.com
b1f791de1578ae69d15ecac5fbc21031203a78d8
b17b139e754f2d128c4b2714bf9d37a21fb7dfeb
/BinarySearchTree/BinarySearchTree.java
02453cfe4249fa945c7f7e35bbb2154e9c474a49
[]
no_license
denuradhan/Java
dab5f3c07239e9fd5ed4eb59364c059ec61c3e6a
26dc5f6462e127e10941203b48a2a931c9fb0ef6
refs/heads/master
2020-08-06T19:55:27.548780
2019-12-04T12:43:37
2019-12-04T12:43:37
213,132,500
1
0
null
2019-12-04T12:43:38
2019-10-06T08:22:51
Java
UTF-8
Java
false
false
4,418
java
package BinarySearchTree; public class BinarySearchTree { public Node root; public BinarySearchTree() { this.root = null; } public boolean find(int id) { Node current = root; while (current != null) { if (current.data == id) { return true; } else if (current.data > id) { current = current.left; } else { current = current.right; } } return false; } public Node findNode(int id){ Node currNode = root; while (currNode != null) { if (currNode.data==id) { return currNode; }else if (currNode.data>id){ currNode = currNode.left; }else{ currNode = currNode.right; } } return null; } public int getMax(){ Node currNode = root; while(currNode.right!=null){ currNode = currNode.right; } return currNode.data; } public int getMin(){ Node currNode = root; while(currNode.left!=null){ currNode = currNode.left; } return currNode.data; } public void insert(int id) { Node newNode = new Node(id); if (root == null) { root = newNode; return; } Node current = root; Node parent = null; while (true) { parent = current; if (id < current.data) { current = current.left; if (current == null) { parent.left = newNode; return; } } else { current = current.right; if (current == null) { parent.right = newNode; return; } } } } public void display(Node root) { if (root != null) { display(root.left); System.out.print(" " + root.data); display(root.right); } } public boolean delete(int id) { Node parent = root; Node current = root; boolean isLesftChild = false; while (current.data != id) { parent = current; if (current.data > id) { isLesftChild = true; current = current.left; } else { isLesftChild = false; current = current.right; } if (current == null) { return false; } } if (current.left == null && current.right == null) { if (current == root) { root = null; } if (isLesftChild == true) { parent.left = null; } else { parent.right = null; } } else if (current.right == null) { if (current == root) { root = current.left; } else if (isLesftChild) { parent.left = current.left; } else { parent.right = current.left; } } else if (current.left == null) { if (current == root) { root = current.right; } else if (isLesftChild) { parent.left = current.right; } else { parent.right = current.right; } } else if (current.left != null && current.right != null) { Node successor = getSucceccor(current); if (current == root) { root = successor; } else if (isLesftChild) { parent.left = successor; } else { parent.right = successor; } successor.left = current.left; } return true; } public Node getSucceccor(Node deleteNode) { Node succeccor = null; Node successorParent = null; Node current = deleteNode.right; while (current != null) { successorParent = succeccor; succeccor = current; current = current.left; } if (succeccor != deleteNode.right) { successorParent.left = succeccor.right; succeccor.right = deleteNode.right; } return succeccor; } }
[ "denny.dand@outlook.com" ]
denny.dand@outlook.com
fa9fb449c9072a5f3cc7bad32369ef4653f0bad6
ea35a208ac994722f9e05f173e775f8696a70a40
/PracticeProgram/src/Student.java
5545afc1ca30d0a63dbf1ca50f408e6feb53ac39
[]
no_license
DevPriyanshu/CoreJavaPracticePrograms
7d366a07dad4db4588fdbb78a3d8cc9bec773312
9244304d614e8a15e86fc26816049409cd292f5b
refs/heads/main
2023-05-26T03:33:04.894321
2021-06-14T10:52:27
2021-06-14T10:52:27
346,279,451
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
public class Student { private int rollno,math,phy,chem; private String name; public int getRollno() { return rollno; } public void setRollno(int rollno) { this.rollno = rollno; } public int getMath() { return math; } public void setMath(int math) { this.math = math; } public int getPhy() { return phy; } public void setPhy(int phy) { this.phy = phy; } public int getChem() { return chem; } public void setChem(int chem) { this.chem = chem; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void info() { System.out.println(rollno + " : "+name+" -> "+math+", "+phy+", "+chem); } }
[ "noreply@github.com" ]
noreply@github.com
d7f884af95824a757b87034ca1db8f35885ba536
3767880230113b858e4b9b7f1a698e4de299dd4a
/java/src/main/java/com/abstract_classes copy/demo1/Mini.java
d671f70e1bdf244d108c646a3c9499eea4964c6d
[]
no_license
loki-tailor/tutorials
153ab50c81adeecf9edd2c127e022320b4610d6f
9dc7e53308571926ca4591c02fd3ec7bad11b217
refs/heads/main
2023-03-08T21:04:29.599550
2022-10-23T06:54:43
2022-10-23T06:54:43
154,438,897
0
0
null
2023-03-01T06:13:51
2018-10-24T04:27:26
Python
UTF-8
Java
false
false
229
java
package com.abstract_classes.demo1; /*- created @ 29-03-20 @author lokeshwar */ public class Mini extends Car { public void goUpHill() { System.out.println("overidden abstract method declared here"); } } // end of class
[ "lokeshwar.tailor@outlook.com" ]
lokeshwar.tailor@outlook.com
d984f165352f8244e4529fcecaf7de995a32e111
670b5e32eef276f024c13c34def481b99b4c1692
/src/test/java/org/infoscoop_selenium/testsuites/tool_gadgets/ToolGadgets_Sticky_Settings_CharColorTest.java
bf0d12e08c64a92a946a15e83b1d0ff48c0d4704
[]
no_license
infoScoop/infoscoop-selenium
af98811388dc716b1da6a957a979b9989deae50f
f4099dde3a5a7befdfd50b66bf700bc90fca6bea
refs/heads/master
2018-12-29T09:14:06.961352
2014-10-08T07:09:36
2014-10-08T07:09:36
17,816,957
1
0
null
2014-10-15T04:50:53
2014-03-17T04:16:29
Java
UTF-8
Java
false
false
1,888
java
package org.infoscoop_selenium.testsuites.tool_gadgets; import static org.junit.Assert.assertEquals; import org.infoscoop_selenium.base.IS_BaseItTestCase; import org.infoscoop_selenium.helper.TestHelper; import org.infoscoop_selenium.portal.Gadget.GADGET_TYPE; import org.infoscoop_selenium.portal.gadget.StickyGadget; import org.infoscoop_selenium.portal.gadget.StickyGadget.COLOR; import org.junit.Test; import org.openqa.selenium.support.ui.Select; public class ToolGadgets_Sticky_Settings_CharColorTest extends IS_BaseItTestCase { private static StickyGadget GADGET; @Override public void doBefore() { // テストケースごとの事前処理 // login getPortal().login(); // 初期化 getPortal().getCommandBar().getPortalPreference().initializeData(); // ガジェットのドロップ GADGET = (StickyGadget)getPortal().getTopMenu().dropGadget("etcWidgets", "etcWidgets_stickey", 1, GADGET_TYPE.STICKY); } @Test /** * 文字色指定 */ public void iscp_4104(){ String color0 = GADGET.getContentColor(); assertEquals("rgba(0, 0, 0, 1)", color0); GADGET.changeColor(COLOR.BLUE); String color1 = GADGET.getContentColor(); assertEquals("rgba(0, 0, 255, 1)", color1); } @Test /** * 保存確認 */ public void iscp_4105(){ GADGET.changeColor(COLOR.BLUE); String color0 = GADGET.getContentColor(); assertEquals("rgba(0, 0, 255, 1)", color0); // ブラウザの更新 super.getDriver().navigate().refresh(); TestHelper.sleep(2000); String color1 = GADGET.getContentColor(); assertEquals("rgba(0, 0, 255, 1)", color1); } @Test /** * 初期値 */ public void iscp_4106(){ // ガジェット設定を開く GADGET.getGadgetPreference().show(); Select color = new Select(GADGET.getColorElement()); assertEquals(COLOR.BLACK.getValue(), color.getFirstSelectedOption().getAttribute("value")); } }
[ "hiuchida@beacon-it.co.jp" ]
hiuchida@beacon-it.co.jp
6477123772bc0c9efb6e8b8192a8a89156fa075f
9f1b4cf31ae710b879f90898346afc3751386e67
/hw2/test/CPP/CPP.cup
075831920dc943d3375fb9db37bb9fa855510cd0
[]
no_license
Claude51315/DAT151
91025efe5d3ac46529918ae5e67e75e97210138b
176c430901baf1cf2535b1e5a7c299b10fab0fe0
refs/heads/master
2016-08-13T02:04:51.028524
2016-01-09T22:06:05
2016-01-09T22:06:05
45,632,614
0
2
null
null
null
null
UTF-8
Java
false
false
1,420
cup
// -*- Java -*- This Cup file was machine-generated by BNFC package CPP; parser code {: public CPP.Absyn.Exp pExp() throws Exception { java_cup.runtime.Symbol res = parse(); return (CPP.Absyn.Exp) res.value; } public <B,A extends java.util.LinkedList<? super B>> A cons_(B x, A xs) { xs.addFirst(x); return xs; } public void syntax_error(java_cup.runtime.Symbol cur_token) { report_error("Syntax Error, trying to recover and continue parse...", cur_token); } public void unrecovered_syntax_error(java_cup.runtime.Symbol cur_token) throws java.lang.Exception { throw new Exception("Unrecoverable Syntax Error"); } :} nonterminal CPP.Absyn.Exp Exp; nonterminal CPP.Absyn.Exp Exp1; nonterminal CPP.Absyn.Exp Exp2; terminal _SYMB_0; // + terminal _SYMB_1; // * terminal _SYMB_2; // / terminal _SYMB_3; // ( terminal _SYMB_4; // ) terminal Integer _INTEGER_; start with Exp; Exp ::= Exp:p_1 _SYMB_0 Exp1:p_3 {: RESULT = new CPP.Absyn.EAdd(p_1,p_3); :} | Exp:p_1 _SYMB_0 Exp1:p_3 {: RESULT = new CPP.Absyn.ESub(p_1,p_3); :} | Exp1:p_1 {: RESULT = p_1; :} ; Exp1 ::= Exp1:p_1 _SYMB_1 Exp2:p_3 {: RESULT = new CPP.Absyn.EMul(p_1,p_3); :} | Exp1:p_1 _SYMB_2 Exp2:p_3 {: RESULT = new CPP.Absyn.EDiv(p_1,p_3); :} | Exp2:p_1 {: RESULT = p_1; :} ; Exp2 ::= _INTEGER_:p_1 {: RESULT = new CPP.Absyn.EInt(p_1); :} | _SYMB_3 Exp:p_2 _SYMB_4 {: RESULT = p_2; :} ;
[ "claude51315@gmail.com" ]
claude51315@gmail.com
1093f6a1cfd304fd7a48221ab9327980fd9ff28c
0aa4198caa92d8a7122f3bdddcd5d9979ac32809
/android/app/src/main/java/com/reactnativeenzyme/MainApplication.java
5c8085b1cc2fd6c126caed9ed9b25eb760724986
[]
no_license
thani-sh/react-native-enzyme
d2d3e3930eb7f7d4fdb3a45a2a555425dfd38e46
a14fbd99b7b5a1b623477be61bb9b173da61f928
refs/heads/master
2021-06-14T18:03:33.312303
2016-08-26T13:23:19
2016-08-26T13:23:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.reactnativeenzyme; import android.app.Application; import android.util.Log; import com.facebook.react.ReactApplication; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override protected boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage() ); } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } }
[ "mnmtanish@gmail.com" ]
mnmtanish@gmail.com
75fd8f3328c0ad75c2c1fa4a95e22b3ee5cc7f55
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/JacksonDatabind-103/com.fasterxml.jackson.databind.ser.PropertyBuilder/BBC-F0-opt-30/11/com/fasterxml/jackson/databind/ser/PropertyBuilder_ESTest_scaffolding.java
ab3a1df1df288980821273903384404c8cbefe7e
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
35,417
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 21 23:46:29 GMT 2021 */ package com.fasterxml.jackson.databind.ser; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class PropertyBuilder_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.fasterxml.jackson.databind.ser.PropertyBuilder"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PropertyBuilder_ESTest_scaffolding.class.getClassLoader() , "com.fasterxml.jackson.databind.introspect.ClassIntrospector", "com.fasterxml.jackson.databind.ser.PropertyBuilder", "com.fasterxml.jackson.databind.cfg.ConfigOverride$Empty", "com.fasterxml.jackson.databind.jsontype.TypeSerializer", "com.fasterxml.jackson.annotation.JsonInclude$Include", "com.fasterxml.jackson.annotation.JsonFormat$Features", "com.fasterxml.jackson.databind.introspect.AnnotatedConstructor", "com.fasterxml.jackson.databind.type.TypeFactory", "com.fasterxml.jackson.databind.cfg.MapperConfigBase", "com.fasterxml.jackson.databind.type.ArrayType", "com.fasterxml.jackson.core.util.Separators", "com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder", "com.fasterxml.jackson.databind.type.MapLikeType", "com.fasterxml.jackson.databind.type.MapType", "com.fasterxml.jackson.databind.introspect.ObjectIdInfo", "com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector", "com.fasterxml.jackson.databind.util.Named", "com.fasterxml.jackson.databind.PropertyName", "com.fasterxml.jackson.databind.cfg.ConfigOverrides", "com.fasterxml.jackson.databind.type.TypeBase", "com.fasterxml.jackson.databind.type.CollectionType", "com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector", "com.fasterxml.jackson.core.util.Instantiatable", "com.fasterxml.jackson.databind.introspect.TypeResolutionContext", "com.fasterxml.jackson.databind.cfg.MapperConfig", "com.fasterxml.jackson.annotation.Nulls", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter$Indenter", "com.fasterxml.jackson.core.JsonGenerator", "com.fasterxml.jackson.annotation.JsonSetter$Value", "com.fasterxml.jackson.databind.type.TypeParser", "com.fasterxml.jackson.databind.jsontype.SubtypeResolver", "com.fasterxml.jackson.annotation.JsonIgnoreProperties$Value", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$EmptyCollector", "com.fasterxml.jackson.databind.util.Annotations", "com.fasterxml.jackson.databind.cfg.ContextAttributes$Impl", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter", "com.fasterxml.jackson.databind.JavaType", "com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std", "com.fasterxml.jackson.databind.type.CollectionLikeType", "com.fasterxml.jackson.core.FormatFeature", "com.fasterxml.jackson.annotation.JacksonAnnotationValue", "com.fasterxml.jackson.databind.type.ResolvedRecursiveType", "com.fasterxml.jackson.databind.introspect.AnnotatedClass$Creators", "com.fasterxml.jackson.databind.introspect.Annotated", "com.fasterxml.jackson.databind.introspect.BasicClassIntrospector", "com.fasterxml.jackson.core.JsonFactory", "com.fasterxml.jackson.databind.type.ReferenceType", "com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$NoAnnotations", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter$NopIndenter", "com.fasterxml.jackson.databind.type.PlaceholderForType", "com.fasterxml.jackson.databind.util.Converter", "com.fasterxml.jackson.databind.AnnotationIntrospector", "com.fasterxml.jackson.core.SerializableString", "com.fasterxml.jackson.core.Versioned", "com.fasterxml.jackson.databind.SerializationConfig", "com.fasterxml.jackson.annotation.JsonFormat$Value", "com.fasterxml.jackson.databind.introspect.BasicBeanDescription", "com.fasterxml.jackson.annotation.JacksonAnnotation", "com.fasterxml.jackson.annotation.JsonInclude$Value", "com.fasterxml.jackson.databind.introspect.AnnotatedMember", "com.fasterxml.jackson.databind.JsonSerializable", "com.fasterxml.jackson.databind.util.LRUMap", "com.fasterxml.jackson.databind.BeanDescription", "com.fasterxml.jackson.core.type.TypeReference", "com.fasterxml.jackson.databind.ser.FilterProvider", "com.fasterxml.jackson.databind.introspect.SimpleMixInResolver", "com.fasterxml.jackson.core.util.DefaultIndenter", "com.fasterxml.jackson.databind.introspect.AnnotatedWithParams", "com.fasterxml.jackson.core.Base64Variant", "com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility", "com.fasterxml.jackson.databind.util.RootNameLookup", "com.fasterxml.jackson.databind.introspect.AnnotatedClass", "com.fasterxml.jackson.databind.JsonMappingException", "com.fasterxml.jackson.databind.introspect.ClassIntrospector$MixInResolver", "com.fasterxml.jackson.databind.type.SimpleType", "com.fasterxml.jackson.databind.DatabindContext", "com.fasterxml.jackson.core.type.ResolvedType", "com.fasterxml.jackson.databind.cfg.ConfigOverride", "com.fasterxml.jackson.databind.DeserializationConfig", "com.fasterxml.jackson.databind.MapperFeature", "com.fasterxml.jackson.core.io.SerializedString", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter$FixedSpaceIndenter", "com.fasterxml.jackson.databind.type.TypeBindings", "com.fasterxml.jackson.annotation.JsonFormat$Shape", "com.fasterxml.jackson.databind.introspect.AnnotationCollector", "com.fasterxml.jackson.databind.SerializerProvider", "com.fasterxml.jackson.databind.cfg.ContextAttributes", "com.fasterxml.jackson.databind.introspect.AnnotatedMethod", "com.fasterxml.jackson.databind.jsontype.TypeIdResolver", "com.fasterxml.jackson.databind.PropertyNamingStrategy", "com.fasterxml.jackson.databind.introspect.VisibilityChecker", "com.fasterxml.jackson.databind.introspect.AnnotatedParameter", "com.fasterxml.jackson.core.JsonGenerator$Feature", "com.fasterxml.jackson.databind.cfg.BaseSettings", "com.fasterxml.jackson.core.JsonProcessingException", "com.fasterxml.jackson.databind.cfg.HandlerInstantiator", "com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver", "com.fasterxml.jackson.databind.cfg.ConfigFeature", "com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder$Value", "com.fasterxml.jackson.annotation.JsonInclude", "com.fasterxml.jackson.databind.cfg.MutableConfigOverride", "com.fasterxml.jackson.databind.SerializationFeature", "com.fasterxml.jackson.core.PrettyPrinter" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(PropertyBuilder_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.fasterxml.jackson.databind.ser.PropertyBuilder", "com.fasterxml.jackson.annotation.JsonInclude$Include", "com.fasterxml.jackson.annotation.JsonInclude$Value", "com.fasterxml.jackson.databind.ser.PropertyBuilder$1", "com.fasterxml.jackson.databind.MapperFeature", "com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase", "com.fasterxml.jackson.databind.ser.PropertyWriter", "com.fasterxml.jackson.databind.ser.BeanPropertyWriter", "com.fasterxml.jackson.databind.SerializationFeature", "com.fasterxml.jackson.databind.annotation.JsonSerialize$Typing", "com.fasterxml.jackson.databind.BeanDescription", "com.fasterxml.jackson.databind.introspect.BasicBeanDescription", "com.fasterxml.jackson.databind.ser.SerializerFactory", "com.fasterxml.jackson.databind.JsonSerializer", "com.fasterxml.jackson.databind.ser.std.StdSerializer", "com.fasterxml.jackson.databind.ser.std.StdScalarSerializer", "com.fasterxml.jackson.databind.ser.std.StringSerializer", "com.fasterxml.jackson.databind.ser.std.ToStringSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializers", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$Base", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntegerSerializer", "com.fasterxml.jackson.core.JsonParser$NumberType", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$LongSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$IntLikeSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$ShortSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$DoubleSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializers$FloatSerializer", "com.fasterxml.jackson.databind.ser.std.BooleanSerializer", "com.fasterxml.jackson.databind.ser.std.NumberSerializer", "com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase", "com.fasterxml.jackson.databind.ser.std.CalendarSerializer", "com.fasterxml.jackson.databind.ser.std.DateSerializer", "com.fasterxml.jackson.databind.ser.std.StdJdkSerializers", "com.fasterxml.jackson.databind.ser.std.UUIDSerializer", "com.fasterxml.jackson.databind.ser.std.NullSerializer", "com.fasterxml.jackson.databind.ser.BasicSerializerFactory", "com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig", "com.fasterxml.jackson.databind.ser.BeanSerializerFactory", "com.fasterxml.jackson.databind.ser.BeanSerializerBuilder", "com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector", "com.fasterxml.jackson.core.io.SerializedString", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter$NopIndenter", "com.fasterxml.jackson.core.util.DefaultPrettyPrinter$FixedSpaceIndenter", "com.fasterxml.jackson.core.util.DefaultIndenter", "com.fasterxml.jackson.core.util.Separators", "com.fasterxml.jackson.core.PrettyPrinter", "com.fasterxml.jackson.databind.introspect.ClassIntrospector", "com.fasterxml.jackson.core.type.ResolvedType", "com.fasterxml.jackson.databind.JavaType", "com.fasterxml.jackson.databind.type.TypeBindings", "com.fasterxml.jackson.databind.type.TypeBase", "com.fasterxml.jackson.databind.type.SimpleType", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$NoAnnotations", "com.fasterxml.jackson.databind.introspect.AnnotationCollector", "com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver", "com.fasterxml.jackson.databind.introspect.Annotated", "com.fasterxml.jackson.databind.introspect.AnnotatedClass$Creators", "com.fasterxml.jackson.databind.introspect.AnnotatedClass", "com.fasterxml.jackson.databind.introspect.BasicClassIntrospector", "com.fasterxml.jackson.databind.util.LRUMap", "com.fasterxml.jackson.databind.type.TypeParser", "com.fasterxml.jackson.databind.type.TypeFactory", "com.fasterxml.jackson.databind.introspect.TypeResolutionContext$Basic", "com.fasterxml.jackson.databind.type.ClassStack", "com.fasterxml.jackson.databind.util.ClassUtil", "com.fasterxml.jackson.databind.type.TypeBindings$AsKey", "com.fasterxml.jackson.databind.type.MapLikeType", "com.fasterxml.jackson.databind.type.MapType", "com.fasterxml.jackson.databind.util.ArrayIterator", "com.fasterxml.jackson.databind.ser.BeanSerializerModifier", "com.fasterxml.jackson.databind.util.ArrayBuilders", "com.fasterxml.jackson.databind.jsontype.SubtypeResolver", "com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver", "com.fasterxml.jackson.databind.introspect.SimpleMixInResolver", "com.fasterxml.jackson.databind.util.RootNameLookup", "com.fasterxml.jackson.databind.cfg.ConfigOverrides", "com.fasterxml.jackson.annotation.Nulls", "com.fasterxml.jackson.annotation.JsonSetter$Value", "com.fasterxml.jackson.annotation.JsonAutoDetect$Visibility", "com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std", "com.fasterxml.jackson.annotation.JsonFormat$Shape", "com.fasterxml.jackson.annotation.JsonFormat$Features", "com.fasterxml.jackson.annotation.JsonFormat$Value", "com.fasterxml.jackson.databind.cfg.MapperConfig", "com.fasterxml.jackson.databind.cfg.ConfigOverride", "com.fasterxml.jackson.databind.cfg.ConfigOverride$Empty", "com.fasterxml.jackson.databind.cfg.MapperConfigBase", "com.fasterxml.jackson.databind.SerializationConfig", "com.fasterxml.jackson.databind.cfg.ContextAttributes", "com.fasterxml.jackson.databind.cfg.ContextAttributes$Impl", "com.fasterxml.jackson.databind.ser.FilterProvider", "com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider", "com.fasterxml.jackson.databind.type.PlaceholderForType", "com.fasterxml.jackson.databind.DeserializationConfig", "com.fasterxml.jackson.databind.node.JsonNodeFactory", "com.fasterxml.jackson.databind.type.CollectionLikeType", "com.fasterxml.jackson.databind.deser.DeserializerFactory", "com.fasterxml.jackson.databind.PropertyName", "com.fasterxml.jackson.databind.deser.BasicDeserializerFactory", "com.fasterxml.jackson.databind.deser.std.StdKeyDeserializers", "com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig", "com.fasterxml.jackson.databind.deser.BeanDeserializerFactory", "com.fasterxml.jackson.databind.DatabindContext", "com.fasterxml.jackson.databind.DeserializationContext", "com.fasterxml.jackson.databind.deser.DefaultDeserializationContext", "com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl", "com.fasterxml.jackson.databind.deser.DeserializerCache", "com.fasterxml.jackson.databind.type.ReferenceType", "com.fasterxml.jackson.databind.ser.Serializers$Base", "com.fasterxml.jackson.databind.module.SimpleSerializers", "com.fasterxml.jackson.databind.type.TypeBindings$TypeParamStash", "com.fasterxml.jackson.databind.type.CollectionType", "com.fasterxml.jackson.core.util.InternCache", "com.fasterxml.jackson.databind.ser.impl.FailingSerializer", "com.fasterxml.jackson.databind.ser.impl.UnknownSerializer", "com.fasterxml.jackson.databind.SerializerProvider", "com.fasterxml.jackson.databind.ser.DefaultSerializerProvider", "com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl", "com.fasterxml.jackson.databind.ser.SerializerCache", "com.fasterxml.jackson.databind.AnnotationIntrospector", "com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector$1", "com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector", "com.fasterxml.jackson.databind.PropertyNamingStrategy$PropertyNamingStrategyBase", "com.fasterxml.jackson.databind.PropertyNamingStrategy$SnakeCaseStrategy", "com.fasterxml.jackson.databind.PropertyNamingStrategy$UpperCamelCaseStrategy", "com.fasterxml.jackson.databind.PropertyNamingStrategy$LowerCaseStrategy", "com.fasterxml.jackson.databind.PropertyNamingStrategy$KebabCaseStrategy", "com.fasterxml.jackson.databind.PropertyNamingStrategy", "com.fasterxml.jackson.databind.type.ResolvedRecursiveType", "com.fasterxml.jackson.databind.introspect.ObjectIdInfo", "com.fasterxml.jackson.databind.ser.std.BeanSerializerBase", "com.fasterxml.jackson.databind.ser.BeanSerializer", "com.fasterxml.jackson.databind.module.SimpleKeyDeserializers", "com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition", "com.fasterxml.jackson.databind.AnnotationIntrospector$ReferenceProperty", "com.fasterxml.jackson.databind.AnnotationIntrospector$ReferenceProperty$Type", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder", "com.fasterxml.jackson.databind.type.ArrayType", "com.fasterxml.jackson.databind.jsontype.NamedType", "com.fasterxml.jackson.core.type.TypeReference", "com.fasterxml.jackson.core.TreeCodec", "com.fasterxml.jackson.core.ObjectCodec", "com.fasterxml.jackson.databind.ext.Java7SupportImpl", "com.fasterxml.jackson.databind.ext.Java7Support", "com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector", "com.fasterxml.jackson.databind.cfg.BaseSettings", "com.fasterxml.jackson.databind.util.StdDateFormat", "com.fasterxml.jackson.core.Base64Variant", "com.fasterxml.jackson.core.Base64Variants", "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.core.JsonFactory$Feature", "com.fasterxml.jackson.core.JsonFactory", "com.fasterxml.jackson.databind.MappingJsonFactory", "com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer", "com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$TableInfo", "com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer", "com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer$TableInfo", "com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder", "com.fasterxml.jackson.databind.ObjectMapper$DefaultTypeResolverBuilder", "com.fasterxml.jackson.annotation.JsonTypeInfo$Id", "com.fasterxml.jackson.annotation.ObjectIdGenerator", "com.fasterxml.jackson.annotation.ObjectIdGenerators$Base", "com.fasterxml.jackson.annotation.ObjectIdGenerators$IntSequenceGenerator", "com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter", "com.fasterxml.jackson.databind.introspect.AnnotationMap", "com.fasterxml.jackson.databind.BeanProperty$Bogus", "com.fasterxml.jackson.core.util.MinimalPrettyPrinter", "com.fasterxml.jackson.databind.deser.ValueInstantiators$Base", "com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter", "com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter$FilterExceptFilter", "com.fasterxml.jackson.databind.type.TypeParser$MyTokenizer", "com.fasterxml.jackson.databind.introspect.AnnotatedMember", "com.fasterxml.jackson.databind.introspect.VirtualAnnotatedMember", "com.fasterxml.jackson.databind.introspect.AnnotatedField", "com.fasterxml.jackson.databind.PropertyMetadata$MergeInfo", "com.fasterxml.jackson.databind.type.ClassKey", "com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap", "com.fasterxml.jackson.databind.BeanProperty", "com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter$SerializeExceptFilter", "com.fasterxml.jackson.databind.deser.ValueInstantiator", "com.fasterxml.jackson.databind.deser.ValueInstantiator$Base", "com.fasterxml.jackson.core.Version", "com.fasterxml.jackson.databind.Module", "com.fasterxml.jackson.databind.module.SimpleModule", "com.fasterxml.jackson.databind.JsonDeserializer", "com.fasterxml.jackson.databind.deser.std.StdDeserializer", "com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer", "com.fasterxml.jackson.databind.deser.std.FromStringDeserializer", "com.fasterxml.jackson.databind.ext.CoreXMLDeserializers$Std", "com.fasterxml.jackson.databind.PropertyMetadata", "com.fasterxml.jackson.databind.ObjectReader", "com.fasterxml.jackson.databind.ser.impl.FilteredBeanPropertyWriter", "com.fasterxml.jackson.databind.ser.impl.FilteredBeanPropertyWriter$MultiView", "com.fasterxml.jackson.databind.type.TypeModifier", "com.fasterxml.jackson.databind.deser.BeanDeserializerBuilder", "com.fasterxml.jackson.core.util.BufferRecycler", "com.fasterxml.jackson.core.io.IOContext", "com.fasterxml.jackson.core.util.ByteArrayBuilder", "com.fasterxml.jackson.core.JsonGenerator", "com.fasterxml.jackson.core.base.GeneratorBase", "com.fasterxml.jackson.core.io.CharTypes", "com.fasterxml.jackson.core.json.JsonGeneratorImpl", "com.fasterxml.jackson.core.json.UTF8JsonGenerator", "com.fasterxml.jackson.core.JsonStreamContext", "com.fasterxml.jackson.core.json.JsonWriteContext", "com.fasterxml.jackson.databind.AbstractTypeResolver", "com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver", "com.fasterxml.jackson.databind.deser.BeanDeserializerBase", "com.fasterxml.jackson.databind.deser.BeanDeserializer", "com.fasterxml.jackson.annotation.SimpleObjectIdResolver", "com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase", "com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver", "com.fasterxml.jackson.databind.deser.DeserializationProblemHandler", "com.fasterxml.jackson.databind.JsonSerializable$Base", "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.node.BaseJsonNode", "com.fasterxml.jackson.databind.node.ValueNode", "com.fasterxml.jackson.databind.node.NumericNode", "com.fasterxml.jackson.databind.node.BigIntegerNode", "com.fasterxml.jackson.databind.deser.BeanDeserializerModifier", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$8", "com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair", "com.fasterxml.jackson.annotation.ObjectIdGenerators$UUIDGenerator", "com.fasterxml.jackson.databind.deser.AbstractDeserializer", "com.fasterxml.jackson.databind.cfg.MutableConfigOverride", "com.fasterxml.jackson.databind.module.SimpleDeserializers", "com.fasterxml.jackson.annotation.OptBoolean", "com.fasterxml.jackson.databind.introspect.AnnotatedWithParams", "com.fasterxml.jackson.databind.introspect.AnnotatedMethod", "com.fasterxml.jackson.databind.jsontype.impl.TypeNameIdResolver", "com.fasterxml.jackson.databind.util.LinkedNode", "com.fasterxml.jackson.databind.deser.DataFormatReaders", "com.fasterxml.jackson.core.format.MatchStrength", "com.fasterxml.jackson.databind.InjectableValues", "com.fasterxml.jackson.databind.InjectableValues$Std", "com.fasterxml.jackson.databind.jsontype.TypeDeserializer", "com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase", "com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDeserializer", "com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer", "com.fasterxml.jackson.core.util.BufferRecyclers", "com.fasterxml.jackson.core.io.JsonStringEncoder", "com.fasterxml.jackson.core.util.TextBuffer", "com.fasterxml.jackson.databind.ext.OptionalHandlerFactory", "com.fasterxml.jackson.databind.deser.std.JdkDeserializers", "com.fasterxml.jackson.databind.ser.AnyGetterWriter", "com.fasterxml.jackson.databind.ObjectMapper$3", "com.fasterxml.jackson.core.util.VersionUtil", "com.fasterxml.jackson.core.json.PackageVersion", "com.fasterxml.jackson.databind.ObjectMapper$1", "com.fasterxml.jackson.annotation.JsonAutoDetect$Value", "com.fasterxml.jackson.core.JsonProcessingException", "com.fasterxml.jackson.databind.JsonMappingException", "com.fasterxml.jackson.databind.exc.MismatchedInputException", "com.fasterxml.jackson.databind.exc.InvalidTypeIdException", "com.fasterxml.jackson.databind.node.IntNode", "com.fasterxml.jackson.core.JsonParser", "com.fasterxml.jackson.core.base.ParserMinimalBase", "com.fasterxml.jackson.core.base.ParserBase", "com.fasterxml.jackson.core.json.async.NonBlockingJsonParserBase", "com.fasterxml.jackson.core.json.async.NonBlockingJsonParser", "com.fasterxml.jackson.core.json.JsonReadContext", "com.fasterxml.jackson.databind.ser.ContainerSerializer", "com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase", "com.fasterxml.jackson.databind.ser.std.EnumSetSerializer", "com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap", "com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap$Empty", "com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$EmptyCollector", "com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer", "com.fasterxml.jackson.databind.deser.impl.CreatorCollector", "com.fasterxml.jackson.databind.introspect.CollectorBase", "com.fasterxml.jackson.databind.introspect.AnnotatedCreatorCollector", "com.fasterxml.jackson.databind.util.ClassUtil$Ctor", "com.fasterxml.jackson.databind.introspect.AnnotatedConstructor", "com.fasterxml.jackson.annotation.JsonCreator$Mode", "com.fasterxml.jackson.annotation.JsonAutoDetect$1", "com.fasterxml.jackson.databind.deser.impl.CreatorCandidate", "com.fasterxml.jackson.databind.introspect.AnnotatedParameter", "com.fasterxml.jackson.databind.deser.impl.CreatorCandidate$Param", "com.fasterxml.jackson.databind.deser.impl.CreatorCollector$StdTypeConstructor", "com.fasterxml.jackson.databind.deser.std.StdValueInstantiator", "com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase", "com.fasterxml.jackson.databind.deser.std.CollectionDeserializer", "com.fasterxml.jackson.databind.util.AccessPattern", "com.fasterxml.jackson.databind.deser.impl.NullsConstantProvider", "com.fasterxml.jackson.databind.deser.std.MapDeserializer", "com.fasterxml.jackson.annotation.JsonIgnoreProperties$Value", "com.fasterxml.jackson.databind.deser.std.StringDeserializer", "com.fasterxml.jackson.databind.deser.std.NumberDeserializers", "com.fasterxml.jackson.databind.deser.std.NumberDeserializers$NumberDeserializer", "com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla", "com.fasterxml.jackson.databind.ser.impl.FilteredBeanPropertyWriter$SingleView", "com.fasterxml.jackson.databind.deser.impl.FailingDeserializer", "com.fasterxml.jackson.databind.deser.SettableBeanProperty", "com.fasterxml.jackson.databind.deser.CreatorProperty", "com.fasterxml.jackson.core.util.JsonGeneratorDelegate", "com.fasterxml.jackson.core.filter.TokenFilter", "com.fasterxml.jackson.core.filter.FilteringGeneratorDelegate", "com.fasterxml.jackson.core.filter.TokenFilterContext", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$3", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$Linked", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$4", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$5", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$6", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$7", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$9", "com.fasterxml.jackson.annotation.JsonProperty$Access", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$2", "com.fasterxml.jackson.databind.deser.Deserializers$Base", "com.fasterxml.jackson.databind.module.SimpleValueInstantiators", "com.fasterxml.jackson.databind.KeyDeserializer", "com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", "com.fasterxml.jackson.databind.BeanProperty$Std", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$OneAnnotation", "com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap", "com.fasterxml.jackson.core.json.WriterBasedJsonGenerator", "com.fasterxml.jackson.databind.jsontype.impl.SubTypeValidator", "com.fasterxml.jackson.databind.introspect.AnnotatedFieldCollector", "com.fasterxml.jackson.databind.introspect.AnnotatedFieldCollector$FieldBuilder", "com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector", "com.fasterxml.jackson.databind.introspect.MemberKey", "com.fasterxml.jackson.databind.introspect.AnnotatedMethodCollector$MethodBuilder", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$OneCollector", "com.fasterxml.jackson.databind.introspect.AnnotatedMethodMap", "com.fasterxml.jackson.databind.util.BeanUtil", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$10", "com.fasterxml.jackson.core.io.InputDecorator", "com.fasterxml.jackson.databind.ext.CoreXMLSerializers$XMLGregorianCalendarSerializer", "com.fasterxml.jackson.databind.ser.std.IterableSerializer", "com.fasterxml.jackson.annotation.ObjectIdGenerators$StringIdGenerator", "com.fasterxml.jackson.core.io.OutputDecorator", "com.fasterxml.jackson.core.io.CharacterEscapes", "com.fasterxml.jackson.core.JsonpCharacterEscapes", "com.fasterxml.jackson.databind.node.ContainerNode", "com.fasterxml.jackson.databind.node.ObjectNode", "com.fasterxml.jackson.databind.node.TreeTraversingParser", "com.fasterxml.jackson.databind.node.NodeCursor", "com.fasterxml.jackson.databind.node.NodeCursor$ObjectCursor", "com.fasterxml.jackson.core.util.JsonParserDelegate", "com.fasterxml.jackson.core.filter.FilteringParserDelegate", "com.fasterxml.jackson.databind.util.ObjectBuffer", "com.fasterxml.jackson.databind.jsontype.impl.AsExternalTypeDeserializer", "com.fasterxml.jackson.databind.deser.impl.MethodProperty", "com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$1", "com.fasterxml.jackson.databind.deser.std.NumberDeserializers$PrimitiveOrWrapperDeserializer", "com.fasterxml.jackson.databind.deser.std.NumberDeserializers$BooleanDeserializer", "com.fasterxml.jackson.core.json.UTF8DataInputJsonParser", "com.fasterxml.jackson.core.json.DupDetector", "com.fasterxml.jackson.databind.jsontype.TypeSerializer", "com.fasterxml.jackson.databind.jsontype.impl.TypeSerializerBase", "com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeSerializer", "com.fasterxml.jackson.databind.ser.std.MapSerializer", "com.fasterxml.jackson.databind.deser.impl.ObjectIdReader", "com.fasterxml.jackson.core.filter.JsonPointerBasedFilter", "com.fasterxml.jackson.core.JsonPointer", "com.fasterxml.jackson.databind.node.BinaryNode", "com.fasterxml.jackson.databind.cfg.PackageVersion", "com.fasterxml.jackson.databind.deser.std.FromStringDeserializer$Std", "com.fasterxml.jackson.databind.util.NameTransformer$NopTransformer", "com.fasterxml.jackson.databind.util.NameTransformer", "com.fasterxml.jackson.databind.introspect.AnnotationCollector$TwoAnnotations", "com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder$1", "com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer", "com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer", "com.fasterxml.jackson.databind.deser.std.DateDeserializers", "com.fasterxml.jackson.databind.node.NodeCursor$RootCursor", "com.fasterxml.jackson.databind.deser.BeanDeserializer$1", "com.fasterxml.jackson.databind.node.JsonNodeType", "com.fasterxml.jackson.databind.exc.InvalidFormatException", "com.fasterxml.jackson.core.JsonLocation", "com.fasterxml.jackson.annotation.ObjectIdGenerator$IdKey", "com.fasterxml.jackson.core.json.UTF8StreamJsonParser", "com.fasterxml.jackson.databind.introspect.VisibilityChecker$1", "com.fasterxml.jackson.core.type.WritableTypeId", "com.fasterxml.jackson.core.json.ReaderBasedJsonParser", "com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper", "com.fasterxml.jackson.core.JsonParseException", "com.fasterxml.jackson.core.io.DataOutputAsStream", "com.fasterxml.jackson.databind.deser.impl.SetterlessProperty", "com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer", "com.fasterxml.jackson.databind.deser.std.EnumDeserializer", "com.fasterxml.jackson.databind.util.EnumResolver", "com.fasterxml.jackson.databind.util.CompactStringObjectMap", "com.fasterxml.jackson.databind.node.DecimalNode", "com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer", "com.fasterxml.jackson.databind.node.POJONode", "com.fasterxml.jackson.databind.node.NullNode", "com.fasterxml.jackson.databind.exc.InvalidDefinitionException", "com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer", "com.fasterxml.jackson.databind.ser.impl.IteratorSerializer" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
fa0ce287ecd42a16f31b43def2c2cd1592a5e606
106103e2525a80c1e626025d307c111a932cae1b
/src/test/java/Parser/ReachOffParserTest.java
153c4d5ce7eaa146a98d045d6e3a719aa37bc942
[]
no_license
SiyuYan/ShoppingPos
a09749e7ef9d79c63b910e64267e53380a98579d
59d33b3faf3cf95e8766514db77624d9a8f214b9
refs/heads/master
2018-12-29T21:02:20.500713
2014-12-25T05:35:18
2014-12-25T05:35:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
package Parser; import com.thoughtworks.siyuyan.parser.ReachOffParser; import com.thoughtworks.siyuyan.promotions.ReachOffPromotion; import org.junit.Test; import java.io.BufferedReader; import java.util.Iterator; import java.util.List; import java.util.Map; import static junit.framework.Assert.assertEquals; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; /** * Created by Administrator on 2014/12/25. */ public class ReachOffParserTest { @Test public void should_parse_when_give_the_item_data() throws Exception { ReachOffParser reachOffParser = new ReachOffParser(); BufferedReader reader = mock(BufferedReader.class); when(reader.readLine()).thenReturn("ITEM000001:100:5"); when(reader.ready()).thenReturn(true, false); List<Map<String, ReachOffPromotion>> list = reachOffParser.parser(reader); Map<String, ReachOffPromotion> promotionMap = list.get(0); Iterator<String> iter = promotionMap.keySet().iterator(); String barcode = iter.next(); ReachOffPromotion reachOffPromotion = promotionMap.get(barcode); assertThat(barcode, is("ITEM000001")); assertEquals(reachOffPromotion.getReach(),100d, 0.00001); assertEquals(reachOffPromotion.getOff(), 5d, 0.00001); } }
[ "18200289607@163.com" ]
18200289607@163.com
76a2c6c7f96d603c9575db7c17f6c4a399dbb0bb
65a8f67e2468e57a49b231339a1a4137b2919a93
/PersonalWebsite/src/main/java/com/inertia/beans/projects/Projects.java
09bab0656f1eb8f96cd977fad2d68b4c85959972
[]
no_license
pharms2011/PersonalWebsite
9494cefa874b5eb8e1aed0c33cd4b351a28c88e9
7d32facc1d35f3c4abf0fee325df227ae8fc6757
refs/heads/master
2020-03-22T02:18:38.746448
2019-01-05T05:21:27
2019-01-05T05:21:27
139,362,888
0
0
null
null
null
null
UTF-8
Java
false
false
2,056
java
package com.inertia.beans.projects; import java.util.ArrayList; import java.util.Collection; import javax.persistence.*; import com.inertia.beans.resume.Skills; @Entity @Table(name = "PROJECTS") public class Projects { public Projects() { super(); // TODO Auto-generated constructor stub } public Projects(int projectId, String description, String connection, String connectionType) { super(); this.projectId = projectId; this.description = description; this.connection = connection; this.connectionType = connectionType; } @Id @Column(name = "PROJECTS_ID") private int projectId; @Column(name = "DESCRIPTION") private String description; @Column(name = "Connection") private String connection; @Column(name = "CONNECTION_TYPE") private String connectionType; @ManyToMany(fetch=FetchType.EAGER, cascade=CascadeType.REMOVE) @JoinTable( name = "PROJECTS_SKILLS", joinColumns = { @JoinColumn(name = " PROJECTS_ID") }, inverseJoinColumns = { @JoinColumn(name = "SKILLS_ID") } ) private Collection<Skills> skills = new ArrayList(); public int getProjectId() { return projectId; } public void setProjectId(int projectId) { this.projectId = projectId; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getConnection() { return connection; } public void setConnection(String connection) { this.connection = connection; } public String getConnectionType() { return connectionType; } public void setConnectionType(String connectionType) { this.connectionType = connectionType; } @Override public String toString() { return "Projects [projectId=" + projectId + ", description=" + description + ", connection=" + connection + ", connectionType=" + connectionType + "]"; } public Collection<Skills> getSkills() { return skills; } public void setSkills(Collection<Skills> skills) { this.skills = skills; } }
[ "prestonharms5@gmail.com" ]
prestonharms5@gmail.com
72d4bf236ac0acf1150a07327f8094fb68f50182
b60eb00252298e312d0597e1f537441ce22bc336
/Projects/pl.sda.javaII/src/tasks/task4/Student.java
7eeac2351cfc25dd967afcaacfc7eec1f0d5aa5c
[]
no_license
sajlenc/SDA
c516da4fa3f33c0b6ba6598cd95fd3182eb36524
7902d94e777fb26c29ff73eab70dff69350ac395
refs/heads/master
2020-03-19T04:23:22.800641
2018-06-14T17:56:46
2018-06-14T17:56:46
135,822,569
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package tasks.task4; public class Student implements Comparable<Student> { private String name; private int age; public Student(String name, int age) { this.name = name; this.age = age; } @Override public String toString() { return "\nStudent{" + "name='" + name + '\'' + ", age=" + age + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public int compareTo(Student o) { int wynik = name.compareTo(o.name); if (wynik == 0){ return age - o.age; } return wynik; } }
[ "sajlenc@gmail.com" ]
sajlenc@gmail.com
7b709fbd3456d40c1be2a7f5b7a648f4df9704f3
d9958f03e60b0121945e2bc7b4ddd79f1a5245ce
/src/main/java/pl/konczak/tries/ihe/pharm/ActRelationshipCostTracking.java
629c4852669b50959e4c8207ab94f51b61ee01ba
[ "Apache-2.0" ]
permissive
chuddyni/jaxb-pl-hl7-tries
d181d0e2f8487d29a520ac68b47b6ce14a63891f
d8322a630381de5911348cb9708e5b68d55dfa33
refs/heads/master
2023-03-18T11:20:38.922488
2020-06-15T20:50:45
2020-06-15T20:52:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package pl.konczak.tries.ihe.pharm; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ActRelationshipCostTracking. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ActRelationshipCostTracking"&gt; * &lt;restriction base="{urn:ihe:pharm}cs"&gt; * &lt;enumeration value="CHRG"/&gt; * &lt;enumeration value="COST"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "ActRelationshipCostTracking") @XmlEnum public enum ActRelationshipCostTracking { CHRG, COST; public String value() { return name(); } public static ActRelationshipCostTracking fromValue(String v) { return valueOf(v); } }
[ "konczak.piotrek@gmail.com" ]
konczak.piotrek@gmail.com
e84650723af6d2d117473c4e27b75f58c6c22af3
80f7269b84703fc3a8acdb7ab8da61528d4c5a5a
/Spring-boot-projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/SpringMVCSecurity/org/apache/jsp/WEB_002dINF/views/home_jsp.java
514aebd75b8257351d59c8e0c862afedfae8ce6a
[]
no_license
awantik/springDataSource
d9200b26d67c8a98c058875ca9e82ed14d2fea48
bae53b8be084867f4c6d1472fe9523c45461bb49
refs/heads/master
2020-04-17T13:54:35.182694
2016-09-12T07:22:45
2016-09-12T07:22:45
67,982,133
0
1
null
null
null
null
UTF-8
Java
false
false
3,975
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.67 * Generated at: 2016-09-12 02:15:02 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp.WEB_002dINF.views; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class home_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, false, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); out = pageContext.getOut(); _jspx_out = out; out.write("\n"); out.write("\n"); out.write("<html>\n"); out.write("<head>\n"); out.write("<title>Home</title>\n"); out.write("</head>\n"); out.write("<body>\n"); out.write("\t<h1>Hello world!</h1>\n"); out.write("\n"); out.write("\t<P>The time on the server is "); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${serverTime}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write(".</P>\n"); out.write("</body>\n"); out.write("</html>\n"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "curanest@gmail.com" ]
curanest@gmail.com
7822cc58382ce0aa3e22ffdea4f75832613094a2
41ce5edf2e270e321dddd409ffac11ab7f32de86
/4/java/lang/StrictMath.java
66e4771f4270e7e25e4776b3ac1abca7c2adb746
[]
no_license
danny-source/SDK_Android_Source_03-14
372bb03020203dba71bc165c8370b91c80bc6eaa
323ad23e16f598d5589485b467bb9fba7403c811
refs/heads/master
2020-05-18T11:19:29.171830
2014-03-29T12:12:44
2014-03-29T12:12:44
18,238,039
2
2
null
null
null
null
UTF-8
Java
false
false
37,202
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 java.lang; // BEGIN android-removed // import java.util.Random; // END android-removed /** * Class StrictMath provides basic math constants and operations such as * trigonometric functions, hyperbolic functions, exponential, logarithms, etc. * <p> * In contrast to class {@link Math}, the methods in this class return exactly * the same results on all platforms. Algorithms based on these methods thus * behave the same (e.g. regarding numerical convergence) on all platforms, * complying with the slogan "write once, run everywhere". On the other side, * the implementation of class StrictMath may be less efficient than that of * class Math, as class StrictMath cannot utilize platform specific features * such as an extended precision math co-processors. * <p> * The methods in this class are specified using the "Freely Distributable Math * Library" (fdlibm), version 5.3. * <p> * <a href="http://www.netlib.org/fdlibm/">http://www.netlib.org/fdlibm/</a> * * @since Android 1.0 */ public final class StrictMath { /** * The double value closest to e, the base of the natural logarithm. * * @since Android 1.0 */ public final static double E = Math.E; /** * The double value closest to pi, the ratio of a circle's circumference to * its diameter. * * @since Android 1.0 */ public final static double PI = Math.PI; private static java.util.Random random; /** * Prevents this class from being instantiated. */ private StrictMath() { } /** * Returns the absolute value of the argument. * <p> * Special cases: * <ul> * <li>{@code abs(-0.0) = +0.0}</li> * <li>{@code abs(+infinity) = +infinity}</li> * <li>{@code abs(-infinity) = +infinity}</li> * <li>{@code abs(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose absolute value has to be computed. * @return the absolute value of the argument. * @since Android 1.0 */ public static double abs(double d) { long bits = Double.doubleToLongBits(d); bits &= 0x7fffffffffffffffL; return Double.longBitsToDouble(bits); } /** * Returns the absolute value of the argument. * <p> * Special cases: * <ul> * <li>{@code abs(-0.0) = +0.0}</li> * <li>{@code abs(+infinity) = +infinity}</li> * <li>{@code abs(-infinity) = +infinity}</li> * <li>{@code abs(NaN) = NaN}</li> * </ul> * </p> * * @param f * the value whose absolute value has to be computed. * @return the argument if it is positive, otherwise the negation of the * argument. * @since Android 1.0 */ public static float abs(float f) { int bits = Float.floatToIntBits(f); bits &= 0x7fffffff; return Float.intBitsToFloat(bits); } /** * Returns the absolute value of the argument. * <p> * If the argument is {@code Integer.MIN_VALUE}, {@code Integer.MIN_VALUE} * is returned. * * @param i * the value whose absolute value has to be computed. * @return the argument if it is positive, otherwise the negation of the * argument. * @since Android 1.0 */ public static int abs(int i) { return i >= 0 ? i : -i; } /** * Returns the absolute value of the argument. * <p> * If the argument is {@code Long.MIN_VALUE}, {@code Long.MIN_VALUE} is * returned. * </p> * * @param l * the value whose absolute value has to be computed. * @return the argument if it is positive, otherwise the negation of the * argument. * @since Android 1.0 */ public static long abs(long l) { return l >= 0 ? l : -l; } /** * Returns the closest double approximation of the arc cosine of the * argument within the range {@code [0..pi]}. * <p> * Special cases: * <ul> * <li>{@code acos((anything > 1) = NaN}</li> * <li>{@code acos((anything < -1) = NaN}</li> * <li>{@code acos(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value to compute arc cosine of. * @return the arc cosine of the argument. * @since Android 1.0 */ public static native double acos(double d); /** * Returns the closest double approximation of the arc sine of the argument * within the range {@code [-pi/2..pi/2]}. * <p> * Special cases: * <ul> * <li>{@code asin((anything > 1)) = NaN}</li> * <li>{@code asin((anything < -1)) = NaN}</li> * <li>{@code asin(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose arc sine has to be computed. * @return the arc sine of the argument. * @since Android 1.0 */ public static native double asin(double d); /** * Returns the closest double approximation of the arc tangent of the * argument within the range {@code [-pi/2..pi/2]}. * <p> * Special cases: * <ul> * <li>{@code atan(+0.0) = +0.0}</li> * <li>{@code atan(-0.0) = -0.0}</li> * <li>{@code atan(+infinity) = +pi/2}</li> * <li>{@code atan(-infinity) = -pi/2}</li> * <li>{@code atan(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose arc tangent has to be computed. * @return the arc tangent of the argument. * @since Android 1.0 */ public static native double atan(double d); /** * Returns the closest double approximation of the arc tangent of * {@code y/x} within the range {@code [-pi..pi]}. This is the angle of the * polar representation of the rectangular coordinates (x,y). * <p> * Special cases: * <ul> * <li>{@code atan2((anything), NaN ) = NaN;}</li> * <li>{@code atan2(NaN , (anything) ) = NaN;}</li> * <li>{@code atan2(+0.0, +(anything but NaN)) = +0.0}</li> * <li>{@code atan2(-0.0, +(anything but NaN)) = -0.0}</li> * <li>{@code atan2(+0.0, -(anything but NaN)) = +pi}</li> * <li>{@code atan2(-0.0, -(anything but NaN)) = -pi}</li> * <li>{@code atan2(+(anything but 0 and NaN), 0) = +pi/2}</li> * <li>{@code atan2(-(anything but 0 and NaN), 0) = -pi/2}</li> * <li>{@code atan2(+(anything but infinity and NaN), +infinity)} {@code =} * {@code +0.0}</li> * <li>{@code atan2(-(anything but infinity and NaN), +infinity)} {@code =} * {@code -0.0}</li> * <li>{@code atan2(+(anything but infinity and NaN), -infinity) = +pi}</li> * <li>{@code atan2(-(anything but infinity and NaN), -infinity) = -pi}</li> * <li>{@code atan2(+infinity, +infinity ) = +pi/4}</li> * <li>{@code atan2(-infinity, +infinity ) = -pi/4}</li> * <li>{@code atan2(+infinity, -infinity ) = +3pi/4}</li> * <li>{@code atan2(-infinity, -infinity ) = -3pi/4}</li> * <li>{@code atan2(+infinity, (anything but,0, NaN, and infinity))} * {@code =} {@code +pi/2}</li> * <li>{@code atan2(-infinity, (anything but,0, NaN, and infinity))} * {@code =} {@code -pi/2}</li> * </ul> * </p> * * @param y * the numerator of the value whose atan has to be computed. * @param x * the denominator of the value whose atan has to be computed. * @return the arc tangent of {@code y/x}. * @since Android 1.0 */ public static native double atan2(double y, double x); // BEGIN android-note // parameter names changed from d1 / d2 to x / y // END android-note /** * Returns the closest double approximation of the cube root of the * argument. * <p> * Special cases: * <ul> * <li>{@code cbrt(+0.0) = +0.0}</li> * <li>{@code cbrt(-0.0) = -0.0}</li> * <li>{@code cbrt(+infinity) = +infinity}</li> * <li>{@code cbrt(-infinity) = -infinity}</li> * <li>{@code cbrt(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose cube root has to be computed. * @return the cube root of the argument. * @since Android 1.0 */ public static native double cbrt(double d); /** * Returns the double conversion of the most negative (closest to negative * infinity) integer value which is greater than the argument. * <p> * Special cases: * <ul> * <li>{@code ceil(+0.0) = +0.0}</li> * <li>{@code ceil(-0.0) = -0.0}</li> * <li>{@code ceil((anything in range (-1,0)) = -0.0}</li> * <li>{@code ceil(+infinity) = +infinity}</li> * <li>{@code ceil(-infinity) = -infinity}</li> * <li>{@code ceil(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose closest integer value has to be computed. * @return the ceiling of the argument. * @since Android 1.0 */ public static native double ceil(double d); /** * Returns the closest double approximation of the hyperbolic cosine of the * argument. * <p> * Special cases: * <ul> * <li>{@code cosh(+infinity) = +infinity}</li> * <li>{@code cosh(-infinity) = +infinity}</li> * <li>{@code cosh(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose hyperbolic cosine has to be computed. * @return the hyperbolic cosine of the argument. * @since Android 1.0 */ public static native double cosh(double d); /** * Returns the closest double approximation of the cosine of the argument. * <p> * Special cases: * <ul> * <li>{@code cos(+infinity) = NaN}</li> * <li>{@code cos(-infinity) = NaN}</li> * <li>{@code cos(NaN) = NaN}</li> * </ul> * </p> * * @param d * the angle whose cosine has to be computed, in radians. * @return the cosine of the argument. * @since Android 1.0 */ public static native double cos(double d); /** * Returns the closest double approximation of the raising "e" to the power * of the argument. * <p> * Special cases: * <ul> * <li>{@code exp(+infinity) = +infinity}</li> * <li>{@code exp(-infinity) = +0.0}</li> * <li>{@code exp(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose exponential has to be computed. * @return the exponential of the argument. * @since Android 1.0 */ public static native double exp(double d); /** * Returns the closest double approximation of <i>{@code e}</i><sup> * {@code d}</sup>{@code - 1}. If the argument is very close to 0, it is * much more accurate to use {@code expm1(d)+1} than {@code exp(d)} (due to * cancellation of significant digits). * <p> * Special cases: * <ul> * <li>{@code expm1(+0.0) = +0.0}</li> * <li>{@code expm1(-0.0) = -0.0}</li> * <li>{@code expm1(+infinity) = +infinity}</li> * <li>{@code expm1(-infinity) = -1.0}</li> * <li>{@code expm1(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value to compute the <i>{@code e}</i><sup>{@code d}</sup> * {@code - 1} of. * @return the <i>{@code e}</i><sup>{@code d}</sup>{@code - 1} value * of the argument. * @since Android 1.0 */ public static native double expm1(double d); /** * Returns the double conversion of the most positive (closest to * positive infinity) integer value which is less than the argument. * <p> * Special cases: * <ul> * <li>{@code floor(+0.0) = +0.0}</li> * <li>{@code floor(-0.0) = -0.0}</li> * <li>{@code floor(+infinity) = +infinity}</li> * <li>{@code floor(-infinity) = -infinity}</li> * <li>{@code floor(NaN) = NaN}</li> * </ul> * </p> * * @param d the value whose closest integer value has to be computed. * @return the floor of the argument. * @since Android 1.0 */ public static native double floor(double d); /** * Returns {@code sqrt(}<i>{@code x}</i><sup>{@code 2}</sup>{@code +} * <i> {@code y}</i><sup>{@code 2}</sup>{@code )}. The final result is * without medium underflow or overflow. * <p> * Special cases: * <ul> * <li>{@code hypot(+infinity, (anything including NaN)) = +infinity}</li> * <li>{@code hypot(-infinity, (anything including NaN)) = +infinity}</li> * <li>{@code hypot((anything including NaN), +infinity) = +infinity}</li> * <li>{@code hypot((anything including NaN), -infinity) = +infinity}</li> * <li>{@code hypot(NaN, NaN) = NaN}</li> * </ul> * </p> * * @param x * a double number. * @param y * a double number. * @return the {@code sqrt(}<i>{@code x}</i><sup>{@code 2}</sup>{@code +} * <i> {@code y}</i><sup>{@code 2}</sup>{@code )} value of the * arguments. * @since Android 1.0 */ public static native double hypot(double x, double y); /** * Returns the remainder of dividing {@code x} by {@code y} using the IEEE * 754 rules. The result is {@code x-round(x/p)*p} where {@code round(x/p)} * is the nearest integer (rounded to even), but without numerical * cancellation problems. * <p> * Special cases: * <ul> * <li>{@code IEEEremainder((anything), 0) = NaN}</li> * <li>{@code IEEEremainder(+infinity, (anything)) = NaN}</li> * <li>{@code IEEEremainder(-infinity, (anything)) = NaN}</li> * <li>{@code IEEEremainder(NaN, (anything)) = NaN}</li> * <li>{@code IEEEremainder((anything), NaN) = NaN}</li> * <li>{@code IEEEremainder(x, +infinity) = x } where x is anything but * +/-infinity</li> * <li>{@code IEEEremainder(x, -infinity) = x } where x is anything but * +/-infinity</li> * </ul> * </p> * * @param x * the numerator of the operation. * @param y * the denominator of the operation. * @return the IEEE754 floating point reminder of of {@code x/y}. * @since Android 1.0 */ public static native double IEEEremainder(double x, double y); // BEGIN android-note // parameter names changed from d1 / d2 to x / y // END android-note /** * Returns the closest double approximation of the natural logarithm of the * argument. * <p> * Special cases: * <ul> * <li>{@code log(+0.0) = -infinity}</li> * <li>{@code log(-0.0) = -infinity}</li> * <li>{@code log((anything < 0) = NaN}</li> * <li>{@code log(+infinity) = +infinity}</li> * <li>{@code log(-infinity) = NaN}</li> * <li>{@code log(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose log has to be computed. * @return the natural logarithm of the argument. * @since Android 1.0 */ public static native double log(double d); /** * Returns the closest double approximation of the base 10 logarithm of the * argument. * <p> * Special cases: * <ul> * <li>{@code log10(+0.0) = -infinity}</li> * <li>{@code log10(-0.0) = -infinity}</li> * <li>{@code log10((anything < 0) = NaN}</li> * <li>{@code log10(+infinity) = +infinity}</li> * <li>{@code log10(-infinity) = NaN}</li> * <li>{@code log10(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose base 10 log has to be computed. * @return the natural logarithm of the argument. * @since Android 1.0 */ public static native double log10(double d); /** * Returns the closest double approximation of the natural logarithm of the * sum of the argument and 1. If the argument is very close to 0, it is much * more accurate to use {@code log1p(d)} than {@code log(1.0+d)} (due to * numerical cancellation). * <p> * Special cases: * <ul> * <li>{@code log1p(+0.0) = +0.0}</li> * <li>{@code log1p(-0.0) = -0.0}</li> * <li>{@code log1p((anything < 1)) = NaN}</li> * <li>{@code log1p(-1.0) = -infinity}</li> * <li>{@code log1p(+infinity) = +infinity}</li> * <li>{@code log1p(-infinity) = NaN}</li> * <li>{@code log1p(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value to compute the {@code ln(1+d)} of. * @return the natural logarithm of the sum of the argument and 1. * @since Android 1.0 */ public static native double log1p(double d); /** * Returns the most positive (closest to positive infinity) of the two * arguments. * <p> * Special cases: * <ul> * <li>{@code max(NaN, (anything)) = NaN}</li> * <li>{@code max((anything), NaN) = NaN}</li> * <li>{@code max(+0.0, -0.0) = +0.0}</li> * <li>{@code max(-0.0, +0.0) = +0.0}</li> * </ul> * </p> * * @param d1 * the first argument. * @param d2 * the second argument. * @return the larger of {@code d1} and {@code d2}. * @since Android 1.0 */ public static double max(double d1, double d2) { if (d1 > d2) return d1; if (d1 < d2) return d2; /* if either arg is NaN, return NaN */ if (d1 != d2) return Double.NaN; /* max( +0.0,-0.0) == +0.0 */ if (d1 == 0.0 && ((Double.doubleToLongBits(d1) & Double.doubleToLongBits(d2)) & 0x8000000000000000L) == 0) return 0.0; return d1; } /** * Returns the most positive (closest to positive infinity) of the two * arguments. * <p> * Special cases: * <ul> * <li>{@code max(NaN, (anything)) = NaN}</li> * <li>{@code max((anything), NaN) = NaN}</li> * <li>{@code max(+0.0, -0.0) = +0.0}</li> * <li>{@code max(-0.0, +0.0) = +0.0}</li> * </ul> * </p> * * @param f1 * the first argument. * @param f2 * the second argument. * @return the larger of {@code f1} and {@code f2}. * @since Android 1.0 */ public static float max(float f1, float f2) { if (f1 > f2) return f1; if (f1 < f2) return f2; /* if either arg is NaN, return NaN */ if (f1 != f2) return Float.NaN; /* max( +0.0,-0.0) == +0.0 */ if (f1 == 0.0f && ((Float.floatToIntBits(f1) & Float.floatToIntBits(f2)) & 0x80000000) == 0) return 0.0f; return f1; } /** * Returns the most positive (closest to positive infinity) of the two * arguments. * * @param i1 * the first argument. * @param i2 * the second argument. * @return the larger of {@code i1} and {@code i2}. * @since Android 1.0 */ public static int max(int i1, int i2) { return i1 > i2 ? i1 : i2; } /** * Returns the most positive (closest to positive infinity) of the two * arguments. * * @param l1 * the first argument. * @param l2 * the second argument. * @return the larger of {@code l1} and {@code l2}. * @since Android 1.0 */ public static long max(long l1, long l2) { return l1 > l2 ? l1 : l2; } /** * Returns the most negative (closest to negative infinity) of the two * arguments. * <p> * Special cases: * <ul> * <li>{@code min(NaN, (anything)) = NaN}</li> * <li>{@code min((anything), NaN) = NaN}</li> * <li>{@code min(+0.0, -0.0) = -0.0}</li> * <li>{@code min(-0.0, +0.0) = -0.0}</li> * </ul> * </p> * * @param d1 * the first argument. * @param d2 * the second argument. * @return the smaller of {@code d1} and {@code d2}. * @since Android 1.0 */ public static double min(double d1, double d2) { if (d1 > d2) return d2; if (d1 < d2) return d1; /* if either arg is NaN, return NaN */ if (d1 != d2) return Double.NaN; /* min( +0.0,-0.0) == -0.0 */ if (d1 == 0.0 && ((Double.doubleToLongBits(d1) | Double.doubleToLongBits(d2)) & 0x8000000000000000l) != 0) return 0.0 * (-1.0); return d1; } /** * Returns the most negative (closest to negative infinity) of the two * arguments. * <p> * Special cases: * <ul> * <li>{@code min(NaN, (anything)) = NaN}</li> * <li>{@code min((anything), NaN) = NaN}</li> * <li>{@code min(+0.0, -0.0) = -0.0}</li> * <li>{@code min(-0.0, +0.0) = -0.0}</li> * </ul> * </p> * * @param f1 * the first argument. * @param f2 * the second argument. * @return the smaller of {@code f1} and {@code f2}. * @since Android 1.0 */ public static float min(float f1, float f2) { if (f1 > f2) return f2; if (f1 < f2) return f1; /* if either arg is NaN, return NaN */ if (f1 != f2) return Float.NaN; /* min( +0.0,-0.0) == -0.0 */ if (f1 == 0.0f && ((Float.floatToIntBits(f1) | Float.floatToIntBits(f2)) & 0x80000000) != 0) return 0.0f * (-1.0f); return f1; } /** * Returns the most negative (closest to negative infinity) of the two * arguments. * * @param i1 * the first argument. * @param i2 * the second argument. * @return the smaller of {@code i1} and {@code i2}. * @since Android 1.0 */ public static int min(int i1, int i2) { return i1 < i2 ? i1 : i2; } /** * Returns the most negative (closest to negative infinity) of the two * arguments. * * @param l1 * the first argument. * @param l2 * the second argument. * @return the smaller of {@code l1} and {@code l2}. * @since Android 1.0 */ public static long min(long l1, long l2) { return l1 < l2 ? l1 : l2; } /** * Returns the closest double approximation of the result of raising * {@code x} to the power of {@code y}. * <p> * Special cases: * <ul> * <li>{@code pow((anything), +0.0) = 1.0}</li> * <li>{@code pow((anything), -0.0) = 1.0}</li> * <li>{@code pow(x, 1.0) = x}</li> * <li>{@code pow((anything), NaN) = NaN}</li> * <li>{@code pow(NaN, (anything except 0)) = NaN}</li> * <li>{@code pow(+/-(|x| > 1), +infinity) = +infinity}</li> * <li>{@code pow(+/-(|x| > 1), -infinity) = +0.0}</li> * <li>{@code pow(+/-(|x| < 1), +infinity) = +0.0}</li> * <li>{@code pow(+/-(|x| < 1), -infinity) = +infinity}</li> * <li>{@code pow(+/-1.0 , +infinity) = NaN}</li> * <li>{@code pow(+/-1.0 , -infinity) = NaN}</li> * <li>{@code pow(+0.0, (+anything except 0, NaN)) = +0.0}</li> * <li>{@code pow(-0.0, (+anything except 0, NaN, odd integer)) = +0.0}</li> * <li>{@code pow(+0.0, (-anything except 0, NaN)) = +infinity}</li> * <li>{@code pow(-0.0, (-anything except 0, NAN, odd integer))} {@code =} * {@code +infinity}</li> * <li>{@code pow(-0.0, (odd integer)) = -pow( +0 , (odd integer) )}</li> * <li>{@code pow(+infinity, (+anything except 0, NaN)) = +infinity}</li> * <li>{@code pow(+infinity, (-anything except 0, NaN)) = +0.0}</li> * <li>{@code pow(-infinity, (anything)) = -pow(0, (-anything))}</li> * <li>{@code pow((-anything), (integer))} {@code =} * {@code pow(-1,(integer))*pow(+anything,integer)}</li> * <li>{@code pow((-anything except 0 and infinity), (non-integer))} * {@code =} {@code NAN}</li> * </ul> * </p> * * @param x * the base of the operation. * @param y * the exponent of the operation. * @return {@code x} to the power of {@code y}. * @since Android 1.0 */ public static native double pow(double x, double y); // BEGIN android-note // parameter names changed from d1 / d2 to x / y // END android-note /** * Returns a pseudo-random number between 0.0 (inclusive) and 1.0 * (exclusive). * * @return a pseudo-random number. * @since Android 1.0 */ public static double random() { // BEGIN android-changed if (random == null) { random = new java.util.Random(); } // END android-changed return random.nextDouble(); } /** * Returns the double conversion of the result of rounding the argument to * an integer. Tie breaks are rounded towards even. * <p> * Special cases: * <ul> * <li>{@code rint(+0.0) = +0.0}</li> * <li>{@code rint(-0.0) = -0.0}</li> * <li>{@code rint(+infinity) = +infinity}</li> * <li>{@code rint(-infinity) = -infinity}</li> * <li>{@code rint(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value to be rounded. * @return the closest integer to the argument (as a double). * @since Android 1.0 */ public static native double rint(double d); /** * Returns the result of rounding the argument to an integer. The result is * equivalent to {@code (long) Math.floor(d+0.5)}. * <p> * Special cases: * <ul> * <li>{@code round(+0.0) = +0.0}</li> * <li>{@code round(-0.0) = +0.0}</li> * <li>{@code round((anything > Long.MAX_VALUE) = Long.MAX_VALUE}</li> * <li>{@code round((anything < Long.MIN_VALUE) = Long.MIN_VALUE}</li> * <li>{@code round(+infinity) = Long.MAX_VALUE}</li> * <li>{@code round(-infinity) = Long.MIN_VALUE}</li> * <li>{@code round(NaN) = +0.0}</li> * </ul> * </p> * * @param d * the value to be rounded. * @return the closest integer to the argument. * @since Android 1.0 */ public static long round(double d) { // check for NaN if (d != d) return 0L; return (long) Math.floor(d + 0.5d); } /** * Returns the result of rounding the argument to an integer. The result is * equivalent to {@code (int) Math.floor(f+0.5)}. * <p> * Special cases: * <ul> * <li>{@code round(+0.0) = +0.0}</li> * <li>{@code round(-0.0) = +0.0}</li> * <li>{@code round((anything > Integer.MAX_VALUE) = Integer.MAX_VALUE}</li> * <li>{@code round((anything < Integer.MIN_VALUE) = Integer.MIN_VALUE}</li> * <li>{@code round(+infinity) = Integer.MAX_VALUE}</li> * <li>{@code round(-infinity) = Integer.MIN_VALUE}</li> * <li>{@code round(NaN) = +0.0}</li> * </ul> * </p> * * @param f * the value to be rounded. * @return the closest integer to the argument. * @since Android 1.0 */ public static int round(float f) { // check for NaN if (f != f) return 0; return (int) Math.floor(f + 0.5f); } /** * Returns the signum function of the argument. If the argument is less than * zero, it returns -1.0. If the argument is greater than zero, 1.0 is * returned. If the argument is either positive or negative zero, the * argument is returned as result. * <p> * Special cases: * <ul> * <li>{@code signum(+0.0) = +0.0}</li> * <li>{@code signum(-0.0) = -0.0}</li> * <li>{@code signum(+infinity) = +1.0}</li> * <li>{@code signum(-infinity) = -1.0}</li> * <li>{@code signum(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose signum has to be computed. * @return the value of the signum function. * @since Android 1.0 */ public static double signum(double d){ if(Double.isNaN(d)){ return Double.NaN; } double sig = d; if(d > 0){ sig = 1.0; }else if (d < 0){ sig = -1.0; } return sig; } /** * Returns the signum function of the argument. If the argument is less than * zero, it returns -1.0. If the argument is greater than zero, 1.0 is * returned. If the argument is either positive or negative zero, the * argument is returned as result. * <p> * Special cases: * <ul> * <li>{@code signum(+0.0) = +0.0}</li> * <li>{@code signum(-0.0) = -0.0}</li> * <li>{@code signum(+infinity) = +1.0}</li> * <li>{@code signum(-infinity) = -1.0}</li> * <li>{@code signum(NaN) = NaN}</li> * </ul> * </p> * * @param f * the value whose signum has to be computed. * @return the value of the signum function. * @since Android 1.0 */ public static float signum(float f){ if(Float.isNaN(f)){ return Float.NaN; } float sig = f; if(f > 0){ sig = 1.0f; }else if (f < 0){ sig = -1.0f; } return sig; } /** * Returns the closest double approximation of the hyperbolic sine of the * argument. * <p> * Special cases: * <ul> * <li>{@code sinh(+0.0) = +0.0}</li> * <li>{@code sinh(-0.0) = -0.0}</li> * <li>{@code sinh(+infinity) = +infinity}</li> * <li>{@code sinh(-infinity) = -infinity}</li> * <li>{@code sinh(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose hyperbolic sine has to be computed. * @return the hyperbolic sine of the argument. * @since Android 1.0 */ public static native double sinh(double d); /** * Returns the closest double approximation of the sine of the argument. * <p> * Special cases: * <ul> * <li>{@code sin(+0.0) = +0.0}</li> * <li>{@code sin(-0.0) = -0.0}</li> * <li>{@code sin(+infinity) = NaN}</li> * <li>{@code sin(-infinity) = NaN}</li> * <li>{@code sin(NaN) = NaN}</li> * </ul> * </p> * * @param d * the angle whose sin has to be computed, in radians. * @return the sine of the argument. * @since Android 1.0 */ public static native double sin(double d); /** * Returns the closest double approximation of the square root of the * argument. * <p> * Special cases: * <ul> * <li>{@code sqrt(+0.0) = +0.0}</li> * <li>{@code sqrt(-0.0) = -0.0}</li> * <li>{@code sqrt( (anything < 0) ) = NaN}</li> * <li>{@code sqrt(+infinity) = +infinity}</li> * <li>{@code sqrt(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose square root has to be computed. * @return the square root of the argument. * @since Android 1.0 */ public static native double sqrt(double d); /** * Returns the closest double approximation of the tangent of the argument. * <p> * Special cases: * <ul> * <li>{@code tan(+0.0) = +0.0}</li> * <li>{@code tan(-0.0) = -0.0}</li> * <li>{@code tan(+infinity) = NaN}</li> * <li>{@code tan(-infinity) = NaN}</li> * <li>{@code tan(NaN) = NaN}</li> * </ul> * </p> * * @param d * the angle whose tangens has to be computed, in radians. * @return the tangent of the argument. * @since Android 1.0 */ public static native double tan(double d); /** * Returns the closest double approximation of the hyperbolic tangent of the * argument. The absolute value is always less than 1. * <p> * Special cases: * <ul> * <li>{@code tanh(+0.0) = +0.0}</li> * <li>{@code tanh(-0.0) = -0.0}</li> * <li>{@code tanh(+infinity) = +1.0}</li> * <li>{@code tanh(-infinity) = -1.0}</li> * <li>{@code tanh(NaN) = NaN}</li> * </ul> * </p> * * @param d * the value whose hyperbolic tangent has to be computed. * @return the hyperbolic tangent of the argument * @since Android 1.0 */ public static native double tanh(double d); /** * Returns the measure in degrees of the supplied radian angle. The result * is {@code angrad * 180 / pi}. * <p> * Special cases: * <ul> * <li>{@code toDegrees(+0.0) = +0.0}</li> * <li>{@code toDegrees(-0.0) = -0.0}</li> * <li>{@code toDegrees(+infinity) = +infinity}</li> * <li>{@code toDegrees(-infinity) = -infinity}</li> * <li>{@code toDegrees(NaN) = NaN}</li> * </ul> * </p> * * @param angrad * an angle in radians. * @return the degree measure of the angle. * @since Android 1.0 */ public static double toDegrees(double angrad) { return angrad * 180d / PI; } /** * Returns the measure in radians of the supplied degree angle. The result * is {@code angdeg / 180 * pi}. * <p> * Special cases: * <ul> * <li>{@code toRadians(+0.0) = +0.0}</li> * <li>{@code toRadians(-0.0) = -0.0}</li> * <li>{@code toRadians(+infinity) = +infinity}</li> * <li>{@code toRadians(-infinity) = -infinity}</li> * <li>{@code toRadians(NaN) = NaN}</li> * </ul> * </p> * * @param angdeg * an angle in degrees. * @return the radian measure of the angle. * @since Android 1.0 */ public static double toRadians(double angdeg) { return angdeg / 180d * PI; } /** * Returns the argument's ulp (unit in the last place). The size of a ulp of * a double value is the positive distance between this value and the double * value next larger in magnitude. For non-NaN {@code x}, * {@code ulp(-x) == ulp(x)}. * <p> * Special cases: * <ul> * <li>{@code ulp(+0.0) = Double.MIN_VALUE}</li> * <li>{@code ulp(-0.0) = Double.MIN_VALUE}</li> * <li>{@code ulp(+infintiy) = infinity}</li> * <li>{@code ulp(-infintiy) = infinity}</li> * <li>{@code ulp(NaN) = NaN}</li> * </ul> * </p> * * @param d * the floating-point value to compute ulp of. * @return the size of a ulp of the argument. * @since Android 1.0 */ public static double ulp(double d) { // special cases if (Double.isInfinite(d)) { return Double.POSITIVE_INFINITY; } else if (d == Double.MAX_VALUE || d == -Double.MAX_VALUE) { return pow(2, 971); } d = Math.abs(d); return nextafter(d, Double.MAX_VALUE) - d; } /** * Returns the argument's ulp (unit in the last place). The size of a ulp of * a float value is the positive distance between this value and the float * value next larger in magnitude. For non-NaN {@code x}, * {@code ulp(-x) == ulp(x)}. * <p> * Special cases: * <ul> * <li>{@code ulp(+0.0) = Float.MIN_VALUE}</li> * <li>{@code ulp(-0.0) = Float.MIN_VALUE}</li> * <li>{@code ulp(+infintiy) = infinity}</li> * <li>{@code ulp(-infintiy) = infinity}</li> * <li>{@code ulp(NaN) = NaN}</li> * </ul> * </p> * * @param f * the floating-point value to compute ulp of. * @return the size of a ulp of the argument. * @since Android 1.0 */ public static float ulp(float f) { // special cases if (Float.isNaN(f)) { return Float.NaN; } else if (Float.isInfinite(f)) { return Float.POSITIVE_INFINITY; } else if (f == Float.MAX_VALUE || f == -Float.MAX_VALUE) { return (float) pow(2, 104); } f = Math.abs(f); return nextafterf(f, Float.MAX_VALUE) - f; } private native static double nextafter(double x, double y); private native static float nextafterf(float x, float y); }
[ "danny@35g.tw" ]
danny@35g.tw
ad9cb2780e6208c6328fafde72a915bbfaafc29d
09534c278861e04441712475790c08fe0b92f279
/app/src/main/java/com/walktour/gui/newmap/overlay/variable/BaseVariableOverlay.java
3827f7dfea24e5d5c3f8f2ae7e9c54a963aa1bca
[]
no_license
copslock/Walktour4
077eee3500387abd9a8b74727dd3c5727cc11384
46b7e77e2a5e54c4f2a83f23448f7031c8b37537
refs/heads/master
2023-07-17T13:05:58.825418
2019-08-20T07:12:35
2019-08-20T07:12:35
397,678,508
1
0
null
null
null
null
UTF-8
Java
false
false
4,843
java
package com.walktour.gui.newmap.overlay.variable; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import com.walktour.gui.newmap.BaseMapActivity; import com.walktour.gui.newmap.NewMapFactory; import com.walktour.gui.newmap.layer.BaseMapLayer; import com.walktour.gui.newmap.model.MyLatLng; import com.walktour.gui.newmap.overlay.BaseMapOverlay.OverlayType; /** * 可变图层的基础类 * * @author jianchao.wang * */ public abstract class BaseVariableOverlay { /** 画笔 */ protected Paint mPaint; /** 日志标识 */ protected String TAG = ""; /** 所属的界面类 */ protected BaseMapActivity mActivity; /** 地图关联工厂类 */ protected NewMapFactory factory; /** 默认颜色 */ protected int defaultColor = 0xFFFF0000; /** 系统缩放比例 */ protected float systemScale; /** 图片半径 */ protected int overlayRadius; /** 地图图层 */ protected BaseMapLayer mMapLayer; /** 关联的父视图 */ protected View parent; /** 地球半径 */ private static final double EARTH_RADIUS = 6378.137; /** 像素密度 */ protected float mDensity; /** 当前覆盖物类型 */ protected OverlayType mType; public BaseVariableOverlay(BaseMapActivity activity, View parent, BaseMapLayer mapLayer, String tag, OverlayType type) { this.mActivity = activity; this.mMapLayer = mapLayer; this.TAG = tag; this.mType = type; this.parent = parent; this.factory = NewMapFactory.getInstance(); DisplayMetrics metric = new DisplayMetrics(); this.mActivity.getWindowManager().getDefaultDisplay().getMetrics(metric); this.mDensity = metric.density; this.systemScale = metric.densityDpi / 240.f; this.overlayRadius = (int) (25 * systemScale); this.createPaint(); } /** * 生成画笔 */ private void createPaint() { mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setColor(Color.RED); // 设置画笔颜色 mPaint.setStrokeWidth((float) 2.0); // 线宽 } /** * 点击屏幕 * * @param click * 屏幕坐标 * @return 是否当前图层有执行操作 */ protected abstract boolean onClick(Point click); /** * 点击覆盖物 * * @param bundle * 附加信息 * @return 是否当前图层有执行操作 */ public abstract boolean onMarkerClick(Bundle bundle); /** * 长按屏幕 * * @param click * 屏幕坐标 * @return 是否当前图层有执行操作 */ protected abstract boolean onLongClick(Point click); /** * 绘制显示的画布 * * @param canvas * 画布 */ protected abstract void drawCanvas(Canvas canvas); /** * 距离换算<BR> * [功能详细描述] * * @param distance * @return */ protected String distanceConversion(double distance) { String resultString = ""; if (distance < 1) { resultString = (((int) Math.round(distance * 1000 * 10)) / 10.0) + "M"; } else { resultString = ((((int) Math.round(distance * 10))) / 10.0) + "KM"; } return resultString; } /** * 计算两坐标点间距离 * * @param point1 * 坐标点1 * @param point2 * 坐标点2 * @return */ protected double calculateDistance(MyLatLng point1, MyLatLng point2) { double distance = 0.0; double lat1 = point1.latitude; double lat2 = point2.latitude; double lon1 = point1.longitude; double lon2 = point2.longitude; double dLat = (lat2 - lat1) * Math.PI / 180; double dLon = (lon2 - lon1) * Math.PI / 180; double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); distance = (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))) * EARTH_RADIUS; return distance; } /** * 把经纬度转换成界面坐标点 * * @param latitude * 百度经度 * @param longitude * 百度纬度 * * @return 界面坐标点 */ protected Point convertLatlngToPoint(double latitude, double longitude) { return this.mMapLayer.convertLatlngToPoint(latitude, longitude); } /** * 把界面坐标点转换成经纬度 * * @param point * 界面坐标点 * * @return 经纬度 */ protected MyLatLng convertPointToLatlng(Point point) { return this.mMapLayer.convertPointToLatlng(point); } /** * 关闭显示的弹出窗口 */ public abstract void closeShowPopWindow(); /** * 改变当前的地图类型(普通图和卫星图) * */ public abstract void changeMapType(); /** * 销毁对象处理 */ public abstract void onDestroy(); /** * 恢复操作 */ public abstract void onResume(); public OverlayType getType() { return mType; } }
[ "15015912346@163.com" ]
15015912346@163.com
2b6174bd80f221ce2f95f08d5de23ab70eed4506
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/64/org/apache/commons/lang/enums/Enum_toString_621.java
c510c4a00c72b659bd8d1f5bd1fad887b85b43f7
[]
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
4,297
java
org apach common lang enum abstract superclass type safe enum featur program languag lack java enumer implement base int poor open abus origin java recommend jdk constant recognis robust type safe base solut design basic java type safe enumer pattern note due java class loader classload work compar enum object code equal code code code equal method case effect mind enum loader equal code code simpl enum subclass pre color enum colorenum enum color enum colorenum red color enum colorenum red color enum colorenum green color enum colorenum green color enum colorenum blue color enum colorenum blue color enum colorenum string color color color enum colorenum enum getenum string color color enum colorenum enum getenum color enum colorenum color map enum map getenummap enum map getenummap color enum colorenum list enum list getenumlist enum list getenumlist color enum colorenum iter iter iter color enum colorenum pre shown access code getnam code code enum getenum code code iter code method recommend java restrict requir code shown subclass altern choic link enum util enumutil subclass enum hierarchi enum class built superclass unaffect addit subclass normal java subclass add addit enum constant type superclass queri method subclass enum constant superclass subclass pre extra color enum extracolorenum color enum colorenum note color declar chang compil color enum colorenum yellow extra color enum extracolorenum yellow extra color enum extracolorenum string color color color enum colorenum enum getenum string color color enum colorenum enum getenum extra color enum extracolorenum color map enum map getenummap enum map getenummap extra color enum extracolorenum list enum list getenumlist enum list getenumlist extra color enum extracolorenum iter iter iter extra color enum extracolorenum pre red green blue yellow list iter method order red green blue instanc superclass color enum colorenum note yellow declar color enum colorenum extra color enum extracolorenum function enum enum function defin subclass overrid code enum class getenumclass code method pre oper enum operationenum oper plusoper oper plusoper oper enum operationenum oper plusoper eval oper enum operationenum minu minu oper minusoper minu oper minusoper oper enum operationenum minu oper minusoper minu eval oper enum operationenum string color color class enum class getenumclass note method oper enum operationenum eval oper enum operationenum enum getenum string oper enum operationenum enum getenum oper enum operationenum map enum map getenummap enum map getenummap oper enum operationenum list enum list getenumlist enum list getenumlist oper enum operationenum iter iter iter oper enum operationenum pre code work jdk jdk1 subclass defin anonym nest enum care load defin nest enum nest load surround outer load result empti list map iter return solut defin block refer outer constant defin pre outer enum bwenum black enum bwenum black enum bwenum white enum bwenum white nest enum bwenum enum explicitli refer enum bwenum forc constant load object obj outer black method omit pre solv problem recommend solut defin constant hold refer outer pre outer enum bwenum black enum bwenum black enum bwenum white enum bwenum white nest enum bwenum enum defin constant class desir enum bwenum black enum bwenum black enum bwenum white enum bwenum white method omit pre detail nested' 'nested' test case author apach avalon project author stephen colebourn author chri webb author mike bowler author matthia eichel exist version enum compar serializ human readabl descript enum item string form code type code code color red code note strip type string string tostr string itostr string shortnam class util classutil short class getshortclassnam enum class getenumclass string itostr shortnam getnam string itostr
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
83c97da23a57927705ae1a69d588caf504c47b6c
adb6c4ec3d080fa348acf383ff9fa26e3bc9442a
/src/com/runoob/pattern/proxy/ProxyImage.java
6f890882c29f45384c6baf1619b39177e3fcdbdf
[]
no_license
max-hong/design-pattern
0de3bb856fe19f8fab3efd92cc4ffca6f847c930
d8445644085459add0eba648e0ed5f850e5baa1b
refs/heads/master
2021-05-16T09:53:15.447727
2017-10-10T08:29:44
2017-10-10T08:29:44
104,615,568
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package com.runoob.pattern.proxy; public class ProxyImage implements Image { private RealImage realImage; private String fileName; public ProxyImage(String fileName) { this.fileName = fileName; } @Override public void display() { if (realImage == null) { System.out.println("realImage == null"); realImage = new RealImage(fileName); } System.out.println("realImage != null"); realImage.display(); } }
[ "289079931@qq.com" ]
289079931@qq.com
6d1b5a105b595f6d803f27665770d722c3600fe0
84ea2da42ef286fd0c19316d6c5469d57409f7bc
/src/main/java/com/undertree/showcase/jsf2/primefaces/admin/LogbackManagerBean.java
0687b7b5587149a57f690941f88f0d13f4716cdf
[ "Apache-2.0" ]
permissive
ssherwood/jsf-primefaces-demo
5c8ef21c157a80a1d72c8474d648e652a3a99f7d
1fdc879d5ca99f4a7d0e3216f777800ee5aace1e
refs/heads/master
2023-07-21T08:08:32.585883
2022-02-02T18:36:13
2022-02-02T18:36:13
5,286,498
1
1
Apache-2.0
2023-06-20T02:22:10
2012-08-03T14:46:52
Java
UTF-8
Java
false
false
1,580
java
package com.undertree.showcase.jsf2.primefaces.admin; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; @ManagedBean @ViewScoped public class LogbackManagerBean implements Serializable { private static final long serialVersionUID = 20120311L; static final Logger LOG = LoggerFactory.getLogger(LogbackManagerBean.class); private List<ch.qos.logback.classic.Logger> listOfLoggers = new ArrayList<ch.qos.logback.classic.Logger>(); public LogbackManagerBean() { LOG.trace("ManagedBean created {}.", LogbackManagerBean.class); } @PostConstruct public void init() { LOG.trace("@PostConstruct {}", LogbackManagerBean.class); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); listOfLoggers = lc.getLoggerList(); for (ch.qos.logback.classic.Logger log : listOfLoggers) { // } } public List<String> getLevels() { List<String> listOfLevels = new ArrayList<String>(); //listOfLevels.add(Level.DEBUG); listOfLevels.add("DEBUG"); //listOfLevels.add(Level.INFO); //listOfLevels.add(Level.TRACE); return listOfLevels; } public List<ch.qos.logback.classic.Logger> getLoggerList() { LOG.trace("{} -> getLoggerList", LogbackManagerBean.class); return listOfLoggers; } }
[ "shawn.sherwood@gmail.com" ]
shawn.sherwood@gmail.com
2be897b61581605f9c423a7a81e961d2739c9020
fe0b6d0d4c14965808a4b38aa91d0c5cef1f69f6
/languages/activitydiagram/org.gemoc.activitydiagram.sequential.xactivitydiagram/src-gen/org/gemoc/activitydiagram/sequential/xactivitydiagram/aspects/AcceptEventActionAspect.java
f60d5926b9e4053690e7afae0e0d925f26390127
[]
no_license
tetrabox/examples-behavioral-interface
f05b9bf1d3a8414ffc5eef3560f72f3719e09f28
3a5df4b8ec4ed13a39712269487f07d09479ec99
refs/heads/master
2020-12-02T16:23:03.869890
2019-10-22T08:59:20
2019-10-22T08:59:20
96,529,344
0
1
null
null
null
null
UTF-8
Java
false
false
10,239
java
package org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects; import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.AcceptEventAction; import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.ActivityEdge; import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.Event; import com.google.common.base.Objects; import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.ActivitydiagramFactory; import org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.ControlToken; import fr.inria.diverse.k3.al.annotationprocessor.Aspect; import fr.inria.diverse.k3.al.annotationprocessor.OverrideAspectMethod; import fr.inria.diverse.k3.al.annotationprocessor.Step; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.xtext.xbase.lib.IterableExtensions; import org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties; import org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityEdgeAspect; import org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspect; @Aspect(className = AcceptEventAction.class) @SuppressWarnings("all") public class AcceptEventActionAspect extends ActivityNodeAspect { public static void sendOffer(final AcceptEventAction _self, final ControlToken token) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); _privk3_sendOffer(_self_, _self, token); ; } public static boolean canAccept(final AcceptEventAction _self, final Event event) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); Object result = null; result = _privk3_canAccept(_self_, _self, event); ; return (boolean) result; } @Step(eventTriggerable = true, precondition = "canAccept") public static void accept(final AcceptEventAction _self, final Event event) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() { @Override public void execute() { _privk3_accept(_self_, _self, event); } }; fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager manager = fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry .getInstance().findStepManager(_self); if (manager != null) { manager.executeStep(_self, command, "AcceptEventAction", "accept"); } else { fr.inria.diverse.event.commons.model.IEventManager eventManager = fr.inria.diverse.event.commons.model.EventManagerRegistry .getInstance().findEventManager(); if (eventManager != null) { eventManager.manageEvents(); } command.execute(); } ; ; } @Step public static void waitForEvent(final AcceptEventAction _self) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() { @Override public void execute() { _privk3_waitForEvent(_self_, _self); } }; fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager manager = fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry .getInstance().findStepManager(_self); if (manager != null) { manager.executeStep(_self, command, "AcceptEventAction", "waitForEvent"); } else { fr.inria.diverse.event.commons.model.IEventManager eventManager = fr.inria.diverse.event.commons.model.EventManagerRegistry .getInstance().findEventManager(); if (eventManager != null) { eventManager.manageEvents(); } command.execute(); } ; ; } @OverrideAspectMethod @Step public static void execute(final AcceptEventAction _self) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() { @Override public void execute() { _privk3_execute(_self_, _self); } }; fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager manager = fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry .getInstance().findStepManager(_self); if (manager != null) { manager.executeStep(_self, command, "AcceptEventAction", "execute"); } else { fr.inria.diverse.event.commons.model.IEventManager eventManager = fr.inria.diverse.event.commons.model.EventManagerRegistry .getInstance().findEventManager(); if (eventManager != null) { eventManager.manageEvents(); } command.execute(); } ; ; } @OverrideAspectMethod public static boolean hasOffers(final AcceptEventAction _self) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.AcceptEventActionAspectAcceptEventActionAspectContext .getSelf(_self); Object result = null; result = _privk3_hasOffers(_self_, _self); ; return (boolean) result; } protected static void _privk3_sendOffer(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self, final ControlToken token) { ActivityEdge _outgoing = _self.getOutgoing(); ActivityEdgeAspect.sendOffer(_outgoing, token); } protected static boolean _privk3_canAccept(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self, final Event event) { return (Objects.equal(_self.getIncoming(), null) || (!ActivityEdgeAspect.offeredTokens(_self.getIncoming()).isEmpty())); } protected static void _privk3_accept(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self, final Event event) { Event _eventType = _self.getEventType(); EClass _eClass = _eventType.eClass(); EClass _eClass_1 = event.eClass(); boolean _equals = Objects.equal(_eClass, _eClass_1); if (_equals) { ActivityEdge _incoming = _self.getIncoming(); boolean _equals_1 = Objects.equal(_incoming, null); if (_equals_1) { ControlToken t = ActivitydiagramFactory.eINSTANCE.createControlToken(); ActivityNodeAspect.addToken(_self, t); } else { ActivityEdge _incoming_1 = _self.getIncoming(); EList<ControlToken> _offeredTokens = ActivityEdgeAspect.offeredTokens(_incoming_1); final ControlToken token = IterableExtensions.<ControlToken>head(_offeredTokens); boolean _notEquals = (!Objects.equal(token, null)); if (_notEquals) { ActivityNodeAspect.addToken(_self, token); } } } } protected static void _privk3_waitForEvent(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self) { } private static void super_execute(final AcceptEventAction _self) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspectActivityNodeAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspectActivityNodeAspectContext.getSelf(_self); org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspect._privk3_execute(_self_, _self); } protected static void _privk3_execute(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self) { ActivityEdge _incoming = _self.getIncoming(); boolean _notEquals = (!Objects.equal(_incoming, null)); if (_notEquals) { while (ActivityNodeAspect.heldTokens(_self).isEmpty()) { AcceptEventActionAspect.waitForEvent(_self); } EList<ControlToken> _heldTokens = ActivityNodeAspect.heldTokens(_self); ControlToken _head = IterableExtensions.<ControlToken>head(_heldTokens); AcceptEventActionAspect.sendOffer(_self, _head); } else { EList<ControlToken> _heldTokens_1 = ActivityNodeAspect.heldTokens(_self); boolean _isEmpty = _heldTokens_1.isEmpty(); boolean _not = (!_isEmpty); if (_not) { EList<ControlToken> _heldTokens_2 = ActivityNodeAspect.heldTokens(_self); ControlToken _head_1 = IterableExtensions.<ControlToken>head(_heldTokens_2); AcceptEventActionAspect.sendOffer(_self, _head_1); } } } private static boolean super_hasOffers(final AcceptEventAction _self) { final org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspectActivityNodeAspectProperties _self_ = org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspectActivityNodeAspectContext.getSelf(_self); return org.gemoc.activitydiagram.sequential.xactivitydiagram.aspects.ActivityNodeAspect._privk3_hasOffers(_self_, _self); } protected static boolean _privk3_hasOffers(final AcceptEventActionAspectAcceptEventActionAspectProperties _self_, final AcceptEventAction _self) { return ((!Objects.equal(_self.getIncoming(), null)) && (!ActivityEdgeAspect.offeredTokens(_self.getIncoming()).isEmpty())); } }
[ "dorian.leroy@irisa.fr" ]
dorian.leroy@irisa.fr
181380adc35d54141c4790cad241a24d5e474890
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/account/security/ui/SecurityAccountIntroUI.java
2cde6dcf6269e852ee5c5a08f1b54e44c44e5dc6
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,209
java
package com.tencent.mm.plugin.account.security.ui; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; import android.view.MenuItem; import android.view.MenuItem.OnMenuItemClickListener; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.R; import com.tencent.mm.ai.f; import com.tencent.mm.ai.m; import com.tencent.mm.kernel.g; import com.tencent.mm.plugin.account.friend.a.x; import com.tencent.mm.plugin.b.a; import com.tencent.mm.protocal.GeneralControlWrapper; import com.tencent.mm.protocal.JsapiPermissionWrapper; import com.tencent.mm.protocal.protobuf.jp; import com.tencent.mm.sdk.platformtools.aa; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.sdk.platformtools.ah; import com.tencent.mm.sdk.platformtools.bo; import com.tencent.mm.sdk.platformtools.br; import com.tencent.mm.ui.MMWizardActivity; import com.tencent.mm.ui.base.h; import java.util.Map; public class SecurityAccountIntroUI extends MMWizardActivity implements f { private String cFl; private ProgressDialog ehJ = null; private String gsF; private String gzO; private String gzP; private boolean gzQ = false; private Button gzR; private String jumpUrl; public void onWindowFocusChanged(boolean z) { super.onWindowFocusChanged(z); AppMethodBeat.at(this, z); } static /* synthetic */ void e(SecurityAccountIntroUI securityAccountIntroUI) { AppMethodBeat.i(69914); securityAccountIntroUI.aoZ(); AppMethodBeat.o(69914); } public final int getLayoutId() { return R.layout.aq8; } public void onCreate(Bundle bundle) { AppMethodBeat.i(69907); super.onCreate(bundle); this.gzO = getIntent().getStringExtra("auth_ticket"); this.cFl = getIntent().getStringExtra("binded_mobile"); this.gzQ = getIntent().getBooleanExtra("re_open_verify", false); String stringExtra = getIntent().getStringExtra("close_safe_device_style"); ab.i("MicroMsg.SecurityAccountIntroUI", "summerphone authTicket[%s], showStyle[%s]", bo.anv(this.gzO), stringExtra); if (!bo.isNullOrNil(stringExtra)) { Map z = br.z(stringExtra, "wording"); if (z != null) { this.gzP = (String) z.get(".wording.title"); this.jumpUrl = (String) z.get(".wording.url"); ab.i("MicroMsg.SecurityAccountIntroUI", "summerphone closeBtnText[%s], jumpUrl[%s]", this.gzP, this.jumpUrl); } } this.gsF = a.FP(); initView(); AppMethodBeat.o(69907); } public void onResume() { AppMethodBeat.i(69908); super.onResume(); g.Rg().a(145, (f) this); g.Rg().a(132, (f) this); if (!this.gzQ) { StringBuilder stringBuilder = new StringBuilder(); g.RN(); stringBuilder = stringBuilder.append(com.tencent.mm.kernel.a.Rb()).append(",").append(getClass().getName()).append(",L600_100,"); g.RN(); a.f(true, stringBuilder.append(com.tencent.mm.kernel.a.lF("L600_100")).append(",1").toString()); a.wz("L600_100"); } AppMethodBeat.o(69908); } public void onPause() { AppMethodBeat.i(69909); super.onPause(); g.Rg().b(145, (f) this); g.Rg().b(132, (f) this); if (!this.gzQ) { StringBuilder stringBuilder = new StringBuilder(); g.RN(); stringBuilder = stringBuilder.append(com.tencent.mm.kernel.a.Rb()).append(",").append(getClass().getName()).append(",L600_100,"); g.RN(); a.f(false, stringBuilder.append(com.tencent.mm.kernel.a.lF("L600_100")).append(",2").toString()); } AppMethodBeat.o(69909); } public boolean onKeyDown(int i, KeyEvent keyEvent) { AppMethodBeat.i(69910); if (keyEvent.getKeyCode() == 4 && keyEvent.getRepeatCount() == 0) { aoZ(); AppMethodBeat.o(69910); return true; } boolean onKeyDown = super.onKeyDown(i, keyEvent); AppMethodBeat.o(69910); return onKeyDown; } public final void initView() { AppMethodBeat.i(69911); setMMTitle((int) R.string.dws); findViewById(R.id.e7b).setOnClickListener(new OnClickListener() { public final void onClick(View view) { m xVar; AppMethodBeat.i(69904); if (SecurityAccountIntroUI.this.gzQ) { xVar = new x(SecurityAccountIntroUI.this.cFl, 10, "", 0, ""); } else { xVar = new com.tencent.mm.modelfriend.a(SecurityAccountIntroUI.this.cFl, 10, "", "", SecurityAccountIntroUI.this.gzO); } g.Rg().a(xVar, 0); SecurityAccountIntroUI securityAccountIntroUI = SecurityAccountIntroUI.this; Context context = SecurityAccountIntroUI.this; SecurityAccountIntroUI.this.getString(R.string.tz); securityAccountIntroUI.ehJ = h.b(context, SecurityAccountIntroUI.this.getString(R.string.dwo), true, new OnCancelListener() { public final void onCancel(DialogInterface dialogInterface) { AppMethodBeat.i(69903); g.Rg().c(xVar); AppMethodBeat.o(69903); } }); AppMethodBeat.o(69904); } }); if (!this.gzQ) { this.gzR = (Button) findViewById(R.id.e7c); if (!bo.isNullOrNil(this.gzP)) { this.gzR.setText(this.gzP); } this.gzR.setVisibility(0); this.gzR.setOnClickListener(new OnClickListener() { public final void onClick(View view) { AppMethodBeat.i(69905); String g = aa.g(SecurityAccountIntroUI.this.getSharedPreferences(ah.doA(), 0)); Intent intent = new Intent(); if (bo.isNullOrNil(SecurityAccountIntroUI.this.jumpUrl)) { intent.putExtra("rawUrl", String.format("https://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?lang=%s&t=w_unprotect&step=1&f=Android", new Object[]{g})); } else { intent.putExtra("rawUrl", SecurityAccountIntroUI.this.jumpUrl); } intent.putExtra("useJs", true); intent.putExtra("vertical_scroll", true); intent.putExtra("title", SecurityAccountIntroUI.this.getString(R.string.dwj)); intent.putExtra("show_bottom", false); intent.putExtra("showShare", false); intent.putExtra("neverGetA8Key", true); intent.putExtra("hardcode_jspermission", JsapiPermissionWrapper.vxI); intent.putExtra("hardcode_general_ctrl", GeneralControlWrapper.vxE); com.tencent.mm.plugin.account.a.a.gkE.i(intent, SecurityAccountIntroUI.this); AppMethodBeat.o(69905); } }); } setBackBtn(new OnMenuItemClickListener() { public final boolean onMenuItemClick(MenuItem menuItem) { AppMethodBeat.i(69906); SecurityAccountIntroUI.e(SecurityAccountIntroUI.this); AppMethodBeat.o(69906); return true; } }); AppMethodBeat.o(69911); } private void aoZ() { AppMethodBeat.i(69912); a.wA(this.gsF); cancel(); Ni(1); AppMethodBeat.o(69912); } public void onSceneEnd(int i, int i2, String str, m mVar) { AppMethodBeat.i(69913); if (this.ehJ != null && this.ehJ.isShowing()) { this.ehJ.dismiss(); this.ehJ = null; } if (i == 0 && i2 == 0) { String str2; if (this.gzQ) { str2 = ((jp) ((x) mVar).ehh.fsH.fsP).vHS; } else { str2 = ((com.tencent.mm.modelfriend.a) mVar).agh(); } ab.d("MicroMsg.SecurityAccountIntroUI", "duanyi test authTicket_login = " + this.gzO + "duanyi test authTicket_check = " + str2); Intent intent = new Intent(this, SecurityAccountVerifyUI.class); intent.putExtra("auth_ticket", str2); intent.putExtra("binded_mobile", this.cFl); intent.putExtra("re_open_verify", this.gzQ); intent.putExtra("from_source", getIntent().getIntExtra("from_source", 1)); MMWizardActivity.J(this, intent); if (getIntent().getIntExtra("from_source", 1) == 3) { finish(); } AppMethodBeat.o(69913); return; } int i3; switch (i2) { case -74: h.a((Context) this, (int) R.string.a6g, (int) R.string.tz, null); i3 = 1; break; case -57: case -1: Toast.makeText(this, R.string.ps, 0).show(); i3 = 1; break; case -41: Toast.makeText(this, R.string.a6j, 0).show(); i3 = 1; break; case -34: Toast.makeText(this, R.string.a6k, 0).show(); i3 = 1; break; default: i3 = 0; break; } if (i3 != 0 || com.tencent.mm.plugin.account.a.a.gkF.a((Context) this, i, i2, str)) { AppMethodBeat.o(69913); return; } Toast.makeText(this, getString(R.string.dwm, new Object[]{Integer.valueOf(i), Integer.valueOf(i2)}), 0).show(); AppMethodBeat.o(69913); } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
e54a4be1a1e85a84580c6ad8d8926dab99492874
f9e1088dfb24f91f5a4fd0b1d3b688c34c302c1e
/app/src/main/java/app/jugadfunda/home/pojo/QueryListPojo.java
77b789926f84236e5cc8864e6ca36839cfd8cb3e
[]
no_license
sudhakar048/jugadfunda
256ad11a7d8cb1660ace4071a83605640357cfe3
478ae2f5dbb609da2ef4ab18ae0982e18230fe79
refs/heads/master
2023-04-16T21:44:47.634909
2021-04-27T05:37:46
2021-04-27T05:37:46
296,311,688
0
0
null
null
null
null
UTF-8
Java
false
false
5,152
java
package app.jugadfunda.home.pojo; import java.io.Serializable; import java.util.ArrayList; public class QueryListPojo implements Comparable<QueryListPojo>, Serializable { private long queryid; private String date; private String sessiondate; private String query; private long courseid; private long moduleid; private int rating; private String modulename; private String coursename; private int resolvedbyuser; private int resolvedbyadmin; private ArrayList<SubModulePojo> submodules; private String submodulename; public QueryListPojo(long queryid, String date, String sessiondate, String query, long courseid, long moduleid, int rating, String modulename, String coursename, int resolvedbyuser, int resolvedbyadmin, ArrayList<SubModulePojo> submodules) { this.queryid = queryid; this.date = date; this.sessiondate = sessiondate; this.query = query; this.courseid = courseid; this.moduleid = moduleid; this.rating = rating; this.modulename = modulename; this.coursename = coursename; this.resolvedbyuser = resolvedbyuser; this.resolvedbyadmin = resolvedbyadmin; this.submodules = submodules; } public QueryListPojo(long queryid, String date, String sessiondate, String query, long courseid, long moduleid, int rating, int resolvedbyuser, int resolvedbyadmin) { this.queryid = queryid; this.date = date; this.sessiondate = sessiondate; this.query = query; this.courseid = courseid; this.moduleid = moduleid; this.rating = rating; this.resolvedbyuser = resolvedbyuser; this.resolvedbyadmin = resolvedbyadmin; } public QueryListPojo(long queryid, String date, String query, int rating, String modulename, String coursename, String submodulename) { this.queryid = queryid; this.date = date; this.query = query; this.rating = rating; this.modulename = modulename; this.coursename = coursename; this.submodulename = submodulename; } public String getSubmodulename() { return submodulename; } public void setSubmodulename(String submodulename) { this.submodulename = submodulename; } public long getQueryid() { return queryid; } public void setQueryid(long queryid) { this.queryid = queryid; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getSessiondate() { return sessiondate; } public void setSessiondate(String sessiondate) { this.sessiondate = sessiondate; } public String getQuery() { return query; } public void setQuery(String query) { this.query = query; } public long getCourseid() { return courseid; } public void setCourseid(long courseid) { this.courseid = courseid; } public long getModuleid() { return moduleid; } public void setModuleid(long moduleid) { this.moduleid = moduleid; } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } public String getModulename() { return modulename; } public void setModulename(String modulename) { this.modulename = modulename; } public String getCoursename() { return coursename; } public void setCoursename(String coursename) { this.coursename = coursename; } public int getResolvedbyuser() { return resolvedbyuser; } public void setResolvedbyuser(int resolvedbyuser) { this.resolvedbyuser = resolvedbyuser; } public int getResolvedbyadmin() { return resolvedbyadmin; } public void setResolvedbyadmin(int resolvedbyadmin) { this.resolvedbyadmin = resolvedbyadmin; } public ArrayList<SubModulePojo> getSubmodules() { return submodules; } public void setSubmodules(ArrayList<SubModulePojo> submodules) { this.submodules = submodules; } @Override public String toString() { return "QueryListPojo{" + "queryid=" + queryid + ", date='" + date + '\'' + ", sessiondate='" + sessiondate + '\'' + ", query='" + query + '\'' + ", courseid=" + courseid + ", moduleid=" + moduleid + ", rating=" + rating + ", modulename='" + modulename + '\'' + ", coursename='" + coursename + '\'' + ", resolvedbyuser=" + resolvedbyuser + ", resolvedbyadmin=" + resolvedbyadmin + ", submodules=" + submodules + ", submodulename='" + submodulename + '\'' + '}'; } @Override public int compareTo(QueryListPojo o) { long compareQueryId = o.getQueryid(); return (int) (compareQueryId - queryid); } }
[ "sudhakar.patel@rlard.com" ]
sudhakar.patel@rlard.com
0c138e119ef3e517a945b3aa120481d106ecc490
37c604f0ad62927de23fc841910ee2c3af26a7f4
/app/src/main/java/blp/blp_video_list/Adapter/Data_List_Adapter.java
20ad7d32d0fd58485004245870fc40f01de96cf8
[]
no_license
vishaltarsariya/Display-Youtube-Video-or-Chennel
a3796eb252ab0c72ce6dfaf94c552f0ae355e91a
65d632ff6e30f3415687d8b4b68a148b18722f83
refs/heads/master
2020-03-06T23:00:49.510299
2018-03-28T10:03:46
2018-03-28T10:03:46
127,120,598
0
0
null
null
null
null
UTF-8
Java
false
false
1,933
java
package blp.blp_video_list.Adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.squareup.picasso.Picasso; import java.util.ArrayList; import blp.blp_video_list.R; import blp.blp_video_list.row_list.data_list; /** * Created by Vishal on 22-11-2017. */ public class Data_List_Adapter extends RecyclerView.Adapter<Data_List_Adapter.ViewHolder> { private Context c; private ArrayList<data_list> ARR_LIST; public Data_List_Adapter(Context c, ArrayList<data_list> ARR_LIST) { this.c = c; this.ARR_LIST = ARR_LIST; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.row_list_item, parent, false); return new ViewHolder(itemView); } @Override public void onBindViewHolder(ViewHolder holder, int position) { holder.TXT_TITLE.setText(ARR_LIST.get(position).getTitle()); holder.TXT_DESE.setText(ARR_LIST.get(position).getDescription()); Picasso.with(c).load(ARR_LIST.get(position).getTumbnail_url()).into(holder.IMG_THUMBNAIL); } @Override public int getItemCount() { return ARR_LIST.size(); } public class ViewHolder extends RecyclerView.ViewHolder { public ImageView IMG_THUMBNAIL; public TextView TXT_TITLE; public TextView TXT_DESE; public ViewHolder(View itemView) { super(itemView); IMG_THUMBNAIL = (ImageView) itemView.findViewById(R.id.img_tumbnail); TXT_TITLE = (TextView) itemView.findViewById(R.id.txt_title); TXT_DESE = (TextView) itemView.findViewById(R.id.txt_desc); } } }
[ "vishal.tarsariya@gmail.com" ]
vishal.tarsariya@gmail.com
38b0dc64fef41db66f70ddc28505ea80cbe2b604
626384844c849689da4324d53c7960f1bc7426f8
/src/com/syntax/class06/Task.java
4b6cb9e58ebc289d69d285c2fcb84358bc91f5b5
[]
no_license
safiyeunal/JavaBatch8
a221d9a4e942e9d2159e23d9aa31304cb51206ec
522759c778e8df02e366bc848e91656c809250f1
refs/heads/main
2022-12-31T08:13:11.059831
2020-10-25T17:03:38
2020-10-25T17:03:38
304,908,949
0
0
null
null
null
null
UTF-8
Java
false
false
2,145
java
package com.syntax.class06; import java.util.Scanner; public class Task { public static void main(String[] args) { // TODO Auto-generated method stub boolean sale; double price; double discount; double finalPrice; Scanner input = new Scanner(System.in); System.out.println("Please tell me if you have sale today"); sale = input.nextBoolean(); if (!sale) { System.out.println("No shopping!! "); } else { System.out.println("Please enter the price"); price = input.nextDouble(); if (price >= 10 && price < 50) { discount = price * 0.1; } else if (price >= 50 && price < 100) { discount = price * 0.2; } else if (price >= 100 && price < 500) { discount = price * 0.4; } else if (price >= 500) { discount = price * 0.5; } else { discount = 0; } finalPrice = price - discount; System.out.println("Your product price is $" + price + " and you get $" + discount + " discount." + " and you pay only " + finalPrice); } System.out.println("-----------------------------------------------------"); if (sale) { System.out.println("Please enter the price"); price = input.nextDouble(); if (price >= 10 && price < 50) { discount = price * 0.1; } else if (price >= 50 && price < 100) { discount = price * 0.2; } else if (price >= 100 && price < 500) { discount = price * 0.4; } else if (price >= 500) { discount = price * 0.5; } else { discount = 0; } finalPrice = price - discount; System.out.println("Your product price is $" + price + " and you get $" + discount + " discount." + " and you pay only " + finalPrice); } else { System.out.println("No shopping!! "); } } }
[ "su.safiyeunal@gmail.com" ]
su.safiyeunal@gmail.com
ecaafe012225874ec682e91912cbc005aeac9d02
e20ae9968bef15e4957c4c5d4578960942b093b8
/src/main/java/com/websocket/netty/NettyServer.java
7ef9b1f763533bebf4f2cadb200a0947f0b8762f
[]
no_license
miaoyf/netty-ws
f93a391dbef9f024e6a13f997f1e66a0a145b989
0a176a51859faf7f3f877d6d6551d1b5cfad2320
refs/heads/master
2020-03-29T02:24:00.200244
2018-09-19T10:38:15
2018-09-19T10:38:15
149,434,410
0
0
null
null
null
null
UTF-8
Java
false
false
2,132
java
package com.websocket.netty; import javax.annotation.PostConstruct; import org.springframework.stereotype.Service; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; /** * ClassName:NettyServer 注解式随spring启动 Function: TODO ADD FUNCTION. * * @author hxy */ @Service public class NettyServer { public static void main(String[] args) { new NettyServer().run(); } @PostConstruct public void initNetty() { new Thread() { public void run() { new NettyServer().run(); } }.start(); } public void run() { System.out.println("===========================Netty端口启动========"); // Boss线程:由这个线程池提供的线程是boss种类的,用于创建、连接、绑定socket, (有点像门卫)然后把这些socket传给worker线程池。 // 在服务器端每个监听的socket都有一个boss线程来处理。在客户端,只有一个boss线程来处理所有的socket。 EventLoopGroup bossGroup = new NioEventLoopGroup(); // Worker线程:Worker线程执行所有的异步I/O,即处理操作 EventLoopGroup workGroup = new NioEventLoopGroup(); try { // ServerBootstrap 启动NIO服务的辅助启动类,负责初始话netty服务器,并且开始监听端口的socket请求 ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workGroup); // 设置非阻塞,用它来建立新accept的连接,用于构造serversocketchannel的工厂类 b.channel(NioServerSocketChannel.class); // ChildChannelHandler 对出入的数据进行的业务操作,其继承ChannelInitializer b.childHandler(new ChildChannelHandler()); System.out.println("服务端开启等待客户端连接 ... ..."); Channel ch = b.bind(7397).sync().channel(); ch.closeFuture().sync(); } catch (Exception e) { e.printStackTrace(); } finally { bossGroup.shutdownGracefully(); workGroup.shutdownGracefully(); } } }
[ "miaoyongfeng@gmail.com" ]
miaoyongfeng@gmail.com
173f19771db276b3717c0b7b741f672e00a90df3
0db469f7f1cea3297b55cc937745a264bd89a7de
/meta/src/test/java/org/jboss/hal/meta/processing/RrdParserTestHelper.java
d55ecebe0089f619bfc135582966bfb0668f549e
[ "MIT", "Apache-2.0" ]
permissive
bmaxwell/console-1
df793c694a814df91821ce316547c30eeee75952
ee5f8f0fcf78645ff2df1bcf944c1fa5e1099018
refs/heads/master
2020-11-26T16:55:39.733526
2019-11-28T16:15:14
2019-11-28T16:15:14
229,145,923
1
0
Apache-2.0
2019-12-19T22:04:05
2019-12-19T22:04:04
null
UTF-8
Java
false
false
13,177
java
/* * Apache License * Version 2.0, January 2004 * https://www.apache.org/licenses/ * * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * * 1. Definitions. * * "License" shall mean the terms and conditions for use, reproduction, * and distribution as defined by Sections 1 through 9 of this document. * * "Licensor" shall mean the copyright owner or entity authorized by * the copyright owner that is granting the License. * * "Legal Entity" shall mean the union of the acting entity and all * other entities that control, are controlled by, or are under common * control with that entity. For the purposes of this definition, * "control" means (i) the power, direct or indirect, to cause the * direction or management of such entity, whether by contract or * otherwise, or (ii) ownership of fifty percent (50%) or more of the * outstanding shares, or (iii) beneficial ownership of such entity. * * "You" (or "Your") shall mean an individual or Legal Entity * exercising permissions granted by this License. * * "Source" form shall mean the preferred form for making modifications, * including but not limited to software source code, documentation * source, and configuration files. * * "Object" form shall mean any form resulting from mechanical * transformation or translation of a Source form, including but * not limited to compiled object code, generated documentation, * and conversions to other media types. * * "Work" shall mean the work of authorship, whether in Source or * Object form, made available under the License, as indicated by a * copyright notice that is included in or attached to the work * (an example is provided in the Appendix below). * * "Derivative Works" shall mean any work, whether in Source or Object * form, that is based on (or derived from) the Work and for which the * editorial revisions, annotations, elaborations, or other modifications * represent, as a whole, an original work of authorship. For the purposes * of this License, Derivative Works shall not include works that remain * separable from, or merely link (or bind by name) to the interfaces of, * the Work and Derivative Works thereof. * * "Contribution" shall mean any work of authorship, including * the original version of the Work and any modifications or additions * to that Work or Derivative Works thereof, that is intentionally * submitted to Licensor for inclusion in the Work by the copyright owner * or by an individual or Legal Entity authorized to submit on behalf of * the copyright owner. For the purposes of this definition, "submitted" * means any form of electronic, verbal, or written communication sent * to the Licensor or its representatives, including but not limited to * communication on electronic mailing lists, source code control systems, * and issue tracking systems that are managed by, or on behalf of, the * Licensor for the purpose of discussing and improving the Work, but * excluding communication that is conspicuously marked or otherwise * designated in writing by the copyright owner as "Not a Contribution." * * "Contributor" shall mean Licensor and any individual or Legal Entity * on behalf of whom a Contribution has been received by Licensor and * subsequently incorporated within the Work. * * 2. Grant of Copyright License. Subject to the terms and conditions of * this License, each Contributor hereby grants to You a perpetual, * worldwide, non-exclusive, no-charge, royalty-free, irrevocable * copyright license to reproduce, prepare Derivative Works of, * publicly display, publicly perform, sublicense, and distribute the * Work and such Derivative Works in Source or Object form. * * 3. Grant of Patent License. Subject to the terms and conditions of * this License, each Contributor hereby grants to You a perpetual, * worldwide, non-exclusive, no-charge, royalty-free, irrevocable * (except as stated in this section) patent license to make, have made, * use, offer to sell, sell, import, and otherwise transfer the Work, * where such license applies only to those patent claims licensable * by such Contributor that are necessarily infringed by their * Contribution(s) alone or by combination of their Contribution(s) * with the Work to which such Contribution(s) was submitted. If You * institute patent litigation against any entity (including a * cross-claim or counterclaim in a lawsuit) alleging that the Work * or a Contribution incorporated within the Work constitutes direct * or contributory patent infringement, then any patent licenses * granted to You under this License for that Work shall terminate * as of the date such litigation is filed. * * 4. Redistribution. You may reproduce and distribute copies of the * Work or Derivative Works thereof in any medium, with or without * modifications, and in Source or Object form, provided that You * meet the following conditions: * * (a) You must give any other recipients of the Work or * Derivative Works a copy of this License; and * * (b) You must cause any modified files to carry prominent notices * stating that You changed the files; and * * (c) You must retain, in the Source form of any Derivative Works * that You distribute, all copyright, patent, trademark, and * attribution notices from the Source form of the Work, * excluding those notices that do not pertain to any part of * the Derivative Works; and * * (d) If the Work includes a "NOTICE" text file as part of its * distribution, then any Derivative Works that You distribute must * include a readable copy of the attribution notices contained * within such NOTICE file, excluding those notices that do not * pertain to any part of the Derivative Works, in at least one * of the following places: within a NOTICE text file distributed * as part of the Derivative Works; within the Source form or * documentation, if provided along with the Derivative Works; or, * within a display generated by the Derivative Works, if and * wherever such third-party notices normally appear. The contents * of the NOTICE file are for informational purposes only and * do not modify the License. You may add Your own attribution * notices within Derivative Works that You distribute, alongside * or as an addendum to the NOTICE text from the Work, provided * that such additional attribution notices cannot be construed * as modifying the License. * * You may add Your own copyright statement to Your modifications and * may provide additional or different license terms and conditions * for use, reproduction, or distribution of Your modifications, or * for any such Derivative Works as a whole, provided Your use, * reproduction, and distribution of the Work otherwise complies with * the conditions stated in this License. * * 5. Submission of Contributions. Unless You explicitly state otherwise, * any Contribution intentionally submitted for inclusion in the Work * by You to the Licensor shall be under the terms and conditions of * this License, without any additional terms or conditions. * Notwithstanding the above, nothing herein shall supersede or modify * the terms of any separate license agreement you may have executed * with Licensor regarding such Contributions. * * 6. Trademarks. This License does not grant permission to use the trade * names, trademarks, service marks, or product names of the Licensor, * except as required for reasonable and customary use in describing the * origin of the Work and reproducing the content of the NOTICE file. * * 7. Disclaimer of Warranty. Unless required by applicable law or * agreed to in writing, Licensor provides the Work (and each * Contributor provides its Contributions) on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied, including, without limitation, any warranties or conditions * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A * PARTICULAR PURPOSE. You are solely responsible for determining the * appropriateness of using or redistributing the Work and assume any * risks associated with Your exercise of permissions under this License. * * 8. Limitation of Liability. In no event and under no legal theory, * whether in tort (including negligence), contract, or otherwise, * unless required by applicable law (such as deliberate and grossly * negligent acts) or agreed to in writing, shall any Contributor be * liable to You for damages, including any direct, indirect, special, * incidental, or consequential damages of any character arising as a * result of this License or out of the use or inability to use the * Work (including but not limited to damages for loss of goodwill, * work stoppage, computer failure or malfunction, or any and all * other commercial damages or losses), even if such Contributor * has been advised of the possibility of such damages. * * 9. Accepting Warranty or Additional Liability. While redistributing * the Work or Derivative Works thereof, You may choose to offer, * and charge a fee for, acceptance of support, warranty, indemnity, * or other liability obligations and/or rights consistent with this * License. However, in accepting such obligations, You may act only * on Your own behalf and on Your sole responsibility, not on behalf * of any other Contributor, and only if You agree to indemnify, * defend, and hold each Contributor harmless for any liability * incurred by, or claims asserted against, such Contributor by reason * of your accepting any such warranty or additional liability. * * END OF TERMS AND CONDITIONS * * APPENDIX: How to apply the Apache License to your work. * * To apply the Apache License to your work, attach the following * boilerplate notice, with the fields enclosed by brackets "{}" * replaced with your own identifying information. (Don't include * the brackets!) The text should be enclosed in the appropriate * comment syntax for the file format. We also recommend that a * file or class name and description of purpose be included on the * same "printed page" as the copyright notice for easier * identification within third-party archives. * * Copyright 2016 JBoss by Red Hat * * 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 org.jboss.hal.meta.processing; import org.jboss.hal.dmr.ResourceAddress; import org.jboss.hal.meta.AddressTemplate; import org.jboss.hal.meta.StatementContext; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @SuppressWarnings("CheckStyle") class RrdParserTestHelper { static void assertResourceDescriptions(RrdResult rrdResult, int size, String... addresses) { assertEquals(size, rrdResult.resourceDescriptions.size()); for (String a : addresses) { ResourceAddress address = AddressTemplate.of(a).resolve(StatementContext.NOOP); assertTrue("RrdResult does not contain resource description for " + a, //NON-NLS rrdResult.containsResourceDescription(address)); } } static void assertSecurityContexts(RrdResult rrdResult, int size, String... addresses) { assertEquals(size, rrdResult.securityContexts.size()); for (String a : addresses) { ResourceAddress address = AddressTemplate.of(a).resolve(StatementContext.NOOP); assertTrue("RrdResult does not contain security context for " + a, //NON-NLS rrdResult.containsSecurityContext(address)); } } }
[ "harald.pehl@gmail.com" ]
harald.pehl@gmail.com
015aabbc7a0e80a2789e4b65c73f9ea6c6d488a1
23a552b2b5e15ee7d35f490d87904e671f3fc562
/jsurfer/src/generated/java/com/goldensoftware/surfer/SrfToolbars.java
04ba88bbc54997294e953c8ab87df64af46c6371
[]
no_license
alberts/fullung
3d52e3d911ef52aa0f552364940eb95cdd83b12a
9acd63cd0da6cf0ffe95493e174bba27eda24d2a
refs/heads/master
2021-01-20T05:32:15.286586
2008-09-27T10:34:12
2008-09-27T10:34:12
32,113,504
0
1
null
null
null
null
UTF-8
Java
false
false
325
java
package com.goldensoftware.surfer; import com4j.ComEnum; public enum SrfToolbars implements ComEnum { srfTBMain(1), srfTBDraw(2), srfTBMap(4), ; private final int value; SrfToolbars(int value) { this.value = value; } public int comEnumValue() { return value; } }
[ "fullung@76970873-ce3a-0410-a9b7-c9c6e07dc4f1" ]
fullung@76970873-ce3a-0410-a9b7-c9c6e07dc4f1
68cdc19992c4a1f13fee092d0475699ced1ed139
05ac8dcd195e7c89ab6fbd456e1074532f27085e
/Bankbot/Java/android/support/v4/view/GravityCompat.java
50258e3701f91b91892c22d665112ab0fa9024fd
[]
no_license
AppAnalysis-BGSU/DecompiledApks
f3f913d45e04f256620270d4906ddaea7d4c33a0
a9fe58e890928e14b65b174d3c5dd4a8af1b604e
refs/heads/master
2021-04-26T22:03:56.343340
2018-03-11T00:10:25
2018-03-11T00:10:25
124,018,768
0
0
null
2018-03-06T04:06:41
2018-03-06T04:06:41
null
UTF-8
Java
false
false
2,960
java
package android.support.v4.view; import android.graphics.Rect; import android.os.Build.VERSION; import android.view.Gravity; public final class GravityCompat { public static final int END = 8388613; static final GravityCompatImpl IMPL; public static final int RELATIVE_HORIZONTAL_GRAVITY_MASK = 8388615; public static final int RELATIVE_LAYOUT_DIRECTION = 8388608; public static final int START = 8388611; interface GravityCompatImpl { void apply(int i, int i2, int i3, Rect rect, int i4, int i5, Rect rect2, int i6); void apply(int i, int i2, int i3, Rect rect, Rect rect2, int i4); void applyDisplay(int i, Rect rect, Rect rect2, int i2); int getAbsoluteGravity(int i, int i2); } class GravityCompatImplBase implements GravityCompatImpl { GravityCompatImplBase() { } public void apply(int i, int i2, int i3, Rect rect, int i4, int i5, Rect rect2, int i6) { Gravity.apply(i, i2, i3, rect, i4, i5, rect2); } public void apply(int i, int i2, int i3, Rect rect, Rect rect2, int i4) { Gravity.apply(i, i2, i3, rect, rect2); } public void applyDisplay(int i, Rect rect, Rect rect2, int i2) { Gravity.applyDisplay(i, rect, rect2); } public int getAbsoluteGravity(int i, int i2) { return -8388609 & i; } } class GravityCompatImplJellybeanMr1 implements GravityCompatImpl { GravityCompatImplJellybeanMr1() { } public void apply(int i, int i2, int i3, Rect rect, int i4, int i5, Rect rect2, int i6) { GravityCompatJellybeanMr1.apply(i, i2, i3, rect, i4, i5, rect2, i6); } public void apply(int i, int i2, int i3, Rect rect, Rect rect2, int i4) { GravityCompatJellybeanMr1.apply(i, i2, i3, rect, rect2, i4); } public void applyDisplay(int i, Rect rect, Rect rect2, int i2) { GravityCompatJellybeanMr1.applyDisplay(i, rect, rect2, i2); } public int getAbsoluteGravity(int i, int i2) { return GravityCompatJellybeanMr1.getAbsoluteGravity(i, i2); } } static { if (VERSION.SDK_INT >= 17) { IMPL = new GravityCompatImplJellybeanMr1(); } else { IMPL = new GravityCompatImplBase(); } } private GravityCompat() { } public static void apply(int i, int i2, int i3, Rect rect, int i4, int i5, Rect rect2, int i6) { IMPL.apply(i, i2, i3, rect, i4, i5, rect2, i6); } public static void apply(int i, int i2, int i3, Rect rect, Rect rect2, int i4) { IMPL.apply(i, i2, i3, rect, rect2, i4); } public static void applyDisplay(int i, Rect rect, Rect rect2, int i2) { IMPL.applyDisplay(i, rect, rect2, i2); } public static int getAbsoluteGravity(int i, int i2) { return IMPL.getAbsoluteGravity(i, i2); } }
[ "civabhusal@gmail.com" ]
civabhusal@gmail.com
6876c58599225d413264885a22618ebaf10f183f
c30e7ea5239cf96e22781fc264ed82afb634a2c2
/javaPractice/src/part11/FileInputStream.java
be4829dc4e1fe84db05f833310cd60d28fcdb6ae
[]
no_license
glory6807/JavaPrac
82c588027140cca583bb91a552a66f06ca8b0616
3e23e66fa47f9fd92b281c173518ff001c604c45
refs/heads/master
2021-01-01T11:01:55.232167
2020-02-29T14:29:42
2020-02-29T14:29:42
239,248,964
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package part11; public class FileInputStream implements AutoCloseable{ private String file; public FileInputStream(String file) { this.file = file; } public void read() { System.out.println(file + "을 읽습니다."); } @Override public void close() throws Exception { System.out.println(file + "을 닫습니다."); } }
[ "pjj2818@gmail.com" ]
pjj2818@gmail.com
c0a84d6852d94c124e2ef8874356ed27c8d8bc21
131e806ae9db2b522ff68ea13bea682958e5dc31
/app/src/main/java/com/example/lee/myapplication/TakevideoActivity.java
a7b727a740f793ed778d700f0651fe3675448221
[]
no_license
kamputer/Liveletter
56af68e3b8b8aa30ae9c4fdf5ec63a480fc1bf03
121f344fef0541ccaaba5b9250da35d3760482d5
refs/heads/master
2020-12-28T21:50:38.443744
2016-09-26T05:48:30
2016-09-26T05:48:30
68,683,799
0
0
null
null
null
null
UTF-8
Java
false
false
5,432
java
package com.example.lee.myapplication; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.media.MediaPlayer; import android.net.Uri; import android.os.Environment; import android.provider.MediaStore; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.MediaController; import android.widget.VideoView; import java.io.File; public class TakevideoActivity extends AppCompatActivity { private static final int TAKE_VIDEO = 1; private VideoView videoview; private ImageView background; private Uri mImageMovieUri; private int bgtype; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setContentView(R.layout.activity_takevideo); bgtype = 0; videoview=(VideoView) findViewById(R.id.videoView1); background = (ImageView) findViewById(R.id.videobackground1); BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; final Bitmap bg1 = BitmapFactory.decodeResource(getResources(),R.drawable.bg_heart,options); final Bitmap bg2 = BitmapFactory.decodeResource(getResources(),R.drawable.bg_birthday,options); final Bitmap bg3 = BitmapFactory.decodeResource(getResources(),R.drawable.bg_thanks,options); final Bitmap bg4 = BitmapFactory.decodeResource(getResources(),R.drawable.bg_goodnight,options); Button home = (Button) findViewById(R.id.btn_home6); home.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); } }); Button change = (Button) findViewById(R.id.btn_change3); change.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ Intent intent = new Intent(getApplicationContext(), TvideohologramActivity.class); intent.putExtra("mImageMovieUri",mImageMovieUri); intent.putExtra("bgtype",bgtype); startActivity(intent); } }); Button nobackground = (Button) findViewById(R.id.vbg1_no); nobackground.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ background.setImageResource(0); bgtype = 0; } }); Button background1 = (Button) findViewById(R.id.vbg1_1); background1.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ background.setImageBitmap(bg1); bgtype = 1; } }); Button background2 = (Button) findViewById(R.id.vbg1_2); background2.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ background.setImageBitmap(bg2); bgtype = 2; } }); Button background3 = (Button) findViewById(R.id.vbg1_3); background3.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ background.setImageBitmap(bg3); bgtype = 3; } }); Button background4 = (Button) findViewById(R.id.vbg1_4); background4.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ background.setImageBitmap(bg4); bgtype = 4; } }); Intent intent=new Intent(MediaStore.ACTION_VIDEO_CAPTURE); String url = "video_" + String.valueOf(System.currentTimeMillis()) + ".mp4"; mImageMovieUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory(), url)); intent.putExtra("android.intent.extras.CAMERA_FACING",1); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY,1); intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT,10); intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT,(long)(1024*1024*4)); intent.putExtra(MediaStore.EXTRA_OUTPUT,mImageMovieUri); try{ startActivityForResult(intent,TAKE_VIDEO); } catch(ActivityNotFoundException e){ } sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if(resultCode != RESULT_OK) { return; } if (requestCode == TAKE_VIDEO) { MediaController mc=new MediaController(TakevideoActivity.this); videoview.setMediaController(mc); videoview.setVideoURI(mImageMovieUri); videoview.requestFocus(); videoview.start(); } } }
[ "aramgee94@gmail.com" ]
aramgee94@gmail.com
a9dc866d7fff3cb9728f946a0e3ba65e203696c9
9f1770694fe8cef612817309014dc97cc7f6a0b5
/catalog/src/main/java/com/ibm/asset/trails/dao/jpa/PartNumberDaoJpa.java
8d1519299191db47979b168c0ebf772c44ef7ba1
[]
no_license
upself/trails
41cfdd27fb22eba99d1425cdce6fe10f5c34cd51
fcd4c62a8ffde8c60006bce7f1716f5694ee4e19
refs/heads/master
2021-04-30T16:49:00.321511
2016-09-14T08:32:37
2016-09-14T08:32:37
80,106,368
0
0
null
null
null
null
UTF-8
Java
false
false
785
java
package com.ibm.asset.trails.dao.jpa; import java.util.List; import org.springframework.stereotype.Repository; import com.ibm.asset.trails.dao.PartNumberDao; import com.ibm.asset.trails.domain.PartNumber; @Repository public class PartNumberDaoJpa extends KbDefinitionDaoJpa<PartNumber, Long> implements PartNumberDao { public PartNumber findByNaturalKey(String key) { @SuppressWarnings("unchecked") List<PartNumber> list = getEntityManager() .createQuery( "SELECT h FROM PartNumber h left join fetch h.pids where guid = :key") .setParameter("guid", key) .setHint("org.hibernate.cacheable", Boolean.TRUE) .getResultList(); if (list == null || list.isEmpty()) { return null; } else { return list.get(0); } } }
[ "ondrej_zivnustka@cz.ibm.com" ]
ondrej_zivnustka@cz.ibm.com
6430297b918c819c62086a57c5362d3dc96b6eed
b50cb87e438a2e14d3c513b2a2328d25b7a04284
/Bottom/MessagesListAdapter.java
d5ee3d5d73ec2ac3c1286f3e3a44b550b956df7a
[]
no_license
sagarsurvse/ElanAcademyApp
8441b26cb9449d45f95ab3ff87b2a8534b4ccfb5
2448ad7d4fa8422fc5aa25c44ecc4a1a22490e56
refs/heads/master
2022-10-18T12:01:36.302803
2020-06-15T13:45:10
2020-06-15T13:45:10
272,448,323
0
0
null
null
null
null
UTF-8
Java
false
false
1,738
java
package com.example.admin.elanlivelearningapp.Bottom; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.example.admin.elanlivelearningapp.Bottom.Models.MessageCell; import com.example.admin.elanlivelearningapp.R; /** * Created by haripal on 7/25/17. */ public class MessagesListAdapter extends ArrayAdapter<MessageCell> { MessageCell[] cellItem = null; Context context; public MessagesListAdapter(Context context, MessageCell[] resource) { super(context, R.layout.message_cell, resource); // TODO Auto-generated constructor stub this.context = context; this.cellItem = resource; } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub LayoutInflater inflater = ((Activity)context).getLayoutInflater(); if (cellItem[position].getSender()) { convertView = inflater.inflate(R.layout.sender_message_cell, parent, false); } else { convertView = inflater.inflate(R.layout.message_cell, parent, false); } TextView sender = (TextView) convertView.findViewById(R.id.photoName); sender.setText(cellItem[position].getMessageSender()); TextView wish = (TextView) convertView.findViewById(R.id.wishMessage); wish.setText(cellItem[position].getMessageText()); TextView dateTime = (TextView) convertView.findViewById(R.id.dateTime); dateTime.setText(cellItem[position].getMessageDateTime()); return convertView; } }
[ "noreply@github.com" ]
noreply@github.com
b917382c64ba6ec7f3cefc5557b2ee036835ac82
ba7ded266e1af62c91f18e579921c03b5adfdc99
/FacturacionElectrica/src/masterDetail/medidor.java
81005d6a9b69f411ea54f505660ff69135b79883
[]
no_license
davidtapia7x/FacturacionElectricaBD
7e46f676f2002731cd2e47c11d73d57849a3d77f
babf5aefab055d266014eb1166e6498cf0114bea
refs/heads/master
2021-01-01T04:57:07.227810
2016-05-23T10:34:33
2016-05-23T10:34:33
59,383,208
0
0
null
null
null
null
UTF-8
Java
false
false
16,373
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 masterDetail; import java.awt.EventQueue; import java.beans.Beans; import java.util.ArrayList; import java.util.List; import javax.persistence.RollbackException; import javax.swing.JFrame; import javax.swing.JPanel; /** * * @author David */ public class medidor extends JPanel { public medidor() { initComponents(); if (!Beans.isDesignTime()) { entityManager.getTransaction().begin(); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("jdbc:oracle:thin:@localhost:1521:XEPU").createEntityManager(); query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery("SELECT m FROM Medidor_1 m"); list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query.getResultList()); masterScrollPane = new javax.swing.JScrollPane(); masterTable = new javax.swing.JTable(); codMedidorLabel = new javax.swing.JLabel(); consumoInicialLabel = new javax.swing.JLabel(); clavecatastralLabel = new javax.swing.JLabel(); codMedidorField = new javax.swing.JTextField(); consumoInicialField = new javax.swing.JTextField(); clavecatastralField = new javax.swing.JTextField(); saveButton = new javax.swing.JButton(); refreshButton = new javax.swing.JButton(); newButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton(); FormListener formListener = new FormListener(); org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable); org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${codMedidor}")); columnBinding.setColumnName("Cod Medidor"); columnBinding.setColumnClass(String.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${consumoInicial}")); columnBinding.setColumnName("Consumo Inicial"); columnBinding.setColumnClass(Double.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${clavecatastral}")); columnBinding.setColumnName("Clavecatastral"); columnBinding.setColumnClass(Long.class); bindingGroup.addBinding(jTableBinding); masterScrollPane.setViewportView(masterTable); codMedidorLabel.setText("Cod Medidor:"); consumoInicialLabel.setText("Consumo Inicial:"); clavecatastralLabel.setText("Clavecatastral:"); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.codMedidor}"), codMedidorField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue("null"); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), codMedidorField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.consumoInicial}"), consumoInicialField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue("null"); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), consumoInicialField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.clavecatastral}"), clavecatastralField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue("null"); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), clavecatastralField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); saveButton.setText("Save"); saveButton.addActionListener(formListener); refreshButton.setText("Refresh"); refreshButton.addActionListener(formListener); newButton.setText("New"); newButton.addActionListener(formListener); deleteButton.setText("Delete"); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), deleteButton, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); deleteButton.addActionListener(formListener); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(newButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(refreshButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(saveButton) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(codMedidorLabel) .addComponent(consumoInicialLabel) .addComponent(clavecatastralLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(codMedidorField, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE) .addComponent(consumoInicialField, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE) .addComponent(clavecatastralField, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE) .addContainerGap()) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton}); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(codMedidorLabel) .addComponent(codMedidorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(consumoInicialLabel) .addComponent(consumoInicialField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clavecatastralLabel) .addComponent(clavecatastralField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(saveButton) .addComponent(refreshButton) .addComponent(deleteButton) .addComponent(newButton)) .addContainerGap()) ); bindingGroup.bind(); } // Code for dispatching events from components to event handlers. private class FormListener implements java.awt.event.ActionListener { FormListener() {} public void actionPerformed(java.awt.event.ActionEvent evt) { if (evt.getSource() == saveButton) { medidor.this.saveButtonActionPerformed(evt); } else if (evt.getSource() == refreshButton) { medidor.this.refreshButtonActionPerformed(evt); } else if (evt.getSource() == newButton) { medidor.this.newButtonActionPerformed(evt); } else if (evt.getSource() == deleteButton) { medidor.this.deleteButtonActionPerformed(evt); } } }// </editor-fold>//GEN-END:initComponents @SuppressWarnings("unchecked") private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshButtonActionPerformed entityManager.getTransaction().rollback(); entityManager.getTransaction().begin(); java.util.Collection data = query.getResultList(); for (Object entity : data) { entityManager.refresh(entity); } list.clear(); list.addAll(data); }//GEN-LAST:event_refreshButtonActionPerformed private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed int[] selected = masterTable.getSelectedRows(); List<masterDetail.Medidor_1> toRemove = new ArrayList<masterDetail.Medidor_1>(selected.length); for (int idx = 0; idx < selected.length; idx++) { masterDetail.Medidor_1 m = list.get(masterTable.convertRowIndexToModel(selected[idx])); toRemove.add(m); entityManager.remove(m); } list.removeAll(toRemove); }//GEN-LAST:event_deleteButtonActionPerformed private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newButtonActionPerformed masterDetail.Medidor_1 m = new masterDetail.Medidor_1(); entityManager.persist(m); list.add(m); int row = list.size() - 1; masterTable.setRowSelectionInterval(row, row); masterTable.scrollRectToVisible(masterTable.getCellRect(row, 0, true)); }//GEN-LAST:event_newButtonActionPerformed private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed try { entityManager.getTransaction().commit(); entityManager.getTransaction().begin(); } catch (RollbackException rex) { rex.printStackTrace(); entityManager.getTransaction().begin(); List<masterDetail.Medidor_1> merged = new ArrayList<masterDetail.Medidor_1>(list.size()); for (masterDetail.Medidor_1 m : list) { merged.add(entityManager.merge(m)); } list.clear(); list.addAll(merged); } }//GEN-LAST:event_saveButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField clavecatastralField; private javax.swing.JLabel clavecatastralLabel; private javax.swing.JTextField codMedidorField; private javax.swing.JLabel codMedidorLabel; private javax.swing.JTextField consumoInicialField; private javax.swing.JLabel consumoInicialLabel; private javax.swing.JButton deleteButton; private javax.persistence.EntityManager entityManager; private java.util.List<masterDetail.Medidor_1> list; private javax.swing.JScrollPane masterScrollPane; private javax.swing.JTable masterTable; private javax.swing.JButton newButton; private javax.persistence.Query query; private javax.swing.JButton refreshButton; private javax.swing.JButton saveButton; private org.jdesktop.beansbinding.BindingGroup bindingGroup; // End of variables declaration//GEN-END:variables public static void main(String[] args) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(medidor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(medidor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(medidor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(medidor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ EventQueue.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame(); frame.setContentPane(new medidor()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } }); } }
[ "David@David-PC" ]
David@David-PC
a1f0915ef24f925392e50b5829a320ac7e86c388
fb16a7298f4697e4751dcb4b33bdab4ecc507e27
/src/main/java/org/logstash/plugins/inputs/http/util/DaemonThreadFactory.java
0001bcb255d8f08c45b4fa3f3131bd4722a98642
[ "Apache-2.0" ]
permissive
logstash-plugins/logstash-input-http
1fd4d96fecadc11d7bf6a71398987abc7e181e86
b51411e737296d6004e529912acfc5f2e9d5cc05
refs/heads/main
2023-08-16T21:37:23.741051
2023-06-29T14:35:52
2023-06-29T14:35:52
35,051,395
57
78
Apache-2.0
2023-06-29T14:35:53
2015-05-04T18:19:00
Ruby
UTF-8
Java
false
false
847
java
package org.logstash.plugins.inputs.http.util; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; public class DaemonThreadFactory implements ThreadFactory { final ThreadGroup group; final AtomicInteger threadNumber = new AtomicInteger(1); final String namePrefix; DaemonThreadFactory(String namePrefix) { this.namePrefix = namePrefix; group = Thread.currentThread().getThreadGroup(); } @Override public Thread newThread(Runnable r) { Thread t = new Thread(group, r, namePrefix + "[T#" + threadNumber.getAndIncrement() + "]", 0); t.setDaemon(true); return t; } public static ThreadFactory daemonThreadFactory(String namePrefix) { return new DaemonThreadFactory(namePrefix); } }
[ "jsvd@users.noreply.github.com" ]
jsvd@users.noreply.github.com
4e4389c50a6d89f1466d031f9a78b22b80badc87
eca9243858181cf90a74236b6c4b16567c9025a2
/Microservices/gateway-service/src/main/java/com/revature/Application.java
59eead39f5bc9c8b6a05ea89f0f8db16dcce37fc
[]
no_license
kmiller4/demos
4d2d1aedda1b567a7535a87d10bcd9283687efa9
04877f0787a9b1db2752b10b87a3aca80635da22
refs/heads/master
2020-04-01T14:36:52.631855
2018-10-05T13:24:02
2018-10-05T13:24:02
147,542,034
0
0
null
2018-09-05T15:43:29
2018-09-05T15:43:29
null
UTF-8
Java
false
false
487
java
package com.revature; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; @EnableZuulProxy @EnableEurekaServer @SpringBootApplication public class Application { public static void main(String[] args) throws Exception { SpringApplication.run(Application.class, args); } }
[ "btkruppa513@gmail.com" ]
btkruppa513@gmail.com
417460013199e78c56cdd157f19401ac3e262fd9
ec050a63bd8c33c289114146af9124fd63550749
/api/wms-bill-manage/src/main/java/com/deer/wms/bill/manage/dao/BillMasterMapper.java
527622870536d88331c33ee410a287bcc1c1d063
[]
no_license
myxland/smart-warehouse
af44592bc7d84c51a178e6bd84374ad62b80b2ac
8aa4afd10d0a555f05a58635e143230dc895f2ff
refs/heads/master
2020-12-18T21:28:04.660080
2019-07-13T17:15:26
2019-07-13T17:15:26
235,525,951
0
1
null
2020-01-22T08:04:03
2020-01-22T08:04:02
null
UTF-8
Java
false
false
600
java
package com.deer.wms.bill.manage.dao; import com.deer.wms.bill.manage.model.BillMaster; import com.deer.wms.bill.manage.model.BillMasterCriteria; import com.deer.wms.bill.manage.model.BillMasterDto; import com.deer.wms.bill.manage.model.TongJi; import com.deer.wms.project.seed.core.mapper.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; public interface BillMasterMapper extends Mapper<BillMaster> { List<BillMasterDto> findList(BillMasterCriteria criteria); TongJi tongji(BillMasterCriteria criteria); void updateState(@Param("billNo") String billNo); }
[ "337045342@qq.com" ]
337045342@qq.com
1efb8a1b26874b98c4dfdde608563d5678b75180
e08d79ead5ab0010f92b037895961e7632bf9bc1
/src/sn/objis/tmc/presentation/HelloWord.java
3bc742e47bbb17eaddf755105c96e0cd87c8b18c
[]
no_license
sarrousmane1993/Tmc
b9e25f9963bd4df47011e3cef42bcd7baa2b164d
4a684e3719670f41ef8f05ba5ed8559ae2bde880
refs/heads/master
2020-03-28T19:28:45.565061
2018-09-16T20:15:54
2018-09-16T20:15:54
148,980,704
0
0
null
null
null
null
UTF-8
Java
false
false
151
java
package sn.objis.tmc.presentation; public class HelloWord { public static void main(String[] args) { System.out.println("hello word"); } }
[ "sarrbayeousmane@gmail.com" ]
sarrbayeousmane@gmail.com
fafa5aab7b0e01af89ee39e9041e34d4029d38fb
609fe0b1afec7a506d41ace5a58d7e39ebf29164
/locuslabs-android-sdk/examples/AirportListWithGrab/app/src/main/java/com/example/locuslabs/testapp/MapActivity.java
10db71d87ee5e8355ad45866d1cfc4c04462e8e5
[]
no_license
1010101012101/Android-Docs-Sample-Code
68a50187b616af7b8db66740b98d0a19ed2016a5
4ba3318909446cbdf9128ae7008e4ee7ed808b31
refs/heads/master
2020-04-15T12:39:10.273560
2019-01-08T16:01:33
2019-01-08T16:01:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,665
java
package com.example.locuslabs.testapp; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.RelativeLayout; import com.locuslabs.sdk.maps.model.Floor; import com.locuslabs.sdk.maps.model.Map; import com.locuslabs.sdk.maps.model.Marker; import com.locuslabs.sdk.maps.model.Venue; import com.locuslabs.sdk.maps.model.VenueDatabase; import com.locuslabs.sdk.maps.view.MapView; /** * Sample Activity that will render the specified venue. */ public class MapActivity extends Activity { private VenueDatabase venueDatabase; private MapView mapView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent receivedIntent = getIntent(); //Takes the String venueId to determine what venue needs to be used for loadMap String venueId = receivedIntent.getStringExtra("venueId"); //Create an VenueDatabase which allows venues to be loaded. venueDatabase = new VenueDatabase(); //Load the Venue specified by the venueId passed to the activity. loadVenue(venueId); } @Override public void onBackPressed() { if ( mapView == null || !mapView.onBackPressed() ) { super.onBackPressed(); } } @Override protected void onDestroy() { super.onDestroy(); //----------------------------------- // Be sure to close the mapView and // venueDatabase to release the memory // they consume. //----------------------------------- if ( mapView != null ) { mapView.close(); } if ( venueDatabase != null ) { venueDatabase.close(); } venueDatabase = null; mapView = null; } private void loadVenue(String venueId) { final RelativeLayout rl = new RelativeLayout(this); VenueDatabase.OnLoadVenueAndMapListeners listeners = new VenueDatabase.OnLoadVenueAndMapListeners(); listeners.loadedInitialViewListener = new VenueDatabase.OnLoadedInitialViewListener() { @Override public void onLoadedInitialView(View view) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) { parent.removeView(view); } view.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)); rl.addView(view); setContentView(rl); venueDatabase.resumeLoadVenueAndMap(); } }; listeners.loadCompletedListener = new VenueDatabase.OnLoadCompletedListener() { @Override public void onLoadCompleted(Venue _venue, Map _map, final MapView _mapView, Floor floor, Marker marker) { mapView = _mapView; mapView.setOnSupplyCurrentActivityListener(new MapView.OnSupplyCurrentActivityListener() { @Override public Activity onSupplyCurrentActivity() { return MapActivity.this; } }); mapView.setPositioningEnabled(true); } }; // The second parameter is an initial search option. // The map will zoom to the first matched POI, e.g. "Gate A5" or "Gate 80" String initialSearch = null; venueDatabase.loadVenueAndMap(venueId, initialSearch, listeners); } }
[ "juan@blue-line.io" ]
juan@blue-line.io
9977e3bd823c930eb36275c94f45625778c309ba
237aa9ca341c03234e06c9b4863200fe8b54bc52
/03-java-spring/01-spring-fundamentals/02-getting-familiar-with-routing/routingsimple/src/main/java/com/example/routingsimple/web/controllers/DojoController.java
ee73de88593b14be42caeab602e497071654e38f
[]
no_license
java-june-2021/wonga-java
3bb3018c71b596bbb6c82ea324414a77397d9ad1
b2d39892fb554474bde1a3e4acf787de5421a1e2
refs/heads/master
2023-06-22T06:28:20.011688
2021-07-20T23:43:48
2021-07-20T23:43:48
374,831,597
0
0
null
null
null
null
UTF-8
Java
false
false
778
java
package com.example.routingsimple.web.controllers; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class DojoController { @RequestMapping("/dojo") public String random() { return "Hello Coding Dojo"; } @RequestMapping("/dojo/{location}") public String showLocation(@PathVariable("location") String location) { if ((location).equals("burbank")) { return "Burbank Dojo is located in Southern California"; } else if ((location).equals("san-jose")) { return "SJ dojo is the headquarters"; } else { return "I don't know where you are"; } } }
[ "adamjkwong@gmail.com" ]
adamjkwong@gmail.com
3c5f8371ad96a117cfb33427f74a99cba1ec46f8
e06377887f5cf3e57fb0162f17c24599eff3a583
/src/test/com/danielbigham/lui/TestUtil.java
43ae3e2cb1b2dcecb755517174cc34a27a08c6e2
[]
no_license
dbigham/Lui
ef3c23a64e39981620538a3c8390c8b9738d96c1
e2ef5f891a4164f89e186a28b97a9ffd08dfb153
refs/heads/master
2021-07-20T14:14:31.085802
2021-02-16T18:34:06
2021-02-16T18:34:06
95,722,754
1
0
null
null
null
null
UTF-8
Java
false
false
603
java
package test.com.danielbigham.lui; import static org.junit.Assert.assertEquals; import org.junit.Test; import com.danielbigham.Util; public class TestUtil { @Test public void test1() { assertEquals( "\tabc", Util.indent("abc", 1) ); } @Test public void test2() { assertEquals( "\tabc\n\tdef", Util.indent("abc\ndef", 1) ); } @Test public void test3() { assertEquals( "just\r\ntesting", Util.toWindowsString("just\ntesting") ); } @Test public void test4() { assertEquals( "just\r\ntesting", Util.toWindowsString("just\r\ntesting") ); } }
[ "daniel.bigham@gmail.com" ]
daniel.bigham@gmail.com
51c6f5ad65dc4f53539beaa9cab718ffadb9407c
60107866469e4b35fd487451ae2d896117045539
/src/main/java/technology/raeder/yoappserver/api/YoApp.java
3f0b74413b3c493f6184d61113baa762fc09cb08
[ "MIT" ]
permissive
RaederDev/YoAppServer
83f9994e0fbc2baa2ade3f4603e88e2272e33aed
291066c1215c96386f4b2cb8c48732b4a84f5d23
refs/heads/master
2021-10-10T06:20:50.152276
2014-09-10T19:59:44
2014-09-10T19:59:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,667
java
package technology.raeder.yoappserver.api; /** * Classes that extend YoApp will be automatically loaded by * the app server and notified when a new YO is received. */ public abstract class YoApp { private String apiKey, appPath; /** * Called when the app starts */ public void onEnable() {} /** * Called when the app stops */ public void onDisable() {}; /** * This method gets called when a new YO is received. * @param username The username that sent the YO. * @param queryUrl The url that was called by the YO server. * @param userSuppliedUrl If the user sent a url with his YO this parameter contains it otherwise the parameter is null. */ public void onMessage(String username, String queryUrl, String userSuppliedUrl) {}; /** * This method is invoked by the server before onEnable to set the API key. * Override this method if you need to set your API key and don't want to use the configuration file. * @param key The api key configured in the configuration or null if none was found. */ public void setApiKey(String key) { this.apiKey = key; } /** * Get the API key. * @return The Api key. */ public String getApiKey() { return this.apiKey; } /** * Get the absolute path to the folder where the app is. * @return The absolute path to the folder where the app is. */ public String getAppPath() { return appPath; } /** * Set the app path. */ public void setAppPath(String path) { this.appPath = path; } }
[ "github@raeder.technology" ]
github@raeder.technology
89ffdd3686829ad883f57be592b730e029d056b5
27b31978795716d17fcb481611f026e5f1a95efe
/code/src/game/network/packet/menu/Connect.java
2b2516fac942def2cf0e3f3319492955b12d4c07
[]
no_license
LordMonoxide/malachiteserver-old
fc37ea6c130629a57931f25dd059c74d61099d38
51a02a310d0c9825fec48a5c05de0fe3a819fff6
refs/heads/master
2021-01-22T11:10:45.875318
2013-09-25T15:47:46
2013-09-25T15:47:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package game.network.packet.menu; import game.network.Connection; import game.network.Server; import game.settings.Settings; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import network.packet.Packet; public class Connect extends Packet { private double _version; public int getIndex() { return 0; } public ByteBuf serialize() { ByteBuf b = Unpooled.buffer(); b.writeShort(Settings.Map.Size()); b.writeByte (Settings.Map.Depth()); b.writeByte (Settings.Map.Tile.Size()); b.writeByte (Settings.Map.Attrib.Size()); b.writeByte (Settings.Player.Inventory.Size()); return b; } public void deserialize(ByteBuf data) throws NotEnoughDataException { _version = data.readDouble(); } public void process() { if(_version != Settings.Net.Version()) { _connection.kick("Invalid version"); } else { ((Connection)_connection).handler(Server.getMenuHandler()); _connection.send(new Connect()); } } }
[ "corey@narwhunderful.com" ]
corey@narwhunderful.com
99dbf3ed68d07445e98b840d7b9eddc14f77d398
d0793658778a04be22db35fc2de4814c6e8ba80c
/app/src/main/java/com/example/small_project/MyMessMVP/model/Model.java
47372ae0afcfa479c5ce4db704436547ec9522cb
[]
no_license
qingfeng0213/Project
e5ff9bb393fa3db70e6710015366a5729f0191e6
ba0de7260a6b0d4aca609fdeb45d7d26cd546800
refs/heads/master
2020-05-03T20:54:48.595321
2019-04-01T07:59:12
2019-04-01T07:59:12
178,813,435
0
0
null
null
null
null
UTF-8
Java
false
false
1,414
java
package com.example.small_project.MyMessMVP.model; import com.example.small_project.Api.UserApiService; import com.example.small_project.bean.MyMessageBean; import com.example.small_project.bean.NameBean; import com.example.small_project.bean.WordBean; import com.example.small_project.network.RetrofitUtils; import java.util.HashMap; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.observers.DisposableObserver; import io.reactivex.schedulers.Schedulers; public class Model implements IModel { @Override public void getmymessage(String url, HashMap<String, Object> hashMap, final ModelCallBack callBack) { UserApiService userApiService = RetrofitUtils.getInstance().create(UserApiService.class); userApiService.getMessage(url,hashMap) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new DisposableObserver<MyMessageBean>() { @Override public void onNext(MyMessageBean value) { callBack.onSuccess(value); } @Override public void onError(Throwable e) { callBack.onFail(e); } @Override public void onComplete() { } }); } }
[ "737006109@qq.com" ]
737006109@qq.com
df44354417c894a41ae2c26566613710d9a83173
8bb7c0accde1b68a99ce5df8954e6013f101dc98
/src/main/java/sample/execute/ResData.java
333b21374cc8458a3b2c9a4b7828e9837d1c5d7d
[]
no_license
taru7taru7taru/jnaSample
65cd0a05c27bc08642c75bb1fbc333ac4839a5ca
a7050bb5325f6360667963bda9e9601217865d5c
refs/heads/master
2021-01-02T23:16:47.889495
2017-08-06T15:27:04
2017-08-06T15:27:04
99,495,257
0
0
null
null
null
null
UTF-8
Java
false
false
867
java
package sample.execute; public class ResData { /** メソッドの実行結果のメッセージ */ private String resultMsg =null; /** メソッドの実行結果 */ private boolean jnaResult =false; /** メソッド実行時のExceptionメッセージ */ private String jnaExceptionMessage = null; /* 統合開発環境で出力したメソッド */ public String getResultMsg() { return resultMsg; } public void setResultMsg(String resultMsg) { this.resultMsg = resultMsg; } public boolean isJnaResult() { return jnaResult; } public void setJnaResult(boolean jnaResult) { this.jnaResult = jnaResult; } public String getJnaExceptionMessage() { return jnaExceptionMessage; } public void setJnaExceptionMessage(String jnaExceptionMessage) { this.jnaExceptionMessage = jnaExceptionMessage; } }
[ "adon@aaa.com" ]
adon@aaa.com
b7dab8f85591c0a971c7b4d44a7f62aac8779b19
ae5fe7bac3b096710ffaa08f5714a922e057375e
/src/main/java/theic2/xenobyteport/api/module/CheatModule.java
d0ccc64e825c0961d642e8f79839c8ab68fc9e0b
[]
no_license
Lufrut/Xeno1.12
4a5cd3df0d6d254e68641aa4c0ec50aa9743f718
d1b30a83e513a1dc8483491fef7429dde3633b2d
refs/heads/master
2023-01-19T23:28:25.436290
2020-12-02T07:56:44
2020-12-02T07:56:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,153
java
package theic2.xenobyteport.api.module; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import org.lwjgl.input.Keyboard; import theic2.xenobyteport.api.config.Cfg; import theic2.xenobyteport.api.gui.WidgetMessage; import theic2.xenobyteport.api.gui.WidgetMode; import theic2.xenobyteport.handlers.ModuleHandler; import theic2.xenobyteport.modules.modded.GiveSelect; import java.util.stream.Stream; public abstract class CheatModule extends ModuleAbility { private final Category category; private final PerformMode mode; private final String name, id; @Cfg("cfgState") public boolean cfgState; private boolean forgeEvents, ticksStarted; private ModuleHandler handler; @Cfg("key") private int key; private int counter; public CheatModule(String name, Category category, PerformMode mode) { forgeEvents = Stream.of(getClass().getDeclaredMethods()).filter(f -> f.isAnnotationPresent(SubscribeEvent.class)).findFirst().isPresent(); id = category + "_" + name; this.category = category; this.mode = mode; this.name = name; setLastCounter(); } public String getID() { return id; } public String getName() { return name; } public PerformMode getMode() { return mode; } public Category getCategory() { return category; } public boolean hasCategory() { return category != Category.NONE; } public void resetKeyBind() { setKeyBind(Keyboard.KEY_NONE); } public int getKeyBind() { return key; } public void setKeyBind(int key) { this.key = key; } public boolean provideForgeEvents() { return forgeEvents; } public boolean hasKeyBind() { return getKeyBind() > Keyboard.KEY_NONE; } public String getKeyName() { return hasKeyBind() ? Keyboard.getKeyName(getKeyBind()) : null; } public void setLastCounter() { counter = tickDelay(); } public void resetCounter() { counter = 0; } public void handleInit(ModuleHandler handler) { this.handler = handler; onHandlerInit(); } public void handleTick() { if (!ticksStarted) { ticksStarted = true; onTicksStart(); } if (counter >= tickDelay()) { resetCounter(); onTick(utils.isInGame()); } counter++; } protected ModuleHandler moduleHandler() { return handler; } protected void widgetMessage(String mess, WidgetMode mode) { handler.widgets().widgetMessage(new WidgetMessage(this, mess, mode)); } protected void infoMessage(String mess, WidgetMode mode) { handler.widgets().infoMessage(new WidgetMessage(this, mess, mode)); } protected void hideInfoMessage() { handler.widgets().hideInfoMessage(this); } protected GiveSelect giveSelector() { return (GiveSelect) handler.getModuleByClass(GiveSelect.class); } @Override public String toString() { return name; } }
[ "theic2@mail.ru" ]
theic2@mail.ru
5716b374a96a5cd820f8ba58902bd32e9df51060
5f419731b3e42018a79941936e5c1636fae56019
/mrn14/src/GenerateBTYENV.java
d23dc93915561e23d55bf484711fa6ecc42c1a3f
[]
no_license
Davidhuangwei/Bathymetry
642622cb432305c019627357b78a6667280588cd
28b2cc2fca9bb2e4316cd97a20d64426acfbae1f
refs/heads/master
2020-04-11T07:53:17.059719
2018-12-08T04:28:41
2018-12-08T04:28:41
161,624,910
1
1
null
2018-12-13T10:49:22
2018-12-13T10:49:22
null
UTF-8
Java
false
false
12,122
java
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; public class GenerateBTYENV { /** * This class shows how to create a File in Java * @param args * @throws IOException */ static String FS = System.getProperty("file.separator"); public static final String FILE_PATH = FS+"Users"+FS+"maddienelson"+FS+"Documents"+FS+"Bathymetry"; public static final int NUM_TEST_FILES = 5; public static final String BTY = ".bty"; public static final String TEST_FILE = "testfile"; public static final String NL = "\n"; public static final String SPACE = " "; public static final String BIG_SPACE = " "; public static final String LAKE_DATA = "FallsLake"; public static int NUM_ROWS; public static int NUM_COLS; static double[][] grid; public static ArrayList<String> FILE_NAMES = new ArrayList<String>(){{ add("Washington"); add("Adams"); add("Jefferson"); add("Madison"); add("Monroe"); add("Quincy"); }}; //FOR ENV public static final double FREQ = 1500.0; private static final int NMEDIA = 1; private static final String SSPOPT = "'CVW'"; private static final double DEPTH1 = (double)51; private static final double DEPTH2 = 0.0; private static final double DEPTH3 = 20.0; private static final double VAL1 = 0; private static final double VAL2 = 10; private static final double VAL3 = 20; private static final String NUM1 = null; private static final String NSX = null; private static final String XCORD_SOURCE = null; private static final String NSY = null; private static final String YCORD_SOURCE = null; private static final String NSD = null; private static final String SD = null; private static final String NRD = null; private static final String RD0 = null; private static final String RD1 = null; private static final String NR = null; private static final String R0 = null; private static final String R1 = null; private static final String NUM2 = null; private static final String NUM3 = null; private static final String NUM4 = null; private static final String NUM5 = null; private static final String NTHETA = null; private static final int BANG1 = 0; private static final String BANG0 = null; private static final String RCIS = null; private static final String NALPHA1 = null; private static final String NALPHA2 = null; private static final String ALPHA1 = null; private static final String ALPHA2 = null; private static final int NBETA2 = 0; private static final String NBETA1 = null; private static final String BETA1 = null; private static final String BETA2 = null; private static final double STEP2 = 1; private static final double STEP1 = 0.0; private static final double STEP3 = 1; private static final double STEP4 = 50.0; //max depth = 13 ft //min depth = 0 ft private static final double MAX_DEPTH = 13.0; private static final double MIN_DEPTH = 5.0; public static void main(String[] args) throws IOException { //absolute file name with path for(int fileNum = 0; fileNum<NUM_TEST_FILES; fileNum++) { initMakeFiles(fileNum); } } private static void initMakeFiles(int fileNum) throws IOException { String btyFileName = FILE_PATH+FS+LAKE_DATA+fileNum+BTY; File btyFile = new File(btyFileName); checkFile(btyFile, btyFileName); //String envFileName = FILE_PATH+FS+FILE_NAMES.get(fileNum)+fileNum+BTY; //File envFile = new File(envFileName); //checkFile(envFile, envFileName); makeBTYFile(fileNum,btyFile); //makeENVFile(fileNum,envFile); } private static void makeENVFile(int fileNum, File envFile) throws IOException { makeGrid(fileNum+1); String str = createENVString(fileNum); writeToFile(envFile, str); } private static String createENVString(int fileNum) { StringBuilder str = new StringBuilder(); String xLabels = generateLabel(NUM_COLS); String yLabels = generateLabel(NUM_ROWS); str.append("'"+FILE_NAMES.get(fileNum)+" (3D run)' ! TITLE"+NL); //don't know what the R is for...could be L or C str.append(FREQ+BIG_SPACE+"! FREQ (Hz)"+NL); str.append(NMEDIA+BIG_SPACE+"! NMEDIA"+NL); str.append(SSPOPT+BIG_SPACE+"! SSPOPT (Analytic or C-Linear interpolation)"+NL); str.append(DEPTH1+SPACE+DEPTH2+SPACE+DEPTH3+SPACE+"! DEPTH of bottom (m)"+NL); str.append(BIG_SPACE+VAL1+SPACE+"/"+NL); str.append(BIG_SPACE+VAL2+SPACE+"/"+NL); str.append(BIG_SPACE+VAL3+SPACE+"/"+NL); str.append("'A~' 0.0"+ NL); //WHAT IS THIS? str.append(NUM1+SPACE+NUM2+SPACE+NUM3+SPACE+NUM4+SPACE+NUM5+SPACE+"/"+NL); str.append(NSX+BIG_SPACE+"! Nsx number of source coordinates in x"+NL); str.append(XCORD_SOURCE+SPACE+"/"+BIG_SPACE+"! x coordinate of source (km)"+NL); str.append(NSY+BIG_SPACE+"! Nsy number of source coordinates in y"+NL); str.append(YCORD_SOURCE+SPACE+"/"+BIG_SPACE+"! y coordinate of source (km)"+NL); str.append(NSD+BIG_SPACE+"! NSD"+NL); str.append(SD+SPACE+"/"+BIG_SPACE+"! SD(1:NSD) (m)"+NL); str.append(NRD+BIG_SPACE+"! NRD"+NL); str.append(RD0+SPACE+RD1+SPACE+"/"+BIG_SPACE+"! RD(1:NRD) (m)"+NL); str.append(NR+BIG_SPACE+"! NR"+NL); str.append(R0+SPACE+R1+SPACE+"/"+BIG_SPACE+"! R(1:NR) (km)"+NL); str.append(NTHETA+BIG_SPACE+"! Ntheta (number of bearings)"+NL); str.append(BANG0+SPACE+BANG1+SPACE+"/"+BIG_SPACE+"! bearing angles (degrees)"+NL); str.append(RCIS+BIG_SPACE+"! 'R/C/I/S'"+NL); str.append(NALPHA1+SPACE+NALPHA2+BIG_SPACE+"! NALPHA"+NL); str.append(ALPHA1+SPACE+ALPHA2+SPACE+"/"+BIG_SPACE+"! alpha1, 2 (degrees) Elevation/declination angle fan"+NL); str.append(NBETA1+SPACE+NBETA2+BIG_SPACE+"! Nbeta"+NL); str.append(BETA1+SPACE+BETA2+SPACE+"/"+BIG_SPACE+"! beta1, beta2 (degrees) bearine angle fan"+NL); str.append(STEP1+SPACE+STEP2+SPACE+STEP3+SPACE+STEP4+BIG_SPACE+"! STEP (m), Box%x (km) Box%y (km) Box%z (m)"+NL); return str.toString(); } private static void checkFile(File file, String name) throws IOException { if(file.createNewFile()){ System.out.println(name+" File Created"); } else { System.out.println("File "+name+" already exists"); } } private static void makeBTYFile(int fileNum, File btyFile) throws IOException { makeGrid(fileNum+1); String str = createBTYString(fileNum); writeToFile(btyFile, str); } private static void writeToFile(File file, String str) throws IOException { BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(str); writer.close(); } //we want shapes that would make sense //maybe get quandrants in the files and then have the quandrants have peaks or valleys. private static String createBTYString(int fileNum) { StringBuilder str = new StringBuilder(); String xLabels = generateLabel(NUM_COLS); String yLabels = generateLabel(NUM_ROWS); str.append("'R'"+NL); //don't know what the R is for...could be L or C str.append(NUM_COLS+NL); //num rows. str.append(xLabels+NL); //x axis labels --> make an array list str.append(NUM_ROWS+NL); str.append(yLabels+NL); str.append(gridAsString()+NL); return str.toString(); } private static String gridAsString() { StringBuilder gridStr = new StringBuilder(); for (int i = 0; i<NUM_ROWS; i++) { for (int j = 0; j<NUM_COLS; j++) { gridStr.append(grid[i][j]+SPACE); } gridStr.append(NL); } return gridStr.toString(); } private static void makeGrid(int num) { NUM_ROWS = 8; NUM_COLS = 16; grid = new double[NUM_ROWS][NUM_COLS]; int halfR = NUM_ROWS/2; int halfC = NUM_COLS/2; double a = 1.55; double b = 1.32; double e = 1.28; double d = 4.7; makeSlopeQuad(0, 0, NUM_ROWS, NUM_COLS, num); //makeQuad(halfR, 0, NUM_ROWS, halfC); //makeQuad(0, halfC, halfR, NUM_COLS); //makeQuad(halfR, halfC, NUM_ROWS, NUM_COLS); } private static void makeSlopeQuad(int iStart, int jStart, int rowMax, int colMax,int num) { int midR = (int)((rowMax-iStart)/2); int midC = (int)((colMax-iStart)/2); for(int i = iStart; i<rowMax; i++) { for(int j = jStart; j<colMax; j++) { if(i<midR && j<midC) { grid[i][j]=(Math.floor((Math.abs(rowMax+colMax - i - j))*1000)/1000); }//bottomright else if(i<midR && j>=midC) { grid[i][j]=(Math.floor((Math.abs(j+colMax - i))*1000)/1000); } else if(i>=midR && j<midC) { grid[i][j]=(Math.floor((Math.abs(rowMax+ i - j))*1000)/1000); } else if(i>=midR && j>=midC) { grid[i][j]=(Math.floor((Math.abs( i + j))*1000)/1000); } else { grid[i][j] = i+j; } } } } private static void makeQuad(int iStart, int jStart, int rowMax, int colMax) { int midR = (int)((rowMax-iStart)/2); int midC = (int)((rowMax-iStart)/2); for(int i = iStart; i<rowMax; i++) { for(int j = jStart; j<colMax; j++) { if(i<midR && j<midC) { grid[i][j]=Math.floor((Math.abs(rowMax+colMax - i - j))*1000)/1000; }//bottomright else if(i<midR && j>=midC) { grid[i][j]=Math.floor((Math.abs(j+colMax - i))*1000)/1000; } else if(i>=midR && j<midC) { grid[i][j]=Math.floor((Math.abs(rowMax+ i - j))*1000)/1000; } else if(i>=midR && j>=midC) { grid[i][j]=Math.floor((Math.abs( i + j))*1000)/1000; } else { grid[i][j] = 0.05; } } } } private static void makeQuad(int iStart, int jStart, int rowMax, int colMax, double a) { int midR = (int)((rowMax-iStart)/2); int midC = (int)((rowMax-iStart)/2); for(int i = iStart; i<rowMax; i++) { for(int j = jStart; j<colMax; j++) { //bottomleft Math.floor(value * 100) / 100; if(i<midR && j<midC) { grid[i][j]=Math.floor((a+(i*j)+j+i)*1000)/1000; }//bottomright else if(i<midR && j>=midC) { grid[i][j]=Math.floor((Math.abs(a-(i*j)))*1000)/1000; } else if(i>=midR && j<midC) { grid[i][j]=Math.floor((Math.abs(a+j-i))*1000)/1000; } else if(i>=midR && j>=midC) { grid[i][j]=Math.floor((Math.abs(a*i+j))*1000)/1000; } else { grid[i][j] = 0.05; } } } } private static void makeLakeQuad(int iStart, int jStart, int rowMax, int colMax, double a) { int midR = (int)((rowMax-iStart)/2); int midC = (int)((rowMax-iStart)/2); for(int i = iStart; i<rowMax; i++) { for(int j = jStart; j<colMax; j++) { //bottomleft Math.floor(value * 100) / 100; double val = getMaxLake(rowMax+colMax); if(i<midR) { //grid[i][j] = getMaxLake(Math.floor(obj*1000)/1000); } // if(i<midR && j<midC) { // grid[i][j]=getMaxLake(Math.floor((val - i*0.1 - j*0.1)*1000)/1000); // }//bottomright // else if(i<midR && j>=midC) { // grid[i][j]=getMaxLake(Math.floor((val - i*0.1 + j*0.1)*1000)/1000); // } // else if(i>=midR && j<midC) { // grid[i][j]=getMaxLake(Math.floor((val + i*0.1 - j*0.1)*1000)/1000); // } // else if(i>=midR && j>=midC) { // grid[i][j]=getMaxLake(Math.floor((val + i*0.1 + j*0.1)*1000)/1000); // } // else { // grid[i][j] = Math.floor(getMaxLake((i+j) *(i*j))*1000)/1000; // } } } } private static double getMaxLake(double d) { if(d<MAX_DEPTH && MIN_DEPTH<d) return d; if(d>MAX_DEPTH && MIN_DEPTH<d) return getMaxLake(d/2); if(d<MAX_DEPTH && MIN_DEPTH>d) return getMaxLake(d+2); return d; } private static String generateLabel(int numVals) { StringBuilder label = new StringBuilder(); double val = 0.0; for(int i = 0; i<numVals; i++) { val = (getMaxLabel(Math.floor(val+i)*1000)/1000)+5; label.append(val+SPACE); } return label.toString(); } private static double getMaxLabel(double d) { //if(d>100) return getMaxLabel(d/2); return d; } } //the env is just telling matlab to write text to a file //the env file with the bathymetry file lets us write an arrival file and then the arrival file will create the sound file //the sound file //how are bathymetry files and env files related //the environment file defines the depth range, it also must have the same name. that is a given //provides other data, speed of the sound etc. //writen_env is in the acoustic toolbox under matlab readWrite file //bottom coefs might be different
[ "mrn14@duke.edu" ]
mrn14@duke.edu
d4b86920a38e02d40320e580275fc4b706f7a095
bb823d56c991403d679e748b724e0083f6ff7f76
/src/main/java/com/tomaszkyc/app/args/validator/ParameterValidatorFactory.java
effc28578f5b40d04509901b902cc97e6cada358
[ "MIT" ]
permissive
tomaszkyc/database-connection-tester
5373e9e5403c9fc84a47a9806c17b6ecf61306f9
23a98c714f443cd0732b2b67f7362fe4f7187075
refs/heads/master
2020-06-23T18:01:01.991463
2019-07-24T21:01:58
2019-08-19T21:57:03
198,708,692
0
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.tomaszkyc.app.args.validator; import com.tomaszkyc.app.args.ArgType; public class ParameterValidatorFactory { public static ParameterValidator create(ArgType argType) { if ( argType.equals(ArgType.AUTH_PARAM) ) { return new AuthParameterValidator(); } else if ( argType.equals(ArgType.DATABASE_PARAM) ) { return new DatabaseParameterValidator(); } else if ( argType.equals(ArgType.INFORMATION_PARAM) ) { return new InformationParameterValidator(); } else { throw new IllegalArgumentException("Not implemented for argument type: " + argType.name()); } } }
[ "tomasz.kyc@outlook.com" ]
tomasz.kyc@outlook.com
24c3504f1101134530385b7467fdec8f0966e3b1
7527f74d33e0d3466a8ca8611167bfa98181ff79
/commonui/src/main/java/com/example/commonui/ActionBar.java
b135336c24da2bf6f7c66bf3bcbb5b3979d88922
[ "Apache-2.0" ]
permissive
Allen-Yegel/WeatherApp
a8ca97351fee39a5b286ffadcce683e7be034ca5
4d512808d7472f85797c16cd31277bf295c4653a
refs/heads/master
2022-04-10T01:42:52.320170
2020-03-20T14:35:33
2020-03-20T14:35:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,484
java
package com.example.commonui; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; /** * Created by GaryCao on 2018/11/10. */ public class ActionBar extends RelativeLayout { private LayoutInflater mInflater; private RelativeLayout mActionBarView; private TextView mTitleView; private View mLeftActionView; private View mRightActionView; public ActionBar(Context context, AttributeSet attrs) { super(context, attrs); mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mActionBarView = (RelativeLayout) mInflater.inflate(R.layout.actionbar, null); addView(mActionBarView); mTitleView = (TextView) mActionBarView.findViewById(R.id.tv_title); mLeftActionView = (ImageView) mActionBarView.findViewById(R.id.iv_left); mRightActionView = (ImageView) mActionBarView.findViewById(R.id.iv_right); /*custom attrs*/ TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.actionBar); if (typedArray != null) { CharSequence title = typedArray.getString(R.styleable.actionBar_tv_title_str); setTitle(title); Drawable iv_left = typedArray.getDrawable(R.styleable.actionBar_iv_left_icon); if (iv_left != null) { mLeftActionView.setBackground(iv_left); } Drawable iv_right = typedArray.getDrawable(R.styleable.actionBar_iv_right_icon); if (iv_right != null) { mRightActionView.setBackground(iv_right); } typedArray.recycle(); } } public void setLeftOnClickListener(View.OnClickListener listener) { if (null != mLeftActionView) { mLeftActionView.setOnClickListener(listener); } } public void setRightOnClickListener(View.OnClickListener listener) { if (null != mRightActionView) { mRightActionView.setOnClickListener(listener); } } public void setTitle(CharSequence title) { if (title != null) { mTitleView.setText(title); } } public void setTitle(int resid) { mTitleView.setText(resid); } }
[ "gary.cao@example.com" ]
gary.cao@example.com
d5dbea7ad1985d554039cda115a99e9c443a7877
270d8fc5a8720caac8f255383dc6b9d81ab62928
/src/main/java/kg/itbank/chat/controller/api/ChatApiController.java
d19cb1232ee71e8eec48efce7280d1c82f96cd26
[]
no_license
comfiapps/KG-Chat-Project
88ee0c26347768c09047617dd51d3a8be8782c04
b3ceea3b83186e7454297ccc0f5ff9a79c3fae3a
refs/heads/master
2023-05-10T02:03:27.479315
2021-06-09T14:54:42
2021-06-09T14:54:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,123
java
package kg.itbank.chat.controller.api; import kg.itbank.chat.config.PrincipalDetail; import kg.itbank.chat.config.PrincipalService; import kg.itbank.chat.dto.ResponseDto; import kg.itbank.chat.model.User; import kg.itbank.chat.service.ChatService; import kg.itbank.chat.service.RoomService; import kg.itbank.chat.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/chat") public class ChatApiController { @Autowired private ChatService chatService; @GetMapping("/{roomId}") public ResponseDto<?> listChat(@PathVariable long roomId) { return new ResponseDto<>(HttpStatus.OK.value(), chatService.listChatByRoom(roomId)); } }
[ "comfiapps@gmail.com" ]
comfiapps@gmail.com
6e0a5eee2742e123d5e36c8611a3d8ae9dc6d646
9b9acbf6869708e1db8cc1f3feffb5764bb96e38
/src/com/huige/mines/youmi/AppScreenShotScrollView.java
378c25763638f40563769e0dc11e6348b3f44aee
[]
no_license
zhengwenhui/Leigege
2e01356491c57adf13fd3c88c795454e49f110a2
d22bee1bf3e9ef0431f3f3f54ee88960cb7ea01e
refs/heads/master
2020-04-15T07:56:31.331553
2014-10-08T10:30:04
2014-10-08T10:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,119
java
package com.huige.mines.youmi; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.util.AttributeSet; import android.util.TypedValue; import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.LinearLayout; /** * Created by mosida on 13-6-27. */ public class AppScreenShotScrollView extends HorizontalScrollView{ private LinearLayout container; //private ImageView[] imageViews; private Context context; private Bitmap[] bitmaps; private int picWidth = 120; private int picHeight = 180; @SuppressLint("NewApi") public AppScreenShotScrollView(Context context){ super(context); } @SuppressLint("NewApi") public AppScreenShotScrollView(Context context, AttributeSet attr) { super(context, attr); } @SuppressLint("NewApi") public AppScreenShotScrollView(Context context, AttributeSet attr, int paramInt) { super(context, attr, paramInt); } @SuppressLint("NewApi") public void initView(){ this.context = getContext(); container = new LinearLayout(context); container.setLayoutParams(new LinearLayout.LayoutParams(-2, -1)); container.setOrientation(LinearLayout.HORIZONTAL); int padding = count(10.0F, context); container.setPadding(padding/2, padding, padding/2, padding); addView(container); } public void setImages(Bitmap[] bitmaps){ this.picWidth = count(picWidth, context); this.picHeight = count(picHeight, context); int padding = count(5.0F, context); this.bitmaps = bitmaps; for (int i=0; i<bitmaps.length; i++){ LinearLayout.LayoutParams ll = new LinearLayout.LayoutParams(picWidth, picHeight); ll.setMargins(padding,0,padding,0); ImageView imageView = new ImageView(context); imageView.setLayoutParams(ll); imageView.setImageBitmap(bitmaps[i]); imageView.setScaleType(ImageView.ScaleType.FIT_XY); container.addView(imageView); } } public static int count(float theFloat, Context context){ return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, theFloat, context.getResources().getDisplayMetrics()); } }
[ "zhengwenhui@outlook.com" ]
zhengwenhui@outlook.com
19667a27061441ffa447bf152602addfc2146314
a434237dd7ecd4fe6d884bf11325a8cc5fd6ea49
/main-service/src/main/java/com/shatsi/bed/mainservice/domain/repository/ApartmentRepository.java
8e0eded594a855937f30d8daa0718998a8c00fa3
[]
no_license
bwengyebrian/shatsibed
8c95dc186c530b14bb7da56c6c4c9fd6a6b38c71
6c6e4ba470d71b3496fe6f7961e120883c95eda8
refs/heads/master
2020-12-22T18:48:03.888874
2020-01-29T03:34:22
2020-01-29T03:34:22
236,895,871
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
package com.shatsi.bed.mainservice.domain.repository; import com.shatsi.bed.mainservice.domain.model.Apartment; import org.springframework.data.cassandra.repository.CassandraRepository; import org.springframework.data.repository.NoRepositoryBean; import java.util.UUID; @NoRepositoryBean public interface ApartmentRepository extends CassandraRepository<Apartment, UUID> { }
[ "bwengyebrian@gmail.com" ]
bwengyebrian@gmail.com
cfd473b9432a4ac26d454a4c0c74e0738a6adcee
27d5642931fe6dd978cfc3185e649d701eb397da
/Sample2Client1/src/main/java/thoiyk/HumanInterfaceComponent/LaporanProduksiDetail/LaporanProduksiDetailEditDialogClass.java
2fb09d0e46a8fccdc0915501f793594c45245a77
[]
no_license
yoser174/thoiyk
5573c3ca0bbe7890edad0f748c1c72d528a1fd08
6656e120edb69c117d74bbf0516440d96f8eaea6
refs/heads/master
2021-03-12T19:40:47.389645
2014-08-23T02:48:14
2014-08-23T02:48:14
10,585,310
0
1
null
2013-07-06T17:08:08
2013-06-09T15:50:56
Java
UTF-8
Java
false
false
33,753
java
/* This source code is part of the Thoyik Copyright (C) 2013 Yoserizal Feedback / Bug Reports yoser174@gmail.com This project used: KFRAMEWORK (http://k-framework.sourceforge.net/) */ package thoiyk.HumanInterfaceComponent.LaporanProduksiDetail; // k import KFramework30.Base.*; import KFramework30.Widgets.KDialogControllerClass; //app import KFramework30.Widgets.KDialogControllerClass.KDialogInterface; import KFramework30.Widgets.KDropDownFillerClass; import ProblemDomainComponent.LaporanProduksiDetailClass; //import ProblemDomainComponent.productionrecordClass; import java.util.Map; //import thoiyk.HumanInterfaceComponent.PurchaseOrder.PurchaseOrderBrowserClass; // rtl public class LaporanProduksiDetailEditDialogClass extends javax.swing.JDialog implements KDialogInterface { // uses private KConfigurationClass configuration; private KLogClass log; private long parentID; // has defaulted private KDialogControllerClass KDialogController; //end of object persistent functions------------------------------------------------------ /** Creates new form facturaEditDialogClass */ public LaporanProduksiDetailEditDialogClass( KConfigurationClass configurationParam, KLogClass logParam, java.awt.Window parentWindow ) throws KExceptionClass { super( parentWindow, java.awt.Dialog.ModalityType.DOCUMENT_MODAL ); initComponents (); pack (); // setSize( 630, 600 ); KMetaUtilsClass.centerInScreen( this ); // uses configuration = configurationParam; log = logParam; // has - defaulted KDialogController = new KDialogControllerClass( configuration, log, LaporanProduksiDetailClass.class, this, getContentPane() ); } public void initializeDialog(int dialogModeParam, Long ID, Map foreingKeys ) throws KExceptionClass { // start KDialogController.initializeDialog( dialogModeParam, ID, foreingKeys ); checkSecurity(); } //--------------------------------------------------------------------------- private void checkSecurity() throws KExceptionClass { } //--------------------------------------------------------------------------- @Override public void setupTables( long id ) throws KExceptionClass { } public void saveBrowserChanges() { } // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { clientDiscountGroup = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); lblID = new javax.swing.JLabel(); ID = new javax.swing.JLabel(); lblNama = new javax.swing.JLabel(); lblTelp = new javax.swing.JLabel(); qtyLabel = new javax.swing.JTextField(); system_user_id1 = new javax.swing.JLabel(); lblID1 = new javax.swing.JLabel(); itemidLabel = new javax.swing.JLabel(); lblNama1 = new javax.swing.JLabel(); createdbyLbl = new javax.swing.JLabel(); lblNama2 = new javax.swing.JLabel(); itemidLabel2 = new javax.swing.JLabel(); lblTelp1 = new javax.swing.JLabel(); qtyLabel1 = new javax.swing.JTextField(); lblTelp3 = new javax.swing.JLabel(); qtyLabel2 = new javax.swing.JTextField(); lblTelp4 = new javax.swing.JLabel(); qtyLabel3 = new javax.swing.JTextField(); lblTelp5 = new javax.swing.JLabel(); qtyLabel4 = new javax.swing.JTextField(); lblTelp7 = new javax.swing.JLabel(); qtyLabel5 = new javax.swing.JTextField(); lblTelp8 = new javax.swing.JLabel(); qtyLabel6 = new javax.swing.JTextField(); lblTelp12 = new javax.swing.JLabel(); qtyLabel9 = new javax.swing.JTextField(); lblTelp13 = new javax.swing.JLabel(); qtyLabel10 = new javax.swing.JTextField(); lblTelp14 = new javax.swing.JLabel(); qtyLabel11 = new javax.swing.JTextField(); lblTelp15 = new javax.swing.JLabel(); qtyLabel12 = new javax.swing.JTextField(); lblTelp11 = new javax.swing.JLabel(); qtyLabel8 = new javax.swing.JTextField(); qtyLabel13 = new javax.swing.JTextField(); lblTelp16 = new javax.swing.JLabel(); lblTelp17 = new javax.swing.JLabel(); qtyLabel14 = new javax.swing.JTextField(); lblTelp18 = new javax.swing.JLabel(); qtyLabel15 = new javax.swing.JTextField(); lblTelp6 = new javax.swing.JLabel(); qtyLabel7 = new javax.swing.JTextField(); okButton = new javax.swing.JButton(); CancelButton = new javax.swing.JButton(); applyButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Laporan Produksi Detail", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 0, 10))); // NOI18N jPanel1.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N lblID.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N lblID.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); lblID.setText("ID"); ID.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N ID.setBorder(javax.swing.BorderFactory.createEtchedBorder()); ID.setName("ID"); // NOI18N lblNama.setText("ItemID"); lblTelp.setText("Style"); qtyLabel.setName("Style"); // NOI18N system_user_id1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N system_user_id1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); system_user_id1.setName("HdrID"); // NOI18N lblID1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N lblID1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); lblID1.setText("HDRID"); itemidLabel.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N itemidLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemidLabel.setName("ItemID"); // NOI18N lblNama1.setText("CreatedBy"); createdbyLbl.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N createdbyLbl.setBorder(javax.swing.BorderFactory.createEtchedBorder()); createdbyLbl.setName("CreatedBy"); // NOI18N lblNama2.setText("DateCreated"); itemidLabel2.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N itemidLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemidLabel2.setName("DateCreated"); // NOI18N lblTelp1.setText("BuyerID"); qtyLabel1.setName("BuyerID"); // NOI18N lblTelp3.setText("BuyerName"); qtyLabel2.setName("BuyerName"); // NOI18N lblTelp4.setText("Costumer"); qtyLabel3.setName("Costumer"); // NOI18N lblTelp5.setText("S"); qtyLabel4.setName("S"); // NOI18N lblTelp7.setText("M"); qtyLabel5.setName("M"); // NOI18N lblTelp8.setText("L"); qtyLabel6.setName("L"); // NOI18N lblTelp12.setText("XL"); qtyLabel9.setName("XL"); // NOI18N lblTelp13.setText("XXL"); qtyLabel10.setName("XXL"); // NOI18N lblTelp14.setText("XXXL"); qtyLabel11.setName("XXXL"); // NOI18N lblTelp15.setText("Reject"); qtyLabel12.setName("Reject"); // NOI18N lblTelp11.setText("Color"); qtyLabel8.setName("Color"); // NOI18N qtyLabel13.setName("RepackCode"); // NOI18N lblTelp16.setText("Repack Code"); lblTelp17.setText("Qty of Pack"); qtyLabel14.setName("QtyOfPack"); // NOI18N lblTelp18.setText("Ref#"); qtyLabel15.setName("Ref0"); // NOI18N lblTelp6.setText("XS"); qtyLabel7.setName("XS"); // NOI18N org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(4, 4, 4) .add(lblID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .addContainerGap() .add(lblNama)) .add(jPanel1Layout.createSequentialGroup() .add(6, 6, 6) .add(lblID1))) .add(22, 22, 22)) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() .add(lblTelp) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED))) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(system_user_id1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(itemidLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(378, 378, 378)) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(ID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(qtyLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 190, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(0, 0, Short.MAX_VALUE)))) .add(jPanel1Layout.createSequentialGroup() .addContainerGap() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lblNama2) .add(lblNama1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(createdbyLbl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(itemidLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(258, 258, 258)) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(8, 8, 8) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(qtyLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp16) .add(18, 18, 18) .add(qtyLabel13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(31, 31, 31) .add(lblTelp4)) .add(org.jdesktop.layout.GroupLayout.TRAILING, lblTelp11)) .add(18, 18, 18) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(qtyLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(qtyLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp8) .add(18, 18, 18) .add(qtyLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp7) .add(18, 18, 18) .add(qtyLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp13) .add(18, 18, 18) .add(qtyLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp12) .add(18, 18, 18) .add(qtyLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp15) .add(18, 18, 18) .add(qtyLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp14) .add(18, 18, 18) .add(qtyLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp5) .add(18, 18, 18) .add(qtyLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp17) .add(18, 18, 18) .add(qtyLabel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(10, 10, 10) .add(lblTelp6) .add(18, 18, 18) .add(qtyLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createSequentialGroup() .add(lblTelp18) .add(18, 18, 18) .add(qtyLabel15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))) .add(jPanel1Layout.createSequentialGroup() .add(27, 27, 27) .add(lblTelp1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(qtyLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .add(2, 2, 2) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lblID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(ID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(lblID1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(system_user_id1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(lblNama) .add(itemidLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp3) .add(qtyLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp11) .add(qtyLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp16)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp17)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(qtyLabel15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lblTelp18)) .add(1, 1, 1) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp6) .add(qtyLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp5) .add(qtyLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp7) .add(qtyLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp8) .add(qtyLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(1, 1, 1) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp12) .add(qtyLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp13) .add(qtyLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp14) .add(qtyLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lblTelp15) .add(qtyLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(35, 35, 35) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lblNama1) .add(createdbyLbl, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lblNama2) .add(itemidLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); okButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N okButton.setText("Ok"); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(evt); } }); CancelButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N CancelButton.setText("Cancel"); CancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CloseButtonActionPerformed(evt); } }); applyButton.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N applyButton.setText("Apply"); // NOI18N applyButton.setName("applyButton"); // NOI18N applyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { applyButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 510, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(okButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(CancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(applyButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(20, 20, 20)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(58, 58, 58) .add(okButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(10, 10, 10) .add(CancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(10, 10, 10) .add(applyButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }// </editor-fold>//GEN-END:initComponents private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed // calculate //qtyneedLabel.setText(Long.toString( String.valueOf("s") )); //qtyneedLabel.setText((qtyLabel.getText() * compLabel.getText() * toleranceLabel.getText()); try { createdbyLbl.setText(configuration.getField( "system_user_name" )); KDialogController.OKbuttonActionPerformed(); setVisible (false); dispose (); } catch (KExceptionClass error ) { // log error log.log( this, KMetaUtilsClass.getStackTrace( error ) ); // show error message KMetaUtilsClass.showErrorMessageFromException( getOwner(), error ); } }//GEN-LAST:event_okButtonActionPerformed private void CloseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CloseButtonActionPerformed setVisible (false); dispose (); }//GEN-LAST:event_CloseButtonActionPerformed /** Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog setVisible (false); dispose (); }//GEN-LAST:event_closeDialog private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed try { KDialogController.OKbuttonActionPerformed(); } catch (KExceptionClass error ) { // log error log.log( this, KMetaUtilsClass.getStackTrace( error ) ); // show error message KMetaUtilsClass.showErrorMessageFromException( getOwner(), error ); } }//GEN-LAST:event_applyButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton CancelButton; private javax.swing.JLabel ID; private javax.swing.JButton applyButton; private javax.swing.ButtonGroup clientDiscountGroup; private javax.swing.JLabel createdbyLbl; private javax.swing.JLabel itemidLabel; private javax.swing.JLabel itemidLabel2; private javax.swing.JPanel jPanel1; private javax.swing.JLabel lblID; private javax.swing.JLabel lblID1; private javax.swing.JLabel lblNama; private javax.swing.JLabel lblNama1; private javax.swing.JLabel lblNama2; private javax.swing.JLabel lblTelp; private javax.swing.JLabel lblTelp1; private javax.swing.JLabel lblTelp11; private javax.swing.JLabel lblTelp12; private javax.swing.JLabel lblTelp13; private javax.swing.JLabel lblTelp14; private javax.swing.JLabel lblTelp15; private javax.swing.JLabel lblTelp16; private javax.swing.JLabel lblTelp17; private javax.swing.JLabel lblTelp18; private javax.swing.JLabel lblTelp3; private javax.swing.JLabel lblTelp4; private javax.swing.JLabel lblTelp5; private javax.swing.JLabel lblTelp6; private javax.swing.JLabel lblTelp7; private javax.swing.JLabel lblTelp8; private javax.swing.JButton okButton; private javax.swing.JTextField qtyLabel; private javax.swing.JTextField qtyLabel1; private javax.swing.JTextField qtyLabel10; private javax.swing.JTextField qtyLabel11; private javax.swing.JTextField qtyLabel12; private javax.swing.JTextField qtyLabel13; private javax.swing.JTextField qtyLabel14; private javax.swing.JTextField qtyLabel15; private javax.swing.JTextField qtyLabel2; private javax.swing.JTextField qtyLabel3; private javax.swing.JTextField qtyLabel4; private javax.swing.JTextField qtyLabel5; private javax.swing.JTextField qtyLabel6; private javax.swing.JTextField qtyLabel7; private javax.swing.JTextField qtyLabel8; private javax.swing.JTextField qtyLabel9; private javax.swing.JLabel system_user_id1; // End of variables declaration//GEN-END:variables }
[ "yoserizy@RJAMDMW7077.asia.roche.com" ]
yoserizy@RJAMDMW7077.asia.roche.com
84ea43b98ca192b994bd54955018bb407cc11003
cb3b98b3f01dc774e7aa559689bb550e9371ea40
/zk_cpr/src/main/java/org/zkoss/spring/util/PropertyPlaceholderHelper.java
a76a6691e9857a148adaf47817bbeff9b4005e87
[]
no_license
RaymondChao/ZK-CPR
a13f8de0ded09ab72665b1166a0afc9f2359000c
db5475876d2349d354a0e7aad18f5e8d5a3e13d4
refs/heads/master
2020-12-25T10:59:50.583493
2012-05-02T08:23:19
2012-05-02T08:23:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,560
java
/* * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.zkoss.spring.util; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Properties; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Utility class for working with Strings that have placeholder values in them. A placeholder takes the form * <code>${name}</code>. Using <code>PropertyPlaceholderHelper</code> these placeholders can be substituted for * user-supplied values. <p> Values for substitution can be supplied using a {@link Properties} instance or * using a {@link PlaceholderResolver}. * * @author Juergen Hoeller * @author Rob Harrop * @since 3.0 */ public class PropertyPlaceholderHelper { private static final Log logger = LogFactory.getLog(PropertyPlaceholderHelper.class); private static final Map<String, String> wellKnownSimplePrefixes = new HashMap<String, String>(4); static { wellKnownSimplePrefixes.put("}", "{"); wellKnownSimplePrefixes.put("]", "["); wellKnownSimplePrefixes.put(")", "("); } private final String placeholderPrefix; private final String placeholderSuffix; private final String simplePrefix; private final String valueSeparator; private final boolean ignoreUnresolvablePlaceholders; /** * Creates a new <code>PropertyPlaceholderHelper</code> that uses the supplied prefix and suffix. * Unresolvable placeholders are ignored. * @param placeholderPrefix the prefix that denotes the start of a placeholder. * @param placeholderSuffix the suffix that denotes the end of a placeholder. */ public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix) { this(placeholderPrefix, placeholderSuffix, null, true); } /** * Creates a new <code>PropertyPlaceholderHelper</code> that uses the supplied prefix and suffix. * @param placeholderPrefix the prefix that denotes the start of a placeholder * @param placeholderSuffix the suffix that denotes the end of a placeholder * @param valueSeparator the separating character between the placeholder variable * and the associated default value, if any * @param ignoreUnresolvablePlaceholders indicates whether unresolvable placeholders should be ignored * (<code>true</code>) or cause an exception (<code>false</code>). */ public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix, String valueSeparator, boolean ignoreUnresolvablePlaceholders) { Assert.notNull(placeholderPrefix, "placeholderPrefix must not be null"); Assert.notNull(placeholderSuffix, "placeholderSuffix must not be null"); this.placeholderPrefix = placeholderPrefix; this.placeholderSuffix = placeholderSuffix; String simplePrefixForSuffix = wellKnownSimplePrefixes.get(this.placeholderSuffix); if (simplePrefixForSuffix != null && this.placeholderPrefix.endsWith(simplePrefixForSuffix)) { this.simplePrefix = simplePrefixForSuffix; } else { this.simplePrefix = this.placeholderPrefix; } this.valueSeparator = valueSeparator; this.ignoreUnresolvablePlaceholders = ignoreUnresolvablePlaceholders; } /** * Replaces all placeholders of format <code>${name}</code> with the corresponding property * from the supplied {@link Properties}. * @param value the value containing the placeholders to be replaced. * @param properties the <code>Properties</code> to use for replacement. * @return the supplied value with placeholders replaced inline. */ public String replacePlaceholders(String value, final Properties properties) { Assert.notNull(properties, "Argument 'properties' must not be null."); return replacePlaceholders(value, new PlaceholderResolver() { public String resolvePlaceholder(String placeholderName) { return properties.getProperty(placeholderName); } }); } /** * Replaces all placeholders of format <code>${name}</code> with the value returned from the supplied * {@link PlaceholderResolver}. * @param value the value containing the placeholders to be replaced. * @param placeholderResolver the <code>PlaceholderResolver</code> to use for replacement. * @return the supplied value with placeholders replaced inline. */ public String replacePlaceholders(String value, PlaceholderResolver placeholderResolver) { Assert.notNull(value, "Argument 'value' must not be null."); return parseStringValue(value, placeholderResolver, new HashSet<String>()); } protected String parseStringValue( String strVal, PlaceholderResolver placeholderResolver, Set<String> visitedPlaceholders) { StringBuilder buf = new StringBuilder(strVal); int startIndex = strVal.indexOf(this.placeholderPrefix); while (startIndex != -1) { int endIndex = findPlaceholderEndIndex(buf, startIndex); if (endIndex != -1) { String placeholder = buf.substring(startIndex + this.placeholderPrefix.length(), endIndex); if (!visitedPlaceholders.add(placeholder)) { throw new IllegalArgumentException( "Circular placeholder reference '" + placeholder + "' in property definitions"); } // Recursive invocation, parsing placeholders contained in the placeholder key. placeholder = parseStringValue(placeholder, placeholderResolver, visitedPlaceholders); // Now obtain the value for the fully resolved key... String propVal = placeholderResolver.resolvePlaceholder(placeholder); if (propVal == null && this.valueSeparator != null) { int separatorIndex = placeholder.indexOf(this.valueSeparator); if (separatorIndex != -1) { String actualPlaceholder = placeholder.substring(0, separatorIndex); String defaultValue = placeholder.substring(separatorIndex + this.valueSeparator.length()); propVal = placeholderResolver.resolvePlaceholder(actualPlaceholder); if (propVal == null) { propVal = defaultValue; } } } if (propVal != null) { // Recursive invocation, parsing placeholders contained in the // previously resolved placeholder value. propVal = parseStringValue(propVal, placeholderResolver, visitedPlaceholders); buf.replace(startIndex, endIndex + this.placeholderSuffix.length(), propVal); if (logger.isTraceEnabled()) { logger.trace("Resolved placeholder '" + placeholder + "'"); } startIndex = buf.indexOf(this.placeholderPrefix, startIndex + propVal.length()); } else if (this.ignoreUnresolvablePlaceholders) { // Proceed with unprocessed value. startIndex = buf.indexOf(this.placeholderPrefix, endIndex + this.placeholderSuffix.length()); } else { throw new IllegalArgumentException("Could not resolve placeholder '" + placeholder + "'"); } visitedPlaceholders.remove(placeholder); } else { startIndex = -1; } } return buf.toString(); } private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { int index = startIndex + this.placeholderPrefix.length(); int withinNestedPlaceholder = 0; while (index < buf.length()) { if (StringUtils.substringMatch(buf, index, this.placeholderSuffix)) { if (withinNestedPlaceholder > 0) { withinNestedPlaceholder--; index = index + this.placeholderSuffix.length(); } else { return index; } } else if (StringUtils.substringMatch(buf, index, this.simplePrefix)) { withinNestedPlaceholder++; index = index + this.simplePrefix.length(); } else { index++; } } return -1; } /** * Strategy interface used to resolve replacement values for placeholders contained in Strings. * @see PropertyPlaceholderHelper */ public static interface PlaceholderResolver { /** * Resolves the supplied placeholder name into the replacement value. * @param placeholderName the name of the placeholder to resolve. * @return the replacement value or <code>null</code> if no replacement is to be made. */ String resolvePlaceholder(String placeholderName); } }
[ "zanyking@gmail.com" ]
zanyking@gmail.com
5a4f4cb4d0d6109c2b69890b2eb25d90103822ae
d68fc76582a0598123ad2c89c9f1185b32e29110
/src/net/octopusmc/anvil/version/Version.java
a6173a185a9df8f97a92c7dfa5e61938e096d5ec
[]
no_license
ElieTGM/OctopusCore
624fa18634afd05adb16b3b06433b39cbe514f37
d688b110e34f9ce00781f96a8f1b5dc1d267b6b2
refs/heads/master
2021-03-24T12:39:53.256741
2017-02-12T18:45:00
2017-02-12T18:51:10
81,053,435
0
0
null
null
null
null
UTF-8
Java
false
false
4,259
java
/* * Copyright (c) 2016, OctopusMC and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of OctopusMC or the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 net.octopusmc.anvil.version; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import net.octopusmc.anvil.version.impl.Wrapper1_8_R3; import java.util.Arrays; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; /** * Contains all of the {@link VersionWrapper}s * @author ElieTGM * @since 1.0 */ public enum Version { /** * The {@link Wrapper1_8_R3} value */ ONE_EIGHT_R3("1_8_R3", Wrapper1_8_R3.class); /** * A {@link LoadingCache} of VersionWrappers that are kept until 5 minutes of no use */ private static final LoadingCache<Class<? extends VersionWrapper>, VersionWrapper> WRAPPER_CACHE = CacheBuilder.newBuilder() .maximumSize(values().length) .expireAfterWrite(5, TimeUnit.MINUTES) .build(new CacheLoader<Class<? extends VersionWrapper>, VersionWrapper>() { @Override public VersionWrapper load(Class<? extends VersionWrapper> aClass) throws Exception { return aClass.newInstance(); } }); /** * The package value of this NMS version */ private final String pkg; /** * The {@link VersionWrapper} class for this NMS version */ private final Class<? extends VersionWrapper> wrapper; /** * Creates a new value Version value * @param pkg The package value of this NMS version * @param wrapper The {@link VersionWrapper} class for this NMS version */ Version(String pkg, Class<? extends VersionWrapper> wrapper) { this.pkg = pkg; this.wrapper = wrapper; } /** * Gets the package value of this NMS version * @return The package value */ public String getPkg() { return pkg; } /** * Gets the {@link VersionWrapper} for this NMS version * @return The {@link VersionWrapper} for this NMS version */ public VersionWrapper getWrapper() { try { return WRAPPER_CACHE.get(wrapper); } catch (ExecutionException e) { throw new RuntimeException(e); } } /** * Finds the {@link Version} from the NMS package value * @param pkg The NMS package value * @return The {@link Version}, or null if no version is found */ public static Version of(final String pkg) { return Arrays.stream(values()).filter(ver -> pkg.equals("v" + ver.getPkg())).findFirst().orElse(null); } }
[ "ElieTGM1@gmail.com" ]
ElieTGM1@gmail.com
a824d57b726346b11afc3da4358387d5bf93cad1
f82b19bd7b41c7493be4d7dd6587ae26e0586200
/src/DragonflyImages.java
d49298252acc623a713524efec44f90d2132cc40
[]
no_license
chancedream/Flower
9c1c9ae4362e1a129bcc2c38c115cae38bbf70f0
308c6a9fa339d0fd3e8755431c8e612ba5a64098
refs/heads/master
2020-12-30T10:12:40.831480
2011-09-05T05:35:03
2011-09-05T05:35:03
2,325,968
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; public class DragonflyImages { private static Map<Color, BufferedImage> map; static { map = new HashMap<Color, BufferedImage>(); for (Color color : Color.values()) { try { BufferedImage image = ImageIO.read(new File(String.format("res/%sd.png", color.toString().toLowerCase()))); map.put(color, image); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static BufferedImage get(Color color) { return map.get(color); } }
[ "chancedream@gmail.com" ]
chancedream@gmail.com
32b95c9f86fef59c13cabb9de7d1e01340c93065
6b3a781d420c88a3a5129638073be7d71d100106
/AdProxyPersist/src/main/java/com/ocean/persist/api/proxy/gmobi/GmobiAdPullParams.java
2107cec90c260bf169793a315d365e105cfac545
[]
no_license
Arthas-sketch/FrexMonitor
02302e8f7be1a68895b9179fb3b30537a6d663bd
125f61fcc92f20ce948057a9345432a85fe2b15b
refs/heads/master
2021-10-26T15:05:59.996640
2019-04-13T07:52:57
2019-04-13T07:52:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,761
java
package com.ocean.persist.api.proxy.gmobi; import com.ocean.core.common.threadpool.AbstractInvokeParameter; /** * @author Alex & E-mail:569246607@qq.com @date 2017年8月16日 @version 1.0 */ public class GmobiAdPullParams extends AbstractInvokeParameter{ /** * */ private static final long serialVersionUID = -8436918410128283915L; private String app; private String key; private String placement; private String type; private String adid; private String ua; private String os; private String os_v; private String net; private String ip; private int count; private String caps; private String imei; private String sn; private int iw; private int ih; private String strict; private int sw; private int sh; //loc @Override public boolean validate() { return false; // TODO Auto-generated method stub } public String getApp() { return app; } public void setApp(String app) { this.app = app; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getPlacement() { return placement; } public void setPlacement(String placement) { this.placement = placement; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getAdid() { return adid; } public void setAdid(String adid) { this.adid = adid; } public String getUa() { return ua; } public void setUa(String ua) { this.ua = ua; } public String getOs() { return os; } public void setOs(String os) { this.os = os; } public String getOs_v() { return os_v; } public void setOs_v(String os_v) { this.os_v = os_v; } public String getNet() { return net; } public void setNet(String net) { this.net = net; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getCaps() { return caps; } public void setCaps(String caps) { this.caps = caps; } public String getImei() { return imei; } public void setImei(String imei) { this.imei = imei; } public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public int getIw() { return iw; } public void setIw(int iw) { this.iw = iw; } public int getIh() { return ih; } public void setIh(int ih) { this.ih = ih; } public String getStrict() { return strict; } public void setStrict(String strict) { this.strict = strict; } public int getSw() { return sw; } public void setSw(int sw) { this.sw = sw; } public int getSh() { return sh; } public void setSh(int sh) { this.sh = sh; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } }
[ "569246607@qq.com" ]
569246607@qq.com
832960119ff6bcfb52acac52e661948764fb5f87
b5a9bd1d225dcda06e3d0df66f03ce9d17dd3db8
/springboot/src/test/java/com/davidjava/springboot/SpringbootApplicationTests.java
4864a09c7fb35199d05bb906324e680b53feb1dc
[]
no_license
davidxwwang/JAVA-Study
f139063769b4fffc7e64027695d6937453e71993
d5e969b47710c5a8bda66038c4e95b518dbb0df0
refs/heads/master
2022-07-03T03:51:50.920374
2019-10-29T03:35:21
2019-10-29T03:35:21
138,006,432
0
0
null
2022-06-21T01:28:33
2018-06-20T08:58:52
Java
UTF-8
Java
false
false
229
java
package com.davidjava.springboot; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringbootApplicationTests { @Test void contextLoads() { } }
[ "xingwang.wxw@alibaba-inc.com" ]
xingwang.wxw@alibaba-inc.com
65937f8ebf952fab726b5b03c6dcd125112d52bd
b974a0a284a72d092cee1de08939e55af0400cd1
/src/main/java/com/cadpessoa/config/ApplicationProperties.java
c0fea5377b8277653a1770e41012fb535ca86461
[]
no_license
ricardoempro/cadpessoa
a422e02f26e88fe5f96ca5c5f4cd1342bcac25a7
5ea5613774f542741442b5953d18eaca5c1d1705
refs/heads/master
2021-01-01T17:40:43.742093
2017-07-23T23:41:51
2017-07-23T23:41:51
98,132,137
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package com.cadpessoa.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to JHipster. * <p> * Properties are configured in the application.yml file. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
dbe9b218c6f81927a342ac0e3214577511a69c37
c0da1bf505a9983622935387ad4883a7fbaef999
/src/mapred/org/apache/hadoop/mapred/PipelineMapTask.java
dd9088000d03fcf25fc485e47da737c07370bf98
[ "Apache-2.0" ]
permissive
zhangyf-neu/i-mapreduce
4b0adf551076538d6f113283a0a92f8a16ef90f8
7a9131437110c7c5fc72ca42e12902f7b13429b1
refs/heads/master
2021-01-21T12:58:31.802536
2016-05-10T06:02:25
2016-05-10T06:02:25
53,575,393
0
1
null
null
null
null
UTF-8
Java
false
false
11,230
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.hadoop.mapred; import java.io.DataInput; import java.io.DataInputStream; import java.io.DataOutput; import java.io.DataOutputStream; import java.io.IOException; import java.net.URI; import java.util.HashSet; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.DataInputBuffer; import org.apache.hadoop.io.compress.CompressionCodec; import org.apache.hadoop.io.compress.DefaultCodec; import org.apache.hadoop.io.serializer.Deserializer; import org.apache.hadoop.io.serializer.SerializationFactory; import org.apache.hadoop.mapred.TaskCompletionEvent.Status; import org.apache.hadoop.mapred.buffer.BufferUmbilicalProtocol; import org.apache.hadoop.mapred.buffer.OutputFile; import org.apache.hadoop.mapred.buffer.OutputFile.Header; import org.apache.hadoop.mapred.buffer.impl.JOutputBuffer; import org.apache.hadoop.mapred.buffer.impl.ValuesIterator; import org.apache.hadoop.mapred.buffer.net.BufferExchange; import org.apache.hadoop.mapred.buffer.net.BufferRequest; import org.apache.hadoop.mapred.buffer.net.BufferExchangeSink; import org.apache.hadoop.mapred.buffer.net.ReduceBufferRequest; import org.apache.hadoop.util.Progress; import org.apache.hadoop.util.ReflectionUtils; public class PipelineMapTask extends MapTask implements InputCollector { private static final Log LOG = LogFactory.getLog(PipelineMapTask.class.getName()); private class ReduceOutputFetcher extends Thread { private TaskID reduceTaskId; private TaskUmbilicalProtocol trackerUmbilical; private BufferUmbilicalProtocol bufferUmbilical; private BufferExchangeSink sink; public ReduceOutputFetcher(TaskUmbilicalProtocol trackerUmbilical, BufferUmbilicalProtocol bufferUmbilical, BufferExchangeSink sink, TaskID reduceTaskId) { this.trackerUmbilical = trackerUmbilical; this.bufferUmbilical = bufferUmbilical; this.sink = sink; this.reduceTaskId = reduceTaskId; } public void run() { boolean requestSent = false; int eid = 0; while (true) { try { ReduceTaskCompletionEventsUpdate updates = trackerUmbilical.getReduceCompletionEvents(getJobID(), eid, Integer.MAX_VALUE); eid += updates.events.length; // Process the TaskCompletionEvents: // 1. Save the SUCCEEDED maps in knownOutputs to fetch the outputs. // 2. Save the OBSOLETE/FAILED/KILLED maps in obsoleteOutputs to stop fetching // from those maps. // 3. Remove TIPFAILED maps from neededOutputs since we don't need their // outputs at all. for (TaskCompletionEvent event : updates.events) { switch (event.getTaskStatus()) { case FAILED: case KILLED: case OBSOLETE: case TIPFAILED: return; case SUCCEEDED: if (requestSent) return; case RUNNING: { URI u = URI.create(event.getTaskTrackerHttp()); String host = u.getHost(); TaskAttemptID reduceAttemptId = event.getTaskAttemptId(); if (reduceAttemptId.getTaskID().equals(reduceTaskId) && !requestSent) { LOG.debug("Map " + getTaskID() + " sending buffer request to reducer " + reduceAttemptId); BufferExchange.BufferType type = BufferExchange.BufferType.FILE; if (snapshots) type = BufferExchange.BufferType.SNAPSHOT; if (stream) type = BufferExchange.BufferType.STREAM; BufferRequest request = new ReduceBufferRequest(host, getTaskID(), sink.getAddress(), type, reduceTaskId); try { bufferUmbilical.request(request); requestSent = true; if (event.getTaskStatus() == Status.SUCCEEDED) return; } catch (IOException e) { LOG.warn("BufferUmbilical problem sending request " + request + ". " + e); } } } break; } } } catch (IOException e) { e.printStackTrace(); } try { Thread.sleep(1000); } catch (InterruptedException e) { } } } } private JOutputBuffer buffer = null; private Mapper mapper; private BufferUmbilicalProtocol bufferUmbilical; private Reporter reporter; private Deserializer keyDeserializer; private Deserializer valDeserializer; private boolean snapshots = false; private boolean stream = false; public PipelineMapTask() { super(); } public PipelineMapTask(String jobFile, TaskAttemptID taskId, int partition) { super(jobFile, taskId, partition, "", new BytesWritable(), false); } @Override public int getNumberOfInputs() { return 1; } @Override public boolean isPipeline() { return !(jobCleanup || jobSetup || taskCleanup); } public TaskID pipelineReduceTask(JobConf job) { JobID reduceJobId = JobID.forName(job.get("mapred.job.pipeline")); return new TaskID(reduceJobId, false, getTaskID().getTaskID().id); } @Override public void localizeConfiguration(JobConf conf) throws IOException { super.localizeConfiguration(conf); } @Override public void write(DataOutput out) throws IOException { super.write(out); } @Override public void readFields(DataInput in) throws IOException { super.readFields(in); } @Override @SuppressWarnings("unchecked") public void run(final JobConf job, final TaskUmbilicalProtocol umbilical, final BufferUmbilicalProtocol bufferUmbilical) throws IOException { this.reporter = getReporter(umbilical); this.bufferUmbilical = bufferUmbilical; // start thread that will handle communication with parent startCommunicationThread(umbilical); initialize(job, reporter); // check if it is a cleanupJobTask if (jobCleanup) { runJobCleanupTask(umbilical); return; } if (jobSetup) { runJobSetupTask(umbilical); return; } if (taskCleanup) { runTaskCleanupTask(umbilical); return; } if (job.get("mapred.job.pipeline", null) == null) { throw new IOException("PipelineMapTask: mapred.job.pipeline is not defined!"); } setPhase(TaskStatus.Phase.PIPELINE); Class inputKeyClass = job.getInputKeyClass(); Class inputValClass = job.getInputValueClass(); SerializationFactory serializationFactory = new SerializationFactory(job); keyDeserializer = serializationFactory.getDeserializer(inputKeyClass); valDeserializer = serializationFactory.getDeserializer(inputValClass); int numReduceTasks = job.getNumReduceTasks(); if (numReduceTasks == 0) { throw new IOException("PipelineMaptask has no reduce tasks!"); } snapshots = job.getBoolean("mapred.job.input.snapshots", false); this.mapper = ReflectionUtils.newInstance(job.getMapperClass(), job); /* This object will be the sink's input buffer. */ BufferExchangeSink sink = new BufferExchangeSink(job, this, this); sink.open(); /* Start the reduce output fetcher */ TaskID reduceTaskId = pipelineReduceTask(job); ReduceOutputFetcher rof = new ReduceOutputFetcher(umbilical, bufferUmbilical, sink, reduceTaskId); rof.setDaemon(true); long timestamp = System.currentTimeMillis(); synchronized (this) { LOG.info("PipelineMapTask: copy phase."); setPhase(TaskStatus.Phase.SHUFFLE); rof.start(); while (!sink.complete()) { setProgressFlag(); try { this.wait(); } catch (InterruptedException e) { } } LOG.info("PipelineMapTask: copy input took " + (System.currentTimeMillis() - timestamp) + " ms."); } setPhase(TaskStatus.Phase.MAP); setProgressFlag(); sink.close(); timestamp = System.currentTimeMillis(); getProgress().complete(); setProgressFlag(); /* OutputFile finalOutput = this.buffer.close(); bufferUmbilical.output(finalOutput); */ getProgress().complete(); LOG.info("PipelineMapTask: took " + (System.currentTimeMillis() - timestamp) + " ms to finalize final output."); done(umbilical); } @Override public void flush() throws IOException { // TODO Auto-generated method stub } @Override public void free() { // TODO Auto-generated method stub } @Override public synchronized boolean read(DataInputStream istream, Header header) throws IOException { CompressionCodec codec = null; Class<? extends CompressionCodec> codecClass = null; if (conf.getCompressMapOutput()) { codecClass = conf.getMapOutputCompressorClass(DefaultCodec.class); codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, conf); } if (this.buffer == null) { Class outputKeyClass = conf.getMapOutputKeyClass(); Class outputValClass = conf.getMapOutputValueClass(); this.buffer = new JOutputBuffer(bufferUmbilical, this, conf, reporter, getProgress(), false, outputKeyClass, outputValClass, codecClass); } else { this.buffer.malloc(); } IFile.Reader reader = new IFile.Reader(conf, istream, header.compressed(), codec, null); DataInputBuffer key = new DataInputBuffer(); DataInputBuffer value = new DataInputBuffer(); Object keyObject = null; Object valObject = null; while (reader.next(key, value)) { keyDeserializer.open(key); valDeserializer.open(value); keyObject = keyDeserializer.deserialize(keyObject); valObject = valDeserializer.deserialize(valObject); mapper.map(keyObject, valObject, buffer, reporter); } /* Note: do not close reader otherwise input stream will be closed as well. */ if (header.type() == OutputFile.Type.SNAPSHOT) { LOG.info("PipelineMapTask forward snapshot. progress = " + header.progress()); /* forward snapshot data. */ getProgress().set(header.progress()); OutputFile snapshot = buffer.snapshot(); bufferUmbilical.output(snapshot); } else if (header.type() == OutputFile.Type.STREAM) { OutputFile.StreamHeader streamHeader = (OutputFile.StreamHeader) header; LOG.info("PipelineMapTask forward stream. sequence = " + streamHeader.sequence()); buffer.stream(streamHeader.sequence(), false); } this.buffer.free(); /* Get ready for the next round */ this.mapper = ReflectionUtils.newInstance(conf.getMapperClass(), conf); return true; } @Override public ValuesIterator valuesIterator() throws IOException { // TODO Auto-generated method stub return null; } @Override public void close() { // TODO Auto-generated method stub } }
[ "threewells14@gmail.com" ]
threewells14@gmail.com
397dc9cc8aa7ab0fbfe6e95c8205928761552ccb
f8c20e3e27425aae340b37d4190f350e4fceeba9
/collectorProjectOld/src/main/java/sopra/formation/model/Utilisateur.java
f9047cea4250ff844ebb1197a39dc699d20b75fe
[]
no_license
Metazimut/collectorProject
f58eb7053a28b5fa623b9f92de83ffcbc0cfd699
b75ef03534969a9d6f7823271305a99ed4897f69
refs/heads/main
2023-07-14T20:17:58.551684
2021-08-19T15:10:52
2021-08-19T15:10:52
385,596,834
0
0
null
null
null
null
UTF-8
Java
false
false
2,430
java
package sopra.formation.model; import java.util.ArrayList; import java.util.List; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.OneToMany; @Entity @DiscriminatorValue("user") public class Utilisateur extends Compte { @Column(name = "moyenPaiement") private MoyenPaiement moyenPaiement; @OneToMany(mappedBy = "auteur") private List<Field> fields = new ArrayList<Field>(); @OneToMany(mappedBy = "utilisateur") private List<Commentaire> commentaires = new ArrayList<Commentaire>(); @OneToMany(mappedBy = "publicateur") private List<Publication> publications = new ArrayList<Publication>(); @OneToMany(mappedBy = "utilisateur") private List<ParticipationEnchere> encheres = new ArrayList<ParticipationEnchere>(); @OneToMany(mappedBy = "envoyeur") private List<Message> envoi = new ArrayList<Message>(); @OneToMany(mappedBy = "recepteur") private List<Message> reçoit = new ArrayList<Message>(); public Utilisateur() { super(); } public MoyenPaiement getMoyenPaiement() { return moyenPaiement; } public void setMoyenPaiement(MoyenPaiement moyenPaiement) { this.moyenPaiement = moyenPaiement; } public List<Field> getFields() { return fields; } public void setFields(List<Field> fields) { this.fields = fields; } public List<Commentaire> getCommentaires() { return commentaires; } public void setCommentaires(List<Commentaire> commentaires) { this.commentaires = commentaires; } public List<Publication> getPublications() { return publications; } public void setPublications(List<Publication> publications) { this.publications = publications; } public List<ParticipationEnchere> getEncheres() { return encheres; } public void setEncheres(List<ParticipationEnchere> encheres) { this.encheres = encheres; } public List<Message> getEnvoi() { return envoi; } public void setEnvoi(List<Message> envoi) { this.envoi = envoi; } public List<Message> getReçoit() { return reçoit; } public void setReçoit(List<Message> reçoit) { this.reçoit = reçoit; } @Override public String toString() { return "Utilisateur [moyenPaiement=" + moyenPaiement + ", fields=" + fields + ", commentaires=" + commentaires + ", publications=" + publications + ", encheres=" + encheres + ", envoi=" + envoi + ", reçoit=" + reçoit + "]"; } }
[ "w.mathieu.dk59@gmail.com" ]
w.mathieu.dk59@gmail.com
6ddadc53cad9b80fb973e99dc0ee6b07b8a0e52d
4703e0aab857e40f979f2203933ad0470cfb32c3
/app/src/main/java/linhtruong/com/mershop/network/http/OkHttpFactory.java
6d2f8bff5a1d80702efbe2c927ef2ecffd205718
[]
no_license
truongngoclinh/android_base_mvp_rx
0fa188ecafdd12a03c024fd22265bc4d8bdbe827
726c40eef32f28824d8ac7f8928fc6bd4fcccdff
refs/heads/master
2020-03-31T09:31:21.390056
2018-10-08T15:07:14
2018-10-08T15:07:14
152,099,008
0
0
null
null
null
null
UTF-8
Java
false
false
1,930
java
package linhtruong.com.mershop.network.http; import linhtruong.com.commons.managers.MSFileManager; import linhtruong.com.network.BuildConfig; import linhtruong.com.network.NetworkConst; import linhtruong.com.network.http.HttpImageCacheInterceptor; import linhtruong.com.network.http.HttpTimeStatisticInterceptor; import linhtruong.com.network.http.HttpUserAgentInterceptor; import okhttp3.Cache; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; import java.io.File; import java.util.concurrent.TimeUnit; /** * Http * * @author linhtruong * @date 10/1/18 - 16:32. * @organization VED */ public class OkHttpFactory { public static OkHttpClient buildCommon() { return new OkHttpClient.Builder() .addInterceptor(new HttpUserAgentInterceptor()) .addInterceptor(new HttpLoggingInterceptor().setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.NONE)) .addNetworkInterceptor(new HttpTimeStatisticInterceptor()) .connectTimeout(NetworkConst.HTTP_CONN_TIMEOUT, TimeUnit.MILLISECONDS) .readTimeout(NetworkConst.HTTP_READ_TIMEOUT, TimeUnit.MILLISECONDS) .writeTimeout(NetworkConst.HTTP_WRITE_TIMEOUT, TimeUnit.MILLISECONDS) .build(); } public static OkHttpClient buildImage(File cacheDir) { return new OkHttpClient.Builder() .cache(new Cache(cacheDir, MSFileManager.CACHE_DIR_SIZE)) .addNetworkInterceptor(new HttpImageCacheInterceptor()) .connectTimeout(NetworkConst.HTTP_CONN_TIMEOUT, TimeUnit.MILLISECONDS) .readTimeout(NetworkConst.HTTP_READ_TIMEOUT, TimeUnit.MILLISECONDS) .writeTimeout(NetworkConst.HTTP_WRITE_TIMEOUT, TimeUnit.MILLISECONDS) .build(); } private OkHttpFactory() { } }
[ "ngoclinh.truong@ved.com.vn" ]
ngoclinh.truong@ved.com.vn
fa9da19fdf2023bf7d7f158812d1ce1f9d8cfc22
062047c6dce794d0d842353643d7ddfa86994cf6
/src/main/java/com/excelsiorsoft/daedalus/service/evaluation/PotentialReturnCalculatorImpl.java
1014dff5f837f9ba3252be961344241561ee85ce
[]
no_license
excelsiorsoft/daedalus_old
6c7a2a61b8c680d66350dfa51704ada8e7ce721e
67905a1d5ac3b6a9c1ffbabd946b752be33e756f
refs/heads/master
2021-01-10T12:07:44.483544
2015-05-21T20:56:07
2015-05-21T20:56:07
36,036,893
0
0
null
null
null
null
UTF-8
Java
false
false
1,619
java
/** * */ package com.excelsiorsoft.daedalus.service.evaluation; import static java.math.BigDecimal.*; import java.math.BigDecimal; import java.math.MathContext; import org.springframework.stereotype.Component; import org.springframework.util.Assert; import static java.math.BigDecimal.*; import static java.math.RoundingMode.*; /** * @author Simeon * */ @Component("potentialReturnCalculator") public class PotentialReturnCalculatorImpl implements PotentialReturnCalculator { /* (non-Javadoc) * @see com.excelsiorsoft.daedalus.service.PotentialReturnCalculator#yield(java.math.BigDecimal, java.math.BigDecimal) */ @Override public BigDecimal yield(BigDecimal bid, BigDecimal strike) { return bid.divide(strike, new MathContext(3,HALF_UP)); } /* (non-Javadoc) * @see com.excelsiorsoft.daedalus.service.PotentialReturnCalculator#defenciveBuffer(java.math.BigDecimal, java.math.BigDecimal) */ @Override public BigDecimal defenciveBuffer(BigDecimal strike, BigDecimal currentPrice) { BigDecimal result = null; result = ONE.subtract(strike.divide(currentPrice, new MathContext( 6/* significant digits */, UP/* rounding */))); return result; } /* (non-Javadoc) * @see com.excelsiorsoft.daedalus.service.PotentialReturnCalculator#bidAskSpread(java.math.BigDecimal, java.math.BigDecimal) */ @Override public BigDecimal bidAskSpread(BigDecimal bid, BigDecimal ask) { Assert.notNull(bid, "Bid price must not be null"); Assert.notNull(ask, "Ask price must not be null"); return ask.subtract(bid, new MathContext(2,HALF_UP));//assume bid-ask spread never exceeds $1.00 } }
[ "senya22@yahoo.com" ]
senya22@yahoo.com