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
1c5e23adc75750d350b9510819e6cb97dd3718cd
9e62804c12e28c8b290e0eebb785713d83decaa0
/src/main/java/org/deltacloud/client/HttpStatusCode.java
e826965a60b89ca9956334bf3c6e56131845390b
[ "Apache-2.0" ]
permissive
bobmcwhirter/deltacloud-client-java
803cd818b2625ca34714cb15e22781e68dbb7676
b43fd414fad71063d3162e2e1ca4aa2cd33f55ec
refs/heads/master
2016-09-11T03:34:19.322537
2011-05-21T16:58:39
2011-05-21T16:58:39
1,781,067
0
0
null
null
null
null
UTF-8
Java
false
false
1,362
java
/************************************************************************* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * *************************************************************************/ package org.deltacloud.client; /** * @author Andre Dietisheim */ public enum HttpStatusCode { OK(200), NOT_FOUND(404), FORBIDDEN(403), UNAUTHORIZED(401); private int code; private HttpStatusCode(int code) { this.code = code; } public int getCode() { return code; } public boolean isStatus(int statusCode) { return code == statusCode; } }
[ "bob@mcwhirter.org" ]
bob@mcwhirter.org
361771500131b5bae574df2c18e279e3da44d86d
fe520933456c83359561b817f30d611faa538cec
/iPlasma_decompiled/decompiled_result/src/lrg/insider/plugins/visualizations/Call.java
3adbabf80b2b35e75204050192d9ef4abea1ef2c
[ "MIT" ]
permissive
EmileSonneveld/maproef1819-emile
2f63d633650cd760d3ae7e3e2c31d904f6062e16
c47d381faa0b8d6c25549b5d66f857bb534ccfa4
refs/heads/master
2023-04-27T09:58:26.313392
2023-04-19T19:20:48
2023-04-19T19:20:48
202,502,325
5
1
MIT
2022-07-27T19:56:45
2019-08-15T08:19:09
Java
UTF-8
Java
false
false
1,002
java
/* */ package classes.lrg.insider.plugins.visualizations; /* */ /* */ import lrg.common.abstractions.entities.AbstractEntityInterface; /* */ import lrg.insider.plugins.visualizations.Call; /* */ /* */ public class Call { /* */ private AbstractEntityInterface caller; /* */ /* */ public Call(AbstractEntityInterface caller, AbstractEntityInterface callee) { /* 10 */ this.caller = caller; /* 11 */ this.callee = callee; /* */ } /* */ /* */ private AbstractEntityInterface callee; /* */ /* 16 */ public AbstractEntityInterface getCaller() { return this.caller; } /* */ /* */ /* */ /* 20 */ public AbstractEntityInterface getCallee() { return this.callee; } /* */ } /* Location: C:\Users\emill\Dropbox\slimmerWorden\2018-2019-Semester2\THESIS\iPlasma6\tools\iPlasma\classes.zip!\classes\lrg\insider\plugins\visualizations\Call.class * Java compiler version: 5 (49.0) * JD-Core Version: 1.0.7 */
[ "contact@emilesonneveld.be" ]
contact@emilesonneveld.be
0ac6b37f3c96a53a9248c0614a188d150fe930f5
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.4.2/sources/org/telegram/ui/Cells/HeaderCell.java
7988e4b5809eb306c330a41f618aff628eea2c20
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
1,691
java
package org.telegram.ui.Cells; import android.content.Context; import android.view.View; import android.view.View.MeasureSpec; import android.widget.FrameLayout; import android.widget.TextView; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import org.telegram.messenger.AndroidUtilities; import org.telegram.messenger.LocaleController; import org.telegram.messenger.exoplayer2.text.ttml.TtmlNode; import org.telegram.ui.ActionBar.Theme; import org.telegram.ui.Components.LayoutHelper; public class HeaderCell extends FrameLayout { private TextView textView = new TextView(getContext()); public HeaderCell(Context context) { int i = 5; super(context); this.textView.setTextSize(1, 15.0f); this.textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); this.textView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueHeader)); this.textView.setTypeface(AndroidUtilities.getTypeface(TtmlNode.ANONYMOUS_REGION_ID)); this.textView.setGravity((LocaleController.isRTL ? 5 : 3) | 16); View view = this.textView; if (!LocaleController.isRTL) { i = 3; } addView(view, LayoutHelper.createFrame(-1, -1.0f, i | 48, 17.0f, 15.0f, 17.0f, BitmapDescriptorFactory.HUE_RED)); } public TextView getTextView() { return this.textView; } protected void onMeasure(int i, int i2) { super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(i), 1073741824), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(38.0f), 1073741824)); } public void setText(String str) { this.textView.setText(str); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
4f435c79eb7d01a20689699354d47a6f6d391dfc
b0bd250be00bb5cc81b5fd1b11236510ec78701f
/core/src/org/columba/core/config/PropertiesAdapter.java
f295a2446ce869b62c0bd31f0d730e2d98e8bbe3
[]
no_license
topol77777/Xendra
2ecd4cc37033619d8aa23285ecbb352e7168cab4
1f2eba6f3ad720f886b82d90fc1e5ce3ed59db16
refs/heads/master
2020-03-17T03:50:50.436043
2018-01-22T02:57:52
2018-01-22T02:57:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,040
java
package org.columba.core.config; import java.util.Iterator; import java.util.Properties; import javax.xml.bind.annotation.adapters.XmlAdapter; public class PropertiesAdapter extends XmlAdapter<PropertiesMap, Properties> { public PropertiesMap marshal(Properties v) throws Exception { PropertiesMap pm = new PropertiesMap(); Iterator it = v.keySet().iterator(); while (it.hasNext()) { String name = (String) it.next(); Object value = v.get(name); MapEntryType e = new MapEntryType(); e.setName(name); //e.key = key; if (value instanceof Integer) { e.setValue(String.valueOf(value)); } else if (value instanceof String) { e.setValue((String)value); } else { System.out.println("X"); } //e.value = value; pm.getEntry().add(e); } return pm; } @Override public Properties unmarshal(PropertiesMap v) throws Exception { Properties p = new Properties(); for (MapEntryType e:v.getEntry()) { p.put(e.getName(), e.getValue()); //p.put(e.key, e.value); } return p; } }
[ "xapiens@sf.net" ]
xapiens@sf.net
5da45eb0cb92c998a312e9efb17d22d279c8f44d
01d3faa1d5136e60bc4b69e5367409f9fa359b38
/src/main/java/libgdx/ui/implementations/games/astronomy/questionconfig/AstronomyQuestionCategoryEnum.java
d9fff61aba2eba4aaf128f8ce3ca200b6a6e2fc5
[]
no_license
horeab/Hangman_tournament
3babcf6bff99fe15ecce53916ae1bd4c7cbc5dd0
d59a2c149048e74bf3ae4ea2bfc02c41f58d4eae
refs/heads/master
2020-06-05T09:43:06.617559
2019-09-02T14:53:31
2019-09-02T14:53:31
192,374,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
package libgdx.ui.implementations.games.astronomy.questionconfig; import libgdx.ui.constants.game.question.QuestionCategory; import libgdx.ui.services.gametypes.creatordependencies.CreatorDependencies; import libgdx.ui.services.gametypes.types.quizgame.dependentquizgame.DependentQuizGameCreatorDependencies; import libgdx.ui.services.gametypes.types.quizgame.uniquequizgame.UniqueQuizGameCreatorDependencies; public enum AstronomyQuestionCategoryEnum implements QuestionCategory { cat0(UniqueQuizGameCreatorDependencies.class),//Our Solar System cat1(UniqueQuizGameCreatorDependencies.class),//Stars cat2(UniqueQuizGameCreatorDependencies.class),//Basic Astronomy cat3(UniqueQuizGameCreatorDependencies.class),//Advanced Astronomy cat4(UniqueQuizGameCreatorDependencies.class),//Astronomical Terms ; private Class<? extends CreatorDependencies> questionCreator; AstronomyQuestionCategoryEnum(Class<? extends CreatorDependencies> questionCreator) { this.questionCreator = questionCreator; } @Override public int getIndex() { return ordinal(); } @Override public Class<? extends CreatorDependencies> getCreatorDependencies() { return questionCreator; } }
[ "horea.bucerzan@gmail.com" ]
horea.bucerzan@gmail.com
b926b9510175826009d362256c639e016cde85e8
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/profile/ui/NormalUserFooterPreference$a$10.java
011227dab7bd309426d6ac4412bdab27390f38e7
[]
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
431
java
package com.tencent.mm.plugin.profile.ui; import com.tencent.mm.plugin.base.model.b; import com.tencent.mm.plugin.profile.ui.NormalUserFooterPreference.a; class NormalUserFooterPreference$a$10 implements Runnable { final /* synthetic */ a pkC; NormalUserFooterPreference$a$10(a aVar) { this.pkC = aVar; } public final void run() { b.L(this.pkC.pkA.fmM, this.pkC.pkA.jLe.field_username); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
61129c9ba5eb5c92b36c7731e3fe54fad6cfa507
96083219d9ec1a9963e5b134ba080f726119b65f
/src/android/media/AudioSystem.java
b0367bee35c96b487a624cbf42e3887bed346747
[]
no_license
rajatgupta1998/packages_apps_MusicFX
484d91e01b1a9d2107c4664889ada957430a3607
914cb57a93b5811dd84349d55228aed7beb2bfbe
refs/heads/master
2020-04-22T00:14:16.192475
2019-02-22T17:23:18
2019-02-22T17:23:18
169,972,135
0
0
null
null
null
null
UTF-8
Java
false
false
1,602
java
package android.media; public class AudioSystem { public static final int DEVICE_NONE = 0x0; public static final int DEVICE_BIT_DEFAULT = 0x40000000; public static final int DEVICE_OUT_EARPIECE = 0x1; public static final int DEVICE_OUT_SPEAKER = 0x2; public static final int DEVICE_OUT_WIRED_HEADSET = 0x4; public static final int DEVICE_OUT_WIRED_HEADPHONE = 0x8; public static final int DEVICE_OUT_BLUETOOTH_SCO = 0x10; public static final int DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20; public static final int DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40; public static final int DEVICE_OUT_BLUETOOTH_A2DP = 0x80; public static final int DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100; public static final int DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200; public static final int DEVICE_OUT_AUX_DIGITAL = 0x400; public static final int DEVICE_OUT_HDMI = DEVICE_OUT_AUX_DIGITAL; public static final int DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800; public static final int DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000; public static final int DEVICE_OUT_USB_ACCESSORY = 0x2000; public static final int DEVICE_OUT_USB_DEVICE = 0x4000; public static final int DEVICE_OUT_REMOTE_SUBMIX = 0x8000; public static final int DEVICE_OUT_TELEPHONY_TX = 0x10000; public static final int DEVICE_OUT_LINE = 0x20000; public static final int DEVICE_OUT_HDMI_ARC = 0x40000; public static final int DEVICE_OUT_SPDIF = 0x80000; public static final int DEVICE_OUT_FM = 0x100000; public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT; }
[ "azaidi@live.nl" ]
azaidi@live.nl
59452609dda8245fc91c85757f302524e702cc1a
208ba847cec642cdf7b77cff26bdc4f30a97e795
/j/src/main/java/org.wp.j/ui/reader/models/ReaderImageList.java
127cd9b90366d30019e78a29e08734aa688cc4d0
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
1,698
java
package org.wp.j.ui.reader.models; import org.wp.j.util.UrlUtils; import java.util.ArrayList; /* * used by ReaderImageScanner to compile a list of images in a specific post */ public class ReaderImageList extends ArrayList<String> { private final boolean mIsPrivate; public ReaderImageList(boolean isPrivate) { mIsPrivate = isPrivate; } // image urls are always added normalized and without query params for easier matching, and // to ensure there are no hard-coded sizes in the query private static String fixImageUrl(final String imageUrl) { if (imageUrl == null) { return null; } return UrlUtils.normalizeUrl(UrlUtils.removeQuery(imageUrl)); } public int indexOfImageUrl(final String imageUrl) { if (imageUrl == null || this.isEmpty()) { return -1; } String fixedUrl = fixImageUrl(imageUrl); for (int i = 0; i < this.size(); i++) { if (fixedUrl.equals(this.get(i))) { return i; } } return -1; } public boolean hasImageUrl(final String imageUrl) { return (indexOfImageUrl(imageUrl) > -1); } public void addImageUrl(String imageUrl) { if (imageUrl != null && imageUrl.startsWith("http")) { this.add(fixImageUrl(imageUrl)); } } public void addImageUrl(@SuppressWarnings("SameParameterValue") int index, String imageUrl) { if (imageUrl != null && imageUrl.startsWith("http")) { this.add(index, fixImageUrl(imageUrl)); } } public boolean isPrivate() { return mIsPrivate; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
6e2141dbdc8579ae010a13e62ef3704f908bd206
507c62f3ae7886863143bdedd6e2c135f3fb248e
/subprojects/basilisk-javafx/src/test/groovy/basilisk/javafx/support/MappingObservableListTest.java
a515acd3af7dfac3970bcc6e73b321903f30194e
[ "Apache-2.0" ]
permissive
zhoupan/basilisk
44e8e23677d1a9f437ac2bf3121cacb752e5ab0c
bd5485a9990d003f9bce36acc242320fd39adf00
refs/heads/master
2020-03-22T23:33:39.349159
2016-12-01T09:11:48
2016-12-01T09:11:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,361
java
/* * Copyright 2008-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package basilisk.javafx.support; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import org.junit.Test; import java.util.function.Function; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; public class MappingObservableListTest { @Test public void testOperations() { // given: ObservableList<String> source = FXCollections.observableArrayList(); Function<String, Integer> mapper = new Function<String, Integer>() { @Override public Integer apply(String s) { return Integer.valueOf(s); } }; ObservableList<Integer> target = MappingBindings.mapList(source, mapper); // expect: assertThat(target, empty()); // when: source.addAll("1", "2", "3", "4", "5"); // then: assertThat(target, contains(1, 2, 3, 4, 5)); // when: source.remove("3"); // then: assertThat(target, contains(1, 2, 4, 5)); // when: source.remove("2"); source.remove("4"); // then: assertThat(target, contains(1, 5)); source.set(0, "5"); source.set(1, "1"); // then: assertThat(target, contains(5, 1)); } @Test public void testOperationsWithObservable() { // given: ObservableList<Integer> source = FXCollections.observableArrayList(); Function<Integer, Integer> function = new Function<Integer, Integer>() { @Override public Integer apply(Integer t) { return t; } }; ObjectProperty<Function<Integer, Integer>> mapper = new SimpleObjectProperty<>(function); ObservableList<Integer> target = MappingBindings.mapList(source, mapper); // expect: assertThat(target, empty()); // when: source.addAll(1, 2, 3, 4, 5); // then: assertThat(target, contains(1, 2, 3, 4, 5)); // when: mapper.setValue(new Function<Integer, Integer>() { @Override public Integer apply(Integer i) { return i * 2; } }); // then: assertThat(source, contains(1, 2, 3, 4, 5)); assertThat(target, contains(2, 4, 6, 8, 10)); // when: source.remove(1, 4); System.out.println(source); System.out.println(target); // then: assertThat(source, contains(1, 5)); assertThat(target, contains(2, 10)); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
3f7ee0f0d73b30c8f1dbaeb7418f809707bc9d7e
a2fbb87e5ffa7f1d3e96c238f6751ea6bfb5e2c7
/com/PrimeNumbers.java
fc01b002e21157b28bd8df3932a95bfff7e6610e
[]
no_license
icterguru/CoreJavaPrograms
5d9df09c33be5484dbb74981605d769c9e01f2ab
c4bc56ae022945145454a3c7bc67f4b553b77d2b
refs/heads/master
2021-08-23T18:50:57.528419
2017-12-06T03:23:50
2017-12-06T03:23:50
113,263,126
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package com; public class PrimeNumbers { public static boolean isPrime(int n) { if ((n % 2 == 0) && (n == 2)) return false; for (int i=3; i*i <=n; i+=2) { if (n%i == 0) return false; } return true; } public static void main(String[] args) { System.out.println(isPrime(20)); } }
[ "mokter@gmail.com" ]
mokter@gmail.com
57470248db8b9db18147f6fca7e627c73142ec3b
2f4043aef4e367a102034d37b5cc62e4b1c1e2c6
/Encapsulation/salaryIncrease/Main.java
4774475aefbcd608387ee37eb78f08c8995a9e47
[]
no_license
zulnerub/Java---Java-OOP
e56008c97e1417abf8e6c3f9c6e1a60caaf57f01
526ff2ea05549f6b32445f69abc51bef9736d89e
refs/heads/master
2020-12-09T19:16:13.096221
2020-01-12T14:42:00
2020-01-12T14:42:00
233,395,322
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
package Encapsulation.salaryIncrease; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLine()); List<Person> people = new ArrayList<>(); for (int i = 0; i < n; i++) { String[] input = reader.readLine().split("\\s+"); people.add(new Person(input[0], input[1], Integer.parseInt(input[2]), Double.parseDouble(input[3]))); } double bonus = Double.parseDouble(reader.readLine()); for (Person person : people) { person.increaseSalary(bonus); System.out.println(person.toString()); } } }
[ "drsimeon_87@abv.bg" ]
drsimeon_87@abv.bg
d8179e2b19a8c8fcfa008caab25c7b731ce991e5
9c6914aff923f838b07ab948ff56e8aeaed407ec
/Primary_Extension/src/main/java/org/lobobrowser/primary/ext/ActionPool.java
444eb8ef6301316bd1d77416a5ad069363200f0a
[]
no_license
jfzhang2/Loboevolution
13f0974fa90e4c285efe0772cef2698e75a2105a
ea5b49e45ce16cf69e89e55e53d7315a3e13652d
refs/heads/master
2021-01-20T16:18:43.745678
2015-11-24T15:41:23
2015-11-24T15:41:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,502
java
/* GNU GENERAL LICENSE Copyright (C) 2006 The Lobo Project. Copyright (C) 2014 - 2015 Lobo Evolution This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either verion 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Contact info: lobochief@users.sourceforge.net; ivan.difrancesco@yahoo.it */ package org.lobobrowser.primary.ext; import java.awt.event.ActionEvent; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; import java.util.LinkedList; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.AbstractAction; import javax.swing.Action; import org.lobobrowser.primary.action.BackAction; import org.lobobrowser.primary.action.BackMoreAction; import org.lobobrowser.primary.action.BookmarkNavigateAction; import org.lobobrowser.primary.action.EnableableAction; import org.lobobrowser.primary.action.ForwardAction; import org.lobobrowser.primary.action.ForwardMoreAction; import org.lobobrowser.primary.action.FullScreenAction; import org.lobobrowser.primary.action.GoToAction; import org.lobobrowser.primary.action.NavigateAction; import org.lobobrowser.primary.action.ReloadAction; import org.lobobrowser.primary.action.SourceAction; import org.lobobrowser.primary.action.UrlPrefixNavigateAction; import org.lobobrowser.ua.NavigationEntry; import org.lobobrowser.ua.NavigatorWindow; /** * The Class ActionPool. */ public class ActionPool extends AbstractAction { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L; /** The Constant logger. */ private static final Logger logger = Logger.getLogger(ActionPool.class.getName()); /** The component source. */ private final ComponentSource componentSource; /** The window. */ private final NavigatorWindow window; /** The enableable actions. */ private final Collection<EnableableAction> enableableActions; /** * Instantiates a new action pool. * * @param componentSource * the component source * @param window * the window */ public ActionPool(final ComponentSource componentSource, final NavigatorWindow window) { super(); this.componentSource = componentSource; this.window = window; Collection<EnableableAction> actions = new LinkedList<EnableableAction>(); this.enableableActions = actions; actions.add(new BackAction(componentSource, window, this)); actions.add(new ForwardAction(componentSource, window, this)); actions.add(new ReloadAction(componentSource, window, this)); actions.add(new BackMoreAction(componentSource, window, this)); actions.add(new ForwardMoreAction(componentSource, window, this)); actions.add(new SourceAction(componentSource, window, this)); actions.add(new FullScreenAction(window, this)); } /** * Update enabling. */ public void updateEnabling() { for (EnableableAction action : this.enableableActions) { action.updateEnabling(); } } /** * Creates the navigate action. * * @param fullURL * the full url * @return the action */ public Action createNavigateAction(String fullURL) { URL url; try { url = new URL(fullURL); } catch (MalformedURLException mfu) { logger.log(Level.WARNING, "createNavigateAction()", mfu); url = null; } NavigateAction nav = new NavigateAction(componentSource, window); nav.setUrl(url); return nav; } /** * Creates the navigate action. * * @param url * the url * @return the action */ public Action createNavigateAction(URL url) { NavigateAction nav = new NavigateAction(componentSource, window); nav.setUrl(url); return nav; } /** * Creates the bookmark navigate action. * * @param url * the url * @return the action */ public Action createBookmarkNavigateAction(URL url) { BookmarkNavigateAction bookNav = new BookmarkNavigateAction(componentSource, window); bookNav.setUrl(url); return bookNav; } /** * Creates the go to action. * * @param entry * the entry * @return the action */ public Action createGoToAction(NavigationEntry entry) { GoToAction go = new GoToAction(componentSource, window); go.setEntry(entry); return go; } /** * Adds the url prefix navigate action. * * @param urlPrefix * the url prefix * @param urlEncode * the url encode * @return the action */ public Action addUrlPrefixNavigateAction(String urlPrefix, boolean urlEncode) { UrlPrefixNavigateAction urlPrefixNav = new UrlPrefixNavigateAction(componentSource, window, this); urlPrefixNav.setUrlPrefix(urlPrefix); urlPrefixNav.setUrlEncode(urlEncode); this.enableableActions.add(urlPrefixNav); return urlPrefixNav; } /* * (non-Javadoc) * * @see * java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ @Override public void actionPerformed(ActionEvent arg0) { } }
[ "ivan.difrancesco@yahoo.it" ]
ivan.difrancesco@yahoo.it
2d4701388a7038cfec8df30d1a18da504bb4af88
cc66a11bfc637063bdd1cb703072ced8caf942e9
/rest/jerseyrs/src/main/java/com/dhenton9000/hibernatesecurity/dao/ApplicationsDAO.java
a93b967800c4073ebe089b75ea1bb4de1e778ff6
[]
no_license
donhenton/code-attic
e905840a4d53181d8a6d7c8b983c7b2dc553074b
e8588bea7af3d3a168958ae96ea8a476fcb6969f
refs/heads/master
2016-09-05T14:47:39.348847
2015-07-20T17:37:38
2015-07-20T17:37:38
39,396,691
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.dhenton9000.hibernatesecurity.dao; import com.dhenton9000.generic.GenericDAO; import com.dhenton9000.hibernatesecurity.Applications; import com.dhenton9000.hibernatesecurity.converters.ApplicationsConverter; /** * * @author dhh */ public interface ApplicationsDAO extends GenericDAO<Applications,Integer> { public ApplicationsConverter findApplicationsWithGroups(Integer id); public ApplicationsConverter findApplicationsWithGroupsAndUsers(Integer id); }
[ "donhenton@gmail.com" ]
donhenton@gmail.com
78580da28d092338fbb2ae497d331109c8da18fd
d4d5ed0c3b7f3c7dca53bdabddedfb1a080a391d
/src/main/java/com/work/petclinic/model/Specialty.java
f4727fad5bdf619af34fce533fa336b029e3134a
[]
no_license
godbolerr/oneaws-petclinic
901da27ffa4d64f7e938b707fa4b47602a00d0c1
604e746d5add4cfa5ace16b0c19ce05019caf355
refs/heads/master
2021-01-13T04:21:17.287622
2017-01-02T02:57:10
2017-01-02T02:57:10
77,455,239
0
0
null
null
null
null
UTF-8
Java
false
false
1,010
java
/* * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.work.petclinic.model; import javax.persistence.Entity; import javax.persistence.Table; /** * Models a {@link Vet Vet's} specialty (for example, dentistry). * * @author Juergen Hoeller */ @Entity @Table(name = "specialties") public class Specialty extends NamedEntity { private static final long serialVersionUID = -3562707899528621917L; }
[ "admin@test.com" ]
admin@test.com
f3e0ef0fcc2512c81ef86b984a24b374a30305f6
e3a07485c90ff4d332b71a74131aeb4475481395
/src/main/java/panmx/rmx/RMXBean.java
3e2a518ae6871673d845819c7d2a7e7a8b28c84c
[ "Apache-2.0" ]
permissive
realityforge/panmx
e1a7bd7fc4e3e5f359d1818ad9e6663a95472936
12f21aa62e130d1c4af5c1443b081ff75750e680
refs/heads/master
2021-01-17T07:52:13.334239
2016-07-13T23:18:59
2016-07-13T23:18:59
662,123
0
2
null
null
null
null
UTF-8
Java
false
false
4,469
java
package panmx.rmx; import java.util.Iterator; import javax.management.Attribute; import javax.management.AttributeList; import javax.management.AttributeNotFoundException; import javax.management.DynamicMBean; import javax.management.InvalidAttributeValueException; import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanRegistration; import javax.management.MBeanServer; import javax.management.ObjectName; import javax.management.ReflectionException; class RMXBean implements DynamicMBean, MBeanRegistration { /** The Java type for bean. */ private final RMXBeanType m_type; /** The target object that methods are invoked on. */ private final Object m_target; RMXBean( final RMXBeanType type, final Object target ) { if( null == type ) { throw new NullPointerException( "type" ); } if( null == target ) { throw new NullPointerException( "target" ); } m_type = type; m_target = target; } /** * Return the RMXBeanType for bean. * * @return the RMXBeanType. */ RMXBeanType getType() { return m_type; } /** * {@inheritDoc} */ public ObjectName preRegister( MBeanServer server, ObjectName name ) throws Exception { if( m_target instanceof MBeanRegistration ) { return ( (MBeanRegistration)m_target ).preRegister( server, name ); } else { return name; } } /** * {@inheritDoc} */ public void postRegister( Boolean registrationDone ) { if( m_target instanceof MBeanRegistration ) { ( (MBeanRegistration)m_target ).postRegister( registrationDone ); } } /** * {@inheritDoc} */ public void preDeregister() throws Exception { if( m_target instanceof MBeanRegistration ) { ( (MBeanRegistration)m_target ).preDeregister(); } } /** * {@inheritDoc} */ public void postDeregister() { if( m_target instanceof MBeanRegistration ) { ( (MBeanRegistration)m_target ).postDeregister(); } } /** * {@inheritDoc} */ public MBeanInfo getMBeanInfo() { return m_type.getMBeanInfo(); } /** * {@inheritDoc} */ public AttributeList getAttributes( final String[] names ) { final AttributeList list = new AttributeList(); for( final String name : names ) { try { final Object value = getAttribute( name ); list.add( new Attribute( name, value ) ); } catch( final Exception e ) { //Ignore. } } return list; } /** * {@inheritDoc} */ public AttributeList setAttributes( final AttributeList attributes ) { final AttributeList result = new AttributeList(); final Iterator iterator = attributes.iterator(); while( iterator.hasNext() ) { final Attribute attribute = (Attribute)iterator.next(); try { setAttribute( attribute ); final String name = attribute.getName(); final Object value = getAttribute( name ); result.add( new Attribute( name, value ) ); } catch( final Exception e ) { } } return result; } /** * {@inheritDoc} */ public Object getAttribute( final String name ) throws AttributeNotFoundException, MBeanException, ReflectionException { return m_type.getAttribute( m_target, name ); } /** * {@inheritDoc} */ public void setAttribute( final Attribute attribute ) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { m_type.setAttribute( m_target, attribute ); } /** * {@inheritDoc} */ public Object invoke( final String actionName, final Object[] params, final String[] signature ) throws MBeanException, ReflectionException { return m_type.invoke( m_target, actionName, params, signature ); } }
[ "peter@realityforge.org" ]
peter@realityforge.org
212f1dcefcff526342e69f3b965fb0948cd7591b
3714974b546f7fddeeea54d84b543c3b350a7583
/myProjects/MGTV/src/com/mstar/android/tv/ITimerEventClient.java
8bcbb1b7497374cd5a528dd29a0de3e56e7890a8
[]
no_license
lubing521/ideaProjects
57a8dadea5c0d8fc3e478c7829e6897dce242bde
5fd85e6dbe1ede8f094de65226de41321c1d0683
refs/heads/master
2022-01-18T23:10:05.057971
2018-10-26T12:27:00
2018-10-26T12:27:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,208
java
package com.mstar.android.tv; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public abstract interface ITimerEventClient extends IInterface { public abstract boolean onDestroyCountDown(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onEpgTimeUp(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onEpgTimerCountDown(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onEpgTimerRecordStart(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onLastMinuteWarn(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onOadTimeScan(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onOneSecondBeat(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onPowerDownTime(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onPvrNotifyRecordStop(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onSignalLock(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public abstract boolean onUpdateLastMinute(int paramInt1, int paramInt2, int paramInt3) throws RemoteException; public static abstract class Stub extends Binder implements ITimerEventClient { public static ITimerEventClient asInterface(IBinder paramIBinder) { throw new RuntimeException("stub"); } public IBinder asBinder() { throw new RuntimeException("stub"); } public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2) throws RemoteException { throw new RuntimeException("stub"); } } } /* Location: C:\Users\THX\Desktop\aa\aa\反编译工具包\out\classes_dex2jar.jar * Qualified Name: com.mstar.android.tv.ITimerEventClient * JD-Core Version: 0.6.2 */
[ "hiram@finereport.com" ]
hiram@finereport.com
35519b6d837d910361f43a8b91841c7c19ec4fd4
9412cd1fc2ae3151f8516b7c141787a45da1cde6
/pp-workspace/server-manager/src/main/java/com/pengpeng/stargame/servermanager/ServerInstanceManager.java
232a013a67a72263728db44528911a6409152d18
[]
no_license
imjamespond/java-recipe
2322d98d8db657fcd7e4784f706b66c10bee8d8b
6b8b0a6b46326dde0006d7544ffa8cc1ae647a0b
refs/heads/master
2021-08-28T18:22:43.811299
2016-09-27T06:41:00
2016-09-27T06:41:00
68,710,592
0
1
null
null
null
null
UTF-8
Java
false
false
5,441
java
package com.pengpeng.stargame.servermanager; import com.pengpeng.stargame.managed.IClientService; import com.pengpeng.stargame.managed.NodeInfo; import com.pengpeng.stargame.managed.NodeStatus; import com.pengpeng.stargame.managed.ServerType; import org.apache.log4j.Logger; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * 服务器实例管理器. * @author ChenHonghong@gmail.com * @since 13-4-15 下午3:50 */ public class ServerInstanceManager { public static Map<String,ServerInstance> serverInstances = new ConcurrentHashMap<String,ServerInstance>(); private static Logger logger = Logger.getLogger(ServerInstanceManager.class); /** * 添加新实例。 * @param newNodeInfo 新的节点信息 */ public static void addInstance(NodeInfo newNodeInfo){ String serverId = ServerManagerUtil.buildInstanceId(newNodeInfo); if(!serverInstances.containsKey(serverId)){ final Date now = new Date(); ServerInstance serverInstance = new ServerInstance(); serverInstance.setNodeInfo(newNodeInfo); serverInstance.setBeatTime(now); serverInstance.setInstanceId(serverId); serverInstance.setStatus(NodeStatus.ONSERVICE.getCode()); serverInstance.setStartTime(now); serverInstances.put(serverId, serverInstance); } } /** * 暂停一个实例。 * @param instanceId 实例ID */ public static void pause(String instanceId){ ServerInstance instance = getServerInstance(instanceId); if(instance == null){ return; } if(isManager(instanceId)){ return; } instance.setStatus(NodeStatus.PAUSED.getCode()); //调用客户端的暂停接口 IClientService nodeClient = instance.getNodeClient(); nodeClient.pause(); } /** * 恢复正常服务. * @param serverId 内部ID */ public static void resume(String serverId){ ServerInstance instance = getServerInstance(serverId); if(instance == null){ return; } if(NodeStatus.PAUSED.getCode().equals(instance.getStatus())){ //暂停状态,只能由管理员手工恢复 instance.setStatus(NodeStatus.ONSERVICE.getCode()); //调用客户端的停止接口 IClientService nodeClient = instance.getNodeClient(); nodeClient.resume(); } } /** * 停止某个节点。 * @param serverId 内部ID */ public static void stop(String serverId){ ServerInstance instance = getServerInstance(serverId); if(instance == null){ return; } //管理器不能停止 if(isManager(serverId)){ return; } //调用客户端的停止接口 IClientService nodeClient = instance.getNodeClient(); nodeClient.stop(); //将实例状态修改为“已停止” instance.setStatus(NodeStatus.STOPPED.getCode()); //通过的有服务“该服务”已停止 broadcastStop(instance.getNodeInfo()); } public static void broadcastStop(NodeInfo stoppedNode){ List<ServerInstance> instances = getInstances(); for(ServerInstance serverInstance : instances){ if(serverInstance.getStatus().equals(NodeStatus.STOPPED.getCode())){ continue; } serverInstance.getNodeClient().notifyNodeStop(stoppedNode); } } public static ServerInstance getServerInstance(String instanceId){ return serverInstances.get(instanceId); } /** * 检查该服务器是否是一个服务器管理器。 * @param serverId * @return */ public static boolean isManager(String serverId){ if(ServerType.MANAGER.equals(getType(serverId))){ return true; } return false; } public static String getStatus(String serverId){ ServerInstance instance = getServerInstance(serverId); return instance.getStatus(); } public static String getType(String serverId){ ServerInstance instance = getServerInstance(serverId); return instance.getNodeInfo().getType(); } public static void update(ServerInstance instance){ serverInstances.remove(instance.getInstanceId()); serverInstances.put(instance.getInstanceId(),instance); } public static void removeInstance(NodeInfo nodeInfo){ String key = ServerManagerUtil.buildInstanceId(nodeInfo); serverInstances.remove(key); } public static Map<String,ServerInstance> getServerInstances(){ return serverInstances; } public static List<ServerInstance> getByType(String type){ List<ServerInstance> all = getInstances(); List<ServerInstance> expects = new ArrayList<ServerInstance>(); for(ServerInstance instance : all){ if(instance.getNodeInfo().getType().equals(type)){ expects.add(instance); } } return expects; } public static List<ServerInstance> getInstances(){ List<ServerInstance> list = new ArrayList<ServerInstance>(serverInstances.values()); return list; } }
[ "imjamespond@gmai.com" ]
imjamespond@gmai.com
cd8988d775d4dd4e1ae3db32359c7d17816dfc64
3f2069806b5d5f8b74d2a09256f783220fa912f3
/jOOQ/src/main/java/org/jooq/CreateTableOnCommitStep.java
733d3fa052b19c62fc0c5c30d561b3ae6315d372
[ "Apache-2.0" ]
permissive
alokmenghrajani/jOOQ
a8636dd4dfde71c033756521932941700eec9993
0a52ca4bc15b0045163cb77aa01b5bf8cfa4089b
refs/heads/master
2021-01-14T14:33:09.732026
2015-04-20T13:46:17
2015-04-20T13:46:17
24,614,906
1
0
null
2015-04-20T22:47:01
2014-09-29T22:08:00
Java
UTF-8
Java
false
false
3,025
java
/** * Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com) * All rights reserved. * * This work is dual-licensed * - under the Apache Software License 2.0 (the "ASL") * - under the jOOQ License and Maintenance Agreement (the "jOOQ License") * ============================================================================= * You may choose which license applies to you: * * - If you're using this work with Open Source databases, you may choose * either ASL or jOOQ License. * - If you're using this work with at least one commercial database, you must * choose jOOQ License * * For more information, please visit http://www.jooq.org/licenses * * Apache Software License 2.0: * ----------------------------------------------------------------------------- * 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. * * jOOQ License and Maintenance Agreement: * ----------------------------------------------------------------------------- * Data Geekery grants the Customer the non-exclusive, timely limited and * non-transferable license to install and use the Software under the terms of * the jOOQ License and Maintenance Agreement. * * This library is distributed with a LIMITED WARRANTY. See the jOOQ License * and Maintenance Agreement for more details: http://www.jooq.org/licensing */ package org.jooq; // ... import static org.jooq.SQLDialect.POSTGRES; import org.jooq.impl.DSL; /** * A {@link Query} that can create tables. * * @author Lukas Eder */ public interface CreateTableOnCommitStep extends CreateTableFinalStep { /** * Add an <code>ON COMMIT DELETE ROWS</code> clause. * <p> * This clause will only be rendered when used with a * <code>GLOBAL TEMPORARY TABLE</code> * * @see DSL#createGlobalTemporaryTable(Table) */ @Support({ POSTGRES }) CreateTableFinalStep onCommitDeleteRows(); /** * Add an <code>ON COMMIT PRESERVE ROWS</code> clause. * <p> * This clause will only be rendered when used with a * <code>GLOBAL TEMPORARY TABLE</code> * * @see DSL#createGlobalTemporaryTable(Table) */ @Support({ POSTGRES }) CreateTableFinalStep onCommitPreserveRows(); /** * Add an <code>ON COMMIT DROP</code> clause. * <p> * This clause will only be rendered when used with a * <code>GLOBAL TEMPORARY TABLE</code> * * @see DSL#createGlobalTemporaryTable(Table) */ @Support({ POSTGRES }) CreateTableFinalStep onCommitDrop(); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
6f5b281ce0a75b117143d0826213ccaa24a85d44
6d6ab42365532daacea212032f617016b8ae95a5
/src/net/carslink/asynctask/UploadLocationTask.java
04a2611e622dfb488833fe2a923807adca29bc37
[]
no_license
lneartao/CarRecording
c3c857fd9397f61a3660aa25880253e607c08417
bf9c2f0d76b771df958425afcc8327d50c6f688a
refs/heads/master
2021-01-10T08:15:05.000135
2015-11-25T03:02:48
2015-11-25T03:02:48
46,833,956
1
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
package net.carslink.asynctask; import java.io.IOException; import java.util.HashMap; import net.carslink.util.HttpPostUtil; import android.os.AsyncTask; public class UploadLocationTask extends AsyncTask<Integer, Integer, String>{ private static final String SUCCESS = "success"; private static final String FAIL = "fail"; HashMap<String,String> locationMsg = null; private String serverURL = "http://weixin.carslink.net/camera/in"; public UploadLocationTask(HashMap<String,String> locationMsg){ this.locationMsg = locationMsg; } public void onPreExecute(){ } @Override protected String doInBackground(Integer... arg0) { HttpPostUtil connect; int state = 404; try { connect = new HttpPostUtil(serverURL); connect.addHasMapTextParameter(locationMsg); state = connect.send().getResponseCode(); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } if(state == 200){ return SUCCESS; }else{ return FAIL; } } public void onPostExecute(String result){ if(result.equals(SUCCESS)){ }else{ } } }
[ "l.neartao@gmail.com" ]
l.neartao@gmail.com
7a1622908857cc20967687fa49af8cfe9e92c740
ac72641cacd2d68bd2f48edfc511f483951dd9d6
/opscloud-domain/src/main/java/com/baiyi/opscloud/domain/vo/ansible/playbook/PlaybookTags.java
7b1cec6e747444b2dba9486fc7b162c86f01e15f
[]
no_license
fx247562340/opscloud-demo
6afe8220ce6187ac4cc10602db9e14374cb14251
b608455cfa5270c8c021fbb2981cb8c456957ccb
refs/heads/main
2023-05-25T03:33:22.686217
2021-06-08T03:17:32
2021-06-08T03:17:32
373,446,042
1
1
null
null
null
null
UTF-8
Java
false
false
248
java
package com.baiyi.opscloud.domain.vo.ansible.playbook; import lombok.Data; import java.util.List; /** * @Author baiyi * @Date 2020/4/14 6:48 下午 * @Version 1.0 */ @Data public class PlaybookTags { private List<PlaybookTask> tasks; }
[ "fanxin01@longfor.com" ]
fanxin01@longfor.com
12a13ff10c81b3c753bcf0bd0e0a2ea8c10da24f
3f7a5d7c700199625ed2ab3250b939342abee9f1
/src/gcom/faturamento/ComandoOsAnormalidade.java
9fe8d3b5e640ed5ca0cfe906b11fba250eb11410
[]
no_license
prodigasistemas/gsan-caema
490cecbd2a784693de422d3a2033967d8063204d
87a472e07e608c557e471d555563d71c76a56ec5
refs/heads/master
2021-01-01T06:05:09.920120
2014-10-08T20:10:40
2014-10-08T20:10:40
24,958,220
1
0
null
null
null
null
ISO-8859-1
Java
false
false
8,000
java
/* * Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.faturamento; import gcom.cadastro.localidade.GerenciaRegional; import gcom.cadastro.localidade.Localidade; import gcom.cadastro.localidade.Quadra; import gcom.cadastro.localidade.SetorComercial; import gcom.cadastro.localidade.UnidadeNegocio; import gcom.micromedicao.Rota; import java.io.Serializable; import java.util.Date; /** @author Hibernate CodeGenerator */ public class ComandoOsAnormalidade implements Serializable { public static final short INDICADOR_COMANDO_EXECUTADO = 1; public static final short INDICADOR_COMANDO_NAO_EXECUTADO = 2; private static final long serialVersionUID = 1L; /** identifier field */ private Integer id; /** persistent field */ private int anoMesReferencia; /** persistent field */ private GerenciaRegional gerenciaRegional; /** persistent field */ private UnidadeNegocio unidadeNegocio; /** persistent field */ private FaturamentoGrupo faturamentoGrupo; /** persistent field */ private Localidade localidadeInicial; /** persistent field */ private Localidade localidadeFinal; /** persistent field */ private SetorComercial setorComercialInicial; /** persistent field */ private SetorComercial setorComercialFinal; /** persistent field */ private Quadra quadraInicial; /** persistent field */ private Quadra quadraFinal; /** persistent field */ private Rota rotaInicial; /** persistent field */ private Rota rotaFinal; /** persistent field */ private Short indicadorComandoExecutado; /** persistent field */ private Short indicadorBaixoConsumo; /** persistent field */ private Short indicadorEstouroConsumo; /** persistent field */ private Date ultimaAlteracao; /** default constructor */ public ComandoOsAnormalidade() { } public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public int getAnoMesReferencia() { return anoMesReferencia; } public void setAnoMesReferencia(int anoMesReferencia) { this.anoMesReferencia = anoMesReferencia; } public GerenciaRegional getGerenciaRegional() { return gerenciaRegional; } public void setGerenciaRegional(GerenciaRegional gerenciaRegional) { this.gerenciaRegional = gerenciaRegional; } public UnidadeNegocio getUnidadeNegocio() { return unidadeNegocio; } public void setUnidadeNegocio(UnidadeNegocio unidadeNegocio) { this.unidadeNegocio = unidadeNegocio; } public FaturamentoGrupo getFaturamentoGrupo() { return faturamentoGrupo; } public void setFaturamentoGrupo(FaturamentoGrupo faturamentoGrupo) { this.faturamentoGrupo = faturamentoGrupo; } public Localidade getLocalidadeInicial() { return localidadeInicial; } public void setLocalidadeInicial(Localidade localidadeInicial) { this.localidadeInicial = localidadeInicial; } public Localidade getLocalidadeFinal() { return localidadeFinal; } public void setLocalidadeFinal(Localidade localidadeFinal) { this.localidadeFinal = localidadeFinal; } public SetorComercial getSetorComercialInicial() { return setorComercialInicial; } public void setSetorComercialInicial(SetorComercial setorComercialInicial) { this.setorComercialInicial = setorComercialInicial; } public SetorComercial getSetorComercialFinal() { return setorComercialFinal; } public void setSetorComercialFinal(SetorComercial setorComercialFinal) { this.setorComercialFinal = setorComercialFinal; } public Quadra getQuadraInicial() { return quadraInicial; } public void setQuadraInicial(Quadra quadraInicial) { this.quadraInicial = quadraInicial; } public Quadra getQuadraFinal() { return quadraFinal; } public void setQuadraFinal(Quadra quadraFinal) { this.quadraFinal = quadraFinal; } public Rota getRotaInicial() { return rotaInicial; } public void setRotaInicial(Rota rotaInicial) { this.rotaInicial = rotaInicial; } public Rota getRotaFinal() { return rotaFinal; } public void setRotaFinal(Rota rotaFinal) { this.rotaFinal = rotaFinal; } public Short getIndicadorComandoExecutado() { return indicadorComandoExecutado; } public void setIndicadorComandoExecutado(Short indicadorComandoExecutado) { this.indicadorComandoExecutado = indicadorComandoExecutado; } public Short getIndicadorBaixoConsumo() { return indicadorBaixoConsumo; } public void setIndicadorBaixoConsumo(Short indicadorBaixoConsumo) { this.indicadorBaixoConsumo = indicadorBaixoConsumo; } public Short getIndicadorEstouroConsumo() { return indicadorEstouroConsumo; } public void setIndicadorEstouroConsumo(Short indicadorEstouroConsumo) { this.indicadorEstouroConsumo = indicadorEstouroConsumo; } public Date getUltimaAlteracao() { return ultimaAlteracao; } public void setUltimaAlteracao(Date ultimaAlteracao) { this.ultimaAlteracao = ultimaAlteracao; } }
[ "felipesantos2089@gmail.com" ]
felipesantos2089@gmail.com
ba5abbfc4e8499791cfcf7d120f72d259871a70e
95a1d31c0eb7da21a9b3c9ef12619833d4ab2175
/wlhytestapp/src/main/java/com/quark/api/auto/bean/LogisticsList.java
81b72457180db9a5ea6c1cdd08b3369bf0a78b99
[]
no_license
leonck/testtest
aba45553559716e8ad8342215a56783dcec334fa
c06885d28d60473c4c5dbee581de4252024cd305
refs/heads/master
2020-12-02T23:52:57.236224
2017-07-03T10:30:29
2017-07-03T10:30:29
95,955,840
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
package com.quark.api.auto.bean; import java.util.List; /** * @author kingsley * @copyright quarktimes.com * @datetime 2016-11-23 17:49:39 */ public class LogisticsList { // public int logistics_id; //logo像 public String images_01; //物流公司名称 public String name; //服务电话#多号码连接 public String service_telephone; public void setLogistics_id(int logistics_id) { this.logistics_id = logistics_id; } public int getLogistics_id() { return this.logistics_id; } public void setImages_01(String images_01) { this.images_01 = images_01; } public String getImages_01() { return this.images_01; } public void setName(String name) { this.name = name; } public String getName() { return this.name; } public void setService_telephone(String service_telephone) { this.service_telephone = service_telephone; } public String getService_telephone() { return this.service_telephone; } }
[ "271381658@qq.com" ]
271381658@qq.com
f79c094866630fb0f5f44740135363deb55ddad3
d6b467da7999bb29ef659768890d4138b8e38195
/chinaw/src/com/wuxi/app/listeners/InfoCenterInitLayoutImpl.java
e253f4282118025f98eddd8cb3ed6350cffb676a
[]
no_license
ChinaWuxiandroid/chianwuxi_android
0975b6ece55af95182b13616aad92ce2d3121928
320fb895583c11bf5d7b2701ef3c8b459492cadf
refs/heads/master
2023-06-07T09:04:06.527140
2023-06-06T04:01:16
2023-06-06T04:01:16
12,722,746
0
1
null
null
null
null
UTF-8
Java
false
false
2,225
java
package com.wuxi.app.listeners; import android.support.v4.app.Fragment; import com.wuxi.app.BaseFragment; import com.wuxi.app.fragment.homepage.informationcenter.InfoNavigatorWithContentFragment; import com.wuxi.app.fragment.homepage.informationcenter.InforContentListFragment; import com.wuxi.app.fragment.homepage.informationcenter.WapFragment; import com.wuxi.app.util.CacheUtil; import com.wuxi.domain.MenuItem; /** * 咨询中心监听点击监听 * * @author wanglu 泰得利通 * */ public class InfoCenterInitLayoutImpl implements MenuItemInitLayoutListener { @Override public void bindMenuItemLayout( InitializContentLayoutListner initLayoutListner, MenuItem menuItem) { Class<? extends Fragment> fragmentClass = menuItem.getContentFragment(); Fragment fragment; if (fragmentClass == null) { return; } try { fragment = (Fragment) fragmentClass.newInstance(); if (fragment == null) { return; } WapFragment leaderWindowFragment = null; InforContentListFragment contentListFragment = null; InfoNavigatorWithContentFragment contentNavigatorWithContentFragment=null; if (fragment instanceof WapFragment) { leaderWindowFragment = (WapFragment) fragment; leaderWindowFragment.setParentItem(menuItem); initLayoutListner.bindContentLayout(leaderWindowFragment); } else if (fragment instanceof InforContentListFragment) { contentListFragment = (InforContentListFragment) fragment; contentListFragment.setParentItem(menuItem); initLayoutListner.bindContentLayout(contentListFragment); }else if(fragment instanceof InfoNavigatorWithContentFragment){ contentNavigatorWithContentFragment=(InfoNavigatorWithContentFragment)fragment; contentNavigatorWithContentFragment.setParentMenuItem(menuItem); initLayoutListner.bindContentLayout(contentNavigatorWithContentFragment); }else if(fragment instanceof BaseFragment){//链接跳转菜单 if(menuItem.getName().equals("机构职能")){ initLayoutListner.redirectFragment(CacheUtil.getHomeMenuItem(0), 0,6); } } } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } }
[ "wanglu0919@163.com" ]
wanglu0919@163.com
3270458074abf006c92819080fc9281bc374a624
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/alipay/mobile/h5container/api/H5Event.java
e768215607a7055cdc3aea6b5488cddc72e08066
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,127
java
package com.alipay.mobile.h5container.api; import android.app.Activity; import android.content.Context; import com.alibaba.fastjson.JSONObject; public class H5Event { public static final String FROM_WORK = "fromWork"; public static final String TYPE_CALL = "call"; public static final String TYPE_CALL_BACK = "callback"; /* access modifiers changed from: private */ public String action; /* access modifiers changed from: private */ public H5CallBack callBack; /* access modifiers changed from: private */ public boolean canceled; /* access modifiers changed from: private */ public boolean dispatcherOnWorkerThread; /* access modifiers changed from: private */ public String eventSource; /* access modifiers changed from: private */ public Object extra; /* access modifiers changed from: private */ public String id; /* access modifiers changed from: private */ public boolean keepCallback; /* access modifiers changed from: private */ public JSONObject param; /* access modifiers changed from: private */ public H5CoreNode target; /* access modifiers changed from: private */ public String type; public static class Builder { /* access modifiers changed from: private */ public String action; /* access modifiers changed from: private */ public H5CallBack callBack; /* access modifiers changed from: private */ public boolean canceled; /* access modifiers changed from: private */ public boolean dispatcherOnWorkerThread; /* access modifiers changed from: private */ public String eventSource; /* access modifiers changed from: private */ public Object extra; /* access modifiers changed from: private */ public String id = ("native_" + System.currentTimeMillis()); /* access modifiers changed from: private */ public boolean keepCallback = false; /* access modifiers changed from: private */ public JSONObject param; /* access modifiers changed from: private */ public H5CoreNode target; /* access modifiers changed from: private */ public String type = "call"; public Builder() { } public Builder(H5Event event) { this.action = event.action; this.id = event.id; this.canceled = event.canceled; this.callBack = event.callBack; this.type = event.type; this.keepCallback = event.keepCallback; this.param = event.param; this.target = event.target; this.extra = event.extra; this.dispatcherOnWorkerThread = event.dispatcherOnWorkerThread; this.eventSource = event.eventSource; } public Builder action(String action2) { this.action = action2; return this; } public Builder target(H5CoreNode target2) { this.target = target2; return this; } public Builder id(String id2) { this.id = id2; return this; } public Builder param(JSONObject param2) { this.param = param2; return this; } public Builder type(String type2) { this.type = type2; return this; } public Builder callback(H5CallBack callBack2) { this.callBack = callBack2; return this; } public Builder cancel(boolean cancel) { this.canceled = cancel; return this; } public Builder keepCallback(boolean keepCallBack) { this.keepCallback = keepCallBack; return this; } public Builder dispatcherOnWorkerThread(boolean dispatcherOnWorkerThread2) { this.dispatcherOnWorkerThread = dispatcherOnWorkerThread2; return this; } public Builder eventSource(String eventSource2) { this.eventSource = eventSource2; return this; } public Builder extra(Object extra2) { this.extra = extra2; return this; } public H5Event build() { return new H5Event(this); } } public enum Error { NONE, NOT_FOUND, INVALID_PARAM, UNKNOWN_ERROR, FORBIDDEN } private H5Event(Builder builder) { this.action = builder.action; this.id = builder.id; this.canceled = builder.canceled; this.callBack = builder.callBack; this.type = builder.type; this.keepCallback = builder.keepCallback; this.param = builder.param; this.target = builder.target; this.extra = builder.extra; this.dispatcherOnWorkerThread = builder.dispatcherOnWorkerThread; this.eventSource = builder.eventSource; } public String getEventSource() { return this.eventSource; } public void setEventSource(String eventSource2) { this.eventSource = eventSource2; } public boolean isDispatcherOnWorkerThread() { return this.dispatcherOnWorkerThread; } public H5CallBack getCallBack() { return this.callBack; } public void setCallBack(H5CallBack callBack2) { this.callBack = callBack2; } public final String getAction() { return this.action; } public void setAction(String action2) { this.action = action2; } public final boolean isCanceled() { return this.canceled; } public final void cancel() { this.canceled = true; } public final H5CoreNode getTarget() { return this.target; } public final void setTarget(H5CoreNode target2) { this.target = target2; } public final Activity getActivity() { if (!(this.target instanceof H5Page)) { return null; } H5Page page = (H5Page) this.target; if (page.getContext() == null) { return null; } Context context = page.getContext().getContext(); if (!(context instanceof Activity)) { return null; } return (Activity) context; } public final H5Page getH5page() { if (!(this.target instanceof H5Page)) { return null; } return (H5Page) this.target; } public final String getId() { return this.id; } public void setId(String id2) { this.id = id2; } public JSONObject getParam() { return this.param; } public void setParam(JSONObject param2) { this.param = param2; } public String getType() { return this.type; } public void setType(String type2) { this.type = type2; } public boolean isKeepCallback() { return this.keepCallback; } public Object getExtra() { return this.extra; } public void setExtra(Object extra2) { this.extra = extra2; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
be15f064d392371f0bea81291cc2df11eeb3b59e
7d28d457ababf1b982f32a66a8896b764efba1e8
/platform-pojo-bl/src/test/java/ua/com/fielden/platform/reflection/test_entities/AnotherSimplePartEntity.java
be39c8d82c4baa724c6c9692ae31e646736bd156
[ "MIT" ]
permissive
fieldenms/tg
f742f332343f29387e0cb7a667f6cf163d06d101
f145a85a05582b7f26cc52d531de9835f12a5e2d
refs/heads/develop
2023-08-31T16:10:16.475974
2023-08-30T08:23:18
2023-08-30T08:23:18
20,488,386
17
9
MIT
2023-09-14T17:07:35
2014-06-04T15:09:44
JavaScript
UTF-8
Java
false
false
1,058
java
package ua.com.fielden.platform.reflection.test_entities; import ua.com.fielden.platform.entity.AbstractEntity; import ua.com.fielden.platform.entity.annotation.DescTitle; import ua.com.fielden.platform.entity.annotation.IsProperty; import ua.com.fielden.platform.entity.annotation.KeyTitle; import ua.com.fielden.platform.entity.annotation.KeyType; import ua.com.fielden.platform.entity.annotation.Observable; import ua.com.fielden.platform.entity.annotation.Title; @KeyType(String.class) @KeyTitle(value = "key", desc = "key description") @DescTitle(value = "description", desc = "desc description") public class AnotherSimplePartEntity extends AbstractEntity<String> { @IsProperty @Title(value = "Level property", desc = "Level property description") private SimplePartEntity simplePartEntity; public SimplePartEntity getSimplePartEntity() { return simplePartEntity; } @Observable public void setSimplePartEntity(final SimplePartEntity simplePartEntity) { this.simplePartEntity = simplePartEntity; } }
[ "oles.hodych@gmail.com" ]
oles.hodych@gmail.com
1f05b1ae383c100199915b501d534dd5d12ad1e1
fbd4a18eda7a3e2620884bec3ff1e26f650ce83d
/sveditor/plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/search/SVDBSearchEngine.java
4d70a2a984075ba24448650c12abf2cb8293f6af
[]
no_license
dvkit/sveditor
b2adc6c2141f82e9827a670b7bcf5da2b015156b
9a64c5c52f99c2df495403f2c0167ef6c3a0d6bf
refs/heads/master
2021-01-15T11:08:42.568284
2014-02-16T21:07:42
2014-02-16T21:07:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,128
java
/**************************************************************************** * Copyright (c) 2008-2010 Matthew Ballance and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Matthew Ballance - initial implementation ****************************************************************************/ package net.sf.sveditor.core.db.search; import java.util.ArrayList; import java.util.List; import net.sf.sveditor.core.db.ISVDBItemBase; import net.sf.sveditor.core.db.SVDBItem; import net.sf.sveditor.core.db.SVDBItemType; import net.sf.sveditor.core.db.SVDBModIfcInst; import net.sf.sveditor.core.db.SVDBPackageDecl; import net.sf.sveditor.core.db.index.ISVDBIndexIterator; import net.sf.sveditor.core.db.index.ISVDBItemIterator; import net.sf.sveditor.core.db.stmt.SVDBTypedefStmt; import net.sf.sveditor.core.db.stmt.SVDBVarDeclStmt; import org.eclipse.core.runtime.IProgressMonitor; /** * * @author ballance * * Searches through the database */ public class SVDBSearchEngine { private ISVDBIndexIterator fSearchContext; private SVDBSearchSpecification fSearchSpec; private IProgressMonitor fProgressMonitor; public SVDBSearchEngine(ISVDBIndexIterator search_ctxt) { fSearchContext = search_ctxt; } public synchronized List<ISVDBItemBase> find(SVDBSearchSpecification spec, IProgressMonitor monitor) { List<ISVDBItemBase> ret = new ArrayList<ISVDBItemBase>(); fProgressMonitor = monitor; fSearchSpec = spec; switch (spec.getSearchType()) { case Package: if (spec.getSearchUsage() == SVDBSearchUsage.Declaration || spec.getSearchUsage() == SVDBSearchUsage.All) { find_package_decl(ret); } if (spec.getSearchUsage() == SVDBSearchUsage.Reference || spec.getSearchUsage() == SVDBSearchUsage.All) { find_package_refs(ret); } break; case Method: if (spec.getSearchUsage() == SVDBSearchUsage.Declaration || spec.getSearchUsage() == SVDBSearchUsage.All) { find_method_decl(ret); } if (spec.getSearchUsage() == SVDBSearchUsage.Reference || spec.getSearchUsage() == SVDBSearchUsage.All) { find_method_refs(ret); } break; case Type: if (spec.getSearchUsage() == SVDBSearchUsage.Declaration || spec.getSearchUsage() == SVDBSearchUsage.All) { find_type_decl(ret); } if (spec.getSearchUsage() == SVDBSearchUsage.Reference || spec.getSearchUsage() == SVDBSearchUsage.All) { find_type_refs(ret); } break; case Field: if (spec.getSearchUsage() == SVDBSearchUsage.Declaration || spec.getSearchUsage() == SVDBSearchUsage.All) { find_field_decl(ret); } if (spec.getSearchUsage() == SVDBSearchUsage.Reference || spec.getSearchUsage() == SVDBSearchUsage.All) { find_field_refs(ret); } break; } return ret; } private void find_package_decl(List<ISVDBItemBase> items) { ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); while (iterator.hasNext(SVDBItemType.PackageDecl)) { SVDBItem pkg = (SVDBPackageDecl)iterator.nextItem(SVDBItemType.PackageDecl); if (fSearchSpec.match(pkg.getName())) { items.add(pkg); } } } private void find_package_refs(List<ISVDBItemBase> items) { // ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); System.out.println("[ERROR] find_package_refs not supported"); } private void find_type_decl(List<ISVDBItemBase> items) { ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); SVDBItemType types[] = new SVDBItemType[] {SVDBItemType.ClassDecl, SVDBItemType.TypedefStmt, SVDBItemType.ModuleDecl}; while (iterator.hasNext(types)) { ISVDBItemBase item = iterator.nextItem(types); if (item.getType() == SVDBItemType.TypedefStmt) { SVDBTypedefStmt td = (SVDBTypedefStmt)item; if (td.getTypeInfo().getType() == SVDBItemType.TypeInfoStruct) { continue; } } if (fSearchSpec.match(SVDBItem.getName(item))) { items.add(item); } } } private void find_type_refs(List<ISVDBItemBase> items) { ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); SVDBItemType types[] = new SVDBItemType[] {SVDBItemType.VarDeclStmt, SVDBItemType.ModIfcInst}; while (iterator.hasNext(types)) { ISVDBItemBase item = iterator.nextItem(types); String match_name = ""; if (item.getType() == SVDBItemType.VarDeclStmt) { SVDBVarDeclStmt decl = (SVDBVarDeclStmt)item; match_name = decl.getTypeInfo().getName(); } else if (item.getType() == SVDBItemType.ModIfcInst) { SVDBModIfcInst inst = (SVDBModIfcInst)item; match_name = inst.getTypeName(); } if (fSearchSpec.match(match_name)) { items.add(item); } } } private void find_method_decl(List<ISVDBItemBase> items) { ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); SVDBItemType types[] = new SVDBItemType[] {SVDBItemType.Function, SVDBItemType.Task}; while (iterator.hasNext(types)) { ISVDBItemBase item = iterator.nextItem(); String name = SVDBItem.getName(item); // Trim away the scope if (name.indexOf("::") != -1) { name = name.substring(name.lastIndexOf("::")+2); } if (fSearchSpec.match(name)) { items.add(item); } } } private void find_method_refs(List<ISVDBItemBase> items) { } private void find_field_decl(List<ISVDBItemBase> items) { ISVDBItemIterator iterator = fSearchContext.getItemIterator(fProgressMonitor); SVDBItemType types[] = new SVDBItemType[] {SVDBItemType.VarDeclStmt, SVDBItemType.ModIfcInst}; while (iterator.hasNext(types)) { ISVDBItemBase item = iterator.nextItem(); String name = SVDBItem.getName(item); if (fSearchSpec.match(name)) { items.add(item); } } } private void find_field_refs(List<ISVDBItemBase> items) { } }
[ "matt.ballance@gmail.com" ]
matt.ballance@gmail.com
ab77f6081cc8e2eac258d21071e5533924d53570
930b91635faf90bb3881d41e00ca1424231e981b
/Quadterm1/src/LukasG_team/Queens.java
b67bc6e0ebc111a1cc71f8a831e69b0bde6b9433
[]
no_license
marekUniba/Java2020
7c3f3aa3f470a7d82adcd3b009f1fc66db99302c
90c972b70b43e267a629c1257f814b31c973b731
refs/heads/master
2022-07-04T00:08:09.514462
2020-05-13T07:29:49
2020-05-13T07:29:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,683
java
package LukasG_team; import java.util.Arrays; //35min public class Queens implements Comparable<Queens> { int [] r; Queens(int[] riesenie) { r = riesenie.clone(); } public String toString() { return Arrays.toString(r); } @Override public int compareTo(Queens o) { if (r.length != o.r.length) return (r.length < o.r.length) ? -1 : 1; for (int i = 0; i < r.length; i++) { if (r[i] != o.r[i]) return (r[i] < o.r[i]) ? -1 : 1; } return 0; } public Queens clockwise90() { int [] n = new int[r.length]; for (int i = 0; i < r.length; i++) n[r.length - 1 - r[i]] = i; return new Queens(n); } public Queens horizontalFlip() { int [] n = new int[r.length]; for (int i = 0; i < r.length; i++) n[i] = r.length - 1 - r[i]; return new Queens(n); } public Queens verticalFlip() { int [] n = new int[r.length]; for (int i = 0; i < r.length; i++) n[n.length - i - 1] = r[i]; return new Queens(n); } public static void main(String[] args) { Queens q = new Queens(new int[]{3,1,6,2,5,7,4,0}); System.out.println(q.verticalFlip().toString()); System.out.println(q.horizontalFlip().toString()); System.out.println(q.clockwise90().toString()); System.out.println(new Queens(new int[]{2,0,3,1}).clockwise90().compareTo(new Queens(new int[]{2,0,3,1}))); System.out.println(new Queens(new int[]{0,1,2,3}).compareTo(new Queens(new int[]{1,0,3,2}))); } }
[ "peter.borovansky@microstep-mis.com" ]
peter.borovansky@microstep-mis.com
9dbcd0980df16c6ea4d848c89b9fdbc0fdab321f
3fb9bdbe88ee2e59f80887e3a27e86b8433a4797
/app/src/main/java/com/example/haoji/phoneticsymbol/home/bean/GoodsBean.java
193106759ba4d22af0ddf6236239c2685127413f
[]
no_license
wuhoulang/PhoneticSymbol1
51781cf80615b8a43e3faac8a65916e4ff271c5d
0850956dc9bdc2162dc92f4ab80c0776f0d1ee9d
refs/heads/master
2020-09-30T14:14:34.827619
2020-01-20T10:09:21
2020-01-20T10:09:21
227,304,733
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package com.example.haoji.phoneticsymbol.home.bean; import java.io.Serializable; /** * Created by HAOJI on 2019/10/23. */ public class GoodsBean implements Serializable { private String englishname; private String chinesename; private String picture; private String music; private String yinbiao; private String prc; public GoodsBean (String chinesename,String englishname ,String picture,String music,String yinbiao,String prc){ this.englishname=englishname; this.chinesename=chinesename; this.picture=picture; this.music=music; this.yinbiao=yinbiao; this.prc=prc; } public String getEnglishname() { return englishname; } public void setEnglishname(String englishname) { this.englishname = englishname; } public String getChinesename() { return chinesename; } public void setChinesename(String chinesename) { this.chinesename = chinesename; } public String getPicture() { return picture; } public void setPicture(String picture) { this.picture = picture; } public String getMusic() { return music; } public void setMusic(String music) { this.music = music; } public String getYinbiao() { return yinbiao; } public void setYinbiao(String yinbiao) { this.yinbiao = yinbiao; } public String getPrc() { return prc; } public void setPrc(String prc) { this.prc = prc; } }
[ "1022845861@qq.com" ]
1022845861@qq.com
fcdfff3ef447d6d1747c96bc6bc7513bf1644de7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_636e3c77a5952b9e568b90ccd30e5a0269c229af/RegionIterator/2_636e3c77a5952b9e568b90ccd30e5a0269c229af_RegionIterator_t.java
ff55ae4a454e2cfee11c453d120c8b18114bcc2e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,797
java
package btwmod.livemap; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collections; import java.util.Deque; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import java.util.Random; import btwmods.WorldAPI; import net.minecraft.src.AnvilChunkLoader; import net.minecraft.src.Chunk; import net.minecraft.src.NBTTagCompound; public class RegionIterator implements Iterator<Chunk> { private Deque<QueuedRegion> regions = new ArrayDeque<QueuedRegion>(); private QueuedRegion currentRegion = null; private int currentXOffset = 0; private int currentZOffset = 0; private Chunk nextChunk = null; public synchronized void addRegion(int worldIndex, int x, int z) throws NullPointerException, FileNotFoundException { AnvilChunkLoader loader = WorldAPI.getAnvilChunkLoader(worldIndex); if (loader == null) throw new NullPointerException("The IChunkLoader could not be retrieved or is not an instance of AnvilChunkLoader."); File location = WorldAPI.getAnvilSaveLocation(worldIndex); if (location == null) throw new NullPointerException("The anvil save location could not be determined for the world."); if (!new File(new File(location, "region"), "r." + x + "." + z + ".mca").isFile()) throw new FileNotFoundException("Region file for " + x + "." + z + " does not exist."); regions.add(new QueuedRegion(worldIndex, location, x, z)); } public synchronized int addWorld(int worldIndex) throws NullPointerException, FileNotFoundException, IOException { AnvilChunkLoader loader = WorldAPI.getAnvilChunkLoader(worldIndex); if (loader == null) throw new NullPointerException("The IChunkLoader could not be retrieved or is not an instance of AnvilChunkLoader."); File location = WorldAPI.getAnvilSaveLocation(worldIndex); if (location == null) throw new NullPointerException("The anvil save location could not be determined for the world."); File regionDir = new File(location, "region"); if (!regionDir.isDirectory()) throw new FileNotFoundException("The anvil save location for the world does not contain a 'region' directory."); File[] files = regionDir.listFiles(); if (files == null) throw new IOException("The files could not be listed for the 'region' directory in the world's anvil save location."); List<QueuedRegion> regions = new ArrayList<QueuedRegion>(); for (File file : files) { if (file.isFile() && file.getName().matches("^r\\.[\\-0-9]+\\.[\\-0-9]+\\.mca$")) { String[] split = file.getName().split("\\."); regions.add(new QueuedRegion(worldIndex, location, Integer.parseInt(split[1]), Integer.parseInt(split[2]))); } } Collections.shuffle(regions, new Random(System.nanoTime())); this.regions.addAll(regions); return regions.size(); } public synchronized int getChunkCount() { return (regions.size() * 32 * 32) + (currentRegion == null ? 0 : currentXOffset * 32 + currentZOffset + 1); } public synchronized void clear() { regions.clear(); currentRegion = null; } private void iterateToNextValidChunk() { if (currentRegion == null) nextRegion(); while (nextChunk == null && currentRegion != null) { try { AnvilChunkLoader chunkLoader = WorldAPI.getAnvilChunkLoader(currentRegion.worldIndex); if (chunkLoader != null) { NBTTagCompound chunkNBT = chunkLoader.loadChunkNBT(currentRegion.world, currentRegion.regionX << 5 | currentXOffset, currentRegion.regionZ << 5 | currentZOffset); if (chunkNBT != null && chunkNBT.hasKey("Level") && chunkNBT.getCompoundTag("Level").hasKey("Sections")) { nextChunk = chunkLoader.readChunkFromNBT(currentRegion.world, chunkNBT.getCompoundTag("Level"), true); } } } catch (IOException e) { // TODO: Handle errors? } nextChunkOffset(); } } private void nextChunkOffset() { currentZOffset--; if (currentZOffset < 0) { currentZOffset = 31; currentXOffset--; } if (currentXOffset < 0) nextRegion(); } private void nextRegion() { currentRegion = regions.pollFirst(); currentXOffset = currentZOffset = 31; } @Override public synchronized boolean hasNext() { if (nextChunk == null) iterateToNextValidChunk(); return nextChunk != null; } @Override public synchronized Chunk next() { if (!hasNext()) throw new NoSuchElementException(); Chunk chunk = nextChunk; nextChunk = null; return chunk; } @Override public void remove() { throw new UnsupportedOperationException(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
dfd6775b49e0c12f5c2985ee4c49fdb9831e9c25
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgDoma/src/org/kyojo/schemaOrg/m3n3/healthLifesci/impl/APPLICABLE_LOCATION.java
541dae38f75874ee0b2c465bc7f63a508188f71f
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
2,885
java
package org.kyojo.schemaorg.m3n3.healthLifesci.impl; import java.util.ArrayList; import java.util.List; import org.kyojo.schemaorg.SimpleJsonBuilder; import org.kyojo.schemaorg.m3n3.core.Clazz.AdministrativeArea; import org.kyojo.schemaorg.m3n3.core.Container.Name; import org.kyojo.schemaorg.m3n3.core.impl.ADMINISTRATIVE_AREA; import org.kyojo.schemaorg.m3n3.healthLifesci.Container; import org.seasar.doma.Transient; public class APPLICABLE_LOCATION implements Container.ApplicableLocation { private static final long serialVersionUID = 1L; @Transient public List<AdministrativeArea> administrativeAreaList; public APPLICABLE_LOCATION() { } public APPLICABLE_LOCATION(String string) { this(new ADMINISTRATIVE_AREA(string)); } public String getString() { if(administrativeAreaList == null || administrativeAreaList.size() == 0 || administrativeAreaList.get(0) == null) { return null; } else { Name name = administrativeAreaList.get(0).getName(); if(name == null || name.getTextList() == null || name.getTextList().size() == 0 || name.getTextList().get(0) == null) { return null; } else { return name.getTextList().get(0).getString(); } } } public void setString(String string) { if(administrativeAreaList == null) { administrativeAreaList = new ArrayList<AdministrativeArea>(); } if(administrativeAreaList.size() == 0) { administrativeAreaList.add(new ADMINISTRATIVE_AREA(string)); } else { administrativeAreaList.set(0, new ADMINISTRATIVE_AREA(string)); } } public APPLICABLE_LOCATION(AdministrativeArea administrativeArea) { administrativeAreaList = new ArrayList<AdministrativeArea>(); administrativeAreaList.add(administrativeArea); } @Override public AdministrativeArea getAdministrativeArea() { if(administrativeAreaList != null && administrativeAreaList.size() > 0) { return administrativeAreaList.get(0); } else { return null; } } @Override public void setAdministrativeArea(AdministrativeArea administrativeArea) { if(administrativeAreaList == null) { administrativeAreaList = new ArrayList<>(); } if(administrativeAreaList.size() == 0) { administrativeAreaList.add(administrativeArea); } else { administrativeAreaList.set(0, administrativeArea); } } @Override public List<AdministrativeArea> getAdministrativeAreaList() { return administrativeAreaList; } @Override public void setAdministrativeAreaList(List<AdministrativeArea> administrativeAreaList) { this.administrativeAreaList = administrativeAreaList; } @Override public boolean hasAdministrativeArea() { return administrativeAreaList != null && administrativeAreaList.size() > 0 && administrativeAreaList.get(0) != null; } @Override public String getNativeValue() { return getString(); } @Override public String toString() { return SimpleJsonBuilder.toJson(this); } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
212a081031d669e455e8d31cd3f427823c222e9e
5bd4558eb9a3ed653f9ff220984e0940412c16da
/demo/src/main/java/hql/use_date_hql/Main.java
e0013d2ad2e1f9bb883b4d252b9da66771db8ce3
[]
no_license
anbarasupr/hibernate
baf6fc1cd014060cef286699cddb1b08a48eb03a
73230adddc7bfdc10d391baee1f0de255a11db6d
refs/heads/master
2020-05-28T07:23:31.229290
2020-04-20T09:48:45
2020-04-20T09:49:10
188,920,590
0
0
null
null
null
null
UTF-8
Java
false
false
722
java
package hql.use_date_hql; import java.text.SimpleDateFormat; import java.util.List; import entities.Invoice; public class Main { public static void main(String[] args) { InvoiceModel invoiceModel = new InvoiceModel(); List<Invoice> invoices = invoiceModel.findByDate(2017, 12, 8); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy"); for (Invoice invoice : invoices) { System.out.println("Id: " + invoice.getId()); System.out.println("Name: " + invoice.getName()); System.out.println("Date Created: " + simpleDateFormat.format(invoice.getDateCreated())); System.out.println("Payment: " + invoice.getPayment()); System.out.println("============================"); } } }
[ "anbarasu.2013@gmail.com" ]
anbarasu.2013@gmail.com
01c71402da2e81cea21d0d1ad36758cd071d083e
b27bfe9db8f0c7e5ca9377397b23ef2ef27d4ddc
/morozov/system/ffmpeg/converters/errors/WrongArgumentIsNotFFmpegSubtitleTextFormat.java
7a959d3069edf8139142e2d1b93dffe1783308be
[]
no_license
Morozov2012/actor-prolog-java-library
85fe97eb6a37709d742f4ab06b29d0718c7269c3
5a7e2011ac2152278b8ebae3dfb2da4d925619a3
refs/heads/master
2021-01-20T15:39:14.173431
2019-12-13T13:09:01
2019-12-13T13:09:01
7,780,078
5
3
null
null
null
null
UTF-8
Java
false
false
311
java
// (c) 2017 IRE RAS Alexei A. Morozov package morozov.system.ffmpeg.converters.errors; import morozov.terms.*; import morozov.terms.errors.*; public class WrongArgumentIsNotFFmpegSubtitleTextFormat extends WrongArgument { public WrongArgumentIsNotFFmpegSubtitleTextFormat(Term value) { super(value); } }
[ "AlexeiMorozov2006@rambler.ru" ]
AlexeiMorozov2006@rambler.ru
9ca376c2138ce9fc9824c29062e7dc8e2181932e
d68fffa02bf3a14189a3980c38fd017e20efd616
/src/test/java/org/assertj/core/internal/paths/Paths_assertStartsWith_Test.java
d80d308742a976906690d764a383a894c5f8851d
[ "Apache-2.0" ]
permissive
drumonii/assertj-core
a120268f553cb73ae006bf071bf06b5e7c29a59e
7b1a9d81b5c99967a3e06b2423a72b8cf84917a5
refs/heads/master
2021-01-13T04:34:23.231927
2017-01-16T00:17:10
2017-01-16T00:17:10
79,612,117
0
0
null
2017-01-21T00:22:55
2017-01-21T00:22:55
null
UTF-8
Java
false
false
3,364
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. * * Copyright 2012-2016 the original author or authors. */ package org.assertj.core.internal.paths; import static org.assertj.core.error.ShouldStartWithPath.shouldStartWith; import static org.assertj.core.test.TestFailures.wasExpectingAssertionError; import static org.assertj.core.util.FailureMessages.actualIsNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.io.IOException; import java.nio.file.Path; import org.assertj.core.api.exception.PathsException; import org.junit.Before; import org.junit.Test; public class Paths_assertStartsWith_Test extends MockPathsBaseTest { private Path canonicalActual; private Path canonicalOther; @Before public void init() { super.init(); canonicalActual = mock(Path.class); canonicalOther = mock(Path.class); } @Test public void should_fail_if_actual_is_null() { thrown.expectAssertionError(actualIsNull()); paths.assertStartsWith(info, null, other); } @Test public void should_fail_if_other_is_null() { thrown.expectNullPointerException("the expected start path should not be null"); paths.assertStartsWith(info, actual, null); } @Test public void should_throw_PathsException_if_actual_cannot_be_resolved() throws IOException { final IOException exception = new IOException(); when(actual.toRealPath()).thenThrow(exception); thrown.expectWithCause(PathsException.class, "failed to resolve actual real path", exception); paths.assertStartsWith(info, actual, other); } @Test public void should_throw_PathsException_if_other_cannot_be_resolved() throws IOException { final IOException exception = new IOException(); when(actual.toRealPath()).thenReturn(canonicalActual); when(other.toRealPath()).thenThrow(exception); thrown.expectWithCause(PathsException.class, "failed to resolve argument real path", exception); paths.assertStartsWith(info, actual, other); } @Test public void should_fail_if_actual_does_not_start_with_other() throws IOException { when(actual.toRealPath()).thenReturn(canonicalActual); when(other.toRealPath()).thenReturn(canonicalOther); // This is the default, but let's make this explicit when(canonicalActual.startsWith(canonicalOther)).thenReturn(false); try { paths.assertStartsWith(info, actual, other); wasExpectingAssertionError(); } catch (AssertionError e) { verify(failures).failure(info, shouldStartWith(actual, other)); } } @Test public void should_succeed_if_actual_starts_with_other() throws IOException { when(actual.toRealPath()).thenReturn(canonicalActual); when(other.toRealPath()).thenReturn(canonicalOther); when(canonicalActual.startsWith(canonicalOther)).thenReturn(true); paths.assertStartsWith(info, actual, other); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
c4594dc4fa5407dbb990102830b2a6b39a033d0d
e60317495de8a9be2d2aab1f58604e9c64a99de8
/JpaAula5/src/br/edu/unitri/testador/ConsultaGFX.java
6fba2ed23d91e835d7ee4482b41b813b5df56768
[]
no_license
marcosfba/JAVA
4a6803cb0be5305ff8b0614bdff11da63afbf479
0924dca56739c261c5106a142d99d2805027f0b6
refs/heads/master
2021-01-10T07:54:32.491292
2015-08-03T11:19:39
2015-08-03T11:19:39
36,016,878
0
1
null
null
null
null
ISO-8859-1
Java
false
false
2,811
java
/** * */ package br.edu.unitri.testador; import java.net.URL; import java.sql.SQLException; import java.util.ResourceBundle; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.RadioButton; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TableView; import javafx.scene.control.TextField; import javafx.scene.control.ToggleGroup; import br.edu.unitri.DTO.Consultas.ConsultaLetraG; import br.edu.unitri.controler.ExerciciosControler; import br.edu.unitri.testador.FXDialog.Type; import br.edu.unitri.util.GenericTable; /** * @author marcos.fernando * */ public class ConsultaGFX implements Initializable { private ObservableList<ConsultaLetraG> dados = FXCollections.observableArrayList(); private ExerciciosControler exerciciosCtr = new ExerciciosControler(); @FXML private Tab tabConsulta; @FXML private TableView<ConsultaLetraG> tbDados; @FXML private RadioButton rbDescricao; @FXML private RadioButton rbProjeto; @FXML private ToggleGroup buscarPor; @FXML private TextField txtBuscar; @FXML private TabPane tabTela; @FXML private Button btnBuscar; @FXML void btnBuscarClick(ActionEvent event) throws SQLException { if (isValidConsulta()) { String qry = "select d.descLocal, p.numProjeto from tbProjeto p join tbDepartamento d on d.idDepartamento = p.departamento_id"; String where =""; if (rbProjeto.isSelected()) { where = " where d.descLocal like '%"+ txtBuscar.getText() + "%'"; } if (rbDescricao.isSelected()) { where = " where p.numProjeto like '%"+ txtBuscar.getText() + "%'"; } tbDados.getItems().clear(); dados.addAll(exerciciosCtr.findLetraG(qry,where)); tbDados.setItems(dados); } else { new FXDialog(Type.WARNING, "Escolha pelo menos uma das opções para consulta!").showDialog(); popularDados(); txtBuscar.requestFocus(); } } private boolean isValidConsulta() { boolean ok = rbProjeto.isSelected() || rbDescricao.isSelected(); if (ok) { ok = !txtBuscar.getText().isEmpty(); } return ok; } private void popularDados() { tbDados.getItems().clear(); dados.clear(); try { dados.addAll(exerciciosCtr.findLetraG()); } catch (SQLException e) { new FXDialog(Type.ERROR, e.getCause().getMessage()).showDialog(); } tbDados.setItems(dados); } @Override public void initialize(URL location, ResourceBundle resources) { tbDados.getColumns().addAll(new GenericTable<ConsultaLetraG>().tableColunas(ConsultaLetraG.class)); popularDados(); } }
[ "marcosfba.algar@gmail.com" ]
marcosfba.algar@gmail.com
865407df0a49df25bc0d12a49f3041290ff0a1e6
4e9c5e37a4380d5a11a27781187918a6aa31f3f9
/dse-db-all-6.7.0/org/apache/cassandra/auth/AuthCacheMBean.java
5909d5f263a8dba3343e6448e385b6c051ae9710
[]
no_license
jiafu1115/dse67
4a49b9a0d7521000e3c1955eaf0911929bc90d54
62c24079dd5148e952a6ff16bc1161952c222f9b
refs/heads/master
2021-10-11T15:38:54.185842
2019-01-28T01:28:06
2019-01-28T01:28:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package org.apache.cassandra.auth; import java.util.Map; public interface AuthCacheMBean { void invalidate(); void invalidateAll(); void setValidity(int var1); int getValidity(); void setUpdateInterval(int var1); int getUpdateInterval(); void setMaxEntries(int var1); int getMaxEntries(); void setInitialCapacity(int var1); int getInitialCapacity(); Map<String, Number> getCacheStats(); }
[ "superhackerzhang@sina.com" ]
superhackerzhang@sina.com
91b61c7ecbe9698ce8fd280a6703fc05a21f84ee
3d0cbc81cfa7e484cf14662b003508f52f1d2b08
/translator-web-meta/translator-web-app/src/main/java/com/github/bogdanovmn/translator/web/app/cloud/CloudController.java
181da73fc121fea69f3d529947ef7b485a13a1fc
[ "BSD-2-Clause" ]
permissive
bogdanovmn/translator
94a578aef866ee2ec48235dfb5c359296c0ff6ce
e9af02bd5768fcf51cf69e07ed11c1e5529f24c7
refs/heads/master
2022-10-06T04:51:13.376678
2022-10-03T23:11:14
2022-10-03T23:11:14
103,356,487
0
0
null
null
null
null
UTF-8
Java
false
false
3,550
java
package com.github.bogdanovmn.translator.web.app.cloud; import com.github.bogdanovmn.common.spring.menu.MenuItem; import com.github.bogdanovmn.common.spring.mvc.ViewTemplate; import com.github.bogdanovmn.translator.web.app.infrastructure.AbstractVisualController; import com.github.bogdanovmn.translator.web.app.infrastructure.menu.MainMenuItem; import com.github.bogdanovmn.translator.web.app.source.SourcesService; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import java.util.HashMap; @Controller @RequestMapping("/cloud") class CloudController extends AbstractVisualController { private final CloudService cloudService; private final SourcesService sourcesService; CloudController(final CloudService cloudService, SourcesService sourcesService) { this.cloudService = cloudService; this.sourcesService = sourcesService; } @Override protected MenuItem currentMenuItem() { return MainMenuItem.CLOUD; } @GetMapping ModelAndView all( @RequestParam(required = false, defaultValue = "false", name = "all") Boolean showAll, @RequestParam(required = false, defaultValue = "true", name = "unknown") Boolean showUnknown, @RequestParam(required = false, defaultValue = "false", name = "remembered") Boolean showRemembered ) { CloudContentFilter filter = new CloudContentFilter( "/cloud", new HashMap<CloudContentFilterToggle, Boolean>() {{ put(CloudContentFilterToggle.ALL, showAll); put(CloudContentFilterToggle.UNKNOWN, showUnknown); put(CloudContentFilterToggle.REMEMBERED, showRemembered); }} ); return new ViewTemplate("cloud") .with("words", cloudService.allWords(filter, getUser())) .with("filter", filter) .modelAndView(); } @GetMapping("/sources/{sourceId}") ModelAndView bySource( @PathVariable Integer sourceId, @RequestParam(required = false, defaultValue = "false", name = "all") Boolean showAll, @RequestParam(required = false, defaultValue = "true", name = "unknown") Boolean showUnknown, @RequestParam(required = false, defaultValue = "false", name = "remembered") Boolean showRemembered ) { CloudContentFilter filter = new CloudContentFilter( "/cloud/sources/" + sourceId, new HashMap<CloudContentFilterToggle, Boolean>() {{ put(CloudContentFilterToggle.ALL, showAll); put(CloudContentFilterToggle.UNKNOWN, showUnknown); put(CloudContentFilterToggle.REMEMBERED, showRemembered); }} ); return new ViewTemplate("cloud") .with("words", cloudService.sourceWords(sourceId, filter, getUser())) .with("filter", filter) .with("source", sourcesService.get(sourceId)) .modelAndView(); } @GetMapping("/sources/{sourceId}/proper-names") ModelAndView properNamesBySource(@PathVariable Integer sourceId) { CloudContentFilter filter = new CloudContentFilter( "/cloud/sources/" + sourceId, new HashMap<CloudContentFilterToggle, Boolean>() {{ put(CloudContentFilterToggle.ALL, false); put(CloudContentFilterToggle.UNKNOWN, false); put(CloudContentFilterToggle.REMEMBERED, false); }} ); return new ViewTemplate("cloud") .with("words", cloudService.sourceProperNames(sourceId)) .with("filter", filter) .with("source", sourcesService.get(sourceId)) .with("properNames", true) .modelAndView(); } }
[ "bogdanovmn@gmail.com" ]
bogdanovmn@gmail.com
679058767e710d5d9dfd50fdbc1bd6e964b601fb
e947cf88ce73c8d0db01d170539e989f631728f3
/framework.script/src/plazma/ast/NotEqualsNode.java
17ca3cf9b18df307573b081e657c08894fd769b6
[]
no_license
codeclimate-testing/java-plazma
8537f572229253c6a28f0bc58b32d8ad619b9929
d2f343564cd59882e43b1a1efede7a3b403e2bdb
refs/heads/master
2021-01-21T05:36:14.105653
2017-09-05T21:38:32
2017-09-05T21:38:32
101,927,837
0
1
null
2017-10-19T13:15:00
2017-08-30T20:53:58
Java
UTF-8
Java
false
false
519
java
package plazma.ast; import plazma.lang.LValue; public class NotEqualsNode implements LNode { private LNode lhs; private LNode rhs; public NotEqualsNode(LNode lhs, LNode rhs) { this.lhs = lhs; this.rhs = rhs; } @Override public LValue evaluate() { LValue a = lhs.evaluate(); LValue b = rhs.evaluate(); return new LValue(!a.equals(b)); } @Override public String toString() { return String.format("(%s != %s)", lhs, rhs); } }
[ "abaldwinhunter@codeclimate.com" ]
abaldwinhunter@codeclimate.com
d571a46ceead39d92e23e64ed98c0236ec7486b4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/26/org/apache/commons/math3/distribution/UniformRealDistribution_sample_211.java
61168fa3d824b753cd26e4a48b8fec69a587d70c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
531
java
org apach common math3 distribut implement uniform real distribut href http wikipedia org wiki uniform distribut continu uniform distribut continu wikipedia version uniform real distribut uniformrealdistribut abstract real distribut abstractrealdistribut inherit doc inheritdoc overrid sampl random doubl nextdoubl upper lower
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
6204ecadd3c00c4aa337f06620234393cea94118
cc34f825cd272064fe282cfcad97c856cdf34627
/src/main/java/com/example/dao/DeleteAllStatement.java
167069d67639a09e68252d0e0b5f9cd8c8c3d9f7
[]
no_license
didrlgus/toby-spring
3a579a53e5c4f5cec461f7cadb89d0bb999746b3
282bdd53e6254283dd37428a96bc2b2ea4edfdca
refs/heads/master
2023-08-10T19:08:54.877126
2021-09-20T12:33:50
2021-09-20T12:33:50
404,960,022
0
0
null
2021-09-20T12:33:51
2021-09-10T04:52:34
Java
UTF-8
Java
false
false
350
java
package com.example.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; public class DeleteAllStatement implements StatementStrategy { @Override public PreparedStatement makePreparedStatement(Connection c) throws SQLException { return c.prepareStatement("delete from users"); } }
[ "rlgusdid@naver.com" ]
rlgusdid@naver.com
ba301e65bb829553b304c48b86e41447b3dd8851
c10792907346756ab025f4586b6f34a40568df5c
/andengine/src/main/java/org/andengine/opengl/util/criteria/StringGLCriteria.java
916241d59b52d9b8881a17c3b1334b5fcff9fe3e
[ "Apache-2.0" ]
permissive
triplesky/AndEngineExample
1753f5f663e2e2a3532f8f5960c3f8c3258309a1
c4478e45f6554faf415af23c38961961f4c0950f
refs/heads/master
2023-03-15T14:27:18.853722
2020-10-25T01:44:38
2020-10-25T01:44:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
793
java
package org.andengine.opengl.util.criteria; import org.andengine.opengl.util.GLState; import org.andengine.util.adt.data.operator.StringOperator; /** * (c) Zynga 2011 * * @author Nicolas Gramlich <ngramlich@zynga.com> * @since 16:59:32 - 10.10.2011 */ public abstract class StringGLCriteria implements IGLCriteria { private final String mCriteria; private final StringOperator mStringOperator; public StringGLCriteria(final StringOperator pStringOperator, final String pCriteria) { this.mCriteria = pCriteria; this.mStringOperator = pStringOperator; } protected abstract String getActualCriteria(final GLState pGLState); @Override public boolean isMet(final GLState pGLState) { return this.mStringOperator.check(this.getActualCriteria(pGLState), this.mCriteria); } }
[ "731620591@qq.com" ]
731620591@qq.com
41779dc9c45c3cc6d55bb8e2345c603dcb4aa3f9
0e13da505af96d79a1f76d235aeaaa42800d93f8
/src/main/java/com/youzan/open/sdk/gen/v3_0_0/model/YouzanMeiCardCustomerListParams.java
4cd8610bce42fb10afbf86c73a431b9fd3a3565a
[]
no_license
giagiigi/youzan-sdk
430462c65463cd3efcb94cf81efc8a26fc81fa43
96e0695dbe86f1e885ca2d215552bf0fa43b90f0
refs/heads/master
2022-01-04T22:26:03.823201
2019-03-25T07:13:19
2019-03-25T07:13:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,906
java
package com.youzan.open.sdk.gen.v3_0_0.model; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.youzan.open.sdk.api.APIParams; import com.youzan.open.sdk.model.ByteWrapper; import com.youzan.open.sdk.api.FileParams; import java.util.List; import java.util.Map; import java.util.Date; public class YouzanMeiCardCustomerListParams implements APIParams, FileParams { /** * 美业token */ private String mToken; /** * 页数 */ private Long page; /** * 每页显示的数量 */ private Long pageSize; /** * 会员id */ private Long yzUid; public void setMToken(String mToken) { this.mToken = mToken; } public String getMToken() { return this.mToken; } public void setPage(Long page) { this.page = page; } public Long getPage() { return this.page; } public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public Long getPageSize() { return this.pageSize; } public void setYzUid(Long yzUid) { this.yzUid = yzUid; } public Long getYzUid() { return this.yzUid; } public Map<String, Object> toParams() { Map<String, Object> params = Maps.newHashMap(); if (mToken != null) { params.put("m_token", mToken); } if (page != null) { params.put("page", page); } if (pageSize != null) { params.put("page_size", pageSize); } if (yzUid != null) { params.put("yz_uid", yzUid); } return params; } public Multimap<String, ByteWrapper> toFileParams() { Multimap<String, ByteWrapper> params = ArrayListMultimap.create(); return params; } }
[ "flyingkeke@qq.com" ]
flyingkeke@qq.com
549cbd944a72f0179b2925125415cd39cc6c9b89
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-alert/cdn-b2b-integrate/src/main/java/com/aspire/cdn/esdatawrap/biz/client/IMetricAlertIntegrateClient.java
3e838d29fe3abedb7a761028e6f7cfbaf628fd54
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package com.aspire.cdn.esdatawrap.biz.client; import java.util.List; import com.aspire.cdn.esdatawrap.biz.metricalert.MetricAlert; import feign.Headers; import feign.RequestLine; /** * * 项目名称: cdn-ott-integrate * <p/> * * 类名: IMetricAlertIntegrateClient * <p/> * * 类功能描述: TODO * <p/> * * @author pengguihua * * @date 2020年7月11日 * * @version V1.0 * <br/> * * <b>Copyright(c)</b> 2020 卓望公司-版权所有 * */ public interface IMetricAlertIntegrateClient { public static final String H_CONTENT_TYPE = "Content-Type: application/json;charset=UTF-8"; public static final String H_ACCEPT = "Accept: application/json;charset=UTF-8"; @Headers({H_CONTENT_TYPE}) @RequestLine("POST /esdatawrap/metricAlert/pushMetricAlert") public void pushMetricAlert(MetricAlert metricAlert); @Headers({H_CONTENT_TYPE}) @RequestLine("POST /esdatawrap/metricAlert/pushMetricAlertBatch") public void pushMetricAlertBatch(List<MetricAlert> metricAlertList); }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
3de8707aa6760294bf672c7966390748614db00d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_74e36f51cfff2c767b08ce3a342507c02ebb450b/MockitoProxy/5_74e36f51cfff2c767b08ce3a342507c02ebb450b_MockitoProxy_t.java
d688df6ee318029057ba15864e171e49326eb108
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,316
java
package org.kalibro.tests; import static org.junit.Assert.assertTrue; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import org.hamcrest.Matcher; import org.kalibro.core.abstractentity.AbstractEntity; import org.mockito.ArgumentMatcher; import org.mockito.Matchers; import org.mockito.Mockito; import org.mockito.verification.VerificationMode; import org.powermock.api.mockito.PowerMockito; public abstract class MockitoProxy extends PowerMockito { public static <T> T mockAbstract(Class<T> type) throws Exception { T mock = mock(type, Mockito.CALLS_REAL_METHODS); shouldHavePublicDefaultConstructor(mock); return mock; } private static <T> void shouldHavePublicDefaultConstructor(T mock) throws Exception { Constructor<?> constructor = mock.getClass().getConstructor(); assertTrue(Modifier.isPublic(constructor.getModifiers())); constructor.newInstance(); } public static <T> T verify(T mock) { return Mockito.verify(mock); } public static <T> T verify(T mock, VerificationMode mode) { return Mockito.verify(mock, mode); } public static VerificationMode never() { return Mockito.never(); } public static VerificationMode once() { return Mockito.times(1); } public static VerificationMode times(int times) { return Mockito.times(times); } public static <T> T any() { return Matchers.any(); } public static String anyString() { return Matchers.anyString(); } public static long anyLong() { return Matchers.anyLong(); } public static <T> T any(Class<T> type) { return Matchers.any(type); } public static <T> T anyVararg() { return Matchers.anyVararg(); } public static <T> T isA(Class<T> type) { return Matchers.isA(type); } public static <T> T eq(T expected) { return Matchers.eq(expected); } public static <T> T same(T expected) { return Matchers.same(expected); } public static <T extends AbstractEntity<? super T>> T deepEq(final T expected) { return Matchers.argThat(new ArgumentMatcher<T>() { @Override public boolean matches(Object argument) { return expected.deepEquals(argument); } }); } public static <T> T argThat(Matcher<T> matcher) { return Matchers.argThat(matcher); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
176d1cc5272f99c3d606eb759efec09d611f2111
2d212ec3d9739d629f701f95d9bdfb0f5da1602f
/1.utils/core/src/main/java/com/octopus/utils/alone/impl/MappingInfo.java
a81ad1dd1cd84567cff75e186dc427f428b9aab8
[ "Apache-2.0" ]
permissive
pacoolin/octopus
a42bdfb551df2b567760c4cf2e3a23dcb70942ec
5439561133af00de089d6d30b3527542a434057f
refs/heads/master
2023-05-11T08:26:02.210724
2021-05-05T02:14:02
2021-05-05T02:14:02
281,041,828
0
0
Apache-2.0
2020-07-20T07:10:12
2020-07-20T07:10:11
null
UTF-8
Java
false
false
1,439
java
package com.octopus.utils.alone.impl; import java.util.*; /** * User: Administrator * Date: 15-1-12 * Time: 下午7:20 */ public class MappingInfo { //映射关系 key为目标对象路径,vlaue为原对象路径 public Map<String,String> pathMapping = new HashMap<String,String>(); //目标结构对象 List<StructInfo> targetStruct = new ArrayList(); public List<StructInfo> getTargetStruct() { return targetStruct; } public Map<String, String> getPathMapping() { return pathMapping; } public void setPathMapping(Map<String, String> pathMapping) { this.pathMapping = sortMapping(pathMapping); } //按长度从长到短排序 static Map<String,String> sortMapping(Map<String,String> map){ List<Map.Entry<String,String>> mappingList = null; mappingList = new ArrayList<Map.Entry<String,String>>(map.entrySet()); Collections.sort(mappingList, new Comparator<Map.Entry<String, String>>() { public int compare(Map.Entry<String, String> mapping1, Map.Entry<String, String> mapping2) { return mapping1.getValue().split("\\.").length > mapping2.getValue().split("\\.").length ? 0 : 1; } }); LinkedHashMap ret = new LinkedHashMap(); for(Map.Entry<String,String> entry:mappingList){ ret.put(entry.getKey(),entry.getValue()); } return ret; } }
[ "kodw38@126.com" ]
kodw38@126.com
16c57d8c487bf54b5f5ad605ef20ae36d908ecc3
2ab68fc54c230aaa4f35c738b7c3c56ad789157c
/src/test/java/no/nith/pg6100/PersonTest.java
810907516d566dbf4ea1c048591cf665cb16a7bd
[]
no_license
theneva/prosjekt-uke1
21b035ccac98ea6091d43cf20e42c2f20230eae7
e72298d4ce0b5d749db40ed84036ed16b1755420
refs/heads/master
2021-01-17T11:43:03.744645
2014-01-20T00:06:12
2014-01-20T00:06:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package no.nith.pg6100; import org.junit.After; import org.junit.Before; import org.junit.Test; import javax.persistence.EntityManager; public class PersonTest{ private EntityManager em; @Before public void beforeEach(){ //TODO em = null; } @After public void afterEach(){ em.close(); } @Test public void testLagring(){ } }
[ "naimdjon@gmail.com" ]
naimdjon@gmail.com
d189f67de8cdf73db6bdf2f6dddb6872750439d6
930b91635faf90bb3881d41e00ca1424231e981b
/06/src/HashSetDemo.java
0826d09403e217593ec08eade8b77f2ebbc0f0d6
[]
no_license
marekUniba/Java2020
7c3f3aa3f470a7d82adcd3b009f1fc66db99302c
90c972b70b43e267a629c1257f814b31c973b731
refs/heads/master
2022-07-04T00:08:09.514462
2020-05-13T07:29:49
2020-05-13T07:29:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,150
java
import java.util.*; public class HashSetDemo { public static void main(String[] args) { { //Set<String> s = new HashSet<String>(); // >= Java 1.5, zaviedla generics //Set<String> s = new HashSet<>(); // >= Java 1.7, zaviedla diamond operator <> Set<String> s = new HashSet<>(); // specialitka IntelliJ Set<String> s1 = new HashSet<>(); for (String a : args) if (!s.add(a)) // nepodarilo sa prida System.out.println("opakuje sa: " + a); System.out.println(s.size() + " rozne: " + s); Object[] poleObj = s.toArray(); for(Object o:poleObj) System.out.print(o); String[] poleStr = s.toArray(new String[0]); for(String str:poleStr) System.out.print(str); } { Set<Integer> s = new HashSet<>(); s.add(1); s.add(2); s.add(3); } { var q = Set.of(true, false); // Set<Set<Integer>> powerSet matematicky {{},{0},{1},{0,1}} var powerSet = Set.of( Set.of(), Set.of(0), Set.of(1), Set.of(0,1) ); var a = 0; var pole = new String[10]; var list = new ArrayList<String>(); var map = new HashMap<String, String>(); } } }
[ "peter.borovansky@microstep-mis.com" ]
peter.borovansky@microstep-mis.com
fb993988f988d040ea768ede2e689d425b92ab27
3794bfd61e68f710edff855f11abdc0a3f596440
/src/main/java/com/zah/app/util/spider/gif/BQDGifSpider.java
6ed41184ba39c735924610994fd619fd486e3479
[]
no_license
zah5897/gif_app
40cd8891e2b80886cbb9fba9447f902ce7e734f5
bbdc7db43688041dac0a85a500a2f11d0ab660d4
refs/heads/master
2022-10-14T15:34:17.370883
2019-08-07T02:42:52
2019-08-07T02:42:52
200,959,042
0
0
null
2022-09-01T23:11:11
2019-08-07T02:42:39
CSS
UTF-8
Java
false
false
3,298
java
package com.zah.app.util.spider.gif; import com.zah.app.SpringUtil; import com.zah.app.model.GifModel; import com.zah.app.model.type.ChannelType; import com.zah.app.push.PushUtil; import com.zah.app.service.GifService; import com.zah.app.util.TextUtils; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.IOException; import java.util.Collections; /** * Created by zah on 2017/7/19. */ public class BQDGifSpider extends BaseImgSpider { String url = "https://qq.yh31.com/ka/zr/"; boolean spidering = false; private final static int MAX_SPIDER_COUNT_EVERYDAY = 30; @Override public synchronized void start() { super.start(); if (spidering) { return; } spidering = true; String encode = "utf8"; // String encode = "GBK"; try { System.out.println(BQDGifSpider.class.getName() + " start work!"); Document doc = getDoc(url, encode); // Document doc = getDocScroll(url, encode); if (doc != null) { prase(doc); } } catch (Exception e) { e.printStackTrace(); System.out.println("当前URL=" + url); PushUtil.sendAndroidCustomizedcast(this.getClass().getName(), e.getMessage(), url); } spidering = false; } private void prase(Document doc) throws IOException { Elements elements = doc.select("div.p_class_llst"); if (elements.size() > 0) { Elements lis = elements.select("dl>li"); Collections.reverse(lis); for (Element e : lis) { Elements imgs = e.select("dt>a>img"); if (imgs.size() == 1) { String title = imgs.get(0).attr("alt"); String src = imgs.get(0).attr("src"); if (!src.startsWith("http")) { src = "https://qq.yh31.com" + src; } GifModel gifModel = new GifModel(); gifModel.setChannel(ChannelType.Funny.ordinal()); gifModel.setImg_url(src); gifModel.setDescription(title); if (TextUtils.isEmpty(gifModel.getImg_url()) || TextUtils.isEmpty(gifModel.getDescription())) { throw new RuntimeException("imgmodel content is error url=" + url); } String subFix = src.substring(src.lastIndexOf(".") + 1); if (subFix.equalsIgnoreCase("GIF")) { String nameFixStart = src.substring(0, src.lastIndexOf("/") + 1); String nameFixEnd = src.substring(src.lastIndexOf("/") + 1); if (nameFixEnd.contains("_1")) { nameFixEnd = nameFixEnd.replace("_1", ""); } gifModel.setImg_url(nameFixStart + nameFixEnd); boolean result = SpringUtil.getBean(GifService.class).save(gifModel); } } //-------end for } } } public static void main(String[] args) { new BQDGifSpider().start(); } }
[ "123456" ]
123456
15e122917bc892a24beddfda84543374634737bb
0d16dcd9b4c721c361f9a85c7005d63770af0e64
/src/main/java/com/glowbyteconsulting/resumebank/domain/University.java
d680462df5bcd2d86020870e4abb18caa423f50d
[]
no_license
YuryKutlunin/gbc-resume-bank
f7579efec6dcffad2a2ee46219b65e2b493a0f9c
9998986031be67c3d0cba8b38bf537eeaa24ff8c
refs/heads/master
2023-01-08T16:01:07.570361
2020-11-06T11:54:54
2020-11-06T11:54:54
310,515,919
0
0
null
2020-11-06T11:55:25
2020-11-06T06:52:04
TypeScript
UTF-8
Java
false
false
2,933
java
package com.glowbyteconsulting.resumebank.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; /** * A University. */ @Entity @Table(name = "university") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class University implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @Column(name = "id_univer") private Long idUniver; @Column(name = "univer_nm") private String univerNm; @OneToMany(mappedBy = "idUniver") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) private Set<Education> idUnivers = new HashSet<>(); // jhipster-needle-entity-add-field - JHipster will add fields here public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getIdUniver() { return idUniver; } public University idUniver(Long idUniver) { this.idUniver = idUniver; return this; } public void setIdUniver(Long idUniver) { this.idUniver = idUniver; } public String getUniverNm() { return univerNm; } public University univerNm(String univerNm) { this.univerNm = univerNm; return this; } public void setUniverNm(String univerNm) { this.univerNm = univerNm; } public Set<Education> getIdUnivers() { return idUnivers; } public University idUnivers(Set<Education> educations) { this.idUnivers = educations; return this; } public University addIdUniver(Education education) { this.idUnivers.add(education); education.setIdUniver(this); return this; } public University removeIdUniver(Education education) { this.idUnivers.remove(education); education.setIdUniver(null); return this; } public void setIdUnivers(Set<Education> educations) { this.idUnivers = educations; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof University)) { return false; } return id != null && id.equals(((University) o).id); } @Override public int hashCode() { return 31; } // prettier-ignore @Override public String toString() { return "University{" + "id=" + getId() + ", idUniver=" + getIdUniver() + ", univerNm='" + getUniverNm() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
24988bc98b742743738b8774e46b1c2d463290d7
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/game/luggage/b.java
2e644c86b2e208e5e5ad1b2a1673165f04cbcc7a
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
2,215
java
package com.tencent.mm.plugin.game.luggage; import android.os.Parcelable; import android.webkit.ValueCallback; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ipcinvoker.d; import com.tencent.mm.ipcinvoker.f; import com.tencent.mm.ipcinvoker.j; import com.tencent.mm.ipcinvoker.wx_extension.service.ToolsMpProcessIPCService; import com.tencent.mm.ipcinvoker.wx_extension.service.ToolsProcessIPCService; import com.tencent.mm.kernel.h; import com.tencent.mm.plugin.brandservice.api.c; import com.tencent.mm.sdk.platformtools.WeChatHosts; import com.tencent.xweb.ao; public final class b { public static <T extends d<InputType, ResultType>, InputType extends Parcelable, ResultType extends Parcelable> boolean b(InputType paramInputType, Class<T> paramClass, f<ResultType> paramf) { AppMethodBeat.i(82981); int i; if ((ao.bHC(WeChatHosts.domainString(j.f.host_game_weixin_qq_com))) && (!ToolsProcessIPCService.aYM())) { i = 1; if (i == 0) { break label70; } } label70: for (String str = ToolsMpProcessIPCService.PROCESS_NAME;; str = ToolsProcessIPCService.PROCESS_NAME) { boolean bool = j.a(str, paramInputType, paramClass, paramf); AppMethodBeat.o(82981); return bool; i = 0; break; } } public static boolean fEl() { AppMethodBeat.i(276945); if ((com.tencent.mm.plugin.game.commlib.e.b.aFM("com.tencent.mm.plugin.game.ui.chat_tab.GameChatTabUI")) || (com.tencent.mm.plugin.game.commlib.e.b.aFM("com.tencent.mm.plugin.game.ui.chat_tab.GameWebTabUI")) || (com.tencent.mm.plugin.game.commlib.e.b.aFM("com.tencent.mm.plugin.game.ui.chat_tab.ChatRoomTabUI"))) { AppMethodBeat.o(276945); return true; } AppMethodBeat.o(276945); return false; } public static boolean fEm() { AppMethodBeat.i(276947); boolean bool = ((c)h.ax(c.class)).dbD(); AppMethodBeat.o(276947); return bool; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.game.luggage.b * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5e9a70978e6b7682076f69ec109f1cbdc1cd6148
cf729a7079373dc301d83d6b15e2451c1f105a77
/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201506/cm/RequestErrorReason.java
6c251f6b24a43df54606ea110e81f192ba146a98
[]
no_license
cvsogor/Google-AdWords
044a5627835b92c6535f807ea1eba60c398e5c38
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
refs/heads/master
2023-03-23T05:49:33.827251
2021-03-17T14:35:13
2021-03-17T14:35:13
348,719,387
0
0
null
null
null
null
UTF-8
Java
false
false
3,010
java
/** * RequestErrorReason.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.adwords.axis.v201506.cm; public class RequestErrorReason implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected RequestErrorReason(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _UNKNOWN = "UNKNOWN"; public static final java.lang.String _INVALID_INPUT = "INVALID_INPUT"; public static final java.lang.String _UNSUPPORTED_VERSION = "UNSUPPORTED_VERSION"; public static final RequestErrorReason UNKNOWN = new RequestErrorReason(_UNKNOWN); public static final RequestErrorReason INVALID_INPUT = new RequestErrorReason(_INVALID_INPUT); public static final RequestErrorReason UNSUPPORTED_VERSION = new RequestErrorReason(_UNSUPPORTED_VERSION); public java.lang.String getValue() { return _value_;} public static RequestErrorReason fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { RequestErrorReason enumeration = (RequestErrorReason) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static RequestErrorReason 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(RequestErrorReason.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201506", "RequestError.Reason")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "vacuum13@gmail.com" ]
vacuum13@gmail.com
ca3a17bcf6e5dd416f56b139c7a51fc0da1d4803
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ps/pbs/send/dao/PSSend1601DAO.java
45d7f06d77f3725e0f1fc0bb4a2622e966ce6369
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,008
java
/*********************************************** * 함수명 : PSSend1601DAO.java * 처리개요 : 발송-추가발송처리 등록, 조회, 수정 * 작성일자 : 2004-03-10 * 작성자 : 장수환 *********************************************** */ package chosun.ciis.ps.pbs.send.dao; import somo.framework.db.*; import somo.framework.expt.*; import chosun.ciis.ps.pbs.send.dm.*; import chosun.ciis.ps.pbs.send.dao.*; import chosun.ciis.ps.pbs.send.ds.*; /** * 발송-추가발송처리 처리프로그램의 등록, 조회, 수정의 업무로직을 프로시저를 호출하여 처리한다. */ public class PSSend1601DAO { /** * 추가발송처리 코드관리 초기 Combo Box설정 * @param dm PS_S_SEND_LUMP_PROCDM * @return PS_S_SEND_LUMP_PROCDataSet * @throws AppException */ public PS_S_SEND_LUMP_PROCDataSet selectCombolist(PS_S_SEND_LUMP_PROCDM dm) throws AppException { DBManager manager = new DBManager("Oracle"); PS_S_SEND_LUMP_PROCDataSet ds = (PS_S_SEND_LUMP_PROCDataSet) manager.executeCall(dm); if (!"".equals(ds.errcode)) { throw new AppException(ds.errcode, ds.errmsg); } return ds; } /** * 추가발송처리 리스트 조회 * @param dm PS_L_SEND_ADDM_PROCDM * @return PS_L_SEND_ADDM_PROCDataSet * @throws AppException */ public PS_L_SEND_ADDM_PROCDataSet selectList(PS_L_SEND_ADDM_PROCDM dm) throws AppException { DBManager manager = new DBManager("Oracle"); PS_L_SEND_ADDM_PROCDataSet ds = (PS_L_SEND_ADDM_PROCDataSet) manager.executeCall(dm); if (!"".equals(ds.errcode)) { throw new AppException(ds.errcode, ds.errmsg); } return ds; } /** * 추가발송처리 발송방법별 상세조회 * @param dm PS_L_SEND_ADDM_PROC_DTLSDM * @return PS_L_SEND_ADDM_PROC_DTLSDataSet * @throws AppException */ public PS_L_SEND_ADDM_PROC_DTLSDataSet selectMthdList(PS_L_SEND_ADDM_PROC_DTLSDM dm) throws AppException { DBManager manager = new DBManager("Oracle"); PS_L_SEND_ADDM_PROC_DTLSDataSet ds = (PS_L_SEND_ADDM_PROC_DTLSDataSet) manager.executeCall(dm); if (!"".equals(ds.errcode)) { throw new AppException(ds.errcode, ds.errmsg); } return ds; } /** * 추가발송처리 발송방법별 엑셀 * @param dm PS_P_SEND_ADDM_STICKERDM * @return PS_P_SEND_ADDM_STICKERDataSet * @throws AppException */ public PS_P_SEND_ADDM_STICKERDataSet printAddmSticker(PS_P_SEND_ADDM_STICKERDM dm) throws AppException { DBManager manager = new DBManager("Oracle"); PS_P_SEND_ADDM_STICKERDataSet ds = (PS_P_SEND_ADDM_STICKERDataSet) manager.executeCall(dm); if (!"".equals(ds.errcode)) { throw new AppException(ds.errcode, ds.errmsg); } return ds; } }
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
f4ed69fd0c620335dd66dcfc6ee7ab06e4331447
de2626d7ac52eae413f823464678f1d3807180ad
/org.jrebirth/core/src/main/java/org/jrebirth/core/ui/package-info.java
f24a10f464db7689ccbed0d117c60bbc01b0af37
[ "Apache-2.0" ]
permissive
cherry-wb/JRebirth
b54d123ea44d35f8aa9f764d7635d63da2aa4c50
61886f0c28bc0293a7a5714f13f11a5a2bd8ebc6
refs/heads/master
2020-12-11T08:09:21.664156
2013-11-02T09:50:18
2013-11-02T09:50:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
/** * Provides base classes for JRebirth UI layer. * * Each component which want to work like a UI must used 2 or 3 classes that inherit from classes (or interfaces) of this package. */ package org.jrebirth.core.ui;
[ "sebastien.bordes@jrebirth.org" ]
sebastien.bordes@jrebirth.org
776afa28321337c64ae9c10108bb0619c77edcff
a5378714c6a43e205ba97393db13d367124c6d10
/src/main/java/net/daporkchop/fp2/util/registry/ImmutableOrderedRegistry.java
20702d4babd6abea920860b9fe2fe458de5d2881
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
LakMoore/FarPlaneTwo
59e9b530e8ba857262739dc420dcaf0d7e062d58
c0b5b003434ff68f9022d24522e407f9c44f809e
refs/heads/master
2023-07-04T11:50:20.405350
2021-08-05T10:07:31
2021-08-05T10:07:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,995
java
/* * Adapted from The MIT License (MIT) * * Copyright (c) 2020-2021 DaPorkchop_ * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software * is furnished to do so, subject to the following conditions: * * Any persons and/or organizations using this software must include the above copyright notice and this permission notice, * provide sufficient credit to the original authors of the project (IE: DaPorkchop_), as well as provide a link to the original project. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ package net.daporkchop.fp2.util.registry; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; import lombok.NonNull; import java.util.Iterator; import java.util.Map; import java.util.function.BiConsumer; import java.util.stream.Stream; import static net.daporkchop.lib.common.util.PValidation.*; /** * Immutable implementation of {@link OrderedRegistry}. * * @author DaPorkchop_ */ public final class ImmutableOrderedRegistry<T> implements OrderedRegistry<T> { protected final BiMap<String, T> map; public ImmutableOrderedRegistry(@NonNull OrderedRegistry<T> src) { ImmutableBiMap.Builder<String, T> builder = ImmutableBiMap.builder(); src.forEachEntry(builder::put); this.map = builder.build(); } @Override public OrderedRegistry<T> addFirst(@NonNull String name, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> addLast(@NonNull String name, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> addBefore(@NonNull String targetName, @NonNull String name, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> addAfter(@NonNull String targetName, @NonNull String name, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> set(@NonNull String targetName, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> set(@NonNull String targetName, @NonNull String newName, @NonNull T value) { throw new UnsupportedOperationException(); } @Override public OrderedRegistry<T> remove(@NonNull String name) { throw new UnsupportedOperationException(); } @Override public T get(@NonNull String name) { T value = this.map.get(name); checkArg(value != null, "unable to find entry with name \"%s\"!", name); return value; } @Override public String getName(@NonNull T value) { String name = this.map.inverse().get(value); checkArg(name != null, "unable to find entry with value \"%s\"!", value); return name; } @Override public Stream<Map.Entry<String, T>> stream() { return this.map.entrySet().stream(); } @Override public Iterator<Map.Entry<String, T>> iterator() { return this.map.entrySet().iterator(); } @Override public void forEachEntry(@NonNull BiConsumer<String, ? super T> action) { this.map.forEach(action); } }
[ "daporkchop@daporkchop.net" ]
daporkchop@daporkchop.net
cb27fa2769b2fdb347bad90e737a6ea48d5a8a67
9d9c48034112db0f1d93b10c1bfda684f6753bb0
/Hero_Sheet/src/main/java/net/sf/anathema/hero/sheet/pdf/page/layout/field/StaticHeight.java
799213f3c250e45f942b4b34b621b03798d55ea6
[]
no_license
tienelle/anathema_3e
804690e37492e77dad041dc6996bdc44755b038e
fd1f0a95e40a5e8b8ca93d0dd8b32fd1239a6787
refs/heads/master
2020-12-11T06:15:32.858381
2016-08-31T11:02:38
2016-08-31T11:02:38
66,630,488
0
1
null
2016-08-26T08:25:03
2016-08-26T08:25:03
null
UTF-8
Java
false
false
292
java
package net.sf.anathema.hero.sheet.pdf.page.layout.field; public class StaticHeight implements HeightStrategy { private float height; public StaticHeight(float height) { this.height = height; } @Override public float getHeight(float contentWidth) { return height; } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
5d5303cfc2a2bb041b2b83345c9e0a4ccd89c49e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_51978cf885ddca7295e01df20d3faa889763ddaf/AccountActivationController/8_51978cf885ddca7295e01df20d3faa889763ddaf_AccountActivationController_t.java
e9f1540caa0db4c8dfdd2684dd7f0dd293fac3f0
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,610
java
/* * Copyright 2006-2007 Open Source Applications Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.osaf.cosmo.ui.account.activation; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.osaf.cosmo.model.User; import org.osaf.cosmo.service.UserService; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; /** * Controller for account activation. */ public class AccountActivationController extends AbstractController { private static final Log log = LogFactory .getLog(AccountActivationController.class); private String accountActivationView; private String notFoundView; private UserService userService; /** */ public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { String activationId = request.getParameter("id"); User user = userService.getUserByActivationId(activationId); if (user != null){ user.activate(); userService.updateUser(user); Map<String, Object> model = new HashMap<String, Object>(); model.put("user", user); return new ModelAndView(accountActivationView, model); } else { return new ModelAndView(notFoundView); } } public UserService getUserService() { return userService; } public void setUserService(UserService userService) { this.userService = userService; } public void setAccountActivationView(String accountActivationView) { this.accountActivationView = accountActivationView; } public void setNotFoundView(String notFoundView) { this.notFoundView = notFoundView; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3e9d07b72896af028306e114da2a8a02e3dec7a2
814fd0bea5bc063a4e34ebdd0a5597c9ff67532b
/device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorImpl.java
364e21a88f8381ecab2d123c400e73d14ac428d8
[ "BSD-3-Clause" ]
permissive
rzr/chromium-crosswalk
1b22208ff556d69c009ad292bc17dca3fe15c493
d391344809adf7b4f39764ac0e15c378169b805f
refs/heads/master
2021-01-21T09:11:07.316526
2015-02-16T11:52:21
2015-02-16T11:52:21
38,887,985
0
0
NOASSERTION
2019-08-07T21:59:20
2015-07-10T15:35:50
C++
UTF-8
Java
false
false
2,058
java
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.device.battery; import org.chromium.mojo.system.MojoException; import org.chromium.mojom.device.BatteryMonitor; import org.chromium.mojom.device.BatteryStatus; import java.util.ArrayList; import java.util.List; /** * Android implementation of the battery monitor service defined in * device/battery/battery_monitor.mojom. */ public class BatteryMonitorImpl implements BatteryMonitor { // Factory that created this instance and notifies it about battery status changes. private final BatteryMonitorFactory mFactory; private final List<QueryNextStatusResponse> mCallbacks; private BatteryStatus mStatus; private boolean mHasStatusToReport; private boolean mSubscribed; public BatteryMonitorImpl(BatteryMonitorFactory batteryMonitorFactory) { mFactory = batteryMonitorFactory; mCallbacks = new ArrayList<QueryNextStatusResponse>(); mHasStatusToReport = false; mSubscribed = true; } private void unsubscribe() { if (mSubscribed) { mFactory.unsubscribe(this); mSubscribed = false; } } @Override public void close() { unsubscribe(); } @Override public void onConnectionError(MojoException e) { unsubscribe(); } @Override public void queryNextStatus(QueryNextStatusResponse callback) { mCallbacks.add(callback); if (mHasStatusToReport) { reportStatus(); } } void didChange(BatteryStatus batteryStatus) { mStatus = batteryStatus; mHasStatusToReport = true; if (!mCallbacks.isEmpty()) { reportStatus(); } } void reportStatus() { for (QueryNextStatusResponse callback : mCallbacks) { callback.call(mStatus); } mCallbacks.clear(); mHasStatusToReport = false; } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
050a1e8c9e7ac544d6ff8db8d016ea0be884cf03
fa1600b0b0e17ffdd5ef7572277a4a58e9d29e6c
/2004/CollaborationDocLoader/com/hps/july/terrabyte/imp/test/TestImageLoaderProcessor.java
d1ab34a3031c85b5a949ac51a1e32268003ec287
[]
no_license
ildar66/WSAD_Collaboration
0e034960f98647f069aca867bba939d6ea43b33f
a2b5b8cea2bf5201e72d8210e9e0395fa69c23e3
refs/heads/master
2020-12-02T23:53:09.383736
2017-07-01T08:56:17
2017-07-01T08:56:17
95,952,957
0
0
null
null
null
null
UTF-8
Java
false
false
4,145
java
package com.hps.july.terrabyte.imp.test; import com.hps.july.terrabyte.imp.command.LoadPositionGRPImageCommand; import com.hps.july.terrabyte.imp.TerrabyteLoaderProcessor; import com.hps.july.terrabyte.imp.AppLog1; import com.hps.beeline.LoaderException; import com.hps.framework.exception.BaseException; import java.util.Date; import java.sql.Connection; import java.sql.SQLException; import java.sql.PreparedStatement; import java.sql.DriverManager; import java.text.DecimalFormat; import java.text.FieldPosition; /** * Author: Vadim Glushkov (mailto: v.glushkov@mail.ru) * Date: 23.06.2005 * Time: 17:07:10 */ public class TestImageLoaderProcessor { public void test() { Date st = new Date(); Connection con = null; Connection log = null; try { con = getConnection(); LoadPositionGRPImageCommand command = new LoadPositionGRPImageCommand(new Integer(345), con, con); command.setDirectory("C:\\6"); command.setCatalog("TEstMap"); TerrabyteLoaderProcessor.executeLoaderCommand(command, "localhost", new Integer(8080)); } catch(LoaderException e) { e.printStackTrace(); } catch(BaseException e) { e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } finally{ try { if(con != null) { con.close();} } catch(SQLException e) {} try { if(log != null) { log.close();} } catch(SQLException e) {} } AppLog1.log("Execution time ["+getMethodExecutionTime(st, new Date())+"]"); } public Connection getConnection() { Connection connection = null; PreparedStatement pstmt = null; try { /* InitialContext initialContext = new InitialContext(); DataSource dataSource = (DataSource)initialContext.lookup("java:comp/env/jdbc/terrabyte"); connection = dataSource.getConnection(); connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); */ Class.forName("com.informix.jdbc.IfxDriver"); connection = DriverManager.getConnection("jdbc:informix-sqli://172.21.9.137:1541:informixserver=infdata;database=july;DB_LOCALE=ru_RU.1251;CLIENT_LOCALE=ru_RU.1251;user=vad;password=AKpASCSX"); //connection = DriverManager.getConnection("jdbc:informix-sqli://192.168.18.202:1541:informixserver=beeinf_app;database=july;DB_LOCALE=ru_RU.1251;CLIENT_LOCALE=ru_RU.1251;user=informix;password=beeinf01;informixLockModeWait=60"); connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); pstmt = connection.prepareStatement(" set lock mode to wait 60; "); pstmt.executeUpdate(); } catch(Exception e) { e.printStackTrace(); } finally { try { if(pstmt != null) pstmt.close(); } catch(SQLException e) {} } return connection; } public static void main(String[] args) { TestImageLoaderProcessor test = new TestImageLoaderProcessor(); test.test(); } public String getMethodExecutionTime(Date startTime, Date endTime) { DecimalFormat df = new DecimalFormat("00"); df.setDecimalSeparatorAlwaysShown(false); long decelTime = endTime.getTime() - startTime.getTime(); double hours = Math.floor(decelTime / 3600000); double min = Math.floor((decelTime % 3600000) / 60000); double sec = Math.floor((decelTime % 3600000 % 60000) / 1000); double mSec = Math.floor((decelTime % 3600000 % 60000 % 1000)); StringBuffer sb = new StringBuffer(); df.format(hours, sb, new FieldPosition(0)); sb.append(":"); df.format(min, sb, new FieldPosition(0)); sb.append(":"); df.format(sec, sb, new FieldPosition(0)); df = new DecimalFormat("000"); df.setDecimalSeparatorAlwaysShown(false); sb.append(":"); df.format(mSec, sb, new FieldPosition(0)); return sb.toString(); } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
c3972328dda4888999d7035984bb89a2479dc594
c4b94158b0ac8f1c4f3d535b6cdee5d1639743ce
/Java/838__Push_Dominoes.java
90ab03bd2f4a7091fc8c032d0be9a19fe6abfa8e
[]
no_license
FIRESTROM/Leetcode
fc61ae5f11f9cb7a118ae7eac292e8b3e5d10e41
801beb43235872b2419a92b11c4eb05f7ea2adab
refs/heads/master
2020-04-04T17:40:59.782318
2019-08-26T18:58:21
2019-08-26T18:58:21
156,130,665
2
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
class Solution { public String pushDominoes(String dominoes) { char[] s_arr = dominoes.toCharArray(); int start = 0; for (int i = 1; i < s_arr.length; i++) { if (s_arr[i] == 'L') { process(s_arr, start, i); start = i + 1; } else if (s_arr[i] == 'R') { process(s_arr, start, i - 1); start = i; } } process(s_arr, start, s_arr.length - 1); return new String(s_arr); } private void process(char[] s_arr, int start, int end) { if (start >= s_arr.length || end >= s_arr.length || start >= end) return; if (s_arr[start] == 'R' && s_arr[end] == 'L') { while (start < end) { s_arr[start] = 'R'; s_arr[end] = 'L'; end--; start++; } } else if (s_arr[end] == 'L') { while (end >= start) { s_arr[end] = 'L'; end--; } } else if (s_arr[start] == 'R') { while (start <= end) { s_arr[start] = 'R'; start++; } } } }
[ "junou_cui@berkeley.edu" ]
junou_cui@berkeley.edu
91f33311270b964c9e2ec750afdc7856776735cd
ccc0f9fcb3dabbeab160a980d237cd1cecd52fd8
/galleryapp/gallery-web/src/main/java/cherry/gallery/web/basic/ex40/BasicEx41ServiceImpl.java
ff6357e71483466ec4624367c15751bf8ea5ef2f
[ "Apache-2.0" ]
permissive
agwlvssainokuni/springapp2
cac8ae3b1fb26dc90e140e853823203e3abfd38c
61e94f2ed666d061e0d7d226f098732b4f11b969
refs/heads/master
2020-04-12T06:29:39.725542
2018-12-15T23:12:37
2018-12-15T23:15:24
61,370,958
0
0
null
null
null
null
UTF-8
Java
false
false
2,605
java
/* * Copyright 2015,2016 agwlvssainokuni * * 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 cherry.gallery.web.basic.ex40; import static com.querydsl.core.types.dsl.Expressions.ONE; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import cherry.gallery.db.gen.query.QExTbl1; import com.querydsl.core.types.Projections; import com.querydsl.core.types.QBean; import com.querydsl.sql.SQLQueryFactory; import com.querydsl.sql.dml.SQLUpdateClause; @Service public class BasicEx41ServiceImpl implements BasicEx41Service { @Autowired private SQLQueryFactory qf; private final QExTbl1 et1 = new QExTbl1("et1"); @Transactional @Override public BasicEx41Form findById(long id) { QBean<BasicEx41Form> qb = Projections.bean(BasicEx41Form.class, et1.text10, et1.text100, et1.int64, et1.decimal1, et1.decimal3, et1.dt, et1.tm, et1.dtm, et1.lockVersion); return qf.from(et1).where(et1.id.eq(id)).select(qb).fetchOne(); } @Transactional @Override public boolean exists(long id, String text10) { return qf.from(et1).where(et1.id.ne(id), et1.text10.eq(text10)).select(ONE).fetchFirst() != null; } @Transactional @Override public long update(long id, BasicEx41Form form) { SQLUpdateClause update = qf.update(et1).where(et1.id.eq(id)); update.where(et1.lockVersion.eq(form.getLockVersion())).set(et1.lockVersion, et1.lockVersion.add(1)); if (StringUtils.isNotEmpty(form.getText10())) { update.set(et1.text10, form.getText10()); } if (StringUtils.isNotEmpty(form.getText100())) { update.set(et1.text100, form.getText100()); } update.set(et1.int64, form.getInt64()); update.set(et1.decimal1, form.getDecimal1()); update.set(et1.decimal3, form.getDecimal3()); update.set(et1.dt, form.getDt()); update.set(et1.tm, form.getTm()); update.set(et1.dtm, form.getDtm()); return update.execute(); } }
[ "agw.lvs.sainokuni@gmail.com" ]
agw.lvs.sainokuni@gmail.com
4a3f1fbf1272a9d739ff22b17564eba163d9bf5a
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/osmandapp_Osmand/OsmAnd/src/net/osmand/plus/osmedit/OsmBugMenuController.java
d315c47dc12c42794cc087cdb681d1255f3c4ed4
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,108
java
// isComment package net.osmand.plus.osmedit; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.mapcontextmenu.MenuBuilder; import net.osmand.plus.mapcontextmenu.MenuController; import net.osmand.plus.osmedit.OsmBugsLayer.OpenStreetNote; public class isClassOrIsInterface extends MenuController { private OsmEditingPlugin isVariable; private OpenStreetNote isVariable; public isConstructor(@NonNull MapActivity isParameter, @NonNull PointDescription isParameter, @NonNull OpenStreetNote isParameter) { super(new MenuBuilder(isNameExpr), isNameExpr, isNameExpr); isNameExpr = isNameExpr.isMethod(OsmEditingPlugin.class); this.isFieldAccessExpr = isNameExpr; isNameExpr = new TitleButtonController() { @Override public void isMethod() { MapActivity isVariable = isMethod(); if (isNameExpr != null && isNameExpr != null) { OpenStreetNote isVariable = isMethod(); if (isNameExpr.isMethod()) { isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr, "isStringConstant"); } else { isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr, "isStringConstant"); } } } }; if (isNameExpr.isMethod()) { isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } else { isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, true); isNameExpr = new TitleButtonController() { @Override public void isMethod() { MapActivity isVariable = isMethod(); if (isNameExpr != null && isNameExpr != null) { isNameExpr.isMethod(isNameExpr).isMethod(isMethod(), "isStringConstant"); } } }; isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, true); isMethod(); } @Override protected void isMethod(Object isParameter) { if (isNameExpr instanceof OpenStreetNote) { this.isFieldAccessExpr = (OpenStreetNote) isNameExpr; isMethod(); } } @Override protected Object isMethod() { return isNameExpr; } public OpenStreetNote isMethod() { return isNameExpr; } @Override public Drawable isMethod() { if (isNameExpr.isMethod()) { return isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } else { return isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } } @NonNull @Override public String isMethod() { return isMethod().isMethod(); } @Override public boolean isMethod() { return true; } @Override public void isMethod(String isParameter, PointDescription isParameter, LatLon isParameter) { String isVariable = "isStringConstant" + isNameExpr.isMethod(); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, null, isNameExpr, true, true, null); super.isMethod(isNameExpr, isNameExpr, isNameExpr); for (String isVariable : isNameExpr.isMethod()) { isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, null, isNameExpr, true, true, null); } } @Override public void isMethod() { super.isMethod(); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
32a7a4981e2b0822531800f527d8365650ef5f7a
3c18b4ab3a20dab175dc48758835fb1a854a92c8
/probes/bctLPAll26.java
4a55a94c6a151807a54689e68e087aa3110d298a
[ "Apache-2.0" ]
permissive
lta-disco-unimib-it/BCT
2c6bcf52894db8798d8ad14c7ebe066262dd22e4
1c7fcb52f42bae9f5169c94032ded919cb1c42c4
refs/heads/master
2020-08-24T16:32:03.904958
2019-10-22T20:30:10
2019-10-22T20:30:10
216,863,231
0
0
null
null
null
null
UTF-8
Java
false
false
3,729
java
/******************************************************************************* * Copyright 2019 Fabrizio Pastore, Leonardo Mariani * * 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. *******************************************************************************/ // This probe monitor all calls, also the one within components boundaries /* probekit /BCT_new/probes/bctComponentLogger.probe */ // "imports" specifications for probes (if any): import probes.LoggerProbe; class bctLPAll26 { // Class for probe unnamed_probe public static class Probe_0 { // Fragment at class scope int id = 1; public static void _afterCall ( Object /*returnedObject*/ returnedObject, String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V // ------------------ begin user-written fragment code ---------------- try{ LoggerProbe.exit(className,methodName,methodSig,args,returnedObject); } catch ( Throwable e ){ System.err.println("BCT COMPONENT LOGGER ERROR/EXCEPTION: "+e.getMessage()); e.printStackTrace(); } // ------------------- end user-written fragment code ----------------- } public static void _beforeCall ( String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V try{ //System.out.println("#"+Thread.currentThread().getId()+"#"+"CALLENTER"+bctLP26.class); LoggerProbe.enter(className,methodName,methodSig,args); } catch ( Throwable e ){ System.err.println("BCT COMPONENT LOGGER ERROR/EXCEPTION: "+e.getMessage()); e.printStackTrace(); } } } // Class for probe unnamed_probe public static class Probe_1 { // Fragment at class scope int id = 0; public static void _exit ( Object /*returnedObject*/ returnedObject, String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V try{ LoggerProbe.exit(className,methodName,methodSig,args,returnedObject); } catch ( Throwable e ){ System.err.println("BCT COMPONENT LOGGER ERROR/EXCEPTION: "+e.getMessage()); e.printStackTrace(); } } public static void _entry ( String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V try{ LoggerProbe.enter(className,methodName,methodSig,args); } catch ( Throwable e ){ System.err.println("BCT COMPONENT LOGGER ERROR/EXCEPTION: "+e.getMessage()); e.printStackTrace(); } } } }
[ "fabrizio.pastore@gmail.com" ]
fabrizio.pastore@gmail.com
c0dbfe333fd8632e5f3dc03de24d5098da7ba240
8ae471762fc453c3b25310420cebc715de12d7f7
/kernel/sparkex/src/test/java/com/twosigma/beakerx/widget/SparkUiDefaultsImplTest.java
fa781fa7e690e2fae05e4162256763d888f87927
[ "Apache-2.0", "MPL-2.0", "MIT", "EPL-1.0", "BSD-3-Clause", "LicenseRef-scancode-proprietary-license" ]
permissive
acq/beakerx
3fcef897ee80a4ac8f9656c651898864ada42806
584023ce0fdb052713855d8a9455e6d7422e53da
refs/heads/master
2020-03-19T14:29:18.237146
2018-06-08T13:55:24
2018-06-08T13:55:43
136,625,207
0
0
Apache-2.0
2018-06-08T13:51:30
2018-06-08T13:51:29
null
UTF-8
Java
false
false
4,235
java
/* * Copyright 2018 TWO SIGMA OPEN SOURCE, 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. */ package com.twosigma.beakerx.widget; import org.apache.spark.SparkConf; import org.apache.spark.sql.SparkSession; import org.junit.Before; import org.junit.Test; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.Map; import static com.twosigma.beakerx.widget.SparkUIApi.SPARK_EXECUTOR_CORES; import static com.twosigma.beakerx.widget.SparkUIApi.SPARK_EXECUTOR_MEMORY; import static com.twosigma.beakerx.widget.SparkUIApi.SPARK_MASTER; import static com.twosigma.beakerx.widget.SparkUiDefaultsImpl.BEAKERX; import static com.twosigma.beakerx.widget.SparkUiDefaultsImpl.NAME; import static com.twosigma.beakerx.widget.SparkUiDefaultsImpl.PROPERTIES; import static com.twosigma.beakerx.widget.SparkUiDefaultsImpl.SPARK_OPTIONS; import static com.twosigma.beakerx.widget.SparkUiDefaultsImpl.VALUE; import static org.assertj.core.api.Assertions.assertThat; public class SparkUiDefaultsImplTest { private SparkUiDefaultsImpl sut; private Path pathToBeakerxTestJson; @Before public void setUp() { String path = this.getClass().getClassLoader().getResource("beakerxTest.json").getPath(); this.pathToBeakerxTestJson = Paths.get(path); this.sut = new SparkUiDefaultsImpl(pathToBeakerxTestJson); } @Test public void saveMasterURL() { //given SparkConf sparkConf = new SparkConf(); sparkConf.set(SPARK_MASTER, "local[4]"); //when sut.saveSparkConf(sparkConf); //then Map options = getOptions(); String prop = (String) options.get(SPARK_MASTER); assertThat(prop).isEqualTo("local[4]"); } @Test public void saveExecutorMemory() { //given SparkConf sparkConf = new SparkConf(); sparkConf.set(SPARK_EXECUTOR_MEMORY, "8g"); //when sut.saveSparkConf(sparkConf); //then Map options = getOptions(); String prop = (String) options.get(SPARK_EXECUTOR_MEMORY); assertThat(prop).isEqualTo("8g"); } @Test public void saveCores() { //given SparkConf sparkConf = new SparkConf(); sparkConf.set(SPARK_EXECUTOR_CORES, "10"); //when sut.saveSparkConf(sparkConf); //then Map options = getOptions(); String prop = (String) options.get(SPARK_EXECUTOR_CORES); assertThat(prop).isEqualTo("10"); } @Test public void saveAsProp() { //given SparkConf sparkConf = new SparkConf(); sparkConf.set("sparkOption2", "sp2"); //when sut.saveSparkConf(sparkConf); //then List<Object> props = getProps(); assertThat(props).isNotEmpty(); Map prop = (Map) props.get(0); assertThat(prop.get(NAME)).isEqualTo("sparkOption2"); assertThat(prop.get(VALUE)).isEqualTo("sp2"); } @SuppressWarnings("unchecked") private List<Object> getProps() { Map options = getOptions(); return (List<Object>) options.get(PROPERTIES); } @SuppressWarnings("unchecked") private Map getOptions() { Map<String, Map> beakerxTestJson = sut.beakerxJsonAsMap(this.pathToBeakerxTestJson).get(BEAKERX); return beakerxTestJson.get(SPARK_OPTIONS); } @Test public void saveAndLoadDefaults() { //given SparkConf sparkConf = new SparkConf(); sparkConf.set("sparkOption2", "sp2"); sparkConf.set(SPARK_MASTER, "local[4]"); //when sut.saveSparkConf(sparkConf); //then SparkSession.Builder builder = SparkSession.builder(); sut.loadDefaults(builder); SparkConf sparkConfBasedOn = SparkEngineImpl.getSparkConfBasedOn(builder); assertThat(sparkConfBasedOn.get("sparkOption2")).isEqualTo("sp2"); assertThat(sparkConfBasedOn.get(SPARK_MASTER)).isEqualTo("local[4]"); } }
[ "spot@draves.org" ]
spot@draves.org
561ee597313be39b2852c9460231be3a07321409
2c6c7298c3df9c05047aa5c0bd6f44499dc4bb3a
/server-core/src/main/java/io/onedev/server/web/page/project/blob/render/renderers/nocommits/NoCommitsPanel.java
897711a546445763c1d5954af4f5698da44f1d47
[ "MIT" ]
permissive
hankesstill/onedev
36a84d5467cde3432fe0a4b15c4ce223e7bf9c00
369d640aa8500223c7bc44abba3280ed991dcdf0
refs/heads/main
2023-05-11T09:48:18.501940
2021-05-28T12:17:26
2021-05-28T12:17:26
371,844,297
1
0
MIT
2021-05-29T00:06:31
2021-05-29T00:06:30
null
UTF-8
Java
false
false
5,263
java
package io.onedev.server.web.page.project.blob.render.renderers.nocommits; import java.util.ArrayList; import java.util.List; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.behavior.AttributeAppender; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.head.CssHeaderItem; import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Fragment; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.LoadableDetachableModel; import io.onedev.server.buildspec.BuildSpec; import io.onedev.server.event.RefUpdated; import io.onedev.server.model.Project; import io.onedev.server.security.SecurityUtils; import io.onedev.server.web.component.floating.FloatingPanel; import io.onedev.server.web.component.link.DropdownLink; import io.onedev.server.web.component.link.ViewStateAwareAjaxLink; import io.onedev.server.web.component.menu.MenuItem; import io.onedev.server.web.component.menu.MenuLink; import io.onedev.server.web.component.modal.ModalLink; import io.onedev.server.web.component.modal.ModalPanel; import io.onedev.server.web.component.project.gitprotocol.GitProtocolPanel; import io.onedev.server.web.page.project.blob.BlobUploadPanel; import io.onedev.server.web.page.project.blob.render.BlobRenderContext; import io.onedev.server.web.page.project.blob.render.BlobRenderContext.Mode; @SuppressWarnings("serial") public class NoCommitsPanel extends Panel { private final BlobRenderContext context; public NoCommitsPanel(String id, BlobRenderContext context) { super(id); this.context = context; } @Override protected void onInitialize() { super.onInitialize(); if (SecurityUtils.canWriteCode(context.getProject())) { add(new MenuLink("addFiles") { @Override protected List<MenuItem> getMenuItems(FloatingPanel dropdown) { List<MenuItem> menuItems = new ArrayList<>(); menuItems.add(new MenuItem() { @Override public String getLabel() { return "Create New File"; } @Override public WebMarkupContainer newLink(String id) { return new ViewStateAwareAjaxLink<Void>(id) { @Override public void onClick(AjaxRequestTarget target) { context.onModeChange(target, Mode.ADD, null); dropdown.close(); } }; } }); menuItems.add(new MenuItem() { @Override public String getLabel() { return "Upload Files"; } @Override public WebMarkupContainer newLink(String id) { return new ModalLink(id) { @Override public void onClick(AjaxRequestTarget target) { super.onClick(target); dropdown.close(); } @Override protected Component newContent(String id, ModalPanel modal) { return new BlobUploadPanel(id, context) { @Override public void onCancel(AjaxRequestTarget target) { modal.close(); } @Override public void onCommitted(AjaxRequestTarget target, RefUpdated refUpdated) { context.onCommitted(target, refUpdated); modal.close(); } }; } }; } }); return menuItems; } }); add(new AjaxLink<Void>("setupBuildSpec") { @Override public void onClick(AjaxRequestTarget target) { context.onModeChange(target, Mode.ADD, BuildSpec.BLOB_PATH); } }); add(new DropdownLink("pushInstructions") { @Override protected void onInitialize(FloatingPanel dropdown) { super.onInitialize(dropdown); dropdown.add(AttributeAppender.append("style", "max-width:480px;")); } @Override protected Component newContent(String id, FloatingPanel dropdown) { return new GitProtocolPanel(id) { @Override protected Component newContent(String componentId) { Fragment fragment = new Fragment(id, "pushInstructionsFrag", NoCommitsPanel.this); fragment.add(new Label("url", new LoadableDetachableModel<String>() { @Override protected String load() { return getProtocolUrl(); } })); return fragment; } @Override protected Project getProject() { return context.getProject(); } }; } }); } else { add(new WebMarkupContainer("addFiles") { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.setName("span"); } }); add(new WebMarkupContainer("pushInstructions") { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.setName("span"); } }); } setOutputMarkupId(true); } @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render(CssHeaderItem.forReference(new NoCommitsCssResourceReference())); } }
[ "robin@onedev.io" ]
robin@onedev.io
74e7d2f487f253f41fe12620ea2d97258483c8c8
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
/app/src/main/java/com/syd/source/aosp/cts/tests/tests/view/src/android/view/cts/surfacevalidator/PixelChecker.java
76f0adc229c5ba0ae867165bffbe7d3a59578a77
[]
no_license
lz-purple/Source
a7788070623f2965a8caa3264778f48d17372bab
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
refs/heads/master
2020-12-23T17:03:12.412572
2020-01-31T01:54:37
2020-01-31T01:54:37
237,205,127
4
2
null
null
null
null
UTF-8
Java
false
false
769
java
/* * Copyright (C) 2016 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 android.view.cts.surfacevalidator; public interface PixelChecker { boolean checkPixels(int blackishPixelCount, int width, int height); }
[ "997530783@qq.com" ]
997530783@qq.com
ef6901250f15a832bd6cdc621c051ea276982dea
1264ce4f7240a56b39b99bbfcdf7c59131cac5db
/AndExam안드로이드프로그램정복/AndExam/src/exam/andexam/C20_CallWordCP.java
feb35ab63fa122a8ccc017b4ec81951a23bcb084
[]
no_license
danielkulcsar/webhon
7ea0caef64fc7ddec691f809790c5aa1d960635a
c6a25cc2fd39dda5907ee1b5cb875a284aa6ce3d
refs/heads/master
2021-06-23T08:06:48.890022
2017-08-27T05:28:19
2017-08-27T05:28:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,095
java
package exam.andexam; import android.app.*; import android.content.*; import android.database.*; import android.net.*; import android.os.*; import android.view.*; import android.widget.*; public class C20_CallWordCP extends Activity { static final String WORDURI = "content://exam.andexam.EnglishWord/word"; EditText mText; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.c20_callwordcp); mText = (EditText)findViewById(R.id.edittext); } public void mOnClick(View v) { ContentResolver cr = getContentResolver(); switch (v.getId()) { // 전부 읽기 case R.id.readall: Cursor cursor = cr.query(Uri.parse(WORDURI), null, null, null, null); String Result = ""; while (cursor.moveToNext()) { String eng = cursor.getString(0); String han = cursor.getString(1); Result += (eng + " = " + han + "\n"); } if (Result.length() == 0) { mText.setText("Empyt Set"); } else { mText.setText(Result); } cursor.close(); break; // 하나만 읽기 case R.id.readone: Cursor cursor2 = cr.query(Uri.parse(WORDURI + "/boy"), null, null, null, null); String Result2 = ""; if (cursor2.moveToFirst()) { String eng = cursor2.getString(0); String han = cursor2.getString(1); Result2 += (eng + " = " + han + "\n"); } if (Result2.length() == 0) { mText.setText("Empyt Set"); } else { mText.setText(Result2); } cursor2.close(); break; // 삽입 case R.id.insert: ContentValues row = new ContentValues(); row.put("eng", "school"); row.put("han", "학교"); cr.insert(Uri.parse(WORDURI), row); mText.setText("Insert Success"); break; // 삭제 case R.id.delete: cr.delete(Uri.parse(WORDURI), null, null); mText.setText("Delete Success"); break; // 수정 case R.id.update: ContentValues row2 = new ContentValues(); row2.put("han", "핵교"); cr.update(Uri.parse(WORDURI + "/school"), row2, null, null); mText.setText("Update Success"); break; } } }
[ "webhon747@gmail.com" ]
webhon747@gmail.com
af70b0ce97e6a125ae3ca6b2d145188e797ca3c9
225011bbc304c541f0170ef5b7ba09b967885e95
/org/telegram/messenger/exoplayer2/upstream/crypto/AesFlushingCipher.java
b6293e7b9800f73d6c11e492de04877acd25389b
[]
no_license
sebaudracco/bubble
66536da5367f945ca3318fecc4a5f2e68c1df7ee
e282cda009dfc9422594b05c63e15f443ef093dc
refs/heads/master
2023-08-25T09:32:04.599322
2018-08-14T15:27:23
2018-08-14T15:27:23
140,444,001
1
1
null
null
null
null
UTF-8
Java
false
false
3,809
java
package org.telegram.messenger.exoplayer2.upstream.crypto; import com.github.lzyzsd.jsbridge.BridgeUtil; import java.nio.ByteBuffer; import java.security.GeneralSecurityException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.ShortBufferException; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import org.telegram.messenger.exoplayer2.util.Assertions; public final class AesFlushingCipher { private final int blockSize; private final Cipher cipher; private final byte[] flushedBlock; private int pendingXorBytes; private final byte[] zerosBlock; public AesFlushingCipher(int mode, byte[] secretKey, long nonce, long offset) { GeneralSecurityException e; try { this.cipher = Cipher.getInstance("AES/CTR/NoPadding"); this.blockSize = this.cipher.getBlockSize(); this.zerosBlock = new byte[this.blockSize]; this.flushedBlock = new byte[this.blockSize]; int startPadding = (int) (offset % ((long) this.blockSize)); this.cipher.init(mode, new SecretKeySpec(secretKey, this.cipher.getAlgorithm().split(BridgeUtil.SPLIT_MARK)[0]), new IvParameterSpec(getInitializationVector(nonce, offset / ((long) this.blockSize)))); if (startPadding != 0) { updateInPlace(new byte[startPadding], 0, startPadding); } } catch (NoSuchAlgorithmException e2) { e = e2; throw new RuntimeException(e); } catch (NoSuchPaddingException e3) { e = e3; throw new RuntimeException(e); } catch (InvalidKeyException e4) { e = e4; throw new RuntimeException(e); } catch (InvalidAlgorithmParameterException e5) { e = e5; throw new RuntimeException(e); } } public void updateInPlace(byte[] data, int offset, int length) { update(data, offset, length, data, offset); } public void update(byte[] in, int inOffset, int length, byte[] out, int outOffset) { while (this.pendingXorBytes > 0) { out[outOffset] = (byte) (in[inOffset] ^ this.flushedBlock[this.blockSize - this.pendingXorBytes]); outOffset++; inOffset++; this.pendingXorBytes--; length--; if (length == 0) { return; } } int written = nonFlushingUpdate(in, inOffset, length, out, outOffset); if (length != written) { int bytesToFlush = length - written; Assertions.checkState(bytesToFlush < this.blockSize); outOffset += written; this.pendingXorBytes = this.blockSize - bytesToFlush; Assertions.checkState(nonFlushingUpdate(this.zerosBlock, 0, this.pendingXorBytes, this.flushedBlock, 0) == this.blockSize); int i = 0; int outOffset2 = outOffset; while (i < bytesToFlush) { outOffset = outOffset2 + 1; out[outOffset2] = this.flushedBlock[i]; i++; outOffset2 = outOffset; } } } private int nonFlushingUpdate(byte[] in, int inOffset, int length, byte[] out, int outOffset) { try { return this.cipher.update(in, inOffset, length, out, outOffset); } catch (ShortBufferException e) { throw new RuntimeException(e); } } private byte[] getInitializationVector(long nonce, long counter) { return ByteBuffer.allocate(16).putLong(nonce).putLong(counter).array(); } }
[ "sebaudracco@gmail.com" ]
sebaudracco@gmail.com
3a03011cbc184b431bb603da10b23e26b95fd1f0
136e4ebd3b065870d0dc3ea1f2c2ff6c273e5e1e
/grpc-client/src/main/java/com/github/creepid/grpc/client/utils/ObjectUtil.java
0b73e195fef6d58b3f6aae4fbdc005b637c32783
[]
no_license
EasySmartHouse/easysmarthouse-grpc-client
a2c1c6f757e90c9de51b61a2ed20335ff8dc2f1e
81b5b82ea76f2666bcdeb8bc1e31f4e4aa554a0d
refs/heads/master
2020-06-22T09:31:05.729509
2017-02-13T17:01:29
2017-02-13T17:01:29
74,598,027
0
1
null
null
null
null
UTF-8
Java
false
false
820
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.github.creepid.grpc.client.utils; import java.math.BigDecimal; /** * * @author rusakovich */ public class ObjectUtil { private ObjectUtil() { } public static boolean isBlank(Object obj) { if (obj == null) { return true; } if (obj instanceof String) { return ((String) obj).isEmpty(); } if (obj instanceof Number) { Number num = (Number) obj; BigDecimal bdValue = BigDecimal.valueOf(num.doubleValue()); return (bdValue.compareTo(BigDecimal.ZERO) == 0); } return false; } }
[ "mikhail.complete@gmail.com" ]
mikhail.complete@gmail.com
d4a45ece8a55c6dfaae519bc58b7a375be016880
86a4f4a2dc3f38c0b3188d994950f4c79f036484
/src/com/adobe/b/c/a/b/a/b/a$19.java
e9cfa44ffdfb7b3463d6f663c95afea57ed6010e
[]
no_license
reverseengineeringer/com.cbs.app
8f6f3532f119898bfcb6d7ddfeb465eae44d5cd4
7e588f7156f36177b0ff8f7dc13151c451a65051
refs/heads/master
2021-01-10T05:08:31.000287
2016-03-19T20:39:17
2016-03-19T20:39:17
54,283,808
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package com.adobe.b.c.a.b.a.b; import com.adobe.b.a.b; import com.adobe.b.a.c; final class a$19 implements b { a$19(a parama) {} public final Object call(Object paramObject) { a.b(a).a(a.a(a)); if (!a.g(a)) { a.b(a).a(a.a(a)); return null; } a.a(a, false); return null; } } /* Location: * Qualified Name: com.adobe.b.c.a.b.a.b.a.19 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
73fbddc76d7d7c42df413a197f10a1cd3fdb3c5b
f4a48f0a33eac9c2ecf16b6c9eb37278b341ce09
/server/src/com/thoughtworks/go/server/ui/AgentsViewModel.java
1d1c6d62074eb9ce1900292d2a9f0001ac5822b3
[ "Apache-2.0" ]
permissive
RLIndia/gocd
aec8919cfa3d53295131ac8a39d827b6f4fa63d5
c1bd7bc958f0c99a7a2053bdbb3a9c3cd0f218a0
refs/heads/master
2023-03-31T02:14:39.208654
2016-02-24T06:02:41
2016-02-24T06:02:41
52,427,722
0
0
Apache-2.0
2023-03-22T21:25:50
2016-02-24T08:49:28
Java
UTF-8
Java
false
false
6,101
java
/*************************GO-LICENSE-START********************************* * Copyright 2014 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *************************GO-LICENSE-END***********************************/ package com.thoughtworks.go.server.ui; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import com.thoughtworks.go.domain.AgentStatus; import com.thoughtworks.go.domain.BaseCollection; import com.thoughtworks.go.util.StringUtil; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; /** * @understands collection of agents view model */ public class AgentsViewModel extends BaseCollection<AgentViewModel> { private static final String RESOURCE = "resource"; private static final String STATUS = "status"; public AgentsViewModel() { } public AgentsViewModel(AgentViewModel... agentViewModels) { super(agentViewModels); } public void sortBy(Comparator<AgentViewModel> comparator, SortOrder direction) { Collections.sort(this, direction.comparator(comparator)); } public int disabledCount() { return count(AgentStatus.Disabled); } public int pendingCount() { return count(AgentStatus.Pending); } public int enabledCount() { int count = 0; for (AgentViewModel agentViewModel : this) { if (agentViewModel.getStatus().isEnabled()) { count++; } } return count; } public void filter(String filterCriteria) { if (StringUtil.isBlank(filterCriteria)) { return; } final Map<String, String> filters = filters(filterCriteria); if (filters.isEmpty()) { return; } CollectionUtils.filter(this, new Predicate() { public boolean evaluate(Object o) { boolean finalResult = false; AgentViewModel agent = (AgentViewModel) o; for (Map.Entry<String, String> entry : filters.entrySet()) { AgentFilters filter = AgentFilters.valueOf(entry.getKey().toUpperCase()); finalResult = finalResult || filter.matches(agent, entry.getValue()); } return finalResult; } }); } private Map<String, String> filters(String filterCriteria) { String[] filters = filterCriteria.split(","); Map<String, String> filterMap = new HashMap<String, String>(); for (String filter : filters) { String[] keyValue = filter.split(":"); if (keyValue.length == 2 && agentFiltersHas(keyValue[0].trim())) { filterMap.put(keyValue[0].trim(), keyValue[1].trim()); } } return filterMap; } private boolean agentFiltersHas(final String enumKey) { return CollectionUtils.exists(Arrays.asList(AgentFilters.values()), new Predicate() { public boolean evaluate(Object o) { AgentFilters filter = (AgentFilters) o; return filter.name().equals(enumKey.toUpperCase()); } }); } private int count(AgentStatus status) { int count = 0; for (AgentViewModel agentViewModel : this) { if (agentViewModel.getStatus().equals(status)) { count++; } } return count; } public Boolean hasAgentsThatNeedUpgrade() { for (AgentViewModel agentViewModel : this) { if(agentViewModel.needsUpgrade()) return true; } return false; } } enum AgentFilters { RESOURCE { @Override public boolean matches(AgentViewModel agent, final String searchCriteria) { return this.matchesFilter(agent.getResources(), searchCriteria); } }, STATUS { @Override public boolean matches(AgentViewModel agent, String searchCriteria) { return this.matchesFilter(agent.getStatusForDisplay(), searchCriteria); } }, NAME { @Override public boolean matches(AgentViewModel agent, String searchCriteria) { return this.matchesFilter(agent.getHostname(), searchCriteria); } }, IP { @Override public boolean matches(AgentViewModel agent, String searchCriteria) { return this.matchesFilter(agent.getIpAddress(), searchCriteria); } }, OS { @Override public boolean matches(AgentViewModel agent, String searchCriteria) { return this.matchesFilter(agent.getOperatingSystem(), searchCriteria); } }, ENVIRONMENT { @Override public boolean matches(AgentViewModel agent, final String searchCriteria) { return this.matchesFilter(agent.getEnvironments(), searchCriteria); } }; static boolean matchesFilter(Collection collection, final String searchCriteria) { final SearchCriteria criteria = new SearchCriteria(searchCriteria); return CollectionUtils.exists(collection, new Predicate() { public boolean evaluate(Object o) { return criteria.matches((String) o); } }); } static boolean matchesFilter(String agentValue, String searchCriteria) { return new SearchCriteria(searchCriteria).matches(agentValue); } public abstract boolean matches(AgentViewModel agent, String searchCriteria); }
[ "godev@thoughtworks.com" ]
godev@thoughtworks.com
ef52fc2969301d69d020cc8556c1b4fe3fb0b343
4775a7b24975396d10c7868fff978705ac784343
/bats-engine/src/main/java/org/lealone/bats/engine/server/BatsServerEngine.java
baa996e8d8a8b2b1c4f4b318e37a8c0da9f682df
[ "Apache-2.0" ]
permissive
jollyant/Bats
5740bebeff1e6053796eaf515aee862561d551b2
9febc72c1057ad0fa967e47467d56bc973e85c72
refs/heads/master
2022-12-25T01:32:56.444410
2020-04-09T03:56:50
2020-04-09T03:56:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,638
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.lealone.bats.engine.server; import java.util.Map; import org.lealone.bats.engine.sql.BatsSQLEngine; import org.lealone.server.ProtocolServer; import org.lealone.server.ProtocolServerEngineBase; public class BatsServerEngine extends ProtocolServerEngineBase { public static final String NAME = BatsSQLEngine.NAME; private final BatsServer server = new BatsServer(); public BatsServerEngine() { super(BatsSQLEngine.NAME); } @Override public ProtocolServer getProtocolServer() { return server; } @Override protected ProtocolServer getProtocolServer(int port) { return server; } @Override public void init(Map<String, String> config) { server.init(config); } @Override public void close() { server.stop(); } }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
8177cce83d3720833abca138e6a3591f075e2c82
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_7011823ea30f7ff5ce588577c6bfaa9d2c3ed8b1/UpdateVRRPVirtualLinkAddressCommand/22_7011823ea30f7ff5ce588577c6bfaa9d2c3ed8b1_UpdateVRRPVirtualLinkAddressCommand_s.java
4350e183b1d228dfdc2da5058deef82e50ae5d78
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,895
java
package org.opennaas.extensions.router.capability.vrrp.shell; import org.apache.felix.gogo.commands.Argument; import org.apache.felix.gogo.commands.Command; import org.opennaas.core.resources.IResource; import org.opennaas.core.resources.shell.GenericKarafCommand; import org.opennaas.extensions.router.capability.vrrp.IVRRPCapability; import org.opennaas.extensions.router.model.VRRPGroup; /** * * @author Adrian Rosello * */ @Command(scope = "vrrp", name = "updateVirtualLinkAddress", description = "Update VRRP group virtual link address") public class UpdateVRRPVirtualLinkAddressCommand extends GenericKarafCommand { @Argument(index = 0, name = "resourceType:resourceName", description = "Name of the router to update the VRRP virtual IP address", required = true, multiValued = false) private String resourceId; @Argument(index = 1, name = "vrrpGroupId", description = "The VRRP group ID", required = true, multiValued = false) private int vrrpGroupId; @Argument(index = 2, name = "virtualLinkAddress", description = "The new VRRP virtual link address", required = true, multiValued = false) private String virtualLinkAddress; @Override protected Object doExecute() throws Exception { printInitCommand("Update VRRP virtual link address"); try { IResource router = getResourceFromFriendlyName(resourceId); IVRRPCapability vrrpCapability = (IVRRPCapability) router.getCapabilityByInterface(IVRRPCapability.class); VRRPGroup vrrpGroup = new VRRPGroup(); vrrpGroup.setVrrpName(vrrpGroupId); vrrpGroup.setVirtualLinkAddress(virtualLinkAddress); vrrpCapability.updateVRRPVirtualLinkAddress(vrrpGroup); printEndCommand(); return -1; } catch (Exception e) { printError("Error updating VRRP virtual Link address."); printError(e); printEndCommand(); return -1; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cde8c2044a10985f5b15d062483a40b5f9157e39
d280492697e7b3fcbf4a60d9658280c3b1980284
/app/src/main/java/com/zhongxin/home/testfor_cnc/view/Fragment_H.java
849ffa88406b306474266428922033dcff05d69b
[]
no_license
wzp09tjlg/Testfor_cnc
23107a15940e4d4b6949822e09635ab532ea9163
04d99888358dab0bbcc07162bebcfb05a7cbe856
refs/heads/master
2021-01-10T01:17:39.297754
2016-01-19T11:10:24
2016-01-19T11:10:24
47,253,236
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package com.zhongxin.home.testfor_cnc.view; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.zhongxin.home.testfor_cnc.R; /** * Created by Walter on 2015/8/27. */ public class Fragment_H extends Fragment { private TextView text; private String menuInfo; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_h,container,false); findView(view); return view; } @Override public void onResume() { super.onResume(); menuInfo= getArguments().getString("DATA",""); text.setText(menuInfo); } private void findView(View view){ text = (TextView)view.findViewById(R.id.horizontal_text); } }
[ "wzp09tjlg@163.com" ]
wzp09tjlg@163.com
8acb4b82a0f2ede69ea03069db62c555b48fcdf0
8814ab730730325f27578898bb4700a903e9eeaa
/lc_app/src/main/java/com/common/openapi/entity/DeviceAlarmStatusData.java
d40b166d0cac79a70cc3fe07123c869eddb183e8
[ "Apache-2.0" ]
permissive
dylan2021/LiveVideo
a506c336a7bfdd8039caaf9f8911cb151445f02d
974f9156f05c2c32ec895600e31563b30270ac13
refs/heads/master
2023-01-10T11:31:54.401764
2020-11-11T03:20:02
2020-11-11T03:20:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
421
java
package com.common.openapi.entity; import java.io.Serializable; public class DeviceAlarmStatusData implements Serializable { public DeviceAlarmStatusData.RequestData data = new DeviceAlarmStatusData.RequestData(); public static class RequestData implements Serializable { public String token; public String deviceId; public String channelId="0"; public boolean enable; } }
[ "157308001@qq.com" ]
157308001@qq.com
2b308c9b6e67e7b977c2c0aab008d998ef744bce
2c2d59b5b4abe56378d10df257b8db91ba197981
/复兴/scf-bas-paren/scf-bas-api/src/main/java/com/huateng/scf/bas/crm/service/IIfspBcrmBaseService.java
3ab8661c6fe61ce579f6b1ea4339242e8396ab07
[]
no_license
soldiers1989/documentResource
52f58bf2ed0f4b63b9f92b07218facddebd92bcb
b7311ed9b3bc17e2580778c2d1b42cf9c4f35644
refs/heads/master
2020-03-28T08:58:27.430389
2018-09-07T09:17:23
2018-09-07T09:17:23
148,003,900
0
1
null
2018-09-09T07:43:35
2018-09-09T07:43:35
null
UTF-8
Java
false
false
419
java
package com.huateng.scf.bas.crm.service; import java.util.List; import com.huateng.scf.bas.crm.model.BCrmBaseInfoAndEntInfo; import com.huateng.scube.server.annotation.ScubeParam; public interface IIfspBcrmBaseService { // 用于客户新增页面,返回同时拥有两个表字段内容 public List<BCrmBaseInfoAndEntInfo> findBCrmBaseInfoAndEnt( @ScubeParam("list") List<BCrmBaseInfoAndEntInfo> list); }
[ "1545109330@qq.com" ]
1545109330@qq.com
321696702affa2ad8ae8ca028e57b34af40d4c94
984d15e076108a3bcf6a698ef9e4cfca8fcb6d90
/api/src/main/java/io/hyperfoil/api/config/SequenceImpl.java
db150eb75e7021533f20051f3f1ebc1c86087900
[ "Apache-2.0" ]
permissive
diegolovison/Hyperfoil
349e0a9bb66e81bc12f8d2c7ba7cab5a308731cd
9ae5e4f6c62da15ab540ffe57dc24a988c4b4022
refs/heads/master
2022-08-17T21:46:04.736945
2019-07-25T11:19:41
2019-07-25T11:19:41
199,450,593
0
0
null
2019-07-29T12:41:29
2019-07-29T12:41:28
null
UTF-8
Java
false
false
1,686
java
package io.hyperfoil.api.config; import io.hyperfoil.api.session.ResourceUtilizer; import io.hyperfoil.api.session.SequenceInstance; import io.hyperfoil.api.session.Session; import io.hyperfoil.function.SerializableSupplier; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; class SequenceImpl implements Sequence { private static final Logger log = LoggerFactory.getLogger(SequenceImpl.class); private final SerializableSupplier<Phase> phase; private final String name; private final int id; private final Step[] steps; public SequenceImpl(SerializableSupplier<Phase> phase, String name, int id, Step[] steps) { this.phase = phase; this.name = name; this.id = id; this.steps = steps; } @Override public int id() { return id; } @Override public void instantiate(Session session, int index) { SequenceInstance instance = session.acquireSequence(); if (instance == null) { log.error("Cannot instantiate sequence {}({}), no free instances.", name, id); session.fail(new IllegalStateException("No free sequence instances")); } else { instance.reset(name, id, index, steps); session.enableSequence(instance); } } @Override public void reserve(Session session) { for (Step a : steps) { if (a instanceof ResourceUtilizer) { ((ResourceUtilizer) a).reserve(session); } } } @Override public String name() { return name; } @Override public Phase phase() { return phase.get(); } @Override public Step[] steps() { return steps; } }
[ "rvansa@redhat.com" ]
rvansa@redhat.com
3b62bce2a10e3abdf0df9c961394ad023002d426
18cea10a3359ed64661efb2aed9e08188b8d84c3
/security-admin/src/main/java/com/gogbuy/security/admin/modules/security/jwt/token/RawAccessJwtToken.java
c851be795fe4b7608c9ea752c7f820fca073e9f8
[]
no_license
zengchi/gogbuy-security
a276b95990e3a672f8a4a7fb45797158c0513df7
2c056fbb668dae1ef8df729eed35991bf7517d2d
refs/heads/master
2020-12-05T21:12:34.469204
2018-03-23T02:58:12
2018-03-23T02:58:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
package com.gogbuy.security.admin.modules.security.jwt.token; import com.gogbuy.security.admin.modules.security.jwt.exception.JwtExpiredTokenException; import io.jsonwebtoken.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.BadCredentialsException; /** * Created with IntelliJ IDEA. * Description: * User: Mr.Yangxiufeng * Date: 2018-02-06 * Time: 10:11 */ public class RawAccessJwtToken implements JwtToken { private static Logger logger = LoggerFactory.getLogger(RawAccessJwtToken.class); private String token; public RawAccessJwtToken(String token) { this.token = token; } @Override public String getToken() { return this.token; } /** * Parses and validates JWT Token signature. * * @throws BadCredentialsException * @throws JwtExpiredTokenException * */ public Jws<Claims> parseClaims(String signingKey) { try { return Jwts.parser().setSigningKey(signingKey).parseClaimsJws(this.token); } catch (UnsupportedJwtException | MalformedJwtException | IllegalArgumentException | SignatureException ex) { logger.error("Invalid JWT Token", ex); throw new BadCredentialsException("Invalid token: ", ex); } catch (ExpiredJwtException expiredEx) { logger.info("JWT Token is expired", expiredEx); throw new JwtExpiredTokenException(this, "Token expired", expiredEx); } } }
[ "469863752@qq.com" ]
469863752@qq.com
6644909c7a5a62c77ab0b6c34e387d6ae125b0f6
30aa9ece1641c50bdb1742e6430d3a0de4c5a4e6
/corejava/src/main/java/org/jackalope/study/corejava/corejava9/v2ch08/chart/InverseEditor.java
24b8240ddbd2282e34d910f3a80db87264e7150d
[]
no_license
hedgehog-zowie/jackalope
ffe1a5bd3109f35d2a80a3e709c7b76a584c8b53
aef5449fcbdaf64513d055279ba2fbf7110849fd
refs/heads/master
2021-01-17T09:12:34.302269
2016-04-01T10:18:10
2016-04-01T10:18:10
21,295,813
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package org.jackalope.study.corejava.corejava9.v2ch08.chart; import java.awt.*; import java.beans.*; import javax.swing.*; /** * The property editor for the inverse property of the ChartBean. The inverse property toggles * between colored graph bars and colored background. * @version 1.30 2007-10-03 * @author Cay Horstmann */ public class InverseEditor extends PropertyEditorSupport { private ImageIcon normalIcon = new ImageIcon(getClass().getResource("ChartBean_MONO_16x16.gif")); private ImageIcon inverseIcon = new ImageIcon(getClass().getResource( "ChartBean_INVERSE_16x16.gif")); public Component getCustomEditor() { return new InverseEditorPanel(this); } public boolean supportsCustomEditor() { return true; } public boolean isPaintable() { return true; } public String getAsText() { return null; } public String getJavaInitializationString() { return "" + getValue(); } public void paintValue(Graphics g, Rectangle bounds) { ImageIcon icon = (Boolean) getValue() ? inverseIcon : normalIcon; int x = bounds.x + (bounds.width - icon.getIconWidth()) / 2; int y = bounds.y + (bounds.height - icon.getIconHeight()) / 2; g.drawImage(icon.getImage(), x, y, null); } }
[ "hedgehog.zowie@gmail.com" ]
hedgehog.zowie@gmail.com
7f7de66b9354aa2aeb3e794cf5e6977a2419eb8a
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/C2472f71.java
b9315cf7177b3d8366f08797c7b9daa66d59edac
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
728
java
package defpackage; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.view.View; import org.chromium.chrome.browser.tasks.tab_management.TabGridDialogView; /* renamed from: f71 reason: default package and case insensitive filesystem */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public class C2472f71 extends AnimatorListenerAdapter { public final /* synthetic */ TabGridDialogView F; public C2472f71(TabGridDialogView tabGridDialogView) { this.F = tabGridDialogView; } public void onAnimationEnd(Animator animator) { View view = this.F.L; if (view != null) { view.setAlpha(1.0f); } } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
cfd6bfc63c32faa563c18fe6b69f1687229f5a7f
f35d4f4c2f106c25059eb023d20c0033cf501494
/app/src/main/java/com/seabreeze/life/utils/AppConfig.java
f4d6e957169067f28209238cd68cc139c61a3539
[]
no_license
milanxiaotiejiang/Life
3448ab020cad46b7fb90e7ae21534df17af6d6f4
7cd1083054a6b34d9b09456ad558eb5c4de00b33
refs/heads/master
2020-03-19T13:20:14.675377
2018-07-19T08:55:54
2018-07-19T08:55:54
136,574,084
0
0
null
null
null
null
UTF-8
Java
false
false
190
java
package com.seabreeze.life.utils; public class AppConfig { public static final String DEFAULT_JOSN_CACHE = "temp"; public static final long DEFAULT_CACHE_SIZE = 50 * 1024 * 1024; }
[ "765151629@qq.com" ]
765151629@qq.com
1d7cac5631ebe9297a5d075f44edded80def4894
b997ef6918f777535d52345537b8f2f5dfa592ed
/src/main/java/algorithm_practice/LeetCode/code200/M216_组合总和3.java
87cc8017655ea06eb246c8cac4faaff00bfcf713
[]
no_license
lemonlmlian/algorithms
6345661f184a051fcc8ff5b436f6314c326969c8
234165b4c76d3110cdb7c9d4a35f9e7c0d3a63c0
refs/heads/master
2023-07-19T23:49:36.637451
2021-08-31T22:16:43
2021-08-31T22:17:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
package algorithm_practice.LeetCode.code200; import com.google.common.collect.Lists; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; import java.util.Deque; import java.util.LinkedList; import java.util.List; /* 找出所有相加之和为 n 的 k 个数的组合。组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字。 说明: 所有数字都是正整数。 解集不能包含重复的组合。  示例 1: 输入: k = 3, n = 7 输出: [[1,2,4]] 示例 2: 输入: k = 3, n = 9 输出: [[1,2,6], [1,3,5], [2,3,4]] 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/combination-sum-iii 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ public class M216_组合总和3 { @Test public void testCase() { int k = 3; int n = 9; List<List<Integer>> excepted = Lists.newArrayList( Lists.newArrayList(1,2,6), Lists.newArrayList(1,3,5), Lists.newArrayList(2,3,4)); Assert.assertEquals(excepted, combinationSum3(k, n)); } public List<List<Integer>> combinationSum3(int k, int n) { List<List<Integer>> res = new ArrayList<>(); Deque<Integer> path = new LinkedList<>(); dfs(res, path, 1, 9, n, k); return res; } private void dfs(List<List<Integer>> res, Deque<Integer> path, int begin, int end, int target, int k) { if (target < 0) { return; } if (target == 0 && path.size() == k) { res.add(new ArrayList<>(path)); } for (int i = begin; i <= end; i++) { path.addLast(i); dfs(res, path, i+1, end, target-i, k); path.removeLast(); } } }
[ "tb178271@alibaba-inc.com" ]
tb178271@alibaba-inc.com
3ce9b16c148074168f6ba5e1184e5cf3e6e17578
129c0089f63387f62ebe8ffa200b8be70dc08c20
/src/main/java/com/lothrazar/cyclicmagic/block/crafter/BlockCrafter.java
d55a8d0035ec3ae59c138fedabee5641013b487a
[ "MIT" ]
permissive
HellFirePvP/Cyclic
df038ac61c5f84e932eb50850ade343d50dfe523
47a7c874c475d5dd281e21bb773d4b16e2b08b15
refs/heads/master
2020-04-18T20:34:59.754140
2019-01-14T04:25:14
2019-01-14T04:25:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,554
java
/******************************************************************************* * The MIT License (MIT) * * Copyright (C) 2014-2018 Sam Bassett (aka Lothrazar) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ package com.lothrazar.cyclicmagic.block.crafter; import com.lothrazar.cyclicmagic.IContent; import com.lothrazar.cyclicmagic.block.core.BlockBaseFacingInventory; import com.lothrazar.cyclicmagic.data.IHasRecipe; import com.lothrazar.cyclicmagic.gui.ForgeGuiHandler; import com.lothrazar.cyclicmagic.guide.GuideCategory; import com.lothrazar.cyclicmagic.registry.BlockRegistry; import com.lothrazar.cyclicmagic.registry.RecipeRegistry; import com.lothrazar.cyclicmagic.util.Const; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.common.registry.GameRegistry; public class BlockCrafter extends BlockBaseFacingInventory implements IHasRecipe, IContent { public static int FUEL_COST = 0; public BlockCrafter() { super(Material.ROCK, ForgeGuiHandler.GUI_INDEX_CRAFTER); this.setTranslucent(); } @Override public TileEntity createTileEntity(World worldIn, IBlockState state) { return new TileEntityCrafter(); } @Override public IRecipe addRecipe() { return RecipeRegistry.addShapedRecipe(new ItemStack(this), "pcp", "y x", "pkp", 'k', new ItemStack(Blocks.BONE_BLOCK), 'x', new ItemStack(Blocks.OBSERVER), 'y', new ItemStack(Blocks.PISTON), 'c', "workbench", 'p', "dyePurple"); } @Override public void register() { BlockRegistry.registerBlock(this, "auto_crafter", GuideCategory.BLOCKMACHINE); GameRegistry.registerTileEntity(TileEntityCrafter.class, Const.MODID + "auto_crafter_te"); } private boolean enabled; @Override public boolean enabled() { return enabled; } @Override public void syncConfig(Configuration config) { enabled = config.getBoolean("AutoCrafter", Const.ConfigCategory.content, true, Const.ConfigCategory.contentDefaultText); FUEL_COST = config.getInt("auto_crafter", Const.ConfigCategory.fuelCost, 150, 0, 500000, Const.ConfigText.fuelCost); } }
[ "samson.bassett@gmail.com" ]
samson.bassett@gmail.com
d0b94eeee926b90e85f456cc39bfde7746523409
fac31064e919500356f161aa1cf27996882706b4
/app/src/main/java/com/abt/mvp/di/scope/ActivityScope.java
ab51d55710307e9c3870d20202a7b00366a1cf7c
[]
no_license
AppBaseLib/MvpBasicFrame
61d85dabce7bb23b78731f923b536a260d75d571
7a8fdcb28184a4506afd4d76789ecb2f67faf9d9
refs/heads/master
2021-07-19T16:14:16.433721
2019-01-06T23:30:15
2019-01-06T23:30:15
147,374,127
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.abt.mvp.di.scope; import java.lang.annotation.Retention; import javax.inject.Scope; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * @描述: @ActivityScope * @作者: @黄卫旗 * @创建时间: @06/06/2018 */ @Scope @Retention(RUNTIME) public @interface ActivityScope { }
[ "askviky2010@gmail.com" ]
askviky2010@gmail.com
367a070984a3df297f4877a155b56c98d59ce4db
c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd
/google/ads/googleads/v5/googleads-java/proto-googleads-java/src/main/java/com/google/ads/googleads/v5/resources/LandingPageViewName.java
bd1cdabe3160ff35232203bf10276c037bad1566
[ "Apache-2.0" ]
permissive
dizcology/googleapis-gen
74a72b655fba2565233e5a289cfaea6dc7b91e1a
478f36572d7bcf1dc66038d0e76b9b3fa2abae63
refs/heads/master
2023-06-04T15:51:18.380826
2021-06-16T20:42:38
2021-06-16T20:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,800
java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.ads.googleads.v5.resources; import com.google.api.pathtemplate.PathTemplate; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @Generated("by gapic-generator-java") public class LandingPageViewName implements ResourceName { private static final PathTemplate CUSTOMER_LANDING_PAGE_VIEW = PathTemplate.createWithoutUrlEncoding( "customers/{customer}/landingPageViews/{landing_page_view}"); private volatile Map<String, String> fieldValuesMap; private final String customer; private final String landingPageView; @Deprecated protected LandingPageViewName() { customer = null; landingPageView = null; } private LandingPageViewName(Builder builder) { customer = Preconditions.checkNotNull(builder.getCustomer()); landingPageView = Preconditions.checkNotNull(builder.getLandingPageView()); } public String getCustomer() { return customer; } public String getLandingPageView() { return landingPageView; } public static Builder newBuilder() { return new Builder(); } public Builder toBuilder() { return new Builder(this); } public static LandingPageViewName of(String customer, String landingPageView) { return newBuilder().setCustomer(customer).setLandingPageView(landingPageView).build(); } public static String format(String customer, String landingPageView) { return newBuilder() .setCustomer(customer) .setLandingPageView(landingPageView) .build() .toString(); } public static LandingPageViewName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map<String, String> matchMap = CUSTOMER_LANDING_PAGE_VIEW.validatedMatch( formattedString, "LandingPageViewName.parse: formattedString not in valid format"); return of(matchMap.get("customer"), matchMap.get("landing_page_view")); } public static List<LandingPageViewName> parseList(List<String> formattedStrings) { List<LandingPageViewName> list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } public static List<String> toStringList(List<LandingPageViewName> values) { List<String> list = new ArrayList<>(values.size()); for (LandingPageViewName value : values) { if (value == null) { list.add(""); } else { list.add(value.toString()); } } return list; } public static boolean isParsableFrom(String formattedString) { return CUSTOMER_LANDING_PAGE_VIEW.matches(formattedString); } @Override public Map<String, String> getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder<String, String> fieldMapBuilder = ImmutableMap.builder(); if (customer != null) { fieldMapBuilder.put("customer", customer); } if (landingPageView != null) { fieldMapBuilder.put("landing_page_view", landingPageView); } fieldValuesMap = fieldMapBuilder.build(); } } } return fieldValuesMap; } public String getFieldValue(String fieldName) { return getFieldValuesMap().get(fieldName); } @Override public String toString() { return CUSTOMER_LANDING_PAGE_VIEW.instantiate( "customer", customer, "landing_page_view", landingPageView); } @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null || getClass() == o.getClass()) { LandingPageViewName that = ((LandingPageViewName) o); return Objects.equals(this.customer, that.customer) && Objects.equals(this.landingPageView, that.landingPageView); } return false; } @Override public int hashCode() { int h = 1; h *= 1000003; h ^= Objects.hashCode(customer); h *= 1000003; h ^= Objects.hashCode(landingPageView); return h; } /** Builder for customers/{customer}/landingPageViews/{landing_page_view}. */ public static class Builder { private String customer; private String landingPageView; protected Builder() {} public String getCustomer() { return customer; } public String getLandingPageView() { return landingPageView; } public Builder setCustomer(String customer) { this.customer = customer; return this; } public Builder setLandingPageView(String landingPageView) { this.landingPageView = landingPageView; return this; } private Builder(LandingPageViewName landingPageViewName) { this.customer = landingPageViewName.customer; this.landingPageView = landingPageViewName.landingPageView; } public LandingPageViewName build() { return new LandingPageViewName(this); } } }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
d9961c01ea07f8fd3d048eae81d328a92d12afed
4ea7ec07598952bcd0e5594b619f0769859d5624
/src/main/java/com/demo/dao/OrderDao.java
7e6efd0fd8377493e668574e3ee8f168d95feb15
[]
no_license
MrWanglihua/spring-orm
d7bb09d0f3af55c23d003087a8747ecd2f672f62
867c7720940cacf9c25c15b66be2a47ae26ff605
refs/heads/master
2020-05-16T11:37:09.409140
2019-04-23T13:43:34
2019-04-23T13:43:34
183,022,074
0
0
null
null
null
null
UTF-8
Java
false
false
1,555
java
package com.demo.dao; import com.gupaoedu.vip.orm.demo.entity.Order; import com.gupaoedu.vip.orm.framework.BaseDaoSupport; import org.springframework.stereotype.Repository; import javax.annotation.Resource; import javax.core.common.jdbc.datasource.DynamicDataSource; import javax.sql.DataSource; import java.text.SimpleDateFormat; import java.util.Date; @Repository public class OrderDao extends BaseDaoSupport<Order, Long> { private SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy"); private SimpleDateFormat fullDataFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private DynamicDataSource dataSource; @Override protected String getPKColumn() {return "id";} @Resource(name="dynamicDataSource") public void setDataSource(DataSource dataSource) { this.dataSource = (DynamicDataSource)dataSource; this.setDataSourceReadOnly(dataSource); this.setDataSourceWrite(dataSource); } /** * @throws Exception * */ public boolean insertOne(Order order) throws Exception{ //约定优于配置 Date date = null; if(order.getCreateTime() == null){ date = new Date(); order.setCreateTime(date.getTime()); }else { date = new Date(order.getCreateTime()); } Integer dbRouter = Integer.valueOf(yearFormat.format(date)); System.out.println("自动分配到【DB_" + dbRouter + "】数据源"); this.dataSource.getDataSourceEntry().set(dbRouter); order.setCreateTimeFmt(fullDataFormat.format(date)); Long orderId = super.insertAndReturnId(order); order.setId(orderId); return orderId > 0; } }
[ "1234" ]
1234
1cb977081431ac97230fe7d94a86d4ea848436c6
e7eb4595206cc9718e2ed4b54272fccdc6a6c3c9
/MediaOrbCodeGenerator/src/com/streetfiresound/codegenerator/rules/ULongRule.java
50b3c37d1e7570fcf2cc7fa38120a1b36a08384b
[]
no_license
sgstreet/StreetFireSound
8147ea7391fe639e1912fae0a75069c6c3b9bb1f
dd6ac7341fd660c08232c12f60a2f59e1036eaaa
refs/heads/master
2021-01-13T01:50:05.625953
2013-07-08T21:10:16
2013-07-08T21:10:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,344
java
/* * Copyright (C) 2004 by StreetFire Sound Labs * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: ULongRule.java,v 1.2 2005/02/24 03:03:35 stephen Exp $ */ package com.streetfiresound.codegenerator.rules; import com.streetfiresound.codegenerator.types.ULongType; /** * @author george * */ public class ULongRule extends RuleDefinition { /** * Constructor for ULongRule. */ public ULongRule(ULongType it) { super(it); } /** * @see com.streetfiresound.codegenerator.rules.RuleOutput#outputToFile() */ public void outputToFile(java.io.OutputStream ostream)throws java.io.IOException { ostream.write("int".getBytes()); } }
[ "stephen@redrocketcomputing.com" ]
stephen@redrocketcomputing.com
8d2d266e61effab6d6a651ea49a428e989f53230
51175e70e3adcc4365d346a0721e3911adce6ada
/javamelody-core/src/test/java/net/bull/javamelody/internal/model/TestMavenArtifact.java
e913f2b9ef1d2f7a9ec4547beefaaf35212135b2
[ "Apache-2.0" ]
permissive
binlecode/javamelody
2f951f7b526c3a18eb7257a2e5f34ef760fb09b7
dfad124af8925295e86e3df5138ccab2efb6bee5
refs/heads/master
2020-06-19T08:59:47.825542
2019-07-12T19:27:24
2019-07-12T19:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,909
java
/* * Copyright 2008-2019 by Emeric Vernat * * This file is part of Java Melody. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.bull.javamelody.internal.model; import static org.easymock.EasyMock.createNiceMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import javax.servlet.ServletContext; import org.easymock.IAnswer; import org.junit.Test; import net.bull.javamelody.internal.common.Parameters; /** * Test for MavenArtifact. * @author Emeric Vernat */ public class TestMavenArtifact { /** * Test. * @throws ClassNotFoundException e * @throws IOException e */ @Test public void testGetSourceJarFile() throws ClassNotFoundException, IOException { final Class<?> clazz = Class.forName("org.apache.commons.dbcp2.BasicDataSource"); final URL location = clazz.getProtectionDomain().getCodeSource().getLocation(); assertNotNull("getSourceJarFile", MavenArtifact.getSourceJarFile(location)); } /** * Test. * @throws IOException e */ @Test public void testGetWebappDependencies() throws IOException { final ServletContext context = createNiceMock(ServletContext.class); final String javamelodyDir = "/META-INF/maven/net.bull.javamelody/"; final String webapp = javamelodyDir + "javamelody-test-webapp/"; expect(context.getResourcePaths("/META-INF/maven/")) .andReturn(Collections.singleton(javamelodyDir)).anyTimes(); expect(context.getResourcePaths(javamelodyDir)).andReturn(Collections.singleton(webapp)) .anyTimes(); final IAnswer<InputStream> answer = new IAnswer<InputStream>() { @Override public InputStream answer() throws Throwable { return getClass().getResourceAsStream("/pom.xml"); } }; expect(context.getResourceAsStream(webapp + "pom.xml")).andAnswer(answer).anyTimes(); final Set<String> dependencies = new LinkedHashSet<String>(Arrays.asList( "/WEB-INF/lib/jrobin-1.5.9.jar", "/WEB-INF/lib/javamelody-core-1.65.0.jar")); expect(context.getResourcePaths("/WEB-INF/lib/")).andReturn(dependencies).anyTimes(); expect(context.getMajorVersion()).andReturn(2).anyTimes(); expect(context.getMinorVersion()).andReturn(5).anyTimes(); replay(context); Parameters.initialize(context); final Map<String, MavenArtifact> webappDependencies = MavenArtifact.getWebappDependencies(); assertFalse("getWebappDependencies", webappDependencies.isEmpty()); verify(context); for (final MavenArtifact dependency : webappDependencies.values()) { if (dependency != null) { assertNotNull("groupId", dependency.getGroupId()); assertNotNull("artifactId", dependency.getArtifactId()); assertNotNull("version", dependency.getVersion()); assertNotNull("name", dependency.getName()); assertNotNull("url", dependency.getUrl()); assertNotNull("licenseUrlsByName", dependency.getLicenseUrlsByName()); assertNotNull("allDependencies", dependency.getAllDependencies()); } } } }
[ "evernat@free.fr" ]
evernat@free.fr
4a0b0a63034d865bc3c9ed9e27338ade873399e3
3f5d19ac4afb5ce1d38df0aa6638e18103f468e0
/com.revolsys.open.core/src/main/java/com/revolsys/parallel/AbstractRunnable.java
4cda674c47b6e4ff423bb2ce5bf9ae29e32a6480
[ "Apache-2.0" ]
permissive
lequynhnhu/com.revolsys.open
e94a25a8a127f5315a10aad32da6776407857e60
d660384b05a402fb4b62d30d1592563c74ae8df5
refs/heads/master
2020-12-25T03:39:55.125381
2015-02-21T01:18:19
2015-02-21T01:18:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,427
java
package com.revolsys.parallel; import java.awt.Component; import java.awt.Cursor; import java.awt.KeyboardFocusManager; import java.awt.Window; import javax.swing.RootPaneContainer; import javax.swing.SwingUtilities; import com.revolsys.util.ExceptionUtil; public abstract class AbstractRunnable implements Runnable { public static Window getActiveWindow() { final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); final Window activeWindow = keyboardFocusManager.getActiveWindow(); if (activeWindow == null) { final Window[] windows = Window.getOwnerlessWindows(); for (final Window window : windows) { if (window.isVisible()) { return window; } } } return activeWindow; } private static boolean isEventDispatchThread() { try { return SwingUtilities.isEventDispatchThread(); } catch (final NullPointerException e) { return false; } } private static final Cursor WAIT_CURSOR = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); private boolean showWaitCursor = false; protected void doRun() { } public boolean isShowWaitCursor() { return this.showWaitCursor; } @Override public final void run() { try { if (isShowWaitCursor() && isEventDispatchThread()) { final Window activeWindow = getActiveWindow(); if (activeWindow == null) { doRun(); } else { Component component; Component glassPane = null; if (activeWindow instanceof RootPaneContainer) { final RootPaneContainer container = (RootPaneContainer)activeWindow; glassPane = container.getGlassPane(); glassPane.setVisible(true); component = glassPane; } else { component = activeWindow; } final Cursor cursor = activeWindow.getCursor(); try { component.setCursor(WAIT_CURSOR); doRun(); } finally { if (glassPane != null) { glassPane.setVisible(false); } component.setCursor(cursor); } } } else { doRun(); } } catch (final Throwable t) { ExceptionUtil.log(getClass(), t); } } public void setShowWaitCursor(final boolean showWaitCursor) { this.showWaitCursor = showWaitCursor; } }
[ "paul.austin@revolsys.com" ]
paul.austin@revolsys.com
b701255f50fd0e3ccea4ddd5215a371cba127d7f
9687386c9f4fea16122c6c841dc0e7a6a85121bb
/src/main/java/m06/s06/Dog.java
9bd2684fe8b311ae5621760528c6c48173eb52a4
[]
no_license
DylanBLQ/jse
667046afcd312ea2edd1faf108c1d0bfe5f26611
c3dc2e479a3a9dac42875285798514dfe11ab7cd
refs/heads/master
2023-02-28T15:38:07.941728
2021-01-28T11:10:04
2021-01-28T11:10:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package m06.s06; import java.util.Objects; public class Dog { private String name; private String owner; public Dog(String name, String owner) { this.name = name; this.owner = owner; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } @Override public boolean equals(Object obj) { // or use IDE auto-generation tool if (obj == this) { return true; } if (!(obj instanceof Dog)) { return false; } Dog that = (Dog) obj; if (Objects.equals(this.name, that.name) && Objects.equals(this.owner, that.owner)) { return true; } return false; } @Override public int hashCode() { // consider using an external library for better performance // or use IDE auto-generation tool // or extract code from Arrays.hashCode() return Objects.hash(name, owner); } @Override public String toString() { // or use IDE auto-generation tool return "Dog [" + name + ", " + owner + "]"; } }
[ "egalli64@gmail.com" ]
egalli64@gmail.com
c17c6d5f55e0eda657a4bfd857dcddaee03e6a7f
fa123e7abe87528567b54740f6ae559ae7dcc0f6
/Kaos/src/KAOSModel/impl/GoalImpl.java
8f4f8e781ec81c8ef14fb388536b9afb7139391b
[]
no_license
eduardoafs/mkaos
3720ddd2b6b33ed07dd47f86cac41a1b3a6026ad
5c4f51de6e0b915c78f1515781f376e35f3a6764
refs/heads/master
2021-03-24T12:06:14.901863
2018-02-14T16:53:19
2018-02-14T16:53:19
108,117,728
0
0
null
2019-04-02T17:38:15
2017-10-24T11:31:42
Java
UTF-8
Java
false
false
4,705
java
/** */ package KAOSModel.impl; import KAOSModel.Goal; import KAOSModel.KAOSModelPackage; import KAOSModel.Obstacle; import java.util.Collection; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.util.EObjectResolvingEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Goal</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link KAOSModel.impl.GoalImpl#getResolve <em>Resolve</em>}</li> * <li>{@link KAOSModel.impl.GoalImpl#getConflicts <em>Conflicts</em>}</li> * <li>{@link KAOSModel.impl.GoalImpl#getConcerns <em>Concerns</em>}</li> * </ul> * * @generated */ public class GoalImpl extends RefinableNodeImpl implements Goal { /** * The cached value of the '{@link #getResolve() <em>Resolve</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getResolve() * @generated * @ordered */ protected EList<Obstacle> resolve; /** * The cached value of the '{@link #getConflicts() <em>Conflicts</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getConflicts() * @generated * @ordered */ protected EList<Goal> conflicts; /** * The cached value of the '{@link #getConcerns() <em>Concerns</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getConcerns() * @generated * @ordered */ protected EList<KAOSModel.Object> concerns; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected GoalImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return KAOSModelPackage.Literals.GOAL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Obstacle> getResolve() { if (resolve == null) { resolve = new EObjectResolvingEList<Obstacle>(Obstacle.class, this, KAOSModelPackage.GOAL__RESOLVE); } return resolve; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Goal> getConflicts() { if (conflicts == null) { conflicts = new EObjectResolvingEList<Goal>(Goal.class, this, KAOSModelPackage.GOAL__CONFLICTS); } return conflicts; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<KAOSModel.Object> getConcerns() { if (concerns == null) { concerns = new EObjectResolvingEList<KAOSModel.Object>(KAOSModel.Object.class, this, KAOSModelPackage.GOAL__CONCERNS); } return concerns; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case KAOSModelPackage.GOAL__RESOLVE: return getResolve(); case KAOSModelPackage.GOAL__CONFLICTS: return getConflicts(); case KAOSModelPackage.GOAL__CONCERNS: return getConcerns(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case KAOSModelPackage.GOAL__RESOLVE: getResolve().clear(); getResolve().addAll((Collection<? extends Obstacle>)newValue); return; case KAOSModelPackage.GOAL__CONFLICTS: getConflicts().clear(); getConflicts().addAll((Collection<? extends Goal>)newValue); return; case KAOSModelPackage.GOAL__CONCERNS: getConcerns().clear(); getConcerns().addAll((Collection<? extends KAOSModel.Object>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case KAOSModelPackage.GOAL__RESOLVE: getResolve().clear(); return; case KAOSModelPackage.GOAL__CONFLICTS: getConflicts().clear(); return; case KAOSModelPackage.GOAL__CONCERNS: getConcerns().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case KAOSModelPackage.GOAL__RESOLVE: return resolve != null && !resolve.isEmpty(); case KAOSModelPackage.GOAL__CONFLICTS: return conflicts != null && !conflicts.isEmpty(); case KAOSModelPackage.GOAL__CONCERNS: return concerns != null && !concerns.isEmpty(); } return super.eIsSet(featureID); } } //GoalImpl
[ "eduafsilva@gmail.com" ]
eduafsilva@gmail.com
b9b6b737c08c2f10c0cf9a48a57bf63bcd70fe33
93ac2a6ff23385b12bb8f6618b357cefe09b4535
/src/main/java/ast/servicio/probatch/os/service/impl/UnixService.java
a781497d6c5f78cc31dc1d4d119f733629922924
[]
no_license
chgutierrez97/ServicioProbatch
8a52235f1b8697085fc5a442c43575a0f47cfb6f
6e0d8c87cea51693171f7da701f7593af388377a
refs/heads/main
2023-05-01T11:51:32.764659
2021-05-21T13:42:15
2021-05-21T13:42:15
369,545,508
0
0
null
null
null
null
UTF-8
Java
false
false
2,116
java
package ast.servicio.probatch.os.service.impl; import java.util.Arrays; import java.util.Iterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ast.servicio.probatch.domain.Atributo; import ast.servicio.probatch.domain.ParametrosProceso; import ast.servicio.probatch.util.StringCommands; public class UnixService extends LinuxService { public static Logger logger = LoggerFactory.getLogger(UnixService.class); public UnixService() { super(); } public String[] getExecuteCommand(ParametrosProceso parametroP) { StringBuilder parametros = new StringBuilder(); /** * Se Busca armar la siguiente linea de comando * * bin/su - usuario -c 'cd path ; export variable_entorno ; exec * argumento1 argumento2 argumentoN' */ // su - parametros.append(StringCommands.IMPERSONALIZATION_USER_FULL.toString() + StringCommands.HYPHEN.toString()); // syspro parametros.append(parametroP.getUsuario().getNombre()); // parametros.append(StringCommands.STRING_EMPTY.toString()); // -c parametros.append(StringCommands.COMMAND_OPTION.toString()); // parametros.append(StringCommands.STRING_EMPTY.toString()); // 'cd $DIR; parametros.append("'cd " + parametroP.getChdir() + StringCommands.PUNTO_COMA.toString()); if (parametroP.getVarEntornoString() != null) { parametros.append(StringCommands.EXPORT.toString() + parametroP.getVarEntornoString() + StringCommands.PUNTO_COMA.toString()); } parametros.append(StringCommands.EXEC.toString() + parametroP.getComando()); if (parametroP.getArgumentos() != null) { for (Iterator<Atributo> iterator = parametroP.getArgumentos().iterator(); iterator.hasNext();) { Atributo atributo = iterator.next(); parametros.append(StringCommands.STRING_EMPTY.toString()); parametros.append(atributo.getValor()); } } parametros.append(StringCommands.QUOTE_SIMPLE.toString()); String[] comando = { StringCommands.COMMAND_MAIN.toString(), StringCommands.COMMAND_OPTION.toString(), parametros.toString() }; logger.info("COMANDO CONSTRUIDO: " + Arrays.toString(comando)); return comando; } }
[ "audra.zapata@delsur.com.ve" ]
audra.zapata@delsur.com.ve
6d02f6a0ddd9a6460fa296c94fb39f78f66f6e96
611b2f6227b7c3b4b380a4a410f357c371a05339
/src/main/java/android/support/v4/text/TextUtilsCompat.java
841f5af55d6aae1da6309c6b10c940c20b499152
[]
no_license
obaby/bjqd
76f35fcb9bbfa4841646a8888c9277ad66b171dd
97c56f77380835e306ea12401f17fb688ca1373f
refs/heads/master
2022-12-04T21:33:17.239023
2020-08-25T10:53:15
2020-08-25T10:53:15
290,186,830
3
1
null
null
null
null
UTF-8
Java
false
false
2,366
java
package android.support.v4.text; import android.os.Build; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.TextUtils; import java.util.Locale; public final class TextUtilsCompat { private static final String ARAB_SCRIPT_SUBTAG = "Arab"; private static final String HEBR_SCRIPT_SUBTAG = "Hebr"; private static final Locale ROOT = new Locale("", ""); @NonNull public static String htmlEncode(@NonNull String str) { if (Build.VERSION.SDK_INT >= 17) { return TextUtils.htmlEncode(str); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < str.length(); i++) { char charAt = str.charAt(i); if (charAt == '\"') { sb.append("&quot;"); } else if (charAt == '<') { sb.append("&lt;"); } else if (charAt != '>') { switch (charAt) { case '&': sb.append("&amp;"); break; case '\'': sb.append("&#39;"); break; default: sb.append(charAt); break; } } else { sb.append("&gt;"); } } return sb.toString(); } public static int getLayoutDirectionFromLocale(@Nullable Locale locale) { if (Build.VERSION.SDK_INT >= 17) { return TextUtils.getLayoutDirectionFromLocale(locale); } if (locale == null || locale.equals(ROOT)) { return 0; } String maximizeAndGetScript = ICUCompat.maximizeAndGetScript(locale); if (maximizeAndGetScript == null) { return getLayoutDirectionFromFirstChar(locale); } return (maximizeAndGetScript.equalsIgnoreCase(ARAB_SCRIPT_SUBTAG) || maximizeAndGetScript.equalsIgnoreCase(HEBR_SCRIPT_SUBTAG)) ? 1 : 0; } private static int getLayoutDirectionFromFirstChar(@NonNull Locale locale) { switch (Character.getDirectionality(locale.getDisplayName(locale).charAt(0))) { case 1: case 2: return 1; default: return 0; } } private TextUtilsCompat() { } }
[ "obaby.lh@gmail.com" ]
obaby.lh@gmail.com
60e3999586a7cce5d5591c8613e49bf97672e160
813188d6cd5588b0dc4e7451280aad2b9d822baa
/config-migration/src/test/java/com/quorum/tessera/config/builder/SslTrustModeFactoryTest.java
0dd8d43459fe35f946165f768996fcbd70e9f274
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
kaleido-io/tessera
151534755672a1a73689ded576495ad9547e938a
0f8e1717d287464ed7930abb35ad918903ad7441
refs/heads/master
2023-03-07T13:43:43.975366
2021-05-21T18:43:07
2021-05-21T18:43:07
180,647,142
0
2
Apache-2.0
2021-07-10T12:27:19
2019-04-10T19:09:31
Java
UTF-8
Java
false
false
1,205
java
package com.quorum.tessera.config.builder; import static org.assertj.core.api.Assertions.assertThat; import com.quorum.tessera.config.SslTrustMode; import java.util.EnumMap; import org.junit.Test; public class SslTrustModeFactoryTest { @Test public void resolveSslTrustModeNone() { assertThat(SslTrustModeFactory.resolveByLegacyValue(null)).isEqualTo(SslTrustMode.NONE); assertThat(SslTrustModeFactory.resolveByLegacyValue("BOGUS")).isEqualTo(SslTrustMode.NONE); } @Test public void resolveSslTrustMode() { java.util.Map<SslTrustMode, String> fixtures = new EnumMap<>(SslTrustMode.class); fixtures.put(SslTrustMode.CA, "ca"); fixtures.put(SslTrustMode.TOFU, "tofu"); fixtures.put(SslTrustMode.CA_OR_TOFU, "ca-or-tofu"); fixtures.put(SslTrustMode.NONE, "none"); for (SslTrustMode mode : fixtures.keySet()) { SslTrustMode result = SslTrustModeFactory.resolveByLegacyValue(fixtures.get(mode)); assertThat(result).isEqualTo(mode); } } @Test public void resolveSslTrustModeForCaOrTofu() { SslTrustMode result = SslTrustModeFactory.resolveByLegacyValue("ca-or-tofu"); assertThat(result).isEqualTo(SslTrustMode.CA_OR_TOFU); } }
[ "melowe.quorum@gmail.com" ]
melowe.quorum@gmail.com
ed7133cb5fbadccfb61cecf3e4540c691032b239
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/aom/src/main/java/com/huaweicloud/sdk/aom/v3/model/UpdateAppResponse.java
aa30baf7c43f1da18a38121587b0b5aede7cc564
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
732
java
package com.huaweicloud.sdk.aom.v3.model; import com.huaweicloud.sdk.core.SdkResponse; import java.util.Objects; /** * Response Object */ public class UpdateAppResponse extends SdkResponse { @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateAppResponse {\n"); sb.append("}"); return sb.toString(); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
b1a071d6a9435c5c894108a1b07c26cdd79a671a
cec1602d23034a8f6372c019e5770773f893a5f0
/sources/com/google/android/gms/tasks/zze.java
137d9a4cd13acfc5deb4586e82c5c679aa483617
[]
no_license
sengeiou/zeroner_app
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
refs/heads/master
2022-03-31T06:55:26.896963
2020-01-24T09:20:37
2020-01-24T09:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
package com.google.android.gms.tasks; import android.support.annotation.NonNull; import java.util.concurrent.Executor; final class zze<TResult> implements zzk<TResult> { /* access modifiers changed from: private */ public final Object mLock = new Object(); private final Executor zzkev; /* access modifiers changed from: private */ public OnCompleteListener<TResult> zzkud; public zze(@NonNull Executor executor, @NonNull OnCompleteListener<TResult> onCompleteListener) { this.zzkev = executor; this.zzkud = onCompleteListener; } public final void cancel() { synchronized (this.mLock) { this.zzkud = null; } } public final void onComplete(@NonNull Task<TResult> task) { synchronized (this.mLock) { if (this.zzkud != null) { this.zzkev.execute(new zzf(this, task)); } } } }
[ "johan@sellstrom.me" ]
johan@sellstrom.me
3c225843c802e336c0db11c2f4166b60e27d11f0
0a4d4b808ee0724114e6153c1204de4e253c1dcb
/samples/831/b.java
f0c779a1211a9e1354e2b89083be8b5afcb2bf91
[ "MIT" ]
permissive
yura-hb/sesame-sampled-pairs
543b19bf340f6a35681cfca1084349bd3eb8f853
33b061e3612a7b26198c17245c2835193f861151
refs/heads/main
2023-07-09T04:15:05.821444
2021-08-08T12:01:04
2021-08-08T12:01:04
393,947,142
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
class VM { /** * Returns {@code true} if the VM has been shutdown */ public static boolean isShutdown() { return initLevel == SYSTEM_SHUTDOWN; } private static volatile int initLevel; private static final int SYSTEM_SHUTDOWN = 5; }
[ "hayeuyur@MacBook-Pro.local" ]
hayeuyur@MacBook-Pro.local
f641fa07670679f8a531cdb142531ebb605279c5
469a2e6d9985b680d93c7183ac58cee59054de02
/bluej/src/bluej/stride/framedjava/ast/StringSlotFragment.java
caf36bb50bd5908c53427ace8d7f59280b0a6c82
[]
no_license
danlangford/greenfoot-mirror
8aaec447775f38a96e9e75fb80a965156ff35f86
9b508ae8643f590d25a234789c8ce62fc34e3cfb
refs/heads/master
2021-01-01T05:19:55.369341
2016-04-26T04:50:10
2016-04-26T04:50:10
57,012,099
1
1
null
null
null
null
UTF-8
Java
false
false
2,548
java
/* This file is part of the BlueJ program. Copyright (C) 2014,2015 Michael Kölling and John Rosenberg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. This file is subject to the Classpath exception as provided in the LICENSE.txt file that accompanied this code. */ package bluej.stride.framedjava.ast; import bluej.stride.framedjava.ast.links.PossibleLink; import bluej.stride.framedjava.errors.CodeError; import bluej.stride.framedjava.errors.ErrorShower; import bluej.stride.slots.EditableSlot; import threadchecker.OnThread; import threadchecker.Tag; import bluej.stride.framedjava.slots.UnderlineContainer; import bluej.stride.slots.TextSlot; import bluej.utility.javafx.FXRunnable; import java.util.List; public abstract class StringSlotFragment extends SlotFragment { protected final String content; public StringSlotFragment(String content) { this.content = content; if (content == null) { throw new IllegalArgumentException("SlotElement content cannot be null"); } else if (content.contains("\n")) { throw new IllegalStateException("SlotElement content contains newline"); } } public abstract EditableSlot getSlot(); @Override public ErrorShower getErrorShower() { return getSlot(); } @Override @OnThread(Tag.FX) public final void addError(CodeError error) { if (getSlot() != null) getSlot().addError(error); } @Override protected final JavaFragment getCompileErrorRedirect() { // SlotFragments should not override: return null; } /** * Gets the content of the slot, as it should be displayed in the editor. */ public String getContent() { return content; } public boolean isEmpty() { return content.isEmpty(); } }
[ "danlangford@gmail.com" ]
danlangford@gmail.com
49b8922b0c8fb743d9992bbef6c981c24c2e3c2c
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/84_ifx-framework-org.sourceforge.ifx.framework.pain004.simpletype.HongKongBankIdentifier-0.5-2/org/sourceforge/ifx/framework/pain004/simpletype/HongKongBankIdentifier_ESTest.java
2fc65a3c00a04b26961b748296bd7cf2d3ca874f
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
/* * This file was automatically generated by EvoSuite * Tue Oct 29 10:01:05 GMT 2019 */ package org.sourceforge.ifx.framework.pain004.simpletype; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class HongKongBankIdentifier_ESTest extends HongKongBankIdentifier_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
90c00ceb5880b88f3757040f1595f5dfc4530eeb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_7917a75ed208aed38d912b7d006f6da2b64e3391/JLS_10_7_ArrayMembers_2/28_7917a75ed208aed38d912b7d006f6da2b64e3391_JLS_10_7_ArrayMembers_2_s.java
ebfe70649de437924ad1a60fb16b53b3a763cfbd
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
303
java
public class JLS_10_7_ArrayMembers_2 { public static void main (String args[]) { int[] xs = {1,2,3,4,5,6,7,8,9}; int[] ys; ys = (int[]) xs.clone(); // the following line is a problem!! ys = xs.clone(); for(int y : ys) { System.out.println(y + " "); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5b855ffe76686e07327a05fa571c93ebb24f6591
f53e2419f1f28ee4406f16201d0eeb19f83ff548
/app/src/main/java/com/example/mymvpframe/constract/model/IgirlModel.java
cd5b79f38585a21a544a84857c37800b8179d80c
[]
no_license
iwanttoseethecode/myMVPFrame
5fe9c9bac0b6eab3175413aec078d9bd7be492c6
4a0679febe5e4148375040dc50009ea5850e8fa6
refs/heads/master
2020-08-02T03:59:02.200416
2019-09-27T03:19:17
2019-09-27T03:19:17
211,226,699
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.example.mymvpframe.constract.model; import com.example.mymvpframe.bean.GirlBean; import com.example.mymvpframe.constract.BaseModel; import java.util.List; /** * Created by luoling on 2019/9/16. * description: */ public interface IgirlModel extends BaseModel { void loadGirlData(); void loadGirlData(OnLoadListener onLoadListener); interface OnLoadListener{ void onComplete(List<GirlBean> list); } void useHttpFrame(); }
[ "782884760@qq.com" ]
782884760@qq.com
2efbf6551736451cd28f8a474fe7df2be9d2f4cc
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
/android/support/v4/app/NotificationManagerCompatIceCreamSandwich.java
4ac4ba9eb8e81337118a90f300f521e2ebc4761b
[]
no_license
killbus/jd_decompile
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
50c521ce6a2c71c37696e5c131ec2e03661417cc
refs/heads/master
2022-01-13T03:27:02.492579
2018-05-14T11:21:30
2018-05-14T11:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package android.support.v4.app; /* compiled from: TbsSdkJava */ class NotificationManagerCompatIceCreamSandwich { static final int SIDE_CHANNEL_BIND_FLAGS = 33; NotificationManagerCompatIceCreamSandwich() { } }
[ "13511577582@163.com" ]
13511577582@163.com