blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
415b76a2687ef75bd54ee3f946dee59b95ac9ac7
|
cc9925d381bb8dda2e89fbd2c50be9eaf7df70bc
|
/app/src/com/trovebox/android/app/ui/adapter/MultiSelectTagsAdapter.java
|
54d3d3b09066dca107989438fc978d329b26a7cf
|
[
"Apache-2.0"
] |
permissive
|
photo/mobile-android
|
91e5ad5d93c6482dfaf00b0c8c59d58a314d9b87
|
24d1d105629403ec6fc19aa1f3cb4aa45c80d391
|
refs/heads/master
| 2021-01-15T22:29:16.633557
| 2020-10-01T07:04:11
| 2020-10-01T07:04:11
| 2,031,128
| 29
| 23
|
Apache-2.0
| 2020-10-01T07:04:12
| 2011-07-11T15:49:24
|
Java
|
UTF-8
|
Java
| false
| false
| 4,087
|
java
|
package com.trovebox.android.app.ui.adapter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import com.trovebox.android.app.Preferences;
import com.trovebox.android.app.R;
import com.trovebox.android.app.TroveboxApplication;
import com.trovebox.android.app.model.utils.TagUtils;
import com.trovebox.android.app.util.compare.ToStringComparator;
import com.trovebox.android.common.model.Tag;
import com.trovebox.android.common.net.ITroveboxApi;
import com.trovebox.android.common.net.TagsResponse;
import com.trovebox.android.common.net.TroveboxResponseUtils;
import com.trovebox.android.common.ui.adapter.EndlessAdapter;
import com.trovebox.android.common.util.GuiUtils;
import com.trovebox.android.common.util.LoadingControl;
/**
* @author Eugene Popovich
*/
public abstract class MultiSelectTagsAdapter extends EndlessAdapter<Tag>
implements OnCheckedChangeListener
{
static final String TAG = MultiSelectTagsAdapter.class.getSimpleName();
private final ITroveboxApi mTroveboxApi;
protected Set<String> checkedTags = new HashSet<String>();
private LoadingControl loadingControl;
public MultiSelectTagsAdapter(LoadingControl loadingControl)
{
super(Integer.MAX_VALUE);
this.loadingControl = loadingControl;
mTroveboxApi = Preferences.getApi(TroveboxApplication.getContext());
loadFirstPage();
}
@Override
public long getItemId(int position)
{
return ((Tag) getItem(position)).getTag().hashCode();
}
public void initTagCheckbox(Tag tag, CheckBox checkBox) {
checkBox.setText(tag.getTag());
checkBox.setOnCheckedChangeListener(null);
checkBox.setChecked(isChecked(tag.getTag()));
checkBox.setOnCheckedChangeListener(this);
}
@Override
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
String text = (String) buttonView.getText();
if (isChecked)
checkedTags.add(text);
else
checkedTags.remove(text);
}
@Override
public LoadResponse loadItems(int page)
{
if (GuiUtils.checkLoggedInAndOnline())
{
try
{
TagsResponse response = mTroveboxApi.getTags();
if (TroveboxResponseUtils.checkResponseValid(response))
{
List<Tag> tags = response.getTags();
if (tags != null)
{
Collections.sort(tags, new ToStringComparator());
}
return new LoadResponse(tags, false);
}
} catch (Exception e)
{
GuiUtils.error(TAG,
R.string.errorCouldNotLoadNextTagsInList, e);
}
}
return new LoadResponse(null, false);
}
@Override
protected void onStartLoading()
{
if(loadingControl != null)
{
loadingControl.startLoading();
}
}
@Override
protected void onStoppedLoading()
{
if(loadingControl != null)
{
loadingControl.stopLoading();
}
}
public String getSelectedTags() {
StringBuffer buf = new StringBuffer("");
if (checkedTags.size() > 0) {
List<String> sortedTags = new ArrayList<String>(checkedTags);
Collections.sort(sortedTags, new ToStringComparator());
buf.append(TagUtils.getTagsString(sortedTags));
}
return buf.toString();
}
protected boolean isChecked(String tag)
{
if (tag == null)
{
return false;
}
return checkedTags.contains(tag);
}
}
|
[
"httpdispatch@gmail.com"
] |
httpdispatch@gmail.com
|
e7a8fb4778c23889e63ba7412782da045fce8c32
|
e6fff39054fc394395d38c5bcd4c3275b3bbdef5
|
/VisionPlusX/src/com/sv/visionplus/transaction/grn/GrnForm.java
|
85217eda7263156e9c3969e8670e610fbd65df06
|
[] |
no_license
|
supervisiontec/Specs-Shop---Vision-Plus
|
0ea7111046d49b9631a9e574137822f429e95de4
|
5a76f10dba14d0befeb6a06f67c6a984b552684a
|
refs/heads/master
| 2023-03-06T09:40:48.508328
| 2021-02-17T19:50:54
| 2021-02-17T19:50:54
| 107,935,028
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 754
|
java
|
package com.sv.visionplus.transaction.grn;
import com.sv.visionplus.base.AbstractObjectCreator;
import com.sv.visionplus.base.transaction.AbstractTransactionForm;
import com.sv.visionplus.base.transaction.AbstractTransactionFormService;
import com.sv.visionplus.transaction.grn.model.GrnMix;
public class GrnForm
extends AbstractTransactionForm<GrnMix>
{
private PCGrn grn;
public GrnForm() {}
protected AbstractTransactionFormService<GrnMix> getTransactionFormService()
{
return new GrnService();
}
protected AbstractObjectCreator<GrnMix> getObjectCreator()
{
grn = new PCGrn(this);
return grn;
}
public void doSave()
{
super.doSave();
if (grn != null) {
grn.resetFields();
}
}
}
|
[
"chamara.kaza@gmail.com"
] |
chamara.kaza@gmail.com
|
0febef08e3200fcc3e7c33bda0faeb12bbbd1395
|
eff9d1e6ce4032c7a2618cf8b40922401f3d1ce0
|
/ls-java-core/src/main/java/com/ls/lishuai/aqs/MutextDemo.java
|
e0cb8ff8e881324d4534dbab22397eaf32957046
|
[] |
no_license
|
lishuai2016/all
|
67d8ff5db911ca5c38b249172d3dcbf4234d49d7
|
aa7d6774611c21e126e628268a6abd020138974f
|
refs/heads/master
| 2022-12-09T11:03:08.571479
| 2019-08-18T16:38:41
| 2019-08-18T16:38:44
| 200,311,974
| 5
| 4
| null | 2022-11-16T07:57:51
| 2019-08-03T00:08:21
|
Java
|
UTF-8
|
Java
| false
| false
| 621
|
java
|
package com.ls.lishuai.aqs;
/**
* @Author: lishuai
* @CreateDate: 2018/8/3 17:18
*/
public class MutextDemo {
private static Mutex mutex = new Mutex();
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
Thread thread = new Thread(() -> {
mutex.lock();
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
mutex.unlock();
}
});
thread.start();
}
}
}
|
[
"1830473670@qq.com"
] |
1830473670@qq.com
|
4702560385d8c9624dcfd23324b514b68dd50e0c
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/gallery/ui/ImagePreviewUI$17.java
|
030c09a3abb5f0ac3abc219610fccc17a3a65c6a
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 504
|
java
|
package com.tencent.mm.plugin.gallery.ui;
import com.tencent.mm.plugin.gallery.model.m;
import com.tencent.mm.plugin.gallery.model.m.a;
class ImagePreviewUI$17 implements a {
final /* synthetic */ ImagePreviewUI jEa;
ImagePreviewUI$17(ImagePreviewUI imagePreviewUI) {
this.jEa = imagePreviewUI;
}
public final void a(m mVar) {
if (mVar.position == ImagePreviewUI.g(this.jEa).intValue()) {
ImagePreviewUI.a(this.jEa, mVar.path, mVar.jBs);
}
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
fa292b2b6fb8738b30c8a6fcbe96929b972f9e49
|
461acdfede26ba5e0c53e47c54f36155c3b34cee
|
/Java_22_FileSampleData/src/com/biz/files/service/NameService.java
|
211e51315fdf39c000c2a129edad58ef0b02665b
|
[] |
no_license
|
qussoa/20191002
|
dc5e13a0a7e35079aeb4a028c919cd8c310b5caf
|
2843d602c09a49ff0980af79743fdf49b1295def
|
refs/heads/master
| 2020-08-04T21:17:58.279045
| 2019-11-04T07:42:55
| 2019-11-04T07:42:55
| 212,282,154
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package com.biz.files.service;
public interface NameService {
public void readNameList(String nameFile) throws Exception;
public void readFamList(String famFile) throws Exception;
public void writeNameFile(String korNameFile) throws Exception;
}
|
[
"qussoa@naver.com"
] |
qussoa@naver.com
|
04bdd37b97ff9b6e44a1b712bb838c9ed6a9b07f
|
c3e183b9b3ff1a511c6182893d70aaa352c167f0
|
/src/main/java/com/m2m/domain/TagTrainSampleWithBLOBs.java
|
cd3faf0b2b0899b80610d1227d414d386a0adaae
|
[] |
no_license
|
hushunjian/rest
|
a47a6e00b038eb5fb635ec4362ff0b6a5a92813b
|
15b49ada2725bdba17a92986ed8372a0d56ef748
|
refs/heads/master
| 2021-05-04T12:33:54.762619
| 2018-02-05T11:37:10
| 2018-02-05T11:37:10
| 120,258,667
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,031
|
java
|
package com.m2m.domain;
public class TagTrainSampleWithBLOBs extends TagTrainSample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column tag_train_sample.summary
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
private String summary;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column tag_train_sample.keywords
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
private String keywords;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tag_train_sample.summary
*
* @return the value of tag_train_sample.summary
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
public String getSummary() {
return summary;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tag_train_sample.summary
*
* @param summary the value for tag_train_sample.summary
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
public void setSummary(String summary) {
this.summary = summary == null ? null : summary.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column tag_train_sample.keywords
*
* @return the value of tag_train_sample.keywords
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
public String getKeywords() {
return keywords;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column tag_train_sample.keywords
*
* @param keywords the value for tag_train_sample.keywords
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
public void setKeywords(String keywords) {
this.keywords = keywords == null ? null : keywords.trim();
}
}
|
[
"hushunjian950420@163.com"
] |
hushunjian950420@163.com
|
9d3d3c658798809ef66df404533e0947bd7b9e44
|
7b40d383ff3c5d51c6bebf4d327c3c564eb81801
|
/src/android/support/v4/view/ViewGroupCompat$ViewGroupCompatJellybeanMR2Impl.java
|
0192c5520186ed186a5cd330ce1fc2382dc721ef
|
[] |
no_license
|
reverseengineeringer/com.yik.yak
|
d5de3a0aea7763b43fd5e735d34759f956667990
|
76717e41dab0b179aa27f423fc559bbfb70e5311
|
refs/heads/master
| 2021-01-20T09:41:04.877038
| 2015-07-16T16:44:44
| 2015-07-16T16:44:44
| 38,577,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 629
|
java
|
package android.support.v4.view;
import android.view.ViewGroup;
class ViewGroupCompat$ViewGroupCompatJellybeanMR2Impl
extends ViewGroupCompat.ViewGroupCompatIcsImpl
{
public int getLayoutMode(ViewGroup paramViewGroup)
{
return ViewGroupCompatJellybeanMR2.getLayoutMode(paramViewGroup);
}
public void setLayoutMode(ViewGroup paramViewGroup, int paramInt)
{
ViewGroupCompatJellybeanMR2.setLayoutMode(paramViewGroup, paramInt);
}
}
/* Location:
* Qualified Name: android.support.v4.view.ViewGroupCompat.ViewGroupCompatJellybeanMR2Impl
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
c5915e9025d2e7b7c9cffa1ebb2b2d40514477ca
|
929557608e958cf7628b9e0bad8ac937c1ba7cd8
|
/src/main/java/hudson/plugins/analysis/core/AntBuilderCheck.java
|
92ba5ccf1b8d264283df4c90c024f5247ad6699a
|
[
"MIT"
] |
permissive
|
loelala/analysis-core-plugin
|
2d56d3ac2bfc65f6d93bbfe259ac4e78ea741557
|
13edc435dae4ac8a8ee274011fc7216a1e51c88c
|
refs/heads/master
| 2021-04-15T19:00:54.583925
| 2018-03-12T09:55:29
| 2018-03-12T09:55:29
| 126,339,983
| 0
| 0
|
MIT
| 2018-04-23T09:43:59
| 2018-03-22T13:32:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,071
|
java
|
package hudson.plugins.analysis.core;
import hudson.model.AbstractBuild;
import hudson.model.Project;
import hudson.tasks.Builder;
import hudson.tasks.Ant;
/**
* Verifies if the build is an {@link Ant} task.
*
* @author Ulli Hafner
*/
public final class AntBuilderCheck {
/**
* Returns whether the current build uses ant.
*
* @param build
* the current build
* @return <code>true</code> if the current build uses ant,
* <code>false</code> otherwise
*/
public static boolean isAntBuild(final AbstractBuild<?, ?> build) {
if (build.getProject() instanceof Project) {
Project<?, ?> project = (Project<?, ?>)build.getProject();
for (Builder builder : project.getBuilders()) {
if (builder instanceof Ant) {
return true;
}
}
}
return false;
}
/**
* Creates a new instance of {@link AntBuilderCheck}.
*/
private AntBuilderCheck() {
// prevent instantiation
}
}
|
[
"ullrich.hafner@gmail.com"
] |
ullrich.hafner@gmail.com
|
bf9a9cd5b63f5e33da6e3f32972714394f1302ca
|
fe5b610f0ded630462e9f98806edc7b24dcc2ef0
|
/Downloads/AyoKeMasjid_v0.3_apkpure.com_source_from_JADX/com/google/android/gms/ads/formats/NativeAdOptions.java
|
b1ab5cd3983f4f867cebc8bb7ba876679e52ba7b
|
[] |
no_license
|
rayga/n4rut0
|
328303f0adcb28140b05c0a18e54abecf21ef778
|
e1f706aeb6085ee3752cb92187bf339c6dfddef0
|
refs/heads/master
| 2020-12-25T15:18:25.346886
| 2016-08-29T22:51:25
| 2016-08-29T22:51:25
| 66,826,428
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,585
|
java
|
package com.google.android.gms.ads.formats;
public final class NativeAdOptions {
public static final int ORIENTATION_ANY = 0;
public static final int ORIENTATION_LANDSCAPE = 2;
public static final int ORIENTATION_PORTRAIT = 1;
private final boolean zznV;
private final int zznW;
private final boolean zznX;
public static final class Builder {
private boolean zznV;
private int zznW;
private boolean zznX;
public Builder() {
this.zznV = false;
this.zznW = NativeAdOptions.ORIENTATION_ANY;
this.zznX = false;
}
public NativeAdOptions build() {
return new NativeAdOptions();
}
public Builder setImageOrientation(int orientation) {
this.zznW = orientation;
return this;
}
public Builder setRequestMultipleImages(boolean shouldRequestMultipleImages) {
this.zznX = shouldRequestMultipleImages;
return this;
}
public Builder setReturnUrlsForImageAssets(boolean shouldReturnUrls) {
this.zznV = shouldReturnUrls;
return this;
}
}
private NativeAdOptions(Builder builder) {
this.zznV = builder.zznV;
this.zznW = builder.zznW;
this.zznX = builder.zznX;
}
public int getImageOrientation() {
return this.zznW;
}
public boolean shouldRequestMultipleImages() {
return this.zznX;
}
public boolean shouldReturnUrlsForImageAssets() {
return this.zznV;
}
}
|
[
"arga@lahardi.com"
] |
arga@lahardi.com
|
eb86f262747e523138f34cff4d9c20def06b79c9
|
5e6abc6bca67514b4889137d1517ecdefcf9683a
|
/Client/src/main/java/com/runescape/scene/graphic/TextureLoader667.java
|
fea45c96a8c35f069c28fab8eace128d068fca10
|
[] |
no_license
|
dginovker/RS-2009-317
|
88e6d773d6fd6814b28bdb469f6855616c71fc26
|
9d285c186656ace48c2c67cc9e4fb4aeb84411a4
|
refs/heads/master
| 2022-12-22T18:47:47.487468
| 2019-09-20T21:24:34
| 2019-09-20T21:24:34
| 208,949,111
| 2
| 2
| null | 2022-12-15T23:55:43
| 2019-09-17T03:15:17
|
Java
|
UTF-8
|
Java
| false
| false
| 6,152
|
java
|
package com.runescape.scene.graphic;
import com.runescape.cache.def.TextureDefinition;
import com.runescape.cache.texture.Texture;
import com.runescape.net.requester.ResourceProvider;
public class TextureLoader667 {
public static int[] textureLastUsed;
public static int textureGetCount;
private static int loadedTextureCount;
private static int textureTexelPoolPointer;
private static int[][] texelArrayPool;
private static int[][] texelCache;
private static float brightness = 1.0F;
public static void initTextures(int count, ResourceProvider resourceProvider) {
Texture.init(count, resourceProvider);
loadedTextureCount = count;
textureLastUsed = new int[count];
texelCache = new int[count][];
}
public static void clearTextureCache() {
texelArrayPool = null;
for (int i = 0; i < loadedTextureCount; i++) {
texelCache[i] = null;
}
}
public static void resetTextures() {
if (texelArrayPool == null) {
textureTexelPoolPointer = 50;//was parameter
texelArrayPool = new int[textureTexelPoolPointer][0x10000];
for (int k = 0; k < loadedTextureCount; k++) {
texelCache[k] = null;
}
}
}
public static void resetTexture(int textureId) {
if (texelCache[textureId] == null) {
return;
}
texelArrayPool[textureTexelPoolPointer++] = texelCache[textureId];
texelCache[textureId] = null;
}
public static int[] getTexturePixels(int textureId) {
if (textureId == 0) {
textureId = 24;
}
Texture texture = Texture.get(textureId);
if (texture == null) {
return null;
}
textureLastUsed[textureId] = textureGetCount++;
if (texelCache[textureId] != null) {
return texelCache[textureId];
}
int[] texels;
//Start of mem management code
if (textureTexelPoolPointer > 0) { //Freed texture data arrays available
texels = texelArrayPool[--textureTexelPoolPointer];
texelArrayPool[textureTexelPoolPointer] = null;
} else { //No freed texture data arrays available, recycle least used texture's array
int lastUsed = 0;
int target = -1;
for (int i = 0; i < loadedTextureCount; i++) {
if (texelCache[i] != null && (textureLastUsed[i] < lastUsed || target == -1)) {
lastUsed = textureLastUsed[i];
target = i;
}
}
texels = texelCache[target];
texelCache[target] = null;
}
texelCache[textureId] = texels;
//End of mem management code
if (texture.width == 64) {
for (int y = 0; y < 128; y++) {
for (int x = 0; x < 128; x++) {
texels[x + (y << 7)] = texture.getPixel((x >> 1) + ((y >> 1) << 6));
}
}
} else {
for (int texelPtr = 0; texelPtr < 16384; texelPtr++) {
texels[texelPtr] = texture.getPixel(texelPtr);
}
}
TextureDefinition def = textureId >= 0 && textureId < TextureDefinition.textures.length ? TextureDefinition.textures[textureId] : null;
int blendType = def != null ? def.anInt1226 : 0;
if (blendType != 1 && blendType != 2) {
blendType = 0;
}
for (int texelPtr = 0; texelPtr < 16384; texelPtr++) {
int texel = texels[texelPtr];
int alpha;
if (blendType == 2) {
alpha = texel >>> 24;
} else if (blendType == 1) {
alpha = texel != 0 ? 0xff : 0;
} else {
alpha = texel >>> 24;
if (def != null && !def.aBoolean1223) {
alpha /= 5;
}
}
texel &= 0xffffff;
if (textureId == 1 || textureId == 24) {
texel = adjustBrightnessLinear(texel, 190);//379
} else {
texel = adjustBrightnessLinear(texel, 179);
}
if (textureId == 1 || textureId == 24) {
// texel = adjustBrightness(texel, 0.90093F);
} else {
texel = adjustBrightness(texel, brightness);
}
texel &= 0xf8f8ff;
texels[texelPtr] = texel | (alpha << 24);
texels[16384 + texelPtr] = ((texel - (texel >>> 3)) & 0xf8f8ff) | (alpha << 24);
texels[32768 + texelPtr] = ((texel - (texel >>> 2)) & 0xf8f8ff) | (alpha << 24);
texels[49152 + texelPtr] = ((texel - (texel >>> 3) - (texel >>> 3)) & 0xf8f8ff) | (alpha << 24);
}
return texels;
}
private static int adjustBrightness(int rgb, float brightness) {
return ((int) ((float) Math.pow((double) ((float) (rgb >>> 16) / 256.0F), (double) brightness) * 256.0F) << 16) |
((int) ((float) Math.pow((double) ((float) ((rgb >>> 8) & 0xff) / 256.0F), (double) brightness) * 256.0F) << 8) |
(int) ((float) Math.pow((double) ((float) (rgb & 0xff) / 256.0F), (double) brightness) * 256.0F);
}
private static int adjustBrightnessLinear(int rgb, int factor) {
return ((((rgb >>> 16) * factor) & 0xff00) << 8) |
((((rgb >>> 8) & 0xff) * factor) & 0xff00) |
(((rgb & 0xff) * factor) >> 8);
}
public static void calculateTexturePalette(double brightness) {
for (int textureId = 0; textureId != loadedTextureCount; ++textureId) {
resetTexture(textureId);
}
}
public static void clear() {
texelArrayPool = null;
texelCache = null;
textureLastUsed = null;
brightness = 1.0F;
}
public boolean isValid() {
return texelArrayPool != null && texelCache != null;
}
}
|
[
"dcress01@uoguelph.ca"
] |
dcress01@uoguelph.ca
|
2f7ff3089d506b448bb81c720d462df714e51373
|
6193f2aab2b5aba0fcf24c4876cdcb6f19a1be88
|
/hgzb/src/private/nc/bs/pub/action/N_ZB07_WRITE.java
|
eda68e833b5297af9a1b3e5b277efe1966f3838b
|
[] |
no_license
|
uwitec/nc-wandashan
|
60b5cac6d1837e8e1e4f9fbb1cc3d9959f55992c
|
98d9a19dc4eb278fa8aa15f120eb6ebd95e35300
|
refs/heads/master
| 2016-09-06T12:15:04.634079
| 2011-11-05T02:29:15
| 2011-11-05T02:29:15
| 41,097,642
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,237
|
java
|
package nc.bs.pub.action;
import java.util.Hashtable;
import nc.bs.pub.compiler.AbstractCompiler2;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.pub.compiler.PfParameterVO;
import nc.vo.trade.pub.HYBillVO;
import nc.vo.uap.pf.PFBusinessException;
public class N_ZB07_WRITE extends AbstractCompiler2 {
private java.util.Hashtable m_methodReturnHas=new java.util.Hashtable();
private Hashtable m_keyHas=null;
/**
*
* 分量调整单保存
*
*/
public N_ZB07_WRITE() {
super();
}
/*
* 备注:平台编写规则类
* 接口执行类
*/
public Object runComClass(PfParameterVO vo) throws BusinessException {
try{
super.m_tmpVo=vo;
try {
super.m_tmpVo = vo;
Object retObj = null;
AggregatedValueObject billvo = getVo();
Object o = getUserObj();
if(billvo == null){
throw new BusinessException("传入数据为空");
}
HYBillVO biddingvo = (HYBillVO)billvo;
//只是执行了保存操作
retObj = runClass("nc.bs.zb.pub.HYBillSave", "saveBill","nc.vo.pub.AggregatedValueObject:01", vo, m_keyHas, m_methodReturnHas);
return retObj;
} catch (Exception ex) {
if (ex instanceof BusinessException)
throw (BusinessException) ex;
else
throw new PFBusinessException(ex.getMessage(), ex);
}
} catch (Exception ex) {
if (ex instanceof BusinessException)
throw (BusinessException) ex;
else
throw new PFBusinessException(ex.getMessage(), ex);
}
}
/*
* 备注:平台编写原始脚本
*/
public String getCodeRemark(){
return null;
}
// return " try {\n super.m_tmpVo = vo;\n Object retObj = null;\n // 保存即提交\n retObj = runClass(\"nc.bs.gt.pub.HYBillSave\", \"saveBill\",\"nc.vo.pub.AggregatedValueObject:01\", vo, m_keyHas, m_methodReturnHas);\n return retObj;\n } catch (Exception ex) {\n if (ex instanceof BusinessException)\n throw (BusinessException) ex;\n else\n throw new PFBusinessException(ex.getMessage(), ex);\n }\n";}
/*
* 备注:设置脚本变量的HAS
*/
private void setParameter(String key,Object val) {
if (m_keyHas==null){
m_keyHas=new Hashtable();
}
if (val!=null) {
m_keyHas.put(key,val);
}
}
}
|
[
"liuyushi_alice@163.com"
] |
liuyushi_alice@163.com
|
eaac8a8ecdad12af5ff22c2e87fa3f128271b1bc
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/masterData/paymentStatus/info/Paymenus.java
|
2eab75dda6b0003abb3af5ece0e1b5911f3b2e39
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 322
|
java
|
package br.com.mind5.masterData.paymentStatus.info;
public enum Paymenus {
ACCEPTED("ACCEPTED"),
REFUSED("REFUSED"),
WAITING("WAITING");
private final String codStatus;
private Paymenus(String cod) {
codStatus = cod;
}
public String getCodStatus() {
return codStatus;
}
}
|
[
"mmaciel@mind5.com"
] |
mmaciel@mind5.com
|
88881ebcbbc75b23d1ec614cdf89be1b1f047a6b
|
3093a2393cc807425404613120ca6f7eabdc61e5
|
/transaction-demo/src/main/java/com/anhe/pojo/v23mypackage/UploadDocumentReferenceDetail.java
|
f20d602fe8b6429ce2bc9ae9944b620adf6584c2
|
[] |
no_license
|
tangyongshuang/practice-parent
|
928e1505f48bd84a4f8e7eaa28c0e08e617c4d38
|
ef74210f74f84722ee1220e8f11c9e3614dc98a7
|
refs/heads/master
| 2022-06-23T23:34:20.343807
| 2019-06-19T08:16:47
| 2019-06-19T08:16:47
| 190,373,049
| 0
| 0
| null | 2022-06-17T03:25:50
| 2019-06-05T10:13:58
|
Java
|
UTF-8
|
Java
| false
| false
| 6,499
|
java
|
package com.anhe.pojo.v23mypackage;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>UploadDocumentReferenceDetail complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="UploadDocumentReferenceDetail">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="LineNumber" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="CustomerReference" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="DocumentProducer" type="{http://fedex.com/ws/ship/v23}UploadDocumentProducerType" minOccurs="0"/>
* <element name="DocumentType" type="{http://fedex.com/ws/ship/v23}UploadDocumentType" minOccurs="0"/>
* <element name="DocumentId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="DocumentIdProducer" type="{http://fedex.com/ws/ship/v23}UploadDocumentIdProducer" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UploadDocumentReferenceDetail", namespace = "http://fedex.com/ws/ship/v23", propOrder = {
"lineNumber",
"customerReference",
"description",
"documentProducer",
"documentType",
"documentId",
"documentIdProducer"
})
public class UploadDocumentReferenceDetail {
@XmlElement(name = "LineNumber", namespace = "http://fedex.com/ws/ship/v23")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger lineNumber;
@XmlElement(name = "CustomerReference", namespace = "http://fedex.com/ws/ship/v23")
protected String customerReference;
@XmlElement(name = "Description", namespace = "http://fedex.com/ws/ship/v23")
protected String description;
@XmlElement(name = "DocumentProducer", namespace = "http://fedex.com/ws/ship/v23")
@XmlSchemaType(name = "string")
protected UploadDocumentProducerType documentProducer;
@XmlElement(name = "DocumentType", namespace = "http://fedex.com/ws/ship/v23")
@XmlSchemaType(name = "string")
protected UploadDocumentType documentType;
@XmlElement(name = "DocumentId", namespace = "http://fedex.com/ws/ship/v23")
protected String documentId;
@XmlElement(name = "DocumentIdProducer", namespace = "http://fedex.com/ws/ship/v23")
@XmlSchemaType(name = "string")
protected UploadDocumentIdProducer documentIdProducer;
/**
* 获取lineNumber属性的值。
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getLineNumber() {
return lineNumber;
}
/**
* 设置lineNumber属性的值。
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setLineNumber(BigInteger value) {
this.lineNumber = value;
}
/**
* 获取customerReference属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getCustomerReference() {
return customerReference;
}
/**
* 设置customerReference属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCustomerReference(String value) {
this.customerReference = value;
}
/**
* 获取description属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* 设置description属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
/**
* 获取documentProducer属性的值。
*
* @return
* possible object is
* {@link UploadDocumentProducerType }
*
*/
public UploadDocumentProducerType getDocumentProducer() {
return documentProducer;
}
/**
* 设置documentProducer属性的值。
*
* @param value
* allowed object is
* {@link UploadDocumentProducerType }
*
*/
public void setDocumentProducer(UploadDocumentProducerType value) {
this.documentProducer = value;
}
/**
* 获取documentType属性的值。
*
* @return
* possible object is
* {@link UploadDocumentType }
*
*/
public UploadDocumentType getDocumentType() {
return documentType;
}
/**
* 设置documentType属性的值。
*
* @param value
* allowed object is
* {@link UploadDocumentType }
*
*/
public void setDocumentType(UploadDocumentType value) {
this.documentType = value;
}
/**
* 获取documentId属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getDocumentId() {
return documentId;
}
/**
* 设置documentId属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDocumentId(String value) {
this.documentId = value;
}
/**
* 获取documentIdProducer属性的值。
*
* @return
* possible object is
* {@link UploadDocumentIdProducer }
*
*/
public UploadDocumentIdProducer getDocumentIdProducer() {
return documentIdProducer;
}
/**
* 设置documentIdProducer属性的值。
*
* @param value
* allowed object is
* {@link UploadDocumentIdProducer }
*
*/
public void setDocumentIdProducer(UploadDocumentIdProducer value) {
this.documentIdProducer = value;
}
}
|
[
"albert.tang@circle.us"
] |
albert.tang@circle.us
|
d137a87a53509a320374f16d76b0fdd9ab226161
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/game/gamewebview/ui/d$17.java
|
3c53963a6450f96ee415761b573d17b3ae898858
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 455
|
java
|
package com.tencent.mm.plugin.game.gamewebview.ui;
class d$17 implements Runnable {
final /* synthetic */ String iTF;
final /* synthetic */ String iXg;
final /* synthetic */ d mZC;
d$17(d dVar, String str, String str2) {
this.mZC = dVar;
this.iXg = str;
this.iTF = str2;
}
public final void run() {
if (d.n(this.mZC) != null) {
d.n(this.mZC).cJ(this.iXg, this.iTF);
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
d6e7548391a3b22189eb3f419b3a0137a5a1d134
|
a33aac97878b2cb15677be26e308cbc46e2862d2
|
/data/libgdx/Touchpad_setResetOnTouchUp.java
|
9a45e80fd7d0efbd0b9dcdbda4765101290dffe0
|
[] |
no_license
|
GabeOchieng/ggnn.tensorflow
|
f5d7d0bca52258336fc12c9de6ae38223f28f786
|
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
|
refs/heads/master
| 2022-05-30T11:17:42.278048
| 2020-05-02T11:33:31
| 2020-05-02T11:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 159
|
java
|
/**
* @param reset Whether to reset the knob to the center on touch up.
*/
public void setResetOnTouchUp(boolean reset) {
this.resetOnTouchUp = reset;
}
|
[
"bdqnghi@gmail.com"
] |
bdqnghi@gmail.com
|
2f360b20e66d0d27bcc6481fda926bdeac02e847
|
55de95d91949317699659cd2c11bbfc921ed11a5
|
/design-patterns/src/main/java/com/cui/behavior/ovserver/Clients.java
|
f875db650174a3b73b905d5e420fa5c29e59cd3f
|
[
"Apache-2.0"
] |
permissive
|
Common-zhou/wang-wen-jun
|
b4d9e30f5112ceeb88de445cb13117cb0f208d8e
|
c76aa1f276ec97ac551928c6bb1e7e3b1abb83d9
|
refs/heads/master
| 2023-08-17T18:58:47.476291
| 2021-09-17T08:47:25
| 2021-09-17T08:47:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package com.cui.behavior.ovserver;
/**
* @description: 客户端测试
* @date: 2020/7/18 21:48
* @author: wei·man cui
*/
public class Clients {
public static void main(String[] args) {
//定义观察目标对象
AllyControlCenter acc;
acc = new ConcreteAllyControlCenter("金庸群侠");
//定义四个观察者对象
Observer player1, player2, player3, player4;
player1 = new Player("杨过");
acc.join(player1);
player2 = new Player("令狐冲");
acc.join(player2);
player3 = new Player("张无忌");
acc.join(player3);
player4 = new Player("段誉");
acc.join(player4);
//某成员遭受攻击
player1.beAttacked(acc);
}
}
|
[
"daocaoren22222@163.com"
] |
daocaoren22222@163.com
|
2c9f4905eed3d7c92c39d3476fa4d41fa1945c2d
|
0907c886f81331111e4e116ff0c274f47be71805
|
/sources/com/mopub/mraid/MraidCommandException.java
|
c022597eb866a5c4f27f83b0c2871cf43385d183
|
[
"MIT"
] |
permissive
|
Minionguyjpro/Ghostly-Skills
|
18756dcdf351032c9af31ec08fdbd02db8f3f991
|
d1a1fb2498aec461da09deb3ef8d98083542baaf
|
refs/heads/Android-OS
| 2022-07-27T19:58:16.442419
| 2022-04-15T07:49:53
| 2022-04-15T07:49:53
| 415,272,874
| 2
| 0
|
MIT
| 2021-12-21T10:23:50
| 2021-10-09T10:12:36
|
Java
|
UTF-8
|
Java
| false
| false
| 332
|
java
|
package com.mopub.mraid;
class MraidCommandException extends Exception {
MraidCommandException() {
}
MraidCommandException(String str) {
super(str);
}
MraidCommandException(String str, Throwable th) {
super(str, th);
}
MraidCommandException(Throwable th) {
super(th);
}
}
|
[
"66115754+Minionguyjpro@users.noreply.github.com"
] |
66115754+Minionguyjpro@users.noreply.github.com
|
44004c13b74cb48ddd8961779152b8f00c6c3e17
|
b77818b29a5f71b2564d01aa491a16a22e74939a
|
/Spring5-JavaAnnotationssComponent/src/main/java/com/cybertek/services/Java.java
|
d564f7bc07baa17f0ca282d5810610cc33202551
|
[] |
no_license
|
karinatech/spring-kd
|
c51abed2ec52ceef85b8d2bf02041f12a3203479
|
7a90774606bc6d0da22a650bae15fdad1d8e2e06
|
refs/heads/main
| 2023-03-21T10:44:54.180438
| 2021-02-08T00:24:04
| 2021-02-08T00:24:04
| 304,911,117
| 0
| 0
| null | 2021-02-08T00:24:06
| 2020-10-17T15:41:08
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 287
|
java
|
package com.cybertek.services;
import com.cybertek.interfaces.Course;
import org.springframework.stereotype.Component;
@Component
public class Java implements Course {
@Override
public void getTeachingHours() {
System.out.println("Weekly Teaching Hours : ");
}
}
|
[
"karinaminty@gmail.com"
] |
karinaminty@gmail.com
|
065261a356e888f211330fbc079d81fb72a0ae18
|
bc794d54ef1311d95d0c479962eb506180873375
|
/posweb/src/main/java/com/keren/posweb/core/ifaces/UniteGestionManager.java
|
2fa14995285a85b0773c810a59a1ebfce2f862d1
|
[] |
no_license
|
Teratech2018/Teratech
|
d1abb0f71a797181630d581cf5600c50e40c9663
|
612f1baf9636034cfa5d33a91e44bbf3a3f0a0cb
|
refs/heads/master
| 2021-04-28T05:31:38.081955
| 2019-04-01T08:35:34
| 2019-04-01T08:35:34
| 122,177,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 462
|
java
|
package com.keren.posweb.core.ifaces;
import com.bekosoftware.genericmanagerlayer.core.ifaces.GenericManager;
import com.keren.posweb.model.UniteGestion;
/**
* Interface etendue par les interfaces locale et remote du manager
* @since Tue Sep 04 17:34:18 GMT+01:00 2018
*
*/
public interface UniteGestionManager
extends GenericManager<UniteGestion, Long>
{
public final static String SERVICE_NAME = "UniteGestionManager";
}
|
[
"bekondo_dieu@yahoo.fr"
] |
bekondo_dieu@yahoo.fr
|
af5a381fc6e31d47fd016daf5f9d302cad5c8521
|
b474398887fd3f2fbebd29ccc580c5fb293e252d
|
/src/com/sun/corba/se/spi/activation/ServerNotRegistered.java
|
48787ca3ba5c0c0adef541b088670e83ddcf685c
|
[
"MIT"
] |
permissive
|
AndyChenIT/JDKSourceCode1.8
|
65a27e356debdcedc15642849602174c6ea286aa
|
4aa406b5b52e19ef8a323f9f829ea1852105d18b
|
refs/heads/master
| 2023-09-02T15:14:37.857475
| 2021-11-19T10:13:31
| 2021-11-19T10:13:31
| 428,856,994
| 0
| 0
|
MIT
| 2021-11-17T00:26:30
| 2021-11-17T00:26:29
| null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ServerNotRegistered.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u201/12322/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Saturday, December 15, 2018 6:38:37 PM PST
*/
public final class ServerNotRegistered extends org.omg.CORBA.UserException
{
public int serverId = (int)0;
public ServerNotRegistered ()
{
super(ServerNotRegisteredHelper.id());
} // ctor
public ServerNotRegistered (int _serverId)
{
super(ServerNotRegisteredHelper.id());
serverId = _serverId;
} // ctor
public ServerNotRegistered (String $reason, int _serverId)
{
super(ServerNotRegisteredHelper.id() + " " + $reason);
serverId = _serverId;
} // ctor
} // class ServerNotRegistered
|
[
"wupx@glodon.com"
] |
wupx@glodon.com
|
8dcbcc9a27c99ec8891b8c057b65f11a20d5cfc1
|
668584d63f6ed8f48c8609c3a142f8bdf1ba1a40
|
/prj/coherence-core/src/main/java/com/tangosol/dev/compiler/java/CaseClause.java
|
8c30713b0c545dd8b953621fed052021521733f3
|
[
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-protobuf",
"CDDL-1.1",
"W3C",
"APSL-1.0",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"SAX-PD",
"MPL-2.0",
"MPL-1.1",
"CC-PDDC",
"BSD-2-Clause",
"Plexus",
"EPL-2.0",
"CDDL-1.0",
"LicenseRef-scancode-proprietary-license",
"MIT",
"CC0-1.0",
"APSL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"UPL-1.0"
] |
permissive
|
oracle/coherence
|
34c48d36674e69974a693925c18f097175052c5f
|
b1a009a406e37fdc5479366035d8c459165324e1
|
refs/heads/main
| 2023-08-31T14:53:40.437690
| 2023-08-31T02:04:15
| 2023-08-31T02:04:15
| 242,776,849
| 416
| 96
|
UPL-1.0
| 2023-08-07T04:27:39
| 2020-02-24T15:51:04
|
Java
|
UTF-8
|
Java
| false
| false
| 4,855
|
java
|
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.compiler.java;
import com.tangosol.dev.assembler.CodeAttribute;
import com.tangosol.dev.compiler.CompilerException;
import com.tangosol.dev.compiler.Context;
import com.tangosol.dev.component.DataType;
import com.tangosol.util.ErrorList;
import java.util.Set;
import java.util.Map;
/**
* This class implements the "case <constant-value> :" clause of a switch
* statement.
*
* SwitchLabel:
* case ConstantExpression :
* default :
*
* @version 1.00, 09/21/98
* @author Cameron Purdy
*/
public class CaseClause extends TargetStatement
{
// ----- construction ---------------------------------------------------
/**
* Construct a case clause.
*
* @param stmt the statement within which this element exists
* @param token the "case" token
*/
public CaseClause(Statement stmt, Token token)
{
super(stmt, token);
}
// ----- code generation ------------------------------------------------
/**
* Perform semantic checks, parse tree re-organization, name binding,
* and optimizations.
*
* @param ctx the compiler context
* @param setUVars the set of potentially unassigned variables
* @param setFVars the set of potentially assigned final variables
* @param mapThrown the set of potentially thrown checked exceptions
* @param errlist the error list
*
* @exception CompilerException thrown if an error occurs that should
* stop the compilation process
*/
protected Element precompile(Context ctx, DualSet setUVars, DualSet setFVars, Map mapThrown, ErrorList errlist)
throws CompilerException
{
Expression expr = getTest();
// pre-compile the test
expr = (Expression) expr.precompile(ctx, setUVars, setFVars, mapThrown, errlist);
// the test must be constant
if (expr.checkConstant(errlist))
{
// the test must match (be assignable to) the type of the switch
if (expr.checkIntegral(errlist))
{
DataType dt = ((SwitchStatement) getOuterStatement()).getTest().getType();
if (expr.checkAssignable(ctx, dt, errlist))
{
expr = expr.convertAssignable(ctx, DataType.INT);
}
}
}
// store the test
setTest(expr);
// this will require a label
getStartLabel();
return this;
}
/**
* Perform final optimizations and code generation.
*
* @param ctx the compiler context
* @param code the assembler code attribute to compile to
* @param fReached true if this language element is reached (JLS 14.19)
* @param errlist the error list to log errors to
*
* @return true if the element can complete normally (JLS 14.1)
*
* @exception CompilerException thrown if an error occurs that should
* stop the compilation process
*/
protected boolean compileImpl(Context ctx, CodeAttribute code, boolean fReached, ErrorList errlist)
throws CompilerException
{
return true;
}
// ----- accessors ------------------------------------------------------
/**
* Get the test expression.
*
* @return the test expression
*/
public Expression getTest()
{
return test;
}
/**
* Set the test expression.
*
* @param test the test expression
*/
protected void setTest(Expression test)
{
this.test = test;
}
/**
* Determine if the test expression has a constant value.
*
* @return true if the test expression results in a constant value
*/
public boolean isConstant()
{
return test.isConstant();
}
/**
* Get the case value.
*
* @return the int case value
*/
protected int getValue()
{
return ((Number) getTest().getValue()).intValue();
}
// ----- Element methods ------------------------------------------------
/**
* Print the element information.
*
* @param sIndent
*/
public void print(String sIndent)
{
out(sIndent + toString());
out(sIndent + " Value:");
test.print(sIndent + " ");
}
// ----- data members ---------------------------------------------------
/**
* The class name.
*/
private static final String CLASS = "CaseClause";
/**
* The conditional expression.
*/
private Expression test;
}
|
[
"a@b"
] |
a@b
|
03cfbe12a2e408b7692a4a23fc6895b599c927f8
|
9d4dfd6d9a47d69582a95b5e1733ec6c3b56ad4a
|
/algorithm/src/main/java/org/anonymous/loop/LinkedListDeleter.java
|
f91122841c76a32ce06b75244512b7b438de1312
|
[] |
no_license
|
MacleZhou/child-s-notes
|
bee5979c351b2c4bab4cbda04168daa8f4877cee
|
951255a3c11797874ca13f28833ed0e590acd097
|
refs/heads/master
| 2023-04-14T00:11:56.906785
| 2020-06-23T06:23:11
| 2020-06-23T06:23:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 822
|
java
|
package org.anonymous.loop;
import org.anonymous.Node;
/**
* ~~ Talk is cheap. Show me the code. ~~ :-)
*
* @author MiaoOne
* @since 2020/6/4 13:32
*/
public class LinkedListDeleter {
public Node deleteIfEquals(Node head, int value) {
/*if (head.getValue() == value) {
head = head.getNext();
}*/
while (head != null && head.getValue() == value) {
head = head.getNext();
}
if (head == null) {
return null;
}
Node prev = head;
while (prev.getNext() != null) {
if (prev.getNext().getValue() == value) {
// delete it
prev.setNext(prev.getNext().getNext());
} else {
prev = prev.getNext();
}
}
return head;
}
}
|
[
"13163249276@163.com"
] |
13163249276@163.com
|
e538953357243685d224bbcf257226961d86557f
|
de4c47f20dd597da1d42e9b1c4355e26d92bdb02
|
/src/main/java/com/smart/aspectj/fun/Waiter.java
|
6990eb42d1310ff3ab8d20f3d696d58c7c48c115
|
[] |
no_license
|
leozhiyu/spring
|
513f0982cc47c9a130931cc07adc1f7fe4b25cb4
|
efcf69add3a914194d49e96554e0db664b57f458
|
refs/heads/master
| 2020-03-21T04:10:48.287006
| 2018-06-24T11:47:24
| 2018-06-24T11:47:24
| 138,095,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 180
|
java
|
package com.smart.aspectj.fun;
import com.smart.aspectj.anno.NeedTest;
public interface Waiter {
@NeedTest
void greetTo(String clientName);
void serveTo(String clientName);
}
|
[
"18779775257@163.com"
] |
18779775257@163.com
|
a01a0f7d56a23b976508ea2d85d943bc71a19163
|
e85236402ee7e29535ba5ac6a2f7ba81b6d0c183
|
/technology_code/admin-plus/admin-core/src/main/java/com/finance/core/act/service/impl/ActicleServiceImpl.java
|
d9bec52cf1a503a23b336f952f4d8cdf2b331fdf
|
[
"Apache-2.0"
] |
permissive
|
xiaotaowei1992/Working
|
78f95c06c6cf59247ede22a8ad4e1d3dea674bf1
|
b311ef4bd67af1c5be63b82cd662f7f7bfbdfaaf
|
refs/heads/master
| 2022-12-11T00:19:47.003256
| 2019-07-19T03:06:46
| 2019-07-19T03:06:46
| 136,190,476
| 0
| 0
| null | 2022-12-06T00:43:03
| 2018-06-05T14:33:12
|
Java
|
UTF-8
|
Java
| false
| false
| 2,620
|
java
|
package com.finance.core.act.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.finance.common.constant.ApiResultEnum;
import com.finance.common.constant.Result;
import com.finance.common.dto.PageDto;
import com.finance.common.exception.TryAgainException;
import com.finance.core.act.entity.Acticle;
import com.finance.core.act.mapper.ActicleMapper;
import com.finance.core.act.service.IActicleService;
import com.finance.core.aspect.IsTryAgain;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpSession;
/**
* <p>
* 服务实现类
* </p>
*
* @author rstyro
* @since 2019-03-26
*/
@Service
public class ActicleServiceImpl extends ServiceImpl<ActicleMapper, Acticle> implements IActicleService{
@Override
public Result getList(PageDto dto) throws Exception {
IPage<Acticle> page = new Page<>();
if(dto.getPageNo() != null){
page.setCurrent(dto.getPageNo());
}
if(dto.getPageSize() != null){
page.setSize(dto.getPageSize());
}
QueryWrapper<Acticle> queryWrapper = new QueryWrapper();
// if(!StringUtils.isEmpty(dto.getKeyword())){
// queryWrapper.lambda()
// .like(Acticle::getAuther,dto.getKeyword())
// .like(Acticle::getContent,dto.getKeyword())
// .like(Acticle::getTitle,dto.getKeyword());
// }
IPage<Acticle> iPage = this.page(page, queryWrapper);
return Result.ok(iPage);
}
@Override
public Result add(Acticle item, HttpSession session) throws Exception {
this.save(item);
return Result.ok();
}
/**
* 更新失败就重试
* @param item
* @param session
* @return
* @throws Exception
*/
@IsTryAgain
public Result edit(Acticle item, HttpSession session) throws Exception {
if(!this.updateById(item)){
throw new TryAgainException(ApiResultEnum.ERROR);
}
return Result.ok();
}
@Override
public Result del(Long id, HttpSession session) throws Exception {
this.removeById(id);
return Result.ok();
}
@Override
public Result getDetail(Long id) throws Exception {
Acticle item = this.getOne(new QueryWrapper<Acticle>().lambda().eq(Acticle::getId,id));
return Result.ok(item);
}
}
|
[
"weixiaotao@shein.com"
] |
weixiaotao@shein.com
|
7ddc9494659fe654390c37d31d8a5378f2b7a087
|
3556f83a930b05526a8e4356c2d95dab5e94a22b
|
/src/main/java/org/ssh/pm/common/webservice/rs/server/impl/HzWebServiceImpl.java
|
d721a84af84c46e036dad50a3e39f9cf8c91ad4e
|
[] |
no_license
|
yangjiandong/sshapp-mobileServer
|
2b2893a962fabde67b954b29dcf6c3e49fd4f147
|
e60b2135265187afc812ed3552e6c975823b1eaa
|
refs/heads/master
| 2023-04-28T01:14:15.817459
| 2012-08-17T00:31:47
| 2012-08-17T00:31:47
| 4,972,064
| 1
| 0
| null | 2023-04-14T20:07:46
| 2012-07-10T09:53:46
|
Java
|
UTF-8
|
Java
| false
| false
| 3,678
|
java
|
package org.ssh.pm.common.webservice.rs.server.impl;
import java.util.List;
import javax.jws.WebService;
import org.dozer.DozerBeanMapper;
import org.hibernate.ObjectNotFoundException;
import org.perf4j.StopWatch;
import org.perf4j.aop.Profiled;
import org.perf4j.slf4j.Slf4JStopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.ssh.pm.common.webservice.rs.server.HzWebService;
import org.ssh.pm.common.webservice.rs.server.WsConstants;
import org.ssh.pm.common.webservice.rs.server.dto.HzDTO;
import org.ssh.pm.common.webservice.rs.server.result.GetAllHzResult;
import org.ssh.pm.common.webservice.rs.server.result.GetHzResult;
import org.ssh.pm.common.webservice.rs.server.result.WSResult;
import org.ssh.sys.entity.Hz;
import org.ssh.sys.service.HzService;
import com.google.common.collect.Lists;
/**
* HzWebService服务端实现类.
*
* @author yangjiandong
*/
//serviceName与portName属性指明WSDL中的名称, endpointInterface属性指向Interface定义类.
@WebService(serviceName = "HzService", portName = "HzServicePort", endpointInterface = "org.ssh.pm.common.webservice.rs.server.HzWebService", targetNamespace = WsConstants.NS)
public class HzWebServiceImpl implements HzWebService {
private static Logger logger = LoggerFactory.getLogger(HzWebServiceImpl.class);
@Autowired
private HzService hzService;
@Autowired
private DozerBeanMapper dozer;
@Override
@Profiled(tag = "GetAllHzResult")
public GetAllHzResult getAllHz() {
try {
List<Hz> allHzList = this.hzService.getAllHzOnMethodCache();
List<HzDTO> allHzDTOList = Lists.newArrayList();
for (Hz hz : allHzList) {
allHzDTOList.add(dozer.map(hz, HzDTO.class));
}
GetAllHzResult result = new GetAllHzResult();
result.setHzList(allHzDTOList);
return result;
} catch (RuntimeException e) {
logger.error(e.getMessage(), e);
return WSResult.buildDefaultErrorResult(GetAllHzResult.class);
}
}
@Override
public GetHzResult getHz(String hz) {
StopWatch totalStopWatch = new Slf4JStopWatch();
//校验请求参数
try {
Assert.notNull(hz, "hz参数为空");
} catch (IllegalArgumentException e) {
logger.error(e.getMessage());
return WSResult.buildResult(GetHzResult.class, WSResult.PARAMETER_ERROR, e.getMessage());
}
//获取用户
try {
StopWatch dbStopWatch = new Slf4JStopWatch("GetHzResult.fetchDB");
Hz oneHz = this.hzService.getHz(hz);
dbStopWatch.stop();
HzDTO dto = dozer.map(oneHz, HzDTO.class);
GetHzResult result = new GetHzResult();
result.setHz(dto);
totalStopWatch.stop("GerHz.total.success");
return result;
} catch (ObjectNotFoundException e) {
String message = "用户不存在(id:" + hz + ")";
logger.error(message, e);
totalStopWatch.stop("GerHz.total.failure");
return WSResult.buildResult(GetHzResult.class, WSResult.PARAMETER_ERROR, message);
} catch (RuntimeException e) {
logger.error(e.getMessage(), e);
totalStopWatch.stop("GerHz.total.failure");
return WSResult.buildDefaultErrorResult(GetHzResult.class);
}
}
}
|
[
"young.jiandong@gmail.com"
] |
young.jiandong@gmail.com
|
baa1495758a0becd538e3edc0d1b7823ed47b677
|
62e334192393326476756dfa89dce9f0f08570d4
|
/ztk_code/ztk-arena-parent/arena-dubbo-api/src/main/java/com/huatu/ztk/arena/dubbo/ArenaDubboService.java
|
1b8e42654d90c048165f193948850cecb0363e36
|
[] |
no_license
|
JellyB/code_back
|
4796d5816ba6ff6f3925fded9d75254536a5ddcf
|
f5cecf3a9efd6851724a1315813337a0741bd89d
|
refs/heads/master
| 2022-07-16T14:19:39.770569
| 2019-11-22T09:22:12
| 2019-11-22T09:22:12
| 223,366,837
| 1
| 2
| null | 2022-06-30T20:21:38
| 2019-11-22T09:15:50
|
Java
|
UTF-8
|
Java
| false
| false
| 497
|
java
|
package com.huatu.ztk.arena.dubbo;
import com.huatu.ztk.arena.bean.ArenaRoom;
import org.springframework.data.mongodb.core.query.Update;
/**
* Created by shaojieyue
* Created time 2016-10-08 19:57
*/
public interface ArenaDubboService {
/**
* 根据id查询房间
* @param id
* @return
*/
ArenaRoom findById(long id);
/**
* 根据id 更新指定房间的数据
* @param id
* @param update
*/
void updateById(long id, Update update);
}
|
[
"jelly_b@126.com"
] |
jelly_b@126.com
|
bc8816ae65171b3f913d0a6409de306f65880797
|
73364c57427e07e90d66692a3664281d5113177e
|
/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/mapgeneration/comparator/IntervalLowValueAscComparator.java
|
1696afdb8b1d158216879d00893cf8ca9a62180e
|
[
"BSD-3-Clause"
] |
permissive
|
abyot/sun-pmt
|
4681f008804c8a7fc7a75fe5124f9b90df24d44d
|
40add275f06134b04c363027de6af793c692c0a1
|
refs/heads/master
| 2022-12-28T09:54:11.381274
| 2019-06-10T15:47:21
| 2019-06-10T15:47:21
| 55,851,437
| 0
| 1
|
BSD-3-Clause
| 2022-12-16T12:05:12
| 2016-04-09T15:21:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
package org.hisp.dhis.mapgeneration.comparator;
/*
* Copyright (c) 2004-2017, University of Oslo
* 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 the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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.
*/
import java.util.Comparator;
import org.hisp.dhis.mapgeneration.Interval;
/**
* @author Lars Helge Overland
*/
public class IntervalLowValueAscComparator
implements Comparator<Interval>
{
public static final IntervalLowValueAscComparator INSTANCE = new IntervalLowValueAscComparator();
@Override
public int compare( Interval i1, Interval i2 )
{
return new Double( i1.getValueLow() ).compareTo( new Double( i2.getValueLow() ) );
}
}
|
[
"abyota@gmail.com"
] |
abyota@gmail.com
|
3a9f055935b475e7d0702b8899a73542061af69a
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/DVC-AN20_EMUI10.1.1/src/main/java/android/animation/Keyframe.java
|
9e31f8e3f9703ba98321039d53b4a2a66fe0691f
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,884
|
java
|
package android.animation;
public abstract class Keyframe implements Cloneable {
float mFraction;
boolean mHasValue;
private TimeInterpolator mInterpolator = null;
Class mValueType;
boolean mValueWasSetOnStart;
@Override // java.lang.Object
public abstract Keyframe clone();
public abstract Object getValue();
public abstract void setValue(Object obj);
public static Keyframe ofInt(float fraction, int value) {
return new IntKeyframe(fraction, value);
}
public static Keyframe ofInt(float fraction) {
return new IntKeyframe(fraction);
}
public static Keyframe ofFloat(float fraction, float value) {
return new FloatKeyframe(fraction, value);
}
public static Keyframe ofFloat(float fraction) {
return new FloatKeyframe(fraction);
}
public static Keyframe ofObject(float fraction, Object value) {
return new ObjectKeyframe(fraction, value);
}
public static Keyframe ofObject(float fraction) {
return new ObjectKeyframe(fraction, null);
}
public boolean hasValue() {
return this.mHasValue;
}
/* access modifiers changed from: package-private */
public boolean valueWasSetOnStart() {
return this.mValueWasSetOnStart;
}
/* access modifiers changed from: package-private */
public void setValueWasSetOnStart(boolean valueWasSetOnStart) {
this.mValueWasSetOnStart = valueWasSetOnStart;
}
public float getFraction() {
return this.mFraction;
}
public void setFraction(float fraction) {
this.mFraction = fraction;
}
public TimeInterpolator getInterpolator() {
return this.mInterpolator;
}
public void setInterpolator(TimeInterpolator interpolator) {
this.mInterpolator = interpolator;
}
public Class getType() {
return this.mValueType;
}
static class ObjectKeyframe extends Keyframe {
Object mValue;
ObjectKeyframe(float fraction, Object value) {
this.mFraction = fraction;
this.mValue = value;
this.mHasValue = value != null;
this.mValueType = this.mHasValue ? value.getClass() : Object.class;
}
@Override // android.animation.Keyframe
public Object getValue() {
return this.mValue;
}
@Override // android.animation.Keyframe
public void setValue(Object value) {
this.mValue = value;
this.mHasValue = value != null;
}
@Override // android.animation.Keyframe, android.animation.Keyframe, java.lang.Object
public ObjectKeyframe clone() {
ObjectKeyframe kfClone = new ObjectKeyframe(getFraction(), hasValue() ? this.mValue : null);
kfClone.mValueWasSetOnStart = this.mValueWasSetOnStart;
kfClone.setInterpolator(getInterpolator());
return kfClone;
}
}
static class IntKeyframe extends Keyframe {
int mValue;
IntKeyframe(float fraction, int value) {
this.mFraction = fraction;
this.mValue = value;
this.mValueType = Integer.TYPE;
this.mHasValue = true;
}
IntKeyframe(float fraction) {
this.mFraction = fraction;
this.mValueType = Integer.TYPE;
}
public int getIntValue() {
return this.mValue;
}
@Override // android.animation.Keyframe
public Object getValue() {
return Integer.valueOf(this.mValue);
}
@Override // android.animation.Keyframe
public void setValue(Object value) {
if (value != null && value.getClass() == Integer.class) {
this.mValue = ((Integer) value).intValue();
this.mHasValue = true;
}
}
@Override // android.animation.Keyframe, android.animation.Keyframe, java.lang.Object
public IntKeyframe clone() {
IntKeyframe kfClone;
if (this.mHasValue) {
kfClone = new IntKeyframe(getFraction(), this.mValue);
} else {
kfClone = new IntKeyframe(getFraction());
}
kfClone.setInterpolator(getInterpolator());
kfClone.mValueWasSetOnStart = this.mValueWasSetOnStart;
return kfClone;
}
}
static class FloatKeyframe extends Keyframe {
float mValue;
FloatKeyframe(float fraction, float value) {
this.mFraction = fraction;
this.mValue = value;
this.mValueType = Float.TYPE;
this.mHasValue = true;
}
FloatKeyframe(float fraction) {
this.mFraction = fraction;
this.mValueType = Float.TYPE;
}
public float getFloatValue() {
return this.mValue;
}
@Override // android.animation.Keyframe
public Object getValue() {
return Float.valueOf(this.mValue);
}
@Override // android.animation.Keyframe
public void setValue(Object value) {
if (value != null && value.getClass() == Float.class) {
this.mValue = ((Float) value).floatValue();
this.mHasValue = true;
}
}
@Override // android.animation.Keyframe, android.animation.Keyframe, java.lang.Object
public FloatKeyframe clone() {
FloatKeyframe kfClone;
if (this.mHasValue) {
kfClone = new FloatKeyframe(getFraction(), this.mValue);
} else {
kfClone = new FloatKeyframe(getFraction());
}
kfClone.setInterpolator(getInterpolator());
kfClone.mValueWasSetOnStart = this.mValueWasSetOnStart;
return kfClone;
}
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
e50e712dd35d8bfca1d135deeba6c48f9cef23bf
|
8b96417ea286f9b2d3ec7d448e1a31c0ba8d57cb
|
/entitybroker/api/src/java/org/sakaiproject/entitybroker/entityprovider/extension/RequestStorageWrite.java
|
e63480f80ab946a01fa2e14fc5fd69b6a0fd9308
|
[
"ECL-2.0"
] |
permissive
|
deemsys/Deemsys_Learnguild
|
d5b11c5d1ad514888f14369b9947582836749883
|
606efcb2cdc2bc6093f914f78befc65ab79d32be
|
refs/heads/master
| 2021-01-15T16:16:12.036004
| 2013-08-13T12:13:45
| 2013-08-13T12:13:45
| 12,083,202
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,277
|
java
|
/**
* $Id: RequestStorageWrite.java 59674 2009-04-03 23:05:58Z arwhyte@umich.edu $
* $URL: https://source.sakaiproject.org/svn/entitybroker/tags/entitybroker-1.5.2/api/src/java/org/sakaiproject/entitybroker/entityprovider/extension/RequestStorageWrite.java $
* RequestStorage.java - entity-broker - Jul 24, 2008 1:55:12 PM - azeckoski
**************************************************************************
* Copyright (c) 2008, 2009 The Sakai Foundation
*
* Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.entitybroker.entityprovider.extension;
import java.util.Locale;
import java.util.Map;
/**
* This allows write access to values which are stored in the current request thread,
* these values are inaccessible outside of a request and will be destroyed
* when the thread ends<br/>
* This also "magically" exposes all the values in the request (attributes and params)
* as if they were stored in the map as well, if there are conflicts then locally stored data always wins
* over data from the request<br/>
* Standard reserved keys have values that are always available:<br/>
* <ul>
* <li><b>_locale</b> : {@link Locale}</li>
* <li><b>_requestEntityReference</b> : String</li>
* <li><b>_requestActive</b> : [true,false]</li>
* <li><b>_requestOrigin</b> : ['REST','EXTERNAL','INTERNAL']</li>
* </ul>
*
* @author Aaron Zeckoski (azeckoski @ gmail.com)
*/
public interface RequestStorageWrite extends RequestStorage {
/**
* Store a value in the request storage with an associated key
* @param key a key for a stored value
* @param value an object to store
* @throws IllegalArgumentException if the key OR value are null,
* also if an attempt is made to change a reserved value (see {@link RequestStorageWrite})
*/
public void setStoredValue(String key, Object value);
/**
* Place all these params into the request storage
* @param params map of string -> value params
* @throws IllegalArgumentException if the key OR value are null,
* also if an attempt is made to change a reserved value (see {@link RequestStorageWrite})
*/
public void setRequestValues(Map<String, Object> params);
/**
* Allows user to set the value of a key directly, including reserved keys
* @param key the name of the value
* @param value the value to store
* @throws IllegalArgumentException if the key OR value are null,
* also if an attempt is made to change a reserved value (see {@link RequestStorageWrite})
*/
public void setRequestValue(String key, Object value);
/**
* Clear all values in the request storage (does not wipe the values form the request itself)
*/
public void reset();
}
|
[
"sangee1229@gmail.com"
] |
sangee1229@gmail.com
|
3d21471258a346d48124384cd8c9f3e8252cf307
|
1cf5e199a68fd7f69107ab547225fe64e28909a2
|
/common/src/main/java/com/gamerole/common/rxbus2/SubscriberMethod.java
|
ac0ad724423d8f0086667a7c94b91a540b118f6e
|
[] |
no_license
|
lvzhihao100/DDRoleBase
|
94d807baa7f682561ca6d43e1ef9e4ff5650e68f
|
789921d9545747d44d89ec7f7c28fd5d9f221652
|
refs/heads/master
| 2020-03-13T13:31:23.764200
| 2018-04-26T10:37:58
| 2018-04-26T10:37:58
| 129,202,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,182
|
java
|
package com.gamerole.common.rxbus2;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Created by lvzhihao on 17-7-25.
*/
public class SubscriberMethod {
public Method method;
public ThreadMode threadMode;
public Class<?> eventType;
public Object subscriber;
public int code;
public SubscriberMethod(Object subscriber, Method method, Class<?> eventType, int code, ThreadMode threadMode) {
this.method = method;
this.threadMode = threadMode;
this.eventType = eventType;
this.subscriber = subscriber;
this.code = code;
}
public void invoke(Object o) {
try {
Class[] e = this.method.getParameterTypes();
if (e != null && e.length == 1) {
this.method.invoke(this.subscriber, new Object[]{o});
} else if (e == null || e.length == 0) {
this.method.invoke(this.subscriber, new Object[0]);
}
} catch (IllegalAccessException var3) {
var3.printStackTrace();
} catch (InvocationTargetException var4) {
var4.printStackTrace();
}
}
}
|
[
"1030753080@qq.com"
] |
1030753080@qq.com
|
bc3ab3c53e454ef15b537b75af7bff872dad636f
|
f843788f75b1ff8d5ff6d24fd7137be1b05d1aa6
|
/src/ac/biu/nlp/nlp/instruments/parse/tree/dependency/basic/xmldom/TreeAndSentence.java
|
31083137ad31048e56487bdfde7e9da9b5549658
|
[] |
no_license
|
oferbr/biu-infrastructure
|
fe830d02defc7931f9be239402931cfbf223c05e
|
051096636b705ffe7756f144f58c384a56a7fcc3
|
refs/heads/master
| 2021-01-19T08:12:33.484302
| 2013-02-05T16:08:58
| 2013-02-05T16:08:58
| 6,156,024
| 2
| 0
| null | 2012-11-18T09:42:20
| 2012-10-10T11:02:33
|
Java
|
UTF-8
|
Java
| false
| false
| 772
|
java
|
package ac.biu.nlp.nlp.instruments.parse.tree.dependency.basic.xmldom;
import java.io.Serializable;
import ac.biu.nlp.nlp.instruments.parse.tree.dependency.basic.BasicNode;
/**
* Holds a tree and a sentence (from which that tree was created).
*
* @author Asher Stern
* @since October 2, 2012
*
*/
public class TreeAndSentence implements Serializable
{
private static final long serialVersionUID = -6342877867677633913L;
public TreeAndSentence(String sentence, BasicNode tree)
{
super();
this.sentence = sentence;
this.tree = tree;
}
public String getSentence()
{
return sentence;
}
public BasicNode getTree()
{
return tree;
}
private final String sentence;
private final BasicNode tree;
}
|
[
"oferbr@gmail.com"
] |
oferbr@gmail.com
|
d9ea3507566e9194eb12f4a25555c9c86ebd4746
|
3dd35c0681b374ce31dbb255b87df077387405ff
|
/generated/com/guidewire/_generated/entity/GL7SublnSchedCondItemCostInternalAccess.java
|
9e236c861326bfaf65de366ece5b93ae39093979
|
[] |
no_license
|
walisashwini/SBTBackup
|
58b635a358e8992339db8f2cc06978326fed1b99
|
4d4de43576ec483bc031f3213389f02a92ad7528
|
refs/heads/master
| 2023-01-11T09:09:10.205139
| 2020-11-18T12:11:45
| 2020-11-18T12:11:45
| 311,884,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 937
|
java
|
package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "GL7SublnSchedCondItemCost.eti;GL7SublnSchedCondItemCost.eix;GL7SublnSchedCondItemCost.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public class GL7SublnSchedCondItemCostInternalAccess {
public static final com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.GL7SublnSchedCondItemCost, com.guidewire._generated.entity.GL7SublnSchedCondItemCostInternal>> FRIEND_ACCESSOR = new com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.GL7SublnSchedCondItemCost, com.guidewire._generated.entity.GL7SublnSchedCondItemCostInternal>>(entity.GL7SublnSchedCondItemCost.class);
private GL7SublnSchedCondItemCostInternalAccess() {
}
}
|
[
"ashwini@cruxxtechnologies.com"
] |
ashwini@cruxxtechnologies.com
|
9cefe5811b6f49cbc75ba6cfefe5092ed10e5057
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__long_max_square_01.java
|
60926a977945dd233bb51a93b998f7978e451c97
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,866
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__long_max_square_01.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-01.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for long
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: square
* GoodSink: Ensure there will not be an overflow before squaring data
* BadSink : Square data, which can lead to overflow
* Flow Variant: 01 Baseline
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.lang.Math;
public class CWE190_Integer_Overflow__long_max_square_01 extends AbstractTestCase
{
public void bad() throws Throwable
{
long data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Long.MAX_VALUE;
/* POTENTIAL FLAW: if (data*data) > Long.MAX_VALUE, this will overflow */
long result = (long)(data * data);
IO.writeLine("result: " + result);
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
long data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
/* POTENTIAL FLAW: if (data*data) > Long.MAX_VALUE, this will overflow */
long result = (long)(data * data);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
long data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Long.MAX_VALUE;
/* FIX: Add a check to prevent an overflow from occurring */
/* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */
if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Long.MAX_VALUE)))
{
long result = (long)(data * data);
IO.writeLine("result: " + result);
}
else {
IO.writeLine("data value is too large to perform squaring.");
}
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
16e325432631b94148f4afc65ffdd8b3828be87b
|
eb5f5353f49ee558e497e5caded1f60f32f536b5
|
/org/omg/DynamicAny/NameDynAnyPairHelper.java
|
196b5e51ccbdd84c36c587a1114c1a48c950b57e
|
[] |
no_license
|
mohitrajvardhan17/java1.8.0_151
|
6fc53e15354d88b53bd248c260c954807d612118
|
6eeab0c0fd20be34db653f4778f8828068c50c92
|
refs/heads/master
| 2020-03-18T09:44:14.769133
| 2018-05-23T14:28:24
| 2018-05-23T14:28:24
| 134,578,186
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,563
|
java
|
package org.omg.DynamicAny;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
public abstract class NameDynAnyPairHelper
{
private static String _id = "IDL:omg.org/DynamicAny/NameDynAnyPair:1.0";
private static TypeCode __typeCode = null;
private static boolean __active = false;
public NameDynAnyPairHelper() {}
public static void insert(Any paramAny, NameDynAnyPair paramNameDynAnyPair)
{
OutputStream localOutputStream = paramAny.create_output_stream();
paramAny.type(type());
write(localOutputStream, paramNameDynAnyPair);
paramAny.read_value(localOutputStream.create_input_stream(), type());
}
public static NameDynAnyPair extract(Any paramAny)
{
return read(paramAny.create_input_stream());
}
public static synchronized TypeCode type()
{
if (__typeCode == null) {
synchronized (TypeCode.class)
{
if (__typeCode == null)
{
if (__active) {
return ORB.init().create_recursive_tc(_id);
}
__active = true;
StructMember[] arrayOfStructMember = new StructMember[2];
TypeCode localTypeCode = null;
localTypeCode = ORB.init().create_string_tc(0);
localTypeCode = ORB.init().create_alias_tc(FieldNameHelper.id(), "FieldName", localTypeCode);
arrayOfStructMember[0] = new StructMember("id", localTypeCode, null);
localTypeCode = DynAnyHelper.type();
arrayOfStructMember[1] = new StructMember("value", localTypeCode, null);
__typeCode = ORB.init().create_struct_tc(id(), "NameDynAnyPair", arrayOfStructMember);
__active = false;
}
}
}
return __typeCode;
}
public static String id()
{
return _id;
}
public static NameDynAnyPair read(InputStream paramInputStream)
{
NameDynAnyPair localNameDynAnyPair = new NameDynAnyPair();
id = paramInputStream.read_string();
value = DynAnyHelper.read(paramInputStream);
return localNameDynAnyPair;
}
public static void write(OutputStream paramOutputStream, NameDynAnyPair paramNameDynAnyPair)
{
paramOutputStream.write_string(id);
DynAnyHelper.write(paramOutputStream, value);
}
}
/* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\org\omg\DynamicAny\NameDynAnyPairHelper.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"mohit.rajvardhan@ericsson.com"
] |
mohit.rajvardhan@ericsson.com
|
9fb2ea468b3dccee8dc8fc225dd94505dbddae1c
|
a46306fc7beb404754407ed3df63ba6519bcbd3e
|
/java-advanced/src/main/java/com/bucur/oop/ex1/GradedCourse.java
|
da2f59f38962bfc174e99b2cd5aeba95b86ca882
|
[] |
no_license
|
cosminbucur/sda-course-gradle
|
a17a7a91b9177425fae62dea3437e46a57912c61
|
4c3648d11be5205e91a397ac9fa07bbb6b3694f0
|
refs/heads/master
| 2022-11-27T03:33:14.960068
| 2020-08-07T12:01:26
| 2020-08-07T12:01:26
| 285,763,951
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.bucur.oop.ex1;
public class GradedCourse extends Course {
private int grade;
public GradedCourse(String name, int grade) {
super(name);
this.grade = grade;
}
@Override
public boolean passed() {
return grade >= 5;
}
}
|
[
"cosmin.bucur@kambi.com"
] |
cosmin.bucur@kambi.com
|
84d34b8ee844803dc9e4b41749ec2ae4889a9772
|
7f9e44a5f3137f2830fb8b0c3c0dd5ea5ca39aa2
|
/src/main/java/std/wlj/dan/SearchForPlaceReps.java
|
09f6c4bfaccc311ee49709bfa39f342c6b9af3c7
|
[] |
no_license
|
wjohnson000/wlj-place-test
|
042398f3b6f3472638e2c6d263419eb4670a5dde
|
d23ece28efe4f79b9f5343a75b1a85e8567d3021
|
refs/heads/master
| 2021-08-03T22:42:30.127330
| 2021-04-29T21:19:27
| 2021-04-29T21:19:27
| 18,767,871
| 0
| 0
| null | 2021-08-03T12:18:26
| 2014-04-14T16:30:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,325
|
java
|
package std.wlj.dan;
import org.familysearch.standards.place.data.PlaceRepBridge;
import org.familysearch.standards.place.data.PlaceSearchResults;
import org.familysearch.standards.place.data.SearchParameter;
import org.familysearch.standards.place.data.SearchParameters;
import org.familysearch.standards.place.data.solr.SolrService;
import org.familysearch.standards.place.exceptions.PlaceDataException;
import std.wlj.util.SolrManager;
public class SearchForPlaceReps {
public static void main(String... args) throws PlaceDataException {
SolrService solrService = SolrManager.awsProdService(false);
SearchParameters params = new SearchParameters();
params.addParam( SearchParameter.PlaceParam.createParam( 1941217 ) );
params.addParam( SearchParameter.FilterDeleteParam.createParam( true ) );
PlaceSearchResults results = solrService.search(params);
System.out.println("PlaceReps: " + results.getReturnedCount());
for (PlaceRepBridge repB : results.getResults()) {
System.out.println("PR: " + repB.getRepId() + " . " + repB.getDefaultLocale() + " . " + repB.getAllDisplayNames().get(repB.getDefaultLocale()));
System.out.println(" D: " + repB.isDeleted() + " --> " + repB.getRevision());
}
System.exit(0);
}
}
|
[
"wjohnson@familysearch.org"
] |
wjohnson@familysearch.org
|
eed0022aa7c18132b504f9683c8c2408b0e19a59
|
23ff493b8800c3c43bb37303c7c7886bef34ba82
|
/src/hpu/zyf/service/impl/ProductServiceImpl.java
|
61cf11bddd3155cd1e50b861ef6cc6c4124145d9
|
[] |
no_license
|
hpulzl/snackShop
|
223c381fd368ba207c4e7ea7f9cf56e2476974ff
|
74566253173b4abba569bfb44c5492a9254a473f
|
refs/heads/master
| 2021-01-01T05:29:03.445658
| 2017-04-13T06:53:34
| 2017-04-13T06:53:34
| 59,088,502
| 1
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,290
|
java
|
package hpu.zyf.service.impl;
import hpu.zyf.entity.Discountproduct;
import hpu.zyf.entity.ProductType;
import hpu.zyf.entity.Productdetail;
import hpu.zyf.entity.ProductdetailExample;
import hpu.zyf.entity.ProductdetailExample.Criteria;
import hpu.zyf.exception.CustomException;
import hpu.zyf.mapper.DiscountproductMapper;
import hpu.zyf.mapper.ProductTypeMapper;
import hpu.zyf.mapper.ProductdetailMapper;
import hpu.zyf.service.ProductService;
import hpu.zyf.util.MyRowBounds;
import hpu.zyf.util.UUIDUtil;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 商品接口的实现类
* @author admin
*
*/
public class ProductServiceImpl implements ProductService{
//设置每页显示10条数据
public final int pageCount = 10;
//设置数据库中总记录数
public int totalCount = 0;
@Autowired
private ProductdetailMapper pdm;
@Autowired
private DiscountproductMapper dpm;
@Autowired
private ProductTypeMapper ptm;
/**
* 添加商品
*/
@Override
public boolean inserProduct(Productdetail pd) throws Exception {
if(pd==null){
throw new CustomException("插入-->商品信息不能为空");
}
pd.setPdid(UUIDUtil.getUUId());
pd.setCreatetime(new Date());
if(pdm.insert(pd)>0){
return true;
}
return false;
}
@Override
public boolean updateProduct(Productdetail pd) throws Exception {
if(pd==null){
throw new CustomException("更新--->商品信息不能为空");
}
//如果某个属性为空,你们就不用更新
if(pdm.updateByPrimaryKeySelective(pd)>0){
return true;
}
return false;
}
@Override
public boolean deleteProduct(String pdid) throws Exception {
if(pdm.deleteByPrimaryKey(pdid)>0){
dpm.deleteByPdid(pdid);
return true;
}
return false;
}
@Override
public Productdetail selectByPdid(String pdid) throws Exception {
Productdetail pd = pdm.selectByPrimaryKey(pdid);
if(pd == null){
throw new CustomException("查询的商品为空");
}
return pd;
}
@Override
public List<Productdetail> selectByPdExample(String example, int pageNo)
throws Exception {
ProductdetailExample pdExample = new ProductdetailExample();
//设置分页限制
pdExample.setRowBounds(new MyRowBounds(pageNo, pageCount));
if(example !=null){
//接下来是类别查询
Criteria critetia = pdExample.createCriteria();
critetia.andPdtypeLike("%"+example+"%");
totalCount = pdm.countByExample(pdExample);
}
//如果查询条件为空,设置为查询全部
return pdm.selectByExample(pdExample);
}
@Override
public int pageTotal(String example) throws Exception {
ProductdetailExample pdExample = new ProductdetailExample();
int total = 0;
if(example ==null || "".equals(example)){ //如果查询条件为空,设置为查询全部
total = pdm.countByExample(pdExample);
}else{
//接下来是类别查询
Criteria critetia = pdExample.createCriteria();
critetia.andPdtypeLike("%"+example+"%");
total = pdm.countByExample(pdExample);
}
return MyRowBounds.pageTotal(total, pageCount);
}
@Override
public List<ProductType> selectAllType() throws Exception {
return ptm.selectAllPtType();
}
}
|
[
"824337531@qq.com"
] |
824337531@qq.com
|
fdf0255e33b223692b5e2ff1d053c127ff74dd00
|
4365604e3579b526d473c250853548aed38ecb2a
|
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v202011/CreativeTemplateOperationErrorReason.java
|
b2539091a3bbddb9ddbf90cf21db8413f8cf3349
|
[
"Apache-2.0"
] |
permissive
|
lmaeda/googleads-java-lib
|
6e73572b94b6dcc46926f72dd4e1a33a895dae61
|
cc5b2fc8ef76082b72f021c11ff9b7e4d9326aca
|
refs/heads/master
| 2023-08-12T19:03:46.808180
| 2021-09-28T16:48:04
| 2021-09-28T16:48:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,835
|
java
|
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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.
/**
* CreativeTemplateOperationErrorReason.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.admanager.axis.v202011;
public class CreativeTemplateOperationErrorReason implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected CreativeTemplateOperationErrorReason(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _NOT_ALLOWED = "NOT_ALLOWED";
public static final java.lang.String _NOT_APPLICABLE = "NOT_APPLICABLE";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final CreativeTemplateOperationErrorReason NOT_ALLOWED = new CreativeTemplateOperationErrorReason(_NOT_ALLOWED);
public static final CreativeTemplateOperationErrorReason NOT_APPLICABLE = new CreativeTemplateOperationErrorReason(_NOT_APPLICABLE);
public static final CreativeTemplateOperationErrorReason UNKNOWN = new CreativeTemplateOperationErrorReason(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static CreativeTemplateOperationErrorReason fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
CreativeTemplateOperationErrorReason enumeration = (CreativeTemplateOperationErrorReason)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static CreativeTemplateOperationErrorReason fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(CreativeTemplateOperationErrorReason.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v202011", "CreativeTemplateOperationError.Reason"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"christopherseeley@users.noreply.github.com"
] |
christopherseeley@users.noreply.github.com
|
6b400717674907d607e5cd5fe0edbaa671de549c
|
7d1df492699a1d2e5e1ab0fdb91e92ef1c3b41b8
|
/distr_manage/src/com/xwtech/uomp/base/dao/business/BusinessExattrDzMapper.java
|
873efdd7a57f3ff3816acfb3a373f736662a949e
|
[] |
no_license
|
5391667/xwtec
|
ab492d6eeb4c00a2fac74ba0adc965932a4e4c5f
|
ca6c4f0011d5b1dbbfaa19468e5b5989c308496d
|
refs/heads/master
| 2020-05-31T16:06:18.102976
| 2014-04-30T08:39:05
| 2014-04-30T08:39:05
| 190,374,043
| 0
| 0
| null | 2019-06-05T10:21:40
| 2019-06-05T10:21:40
| null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
package com.xwtech.uomp.base.dao.business;
import java.util.List;
import com.xwtech.uomp.base.pojo.business.BusinessExattrDzBean;
/**
*
* This class is used for ...
* @author zhangel
* @version
* 1.0, 2013-11-6 下午02:53:06
*/
public interface BusinessExattrDzMapper {
List<BusinessExattrDzBean> queryBusiExtraDzByAttrKey(String attrKey);
void deleteBusiExtraDzByAttrKey(String attrKey);
void insert(BusinessExattrDzBean businessExattrDzBean);
void deleteByBusiNum(String busiNum);
}
|
[
"redtroyzhang@gmail.com"
] |
redtroyzhang@gmail.com
|
0ffc1b8be179eeecff53cf37b8adf6705f26f6e3
|
56e87f1d1ea499318c5fcdb4594f0efd9cfceebb
|
/repository/src/main/java/oasis/names/tc/emergency/EDXL/TEP/_1/SpecialClassificationDefaultValues.java
|
8ebb1290b8e5dedab6e832954fb3aae8c081a415
|
[] |
no_license
|
vergetid/impress
|
7da9353b65bc324bb58c6694747925ab92bac104
|
dd207cabeff4af8449245d96d276ceb7a71ba14d
|
refs/heads/master
| 2020-05-21T12:34:54.412796
| 2017-06-20T13:28:14
| 2017-06-20T13:28:14
| 55,222,896
| 0
| 0
| null | 2017-03-31T13:00:22
| 2016-04-01T10:06:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,842
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.04.01 at 06:03:54 PM EEST
//
package oasis.names.tc.emergency.EDXL.TEP._1;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SpecialClassificationDefaultValues.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="SpecialClassificationDefaultValues">
* <restriction base="{urn:oasis:names:tc:emergency:edxl:ct:1.0}EDXLStringType">
* <enumeration value="SecuritySupervisionNeeds"/>
* <enumeration value="NDMSPatient"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "SpecialClassificationDefaultValues", namespace = "urn:oasis:names:tc:emergency:EDXL:TEP:1.0")
@XmlEnum
public enum SpecialClassificationDefaultValues {
@XmlEnumValue("SecuritySupervisionNeeds")
SECURITY_SUPERVISION_NEEDS("SecuritySupervisionNeeds"),
@XmlEnumValue("NDMSPatient")
NDMS_PATIENT("NDMSPatient");
private final String value;
SpecialClassificationDefaultValues(String v) {
value = v;
}
public String value() {
return value;
}
public static SpecialClassificationDefaultValues fromValue(String v) {
for (SpecialClassificationDefaultValues c: SpecialClassificationDefaultValues.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"vergetid@ubitech.eu"
] |
vergetid@ubitech.eu
|
929bed305354f4b9da01b439c327aad497982ca0
|
61f4bce6d63d39c03247c35cfc67e03c56e0b496
|
/src/dyno/swing/designer/properties/editors/accessibles/AccessibleListModelEditor.java
|
ca87b51764e8a2e138a6a1d1d4afd87b3b035b06
|
[] |
no_license
|
phalex/swing_designer
|
570cff4a29304d52707c4fa373c9483bbdaa33b9
|
3e184408bcd0aab6dd5b4ba8ae2aaa3f846963ff
|
refs/heads/master
| 2021-01-01T20:38:49.845289
| 2012-12-17T06:50:11
| 2012-12-17T06:50:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
/*
* AccessibleComboBoxModelEditor.java
*
* Created on 2007-8-28, 0:45:25
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dyno.swing.designer.properties.editors.accessibles;
import dyno.swing.designer.properties.editors.*;
import dyno.swing.designer.properties.wrappers.ListModelWrapper;
import java.awt.Frame;
import java.awt.Window;
import javax.swing.ListModel;
import javax.swing.SwingUtilities;
/**
*
* @author William Chen
*/
public class AccessibleListModelEditor extends UneditableAccessibleEditor {
private ListModelDialog dialog;
/** Creates a new instance of AccessibleColorEditor */
public AccessibleListModelEditor() {
super(new ListModelWrapper());
}
protected void popupDialog() {
if (dialog == null) {
Frame frame;
Window win = SwingUtilities.getWindowAncestor(this);
if (win instanceof Frame) {
frame = (Frame) win;
} else {
frame = new Frame();
}
dialog = new ListModelDialog(frame, true);
dialog.setElementWrapper(((ListModelWrapper) encoder).getElementWrapper());
dialog.setLocationRelativeTo(this);
}
dialog.setModel((ListModel) getValue());
dialog.setVisible(true);
if(dialog.isOK()){
setValue(dialog.getModel());
fireStateChanged();
}
}
}
|
[
"584874132@qq.com"
] |
584874132@qq.com
|
1a47ef157be50c24014db075212ef2ff8bbb23eb
|
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
|
/ebean/tags/v2.6.0/src/main/java/com/avaje/ebeaninternal/server/type/ScalarTypeBase.java
|
9f7467969b5cbc90df7203d800d242e5fa44c28b
|
[] |
no_license
|
rbygrave/sourceforge-ebean
|
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
|
694274581a188be664614135baa3e4697d52d6fb
|
refs/heads/master
| 2020-06-19T10:29:37.011676
| 2019-12-17T22:09:29
| 2019-12-17T22:09:29
| 196,677,514
| 1
| 0
| null | 2019-12-17T22:07:13
| 2019-07-13T04:21:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,793
|
java
|
/**
* Copyright (C) 2006 Robin Bygrave
*
* This file is part of Ebean.
*
* Ebean is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* Ebean is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Ebean; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package com.avaje.ebeaninternal.server.type;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import com.avaje.ebean.text.json.JsonValueAdapter;
/**
* Base ScalarType object.
*/
public abstract class ScalarTypeBase<T> implements ScalarType<T> {
protected final Class<T> type;
protected final boolean jdbcNative;
protected final int jdbcType;
public ScalarTypeBase(Class<T> type, boolean jdbcNative, int jdbcType) {
this.type = type;
this.jdbcNative = jdbcNative;
this.jdbcType = jdbcType;
}
public Object readData(DataInput dataInput) throws IOException {
String s = dataInput.readUTF();
return parse(s);
}
public void writeData(DataOutput dataOutput, Object v) throws IOException {
String s = format(v);
dataOutput.writeUTF(s);
}
/**
* Just return 0.
*/
public int getLength() {
return 0;
}
public boolean isJdbcNative() {
return jdbcNative;
}
public int getJdbcType() {
return jdbcType;
}
public Class<T> getType() {
return type;
}
@SuppressWarnings("unchecked")
public String format(Object v) {
return formatValue((T)v);
}
/**
* Return true if the value is null.
*/
public boolean isDbNull(Object value) {
return value == null;
}
/**
* Returns the value that was passed in.
*/
public Object getDbNullValue(Object value) {
return value;
}
public void loadIgnore(DataReader dataReader) {
dataReader.incrementPos(1);
}
public void accumulateScalarTypes(String propName, CtCompoundTypeScalarList list) {
list.addScalarType(propName, this);
}
public String jsonToString(T value, JsonValueAdapter ctx) {
return formatValue(value);
}
public T jsonFromString(String value, JsonValueAdapter ctx) {
return parse(value);
}
}
|
[
"208973+rbygrave@users.noreply.github.com"
] |
208973+rbygrave@users.noreply.github.com
|
72cfb492ab39f59ca89333b619e3aa6490772a9f
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/android/hardware/radio/V1_2/VoiceRegStateResult.java
|
f53faabf90994ad0ef8077d83bd7d98a2f611e36
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,484
|
java
|
package android.hardware.radio.V1_2;
import android.hardware.radio.V1_0.RegState;
import android.os.HidlSupport;
import android.os.HwBlob;
import android.os.HwParcel;
import java.util.ArrayList;
import java.util.Objects;
public final class VoiceRegStateResult {
public CellIdentity cellIdentity = new CellIdentity();
public boolean cssSupported;
public int defaultRoamingIndicator;
public int rat;
public int reasonForDenial;
public int regState;
public int roamingIndicator;
public int systemIsInPrl;
public final boolean equals(Object otherObject) {
if (this == otherObject) {
return true;
}
if (otherObject == null || otherObject.getClass() != VoiceRegStateResult.class) {
return false;
}
VoiceRegStateResult other = (VoiceRegStateResult) otherObject;
if (this.regState == other.regState && this.rat == other.rat && this.cssSupported == other.cssSupported && this.roamingIndicator == other.roamingIndicator && this.systemIsInPrl == other.systemIsInPrl && this.defaultRoamingIndicator == other.defaultRoamingIndicator && this.reasonForDenial == other.reasonForDenial && HidlSupport.deepEquals(this.cellIdentity, other.cellIdentity)) {
return true;
}
return false;
}
public final int hashCode() {
return Objects.hash(Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.regState))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.rat))), Integer.valueOf(HidlSupport.deepHashCode(Boolean.valueOf(this.cssSupported))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.roamingIndicator))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.systemIsInPrl))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.defaultRoamingIndicator))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.reasonForDenial))), Integer.valueOf(HidlSupport.deepHashCode(this.cellIdentity)));
}
public final String toString() {
return "{.regState = " + RegState.toString(this.regState) + ", .rat = " + this.rat + ", .cssSupported = " + this.cssSupported + ", .roamingIndicator = " + this.roamingIndicator + ", .systemIsInPrl = " + this.systemIsInPrl + ", .defaultRoamingIndicator = " + this.defaultRoamingIndicator + ", .reasonForDenial = " + this.reasonForDenial + ", .cellIdentity = " + this.cellIdentity + "}";
}
public final void readFromParcel(HwParcel parcel) {
readEmbeddedFromParcel(parcel, parcel.readBuffer(120), 0);
}
public static final ArrayList<VoiceRegStateResult> readVectorFromParcel(HwParcel parcel) {
ArrayList<VoiceRegStateResult> _hidl_vec = new ArrayList<>();
HwBlob _hidl_blob = parcel.readBuffer(16);
int _hidl_vec_size = _hidl_blob.getInt32(8);
HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 120), _hidl_blob.handle(), 0, true);
_hidl_vec.clear();
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
VoiceRegStateResult _hidl_vec_element = new VoiceRegStateResult();
_hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 120));
_hidl_vec.add(_hidl_vec_element);
}
return _hidl_vec;
}
public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) {
this.regState = _hidl_blob.getInt32(0 + _hidl_offset);
this.rat = _hidl_blob.getInt32(4 + _hidl_offset);
this.cssSupported = _hidl_blob.getBool(8 + _hidl_offset);
this.roamingIndicator = _hidl_blob.getInt32(12 + _hidl_offset);
this.systemIsInPrl = _hidl_blob.getInt32(16 + _hidl_offset);
this.defaultRoamingIndicator = _hidl_blob.getInt32(20 + _hidl_offset);
this.reasonForDenial = _hidl_blob.getInt32(24 + _hidl_offset);
this.cellIdentity.readEmbeddedFromParcel(parcel, _hidl_blob, 32 + _hidl_offset);
}
public final void writeToParcel(HwParcel parcel) {
HwBlob _hidl_blob = new HwBlob(120);
writeEmbeddedToBlob(_hidl_blob, 0);
parcel.writeBuffer(_hidl_blob);
}
public static final void writeVectorToParcel(HwParcel parcel, ArrayList<VoiceRegStateResult> _hidl_vec) {
HwBlob _hidl_blob = new HwBlob(16);
int _hidl_vec_size = _hidl_vec.size();
_hidl_blob.putInt32(8, _hidl_vec_size);
_hidl_blob.putBool(12, false);
HwBlob childBlob = new HwBlob(_hidl_vec_size * 120);
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
_hidl_vec.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 120));
}
_hidl_blob.putBlob(0, childBlob);
parcel.writeBuffer(_hidl_blob);
}
public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) {
_hidl_blob.putInt32(0 + _hidl_offset, this.regState);
_hidl_blob.putInt32(4 + _hidl_offset, this.rat);
_hidl_blob.putBool(8 + _hidl_offset, this.cssSupported);
_hidl_blob.putInt32(12 + _hidl_offset, this.roamingIndicator);
_hidl_blob.putInt32(16 + _hidl_offset, this.systemIsInPrl);
_hidl_blob.putInt32(20 + _hidl_offset, this.defaultRoamingIndicator);
_hidl_blob.putInt32(24 + _hidl_offset, this.reasonForDenial);
this.cellIdentity.writeEmbeddedToBlob(_hidl_blob, 32 + _hidl_offset);
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
27c7d143f8b785fde35a1edada62e5f98e011179
|
7f261a1e2bafd1cdd98d58f00a2937303c0dc942
|
/src/ANXCamera/sources/com/bumptech/glide/load/engine/bitmap_recycle/g.java
|
f6ed2f5b8213149c2ab9dff9f7a2d525fcd57354
|
[] |
no_license
|
xyzuan/ANXCamera
|
7614ddcb4bcacdf972d67c2ba17702a8e9795c95
|
b9805e5197258e7b980e76a97f7f16de3a4f951a
|
refs/heads/master
| 2022-04-23T16:58:09.592633
| 2019-05-31T17:18:34
| 2019-05-31T17:26:48
| 259,555,505
| 3
| 0
| null | 2020-04-28T06:49:57
| 2020-04-28T06:49:57
| null |
UTF-8
|
Java
| false
| false
| 3,251
|
java
|
package com.bumptech.glide.load.engine.bitmap_recycle;
import android.support.annotation.Nullable;
import com.bumptech.glide.load.engine.bitmap_recycle.l;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* compiled from: GroupedLinkedMap */
class g<K extends l, V> {
private final a<K, V> hi = new a<>();
private final Map<K, a<K, V>> hj = new HashMap();
/* compiled from: GroupedLinkedMap */
private static class a<K, V> {
a<K, V> hk;
a<K, V> hl;
final K key;
private List<V> values;
a() {
this(null);
}
a(K k) {
this.hl = this;
this.hk = this;
this.key = k;
}
public void add(V v) {
if (this.values == null) {
this.values = new ArrayList();
}
this.values.add(v);
}
@Nullable
public V removeLast() {
int size = size();
if (size > 0) {
return this.values.remove(size - 1);
}
return null;
}
public int size() {
if (this.values != null) {
return this.values.size();
}
return 0;
}
}
g() {
}
private void a(a<K, V> aVar) {
d(aVar);
aVar.hl = this.hi;
aVar.hk = this.hi.hk;
c(aVar);
}
private void b(a<K, V> aVar) {
d(aVar);
aVar.hl = this.hi.hl;
aVar.hk = this.hi;
c(aVar);
}
private static <K, V> void c(a<K, V> aVar) {
aVar.hk.hl = aVar;
aVar.hl.hk = aVar;
}
private static <K, V> void d(a<K, V> aVar) {
aVar.hl.hk = aVar.hk;
aVar.hk.hl = aVar.hl;
}
public void a(K k, V v) {
a aVar = (a) this.hj.get(k);
if (aVar == null) {
aVar = new a(k);
b(aVar);
this.hj.put(k, aVar);
} else {
k.bm();
}
aVar.add(v);
}
@Nullable
public V b(K k) {
a aVar = (a) this.hj.get(k);
if (aVar == null) {
aVar = new a(k);
this.hj.put(k, aVar);
} else {
k.bm();
}
a(aVar);
return aVar.removeLast();
}
@Nullable
public V removeLast() {
for (a<K, V> aVar = this.hi.hl; !aVar.equals(this.hi); aVar = aVar.hl) {
V removeLast = aVar.removeLast();
if (removeLast != null) {
return removeLast;
}
d(aVar);
this.hj.remove(aVar.key);
((l) aVar.key).bm();
}
return null;
}
public String toString() {
StringBuilder sb = new StringBuilder("GroupedLinkedMap( ");
boolean z = false;
for (a<K, V> aVar = this.hi.hk; !aVar.equals(this.hi); aVar = aVar.hk) {
z = true;
sb.append('{');
sb.append(aVar.key);
sb.append(':');
sb.append(aVar.size());
sb.append("}, ");
}
if (z) {
sb.delete(sb.length() - 2, sb.length());
}
sb.append(" )");
return sb.toString();
}
}
|
[
"sv.xeon@gmail.com"
] |
sv.xeon@gmail.com
|
75f36648d8c914e86d579ee958f3941fc964fb27
|
222c56bda708da134203560d979fb90ba1a9da8d
|
/uapunit测试框架/engine/src/public/uap/workflow/engine/mail/MailScanCmd.java
|
c6d69d9716c58a3080e500f1976ed3e6b17c7476
|
[] |
no_license
|
langpf1/uapunit
|
7575b8a1da2ebed098d67a013c7342599ef10ced
|
c7f616bede32bdc1c667ea0744825e5b8b6a69da
|
refs/heads/master
| 2020-04-15T00:51:38.937211
| 2013-09-13T04:58:27
| 2013-09-13T04:58:27
| 12,448,060
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,477
|
java
|
/* 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 uap.workflow.engine.mail;
import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;
import javax.mail.Flags;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;
import uap.workflow.engine.core.ITask;
import uap.workflow.engine.db.DbSqlSession;
import uap.workflow.engine.entity.AttachmentEntity;
import uap.workflow.engine.entity.ByteArrayEntity;
import uap.workflow.engine.entity.TaskEntity;
import uap.workflow.engine.exception.WorkflowException;
import uap.workflow.engine.identity.User;
import uap.workflow.engine.interceptor.Command;
import uap.workflow.engine.interceptor.CommandContext;
import uap.workflow.engine.query.UserQueryImpl;
/**
* @author Tom Baeyens
*/
public class MailScanCmd implements Command<Object> {
private static Logger log = Logger.getLogger(MailScanCmd.class.getName());
protected String userId;
protected String imapUsername;
protected String imapPassword;
protected String imapHost;
protected String imapProtocol;
protected String toDoFolderName;
protected String toDoInActivitiFolderName;
public Object execute(CommandContext commandContext) {
log.fine("scanning mail for user " + userId);
Store store = null;
Folder toDoFolder = null;
Folder toDoInActivitiFolder = null;
try {
Session session = Session.getDefaultInstance(new Properties());
store = session.getStore(imapProtocol);
log.fine("connecting to " + imapHost + " over " + imapProtocol + " for user " + imapUsername);
store.connect(imapHost, imapUsername, imapPassword);
toDoFolder = store.getFolder(toDoFolderName);
toDoFolder.open(Folder.READ_WRITE);
toDoInActivitiFolder = store.getFolder(toDoInActivitiFolderName);
toDoInActivitiFolder.open(Folder.READ_WRITE);
Message[] messages = toDoFolder.getMessages();
log.fine("getting messages from myToDoFolder");
DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
for (Message message : messages) {
log.fine("transforming mail into activiti task: " + message.getSubject());
MailTransformer mailTransformer = new MailTransformer(message);
createTask(commandContext, dbSqlSession, mailTransformer);
Message[] messagesToCopy = new Message[] { message };
toDoFolder.copyMessages(messagesToCopy, toDoInActivitiFolder);
message.setFlag(Flags.Flag.DELETED, true);
}
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new WorkflowException("couldn't scan mail for user " + userId + ": " + e.getMessage(), e);
} finally {
if (toDoInActivitiFolder != null && toDoInActivitiFolder.isOpen()) {
try {
toDoInActivitiFolder.close(false);
} catch (MessagingException e) {
e.printStackTrace();
}
}
if (toDoFolder != null && toDoFolder.isOpen()) {
try {
toDoFolder.close(true); // true means that all messages that
// are flagged for deletion are
// permanently removed
} catch (Exception e) {
e.printStackTrace();
}
}
if (store != null) {
try {
store.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
return null;
}
public void createTask(CommandContext commandContext, DbSqlSession dbSqlSession, MailTransformer mailTransformer) throws MessagingException {
// distill the task description from the mail body content (without the
// html tags)
String taskDescription = mailTransformer.getHtml();
taskDescription = taskDescription.replaceAll("\\<.*?\\>", "");
taskDescription = taskDescription.replaceAll("\\s", " ");
taskDescription = taskDescription.trim();
if (taskDescription.length() > 120) {
taskDescription = taskDescription.substring(0, 117) + "...";
}
// create and insert the task
ITask task = new TaskEntity();
// task.setAssignee(userId);
task.setName(mailTransformer.getMessage().getSubject());
task.setDescription(taskDescription);
// dbSqlSession.insert((TaskEntity)task);
String taskId = task.getTaskPk();
// add identity links for all the recipients
for (String recipientEmailAddress : mailTransformer.getRecipients()) {
User recipient = new UserQueryImpl(commandContext).userEmail(recipientEmailAddress).singleResult();
if (recipient != null) {
// /task.addUserIdentityLink(recipient.getId(), "Recipient");
}
}
// attach the mail and other attachments to the task
List<AttachmentEntity> attachments = mailTransformer.getAttachments();
for (AttachmentEntity attachment : attachments) {
// insert the bytes as content
ByteArrayEntity content = attachment.getContent();
dbSqlSession.insert(content);
// insert the attachment
attachment.setContentId(content.getId());
attachment.setTaskId(taskId);
dbSqlSession.insert(attachment);
}
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getImapUsername() {
return imapUsername;
}
public void setImapUsername(String imapUsername) {
this.imapUsername = imapUsername;
}
public String getImapPassword() {
return imapPassword;
}
public void setImapPassword(String imapPassword) {
this.imapPassword = imapPassword;
}
public String getImapHost() {
return imapHost;
}
public void setImapHost(String imapHost) {
this.imapHost = imapHost;
}
public String getImapProtocol() {
return imapProtocol;
}
public void setImapProtocol(String imapProtocol) {
this.imapProtocol = imapProtocol;
}
public String getToDoFolderName() {
return toDoFolderName;
}
public void setToDoFolderName(String toDoFolderName) {
this.toDoFolderName = toDoFolderName;
}
public String getToDoInActivitiFolderName() {
return toDoInActivitiFolderName;
}
public void setToDoInActivitiFolderName(String toDoInActivitiFolderName) {
this.toDoInActivitiFolderName = toDoInActivitiFolderName;
}
}
|
[
"langpf1@yonyou.com"
] |
langpf1@yonyou.com
|
2e25caad4ecba02407de370330a69c1fea7baa98
|
0613bb6cf1c71b575419651fc20330edb9f916d2
|
/CheatBreaker/src/main/java/net/minecraft/network/play/server/S08PacketPlayerPosLook.java
|
abe7787829694d6aa2fa58524a2dc60c43bb6f1c
|
[] |
no_license
|
Decencies/CheatBreaker
|
544fdae14e61c6e0b1f5c28d8c865e2bbd5169c2
|
0cf7154272c8884eee1e4b4c7c262590d9712d68
|
refs/heads/master
| 2023-09-04T04:45:16.790965
| 2023-03-17T09:51:10
| 2023-03-17T09:51:10
| 343,514,192
| 98
| 38
| null | 2023-08-21T03:54:20
| 2021-03-01T18:18:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,713
|
java
|
package net.minecraft.network.play.server;
import java.io.IOException;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
public class S08PacketPlayerPosLook extends Packet
{
private double field_148940_a;
private double field_148938_b;
private double field_148939_c;
private float field_148936_d;
private float field_148937_e;
private boolean field_148935_f;
public S08PacketPlayerPosLook() {}
public S08PacketPlayerPosLook(double p_i45164_1_, double p_i45164_3_, double p_i45164_5_, float p_i45164_7_, float p_i45164_8_, boolean p_i45164_9_)
{
this.field_148940_a = p_i45164_1_;
this.field_148938_b = p_i45164_3_;
this.field_148939_c = p_i45164_5_;
this.field_148936_d = p_i45164_7_;
this.field_148937_e = p_i45164_8_;
this.field_148935_f = p_i45164_9_;
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer p_148837_1_) throws IOException
{
this.field_148940_a = p_148837_1_.readDouble();
this.field_148938_b = p_148837_1_.readDouble();
this.field_148939_c = p_148837_1_.readDouble();
this.field_148936_d = p_148837_1_.readFloat();
this.field_148937_e = p_148837_1_.readFloat();
this.field_148935_f = p_148837_1_.readBoolean();
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer p_148840_1_) throws IOException
{
p_148840_1_.writeDouble(this.field_148940_a);
p_148840_1_.writeDouble(this.field_148938_b);
p_148840_1_.writeDouble(this.field_148939_c);
p_148840_1_.writeFloat(this.field_148936_d);
p_148840_1_.writeFloat(this.field_148937_e);
p_148840_1_.writeBoolean(this.field_148935_f);
}
public void processPacket(INetHandlerPlayClient p_148833_1_)
{
p_148833_1_.handlePlayerPosLook(this);
}
public double func_148932_c()
{
return this.field_148940_a;
}
public double func_148928_d()
{
return this.field_148938_b;
}
public double func_148933_e()
{
return this.field_148939_c;
}
public float func_148931_f()
{
return this.field_148936_d;
}
public float func_148930_g()
{
return this.field_148937_e;
}
public boolean func_148929_h()
{
return this.field_148935_f;
}
public void processPacket(INetHandler p_148833_1_)
{
this.processPacket((INetHandlerPlayClient)p_148833_1_);
}
}
|
[
"66835910+Decencies@users.noreply.github.com"
] |
66835910+Decencies@users.noreply.github.com
|
6a6d36bc0a9f8d6934f2ecd2aee6d16913dd3e03
|
5e2cab8845e635b75f699631e64480225c1cf34d
|
/modules/core/org.jowidgets.tools/src/main/java/org/jowidgets/tools/powo/JoCheckedMenuItem.java
|
49f4b96252b84b6a8c19b95d8da8bbc1f2935636
|
[
"BSD-3-Clause"
] |
permissive
|
alec-liu/jo-widgets
|
2277374f059500dfbdb376333743d5507d3c57f4
|
a1dde3daf1d534cb28828795d1b722f83654933a
|
refs/heads/master
| 2022-04-18T02:36:54.239029
| 2018-06-08T13:08:26
| 2018-06-08T13:08:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,518
|
java
|
/*
* Copyright (c) 2010, grossmann
* 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 the jo-widgets.org nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL jo-widgets.org 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 org.jowidgets.tools.powo;
import org.jowidgets.api.toolkit.Toolkit;
import org.jowidgets.api.widgets.ISelectableMenuItem;
import org.jowidgets.api.widgets.blueprint.ICheckedMenuItemBluePrint;
import org.jowidgets.api.widgets.descriptor.ICheckedMenuItemDescriptor;
import org.jowidgets.common.image.IImageConstant;
/**
* @deprecated The idea of POWO's (Plain Old Widget Object's) has not been established.
* For that, POWO's will no longer be supported and may removed completely in middle term.
* Feel free to move them to your own open source project.
*/
@Deprecated
public class JoCheckedMenuItem extends SelectableMenuItem<ISelectableMenuItem, ICheckedMenuItemBluePrint> implements
ISelectableMenuItem {
public JoCheckedMenuItem(final String text, final IImageConstant icon) {
this(bluePrint(text, icon));
}
public JoCheckedMenuItem(final String text) {
this(bluePrint(text));
}
public JoCheckedMenuItem(final String text, final String tooltipText) {
this(bluePrint(text, tooltipText));
}
public JoCheckedMenuItem(final ICheckedMenuItemDescriptor descriptor) {
super(bluePrint().setSetup(descriptor));
}
public static ICheckedMenuItemBluePrint bluePrint() {
return Toolkit.getBluePrintFactory().checkedMenuItem();
}
public static ICheckedMenuItemBluePrint bluePrint(final String text) {
return Toolkit.getBluePrintFactory().checkedMenuItem(text);
}
public static ICheckedMenuItemBluePrint bluePrint(final String text, final String tooltipText) {
return Toolkit.getBluePrintFactory().checkedMenuItem(text).setToolTipText(tooltipText);
}
public static ICheckedMenuItemBluePrint bluePrint(final String text, final IImageConstant icon) {
return Toolkit.getBluePrintFactory().checkedMenuItem(text).setIcon(icon);
}
}
|
[
"herrgrossmann@users.noreply.github.com"
] |
herrgrossmann@users.noreply.github.com
|
682b4ad86804011a0bc5d1cc4cb672b1a45e5192
|
5c206806f5c612d14400682030cda0bd23b98981
|
/src/main/java/org/cyclops/integrateddynamics/core/inventory/container/ContainerMultipart.java
|
4b60725b049eb059f755d9ef388597e89f1329af
|
[
"MIT"
] |
permissive
|
way2muchnoise/IntegratedDynamics
|
1ed49a413a21492e18e9bbe9ab51c03ccc81e41e
|
fcd4d71623a5a70d929bb7f6a9bed15745ac039f
|
refs/heads/master-1.10
| 2021-05-04T09:06:40.797829
| 2016-11-01T10:21:15
| 2016-11-01T10:21:15
| 70,403,691
| 0
| 0
| null | 2016-10-09T13:08:23
| 2016-10-09T13:08:23
| null |
UTF-8
|
Java
| false
| false
| 3,709
|
java
|
package org.cyclops.integrateddynamics.core.inventory.container;
import com.google.common.collect.Maps;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
import org.cyclops.cyclopscore.inventory.IGuiContainerProvider;
import org.cyclops.cyclopscore.inventory.container.ExtendedInventoryContainer;
import org.cyclops.cyclopscore.inventory.container.InventoryContainer;
import org.cyclops.cyclopscore.inventory.container.button.IButtonActionServer;
import org.cyclops.cyclopscore.persist.IDirtyMarkListener;
import org.cyclops.integrateddynamics.IntegratedDynamics;
import org.cyclops.integrateddynamics.api.part.IPartContainer;
import org.cyclops.integrateddynamics.api.part.IPartState;
import org.cyclops.integrateddynamics.api.part.IPartType;
import org.cyclops.integrateddynamics.api.part.PartTarget;
import org.cyclops.integrateddynamics.api.part.aspect.IAspect;
import org.cyclops.integrateddynamics.core.client.gui.ExtendedGuiHandler;
import org.cyclops.integrateddynamics.core.helper.PartHelpers;
import org.cyclops.integrateddynamics.core.part.PartTypeConfigurable;
import java.util.Map;
/**
* Container for parts.
* @author rubensworks
*/
@EqualsAndHashCode(callSuper = false)
@Data
public abstract class ContainerMultipart<P extends IPartType<P, S> & IGuiContainerProvider, S extends IPartState<P>>
extends ExtendedInventoryContainer implements IDirtyMarkListener {
public static final int BUTTON_SETTINGS = 1;
private static final int PAGE_SIZE = 3;
private final PartTarget target;
private final IPartContainer partContainer;
private final P partType;
private final World world;
private final BlockPos pos;
private final Map<IAspect, Integer> aspectPropertyButtons = Maps.newHashMap();
protected final EntityPlayer player;
/**
* Make a new instance.
* @param target The target.
* @param player The player.
* @param partContainer The part container.
* @param partType The part type.
*/
public ContainerMultipart(EntityPlayer player, PartTarget target, IPartContainer partContainer, P partType) {
super(player.inventory, partType);
this.target = target;
this.partContainer = partContainer;
this.partType = partType;
this.world = player.getEntityWorld();
this.pos = player.getPosition();
this.player = player;
putButtonAction(BUTTON_SETTINGS, new IButtonActionServer<InventoryContainer>() {
@Override
public void onAction(int buttonId, InventoryContainer container) {
IGuiContainerProvider gui = ((PartTypeConfigurable) getPartType()).getSettingsGuiProvider();
IntegratedDynamics._instance.getGuiHandler().setTemporaryData(ExtendedGuiHandler.PART, getTarget().getCenter().getSide()); // Pass the side as extra data to the gui
if(!MinecraftHelpers.isClientSide()) {
BlockPos cPos = getTarget().getCenter().getPos().getBlockPos();
ContainerMultipart.this.player.openGui(gui.getModGui(), gui.getGuiID(),
world, cPos.getX(), cPos.getY(), cPos.getZ());
}
}
});
}
@SuppressWarnings("unchecked")
public S getPartState() {
return (S) partContainer.getPartState(getTarget().getCenter().getSide());
}
@Override
public boolean canInteractWith(EntityPlayer playerIn) {
return PartHelpers.canInteractWith(getTarget(), player, this.partContainer);
}
}
|
[
"rubensworks@gmail.com"
] |
rubensworks@gmail.com
|
d833795a1123b348c5226f027c35f0ec45fc6b57
|
a8e47979b45aa428a32e16ddc4ee2578ec969dfe
|
/base/config/src/main/java/org/artifactory/descriptor/repo/distribution/rule/package-info.java
|
dc7e8858814b341d6143eb9803fc30dbfb38d12c
|
[] |
no_license
|
nuance-sspni/artifactory-oss
|
da505cac1984da131a61473813ee2c7c04d8d488
|
af3fcf09e27cac836762e9957ad85bdaeec6e7f8
|
refs/heads/master
| 2021-07-22T20:04:08.718321
| 2017-11-02T20:49:33
| 2017-11-02T20:49:33
| 109,313,757
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
/*
*
* Artifactory is a binaries repository manager.
* Copyright (C) 2016 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
*
*/
@XmlSchema(namespace = Descriptor.NS, elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package org.artifactory.descriptor.repo.distribution.rule;
import org.artifactory.descriptor.Descriptor;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
|
[
"tuan-anh.nguyen@nuance.com"
] |
tuan-anh.nguyen@nuance.com
|
d01d4cab57c46cb4c1f20fb8e394c4d0ab5e4984
|
06810721513d822ee66f72b0c3de355899510597
|
/src/main/java/com/cis/project/config/CacheConfiguration.java
|
14a2e99d6d4dc8e74869c751520f7f9cd221dc76
|
[] |
no_license
|
bonnefoipatrick/CisProjectApplication
|
776c4070c55b961b3691c34600de08331ab3675e
|
174598b4cc371e4a4e93ff2aff8eb440038e7398
|
refs/heads/master
| 2020-03-09T13:56:43.980452
| 2018-04-09T19:54:43
| 2018-04-09T19:54:43
| 128,823,204
| 0
| 0
| null | 2018-04-10T19:57:14
| 2018-04-09T19:28:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,457
|
java
|
package com.cis.project.config;
import io.github.jhipster.config.JHipsterProperties;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.expiry.Duration;
import org.ehcache.expiry.Expirations;
import org.ehcache.jsr107.Eh107Configuration;
import java.util.concurrent.TimeUnit;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.serviceregistry.Registration;
import org.springframework.context.annotation.*;
@Configuration
@EnableCaching
@AutoConfigureAfter(value = { MetricsConfiguration.class })
@AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class })
public class CacheConfiguration {
private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;
public CacheConfiguration(JHipsterProperties jHipsterProperties) {
JHipsterProperties.Cache.Ehcache ehcache =
jHipsterProperties.getCache().getEhcache();
jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(
CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
.withExpiry(Expirations.timeToLiveExpiration(Duration.of(ehcache.getTimeToLiveSeconds(), TimeUnit.SECONDS)))
.build());
}
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return cm -> {
cm.createCache(com.cis.project.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration);
cm.createCache(com.cis.project.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration);
cm.createCache(com.cis.project.domain.User.class.getName(), jcacheConfiguration);
cm.createCache(com.cis.project.domain.Authority.class.getName(), jcacheConfiguration);
cm.createCache(com.cis.project.domain.User.class.getName() + ".authorities", jcacheConfiguration);
// jhipster-needle-ehcache-add-entry
};
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
784716ccd7a95a0788ab43e82f72df63bee4e9d7
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/14/52/7.java
|
6d740833a1fb6426268c1c2d013843319594dc85
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
package round3;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
public class B {
public static void main(String[] args) throws FileNotFoundException {
Kattio io;
// io = new Kattio(System.in, System.out);
// io = new Kattio(new FileInputStream("round3/B-sample.in"), System.out);
// io = new Kattio(new FileInputStream("round3/B-small-0.in"), new FileOutputStream("round3/B-small-0.out"));
io = new Kattio(new FileInputStream("round3/B-large-0.in"), new FileOutputStream("round3/B-large-0.out"));
int cases = io.getInt();
for (int i = 1; i <= cases; i++) {
io.print("Case #" + i + ": ");
System.err.println(i);
new B().solve(io);
}
io.close();
}
int myPower, towerPower;
int health[], gold[];
private void solve(Kattio io) {
myPower = io.getInt();
towerPower = io.getInt();
int n = io.getInt();
health = new int[n];
gold = new int[n];
for (int i = 0; i < n; i++) {
health[i] = io.getInt();
gold[i] = io.getInt();
}
memo = new int[n][201*n+10];
io.println(go(0, 1));
}
int memo[][];
private int go(int monster, int savedTurns) {
if (monster == health.length) return 0;
int orgSavedTurns = savedTurns;
if (memo[monster][savedTurns] > 0) return memo[monster][savedTurns] - 1;
// skip it
int towerShots = (health[monster] + towerPower - 1) / towerPower;
int best = go(monster + 1, savedTurns + towerShots);
int h = health[monster] % towerPower;
if (h == 0) h = towerPower;
int shotsReq = (h + myPower - 1) / myPower;
savedTurns += towerShots - 1;
if (shotsReq <= savedTurns) {
best = Math.max(best, gold[monster] + go(monster + 1, savedTurns - shotsReq));
}
memo[monster][orgSavedTurns] = best + 1;
return best;
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
9bb315b17c7d93e8f80aaf4892d801386d800629
|
0689f3b456ddce965659abcd4d2de68903de59a1
|
/src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/GinExtractJsonb.java
|
8894d219518d2e3e6406aae81bfc2e230803e650
|
[] |
no_license
|
vic0692/demo_spring_jooq
|
c92d2d188bbbb4aa851adab5cc301d1051c2f209
|
a5c1fd1cb915f313f40e6f4404fdc894fffc8e70
|
refs/heads/master
| 2022-09-18T09:38:30.362573
| 2020-01-23T17:09:40
| 2020-01-23T17:09:40
| 220,638,715
| 0
| 0
| null | 2022-09-08T01:04:47
| 2019-11-09T12:25:46
|
Java
|
UTF-8
|
Java
| false
| true
| 4,037
|
java
|
/*
* This file is generated by jOOQ.
*/
package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines;
import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.JSONB;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
import org.jooq.impl.Internal;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.12.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class GinExtractJsonb extends AbstractRoutine<Object> {
private static final long serialVersionUID = -1040339210;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, false);
/**
* The parameter <code>pg_catalog.gin_extract_jsonb._1</code>.
*/
public static final Parameter<JSONB> _1 = Internal.createParameter("_1", org.jooq.impl.SQLDataType.JSONB, false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _2 = Internal.createParameter("_2", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _3 = Internal.createParameter("_3", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* Create a new routine call instance
*/
public GinExtractJsonb() {
super("gin_extract_jsonb", PgCatalog.PG_CATALOG, org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""));
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
addInParameter(_2);
addInParameter(_3);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(JSONB value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<JSONB> field) {
setField(_1, field);
}
/**
* Set the <code>_2</code> parameter IN value to the routine
*/
public void set__2(Object value) {
setValue(_2, value);
}
/**
* Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__2(Field<Object> field) {
setField(_2, field);
}
/**
* Set the <code>_3</code> parameter IN value to the routine
*/
public void set__3(Object value) {
setValue(_3, value);
}
/**
* Set the <code>_3</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__3(Field<Object> field) {
setField(_3, field);
}
}
|
[
"vic0692@gmail.com"
] |
vic0692@gmail.com
|
6c605c82905cdf1a99d08bfa67cfac2df8d07080
|
3ab5f3c529e281b7a83e499368c94eb79094dd3a
|
/src/main/java/ar/gob/gcba/dgisis/aplicaciones/config/FeignConfiguration.java
|
954737697d152e622a25e44330b9d607b570bfd3
|
[] |
no_license
|
scarabetta/mapa360-aplicaciones
|
6cabaa0c5aebe15337f8d76406647e5b0c98152d
|
9410977eb5c2813d7a19347c0dea5213be8a768d
|
refs/heads/master
| 2020-03-29T10:25:25.364175
| 2018-09-21T18:48:44
| 2018-09-21T18:48:44
| 149,804,528
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 533
|
java
|
package ar.gob.gcba.dgisis.aplicaciones.config;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableFeignClients(basePackages = "ar.gob.gcba.dgisis.aplicaciones")
public class FeignConfiguration {
/**
* Set the Feign specific log level to log client REST requests
*/
@Bean
feign.Logger.Level feignLoggerLevel() {
return feign.Logger.Level.BASIC;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
a705965170f2f2f3c49c133580ddc0534263ecfc
|
4bbc98f4e9fa92f350b4816fa331d470880e1df6
|
/testdocbuild11/src/main/java/com/fastcode/testdocbuild11/addons/reporting/application/reportversion/dto/UpdateReportversionInput.java
|
cbec8d1959fbd96dcd08c167a422e8e84cc4147e
|
[] |
no_license
|
sunilfastcode/testdocbuild11
|
07d7b8a96df7d07ef8e08325463e8eb85ac0da5c
|
d6a22d880015ed8cd7e10dae67f6b70e222a1849
|
refs/heads/master
| 2023-02-12T17:43:15.443849
| 2020-12-26T22:57:11
| 2020-12-26T22:57:11
| 319,411,987
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package com.fastcode.testdocbuild11.addons.reporting.application.reportversion.dto;
import lombok.Getter;
import lombok.Setter;
import org.json.simple.JSONObject;
@Getter
@Setter
public class UpdateReportversionInput {
private String ctype;
private String description;
private JSONObject query;
private String reportType;
private String title;
private String reportVersion;
private Long userId;
private String userDescriptiveField;
private String reportWidth;
private Long reportId;
private Boolean isRefreshed;
private Long versiono;
}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
e13243b3e84e1dc0f4716fa0d11c5a0ef7095053
|
10dd0d94b749e7f10fbbd50b4344704561d415f2
|
/algorithm/src/algorithm/chapter2/template/LeetCode_105_519.java
|
59c7e88b029a0c82981152e3be212415b71a7b40
|
[] |
no_license
|
chying/algorithm_group
|
79d0bffea56e6dc0b327f879a309cfd7c7e4133e
|
cd85dd08f065ae0a6a9d57831bd1ac8c8ce916ce
|
refs/heads/master
| 2020-09-13T19:10:19.074546
| 2020-02-13T04:12:56
| 2020-02-13T04:12:56
| 222,877,592
| 7
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 670
|
java
|
package algorithm.chapter2.template;
import javax.swing.tree.TreeNode;
/**
* 【105. 从前序与中序遍历序列构造二叉树】根据一棵树的前序遍历与中序遍历构造二叉树。 注意: 你可以假设树中没有重复的元素。 例如,给出 前序遍历
* preorder = [3,9,20,15,7] 中序遍历 inorder = [9,3,15,20,7] 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal
*
* @author chying
*
*/
public class LeetCode_105_519 {
public TreeNode buildTree(int[] preorder, int[] inorder) {
return null;
}
public static void main(String[] args) {
}
}
|
[
"852342406@qq.com"
] |
852342406@qq.com
|
433b88c94dc28abfb52c0fa2042ec3e9bb8e4b74
|
36e40efcfa317432c192f169da2d330b1b284831
|
/src/main/java/Rasad/Core/Net/IPAddressRangeGenerator/Bits.java
|
87ea8bd2683f4669199d50494a2db346590224d8
|
[] |
no_license
|
MrezaPasha/Communication
|
06a31879e089c4f14985add67d958b414332e4cf
|
b312ef27dd60037086f0e32ddf235a9cc103a793
|
refs/heads/master
| 2020-05-29T21:38:59.551104
| 2019-05-31T09:52:28
| 2019-05-31T09:52:28
| 189,385,266
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,247
|
java
|
package Rasad.Core.Net.IPAddressRangeGenerator;
import Rasad.Core.*;
import Rasad.Core.Net.*;
public final class Bits
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] Not(byte[] bytes)
public static byte[] Not(byte[] bytes)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: return bytes.Select(b => (byte)~b).ToArray();
return bytes.Select(b -> (byte)~b).ToArray();
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] And(byte[] A, byte[] B)
public static byte[] And(byte[] A, byte[] B)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: return A.Zip(B, (a, b) => (byte)(a & b)).ToArray();
return A.Zip(B, (a, b) -> (byte)(a & b)).ToArray();
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] Or(byte[] A, byte[] B)
public static byte[] Or(byte[] A, byte[] B)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: return A.Zip(B, (a, b) => (byte)(a | b)).ToArray();
return A.Zip(B, (a, b) -> (byte)(a | b)).ToArray();
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static bool GE(byte[] A, byte[] B)
public static boolean GE(byte[] A, byte[] B)
{
return A.Zip(B, (a, b) -> a == b ? 0 : a < b ? 1 : -1).SkipWhile(c -> c == 0).FirstOrDefault() >= 0;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static bool LE(byte[] A, byte[] B)
public static boolean LE(byte[] A, byte[] B)
{
return A.Zip(B, (a, b) -> a == b ? 0 : a < b ? 1 : -1).SkipWhile(c -> c == 0).FirstOrDefault() <= 0;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] GetBitMask(int sizeOfBuff, int bitLen)
public static byte[] GetBitMask(int sizeOfBuff, int bitLen)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: var maskBytes = new byte[sizeOfBuff];
byte[] maskBytes = new byte[sizeOfBuff];
int bytesLen = bitLen / 8;
int bitsLen = bitLen % 8;
for (int i = 0; i < bytesLen; i++)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: maskBytes[i] = 0xff;
maskBytes[i] = (byte)0xff;
}
if (bitsLen > 0)
{
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: maskBytes[bytesLen] = (byte)~Enumerable.Range(1, 8 - bitsLen).Select(n => 1 << n - 1).Aggregate((a, b) => a | b);
maskBytes[bytesLen] = (byte)~Enumerable.Range(1, 8 - bitsLen).Select(n -> 1 << n - 1).Aggregate((a, b) -> a | b);
}
return maskBytes;
}
/**
Counts the number of leading 1's in a bitmask.
Returns null if value is invalid as a bitmask.
@param bytes
@return
*/
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static Nullable<int> GetBitMaskLength(byte[] bytes)
public static Integer GetBitMaskLength(byte[] bytes)
{
if (bytes == null)
{
throw new NullPointerException("bytes");
}
int bitLength = 0;
int idx = 0;
// find beginning 0xFF
for (; idx < bytes.length && bytes[idx] == 0xff; idx++)
{
;
}
bitLength = 8 * idx;
if (idx < bytes.length)
{
switch (bytes[idx])
{
case 0xFE:
bitLength += 7;
break;
case 0xFC:
bitLength += 6;
break;
case 0xF8:
bitLength += 5;
break;
case 0xF0:
bitLength += 4;
break;
case 0xE0:
bitLength += 3;
break;
case 0xC0:
bitLength += 2;
break;
case 0x80:
bitLength += 1;
break;
case 0x00:
break;
default: // invalid bitmask
return null;
}
// remainder must be 0x00
if (bytes.Skip(idx + 1).Any(x -> x != 0x00))
{
return null;
}
}
return bitLength;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public static byte[] Increment(byte[] bytes)
public static byte[] Increment(byte[] bytes)
{
if (bytes == null)
{
throw new NullPointerException("bytes");
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: var incrementIndex = Array.FindLastIndex(bytes, x => x < byte.MaxValue);
int incrementIndex = Array.FindLastIndex(bytes, x -> x < Byte.MAX_VALUE);
if (incrementIndex < 0)
{
throw new OverflowException();
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: return bytes.Take(incrementIndex).Concat(new byte[] { (byte)(bytes[incrementIndex] + 1) }).Concat(new byte[bytes.Length - incrementIndex - 1]).ToArray();
return bytes.Take(incrementIndex).Concat(new byte[] {(byte)(bytes[incrementIndex] + 1)}).Concat(new byte[bytes.length - incrementIndex - 1]).ToArray();
}
}
|
[
"umz1387@gmail.com"
] |
umz1387@gmail.com
|
28b46c5ed9c5fa0055bc4ecb61008165234ac8d1
|
6ec5469ec2bca932a2418de61fee961a04a503e3
|
/CtyManager-shoper/src/main/java/com/yard/manager/platform/action/LoginAction.java
|
321a6e23d1e91238d2d00b011f4cd814da30ff09
|
[] |
no_license
|
Qiuyingx/CtyManager
|
e6cdb83c15dc9c46936c4d09046f25f9ce2ad250
|
8ec9ae87fe580b32f28fa77f8b182cb94119087d
|
refs/heads/master
| 2020-12-31T07:32:16.224703
| 2016-05-08T13:20:53
| 2016-05-08T13:20:53
| 58,313,077
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,392
|
java
|
package com.yard.manager.platform.action;
import java.io.IOException;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.LockedAccountException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import com.yard.core.kaptcha.Constants;
import com.yard.core.security.sha.sha4j.ShaUtil;
import com.yard.core.struts.action.JsonServletAction;
/**
* 登录验证
*
* @Description:用户登录处理,后台主界面
*/
@Results({
// 管理中心
@Result(name = "CENTER", type = "chain", location = "center"),
// 登录页面
@Result(name = "LOGIN", type = "freemarker", location = "/WEB-INF/content/login.html"),
// 商户登录页面
@Result(name = "SHOPLOGIN", type = "freemarker", location = "/WEB-INF/content/shopLogin.html"),
// 主界面
@Result(name = "LOGOUT", type = "redirect", location = "main") })
public class LoginAction extends JsonServletAction {
private static final long serialVersionUID = 1L;
private static final String LOGIN = "LOGIN";
// 用户登陆信息
private String account;
private String pwd;
private String code;
/**
* 直接跳转到主界面(后台登录界面)
*
* @return
* @throws Exception
*/
@Action("/main")
public String main() throws Exception {
return LOGIN;
}
/**
* 商户后台登录页面
*
* @return
* @throws Exception
*/
@Action("/")
public String shopLogin() throws Exception {
return LOGIN;
}
/**
* 登录处理
*
* @return
*/
@Action("/login")
public String login() {
try {
// 判断验证码是否正确
String kaptchaExpected = (String) request.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
if (code == null || !code.equalsIgnoreCase(kaptchaExpected)) {
setResult(false, "验证码错误");
return MAP;
}
// 验证用户名密码
Subject currentUser = SecurityUtils.getSubject();
UsernamePasswordToken token = new UsernamePasswordToken(account, ShaUtil.toSha256String(pwd));
currentUser.login(token);
setResult(true, "成功");
} catch (UnknownAccountException uae) {
setResult(false, "用户名无效");
} catch (IncorrectCredentialsException ice) {
setResult(false, "密码无效");
} catch (LockedAccountException lae) {
setResult(false, "帐号锁定");
} catch (AuthenticationException ae) {
setResult(false, "认证未通过,请输入正确的用户名和密码");
} catch (IOException e) {
e.printStackTrace();
setResult(false, "认证未通过,发生异常");
}
return MAP;
}
/**
* 登出
*
* @return
*/
@Action("/logout")
public String logout() {
Subject currentUser = SecurityUtils.getSubject();
currentUser.logout();
return LOGIN;
}
public void setAccount(String account) {
this.account = account;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public void setCode(String code) {
this.code = code;
}
}
|
[
"472128216@qq.com"
] |
472128216@qq.com
|
461cbdf34d50e52867cb9facc74acea43143413f
|
cdbd53ceb24f1643b5957fa99d78b8f4efef455a
|
/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/exchange/BType.java
|
c8f8498fdbcb1f2f86db4c79fcf16f86168a0afd
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
chundcm/vertx-zero
|
f3dcb692ae6b9cc4ced52386cab01e5896e69d80
|
d2a2d096426c30d90be13b162403d66c8e72cc9a
|
refs/heads/master
| 2023-04-27T18:41:47.489584
| 2023-04-23T01:53:40
| 2023-04-23T01:53:40
| 244,054,093
| 0
| 0
|
Apache-2.0
| 2020-02-29T23:00:59
| 2020-02-29T23:00:58
| null |
UTF-8
|
Java
| false
| false
| 947
|
java
|
package io.vertx.up.commune.exchange;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/*
* Type Mapping here
* Definition for type conversation of `DualItem`
*/
class BType {
private static final ConcurrentMap<String, Class<?>> TYPES = new ConcurrentHashMap<String, Class<?>>() {
{
this.put("BOOLEAN", Boolean.class);
this.put("INT", Integer.class);
this.put("LONG", Long.class);
this.put("DECIMAL", BigDecimal.class);
this.put("DATE1", LocalDate.class);
this.put("DATE2", LocalDateTime.class);
this.put("DATE3", Long.class);
this.put("DATE4", LocalTime.class);
}
};
static Class<?> type(final String typeFlag) {
return TYPES.get(typeFlag);
}
}
|
[
"silentbalanceyh@126.com"
] |
silentbalanceyh@126.com
|
38e9ec94cc9eb9eedb79f2a158a4c9f7b96c90a4
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/game/ui/w.java
|
db8036910da03f8d5c36386700af9eca83d5716a
|
[] |
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
| 1,906
|
java
|
package com.tencent.mm.plugin.game.ui;
import android.graphics.Color;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ImageView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.g.n;
public final class w implements OnTouchListener {
private int mColor;
public w() {
this(Color.argb(221, n.CTRL_INDEX, n.CTRL_INDEX, n.CTRL_INDEX));
AppMethodBeat.i(112218);
AppMethodBeat.o(112218);
}
private w(int i) {
this.mColor = i;
}
public final boolean onTouch(View view, MotionEvent motionEvent) {
AppMethodBeat.i(112219);
int action = motionEvent.getAction();
Drawable drawable;
if (action == 0) {
if (view instanceof ImageView) {
ImageView imageView = (ImageView) view;
drawable = imageView.getDrawable();
if (drawable != null) {
drawable.setColorFilter(this.mColor, Mode.MULTIPLY);
imageView.setImageDrawable(drawable);
}
} else if (view.getBackground() != null) {
view.getBackground().setColorFilter(this.mColor, Mode.MULTIPLY);
}
} else if (action == 1 || action == 3) {
if (view instanceof ImageView) {
drawable = ((ImageView) view).getDrawable();
if (drawable != null) {
drawable.clearColorFilter();
}
} else {
drawable = view.getBackground();
if (drawable != null) {
drawable.clearColorFilter();
}
}
}
AppMethodBeat.o(112219);
return false;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
4b5085d4b66d1f2df87d1020a9e2165fe21603dd
|
4068b4a2e477f177efc3932de044d011d74b8b25
|
/picocli-codegen/src/main/java/picocli/codegen/annotation/processing/internal/CompletionCandidatesMetaData.java
|
9e4eb3edaac821fadeb222bcbc7f930ec9b52d97
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] |
permissive
|
kakawait/picocli
|
d80b5ed0efb8cbe76a440dbf413b7393433d2bc7
|
3ba184ef0330df3052afe64aa0039f67bca38528
|
refs/heads/master
| 2020-06-07T21:14:59.559002
| 2019-06-26T08:06:58
| 2019-06-26T08:06:58
| 193,094,608
| 0
| 0
|
Apache-2.0
| 2019-06-21T12:31:07
| 2019-06-21T12:31:07
| null |
UTF-8
|
Java
| false
| false
| 3,323
|
java
|
package picocli.codegen.annotation.processing.internal;
import picocli.codegen.annotation.processing.ITypeMetaData;
import picocli.codegen.util.Assert;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Implementation of the {@link Iterable} interface that provides metadata on the
* {@code @Command(completionCandidates = xxx.class)} annotation.
*
* @since 4.0
*/
public class CompletionCandidatesMetaData implements Iterable<String>, ITypeMetaData {
private final TypeMirror typeMirror;
public CompletionCandidatesMetaData(TypeMirror typeMirror) {
this.typeMirror = Assert.notNull(typeMirror, "typeMirror");
}
/**
* Returns the completion candidates from the annotations present on the specified element.
* @param element the method or field annotated with {@code @Option} or {@code @Parameters}
* @return the completion candidates or {@code null} if not found
*/
public static Iterable<String> extract(Element element) {
List<? extends AnnotationMirror> annotationMirrors = element.getAnnotationMirrors();
for (AnnotationMirror mirror : annotationMirrors) {
DeclaredType annotationType = mirror.getAnnotationType();
if (TypeUtil.isOption(annotationType) || TypeUtil.isParameter(annotationType)) {
Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues = mirror.getElementValues();
for (ExecutableElement attribute : elementValues.keySet()) {
if ("completionCandidates".equals(attribute.getSimpleName().toString())) {
AnnotationValue typeMirror = elementValues.get(attribute);
return new CompletionCandidatesMetaData((TypeMirror) typeMirror);
}
}
}
}
return null;
}
/**
* Returns {@code true} if the command did not have a {@code completionCandidates} annotation attribute.
* @return {@code true} if the command did not have a {@code completionCandidates} annotation attribute.
*/
public boolean isDefault() {
return false;
}
/**
* Returns the TypeMirror that this TypeConverterMetaData was constructed with.
* @return the TypeMirror of the {@code @Command(completionCandidates = xxx.class)} annotation.
*/
public TypeMirror getTypeMirror() {
return typeMirror;
}
public TypeElement getTypeElement() {
return (TypeElement) ((DeclaredType) typeMirror).asElement();
}
/** Always returns {@code null}. */
@Override
public Iterator<String> iterator() {
return null;
}
/**
* Returns a string representation of this object, for debugging purposes.
* @return a string representation of this object
*/
@Override
public String toString() {
return String.format("%s(%s)", getClass().getSimpleName(), isDefault() ? "default" : typeMirror);
}
}
|
[
"remkop@yahoo.com"
] |
remkop@yahoo.com
|
caf174db3b4f344d8032394fdb2c054a922e888d
|
fb80d88d8cdc81d0f4975af5b1bfb39d194e0d97
|
/Platform_TreeFramework/src/net/sf/anathema/platform/tree/presenter/view/ISpecialNodeView.java
|
6c01a0eb245e30f75af815a6fa55081c18ebacb2
|
[] |
no_license
|
mindnsoul2003/Raksha
|
b2f61d96b59a14e9dfb4ae279fc483b624713b2e
|
2533cdbb448ee25ff355f826bc1f97cabedfdafe
|
refs/heads/master
| 2021-01-17T16:43:35.551343
| 2014-02-19T19:28:43
| 2014-02-19T19:28:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 137
|
java
|
package net.sf.anathema.platform.tree.presenter.view;
public interface ISpecialNodeView extends SpecialControl {
String getNodeId();
}
|
[
"ursreupke@gmail.com"
] |
ursreupke@gmail.com
|
d493a9a060b2f682f40538f6d0adf39bc4d777dd
|
d9e37149704735d776684a15c9f2fbe6cf760993
|
/ijwb/src/com/google/idea/blaze/ijwb/typescript/TsConfigRuleSection.java
|
e0f0d5b492bdf9f268a70e505fa2fee6e33cc558
|
[
"Apache-2.0"
] |
permissive
|
jacquesqiao/intellij
|
4f3da33c5257e9beb54b68281d69730ff14da48c
|
015973d885a258d9b3921e5c06572bb4e1b30045
|
refs/heads/master
| 2021-06-25T18:28:26.343747
| 2017-08-31T14:52:05
| 2017-08-31T14:52:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,531
|
java
|
/*
* Copyright 2016 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.ijwb.typescript;
import com.google.common.collect.Lists;
import com.google.idea.blaze.base.model.primitives.Label;
import com.google.idea.blaze.base.projectview.parser.ParseContext;
import com.google.idea.blaze.base.projectview.parser.ProjectViewParser;
import com.google.idea.blaze.base.projectview.section.ScalarSection;
import com.google.idea.blaze.base.projectview.section.ScalarSectionParser;
import com.google.idea.blaze.base.projectview.section.SectionKey;
import com.google.idea.blaze.base.projectview.section.SectionParser;
import com.google.idea.blaze.base.ui.BlazeValidationError;
import java.util.List;
import javax.annotation.Nullable;
/** Points to the ts_config rule. */
@Deprecated
public class TsConfigRuleSection {
public static final SectionKey<Label, ScalarSection<Label>> KEY = SectionKey.of("ts_config_rule");
public static final SectionParser PARSER = new TsConfigRuleSectionParser();
private static class TsConfigRuleSectionParser extends ScalarSectionParser<Label> {
public TsConfigRuleSectionParser() {
super(KEY, ':');
}
@Nullable
@Override
protected Label parseItem(ProjectViewParser parser, ParseContext parseContext, String rest) {
List<BlazeValidationError> errors = Lists.newArrayList();
if (!Label.validate(rest, errors)) {
parseContext.addErrors(errors);
return null;
}
return Label.create(rest);
}
@Override
protected void printItem(StringBuilder sb, Label value) {
sb.append(value.toString());
}
@Override
public ItemType getItemType() {
return ItemType.Label;
}
@Override
public boolean isDeprecated() {
return true;
}
@Nullable
@Override
public String getDeprecationMessage() {
return "Use `ts_config_rules` instead, which allows specifying multiple `ts_config` targets.";
}
}
}
|
[
"brendandouglas@google.com"
] |
brendandouglas@google.com
|
5364f7bee8a72e29b0b7384580aa6b2839db3422
|
a10a42f3bcee7672b50721c01c7cdd6570e940c9
|
/app/src/main/java/com/cpigeon/app/modular/usercenter/model/daoimpl/RegisterDaoImpl.java
|
2db18e81739e2c64e86053e18003872e55f50ff0
|
[] |
no_license
|
carleewang/CAppPlus
|
b31360517bd1dbad41a8c721eb8148573be86ec7
|
33086724720da165cc225539857d2ed1728b5c2c
|
refs/heads/master
| 2021-09-28T09:19:22.814732
| 2018-11-16T08:57:56
| 2018-11-16T08:57:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,380
|
java
|
package com.cpigeon.app.modular.usercenter.model.daoimpl;
import com.cpigeon.app.commonstandard.model.daoimpl.SendVerificationCodeImpl;
import com.cpigeon.app.modular.usercenter.model.dao.IRegisterDao;
import com.cpigeon.app.utils.CallAPI;
import java.net.ConnectException;
/**
* Created by chenshuai on 2017/4/8.
*/
public class RegisterDaoImpl extends SendVerificationCodeImpl implements IRegisterDao {
CallAPI.Callback registUserCallback = new CallAPI.Callback() {
@Override
public void onSuccess(Object data) {
if (onCompleteListener != null)
onCompleteListener.onSuccess(data);
}
@Override
public void onError(int errorType, Object data) {
if (onCompleteListener == null) return;
String msg = "注册失败,请稍候再试";
if (errorType == ERROR_TYPE_API_RETURN) {
switch ((int) data) {
case 1000:
msg = "手机号码,验证码,或密码不能为空";
break;
case 1002:
msg = "该手机号已被注册";
break;
case 1003:
msg = "验证码失效";
}
} else if (errorType == ERROR_TYPE_REQUST_EXCEPTION) {
if (data instanceof ConnectException)
msg = "网络无法连接,请检查您的网络";
}
onCompleteListener.onFail(msg);
}
};
CallAPI.Callback resetUserPasswordCallback = new CallAPI.Callback() {
@Override
public void onSuccess(Object data) {
if (onCompleteListener != null)
onCompleteListener.onSuccess(data);
}
@Override
public void onError(int errorType, Object data) {
if (onCompleteListener == null) return;
String msg = "重置失败,请稍候再试";
if (errorType == ERROR_TYPE_API_RETURN) {
switch ((int) data) {
case 1000:
msg = "手机号码,验证码,或密码不能为空";
break;
case 1002:
msg = "没有查到与此手机号码绑定的账户";
break;
case 1003:
msg = "验证码失效";
break;
}
} else if (errorType == ERROR_TYPE_REQUST_EXCEPTION) {
if (data instanceof ConnectException)
msg = "网络无法连接,请检查您的网络";
}
onCompleteListener.onFail(msg);
}
};
IRegisterDao.OnCompleteListener onCompleteListener;
@Override
public void registUser(String phoneNumber, String password, String yzm, OnCompleteListener onCompleteListener) {
this.onCompleteListener = onCompleteListener;
CallAPI.registUser(phoneNumber, password, yzm, registUserCallback);
}
@Override
public void findUserPassword(String phoneNumber, String password, String yzm, OnCompleteListener onCompleteListener) {
this.onCompleteListener = onCompleteListener;
CallAPI.findUserPassword(phoneNumber, password, yzm, resetUserPasswordCallback);
}
}
|
[
"656452024@qq.com"
] |
656452024@qq.com
|
2d9737900d976a9a7ae3f3ce9275157d1fda91cc
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/dozer/src/main/java/com/surya/dozer/MyCustomConvertor.java
|
30e38bb359c985a0e76d4244256db69854b74efa
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,524
|
java
|
package com.surya.dozer;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.dozer.CustomConverter;
import org.dozer.MappingException;
public class MyCustomConvertor implements CustomConverter {
@Override
public Object convert(Object dest, Object source, Class<?> arg2, Class<?> arg3) {
if (source == null) {
return null;
}
if (source instanceof Personne3) {
Personne3 person = (Personne3) source;
Date date = new Date(person.getDtob());
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
String isoDate = format.format(date);
return new Person3(person.getName(), isoDate);
} else if (source instanceof Person3) {
Person3 person = (Person3) source;
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date date = null;
try {
date = format.parse(person.getDtob());
} catch (ParseException e) {
throw new MappingException("Converter MyCustomConvertor " + "used incorrectly:" + e.getMessage());
}
long timestamp = date.getTime();
return new Personne3(person.getName(), timestamp);
} else {
throw new MappingException("Converter MyCustomConvertor " + "used incorrectly. Arguments passed in were:" + dest + " and " + source);
}
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
4350b2adffc316d9e3a55ed6d42b95e57c84d08d
|
fa297c819471e1eca163a63c7ade699df6c096f0
|
/src/main/java/za/co/tman/inventory/web/rest/errors/ExceptionTranslator.java
|
e1233dbd27f683259c22bbc2af32ec1144e04c08
|
[] |
no_license
|
kappaj2/IMN-InventoryModule
|
ddc1b8fbe992772d44af565b2bc500100a1d965a
|
9cf52940e6dda2741191192acd7d0d8b969a7ec2
|
refs/heads/master
| 2020-03-20T22:38:59.594555
| 2018-07-24T07:45:26
| 2018-07-24T07:45:26
| 137,808,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,049
|
java
|
package za.co.tman.inventory.web.rest.errors;
import za.co.tman.inventory.web.rest.util.HeaderUtil;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.NativeWebRequest;
import org.zalando.problem.DefaultProblem;
import org.zalando.problem.Problem;
import org.zalando.problem.ProblemBuilder;
import org.zalando.problem.Status;
import org.zalando.problem.spring.web.advice.ProblemHandling;
import org.zalando.problem.spring.web.advice.validation.ConstraintViolationProblem;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
/**
* Controller advice to translate the server side exceptions to client-friendly json structures.
* The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
*/
@ControllerAdvice
public class ExceptionTranslator implements ProblemHandling {
/**
* Post-process Problem payload to add the message key for front-end if needed
*/
@Override
public ResponseEntity<Problem> process(@Nullable ResponseEntity<Problem> entity, NativeWebRequest request) {
if (entity == null || entity.getBody() == null) {
return entity;
}
Problem problem = entity.getBody();
if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) {
return entity;
}
ProblemBuilder builder = Problem.builder()
.withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? ErrorConstants.DEFAULT_TYPE : problem.getType())
.withStatus(problem.getStatus())
.withTitle(problem.getTitle())
.with("path", request.getNativeRequest(HttpServletRequest.class).getRequestURI());
if (problem instanceof ConstraintViolationProblem) {
builder
.with("violations", ((ConstraintViolationProblem) problem).getViolations())
.with("message", ErrorConstants.ERR_VALIDATION);
return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode());
} else {
builder
.withCause(((DefaultProblem) problem).getCause())
.withDetail(problem.getDetail())
.withInstance(problem.getInstance());
problem.getParameters().forEach(builder::with);
if (!problem.getParameters().containsKey("message") && problem.getStatus() != null) {
builder.with("message", "error.http." + problem.getStatus().getStatusCode());
}
return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode());
}
}
@Override
public ResponseEntity<Problem> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, @Nonnull NativeWebRequest request) {
BindingResult result = ex.getBindingResult();
List<FieldErrorVM> fieldErrors = result.getFieldErrors().stream()
.map(f -> new FieldErrorVM(f.getObjectName(), f.getField(), f.getCode()))
.collect(Collectors.toList());
Problem problem = Problem.builder()
.withType(ErrorConstants.CONSTRAINT_VIOLATION_TYPE)
.withTitle("Method argument not valid")
.withStatus(defaultConstraintViolationStatus())
.with("message", ErrorConstants.ERR_VALIDATION)
.with("fieldErrors", fieldErrors)
.build();
return create(ex, problem, request);
}
@ExceptionHandler(NoSuchElementException.class)
public ResponseEntity<Problem> handleNoSuchElementException(NoSuchElementException ex, NativeWebRequest request) {
Problem problem = Problem.builder()
.withStatus(Status.NOT_FOUND)
.with("message", ErrorConstants.ENTITY_NOT_FOUND_TYPE)
.build();
return create(ex, problem, request);
}
@ExceptionHandler(BadRequestAlertException.class)
public ResponseEntity<Problem> handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) {
return create(ex, request, HeaderUtil.createFailureAlert(ex.getEntityName(), ex.getErrorKey(), ex.getMessage()));
}
@ExceptionHandler(ConcurrencyFailureException.class)
public ResponseEntity<Problem> handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) {
Problem problem = Problem.builder()
.withStatus(Status.CONFLICT)
.with("message", ErrorConstants.ERR_CONCURRENCY_FAILURE)
.build();
return create(ex, problem, request);
}
}
|
[
"kappaj@gmail.com"
] |
kappaj@gmail.com
|
4d43b494df2b0079e0a5ce93474ae17e6f1a78d4
|
8c085f12963e120be684f8a049175f07d0b8c4e5
|
/castor/tags/TAG_1_0_1/src/tests/ptf/jdo/rel1toN/State.java
|
a0fab867d09d03f4dc04990d8f871982e5e8fea1
|
[] |
no_license
|
alam93mahboob/castor
|
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
|
974f853be5680427a195a6b8ae3ce63a65a309b6
|
refs/heads/master
| 2020-05-17T08:03:26.321249
| 2014-01-01T20:48:45
| 2014-01-01T20:48:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,366
|
java
|
/*
* Copyright 2005 Ralf Joachim
*
* 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 ptf.jdo.rel1toN;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
/**
* @author <a href="mailto:ralf DOT joachim AT syscon-world DOT de">Ralf Joachim</a>
* @version $Revision$ $Date: 2005-06-24 19:41:08 -0600 (Fri, 24 Jun 2005) $
*/
public final class State {
//-------------------------------------------------------------------------
private Integer _id;
private String _name;
private Locked _locked;
private boolean _input = false;
private boolean _output = false;
private boolean _service = false;
private boolean _changeFrom = true;
private boolean _changeTo = true;
private Collection _departments = new ArrayList();
private Collection _equipments = new ArrayList();
private String _note;
private Date _createdAt;
private String _createdBy;
private Date _updatedAt;
private String _updatedBy;
//-------------------------------------------------------------------------
public Integer getId() { return _id; }
public void setId(final Integer id) { _id = id; }
public String getName() { return _name; }
public void setName(final String name) { _name = name; }
public Locked getLocked() { return _locked; }
public void setLocked(final Locked locked) { _locked = locked; }
public boolean getInput() { return _input; }
public void setInput(final boolean input) { _input = input; }
public boolean getOutput() { return _output; }
public void setOutput(final boolean output) { _output = output; }
public boolean getService() { return _service; }
public void setService(final boolean service) { _service = service; }
public boolean getChangeFrom() { return _changeFrom; }
public void setChangeFrom(final boolean changeFrom) { _changeFrom = changeFrom; }
public boolean getChangeTo() { return _changeTo; }
public void setChangeTo(final boolean changeTo) { _changeTo = changeTo; }
public Collection getDepartments() { return _departments; }
public void setDepartments(final Collection departments) {
_departments = departments;
}
public void addDepartment(final Department department) {
if ((department != null) && (!_departments.contains(department))) {
_departments.add(department);
department.setState(this);
}
}
public void removeDepartment(final Department department) {
if ((department != null) && (_departments.contains(department))) {
_departments.remove(department);
department.setState(null);
}
}
public Collection getEquipments() { return _equipments; }
public void setEquipments(final Collection equipments) {
_equipments = equipments;
}
public void addEquipment(final Equipment equipment) {
if ((equipment != null) && (!_equipments.contains(equipment))) {
_equipments.add(equipment);
equipment.setState(this);
}
}
public void removeEquipment(final Equipment equipment) {
if ((equipment != null) && (_equipments.contains(equipment))) {
_equipments.remove(equipment);
equipment.setState(null);
}
}
public String getNote() { return _note; }
public void setNote(final String note) { _note = note; }
public Date getCreatedAt() { return _createdAt; }
public void setCreatedAt(final Date createdAt) { _createdAt = createdAt; }
public String getCreatedBy() { return _createdBy; }
public void setCreatedBy(final String createdBy) { _createdBy = createdBy; }
public void setCreated(final Date createdAt, final String createdBy) {
_createdAt = createdAt;
_createdBy = createdBy;
}
public Date getUpdatedAt() { return _updatedAt; }
public void setUpdatedAt(final Date updatedAt) { _updatedAt = updatedAt; }
public String getUpdatedBy() { return _updatedBy; }
public void setUpdatedBy(final String updatedBy) { _updatedBy = updatedBy; }
public void setUpdated(final Date updatedAt, final String updatedBy) {
_updatedAt = updatedAt;
_updatedBy = updatedBy;
}
//-------------------------------------------------------------------------
public String toString() {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
StringBuffer sb = new StringBuffer();
sb.append("<State id='"); sb.append(_id);
sb.append("' name='"); sb.append(_name);
sb.append("' input='"); sb.append(_input);
sb.append("' output='"); sb.append(_output);
sb.append("' service='"); sb.append(_service);
sb.append("' changeFrom='"); sb.append(_changeFrom);
sb.append("' changeTo='"); sb.append(_changeTo);
sb.append("' note='"); sb.append(_note);
sb.append("' createdAt='");
if (_createdAt != null) {
sb.append(df.format(_createdAt));
} else {
sb.append(_createdAt);
}
sb.append("' createdBy='"); sb.append(_createdBy);
sb.append("' updatedAt='");
if (_updatedAt != null) {
sb.append(df.format(_updatedAt));
} else {
sb.append(_updatedAt);
}
sb.append("' updatedBy='"); sb.append(_updatedBy);
sb.append("'>\n");
sb.append(_locked);
sb.append("</State>\n");
return sb.toString();
}
//-------------------------------------------------------------------------
}
|
[
"wguttmn@b24b0d9a-6811-0410-802a-946fa971d308"
] |
wguttmn@b24b0d9a-6811-0410-802a-946fa971d308
|
ceb6bfd505cbfdebaab4d925f75c3759a2732e91
|
bab291f97f803f3cc4bc560f87a3dfb392322d96
|
/jenetics.ext/src/test/java/org/jenetics/ext/util/NodeTest.java
|
a0121a22665d55a9b5386cabc0570d00c849da79
|
[
"Apache-2.0"
] |
permissive
|
wilsonsf/jenetics
|
0192df8491f6e10667481962e36f0cddb8f48feb
|
911c4a34554eb41f1ecfa0c6eb26d650822a98b7
|
refs/heads/master
| 2021-08-11T12:36:26.679785
| 2017-11-13T17:34:03
| 2017-11-13T17:34:03
| 110,006,269
| 0
| 0
| null | 2017-11-08T17:13:07
| 2017-11-08T17:12:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,474
|
java
|
/*
* Java Genetic Algorithm Library (@__identifier__@).
* Copyright (c) @__year__@ Franz Wilhelmstötter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author:
* Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
*/
package org.jenetics.ext.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
*/
public class NodeTest {
@Test
public void treeToString() {
final TreeNode<Integer> tree = TreeNode.of(0)
.attach(TreeNode.of(1)
.attach(4, 5))
.attach(TreeNode.of(2)
.attach(6))
.attach(TreeNode.of(3)
.attach(TreeNode.of(7)
.attach(10, 11))
.attach(8)
.attach(9));
System.out.println(tree);
//final FlatTreeNode<Integer> flat = FlatTreeNode.of(tree);
//System.out.println(flat);
//System.out.println(Tree.toString(flat));
System.out.println(Trees.toCompactString(tree));
System.out.println(Trees.toDottyString("number_tree", tree));
System.out.println(tree.depth());
}
@Test
public void serialize() throws Exception {
final TreeNode<Integer> tree = TreeNode.of(0)
.attach(TreeNode.of(1)
.attach(4, 5))
.attach(TreeNode.of(2)
.attach(6))
.attach(TreeNode.of(3)
.attach(TreeNode.of(7)
.attach(10, 11))
.attach(TreeNode.of(8))
.attach(TreeNode.of(9)));
final ByteArrayOutputStream out = new ByteArrayOutputStream();
try (ObjectOutputStream oout = new ObjectOutputStream(out)) {
oout.writeObject(tree);
}
final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
try (ObjectInputStream oin = new ObjectInputStream(in)) {
@SuppressWarnings("unchecked")
final TreeNode<Integer> object = (TreeNode<Integer>)oin.readObject();
Assert.assertEquals(object, tree);
}
}
}
|
[
"franz.wilhelmstoetter@gmail.com"
] |
franz.wilhelmstoetter@gmail.com
|
e82962bf806ea42b3ae04f0455283e89241b1e2f
|
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
|
/dingtalk/java/src/main/java/com/aliyun/dingtalkstorage_1_0/models/MoveDentryResponse.java
|
b9be107ff7da2c5425cac5316501a58ce2e47727
|
[
"Apache-2.0"
] |
permissive
|
aliyun/dingtalk-sdk
|
f2362b6963c4dbacd82a83eeebc223c21f143beb
|
586874df48466d968adf0441b3086a2841892935
|
refs/heads/master
| 2023-08-31T08:21:14.042410
| 2023-08-30T08:18:22
| 2023-08-30T08:18:22
| 290,671,707
| 22
| 9
| null | 2021-08-12T09:55:44
| 2020-08-27T04:05:39
|
PHP
|
UTF-8
|
Java
| false
| false
| 1,325
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkstorage_1_0.models;
import com.aliyun.tea.*;
public class MoveDentryResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public MoveDentryResponseBody body;
public static MoveDentryResponse build(java.util.Map<String, ?> map) throws Exception {
MoveDentryResponse self = new MoveDentryResponse();
return TeaModel.build(map, self);
}
public MoveDentryResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public MoveDentryResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public MoveDentryResponse setBody(MoveDentryResponseBody body) {
this.body = body;
return this;
}
public MoveDentryResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
223111195f98c43f04847b36cda1306bb861fed8
|
3bb932947a00b2f77deb1f9294340710f30ed2e0
|
/data/comp-changes-client/src/mainclient/classLessAccessible/ClassLessAccessiblePub2PrivExt.java
|
3b86ddcfa2bf71c80c8d748743a6c76a18683641
|
[
"MIT"
] |
permissive
|
crossminer/maracas
|
17684657b29293d82abe50249798e10312d192d6
|
4cb6fa22d8186d09c3bba6f5da0c548a26d044e1
|
refs/heads/master
| 2023-03-05T20:34:36.083662
| 2023-02-22T12:21:47
| 2023-02-22T12:21:47
| 175,425,329
| 8
| 0
| null | 2021-02-25T13:19:15
| 2019-03-13T13:21:53
|
Java
|
UTF-8
|
Java
| false
| false
| 635
|
java
|
package mainclient.classLessAccessible;
import main.classLessAccessible.ClassLessAccessiblePub2Priv;
public class ClassLessAccessiblePub2PrivExt extends ClassLessAccessiblePub2Priv {
public void instantiatePub2Priv() {
ClassLessAccessiblePub2PrivInner c1 = new ClassLessAccessiblePub2PrivInner();
ClassLessAccessiblePub2PrivInner c2 = new ClassLessAccessiblePub2PrivExtInner();
}
public class ClassLessAccessiblePub2PrivExtInner extends ClassLessAccessiblePub2PrivInner {
public int accessPublicField() {
return super.publicField;
}
public int invokePublicMethod() {
return super.publicMethod();
}
}
}
|
[
"lina.m8a@gmail.com"
] |
lina.m8a@gmail.com
|
871c091a1e9b61885395ae96db62d3853a44cf1b
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/doanduyhai-Achilles/nonFlakyMethods/info.archinnov.achilles.internal.proxy.wrapper.ListWrapperTest-should_mark_dirty_on_remove_all.java
|
2785e45434bff9bd7f8d4754cf51e6d1a6d437a8
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 816
|
java
|
@Test public void should_mark_dirty_on_remove_all() throws Exception {
List<Object> target=Lists.<Object>newArrayList("a","b","c");
ListWrapper wrapper=prepareListWrapper(target);
wrapper.setProxifier(proxifier);
Collection<String> list=Arrays.asList("a","c");
when(proxifier.removeProxy(Mockito.<Collection<String>>any())).thenReturn(list);
wrapper.removeAll(list);
assertThat(target).containsExactly("b");
DirtyChecker dirtyChecker=dirtyMap.get(setter);
assertThat(dirtyChecker.getPropertyMeta()).isEqualTo(propertyMeta);
DirtyCheckChangeSet changeSet=dirtyChecker.getChangeSets().get(0);
assertThat(changeSet.getChangeType()).isEqualTo(REMOVE_FROM_LIST);
assertThat(changeSet.getPropertyMeta()).isEqualTo(propertyMeta);
assertThat(changeSet.getRawListChanges()).containsOnly("a","c");
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
8bedda8e630438f069fe220f59eec70c99124baf
|
de752b1dab1d9ed20c44e30ffa1ff887b868d2b0
|
/user/user-server/src/main/java/com/gapache/user/server/dao/repository/UserRepository.java
|
307f115afd3f9ea110e391bbc799224b56481ee9
|
[] |
no_license
|
KeKeKuKi/IACAA30
|
33fc99ba3f1343240fe3fafe82bee01339273b80
|
6f3f6091b2ca6dd92f22b1697c0fbfc7b9b7d371
|
refs/heads/main
| 2023-04-07T21:18:49.105964
| 2021-04-08T08:41:57
| 2021-04-08T08:41:57
| 352,832,814
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package com.gapache.user.server.dao.repository;
import com.gapache.jpa.BaseJpaRepository;
import com.gapache.user.server.dao.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @author HuSen
* @since 2020/9/8 11:29 上午
*/
public interface UserRepository extends BaseJpaRepository<UserEntity, Long>, JpaSpecificationExecutor<UserEntity> {
boolean existsByUsername(String username);
UserEntity findByUsername(String username);
}
|
[
"2669918628@qq.com"
] |
2669918628@qq.com
|
3ce38256238917f31058e9701eab76d87482c32b
|
41848f87199b44077424597315e1d67a6dd5ff80
|
/app/src/main/java/com/anshi/hjsign/PlaybackVideoFragment.java
|
30f73bb063982bc0152a6ae99bb4bc56fe22acd2
|
[] |
no_license
|
yulu1121/HJSign
|
0b433adb15b3e18fe46df9c4588e24b2e3e3bb67
|
635915217f2feeec50208bae0c5520ffc3749c1c
|
refs/heads/master
| 2020-03-25T19:37:32.877364
| 2018-08-17T01:07:04
| 2018-08-17T01:07:04
| 144,092,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,326
|
java
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.anshi.hjsign;
import android.net.Uri;
import android.os.Bundle;
import android.support.v17.leanback.app.VideoSupportFragment;
import android.support.v17.leanback.app.VideoSupportFragmentGlueHost;
import android.support.v17.leanback.media.MediaPlayerAdapter;
import android.support.v17.leanback.media.PlaybackTransportControlGlue;
import android.support.v17.leanback.widget.PlaybackControlsRow;
/**
* Handles video playback with media controls.
*/
public class PlaybackVideoFragment extends VideoSupportFragment {
private PlaybackTransportControlGlue<MediaPlayerAdapter> mTransportControlGlue;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Movie movie =
(Movie) getActivity().getIntent().getSerializableExtra(DetailsActivity.MOVIE);
VideoSupportFragmentGlueHost glueHost =
new VideoSupportFragmentGlueHost(PlaybackVideoFragment.this);
MediaPlayerAdapter playerAdapter = new MediaPlayerAdapter(getActivity());
playerAdapter.setRepeatAction(PlaybackControlsRow.RepeatAction.INDEX_NONE);
mTransportControlGlue = new PlaybackTransportControlGlue<>(getActivity(), playerAdapter);
mTransportControlGlue.setHost(glueHost);
mTransportControlGlue.setTitle(movie.getTitle());
mTransportControlGlue.setSubtitle(movie.getDescription());
mTransportControlGlue.playWhenPrepared();
playerAdapter.setDataSource(Uri.parse(movie.getVideoUrl()));
}
@Override
public void onPause() {
super.onPause();
if (mTransportControlGlue != null) {
mTransportControlGlue.pause();
}
}
}
|
[
"626899174@qq.com"
] |
626899174@qq.com
|
ee5c0ced1706aba8d4b33f4ef074eb92927fcd47
|
de7b67d4f8aa124f09fc133be5295a0c18d80171
|
/workspace_xfire/xfire-autoGeneration/chi/cn/chimelong/agent/ws/QueryAllEspecialTicketResponse.java
|
307e68bc673bdd02b52c596a511386922daeef10
|
[] |
no_license
|
lin-lee/eclipse_workspace_test
|
adce936e4ae8df97f7f28965a6728540d63224c7
|
37507f78bc942afb11490c49942cdfc6ef3dfef8
|
refs/heads/master
| 2021-05-09T10:02:55.854906
| 2018-01-31T07:19:02
| 2018-01-31T07:19:02
| 119,460,523
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,632
|
java
|
package cn.chimelong.agent.ws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import cn.grgbanking.apt.pojos.ticket.ArrayOfEspecialTicket;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="out" type="{http://ticket.pojos.apt.grgbanking.cn}ArrayOfEspecialTicket"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"out"
})
@XmlRootElement(name = "QueryAllEspecialTicketResponse")
public class QueryAllEspecialTicketResponse {
@XmlElement(required = true, nillable = true)
protected ArrayOfEspecialTicket out;
/**
* Gets the value of the out property.
*
* @return
* possible object is
* {@link ArrayOfEspecialTicket }
*
*/
public ArrayOfEspecialTicket getOut() {
return out;
}
/**
* Sets the value of the out property.
*
* @param value
* allowed object is
* {@link ArrayOfEspecialTicket }
*
*/
public void setOut(ArrayOfEspecialTicket value) {
this.out = value;
}
}
|
[
"lilin@lvmama.com"
] |
lilin@lvmama.com
|
93e3ec721d733d449199450ff959dcc4931b54cd
|
3b8215663b541f7487b5f20cef1c3d24ad7ded00
|
/app/src/main/java/com/muhaiminur/videocall_voximplant_android/MainActivity.java
|
c27d6a7ae7a0f96dc493d6e6d1270b82812e1178
|
[] |
no_license
|
Muhaiminur/VIDEOCALL_VOXIMPLANT_ANDROID
|
10e28331cfe7e93b3c2cb4a6714a576499f17e3b
|
bde889d1a20400d4b941de00cfcad1de681e1c1a
|
refs/heads/master
| 2020-04-07T19:35:26.175902
| 2018-11-22T06:47:40
| 2018-11-22T06:47:40
| 158,654,651
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,179
|
java
|
package com.muhaiminur.videocall_voximplant_android;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import com.karan.churi.PermissionManager.PermissionManager;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class MainActivity extends AppCompatActivity {
PermissionManager permissionManager;
@BindView(R.id.video_call)
Button videoCall;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
permissionManager = new PermissionManager() {
};
permissionManager.checkAndRequestPermissions(MainActivity.this);
}
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
permissionManager.checkResult(requestCode, permissions, grantResults);
}
@OnClick(R.id.video_call)
public void onViewClicked() {
startActivity(new Intent(MainActivity.this,Video_Call.class));
}
}
|
[
"muhaiminurabir@gmail.com"
] |
muhaiminurabir@gmail.com
|
615b8a153aa1f7a29c173538368666858c27041d
|
7f53ff59587c1feea58fb71f7eff5608a5846798
|
/temp/ffout/client/net/minecraft/src/BlockPortal.java
|
98d76bb3c1642725e67be25022a32f8a94d0a22a
|
[] |
no_license
|
Orazur66/Minecraft-Client
|
45c918d488f2f9fca7d2df3b1a27733813d957a5
|
70a0b63a6a347fd87a7dbe28c7de588f87df97d3
|
refs/heads/master
| 2021-01-15T17:08:18.072298
| 2012-02-14T21:29:14
| 2012-02-14T21:29:14
| 3,423,624
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,386
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// BlockBreakable, Material, IBlockAccess, World,
// Block, BlockFire, Entity, AxisAlignedBB
public class BlockPortal extends BlockBreakable
{
public BlockPortal(int i, int j)
{
super(i, j, Material.field_4260_x, false);
}
public AxisAlignedBB func_221_d(World world, int i, int j, int k)
{
return null;
}
public void func_238_a(IBlockAccess iblockaccess, int i, int j, int k)
{
if(iblockaccess.func_600_a(i - 1, j, k) == field_376_bc || iblockaccess.func_600_a(i + 1, j, k) == field_376_bc)
{
float f = 0.5F;
float f2 = 0.125F;
func_213_a(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
} else
{
float f1 = 0.125F;
float f3 = 0.5F;
func_213_a(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
}
}
public boolean func_217_b()
{
return false;
}
public boolean func_242_c()
{
return false;
}
public boolean func_4032_a_(World world, int i, int j, int k)
{
int l = 0;
int i1 = 0;
if(world.func_600_a(i - 1, j, k) == Block.field_405_aq.field_376_bc || world.func_600_a(i + 1, j, k) == Block.field_405_aq.field_376_bc)
{
l = 1;
}
if(world.func_600_a(i, j, k - 1) == Block.field_405_aq.field_376_bc || world.func_600_a(i, j, k + 1) == Block.field_405_aq.field_376_bc)
{
i1 = 1;
}
if(l == i1)
{
return false;
}
if(world.func_600_a(i - l, j, k - i1) == 0)
{
i -= l;
k -= i1;
}
for(int j1 = -1; j1 <= 2; j1++)
{
for(int l1 = -1; l1 <= 3; l1++)
{
boolean flag = j1 == -1 || j1 == 2 || l1 == -1 || l1 == 3;
if((j1 == -1 || j1 == 2) && (l1 == -1 || l1 == 3))
{
continue;
}
int j2 = world.func_600_a(i + l * j1, j + l1, k + i1 * j1);
if(flag)
{
if(j2 != Block.field_405_aq.field_376_bc)
{
return false;
}
continue;
}
if(j2 != 0 && j2 != Block.field_402_as.field_376_bc)
{
return false;
}
}
}
world.field_1043_h = true;
for(int k1 = 0; k1 < 2; k1++)
{
for(int i2 = 0; i2 < 3; i2++)
{
world.func_690_d(i + l * k1, j + i2, k + i1 * k1, Block.field_4047_bf.field_376_bc);
}
}
world.field_1043_h = false;
return true;
}
public void func_226_a(World world, int i, int j, int k, int l)
{
int i1 = 0;
int j1 = 1;
if(world.func_600_a(i - 1, j, k) == field_376_bc || world.func_600_a(i + 1, j, k) == field_376_bc)
{
i1 = 1;
j1 = 0;
}
int k1;
for(k1 = j; world.func_600_a(i, k1 - 1, k) == field_376_bc; k1--) { }
if(world.func_600_a(i, k1 - 1, k) != Block.field_405_aq.field_376_bc)
{
world.func_690_d(i, j, k, 0);
return;
}
int l1;
for(l1 = 1; l1 < 4 && world.func_600_a(i, k1 + l1, k) == field_376_bc; l1++) { }
if(l1 != 3 || world.func_600_a(i, k1 + l1, k) != Block.field_405_aq.field_376_bc)
{
world.func_690_d(i, j, k, 0);
return;
}
boolean flag = world.func_600_a(i - 1, j, k) == field_376_bc || world.func_600_a(i + 1, j, k) == field_376_bc;
boolean flag1 = world.func_600_a(i, j, k - 1) == field_376_bc || world.func_600_a(i, j, k + 1) == field_376_bc;
if(flag && flag1)
{
world.func_690_d(i, j, k, 0);
return;
}
if((world.func_600_a(i + i1, j, k + j1) != Block.field_405_aq.field_376_bc || world.func_600_a(i - i1, j, k - j1) != field_376_bc) && (world.func_600_a(i - i1, j, k - j1) != Block.field_405_aq.field_376_bc || world.func_600_a(i + i1, j, k + j1) != field_376_bc))
{
world.func_690_d(i, j, k, 0);
return;
} else
{
return;
}
}
public boolean func_260_c(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if(iblockaccess.func_600_a(i, j, k) == field_376_bc)
{
return false;
}
boolean flag = iblockaccess.func_600_a(i - 1, j, k) == field_376_bc && iblockaccess.func_600_a(i - 2, j, k) != field_376_bc;
boolean flag1 = iblockaccess.func_600_a(i + 1, j, k) == field_376_bc && iblockaccess.func_600_a(i + 2, j, k) != field_376_bc;
boolean flag2 = iblockaccess.func_600_a(i, j, k - 1) == field_376_bc && iblockaccess.func_600_a(i, j, k - 2) != field_376_bc;
boolean flag3 = iblockaccess.func_600_a(i, j, k + 1) == field_376_bc && iblockaccess.func_600_a(i, j, k + 2) != field_376_bc;
boolean flag4 = flag || flag1;
boolean flag5 = flag2 || flag3;
if(flag4 && l == 4)
{
return true;
}
if(flag4 && l == 5)
{
return true;
}
if(flag5 && l == 2)
{
return true;
}
return flag5 && l == 3;
}
public int func_229_a(Random random)
{
return 0;
}
public int func_234_g()
{
return 1;
}
public void func_236_b(World world, int i, int j, int k, Entity entity)
{
if(entity.field_616_af == null && entity.field_617_ae == null)
{
entity.func_4039_q();
}
}
public void func_247_b(World world, int i, int j, int k, Random random)
{
if(random.nextInt(100) == 0)
{
world.func_684_a((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "portal.portal", 0.5F, random.nextFloat() * 0.4F + 0.8F);
}
for(int l = 0; l < 4; l++)
{
double d = (float)i + random.nextFloat();
double d1 = (float)j + random.nextFloat();
double d2 = (float)k + random.nextFloat();
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
int i1 = random.nextInt(2) * 2 - 1;
d3 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d4 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d5 = ((double)random.nextFloat() - 0.5D) * 0.5D;
if(world.func_600_a(i - 1, j, k) == field_376_bc || world.func_600_a(i + 1, j, k) == field_376_bc)
{
d2 = (double)k + 0.5D + 0.25D * (double)i1;
d5 = random.nextFloat() * 2.0F * (float)i1;
} else
{
d = (double)i + 0.5D + 0.25D * (double)i1;
d3 = random.nextFloat() * 2.0F * (float)i1;
}
world.func_694_a("portal", d, d1, d2, d3, d4, d5);
}
}
}
|
[
"Ninja_Buta@hotmail.fr"
] |
Ninja_Buta@hotmail.fr
|
4773f77028d91ea038171aace30e8acaa74dd092
|
f0094829f498afba8f79d3b08ebe290f06d23350
|
/src/main/java/com/microwise/api/blackhole/UserAction.java
|
7e5e8f1378c67116d3deccdf32ba0033e8ecbe3a
|
[] |
no_license
|
algsun/galaxy
|
0c3c0bb6302c37aacb5a184343bc8c016a52631d
|
c5f40f2ed4835c803e7c2ed8ba16f84ad54f623e
|
refs/heads/master
| 2020-03-15T20:05:07.418862
| 2018-05-06T09:45:29
| 2018-05-06T09:45:29
| 132,314,724
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,143
|
java
|
package com.microwise.api.blackhole;
import com.microwise.api.bean.ApiResult;
import com.microwise.api.bean.UserVo;
import com.microwise.blackhole.bean.User;
import com.microwise.blackhole.service.UserService;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiResponse;
import com.wordnik.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
/**
* @author xiedeng
* @date 13-12-6
*/
@Controller
public class UserAction {
@Autowired
private UserService userService;
@RequestMapping(value = "/blackhole/getUsers", method = RequestMethod.GET)
@ApiOperation(value = "获取所有用户信息", position = 2, httpMethod = "GET",
notes = "获取所有用户信息"
)
@ApiResponses({
@ApiResponse(code = 200, message = "成功", response = Void.class),
@ApiResponse(code = 500, message = "服务端异常")
})
@ResponseBody
public ApiResult<Object> getUsers() {
List<User> users = userService.findUserList();
List<UserVo> userVos = new ArrayList<>();
for (User user : users) {
userVos.add(new UserVo(user.getId(), user.getUserName(), user.getEmail()));
}
return getResult(true, "获取所有用户信息成功", userVos);
}
/**
* 获取返回的json 数据
*
* @param success 是否成功 true 成功, false 失败
* @param msg 返回的信息
* @param data 返回的数据
* @return json数据
*/
private ApiResult<Object> getResult(boolean success, String msg, Object data) {
ApiResult<Object> apiResult = new ApiResult<Object>();
apiResult.setSuccess(success);
apiResult.setMessage(msg);
apiResult.setData(data);
return apiResult;
}
}
|
[
"algtrue@163.com"
] |
algtrue@163.com
|
817d8870141ba2889021eccb179ef41ff4eb371f
|
73308ecf567af9e5f4ef8d5ff10f5e9a71e81709
|
/jaso78256/server/src/main/java/com/example/jaso78113/MyController.java
|
60ca37ba4aa68ef0cc0f81bab96f079e8f2ef4b6
|
[] |
no_license
|
yukihane/stackoverflow-qa
|
bfaf371e3c61919492e2084ed4c65f33323d7231
|
ba5e6a0d51f5ecfa80bb149456adea49de1bf6fb
|
refs/heads/main
| 2023-08-03T06:54:32.086724
| 2023-07-26T20:02:07
| 2023-07-26T20:02:07
| 194,699,870
| 3
| 3
| null | 2023-03-02T23:37:45
| 2019-07-01T15:34:08
|
Java
|
UTF-8
|
Java
| false
| false
| 461
|
java
|
package com.example.jaso78113;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("")
public class MyController {
@RequestMapping(value = "/", consumes = "text/plain")
public String index(@RequestBody final String body) {
System.out.print(body);
return body;
}
}
|
[
"yukihane.feather@gmail.com"
] |
yukihane.feather@gmail.com
|
59f3d76c447aab75a8eefdcac900d2a73d7c0625
|
f2eb081b15b21d801927cab1c734dfb18a230dd8
|
/changgou-parent/changgou-service/changgou-service-goods/src/main/java/com/wk/goods/service/ParaService.java
|
b83125121c95037f89e0227b4877af05ad690a44
|
[] |
no_license
|
wk-001/changgou
|
e7be9524a075e774e7e157c99ada3d0e9c4a4050
|
2f9ea55775f56482e4b2a6a345a2c9a6641bdb81
|
refs/heads/master
| 2022-07-06T01:30:21.177309
| 2020-03-14T07:55:19
| 2020-03-14T07:55:19
| 239,932,807
| 1
| 2
| null | 2022-06-21T02:47:16
| 2020-02-12T05:15:04
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,326
|
java
|
package com.wk.goods.service;
import com.github.pagehelper.PageInfo;
import com.wk.goods.pojo.Para;
import java.util.List;
/****
* @Author:admin
* @Description:Para业务层接口
* @Date 2019/6/14 0:16
*****/
public interface ParaService {
/**
* 根据分类ID查询template_id,再用template_id查询参数集合
* @param categoryId
* @return
*/
List<Para> findByCategoryId(Integer categoryId);
/***
* Para多条件分页查询
* @param para
* @param page
* @param size
* @return
*/
PageInfo<Para> findPage(Para para, int page, int size);
/***
* Para分页查询
* @param page
* @param size
* @return
*/
PageInfo<Para> findPage(int page, int size);
/***
* Para多条件搜索方法
* @param para
* @return
*/
List<Para> findList(Para para);
/***
* 删除Para
* @param id
*/
void delete(Integer id);
/***
* 修改Para数据
* @param para
*/
void update(Para para);
/***
* 新增Para
* @param para
*/
void add(Para para);
/**
* 根据ID查询Para
* @param id
* @return
*/
Para findById(Integer id);
/***
* 查询所有Para
* @return
*/
List<Para> findAll();
}
|
[
"123@qq.com"
] |
123@qq.com
|
716aa8105916406d36abd44031ade6086eca6715
|
80403ec5838e300c53fcb96aeb84d409bdce1c0c
|
/server/modules/study/src/org/labkey/study/query/SpecimenPivotByDerivativeType.java
|
8449817ddf0a2196e87b4df8d18cb7800aa5442a
|
[] |
no_license
|
scchess/LabKey
|
7e073656ea494026b0020ad7f9d9179f03d87b41
|
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
|
refs/heads/master
| 2021-09-17T10:49:48.147439
| 2018-03-22T13:01:41
| 2018-03-22T13:01:41
| 126,447,224
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,012
|
java
|
/*
* Copyright (c) 2012-2015 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.labkey.study.query;
import org.apache.commons.lang3.math.NumberUtils;
import org.labkey.api.data.ColumnInfo;
import org.labkey.api.data.Container;
import org.labkey.api.study.StudyService;
import java.util.Map;
/**
* User: klum
* Date: Mar 9, 2012
*/
public class SpecimenPivotByDerivativeType extends BaseSpecimenPivotTable
{
public static final String PIVOT_BY_DERIVATIVE_TYPE = "Primary/Derivative Type Vial Counts";
private static final String COLUMN_DESCRIPTION_FORMAT = "Number of vials of primary & derivative type %s/%s";
public SpecimenPivotByDerivativeType(final StudyQuerySchema schema)
{
super(SpecimenReportQuery.getPivotByDerivativeType(schema.getContainer(), schema.getUser()), schema);
setDescription("Contains up to one row of Specimen Primary/Derivative Type totals for each " + StudyService.get().getSubjectNounSingular(getContainer()) +
"/visit combination.");
Container container = getContainer();
Map<Integer, NameLabelPair> primaryTypeMap = getPrimaryTypeMap(container);
Map<Integer, NameLabelPair> derivativeTypeMap = getDerivativeTypeMap(container);
for (ColumnInfo col : getRealTable().getColumns())
{
// look for the primary/derivative pivot encoding
String parts[] = col.getName().split(AGGREGATE_DELIM);
if (parts != null && parts.length == 2)
{
String types[] = parts[0].split(TYPE_DELIM);
if (types != null && types.length == 2)
{
int primaryId = NumberUtils.toInt(types[0]);
int derivativeId = NumberUtils.toInt(types[1]);
if (primaryTypeMap.containsKey(primaryId) && derivativeTypeMap.containsKey(derivativeId))
{
wrapPivotColumn(col,
COLUMN_DESCRIPTION_FORMAT,
primaryTypeMap.get(primaryId),
derivativeTypeMap.get(derivativeId),
new NameLabelPair(parts[1], parts[1]));
}
}
}
}
setDefaultVisibleColumns(getDefaultVisibleColumns());
addWrapColumn(_rootTable.getColumn("Container"));
}
}
|
[
"klum@labkey.com"
] |
klum@labkey.com
|
d2034ca2344da1147a58a1276a861764cd17a640
|
b35e42618890b01f01f5408c05741dc895db50a2
|
/opentsp-dongfeng-modules/opentsp-dongfeng-openapi/dongfeng-openapi-core/src/main/java/com/navinfo/opentsp/dongfeng/openapi/core/service/impl/PositionReportService.java
|
a819d1d2b06731273a2923d2f33d3b1e838dc49a
|
[] |
no_license
|
shanghaif/dongfeng-huanyou-platform
|
28eb5572a1f15452427456ceb3c7f3b3cf72dc84
|
67bcc02baab4ec883648b167717f356df9dded8d
|
refs/heads/master
| 2023-05-13T01:51:37.463721
| 2018-03-07T14:24:03
| 2018-03-07T14:26:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,836
|
java
|
package com.navinfo.opentsp.dongfeng.openapi.core.service.impl;
import com.navinfo.opentsp.dongfeng.common.result.HttpCommandResultWithData;
import com.navinfo.opentsp.dongfeng.common.service.BaseService;
import com.navinfo.opentsp.dongfeng.common.util.StringUtil;
import com.navinfo.opentsp.dongfeng.openapi.core.pojo.AuditStationPojo;
import com.navinfo.opentsp.dongfeng.openapi.core.service.IPositionReportService;
import com.navinfo.opentsp.dongfeng.openapi.dto.station.StationPositionReportInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author tushenghong
* @version 1.0
* @date 2017-07-17
* @modify
* @copyright Navi Tsp
*/
@Service
public class PositionReportService extends BaseService implements IPositionReportService {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
@Transactional
public HttpCommandResultWithData stationLocationReport(StationPositionReportInfo info) {
HttpCommandResultWithData result = new HttpCommandResultWithData();
AuditStationPojo pojo = toAuditStationPojo(info);
dao.executeUpdate("addStationAudit", pojo);
return result;
}
private AuditStationPojo toAuditStationPojo(StationPositionReportInfo info) {
AuditStationPojo pojo = new AuditStationPojo();
pojo.setStationId(StringUtil.toBigInteger(info.getId()));
pojo.setAddress(info.getAddress());
pojo.setStationType(Integer.valueOf(info.getLv()));
pojo.setLongitude(StringUtil.toBigInteger(info.getLon()));
pojo.setLatitude(StringUtil.toBigInteger(info.getLat()));
pojo.setAccountId(StringUtil.toBigInteger(info.getUserId()));
pojo.setCreateTime(StringUtil.toBigInteger(StringUtil.getCurrentTimeSeconds()));
return pojo;
}
}
|
[
"zhangtiantong@aerozhonghuan.com"
] |
zhangtiantong@aerozhonghuan.com
|
697e8783822859b03de9bcaa5c94ce89377359fa
|
82cc2675fdc5db614416b73307d6c9580ecbfa0c
|
/eb-service/quartz-service/src/main/java/cn/comtom/quartz/job/EBRSTInfoReportJob.java
|
d0cf36ea7bac4a23a72a08d3aae99bc2670de37e
|
[] |
no_license
|
hoafer/ct-ewbsv2.0
|
2206000c4d7c3aaa2225f9afae84a092a31ab447
|
bb94522619a51c88ebedc0dad08e1fd7b8644a8c
|
refs/heads/master
| 2022-11-12T08:41:26.050044
| 2020-03-20T09:05:36
| 2020-03-20T09:05:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package cn.comtom.quartz.job;
import cn.comtom.quartz.service.ILinkageService;
import cn.comtom.quartz.utils.SpringContextUtils;
import cn.comtom.tools.response.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.util.Date;
/**
* 台站信息上报
* @author:liuhy
* @date: 2019/5/9
* @time: 下午 2:15
*/
@Slf4j
@DisallowConcurrentExecution
public class EBRSTInfoReportJob implements Job {
private ILinkageService linkageService = (ILinkageService) SpringContextUtils.getBean("linkageServiceImpl");
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
log.info("=====台站信息资源上报开始====[{}]",new Date());
ApiResponse response = linkageService.ebrstInfoReport();
log.info("=====台站信息资源上报上报结束====[{}],result=[{}]",new Date(),response.getSuccessful());
}
}
|
[
"568656253@qq.com"
] |
568656253@qq.com
|
d4fd1b4319c19fb9d7d8026bd55811f0d4366cea
|
8a428922c320d214518e52f59c2a84fed9999928
|
/src/main/java/com/sda/pizzeria/service/UserRoleService.java
|
2b9925f4ba8b83d4da3e038957d939413668bbf2
|
[] |
no_license
|
SaintAmeN/java_12_pizzeria
|
82e49ef77fa247ea7513da4f61953318ea123fe5
|
0684837b5a251b7fa199ec87e59863d0475194ec
|
refs/heads/master
| 2020-04-09T02:08:09.423966
| 2018-12-02T14:48:26
| 2018-12-02T14:48:26
| 159,929,755
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.sda.pizzeria.service;
import com.sda.pizzeria.model.UserRole;
import com.sda.pizzeria.repository.UserRoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;
@Service
public class UserRoleService {
@Value("${pizzeria.user.defaultRoles}")
private String[] defaultRoles;
@Autowired
private UserRoleRepository userRoleRepository;
public Set<UserRole> getDefaultUserRoles(){
Set<UserRole> userRoles = new HashSet<>();
for (String role : defaultRoles) {
Optional<UserRole> singleRole = userRoleRepository.findByName(role);
if (singleRole.isPresent()) {
userRoles.add(singleRole.get());
}
}
return userRoles;
}
}
|
[
"pawel.reclaw@gmail.com"
] |
pawel.reclaw@gmail.com
|
193ed9fa0d9b1c1aa0dd7797e40cf089a11908f2
|
3be06fef3717172e972021a617e2e6396090df40
|
/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
|
00b5a15bdb14a8fec88e4b94fa6575311c955317
|
[
"Apache-2.0"
] |
permissive
|
fengabe/isis
|
a7479344776a039e141ac7a74be072f321f73193
|
e5e5a72867c5a6fb20f6eb008fcf4423afeca68a
|
refs/heads/master
| 2020-04-08T07:19:10.689819
| 2013-05-06T15:28:35
| 2013-05-06T15:28:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 158
|
java
|
package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
public class Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
}
|
[
"danhaywood@apache.org"
] |
danhaywood@apache.org
|
9c3eede81de50356ec51bb377ff47eb124e99f68
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/paypal/android/sdk/payments/aD.java
|
261d0f8a2e9958f2c5067dc37cf2ddd026c62f72
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 878
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.paypal.android.sdk.payments;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
// Referenced classes of package com.paypal.android.sdk.payments:
// PayPalService
final class aD extends BroadcastReceiver
{
private PayPalService a;
aD(PayPalService paypalservice)
{
a = paypalservice;
super();
}
public final void onReceive(Context context, Intent intent)
{
if (intent.getAction().equals("com.paypal.android.sdk.clearAllUserData"))
{
a.g();
Log.w("paypal.sdk", "active service user data cleared");
}
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
5f837d54bd8fb2980331431ef8bf0d40dc90ecb5
|
63d319fbd88e49701d8dcc2919c8f3a6013e90d0
|
/CoCoNut/org.reuseware.coconut.fragment.edit/src/org/reuseware/coconut/fragment/provider/ComposedFragmentItemProvider.java
|
c005d3bf1642854d10a0448af01fa3475d10aa53
|
[] |
no_license
|
DevBoost/Reuseware
|
2e6b3626c0d434bb435fcf688e3a3c570714d980
|
4c2f0170df52f110c77ee8cffd2705af69b66506
|
refs/heads/master
| 2021-01-19T21:28:13.184309
| 2019-06-09T20:39:41
| 2019-06-09T20:48:34
| 5,324,741
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,477
|
java
|
/*******************************************************************************
* Copyright (c) 2006-2012
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* 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:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
******************************************************************************/
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.reuseware.coconut.fragment.provider;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposedImage;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.ui.PlatformUI;
import org.reuseware.coconut.fragment.Fragment;
/**
* This is the item provider adapter for a {@link org.reuseware.coconut.fragment.ComposedFragment} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ComposedFragmentItemProvider
extends FragmentItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ComposedFragmentItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This returns ComposedFragment.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public Object getImage(Object object) {
Fragment fragment = (Fragment) object;
List<String> ufi = fragment.getUFI();
if (ufi.isEmpty()) {
return overlayImage(object,
getResourceLocator().getImage("full/obj16/FragmentDiagramFile"));
}
String fileName = ufi.get(ufi.size()-1);
List<Object> images = new ArrayList<Object>(2);
// XXX the PlatformUI dependency could be set to optional and only used
// when available
images.add(PlatformUI.getWorkbench().getEditorRegistry()
.getImageDescriptor(fileName));
images.add(getResourceLocator().getImage("full/obj16/OverlayComposed"));
return new ComposedImage(images);
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public String getText(Object object) {
return super.getText(object);
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}
|
[
"jendrik.johannes@devboost.de"
] |
jendrik.johannes@devboost.de
|
42807a20cac64dd1d28280442160dce521a6a064
|
0422cecf7ca43765afaaeaacc012fc13f70db88f
|
/spring-40-security/spring-02-security-customize/src/main/java/tian/pusen/handler/CustomAccessDeniedHandler.java
|
a8527b5dfd96ed2c548546cb9e77e7c36cee1b45
|
[
"MIT"
] |
permissive
|
pustian/learn-spring-boot
|
bf4982782942073bb4cff2b3f855f247f012dd63
|
9fe44b486d4f4d155e65147a4daface52e76d32d
|
refs/heads/master
| 2021-04-16T04:25:09.211648
| 2020-06-10T15:16:35
| 2020-06-10T15:16:35
| 249,327,629
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,409
|
java
|
package tian.pusen.handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
*
* @author: BaoZhou
* @date : 2018/6/25 19:27
*/
@Component
public class CustomAccessDeniedHandler implements AccessDeniedHandler {
private static Logger logger = LoggerFactory.getLogger(CustomAccessDeniedHandler.class);
@Override
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException, ServletException {
Authentication auth
= SecurityContextHolder.getContext().getAuthentication();
if (auth != null) {
logger.info("User '" + auth.getName()
+ "' attempted to access the protected URL: "
+ httpServletRequest.getRequestURI());
}
httpServletResponse.sendRedirect(httpServletRequest.getContextPath() + "/403");
}
}
|
[
"pustian@msn.com"
] |
pustian@msn.com
|
c8a10bbfc3bf8cefbefa6a390822de29fee55d5c
|
1153de40cf48076779039f1b29df45067b72397d
|
/nettosphere-samples/games/src/main/java/org/nettosphere/samples/games/NettoSphereGamesServer.java
|
443039e52169f4be5a8f8ff56f27c496b125ff13
|
[
"Apache-2.0"
] |
permissive
|
seamusmac/atmosphere-samples
|
9b90a648cf148a8b3c59d9da7f8efd3535c16c3f
|
5faf36a6b98d90598b9289fe6b2c5313ab977bb5
|
refs/heads/master
| 2021-01-14T10:53:09.766108
| 2016-02-18T20:26:08
| 2016-02-18T20:26:08
| 24,748,345
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,134
|
java
|
/*
* Copyright 2014 Jeanfrancois Arcand
*
* 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.nettosphere.samples.games;
import org.atmosphere.cpr.ApplicationConfig;
import org.atmosphere.nettosphere.Config;
import org.atmosphere.nettosphere.Nettosphere;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* A bootstrap class that start Nettosphere and Snake!.
*/
public class NettoSphereGamesServer {
private static final Logger logger = LoggerFactory.getLogger(Nettosphere.class);
public static void main(String[] args) throws IOException {
Config.Builder b = new Config.Builder();
b.resource(SnakeManagedService.class)
// For *-distrubution
.resource("./webapps")
// For mvn exec:java
.resource("./src/main/resources")
// For running inside an IDE
.resource("./nettosphere-samples/games/src/main/resources")
.initParam(ApplicationConfig.PROPERTY_SESSION_SUPPORT, "true")
.port(8080).host("127.0.0.1").build();
Nettosphere s = new Nettosphere.Builder().config(b.build()).build();
s.start();
String a = "";
logger.info("NettoSphere Games Server started on port {}", 8080);
logger.info("Type quit to stop the server");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (!(a.equals("quit"))) {
a = br.readLine();
}
System.exit(-1);
}
}
|
[
"jfarcand@apache.org"
] |
jfarcand@apache.org
|
188ec7ee84307e0338c2ba4b57d95ae3648c1eea
|
1a51f14e3356da0784cafa3da9812fd0ad186a52
|
/src/com/stock/userInfomation/ChangeEquipAction.java
|
1d0335dfd0afd5b2b7dc5973778c61f83bc05ff4
|
[] |
no_license
|
heavendarren/tfkj_stock
|
5c25851ca3360a4c800f4cbc5639e8313d392c19
|
5ad5640293160ee40107887a53d6260a4c15f3d5
|
refs/heads/master
| 2020-11-29T14:44:07.613103
| 2017-04-07T02:29:52
| 2017-04-07T02:29:52
| 87,493,214
| 0
| 1
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 1,636
|
java
|
package com.stock.userInfomation;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.hrbank.business.frame.BusinessPaginationAction;
import com.takucin.aceeci.frame.sql.DataRow;
import com.takucin.aceeci.frame.sql.DataSet;
public class ChangeEquipAction extends BusinessPaginationAction{
private ChangeEquipService service = new ChangeEquipService();
public ActionForward init(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ChangeEquipForm f = (ChangeEquipForm) form;
if(request.getParameter("equtype").equals("1")){
f.setType("ONU");
}else {
f.setType("»ú¶¥ºÐ");
}
return firstPage(mapping, form, request, response);
}
public ActionForward query(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ChangeEquipForm f = (ChangeEquipForm) form;
f.setHidden();
return firstPage(mapping, form, request, response);
}
public ActionForward getActionForward(ActionMapping mapping) {
return mapping.findForward(FW_INIT);
}
public DataSet<DataRow> getResult(ActionForm form, int first, int rows)
throws Exception {
ChangeEquipForm f = (ChangeEquipForm) form;
return service.getResult((ChangeEquipForm) form, first, rows);
}
public int getResultCount(ActionForm form) throws Exception {
return service.getResultCount((ChangeEquipForm) form);
}
}
|
[
"heavendarren@126.com"
] |
heavendarren@126.com
|
9a7b2390867a556f4fdbb9ef3188f97d3173a86a
|
558807267252c629fb720e61c6420a952d408701
|
/personWebService/src/main/java/org/personWebService/server/ws/rest/PwsRestLogicTrafficLog.java
|
e578782134256bc7446c30dc6bcc29245fc87069
|
[] |
no_license
|
mchyzer/personWebService
|
8c4857b6e44b6da8b81cf0910c8d29972ed9abd2
|
dc560577f87932d0a39db9e2c8574fe1d64fd7de
|
refs/heads/master
| 2020-12-24T16:24:08.849430
| 2019-05-09T13:42:01
| 2019-05-09T13:42:01
| 20,572,298
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 914
|
java
|
/**
* @author mchyzer
* $Id: TfRestLogicTrafficLog.java,v 1.1 2013/06/20 06:02:50 mchyzer Exp $
*/
package org.personWebService.server.ws.rest;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.personWebService.server.util.PersonWsServerUtils;
/**
* logger to log the traffic of
*/
public class PwsRestLogicTrafficLog {
/** logger */
private static final Log LOG = PersonWsServerUtils.getLog(PwsRestLogicTrafficLog.class);
/**
* log something to the log file
* @param message
*/
public static void wsRestTrafficLog(String message) {
LOG.debug(message);
}
/**
* log something to the log file
* @param messageMap
*/
public static void wsRestTrafficLog(Map<String, Object> messageMap) {
if (LOG.isDebugEnabled()) {
LOG.debug(PersonWsServerUtils.mapToString(messageMap));
}
}
}
|
[
"mchyzer@yahoo.com"
] |
mchyzer@yahoo.com
|
ffd7c98baee5d3a658e4bee0bfe5e788b938b608
|
dd8a642e5277919744ffb9bb7951e13084c44250
|
/bundles/at.bestsolution.dart.server.api/src-gen/at/bestsolution/dart/server/api/model/NavigationRegion.java
|
f2c2e64cfe90838581882386e687c7e13093df61
|
[] |
no_license
|
tomsontom/dartedit
|
7107ce2631d2c39eb0c4fc35db82576ebe456844
|
4bf2402692ef260db80631d4adbb772c83555604
|
refs/heads/master
| 2016-08-08T03:17:49.099642
| 2015-07-08T10:53:01
| 2015-07-08T10:53:01
| 38,748,516
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package at.bestsolution.dart.server.api.model;
import java.util.Map;
public class NavigationRegion {
private int offset ;
private int length ;
private int[] targets ;
public NavigationRegion() {
}
public int getOffset() {
return this.offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public int getLength() {
return this.length;
}
public void setLength(int length) {
this.length = length;
}
public int[] getTargets() {
return this.targets;
}
public void setTargets(int[] targets) {
this.targets = targets;
}
public String toString() {
return "NavigationRegion@"+hashCode()+"[offset = "+offset+", length = "+length+", targets = "+targets+"]";
}
}
|
[
"tom.schindl@bestsolution.at"
] |
tom.schindl@bestsolution.at
|
0fd3119a14fa7c05deca906c4abd82725792d2d2
|
4a2785fa22dbf1b8d7507bee2af22015c98ac73b
|
/Source code/keshe12/app/src/main/java/com/example/hp/materialtest/db/user_comment_deliver.java
|
ff475c67aeadae75f6b40976aca94813ead98b54
|
[] |
no_license
|
HWenTing/Take-out
|
9607b93e5f1324e4cec99200441503d00a694c67
|
3b2c84a029d6446c31c0df723965b966e8515e81
|
refs/heads/master
| 2020-05-09T17:22:47.837614
| 2019-04-14T12:47:42
| 2019-04-14T12:47:42
| 181,305,007
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package com.example.hp.materialtest.db;
import org.litepal.crud.DataSupport;
/**
* Created by HP on 2018/9/3.
*/
public class user_comment_deliver extends DataSupport {
private int id;
private double score;
private String comment;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public double getScore() {
return score;
}
public void setScore(double score) {
this.score = score;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}
|
[
"982740445@qq.com"
] |
982740445@qq.com
|
430aeb1e3401e90fa0d64fe7f9ff735e4b7ba277
|
a5e6f27020c23b5755d64d661e24eaef2ca2220f
|
/main.1/java/com/openbravo/pos/forms/Payments.java
|
2e6de9cde0e76a7ae1f3aff177490e26f327060e
|
[] |
no_license
|
AXE2005/SmartPos
|
1681ad1133631ef13e170ca67020e02668d823b9
|
7f433b92ee458931093420d045ff996db3ef77bf
|
refs/heads/master
| 2020-03-18T09:45:49.034449
| 2018-05-23T14:07:07
| 2018-05-23T14:07:07
| 134,579,231
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,145
|
java
|
// uniCenta oPOS - Touch Friendly Point Of Sale
// Copyright (c) 2017 Alejandro Camargo
// https://unicenta.com
//
// This file is part of uniCenta oPOS
//
// uniCenta oPOS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// uniCenta oPOS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
package com.openbravo.pos.forms;
import java.util.HashMap;
/**
*
* @author Jack Gerrard
*/
public class Payments {
private Double amount;
private Double tendered;
private final HashMap paymentPaid;
private final HashMap paymentTendered;
private final HashMap rtnMessage;
private String name;
private final HashMap paymentVoucher;
/**
*
*/
public Payments() {
paymentPaid = new HashMap();
paymentTendered = new HashMap();
rtnMessage = new HashMap();
paymentVoucher = new HashMap();
}
/**
*
* @param pName
* @param pAmountPaid
* @param pTendered
* @param rtnMsg
*/
public void addPayment (String pName, Double pAmountPaid, Double pTendered, String rtnMsg){
if (paymentPaid.containsKey(pName)){
paymentPaid.put(pName,Double.parseDouble(paymentPaid.get(pName).toString()) + pAmountPaid);
paymentTendered.put(pName,Double.parseDouble(paymentTendered.get(pName).toString()) + pTendered);
rtnMessage.put(pName, rtnMsg);
}else {
paymentPaid.put(pName, pAmountPaid);
paymentTendered.put(pName,pTendered);
rtnMessage.put(pName, rtnMsg);
}
}
/**
*
* @param pName
* @param pAmountPaid
* @param pTendered
* @param rtnMsg
* @param pVoucher
*/
public void addPayment (String pName, Double pAmountPaid, Double pTendered, String rtnMsg, String pVoucher){
if (paymentPaid.containsKey(pName)){
paymentPaid.put(pName,Double.parseDouble(paymentPaid.get(pName).toString()) + pAmountPaid);
paymentTendered.put(pName,Double.parseDouble(paymentTendered.get(pName).toString()) + pTendered);
rtnMessage.put(pName, rtnMsg);
paymentVoucher.put(pName, pVoucher);
}else {
paymentPaid.put(pName, pAmountPaid);
paymentTendered.put(pName,pTendered);
rtnMessage.put(pName, rtnMsg);
paymentVoucher.put(pName, pVoucher);
}
}
/**
*
* @param pName
* @return
*/
public Double getTendered (String pName){
return(Double.parseDouble(paymentTendered.get(pName).toString()));
}
/**
*
* @param pName
* @return
*/
public Double getPaidAmount (String pName){
return(Double.parseDouble(paymentPaid.get(pName).toString()));
}
/**
*
* @return
*/
public Integer getSize(){
return (paymentPaid.size());
}
/**
*
* @param pName
* @return
*/
public String getRtnMessage(String pName){
return (rtnMessage.get(pName).toString());
}
public String getVoucher(String pName){
return (paymentVoucher.get(pName).toString());
}
public String getFirstElement(){
String rtnKey= paymentPaid.keySet().iterator().next().toString();
return(rtnKey);
}
/**
*
* @param pName
*/
public void removeFirst (String pName){
paymentPaid.remove(pName);
paymentTendered.remove(pName);
rtnMessage.remove(pName);
// paymentVoucher.remove(pName);
}
}
|
[
"josephcoelo@hotmail.com"
] |
josephcoelo@hotmail.com
|
229e6eeefe05adcae649695bcc57afdc6de661eb
|
9cb4c5e68a9873d74bd9d972be0f0310b8b7ec84
|
/coleccionesI/src/teoria/listas/Lista1.java
|
53f29973ae41f023d721cc5670f6b1f7f388cd1c
|
[] |
no_license
|
programacionDAMVC/curso_2020_2021
|
386929260d64f6f9e00f40aec0ecef9d72e9fae6
|
2fada19efeda3c75bf753c05952edd9273a3cf85
|
refs/heads/main
| 2023-05-10T02:15:21.991906
| 2021-06-15T14:42:17
| 2021-06-15T14:42:17
| 355,239,758
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,126
|
java
|
package teoria.listas;
import java.util.*;
public class Lista1 {
public static void main(String[] args) {
//no parametrizamos
ArrayList lista1 = new ArrayList(); //de objetos iguales, los guardo como Object
lista1.add("hola"); //objeto String
lista1.add('c'); //lo guarda como Character
lista1.add(2); //lo guarda como Integer
//vamos a ver los datos
System.out.println(lista1);
String dato1 = (String) lista1.get(0);
char dato2 = (char) lista1.get(1);
int dato3 = (int) lista1.get(2);
System.out.printf("Cadena %s, char %c y entero %d%n", dato1, dato2, dato3);
//mejora, parametrizando la listas, todos son de la misma clase, permite clases hijas de Object
List<String> listaCadenas = new ArrayList<>();
listaCadenas.add("hola");
listaCadenas.add("buenas");
// listaCadenas.add(1); no permitido, solo String
//listaCadenas.add('c'); no permitido, solo String
System.out.println(listaCadenas);
listaCadenas.add(0, "bye");
System.out.println(listaCadenas);
listaCadenas.set(0, "hello");
System.out.println(listaCadenas);
int posicion = 12;
if (posicion < listaCadenas.size())
System.out.println(listaCadenas.get(posicion));
listaCadenas.remove("hello");
listaCadenas.remove(0);
System.out.println(listaCadenas); //solo queda la cadena buenas
System.out.printf("¿Contiene buenas la lista? %b%n", listaCadenas.contains("buenas"));
System.out.printf("¿Contiene hello la lista? %b%n", listaCadenas.contains("hello"));
System.out.printf("Posición de buenas en la lista %d%n", listaCadenas.indexOf("buenas"));
listaCadenas.add("buenas");
System.out.printf("Posición de buenas en la lista %d%n", listaCadenas.indexOf("buenas"));
//ejemplo de lista de float
List<Float> listaFloat = new ArrayList<>(); //crea una lista dinámica, se crea inicialmente con cero elemento
float[] arrayFloat = new float[12]; //crea una lista estática, no puede cambier el tamaño, y se crea con 12 floats que son todos 0.0
listaFloat.add(2.2f);
arrayFloat[11] = 2.2f;
listaFloat.add(2f);
listaFloat.add(0, 2.3f);
System.out.println(listaFloat);
//inicializando lista con contenido
List<String> listaInmutableString = List.of("uno", "dos");
System.out.println(listaInmutableString);
// listaInmutableString.add("tres"); es inmutable no se puede añadir mas elementos
// listaInmutableString.remove(0); es inmutable no se puede quitar elementos
//parecido
String[] arrayCadenas = {"uno", "dos"};
// listaInmutableString.set(0, "one");
System.out.println(listaInmutableString);
//otra forma de crear listas con valores inciales
List<String> stringList = Arrays.asList("one", "two");
System.out.println(stringList);
//stringList.add("three");
//stringList.remove(0);
//INMUTABLES
}
}
|
[
"programacionpsdam@gmail.com"
] |
programacionpsdam@gmail.com
|
5db24c10c1bd4185dee3265c392559d80fad8f90
|
4ea6d93e27c800b09cc19cfca3be6a15b0075a9f
|
/src/main/java/huffman/TreeNode.java
|
8153b28beec59c8b4e46eeb11062c684f34fc5bf
|
[] |
no_license
|
cellargalaxy/JavaDataStructureCurriculumDesign
|
8f8f7112d2a7cc6fde37e9dc478a16e9fe057cfc
|
c5296e2eef9401cea168e987524268d3bfda51a1
|
refs/heads/master
| 2020-12-30T14:12:44.999694
| 2017-06-06T12:55:30
| 2017-06-06T12:55:30
| 91,289,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
package huffman;
/**
* Created by cellargalaxy on 2017/5/15.
*/
public class TreeNode<T> {
private TreeNode parent;
private TreeNode left;
private TreeNode right;
private T t;
private long count;
private String coding;
protected TreeNode(T t, long count) {
this.t = t;
this.count = count;
coding = "";
}
public TreeNode getParent() {
return parent;
}
public void setParent(TreeNode parent) {
this.parent = parent;
}
public TreeNode getLeft() {
return left;
}
public void setLeft(TreeNode left) {
this.left = left;
}
public TreeNode getRight() {
return right;
}
public void setRight(TreeNode right) {
this.right = right;
}
public long getCount() {
return count;
}
public void setCount(long count) {
this.count = count;
}
public T getT() {
return t;
}
public void setT(T t) {
this.t = t;
}
public String getCoding() {
return coding;
}
public void setCoding(String coding) {
this.coding = coding;
}
@Override
public String toString() {
return "TreeNode{" +
"t=" + t +
", count=" + count +
", coding='" + coding + '\'' +
'}';
}
}
|
[
"cellargalaxy@gmail.com"
] |
cellargalaxy@gmail.com
|
57cb110e800dbf33958a758b9d8ce394947ba41b
|
f269c1d88eace07323e8c5c867e9c3ba3139edb5
|
/dk-impl-basic/dk-config-client/src/main/java/cn/laoshini/dk/config/client/DkConfigClientEnvironment.java
|
eacce051b18316b1fa90668acec924486137db5f
|
[
"Apache-2.0"
] |
permissive
|
BestJex/dangkang
|
6f693f636c13010dd631f150e28496d1ed7e4bc9
|
de48d5107172d61df8a37d5f597c1140ac0637e6
|
refs/heads/master
| 2022-04-17T23:12:06.406884
| 2020-04-21T14:42:57
| 2020-04-21T14:42:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,824
|
java
|
package cn.laoshini.dk.config.client;
import java.io.IOException;
import java.util.Properties;
import org.springframework.cloud.config.client.ConfigClientProperties;
import org.springframework.cloud.config.client.ConfigServicePropertySourceLocator;
import org.springframework.core.env.CompositePropertySource;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePropertySource;
import cn.laoshini.dk.common.ResourcesHolder;
import cn.laoshini.dk.exception.BusinessException;
import cn.laoshini.dk.util.LogUtil;
import cn.laoshini.dk.util.StringUtil;
/**
* @author fagarine
*/
public class DkConfigClientEnvironment extends StandardEnvironment {
private static final String[] CONFIG_CLIENT_FILE = { "bootstrap", "config-client" };
private static final String[] FILE_SUFFIX = { ".properties", ".yml", ".yaml" };
@Override
protected void customizePropertySources(MutablePropertySources propertySources) {
super.customizePropertySources(propertySources);
loadConfigProperties(this);
}
private void loadConfigProperties(ConfigurableEnvironment environment) {
Resource resource = null;
ResourceLoader resourceLoader = new DefaultResourceLoader(this.getClass().getClassLoader());
String configFile = ResourcesHolder.getConfigClientFile();
if (StringUtil.isNotEmptyString(configFile)) {
resource = resourceLoader.getResource(configFile);
}
if (resource == null || !resource.exists() || !resource.isFile()) {
for (String prefix : CONFIG_CLIENT_FILE) {
for (String suffix : FILE_SUFFIX) {
configFile = prefix + suffix;
resource = resourceLoader.getResource(configFile);
if (resource.exists() && resource.isFile()) {
break;
}
}
}
}
if (!resource.exists() || !resource.isFile()) {
throw new BusinessException("config.client.file", "找不到有效的配置中心客户端配置文件");
}
MutablePropertySources propertySources = environment.getPropertySources();
try {
// 加载config client配置文件信息到environment中
LogUtil.start("config client file:" + resource.getFile());
ResourcePropertySource propertySource = new ResourcePropertySource(resource);
propertySources.addLast(propertySource);
} catch (IOException e) {
LogUtil.error(e, "读取config client配置信息出错");
}
// 初始化配置中心服务与数据
propertySources.addLast(initConfigServicePropertySourceLocator(environment));
}
/**
* 初始化配置中心服务与数据
*
* @param environment environment
* @return 返回从配置中心拉取到的配置信息
*/
private PropertySource<?> initConfigServicePropertySourceLocator(ConfigurableEnvironment environment) {
String uri = environment.getProperty("dk.config.server");
String name = environment.getProperty("dk.config.name");
String label = environment.getProperty("dk.config.label");
String profile = environment.getProperty("dk.config.profile");
LogUtil.start("application name:{}, uri:{}, profile:{}, label:{}", name, uri, profile, label);
// 创建配置中心客户端配置数据
ConfigClientProperties configClientProperties = new ConfigClientProperties(environment);
Properties properties = new Properties();
if (StringUtil.isEmptyString(uri)) {
throw new BusinessException("config.server.url", "配置中心URL未配置,配置项:dk.config.server");
}
configClientProperties.setUri(uri.split(","));
if (StringUtil.isEmptyString(name)) {
throw new BusinessException("config.client.name", "配置中心客户端name未配置,配置项:dk.config.name");
}
configClientProperties.setName(name);
properties.put("spring.cloud.config.name", name);
if (StringUtil.isEmptyString(profile)) {
throw new BusinessException("config.client.profile", "配置中心客户端profile未配置,配置项:dk.config.profile");
}
configClientProperties.setProfile(profile);
properties.put("spring.cloud.config.profile", profile);
if (StringUtil.isNotEmptyString(label)) {
configClientProperties.setLabel(label);
properties.put("spring.cloud.config.label", label);
}
environment.getPropertySources().addLast(new PropertiesPropertySource("springCloudConfigClient", properties));
// 定位Environment属性并拉取数据
ConfigServicePropertySourceLocator configServicePropertySourceLocator = new ConfigServicePropertySourceLocator(
configClientProperties);
PropertySource<?> propertySource = configServicePropertySourceLocator.locate(environment);
LogUtil.start("config propertySource:" + propertySource.getName());
for (PropertySource ps : ((CompositePropertySource) propertySource).getPropertySources()) {
LogUtil.start(ps.getName() + ":" + ((MapPropertySource) ps).getSource());
}
return propertySource;
}
}
|
[
"125767187@qq.com"
] |
125767187@qq.com
|
da88d4f373bf6a5ff43f5a65f997aaee6c642a40
|
b3ec06fab450ac371b78298bc9992f5b2f722638
|
/src/main/java/af/gov/anar/query/adhocquery/service/AdHocScheduledJobRunnerService.java
|
94339c7351bb0005c5bb9d96f60faaddbb1711a3
|
[] |
no_license
|
Anar-Framework/anar-adhocquery
|
ca349d97755dbb6322dd376afa53e33474c2d593
|
329d5d706cb03802a4ef69ad773ba184f00ded0d
|
refs/heads/master
| 2020-12-21T02:23:05.395941
| 2020-02-05T04:30:15
| 2020-02-05T04:30:15
| 236,278,110
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 135
|
java
|
package af.gov.anar.query.adhocquery.service;
public interface AdHocScheduledJobRunnerService {
void generateClientSchedule();
}
|
[
"mohammadbadarhashimi@gmail.com"
] |
mohammadbadarhashimi@gmail.com
|
faf53a868c41cd0ccd630aaa292e1b05a9a8d6b4
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/spring/generated/src/main/java/org/openapitools/model/ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo.java
|
8ae8a2b0f7986254dc20af7221d187901eeaf6a0
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 4,336
|
java
|
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplProperties;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-08-05T01:13:37.880Z[GMT]")
public class ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo {
@JsonProperty("pid")
private String pid = null;
@JsonProperty("title")
private String title = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("properties")
private ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplProperties properties = null;
public ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo pid(String pid) {
this.pid = pid;
return this;
}
/**
* Get pid
* @return pid
**/
@ApiModelProperty(value = "")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@ApiModelProperty(value = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@ApiModelProperty(value = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo properties(ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplProperties properties) {
this.properties = properties;
return this;
}
/**
* Get properties
* @return properties
**/
@ApiModelProperty(value = "")
@Valid
public ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplProperties getProperties() {
return properties;
}
public void setProperties(ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplProperties properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo comAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo = (ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo) o;
return Objects.equals(this.pid, comAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo.pid) &&
Objects.equals(this.title, comAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo.title) &&
Objects.equals(this.description, comAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo.description) &&
Objects.equals(this.properties, comAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo.properties);
}
@Override
public int hashCode() {
return Objects.hash(pid, title, description, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComAdobeGraniteSocialgraphImplSocialGraphFactoryImplInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
61dbada8c13d4e6832e081d2d37c965ac0e53b06
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/MATE-20_EMUI_11.0.0/src/main/java/com/huawei/displayengine/$$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE.java
|
324a6c054ee654f91c5f9a787afc7e6d634839f8
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 806
|
java
|
package com.huawei.displayengine;
import com.huawei.displayengine.ImageProcessor;
import java.util.function.Consumer;
/* renamed from: com.huawei.displayengine.-$$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE implements Consumer {
public static final /* synthetic */ $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE INSTANCE = new $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE();
private /* synthetic */ $$Lambda$ImageProcessor$59YsElCxg154HU41yvTk9RTfNFE() {
}
@Override // java.util.function.Consumer
public final void accept(Object obj) {
((ImageProcessor.BitmapConfigTransformer) obj).doPreTransform();
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
e1e4d50c74597cb0d7845c7f1decd4f99a212e98
|
7be475d8f2eeb30acfb63f5c034b464433e416ff
|
/zuihou-backend/zuihou-demo/zuihou-demo-server/src/main/java/com/github/zuihou/demo/config/ExceptionConfiguration.java
|
adc48e78def62b77e9f1368139d5d823080ead27
|
[
"Apache-2.0"
] |
permissive
|
jollroyer/zuihou-admin-cloud
|
34b7f7766ca6bd231b3b57e7eab5336e9b0439e0
|
673ea6a5d845c8cd5006c0cd0b570b08a3596be0
|
refs/heads/master
| 2020-12-03T22:19:27.334015
| 2020-01-03T03:23:20
| 2020-01-03T03:23:20
| 231,504,256
| 0
| 0
|
Apache-2.0
| 2020-01-03T03:21:51
| 2020-01-03T03:21:51
| null |
UTF-8
|
Java
| false
| false
| 679
|
java
|
package com.github.zuihou.demo.config;
import com.github.zuihou.common.handler.DefaultGlobalExceptionHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* 全局异常处理
*
* @author zuihou
* @date 2020年01月02日17:19:27
*/
@Configuration
@ControllerAdvice(annotations = {RestController.class, Controller.class})
@ResponseBody
public class ExceptionConfiguration extends DefaultGlobalExceptionHandler {
}
|
[
"244387066@qq.com"
] |
244387066@qq.com
|
5f52afaf7fc11c337028e48244d7e6cec6350060
|
21017a76c972c0d1220bba05a9ffeb75fa620403
|
/Cadastro/CAPESCadastroBOFachada/src/main/java/br/com/sicoob/capes/cadastro/fachada/bem/BemFachada.java
|
b1f805aa1481ca1dec745fa95aba8b32e568eee5
|
[] |
no_license
|
pabllo007/cpes
|
a1b3b8920c9b591b702156ae36663483cd62a880
|
f4fc8dce3d487df89ac8f88c41023bc8db91b0c2
|
refs/heads/master
| 2022-11-28T02:55:07.675359
| 2019-10-27T22:17:53
| 2019-10-27T22:17:53
| 217,923,554
| 0
| 0
| null | 2022-11-24T06:24:02
| 2019-10-27T22:13:09
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 5,530
|
java
|
package br.com.sicoob.capes.cadastro.fachada.bem;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.ejb.EJBTransactionRolledbackException;
import javax.persistence.EntityNotFoundException;
import javax.persistence.PersistenceException;
import br.com.bancoob.excecao.BancoobException;
import br.com.bancoob.negocio.dto.ConsultaDto;
import br.com.bancoob.persistencia.excecao.ViolacaoIntegridadeException;
import br.com.bancoob.sisbrweb.dto.RequisicaoReqDTO;
import br.com.bancoob.sisbrweb.dto.RetornoDTO;
import br.com.sicoob.capes.cadastro.fachada.EntidadeCadastroFachada;
import br.com.sicoob.capes.cadastro.negocio.delegates.AutorizacaoCadastroDelegate;
import br.com.sicoob.capes.cadastro.negocio.delegates.BemDelegate;
import br.com.sicoob.capes.cadastro.negocio.delegates.CAPESCadastroFabricaDelegates;
import br.com.sicoob.capes.cadastro.negocio.vo.DefinicoesComponenteGedVO;
import br.com.sicoob.capes.comum.util.Constantes;
import br.com.sicoob.capes.negocio.entidades.bem.Bem;
/**
* Fachada base para as classes que herdam de {@link Bem}
*
* @author bruno.carneiro
*
* @param <T>
* A classe que herda de {@link Bem}
*/
public abstract class BemFachada extends EntidadeCadastroFachada<Bem> {
protected static final String CHAVE_BEM = "bem";
/**
* Construtor padrão da fachada.
*
* @param chaveMapa
*/
public BemFachada(String chaveMapa) {
super(chaveMapa);
}
/**
* {@inheritDoc}
*/
@Override
protected Bem obterEntidade(RequisicaoReqDTO dto) {
return (Bem) dto.getDados().get(chaveMapa);
}
/**
* Método utilizado pelo componente de pesquisa de bens para recuperar o bem
* a partir do seu código.
*
* @param dto
* @return
* @throws BancoobException
*/
public RetornoDTO obterPorCodigo(RequisicaoReqDTO dto) throws BancoobException {
RetornoDTO retorno = new RetornoDTO();
try {
Bem entidade = obterEntidade(dto);
ConsultaDto<Bem> criterios = new ConsultaDto<Bem>();
criterios.setFiltro(entidade);
retorno.getDados().put(NOME_PADRAO_LISTA, obterDelegate().pesquisar(criterios).getResultado());
} catch (NullPointerException e) {
registrarLogNullPointerException(e, dto);
} catch (ViolacaoIntegridadeException e) {
registrarLogViolacaoIntegridadeException(e, dto);
} catch (EJBTransactionRolledbackException e) {
registrarLogTransactionRolledbackException(e, dto);
} catch (EntityNotFoundException e) {
registrarLogEntityNotFoundException(e, dto);
} catch (PersistenceException e) {
registrarLogPersistenceException(e, dto);
} catch (Exception e) {//nosonar
registrarLogException(e, dto);
}
return retorno;
}
/**
* {@inheritDoc}
*/
@Override
protected BemDelegate obterDelegate() {
return CAPESCadastroFabricaDelegates.getInstance().criarBemDelegate();
}
/**
* {@inheritDoc}
*/
@Override
public RetornoDTO obterDados(RequisicaoReqDTO dto) throws BancoobException {
try {
Bem entidade = obterEntidade(dto);
Bem entidadePersistente = consultarEntidade(entidade);
AutorizacaoCadastroDelegate autorizacaoCadastroDelegate = obterFabricaDelegates().criarAutorizacaoCadastroDelegate();
entidadePersistente.setDocumentosComprobatorios(autorizacaoCadastroDelegate.obterDocumentosComprobatorios(entidadePersistente));
return obterMapRetorno(this.chaveMapa, entidadePersistente);
} catch (NullPointerException e) {
registrarLogNullPointerException(e, dto);
} catch (ViolacaoIntegridadeException e) {
registrarLogViolacaoIntegridadeException(e, dto);
} catch (EJBTransactionRolledbackException e) {
registrarLogTransactionRolledbackException(e, dto);
} catch (EntityNotFoundException e) {
registrarLogEntityNotFoundException(e, dto);
} catch (PersistenceException e) {
registrarLogPersistenceException(e, dto);
} catch (Exception e) {//nosonar
registrarLogException(e, dto);
}
return null;
}
/**
* Obtém as definições do GED (Siglas das chaves de negócio).
*
* @param dto
* @return
*/
protected List<DefinicoesComponenteGedVO> obterDefinicoesGED(RequisicaoReqDTO dto) {
Integer codTipoPessoa = (Integer) dto.getDados().get("idTipoPessoa");
List<DefinicoesComponenteGedVO> listaDefinicoesGed = new ArrayList<DefinicoesComponenteGedVO>();
if(codTipoPessoa != null) {
Set<String> chavesNegocio = new LinkedHashSet<String>();
chavesNegocio.add(Constantes.Negocio.GED_SIGLA_CHAVE_DOCUMENTO_GRUPO_COMPARTILHAMENTO);
chavesNegocio.add(Constantes.Negocio.GED_CHAVE_TIPO_CLASSIFICACAO_BEM);
chavesNegocio.add(Constantes.Negocio.GED_CHAVE_TIPO_BEM);
List<String> listaSiglas = new ArrayList<String>();
listaSiglas.add(Constantes.Negocio.GED_SIGLA_TIPO_DOCUMENTO_BEM);
listaSiglas.add(Constantes.Negocio.GED_SIGLA_LAUDO_AVALIACAO_BEM);
listaSiglas.add(Constantes.Negocio.GED_SIGLA_CERTIFICADO_CADASTRO_IMOVEL_RURAL);
listaSiglas.add(Constantes.Negocio.GED_SIGLA_IMPOSTO_SOBRE_PROPRIEDADE_TERRITORIAL);
listaSiglas.add(Constantes.Negocio.GED_SIGLA_CONTRATO_POSSE_USO_IMOVEL_BENEFICIADO);
for (String sigla : listaSiglas) {
DefinicoesComponenteGedVO definicaoComponenteGedVO = new DefinicoesComponenteGedVO();
definicaoComponenteGedVO.setIdTipoPessoa(codTipoPessoa.shortValue());
definicaoComponenteGedVO.setSiglaTipoDocumento(sigla);
definicaoComponenteGedVO.setChavesNegocio(chavesNegocio);
listaDefinicoesGed.add(definicaoComponenteGedVO);
}
}
return listaDefinicoesGed;
}
}
|
[
"="
] |
=
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.